1#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
6#[repr(i32)]
7pub enum RequestFeeStatus {
8 REQUEST_FEE_STATUS_UNSPECIFIED = 0i32,
9 REQUEST_FEE_STATUS_LOCKED = 1i32,
11 REQUEST_FEE_STATUS_SETTLED = 2i32,
13}
14impl RequestFeeStatus {
15 #[allow(non_upper_case_globals)]
17 pub const Unspecified: Self = Self::REQUEST_FEE_STATUS_UNSPECIFIED;
18 #[allow(non_upper_case_globals)]
20 pub const Locked: Self = Self::REQUEST_FEE_STATUS_LOCKED;
21 #[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#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
162#[repr(i32)]
163pub enum LifecycleReason {
164 REASON_UNSPECIFIED = 0i32,
165 ZIPPER_VALIDATION_REJECTED = 101i32,
167 ZIPPER_EXECUTION_REJECTED = 102i32,
169 ZIPPER_WITHDRAW_EXECUTION_FAILED = 103i32,
171 ZIPPER_DEPOSIT_REFUND_FAILED = 104i32,
173 LEDGER_MIRROR_REJECTED = 200i32,
175 LEDGER_MIRROR_TRANSFER_EXCEEDS_CREDITS = 201i32,
178 LEDGER_MIRROR_TRANSFER_EXISTS = 202i32,
181 LEDGER_MIRROR_PENDING_TRANSFER_NOT_FOUND = 203i32,
184 LEDGER_MIRROR_TRANSFER_ID_ALREADY_FAILED = 204i32,
186}
187impl LifecycleReason {
188 #[allow(non_upper_case_globals)]
190 pub const ReasonUnspecified: Self = Self::REASON_UNSPECIFIED;
191 #[allow(non_upper_case_globals)]
193 pub const ZipperValidationRejected: Self = Self::ZIPPER_VALIDATION_REJECTED;
194 #[allow(non_upper_case_globals)]
196 pub const ZipperExecutionRejected: Self = Self::ZIPPER_EXECUTION_REJECTED;
197 #[allow(non_upper_case_globals)]
199 pub const ZipperWithdrawExecutionFailed: Self = Self::ZIPPER_WITHDRAW_EXECUTION_FAILED;
200 #[allow(non_upper_case_globals)]
202 pub const ZipperDepositRefundFailed: Self = Self::ZIPPER_DEPOSIT_REFUND_FAILED;
203 #[allow(non_upper_case_globals)]
205 pub const LedgerMirrorRejected: Self = Self::LEDGER_MIRROR_REJECTED;
206 #[allow(non_upper_case_globals)]
208 pub const LedgerMirrorTransferExceedsCredits: Self = Self::LEDGER_MIRROR_TRANSFER_EXCEEDS_CREDITS;
209 #[allow(non_upper_case_globals)]
211 pub const LedgerMirrorTransferExists: Self = Self::LEDGER_MIRROR_TRANSFER_EXISTS;
212 #[allow(non_upper_case_globals)]
214 pub const LedgerMirrorPendingTransferNotFound: Self = Self::LEDGER_MIRROR_PENDING_TRANSFER_NOT_FOUND;
215 #[allow(non_upper_case_globals)]
217 pub const LedgerMirrorTransferIdAlreadyFailed: Self = Self::LEDGER_MIRROR_TRANSFER_ID_ALREADY_FAILED;
218}
219impl ::core::default::Default for LifecycleReason {
220 fn default() -> Self {
221 Self::REASON_UNSPECIFIED
222 }
223}
224impl ::serde::Serialize for LifecycleReason {
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 LifecycleReason {
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 = LifecycleReason;
239 fn expecting(
240 &self,
241 f: &mut ::core::fmt::Formatter<'_>,
242 ) -> ::core::fmt::Result {
243 f.write_str(
244 concat!(
245 "a string, integer, or null for ", stringify!(LifecycleReason)
246 ),
247 )
248 }
249 fn visit_str<E: ::serde::de::Error>(
250 self,
251 v: &str,
252 ) -> ::core::result::Result<LifecycleReason, E> {
253 <LifecycleReason as ::buffa::Enumeration>::from_proto_name(v)
254 .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
255 }
256 fn visit_i64<E: ::serde::de::Error>(
257 self,
258 v: i64,
259 ) -> ::core::result::Result<LifecycleReason, E> {
260 let v32 = i32::try_from(v)
261 .map_err(|_| {
262 ::serde::de::Error::custom(
263 ::buffa::alloc::format!("enum value {v} out of i32 range"),
264 )
265 })?;
266 <LifecycleReason as ::buffa::Enumeration>::from_i32(v32)
267 .ok_or_else(|| {
268 ::serde::de::Error::custom(
269 ::buffa::alloc::format!("unknown enum value {v32}"),
270 )
271 })
272 }
273 fn visit_u64<E: ::serde::de::Error>(
274 self,
275 v: u64,
276 ) -> ::core::result::Result<LifecycleReason, E> {
277 let v32 = i32::try_from(v)
278 .map_err(|_| {
279 ::serde::de::Error::custom(
280 ::buffa::alloc::format!("enum value {v} out of i32 range"),
281 )
282 })?;
283 <LifecycleReason as ::buffa::Enumeration>::from_i32(v32)
284 .ok_or_else(|| {
285 ::serde::de::Error::custom(
286 ::buffa::alloc::format!("unknown enum value {v32}"),
287 )
288 })
289 }
290 fn visit_unit<E: ::serde::de::Error>(
291 self,
292 ) -> ::core::result::Result<LifecycleReason, E> {
293 ::core::result::Result::Ok(::core::default::Default::default())
294 }
295 }
296 d.deserialize_any(_V)
297 }
298}
299impl ::buffa::json_helpers::ProtoElemJson for LifecycleReason {
300 fn serialize_proto_json<S: ::serde::Serializer>(
301 v: &Self,
302 s: S,
303 ) -> ::core::result::Result<S::Ok, S::Error> {
304 ::serde::Serialize::serialize(v, s)
305 }
306 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
307 d: D,
308 ) -> ::core::result::Result<Self, D::Error> {
309 <Self as ::serde::Deserialize>::deserialize(d)
310 }
311}
312impl ::buffa::Enumeration for LifecycleReason {
313 fn from_i32(value: i32) -> ::core::option::Option<Self> {
314 match value {
315 0i32 => ::core::option::Option::Some(Self::REASON_UNSPECIFIED),
316 101i32 => ::core::option::Option::Some(Self::ZIPPER_VALIDATION_REJECTED),
317 102i32 => ::core::option::Option::Some(Self::ZIPPER_EXECUTION_REJECTED),
318 103i32 => {
319 ::core::option::Option::Some(Self::ZIPPER_WITHDRAW_EXECUTION_FAILED)
320 }
321 104i32 => ::core::option::Option::Some(Self::ZIPPER_DEPOSIT_REFUND_FAILED),
322 200i32 => ::core::option::Option::Some(Self::LEDGER_MIRROR_REJECTED),
323 201i32 => {
324 ::core::option::Option::Some(
325 Self::LEDGER_MIRROR_TRANSFER_EXCEEDS_CREDITS,
326 )
327 }
328 202i32 => ::core::option::Option::Some(Self::LEDGER_MIRROR_TRANSFER_EXISTS),
329 203i32 => {
330 ::core::option::Option::Some(
331 Self::LEDGER_MIRROR_PENDING_TRANSFER_NOT_FOUND,
332 )
333 }
334 204i32 => {
335 ::core::option::Option::Some(
336 Self::LEDGER_MIRROR_TRANSFER_ID_ALREADY_FAILED,
337 )
338 }
339 _ => ::core::option::Option::None,
340 }
341 }
342 fn to_i32(&self) -> i32 {
343 *self as i32
344 }
345 fn proto_name(&self) -> &'static str {
346 match self {
347 Self::REASON_UNSPECIFIED => "REASON_UNSPECIFIED",
348 Self::ZIPPER_VALIDATION_REJECTED => "ZIPPER_VALIDATION_REJECTED",
349 Self::ZIPPER_EXECUTION_REJECTED => "ZIPPER_EXECUTION_REJECTED",
350 Self::ZIPPER_WITHDRAW_EXECUTION_FAILED => "ZIPPER_WITHDRAW_EXECUTION_FAILED",
351 Self::ZIPPER_DEPOSIT_REFUND_FAILED => "ZIPPER_DEPOSIT_REFUND_FAILED",
352 Self::LEDGER_MIRROR_REJECTED => "LEDGER_MIRROR_REJECTED",
353 Self::LEDGER_MIRROR_TRANSFER_EXCEEDS_CREDITS => {
354 "LEDGER_MIRROR_TRANSFER_EXCEEDS_CREDITS"
355 }
356 Self::LEDGER_MIRROR_TRANSFER_EXISTS => "LEDGER_MIRROR_TRANSFER_EXISTS",
357 Self::LEDGER_MIRROR_PENDING_TRANSFER_NOT_FOUND => {
358 "LEDGER_MIRROR_PENDING_TRANSFER_NOT_FOUND"
359 }
360 Self::LEDGER_MIRROR_TRANSFER_ID_ALREADY_FAILED => {
361 "LEDGER_MIRROR_TRANSFER_ID_ALREADY_FAILED"
362 }
363 }
364 }
365 fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
366 match name {
367 "REASON_UNSPECIFIED" => {
368 ::core::option::Option::Some(Self::REASON_UNSPECIFIED)
369 }
370 "ZIPPER_VALIDATION_REJECTED" => {
371 ::core::option::Option::Some(Self::ZIPPER_VALIDATION_REJECTED)
372 }
373 "ZIPPER_EXECUTION_REJECTED" => {
374 ::core::option::Option::Some(Self::ZIPPER_EXECUTION_REJECTED)
375 }
376 "ZIPPER_WITHDRAW_EXECUTION_FAILED" => {
377 ::core::option::Option::Some(Self::ZIPPER_WITHDRAW_EXECUTION_FAILED)
378 }
379 "ZIPPER_DEPOSIT_REFUND_FAILED" => {
380 ::core::option::Option::Some(Self::ZIPPER_DEPOSIT_REFUND_FAILED)
381 }
382 "LEDGER_MIRROR_REJECTED" => {
383 ::core::option::Option::Some(Self::LEDGER_MIRROR_REJECTED)
384 }
385 "LEDGER_MIRROR_TRANSFER_EXCEEDS_CREDITS" => {
386 ::core::option::Option::Some(
387 Self::LEDGER_MIRROR_TRANSFER_EXCEEDS_CREDITS,
388 )
389 }
390 "LEDGER_MIRROR_TRANSFER_EXISTS" => {
391 ::core::option::Option::Some(Self::LEDGER_MIRROR_TRANSFER_EXISTS)
392 }
393 "LEDGER_MIRROR_PENDING_TRANSFER_NOT_FOUND" => {
394 ::core::option::Option::Some(
395 Self::LEDGER_MIRROR_PENDING_TRANSFER_NOT_FOUND,
396 )
397 }
398 "LEDGER_MIRROR_TRANSFER_ID_ALREADY_FAILED" => {
399 ::core::option::Option::Some(
400 Self::LEDGER_MIRROR_TRANSFER_ID_ALREADY_FAILED,
401 )
402 }
403 _ => ::core::option::Option::None,
404 }
405 }
406 fn values() -> &'static [Self] {
407 &[
408 Self::REASON_UNSPECIFIED,
409 Self::ZIPPER_VALIDATION_REJECTED,
410 Self::ZIPPER_EXECUTION_REJECTED,
411 Self::ZIPPER_WITHDRAW_EXECUTION_FAILED,
412 Self::ZIPPER_DEPOSIT_REFUND_FAILED,
413 Self::LEDGER_MIRROR_REJECTED,
414 Self::LEDGER_MIRROR_TRANSFER_EXCEEDS_CREDITS,
415 Self::LEDGER_MIRROR_TRANSFER_EXISTS,
416 Self::LEDGER_MIRROR_PENDING_TRANSFER_NOT_FOUND,
417 Self::LEDGER_MIRROR_TRANSFER_ID_ALREADY_FAILED,
418 ]
419 }
420}
421#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
423#[repr(i32)]
424pub enum FlowKind {
425 KIND_UNSPECIFIED = 0i32,
426 KIND_DEPOSIT = 1i32,
428 KIND_WITHDRAW = 2i32,
430 KIND_TRANSFER = 3i32,
432}
433impl FlowKind {
434 #[allow(non_upper_case_globals)]
436 pub const KindUnspecified: Self = Self::KIND_UNSPECIFIED;
437 #[allow(non_upper_case_globals)]
439 pub const KindDeposit: Self = Self::KIND_DEPOSIT;
440 #[allow(non_upper_case_globals)]
442 pub const KindWithdraw: Self = Self::KIND_WITHDRAW;
443 #[allow(non_upper_case_globals)]
445 pub const KindTransfer: Self = Self::KIND_TRANSFER;
446}
447impl ::core::default::Default for FlowKind {
448 fn default() -> Self {
449 Self::KIND_UNSPECIFIED
450 }
451}
452impl ::serde::Serialize for FlowKind {
453 fn serialize<S: ::serde::Serializer>(
454 &self,
455 s: S,
456 ) -> ::core::result::Result<S::Ok, S::Error> {
457 s.serialize_str(::buffa::Enumeration::proto_name(self))
458 }
459}
460impl<'de> ::serde::Deserialize<'de> for FlowKind {
461 fn deserialize<D: ::serde::Deserializer<'de>>(
462 d: D,
463 ) -> ::core::result::Result<Self, D::Error> {
464 struct _V;
465 impl ::serde::de::Visitor<'_> for _V {
466 type Value = FlowKind;
467 fn expecting(
468 &self,
469 f: &mut ::core::fmt::Formatter<'_>,
470 ) -> ::core::fmt::Result {
471 f.write_str(
472 concat!("a string, integer, or null for ", stringify!(FlowKind)),
473 )
474 }
475 fn visit_str<E: ::serde::de::Error>(
476 self,
477 v: &str,
478 ) -> ::core::result::Result<FlowKind, E> {
479 <FlowKind as ::buffa::Enumeration>::from_proto_name(v)
480 .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
481 }
482 fn visit_i64<E: ::serde::de::Error>(
483 self,
484 v: i64,
485 ) -> ::core::result::Result<FlowKind, E> {
486 let v32 = i32::try_from(v)
487 .map_err(|_| {
488 ::serde::de::Error::custom(
489 ::buffa::alloc::format!("enum value {v} out of i32 range"),
490 )
491 })?;
492 <FlowKind as ::buffa::Enumeration>::from_i32(v32)
493 .ok_or_else(|| {
494 ::serde::de::Error::custom(
495 ::buffa::alloc::format!("unknown enum value {v32}"),
496 )
497 })
498 }
499 fn visit_u64<E: ::serde::de::Error>(
500 self,
501 v: u64,
502 ) -> ::core::result::Result<FlowKind, E> {
503 let v32 = i32::try_from(v)
504 .map_err(|_| {
505 ::serde::de::Error::custom(
506 ::buffa::alloc::format!("enum value {v} out of i32 range"),
507 )
508 })?;
509 <FlowKind as ::buffa::Enumeration>::from_i32(v32)
510 .ok_or_else(|| {
511 ::serde::de::Error::custom(
512 ::buffa::alloc::format!("unknown enum value {v32}"),
513 )
514 })
515 }
516 fn visit_unit<E: ::serde::de::Error>(
517 self,
518 ) -> ::core::result::Result<FlowKind, E> {
519 ::core::result::Result::Ok(::core::default::Default::default())
520 }
521 }
522 d.deserialize_any(_V)
523 }
524}
525impl ::buffa::json_helpers::ProtoElemJson for FlowKind {
526 fn serialize_proto_json<S: ::serde::Serializer>(
527 v: &Self,
528 s: S,
529 ) -> ::core::result::Result<S::Ok, S::Error> {
530 ::serde::Serialize::serialize(v, s)
531 }
532 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
533 d: D,
534 ) -> ::core::result::Result<Self, D::Error> {
535 <Self as ::serde::Deserialize>::deserialize(d)
536 }
537}
538impl ::buffa::Enumeration for FlowKind {
539 fn from_i32(value: i32) -> ::core::option::Option<Self> {
540 match value {
541 0i32 => ::core::option::Option::Some(Self::KIND_UNSPECIFIED),
542 1i32 => ::core::option::Option::Some(Self::KIND_DEPOSIT),
543 2i32 => ::core::option::Option::Some(Self::KIND_WITHDRAW),
544 3i32 => ::core::option::Option::Some(Self::KIND_TRANSFER),
545 _ => ::core::option::Option::None,
546 }
547 }
548 fn to_i32(&self) -> i32 {
549 *self as i32
550 }
551 fn proto_name(&self) -> &'static str {
552 match self {
553 Self::KIND_UNSPECIFIED => "KIND_UNSPECIFIED",
554 Self::KIND_DEPOSIT => "KIND_DEPOSIT",
555 Self::KIND_WITHDRAW => "KIND_WITHDRAW",
556 Self::KIND_TRANSFER => "KIND_TRANSFER",
557 }
558 }
559 fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
560 match name {
561 "KIND_UNSPECIFIED" => ::core::option::Option::Some(Self::KIND_UNSPECIFIED),
562 "KIND_DEPOSIT" => ::core::option::Option::Some(Self::KIND_DEPOSIT),
563 "KIND_WITHDRAW" => ::core::option::Option::Some(Self::KIND_WITHDRAW),
564 "KIND_TRANSFER" => ::core::option::Option::Some(Self::KIND_TRANSFER),
565 _ => ::core::option::Option::None,
566 }
567 }
568 fn values() -> &'static [Self] {
569 &[
570 Self::KIND_UNSPECIFIED,
571 Self::KIND_DEPOSIT,
572 Self::KIND_WITHDRAW,
573 Self::KIND_TRANSFER,
574 ]
575 }
576}
577#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
580#[repr(i32)]
581pub enum FlowDomain {
582 DOMAIN_UNSPECIFIED = 0i32,
583 DOMAIN_EXTERNAL_CHAIN = 1i32,
585 DOMAIN_ZIPPER = 2i32,
587 DOMAIN_FUNDING = 3i32,
589 DOMAIN_TRADING = 4i32,
591 DOMAIN_LENDING = 5i32,
593}
594impl FlowDomain {
595 #[allow(non_upper_case_globals)]
597 pub const DomainUnspecified: Self = Self::DOMAIN_UNSPECIFIED;
598 #[allow(non_upper_case_globals)]
600 pub const DomainExternalChain: Self = Self::DOMAIN_EXTERNAL_CHAIN;
601 #[allow(non_upper_case_globals)]
603 pub const DomainZipper: Self = Self::DOMAIN_ZIPPER;
604 #[allow(non_upper_case_globals)]
606 pub const DomainFunding: Self = Self::DOMAIN_FUNDING;
607 #[allow(non_upper_case_globals)]
609 pub const DomainTrading: Self = Self::DOMAIN_TRADING;
610 #[allow(non_upper_case_globals)]
612 pub const DomainLending: Self = Self::DOMAIN_LENDING;
613}
614impl ::core::default::Default for FlowDomain {
615 fn default() -> Self {
616 Self::DOMAIN_UNSPECIFIED
617 }
618}
619impl ::serde::Serialize for FlowDomain {
620 fn serialize<S: ::serde::Serializer>(
621 &self,
622 s: S,
623 ) -> ::core::result::Result<S::Ok, S::Error> {
624 s.serialize_str(::buffa::Enumeration::proto_name(self))
625 }
626}
627impl<'de> ::serde::Deserialize<'de> for FlowDomain {
628 fn deserialize<D: ::serde::Deserializer<'de>>(
629 d: D,
630 ) -> ::core::result::Result<Self, D::Error> {
631 struct _V;
632 impl ::serde::de::Visitor<'_> for _V {
633 type Value = FlowDomain;
634 fn expecting(
635 &self,
636 f: &mut ::core::fmt::Formatter<'_>,
637 ) -> ::core::fmt::Result {
638 f.write_str(
639 concat!("a string, integer, or null for ", stringify!(FlowDomain)),
640 )
641 }
642 fn visit_str<E: ::serde::de::Error>(
643 self,
644 v: &str,
645 ) -> ::core::result::Result<FlowDomain, E> {
646 <FlowDomain as ::buffa::Enumeration>::from_proto_name(v)
647 .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
648 }
649 fn visit_i64<E: ::serde::de::Error>(
650 self,
651 v: i64,
652 ) -> ::core::result::Result<FlowDomain, E> {
653 let v32 = i32::try_from(v)
654 .map_err(|_| {
655 ::serde::de::Error::custom(
656 ::buffa::alloc::format!("enum value {v} out of i32 range"),
657 )
658 })?;
659 <FlowDomain as ::buffa::Enumeration>::from_i32(v32)
660 .ok_or_else(|| {
661 ::serde::de::Error::custom(
662 ::buffa::alloc::format!("unknown enum value {v32}"),
663 )
664 })
665 }
666 fn visit_u64<E: ::serde::de::Error>(
667 self,
668 v: u64,
669 ) -> ::core::result::Result<FlowDomain, E> {
670 let v32 = i32::try_from(v)
671 .map_err(|_| {
672 ::serde::de::Error::custom(
673 ::buffa::alloc::format!("enum value {v} out of i32 range"),
674 )
675 })?;
676 <FlowDomain as ::buffa::Enumeration>::from_i32(v32)
677 .ok_or_else(|| {
678 ::serde::de::Error::custom(
679 ::buffa::alloc::format!("unknown enum value {v32}"),
680 )
681 })
682 }
683 fn visit_unit<E: ::serde::de::Error>(
684 self,
685 ) -> ::core::result::Result<FlowDomain, E> {
686 ::core::result::Result::Ok(::core::default::Default::default())
687 }
688 }
689 d.deserialize_any(_V)
690 }
691}
692impl ::buffa::json_helpers::ProtoElemJson for FlowDomain {
693 fn serialize_proto_json<S: ::serde::Serializer>(
694 v: &Self,
695 s: S,
696 ) -> ::core::result::Result<S::Ok, S::Error> {
697 ::serde::Serialize::serialize(v, s)
698 }
699 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
700 d: D,
701 ) -> ::core::result::Result<Self, D::Error> {
702 <Self as ::serde::Deserialize>::deserialize(d)
703 }
704}
705impl ::buffa::Enumeration for FlowDomain {
706 fn from_i32(value: i32) -> ::core::option::Option<Self> {
707 match value {
708 0i32 => ::core::option::Option::Some(Self::DOMAIN_UNSPECIFIED),
709 1i32 => ::core::option::Option::Some(Self::DOMAIN_EXTERNAL_CHAIN),
710 2i32 => ::core::option::Option::Some(Self::DOMAIN_ZIPPER),
711 3i32 => ::core::option::Option::Some(Self::DOMAIN_FUNDING),
712 4i32 => ::core::option::Option::Some(Self::DOMAIN_TRADING),
713 5i32 => ::core::option::Option::Some(Self::DOMAIN_LENDING),
714 _ => ::core::option::Option::None,
715 }
716 }
717 fn to_i32(&self) -> i32 {
718 *self as i32
719 }
720 fn proto_name(&self) -> &'static str {
721 match self {
722 Self::DOMAIN_UNSPECIFIED => "DOMAIN_UNSPECIFIED",
723 Self::DOMAIN_EXTERNAL_CHAIN => "DOMAIN_EXTERNAL_CHAIN",
724 Self::DOMAIN_ZIPPER => "DOMAIN_ZIPPER",
725 Self::DOMAIN_FUNDING => "DOMAIN_FUNDING",
726 Self::DOMAIN_TRADING => "DOMAIN_TRADING",
727 Self::DOMAIN_LENDING => "DOMAIN_LENDING",
728 }
729 }
730 fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
731 match name {
732 "DOMAIN_UNSPECIFIED" => {
733 ::core::option::Option::Some(Self::DOMAIN_UNSPECIFIED)
734 }
735 "DOMAIN_EXTERNAL_CHAIN" => {
736 ::core::option::Option::Some(Self::DOMAIN_EXTERNAL_CHAIN)
737 }
738 "DOMAIN_ZIPPER" => ::core::option::Option::Some(Self::DOMAIN_ZIPPER),
739 "DOMAIN_FUNDING" => ::core::option::Option::Some(Self::DOMAIN_FUNDING),
740 "DOMAIN_TRADING" => ::core::option::Option::Some(Self::DOMAIN_TRADING),
741 "DOMAIN_LENDING" => ::core::option::Option::Some(Self::DOMAIN_LENDING),
742 _ => ::core::option::Option::None,
743 }
744 }
745 fn values() -> &'static [Self] {
746 &[
747 Self::DOMAIN_UNSPECIFIED,
748 Self::DOMAIN_EXTERNAL_CHAIN,
749 Self::DOMAIN_ZIPPER,
750 Self::DOMAIN_FUNDING,
751 Self::DOMAIN_TRADING,
752 Self::DOMAIN_LENDING,
753 ]
754 }
755}
756#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
759#[repr(i32)]
760pub enum LifecycleSource {
761 SOURCE_UNSPECIFIED = 0i32,
762 SOURCE_RELAYER = 1i32,
764 SOURCE_POLYESTER_CHAIN = 2i32,
766 SOURCE_EXECUTOR = 3i32,
768 SOURCE_LEDGER = 4i32,
770}
771impl LifecycleSource {
772 #[allow(non_upper_case_globals)]
774 pub const SourceUnspecified: Self = Self::SOURCE_UNSPECIFIED;
775 #[allow(non_upper_case_globals)]
777 pub const SourceRelayer: Self = Self::SOURCE_RELAYER;
778 #[allow(non_upper_case_globals)]
780 pub const SourcePolyesterChain: Self = Self::SOURCE_POLYESTER_CHAIN;
781 #[allow(non_upper_case_globals)]
783 pub const SourceExecutor: Self = Self::SOURCE_EXECUTOR;
784 #[allow(non_upper_case_globals)]
786 pub const SourceLedger: Self = Self::SOURCE_LEDGER;
787}
788impl ::core::default::Default for LifecycleSource {
789 fn default() -> Self {
790 Self::SOURCE_UNSPECIFIED
791 }
792}
793impl ::serde::Serialize for LifecycleSource {
794 fn serialize<S: ::serde::Serializer>(
795 &self,
796 s: S,
797 ) -> ::core::result::Result<S::Ok, S::Error> {
798 s.serialize_str(::buffa::Enumeration::proto_name(self))
799 }
800}
801impl<'de> ::serde::Deserialize<'de> for LifecycleSource {
802 fn deserialize<D: ::serde::Deserializer<'de>>(
803 d: D,
804 ) -> ::core::result::Result<Self, D::Error> {
805 struct _V;
806 impl ::serde::de::Visitor<'_> for _V {
807 type Value = LifecycleSource;
808 fn expecting(
809 &self,
810 f: &mut ::core::fmt::Formatter<'_>,
811 ) -> ::core::fmt::Result {
812 f.write_str(
813 concat!(
814 "a string, integer, or null for ", stringify!(LifecycleSource)
815 ),
816 )
817 }
818 fn visit_str<E: ::serde::de::Error>(
819 self,
820 v: &str,
821 ) -> ::core::result::Result<LifecycleSource, E> {
822 <LifecycleSource as ::buffa::Enumeration>::from_proto_name(v)
823 .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
824 }
825 fn visit_i64<E: ::serde::de::Error>(
826 self,
827 v: i64,
828 ) -> ::core::result::Result<LifecycleSource, E> {
829 let v32 = i32::try_from(v)
830 .map_err(|_| {
831 ::serde::de::Error::custom(
832 ::buffa::alloc::format!("enum value {v} out of i32 range"),
833 )
834 })?;
835 <LifecycleSource as ::buffa::Enumeration>::from_i32(v32)
836 .ok_or_else(|| {
837 ::serde::de::Error::custom(
838 ::buffa::alloc::format!("unknown enum value {v32}"),
839 )
840 })
841 }
842 fn visit_u64<E: ::serde::de::Error>(
843 self,
844 v: u64,
845 ) -> ::core::result::Result<LifecycleSource, E> {
846 let v32 = i32::try_from(v)
847 .map_err(|_| {
848 ::serde::de::Error::custom(
849 ::buffa::alloc::format!("enum value {v} out of i32 range"),
850 )
851 })?;
852 <LifecycleSource as ::buffa::Enumeration>::from_i32(v32)
853 .ok_or_else(|| {
854 ::serde::de::Error::custom(
855 ::buffa::alloc::format!("unknown enum value {v32}"),
856 )
857 })
858 }
859 fn visit_unit<E: ::serde::de::Error>(
860 self,
861 ) -> ::core::result::Result<LifecycleSource, E> {
862 ::core::result::Result::Ok(::core::default::Default::default())
863 }
864 }
865 d.deserialize_any(_V)
866 }
867}
868impl ::buffa::json_helpers::ProtoElemJson for LifecycleSource {
869 fn serialize_proto_json<S: ::serde::Serializer>(
870 v: &Self,
871 s: S,
872 ) -> ::core::result::Result<S::Ok, S::Error> {
873 ::serde::Serialize::serialize(v, s)
874 }
875 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
876 d: D,
877 ) -> ::core::result::Result<Self, D::Error> {
878 <Self as ::serde::Deserialize>::deserialize(d)
879 }
880}
881impl ::buffa::Enumeration for LifecycleSource {
882 fn from_i32(value: i32) -> ::core::option::Option<Self> {
883 match value {
884 0i32 => ::core::option::Option::Some(Self::SOURCE_UNSPECIFIED),
885 1i32 => ::core::option::Option::Some(Self::SOURCE_RELAYER),
886 2i32 => ::core::option::Option::Some(Self::SOURCE_POLYESTER_CHAIN),
887 3i32 => ::core::option::Option::Some(Self::SOURCE_EXECUTOR),
888 4i32 => ::core::option::Option::Some(Self::SOURCE_LEDGER),
889 _ => ::core::option::Option::None,
890 }
891 }
892 fn to_i32(&self) -> i32 {
893 *self as i32
894 }
895 fn proto_name(&self) -> &'static str {
896 match self {
897 Self::SOURCE_UNSPECIFIED => "SOURCE_UNSPECIFIED",
898 Self::SOURCE_RELAYER => "SOURCE_RELAYER",
899 Self::SOURCE_POLYESTER_CHAIN => "SOURCE_POLYESTER_CHAIN",
900 Self::SOURCE_EXECUTOR => "SOURCE_EXECUTOR",
901 Self::SOURCE_LEDGER => "SOURCE_LEDGER",
902 }
903 }
904 fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
905 match name {
906 "SOURCE_UNSPECIFIED" => {
907 ::core::option::Option::Some(Self::SOURCE_UNSPECIFIED)
908 }
909 "SOURCE_RELAYER" => ::core::option::Option::Some(Self::SOURCE_RELAYER),
910 "SOURCE_POLYESTER_CHAIN" => {
911 ::core::option::Option::Some(Self::SOURCE_POLYESTER_CHAIN)
912 }
913 "SOURCE_EXECUTOR" => ::core::option::Option::Some(Self::SOURCE_EXECUTOR),
914 "SOURCE_LEDGER" => ::core::option::Option::Some(Self::SOURCE_LEDGER),
915 _ => ::core::option::Option::None,
916 }
917 }
918 fn values() -> &'static [Self] {
919 &[
920 Self::SOURCE_UNSPECIFIED,
921 Self::SOURCE_RELAYER,
922 Self::SOURCE_POLYESTER_CHAIN,
923 Self::SOURCE_EXECUTOR,
924 Self::SOURCE_LEDGER,
925 ]
926 }
927}
928#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
930#[repr(i32)]
931pub enum FlowState {
932 STATE_UNSPECIFIED = 0i32,
933 STATE_PENDING_SOURCE = 1i32,
935 STATE_PENDING_POLYESTER_CHAIN = 2i32,
937 STATE_PENDING_LEDGER = 3i32,
939 STATE_COMPLETED = 4i32,
941 STATE_FAILED = 5i32,
943 STATE_DROPPED = 6i32,
945 STATE_REFUNDED = 7i32,
947}
948impl FlowState {
949 #[allow(non_upper_case_globals)]
951 pub const StateUnspecified: Self = Self::STATE_UNSPECIFIED;
952 #[allow(non_upper_case_globals)]
954 pub const StatePendingSource: Self = Self::STATE_PENDING_SOURCE;
955 #[allow(non_upper_case_globals)]
957 pub const StatePendingPolyesterChain: Self = Self::STATE_PENDING_POLYESTER_CHAIN;
958 #[allow(non_upper_case_globals)]
960 pub const StatePendingLedger: Self = Self::STATE_PENDING_LEDGER;
961 #[allow(non_upper_case_globals)]
963 pub const StateCompleted: Self = Self::STATE_COMPLETED;
964 #[allow(non_upper_case_globals)]
966 pub const StateFailed: Self = Self::STATE_FAILED;
967 #[allow(non_upper_case_globals)]
969 pub const StateDropped: Self = Self::STATE_DROPPED;
970 #[allow(non_upper_case_globals)]
972 pub const StateRefunded: Self = Self::STATE_REFUNDED;
973}
974impl ::core::default::Default for FlowState {
975 fn default() -> Self {
976 Self::STATE_UNSPECIFIED
977 }
978}
979impl ::serde::Serialize for FlowState {
980 fn serialize<S: ::serde::Serializer>(
981 &self,
982 s: S,
983 ) -> ::core::result::Result<S::Ok, S::Error> {
984 s.serialize_str(::buffa::Enumeration::proto_name(self))
985 }
986}
987impl<'de> ::serde::Deserialize<'de> for FlowState {
988 fn deserialize<D: ::serde::Deserializer<'de>>(
989 d: D,
990 ) -> ::core::result::Result<Self, D::Error> {
991 struct _V;
992 impl ::serde::de::Visitor<'_> for _V {
993 type Value = FlowState;
994 fn expecting(
995 &self,
996 f: &mut ::core::fmt::Formatter<'_>,
997 ) -> ::core::fmt::Result {
998 f.write_str(
999 concat!("a string, integer, or null for ", stringify!(FlowState)),
1000 )
1001 }
1002 fn visit_str<E: ::serde::de::Error>(
1003 self,
1004 v: &str,
1005 ) -> ::core::result::Result<FlowState, E> {
1006 <FlowState as ::buffa::Enumeration>::from_proto_name(v)
1007 .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
1008 }
1009 fn visit_i64<E: ::serde::de::Error>(
1010 self,
1011 v: i64,
1012 ) -> ::core::result::Result<FlowState, E> {
1013 let v32 = i32::try_from(v)
1014 .map_err(|_| {
1015 ::serde::de::Error::custom(
1016 ::buffa::alloc::format!("enum value {v} out of i32 range"),
1017 )
1018 })?;
1019 <FlowState as ::buffa::Enumeration>::from_i32(v32)
1020 .ok_or_else(|| {
1021 ::serde::de::Error::custom(
1022 ::buffa::alloc::format!("unknown enum value {v32}"),
1023 )
1024 })
1025 }
1026 fn visit_u64<E: ::serde::de::Error>(
1027 self,
1028 v: u64,
1029 ) -> ::core::result::Result<FlowState, E> {
1030 let v32 = i32::try_from(v)
1031 .map_err(|_| {
1032 ::serde::de::Error::custom(
1033 ::buffa::alloc::format!("enum value {v} out of i32 range"),
1034 )
1035 })?;
1036 <FlowState as ::buffa::Enumeration>::from_i32(v32)
1037 .ok_or_else(|| {
1038 ::serde::de::Error::custom(
1039 ::buffa::alloc::format!("unknown enum value {v32}"),
1040 )
1041 })
1042 }
1043 fn visit_unit<E: ::serde::de::Error>(
1044 self,
1045 ) -> ::core::result::Result<FlowState, E> {
1046 ::core::result::Result::Ok(::core::default::Default::default())
1047 }
1048 }
1049 d.deserialize_any(_V)
1050 }
1051}
1052impl ::buffa::json_helpers::ProtoElemJson for FlowState {
1053 fn serialize_proto_json<S: ::serde::Serializer>(
1054 v: &Self,
1055 s: S,
1056 ) -> ::core::result::Result<S::Ok, S::Error> {
1057 ::serde::Serialize::serialize(v, s)
1058 }
1059 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1060 d: D,
1061 ) -> ::core::result::Result<Self, D::Error> {
1062 <Self as ::serde::Deserialize>::deserialize(d)
1063 }
1064}
1065impl ::buffa::Enumeration for FlowState {
1066 fn from_i32(value: i32) -> ::core::option::Option<Self> {
1067 match value {
1068 0i32 => ::core::option::Option::Some(Self::STATE_UNSPECIFIED),
1069 1i32 => ::core::option::Option::Some(Self::STATE_PENDING_SOURCE),
1070 2i32 => ::core::option::Option::Some(Self::STATE_PENDING_POLYESTER_CHAIN),
1071 3i32 => ::core::option::Option::Some(Self::STATE_PENDING_LEDGER),
1072 4i32 => ::core::option::Option::Some(Self::STATE_COMPLETED),
1073 5i32 => ::core::option::Option::Some(Self::STATE_FAILED),
1074 6i32 => ::core::option::Option::Some(Self::STATE_DROPPED),
1075 7i32 => ::core::option::Option::Some(Self::STATE_REFUNDED),
1076 _ => ::core::option::Option::None,
1077 }
1078 }
1079 fn to_i32(&self) -> i32 {
1080 *self as i32
1081 }
1082 fn proto_name(&self) -> &'static str {
1083 match self {
1084 Self::STATE_UNSPECIFIED => "STATE_UNSPECIFIED",
1085 Self::STATE_PENDING_SOURCE => "STATE_PENDING_SOURCE",
1086 Self::STATE_PENDING_POLYESTER_CHAIN => "STATE_PENDING_POLYESTER_CHAIN",
1087 Self::STATE_PENDING_LEDGER => "STATE_PENDING_LEDGER",
1088 Self::STATE_COMPLETED => "STATE_COMPLETED",
1089 Self::STATE_FAILED => "STATE_FAILED",
1090 Self::STATE_DROPPED => "STATE_DROPPED",
1091 Self::STATE_REFUNDED => "STATE_REFUNDED",
1092 }
1093 }
1094 fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
1095 match name {
1096 "STATE_UNSPECIFIED" => ::core::option::Option::Some(Self::STATE_UNSPECIFIED),
1097 "STATE_PENDING_SOURCE" => {
1098 ::core::option::Option::Some(Self::STATE_PENDING_SOURCE)
1099 }
1100 "STATE_PENDING_POLYESTER_CHAIN" => {
1101 ::core::option::Option::Some(Self::STATE_PENDING_POLYESTER_CHAIN)
1102 }
1103 "STATE_PENDING_LEDGER" => {
1104 ::core::option::Option::Some(Self::STATE_PENDING_LEDGER)
1105 }
1106 "STATE_COMPLETED" => ::core::option::Option::Some(Self::STATE_COMPLETED),
1107 "STATE_FAILED" => ::core::option::Option::Some(Self::STATE_FAILED),
1108 "STATE_DROPPED" => ::core::option::Option::Some(Self::STATE_DROPPED),
1109 "STATE_REFUNDED" => ::core::option::Option::Some(Self::STATE_REFUNDED),
1110 _ => ::core::option::Option::None,
1111 }
1112 }
1113 fn values() -> &'static [Self] {
1114 &[
1115 Self::STATE_UNSPECIFIED,
1116 Self::STATE_PENDING_SOURCE,
1117 Self::STATE_PENDING_POLYESTER_CHAIN,
1118 Self::STATE_PENDING_LEDGER,
1119 Self::STATE_COMPLETED,
1120 Self::STATE_FAILED,
1121 Self::STATE_DROPPED,
1122 Self::STATE_REFUNDED,
1123 ]
1124 }
1125}
1126#[derive(Clone, PartialEq, Default)]
1128#[derive(::serde::Serialize, ::serde::Deserialize)]
1129#[serde(default)]
1130pub struct AssetIds {
1131 #[serde(
1138 rename = "zippedAssetId",
1139 alias = "zipped_asset_id",
1140 with = "::buffa::json_helpers::uint32",
1141 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
1142 )]
1143 pub zipped_asset_id: u32,
1144 #[serde(
1151 rename = "unifiedAssetId",
1152 alias = "unified_asset_id",
1153 with = "::buffa::json_helpers::uint32",
1154 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
1155 )]
1156 pub unified_asset_id: u32,
1157 #[serde(skip)]
1158 #[doc(hidden)]
1159 pub __buffa_unknown_fields: ::buffa::UnknownFields,
1160}
1161impl ::core::fmt::Debug for AssetIds {
1162 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1163 f.debug_struct("AssetIds")
1164 .field("zipped_asset_id", &self.zipped_asset_id)
1165 .field("unified_asset_id", &self.unified_asset_id)
1166 .finish()
1167 }
1168}
1169impl AssetIds {
1170 pub const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.AssetIds";
1175}
1176::buffa::impl_default_instance!(AssetIds);
1177impl ::buffa::MessageName for AssetIds {
1178 const PACKAGE: &'static str = "chain.lifecycle.v1";
1179 const NAME: &'static str = "AssetIds";
1180 const FULL_NAME: &'static str = "chain.lifecycle.v1.AssetIds";
1181 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.AssetIds";
1182}
1183impl ::buffa::Message for AssetIds {
1184 #[allow(clippy::let_and_return)]
1190 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
1191 #[allow(unused_imports)]
1192 use ::buffa::Enumeration as _;
1193 let mut size = 0u32;
1194 if self.zipped_asset_id != 0u32 {
1195 size
1196 += 1u32
1197 + ::buffa::types::uint32_encoded_len(self.zipped_asset_id) as u32;
1198 }
1199 if self.unified_asset_id != 0u32 {
1200 size
1201 += 1u32
1202 + ::buffa::types::uint32_encoded_len(self.unified_asset_id) as u32;
1203 }
1204 size += self.__buffa_unknown_fields.encoded_len() as u32;
1205 size
1206 }
1207 fn write_to(
1208 &self,
1209 _cache: &mut ::buffa::SizeCache,
1210 buf: &mut impl ::buffa::bytes::BufMut,
1211 ) {
1212 #[allow(unused_imports)]
1213 use ::buffa::Enumeration as _;
1214 if self.zipped_asset_id != 0u32 {
1215 ::buffa::types::put_uint32_field(1u32, self.zipped_asset_id, buf);
1216 }
1217 if self.unified_asset_id != 0u32 {
1218 ::buffa::types::put_uint32_field(3u32, self.unified_asset_id, buf);
1219 }
1220 self.__buffa_unknown_fields.write_to(buf);
1221 }
1222 fn merge_field(
1223 &mut self,
1224 tag: ::buffa::encoding::Tag,
1225 buf: &mut impl ::buffa::bytes::Buf,
1226 ctx: ::buffa::DecodeContext<'_>,
1227 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1228 #[allow(unused_imports)]
1229 use ::buffa::bytes::Buf as _;
1230 #[allow(unused_imports)]
1231 use ::buffa::Enumeration as _;
1232 match tag.field_number() {
1233 1u32 => {
1234 ::buffa::encoding::check_wire_type(
1235 tag,
1236 ::buffa::encoding::WireType::Varint,
1237 )?;
1238 self.zipped_asset_id = ::buffa::types::decode_uint32(buf)?;
1239 }
1240 3u32 => {
1241 ::buffa::encoding::check_wire_type(
1242 tag,
1243 ::buffa::encoding::WireType::Varint,
1244 )?;
1245 self.unified_asset_id = ::buffa::types::decode_uint32(buf)?;
1246 }
1247 _ => {
1248 self.__buffa_unknown_fields
1249 .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
1250 }
1251 }
1252 ::core::result::Result::Ok(())
1253 }
1254 fn clear(&mut self) {
1255 self.zipped_asset_id = 0u32;
1256 self.unified_asset_id = 0u32;
1257 self.__buffa_unknown_fields.clear();
1258 }
1259}
1260impl ::buffa::ExtensionSet for AssetIds {
1261 const PROTO_FQN: &'static str = "chain.lifecycle.v1.AssetIds";
1262 fn unknown_fields(&self) -> &::buffa::UnknownFields {
1263 &self.__buffa_unknown_fields
1264 }
1265 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1266 &mut self.__buffa_unknown_fields
1267 }
1268}
1269impl ::buffa::json_helpers::ProtoElemJson for AssetIds {
1270 fn serialize_proto_json<S: ::serde::Serializer>(
1271 v: &Self,
1272 s: S,
1273 ) -> ::core::result::Result<S::Ok, S::Error> {
1274 ::serde::Serialize::serialize(v, s)
1275 }
1276 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1277 d: D,
1278 ) -> ::core::result::Result<Self, D::Error> {
1279 <Self as ::serde::Deserialize>::deserialize(d)
1280 }
1281}
1282#[doc(hidden)]
1283pub const __ASSET_IDS_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
1284 type_url: "type.googleapis.com/chain.lifecycle.v1.AssetIds",
1285 to_json: ::buffa::type_registry::any_to_json::<AssetIds>,
1286 from_json: ::buffa::type_registry::any_from_json::<AssetIds>,
1287 is_wkt: false,
1288};
1289#[derive(Clone, PartialEq, Default)]
1293#[derive(::serde::Serialize, ::serde::Deserialize)]
1294#[serde(default)]
1295pub struct RequestFee {
1296 #[serde(
1300 rename = "assetIds",
1301 alias = "asset_ids",
1302 skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
1303 )]
1304 pub asset_ids: ::buffa::MessageField<AssetIds>,
1305 #[serde(
1310 rename = "amountE18",
1311 alias = "amount_e18",
1312 skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
1313 )]
1314 pub amount_e18: ::buffa::MessageField<
1315 super::super::super::polyester::r#type::v1::U128,
1316 >,
1317 #[serde(
1321 rename = "recipientAddress",
1322 alias = "recipient_address",
1323 with = "::buffa::json_helpers::proto_string",
1324 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1325 )]
1326 pub recipient_address: ::buffa::alloc::string::String,
1327 #[serde(
1331 rename = "status",
1332 with = "::buffa::json_helpers::proto_enum",
1333 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
1334 )]
1335 pub status: ::buffa::EnumValue<RequestFeeStatus>,
1336 #[serde(skip)]
1337 #[doc(hidden)]
1338 pub __buffa_unknown_fields: ::buffa::UnknownFields,
1339}
1340impl ::core::fmt::Debug for RequestFee {
1341 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1342 f.debug_struct("RequestFee")
1343 .field("asset_ids", &self.asset_ids)
1344 .field("amount_e18", &self.amount_e18)
1345 .field("recipient_address", &self.recipient_address)
1346 .field("status", &self.status)
1347 .finish()
1348 }
1349}
1350impl RequestFee {
1351 pub const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.RequestFee";
1356}
1357::buffa::impl_default_instance!(RequestFee);
1358impl ::buffa::MessageName for RequestFee {
1359 const PACKAGE: &'static str = "chain.lifecycle.v1";
1360 const NAME: &'static str = "RequestFee";
1361 const FULL_NAME: &'static str = "chain.lifecycle.v1.RequestFee";
1362 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.RequestFee";
1363}
1364impl ::buffa::Message for RequestFee {
1365 #[allow(clippy::let_and_return)]
1371 fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
1372 #[allow(unused_imports)]
1373 use ::buffa::Enumeration as _;
1374 let mut size = 0u32;
1375 if self.asset_ids.is_set() {
1376 let __slot = __cache.reserve();
1377 let inner_size = self.asset_ids.compute_size(__cache);
1378 __cache.set(__slot, inner_size);
1379 size
1380 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
1381 + inner_size;
1382 }
1383 if self.amount_e18.is_set() {
1384 let __slot = __cache.reserve();
1385 let inner_size = self.amount_e18.compute_size(__cache);
1386 __cache.set(__slot, inner_size);
1387 size
1388 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
1389 + inner_size;
1390 }
1391 if !self.recipient_address.is_empty() {
1392 size
1393 += 1u32
1394 + ::buffa::types::string_encoded_len(&self.recipient_address) as u32;
1395 }
1396 {
1397 let val = self.status.to_i32();
1398 if val != 0 {
1399 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
1400 }
1401 }
1402 size += self.__buffa_unknown_fields.encoded_len() as u32;
1403 size
1404 }
1405 fn write_to(
1406 &self,
1407 __cache: &mut ::buffa::SizeCache,
1408 buf: &mut impl ::buffa::bytes::BufMut,
1409 ) {
1410 #[allow(unused_imports)]
1411 use ::buffa::Enumeration as _;
1412 if self.asset_ids.is_set() {
1413 ::buffa::types::put_len_delimited_header(1u32, __cache.consume_next(), buf);
1414 self.asset_ids.write_to(__cache, buf);
1415 }
1416 if self.amount_e18.is_set() {
1417 ::buffa::types::put_len_delimited_header(2u32, __cache.consume_next(), buf);
1418 self.amount_e18.write_to(__cache, buf);
1419 }
1420 if !self.recipient_address.is_empty() {
1421 ::buffa::types::put_string_field(3u32, &self.recipient_address, buf);
1422 }
1423 {
1424 let val = self.status.to_i32();
1425 if val != 0 {
1426 ::buffa::types::put_int32_field(4u32, val, buf);
1427 }
1428 }
1429 self.__buffa_unknown_fields.write_to(buf);
1430 }
1431 fn merge_field(
1432 &mut self,
1433 tag: ::buffa::encoding::Tag,
1434 buf: &mut impl ::buffa::bytes::Buf,
1435 ctx: ::buffa::DecodeContext<'_>,
1436 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1437 #[allow(unused_imports)]
1438 use ::buffa::bytes::Buf as _;
1439 #[allow(unused_imports)]
1440 use ::buffa::Enumeration as _;
1441 match tag.field_number() {
1442 1u32 => {
1443 ::buffa::encoding::check_wire_type(
1444 tag,
1445 ::buffa::encoding::WireType::LengthDelimited,
1446 )?;
1447 ::buffa::Message::merge_length_delimited(
1448 self.asset_ids.get_or_insert_default(),
1449 buf,
1450 ctx,
1451 )?;
1452 }
1453 2u32 => {
1454 ::buffa::encoding::check_wire_type(
1455 tag,
1456 ::buffa::encoding::WireType::LengthDelimited,
1457 )?;
1458 ::buffa::Message::merge_length_delimited(
1459 self.amount_e18.get_or_insert_default(),
1460 buf,
1461 ctx,
1462 )?;
1463 }
1464 3u32 => {
1465 ::buffa::encoding::check_wire_type(
1466 tag,
1467 ::buffa::encoding::WireType::LengthDelimited,
1468 )?;
1469 ::buffa::types::merge_string(&mut self.recipient_address, buf)?;
1470 }
1471 4u32 => {
1472 ::buffa::encoding::check_wire_type(
1473 tag,
1474 ::buffa::encoding::WireType::Varint,
1475 )?;
1476 self.status = ::buffa::EnumValue::from(
1477 ::buffa::types::decode_int32(buf)?,
1478 );
1479 }
1480 _ => {
1481 self.__buffa_unknown_fields
1482 .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
1483 }
1484 }
1485 ::core::result::Result::Ok(())
1486 }
1487 fn clear(&mut self) {
1488 self.asset_ids = ::buffa::MessageField::none();
1489 self.amount_e18 = ::buffa::MessageField::none();
1490 self.recipient_address.clear();
1491 self.status = ::buffa::EnumValue::from(0);
1492 self.__buffa_unknown_fields.clear();
1493 }
1494}
1495impl ::buffa::ExtensionSet for RequestFee {
1496 const PROTO_FQN: &'static str = "chain.lifecycle.v1.RequestFee";
1497 fn unknown_fields(&self) -> &::buffa::UnknownFields {
1498 &self.__buffa_unknown_fields
1499 }
1500 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1501 &mut self.__buffa_unknown_fields
1502 }
1503}
1504impl ::buffa::json_helpers::ProtoElemJson for RequestFee {
1505 fn serialize_proto_json<S: ::serde::Serializer>(
1506 v: &Self,
1507 s: S,
1508 ) -> ::core::result::Result<S::Ok, S::Error> {
1509 ::serde::Serialize::serialize(v, s)
1510 }
1511 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1512 d: D,
1513 ) -> ::core::result::Result<Self, D::Error> {
1514 <Self as ::serde::Deserialize>::deserialize(d)
1515 }
1516}
1517#[doc(hidden)]
1518pub const __REQUEST_FEE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
1519 type_url: "type.googleapis.com/chain.lifecycle.v1.RequestFee",
1520 to_json: ::buffa::type_registry::any_to_json::<RequestFee>,
1521 from_json: ::buffa::type_registry::any_from_json::<RequestFee>,
1522 is_wkt: false,
1523};
1524#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
1526#[repr(i32)]
1527pub enum TxLookupKind {
1528 TX_UNSPECIFIED = 0i32,
1530 TX_SOURCE = 1i32,
1532 TX_ANY = 2i32,
1535}
1536impl TxLookupKind {
1537 #[allow(non_upper_case_globals)]
1539 pub const TxUnspecified: Self = Self::TX_UNSPECIFIED;
1540 #[allow(non_upper_case_globals)]
1542 pub const TxSource: Self = Self::TX_SOURCE;
1543 #[allow(non_upper_case_globals)]
1545 pub const TxAny: Self = Self::TX_ANY;
1546}
1547impl ::core::default::Default for TxLookupKind {
1548 fn default() -> Self {
1549 Self::TX_UNSPECIFIED
1550 }
1551}
1552impl ::serde::Serialize for TxLookupKind {
1553 fn serialize<S: ::serde::Serializer>(
1554 &self,
1555 s: S,
1556 ) -> ::core::result::Result<S::Ok, S::Error> {
1557 s.serialize_str(::buffa::Enumeration::proto_name(self))
1558 }
1559}
1560impl<'de> ::serde::Deserialize<'de> for TxLookupKind {
1561 fn deserialize<D: ::serde::Deserializer<'de>>(
1562 d: D,
1563 ) -> ::core::result::Result<Self, D::Error> {
1564 struct _V;
1565 impl ::serde::de::Visitor<'_> for _V {
1566 type Value = TxLookupKind;
1567 fn expecting(
1568 &self,
1569 f: &mut ::core::fmt::Formatter<'_>,
1570 ) -> ::core::fmt::Result {
1571 f.write_str(
1572 concat!("a string, integer, or null for ", stringify!(TxLookupKind)),
1573 )
1574 }
1575 fn visit_str<E: ::serde::de::Error>(
1576 self,
1577 v: &str,
1578 ) -> ::core::result::Result<TxLookupKind, E> {
1579 <TxLookupKind as ::buffa::Enumeration>::from_proto_name(v)
1580 .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
1581 }
1582 fn visit_i64<E: ::serde::de::Error>(
1583 self,
1584 v: i64,
1585 ) -> ::core::result::Result<TxLookupKind, E> {
1586 let v32 = i32::try_from(v)
1587 .map_err(|_| {
1588 ::serde::de::Error::custom(
1589 ::buffa::alloc::format!("enum value {v} out of i32 range"),
1590 )
1591 })?;
1592 <TxLookupKind as ::buffa::Enumeration>::from_i32(v32)
1593 .ok_or_else(|| {
1594 ::serde::de::Error::custom(
1595 ::buffa::alloc::format!("unknown enum value {v32}"),
1596 )
1597 })
1598 }
1599 fn visit_u64<E: ::serde::de::Error>(
1600 self,
1601 v: u64,
1602 ) -> ::core::result::Result<TxLookupKind, E> {
1603 let v32 = i32::try_from(v)
1604 .map_err(|_| {
1605 ::serde::de::Error::custom(
1606 ::buffa::alloc::format!("enum value {v} out of i32 range"),
1607 )
1608 })?;
1609 <TxLookupKind as ::buffa::Enumeration>::from_i32(v32)
1610 .ok_or_else(|| {
1611 ::serde::de::Error::custom(
1612 ::buffa::alloc::format!("unknown enum value {v32}"),
1613 )
1614 })
1615 }
1616 fn visit_unit<E: ::serde::de::Error>(
1617 self,
1618 ) -> ::core::result::Result<TxLookupKind, E> {
1619 ::core::result::Result::Ok(::core::default::Default::default())
1620 }
1621 }
1622 d.deserialize_any(_V)
1623 }
1624}
1625impl ::buffa::json_helpers::ProtoElemJson for TxLookupKind {
1626 fn serialize_proto_json<S: ::serde::Serializer>(
1627 v: &Self,
1628 s: S,
1629 ) -> ::core::result::Result<S::Ok, S::Error> {
1630 ::serde::Serialize::serialize(v, s)
1631 }
1632 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1633 d: D,
1634 ) -> ::core::result::Result<Self, D::Error> {
1635 <Self as ::serde::Deserialize>::deserialize(d)
1636 }
1637}
1638impl ::buffa::Enumeration for TxLookupKind {
1639 fn from_i32(value: i32) -> ::core::option::Option<Self> {
1640 match value {
1641 0i32 => ::core::option::Option::Some(Self::TX_UNSPECIFIED),
1642 1i32 => ::core::option::Option::Some(Self::TX_SOURCE),
1643 2i32 => ::core::option::Option::Some(Self::TX_ANY),
1644 _ => ::core::option::Option::None,
1645 }
1646 }
1647 fn to_i32(&self) -> i32 {
1648 *self as i32
1649 }
1650 fn proto_name(&self) -> &'static str {
1651 match self {
1652 Self::TX_UNSPECIFIED => "TX_UNSPECIFIED",
1653 Self::TX_SOURCE => "TX_SOURCE",
1654 Self::TX_ANY => "TX_ANY",
1655 }
1656 }
1657 fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
1658 match name {
1659 "TX_UNSPECIFIED" => ::core::option::Option::Some(Self::TX_UNSPECIFIED),
1660 "TX_SOURCE" => ::core::option::Option::Some(Self::TX_SOURCE),
1661 "TX_ANY" => ::core::option::Option::Some(Self::TX_ANY),
1662 _ => ::core::option::Option::None,
1663 }
1664 }
1665 fn values() -> &'static [Self] {
1666 &[Self::TX_UNSPECIFIED, Self::TX_SOURCE, Self::TX_ANY]
1667 }
1668}
1669#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
1671#[repr(i32)]
1672pub enum ListScope {
1673 LIST_UNSPECIFIED = 0i32,
1675 LIST_ALL = 1i32,
1677 LIST_OPEN_ONLY = 2i32,
1679 LIST_TERMINAL_ONLY = 3i32,
1681}
1682impl ListScope {
1683 #[allow(non_upper_case_globals)]
1685 pub const ListUnspecified: Self = Self::LIST_UNSPECIFIED;
1686 #[allow(non_upper_case_globals)]
1688 pub const ListAll: Self = Self::LIST_ALL;
1689 #[allow(non_upper_case_globals)]
1691 pub const ListOpenOnly: Self = Self::LIST_OPEN_ONLY;
1692 #[allow(non_upper_case_globals)]
1694 pub const ListTerminalOnly: Self = Self::LIST_TERMINAL_ONLY;
1695}
1696impl ::core::default::Default for ListScope {
1697 fn default() -> Self {
1698 Self::LIST_UNSPECIFIED
1699 }
1700}
1701impl ::serde::Serialize for ListScope {
1702 fn serialize<S: ::serde::Serializer>(
1703 &self,
1704 s: S,
1705 ) -> ::core::result::Result<S::Ok, S::Error> {
1706 s.serialize_str(::buffa::Enumeration::proto_name(self))
1707 }
1708}
1709impl<'de> ::serde::Deserialize<'de> for ListScope {
1710 fn deserialize<D: ::serde::Deserializer<'de>>(
1711 d: D,
1712 ) -> ::core::result::Result<Self, D::Error> {
1713 struct _V;
1714 impl ::serde::de::Visitor<'_> for _V {
1715 type Value = ListScope;
1716 fn expecting(
1717 &self,
1718 f: &mut ::core::fmt::Formatter<'_>,
1719 ) -> ::core::fmt::Result {
1720 f.write_str(
1721 concat!("a string, integer, or null for ", stringify!(ListScope)),
1722 )
1723 }
1724 fn visit_str<E: ::serde::de::Error>(
1725 self,
1726 v: &str,
1727 ) -> ::core::result::Result<ListScope, E> {
1728 <ListScope as ::buffa::Enumeration>::from_proto_name(v)
1729 .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
1730 }
1731 fn visit_i64<E: ::serde::de::Error>(
1732 self,
1733 v: i64,
1734 ) -> ::core::result::Result<ListScope, E> {
1735 let v32 = i32::try_from(v)
1736 .map_err(|_| {
1737 ::serde::de::Error::custom(
1738 ::buffa::alloc::format!("enum value {v} out of i32 range"),
1739 )
1740 })?;
1741 <ListScope as ::buffa::Enumeration>::from_i32(v32)
1742 .ok_or_else(|| {
1743 ::serde::de::Error::custom(
1744 ::buffa::alloc::format!("unknown enum value {v32}"),
1745 )
1746 })
1747 }
1748 fn visit_u64<E: ::serde::de::Error>(
1749 self,
1750 v: u64,
1751 ) -> ::core::result::Result<ListScope, E> {
1752 let v32 = i32::try_from(v)
1753 .map_err(|_| {
1754 ::serde::de::Error::custom(
1755 ::buffa::alloc::format!("enum value {v} out of i32 range"),
1756 )
1757 })?;
1758 <ListScope as ::buffa::Enumeration>::from_i32(v32)
1759 .ok_or_else(|| {
1760 ::serde::de::Error::custom(
1761 ::buffa::alloc::format!("unknown enum value {v32}"),
1762 )
1763 })
1764 }
1765 fn visit_unit<E: ::serde::de::Error>(
1766 self,
1767 ) -> ::core::result::Result<ListScope, E> {
1768 ::core::result::Result::Ok(::core::default::Default::default())
1769 }
1770 }
1771 d.deserialize_any(_V)
1772 }
1773}
1774impl ::buffa::json_helpers::ProtoElemJson for ListScope {
1775 fn serialize_proto_json<S: ::serde::Serializer>(
1776 v: &Self,
1777 s: S,
1778 ) -> ::core::result::Result<S::Ok, S::Error> {
1779 ::serde::Serialize::serialize(v, s)
1780 }
1781 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1782 d: D,
1783 ) -> ::core::result::Result<Self, D::Error> {
1784 <Self as ::serde::Deserialize>::deserialize(d)
1785 }
1786}
1787impl ::buffa::Enumeration for ListScope {
1788 fn from_i32(value: i32) -> ::core::option::Option<Self> {
1789 match value {
1790 0i32 => ::core::option::Option::Some(Self::LIST_UNSPECIFIED),
1791 1i32 => ::core::option::Option::Some(Self::LIST_ALL),
1792 2i32 => ::core::option::Option::Some(Self::LIST_OPEN_ONLY),
1793 3i32 => ::core::option::Option::Some(Self::LIST_TERMINAL_ONLY),
1794 _ => ::core::option::Option::None,
1795 }
1796 }
1797 fn to_i32(&self) -> i32 {
1798 *self as i32
1799 }
1800 fn proto_name(&self) -> &'static str {
1801 match self {
1802 Self::LIST_UNSPECIFIED => "LIST_UNSPECIFIED",
1803 Self::LIST_ALL => "LIST_ALL",
1804 Self::LIST_OPEN_ONLY => "LIST_OPEN_ONLY",
1805 Self::LIST_TERMINAL_ONLY => "LIST_TERMINAL_ONLY",
1806 }
1807 }
1808 fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
1809 match name {
1810 "LIST_UNSPECIFIED" => ::core::option::Option::Some(Self::LIST_UNSPECIFIED),
1811 "LIST_ALL" => ::core::option::Option::Some(Self::LIST_ALL),
1812 "LIST_OPEN_ONLY" => ::core::option::Option::Some(Self::LIST_OPEN_ONLY),
1813 "LIST_TERMINAL_ONLY" => {
1814 ::core::option::Option::Some(Self::LIST_TERMINAL_ONLY)
1815 }
1816 _ => ::core::option::Option::None,
1817 }
1818 }
1819 fn values() -> &'static [Self] {
1820 &[
1821 Self::LIST_UNSPECIFIED,
1822 Self::LIST_ALL,
1823 Self::LIST_OPEN_ONLY,
1824 Self::LIST_TERMINAL_ONLY,
1825 ]
1826 }
1827}
1828#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
1830#[repr(i32)]
1831pub enum Sort {
1832 SORT_UNSPECIFIED = 0i32,
1834 SORT_NEWEST = 1i32,
1836 SORT_OLDEST = 2i32,
1838}
1839impl Sort {
1840 #[allow(non_upper_case_globals)]
1842 pub const Unspecified: Self = Self::SORT_UNSPECIFIED;
1843 #[allow(non_upper_case_globals)]
1845 pub const Newest: Self = Self::SORT_NEWEST;
1846 #[allow(non_upper_case_globals)]
1848 pub const Oldest: Self = Self::SORT_OLDEST;
1849}
1850impl ::core::default::Default for Sort {
1851 fn default() -> Self {
1852 Self::SORT_UNSPECIFIED
1853 }
1854}
1855impl ::serde::Serialize for Sort {
1856 fn serialize<S: ::serde::Serializer>(
1857 &self,
1858 s: S,
1859 ) -> ::core::result::Result<S::Ok, S::Error> {
1860 s.serialize_str(::buffa::Enumeration::proto_name(self))
1861 }
1862}
1863impl<'de> ::serde::Deserialize<'de> for Sort {
1864 fn deserialize<D: ::serde::Deserializer<'de>>(
1865 d: D,
1866 ) -> ::core::result::Result<Self, D::Error> {
1867 struct _V;
1868 impl ::serde::de::Visitor<'_> for _V {
1869 type Value = Sort;
1870 fn expecting(
1871 &self,
1872 f: &mut ::core::fmt::Formatter<'_>,
1873 ) -> ::core::fmt::Result {
1874 f.write_str(concat!("a string, integer, or null for ", stringify!(Sort)))
1875 }
1876 fn visit_str<E: ::serde::de::Error>(
1877 self,
1878 v: &str,
1879 ) -> ::core::result::Result<Sort, E> {
1880 <Sort as ::buffa::Enumeration>::from_proto_name(v)
1881 .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
1882 }
1883 fn visit_i64<E: ::serde::de::Error>(
1884 self,
1885 v: i64,
1886 ) -> ::core::result::Result<Sort, E> {
1887 let v32 = i32::try_from(v)
1888 .map_err(|_| {
1889 ::serde::de::Error::custom(
1890 ::buffa::alloc::format!("enum value {v} out of i32 range"),
1891 )
1892 })?;
1893 <Sort as ::buffa::Enumeration>::from_i32(v32)
1894 .ok_or_else(|| {
1895 ::serde::de::Error::custom(
1896 ::buffa::alloc::format!("unknown enum value {v32}"),
1897 )
1898 })
1899 }
1900 fn visit_u64<E: ::serde::de::Error>(
1901 self,
1902 v: u64,
1903 ) -> ::core::result::Result<Sort, E> {
1904 let v32 = i32::try_from(v)
1905 .map_err(|_| {
1906 ::serde::de::Error::custom(
1907 ::buffa::alloc::format!("enum value {v} out of i32 range"),
1908 )
1909 })?;
1910 <Sort as ::buffa::Enumeration>::from_i32(v32)
1911 .ok_or_else(|| {
1912 ::serde::de::Error::custom(
1913 ::buffa::alloc::format!("unknown enum value {v32}"),
1914 )
1915 })
1916 }
1917 fn visit_unit<E: ::serde::de::Error>(
1918 self,
1919 ) -> ::core::result::Result<Sort, E> {
1920 ::core::result::Result::Ok(::core::default::Default::default())
1921 }
1922 }
1923 d.deserialize_any(_V)
1924 }
1925}
1926impl ::buffa::json_helpers::ProtoElemJson for Sort {
1927 fn serialize_proto_json<S: ::serde::Serializer>(
1928 v: &Self,
1929 s: S,
1930 ) -> ::core::result::Result<S::Ok, S::Error> {
1931 ::serde::Serialize::serialize(v, s)
1932 }
1933 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1934 d: D,
1935 ) -> ::core::result::Result<Self, D::Error> {
1936 <Self as ::serde::Deserialize>::deserialize(d)
1937 }
1938}
1939impl ::buffa::Enumeration for Sort {
1940 fn from_i32(value: i32) -> ::core::option::Option<Self> {
1941 match value {
1942 0i32 => ::core::option::Option::Some(Self::SORT_UNSPECIFIED),
1943 1i32 => ::core::option::Option::Some(Self::SORT_NEWEST),
1944 2i32 => ::core::option::Option::Some(Self::SORT_OLDEST),
1945 _ => ::core::option::Option::None,
1946 }
1947 }
1948 fn to_i32(&self) -> i32 {
1949 *self as i32
1950 }
1951 fn proto_name(&self) -> &'static str {
1952 match self {
1953 Self::SORT_UNSPECIFIED => "SORT_UNSPECIFIED",
1954 Self::SORT_NEWEST => "SORT_NEWEST",
1955 Self::SORT_OLDEST => "SORT_OLDEST",
1956 }
1957 }
1958 fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
1959 match name {
1960 "SORT_UNSPECIFIED" => ::core::option::Option::Some(Self::SORT_UNSPECIFIED),
1961 "SORT_NEWEST" => ::core::option::Option::Some(Self::SORT_NEWEST),
1962 "SORT_OLDEST" => ::core::option::Option::Some(Self::SORT_OLDEST),
1963 _ => ::core::option::Option::None,
1964 }
1965 }
1966 fn values() -> &'static [Self] {
1967 &[Self::SORT_UNSPECIFIED, Self::SORT_NEWEST, Self::SORT_OLDEST]
1968 }
1969}
1970#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
1972#[repr(i32)]
1973pub enum ListOrderBy {
1974 ORDER_BY_UNSPECIFIED = 0i32,
1976 ORDER_BY_LAST_ACTIVITY = 1i32,
1978 ORDER_BY_STARTED_AT = 2i32,
1981}
1982impl ListOrderBy {
1983 #[allow(non_upper_case_globals)]
1985 pub const OrderByUnspecified: Self = Self::ORDER_BY_UNSPECIFIED;
1986 #[allow(non_upper_case_globals)]
1988 pub const OrderByLastActivity: Self = Self::ORDER_BY_LAST_ACTIVITY;
1989 #[allow(non_upper_case_globals)]
1991 pub const OrderByStartedAt: Self = Self::ORDER_BY_STARTED_AT;
1992}
1993impl ::core::default::Default for ListOrderBy {
1994 fn default() -> Self {
1995 Self::ORDER_BY_UNSPECIFIED
1996 }
1997}
1998impl ::serde::Serialize for ListOrderBy {
1999 fn serialize<S: ::serde::Serializer>(
2000 &self,
2001 s: S,
2002 ) -> ::core::result::Result<S::Ok, S::Error> {
2003 s.serialize_str(::buffa::Enumeration::proto_name(self))
2004 }
2005}
2006impl<'de> ::serde::Deserialize<'de> for ListOrderBy {
2007 fn deserialize<D: ::serde::Deserializer<'de>>(
2008 d: D,
2009 ) -> ::core::result::Result<Self, D::Error> {
2010 struct _V;
2011 impl ::serde::de::Visitor<'_> for _V {
2012 type Value = ListOrderBy;
2013 fn expecting(
2014 &self,
2015 f: &mut ::core::fmt::Formatter<'_>,
2016 ) -> ::core::fmt::Result {
2017 f.write_str(
2018 concat!("a string, integer, or null for ", stringify!(ListOrderBy)),
2019 )
2020 }
2021 fn visit_str<E: ::serde::de::Error>(
2022 self,
2023 v: &str,
2024 ) -> ::core::result::Result<ListOrderBy, E> {
2025 <ListOrderBy as ::buffa::Enumeration>::from_proto_name(v)
2026 .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
2027 }
2028 fn visit_i64<E: ::serde::de::Error>(
2029 self,
2030 v: i64,
2031 ) -> ::core::result::Result<ListOrderBy, E> {
2032 let v32 = i32::try_from(v)
2033 .map_err(|_| {
2034 ::serde::de::Error::custom(
2035 ::buffa::alloc::format!("enum value {v} out of i32 range"),
2036 )
2037 })?;
2038 <ListOrderBy as ::buffa::Enumeration>::from_i32(v32)
2039 .ok_or_else(|| {
2040 ::serde::de::Error::custom(
2041 ::buffa::alloc::format!("unknown enum value {v32}"),
2042 )
2043 })
2044 }
2045 fn visit_u64<E: ::serde::de::Error>(
2046 self,
2047 v: u64,
2048 ) -> ::core::result::Result<ListOrderBy, E> {
2049 let v32 = i32::try_from(v)
2050 .map_err(|_| {
2051 ::serde::de::Error::custom(
2052 ::buffa::alloc::format!("enum value {v} out of i32 range"),
2053 )
2054 })?;
2055 <ListOrderBy as ::buffa::Enumeration>::from_i32(v32)
2056 .ok_or_else(|| {
2057 ::serde::de::Error::custom(
2058 ::buffa::alloc::format!("unknown enum value {v32}"),
2059 )
2060 })
2061 }
2062 fn visit_unit<E: ::serde::de::Error>(
2063 self,
2064 ) -> ::core::result::Result<ListOrderBy, E> {
2065 ::core::result::Result::Ok(::core::default::Default::default())
2066 }
2067 }
2068 d.deserialize_any(_V)
2069 }
2070}
2071impl ::buffa::json_helpers::ProtoElemJson for ListOrderBy {
2072 fn serialize_proto_json<S: ::serde::Serializer>(
2073 v: &Self,
2074 s: S,
2075 ) -> ::core::result::Result<S::Ok, S::Error> {
2076 ::serde::Serialize::serialize(v, s)
2077 }
2078 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2079 d: D,
2080 ) -> ::core::result::Result<Self, D::Error> {
2081 <Self as ::serde::Deserialize>::deserialize(d)
2082 }
2083}
2084impl ::buffa::Enumeration for ListOrderBy {
2085 fn from_i32(value: i32) -> ::core::option::Option<Self> {
2086 match value {
2087 0i32 => ::core::option::Option::Some(Self::ORDER_BY_UNSPECIFIED),
2088 1i32 => ::core::option::Option::Some(Self::ORDER_BY_LAST_ACTIVITY),
2089 2i32 => ::core::option::Option::Some(Self::ORDER_BY_STARTED_AT),
2090 _ => ::core::option::Option::None,
2091 }
2092 }
2093 fn to_i32(&self) -> i32 {
2094 *self as i32
2095 }
2096 fn proto_name(&self) -> &'static str {
2097 match self {
2098 Self::ORDER_BY_UNSPECIFIED => "ORDER_BY_UNSPECIFIED",
2099 Self::ORDER_BY_LAST_ACTIVITY => "ORDER_BY_LAST_ACTIVITY",
2100 Self::ORDER_BY_STARTED_AT => "ORDER_BY_STARTED_AT",
2101 }
2102 }
2103 fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
2104 match name {
2105 "ORDER_BY_UNSPECIFIED" => {
2106 ::core::option::Option::Some(Self::ORDER_BY_UNSPECIFIED)
2107 }
2108 "ORDER_BY_LAST_ACTIVITY" => {
2109 ::core::option::Option::Some(Self::ORDER_BY_LAST_ACTIVITY)
2110 }
2111 "ORDER_BY_STARTED_AT" => {
2112 ::core::option::Option::Some(Self::ORDER_BY_STARTED_AT)
2113 }
2114 _ => ::core::option::Option::None,
2115 }
2116 }
2117 fn values() -> &'static [Self] {
2118 &[
2119 Self::ORDER_BY_UNSPECIFIED,
2120 Self::ORDER_BY_LAST_ACTIVITY,
2121 Self::ORDER_BY_STARTED_AT,
2122 ]
2123 }
2124}
2125#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
2129#[repr(i32)]
2130pub enum FlowStep {
2131 FLOW_STEP_UNSPECIFIED = 0i32,
2133 FLOW_STEP_SOURCE = 1i32,
2135 FLOW_STEP_TRANSFER = 2i32,
2137 FLOW_STEP_REQUEST = 3i32,
2139 FLOW_STEP_VALIDATION = 4i32,
2141 FLOW_STEP_EXECUTION = 5i32,
2143 FLOW_STEP_BRIDGE_FULFILLMENT = 6i32,
2145 FLOW_STEP_DROPPED = 7i32,
2147 FLOW_STEP_FAILED = 8i32,
2149 FLOW_STEP_REFUNDED = 9i32,
2151 FLOW_STEP_FULFILLING = 10i32,
2154 FLOW_STEP_SETTLEMENT = 11i32,
2156}
2157impl FlowStep {
2158 #[allow(non_upper_case_globals)]
2160 pub const Unspecified: Self = Self::FLOW_STEP_UNSPECIFIED;
2161 #[allow(non_upper_case_globals)]
2163 pub const Source: Self = Self::FLOW_STEP_SOURCE;
2164 #[allow(non_upper_case_globals)]
2166 pub const Transfer: Self = Self::FLOW_STEP_TRANSFER;
2167 #[allow(non_upper_case_globals)]
2169 pub const Request: Self = Self::FLOW_STEP_REQUEST;
2170 #[allow(non_upper_case_globals)]
2172 pub const Validation: Self = Self::FLOW_STEP_VALIDATION;
2173 #[allow(non_upper_case_globals)]
2175 pub const Execution: Self = Self::FLOW_STEP_EXECUTION;
2176 #[allow(non_upper_case_globals)]
2178 pub const BridgeFulfillment: Self = Self::FLOW_STEP_BRIDGE_FULFILLMENT;
2179 #[allow(non_upper_case_globals)]
2181 pub const Dropped: Self = Self::FLOW_STEP_DROPPED;
2182 #[allow(non_upper_case_globals)]
2184 pub const Failed: Self = Self::FLOW_STEP_FAILED;
2185 #[allow(non_upper_case_globals)]
2187 pub const Refunded: Self = Self::FLOW_STEP_REFUNDED;
2188 #[allow(non_upper_case_globals)]
2190 pub const Fulfilling: Self = Self::FLOW_STEP_FULFILLING;
2191 #[allow(non_upper_case_globals)]
2193 pub const Settlement: Self = Self::FLOW_STEP_SETTLEMENT;
2194}
2195impl ::core::default::Default for FlowStep {
2196 fn default() -> Self {
2197 Self::FLOW_STEP_UNSPECIFIED
2198 }
2199}
2200impl ::serde::Serialize for FlowStep {
2201 fn serialize<S: ::serde::Serializer>(
2202 &self,
2203 s: S,
2204 ) -> ::core::result::Result<S::Ok, S::Error> {
2205 s.serialize_str(::buffa::Enumeration::proto_name(self))
2206 }
2207}
2208impl<'de> ::serde::Deserialize<'de> for FlowStep {
2209 fn deserialize<D: ::serde::Deserializer<'de>>(
2210 d: D,
2211 ) -> ::core::result::Result<Self, D::Error> {
2212 struct _V;
2213 impl ::serde::de::Visitor<'_> for _V {
2214 type Value = FlowStep;
2215 fn expecting(
2216 &self,
2217 f: &mut ::core::fmt::Formatter<'_>,
2218 ) -> ::core::fmt::Result {
2219 f.write_str(
2220 concat!("a string, integer, or null for ", stringify!(FlowStep)),
2221 )
2222 }
2223 fn visit_str<E: ::serde::de::Error>(
2224 self,
2225 v: &str,
2226 ) -> ::core::result::Result<FlowStep, E> {
2227 <FlowStep as ::buffa::Enumeration>::from_proto_name(v)
2228 .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
2229 }
2230 fn visit_i64<E: ::serde::de::Error>(
2231 self,
2232 v: i64,
2233 ) -> ::core::result::Result<FlowStep, E> {
2234 let v32 = i32::try_from(v)
2235 .map_err(|_| {
2236 ::serde::de::Error::custom(
2237 ::buffa::alloc::format!("enum value {v} out of i32 range"),
2238 )
2239 })?;
2240 <FlowStep as ::buffa::Enumeration>::from_i32(v32)
2241 .ok_or_else(|| {
2242 ::serde::de::Error::custom(
2243 ::buffa::alloc::format!("unknown enum value {v32}"),
2244 )
2245 })
2246 }
2247 fn visit_u64<E: ::serde::de::Error>(
2248 self,
2249 v: u64,
2250 ) -> ::core::result::Result<FlowStep, E> {
2251 let v32 = i32::try_from(v)
2252 .map_err(|_| {
2253 ::serde::de::Error::custom(
2254 ::buffa::alloc::format!("enum value {v} out of i32 range"),
2255 )
2256 })?;
2257 <FlowStep as ::buffa::Enumeration>::from_i32(v32)
2258 .ok_or_else(|| {
2259 ::serde::de::Error::custom(
2260 ::buffa::alloc::format!("unknown enum value {v32}"),
2261 )
2262 })
2263 }
2264 fn visit_unit<E: ::serde::de::Error>(
2265 self,
2266 ) -> ::core::result::Result<FlowStep, E> {
2267 ::core::result::Result::Ok(::core::default::Default::default())
2268 }
2269 }
2270 d.deserialize_any(_V)
2271 }
2272}
2273impl ::buffa::json_helpers::ProtoElemJson for FlowStep {
2274 fn serialize_proto_json<S: ::serde::Serializer>(
2275 v: &Self,
2276 s: S,
2277 ) -> ::core::result::Result<S::Ok, S::Error> {
2278 ::serde::Serialize::serialize(v, s)
2279 }
2280 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2281 d: D,
2282 ) -> ::core::result::Result<Self, D::Error> {
2283 <Self as ::serde::Deserialize>::deserialize(d)
2284 }
2285}
2286impl ::buffa::Enumeration for FlowStep {
2287 fn from_i32(value: i32) -> ::core::option::Option<Self> {
2288 match value {
2289 0i32 => ::core::option::Option::Some(Self::FLOW_STEP_UNSPECIFIED),
2290 1i32 => ::core::option::Option::Some(Self::FLOW_STEP_SOURCE),
2291 2i32 => ::core::option::Option::Some(Self::FLOW_STEP_TRANSFER),
2292 3i32 => ::core::option::Option::Some(Self::FLOW_STEP_REQUEST),
2293 4i32 => ::core::option::Option::Some(Self::FLOW_STEP_VALIDATION),
2294 5i32 => ::core::option::Option::Some(Self::FLOW_STEP_EXECUTION),
2295 6i32 => ::core::option::Option::Some(Self::FLOW_STEP_BRIDGE_FULFILLMENT),
2296 7i32 => ::core::option::Option::Some(Self::FLOW_STEP_DROPPED),
2297 8i32 => ::core::option::Option::Some(Self::FLOW_STEP_FAILED),
2298 9i32 => ::core::option::Option::Some(Self::FLOW_STEP_REFUNDED),
2299 10i32 => ::core::option::Option::Some(Self::FLOW_STEP_FULFILLING),
2300 11i32 => ::core::option::Option::Some(Self::FLOW_STEP_SETTLEMENT),
2301 _ => ::core::option::Option::None,
2302 }
2303 }
2304 fn to_i32(&self) -> i32 {
2305 *self as i32
2306 }
2307 fn proto_name(&self) -> &'static str {
2308 match self {
2309 Self::FLOW_STEP_UNSPECIFIED => "FLOW_STEP_UNSPECIFIED",
2310 Self::FLOW_STEP_SOURCE => "FLOW_STEP_SOURCE",
2311 Self::FLOW_STEP_TRANSFER => "FLOW_STEP_TRANSFER",
2312 Self::FLOW_STEP_REQUEST => "FLOW_STEP_REQUEST",
2313 Self::FLOW_STEP_VALIDATION => "FLOW_STEP_VALIDATION",
2314 Self::FLOW_STEP_EXECUTION => "FLOW_STEP_EXECUTION",
2315 Self::FLOW_STEP_BRIDGE_FULFILLMENT => "FLOW_STEP_BRIDGE_FULFILLMENT",
2316 Self::FLOW_STEP_DROPPED => "FLOW_STEP_DROPPED",
2317 Self::FLOW_STEP_FAILED => "FLOW_STEP_FAILED",
2318 Self::FLOW_STEP_REFUNDED => "FLOW_STEP_REFUNDED",
2319 Self::FLOW_STEP_FULFILLING => "FLOW_STEP_FULFILLING",
2320 Self::FLOW_STEP_SETTLEMENT => "FLOW_STEP_SETTLEMENT",
2321 }
2322 }
2323 fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
2324 match name {
2325 "FLOW_STEP_UNSPECIFIED" => {
2326 ::core::option::Option::Some(Self::FLOW_STEP_UNSPECIFIED)
2327 }
2328 "FLOW_STEP_SOURCE" => ::core::option::Option::Some(Self::FLOW_STEP_SOURCE),
2329 "FLOW_STEP_TRANSFER" => {
2330 ::core::option::Option::Some(Self::FLOW_STEP_TRANSFER)
2331 }
2332 "FLOW_STEP_REQUEST" => ::core::option::Option::Some(Self::FLOW_STEP_REQUEST),
2333 "FLOW_STEP_VALIDATION" => {
2334 ::core::option::Option::Some(Self::FLOW_STEP_VALIDATION)
2335 }
2336 "FLOW_STEP_EXECUTION" => {
2337 ::core::option::Option::Some(Self::FLOW_STEP_EXECUTION)
2338 }
2339 "FLOW_STEP_BRIDGE_FULFILLMENT" => {
2340 ::core::option::Option::Some(Self::FLOW_STEP_BRIDGE_FULFILLMENT)
2341 }
2342 "FLOW_STEP_DROPPED" => ::core::option::Option::Some(Self::FLOW_STEP_DROPPED),
2343 "FLOW_STEP_FAILED" => ::core::option::Option::Some(Self::FLOW_STEP_FAILED),
2344 "FLOW_STEP_REFUNDED" => {
2345 ::core::option::Option::Some(Self::FLOW_STEP_REFUNDED)
2346 }
2347 "FLOW_STEP_FULFILLING" => {
2348 ::core::option::Option::Some(Self::FLOW_STEP_FULFILLING)
2349 }
2350 "FLOW_STEP_SETTLEMENT" => {
2351 ::core::option::Option::Some(Self::FLOW_STEP_SETTLEMENT)
2352 }
2353 _ => ::core::option::Option::None,
2354 }
2355 }
2356 fn values() -> &'static [Self] {
2357 &[
2358 Self::FLOW_STEP_UNSPECIFIED,
2359 Self::FLOW_STEP_SOURCE,
2360 Self::FLOW_STEP_TRANSFER,
2361 Self::FLOW_STEP_REQUEST,
2362 Self::FLOW_STEP_VALIDATION,
2363 Self::FLOW_STEP_EXECUTION,
2364 Self::FLOW_STEP_BRIDGE_FULFILLMENT,
2365 Self::FLOW_STEP_DROPPED,
2366 Self::FLOW_STEP_FAILED,
2367 Self::FLOW_STEP_REFUNDED,
2368 Self::FLOW_STEP_FULFILLING,
2369 Self::FLOW_STEP_SETTLEMENT,
2370 ]
2371 }
2372}
2373#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
2374#[repr(i32)]
2375pub enum FlowStepActivityKind {
2376 ACTIVITY_UNSPECIFIED = 0i32,
2378 ACTIVITY_MINTED = 1i32,
2380 ACTIVITY_FUNDING = 2i32,
2382 ACTIVITY_TRADING = 3i32,
2384}
2385impl FlowStepActivityKind {
2386 #[allow(non_upper_case_globals)]
2388 pub const ActivityUnspecified: Self = Self::ACTIVITY_UNSPECIFIED;
2389 #[allow(non_upper_case_globals)]
2391 pub const ActivityMinted: Self = Self::ACTIVITY_MINTED;
2392 #[allow(non_upper_case_globals)]
2394 pub const ActivityFunding: Self = Self::ACTIVITY_FUNDING;
2395 #[allow(non_upper_case_globals)]
2397 pub const ActivityTrading: Self = Self::ACTIVITY_TRADING;
2398}
2399impl ::core::default::Default for FlowStepActivityKind {
2400 fn default() -> Self {
2401 Self::ACTIVITY_UNSPECIFIED
2402 }
2403}
2404impl ::serde::Serialize for FlowStepActivityKind {
2405 fn serialize<S: ::serde::Serializer>(
2406 &self,
2407 s: S,
2408 ) -> ::core::result::Result<S::Ok, S::Error> {
2409 s.serialize_str(::buffa::Enumeration::proto_name(self))
2410 }
2411}
2412impl<'de> ::serde::Deserialize<'de> for FlowStepActivityKind {
2413 fn deserialize<D: ::serde::Deserializer<'de>>(
2414 d: D,
2415 ) -> ::core::result::Result<Self, D::Error> {
2416 struct _V;
2417 impl ::serde::de::Visitor<'_> for _V {
2418 type Value = FlowStepActivityKind;
2419 fn expecting(
2420 &self,
2421 f: &mut ::core::fmt::Formatter<'_>,
2422 ) -> ::core::fmt::Result {
2423 f.write_str(
2424 concat!(
2425 "a string, integer, or null for ",
2426 stringify!(FlowStepActivityKind)
2427 ),
2428 )
2429 }
2430 fn visit_str<E: ::serde::de::Error>(
2431 self,
2432 v: &str,
2433 ) -> ::core::result::Result<FlowStepActivityKind, E> {
2434 <FlowStepActivityKind as ::buffa::Enumeration>::from_proto_name(v)
2435 .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
2436 }
2437 fn visit_i64<E: ::serde::de::Error>(
2438 self,
2439 v: i64,
2440 ) -> ::core::result::Result<FlowStepActivityKind, E> {
2441 let v32 = i32::try_from(v)
2442 .map_err(|_| {
2443 ::serde::de::Error::custom(
2444 ::buffa::alloc::format!("enum value {v} out of i32 range"),
2445 )
2446 })?;
2447 <FlowStepActivityKind as ::buffa::Enumeration>::from_i32(v32)
2448 .ok_or_else(|| {
2449 ::serde::de::Error::custom(
2450 ::buffa::alloc::format!("unknown enum value {v32}"),
2451 )
2452 })
2453 }
2454 fn visit_u64<E: ::serde::de::Error>(
2455 self,
2456 v: u64,
2457 ) -> ::core::result::Result<FlowStepActivityKind, E> {
2458 let v32 = i32::try_from(v)
2459 .map_err(|_| {
2460 ::serde::de::Error::custom(
2461 ::buffa::alloc::format!("enum value {v} out of i32 range"),
2462 )
2463 })?;
2464 <FlowStepActivityKind as ::buffa::Enumeration>::from_i32(v32)
2465 .ok_or_else(|| {
2466 ::serde::de::Error::custom(
2467 ::buffa::alloc::format!("unknown enum value {v32}"),
2468 )
2469 })
2470 }
2471 fn visit_unit<E: ::serde::de::Error>(
2472 self,
2473 ) -> ::core::result::Result<FlowStepActivityKind, E> {
2474 ::core::result::Result::Ok(::core::default::Default::default())
2475 }
2476 }
2477 d.deserialize_any(_V)
2478 }
2479}
2480impl ::buffa::json_helpers::ProtoElemJson for FlowStepActivityKind {
2481 fn serialize_proto_json<S: ::serde::Serializer>(
2482 v: &Self,
2483 s: S,
2484 ) -> ::core::result::Result<S::Ok, S::Error> {
2485 ::serde::Serialize::serialize(v, s)
2486 }
2487 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2488 d: D,
2489 ) -> ::core::result::Result<Self, D::Error> {
2490 <Self as ::serde::Deserialize>::deserialize(d)
2491 }
2492}
2493impl ::buffa::Enumeration for FlowStepActivityKind {
2494 fn from_i32(value: i32) -> ::core::option::Option<Self> {
2495 match value {
2496 0i32 => ::core::option::Option::Some(Self::ACTIVITY_UNSPECIFIED),
2497 1i32 => ::core::option::Option::Some(Self::ACTIVITY_MINTED),
2498 2i32 => ::core::option::Option::Some(Self::ACTIVITY_FUNDING),
2499 3i32 => ::core::option::Option::Some(Self::ACTIVITY_TRADING),
2500 _ => ::core::option::Option::None,
2501 }
2502 }
2503 fn to_i32(&self) -> i32 {
2504 *self as i32
2505 }
2506 fn proto_name(&self) -> &'static str {
2507 match self {
2508 Self::ACTIVITY_UNSPECIFIED => "ACTIVITY_UNSPECIFIED",
2509 Self::ACTIVITY_MINTED => "ACTIVITY_MINTED",
2510 Self::ACTIVITY_FUNDING => "ACTIVITY_FUNDING",
2511 Self::ACTIVITY_TRADING => "ACTIVITY_TRADING",
2512 }
2513 }
2514 fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
2515 match name {
2516 "ACTIVITY_UNSPECIFIED" => {
2517 ::core::option::Option::Some(Self::ACTIVITY_UNSPECIFIED)
2518 }
2519 "ACTIVITY_MINTED" => ::core::option::Option::Some(Self::ACTIVITY_MINTED),
2520 "ACTIVITY_FUNDING" => ::core::option::Option::Some(Self::ACTIVITY_FUNDING),
2521 "ACTIVITY_TRADING" => ::core::option::Option::Some(Self::ACTIVITY_TRADING),
2522 _ => ::core::option::Option::None,
2523 }
2524 }
2525 fn values() -> &'static [Self] {
2526 &[
2527 Self::ACTIVITY_UNSPECIFIED,
2528 Self::ACTIVITY_MINTED,
2529 Self::ACTIVITY_FUNDING,
2530 Self::ACTIVITY_TRADING,
2531 ]
2532 }
2533}
2534#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
2537#[repr(i32)]
2538pub enum FlowTimelineStatus {
2539 TIMELINE_STATUS_UNSPECIFIED = 0i32,
2541 TIMELINE_STATUS_COMPLETED = 1i32,
2543 TIMELINE_STATUS_CURRENT = 2i32,
2545 TIMELINE_STATUS_PLANNED = 3i32,
2547}
2548impl FlowTimelineStatus {
2549 #[allow(non_upper_case_globals)]
2551 pub const TimelineStatusUnspecified: Self = Self::TIMELINE_STATUS_UNSPECIFIED;
2552 #[allow(non_upper_case_globals)]
2554 pub const TimelineStatusCompleted: Self = Self::TIMELINE_STATUS_COMPLETED;
2555 #[allow(non_upper_case_globals)]
2557 pub const TimelineStatusCurrent: Self = Self::TIMELINE_STATUS_CURRENT;
2558 #[allow(non_upper_case_globals)]
2560 pub const TimelineStatusPlanned: Self = Self::TIMELINE_STATUS_PLANNED;
2561}
2562impl ::core::default::Default for FlowTimelineStatus {
2563 fn default() -> Self {
2564 Self::TIMELINE_STATUS_UNSPECIFIED
2565 }
2566}
2567impl ::serde::Serialize for FlowTimelineStatus {
2568 fn serialize<S: ::serde::Serializer>(
2569 &self,
2570 s: S,
2571 ) -> ::core::result::Result<S::Ok, S::Error> {
2572 s.serialize_str(::buffa::Enumeration::proto_name(self))
2573 }
2574}
2575impl<'de> ::serde::Deserialize<'de> for FlowTimelineStatus {
2576 fn deserialize<D: ::serde::Deserializer<'de>>(
2577 d: D,
2578 ) -> ::core::result::Result<Self, D::Error> {
2579 struct _V;
2580 impl ::serde::de::Visitor<'_> for _V {
2581 type Value = FlowTimelineStatus;
2582 fn expecting(
2583 &self,
2584 f: &mut ::core::fmt::Formatter<'_>,
2585 ) -> ::core::fmt::Result {
2586 f.write_str(
2587 concat!(
2588 "a string, integer, or null for ", stringify!(FlowTimelineStatus)
2589 ),
2590 )
2591 }
2592 fn visit_str<E: ::serde::de::Error>(
2593 self,
2594 v: &str,
2595 ) -> ::core::result::Result<FlowTimelineStatus, E> {
2596 <FlowTimelineStatus as ::buffa::Enumeration>::from_proto_name(v)
2597 .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
2598 }
2599 fn visit_i64<E: ::serde::de::Error>(
2600 self,
2601 v: i64,
2602 ) -> ::core::result::Result<FlowTimelineStatus, E> {
2603 let v32 = i32::try_from(v)
2604 .map_err(|_| {
2605 ::serde::de::Error::custom(
2606 ::buffa::alloc::format!("enum value {v} out of i32 range"),
2607 )
2608 })?;
2609 <FlowTimelineStatus as ::buffa::Enumeration>::from_i32(v32)
2610 .ok_or_else(|| {
2611 ::serde::de::Error::custom(
2612 ::buffa::alloc::format!("unknown enum value {v32}"),
2613 )
2614 })
2615 }
2616 fn visit_u64<E: ::serde::de::Error>(
2617 self,
2618 v: u64,
2619 ) -> ::core::result::Result<FlowTimelineStatus, E> {
2620 let v32 = i32::try_from(v)
2621 .map_err(|_| {
2622 ::serde::de::Error::custom(
2623 ::buffa::alloc::format!("enum value {v} out of i32 range"),
2624 )
2625 })?;
2626 <FlowTimelineStatus as ::buffa::Enumeration>::from_i32(v32)
2627 .ok_or_else(|| {
2628 ::serde::de::Error::custom(
2629 ::buffa::alloc::format!("unknown enum value {v32}"),
2630 )
2631 })
2632 }
2633 fn visit_unit<E: ::serde::de::Error>(
2634 self,
2635 ) -> ::core::result::Result<FlowTimelineStatus, E> {
2636 ::core::result::Result::Ok(::core::default::Default::default())
2637 }
2638 }
2639 d.deserialize_any(_V)
2640 }
2641}
2642impl ::buffa::json_helpers::ProtoElemJson for FlowTimelineStatus {
2643 fn serialize_proto_json<S: ::serde::Serializer>(
2644 v: &Self,
2645 s: S,
2646 ) -> ::core::result::Result<S::Ok, S::Error> {
2647 ::serde::Serialize::serialize(v, s)
2648 }
2649 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2650 d: D,
2651 ) -> ::core::result::Result<Self, D::Error> {
2652 <Self as ::serde::Deserialize>::deserialize(d)
2653 }
2654}
2655impl ::buffa::Enumeration for FlowTimelineStatus {
2656 fn from_i32(value: i32) -> ::core::option::Option<Self> {
2657 match value {
2658 0i32 => ::core::option::Option::Some(Self::TIMELINE_STATUS_UNSPECIFIED),
2659 1i32 => ::core::option::Option::Some(Self::TIMELINE_STATUS_COMPLETED),
2660 2i32 => ::core::option::Option::Some(Self::TIMELINE_STATUS_CURRENT),
2661 3i32 => ::core::option::Option::Some(Self::TIMELINE_STATUS_PLANNED),
2662 _ => ::core::option::Option::None,
2663 }
2664 }
2665 fn to_i32(&self) -> i32 {
2666 *self as i32
2667 }
2668 fn proto_name(&self) -> &'static str {
2669 match self {
2670 Self::TIMELINE_STATUS_UNSPECIFIED => "TIMELINE_STATUS_UNSPECIFIED",
2671 Self::TIMELINE_STATUS_COMPLETED => "TIMELINE_STATUS_COMPLETED",
2672 Self::TIMELINE_STATUS_CURRENT => "TIMELINE_STATUS_CURRENT",
2673 Self::TIMELINE_STATUS_PLANNED => "TIMELINE_STATUS_PLANNED",
2674 }
2675 }
2676 fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
2677 match name {
2678 "TIMELINE_STATUS_UNSPECIFIED" => {
2679 ::core::option::Option::Some(Self::TIMELINE_STATUS_UNSPECIFIED)
2680 }
2681 "TIMELINE_STATUS_COMPLETED" => {
2682 ::core::option::Option::Some(Self::TIMELINE_STATUS_COMPLETED)
2683 }
2684 "TIMELINE_STATUS_CURRENT" => {
2685 ::core::option::Option::Some(Self::TIMELINE_STATUS_CURRENT)
2686 }
2687 "TIMELINE_STATUS_PLANNED" => {
2688 ::core::option::Option::Some(Self::TIMELINE_STATUS_PLANNED)
2689 }
2690 _ => ::core::option::Option::None,
2691 }
2692 }
2693 fn values() -> &'static [Self] {
2694 &[
2695 Self::TIMELINE_STATUS_UNSPECIFIED,
2696 Self::TIMELINE_STATUS_COMPLETED,
2697 Self::TIMELINE_STATUS_CURRENT,
2698 Self::TIMELINE_STATUS_PLANNED,
2699 ]
2700 }
2701}
2702#[derive(Clone, PartialEq, Default)]
2705#[derive(::serde::Serialize, ::serde::Deserialize)]
2706#[serde(default)]
2707pub struct GetFlowResponse {
2708 #[serde(
2712 rename = "flow",
2713 skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
2714 )]
2715 pub flow: ::buffa::MessageField<FlowDetailView>,
2716 #[serde(skip)]
2717 #[doc(hidden)]
2718 pub __buffa_unknown_fields: ::buffa::UnknownFields,
2719}
2720impl ::core::fmt::Debug for GetFlowResponse {
2721 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2722 f.debug_struct("GetFlowResponse").field("flow", &self.flow).finish()
2723 }
2724}
2725impl GetFlowResponse {
2726 pub const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.GetFlowResponse";
2731}
2732::buffa::impl_default_instance!(GetFlowResponse);
2733impl ::buffa::MessageName for GetFlowResponse {
2734 const PACKAGE: &'static str = "chain.lifecycle.v1";
2735 const NAME: &'static str = "GetFlowResponse";
2736 const FULL_NAME: &'static str = "chain.lifecycle.v1.GetFlowResponse";
2737 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.GetFlowResponse";
2738}
2739impl ::buffa::Message for GetFlowResponse {
2740 #[allow(clippy::let_and_return)]
2746 fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
2747 #[allow(unused_imports)]
2748 use ::buffa::Enumeration as _;
2749 let mut size = 0u32;
2750 if self.flow.is_set() {
2751 let __slot = __cache.reserve();
2752 let inner_size = self.flow.compute_size(__cache);
2753 __cache.set(__slot, inner_size);
2754 size
2755 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
2756 + inner_size;
2757 }
2758 size += self.__buffa_unknown_fields.encoded_len() as u32;
2759 size
2760 }
2761 fn write_to(
2762 &self,
2763 __cache: &mut ::buffa::SizeCache,
2764 buf: &mut impl ::buffa::bytes::BufMut,
2765 ) {
2766 #[allow(unused_imports)]
2767 use ::buffa::Enumeration as _;
2768 if self.flow.is_set() {
2769 ::buffa::types::put_len_delimited_header(1u32, __cache.consume_next(), buf);
2770 self.flow.write_to(__cache, buf);
2771 }
2772 self.__buffa_unknown_fields.write_to(buf);
2773 }
2774 fn merge_field(
2775 &mut self,
2776 tag: ::buffa::encoding::Tag,
2777 buf: &mut impl ::buffa::bytes::Buf,
2778 ctx: ::buffa::DecodeContext<'_>,
2779 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
2780 #[allow(unused_imports)]
2781 use ::buffa::bytes::Buf as _;
2782 #[allow(unused_imports)]
2783 use ::buffa::Enumeration as _;
2784 match tag.field_number() {
2785 1u32 => {
2786 ::buffa::encoding::check_wire_type(
2787 tag,
2788 ::buffa::encoding::WireType::LengthDelimited,
2789 )?;
2790 ::buffa::Message::merge_length_delimited(
2791 self.flow.get_or_insert_default(),
2792 buf,
2793 ctx,
2794 )?;
2795 }
2796 _ => {
2797 self.__buffa_unknown_fields
2798 .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
2799 }
2800 }
2801 ::core::result::Result::Ok(())
2802 }
2803 fn clear(&mut self) {
2804 self.flow = ::buffa::MessageField::none();
2805 self.__buffa_unknown_fields.clear();
2806 }
2807}
2808impl ::buffa::ExtensionSet for GetFlowResponse {
2809 const PROTO_FQN: &'static str = "chain.lifecycle.v1.GetFlowResponse";
2810 fn unknown_fields(&self) -> &::buffa::UnknownFields {
2811 &self.__buffa_unknown_fields
2812 }
2813 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
2814 &mut self.__buffa_unknown_fields
2815 }
2816}
2817impl ::buffa::json_helpers::ProtoElemJson for GetFlowResponse {
2818 fn serialize_proto_json<S: ::serde::Serializer>(
2819 v: &Self,
2820 s: S,
2821 ) -> ::core::result::Result<S::Ok, S::Error> {
2822 ::serde::Serialize::serialize(v, s)
2823 }
2824 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2825 d: D,
2826 ) -> ::core::result::Result<Self, D::Error> {
2827 <Self as ::serde::Deserialize>::deserialize(d)
2828 }
2829}
2830#[doc(hidden)]
2831pub const __GET_FLOW_RESPONSE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
2832 type_url: "type.googleapis.com/chain.lifecycle.v1.GetFlowResponse",
2833 to_json: ::buffa::type_registry::any_to_json::<GetFlowResponse>,
2834 from_json: ::buffa::type_registry::any_from_json::<GetFlowResponse>,
2835 is_wkt: false,
2836};
2837#[derive(Clone, PartialEq, Default)]
2839#[derive(::serde::Serialize, ::serde::Deserialize)]
2840#[serde(default)]
2841pub struct GetFlowByIdRequest {
2842 #[serde(
2846 rename = "flowId",
2847 alias = "flow_id",
2848 with = "::buffa::json_helpers::proto_string",
2849 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
2850 )]
2851 pub flow_id: ::buffa::alloc::string::String,
2852 #[serde(skip)]
2853 #[doc(hidden)]
2854 pub __buffa_unknown_fields: ::buffa::UnknownFields,
2855}
2856impl ::core::fmt::Debug for GetFlowByIdRequest {
2857 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2858 f.debug_struct("GetFlowByIdRequest").field("flow_id", &self.flow_id).finish()
2859 }
2860}
2861impl GetFlowByIdRequest {
2862 pub const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.GetFlowByIdRequest";
2867}
2868::buffa::impl_default_instance!(GetFlowByIdRequest);
2869impl ::buffa::MessageName for GetFlowByIdRequest {
2870 const PACKAGE: &'static str = "chain.lifecycle.v1";
2871 const NAME: &'static str = "GetFlowByIdRequest";
2872 const FULL_NAME: &'static str = "chain.lifecycle.v1.GetFlowByIdRequest";
2873 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.GetFlowByIdRequest";
2874}
2875impl ::buffa::Message for GetFlowByIdRequest {
2876 #[allow(clippy::let_and_return)]
2882 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
2883 #[allow(unused_imports)]
2884 use ::buffa::Enumeration as _;
2885 let mut size = 0u32;
2886 if !self.flow_id.is_empty() {
2887 size += 1u32 + ::buffa::types::string_encoded_len(&self.flow_id) as u32;
2888 }
2889 size += self.__buffa_unknown_fields.encoded_len() as u32;
2890 size
2891 }
2892 fn write_to(
2893 &self,
2894 _cache: &mut ::buffa::SizeCache,
2895 buf: &mut impl ::buffa::bytes::BufMut,
2896 ) {
2897 #[allow(unused_imports)]
2898 use ::buffa::Enumeration as _;
2899 if !self.flow_id.is_empty() {
2900 ::buffa::types::put_string_field(1u32, &self.flow_id, buf);
2901 }
2902 self.__buffa_unknown_fields.write_to(buf);
2903 }
2904 fn merge_field(
2905 &mut self,
2906 tag: ::buffa::encoding::Tag,
2907 buf: &mut impl ::buffa::bytes::Buf,
2908 ctx: ::buffa::DecodeContext<'_>,
2909 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
2910 #[allow(unused_imports)]
2911 use ::buffa::bytes::Buf as _;
2912 #[allow(unused_imports)]
2913 use ::buffa::Enumeration as _;
2914 match tag.field_number() {
2915 1u32 => {
2916 ::buffa::encoding::check_wire_type(
2917 tag,
2918 ::buffa::encoding::WireType::LengthDelimited,
2919 )?;
2920 ::buffa::types::merge_string(&mut self.flow_id, buf)?;
2921 }
2922 _ => {
2923 self.__buffa_unknown_fields
2924 .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
2925 }
2926 }
2927 ::core::result::Result::Ok(())
2928 }
2929 fn clear(&mut self) {
2930 self.flow_id.clear();
2931 self.__buffa_unknown_fields.clear();
2932 }
2933}
2934impl ::buffa::ExtensionSet for GetFlowByIdRequest {
2935 const PROTO_FQN: &'static str = "chain.lifecycle.v1.GetFlowByIdRequest";
2936 fn unknown_fields(&self) -> &::buffa::UnknownFields {
2937 &self.__buffa_unknown_fields
2938 }
2939 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
2940 &mut self.__buffa_unknown_fields
2941 }
2942}
2943impl ::buffa::json_helpers::ProtoElemJson for GetFlowByIdRequest {
2944 fn serialize_proto_json<S: ::serde::Serializer>(
2945 v: &Self,
2946 s: S,
2947 ) -> ::core::result::Result<S::Ok, S::Error> {
2948 ::serde::Serialize::serialize(v, s)
2949 }
2950 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2951 d: D,
2952 ) -> ::core::result::Result<Self, D::Error> {
2953 <Self as ::serde::Deserialize>::deserialize(d)
2954 }
2955}
2956#[doc(hidden)]
2957pub const __GET_FLOW_BY_ID_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
2958 type_url: "type.googleapis.com/chain.lifecycle.v1.GetFlowByIdRequest",
2959 to_json: ::buffa::type_registry::any_to_json::<GetFlowByIdRequest>,
2960 from_json: ::buffa::type_registry::any_from_json::<GetFlowByIdRequest>,
2961 is_wkt: false,
2962};
2963#[derive(Clone, PartialEq, Default)]
2966#[derive(::serde::Serialize, ::serde::Deserialize)]
2967#[serde(default)]
2968pub struct ListFlowsByTxRequest {
2969 #[serde(
2976 rename = "txHash",
2977 alias = "tx_hash",
2978 with = "::buffa::json_helpers::proto_string",
2979 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
2980 )]
2981 pub tx_hash: ::buffa::alloc::string::String,
2982 #[serde(
2986 rename = "lookupKind",
2987 alias = "lookup_kind",
2988 with = "::buffa::json_helpers::proto_enum",
2989 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
2990 )]
2991 pub lookup_kind: ::buffa::EnumValue<TxLookupKind>,
2992 #[serde(
2997 rename = "limit",
2998 with = "::buffa::json_helpers::uint32",
2999 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
3000 )]
3001 pub limit: u32,
3002 #[serde(
3007 rename = "pageToken",
3008 alias = "page_token",
3009 with = "::buffa::json_helpers::proto_string",
3010 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
3011 )]
3012 pub page_token: ::buffa::alloc::string::String,
3013 #[serde(skip)]
3014 #[doc(hidden)]
3015 pub __buffa_unknown_fields: ::buffa::UnknownFields,
3016}
3017impl ::core::fmt::Debug for ListFlowsByTxRequest {
3018 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3019 f.debug_struct("ListFlowsByTxRequest")
3020 .field("tx_hash", &self.tx_hash)
3021 .field("lookup_kind", &self.lookup_kind)
3022 .field("limit", &self.limit)
3023 .field("page_token", &self.page_token)
3024 .finish()
3025 }
3026}
3027impl ListFlowsByTxRequest {
3028 pub const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.ListFlowsByTxRequest";
3033}
3034::buffa::impl_default_instance!(ListFlowsByTxRequest);
3035impl ::buffa::MessageName for ListFlowsByTxRequest {
3036 const PACKAGE: &'static str = "chain.lifecycle.v1";
3037 const NAME: &'static str = "ListFlowsByTxRequest";
3038 const FULL_NAME: &'static str = "chain.lifecycle.v1.ListFlowsByTxRequest";
3039 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.ListFlowsByTxRequest";
3040}
3041impl ::buffa::Message for ListFlowsByTxRequest {
3042 #[allow(clippy::let_and_return)]
3048 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
3049 #[allow(unused_imports)]
3050 use ::buffa::Enumeration as _;
3051 let mut size = 0u32;
3052 if !self.tx_hash.is_empty() {
3053 size += 1u32 + ::buffa::types::string_encoded_len(&self.tx_hash) as u32;
3054 }
3055 {
3056 let val = self.lookup_kind.to_i32();
3057 if val != 0 {
3058 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
3059 }
3060 }
3061 if self.limit != 0u32 {
3062 size += 1u32 + ::buffa::types::uint32_encoded_len(self.limit) as u32;
3063 }
3064 if !self.page_token.is_empty() {
3065 size += 1u32 + ::buffa::types::string_encoded_len(&self.page_token) as u32;
3066 }
3067 size += self.__buffa_unknown_fields.encoded_len() as u32;
3068 size
3069 }
3070 fn write_to(
3071 &self,
3072 _cache: &mut ::buffa::SizeCache,
3073 buf: &mut impl ::buffa::bytes::BufMut,
3074 ) {
3075 #[allow(unused_imports)]
3076 use ::buffa::Enumeration as _;
3077 if !self.tx_hash.is_empty() {
3078 ::buffa::types::put_string_field(1u32, &self.tx_hash, buf);
3079 }
3080 {
3081 let val = self.lookup_kind.to_i32();
3082 if val != 0 {
3083 ::buffa::types::put_int32_field(2u32, val, buf);
3084 }
3085 }
3086 if self.limit != 0u32 {
3087 ::buffa::types::put_uint32_field(3u32, self.limit, buf);
3088 }
3089 if !self.page_token.is_empty() {
3090 ::buffa::types::put_string_field(4u32, &self.page_token, buf);
3091 }
3092 self.__buffa_unknown_fields.write_to(buf);
3093 }
3094 fn merge_field(
3095 &mut self,
3096 tag: ::buffa::encoding::Tag,
3097 buf: &mut impl ::buffa::bytes::Buf,
3098 ctx: ::buffa::DecodeContext<'_>,
3099 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
3100 #[allow(unused_imports)]
3101 use ::buffa::bytes::Buf as _;
3102 #[allow(unused_imports)]
3103 use ::buffa::Enumeration as _;
3104 match tag.field_number() {
3105 1u32 => {
3106 ::buffa::encoding::check_wire_type(
3107 tag,
3108 ::buffa::encoding::WireType::LengthDelimited,
3109 )?;
3110 ::buffa::types::merge_string(&mut self.tx_hash, buf)?;
3111 }
3112 2u32 => {
3113 ::buffa::encoding::check_wire_type(
3114 tag,
3115 ::buffa::encoding::WireType::Varint,
3116 )?;
3117 self.lookup_kind = ::buffa::EnumValue::from(
3118 ::buffa::types::decode_int32(buf)?,
3119 );
3120 }
3121 3u32 => {
3122 ::buffa::encoding::check_wire_type(
3123 tag,
3124 ::buffa::encoding::WireType::Varint,
3125 )?;
3126 self.limit = ::buffa::types::decode_uint32(buf)?;
3127 }
3128 4u32 => {
3129 ::buffa::encoding::check_wire_type(
3130 tag,
3131 ::buffa::encoding::WireType::LengthDelimited,
3132 )?;
3133 ::buffa::types::merge_string(&mut self.page_token, buf)?;
3134 }
3135 _ => {
3136 self.__buffa_unknown_fields
3137 .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
3138 }
3139 }
3140 ::core::result::Result::Ok(())
3141 }
3142 fn clear(&mut self) {
3143 self.tx_hash.clear();
3144 self.lookup_kind = ::buffa::EnumValue::from(0);
3145 self.limit = 0u32;
3146 self.page_token.clear();
3147 self.__buffa_unknown_fields.clear();
3148 }
3149}
3150impl ::buffa::ExtensionSet for ListFlowsByTxRequest {
3151 const PROTO_FQN: &'static str = "chain.lifecycle.v1.ListFlowsByTxRequest";
3152 fn unknown_fields(&self) -> &::buffa::UnknownFields {
3153 &self.__buffa_unknown_fields
3154 }
3155 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
3156 &mut self.__buffa_unknown_fields
3157 }
3158}
3159impl ::buffa::json_helpers::ProtoElemJson for ListFlowsByTxRequest {
3160 fn serialize_proto_json<S: ::serde::Serializer>(
3161 v: &Self,
3162 s: S,
3163 ) -> ::core::result::Result<S::Ok, S::Error> {
3164 ::serde::Serialize::serialize(v, s)
3165 }
3166 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
3167 d: D,
3168 ) -> ::core::result::Result<Self, D::Error> {
3169 <Self as ::serde::Deserialize>::deserialize(d)
3170 }
3171}
3172#[doc(hidden)]
3173pub const __LIST_FLOWS_BY_TX_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
3174 type_url: "type.googleapis.com/chain.lifecycle.v1.ListFlowsByTxRequest",
3175 to_json: ::buffa::type_registry::any_to_json::<ListFlowsByTxRequest>,
3176 from_json: ::buffa::type_registry::any_from_json::<ListFlowsByTxRequest>,
3177 is_wkt: false,
3178};
3179#[derive(Clone, PartialEq, Default)]
3181#[derive(::serde::Serialize)]
3182#[serde(default)]
3183pub struct ListFlowsRequest {
3184 #[serde(
3189 rename = "limit",
3190 with = "::buffa::json_helpers::uint32",
3191 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
3192 )]
3193 pub limit: u32,
3194 #[serde(
3198 rename = "sort",
3199 with = "::buffa::json_helpers::proto_enum",
3200 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
3201 )]
3202 pub sort: ::buffa::EnumValue<Sort>,
3203 #[serde(
3207 rename = "flowKind",
3208 alias = "flow_kind",
3209 with = "::buffa::json_helpers::proto_enum",
3210 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
3211 )]
3212 pub flow_kind: ::buffa::EnumValue<FlowKind>,
3213 #[serde(
3218 rename = "flowState",
3219 alias = "flow_state",
3220 with = "::buffa::json_helpers::proto_enum",
3221 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
3222 )]
3223 pub flow_state: ::buffa::EnumValue<FlowState>,
3224 #[serde(
3229 rename = "txRef",
3230 alias = "tx_ref",
3231 with = "::buffa::json_helpers::proto_string",
3232 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
3233 )]
3234 pub tx_ref: ::buffa::alloc::string::String,
3235 #[serde(
3239 rename = "scope",
3240 with = "::buffa::json_helpers::proto_enum",
3241 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
3242 )]
3243 pub scope: ::buffa::EnumValue<ListScope>,
3244 #[serde(
3248 rename = "polyesterChainIds",
3249 alias = "polyester_chain_ids",
3250 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
3251 deserialize_with = "::buffa::json_helpers::null_as_default"
3252 )]
3253 pub polyester_chain_ids: ::buffa::alloc::vec::Vec<u32>,
3254 #[serde(
3258 rename = "zippedAssetIds",
3259 alias = "zipped_asset_ids",
3260 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
3261 deserialize_with = "::buffa::json_helpers::null_as_default"
3262 )]
3263 pub zipped_asset_ids: ::buffa::alloc::vec::Vec<u32>,
3264 #[serde(
3268 rename = "unifiedAssetIds",
3269 alias = "unified_asset_ids",
3270 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
3271 deserialize_with = "::buffa::json_helpers::null_as_default"
3272 )]
3273 pub unified_asset_ids: ::buffa::alloc::vec::Vec<u32>,
3274 #[serde(
3280 rename = "pageToken",
3281 alias = "page_token",
3282 with = "::buffa::json_helpers::proto_string",
3283 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
3284 )]
3285 pub page_token: ::buffa::alloc::string::String,
3286 #[serde(
3290 rename = "orderBy",
3291 alias = "order_by",
3292 with = "::buffa::json_helpers::proto_enum",
3293 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
3294 )]
3295 pub order_by: ::buffa::EnumValue<ListOrderBy>,
3296 #[serde(flatten)]
3297 pub account_selector: ::core::option::Option<
3298 __buffa::oneof::list_flows_request::AccountSelector,
3299 >,
3300 #[serde(skip)]
3301 #[doc(hidden)]
3302 pub __buffa_unknown_fields: ::buffa::UnknownFields,
3303}
3304impl ::core::fmt::Debug for ListFlowsRequest {
3305 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3306 f.debug_struct("ListFlowsRequest")
3307 .field("limit", &self.limit)
3308 .field("sort", &self.sort)
3309 .field("flow_kind", &self.flow_kind)
3310 .field("flow_state", &self.flow_state)
3311 .field("tx_ref", &self.tx_ref)
3312 .field("scope", &self.scope)
3313 .field("polyester_chain_ids", &self.polyester_chain_ids)
3314 .field("zipped_asset_ids", &self.zipped_asset_ids)
3315 .field("unified_asset_ids", &self.unified_asset_ids)
3316 .field("page_token", &self.page_token)
3317 .field("order_by", &self.order_by)
3318 .field("account_selector", &self.account_selector)
3319 .finish()
3320 }
3321}
3322impl ListFlowsRequest {
3323 pub const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.ListFlowsRequest";
3328}
3329::buffa::impl_default_instance!(ListFlowsRequest);
3330impl ::buffa::MessageName for ListFlowsRequest {
3331 const PACKAGE: &'static str = "chain.lifecycle.v1";
3332 const NAME: &'static str = "ListFlowsRequest";
3333 const FULL_NAME: &'static str = "chain.lifecycle.v1.ListFlowsRequest";
3334 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.ListFlowsRequest";
3335}
3336impl ::buffa::Message for ListFlowsRequest {
3337 #[allow(clippy::let_and_return)]
3343 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
3344 #[allow(unused_imports)]
3345 use ::buffa::Enumeration as _;
3346 let mut size = 0u32;
3347 if self.limit != 0u32 {
3348 size += 1u32 + ::buffa::types::uint32_encoded_len(self.limit) as u32;
3349 }
3350 {
3351 let val = self.sort.to_i32();
3352 if val != 0 {
3353 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
3354 }
3355 }
3356 {
3357 let val = self.flow_kind.to_i32();
3358 if val != 0 {
3359 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
3360 }
3361 }
3362 {
3363 let val = self.flow_state.to_i32();
3364 if val != 0 {
3365 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
3366 }
3367 }
3368 if !self.tx_ref.is_empty() {
3369 size += 1u32 + ::buffa::types::string_encoded_len(&self.tx_ref) as u32;
3370 }
3371 {
3372 let val = self.scope.to_i32();
3373 if val != 0 {
3374 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
3375 }
3376 }
3377 if let ::core::option::Option::Some(ref v) = self.account_selector {
3378 match v {
3379 __buffa::oneof::list_flows_request::AccountSelector::OwnerAccountId(
3380 _x,
3381 ) => {
3382 size += 1u32 + ::buffa::types::FIXED64_ENCODED_LEN as u32;
3383 }
3384 __buffa::oneof::list_flows_request::AccountSelector::SmartAccountAddress(
3385 x,
3386 ) => {
3387 size += 1u32 + ::buffa::types::string_encoded_len(x) as u32;
3388 }
3389 }
3390 }
3391 if !self.polyester_chain_ids.is_empty() {
3392 let payload: u32 = self
3393 .polyester_chain_ids
3394 .iter()
3395 .map(|&v| ::buffa::types::uint32_encoded_len(v) as u32)
3396 .sum::<u32>();
3397 size
3398 += 1u32 + ::buffa::encoding::varint_len(payload as u64) as u32 + payload;
3399 }
3400 if !self.zipped_asset_ids.is_empty() {
3401 let payload: u32 = self
3402 .zipped_asset_ids
3403 .iter()
3404 .map(|&v| ::buffa::types::uint32_encoded_len(v) as u32)
3405 .sum::<u32>();
3406 size
3407 += 1u32 + ::buffa::encoding::varint_len(payload as u64) as u32 + payload;
3408 }
3409 if !self.unified_asset_ids.is_empty() {
3410 let payload: u32 = self
3411 .unified_asset_ids
3412 .iter()
3413 .map(|&v| ::buffa::types::uint32_encoded_len(v) as u32)
3414 .sum::<u32>();
3415 size
3416 += 1u32 + ::buffa::encoding::varint_len(payload as u64) as u32 + payload;
3417 }
3418 if !self.page_token.is_empty() {
3419 size += 1u32 + ::buffa::types::string_encoded_len(&self.page_token) as u32;
3420 }
3421 {
3422 let val = self.order_by.to_i32();
3423 if val != 0 {
3424 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
3425 }
3426 }
3427 size += self.__buffa_unknown_fields.encoded_len() as u32;
3428 size
3429 }
3430 fn write_to(
3431 &self,
3432 _cache: &mut ::buffa::SizeCache,
3433 buf: &mut impl ::buffa::bytes::BufMut,
3434 ) {
3435 #[allow(unused_imports)]
3436 use ::buffa::Enumeration as _;
3437 if self.limit != 0u32 {
3438 ::buffa::types::put_uint32_field(1u32, self.limit, buf);
3439 }
3440 {
3441 let val = self.sort.to_i32();
3442 if val != 0 {
3443 ::buffa::types::put_int32_field(2u32, val, buf);
3444 }
3445 }
3446 {
3447 let val = self.flow_kind.to_i32();
3448 if val != 0 {
3449 ::buffa::types::put_int32_field(3u32, val, buf);
3450 }
3451 }
3452 {
3453 let val = self.flow_state.to_i32();
3454 if val != 0 {
3455 ::buffa::types::put_int32_field(4u32, val, buf);
3456 }
3457 }
3458 if !self.tx_ref.is_empty() {
3459 ::buffa::types::put_string_field(5u32, &self.tx_ref, buf);
3460 }
3461 {
3462 let val = self.scope.to_i32();
3463 if val != 0 {
3464 ::buffa::types::put_int32_field(6u32, val, buf);
3465 }
3466 }
3467 if let ::core::option::Option::Some(ref v) = self.account_selector {
3468 match v {
3469 __buffa::oneof::list_flows_request::AccountSelector::OwnerAccountId(
3470 x,
3471 ) => {
3472 ::buffa::types::put_fixed64_field(7u32, *x, buf);
3473 }
3474 __buffa::oneof::list_flows_request::AccountSelector::SmartAccountAddress(
3475 x,
3476 ) => {
3477 ::buffa::types::put_string_field(8u32, x, buf);
3478 }
3479 }
3480 }
3481 if !self.polyester_chain_ids.is_empty() {
3482 let payload: u32 = self
3483 .polyester_chain_ids
3484 .iter()
3485 .map(|&v| ::buffa::types::uint32_encoded_len(v) as u32)
3486 .sum::<u32>();
3487 ::buffa::types::put_len_delimited_header(9u32, payload, buf);
3488 for &v in &self.polyester_chain_ids {
3489 ::buffa::types::encode_uint32(v, buf);
3490 }
3491 }
3492 if !self.zipped_asset_ids.is_empty() {
3493 let payload: u32 = self
3494 .zipped_asset_ids
3495 .iter()
3496 .map(|&v| ::buffa::types::uint32_encoded_len(v) as u32)
3497 .sum::<u32>();
3498 ::buffa::types::put_len_delimited_header(10u32, payload, buf);
3499 for &v in &self.zipped_asset_ids {
3500 ::buffa::types::encode_uint32(v, buf);
3501 }
3502 }
3503 if !self.unified_asset_ids.is_empty() {
3504 let payload: u32 = self
3505 .unified_asset_ids
3506 .iter()
3507 .map(|&v| ::buffa::types::uint32_encoded_len(v) as u32)
3508 .sum::<u32>();
3509 ::buffa::types::put_len_delimited_header(11u32, payload, buf);
3510 for &v in &self.unified_asset_ids {
3511 ::buffa::types::encode_uint32(v, buf);
3512 }
3513 }
3514 if !self.page_token.is_empty() {
3515 ::buffa::types::put_string_field(12u32, &self.page_token, buf);
3516 }
3517 {
3518 let val = self.order_by.to_i32();
3519 if val != 0 {
3520 ::buffa::types::put_int32_field(13u32, val, buf);
3521 }
3522 }
3523 self.__buffa_unknown_fields.write_to(buf);
3524 }
3525 fn merge_field(
3526 &mut self,
3527 tag: ::buffa::encoding::Tag,
3528 buf: &mut impl ::buffa::bytes::Buf,
3529 ctx: ::buffa::DecodeContext<'_>,
3530 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
3531 #[allow(unused_imports)]
3532 use ::buffa::bytes::Buf as _;
3533 #[allow(unused_imports)]
3534 use ::buffa::Enumeration as _;
3535 match tag.field_number() {
3536 1u32 => {
3537 ::buffa::encoding::check_wire_type(
3538 tag,
3539 ::buffa::encoding::WireType::Varint,
3540 )?;
3541 self.limit = ::buffa::types::decode_uint32(buf)?;
3542 }
3543 2u32 => {
3544 ::buffa::encoding::check_wire_type(
3545 tag,
3546 ::buffa::encoding::WireType::Varint,
3547 )?;
3548 self.sort = ::buffa::EnumValue::from(::buffa::types::decode_int32(buf)?);
3549 }
3550 3u32 => {
3551 ::buffa::encoding::check_wire_type(
3552 tag,
3553 ::buffa::encoding::WireType::Varint,
3554 )?;
3555 self.flow_kind = ::buffa::EnumValue::from(
3556 ::buffa::types::decode_int32(buf)?,
3557 );
3558 }
3559 4u32 => {
3560 ::buffa::encoding::check_wire_type(
3561 tag,
3562 ::buffa::encoding::WireType::Varint,
3563 )?;
3564 self.flow_state = ::buffa::EnumValue::from(
3565 ::buffa::types::decode_int32(buf)?,
3566 );
3567 }
3568 5u32 => {
3569 ::buffa::encoding::check_wire_type(
3570 tag,
3571 ::buffa::encoding::WireType::LengthDelimited,
3572 )?;
3573 ::buffa::types::merge_string(&mut self.tx_ref, buf)?;
3574 }
3575 6u32 => {
3576 ::buffa::encoding::check_wire_type(
3577 tag,
3578 ::buffa::encoding::WireType::Varint,
3579 )?;
3580 self.scope = ::buffa::EnumValue::from(
3581 ::buffa::types::decode_int32(buf)?,
3582 );
3583 }
3584 7u32 => {
3585 ::buffa::encoding::check_wire_type(
3586 tag,
3587 ::buffa::encoding::WireType::Fixed64,
3588 )?;
3589 self.account_selector = ::core::option::Option::Some(
3590 __buffa::oneof::list_flows_request::AccountSelector::OwnerAccountId(
3591 ::buffa::types::decode_fixed64(buf)?,
3592 ),
3593 );
3594 }
3595 8u32 => {
3596 ::buffa::encoding::check_wire_type(
3597 tag,
3598 ::buffa::encoding::WireType::LengthDelimited,
3599 )?;
3600 self.account_selector = ::core::option::Option::Some(
3601 __buffa::oneof::list_flows_request::AccountSelector::SmartAccountAddress(
3602 ::buffa::types::decode_string(buf)?,
3603 ),
3604 );
3605 }
3606 9u32 => {
3607 if tag.wire_type() == ::buffa::encoding::WireType::LengthDelimited {
3608 let len = ::buffa::encoding::decode_varint(buf)?;
3609 let len = usize::try_from(len)
3610 .map_err(|_| ::buffa::DecodeError::MessageTooLarge)?;
3611 if buf.remaining() < len {
3612 return ::core::result::Result::Err(
3613 ::buffa::DecodeError::UnexpectedEof,
3614 );
3615 }
3616 self.polyester_chain_ids.reserve(len);
3617 let mut limited = buf.take(len);
3618 while limited.has_remaining() {
3619 self.polyester_chain_ids
3620 .push(::buffa::types::decode_uint32(&mut limited)?);
3621 }
3622 let leftover = limited.remaining();
3623 if leftover > 0 {
3624 limited.advance(leftover);
3625 }
3626 } else if tag.wire_type() == ::buffa::encoding::WireType::Varint {
3627 self.polyester_chain_ids.push(::buffa::types::decode_uint32(buf)?);
3628 } else {
3629 return ::core::result::Result::Err(
3630 ::buffa::encoding::wire_type_mismatch(
3631 tag,
3632 ::buffa::encoding::WireType::LengthDelimited,
3633 ),
3634 );
3635 }
3636 }
3637 10u32 => {
3638 if tag.wire_type() == ::buffa::encoding::WireType::LengthDelimited {
3639 let len = ::buffa::encoding::decode_varint(buf)?;
3640 let len = usize::try_from(len)
3641 .map_err(|_| ::buffa::DecodeError::MessageTooLarge)?;
3642 if buf.remaining() < len {
3643 return ::core::result::Result::Err(
3644 ::buffa::DecodeError::UnexpectedEof,
3645 );
3646 }
3647 self.zipped_asset_ids.reserve(len);
3648 let mut limited = buf.take(len);
3649 while limited.has_remaining() {
3650 self.zipped_asset_ids
3651 .push(::buffa::types::decode_uint32(&mut limited)?);
3652 }
3653 let leftover = limited.remaining();
3654 if leftover > 0 {
3655 limited.advance(leftover);
3656 }
3657 } else if tag.wire_type() == ::buffa::encoding::WireType::Varint {
3658 self.zipped_asset_ids.push(::buffa::types::decode_uint32(buf)?);
3659 } else {
3660 return ::core::result::Result::Err(
3661 ::buffa::encoding::wire_type_mismatch(
3662 tag,
3663 ::buffa::encoding::WireType::LengthDelimited,
3664 ),
3665 );
3666 }
3667 }
3668 11u32 => {
3669 if tag.wire_type() == ::buffa::encoding::WireType::LengthDelimited {
3670 let len = ::buffa::encoding::decode_varint(buf)?;
3671 let len = usize::try_from(len)
3672 .map_err(|_| ::buffa::DecodeError::MessageTooLarge)?;
3673 if buf.remaining() < len {
3674 return ::core::result::Result::Err(
3675 ::buffa::DecodeError::UnexpectedEof,
3676 );
3677 }
3678 self.unified_asset_ids.reserve(len);
3679 let mut limited = buf.take(len);
3680 while limited.has_remaining() {
3681 self.unified_asset_ids
3682 .push(::buffa::types::decode_uint32(&mut limited)?);
3683 }
3684 let leftover = limited.remaining();
3685 if leftover > 0 {
3686 limited.advance(leftover);
3687 }
3688 } else if tag.wire_type() == ::buffa::encoding::WireType::Varint {
3689 self.unified_asset_ids.push(::buffa::types::decode_uint32(buf)?);
3690 } else {
3691 return ::core::result::Result::Err(
3692 ::buffa::encoding::wire_type_mismatch(
3693 tag,
3694 ::buffa::encoding::WireType::LengthDelimited,
3695 ),
3696 );
3697 }
3698 }
3699 12u32 => {
3700 ::buffa::encoding::check_wire_type(
3701 tag,
3702 ::buffa::encoding::WireType::LengthDelimited,
3703 )?;
3704 ::buffa::types::merge_string(&mut self.page_token, buf)?;
3705 }
3706 13u32 => {
3707 ::buffa::encoding::check_wire_type(
3708 tag,
3709 ::buffa::encoding::WireType::Varint,
3710 )?;
3711 self.order_by = ::buffa::EnumValue::from(
3712 ::buffa::types::decode_int32(buf)?,
3713 );
3714 }
3715 _ => {
3716 self.__buffa_unknown_fields
3717 .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
3718 }
3719 }
3720 ::core::result::Result::Ok(())
3721 }
3722 fn clear(&mut self) {
3723 self.limit = 0u32;
3724 self.sort = ::buffa::EnumValue::from(0);
3725 self.flow_kind = ::buffa::EnumValue::from(0);
3726 self.flow_state = ::buffa::EnumValue::from(0);
3727 self.tx_ref.clear();
3728 self.scope = ::buffa::EnumValue::from(0);
3729 self.account_selector = ::core::option::Option::None;
3730 self.polyester_chain_ids.clear();
3731 self.zipped_asset_ids.clear();
3732 self.unified_asset_ids.clear();
3733 self.page_token.clear();
3734 self.order_by = ::buffa::EnumValue::from(0);
3735 self.__buffa_unknown_fields.clear();
3736 }
3737}
3738impl ::buffa::ExtensionSet for ListFlowsRequest {
3739 const PROTO_FQN: &'static str = "chain.lifecycle.v1.ListFlowsRequest";
3740 fn unknown_fields(&self) -> &::buffa::UnknownFields {
3741 &self.__buffa_unknown_fields
3742 }
3743 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
3744 &mut self.__buffa_unknown_fields
3745 }
3746}
3747impl<'de> serde::Deserialize<'de> for ListFlowsRequest {
3748 fn deserialize<D: serde::Deserializer<'de>>(
3749 d: D,
3750 ) -> ::core::result::Result<Self, D::Error> {
3751 struct _V;
3752 impl<'de> serde::de::Visitor<'de> for _V {
3753 type Value = ListFlowsRequest;
3754 fn expecting(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
3755 f.write_str("struct ListFlowsRequest")
3756 }
3757 #[allow(clippy::field_reassign_with_default)]
3758 fn visit_map<A: serde::de::MapAccess<'de>>(
3759 self,
3760 mut map: A,
3761 ) -> ::core::result::Result<ListFlowsRequest, A::Error> {
3762 let mut __f_limit: ::core::option::Option<u32> = None;
3763 let mut __f_sort: ::core::option::Option<::buffa::EnumValue<Sort>> = None;
3764 let mut __f_flow_kind: ::core::option::Option<
3765 ::buffa::EnumValue<FlowKind>,
3766 > = None;
3767 let mut __f_flow_state: ::core::option::Option<
3768 ::buffa::EnumValue<FlowState>,
3769 > = None;
3770 let mut __f_tx_ref: ::core::option::Option<
3771 ::buffa::alloc::string::String,
3772 > = None;
3773 let mut __f_scope: ::core::option::Option<
3774 ::buffa::EnumValue<ListScope>,
3775 > = None;
3776 let mut __f_polyester_chain_ids: ::core::option::Option<
3777 ::buffa::alloc::vec::Vec<u32>,
3778 > = None;
3779 let mut __f_zipped_asset_ids: ::core::option::Option<
3780 ::buffa::alloc::vec::Vec<u32>,
3781 > = None;
3782 let mut __f_unified_asset_ids: ::core::option::Option<
3783 ::buffa::alloc::vec::Vec<u32>,
3784 > = None;
3785 let mut __f_page_token: ::core::option::Option<
3786 ::buffa::alloc::string::String,
3787 > = None;
3788 let mut __f_order_by: ::core::option::Option<
3789 ::buffa::EnumValue<ListOrderBy>,
3790 > = None;
3791 let mut __oneof_account_selector: ::core::option::Option<
3792 __buffa::oneof::list_flows_request::AccountSelector,
3793 > = None;
3794 while let Some(key) = map.next_key::<::buffa::alloc::string::String>()? {
3795 match key.as_str() {
3796 "limit" => {
3797 __f_limit = Some({
3798 struct _S;
3799 impl<'de> serde::de::DeserializeSeed<'de> for _S {
3800 type Value = u32;
3801 fn deserialize<D: serde::Deserializer<'de>>(
3802 self,
3803 d: D,
3804 ) -> ::core::result::Result<u32, D::Error> {
3805 ::buffa::json_helpers::uint32::deserialize(d)
3806 }
3807 }
3808 map.next_value_seed(_S)?
3809 });
3810 }
3811 "sort" => {
3812 __f_sort = Some({
3813 struct _S;
3814 impl<'de> serde::de::DeserializeSeed<'de> for _S {
3815 type Value = ::buffa::EnumValue<Sort>;
3816 fn deserialize<D: serde::Deserializer<'de>>(
3817 self,
3818 d: D,
3819 ) -> ::core::result::Result<
3820 ::buffa::EnumValue<Sort>,
3821 D::Error,
3822 > {
3823 ::buffa::json_helpers::proto_enum::deserialize(d)
3824 }
3825 }
3826 map.next_value_seed(_S)?
3827 });
3828 }
3829 "flowKind" | "flow_kind" => {
3830 __f_flow_kind = Some({
3831 struct _S;
3832 impl<'de> serde::de::DeserializeSeed<'de> for _S {
3833 type Value = ::buffa::EnumValue<FlowKind>;
3834 fn deserialize<D: serde::Deserializer<'de>>(
3835 self,
3836 d: D,
3837 ) -> ::core::result::Result<
3838 ::buffa::EnumValue<FlowKind>,
3839 D::Error,
3840 > {
3841 ::buffa::json_helpers::proto_enum::deserialize(d)
3842 }
3843 }
3844 map.next_value_seed(_S)?
3845 });
3846 }
3847 "flowState" | "flow_state" => {
3848 __f_flow_state = Some({
3849 struct _S;
3850 impl<'de> serde::de::DeserializeSeed<'de> for _S {
3851 type Value = ::buffa::EnumValue<FlowState>;
3852 fn deserialize<D: serde::Deserializer<'de>>(
3853 self,
3854 d: D,
3855 ) -> ::core::result::Result<
3856 ::buffa::EnumValue<FlowState>,
3857 D::Error,
3858 > {
3859 ::buffa::json_helpers::proto_enum::deserialize(d)
3860 }
3861 }
3862 map.next_value_seed(_S)?
3863 });
3864 }
3865 "txRef" | "tx_ref" => {
3866 __f_tx_ref = Some({
3867 struct _S;
3868 impl<'de> serde::de::DeserializeSeed<'de> for _S {
3869 type Value = ::buffa::alloc::string::String;
3870 fn deserialize<D: serde::Deserializer<'de>>(
3871 self,
3872 d: D,
3873 ) -> ::core::result::Result<
3874 ::buffa::alloc::string::String,
3875 D::Error,
3876 > {
3877 ::buffa::json_helpers::proto_string::deserialize(d)
3878 }
3879 }
3880 map.next_value_seed(_S)?
3881 });
3882 }
3883 "scope" => {
3884 __f_scope = Some({
3885 struct _S;
3886 impl<'de> serde::de::DeserializeSeed<'de> for _S {
3887 type Value = ::buffa::EnumValue<ListScope>;
3888 fn deserialize<D: serde::Deserializer<'de>>(
3889 self,
3890 d: D,
3891 ) -> ::core::result::Result<
3892 ::buffa::EnumValue<ListScope>,
3893 D::Error,
3894 > {
3895 ::buffa::json_helpers::proto_enum::deserialize(d)
3896 }
3897 }
3898 map.next_value_seed(_S)?
3899 });
3900 }
3901 "polyesterChainIds" | "polyester_chain_ids" => {
3902 __f_polyester_chain_ids = Some({
3903 struct _S;
3904 impl<'de> serde::de::DeserializeSeed<'de> for _S {
3905 type Value = ::buffa::alloc::vec::Vec<u32>;
3906 fn deserialize<D: serde::Deserializer<'de>>(
3907 self,
3908 d: D,
3909 ) -> ::core::result::Result<
3910 ::buffa::alloc::vec::Vec<u32>,
3911 D::Error,
3912 > {
3913 ::buffa::json_helpers::null_as_default(d)
3914 }
3915 }
3916 map.next_value_seed(_S)?
3917 });
3918 }
3919 "zippedAssetIds" | "zipped_asset_ids" => {
3920 __f_zipped_asset_ids = Some({
3921 struct _S;
3922 impl<'de> serde::de::DeserializeSeed<'de> for _S {
3923 type Value = ::buffa::alloc::vec::Vec<u32>;
3924 fn deserialize<D: serde::Deserializer<'de>>(
3925 self,
3926 d: D,
3927 ) -> ::core::result::Result<
3928 ::buffa::alloc::vec::Vec<u32>,
3929 D::Error,
3930 > {
3931 ::buffa::json_helpers::null_as_default(d)
3932 }
3933 }
3934 map.next_value_seed(_S)?
3935 });
3936 }
3937 "unifiedAssetIds" | "unified_asset_ids" => {
3938 __f_unified_asset_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 "pageToken" | "page_token" => {
3956 __f_page_token = Some({
3957 struct _S;
3958 impl<'de> serde::de::DeserializeSeed<'de> for _S {
3959 type Value = ::buffa::alloc::string::String;
3960 fn deserialize<D: serde::Deserializer<'de>>(
3961 self,
3962 d: D,
3963 ) -> ::core::result::Result<
3964 ::buffa::alloc::string::String,
3965 D::Error,
3966 > {
3967 ::buffa::json_helpers::proto_string::deserialize(d)
3968 }
3969 }
3970 map.next_value_seed(_S)?
3971 });
3972 }
3973 "orderBy" | "order_by" => {
3974 __f_order_by = Some({
3975 struct _S;
3976 impl<'de> serde::de::DeserializeSeed<'de> for _S {
3977 type Value = ::buffa::EnumValue<ListOrderBy>;
3978 fn deserialize<D: serde::Deserializer<'de>>(
3979 self,
3980 d: D,
3981 ) -> ::core::result::Result<
3982 ::buffa::EnumValue<ListOrderBy>,
3983 D::Error,
3984 > {
3985 ::buffa::json_helpers::proto_enum::deserialize(d)
3986 }
3987 }
3988 map.next_value_seed(_S)?
3989 });
3990 }
3991 "ownerAccountId" | "owner_account_id" => {
3992 struct _DeserSeed;
3993 impl<'de> serde::de::DeserializeSeed<'de> for _DeserSeed {
3994 type Value = u64;
3995 fn deserialize<D: serde::Deserializer<'de>>(
3996 self,
3997 d: D,
3998 ) -> ::core::result::Result<u64, D::Error> {
3999 ::buffa::json_helpers::uint64::deserialize(d)
4000 }
4001 }
4002 let v: ::core::option::Option<u64> = map
4003 .next_value_seed(
4004 ::buffa::json_helpers::NullableDeserializeSeed(_DeserSeed),
4005 )?;
4006 if let Some(v) = v {
4007 if __oneof_account_selector.is_some() {
4008 return Err(
4009 serde::de::Error::custom(
4010 "multiple oneof fields set for 'account_selector'",
4011 ),
4012 );
4013 }
4014 __oneof_account_selector = Some(
4015 __buffa::oneof::list_flows_request::AccountSelector::OwnerAccountId(
4016 v,
4017 ),
4018 );
4019 }
4020 }
4021 "smartAccountAddress" | "smart_account_address" => {
4022 let v: ::core::option::Option<
4023 ::buffa::alloc::string::String,
4024 > = map
4025 .next_value_seed(
4026 ::buffa::json_helpers::NullableDeserializeSeed(
4027 ::buffa::json_helpers::DefaultDeserializeSeed::<
4028 ::buffa::alloc::string::String,
4029 >::new(),
4030 ),
4031 )?;
4032 if let Some(v) = v {
4033 if __oneof_account_selector.is_some() {
4034 return Err(
4035 serde::de::Error::custom(
4036 "multiple oneof fields set for 'account_selector'",
4037 ),
4038 );
4039 }
4040 __oneof_account_selector = Some(
4041 __buffa::oneof::list_flows_request::AccountSelector::SmartAccountAddress(
4042 v,
4043 ),
4044 );
4045 }
4046 }
4047 _ => {
4048 map.next_value::<serde::de::IgnoredAny>()?;
4049 }
4050 }
4051 }
4052 let mut __r = <ListFlowsRequest as ::core::default::Default>::default();
4053 if let ::core::option::Option::Some(v) = __f_limit {
4054 __r.limit = v;
4055 }
4056 if let ::core::option::Option::Some(v) = __f_sort {
4057 __r.sort = v;
4058 }
4059 if let ::core::option::Option::Some(v) = __f_flow_kind {
4060 __r.flow_kind = v;
4061 }
4062 if let ::core::option::Option::Some(v) = __f_flow_state {
4063 __r.flow_state = v;
4064 }
4065 if let ::core::option::Option::Some(v) = __f_tx_ref {
4066 __r.tx_ref = v;
4067 }
4068 if let ::core::option::Option::Some(v) = __f_scope {
4069 __r.scope = v;
4070 }
4071 if let ::core::option::Option::Some(v) = __f_polyester_chain_ids {
4072 __r.polyester_chain_ids = v;
4073 }
4074 if let ::core::option::Option::Some(v) = __f_zipped_asset_ids {
4075 __r.zipped_asset_ids = v;
4076 }
4077 if let ::core::option::Option::Some(v) = __f_unified_asset_ids {
4078 __r.unified_asset_ids = v;
4079 }
4080 if let ::core::option::Option::Some(v) = __f_page_token {
4081 __r.page_token = v;
4082 }
4083 if let ::core::option::Option::Some(v) = __f_order_by {
4084 __r.order_by = v;
4085 }
4086 __r.account_selector = __oneof_account_selector;
4087 Ok(__r)
4088 }
4089 }
4090 d.deserialize_map(_V)
4091 }
4092}
4093impl ::buffa::json_helpers::ProtoElemJson for ListFlowsRequest {
4094 fn serialize_proto_json<S: ::serde::Serializer>(
4095 v: &Self,
4096 s: S,
4097 ) -> ::core::result::Result<S::Ok, S::Error> {
4098 ::serde::Serialize::serialize(v, s)
4099 }
4100 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
4101 d: D,
4102 ) -> ::core::result::Result<Self, D::Error> {
4103 <Self as ::serde::Deserialize>::deserialize(d)
4104 }
4105}
4106#[doc(hidden)]
4107pub const __LIST_FLOWS_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
4108 type_url: "type.googleapis.com/chain.lifecycle.v1.ListFlowsRequest",
4109 to_json: ::buffa::type_registry::any_to_json::<ListFlowsRequest>,
4110 from_json: ::buffa::type_registry::any_from_json::<ListFlowsRequest>,
4111 is_wkt: false,
4112};
4113pub mod list_flows_request {
4114 #[allow(unused_imports)]
4115 use super::*;
4116 #[doc(inline)]
4117 pub use super::__buffa::oneof::list_flows_request::AccountSelector;
4118 #[doc(inline)]
4119 pub use super::__buffa::view::oneof::list_flows_request::AccountSelector as AccountSelectorView;
4120}
4121#[derive(Clone, PartialEq, Default)]
4123#[derive(::serde::Serialize, ::serde::Deserialize)]
4124#[serde(default)]
4125pub struct ListFlowsResponse {
4126 #[serde(
4131 rename = "flows",
4132 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
4133 deserialize_with = "::buffa::json_helpers::null_as_default"
4134 )]
4135 pub flows: ::buffa::alloc::vec::Vec<FlowSummaryView>,
4136 #[serde(
4140 rename = "nextPageToken",
4141 alias = "next_page_token",
4142 with = "::buffa::json_helpers::proto_string",
4143 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
4144 )]
4145 pub next_page_token: ::buffa::alloc::string::String,
4146 #[serde(skip)]
4147 #[doc(hidden)]
4148 pub __buffa_unknown_fields: ::buffa::UnknownFields,
4149}
4150impl ::core::fmt::Debug for ListFlowsResponse {
4151 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4152 f.debug_struct("ListFlowsResponse")
4153 .field("flows", &self.flows)
4154 .field("next_page_token", &self.next_page_token)
4155 .finish()
4156 }
4157}
4158impl ListFlowsResponse {
4159 pub const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.ListFlowsResponse";
4164}
4165::buffa::impl_default_instance!(ListFlowsResponse);
4166impl ::buffa::MessageName for ListFlowsResponse {
4167 const PACKAGE: &'static str = "chain.lifecycle.v1";
4168 const NAME: &'static str = "ListFlowsResponse";
4169 const FULL_NAME: &'static str = "chain.lifecycle.v1.ListFlowsResponse";
4170 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.ListFlowsResponse";
4171}
4172impl ::buffa::Message for ListFlowsResponse {
4173 #[allow(clippy::let_and_return)]
4179 fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
4180 #[allow(unused_imports)]
4181 use ::buffa::Enumeration as _;
4182 let mut size = 0u32;
4183 for v in &self.flows {
4184 let __slot = __cache.reserve();
4185 let inner_size = v.compute_size(__cache);
4186 __cache.set(__slot, inner_size);
4187 size
4188 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
4189 + inner_size;
4190 }
4191 if !self.next_page_token.is_empty() {
4192 size
4193 += 1u32
4194 + ::buffa::types::string_encoded_len(&self.next_page_token) as u32;
4195 }
4196 size += self.__buffa_unknown_fields.encoded_len() as u32;
4197 size
4198 }
4199 fn write_to(
4200 &self,
4201 __cache: &mut ::buffa::SizeCache,
4202 buf: &mut impl ::buffa::bytes::BufMut,
4203 ) {
4204 #[allow(unused_imports)]
4205 use ::buffa::Enumeration as _;
4206 for v in &self.flows {
4207 ::buffa::types::put_len_delimited_header(1u32, __cache.consume_next(), buf);
4208 v.write_to(__cache, buf);
4209 }
4210 if !self.next_page_token.is_empty() {
4211 ::buffa::types::put_string_field(2u32, &self.next_page_token, buf);
4212 }
4213 self.__buffa_unknown_fields.write_to(buf);
4214 }
4215 fn merge_field(
4216 &mut self,
4217 tag: ::buffa::encoding::Tag,
4218 buf: &mut impl ::buffa::bytes::Buf,
4219 ctx: ::buffa::DecodeContext<'_>,
4220 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
4221 #[allow(unused_imports)]
4222 use ::buffa::bytes::Buf as _;
4223 #[allow(unused_imports)]
4224 use ::buffa::Enumeration as _;
4225 match tag.field_number() {
4226 1u32 => {
4227 ::buffa::encoding::check_wire_type(
4228 tag,
4229 ::buffa::encoding::WireType::LengthDelimited,
4230 )?;
4231 let mut elem = ::core::default::Default::default();
4232 ::buffa::Message::merge_length_delimited(&mut elem, buf, ctx)?;
4233 self.flows.push(elem);
4234 }
4235 2u32 => {
4236 ::buffa::encoding::check_wire_type(
4237 tag,
4238 ::buffa::encoding::WireType::LengthDelimited,
4239 )?;
4240 ::buffa::types::merge_string(&mut self.next_page_token, buf)?;
4241 }
4242 _ => {
4243 self.__buffa_unknown_fields
4244 .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
4245 }
4246 }
4247 ::core::result::Result::Ok(())
4248 }
4249 fn clear(&mut self) {
4250 self.flows.clear();
4251 self.next_page_token.clear();
4252 self.__buffa_unknown_fields.clear();
4253 }
4254}
4255impl ::buffa::ExtensionSet for ListFlowsResponse {
4256 const PROTO_FQN: &'static str = "chain.lifecycle.v1.ListFlowsResponse";
4257 fn unknown_fields(&self) -> &::buffa::UnknownFields {
4258 &self.__buffa_unknown_fields
4259 }
4260 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
4261 &mut self.__buffa_unknown_fields
4262 }
4263}
4264impl ::buffa::json_helpers::ProtoElemJson for ListFlowsResponse {
4265 fn serialize_proto_json<S: ::serde::Serializer>(
4266 v: &Self,
4267 s: S,
4268 ) -> ::core::result::Result<S::Ok, S::Error> {
4269 ::serde::Serialize::serialize(v, s)
4270 }
4271 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
4272 d: D,
4273 ) -> ::core::result::Result<Self, D::Error> {
4274 <Self as ::serde::Deserialize>::deserialize(d)
4275 }
4276}
4277#[doc(hidden)]
4278pub const __LIST_FLOWS_RESPONSE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
4279 type_url: "type.googleapis.com/chain.lifecycle.v1.ListFlowsResponse",
4280 to_json: ::buffa::type_registry::any_to_json::<ListFlowsResponse>,
4281 from_json: ::buffa::type_registry::any_from_json::<ListFlowsResponse>,
4282 is_wkt: false,
4283};
4284#[derive(Clone, PartialEq, Default)]
4286#[derive(::serde::Serialize, ::serde::Deserialize)]
4287#[serde(default)]
4288pub struct FlowTxMatchView {
4289 #[serde(
4293 rename = "flowId",
4294 alias = "flow_id",
4295 with = "::buffa::json_helpers::proto_string",
4296 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
4297 )]
4298 pub flow_id: ::buffa::alloc::string::String,
4299 #[serde(
4303 rename = "flowKind",
4304 alias = "flow_kind",
4305 with = "::buffa::json_helpers::proto_enum",
4306 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
4307 )]
4308 pub flow_kind: ::buffa::EnumValue<FlowKind>,
4309 #[serde(
4313 rename = "sourceTxHash",
4314 alias = "source_tx_hash",
4315 with = "::buffa::json_helpers::proto_string",
4316 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
4317 )]
4318 pub source_tx_hash: ::buffa::alloc::string::String,
4319 #[serde(
4323 rename = "latestTxRef",
4324 alias = "latest_tx_ref",
4325 with = "::buffa::json_helpers::proto_string",
4326 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
4327 )]
4328 pub latest_tx_ref: ::buffa::alloc::string::String,
4329 #[serde(
4335 rename = "txOccurrenceIndex",
4336 alias = "tx_occurrence_index",
4337 with = "::buffa::json_helpers::uint64",
4338 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
4339 )]
4340 pub tx_occurrence_index: u64,
4341 #[serde(
4345 rename = "sourceDomain",
4346 alias = "source_domain",
4347 with = "::buffa::json_helpers::proto_enum",
4348 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
4349 )]
4350 pub source_domain: ::buffa::EnumValue<FlowDomain>,
4351 #[serde(
4355 rename = "destinationDomain",
4356 alias = "destination_domain",
4357 with = "::buffa::json_helpers::proto_enum",
4358 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
4359 )]
4360 pub destination_domain: ::buffa::EnumValue<FlowDomain>,
4361 #[serde(
4365 rename = "currentStep",
4366 alias = "current_step",
4367 with = "::buffa::json_helpers::proto_enum",
4368 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
4369 )]
4370 pub current_step: ::buffa::EnumValue<FlowStep>,
4371 #[serde(
4375 rename = "isOpen",
4376 alias = "is_open",
4377 with = "::buffa::json_helpers::proto_bool",
4378 skip_serializing_if = "::buffa::json_helpers::skip_if::is_false"
4379 )]
4380 pub is_open: bool,
4381 #[serde(
4385 rename = "isTerminal",
4386 alias = "is_terminal",
4387 with = "::buffa::json_helpers::proto_bool",
4388 skip_serializing_if = "::buffa::json_helpers::skip_if::is_false"
4389 )]
4390 pub is_terminal: bool,
4391 #[serde(
4395 rename = "assetIds",
4396 alias = "asset_ids",
4397 skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
4398 )]
4399 pub asset_ids: ::buffa::MessageField<AssetIds>,
4400 #[serde(
4404 rename = "polyesterChainId",
4405 alias = "polyester_chain_id",
4406 with = "::buffa::json_helpers::uint32",
4407 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
4408 )]
4409 pub polyester_chain_id: u32,
4410 #[serde(
4414 rename = "amountE18",
4415 alias = "amount_e18",
4416 skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
4417 )]
4418 pub amount_e18: ::buffa::MessageField<
4419 super::super::super::polyester::r#type::v1::U128,
4420 >,
4421 #[serde(
4425 rename = "sourceAddress",
4426 alias = "source_address",
4427 with = "::buffa::json_helpers::proto_string",
4428 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
4429 )]
4430 pub source_address: ::buffa::alloc::string::String,
4431 #[serde(
4435 rename = "destinationAddress",
4436 alias = "destination_address",
4437 with = "::buffa::json_helpers::proto_string",
4438 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
4439 )]
4440 pub destination_address: ::buffa::alloc::string::String,
4441 #[serde(
4445 rename = "lifecycleReason",
4446 alias = "lifecycle_reason",
4447 with = "::buffa::json_helpers::proto_enum",
4448 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
4449 )]
4450 pub lifecycle_reason: ::buffa::EnumValue<LifecycleReason>,
4451 #[serde(
4455 rename = "lastActivityAtUnixMs",
4456 alias = "last_activity_at_unix_ms",
4457 with = "::buffa::json_helpers::uint64",
4458 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
4459 )]
4460 pub last_activity_at_unix_ms: u64,
4461 #[serde(
4465 rename = "ownerAccountId",
4466 alias = "owner_account_id",
4467 with = "::buffa::json_helpers::uint64",
4468 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
4469 )]
4470 pub owner_account_id: u64,
4471 #[serde(
4475 rename = "smartAccountAddress",
4476 alias = "smart_account_address",
4477 with = "::buffa::json_helpers::proto_string",
4478 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
4479 )]
4480 pub smart_account_address: ::buffa::alloc::string::String,
4481 #[serde(
4485 rename = "zipperReason",
4486 alias = "zipper_reason",
4487 skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
4488 )]
4489 pub zipper_reason: ::buffa::MessageField<
4490 super::super::zipper::v1::ZipperReasonDetails,
4491 >,
4492 #[serde(skip)]
4493 #[doc(hidden)]
4494 pub __buffa_unknown_fields: ::buffa::UnknownFields,
4495}
4496impl ::core::fmt::Debug for FlowTxMatchView {
4497 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4498 f.debug_struct("FlowTxMatchView")
4499 .field("flow_id", &self.flow_id)
4500 .field("flow_kind", &self.flow_kind)
4501 .field("source_tx_hash", &self.source_tx_hash)
4502 .field("latest_tx_ref", &self.latest_tx_ref)
4503 .field("tx_occurrence_index", &self.tx_occurrence_index)
4504 .field("source_domain", &self.source_domain)
4505 .field("destination_domain", &self.destination_domain)
4506 .field("current_step", &self.current_step)
4507 .field("is_open", &self.is_open)
4508 .field("is_terminal", &self.is_terminal)
4509 .field("asset_ids", &self.asset_ids)
4510 .field("polyester_chain_id", &self.polyester_chain_id)
4511 .field("amount_e18", &self.amount_e18)
4512 .field("source_address", &self.source_address)
4513 .field("destination_address", &self.destination_address)
4514 .field("lifecycle_reason", &self.lifecycle_reason)
4515 .field("last_activity_at_unix_ms", &self.last_activity_at_unix_ms)
4516 .field("owner_account_id", &self.owner_account_id)
4517 .field("smart_account_address", &self.smart_account_address)
4518 .field("zipper_reason", &self.zipper_reason)
4519 .finish()
4520 }
4521}
4522impl FlowTxMatchView {
4523 pub const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowTxMatchView";
4528}
4529::buffa::impl_default_instance!(FlowTxMatchView);
4530impl ::buffa::MessageName for FlowTxMatchView {
4531 const PACKAGE: &'static str = "chain.lifecycle.v1";
4532 const NAME: &'static str = "FlowTxMatchView";
4533 const FULL_NAME: &'static str = "chain.lifecycle.v1.FlowTxMatchView";
4534 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowTxMatchView";
4535}
4536impl ::buffa::Message for FlowTxMatchView {
4537 #[allow(clippy::let_and_return)]
4543 fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
4544 #[allow(unused_imports)]
4545 use ::buffa::Enumeration as _;
4546 let mut size = 0u32;
4547 if !self.flow_id.is_empty() {
4548 size += 1u32 + ::buffa::types::string_encoded_len(&self.flow_id) as u32;
4549 }
4550 {
4551 let val = self.flow_kind.to_i32();
4552 if val != 0 {
4553 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
4554 }
4555 }
4556 if !self.source_tx_hash.is_empty() {
4557 size
4558 += 1u32
4559 + ::buffa::types::string_encoded_len(&self.source_tx_hash) as u32;
4560 }
4561 if !self.latest_tx_ref.is_empty() {
4562 size
4563 += 1u32 + ::buffa::types::string_encoded_len(&self.latest_tx_ref) as u32;
4564 }
4565 if self.tx_occurrence_index != 0u64 {
4566 size
4567 += 1u32
4568 + ::buffa::types::uint64_encoded_len(self.tx_occurrence_index)
4569 as u32;
4570 }
4571 {
4572 let val = self.source_domain.to_i32();
4573 if val != 0 {
4574 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
4575 }
4576 }
4577 {
4578 let val = self.destination_domain.to_i32();
4579 if val != 0 {
4580 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
4581 }
4582 }
4583 {
4584 let val = self.current_step.to_i32();
4585 if val != 0 {
4586 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
4587 }
4588 }
4589 if self.is_open {
4590 size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
4591 }
4592 if self.is_terminal {
4593 size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
4594 }
4595 if self.asset_ids.is_set() {
4596 let __slot = __cache.reserve();
4597 let inner_size = self.asset_ids.compute_size(__cache);
4598 __cache.set(__slot, inner_size);
4599 size
4600 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
4601 + inner_size;
4602 }
4603 if self.polyester_chain_id != 0u32 {
4604 size
4605 += 1u32
4606 + ::buffa::types::uint32_encoded_len(self.polyester_chain_id) as u32;
4607 }
4608 if self.amount_e18.is_set() {
4609 let __slot = __cache.reserve();
4610 let inner_size = self.amount_e18.compute_size(__cache);
4611 __cache.set(__slot, inner_size);
4612 size
4613 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
4614 + inner_size;
4615 }
4616 if !self.source_address.is_empty() {
4617 size
4618 += 1u32
4619 + ::buffa::types::string_encoded_len(&self.source_address) as u32;
4620 }
4621 if !self.destination_address.is_empty() {
4622 size
4623 += 2u32
4624 + ::buffa::types::string_encoded_len(&self.destination_address)
4625 as u32;
4626 }
4627 {
4628 let val = self.lifecycle_reason.to_i32();
4629 if val != 0 {
4630 size += 2u32 + ::buffa::types::int32_encoded_len(val) as u32;
4631 }
4632 }
4633 if self.last_activity_at_unix_ms != 0u64 {
4634 size
4635 += 2u32
4636 + ::buffa::types::uint64_encoded_len(self.last_activity_at_unix_ms)
4637 as u32;
4638 }
4639 if self.owner_account_id != 0u64 {
4640 size += 2u32 + ::buffa::types::FIXED64_ENCODED_LEN as u32;
4641 }
4642 if !self.smart_account_address.is_empty() {
4643 size
4644 += 2u32
4645 + ::buffa::types::string_encoded_len(&self.smart_account_address)
4646 as u32;
4647 }
4648 if self.zipper_reason.is_set() {
4649 let __slot = __cache.reserve();
4650 let inner_size = self.zipper_reason.compute_size(__cache);
4651 __cache.set(__slot, inner_size);
4652 size
4653 += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
4654 + inner_size;
4655 }
4656 size += self.__buffa_unknown_fields.encoded_len() as u32;
4657 size
4658 }
4659 fn write_to(
4660 &self,
4661 __cache: &mut ::buffa::SizeCache,
4662 buf: &mut impl ::buffa::bytes::BufMut,
4663 ) {
4664 #[allow(unused_imports)]
4665 use ::buffa::Enumeration as _;
4666 if !self.flow_id.is_empty() {
4667 ::buffa::types::put_string_field(1u32, &self.flow_id, buf);
4668 }
4669 {
4670 let val = self.flow_kind.to_i32();
4671 if val != 0 {
4672 ::buffa::types::put_int32_field(3u32, val, buf);
4673 }
4674 }
4675 if !self.source_tx_hash.is_empty() {
4676 ::buffa::types::put_string_field(4u32, &self.source_tx_hash, buf);
4677 }
4678 if !self.latest_tx_ref.is_empty() {
4679 ::buffa::types::put_string_field(5u32, &self.latest_tx_ref, buf);
4680 }
4681 if self.tx_occurrence_index != 0u64 {
4682 ::buffa::types::put_uint64_field(6u32, self.tx_occurrence_index, buf);
4683 }
4684 {
4685 let val = self.source_domain.to_i32();
4686 if val != 0 {
4687 ::buffa::types::put_int32_field(7u32, val, buf);
4688 }
4689 }
4690 {
4691 let val = self.destination_domain.to_i32();
4692 if val != 0 {
4693 ::buffa::types::put_int32_field(8u32, val, buf);
4694 }
4695 }
4696 {
4697 let val = self.current_step.to_i32();
4698 if val != 0 {
4699 ::buffa::types::put_int32_field(9u32, val, buf);
4700 }
4701 }
4702 if self.is_open {
4703 ::buffa::types::put_bool_field(10u32, self.is_open, buf);
4704 }
4705 if self.is_terminal {
4706 ::buffa::types::put_bool_field(11u32, self.is_terminal, buf);
4707 }
4708 if self.asset_ids.is_set() {
4709 ::buffa::types::put_len_delimited_header(12u32, __cache.consume_next(), buf);
4710 self.asset_ids.write_to(__cache, buf);
4711 }
4712 if self.polyester_chain_id != 0u32 {
4713 ::buffa::types::put_uint32_field(13u32, self.polyester_chain_id, buf);
4714 }
4715 if self.amount_e18.is_set() {
4716 ::buffa::types::put_len_delimited_header(14u32, __cache.consume_next(), buf);
4717 self.amount_e18.write_to(__cache, buf);
4718 }
4719 if !self.source_address.is_empty() {
4720 ::buffa::types::put_string_field(15u32, &self.source_address, buf);
4721 }
4722 if !self.destination_address.is_empty() {
4723 ::buffa::types::put_string_field(16u32, &self.destination_address, buf);
4724 }
4725 {
4726 let val = self.lifecycle_reason.to_i32();
4727 if val != 0 {
4728 ::buffa::types::put_int32_field(17u32, val, buf);
4729 }
4730 }
4731 if self.last_activity_at_unix_ms != 0u64 {
4732 ::buffa::types::put_uint64_field(18u32, self.last_activity_at_unix_ms, buf);
4733 }
4734 if self.owner_account_id != 0u64 {
4735 ::buffa::types::put_fixed64_field(19u32, self.owner_account_id, buf);
4736 }
4737 if !self.smart_account_address.is_empty() {
4738 ::buffa::types::put_string_field(20u32, &self.smart_account_address, buf);
4739 }
4740 if self.zipper_reason.is_set() {
4741 ::buffa::types::put_len_delimited_header(21u32, __cache.consume_next(), buf);
4742 self.zipper_reason.write_to(__cache, buf);
4743 }
4744 self.__buffa_unknown_fields.write_to(buf);
4745 }
4746 fn merge_field(
4747 &mut self,
4748 tag: ::buffa::encoding::Tag,
4749 buf: &mut impl ::buffa::bytes::Buf,
4750 ctx: ::buffa::DecodeContext<'_>,
4751 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
4752 #[allow(unused_imports)]
4753 use ::buffa::bytes::Buf as _;
4754 #[allow(unused_imports)]
4755 use ::buffa::Enumeration as _;
4756 match tag.field_number() {
4757 1u32 => {
4758 ::buffa::encoding::check_wire_type(
4759 tag,
4760 ::buffa::encoding::WireType::LengthDelimited,
4761 )?;
4762 ::buffa::types::merge_string(&mut self.flow_id, buf)?;
4763 }
4764 3u32 => {
4765 ::buffa::encoding::check_wire_type(
4766 tag,
4767 ::buffa::encoding::WireType::Varint,
4768 )?;
4769 self.flow_kind = ::buffa::EnumValue::from(
4770 ::buffa::types::decode_int32(buf)?,
4771 );
4772 }
4773 4u32 => {
4774 ::buffa::encoding::check_wire_type(
4775 tag,
4776 ::buffa::encoding::WireType::LengthDelimited,
4777 )?;
4778 ::buffa::types::merge_string(&mut self.source_tx_hash, buf)?;
4779 }
4780 5u32 => {
4781 ::buffa::encoding::check_wire_type(
4782 tag,
4783 ::buffa::encoding::WireType::LengthDelimited,
4784 )?;
4785 ::buffa::types::merge_string(&mut self.latest_tx_ref, buf)?;
4786 }
4787 6u32 => {
4788 ::buffa::encoding::check_wire_type(
4789 tag,
4790 ::buffa::encoding::WireType::Varint,
4791 )?;
4792 self.tx_occurrence_index = ::buffa::types::decode_uint64(buf)?;
4793 }
4794 7u32 => {
4795 ::buffa::encoding::check_wire_type(
4796 tag,
4797 ::buffa::encoding::WireType::Varint,
4798 )?;
4799 self.source_domain = ::buffa::EnumValue::from(
4800 ::buffa::types::decode_int32(buf)?,
4801 );
4802 }
4803 8u32 => {
4804 ::buffa::encoding::check_wire_type(
4805 tag,
4806 ::buffa::encoding::WireType::Varint,
4807 )?;
4808 self.destination_domain = ::buffa::EnumValue::from(
4809 ::buffa::types::decode_int32(buf)?,
4810 );
4811 }
4812 9u32 => {
4813 ::buffa::encoding::check_wire_type(
4814 tag,
4815 ::buffa::encoding::WireType::Varint,
4816 )?;
4817 self.current_step = ::buffa::EnumValue::from(
4818 ::buffa::types::decode_int32(buf)?,
4819 );
4820 }
4821 10u32 => {
4822 ::buffa::encoding::check_wire_type(
4823 tag,
4824 ::buffa::encoding::WireType::Varint,
4825 )?;
4826 self.is_open = ::buffa::types::decode_bool(buf)?;
4827 }
4828 11u32 => {
4829 ::buffa::encoding::check_wire_type(
4830 tag,
4831 ::buffa::encoding::WireType::Varint,
4832 )?;
4833 self.is_terminal = ::buffa::types::decode_bool(buf)?;
4834 }
4835 12u32 => {
4836 ::buffa::encoding::check_wire_type(
4837 tag,
4838 ::buffa::encoding::WireType::LengthDelimited,
4839 )?;
4840 ::buffa::Message::merge_length_delimited(
4841 self.asset_ids.get_or_insert_default(),
4842 buf,
4843 ctx,
4844 )?;
4845 }
4846 13u32 => {
4847 ::buffa::encoding::check_wire_type(
4848 tag,
4849 ::buffa::encoding::WireType::Varint,
4850 )?;
4851 self.polyester_chain_id = ::buffa::types::decode_uint32(buf)?;
4852 }
4853 14u32 => {
4854 ::buffa::encoding::check_wire_type(
4855 tag,
4856 ::buffa::encoding::WireType::LengthDelimited,
4857 )?;
4858 ::buffa::Message::merge_length_delimited(
4859 self.amount_e18.get_or_insert_default(),
4860 buf,
4861 ctx,
4862 )?;
4863 }
4864 15u32 => {
4865 ::buffa::encoding::check_wire_type(
4866 tag,
4867 ::buffa::encoding::WireType::LengthDelimited,
4868 )?;
4869 ::buffa::types::merge_string(&mut self.source_address, buf)?;
4870 }
4871 16u32 => {
4872 ::buffa::encoding::check_wire_type(
4873 tag,
4874 ::buffa::encoding::WireType::LengthDelimited,
4875 )?;
4876 ::buffa::types::merge_string(&mut self.destination_address, buf)?;
4877 }
4878 17u32 => {
4879 ::buffa::encoding::check_wire_type(
4880 tag,
4881 ::buffa::encoding::WireType::Varint,
4882 )?;
4883 self.lifecycle_reason = ::buffa::EnumValue::from(
4884 ::buffa::types::decode_int32(buf)?,
4885 );
4886 }
4887 18u32 => {
4888 ::buffa::encoding::check_wire_type(
4889 tag,
4890 ::buffa::encoding::WireType::Varint,
4891 )?;
4892 self.last_activity_at_unix_ms = ::buffa::types::decode_uint64(buf)?;
4893 }
4894 19u32 => {
4895 ::buffa::encoding::check_wire_type(
4896 tag,
4897 ::buffa::encoding::WireType::Fixed64,
4898 )?;
4899 self.owner_account_id = ::buffa::types::decode_fixed64(buf)?;
4900 }
4901 20u32 => {
4902 ::buffa::encoding::check_wire_type(
4903 tag,
4904 ::buffa::encoding::WireType::LengthDelimited,
4905 )?;
4906 ::buffa::types::merge_string(&mut self.smart_account_address, buf)?;
4907 }
4908 21u32 => {
4909 ::buffa::encoding::check_wire_type(
4910 tag,
4911 ::buffa::encoding::WireType::LengthDelimited,
4912 )?;
4913 ::buffa::Message::merge_length_delimited(
4914 self.zipper_reason.get_or_insert_default(),
4915 buf,
4916 ctx,
4917 )?;
4918 }
4919 _ => {
4920 self.__buffa_unknown_fields
4921 .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
4922 }
4923 }
4924 ::core::result::Result::Ok(())
4925 }
4926 fn clear(&mut self) {
4927 self.flow_id.clear();
4928 self.flow_kind = ::buffa::EnumValue::from(0);
4929 self.source_tx_hash.clear();
4930 self.latest_tx_ref.clear();
4931 self.tx_occurrence_index = 0u64;
4932 self.source_domain = ::buffa::EnumValue::from(0);
4933 self.destination_domain = ::buffa::EnumValue::from(0);
4934 self.current_step = ::buffa::EnumValue::from(0);
4935 self.is_open = false;
4936 self.is_terminal = false;
4937 self.asset_ids = ::buffa::MessageField::none();
4938 self.polyester_chain_id = 0u32;
4939 self.amount_e18 = ::buffa::MessageField::none();
4940 self.source_address.clear();
4941 self.destination_address.clear();
4942 self.lifecycle_reason = ::buffa::EnumValue::from(0);
4943 self.last_activity_at_unix_ms = 0u64;
4944 self.owner_account_id = 0u64;
4945 self.smart_account_address.clear();
4946 self.zipper_reason = ::buffa::MessageField::none();
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#[derive(Clone, PartialEq, Default)]
4982#[derive(::serde::Serialize, ::serde::Deserialize)]
4983#[serde(default)]
4984pub struct ListFlowsByTxResponse {
4985 #[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 #[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 #[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 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 #[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#[derive(Clone, PartialEq, Default)]
5171#[derive(::serde::Serialize, ::serde::Deserialize)]
5172#[serde(default)]
5173pub struct FlowSummaryView {
5174 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[serde(
5361 rename = "lifecycleReason",
5362 alias = "lifecycle_reason",
5363 with = "::buffa::json_helpers::proto_enum",
5364 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
5365 )]
5366 pub lifecycle_reason: ::buffa::EnumValue<LifecycleReason>,
5367 #[serde(
5371 rename = "zipperReason",
5372 alias = "zipper_reason",
5373 skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
5374 )]
5375 pub zipper_reason: ::buffa::MessageField<
5376 super::super::zipper::v1::ZipperReasonDetails,
5377 >,
5378 #[serde(
5382 rename = "startedAtUnixMs",
5383 alias = "started_at_unix_ms",
5384 with = "::buffa::json_helpers::uint64",
5385 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
5386 )]
5387 pub started_at_unix_ms: u64,
5388 #[serde(
5392 rename = "updatedAtUnixMs",
5393 alias = "updated_at_unix_ms",
5394 with = "::buffa::json_helpers::uint64",
5395 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
5396 )]
5397 pub updated_at_unix_ms: u64,
5398 #[serde(
5402 rename = "terminalAtUnixMs",
5403 alias = "terminal_at_unix_ms",
5404 with = "::buffa::json_helpers::uint64",
5405 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
5406 )]
5407 pub terminal_at_unix_ms: u64,
5408 #[serde(
5412 rename = "lastActivityAtUnixMs",
5413 alias = "last_activity_at_unix_ms",
5414 with = "::buffa::json_helpers::uint64",
5415 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
5416 )]
5417 pub last_activity_at_unix_ms: u64,
5418 #[serde(
5422 rename = "isOpen",
5423 alias = "is_open",
5424 with = "::buffa::json_helpers::proto_bool",
5425 skip_serializing_if = "::buffa::json_helpers::skip_if::is_false"
5426 )]
5427 pub is_open: bool,
5428 #[serde(
5432 rename = "isTerminal",
5433 alias = "is_terminal",
5434 with = "::buffa::json_helpers::proto_bool",
5435 skip_serializing_if = "::buffa::json_helpers::skip_if::is_false"
5436 )]
5437 pub is_terminal: bool,
5438 #[serde(
5442 rename = "currentStepSequence",
5443 alias = "current_step_sequence",
5444 with = "::buffa::json_helpers::uint32",
5445 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
5446 )]
5447 pub current_step_sequence: u32,
5448 #[serde(
5452 rename = "currentProgress",
5453 alias = "current_progress",
5454 skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
5455 )]
5456 pub current_progress: ::buffa::MessageField<FlowSummaryProgressView>,
5457 #[serde(
5462 rename = "progressTimeline",
5463 alias = "progress_timeline",
5464 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
5465 deserialize_with = "::buffa::json_helpers::null_as_default"
5466 )]
5467 pub progress_timeline: ::buffa::alloc::vec::Vec<FlowTimelineItemView>,
5468 #[serde(
5472 rename = "estimatedCompletionUnixMs",
5473 alias = "estimated_completion_unix_ms",
5474 with = "::buffa::json_helpers::uint64",
5475 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
5476 )]
5477 pub estimated_completion_unix_ms: u64,
5478 #[serde(skip)]
5479 #[doc(hidden)]
5480 pub __buffa_unknown_fields: ::buffa::UnknownFields,
5481}
5482impl ::core::fmt::Debug for FlowSummaryView {
5483 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
5484 f.debug_struct("FlowSummaryView")
5485 .field("owner_account_id", &self.owner_account_id)
5486 .field("smart_account_address", &self.smart_account_address)
5487 .field("flow_id", &self.flow_id)
5488 .field("flow_kind", &self.flow_kind)
5489 .field("current_step", &self.current_step)
5490 .field("asset_ids", &self.asset_ids)
5491 .field("polyester_chain_id", &self.polyester_chain_id)
5492 .field("amount_e18", &self.amount_e18)
5493 .field("request_fee", &self.request_fee)
5494 .field("source_tx_hash", &self.source_tx_hash)
5495 .field("tx_occurrence_index", &self.tx_occurrence_index)
5496 .field("source_address", &self.source_address)
5497 .field("destination_address", &self.destination_address)
5498 .field("latest_tx_ref", &self.latest_tx_ref)
5499 .field("source_domain", &self.source_domain)
5500 .field("destination_domain", &self.destination_domain)
5501 .field("latest_lifecycle_source", &self.latest_lifecycle_source)
5502 .field("lifecycle_reason", &self.lifecycle_reason)
5503 .field("zipper_reason", &self.zipper_reason)
5504 .field("started_at_unix_ms", &self.started_at_unix_ms)
5505 .field("updated_at_unix_ms", &self.updated_at_unix_ms)
5506 .field("terminal_at_unix_ms", &self.terminal_at_unix_ms)
5507 .field("last_activity_at_unix_ms", &self.last_activity_at_unix_ms)
5508 .field("is_open", &self.is_open)
5509 .field("is_terminal", &self.is_terminal)
5510 .field("current_step_sequence", &self.current_step_sequence)
5511 .field("current_progress", &self.current_progress)
5512 .field("progress_timeline", &self.progress_timeline)
5513 .field("estimated_completion_unix_ms", &self.estimated_completion_unix_ms)
5514 .finish()
5515 }
5516}
5517impl FlowSummaryView {
5518 pub const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowSummaryView";
5523}
5524::buffa::impl_default_instance!(FlowSummaryView);
5525impl ::buffa::MessageName for FlowSummaryView {
5526 const PACKAGE: &'static str = "chain.lifecycle.v1";
5527 const NAME: &'static str = "FlowSummaryView";
5528 const FULL_NAME: &'static str = "chain.lifecycle.v1.FlowSummaryView";
5529 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowSummaryView";
5530}
5531impl ::buffa::Message for FlowSummaryView {
5532 #[allow(clippy::let_and_return)]
5538 fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
5539 #[allow(unused_imports)]
5540 use ::buffa::Enumeration as _;
5541 let mut size = 0u32;
5542 if self.owner_account_id != 0u64 {
5543 size += 1u32 + ::buffa::types::FIXED64_ENCODED_LEN as u32;
5544 }
5545 {
5546 let val = self.flow_kind.to_i32();
5547 if val != 0 {
5548 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
5549 }
5550 }
5551 {
5552 let val = self.current_step.to_i32();
5553 if val != 0 {
5554 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
5555 }
5556 }
5557 if self.asset_ids.is_set() {
5558 let __slot = __cache.reserve();
5559 let inner_size = self.asset_ids.compute_size(__cache);
5560 __cache.set(__slot, inner_size);
5561 size
5562 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
5563 + inner_size;
5564 }
5565 if self.polyester_chain_id != 0u32 {
5566 size
5567 += 1u32
5568 + ::buffa::types::uint32_encoded_len(self.polyester_chain_id) as u32;
5569 }
5570 if self.amount_e18.is_set() {
5571 let __slot = __cache.reserve();
5572 let inner_size = self.amount_e18.compute_size(__cache);
5573 __cache.set(__slot, inner_size);
5574 size
5575 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
5576 + inner_size;
5577 }
5578 if !self.source_tx_hash.is_empty() {
5579 size
5580 += 1u32
5581 + ::buffa::types::string_encoded_len(&self.source_tx_hash) as u32;
5582 }
5583 if !self.source_address.is_empty() {
5584 size
5585 += 1u32
5586 + ::buffa::types::string_encoded_len(&self.source_address) as u32;
5587 }
5588 if !self.destination_address.is_empty() {
5589 size
5590 += 1u32
5591 + ::buffa::types::string_encoded_len(&self.destination_address)
5592 as u32;
5593 }
5594 if !self.latest_tx_ref.is_empty() {
5595 size
5596 += 1u32 + ::buffa::types::string_encoded_len(&self.latest_tx_ref) as u32;
5597 }
5598 {
5599 let val = self.latest_lifecycle_source.to_i32();
5600 if val != 0 {
5601 size += 2u32 + ::buffa::types::int32_encoded_len(val) as u32;
5602 }
5603 }
5604 {
5605 let val = self.lifecycle_reason.to_i32();
5606 if val != 0 {
5607 size += 2u32 + ::buffa::types::int32_encoded_len(val) as u32;
5608 }
5609 }
5610 if self.started_at_unix_ms != 0u64 {
5611 size
5612 += 2u32
5613 + ::buffa::types::uint64_encoded_len(self.started_at_unix_ms) as u32;
5614 }
5615 if self.updated_at_unix_ms != 0u64 {
5616 size
5617 += 2u32
5618 + ::buffa::types::uint64_encoded_len(self.updated_at_unix_ms) as u32;
5619 }
5620 if self.terminal_at_unix_ms != 0u64 {
5621 size
5622 += 2u32
5623 + ::buffa::types::uint64_encoded_len(self.terminal_at_unix_ms)
5624 as u32;
5625 }
5626 if self.last_activity_at_unix_ms != 0u64 {
5627 size
5628 += 2u32
5629 + ::buffa::types::uint64_encoded_len(self.last_activity_at_unix_ms)
5630 as u32;
5631 }
5632 if self.is_open {
5633 size += 2u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
5634 }
5635 if self.is_terminal {
5636 size += 2u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
5637 }
5638 if self.current_step_sequence != 0u32 {
5639 size
5640 += 2u32
5641 + ::buffa::types::uint32_encoded_len(self.current_step_sequence)
5642 as u32;
5643 }
5644 if self.current_progress.is_set() {
5645 let __slot = __cache.reserve();
5646 let inner_size = self.current_progress.compute_size(__cache);
5647 __cache.set(__slot, inner_size);
5648 size
5649 += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
5650 + inner_size;
5651 }
5652 for v in &self.progress_timeline {
5653 let __slot = __cache.reserve();
5654 let inner_size = v.compute_size(__cache);
5655 __cache.set(__slot, inner_size);
5656 size
5657 += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
5658 + inner_size;
5659 }
5660 if self.estimated_completion_unix_ms != 0u64 {
5661 size
5662 += 2u32
5663 + ::buffa::types::uint64_encoded_len(
5664 self.estimated_completion_unix_ms,
5665 ) as u32;
5666 }
5667 if self.request_fee.is_set() {
5668 let __slot = __cache.reserve();
5669 let inner_size = self.request_fee.compute_size(__cache);
5670 __cache.set(__slot, inner_size);
5671 size
5672 += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
5673 + inner_size;
5674 }
5675 {
5676 let val = self.source_domain.to_i32();
5677 if val != 0 {
5678 size += 2u32 + ::buffa::types::int32_encoded_len(val) as u32;
5679 }
5680 }
5681 {
5682 let val = self.destination_domain.to_i32();
5683 if val != 0 {
5684 size += 2u32 + ::buffa::types::int32_encoded_len(val) as u32;
5685 }
5686 }
5687 if self.tx_occurrence_index != 0u64 {
5688 size
5689 += 2u32
5690 + ::buffa::types::uint64_encoded_len(self.tx_occurrence_index)
5691 as u32;
5692 }
5693 if !self.flow_id.is_empty() {
5694 size += 2u32 + ::buffa::types::string_encoded_len(&self.flow_id) as u32;
5695 }
5696 if !self.smart_account_address.is_empty() {
5697 size
5698 += 2u32
5699 + ::buffa::types::string_encoded_len(&self.smart_account_address)
5700 as u32;
5701 }
5702 if self.zipper_reason.is_set() {
5703 let __slot = __cache.reserve();
5704 let inner_size = self.zipper_reason.compute_size(__cache);
5705 __cache.set(__slot, inner_size);
5706 size
5707 += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
5708 + inner_size;
5709 }
5710 size += self.__buffa_unknown_fields.encoded_len() as u32;
5711 size
5712 }
5713 fn write_to(
5714 &self,
5715 __cache: &mut ::buffa::SizeCache,
5716 buf: &mut impl ::buffa::bytes::BufMut,
5717 ) {
5718 #[allow(unused_imports)]
5719 use ::buffa::Enumeration as _;
5720 if self.owner_account_id != 0u64 {
5721 ::buffa::types::put_fixed64_field(1u32, self.owner_account_id, buf);
5722 }
5723 {
5724 let val = self.flow_kind.to_i32();
5725 if val != 0 {
5726 ::buffa::types::put_int32_field(4u32, val, buf);
5727 }
5728 }
5729 {
5730 let val = self.current_step.to_i32();
5731 if val != 0 {
5732 ::buffa::types::put_int32_field(6u32, val, buf);
5733 }
5734 }
5735 if self.asset_ids.is_set() {
5736 ::buffa::types::put_len_delimited_header(7u32, __cache.consume_next(), buf);
5737 self.asset_ids.write_to(__cache, buf);
5738 }
5739 if self.polyester_chain_id != 0u32 {
5740 ::buffa::types::put_uint32_field(8u32, self.polyester_chain_id, buf);
5741 }
5742 if self.amount_e18.is_set() {
5743 ::buffa::types::put_len_delimited_header(9u32, __cache.consume_next(), buf);
5744 self.amount_e18.write_to(__cache, buf);
5745 }
5746 if !self.source_tx_hash.is_empty() {
5747 ::buffa::types::put_string_field(11u32, &self.source_tx_hash, buf);
5748 }
5749 if !self.source_address.is_empty() {
5750 ::buffa::types::put_string_field(13u32, &self.source_address, buf);
5751 }
5752 if !self.destination_address.is_empty() {
5753 ::buffa::types::put_string_field(14u32, &self.destination_address, buf);
5754 }
5755 if !self.latest_tx_ref.is_empty() {
5756 ::buffa::types::put_string_field(15u32, &self.latest_tx_ref, buf);
5757 }
5758 {
5759 let val = self.latest_lifecycle_source.to_i32();
5760 if val != 0 {
5761 ::buffa::types::put_int32_field(16u32, val, buf);
5762 }
5763 }
5764 {
5765 let val = self.lifecycle_reason.to_i32();
5766 if val != 0 {
5767 ::buffa::types::put_int32_field(17u32, val, buf);
5768 }
5769 }
5770 if self.started_at_unix_ms != 0u64 {
5771 ::buffa::types::put_uint64_field(18u32, self.started_at_unix_ms, buf);
5772 }
5773 if self.updated_at_unix_ms != 0u64 {
5774 ::buffa::types::put_uint64_field(19u32, self.updated_at_unix_ms, buf);
5775 }
5776 if self.terminal_at_unix_ms != 0u64 {
5777 ::buffa::types::put_uint64_field(20u32, self.terminal_at_unix_ms, buf);
5778 }
5779 if self.last_activity_at_unix_ms != 0u64 {
5780 ::buffa::types::put_uint64_field(21u32, self.last_activity_at_unix_ms, buf);
5781 }
5782 if self.is_open {
5783 ::buffa::types::put_bool_field(22u32, self.is_open, buf);
5784 }
5785 if self.is_terminal {
5786 ::buffa::types::put_bool_field(23u32, self.is_terminal, buf);
5787 }
5788 if self.current_step_sequence != 0u32 {
5789 ::buffa::types::put_uint32_field(24u32, self.current_step_sequence, buf);
5790 }
5791 if self.current_progress.is_set() {
5792 ::buffa::types::put_len_delimited_header(25u32, __cache.consume_next(), buf);
5793 self.current_progress.write_to(__cache, buf);
5794 }
5795 for v in &self.progress_timeline {
5796 ::buffa::types::put_len_delimited_header(26u32, __cache.consume_next(), buf);
5797 v.write_to(__cache, buf);
5798 }
5799 if self.estimated_completion_unix_ms != 0u64 {
5800 ::buffa::types::put_uint64_field(
5801 27u32,
5802 self.estimated_completion_unix_ms,
5803 buf,
5804 );
5805 }
5806 if self.request_fee.is_set() {
5807 ::buffa::types::put_len_delimited_header(28u32, __cache.consume_next(), buf);
5808 self.request_fee.write_to(__cache, buf);
5809 }
5810 {
5811 let val = self.source_domain.to_i32();
5812 if val != 0 {
5813 ::buffa::types::put_int32_field(29u32, val, buf);
5814 }
5815 }
5816 {
5817 let val = self.destination_domain.to_i32();
5818 if val != 0 {
5819 ::buffa::types::put_int32_field(30u32, val, buf);
5820 }
5821 }
5822 if self.tx_occurrence_index != 0u64 {
5823 ::buffa::types::put_uint64_field(32u32, self.tx_occurrence_index, buf);
5824 }
5825 if !self.flow_id.is_empty() {
5826 ::buffa::types::put_string_field(33u32, &self.flow_id, buf);
5827 }
5828 if !self.smart_account_address.is_empty() {
5829 ::buffa::types::put_string_field(34u32, &self.smart_account_address, buf);
5830 }
5831 if self.zipper_reason.is_set() {
5832 ::buffa::types::put_len_delimited_header(35u32, __cache.consume_next(), buf);
5833 self.zipper_reason.write_to(__cache, buf);
5834 }
5835 self.__buffa_unknown_fields.write_to(buf);
5836 }
5837 fn merge_field(
5838 &mut self,
5839 tag: ::buffa::encoding::Tag,
5840 buf: &mut impl ::buffa::bytes::Buf,
5841 ctx: ::buffa::DecodeContext<'_>,
5842 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
5843 #[allow(unused_imports)]
5844 use ::buffa::bytes::Buf as _;
5845 #[allow(unused_imports)]
5846 use ::buffa::Enumeration as _;
5847 match tag.field_number() {
5848 1u32 => {
5849 ::buffa::encoding::check_wire_type(
5850 tag,
5851 ::buffa::encoding::WireType::Fixed64,
5852 )?;
5853 self.owner_account_id = ::buffa::types::decode_fixed64(buf)?;
5854 }
5855 4u32 => {
5856 ::buffa::encoding::check_wire_type(
5857 tag,
5858 ::buffa::encoding::WireType::Varint,
5859 )?;
5860 self.flow_kind = ::buffa::EnumValue::from(
5861 ::buffa::types::decode_int32(buf)?,
5862 );
5863 }
5864 6u32 => {
5865 ::buffa::encoding::check_wire_type(
5866 tag,
5867 ::buffa::encoding::WireType::Varint,
5868 )?;
5869 self.current_step = ::buffa::EnumValue::from(
5870 ::buffa::types::decode_int32(buf)?,
5871 );
5872 }
5873 7u32 => {
5874 ::buffa::encoding::check_wire_type(
5875 tag,
5876 ::buffa::encoding::WireType::LengthDelimited,
5877 )?;
5878 ::buffa::Message::merge_length_delimited(
5879 self.asset_ids.get_or_insert_default(),
5880 buf,
5881 ctx,
5882 )?;
5883 }
5884 8u32 => {
5885 ::buffa::encoding::check_wire_type(
5886 tag,
5887 ::buffa::encoding::WireType::Varint,
5888 )?;
5889 self.polyester_chain_id = ::buffa::types::decode_uint32(buf)?;
5890 }
5891 9u32 => {
5892 ::buffa::encoding::check_wire_type(
5893 tag,
5894 ::buffa::encoding::WireType::LengthDelimited,
5895 )?;
5896 ::buffa::Message::merge_length_delimited(
5897 self.amount_e18.get_or_insert_default(),
5898 buf,
5899 ctx,
5900 )?;
5901 }
5902 11u32 => {
5903 ::buffa::encoding::check_wire_type(
5904 tag,
5905 ::buffa::encoding::WireType::LengthDelimited,
5906 )?;
5907 ::buffa::types::merge_string(&mut self.source_tx_hash, buf)?;
5908 }
5909 13u32 => {
5910 ::buffa::encoding::check_wire_type(
5911 tag,
5912 ::buffa::encoding::WireType::LengthDelimited,
5913 )?;
5914 ::buffa::types::merge_string(&mut self.source_address, buf)?;
5915 }
5916 14u32 => {
5917 ::buffa::encoding::check_wire_type(
5918 tag,
5919 ::buffa::encoding::WireType::LengthDelimited,
5920 )?;
5921 ::buffa::types::merge_string(&mut self.destination_address, buf)?;
5922 }
5923 15u32 => {
5924 ::buffa::encoding::check_wire_type(
5925 tag,
5926 ::buffa::encoding::WireType::LengthDelimited,
5927 )?;
5928 ::buffa::types::merge_string(&mut self.latest_tx_ref, buf)?;
5929 }
5930 16u32 => {
5931 ::buffa::encoding::check_wire_type(
5932 tag,
5933 ::buffa::encoding::WireType::Varint,
5934 )?;
5935 self.latest_lifecycle_source = ::buffa::EnumValue::from(
5936 ::buffa::types::decode_int32(buf)?,
5937 );
5938 }
5939 17u32 => {
5940 ::buffa::encoding::check_wire_type(
5941 tag,
5942 ::buffa::encoding::WireType::Varint,
5943 )?;
5944 self.lifecycle_reason = ::buffa::EnumValue::from(
5945 ::buffa::types::decode_int32(buf)?,
5946 );
5947 }
5948 18u32 => {
5949 ::buffa::encoding::check_wire_type(
5950 tag,
5951 ::buffa::encoding::WireType::Varint,
5952 )?;
5953 self.started_at_unix_ms = ::buffa::types::decode_uint64(buf)?;
5954 }
5955 19u32 => {
5956 ::buffa::encoding::check_wire_type(
5957 tag,
5958 ::buffa::encoding::WireType::Varint,
5959 )?;
5960 self.updated_at_unix_ms = ::buffa::types::decode_uint64(buf)?;
5961 }
5962 20u32 => {
5963 ::buffa::encoding::check_wire_type(
5964 tag,
5965 ::buffa::encoding::WireType::Varint,
5966 )?;
5967 self.terminal_at_unix_ms = ::buffa::types::decode_uint64(buf)?;
5968 }
5969 21u32 => {
5970 ::buffa::encoding::check_wire_type(
5971 tag,
5972 ::buffa::encoding::WireType::Varint,
5973 )?;
5974 self.last_activity_at_unix_ms = ::buffa::types::decode_uint64(buf)?;
5975 }
5976 22u32 => {
5977 ::buffa::encoding::check_wire_type(
5978 tag,
5979 ::buffa::encoding::WireType::Varint,
5980 )?;
5981 self.is_open = ::buffa::types::decode_bool(buf)?;
5982 }
5983 23u32 => {
5984 ::buffa::encoding::check_wire_type(
5985 tag,
5986 ::buffa::encoding::WireType::Varint,
5987 )?;
5988 self.is_terminal = ::buffa::types::decode_bool(buf)?;
5989 }
5990 24u32 => {
5991 ::buffa::encoding::check_wire_type(
5992 tag,
5993 ::buffa::encoding::WireType::Varint,
5994 )?;
5995 self.current_step_sequence = ::buffa::types::decode_uint32(buf)?;
5996 }
5997 25u32 => {
5998 ::buffa::encoding::check_wire_type(
5999 tag,
6000 ::buffa::encoding::WireType::LengthDelimited,
6001 )?;
6002 ::buffa::Message::merge_length_delimited(
6003 self.current_progress.get_or_insert_default(),
6004 buf,
6005 ctx,
6006 )?;
6007 }
6008 26u32 => {
6009 ::buffa::encoding::check_wire_type(
6010 tag,
6011 ::buffa::encoding::WireType::LengthDelimited,
6012 )?;
6013 let mut elem = ::core::default::Default::default();
6014 ::buffa::Message::merge_length_delimited(&mut elem, buf, ctx)?;
6015 self.progress_timeline.push(elem);
6016 }
6017 27u32 => {
6018 ::buffa::encoding::check_wire_type(
6019 tag,
6020 ::buffa::encoding::WireType::Varint,
6021 )?;
6022 self.estimated_completion_unix_ms = ::buffa::types::decode_uint64(buf)?;
6023 }
6024 28u32 => {
6025 ::buffa::encoding::check_wire_type(
6026 tag,
6027 ::buffa::encoding::WireType::LengthDelimited,
6028 )?;
6029 ::buffa::Message::merge_length_delimited(
6030 self.request_fee.get_or_insert_default(),
6031 buf,
6032 ctx,
6033 )?;
6034 }
6035 29u32 => {
6036 ::buffa::encoding::check_wire_type(
6037 tag,
6038 ::buffa::encoding::WireType::Varint,
6039 )?;
6040 self.source_domain = ::buffa::EnumValue::from(
6041 ::buffa::types::decode_int32(buf)?,
6042 );
6043 }
6044 30u32 => {
6045 ::buffa::encoding::check_wire_type(
6046 tag,
6047 ::buffa::encoding::WireType::Varint,
6048 )?;
6049 self.destination_domain = ::buffa::EnumValue::from(
6050 ::buffa::types::decode_int32(buf)?,
6051 );
6052 }
6053 32u32 => {
6054 ::buffa::encoding::check_wire_type(
6055 tag,
6056 ::buffa::encoding::WireType::Varint,
6057 )?;
6058 self.tx_occurrence_index = ::buffa::types::decode_uint64(buf)?;
6059 }
6060 33u32 => {
6061 ::buffa::encoding::check_wire_type(
6062 tag,
6063 ::buffa::encoding::WireType::LengthDelimited,
6064 )?;
6065 ::buffa::types::merge_string(&mut self.flow_id, buf)?;
6066 }
6067 34u32 => {
6068 ::buffa::encoding::check_wire_type(
6069 tag,
6070 ::buffa::encoding::WireType::LengthDelimited,
6071 )?;
6072 ::buffa::types::merge_string(&mut self.smart_account_address, buf)?;
6073 }
6074 35u32 => {
6075 ::buffa::encoding::check_wire_type(
6076 tag,
6077 ::buffa::encoding::WireType::LengthDelimited,
6078 )?;
6079 ::buffa::Message::merge_length_delimited(
6080 self.zipper_reason.get_or_insert_default(),
6081 buf,
6082 ctx,
6083 )?;
6084 }
6085 _ => {
6086 self.__buffa_unknown_fields
6087 .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
6088 }
6089 }
6090 ::core::result::Result::Ok(())
6091 }
6092 fn clear(&mut self) {
6093 self.owner_account_id = 0u64;
6094 self.flow_kind = ::buffa::EnumValue::from(0);
6095 self.current_step = ::buffa::EnumValue::from(0);
6096 self.asset_ids = ::buffa::MessageField::none();
6097 self.polyester_chain_id = 0u32;
6098 self.amount_e18 = ::buffa::MessageField::none();
6099 self.source_tx_hash.clear();
6100 self.source_address.clear();
6101 self.destination_address.clear();
6102 self.latest_tx_ref.clear();
6103 self.latest_lifecycle_source = ::buffa::EnumValue::from(0);
6104 self.lifecycle_reason = ::buffa::EnumValue::from(0);
6105 self.started_at_unix_ms = 0u64;
6106 self.updated_at_unix_ms = 0u64;
6107 self.terminal_at_unix_ms = 0u64;
6108 self.last_activity_at_unix_ms = 0u64;
6109 self.is_open = false;
6110 self.is_terminal = false;
6111 self.current_step_sequence = 0u32;
6112 self.current_progress = ::buffa::MessageField::none();
6113 self.progress_timeline.clear();
6114 self.estimated_completion_unix_ms = 0u64;
6115 self.request_fee = ::buffa::MessageField::none();
6116 self.source_domain = ::buffa::EnumValue::from(0);
6117 self.destination_domain = ::buffa::EnumValue::from(0);
6118 self.tx_occurrence_index = 0u64;
6119 self.flow_id.clear();
6120 self.smart_account_address.clear();
6121 self.zipper_reason = ::buffa::MessageField::none();
6122 self.__buffa_unknown_fields.clear();
6123 }
6124}
6125impl ::buffa::ExtensionSet for FlowSummaryView {
6126 const PROTO_FQN: &'static str = "chain.lifecycle.v1.FlowSummaryView";
6127 fn unknown_fields(&self) -> &::buffa::UnknownFields {
6128 &self.__buffa_unknown_fields
6129 }
6130 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
6131 &mut self.__buffa_unknown_fields
6132 }
6133}
6134impl ::buffa::json_helpers::ProtoElemJson for FlowSummaryView {
6135 fn serialize_proto_json<S: ::serde::Serializer>(
6136 v: &Self,
6137 s: S,
6138 ) -> ::core::result::Result<S::Ok, S::Error> {
6139 ::serde::Serialize::serialize(v, s)
6140 }
6141 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
6142 d: D,
6143 ) -> ::core::result::Result<Self, D::Error> {
6144 <Self as ::serde::Deserialize>::deserialize(d)
6145 }
6146}
6147#[doc(hidden)]
6148pub const __FLOW_SUMMARY_VIEW_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
6149 type_url: "type.googleapis.com/chain.lifecycle.v1.FlowSummaryView",
6150 to_json: ::buffa::type_registry::any_to_json::<FlowSummaryView>,
6151 from_json: ::buffa::type_registry::any_from_json::<FlowSummaryView>,
6152 is_wkt: false,
6153};
6154#[derive(Clone, PartialEq, Default)]
6156#[derive(::serde::Serialize, ::serde::Deserialize)]
6157#[serde(default)]
6158pub struct FlowSummaryProgressView {
6159 #[serde(
6164 rename = "currentStepStartedAtUnixMs",
6165 alias = "current_step_started_at_unix_ms",
6166 with = "::buffa::json_helpers::uint64",
6167 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
6168 )]
6169 pub current_step_started_at_unix_ms: u64,
6170 #[serde(
6174 rename = "currentStepExpectedDurationMs",
6175 alias = "current_step_expected_duration_ms",
6176 with = "::buffa::json_helpers::uint64",
6177 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
6178 )]
6179 pub current_step_expected_duration_ms: u64,
6180 #[serde(
6184 rename = "currentConfirmations",
6185 alias = "current_confirmations",
6186 with = "::buffa::json_helpers::uint32",
6187 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
6188 )]
6189 pub current_confirmations: u32,
6190 #[serde(
6194 rename = "requiredConfirmations",
6195 alias = "required_confirmations",
6196 with = "::buffa::json_helpers::uint32",
6197 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
6198 )]
6199 pub required_confirmations: u32,
6200 #[serde(
6204 rename = "approveCount",
6205 alias = "approve_count",
6206 with = "::buffa::json_helpers::uint32",
6207 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
6208 )]
6209 pub approve_count: u32,
6210 #[serde(
6214 rename = "rejectCount",
6215 alias = "reject_count",
6216 with = "::buffa::json_helpers::uint32",
6217 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
6218 )]
6219 pub reject_count: u32,
6220 #[serde(
6224 rename = "validatorCount",
6225 alias = "validator_count",
6226 with = "::buffa::json_helpers::uint32",
6227 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
6228 )]
6229 pub validator_count: u32,
6230 #[serde(
6234 rename = "requiredApprovals",
6235 alias = "required_approvals",
6236 with = "::buffa::json_helpers::uint32",
6237 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
6238 )]
6239 pub required_approvals: u32,
6240 #[serde(
6244 rename = "requiredRejections",
6245 alias = "required_rejections",
6246 with = "::buffa::json_helpers::uint32",
6247 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
6248 )]
6249 pub required_rejections: u32,
6250 #[serde(skip)]
6251 #[doc(hidden)]
6252 pub __buffa_unknown_fields: ::buffa::UnknownFields,
6253}
6254impl ::core::fmt::Debug for FlowSummaryProgressView {
6255 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
6256 f.debug_struct("FlowSummaryProgressView")
6257 .field(
6258 "current_step_started_at_unix_ms",
6259 &self.current_step_started_at_unix_ms,
6260 )
6261 .field(
6262 "current_step_expected_duration_ms",
6263 &self.current_step_expected_duration_ms,
6264 )
6265 .field("current_confirmations", &self.current_confirmations)
6266 .field("required_confirmations", &self.required_confirmations)
6267 .field("approve_count", &self.approve_count)
6268 .field("reject_count", &self.reject_count)
6269 .field("validator_count", &self.validator_count)
6270 .field("required_approvals", &self.required_approvals)
6271 .field("required_rejections", &self.required_rejections)
6272 .finish()
6273 }
6274}
6275impl FlowSummaryProgressView {
6276 pub const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowSummaryProgressView";
6281}
6282::buffa::impl_default_instance!(FlowSummaryProgressView);
6283impl ::buffa::MessageName for FlowSummaryProgressView {
6284 const PACKAGE: &'static str = "chain.lifecycle.v1";
6285 const NAME: &'static str = "FlowSummaryProgressView";
6286 const FULL_NAME: &'static str = "chain.lifecycle.v1.FlowSummaryProgressView";
6287 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowSummaryProgressView";
6288}
6289impl ::buffa::Message for FlowSummaryProgressView {
6290 #[allow(clippy::let_and_return)]
6296 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
6297 #[allow(unused_imports)]
6298 use ::buffa::Enumeration as _;
6299 let mut size = 0u32;
6300 if self.current_step_started_at_unix_ms != 0u64 {
6301 size
6302 += 1u32
6303 + ::buffa::types::uint64_encoded_len(
6304 self.current_step_started_at_unix_ms,
6305 ) as u32;
6306 }
6307 if self.current_step_expected_duration_ms != 0u64 {
6308 size
6309 += 1u32
6310 + ::buffa::types::uint64_encoded_len(
6311 self.current_step_expected_duration_ms,
6312 ) as u32;
6313 }
6314 if self.current_confirmations != 0u32 {
6315 size
6316 += 1u32
6317 + ::buffa::types::uint32_encoded_len(self.current_confirmations)
6318 as u32;
6319 }
6320 if self.required_confirmations != 0u32 {
6321 size
6322 += 1u32
6323 + ::buffa::types::uint32_encoded_len(self.required_confirmations)
6324 as u32;
6325 }
6326 if self.approve_count != 0u32 {
6327 size += 1u32 + ::buffa::types::uint32_encoded_len(self.approve_count) as u32;
6328 }
6329 if self.reject_count != 0u32 {
6330 size += 1u32 + ::buffa::types::uint32_encoded_len(self.reject_count) as u32;
6331 }
6332 if self.validator_count != 0u32 {
6333 size
6334 += 1u32
6335 + ::buffa::types::uint32_encoded_len(self.validator_count) as u32;
6336 }
6337 if self.required_approvals != 0u32 {
6338 size
6339 += 1u32
6340 + ::buffa::types::uint32_encoded_len(self.required_approvals) as u32;
6341 }
6342 if self.required_rejections != 0u32 {
6343 size
6344 += 1u32
6345 + ::buffa::types::uint32_encoded_len(self.required_rejections)
6346 as u32;
6347 }
6348 size += self.__buffa_unknown_fields.encoded_len() as u32;
6349 size
6350 }
6351 fn write_to(
6352 &self,
6353 _cache: &mut ::buffa::SizeCache,
6354 buf: &mut impl ::buffa::bytes::BufMut,
6355 ) {
6356 #[allow(unused_imports)]
6357 use ::buffa::Enumeration as _;
6358 if self.current_step_started_at_unix_ms != 0u64 {
6359 ::buffa::types::put_uint64_field(
6360 1u32,
6361 self.current_step_started_at_unix_ms,
6362 buf,
6363 );
6364 }
6365 if self.current_step_expected_duration_ms != 0u64 {
6366 ::buffa::types::put_uint64_field(
6367 2u32,
6368 self.current_step_expected_duration_ms,
6369 buf,
6370 );
6371 }
6372 if self.current_confirmations != 0u32 {
6373 ::buffa::types::put_uint32_field(5u32, self.current_confirmations, buf);
6374 }
6375 if self.required_confirmations != 0u32 {
6376 ::buffa::types::put_uint32_field(6u32, self.required_confirmations, buf);
6377 }
6378 if self.approve_count != 0u32 {
6379 ::buffa::types::put_uint32_field(7u32, self.approve_count, buf);
6380 }
6381 if self.reject_count != 0u32 {
6382 ::buffa::types::put_uint32_field(8u32, self.reject_count, buf);
6383 }
6384 if self.validator_count != 0u32 {
6385 ::buffa::types::put_uint32_field(9u32, self.validator_count, buf);
6386 }
6387 if self.required_approvals != 0u32 {
6388 ::buffa::types::put_uint32_field(10u32, self.required_approvals, buf);
6389 }
6390 if self.required_rejections != 0u32 {
6391 ::buffa::types::put_uint32_field(11u32, self.required_rejections, buf);
6392 }
6393 self.__buffa_unknown_fields.write_to(buf);
6394 }
6395 fn merge_field(
6396 &mut self,
6397 tag: ::buffa::encoding::Tag,
6398 buf: &mut impl ::buffa::bytes::Buf,
6399 ctx: ::buffa::DecodeContext<'_>,
6400 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
6401 #[allow(unused_imports)]
6402 use ::buffa::bytes::Buf as _;
6403 #[allow(unused_imports)]
6404 use ::buffa::Enumeration as _;
6405 match tag.field_number() {
6406 1u32 => {
6407 ::buffa::encoding::check_wire_type(
6408 tag,
6409 ::buffa::encoding::WireType::Varint,
6410 )?;
6411 self.current_step_started_at_unix_ms = ::buffa::types::decode_uint64(
6412 buf,
6413 )?;
6414 }
6415 2u32 => {
6416 ::buffa::encoding::check_wire_type(
6417 tag,
6418 ::buffa::encoding::WireType::Varint,
6419 )?;
6420 self.current_step_expected_duration_ms = ::buffa::types::decode_uint64(
6421 buf,
6422 )?;
6423 }
6424 5u32 => {
6425 ::buffa::encoding::check_wire_type(
6426 tag,
6427 ::buffa::encoding::WireType::Varint,
6428 )?;
6429 self.current_confirmations = ::buffa::types::decode_uint32(buf)?;
6430 }
6431 6u32 => {
6432 ::buffa::encoding::check_wire_type(
6433 tag,
6434 ::buffa::encoding::WireType::Varint,
6435 )?;
6436 self.required_confirmations = ::buffa::types::decode_uint32(buf)?;
6437 }
6438 7u32 => {
6439 ::buffa::encoding::check_wire_type(
6440 tag,
6441 ::buffa::encoding::WireType::Varint,
6442 )?;
6443 self.approve_count = ::buffa::types::decode_uint32(buf)?;
6444 }
6445 8u32 => {
6446 ::buffa::encoding::check_wire_type(
6447 tag,
6448 ::buffa::encoding::WireType::Varint,
6449 )?;
6450 self.reject_count = ::buffa::types::decode_uint32(buf)?;
6451 }
6452 9u32 => {
6453 ::buffa::encoding::check_wire_type(
6454 tag,
6455 ::buffa::encoding::WireType::Varint,
6456 )?;
6457 self.validator_count = ::buffa::types::decode_uint32(buf)?;
6458 }
6459 10u32 => {
6460 ::buffa::encoding::check_wire_type(
6461 tag,
6462 ::buffa::encoding::WireType::Varint,
6463 )?;
6464 self.required_approvals = ::buffa::types::decode_uint32(buf)?;
6465 }
6466 11u32 => {
6467 ::buffa::encoding::check_wire_type(
6468 tag,
6469 ::buffa::encoding::WireType::Varint,
6470 )?;
6471 self.required_rejections = ::buffa::types::decode_uint32(buf)?;
6472 }
6473 _ => {
6474 self.__buffa_unknown_fields
6475 .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
6476 }
6477 }
6478 ::core::result::Result::Ok(())
6479 }
6480 fn clear(&mut self) {
6481 self.current_step_started_at_unix_ms = 0u64;
6482 self.current_step_expected_duration_ms = 0u64;
6483 self.current_confirmations = 0u32;
6484 self.required_confirmations = 0u32;
6485 self.approve_count = 0u32;
6486 self.reject_count = 0u32;
6487 self.validator_count = 0u32;
6488 self.required_approvals = 0u32;
6489 self.required_rejections = 0u32;
6490 self.__buffa_unknown_fields.clear();
6491 }
6492}
6493impl ::buffa::ExtensionSet for FlowSummaryProgressView {
6494 const PROTO_FQN: &'static str = "chain.lifecycle.v1.FlowSummaryProgressView";
6495 fn unknown_fields(&self) -> &::buffa::UnknownFields {
6496 &self.__buffa_unknown_fields
6497 }
6498 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
6499 &mut self.__buffa_unknown_fields
6500 }
6501}
6502impl ::buffa::json_helpers::ProtoElemJson for FlowSummaryProgressView {
6503 fn serialize_proto_json<S: ::serde::Serializer>(
6504 v: &Self,
6505 s: S,
6506 ) -> ::core::result::Result<S::Ok, S::Error> {
6507 ::serde::Serialize::serialize(v, s)
6508 }
6509 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
6510 d: D,
6511 ) -> ::core::result::Result<Self, D::Error> {
6512 <Self as ::serde::Deserialize>::deserialize(d)
6513 }
6514}
6515#[doc(hidden)]
6516pub const __FLOW_SUMMARY_PROGRESS_VIEW_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
6517 type_url: "type.googleapis.com/chain.lifecycle.v1.FlowSummaryProgressView",
6518 to_json: ::buffa::type_registry::any_to_json::<FlowSummaryProgressView>,
6519 from_json: ::buffa::type_registry::any_from_json::<FlowSummaryProgressView>,
6520 is_wkt: false,
6521};
6522#[derive(Clone, PartialEq, Default)]
6526#[derive(::serde::Serialize, ::serde::Deserialize)]
6527#[serde(default)]
6528pub struct FlowStepView {
6529 #[serde(
6533 rename = "sequence",
6534 with = "::buffa::json_helpers::uint32",
6535 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
6536 )]
6537 pub sequence: u32,
6538 #[serde(
6542 rename = "step",
6543 with = "::buffa::json_helpers::proto_enum",
6544 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
6545 )]
6546 pub step: ::buffa::EnumValue<FlowStep>,
6547 #[serde(
6551 rename = "assetIds",
6552 alias = "asset_ids",
6553 skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
6554 )]
6555 pub asset_ids: ::buffa::MessageField<AssetIds>,
6556 #[serde(
6560 rename = "polyesterChainId",
6561 alias = "polyester_chain_id",
6562 with = "::buffa::json_helpers::uint32",
6563 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
6564 )]
6565 pub polyester_chain_id: u32,
6566 #[serde(
6571 rename = "amountE18",
6572 alias = "amount_e18",
6573 skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
6574 )]
6575 pub amount_e18: ::buffa::MessageField<
6576 super::super::super::polyester::r#type::v1::U128,
6577 >,
6578 #[serde(
6582 rename = "requestFee",
6583 alias = "request_fee",
6584 skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
6585 )]
6586 pub request_fee: ::buffa::MessageField<RequestFee>,
6587 #[serde(
6591 rename = "milestoneTxRef",
6592 alias = "milestone_tx_ref",
6593 with = "::buffa::json_helpers::proto_string",
6594 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
6595 )]
6596 pub milestone_tx_ref: ::buffa::alloc::string::String,
6597 #[serde(
6601 rename = "lifecycleSource",
6602 alias = "lifecycle_source",
6603 with = "::buffa::json_helpers::proto_enum",
6604 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
6605 )]
6606 pub lifecycle_source: ::buffa::EnumValue<LifecycleSource>,
6607 #[serde(
6611 rename = "lifecycleReason",
6612 alias = "lifecycle_reason",
6613 with = "::buffa::json_helpers::proto_enum",
6614 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
6615 )]
6616 pub lifecycle_reason: ::buffa::EnumValue<LifecycleReason>,
6617 #[serde(
6621 rename = "zipperReason",
6622 alias = "zipper_reason",
6623 skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
6624 )]
6625 pub zipper_reason: ::buffa::MessageField<
6626 super::super::zipper::v1::ZipperReasonDetails,
6627 >,
6628 #[serde(
6632 rename = "currentConfirmations",
6633 alias = "current_confirmations",
6634 with = "::buffa::json_helpers::uint32",
6635 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
6636 )]
6637 pub current_confirmations: u32,
6638 #[serde(
6642 rename = "requiredConfirmations",
6643 alias = "required_confirmations",
6644 with = "::buffa::json_helpers::uint32",
6645 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
6646 )]
6647 pub required_confirmations: u32,
6648 #[serde(
6652 rename = "approveCount",
6653 alias = "approve_count",
6654 with = "::buffa::json_helpers::uint32",
6655 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
6656 )]
6657 pub approve_count: u32,
6658 #[serde(
6662 rename = "rejectCount",
6663 alias = "reject_count",
6664 with = "::buffa::json_helpers::uint32",
6665 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
6666 )]
6667 pub reject_count: u32,
6668 #[serde(
6672 rename = "validatorCount",
6673 alias = "validator_count",
6674 with = "::buffa::json_helpers::uint32",
6675 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
6676 )]
6677 pub validator_count: u32,
6678 #[serde(
6682 rename = "requiredApprovals",
6683 alias = "required_approvals",
6684 with = "::buffa::json_helpers::uint32",
6685 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
6686 )]
6687 pub required_approvals: u32,
6688 #[serde(
6692 rename = "requiredRejections",
6693 alias = "required_rejections",
6694 with = "::buffa::json_helpers::uint32",
6695 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
6696 )]
6697 pub required_rejections: u32,
6698 #[serde(
6702 rename = "occurredAtUnixMs",
6703 alias = "occurred_at_unix_ms",
6704 with = "::buffa::json_helpers::uint64",
6705 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
6706 )]
6707 pub occurred_at_unix_ms: u64,
6708 #[serde(
6712 rename = "blockTimeMovingAverageMs",
6713 alias = "block_time_moving_average_ms",
6714 with = "::buffa::json_helpers::uint64",
6715 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
6716 )]
6717 pub block_time_moving_average_ms: u64,
6718 #[serde(
6724 rename = "activities",
6725 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
6726 deserialize_with = "::buffa::json_helpers::null_as_default"
6727 )]
6728 pub activities: ::buffa::alloc::vec::Vec<FlowStepActivityView>,
6729 #[serde(skip)]
6730 #[doc(hidden)]
6731 pub __buffa_unknown_fields: ::buffa::UnknownFields,
6732}
6733impl ::core::fmt::Debug for FlowStepView {
6734 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
6735 f.debug_struct("FlowStepView")
6736 .field("sequence", &self.sequence)
6737 .field("step", &self.step)
6738 .field("asset_ids", &self.asset_ids)
6739 .field("polyester_chain_id", &self.polyester_chain_id)
6740 .field("amount_e18", &self.amount_e18)
6741 .field("request_fee", &self.request_fee)
6742 .field("milestone_tx_ref", &self.milestone_tx_ref)
6743 .field("lifecycle_source", &self.lifecycle_source)
6744 .field("lifecycle_reason", &self.lifecycle_reason)
6745 .field("zipper_reason", &self.zipper_reason)
6746 .field("current_confirmations", &self.current_confirmations)
6747 .field("required_confirmations", &self.required_confirmations)
6748 .field("approve_count", &self.approve_count)
6749 .field("reject_count", &self.reject_count)
6750 .field("validator_count", &self.validator_count)
6751 .field("required_approvals", &self.required_approvals)
6752 .field("required_rejections", &self.required_rejections)
6753 .field("occurred_at_unix_ms", &self.occurred_at_unix_ms)
6754 .field("block_time_moving_average_ms", &self.block_time_moving_average_ms)
6755 .field("activities", &self.activities)
6756 .finish()
6757 }
6758}
6759impl FlowStepView {
6760 pub const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowStepView";
6765}
6766::buffa::impl_default_instance!(FlowStepView);
6767impl ::buffa::MessageName for FlowStepView {
6768 const PACKAGE: &'static str = "chain.lifecycle.v1";
6769 const NAME: &'static str = "FlowStepView";
6770 const FULL_NAME: &'static str = "chain.lifecycle.v1.FlowStepView";
6771 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowStepView";
6772}
6773impl ::buffa::Message for FlowStepView {
6774 #[allow(clippy::let_and_return)]
6780 fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
6781 #[allow(unused_imports)]
6782 use ::buffa::Enumeration as _;
6783 let mut size = 0u32;
6784 if self.sequence != 0u32 {
6785 size += 1u32 + ::buffa::types::uint32_encoded_len(self.sequence) as u32;
6786 }
6787 {
6788 let val = self.step.to_i32();
6789 if val != 0 {
6790 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
6791 }
6792 }
6793 if self.asset_ids.is_set() {
6794 let __slot = __cache.reserve();
6795 let inner_size = self.asset_ids.compute_size(__cache);
6796 __cache.set(__slot, inner_size);
6797 size
6798 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
6799 + inner_size;
6800 }
6801 if self.polyester_chain_id != 0u32 {
6802 size
6803 += 1u32
6804 + ::buffa::types::uint32_encoded_len(self.polyester_chain_id) as u32;
6805 }
6806 if self.amount_e18.is_set() {
6807 let __slot = __cache.reserve();
6808 let inner_size = self.amount_e18.compute_size(__cache);
6809 __cache.set(__slot, inner_size);
6810 size
6811 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
6812 + inner_size;
6813 }
6814 if !self.milestone_tx_ref.is_empty() {
6815 size
6816 += 1u32
6817 + ::buffa::types::string_encoded_len(&self.milestone_tx_ref) as u32;
6818 }
6819 {
6820 let val = self.lifecycle_source.to_i32();
6821 if val != 0 {
6822 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
6823 }
6824 }
6825 {
6826 let val = self.lifecycle_reason.to_i32();
6827 if val != 0 {
6828 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
6829 }
6830 }
6831 if self.current_confirmations != 0u32 {
6832 size
6833 += 1u32
6834 + ::buffa::types::uint32_encoded_len(self.current_confirmations)
6835 as u32;
6836 }
6837 if self.required_confirmations != 0u32 {
6838 size
6839 += 1u32
6840 + ::buffa::types::uint32_encoded_len(self.required_confirmations)
6841 as u32;
6842 }
6843 if self.approve_count != 0u32 {
6844 size += 2u32 + ::buffa::types::uint32_encoded_len(self.approve_count) as u32;
6845 }
6846 if self.reject_count != 0u32 {
6847 size += 2u32 + ::buffa::types::uint32_encoded_len(self.reject_count) as u32;
6848 }
6849 if self.validator_count != 0u32 {
6850 size
6851 += 2u32
6852 + ::buffa::types::uint32_encoded_len(self.validator_count) as u32;
6853 }
6854 if self.occurred_at_unix_ms != 0u64 {
6855 size
6856 += 2u32
6857 + ::buffa::types::uint64_encoded_len(self.occurred_at_unix_ms)
6858 as u32;
6859 }
6860 if self.block_time_moving_average_ms != 0u64 {
6861 size
6862 += 2u32
6863 + ::buffa::types::uint64_encoded_len(
6864 self.block_time_moving_average_ms,
6865 ) as u32;
6866 }
6867 for v in &self.activities {
6868 let __slot = __cache.reserve();
6869 let inner_size = v.compute_size(__cache);
6870 __cache.set(__slot, inner_size);
6871 size
6872 += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
6873 + inner_size;
6874 }
6875 if self.required_approvals != 0u32 {
6876 size
6877 += 2u32
6878 + ::buffa::types::uint32_encoded_len(self.required_approvals) as u32;
6879 }
6880 if self.required_rejections != 0u32 {
6881 size
6882 += 2u32
6883 + ::buffa::types::uint32_encoded_len(self.required_rejections)
6884 as u32;
6885 }
6886 if self.request_fee.is_set() {
6887 let __slot = __cache.reserve();
6888 let inner_size = self.request_fee.compute_size(__cache);
6889 __cache.set(__slot, inner_size);
6890 size
6891 += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
6892 + inner_size;
6893 }
6894 if self.zipper_reason.is_set() {
6895 let __slot = __cache.reserve();
6896 let inner_size = self.zipper_reason.compute_size(__cache);
6897 __cache.set(__slot, inner_size);
6898 size
6899 += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
6900 + inner_size;
6901 }
6902 size += self.__buffa_unknown_fields.encoded_len() as u32;
6903 size
6904 }
6905 fn write_to(
6906 &self,
6907 __cache: &mut ::buffa::SizeCache,
6908 buf: &mut impl ::buffa::bytes::BufMut,
6909 ) {
6910 #[allow(unused_imports)]
6911 use ::buffa::Enumeration as _;
6912 if self.sequence != 0u32 {
6913 ::buffa::types::put_uint32_field(1u32, self.sequence, buf);
6914 }
6915 {
6916 let val = self.step.to_i32();
6917 if val != 0 {
6918 ::buffa::types::put_int32_field(3u32, val, buf);
6919 }
6920 }
6921 if self.asset_ids.is_set() {
6922 ::buffa::types::put_len_delimited_header(7u32, __cache.consume_next(), buf);
6923 self.asset_ids.write_to(__cache, buf);
6924 }
6925 if self.polyester_chain_id != 0u32 {
6926 ::buffa::types::put_uint32_field(8u32, self.polyester_chain_id, buf);
6927 }
6928 if self.amount_e18.is_set() {
6929 ::buffa::types::put_len_delimited_header(9u32, __cache.consume_next(), buf);
6930 self.amount_e18.write_to(__cache, buf);
6931 }
6932 if !self.milestone_tx_ref.is_empty() {
6933 ::buffa::types::put_string_field(11u32, &self.milestone_tx_ref, buf);
6934 }
6935 {
6936 let val = self.lifecycle_source.to_i32();
6937 if val != 0 {
6938 ::buffa::types::put_int32_field(12u32, val, buf);
6939 }
6940 }
6941 {
6942 let val = self.lifecycle_reason.to_i32();
6943 if val != 0 {
6944 ::buffa::types::put_int32_field(13u32, val, buf);
6945 }
6946 }
6947 if self.current_confirmations != 0u32 {
6948 ::buffa::types::put_uint32_field(14u32, self.current_confirmations, buf);
6949 }
6950 if self.required_confirmations != 0u32 {
6951 ::buffa::types::put_uint32_field(15u32, self.required_confirmations, buf);
6952 }
6953 if self.approve_count != 0u32 {
6954 ::buffa::types::put_uint32_field(16u32, self.approve_count, buf);
6955 }
6956 if self.reject_count != 0u32 {
6957 ::buffa::types::put_uint32_field(17u32, self.reject_count, buf);
6958 }
6959 if self.validator_count != 0u32 {
6960 ::buffa::types::put_uint32_field(18u32, self.validator_count, buf);
6961 }
6962 if self.occurred_at_unix_ms != 0u64 {
6963 ::buffa::types::put_uint64_field(19u32, self.occurred_at_unix_ms, buf);
6964 }
6965 if self.block_time_moving_average_ms != 0u64 {
6966 ::buffa::types::put_uint64_field(
6967 20u32,
6968 self.block_time_moving_average_ms,
6969 buf,
6970 );
6971 }
6972 for v in &self.activities {
6973 ::buffa::types::put_len_delimited_header(21u32, __cache.consume_next(), buf);
6974 v.write_to(__cache, buf);
6975 }
6976 if self.required_approvals != 0u32 {
6977 ::buffa::types::put_uint32_field(22u32, self.required_approvals, buf);
6978 }
6979 if self.required_rejections != 0u32 {
6980 ::buffa::types::put_uint32_field(23u32, self.required_rejections, buf);
6981 }
6982 if self.request_fee.is_set() {
6983 ::buffa::types::put_len_delimited_header(24u32, __cache.consume_next(), buf);
6984 self.request_fee.write_to(__cache, buf);
6985 }
6986 if self.zipper_reason.is_set() {
6987 ::buffa::types::put_len_delimited_header(25u32, __cache.consume_next(), buf);
6988 self.zipper_reason.write_to(__cache, buf);
6989 }
6990 self.__buffa_unknown_fields.write_to(buf);
6991 }
6992 fn merge_field(
6993 &mut self,
6994 tag: ::buffa::encoding::Tag,
6995 buf: &mut impl ::buffa::bytes::Buf,
6996 ctx: ::buffa::DecodeContext<'_>,
6997 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
6998 #[allow(unused_imports)]
6999 use ::buffa::bytes::Buf as _;
7000 #[allow(unused_imports)]
7001 use ::buffa::Enumeration as _;
7002 match tag.field_number() {
7003 1u32 => {
7004 ::buffa::encoding::check_wire_type(
7005 tag,
7006 ::buffa::encoding::WireType::Varint,
7007 )?;
7008 self.sequence = ::buffa::types::decode_uint32(buf)?;
7009 }
7010 3u32 => {
7011 ::buffa::encoding::check_wire_type(
7012 tag,
7013 ::buffa::encoding::WireType::Varint,
7014 )?;
7015 self.step = ::buffa::EnumValue::from(::buffa::types::decode_int32(buf)?);
7016 }
7017 7u32 => {
7018 ::buffa::encoding::check_wire_type(
7019 tag,
7020 ::buffa::encoding::WireType::LengthDelimited,
7021 )?;
7022 ::buffa::Message::merge_length_delimited(
7023 self.asset_ids.get_or_insert_default(),
7024 buf,
7025 ctx,
7026 )?;
7027 }
7028 8u32 => {
7029 ::buffa::encoding::check_wire_type(
7030 tag,
7031 ::buffa::encoding::WireType::Varint,
7032 )?;
7033 self.polyester_chain_id = ::buffa::types::decode_uint32(buf)?;
7034 }
7035 9u32 => {
7036 ::buffa::encoding::check_wire_type(
7037 tag,
7038 ::buffa::encoding::WireType::LengthDelimited,
7039 )?;
7040 ::buffa::Message::merge_length_delimited(
7041 self.amount_e18.get_or_insert_default(),
7042 buf,
7043 ctx,
7044 )?;
7045 }
7046 11u32 => {
7047 ::buffa::encoding::check_wire_type(
7048 tag,
7049 ::buffa::encoding::WireType::LengthDelimited,
7050 )?;
7051 ::buffa::types::merge_string(&mut self.milestone_tx_ref, buf)?;
7052 }
7053 12u32 => {
7054 ::buffa::encoding::check_wire_type(
7055 tag,
7056 ::buffa::encoding::WireType::Varint,
7057 )?;
7058 self.lifecycle_source = ::buffa::EnumValue::from(
7059 ::buffa::types::decode_int32(buf)?,
7060 );
7061 }
7062 13u32 => {
7063 ::buffa::encoding::check_wire_type(
7064 tag,
7065 ::buffa::encoding::WireType::Varint,
7066 )?;
7067 self.lifecycle_reason = ::buffa::EnumValue::from(
7068 ::buffa::types::decode_int32(buf)?,
7069 );
7070 }
7071 14u32 => {
7072 ::buffa::encoding::check_wire_type(
7073 tag,
7074 ::buffa::encoding::WireType::Varint,
7075 )?;
7076 self.current_confirmations = ::buffa::types::decode_uint32(buf)?;
7077 }
7078 15u32 => {
7079 ::buffa::encoding::check_wire_type(
7080 tag,
7081 ::buffa::encoding::WireType::Varint,
7082 )?;
7083 self.required_confirmations = ::buffa::types::decode_uint32(buf)?;
7084 }
7085 16u32 => {
7086 ::buffa::encoding::check_wire_type(
7087 tag,
7088 ::buffa::encoding::WireType::Varint,
7089 )?;
7090 self.approve_count = ::buffa::types::decode_uint32(buf)?;
7091 }
7092 17u32 => {
7093 ::buffa::encoding::check_wire_type(
7094 tag,
7095 ::buffa::encoding::WireType::Varint,
7096 )?;
7097 self.reject_count = ::buffa::types::decode_uint32(buf)?;
7098 }
7099 18u32 => {
7100 ::buffa::encoding::check_wire_type(
7101 tag,
7102 ::buffa::encoding::WireType::Varint,
7103 )?;
7104 self.validator_count = ::buffa::types::decode_uint32(buf)?;
7105 }
7106 19u32 => {
7107 ::buffa::encoding::check_wire_type(
7108 tag,
7109 ::buffa::encoding::WireType::Varint,
7110 )?;
7111 self.occurred_at_unix_ms = ::buffa::types::decode_uint64(buf)?;
7112 }
7113 20u32 => {
7114 ::buffa::encoding::check_wire_type(
7115 tag,
7116 ::buffa::encoding::WireType::Varint,
7117 )?;
7118 self.block_time_moving_average_ms = ::buffa::types::decode_uint64(buf)?;
7119 }
7120 21u32 => {
7121 ::buffa::encoding::check_wire_type(
7122 tag,
7123 ::buffa::encoding::WireType::LengthDelimited,
7124 )?;
7125 let mut elem = ::core::default::Default::default();
7126 ::buffa::Message::merge_length_delimited(&mut elem, buf, ctx)?;
7127 self.activities.push(elem);
7128 }
7129 22u32 => {
7130 ::buffa::encoding::check_wire_type(
7131 tag,
7132 ::buffa::encoding::WireType::Varint,
7133 )?;
7134 self.required_approvals = ::buffa::types::decode_uint32(buf)?;
7135 }
7136 23u32 => {
7137 ::buffa::encoding::check_wire_type(
7138 tag,
7139 ::buffa::encoding::WireType::Varint,
7140 )?;
7141 self.required_rejections = ::buffa::types::decode_uint32(buf)?;
7142 }
7143 24u32 => {
7144 ::buffa::encoding::check_wire_type(
7145 tag,
7146 ::buffa::encoding::WireType::LengthDelimited,
7147 )?;
7148 ::buffa::Message::merge_length_delimited(
7149 self.request_fee.get_or_insert_default(),
7150 buf,
7151 ctx,
7152 )?;
7153 }
7154 25u32 => {
7155 ::buffa::encoding::check_wire_type(
7156 tag,
7157 ::buffa::encoding::WireType::LengthDelimited,
7158 )?;
7159 ::buffa::Message::merge_length_delimited(
7160 self.zipper_reason.get_or_insert_default(),
7161 buf,
7162 ctx,
7163 )?;
7164 }
7165 _ => {
7166 self.__buffa_unknown_fields
7167 .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
7168 }
7169 }
7170 ::core::result::Result::Ok(())
7171 }
7172 fn clear(&mut self) {
7173 self.sequence = 0u32;
7174 self.step = ::buffa::EnumValue::from(0);
7175 self.asset_ids = ::buffa::MessageField::none();
7176 self.polyester_chain_id = 0u32;
7177 self.amount_e18 = ::buffa::MessageField::none();
7178 self.milestone_tx_ref.clear();
7179 self.lifecycle_source = ::buffa::EnumValue::from(0);
7180 self.lifecycle_reason = ::buffa::EnumValue::from(0);
7181 self.current_confirmations = 0u32;
7182 self.required_confirmations = 0u32;
7183 self.approve_count = 0u32;
7184 self.reject_count = 0u32;
7185 self.validator_count = 0u32;
7186 self.occurred_at_unix_ms = 0u64;
7187 self.block_time_moving_average_ms = 0u64;
7188 self.activities.clear();
7189 self.required_approvals = 0u32;
7190 self.required_rejections = 0u32;
7191 self.request_fee = ::buffa::MessageField::none();
7192 self.zipper_reason = ::buffa::MessageField::none();
7193 self.__buffa_unknown_fields.clear();
7194 }
7195}
7196impl ::buffa::ExtensionSet for FlowStepView {
7197 const PROTO_FQN: &'static str = "chain.lifecycle.v1.FlowStepView";
7198 fn unknown_fields(&self) -> &::buffa::UnknownFields {
7199 &self.__buffa_unknown_fields
7200 }
7201 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
7202 &mut self.__buffa_unknown_fields
7203 }
7204}
7205impl ::buffa::json_helpers::ProtoElemJson for FlowStepView {
7206 fn serialize_proto_json<S: ::serde::Serializer>(
7207 v: &Self,
7208 s: S,
7209 ) -> ::core::result::Result<S::Ok, S::Error> {
7210 ::serde::Serialize::serialize(v, s)
7211 }
7212 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
7213 d: D,
7214 ) -> ::core::result::Result<Self, D::Error> {
7215 <Self as ::serde::Deserialize>::deserialize(d)
7216 }
7217}
7218#[doc(hidden)]
7219pub const __FLOW_STEP_VIEW_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
7220 type_url: "type.googleapis.com/chain.lifecycle.v1.FlowStepView",
7221 to_json: ::buffa::type_registry::any_to_json::<FlowStepView>,
7222 from_json: ::buffa::type_registry::any_from_json::<FlowStepView>,
7223 is_wkt: false,
7224};
7225#[derive(Clone, PartialEq, Default)]
7227#[derive(::serde::Serialize, ::serde::Deserialize)]
7228#[serde(default)]
7229pub struct FlowStepActivityView {
7230 #[serde(
7234 rename = "sequence",
7235 with = "::buffa::json_helpers::uint32",
7236 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
7237 )]
7238 pub sequence: u32,
7239 #[serde(
7243 rename = "txRef",
7244 alias = "tx_ref",
7245 with = "::buffa::json_helpers::proto_string",
7246 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
7247 )]
7248 pub tx_ref: ::buffa::alloc::string::String,
7249 #[serde(
7253 rename = "occurredAtUnixMs",
7254 alias = "occurred_at_unix_ms",
7255 with = "::buffa::json_helpers::uint64",
7256 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
7257 )]
7258 pub occurred_at_unix_ms: u64,
7259 #[serde(
7263 rename = "lifecycleSource",
7264 alias = "lifecycle_source",
7265 with = "::buffa::json_helpers::proto_enum",
7266 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
7267 )]
7268 pub lifecycle_source: ::buffa::EnumValue<LifecycleSource>,
7269 #[serde(
7273 rename = "lifecycleReason",
7274 alias = "lifecycle_reason",
7275 with = "::buffa::json_helpers::proto_enum",
7276 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
7277 )]
7278 pub lifecycle_reason: ::buffa::EnumValue<LifecycleReason>,
7279 #[serde(
7283 rename = "zipperReason",
7284 alias = "zipper_reason",
7285 skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
7286 )]
7287 pub zipper_reason: ::buffa::MessageField<
7288 super::super::zipper::v1::ZipperReasonDetails,
7289 >,
7290 #[serde(
7294 rename = "currentConfirmations",
7295 alias = "current_confirmations",
7296 with = "::buffa::json_helpers::uint32",
7297 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
7298 )]
7299 pub current_confirmations: u32,
7300 #[serde(
7304 rename = "requiredConfirmations",
7305 alias = "required_confirmations",
7306 with = "::buffa::json_helpers::uint32",
7307 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
7308 )]
7309 pub required_confirmations: u32,
7310 #[serde(
7314 rename = "approveCount",
7315 alias = "approve_count",
7316 with = "::buffa::json_helpers::uint32",
7317 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
7318 )]
7319 pub approve_count: u32,
7320 #[serde(
7324 rename = "rejectCount",
7325 alias = "reject_count",
7326 with = "::buffa::json_helpers::uint32",
7327 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
7328 )]
7329 pub reject_count: u32,
7330 #[serde(
7334 rename = "validatorCount",
7335 alias = "validator_count",
7336 with = "::buffa::json_helpers::uint32",
7337 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
7338 )]
7339 pub validator_count: u32,
7340 #[serde(
7344 rename = "kind",
7345 with = "::buffa::json_helpers::proto_enum",
7346 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
7347 )]
7348 pub kind: ::buffa::EnumValue<FlowStepActivityKind>,
7349 #[serde(
7353 rename = "requiredApprovals",
7354 alias = "required_approvals",
7355 with = "::buffa::json_helpers::uint32",
7356 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
7357 )]
7358 pub required_approvals: u32,
7359 #[serde(
7363 rename = "requiredRejections",
7364 alias = "required_rejections",
7365 with = "::buffa::json_helpers::uint32",
7366 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
7367 )]
7368 pub required_rejections: u32,
7369 #[serde(
7375 rename = "amountE18",
7376 alias = "amount_e18",
7377 skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
7378 )]
7379 pub amount_e18: ::buffa::MessageField<
7380 super::super::super::polyester::r#type::v1::U128,
7381 >,
7382 #[serde(
7386 rename = "ledgerTransferId",
7387 alias = "ledger_transfer_id",
7388 with = "::buffa::json_helpers::proto_string",
7389 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
7390 )]
7391 pub ledger_transfer_id: ::buffa::alloc::string::String,
7392 #[serde(skip)]
7393 #[doc(hidden)]
7394 pub __buffa_unknown_fields: ::buffa::UnknownFields,
7395}
7396impl ::core::fmt::Debug for FlowStepActivityView {
7397 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7398 f.debug_struct("FlowStepActivityView")
7399 .field("sequence", &self.sequence)
7400 .field("tx_ref", &self.tx_ref)
7401 .field("occurred_at_unix_ms", &self.occurred_at_unix_ms)
7402 .field("lifecycle_source", &self.lifecycle_source)
7403 .field("lifecycle_reason", &self.lifecycle_reason)
7404 .field("zipper_reason", &self.zipper_reason)
7405 .field("current_confirmations", &self.current_confirmations)
7406 .field("required_confirmations", &self.required_confirmations)
7407 .field("approve_count", &self.approve_count)
7408 .field("reject_count", &self.reject_count)
7409 .field("validator_count", &self.validator_count)
7410 .field("kind", &self.kind)
7411 .field("required_approvals", &self.required_approvals)
7412 .field("required_rejections", &self.required_rejections)
7413 .field("amount_e18", &self.amount_e18)
7414 .field("ledger_transfer_id", &self.ledger_transfer_id)
7415 .finish()
7416 }
7417}
7418impl FlowStepActivityView {
7419 pub const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowStepActivityView";
7424}
7425::buffa::impl_default_instance!(FlowStepActivityView);
7426impl ::buffa::MessageName for FlowStepActivityView {
7427 const PACKAGE: &'static str = "chain.lifecycle.v1";
7428 const NAME: &'static str = "FlowStepActivityView";
7429 const FULL_NAME: &'static str = "chain.lifecycle.v1.FlowStepActivityView";
7430 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowStepActivityView";
7431}
7432impl ::buffa::Message for FlowStepActivityView {
7433 #[allow(clippy::let_and_return)]
7439 fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
7440 #[allow(unused_imports)]
7441 use ::buffa::Enumeration as _;
7442 let mut size = 0u32;
7443 if self.sequence != 0u32 {
7444 size += 1u32 + ::buffa::types::uint32_encoded_len(self.sequence) as u32;
7445 }
7446 if !self.tx_ref.is_empty() {
7447 size += 1u32 + ::buffa::types::string_encoded_len(&self.tx_ref) as u32;
7448 }
7449 if self.occurred_at_unix_ms != 0u64 {
7450 size
7451 += 1u32
7452 + ::buffa::types::uint64_encoded_len(self.occurred_at_unix_ms)
7453 as u32;
7454 }
7455 {
7456 let val = self.lifecycle_source.to_i32();
7457 if val != 0 {
7458 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
7459 }
7460 }
7461 {
7462 let val = self.lifecycle_reason.to_i32();
7463 if val != 0 {
7464 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
7465 }
7466 }
7467 if self.current_confirmations != 0u32 {
7468 size
7469 += 1u32
7470 + ::buffa::types::uint32_encoded_len(self.current_confirmations)
7471 as u32;
7472 }
7473 if self.required_confirmations != 0u32 {
7474 size
7475 += 1u32
7476 + ::buffa::types::uint32_encoded_len(self.required_confirmations)
7477 as u32;
7478 }
7479 if self.approve_count != 0u32 {
7480 size += 1u32 + ::buffa::types::uint32_encoded_len(self.approve_count) as u32;
7481 }
7482 if self.reject_count != 0u32 {
7483 size += 1u32 + ::buffa::types::uint32_encoded_len(self.reject_count) as u32;
7484 }
7485 if self.validator_count != 0u32 {
7486 size
7487 += 1u32
7488 + ::buffa::types::uint32_encoded_len(self.validator_count) as u32;
7489 }
7490 {
7491 let val = self.kind.to_i32();
7492 if val != 0 {
7493 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
7494 }
7495 }
7496 if self.required_approvals != 0u32 {
7497 size
7498 += 1u32
7499 + ::buffa::types::uint32_encoded_len(self.required_approvals) as u32;
7500 }
7501 if self.required_rejections != 0u32 {
7502 size
7503 += 1u32
7504 + ::buffa::types::uint32_encoded_len(self.required_rejections)
7505 as u32;
7506 }
7507 if self.amount_e18.is_set() {
7508 let __slot = __cache.reserve();
7509 let inner_size = self.amount_e18.compute_size(__cache);
7510 __cache.set(__slot, inner_size);
7511 size
7512 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
7513 + inner_size;
7514 }
7515 if !self.ledger_transfer_id.is_empty() {
7516 size
7517 += 1u32
7518 + ::buffa::types::string_encoded_len(&self.ledger_transfer_id)
7519 as u32;
7520 }
7521 if self.zipper_reason.is_set() {
7522 let __slot = __cache.reserve();
7523 let inner_size = self.zipper_reason.compute_size(__cache);
7524 __cache.set(__slot, inner_size);
7525 size
7526 += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
7527 + inner_size;
7528 }
7529 size += self.__buffa_unknown_fields.encoded_len() as u32;
7530 size
7531 }
7532 fn write_to(
7533 &self,
7534 __cache: &mut ::buffa::SizeCache,
7535 buf: &mut impl ::buffa::bytes::BufMut,
7536 ) {
7537 #[allow(unused_imports)]
7538 use ::buffa::Enumeration as _;
7539 if self.sequence != 0u32 {
7540 ::buffa::types::put_uint32_field(1u32, self.sequence, buf);
7541 }
7542 if !self.tx_ref.is_empty() {
7543 ::buffa::types::put_string_field(2u32, &self.tx_ref, buf);
7544 }
7545 if self.occurred_at_unix_ms != 0u64 {
7546 ::buffa::types::put_uint64_field(3u32, self.occurred_at_unix_ms, buf);
7547 }
7548 {
7549 let val = self.lifecycle_source.to_i32();
7550 if val != 0 {
7551 ::buffa::types::put_int32_field(4u32, val, buf);
7552 }
7553 }
7554 {
7555 let val = self.lifecycle_reason.to_i32();
7556 if val != 0 {
7557 ::buffa::types::put_int32_field(5u32, val, buf);
7558 }
7559 }
7560 if self.current_confirmations != 0u32 {
7561 ::buffa::types::put_uint32_field(6u32, self.current_confirmations, buf);
7562 }
7563 if self.required_confirmations != 0u32 {
7564 ::buffa::types::put_uint32_field(7u32, self.required_confirmations, buf);
7565 }
7566 if self.approve_count != 0u32 {
7567 ::buffa::types::put_uint32_field(8u32, self.approve_count, buf);
7568 }
7569 if self.reject_count != 0u32 {
7570 ::buffa::types::put_uint32_field(9u32, self.reject_count, buf);
7571 }
7572 if self.validator_count != 0u32 {
7573 ::buffa::types::put_uint32_field(10u32, self.validator_count, buf);
7574 }
7575 {
7576 let val = self.kind.to_i32();
7577 if val != 0 {
7578 ::buffa::types::put_int32_field(11u32, val, buf);
7579 }
7580 }
7581 if self.required_approvals != 0u32 {
7582 ::buffa::types::put_uint32_field(12u32, self.required_approvals, buf);
7583 }
7584 if self.required_rejections != 0u32 {
7585 ::buffa::types::put_uint32_field(13u32, self.required_rejections, buf);
7586 }
7587 if self.amount_e18.is_set() {
7588 ::buffa::types::put_len_delimited_header(14u32, __cache.consume_next(), buf);
7589 self.amount_e18.write_to(__cache, buf);
7590 }
7591 if !self.ledger_transfer_id.is_empty() {
7592 ::buffa::types::put_string_field(15u32, &self.ledger_transfer_id, buf);
7593 }
7594 if self.zipper_reason.is_set() {
7595 ::buffa::types::put_len_delimited_header(16u32, __cache.consume_next(), buf);
7596 self.zipper_reason.write_to(__cache, buf);
7597 }
7598 self.__buffa_unknown_fields.write_to(buf);
7599 }
7600 fn merge_field(
7601 &mut self,
7602 tag: ::buffa::encoding::Tag,
7603 buf: &mut impl ::buffa::bytes::Buf,
7604 ctx: ::buffa::DecodeContext<'_>,
7605 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
7606 #[allow(unused_imports)]
7607 use ::buffa::bytes::Buf as _;
7608 #[allow(unused_imports)]
7609 use ::buffa::Enumeration as _;
7610 match tag.field_number() {
7611 1u32 => {
7612 ::buffa::encoding::check_wire_type(
7613 tag,
7614 ::buffa::encoding::WireType::Varint,
7615 )?;
7616 self.sequence = ::buffa::types::decode_uint32(buf)?;
7617 }
7618 2u32 => {
7619 ::buffa::encoding::check_wire_type(
7620 tag,
7621 ::buffa::encoding::WireType::LengthDelimited,
7622 )?;
7623 ::buffa::types::merge_string(&mut self.tx_ref, buf)?;
7624 }
7625 3u32 => {
7626 ::buffa::encoding::check_wire_type(
7627 tag,
7628 ::buffa::encoding::WireType::Varint,
7629 )?;
7630 self.occurred_at_unix_ms = ::buffa::types::decode_uint64(buf)?;
7631 }
7632 4u32 => {
7633 ::buffa::encoding::check_wire_type(
7634 tag,
7635 ::buffa::encoding::WireType::Varint,
7636 )?;
7637 self.lifecycle_source = ::buffa::EnumValue::from(
7638 ::buffa::types::decode_int32(buf)?,
7639 );
7640 }
7641 5u32 => {
7642 ::buffa::encoding::check_wire_type(
7643 tag,
7644 ::buffa::encoding::WireType::Varint,
7645 )?;
7646 self.lifecycle_reason = ::buffa::EnumValue::from(
7647 ::buffa::types::decode_int32(buf)?,
7648 );
7649 }
7650 6u32 => {
7651 ::buffa::encoding::check_wire_type(
7652 tag,
7653 ::buffa::encoding::WireType::Varint,
7654 )?;
7655 self.current_confirmations = ::buffa::types::decode_uint32(buf)?;
7656 }
7657 7u32 => {
7658 ::buffa::encoding::check_wire_type(
7659 tag,
7660 ::buffa::encoding::WireType::Varint,
7661 )?;
7662 self.required_confirmations = ::buffa::types::decode_uint32(buf)?;
7663 }
7664 8u32 => {
7665 ::buffa::encoding::check_wire_type(
7666 tag,
7667 ::buffa::encoding::WireType::Varint,
7668 )?;
7669 self.approve_count = ::buffa::types::decode_uint32(buf)?;
7670 }
7671 9u32 => {
7672 ::buffa::encoding::check_wire_type(
7673 tag,
7674 ::buffa::encoding::WireType::Varint,
7675 )?;
7676 self.reject_count = ::buffa::types::decode_uint32(buf)?;
7677 }
7678 10u32 => {
7679 ::buffa::encoding::check_wire_type(
7680 tag,
7681 ::buffa::encoding::WireType::Varint,
7682 )?;
7683 self.validator_count = ::buffa::types::decode_uint32(buf)?;
7684 }
7685 11u32 => {
7686 ::buffa::encoding::check_wire_type(
7687 tag,
7688 ::buffa::encoding::WireType::Varint,
7689 )?;
7690 self.kind = ::buffa::EnumValue::from(::buffa::types::decode_int32(buf)?);
7691 }
7692 12u32 => {
7693 ::buffa::encoding::check_wire_type(
7694 tag,
7695 ::buffa::encoding::WireType::Varint,
7696 )?;
7697 self.required_approvals = ::buffa::types::decode_uint32(buf)?;
7698 }
7699 13u32 => {
7700 ::buffa::encoding::check_wire_type(
7701 tag,
7702 ::buffa::encoding::WireType::Varint,
7703 )?;
7704 self.required_rejections = ::buffa::types::decode_uint32(buf)?;
7705 }
7706 14u32 => {
7707 ::buffa::encoding::check_wire_type(
7708 tag,
7709 ::buffa::encoding::WireType::LengthDelimited,
7710 )?;
7711 ::buffa::Message::merge_length_delimited(
7712 self.amount_e18.get_or_insert_default(),
7713 buf,
7714 ctx,
7715 )?;
7716 }
7717 15u32 => {
7718 ::buffa::encoding::check_wire_type(
7719 tag,
7720 ::buffa::encoding::WireType::LengthDelimited,
7721 )?;
7722 ::buffa::types::merge_string(&mut self.ledger_transfer_id, buf)?;
7723 }
7724 16u32 => {
7725 ::buffa::encoding::check_wire_type(
7726 tag,
7727 ::buffa::encoding::WireType::LengthDelimited,
7728 )?;
7729 ::buffa::Message::merge_length_delimited(
7730 self.zipper_reason.get_or_insert_default(),
7731 buf,
7732 ctx,
7733 )?;
7734 }
7735 _ => {
7736 self.__buffa_unknown_fields
7737 .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
7738 }
7739 }
7740 ::core::result::Result::Ok(())
7741 }
7742 fn clear(&mut self) {
7743 self.sequence = 0u32;
7744 self.tx_ref.clear();
7745 self.occurred_at_unix_ms = 0u64;
7746 self.lifecycle_source = ::buffa::EnumValue::from(0);
7747 self.lifecycle_reason = ::buffa::EnumValue::from(0);
7748 self.current_confirmations = 0u32;
7749 self.required_confirmations = 0u32;
7750 self.approve_count = 0u32;
7751 self.reject_count = 0u32;
7752 self.validator_count = 0u32;
7753 self.kind = ::buffa::EnumValue::from(0);
7754 self.required_approvals = 0u32;
7755 self.required_rejections = 0u32;
7756 self.amount_e18 = ::buffa::MessageField::none();
7757 self.ledger_transfer_id.clear();
7758 self.zipper_reason = ::buffa::MessageField::none();
7759 self.__buffa_unknown_fields.clear();
7760 }
7761}
7762impl ::buffa::ExtensionSet for FlowStepActivityView {
7763 const PROTO_FQN: &'static str = "chain.lifecycle.v1.FlowStepActivityView";
7764 fn unknown_fields(&self) -> &::buffa::UnknownFields {
7765 &self.__buffa_unknown_fields
7766 }
7767 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
7768 &mut self.__buffa_unknown_fields
7769 }
7770}
7771impl ::buffa::json_helpers::ProtoElemJson for FlowStepActivityView {
7772 fn serialize_proto_json<S: ::serde::Serializer>(
7773 v: &Self,
7774 s: S,
7775 ) -> ::core::result::Result<S::Ok, S::Error> {
7776 ::serde::Serialize::serialize(v, s)
7777 }
7778 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
7779 d: D,
7780 ) -> ::core::result::Result<Self, D::Error> {
7781 <Self as ::serde::Deserialize>::deserialize(d)
7782 }
7783}
7784#[doc(hidden)]
7785pub const __FLOW_STEP_ACTIVITY_VIEW_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
7786 type_url: "type.googleapis.com/chain.lifecycle.v1.FlowStepActivityView",
7787 to_json: ::buffa::type_registry::any_to_json::<FlowStepActivityView>,
7788 from_json: ::buffa::type_registry::any_from_json::<FlowStepActivityView>,
7789 is_wkt: false,
7790};
7791#[derive(Clone, PartialEq, Default)]
7794#[derive(::serde::Serialize, ::serde::Deserialize)]
7795#[serde(default)]
7796pub struct FlowTimelineItemView {
7797 #[serde(
7801 rename = "sequence",
7802 with = "::buffa::json_helpers::uint32",
7803 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
7804 )]
7805 pub sequence: u32,
7806 #[serde(
7810 rename = "step",
7811 with = "::buffa::json_helpers::proto_enum",
7812 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
7813 )]
7814 pub step: ::buffa::EnumValue<FlowStep>,
7815 #[serde(
7819 rename = "status",
7820 with = "::buffa::json_helpers::proto_enum",
7821 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
7822 )]
7823 pub status: ::buffa::EnumValue<FlowTimelineStatus>,
7824 #[serde(
7829 rename = "expectedDurationMs",
7830 alias = "expected_duration_ms",
7831 with = "::buffa::json_helpers::uint64",
7832 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
7833 )]
7834 pub expected_duration_ms: u64,
7835 #[serde(skip)]
7836 #[doc(hidden)]
7837 pub __buffa_unknown_fields: ::buffa::UnknownFields,
7838}
7839impl ::core::fmt::Debug for FlowTimelineItemView {
7840 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7841 f.debug_struct("FlowTimelineItemView")
7842 .field("sequence", &self.sequence)
7843 .field("step", &self.step)
7844 .field("status", &self.status)
7845 .field("expected_duration_ms", &self.expected_duration_ms)
7846 .finish()
7847 }
7848}
7849impl FlowTimelineItemView {
7850 pub const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowTimelineItemView";
7855}
7856::buffa::impl_default_instance!(FlowTimelineItemView);
7857impl ::buffa::MessageName for FlowTimelineItemView {
7858 const PACKAGE: &'static str = "chain.lifecycle.v1";
7859 const NAME: &'static str = "FlowTimelineItemView";
7860 const FULL_NAME: &'static str = "chain.lifecycle.v1.FlowTimelineItemView";
7861 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowTimelineItemView";
7862}
7863impl ::buffa::Message for FlowTimelineItemView {
7864 #[allow(clippy::let_and_return)]
7870 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
7871 #[allow(unused_imports)]
7872 use ::buffa::Enumeration as _;
7873 let mut size = 0u32;
7874 if self.sequence != 0u32 {
7875 size += 1u32 + ::buffa::types::uint32_encoded_len(self.sequence) as u32;
7876 }
7877 {
7878 let val = self.step.to_i32();
7879 if val != 0 {
7880 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
7881 }
7882 }
7883 {
7884 let val = self.status.to_i32();
7885 if val != 0 {
7886 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
7887 }
7888 }
7889 if self.expected_duration_ms != 0u64 {
7890 size
7891 += 1u32
7892 + ::buffa::types::uint64_encoded_len(self.expected_duration_ms)
7893 as u32;
7894 }
7895 size += self.__buffa_unknown_fields.encoded_len() as u32;
7896 size
7897 }
7898 fn write_to(
7899 &self,
7900 _cache: &mut ::buffa::SizeCache,
7901 buf: &mut impl ::buffa::bytes::BufMut,
7902 ) {
7903 #[allow(unused_imports)]
7904 use ::buffa::Enumeration as _;
7905 if self.sequence != 0u32 {
7906 ::buffa::types::put_uint32_field(1u32, self.sequence, buf);
7907 }
7908 {
7909 let val = self.step.to_i32();
7910 if val != 0 {
7911 ::buffa::types::put_int32_field(2u32, val, buf);
7912 }
7913 }
7914 {
7915 let val = self.status.to_i32();
7916 if val != 0 {
7917 ::buffa::types::put_int32_field(3u32, val, buf);
7918 }
7919 }
7920 if self.expected_duration_ms != 0u64 {
7921 ::buffa::types::put_uint64_field(4u32, self.expected_duration_ms, buf);
7922 }
7923 self.__buffa_unknown_fields.write_to(buf);
7924 }
7925 fn merge_field(
7926 &mut self,
7927 tag: ::buffa::encoding::Tag,
7928 buf: &mut impl ::buffa::bytes::Buf,
7929 ctx: ::buffa::DecodeContext<'_>,
7930 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
7931 #[allow(unused_imports)]
7932 use ::buffa::bytes::Buf as _;
7933 #[allow(unused_imports)]
7934 use ::buffa::Enumeration as _;
7935 match tag.field_number() {
7936 1u32 => {
7937 ::buffa::encoding::check_wire_type(
7938 tag,
7939 ::buffa::encoding::WireType::Varint,
7940 )?;
7941 self.sequence = ::buffa::types::decode_uint32(buf)?;
7942 }
7943 2u32 => {
7944 ::buffa::encoding::check_wire_type(
7945 tag,
7946 ::buffa::encoding::WireType::Varint,
7947 )?;
7948 self.step = ::buffa::EnumValue::from(::buffa::types::decode_int32(buf)?);
7949 }
7950 3u32 => {
7951 ::buffa::encoding::check_wire_type(
7952 tag,
7953 ::buffa::encoding::WireType::Varint,
7954 )?;
7955 self.status = ::buffa::EnumValue::from(
7956 ::buffa::types::decode_int32(buf)?,
7957 );
7958 }
7959 4u32 => {
7960 ::buffa::encoding::check_wire_type(
7961 tag,
7962 ::buffa::encoding::WireType::Varint,
7963 )?;
7964 self.expected_duration_ms = ::buffa::types::decode_uint64(buf)?;
7965 }
7966 _ => {
7967 self.__buffa_unknown_fields
7968 .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
7969 }
7970 }
7971 ::core::result::Result::Ok(())
7972 }
7973 fn clear(&mut self) {
7974 self.sequence = 0u32;
7975 self.step = ::buffa::EnumValue::from(0);
7976 self.status = ::buffa::EnumValue::from(0);
7977 self.expected_duration_ms = 0u64;
7978 self.__buffa_unknown_fields.clear();
7979 }
7980}
7981impl ::buffa::ExtensionSet for FlowTimelineItemView {
7982 const PROTO_FQN: &'static str = "chain.lifecycle.v1.FlowTimelineItemView";
7983 fn unknown_fields(&self) -> &::buffa::UnknownFields {
7984 &self.__buffa_unknown_fields
7985 }
7986 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
7987 &mut self.__buffa_unknown_fields
7988 }
7989}
7990impl ::buffa::json_helpers::ProtoElemJson for FlowTimelineItemView {
7991 fn serialize_proto_json<S: ::serde::Serializer>(
7992 v: &Self,
7993 s: S,
7994 ) -> ::core::result::Result<S::Ok, S::Error> {
7995 ::serde::Serialize::serialize(v, s)
7996 }
7997 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
7998 d: D,
7999 ) -> ::core::result::Result<Self, D::Error> {
8000 <Self as ::serde::Deserialize>::deserialize(d)
8001 }
8002}
8003#[doc(hidden)]
8004pub const __FLOW_TIMELINE_ITEM_VIEW_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
8005 type_url: "type.googleapis.com/chain.lifecycle.v1.FlowTimelineItemView",
8006 to_json: ::buffa::type_registry::any_to_json::<FlowTimelineItemView>,
8007 from_json: ::buffa::type_registry::any_from_json::<FlowTimelineItemView>,
8008 is_wkt: false,
8009};
8010#[derive(Clone, PartialEq, Default)]
8012#[derive(::serde::Serialize, ::serde::Deserialize)]
8013#[serde(default)]
8014pub struct FlowDetailView {
8015 #[serde(
8019 rename = "summary",
8020 skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
8021 )]
8022 pub summary: ::buffa::MessageField<FlowSummaryView>,
8023 #[serde(
8028 rename = "observedSteps",
8029 alias = "observed_steps",
8030 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
8031 deserialize_with = "::buffa::json_helpers::null_as_default"
8032 )]
8033 pub observed_steps: ::buffa::alloc::vec::Vec<FlowStepView>,
8034 #[serde(
8039 rename = "fromLiveState",
8040 alias = "from_live_state",
8041 with = "::buffa::json_helpers::proto_bool",
8042 skip_serializing_if = "::buffa::json_helpers::skip_if::is_false"
8043 )]
8044 pub from_live_state: bool,
8045 #[serde(skip)]
8046 #[doc(hidden)]
8047 pub __buffa_unknown_fields: ::buffa::UnknownFields,
8048}
8049impl ::core::fmt::Debug for FlowDetailView {
8050 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
8051 f.debug_struct("FlowDetailView")
8052 .field("summary", &self.summary)
8053 .field("observed_steps", &self.observed_steps)
8054 .field("from_live_state", &self.from_live_state)
8055 .finish()
8056 }
8057}
8058impl FlowDetailView {
8059 pub const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowDetailView";
8064}
8065::buffa::impl_default_instance!(FlowDetailView);
8066impl ::buffa::MessageName for FlowDetailView {
8067 const PACKAGE: &'static str = "chain.lifecycle.v1";
8068 const NAME: &'static str = "FlowDetailView";
8069 const FULL_NAME: &'static str = "chain.lifecycle.v1.FlowDetailView";
8070 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowDetailView";
8071}
8072impl ::buffa::Message for FlowDetailView {
8073 #[allow(clippy::let_and_return)]
8079 fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
8080 #[allow(unused_imports)]
8081 use ::buffa::Enumeration as _;
8082 let mut size = 0u32;
8083 if self.summary.is_set() {
8084 let __slot = __cache.reserve();
8085 let inner_size = self.summary.compute_size(__cache);
8086 __cache.set(__slot, inner_size);
8087 size
8088 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
8089 + inner_size;
8090 }
8091 for v in &self.observed_steps {
8092 let __slot = __cache.reserve();
8093 let inner_size = v.compute_size(__cache);
8094 __cache.set(__slot, inner_size);
8095 size
8096 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
8097 + inner_size;
8098 }
8099 if self.from_live_state {
8100 size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
8101 }
8102 size += self.__buffa_unknown_fields.encoded_len() as u32;
8103 size
8104 }
8105 fn write_to(
8106 &self,
8107 __cache: &mut ::buffa::SizeCache,
8108 buf: &mut impl ::buffa::bytes::BufMut,
8109 ) {
8110 #[allow(unused_imports)]
8111 use ::buffa::Enumeration as _;
8112 if self.summary.is_set() {
8113 ::buffa::types::put_len_delimited_header(1u32, __cache.consume_next(), buf);
8114 self.summary.write_to(__cache, buf);
8115 }
8116 for v in &self.observed_steps {
8117 ::buffa::types::put_len_delimited_header(2u32, __cache.consume_next(), buf);
8118 v.write_to(__cache, buf);
8119 }
8120 if self.from_live_state {
8121 ::buffa::types::put_bool_field(3u32, self.from_live_state, buf);
8122 }
8123 self.__buffa_unknown_fields.write_to(buf);
8124 }
8125 fn merge_field(
8126 &mut self,
8127 tag: ::buffa::encoding::Tag,
8128 buf: &mut impl ::buffa::bytes::Buf,
8129 ctx: ::buffa::DecodeContext<'_>,
8130 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
8131 #[allow(unused_imports)]
8132 use ::buffa::bytes::Buf as _;
8133 #[allow(unused_imports)]
8134 use ::buffa::Enumeration as _;
8135 match tag.field_number() {
8136 1u32 => {
8137 ::buffa::encoding::check_wire_type(
8138 tag,
8139 ::buffa::encoding::WireType::LengthDelimited,
8140 )?;
8141 ::buffa::Message::merge_length_delimited(
8142 self.summary.get_or_insert_default(),
8143 buf,
8144 ctx,
8145 )?;
8146 }
8147 2u32 => {
8148 ::buffa::encoding::check_wire_type(
8149 tag,
8150 ::buffa::encoding::WireType::LengthDelimited,
8151 )?;
8152 let mut elem = ::core::default::Default::default();
8153 ::buffa::Message::merge_length_delimited(&mut elem, buf, ctx)?;
8154 self.observed_steps.push(elem);
8155 }
8156 3u32 => {
8157 ::buffa::encoding::check_wire_type(
8158 tag,
8159 ::buffa::encoding::WireType::Varint,
8160 )?;
8161 self.from_live_state = ::buffa::types::decode_bool(buf)?;
8162 }
8163 _ => {
8164 self.__buffa_unknown_fields
8165 .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
8166 }
8167 }
8168 ::core::result::Result::Ok(())
8169 }
8170 fn clear(&mut self) {
8171 self.summary = ::buffa::MessageField::none();
8172 self.observed_steps.clear();
8173 self.from_live_state = false;
8174 self.__buffa_unknown_fields.clear();
8175 }
8176}
8177impl ::buffa::ExtensionSet for FlowDetailView {
8178 const PROTO_FQN: &'static str = "chain.lifecycle.v1.FlowDetailView";
8179 fn unknown_fields(&self) -> &::buffa::UnknownFields {
8180 &self.__buffa_unknown_fields
8181 }
8182 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
8183 &mut self.__buffa_unknown_fields
8184 }
8185}
8186impl ::buffa::json_helpers::ProtoElemJson for FlowDetailView {
8187 fn serialize_proto_json<S: ::serde::Serializer>(
8188 v: &Self,
8189 s: S,
8190 ) -> ::core::result::Result<S::Ok, S::Error> {
8191 ::serde::Serialize::serialize(v, s)
8192 }
8193 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
8194 d: D,
8195 ) -> ::core::result::Result<Self, D::Error> {
8196 <Self as ::serde::Deserialize>::deserialize(d)
8197 }
8198}
8199#[doc(hidden)]
8200pub const __FLOW_DETAIL_VIEW_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
8201 type_url: "type.googleapis.com/chain.lifecycle.v1.FlowDetailView",
8202 to_json: ::buffa::type_registry::any_to_json::<FlowDetailView>,
8203 from_json: ::buffa::type_registry::any_from_json::<FlowDetailView>,
8204 is_wkt: false,
8205};
8206#[allow(
8207 non_camel_case_types,
8208 dead_code,
8209 unused_imports,
8210 unused_qualifications,
8211 clippy::derivable_impls,
8212 clippy::match_single_binding,
8213 clippy::uninlined_format_args,
8214 clippy::doc_lazy_continuation,
8215 clippy::module_inception
8216)]
8217pub mod __buffa {
8218 #[allow(unused_imports)]
8219 use super::*;
8220 pub mod view {
8221 #[allow(unused_imports)]
8222 use super::*;
8223 #[derive(Clone, Debug, Default)]
8225 pub struct AssetIdsView<'a> {
8226 pub zipped_asset_id: u32,
8233 pub unified_asset_id: u32,
8240 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
8241 }
8242 impl<'a> ::buffa::MessageView<'a> for AssetIdsView<'a> {
8243 type Owned = super::super::AssetIds;
8244 fn decode_view(
8245 buf: &'a [u8],
8246 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8247 let __limit = ::core::cell::Cell::new(
8248 ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
8249 );
8250 <Self as ::buffa::MessageView>::decode_view_ctx(
8251 buf,
8252 ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
8253 )
8254 }
8255 fn decode_view_with_ctx(
8256 buf: &'a [u8],
8257 ctx: ::buffa::DecodeContext<'_>,
8258 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8259 <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
8260 }
8261 fn merge_view_field(
8262 &mut self,
8263 tag: ::buffa::encoding::Tag,
8264 cur: &'a [u8],
8265 before_tag: &'a [u8],
8266 ctx: ::buffa::DecodeContext<'_>,
8267 ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
8268 let _ = ctx;
8269 #[allow(unused_variables)]
8270 let view = self;
8271 let mut cur = cur;
8272 match tag.field_number() {
8273 1u32 => {
8274 ::buffa::encoding::check_wire_type(
8275 tag,
8276 ::buffa::encoding::WireType::Varint,
8277 )?;
8278 view.zipped_asset_id = ::buffa::types::decode_uint32(&mut cur)?;
8279 }
8280 3u32 => {
8281 ::buffa::encoding::check_wire_type(
8282 tag,
8283 ::buffa::encoding::WireType::Varint,
8284 )?;
8285 view.unified_asset_id = ::buffa::types::decode_uint32(&mut cur)?;
8286 }
8287 _ => {
8288 ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
8289 let span_len = before_tag.len() - cur.len();
8290 view.__buffa_unknown_fields
8291 .push_record(before_tag, span_len, ctx)?;
8292 }
8293 }
8294 ::core::result::Result::Ok(cur)
8295 }
8296 fn to_owned_message(
8297 &self,
8298 ) -> ::core::result::Result<super::super::AssetIds, ::buffa::DecodeError> {
8299 self.to_owned_from_source(None)
8300 }
8301 #[allow(clippy::useless_conversion, clippy::needless_update)]
8302 fn to_owned_from_source(
8303 &self,
8304 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
8305 ) -> ::core::result::Result<super::super::AssetIds, ::buffa::DecodeError> {
8306 #[allow(unused_imports)]
8307 use ::buffa::alloc::string::ToString as _;
8308 let _ = __buffa_src;
8309 ::core::result::Result::Ok(super::super::AssetIds {
8310 zipped_asset_id: self.zipped_asset_id,
8311 unified_asset_id: self.unified_asset_id,
8312 __buffa_unknown_fields: self
8313 .__buffa_unknown_fields
8314 .to_owned()?
8315 .into(),
8316 ..::core::default::Default::default()
8317 })
8318 }
8319 }
8320 impl<'a> ::buffa::ViewEncode<'a> for AssetIdsView<'a> {
8321 #[allow(clippy::needless_borrow, clippy::let_and_return)]
8322 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
8323 #[allow(unused_imports)]
8324 use ::buffa::Enumeration as _;
8325 let mut size = 0u32;
8326 if self.zipped_asset_id != 0u32 {
8327 size
8328 += 1u32
8329 + ::buffa::types::uint32_encoded_len(self.zipped_asset_id)
8330 as u32;
8331 }
8332 if self.unified_asset_id != 0u32 {
8333 size
8334 += 1u32
8335 + ::buffa::types::uint32_encoded_len(self.unified_asset_id)
8336 as u32;
8337 }
8338 size += self.__buffa_unknown_fields.encoded_len() as u32;
8339 size
8340 }
8341 #[allow(clippy::needless_borrow)]
8342 fn write_to(
8343 &self,
8344 _cache: &mut ::buffa::SizeCache,
8345 buf: &mut impl ::buffa::bytes::BufMut,
8346 ) {
8347 #[allow(unused_imports)]
8348 use ::buffa::Enumeration as _;
8349 if self.zipped_asset_id != 0u32 {
8350 ::buffa::types::put_uint32_field(1u32, self.zipped_asset_id, buf);
8351 }
8352 if self.unified_asset_id != 0u32 {
8353 ::buffa::types::put_uint32_field(3u32, self.unified_asset_id, buf);
8354 }
8355 self.__buffa_unknown_fields.write_to(buf);
8356 }
8357 }
8358 impl<'__a> ::serde::Serialize for AssetIdsView<'__a> {
8370 fn serialize<__S: ::serde::Serializer>(
8371 &self,
8372 __s: __S,
8373 ) -> ::core::result::Result<__S::Ok, __S::Error> {
8374 use ::serde::ser::SerializeMap as _;
8375 let mut __map = __s.serialize_map(::core::option::Option::None)?;
8376 if !::buffa::json_helpers::skip_if::is_zero_u32(&self.zipped_asset_id) {
8377 __map
8378 .serialize_entry(
8379 "zippedAssetId",
8380 &::buffa::json_helpers::ProtoJson(&self.zipped_asset_id),
8381 )?;
8382 }
8383 if !::buffa::json_helpers::skip_if::is_zero_u32(&self.unified_asset_id) {
8384 __map
8385 .serialize_entry(
8386 "unifiedAssetId",
8387 &::buffa::json_helpers::ProtoJson(&self.unified_asset_id),
8388 )?;
8389 }
8390 __map.end()
8391 }
8392 }
8393 impl<'a> ::buffa::MessageName for AssetIdsView<'a> {
8394 const PACKAGE: &'static str = "chain.lifecycle.v1";
8395 const NAME: &'static str = "AssetIds";
8396 const FULL_NAME: &'static str = "chain.lifecycle.v1.AssetIds";
8397 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.AssetIds";
8398 }
8399 ::buffa::impl_default_view_instance!(AssetIdsView);
8400 ::buffa::impl_view_reborrow!(AssetIdsView);
8401 #[derive(Clone, Debug)]
8407 pub struct AssetIdsOwnedView(::buffa::OwnedView<AssetIdsView<'static>>);
8408 impl AssetIdsOwnedView {
8409 pub fn decode(
8419 bytes: ::buffa::bytes::Bytes,
8420 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8421 ::core::result::Result::Ok(
8422 AssetIdsOwnedView(::buffa::OwnedView::decode(bytes)?),
8423 )
8424 }
8425 pub fn decode_with_options(
8433 bytes: ::buffa::bytes::Bytes,
8434 opts: &::buffa::DecodeOptions,
8435 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8436 ::core::result::Result::Ok(
8437 AssetIdsOwnedView(
8438 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
8439 ),
8440 )
8441 }
8442 pub fn from_owned(
8449 msg: &super::super::AssetIds,
8450 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8451 ::core::result::Result::Ok(
8452 AssetIdsOwnedView(::buffa::OwnedView::from_owned(msg)?),
8453 )
8454 }
8455 #[must_use]
8457 pub fn view(&self) -> &AssetIdsView<'_> {
8458 self.0.reborrow()
8459 }
8460 pub fn to_owned_message(
8467 &self,
8468 ) -> ::core::result::Result<super::super::AssetIds, ::buffa::DecodeError> {
8469 self.0.to_owned_message()
8470 }
8471 #[must_use]
8473 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
8474 self.0.bytes()
8475 }
8476 #[must_use]
8478 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
8479 self.0.into_bytes()
8480 }
8481 #[must_use]
8488 pub fn zipped_asset_id(&self) -> u32 {
8489 self.0.reborrow().zipped_asset_id
8490 }
8491 #[must_use]
8498 pub fn unified_asset_id(&self) -> u32 {
8499 self.0.reborrow().unified_asset_id
8500 }
8501 }
8502 impl ::core::convert::From<::buffa::OwnedView<AssetIdsView<'static>>>
8503 for AssetIdsOwnedView {
8504 fn from(inner: ::buffa::OwnedView<AssetIdsView<'static>>) -> Self {
8505 AssetIdsOwnedView(inner)
8506 }
8507 }
8508 impl ::core::convert::From<AssetIdsOwnedView>
8509 for ::buffa::OwnedView<AssetIdsView<'static>> {
8510 fn from(wrapper: AssetIdsOwnedView) -> Self {
8511 wrapper.0
8512 }
8513 }
8514 impl ::core::convert::AsRef<::buffa::OwnedView<AssetIdsView<'static>>>
8515 for AssetIdsOwnedView {
8516 fn as_ref(&self) -> &::buffa::OwnedView<AssetIdsView<'static>> {
8517 &self.0
8518 }
8519 }
8520 impl ::buffa::HasMessageView for super::super::AssetIds {
8521 type View<'a> = AssetIdsView<'a>;
8522 type ViewHandle = AssetIdsOwnedView;
8523 }
8524 impl ::serde::Serialize for AssetIdsOwnedView {
8525 fn serialize<__S: ::serde::Serializer>(
8526 &self,
8527 __s: __S,
8528 ) -> ::core::result::Result<__S::Ok, __S::Error> {
8529 ::serde::Serialize::serialize(&self.0, __s)
8530 }
8531 }
8532 #[derive(Clone, Debug, Default)]
8536 pub struct RequestFeeView<'a> {
8537 pub asset_ids: ::buffa::MessageFieldView<
8541 super::super::__buffa::view::AssetIdsView<'a>,
8542 >,
8543 pub amount_e18: ::buffa::MessageFieldView<
8548 super::super::super::super::super::polyester::r#type::v1::__buffa::view::U128View<
8549 'a,
8550 >,
8551 >,
8552 pub recipient_address: &'a str,
8556 pub status: ::buffa::EnumValue<super::super::RequestFeeStatus>,
8560 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
8561 }
8562 impl<'a> ::buffa::MessageView<'a> for RequestFeeView<'a> {
8563 type Owned = super::super::RequestFee;
8564 fn decode_view(
8565 buf: &'a [u8],
8566 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8567 let __limit = ::core::cell::Cell::new(
8568 ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
8569 );
8570 <Self as ::buffa::MessageView>::decode_view_ctx(
8571 buf,
8572 ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
8573 )
8574 }
8575 fn decode_view_with_ctx(
8576 buf: &'a [u8],
8577 ctx: ::buffa::DecodeContext<'_>,
8578 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8579 <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
8580 }
8581 fn merge_view_field(
8582 &mut self,
8583 tag: ::buffa::encoding::Tag,
8584 cur: &'a [u8],
8585 before_tag: &'a [u8],
8586 ctx: ::buffa::DecodeContext<'_>,
8587 ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
8588 let _ = ctx;
8589 #[allow(unused_variables)]
8590 let view = self;
8591 let mut cur = cur;
8592 match tag.field_number() {
8593 1u32 => {
8594 ::buffa::encoding::check_wire_type(
8595 tag,
8596 ::buffa::encoding::WireType::LengthDelimited,
8597 )?;
8598 let __sub_ctx = ctx.descend()?;
8599 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
8600 match view.asset_ids.as_mut() {
8601 Some(existing) => {
8602 ::buffa::MessageView::merge_into_view(
8603 existing,
8604 sub,
8605 __sub_ctx,
8606 )?
8607 }
8608 None => {
8609 view.asset_ids = ::buffa::MessageFieldView::set(
8610 <super::super::__buffa::view::AssetIdsView as ::buffa::MessageView>::decode_view_ctx(
8611 sub,
8612 __sub_ctx,
8613 )?,
8614 );
8615 }
8616 }
8617 }
8618 2u32 => {
8619 ::buffa::encoding::check_wire_type(
8620 tag,
8621 ::buffa::encoding::WireType::LengthDelimited,
8622 )?;
8623 let __sub_ctx = ctx.descend()?;
8624 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
8625 match view.amount_e18.as_mut() {
8626 Some(existing) => {
8627 ::buffa::MessageView::merge_into_view(
8628 existing,
8629 sub,
8630 __sub_ctx,
8631 )?
8632 }
8633 None => {
8634 view.amount_e18 = ::buffa::MessageFieldView::set(
8635 <super::super::super::super::super::polyester::r#type::v1::__buffa::view::U128View as ::buffa::MessageView>::decode_view_ctx(
8636 sub,
8637 __sub_ctx,
8638 )?,
8639 );
8640 }
8641 }
8642 }
8643 3u32 => {
8644 ::buffa::encoding::check_wire_type(
8645 tag,
8646 ::buffa::encoding::WireType::LengthDelimited,
8647 )?;
8648 view.recipient_address = ::buffa::types::borrow_str(&mut cur)?;
8649 }
8650 4u32 => {
8651 ::buffa::encoding::check_wire_type(
8652 tag,
8653 ::buffa::encoding::WireType::Varint,
8654 )?;
8655 view.status = ::buffa::EnumValue::from(
8656 ::buffa::types::decode_int32(&mut cur)?,
8657 );
8658 }
8659 _ => {
8660 ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
8661 let span_len = before_tag.len() - cur.len();
8662 view.__buffa_unknown_fields
8663 .push_record(before_tag, span_len, ctx)?;
8664 }
8665 }
8666 ::core::result::Result::Ok(cur)
8667 }
8668 fn to_owned_message(
8669 &self,
8670 ) -> ::core::result::Result<super::super::RequestFee, ::buffa::DecodeError> {
8671 self.to_owned_from_source(None)
8672 }
8673 #[allow(clippy::useless_conversion, clippy::needless_update)]
8674 fn to_owned_from_source(
8675 &self,
8676 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
8677 ) -> ::core::result::Result<super::super::RequestFee, ::buffa::DecodeError> {
8678 #[allow(unused_imports)]
8679 use ::buffa::alloc::string::ToString as _;
8680 let _ = __buffa_src;
8681 ::core::result::Result::Ok(super::super::RequestFee {
8682 asset_ids: match self.asset_ids.as_option() {
8683 Some(v) => {
8684 ::buffa::MessageField::<
8685 super::super::AssetIds,
8686 >::some(v.to_owned_from_source(__buffa_src)?)
8687 }
8688 None => ::buffa::MessageField::none(),
8689 },
8690 amount_e18: match self.amount_e18.as_option() {
8691 Some(v) => {
8692 ::buffa::MessageField::<
8693 super::super::super::super::super::polyester::r#type::v1::U128,
8694 >::some(v.to_owned_from_source(__buffa_src)?)
8695 }
8696 None => ::buffa::MessageField::none(),
8697 },
8698 recipient_address: self.recipient_address.to_string(),
8699 status: self.status,
8700 __buffa_unknown_fields: self
8701 .__buffa_unknown_fields
8702 .to_owned()?
8703 .into(),
8704 ..::core::default::Default::default()
8705 })
8706 }
8707 }
8708 impl<'a> ::buffa::ViewEncode<'a> for RequestFeeView<'a> {
8709 #[allow(clippy::needless_borrow, clippy::let_and_return)]
8710 fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
8711 #[allow(unused_imports)]
8712 use ::buffa::Enumeration as _;
8713 let mut size = 0u32;
8714 if self.asset_ids.is_set() {
8715 let __slot = __cache.reserve();
8716 let inner_size = self.asset_ids.compute_size(__cache);
8717 __cache.set(__slot, inner_size);
8718 size
8719 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
8720 + inner_size;
8721 }
8722 if self.amount_e18.is_set() {
8723 let __slot = __cache.reserve();
8724 let inner_size = self.amount_e18.compute_size(__cache);
8725 __cache.set(__slot, inner_size);
8726 size
8727 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
8728 + inner_size;
8729 }
8730 if !self.recipient_address.is_empty() {
8731 size
8732 += 1u32
8733 + ::buffa::types::string_encoded_len(&self.recipient_address)
8734 as u32;
8735 }
8736 {
8737 let val = self.status.to_i32();
8738 if val != 0 {
8739 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
8740 }
8741 }
8742 size += self.__buffa_unknown_fields.encoded_len() as u32;
8743 size
8744 }
8745 #[allow(clippy::needless_borrow)]
8746 fn write_to(
8747 &self,
8748 __cache: &mut ::buffa::SizeCache,
8749 buf: &mut impl ::buffa::bytes::BufMut,
8750 ) {
8751 #[allow(unused_imports)]
8752 use ::buffa::Enumeration as _;
8753 if self.asset_ids.is_set() {
8754 ::buffa::types::put_len_delimited_header(
8755 1u32,
8756 __cache.consume_next(),
8757 buf,
8758 );
8759 self.asset_ids.write_to(__cache, buf);
8760 }
8761 if self.amount_e18.is_set() {
8762 ::buffa::types::put_len_delimited_header(
8763 2u32,
8764 __cache.consume_next(),
8765 buf,
8766 );
8767 self.amount_e18.write_to(__cache, buf);
8768 }
8769 if !self.recipient_address.is_empty() {
8770 ::buffa::types::put_string_field(3u32, &self.recipient_address, buf);
8771 }
8772 {
8773 let val = self.status.to_i32();
8774 if val != 0 {
8775 ::buffa::types::put_int32_field(4u32, val, buf);
8776 }
8777 }
8778 self.__buffa_unknown_fields.write_to(buf);
8779 }
8780 }
8781 impl<'__a> ::serde::Serialize for RequestFeeView<'__a> {
8793 fn serialize<__S: ::serde::Serializer>(
8794 &self,
8795 __s: __S,
8796 ) -> ::core::result::Result<__S::Ok, __S::Error> {
8797 use ::serde::ser::SerializeMap as _;
8798 let mut __map = __s.serialize_map(::core::option::Option::None)?;
8799 {
8800 if let ::core::option::Option::Some(__v) = self.asset_ids.as_option()
8801 {
8802 __map.serialize_entry("assetIds", __v)?;
8803 }
8804 }
8805 {
8806 if let ::core::option::Option::Some(__v) = self
8807 .amount_e18
8808 .as_option()
8809 {
8810 __map.serialize_entry("amountE18", __v)?;
8811 }
8812 }
8813 if !::buffa::json_helpers::skip_if::is_empty_str(
8814 self.recipient_address,
8815 ) {
8816 __map.serialize_entry("recipientAddress", self.recipient_address)?;
8817 }
8818 if !::buffa::json_helpers::skip_if::is_default_enum_value(&self.status) {
8819 __map.serialize_entry("status", &self.status)?;
8820 }
8821 __map.end()
8822 }
8823 }
8824 impl<'a> ::buffa::MessageName for RequestFeeView<'a> {
8825 const PACKAGE: &'static str = "chain.lifecycle.v1";
8826 const NAME: &'static str = "RequestFee";
8827 const FULL_NAME: &'static str = "chain.lifecycle.v1.RequestFee";
8828 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.RequestFee";
8829 }
8830 ::buffa::impl_default_view_instance!(RequestFeeView);
8831 ::buffa::impl_view_reborrow!(RequestFeeView);
8832 #[derive(Clone, Debug)]
8838 pub struct RequestFeeOwnedView(::buffa::OwnedView<RequestFeeView<'static>>);
8839 impl RequestFeeOwnedView {
8840 pub fn decode(
8850 bytes: ::buffa::bytes::Bytes,
8851 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8852 ::core::result::Result::Ok(
8853 RequestFeeOwnedView(::buffa::OwnedView::decode(bytes)?),
8854 )
8855 }
8856 pub fn decode_with_options(
8864 bytes: ::buffa::bytes::Bytes,
8865 opts: &::buffa::DecodeOptions,
8866 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8867 ::core::result::Result::Ok(
8868 RequestFeeOwnedView(
8869 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
8870 ),
8871 )
8872 }
8873 pub fn from_owned(
8880 msg: &super::super::RequestFee,
8881 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8882 ::core::result::Result::Ok(
8883 RequestFeeOwnedView(::buffa::OwnedView::from_owned(msg)?),
8884 )
8885 }
8886 #[must_use]
8888 pub fn view(&self) -> &RequestFeeView<'_> {
8889 self.0.reborrow()
8890 }
8891 pub fn to_owned_message(
8898 &self,
8899 ) -> ::core::result::Result<super::super::RequestFee, ::buffa::DecodeError> {
8900 self.0.to_owned_message()
8901 }
8902 #[must_use]
8904 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
8905 self.0.bytes()
8906 }
8907 #[must_use]
8909 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
8910 self.0.into_bytes()
8911 }
8912 #[must_use]
8916 pub fn asset_ids(
8917 &self,
8918 ) -> &::buffa::MessageFieldView<
8919 super::super::__buffa::view::AssetIdsView<'_>,
8920 > {
8921 &self.0.reborrow().asset_ids
8922 }
8923 #[must_use]
8928 pub fn amount_e18(
8929 &self,
8930 ) -> &::buffa::MessageFieldView<
8931 super::super::super::super::super::polyester::r#type::v1::__buffa::view::U128View<
8932 '_,
8933 >,
8934 > {
8935 &self.0.reborrow().amount_e18
8936 }
8937 #[must_use]
8941 pub fn recipient_address(&self) -> &'_ str {
8942 self.0.reborrow().recipient_address
8943 }
8944 #[must_use]
8948 pub fn status(&self) -> ::buffa::EnumValue<super::super::RequestFeeStatus> {
8949 self.0.reborrow().status
8950 }
8951 }
8952 impl ::core::convert::From<::buffa::OwnedView<RequestFeeView<'static>>>
8953 for RequestFeeOwnedView {
8954 fn from(inner: ::buffa::OwnedView<RequestFeeView<'static>>) -> Self {
8955 RequestFeeOwnedView(inner)
8956 }
8957 }
8958 impl ::core::convert::From<RequestFeeOwnedView>
8959 for ::buffa::OwnedView<RequestFeeView<'static>> {
8960 fn from(wrapper: RequestFeeOwnedView) -> Self {
8961 wrapper.0
8962 }
8963 }
8964 impl ::core::convert::AsRef<::buffa::OwnedView<RequestFeeView<'static>>>
8965 for RequestFeeOwnedView {
8966 fn as_ref(&self) -> &::buffa::OwnedView<RequestFeeView<'static>> {
8967 &self.0
8968 }
8969 }
8970 impl ::buffa::HasMessageView for super::super::RequestFee {
8971 type View<'a> = RequestFeeView<'a>;
8972 type ViewHandle = RequestFeeOwnedView;
8973 }
8974 impl ::serde::Serialize for RequestFeeOwnedView {
8975 fn serialize<__S: ::serde::Serializer>(
8976 &self,
8977 __s: __S,
8978 ) -> ::core::result::Result<__S::Ok, __S::Error> {
8979 ::serde::Serialize::serialize(&self.0, __s)
8980 }
8981 }
8982 #[derive(Clone, Debug, Default)]
8985 pub struct GetFlowResponseView<'a> {
8986 pub flow: ::buffa::MessageFieldView<
8990 super::super::__buffa::view::FlowDetailViewView<'a>,
8991 >,
8992 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
8993 }
8994 impl<'a> ::buffa::MessageView<'a> for GetFlowResponseView<'a> {
8995 type Owned = super::super::GetFlowResponse;
8996 fn decode_view(
8997 buf: &'a [u8],
8998 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8999 let __limit = ::core::cell::Cell::new(
9000 ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
9001 );
9002 <Self as ::buffa::MessageView>::decode_view_ctx(
9003 buf,
9004 ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
9005 )
9006 }
9007 fn decode_view_with_ctx(
9008 buf: &'a [u8],
9009 ctx: ::buffa::DecodeContext<'_>,
9010 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9011 <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
9012 }
9013 fn merge_view_field(
9014 &mut self,
9015 tag: ::buffa::encoding::Tag,
9016 cur: &'a [u8],
9017 before_tag: &'a [u8],
9018 ctx: ::buffa::DecodeContext<'_>,
9019 ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
9020 let _ = ctx;
9021 #[allow(unused_variables)]
9022 let view = self;
9023 let mut cur = cur;
9024 match tag.field_number() {
9025 1u32 => {
9026 ::buffa::encoding::check_wire_type(
9027 tag,
9028 ::buffa::encoding::WireType::LengthDelimited,
9029 )?;
9030 let __sub_ctx = ctx.descend()?;
9031 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
9032 match view.flow.as_mut() {
9033 Some(existing) => {
9034 ::buffa::MessageView::merge_into_view(
9035 existing,
9036 sub,
9037 __sub_ctx,
9038 )?
9039 }
9040 None => {
9041 view.flow = ::buffa::MessageFieldView::set(
9042 <super::super::__buffa::view::FlowDetailViewView as ::buffa::MessageView>::decode_view_ctx(
9043 sub,
9044 __sub_ctx,
9045 )?,
9046 );
9047 }
9048 }
9049 }
9050 _ => {
9051 ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
9052 let span_len = before_tag.len() - cur.len();
9053 view.__buffa_unknown_fields
9054 .push_record(before_tag, span_len, ctx)?;
9055 }
9056 }
9057 ::core::result::Result::Ok(cur)
9058 }
9059 fn to_owned_message(
9060 &self,
9061 ) -> ::core::result::Result<
9062 super::super::GetFlowResponse,
9063 ::buffa::DecodeError,
9064 > {
9065 self.to_owned_from_source(None)
9066 }
9067 #[allow(clippy::useless_conversion, clippy::needless_update)]
9068 fn to_owned_from_source(
9069 &self,
9070 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
9071 ) -> ::core::result::Result<
9072 super::super::GetFlowResponse,
9073 ::buffa::DecodeError,
9074 > {
9075 #[allow(unused_imports)]
9076 use ::buffa::alloc::string::ToString as _;
9077 let _ = __buffa_src;
9078 ::core::result::Result::Ok(super::super::GetFlowResponse {
9079 flow: match self.flow.as_option() {
9080 Some(v) => {
9081 ::buffa::MessageField::<
9082 super::super::FlowDetailView,
9083 >::some(v.to_owned_from_source(__buffa_src)?)
9084 }
9085 None => ::buffa::MessageField::none(),
9086 },
9087 __buffa_unknown_fields: self
9088 .__buffa_unknown_fields
9089 .to_owned()?
9090 .into(),
9091 ..::core::default::Default::default()
9092 })
9093 }
9094 }
9095 impl<'a> ::buffa::ViewEncode<'a> for GetFlowResponseView<'a> {
9096 #[allow(clippy::needless_borrow, clippy::let_and_return)]
9097 fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
9098 #[allow(unused_imports)]
9099 use ::buffa::Enumeration as _;
9100 let mut size = 0u32;
9101 if self.flow.is_set() {
9102 let __slot = __cache.reserve();
9103 let inner_size = self.flow.compute_size(__cache);
9104 __cache.set(__slot, inner_size);
9105 size
9106 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
9107 + inner_size;
9108 }
9109 size += self.__buffa_unknown_fields.encoded_len() as u32;
9110 size
9111 }
9112 #[allow(clippy::needless_borrow)]
9113 fn write_to(
9114 &self,
9115 __cache: &mut ::buffa::SizeCache,
9116 buf: &mut impl ::buffa::bytes::BufMut,
9117 ) {
9118 #[allow(unused_imports)]
9119 use ::buffa::Enumeration as _;
9120 if self.flow.is_set() {
9121 ::buffa::types::put_len_delimited_header(
9122 1u32,
9123 __cache.consume_next(),
9124 buf,
9125 );
9126 self.flow.write_to(__cache, buf);
9127 }
9128 self.__buffa_unknown_fields.write_to(buf);
9129 }
9130 }
9131 impl<'__a> ::serde::Serialize for GetFlowResponseView<'__a> {
9143 fn serialize<__S: ::serde::Serializer>(
9144 &self,
9145 __s: __S,
9146 ) -> ::core::result::Result<__S::Ok, __S::Error> {
9147 use ::serde::ser::SerializeMap as _;
9148 let mut __map = __s.serialize_map(::core::option::Option::None)?;
9149 {
9150 if let ::core::option::Option::Some(__v) = self.flow.as_option() {
9151 __map.serialize_entry("flow", __v)?;
9152 }
9153 }
9154 __map.end()
9155 }
9156 }
9157 impl<'a> ::buffa::MessageName for GetFlowResponseView<'a> {
9158 const PACKAGE: &'static str = "chain.lifecycle.v1";
9159 const NAME: &'static str = "GetFlowResponse";
9160 const FULL_NAME: &'static str = "chain.lifecycle.v1.GetFlowResponse";
9161 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.GetFlowResponse";
9162 }
9163 ::buffa::impl_default_view_instance!(GetFlowResponseView);
9164 ::buffa::impl_view_reborrow!(GetFlowResponseView);
9165 #[derive(Clone, Debug)]
9171 pub struct GetFlowResponseOwnedView(
9172 ::buffa::OwnedView<GetFlowResponseView<'static>>,
9173 );
9174 impl GetFlowResponseOwnedView {
9175 pub fn decode(
9185 bytes: ::buffa::bytes::Bytes,
9186 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9187 ::core::result::Result::Ok(
9188 GetFlowResponseOwnedView(::buffa::OwnedView::decode(bytes)?),
9189 )
9190 }
9191 pub fn decode_with_options(
9199 bytes: ::buffa::bytes::Bytes,
9200 opts: &::buffa::DecodeOptions,
9201 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9202 ::core::result::Result::Ok(
9203 GetFlowResponseOwnedView(
9204 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
9205 ),
9206 )
9207 }
9208 pub fn from_owned(
9215 msg: &super::super::GetFlowResponse,
9216 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9217 ::core::result::Result::Ok(
9218 GetFlowResponseOwnedView(::buffa::OwnedView::from_owned(msg)?),
9219 )
9220 }
9221 #[must_use]
9223 pub fn view(&self) -> &GetFlowResponseView<'_> {
9224 self.0.reborrow()
9225 }
9226 pub fn to_owned_message(
9233 &self,
9234 ) -> ::core::result::Result<
9235 super::super::GetFlowResponse,
9236 ::buffa::DecodeError,
9237 > {
9238 self.0.to_owned_message()
9239 }
9240 #[must_use]
9242 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
9243 self.0.bytes()
9244 }
9245 #[must_use]
9247 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
9248 self.0.into_bytes()
9249 }
9250 #[must_use]
9254 pub fn flow(
9255 &self,
9256 ) -> &::buffa::MessageFieldView<
9257 super::super::__buffa::view::FlowDetailViewView<'_>,
9258 > {
9259 &self.0.reborrow().flow
9260 }
9261 }
9262 impl ::core::convert::From<::buffa::OwnedView<GetFlowResponseView<'static>>>
9263 for GetFlowResponseOwnedView {
9264 fn from(inner: ::buffa::OwnedView<GetFlowResponseView<'static>>) -> Self {
9265 GetFlowResponseOwnedView(inner)
9266 }
9267 }
9268 impl ::core::convert::From<GetFlowResponseOwnedView>
9269 for ::buffa::OwnedView<GetFlowResponseView<'static>> {
9270 fn from(wrapper: GetFlowResponseOwnedView) -> Self {
9271 wrapper.0
9272 }
9273 }
9274 impl ::core::convert::AsRef<::buffa::OwnedView<GetFlowResponseView<'static>>>
9275 for GetFlowResponseOwnedView {
9276 fn as_ref(&self) -> &::buffa::OwnedView<GetFlowResponseView<'static>> {
9277 &self.0
9278 }
9279 }
9280 impl ::buffa::HasMessageView for super::super::GetFlowResponse {
9281 type View<'a> = GetFlowResponseView<'a>;
9282 type ViewHandle = GetFlowResponseOwnedView;
9283 }
9284 impl ::serde::Serialize for GetFlowResponseOwnedView {
9285 fn serialize<__S: ::serde::Serializer>(
9286 &self,
9287 __s: __S,
9288 ) -> ::core::result::Result<__S::Ok, __S::Error> {
9289 ::serde::Serialize::serialize(&self.0, __s)
9290 }
9291 }
9292 #[derive(Clone, Debug, Default)]
9294 pub struct GetFlowByIdRequestView<'a> {
9295 pub flow_id: &'a str,
9299 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
9300 }
9301 impl<'a> ::buffa::MessageView<'a> for GetFlowByIdRequestView<'a> {
9302 type Owned = super::super::GetFlowByIdRequest;
9303 fn decode_view(
9304 buf: &'a [u8],
9305 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9306 let __limit = ::core::cell::Cell::new(
9307 ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
9308 );
9309 <Self as ::buffa::MessageView>::decode_view_ctx(
9310 buf,
9311 ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
9312 )
9313 }
9314 fn decode_view_with_ctx(
9315 buf: &'a [u8],
9316 ctx: ::buffa::DecodeContext<'_>,
9317 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9318 <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
9319 }
9320 fn merge_view_field(
9321 &mut self,
9322 tag: ::buffa::encoding::Tag,
9323 cur: &'a [u8],
9324 before_tag: &'a [u8],
9325 ctx: ::buffa::DecodeContext<'_>,
9326 ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
9327 let _ = ctx;
9328 #[allow(unused_variables)]
9329 let view = self;
9330 let mut cur = cur;
9331 match tag.field_number() {
9332 1u32 => {
9333 ::buffa::encoding::check_wire_type(
9334 tag,
9335 ::buffa::encoding::WireType::LengthDelimited,
9336 )?;
9337 view.flow_id = ::buffa::types::borrow_str(&mut cur)?;
9338 }
9339 _ => {
9340 ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
9341 let span_len = before_tag.len() - cur.len();
9342 view.__buffa_unknown_fields
9343 .push_record(before_tag, span_len, ctx)?;
9344 }
9345 }
9346 ::core::result::Result::Ok(cur)
9347 }
9348 fn to_owned_message(
9349 &self,
9350 ) -> ::core::result::Result<
9351 super::super::GetFlowByIdRequest,
9352 ::buffa::DecodeError,
9353 > {
9354 self.to_owned_from_source(None)
9355 }
9356 #[allow(clippy::useless_conversion, clippy::needless_update)]
9357 fn to_owned_from_source(
9358 &self,
9359 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
9360 ) -> ::core::result::Result<
9361 super::super::GetFlowByIdRequest,
9362 ::buffa::DecodeError,
9363 > {
9364 #[allow(unused_imports)]
9365 use ::buffa::alloc::string::ToString as _;
9366 let _ = __buffa_src;
9367 ::core::result::Result::Ok(super::super::GetFlowByIdRequest {
9368 flow_id: self.flow_id.to_string(),
9369 __buffa_unknown_fields: self
9370 .__buffa_unknown_fields
9371 .to_owned()?
9372 .into(),
9373 ..::core::default::Default::default()
9374 })
9375 }
9376 }
9377 impl<'a> ::buffa::ViewEncode<'a> for GetFlowByIdRequestView<'a> {
9378 #[allow(clippy::needless_borrow, clippy::let_and_return)]
9379 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
9380 #[allow(unused_imports)]
9381 use ::buffa::Enumeration as _;
9382 let mut size = 0u32;
9383 if !self.flow_id.is_empty() {
9384 size
9385 += 1u32
9386 + ::buffa::types::string_encoded_len(&self.flow_id) as u32;
9387 }
9388 size += self.__buffa_unknown_fields.encoded_len() as u32;
9389 size
9390 }
9391 #[allow(clippy::needless_borrow)]
9392 fn write_to(
9393 &self,
9394 _cache: &mut ::buffa::SizeCache,
9395 buf: &mut impl ::buffa::bytes::BufMut,
9396 ) {
9397 #[allow(unused_imports)]
9398 use ::buffa::Enumeration as _;
9399 if !self.flow_id.is_empty() {
9400 ::buffa::types::put_string_field(1u32, &self.flow_id, buf);
9401 }
9402 self.__buffa_unknown_fields.write_to(buf);
9403 }
9404 }
9405 impl<'__a> ::serde::Serialize for GetFlowByIdRequestView<'__a> {
9417 fn serialize<__S: ::serde::Serializer>(
9418 &self,
9419 __s: __S,
9420 ) -> ::core::result::Result<__S::Ok, __S::Error> {
9421 use ::serde::ser::SerializeMap as _;
9422 let mut __map = __s.serialize_map(::core::option::Option::None)?;
9423 if !::buffa::json_helpers::skip_if::is_empty_str(self.flow_id) {
9424 __map.serialize_entry("flowId", self.flow_id)?;
9425 }
9426 __map.end()
9427 }
9428 }
9429 impl<'a> ::buffa::MessageName for GetFlowByIdRequestView<'a> {
9430 const PACKAGE: &'static str = "chain.lifecycle.v1";
9431 const NAME: &'static str = "GetFlowByIdRequest";
9432 const FULL_NAME: &'static str = "chain.lifecycle.v1.GetFlowByIdRequest";
9433 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.GetFlowByIdRequest";
9434 }
9435 ::buffa::impl_default_view_instance!(GetFlowByIdRequestView);
9436 ::buffa::impl_view_reborrow!(GetFlowByIdRequestView);
9437 #[derive(Clone, Debug)]
9443 pub struct GetFlowByIdRequestOwnedView(
9444 ::buffa::OwnedView<GetFlowByIdRequestView<'static>>,
9445 );
9446 impl GetFlowByIdRequestOwnedView {
9447 pub fn decode(
9457 bytes: ::buffa::bytes::Bytes,
9458 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9459 ::core::result::Result::Ok(
9460 GetFlowByIdRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
9461 )
9462 }
9463 pub fn decode_with_options(
9471 bytes: ::buffa::bytes::Bytes,
9472 opts: &::buffa::DecodeOptions,
9473 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9474 ::core::result::Result::Ok(
9475 GetFlowByIdRequestOwnedView(
9476 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
9477 ),
9478 )
9479 }
9480 pub fn from_owned(
9487 msg: &super::super::GetFlowByIdRequest,
9488 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9489 ::core::result::Result::Ok(
9490 GetFlowByIdRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
9491 )
9492 }
9493 #[must_use]
9495 pub fn view(&self) -> &GetFlowByIdRequestView<'_> {
9496 self.0.reborrow()
9497 }
9498 pub fn to_owned_message(
9505 &self,
9506 ) -> ::core::result::Result<
9507 super::super::GetFlowByIdRequest,
9508 ::buffa::DecodeError,
9509 > {
9510 self.0.to_owned_message()
9511 }
9512 #[must_use]
9514 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
9515 self.0.bytes()
9516 }
9517 #[must_use]
9519 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
9520 self.0.into_bytes()
9521 }
9522 #[must_use]
9526 pub fn flow_id(&self) -> &'_ str {
9527 self.0.reborrow().flow_id
9528 }
9529 }
9530 impl ::core::convert::From<::buffa::OwnedView<GetFlowByIdRequestView<'static>>>
9531 for GetFlowByIdRequestOwnedView {
9532 fn from(inner: ::buffa::OwnedView<GetFlowByIdRequestView<'static>>) -> Self {
9533 GetFlowByIdRequestOwnedView(inner)
9534 }
9535 }
9536 impl ::core::convert::From<GetFlowByIdRequestOwnedView>
9537 for ::buffa::OwnedView<GetFlowByIdRequestView<'static>> {
9538 fn from(wrapper: GetFlowByIdRequestOwnedView) -> Self {
9539 wrapper.0
9540 }
9541 }
9542 impl ::core::convert::AsRef<::buffa::OwnedView<GetFlowByIdRequestView<'static>>>
9543 for GetFlowByIdRequestOwnedView {
9544 fn as_ref(&self) -> &::buffa::OwnedView<GetFlowByIdRequestView<'static>> {
9545 &self.0
9546 }
9547 }
9548 impl ::buffa::HasMessageView for super::super::GetFlowByIdRequest {
9549 type View<'a> = GetFlowByIdRequestView<'a>;
9550 type ViewHandle = GetFlowByIdRequestOwnedView;
9551 }
9552 impl ::serde::Serialize for GetFlowByIdRequestOwnedView {
9553 fn serialize<__S: ::serde::Serializer>(
9554 &self,
9555 __s: __S,
9556 ) -> ::core::result::Result<__S::Ok, __S::Error> {
9557 ::serde::Serialize::serialize(&self.0, __s)
9558 }
9559 }
9560 #[derive(Clone, Debug, Default)]
9563 pub struct ListFlowsByTxRequestView<'a> {
9564 pub tx_hash: &'a str,
9571 pub lookup_kind: ::buffa::EnumValue<super::super::TxLookupKind>,
9575 pub limit: u32,
9580 pub page_token: &'a str,
9585 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
9586 }
9587 impl<'a> ::buffa::MessageView<'a> for ListFlowsByTxRequestView<'a> {
9588 type Owned = super::super::ListFlowsByTxRequest;
9589 fn decode_view(
9590 buf: &'a [u8],
9591 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9592 let __limit = ::core::cell::Cell::new(
9593 ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
9594 );
9595 <Self as ::buffa::MessageView>::decode_view_ctx(
9596 buf,
9597 ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
9598 )
9599 }
9600 fn decode_view_with_ctx(
9601 buf: &'a [u8],
9602 ctx: ::buffa::DecodeContext<'_>,
9603 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9604 <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
9605 }
9606 fn merge_view_field(
9607 &mut self,
9608 tag: ::buffa::encoding::Tag,
9609 cur: &'a [u8],
9610 before_tag: &'a [u8],
9611 ctx: ::buffa::DecodeContext<'_>,
9612 ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
9613 let _ = ctx;
9614 #[allow(unused_variables)]
9615 let view = self;
9616 let mut cur = cur;
9617 match tag.field_number() {
9618 1u32 => {
9619 ::buffa::encoding::check_wire_type(
9620 tag,
9621 ::buffa::encoding::WireType::LengthDelimited,
9622 )?;
9623 view.tx_hash = ::buffa::types::borrow_str(&mut cur)?;
9624 }
9625 2u32 => {
9626 ::buffa::encoding::check_wire_type(
9627 tag,
9628 ::buffa::encoding::WireType::Varint,
9629 )?;
9630 view.lookup_kind = ::buffa::EnumValue::from(
9631 ::buffa::types::decode_int32(&mut cur)?,
9632 );
9633 }
9634 3u32 => {
9635 ::buffa::encoding::check_wire_type(
9636 tag,
9637 ::buffa::encoding::WireType::Varint,
9638 )?;
9639 view.limit = ::buffa::types::decode_uint32(&mut cur)?;
9640 }
9641 4u32 => {
9642 ::buffa::encoding::check_wire_type(
9643 tag,
9644 ::buffa::encoding::WireType::LengthDelimited,
9645 )?;
9646 view.page_token = ::buffa::types::borrow_str(&mut cur)?;
9647 }
9648 _ => {
9649 ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
9650 let span_len = before_tag.len() - cur.len();
9651 view.__buffa_unknown_fields
9652 .push_record(before_tag, span_len, ctx)?;
9653 }
9654 }
9655 ::core::result::Result::Ok(cur)
9656 }
9657 fn to_owned_message(
9658 &self,
9659 ) -> ::core::result::Result<
9660 super::super::ListFlowsByTxRequest,
9661 ::buffa::DecodeError,
9662 > {
9663 self.to_owned_from_source(None)
9664 }
9665 #[allow(clippy::useless_conversion, clippy::needless_update)]
9666 fn to_owned_from_source(
9667 &self,
9668 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
9669 ) -> ::core::result::Result<
9670 super::super::ListFlowsByTxRequest,
9671 ::buffa::DecodeError,
9672 > {
9673 #[allow(unused_imports)]
9674 use ::buffa::alloc::string::ToString as _;
9675 let _ = __buffa_src;
9676 ::core::result::Result::Ok(super::super::ListFlowsByTxRequest {
9677 tx_hash: self.tx_hash.to_string(),
9678 lookup_kind: self.lookup_kind,
9679 limit: self.limit,
9680 page_token: self.page_token.to_string(),
9681 __buffa_unknown_fields: self
9682 .__buffa_unknown_fields
9683 .to_owned()?
9684 .into(),
9685 ..::core::default::Default::default()
9686 })
9687 }
9688 }
9689 impl<'a> ::buffa::ViewEncode<'a> for ListFlowsByTxRequestView<'a> {
9690 #[allow(clippy::needless_borrow, clippy::let_and_return)]
9691 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
9692 #[allow(unused_imports)]
9693 use ::buffa::Enumeration as _;
9694 let mut size = 0u32;
9695 if !self.tx_hash.is_empty() {
9696 size
9697 += 1u32
9698 + ::buffa::types::string_encoded_len(&self.tx_hash) as u32;
9699 }
9700 {
9701 let val = self.lookup_kind.to_i32();
9702 if val != 0 {
9703 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
9704 }
9705 }
9706 if self.limit != 0u32 {
9707 size += 1u32 + ::buffa::types::uint32_encoded_len(self.limit) as u32;
9708 }
9709 if !self.page_token.is_empty() {
9710 size
9711 += 1u32
9712 + ::buffa::types::string_encoded_len(&self.page_token)
9713 as u32;
9714 }
9715 size += self.__buffa_unknown_fields.encoded_len() as u32;
9716 size
9717 }
9718 #[allow(clippy::needless_borrow)]
9719 fn write_to(
9720 &self,
9721 _cache: &mut ::buffa::SizeCache,
9722 buf: &mut impl ::buffa::bytes::BufMut,
9723 ) {
9724 #[allow(unused_imports)]
9725 use ::buffa::Enumeration as _;
9726 if !self.tx_hash.is_empty() {
9727 ::buffa::types::put_string_field(1u32, &self.tx_hash, buf);
9728 }
9729 {
9730 let val = self.lookup_kind.to_i32();
9731 if val != 0 {
9732 ::buffa::types::put_int32_field(2u32, val, buf);
9733 }
9734 }
9735 if self.limit != 0u32 {
9736 ::buffa::types::put_uint32_field(3u32, self.limit, buf);
9737 }
9738 if !self.page_token.is_empty() {
9739 ::buffa::types::put_string_field(4u32, &self.page_token, buf);
9740 }
9741 self.__buffa_unknown_fields.write_to(buf);
9742 }
9743 }
9744 impl<'__a> ::serde::Serialize for ListFlowsByTxRequestView<'__a> {
9756 fn serialize<__S: ::serde::Serializer>(
9757 &self,
9758 __s: __S,
9759 ) -> ::core::result::Result<__S::Ok, __S::Error> {
9760 use ::serde::ser::SerializeMap as _;
9761 let mut __map = __s.serialize_map(::core::option::Option::None)?;
9762 if !::buffa::json_helpers::skip_if::is_empty_str(self.tx_hash) {
9763 __map.serialize_entry("txHash", self.tx_hash)?;
9764 }
9765 if !::buffa::json_helpers::skip_if::is_default_enum_value(
9766 &self.lookup_kind,
9767 ) {
9768 __map.serialize_entry("lookupKind", &self.lookup_kind)?;
9769 }
9770 if !::buffa::json_helpers::skip_if::is_zero_u32(&self.limit) {
9771 __map
9772 .serialize_entry(
9773 "limit",
9774 &::buffa::json_helpers::ProtoJson(&self.limit),
9775 )?;
9776 }
9777 if !::buffa::json_helpers::skip_if::is_empty_str(self.page_token) {
9778 __map.serialize_entry("pageToken", self.page_token)?;
9779 }
9780 __map.end()
9781 }
9782 }
9783 impl<'a> ::buffa::MessageName for ListFlowsByTxRequestView<'a> {
9784 const PACKAGE: &'static str = "chain.lifecycle.v1";
9785 const NAME: &'static str = "ListFlowsByTxRequest";
9786 const FULL_NAME: &'static str = "chain.lifecycle.v1.ListFlowsByTxRequest";
9787 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.ListFlowsByTxRequest";
9788 }
9789 ::buffa::impl_default_view_instance!(ListFlowsByTxRequestView);
9790 ::buffa::impl_view_reborrow!(ListFlowsByTxRequestView);
9791 #[derive(Clone, Debug)]
9797 pub struct ListFlowsByTxRequestOwnedView(
9798 ::buffa::OwnedView<ListFlowsByTxRequestView<'static>>,
9799 );
9800 impl ListFlowsByTxRequestOwnedView {
9801 pub fn decode(
9811 bytes: ::buffa::bytes::Bytes,
9812 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9813 ::core::result::Result::Ok(
9814 ListFlowsByTxRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
9815 )
9816 }
9817 pub fn decode_with_options(
9825 bytes: ::buffa::bytes::Bytes,
9826 opts: &::buffa::DecodeOptions,
9827 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9828 ::core::result::Result::Ok(
9829 ListFlowsByTxRequestOwnedView(
9830 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
9831 ),
9832 )
9833 }
9834 pub fn from_owned(
9841 msg: &super::super::ListFlowsByTxRequest,
9842 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9843 ::core::result::Result::Ok(
9844 ListFlowsByTxRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
9845 )
9846 }
9847 #[must_use]
9849 pub fn view(&self) -> &ListFlowsByTxRequestView<'_> {
9850 self.0.reborrow()
9851 }
9852 pub fn to_owned_message(
9859 &self,
9860 ) -> ::core::result::Result<
9861 super::super::ListFlowsByTxRequest,
9862 ::buffa::DecodeError,
9863 > {
9864 self.0.to_owned_message()
9865 }
9866 #[must_use]
9868 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
9869 self.0.bytes()
9870 }
9871 #[must_use]
9873 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
9874 self.0.into_bytes()
9875 }
9876 #[must_use]
9883 pub fn tx_hash(&self) -> &'_ str {
9884 self.0.reborrow().tx_hash
9885 }
9886 #[must_use]
9890 pub fn lookup_kind(&self) -> ::buffa::EnumValue<super::super::TxLookupKind> {
9891 self.0.reborrow().lookup_kind
9892 }
9893 #[must_use]
9898 pub fn limit(&self) -> u32 {
9899 self.0.reborrow().limit
9900 }
9901 #[must_use]
9906 pub fn page_token(&self) -> &'_ str {
9907 self.0.reborrow().page_token
9908 }
9909 }
9910 impl ::core::convert::From<::buffa::OwnedView<ListFlowsByTxRequestView<'static>>>
9911 for ListFlowsByTxRequestOwnedView {
9912 fn from(
9913 inner: ::buffa::OwnedView<ListFlowsByTxRequestView<'static>>,
9914 ) -> Self {
9915 ListFlowsByTxRequestOwnedView(inner)
9916 }
9917 }
9918 impl ::core::convert::From<ListFlowsByTxRequestOwnedView>
9919 for ::buffa::OwnedView<ListFlowsByTxRequestView<'static>> {
9920 fn from(wrapper: ListFlowsByTxRequestOwnedView) -> Self {
9921 wrapper.0
9922 }
9923 }
9924 impl ::core::convert::AsRef<
9925 ::buffa::OwnedView<ListFlowsByTxRequestView<'static>>,
9926 > for ListFlowsByTxRequestOwnedView {
9927 fn as_ref(&self) -> &::buffa::OwnedView<ListFlowsByTxRequestView<'static>> {
9928 &self.0
9929 }
9930 }
9931 impl ::buffa::HasMessageView for super::super::ListFlowsByTxRequest {
9932 type View<'a> = ListFlowsByTxRequestView<'a>;
9933 type ViewHandle = ListFlowsByTxRequestOwnedView;
9934 }
9935 impl ::serde::Serialize for ListFlowsByTxRequestOwnedView {
9936 fn serialize<__S: ::serde::Serializer>(
9937 &self,
9938 __s: __S,
9939 ) -> ::core::result::Result<__S::Ok, __S::Error> {
9940 ::serde::Serialize::serialize(&self.0, __s)
9941 }
9942 }
9943 #[derive(Clone, Debug, Default)]
9945 pub struct ListFlowsRequestView<'a> {
9946 pub limit: u32,
9951 pub sort: ::buffa::EnumValue<super::super::Sort>,
9955 pub flow_kind: ::buffa::EnumValue<super::super::FlowKind>,
9959 pub flow_state: ::buffa::EnumValue<super::super::FlowState>,
9964 pub tx_ref: &'a str,
9969 pub scope: ::buffa::EnumValue<super::super::ListScope>,
9973 pub polyester_chain_ids: ::buffa::RepeatedView<'a, u32>,
9977 pub zipped_asset_ids: ::buffa::RepeatedView<'a, u32>,
9981 pub unified_asset_ids: ::buffa::RepeatedView<'a, u32>,
9985 pub page_token: &'a str,
9991 pub order_by: ::buffa::EnumValue<super::super::ListOrderBy>,
9995 pub account_selector: ::core::option::Option<
9996 super::super::__buffa::view::oneof::list_flows_request::AccountSelector<
9997 'a,
9998 >,
9999 >,
10000 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
10001 }
10002 impl<'a> ::buffa::MessageView<'a> for ListFlowsRequestView<'a> {
10003 type Owned = super::super::ListFlowsRequest;
10004 fn decode_view(
10005 buf: &'a [u8],
10006 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10007 let __limit = ::core::cell::Cell::new(
10008 ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
10009 );
10010 <Self as ::buffa::MessageView>::decode_view_ctx(
10011 buf,
10012 ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
10013 )
10014 }
10015 fn decode_view_with_ctx(
10016 buf: &'a [u8],
10017 ctx: ::buffa::DecodeContext<'_>,
10018 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10019 <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
10020 }
10021 fn merge_view_field(
10022 &mut self,
10023 tag: ::buffa::encoding::Tag,
10024 cur: &'a [u8],
10025 before_tag: &'a [u8],
10026 ctx: ::buffa::DecodeContext<'_>,
10027 ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
10028 let _ = ctx;
10029 #[allow(unused_variables)]
10030 let view = self;
10031 let mut cur = cur;
10032 match tag.field_number() {
10033 1u32 => {
10034 ::buffa::encoding::check_wire_type(
10035 tag,
10036 ::buffa::encoding::WireType::Varint,
10037 )?;
10038 view.limit = ::buffa::types::decode_uint32(&mut cur)?;
10039 }
10040 2u32 => {
10041 ::buffa::encoding::check_wire_type(
10042 tag,
10043 ::buffa::encoding::WireType::Varint,
10044 )?;
10045 view.sort = ::buffa::EnumValue::from(
10046 ::buffa::types::decode_int32(&mut cur)?,
10047 );
10048 }
10049 3u32 => {
10050 ::buffa::encoding::check_wire_type(
10051 tag,
10052 ::buffa::encoding::WireType::Varint,
10053 )?;
10054 view.flow_kind = ::buffa::EnumValue::from(
10055 ::buffa::types::decode_int32(&mut cur)?,
10056 );
10057 }
10058 4u32 => {
10059 ::buffa::encoding::check_wire_type(
10060 tag,
10061 ::buffa::encoding::WireType::Varint,
10062 )?;
10063 view.flow_state = ::buffa::EnumValue::from(
10064 ::buffa::types::decode_int32(&mut cur)?,
10065 );
10066 }
10067 5u32 => {
10068 ::buffa::encoding::check_wire_type(
10069 tag,
10070 ::buffa::encoding::WireType::LengthDelimited,
10071 )?;
10072 view.tx_ref = ::buffa::types::borrow_str(&mut cur)?;
10073 }
10074 6u32 => {
10075 ::buffa::encoding::check_wire_type(
10076 tag,
10077 ::buffa::encoding::WireType::Varint,
10078 )?;
10079 view.scope = ::buffa::EnumValue::from(
10080 ::buffa::types::decode_int32(&mut cur)?,
10081 );
10082 }
10083 12u32 => {
10084 ::buffa::encoding::check_wire_type(
10085 tag,
10086 ::buffa::encoding::WireType::LengthDelimited,
10087 )?;
10088 view.page_token = ::buffa::types::borrow_str(&mut cur)?;
10089 }
10090 13u32 => {
10091 ::buffa::encoding::check_wire_type(
10092 tag,
10093 ::buffa::encoding::WireType::Varint,
10094 )?;
10095 view.order_by = ::buffa::EnumValue::from(
10096 ::buffa::types::decode_int32(&mut cur)?,
10097 );
10098 }
10099 9u32 => {
10100 if tag.wire_type()
10101 == ::buffa::encoding::WireType::LengthDelimited
10102 {
10103 let payload = ::buffa::types::borrow_bytes(&mut cur)?;
10104 view.polyester_chain_ids
10105 .reserve(::buffa::encoding::count_varints(payload));
10106 let mut pcur: &[u8] = payload;
10107 while !pcur.is_empty() {
10108 view.polyester_chain_ids
10109 .push(::buffa::types::decode_uint32(&mut pcur)?);
10110 }
10111 } else if tag.wire_type() == ::buffa::encoding::WireType::Varint
10112 {
10113 view.polyester_chain_ids
10114 .push(::buffa::types::decode_uint32(&mut cur)?);
10115 } else {
10116 return Err(
10117 ::buffa::encoding::wire_type_mismatch(
10118 tag,
10119 ::buffa::encoding::WireType::LengthDelimited,
10120 ),
10121 );
10122 }
10123 }
10124 10u32 => {
10125 if tag.wire_type()
10126 == ::buffa::encoding::WireType::LengthDelimited
10127 {
10128 let payload = ::buffa::types::borrow_bytes(&mut cur)?;
10129 view.zipped_asset_ids
10130 .reserve(::buffa::encoding::count_varints(payload));
10131 let mut pcur: &[u8] = payload;
10132 while !pcur.is_empty() {
10133 view.zipped_asset_ids
10134 .push(::buffa::types::decode_uint32(&mut pcur)?);
10135 }
10136 } else if tag.wire_type() == ::buffa::encoding::WireType::Varint
10137 {
10138 view.zipped_asset_ids
10139 .push(::buffa::types::decode_uint32(&mut cur)?);
10140 } else {
10141 return Err(
10142 ::buffa::encoding::wire_type_mismatch(
10143 tag,
10144 ::buffa::encoding::WireType::LengthDelimited,
10145 ),
10146 );
10147 }
10148 }
10149 11u32 => {
10150 if tag.wire_type()
10151 == ::buffa::encoding::WireType::LengthDelimited
10152 {
10153 let payload = ::buffa::types::borrow_bytes(&mut cur)?;
10154 view.unified_asset_ids
10155 .reserve(::buffa::encoding::count_varints(payload));
10156 let mut pcur: &[u8] = payload;
10157 while !pcur.is_empty() {
10158 view.unified_asset_ids
10159 .push(::buffa::types::decode_uint32(&mut pcur)?);
10160 }
10161 } else if tag.wire_type() == ::buffa::encoding::WireType::Varint
10162 {
10163 view.unified_asset_ids
10164 .push(::buffa::types::decode_uint32(&mut cur)?);
10165 } else {
10166 return Err(
10167 ::buffa::encoding::wire_type_mismatch(
10168 tag,
10169 ::buffa::encoding::WireType::LengthDelimited,
10170 ),
10171 );
10172 }
10173 }
10174 7u32 => {
10175 ::buffa::encoding::check_wire_type(
10176 tag,
10177 ::buffa::encoding::WireType::Fixed64,
10178 )?;
10179 view.account_selector = Some(
10180 super::super::__buffa::view::oneof::list_flows_request::AccountSelector::OwnerAccountId(
10181 ::buffa::types::decode_fixed64(&mut cur)?,
10182 ),
10183 );
10184 }
10185 8u32 => {
10186 ::buffa::encoding::check_wire_type(
10187 tag,
10188 ::buffa::encoding::WireType::LengthDelimited,
10189 )?;
10190 view.account_selector = Some(
10191 super::super::__buffa::view::oneof::list_flows_request::AccountSelector::SmartAccountAddress(
10192 ::buffa::types::borrow_str(&mut cur)?,
10193 ),
10194 );
10195 }
10196 _ => {
10197 ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
10198 let span_len = before_tag.len() - cur.len();
10199 view.__buffa_unknown_fields
10200 .push_record(before_tag, span_len, ctx)?;
10201 }
10202 }
10203 ::core::result::Result::Ok(cur)
10204 }
10205 fn to_owned_message(
10206 &self,
10207 ) -> ::core::result::Result<
10208 super::super::ListFlowsRequest,
10209 ::buffa::DecodeError,
10210 > {
10211 self.to_owned_from_source(None)
10212 }
10213 #[allow(clippy::useless_conversion, clippy::needless_update)]
10214 fn to_owned_from_source(
10215 &self,
10216 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
10217 ) -> ::core::result::Result<
10218 super::super::ListFlowsRequest,
10219 ::buffa::DecodeError,
10220 > {
10221 #[allow(unused_imports)]
10222 use ::buffa::alloc::string::ToString as _;
10223 let _ = __buffa_src;
10224 ::core::result::Result::Ok(super::super::ListFlowsRequest {
10225 limit: self.limit,
10226 sort: self.sort,
10227 flow_kind: self.flow_kind,
10228 flow_state: self.flow_state,
10229 tx_ref: self.tx_ref.to_string(),
10230 scope: self.scope,
10231 polyester_chain_ids: self.polyester_chain_ids.to_vec(),
10232 zipped_asset_ids: self.zipped_asset_ids.to_vec(),
10233 unified_asset_ids: self.unified_asset_ids.to_vec(),
10234 page_token: self.page_token.to_string(),
10235 order_by: self.order_by,
10236 account_selector: self
10237 .account_selector
10238 .as_ref()
10239 .map(|v| match v {
10240 super::super::__buffa::view::oneof::list_flows_request::AccountSelector::OwnerAccountId(
10241 v,
10242 ) => {
10243 super::super::__buffa::oneof::list_flows_request::AccountSelector::OwnerAccountId(
10244 *v,
10245 )
10246 }
10247 super::super::__buffa::view::oneof::list_flows_request::AccountSelector::SmartAccountAddress(
10248 v,
10249 ) => {
10250 super::super::__buffa::oneof::list_flows_request::AccountSelector::SmartAccountAddress(
10251 v.to_string(),
10252 )
10253 }
10254 }),
10255 __buffa_unknown_fields: self
10256 .__buffa_unknown_fields
10257 .to_owned()?
10258 .into(),
10259 ..::core::default::Default::default()
10260 })
10261 }
10262 }
10263 impl<'a> ::buffa::ViewEncode<'a> for ListFlowsRequestView<'a> {
10264 #[allow(clippy::needless_borrow, clippy::let_and_return)]
10265 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
10266 #[allow(unused_imports)]
10267 use ::buffa::Enumeration as _;
10268 let mut size = 0u32;
10269 if self.limit != 0u32 {
10270 size += 1u32 + ::buffa::types::uint32_encoded_len(self.limit) as u32;
10271 }
10272 {
10273 let val = self.sort.to_i32();
10274 if val != 0 {
10275 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
10276 }
10277 }
10278 {
10279 let val = self.flow_kind.to_i32();
10280 if val != 0 {
10281 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
10282 }
10283 }
10284 {
10285 let val = self.flow_state.to_i32();
10286 if val != 0 {
10287 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
10288 }
10289 }
10290 if !self.tx_ref.is_empty() {
10291 size
10292 += 1u32
10293 + ::buffa::types::string_encoded_len(&self.tx_ref) as u32;
10294 }
10295 {
10296 let val = self.scope.to_i32();
10297 if val != 0 {
10298 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
10299 }
10300 }
10301 if let ::core::option::Option::Some(ref v) = self.account_selector {
10302 match v {
10303 super::super::__buffa::view::oneof::list_flows_request::AccountSelector::OwnerAccountId(
10304 _x,
10305 ) => {
10306 size += 1u32 + ::buffa::types::FIXED64_ENCODED_LEN as u32;
10307 }
10308 super::super::__buffa::view::oneof::list_flows_request::AccountSelector::SmartAccountAddress(
10309 x,
10310 ) => {
10311 size += 1u32 + ::buffa::types::string_encoded_len(x) as u32;
10312 }
10313 }
10314 }
10315 if !self.polyester_chain_ids.is_empty() {
10316 let payload: u32 = self
10317 .polyester_chain_ids
10318 .iter()
10319 .map(|&v| ::buffa::types::uint32_encoded_len(v) as u32)
10320 .sum::<u32>();
10321 size
10322 += 1u32 + ::buffa::encoding::varint_len(payload as u64) as u32
10323 + payload;
10324 }
10325 if !self.zipped_asset_ids.is_empty() {
10326 let payload: u32 = self
10327 .zipped_asset_ids
10328 .iter()
10329 .map(|&v| ::buffa::types::uint32_encoded_len(v) as u32)
10330 .sum::<u32>();
10331 size
10332 += 1u32 + ::buffa::encoding::varint_len(payload as u64) as u32
10333 + payload;
10334 }
10335 if !self.unified_asset_ids.is_empty() {
10336 let payload: u32 = self
10337 .unified_asset_ids
10338 .iter()
10339 .map(|&v| ::buffa::types::uint32_encoded_len(v) as u32)
10340 .sum::<u32>();
10341 size
10342 += 1u32 + ::buffa::encoding::varint_len(payload as u64) as u32
10343 + payload;
10344 }
10345 if !self.page_token.is_empty() {
10346 size
10347 += 1u32
10348 + ::buffa::types::string_encoded_len(&self.page_token)
10349 as u32;
10350 }
10351 {
10352 let val = self.order_by.to_i32();
10353 if val != 0 {
10354 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
10355 }
10356 }
10357 size += self.__buffa_unknown_fields.encoded_len() as u32;
10358 size
10359 }
10360 #[allow(clippy::needless_borrow)]
10361 fn write_to(
10362 &self,
10363 _cache: &mut ::buffa::SizeCache,
10364 buf: &mut impl ::buffa::bytes::BufMut,
10365 ) {
10366 #[allow(unused_imports)]
10367 use ::buffa::Enumeration as _;
10368 if self.limit != 0u32 {
10369 ::buffa::types::put_uint32_field(1u32, self.limit, buf);
10370 }
10371 {
10372 let val = self.sort.to_i32();
10373 if val != 0 {
10374 ::buffa::types::put_int32_field(2u32, val, buf);
10375 }
10376 }
10377 {
10378 let val = self.flow_kind.to_i32();
10379 if val != 0 {
10380 ::buffa::types::put_int32_field(3u32, val, buf);
10381 }
10382 }
10383 {
10384 let val = self.flow_state.to_i32();
10385 if val != 0 {
10386 ::buffa::types::put_int32_field(4u32, val, buf);
10387 }
10388 }
10389 if !self.tx_ref.is_empty() {
10390 ::buffa::types::put_string_field(5u32, &self.tx_ref, buf);
10391 }
10392 {
10393 let val = self.scope.to_i32();
10394 if val != 0 {
10395 ::buffa::types::put_int32_field(6u32, val, buf);
10396 }
10397 }
10398 if let ::core::option::Option::Some(ref v) = self.account_selector {
10399 match v {
10400 super::super::__buffa::view::oneof::list_flows_request::AccountSelector::OwnerAccountId(
10401 x,
10402 ) => {
10403 ::buffa::types::put_fixed64_field(7u32, *x, buf);
10404 }
10405 super::super::__buffa::view::oneof::list_flows_request::AccountSelector::SmartAccountAddress(
10406 x,
10407 ) => {
10408 ::buffa::types::put_string_field(8u32, x, buf);
10409 }
10410 }
10411 }
10412 if !self.polyester_chain_ids.is_empty() {
10413 let payload: u32 = self
10414 .polyester_chain_ids
10415 .iter()
10416 .map(|&v| ::buffa::types::uint32_encoded_len(v) as u32)
10417 .sum::<u32>();
10418 ::buffa::types::put_len_delimited_header(9u32, payload, buf);
10419 for &v in &self.polyester_chain_ids {
10420 ::buffa::types::encode_uint32(v, buf);
10421 }
10422 }
10423 if !self.zipped_asset_ids.is_empty() {
10424 let payload: u32 = self
10425 .zipped_asset_ids
10426 .iter()
10427 .map(|&v| ::buffa::types::uint32_encoded_len(v) as u32)
10428 .sum::<u32>();
10429 ::buffa::types::put_len_delimited_header(10u32, payload, buf);
10430 for &v in &self.zipped_asset_ids {
10431 ::buffa::types::encode_uint32(v, buf);
10432 }
10433 }
10434 if !self.unified_asset_ids.is_empty() {
10435 let payload: u32 = self
10436 .unified_asset_ids
10437 .iter()
10438 .map(|&v| ::buffa::types::uint32_encoded_len(v) as u32)
10439 .sum::<u32>();
10440 ::buffa::types::put_len_delimited_header(11u32, payload, buf);
10441 for &v in &self.unified_asset_ids {
10442 ::buffa::types::encode_uint32(v, buf);
10443 }
10444 }
10445 if !self.page_token.is_empty() {
10446 ::buffa::types::put_string_field(12u32, &self.page_token, buf);
10447 }
10448 {
10449 let val = self.order_by.to_i32();
10450 if val != 0 {
10451 ::buffa::types::put_int32_field(13u32, val, buf);
10452 }
10453 }
10454 self.__buffa_unknown_fields.write_to(buf);
10455 }
10456 }
10457 impl<'__a> ::serde::Serialize for ListFlowsRequestView<'__a> {
10469 fn serialize<__S: ::serde::Serializer>(
10470 &self,
10471 __s: __S,
10472 ) -> ::core::result::Result<__S::Ok, __S::Error> {
10473 use ::serde::ser::SerializeMap as _;
10474 let mut __map = __s.serialize_map(::core::option::Option::None)?;
10475 if !::buffa::json_helpers::skip_if::is_zero_u32(&self.limit) {
10476 __map
10477 .serialize_entry(
10478 "limit",
10479 &::buffa::json_helpers::ProtoJson(&self.limit),
10480 )?;
10481 }
10482 if !::buffa::json_helpers::skip_if::is_default_enum_value(&self.sort) {
10483 __map.serialize_entry("sort", &self.sort)?;
10484 }
10485 if !::buffa::json_helpers::skip_if::is_default_enum_value(
10486 &self.flow_kind,
10487 ) {
10488 __map.serialize_entry("flowKind", &self.flow_kind)?;
10489 }
10490 if !::buffa::json_helpers::skip_if::is_default_enum_value(
10491 &self.flow_state,
10492 ) {
10493 __map.serialize_entry("flowState", &self.flow_state)?;
10494 }
10495 if !::buffa::json_helpers::skip_if::is_empty_str(self.tx_ref) {
10496 __map.serialize_entry("txRef", self.tx_ref)?;
10497 }
10498 if !::buffa::json_helpers::skip_if::is_default_enum_value(&self.scope) {
10499 __map.serialize_entry("scope", &self.scope)?;
10500 }
10501 if !self.polyester_chain_ids.is_empty() {
10502 __map
10503 .serialize_entry(
10504 "polyesterChainIds",
10505 &::buffa::json_helpers::RepeatedJson(
10506 &self.polyester_chain_ids,
10507 ),
10508 )?;
10509 }
10510 if !self.zipped_asset_ids.is_empty() {
10511 __map
10512 .serialize_entry(
10513 "zippedAssetIds",
10514 &::buffa::json_helpers::RepeatedJson(&self.zipped_asset_ids),
10515 )?;
10516 }
10517 if !self.unified_asset_ids.is_empty() {
10518 __map
10519 .serialize_entry(
10520 "unifiedAssetIds",
10521 &::buffa::json_helpers::RepeatedJson(&self.unified_asset_ids),
10522 )?;
10523 }
10524 if !::buffa::json_helpers::skip_if::is_empty_str(self.page_token) {
10525 __map.serialize_entry("pageToken", self.page_token)?;
10526 }
10527 if !::buffa::json_helpers::skip_if::is_default_enum_value(
10528 &self.order_by,
10529 ) {
10530 __map.serialize_entry("orderBy", &self.order_by)?;
10531 }
10532 if let ::core::option::Option::Some(ref __ov) = self.account_selector {
10533 match __ov {
10534 super::super::__buffa::view::oneof::list_flows_request::AccountSelector::OwnerAccountId(
10535 v,
10536 ) => {
10537 __map
10538 .serialize_entry(
10539 "ownerAccountId",
10540 &::buffa::json_helpers::ProtoJson(v),
10541 )?;
10542 }
10543 super::super::__buffa::view::oneof::list_flows_request::AccountSelector::SmartAccountAddress(
10544 v,
10545 ) => {
10546 __map.serialize_entry("smartAccountAddress", v)?;
10547 }
10548 }
10549 }
10550 __map.end()
10551 }
10552 }
10553 impl<'a> ::buffa::MessageName for ListFlowsRequestView<'a> {
10554 const PACKAGE: &'static str = "chain.lifecycle.v1";
10555 const NAME: &'static str = "ListFlowsRequest";
10556 const FULL_NAME: &'static str = "chain.lifecycle.v1.ListFlowsRequest";
10557 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.ListFlowsRequest";
10558 }
10559 ::buffa::impl_default_view_instance!(ListFlowsRequestView);
10560 ::buffa::impl_view_reborrow!(ListFlowsRequestView);
10561 #[derive(Clone, Debug)]
10567 pub struct ListFlowsRequestOwnedView(
10568 ::buffa::OwnedView<ListFlowsRequestView<'static>>,
10569 );
10570 impl ListFlowsRequestOwnedView {
10571 pub fn decode(
10581 bytes: ::buffa::bytes::Bytes,
10582 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10583 ::core::result::Result::Ok(
10584 ListFlowsRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
10585 )
10586 }
10587 pub fn decode_with_options(
10595 bytes: ::buffa::bytes::Bytes,
10596 opts: &::buffa::DecodeOptions,
10597 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10598 ::core::result::Result::Ok(
10599 ListFlowsRequestOwnedView(
10600 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
10601 ),
10602 )
10603 }
10604 pub fn from_owned(
10611 msg: &super::super::ListFlowsRequest,
10612 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10613 ::core::result::Result::Ok(
10614 ListFlowsRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
10615 )
10616 }
10617 #[must_use]
10619 pub fn view(&self) -> &ListFlowsRequestView<'_> {
10620 self.0.reborrow()
10621 }
10622 pub fn to_owned_message(
10629 &self,
10630 ) -> ::core::result::Result<
10631 super::super::ListFlowsRequest,
10632 ::buffa::DecodeError,
10633 > {
10634 self.0.to_owned_message()
10635 }
10636 #[must_use]
10638 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
10639 self.0.bytes()
10640 }
10641 #[must_use]
10643 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
10644 self.0.into_bytes()
10645 }
10646 #[must_use]
10651 pub fn limit(&self) -> u32 {
10652 self.0.reborrow().limit
10653 }
10654 #[must_use]
10658 pub fn sort(&self) -> ::buffa::EnumValue<super::super::Sort> {
10659 self.0.reborrow().sort
10660 }
10661 #[must_use]
10665 pub fn flow_kind(&self) -> ::buffa::EnumValue<super::super::FlowKind> {
10666 self.0.reborrow().flow_kind
10667 }
10668 #[must_use]
10673 pub fn flow_state(&self) -> ::buffa::EnumValue<super::super::FlowState> {
10674 self.0.reborrow().flow_state
10675 }
10676 #[must_use]
10681 pub fn tx_ref(&self) -> &'_ str {
10682 self.0.reborrow().tx_ref
10683 }
10684 #[must_use]
10688 pub fn scope(&self) -> ::buffa::EnumValue<super::super::ListScope> {
10689 self.0.reborrow().scope
10690 }
10691 #[must_use]
10695 pub fn polyester_chain_ids(&self) -> &::buffa::RepeatedView<'_, u32> {
10696 &self.0.reborrow().polyester_chain_ids
10697 }
10698 #[must_use]
10702 pub fn zipped_asset_ids(&self) -> &::buffa::RepeatedView<'_, u32> {
10703 &self.0.reborrow().zipped_asset_ids
10704 }
10705 #[must_use]
10709 pub fn unified_asset_ids(&self) -> &::buffa::RepeatedView<'_, u32> {
10710 &self.0.reborrow().unified_asset_ids
10711 }
10712 #[must_use]
10718 pub fn page_token(&self) -> &'_ str {
10719 self.0.reborrow().page_token
10720 }
10721 #[must_use]
10725 pub fn order_by(&self) -> ::buffa::EnumValue<super::super::ListOrderBy> {
10726 self.0.reborrow().order_by
10727 }
10728 #[must_use]
10730 pub fn account_selector(
10731 &self,
10732 ) -> ::core::option::Option<
10733 &super::super::__buffa::view::oneof::list_flows_request::AccountSelector<
10734 '_,
10735 >,
10736 > {
10737 self.0.reborrow().account_selector.as_ref()
10738 }
10739 }
10740 impl ::core::convert::From<::buffa::OwnedView<ListFlowsRequestView<'static>>>
10741 for ListFlowsRequestOwnedView {
10742 fn from(inner: ::buffa::OwnedView<ListFlowsRequestView<'static>>) -> Self {
10743 ListFlowsRequestOwnedView(inner)
10744 }
10745 }
10746 impl ::core::convert::From<ListFlowsRequestOwnedView>
10747 for ::buffa::OwnedView<ListFlowsRequestView<'static>> {
10748 fn from(wrapper: ListFlowsRequestOwnedView) -> Self {
10749 wrapper.0
10750 }
10751 }
10752 impl ::core::convert::AsRef<::buffa::OwnedView<ListFlowsRequestView<'static>>>
10753 for ListFlowsRequestOwnedView {
10754 fn as_ref(&self) -> &::buffa::OwnedView<ListFlowsRequestView<'static>> {
10755 &self.0
10756 }
10757 }
10758 impl ::buffa::HasMessageView for super::super::ListFlowsRequest {
10759 type View<'a> = ListFlowsRequestView<'a>;
10760 type ViewHandle = ListFlowsRequestOwnedView;
10761 }
10762 impl ::serde::Serialize for ListFlowsRequestOwnedView {
10763 fn serialize<__S: ::serde::Serializer>(
10764 &self,
10765 __s: __S,
10766 ) -> ::core::result::Result<__S::Ok, __S::Error> {
10767 ::serde::Serialize::serialize(&self.0, __s)
10768 }
10769 }
10770 #[derive(Clone, Debug, Default)]
10772 pub struct ListFlowsResponseView<'a> {
10773 pub flows: ::buffa::RepeatedView<
10778 'a,
10779 super::super::__buffa::view::FlowSummaryViewView<'a>,
10780 >,
10781 pub next_page_token: &'a str,
10785 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
10786 }
10787 impl<'a> ::buffa::MessageView<'a> for ListFlowsResponseView<'a> {
10788 type Owned = super::super::ListFlowsResponse;
10789 fn decode_view(
10790 buf: &'a [u8],
10791 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10792 let __limit = ::core::cell::Cell::new(
10793 ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
10794 );
10795 <Self as ::buffa::MessageView>::decode_view_ctx(
10796 buf,
10797 ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
10798 )
10799 }
10800 fn decode_view_with_ctx(
10801 buf: &'a [u8],
10802 ctx: ::buffa::DecodeContext<'_>,
10803 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10804 <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
10805 }
10806 fn merge_view_field(
10807 &mut self,
10808 tag: ::buffa::encoding::Tag,
10809 cur: &'a [u8],
10810 before_tag: &'a [u8],
10811 ctx: ::buffa::DecodeContext<'_>,
10812 ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
10813 let _ = ctx;
10814 #[allow(unused_variables)]
10815 let view = self;
10816 let mut cur = cur;
10817 match tag.field_number() {
10818 2u32 => {
10819 ::buffa::encoding::check_wire_type(
10820 tag,
10821 ::buffa::encoding::WireType::LengthDelimited,
10822 )?;
10823 view.next_page_token = ::buffa::types::borrow_str(&mut cur)?;
10824 }
10825 1u32 => {
10826 ::buffa::encoding::check_wire_type(
10827 tag,
10828 ::buffa::encoding::WireType::LengthDelimited,
10829 )?;
10830 let __sub_ctx = ctx.descend()?;
10831 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
10832 view.flows
10833 .push(
10834 <super::super::__buffa::view::FlowSummaryViewView as ::buffa::MessageView>::decode_view_ctx(
10835 sub,
10836 __sub_ctx,
10837 )?,
10838 );
10839 }
10840 _ => {
10841 ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
10842 let span_len = before_tag.len() - cur.len();
10843 view.__buffa_unknown_fields
10844 .push_record(before_tag, span_len, ctx)?;
10845 }
10846 }
10847 ::core::result::Result::Ok(cur)
10848 }
10849 fn to_owned_message(
10850 &self,
10851 ) -> ::core::result::Result<
10852 super::super::ListFlowsResponse,
10853 ::buffa::DecodeError,
10854 > {
10855 self.to_owned_from_source(None)
10856 }
10857 #[allow(clippy::useless_conversion, clippy::needless_update)]
10858 fn to_owned_from_source(
10859 &self,
10860 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
10861 ) -> ::core::result::Result<
10862 super::super::ListFlowsResponse,
10863 ::buffa::DecodeError,
10864 > {
10865 #[allow(unused_imports)]
10866 use ::buffa::alloc::string::ToString as _;
10867 let _ = __buffa_src;
10868 ::core::result::Result::Ok(super::super::ListFlowsResponse {
10869 flows: self
10870 .flows
10871 .iter()
10872 .map(|v| v.to_owned_from_source(__buffa_src))
10873 .collect::<::core::result::Result<_, ::buffa::DecodeError>>()?,
10874 next_page_token: self.next_page_token.to_string(),
10875 __buffa_unknown_fields: self
10876 .__buffa_unknown_fields
10877 .to_owned()?
10878 .into(),
10879 ..::core::default::Default::default()
10880 })
10881 }
10882 }
10883 impl<'a> ::buffa::ViewEncode<'a> for ListFlowsResponseView<'a> {
10884 #[allow(clippy::needless_borrow, clippy::let_and_return)]
10885 fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
10886 #[allow(unused_imports)]
10887 use ::buffa::Enumeration as _;
10888 let mut size = 0u32;
10889 for v in &self.flows {
10890 let __slot = __cache.reserve();
10891 let inner_size = v.compute_size(__cache);
10892 __cache.set(__slot, inner_size);
10893 size
10894 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
10895 + inner_size;
10896 }
10897 if !self.next_page_token.is_empty() {
10898 size
10899 += 1u32
10900 + ::buffa::types::string_encoded_len(&self.next_page_token)
10901 as u32;
10902 }
10903 size += self.__buffa_unknown_fields.encoded_len() as u32;
10904 size
10905 }
10906 #[allow(clippy::needless_borrow)]
10907 fn write_to(
10908 &self,
10909 __cache: &mut ::buffa::SizeCache,
10910 buf: &mut impl ::buffa::bytes::BufMut,
10911 ) {
10912 #[allow(unused_imports)]
10913 use ::buffa::Enumeration as _;
10914 for v in &self.flows {
10915 ::buffa::types::put_len_delimited_header(
10916 1u32,
10917 __cache.consume_next(),
10918 buf,
10919 );
10920 v.write_to(__cache, buf);
10921 }
10922 if !self.next_page_token.is_empty() {
10923 ::buffa::types::put_string_field(2u32, &self.next_page_token, buf);
10924 }
10925 self.__buffa_unknown_fields.write_to(buf);
10926 }
10927 }
10928 impl<'__a> ::serde::Serialize for ListFlowsResponseView<'__a> {
10940 fn serialize<__S: ::serde::Serializer>(
10941 &self,
10942 __s: __S,
10943 ) -> ::core::result::Result<__S::Ok, __S::Error> {
10944 use ::serde::ser::SerializeMap as _;
10945 let mut __map = __s.serialize_map(::core::option::Option::None)?;
10946 if !self.flows.is_empty() {
10947 __map.serialize_entry("flows", &*self.flows)?;
10948 }
10949 if !::buffa::json_helpers::skip_if::is_empty_str(self.next_page_token) {
10950 __map.serialize_entry("nextPageToken", self.next_page_token)?;
10951 }
10952 __map.end()
10953 }
10954 }
10955 impl<'a> ::buffa::MessageName for ListFlowsResponseView<'a> {
10956 const PACKAGE: &'static str = "chain.lifecycle.v1";
10957 const NAME: &'static str = "ListFlowsResponse";
10958 const FULL_NAME: &'static str = "chain.lifecycle.v1.ListFlowsResponse";
10959 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.ListFlowsResponse";
10960 }
10961 ::buffa::impl_default_view_instance!(ListFlowsResponseView);
10962 ::buffa::impl_view_reborrow!(ListFlowsResponseView);
10963 #[derive(Clone, Debug)]
10969 pub struct ListFlowsResponseOwnedView(
10970 ::buffa::OwnedView<ListFlowsResponseView<'static>>,
10971 );
10972 impl ListFlowsResponseOwnedView {
10973 pub fn decode(
10983 bytes: ::buffa::bytes::Bytes,
10984 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10985 ::core::result::Result::Ok(
10986 ListFlowsResponseOwnedView(::buffa::OwnedView::decode(bytes)?),
10987 )
10988 }
10989 pub fn decode_with_options(
10997 bytes: ::buffa::bytes::Bytes,
10998 opts: &::buffa::DecodeOptions,
10999 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
11000 ::core::result::Result::Ok(
11001 ListFlowsResponseOwnedView(
11002 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
11003 ),
11004 )
11005 }
11006 pub fn from_owned(
11013 msg: &super::super::ListFlowsResponse,
11014 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
11015 ::core::result::Result::Ok(
11016 ListFlowsResponseOwnedView(::buffa::OwnedView::from_owned(msg)?),
11017 )
11018 }
11019 #[must_use]
11021 pub fn view(&self) -> &ListFlowsResponseView<'_> {
11022 self.0.reborrow()
11023 }
11024 pub fn to_owned_message(
11031 &self,
11032 ) -> ::core::result::Result<
11033 super::super::ListFlowsResponse,
11034 ::buffa::DecodeError,
11035 > {
11036 self.0.to_owned_message()
11037 }
11038 #[must_use]
11040 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
11041 self.0.bytes()
11042 }
11043 #[must_use]
11045 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
11046 self.0.into_bytes()
11047 }
11048 #[must_use]
11053 pub fn flows(
11054 &self,
11055 ) -> &::buffa::RepeatedView<
11056 '_,
11057 super::super::__buffa::view::FlowSummaryViewView<'_>,
11058 > {
11059 &self.0.reborrow().flows
11060 }
11061 #[must_use]
11065 pub fn next_page_token(&self) -> &'_ str {
11066 self.0.reborrow().next_page_token
11067 }
11068 }
11069 impl ::core::convert::From<::buffa::OwnedView<ListFlowsResponseView<'static>>>
11070 for ListFlowsResponseOwnedView {
11071 fn from(inner: ::buffa::OwnedView<ListFlowsResponseView<'static>>) -> Self {
11072 ListFlowsResponseOwnedView(inner)
11073 }
11074 }
11075 impl ::core::convert::From<ListFlowsResponseOwnedView>
11076 for ::buffa::OwnedView<ListFlowsResponseView<'static>> {
11077 fn from(wrapper: ListFlowsResponseOwnedView) -> Self {
11078 wrapper.0
11079 }
11080 }
11081 impl ::core::convert::AsRef<::buffa::OwnedView<ListFlowsResponseView<'static>>>
11082 for ListFlowsResponseOwnedView {
11083 fn as_ref(&self) -> &::buffa::OwnedView<ListFlowsResponseView<'static>> {
11084 &self.0
11085 }
11086 }
11087 impl ::buffa::HasMessageView for super::super::ListFlowsResponse {
11088 type View<'a> = ListFlowsResponseView<'a>;
11089 type ViewHandle = ListFlowsResponseOwnedView;
11090 }
11091 impl ::serde::Serialize for ListFlowsResponseOwnedView {
11092 fn serialize<__S: ::serde::Serializer>(
11093 &self,
11094 __s: __S,
11095 ) -> ::core::result::Result<__S::Ok, __S::Error> {
11096 ::serde::Serialize::serialize(&self.0, __s)
11097 }
11098 }
11099 #[derive(Clone, Debug, Default)]
11101 pub struct FlowTxMatchViewView<'a> {
11102 pub flow_id: &'a str,
11106 pub flow_kind: ::buffa::EnumValue<super::super::FlowKind>,
11110 pub source_tx_hash: &'a str,
11114 pub latest_tx_ref: &'a str,
11118 pub tx_occurrence_index: u64,
11124 pub source_domain: ::buffa::EnumValue<super::super::FlowDomain>,
11128 pub destination_domain: ::buffa::EnumValue<super::super::FlowDomain>,
11132 pub current_step: ::buffa::EnumValue<super::super::FlowStep>,
11136 pub is_open: bool,
11140 pub is_terminal: bool,
11144 pub asset_ids: ::buffa::MessageFieldView<
11148 super::super::__buffa::view::AssetIdsView<'a>,
11149 >,
11150 pub polyester_chain_id: u32,
11154 pub amount_e18: ::buffa::MessageFieldView<
11158 super::super::super::super::super::polyester::r#type::v1::__buffa::view::U128View<
11159 'a,
11160 >,
11161 >,
11162 pub source_address: &'a str,
11166 pub destination_address: &'a str,
11170 pub lifecycle_reason: ::buffa::EnumValue<super::super::LifecycleReason>,
11174 pub last_activity_at_unix_ms: u64,
11178 pub owner_account_id: u64,
11182 pub smart_account_address: &'a str,
11186 pub zipper_reason: ::buffa::MessageFieldView<
11190 super::super::super::super::zipper::v1::__buffa::view::ZipperReasonDetailsView<
11191 'a,
11192 >,
11193 >,
11194 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
11195 }
11196 impl<'a> ::buffa::MessageView<'a> for FlowTxMatchViewView<'a> {
11197 type Owned = super::super::FlowTxMatchView;
11198 fn decode_view(
11199 buf: &'a [u8],
11200 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
11201 let __limit = ::core::cell::Cell::new(
11202 ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
11203 );
11204 <Self as ::buffa::MessageView>::decode_view_ctx(
11205 buf,
11206 ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
11207 )
11208 }
11209 fn decode_view_with_ctx(
11210 buf: &'a [u8],
11211 ctx: ::buffa::DecodeContext<'_>,
11212 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
11213 <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
11214 }
11215 fn merge_view_field(
11216 &mut self,
11217 tag: ::buffa::encoding::Tag,
11218 cur: &'a [u8],
11219 before_tag: &'a [u8],
11220 ctx: ::buffa::DecodeContext<'_>,
11221 ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
11222 let _ = ctx;
11223 #[allow(unused_variables)]
11224 let view = self;
11225 let mut cur = cur;
11226 match tag.field_number() {
11227 1u32 => {
11228 ::buffa::encoding::check_wire_type(
11229 tag,
11230 ::buffa::encoding::WireType::LengthDelimited,
11231 )?;
11232 view.flow_id = ::buffa::types::borrow_str(&mut cur)?;
11233 }
11234 3u32 => {
11235 ::buffa::encoding::check_wire_type(
11236 tag,
11237 ::buffa::encoding::WireType::Varint,
11238 )?;
11239 view.flow_kind = ::buffa::EnumValue::from(
11240 ::buffa::types::decode_int32(&mut cur)?,
11241 );
11242 }
11243 4u32 => {
11244 ::buffa::encoding::check_wire_type(
11245 tag,
11246 ::buffa::encoding::WireType::LengthDelimited,
11247 )?;
11248 view.source_tx_hash = ::buffa::types::borrow_str(&mut cur)?;
11249 }
11250 5u32 => {
11251 ::buffa::encoding::check_wire_type(
11252 tag,
11253 ::buffa::encoding::WireType::LengthDelimited,
11254 )?;
11255 view.latest_tx_ref = ::buffa::types::borrow_str(&mut cur)?;
11256 }
11257 6u32 => {
11258 ::buffa::encoding::check_wire_type(
11259 tag,
11260 ::buffa::encoding::WireType::Varint,
11261 )?;
11262 view.tx_occurrence_index = ::buffa::types::decode_uint64(
11263 &mut cur,
11264 )?;
11265 }
11266 7u32 => {
11267 ::buffa::encoding::check_wire_type(
11268 tag,
11269 ::buffa::encoding::WireType::Varint,
11270 )?;
11271 view.source_domain = ::buffa::EnumValue::from(
11272 ::buffa::types::decode_int32(&mut cur)?,
11273 );
11274 }
11275 8u32 => {
11276 ::buffa::encoding::check_wire_type(
11277 tag,
11278 ::buffa::encoding::WireType::Varint,
11279 )?;
11280 view.destination_domain = ::buffa::EnumValue::from(
11281 ::buffa::types::decode_int32(&mut cur)?,
11282 );
11283 }
11284 9u32 => {
11285 ::buffa::encoding::check_wire_type(
11286 tag,
11287 ::buffa::encoding::WireType::Varint,
11288 )?;
11289 view.current_step = ::buffa::EnumValue::from(
11290 ::buffa::types::decode_int32(&mut cur)?,
11291 );
11292 }
11293 10u32 => {
11294 ::buffa::encoding::check_wire_type(
11295 tag,
11296 ::buffa::encoding::WireType::Varint,
11297 )?;
11298 view.is_open = ::buffa::types::decode_bool(&mut cur)?;
11299 }
11300 11u32 => {
11301 ::buffa::encoding::check_wire_type(
11302 tag,
11303 ::buffa::encoding::WireType::Varint,
11304 )?;
11305 view.is_terminal = ::buffa::types::decode_bool(&mut cur)?;
11306 }
11307 12u32 => {
11308 ::buffa::encoding::check_wire_type(
11309 tag,
11310 ::buffa::encoding::WireType::LengthDelimited,
11311 )?;
11312 let __sub_ctx = ctx.descend()?;
11313 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
11314 match view.asset_ids.as_mut() {
11315 Some(existing) => {
11316 ::buffa::MessageView::merge_into_view(
11317 existing,
11318 sub,
11319 __sub_ctx,
11320 )?
11321 }
11322 None => {
11323 view.asset_ids = ::buffa::MessageFieldView::set(
11324 <super::super::__buffa::view::AssetIdsView as ::buffa::MessageView>::decode_view_ctx(
11325 sub,
11326 __sub_ctx,
11327 )?,
11328 );
11329 }
11330 }
11331 }
11332 13u32 => {
11333 ::buffa::encoding::check_wire_type(
11334 tag,
11335 ::buffa::encoding::WireType::Varint,
11336 )?;
11337 view.polyester_chain_id = ::buffa::types::decode_uint32(
11338 &mut cur,
11339 )?;
11340 }
11341 14u32 => {
11342 ::buffa::encoding::check_wire_type(
11343 tag,
11344 ::buffa::encoding::WireType::LengthDelimited,
11345 )?;
11346 let __sub_ctx = ctx.descend()?;
11347 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
11348 match view.amount_e18.as_mut() {
11349 Some(existing) => {
11350 ::buffa::MessageView::merge_into_view(
11351 existing,
11352 sub,
11353 __sub_ctx,
11354 )?
11355 }
11356 None => {
11357 view.amount_e18 = ::buffa::MessageFieldView::set(
11358 <super::super::super::super::super::polyester::r#type::v1::__buffa::view::U128View as ::buffa::MessageView>::decode_view_ctx(
11359 sub,
11360 __sub_ctx,
11361 )?,
11362 );
11363 }
11364 }
11365 }
11366 15u32 => {
11367 ::buffa::encoding::check_wire_type(
11368 tag,
11369 ::buffa::encoding::WireType::LengthDelimited,
11370 )?;
11371 view.source_address = ::buffa::types::borrow_str(&mut cur)?;
11372 }
11373 16u32 => {
11374 ::buffa::encoding::check_wire_type(
11375 tag,
11376 ::buffa::encoding::WireType::LengthDelimited,
11377 )?;
11378 view.destination_address = ::buffa::types::borrow_str(&mut cur)?;
11379 }
11380 17u32 => {
11381 ::buffa::encoding::check_wire_type(
11382 tag,
11383 ::buffa::encoding::WireType::Varint,
11384 )?;
11385 view.lifecycle_reason = ::buffa::EnumValue::from(
11386 ::buffa::types::decode_int32(&mut cur)?,
11387 );
11388 }
11389 18u32 => {
11390 ::buffa::encoding::check_wire_type(
11391 tag,
11392 ::buffa::encoding::WireType::Varint,
11393 )?;
11394 view.last_activity_at_unix_ms = ::buffa::types::decode_uint64(
11395 &mut cur,
11396 )?;
11397 }
11398 19u32 => {
11399 ::buffa::encoding::check_wire_type(
11400 tag,
11401 ::buffa::encoding::WireType::Fixed64,
11402 )?;
11403 view.owner_account_id = ::buffa::types::decode_fixed64(
11404 &mut cur,
11405 )?;
11406 }
11407 20u32 => {
11408 ::buffa::encoding::check_wire_type(
11409 tag,
11410 ::buffa::encoding::WireType::LengthDelimited,
11411 )?;
11412 view.smart_account_address = ::buffa::types::borrow_str(
11413 &mut cur,
11414 )?;
11415 }
11416 21u32 => {
11417 ::buffa::encoding::check_wire_type(
11418 tag,
11419 ::buffa::encoding::WireType::LengthDelimited,
11420 )?;
11421 let __sub_ctx = ctx.descend()?;
11422 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
11423 match view.zipper_reason.as_mut() {
11424 Some(existing) => {
11425 ::buffa::MessageView::merge_into_view(
11426 existing,
11427 sub,
11428 __sub_ctx,
11429 )?
11430 }
11431 None => {
11432 view.zipper_reason = ::buffa::MessageFieldView::set(
11433 <super::super::super::super::zipper::v1::__buffa::view::ZipperReasonDetailsView as ::buffa::MessageView>::decode_view_ctx(
11434 sub,
11435 __sub_ctx,
11436 )?,
11437 );
11438 }
11439 }
11440 }
11441 _ => {
11442 ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
11443 let span_len = before_tag.len() - cur.len();
11444 view.__buffa_unknown_fields
11445 .push_record(before_tag, span_len, ctx)?;
11446 }
11447 }
11448 ::core::result::Result::Ok(cur)
11449 }
11450 fn to_owned_message(
11451 &self,
11452 ) -> ::core::result::Result<
11453 super::super::FlowTxMatchView,
11454 ::buffa::DecodeError,
11455 > {
11456 self.to_owned_from_source(None)
11457 }
11458 #[allow(clippy::useless_conversion, clippy::needless_update)]
11459 fn to_owned_from_source(
11460 &self,
11461 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
11462 ) -> ::core::result::Result<
11463 super::super::FlowTxMatchView,
11464 ::buffa::DecodeError,
11465 > {
11466 #[allow(unused_imports)]
11467 use ::buffa::alloc::string::ToString as _;
11468 let _ = __buffa_src;
11469 ::core::result::Result::Ok(super::super::FlowTxMatchView {
11470 flow_id: self.flow_id.to_string(),
11471 flow_kind: self.flow_kind,
11472 source_tx_hash: self.source_tx_hash.to_string(),
11473 latest_tx_ref: self.latest_tx_ref.to_string(),
11474 tx_occurrence_index: self.tx_occurrence_index,
11475 source_domain: self.source_domain,
11476 destination_domain: self.destination_domain,
11477 current_step: self.current_step,
11478 is_open: self.is_open,
11479 is_terminal: self.is_terminal,
11480 asset_ids: match self.asset_ids.as_option() {
11481 Some(v) => {
11482 ::buffa::MessageField::<
11483 super::super::AssetIds,
11484 >::some(v.to_owned_from_source(__buffa_src)?)
11485 }
11486 None => ::buffa::MessageField::none(),
11487 },
11488 polyester_chain_id: self.polyester_chain_id,
11489 amount_e18: match self.amount_e18.as_option() {
11490 Some(v) => {
11491 ::buffa::MessageField::<
11492 super::super::super::super::super::polyester::r#type::v1::U128,
11493 >::some(v.to_owned_from_source(__buffa_src)?)
11494 }
11495 None => ::buffa::MessageField::none(),
11496 },
11497 source_address: self.source_address.to_string(),
11498 destination_address: self.destination_address.to_string(),
11499 lifecycle_reason: self.lifecycle_reason,
11500 last_activity_at_unix_ms: self.last_activity_at_unix_ms,
11501 owner_account_id: self.owner_account_id,
11502 smart_account_address: self.smart_account_address.to_string(),
11503 zipper_reason: match self.zipper_reason.as_option() {
11504 Some(v) => {
11505 ::buffa::MessageField::<
11506 super::super::super::super::zipper::v1::ZipperReasonDetails,
11507 >::some(v.to_owned_from_source(__buffa_src)?)
11508 }
11509 None => ::buffa::MessageField::none(),
11510 },
11511 __buffa_unknown_fields: self
11512 .__buffa_unknown_fields
11513 .to_owned()?
11514 .into(),
11515 ..::core::default::Default::default()
11516 })
11517 }
11518 }
11519 impl<'a> ::buffa::ViewEncode<'a> for FlowTxMatchViewView<'a> {
11520 #[allow(clippy::needless_borrow, clippy::let_and_return)]
11521 fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
11522 #[allow(unused_imports)]
11523 use ::buffa::Enumeration as _;
11524 let mut size = 0u32;
11525 if !self.flow_id.is_empty() {
11526 size
11527 += 1u32
11528 + ::buffa::types::string_encoded_len(&self.flow_id) as u32;
11529 }
11530 {
11531 let val = self.flow_kind.to_i32();
11532 if val != 0 {
11533 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
11534 }
11535 }
11536 if !self.source_tx_hash.is_empty() {
11537 size
11538 += 1u32
11539 + ::buffa::types::string_encoded_len(&self.source_tx_hash)
11540 as u32;
11541 }
11542 if !self.latest_tx_ref.is_empty() {
11543 size
11544 += 1u32
11545 + ::buffa::types::string_encoded_len(&self.latest_tx_ref)
11546 as u32;
11547 }
11548 if self.tx_occurrence_index != 0u64 {
11549 size
11550 += 1u32
11551 + ::buffa::types::uint64_encoded_len(
11552 self.tx_occurrence_index,
11553 ) as u32;
11554 }
11555 {
11556 let val = self.source_domain.to_i32();
11557 if val != 0 {
11558 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
11559 }
11560 }
11561 {
11562 let val = self.destination_domain.to_i32();
11563 if val != 0 {
11564 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
11565 }
11566 }
11567 {
11568 let val = self.current_step.to_i32();
11569 if val != 0 {
11570 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
11571 }
11572 }
11573 if self.is_open {
11574 size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
11575 }
11576 if self.is_terminal {
11577 size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
11578 }
11579 if self.asset_ids.is_set() {
11580 let __slot = __cache.reserve();
11581 let inner_size = self.asset_ids.compute_size(__cache);
11582 __cache.set(__slot, inner_size);
11583 size
11584 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
11585 + inner_size;
11586 }
11587 if self.polyester_chain_id != 0u32 {
11588 size
11589 += 1u32
11590 + ::buffa::types::uint32_encoded_len(self.polyester_chain_id)
11591 as u32;
11592 }
11593 if self.amount_e18.is_set() {
11594 let __slot = __cache.reserve();
11595 let inner_size = self.amount_e18.compute_size(__cache);
11596 __cache.set(__slot, inner_size);
11597 size
11598 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
11599 + inner_size;
11600 }
11601 if !self.source_address.is_empty() {
11602 size
11603 += 1u32
11604 + ::buffa::types::string_encoded_len(&self.source_address)
11605 as u32;
11606 }
11607 if !self.destination_address.is_empty() {
11608 size
11609 += 2u32
11610 + ::buffa::types::string_encoded_len(
11611 &self.destination_address,
11612 ) as u32;
11613 }
11614 {
11615 let val = self.lifecycle_reason.to_i32();
11616 if val != 0 {
11617 size += 2u32 + ::buffa::types::int32_encoded_len(val) as u32;
11618 }
11619 }
11620 if self.last_activity_at_unix_ms != 0u64 {
11621 size
11622 += 2u32
11623 + ::buffa::types::uint64_encoded_len(
11624 self.last_activity_at_unix_ms,
11625 ) as u32;
11626 }
11627 if self.owner_account_id != 0u64 {
11628 size += 2u32 + ::buffa::types::FIXED64_ENCODED_LEN as u32;
11629 }
11630 if !self.smart_account_address.is_empty() {
11631 size
11632 += 2u32
11633 + ::buffa::types::string_encoded_len(
11634 &self.smart_account_address,
11635 ) as u32;
11636 }
11637 if self.zipper_reason.is_set() {
11638 let __slot = __cache.reserve();
11639 let inner_size = self.zipper_reason.compute_size(__cache);
11640 __cache.set(__slot, inner_size);
11641 size
11642 += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
11643 + inner_size;
11644 }
11645 size += self.__buffa_unknown_fields.encoded_len() as u32;
11646 size
11647 }
11648 #[allow(clippy::needless_borrow)]
11649 fn write_to(
11650 &self,
11651 __cache: &mut ::buffa::SizeCache,
11652 buf: &mut impl ::buffa::bytes::BufMut,
11653 ) {
11654 #[allow(unused_imports)]
11655 use ::buffa::Enumeration as _;
11656 if !self.flow_id.is_empty() {
11657 ::buffa::types::put_string_field(1u32, &self.flow_id, buf);
11658 }
11659 {
11660 let val = self.flow_kind.to_i32();
11661 if val != 0 {
11662 ::buffa::types::put_int32_field(3u32, val, buf);
11663 }
11664 }
11665 if !self.source_tx_hash.is_empty() {
11666 ::buffa::types::put_string_field(4u32, &self.source_tx_hash, buf);
11667 }
11668 if !self.latest_tx_ref.is_empty() {
11669 ::buffa::types::put_string_field(5u32, &self.latest_tx_ref, buf);
11670 }
11671 if self.tx_occurrence_index != 0u64 {
11672 ::buffa::types::put_uint64_field(
11673 6u32,
11674 self.tx_occurrence_index,
11675 buf,
11676 );
11677 }
11678 {
11679 let val = self.source_domain.to_i32();
11680 if val != 0 {
11681 ::buffa::types::put_int32_field(7u32, val, buf);
11682 }
11683 }
11684 {
11685 let val = self.destination_domain.to_i32();
11686 if val != 0 {
11687 ::buffa::types::put_int32_field(8u32, val, buf);
11688 }
11689 }
11690 {
11691 let val = self.current_step.to_i32();
11692 if val != 0 {
11693 ::buffa::types::put_int32_field(9u32, val, buf);
11694 }
11695 }
11696 if self.is_open {
11697 ::buffa::types::put_bool_field(10u32, self.is_open, buf);
11698 }
11699 if self.is_terminal {
11700 ::buffa::types::put_bool_field(11u32, self.is_terminal, buf);
11701 }
11702 if self.asset_ids.is_set() {
11703 ::buffa::types::put_len_delimited_header(
11704 12u32,
11705 __cache.consume_next(),
11706 buf,
11707 );
11708 self.asset_ids.write_to(__cache, buf);
11709 }
11710 if self.polyester_chain_id != 0u32 {
11711 ::buffa::types::put_uint32_field(
11712 13u32,
11713 self.polyester_chain_id,
11714 buf,
11715 );
11716 }
11717 if self.amount_e18.is_set() {
11718 ::buffa::types::put_len_delimited_header(
11719 14u32,
11720 __cache.consume_next(),
11721 buf,
11722 );
11723 self.amount_e18.write_to(__cache, buf);
11724 }
11725 if !self.source_address.is_empty() {
11726 ::buffa::types::put_string_field(15u32, &self.source_address, buf);
11727 }
11728 if !self.destination_address.is_empty() {
11729 ::buffa::types::put_string_field(
11730 16u32,
11731 &self.destination_address,
11732 buf,
11733 );
11734 }
11735 {
11736 let val = self.lifecycle_reason.to_i32();
11737 if val != 0 {
11738 ::buffa::types::put_int32_field(17u32, val, buf);
11739 }
11740 }
11741 if self.last_activity_at_unix_ms != 0u64 {
11742 ::buffa::types::put_uint64_field(
11743 18u32,
11744 self.last_activity_at_unix_ms,
11745 buf,
11746 );
11747 }
11748 if self.owner_account_id != 0u64 {
11749 ::buffa::types::put_fixed64_field(19u32, self.owner_account_id, buf);
11750 }
11751 if !self.smart_account_address.is_empty() {
11752 ::buffa::types::put_string_field(
11753 20u32,
11754 &self.smart_account_address,
11755 buf,
11756 );
11757 }
11758 if self.zipper_reason.is_set() {
11759 ::buffa::types::put_len_delimited_header(
11760 21u32,
11761 __cache.consume_next(),
11762 buf,
11763 );
11764 self.zipper_reason.write_to(__cache, buf);
11765 }
11766 self.__buffa_unknown_fields.write_to(buf);
11767 }
11768 }
11769 impl<'__a> ::serde::Serialize for FlowTxMatchViewView<'__a> {
11781 fn serialize<__S: ::serde::Serializer>(
11782 &self,
11783 __s: __S,
11784 ) -> ::core::result::Result<__S::Ok, __S::Error> {
11785 use ::serde::ser::SerializeMap as _;
11786 let mut __map = __s.serialize_map(::core::option::Option::None)?;
11787 if !::buffa::json_helpers::skip_if::is_empty_str(self.flow_id) {
11788 __map.serialize_entry("flowId", self.flow_id)?;
11789 }
11790 if !::buffa::json_helpers::skip_if::is_default_enum_value(
11791 &self.flow_kind,
11792 ) {
11793 __map.serialize_entry("flowKind", &self.flow_kind)?;
11794 }
11795 if !::buffa::json_helpers::skip_if::is_empty_str(self.source_tx_hash) {
11796 __map.serialize_entry("sourceTxHash", self.source_tx_hash)?;
11797 }
11798 if !::buffa::json_helpers::skip_if::is_empty_str(self.latest_tx_ref) {
11799 __map.serialize_entry("latestTxRef", self.latest_tx_ref)?;
11800 }
11801 if !::buffa::json_helpers::skip_if::is_zero_u64(
11802 &self.tx_occurrence_index,
11803 ) {
11804 __map
11805 .serialize_entry(
11806 "txOccurrenceIndex",
11807 &::buffa::json_helpers::ProtoJson(&self.tx_occurrence_index),
11808 )?;
11809 }
11810 if !::buffa::json_helpers::skip_if::is_default_enum_value(
11811 &self.source_domain,
11812 ) {
11813 __map.serialize_entry("sourceDomain", &self.source_domain)?;
11814 }
11815 if !::buffa::json_helpers::skip_if::is_default_enum_value(
11816 &self.destination_domain,
11817 ) {
11818 __map
11819 .serialize_entry("destinationDomain", &self.destination_domain)?;
11820 }
11821 if !::buffa::json_helpers::skip_if::is_default_enum_value(
11822 &self.current_step,
11823 ) {
11824 __map.serialize_entry("currentStep", &self.current_step)?;
11825 }
11826 if self.is_open {
11827 __map.serialize_entry("isOpen", &self.is_open)?;
11828 }
11829 if self.is_terminal {
11830 __map.serialize_entry("isTerminal", &self.is_terminal)?;
11831 }
11832 {
11833 if let ::core::option::Option::Some(__v) = self.asset_ids.as_option()
11834 {
11835 __map.serialize_entry("assetIds", __v)?;
11836 }
11837 }
11838 if !::buffa::json_helpers::skip_if::is_zero_u32(
11839 &self.polyester_chain_id,
11840 ) {
11841 __map
11842 .serialize_entry(
11843 "polyesterChainId",
11844 &::buffa::json_helpers::ProtoJson(&self.polyester_chain_id),
11845 )?;
11846 }
11847 {
11848 if let ::core::option::Option::Some(__v) = self
11849 .amount_e18
11850 .as_option()
11851 {
11852 __map.serialize_entry("amountE18", __v)?;
11853 }
11854 }
11855 if !::buffa::json_helpers::skip_if::is_empty_str(self.source_address) {
11856 __map.serialize_entry("sourceAddress", self.source_address)?;
11857 }
11858 if !::buffa::json_helpers::skip_if::is_empty_str(
11859 self.destination_address,
11860 ) {
11861 __map
11862 .serialize_entry(
11863 "destinationAddress",
11864 self.destination_address,
11865 )?;
11866 }
11867 if !::buffa::json_helpers::skip_if::is_default_enum_value(
11868 &self.lifecycle_reason,
11869 ) {
11870 __map.serialize_entry("lifecycleReason", &self.lifecycle_reason)?;
11871 }
11872 if !::buffa::json_helpers::skip_if::is_zero_u64(
11873 &self.last_activity_at_unix_ms,
11874 ) {
11875 __map
11876 .serialize_entry(
11877 "lastActivityAtUnixMs",
11878 &::buffa::json_helpers::ProtoJson(
11879 &self.last_activity_at_unix_ms,
11880 ),
11881 )?;
11882 }
11883 if !::buffa::json_helpers::skip_if::is_zero_u64(&self.owner_account_id) {
11884 __map
11885 .serialize_entry(
11886 "ownerAccountId",
11887 &::buffa::json_helpers::ProtoJson(&self.owner_account_id),
11888 )?;
11889 }
11890 if !::buffa::json_helpers::skip_if::is_empty_str(
11891 self.smart_account_address,
11892 ) {
11893 __map
11894 .serialize_entry(
11895 "smartAccountAddress",
11896 self.smart_account_address,
11897 )?;
11898 }
11899 {
11900 if let ::core::option::Option::Some(__v) = self
11901 .zipper_reason
11902 .as_option()
11903 {
11904 __map.serialize_entry("zipperReason", __v)?;
11905 }
11906 }
11907 __map.end()
11908 }
11909 }
11910 impl<'a> ::buffa::MessageName for FlowTxMatchViewView<'a> {
11911 const PACKAGE: &'static str = "chain.lifecycle.v1";
11912 const NAME: &'static str = "FlowTxMatchView";
11913 const FULL_NAME: &'static str = "chain.lifecycle.v1.FlowTxMatchView";
11914 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowTxMatchView";
11915 }
11916 ::buffa::impl_default_view_instance!(FlowTxMatchViewView);
11917 ::buffa::impl_view_reborrow!(FlowTxMatchViewView);
11918 #[derive(Clone, Debug)]
11924 pub struct FlowTxMatchViewOwnedView(
11925 ::buffa::OwnedView<FlowTxMatchViewView<'static>>,
11926 );
11927 impl FlowTxMatchViewOwnedView {
11928 pub fn decode(
11938 bytes: ::buffa::bytes::Bytes,
11939 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
11940 ::core::result::Result::Ok(
11941 FlowTxMatchViewOwnedView(::buffa::OwnedView::decode(bytes)?),
11942 )
11943 }
11944 pub fn decode_with_options(
11952 bytes: ::buffa::bytes::Bytes,
11953 opts: &::buffa::DecodeOptions,
11954 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
11955 ::core::result::Result::Ok(
11956 FlowTxMatchViewOwnedView(
11957 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
11958 ),
11959 )
11960 }
11961 pub fn from_owned(
11968 msg: &super::super::FlowTxMatchView,
11969 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
11970 ::core::result::Result::Ok(
11971 FlowTxMatchViewOwnedView(::buffa::OwnedView::from_owned(msg)?),
11972 )
11973 }
11974 #[must_use]
11976 pub fn view(&self) -> &FlowTxMatchViewView<'_> {
11977 self.0.reborrow()
11978 }
11979 pub fn to_owned_message(
11986 &self,
11987 ) -> ::core::result::Result<
11988 super::super::FlowTxMatchView,
11989 ::buffa::DecodeError,
11990 > {
11991 self.0.to_owned_message()
11992 }
11993 #[must_use]
11995 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
11996 self.0.bytes()
11997 }
11998 #[must_use]
12000 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
12001 self.0.into_bytes()
12002 }
12003 #[must_use]
12007 pub fn flow_id(&self) -> &'_ str {
12008 self.0.reborrow().flow_id
12009 }
12010 #[must_use]
12014 pub fn flow_kind(&self) -> ::buffa::EnumValue<super::super::FlowKind> {
12015 self.0.reborrow().flow_kind
12016 }
12017 #[must_use]
12021 pub fn source_tx_hash(&self) -> &'_ str {
12022 self.0.reborrow().source_tx_hash
12023 }
12024 #[must_use]
12028 pub fn latest_tx_ref(&self) -> &'_ str {
12029 self.0.reborrow().latest_tx_ref
12030 }
12031 #[must_use]
12037 pub fn tx_occurrence_index(&self) -> u64 {
12038 self.0.reborrow().tx_occurrence_index
12039 }
12040 #[must_use]
12044 pub fn source_domain(&self) -> ::buffa::EnumValue<super::super::FlowDomain> {
12045 self.0.reborrow().source_domain
12046 }
12047 #[must_use]
12051 pub fn destination_domain(
12052 &self,
12053 ) -> ::buffa::EnumValue<super::super::FlowDomain> {
12054 self.0.reborrow().destination_domain
12055 }
12056 #[must_use]
12060 pub fn current_step(&self) -> ::buffa::EnumValue<super::super::FlowStep> {
12061 self.0.reborrow().current_step
12062 }
12063 #[must_use]
12067 pub fn is_open(&self) -> bool {
12068 self.0.reborrow().is_open
12069 }
12070 #[must_use]
12074 pub fn is_terminal(&self) -> bool {
12075 self.0.reborrow().is_terminal
12076 }
12077 #[must_use]
12081 pub fn asset_ids(
12082 &self,
12083 ) -> &::buffa::MessageFieldView<
12084 super::super::__buffa::view::AssetIdsView<'_>,
12085 > {
12086 &self.0.reborrow().asset_ids
12087 }
12088 #[must_use]
12092 pub fn polyester_chain_id(&self) -> u32 {
12093 self.0.reborrow().polyester_chain_id
12094 }
12095 #[must_use]
12099 pub fn amount_e18(
12100 &self,
12101 ) -> &::buffa::MessageFieldView<
12102 super::super::super::super::super::polyester::r#type::v1::__buffa::view::U128View<
12103 '_,
12104 >,
12105 > {
12106 &self.0.reborrow().amount_e18
12107 }
12108 #[must_use]
12112 pub fn source_address(&self) -> &'_ str {
12113 self.0.reborrow().source_address
12114 }
12115 #[must_use]
12119 pub fn destination_address(&self) -> &'_ str {
12120 self.0.reborrow().destination_address
12121 }
12122 #[must_use]
12126 pub fn lifecycle_reason(
12127 &self,
12128 ) -> ::buffa::EnumValue<super::super::LifecycleReason> {
12129 self.0.reborrow().lifecycle_reason
12130 }
12131 #[must_use]
12135 pub fn last_activity_at_unix_ms(&self) -> u64 {
12136 self.0.reborrow().last_activity_at_unix_ms
12137 }
12138 #[must_use]
12142 pub fn owner_account_id(&self) -> u64 {
12143 self.0.reborrow().owner_account_id
12144 }
12145 #[must_use]
12149 pub fn smart_account_address(&self) -> &'_ str {
12150 self.0.reborrow().smart_account_address
12151 }
12152 #[must_use]
12156 pub fn zipper_reason(
12157 &self,
12158 ) -> &::buffa::MessageFieldView<
12159 super::super::super::super::zipper::v1::__buffa::view::ZipperReasonDetailsView<
12160 '_,
12161 >,
12162 > {
12163 &self.0.reborrow().zipper_reason
12164 }
12165 }
12166 impl ::core::convert::From<::buffa::OwnedView<FlowTxMatchViewView<'static>>>
12167 for FlowTxMatchViewOwnedView {
12168 fn from(inner: ::buffa::OwnedView<FlowTxMatchViewView<'static>>) -> Self {
12169 FlowTxMatchViewOwnedView(inner)
12170 }
12171 }
12172 impl ::core::convert::From<FlowTxMatchViewOwnedView>
12173 for ::buffa::OwnedView<FlowTxMatchViewView<'static>> {
12174 fn from(wrapper: FlowTxMatchViewOwnedView) -> Self {
12175 wrapper.0
12176 }
12177 }
12178 impl ::core::convert::AsRef<::buffa::OwnedView<FlowTxMatchViewView<'static>>>
12179 for FlowTxMatchViewOwnedView {
12180 fn as_ref(&self) -> &::buffa::OwnedView<FlowTxMatchViewView<'static>> {
12181 &self.0
12182 }
12183 }
12184 impl ::buffa::HasMessageView for super::super::FlowTxMatchView {
12185 type View<'a> = FlowTxMatchViewView<'a>;
12186 type ViewHandle = FlowTxMatchViewOwnedView;
12187 }
12188 impl ::serde::Serialize for FlowTxMatchViewOwnedView {
12189 fn serialize<__S: ::serde::Serializer>(
12190 &self,
12191 __s: __S,
12192 ) -> ::core::result::Result<__S::Ok, __S::Error> {
12193 ::serde::Serialize::serialize(&self.0, __s)
12194 }
12195 }
12196 #[derive(Clone, Debug, Default)]
12199 pub struct ListFlowsByTxResponseView<'a> {
12200 pub tx_hash: &'a str,
12204 pub matches: ::buffa::RepeatedView<
12209 'a,
12210 super::super::__buffa::view::FlowTxMatchViewView<'a>,
12211 >,
12212 pub next_page_token: &'a str,
12216 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
12217 }
12218 impl<'a> ::buffa::MessageView<'a> for ListFlowsByTxResponseView<'a> {
12219 type Owned = super::super::ListFlowsByTxResponse;
12220 fn decode_view(
12221 buf: &'a [u8],
12222 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12223 let __limit = ::core::cell::Cell::new(
12224 ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
12225 );
12226 <Self as ::buffa::MessageView>::decode_view_ctx(
12227 buf,
12228 ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
12229 )
12230 }
12231 fn decode_view_with_ctx(
12232 buf: &'a [u8],
12233 ctx: ::buffa::DecodeContext<'_>,
12234 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12235 <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
12236 }
12237 fn merge_view_field(
12238 &mut self,
12239 tag: ::buffa::encoding::Tag,
12240 cur: &'a [u8],
12241 before_tag: &'a [u8],
12242 ctx: ::buffa::DecodeContext<'_>,
12243 ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
12244 let _ = ctx;
12245 #[allow(unused_variables)]
12246 let view = self;
12247 let mut cur = cur;
12248 match tag.field_number() {
12249 1u32 => {
12250 ::buffa::encoding::check_wire_type(
12251 tag,
12252 ::buffa::encoding::WireType::LengthDelimited,
12253 )?;
12254 view.tx_hash = ::buffa::types::borrow_str(&mut cur)?;
12255 }
12256 3u32 => {
12257 ::buffa::encoding::check_wire_type(
12258 tag,
12259 ::buffa::encoding::WireType::LengthDelimited,
12260 )?;
12261 view.next_page_token = ::buffa::types::borrow_str(&mut cur)?;
12262 }
12263 2u32 => {
12264 ::buffa::encoding::check_wire_type(
12265 tag,
12266 ::buffa::encoding::WireType::LengthDelimited,
12267 )?;
12268 let __sub_ctx = ctx.descend()?;
12269 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
12270 view.matches
12271 .push(
12272 <super::super::__buffa::view::FlowTxMatchViewView as ::buffa::MessageView>::decode_view_ctx(
12273 sub,
12274 __sub_ctx,
12275 )?,
12276 );
12277 }
12278 _ => {
12279 ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
12280 let span_len = before_tag.len() - cur.len();
12281 view.__buffa_unknown_fields
12282 .push_record(before_tag, span_len, ctx)?;
12283 }
12284 }
12285 ::core::result::Result::Ok(cur)
12286 }
12287 fn to_owned_message(
12288 &self,
12289 ) -> ::core::result::Result<
12290 super::super::ListFlowsByTxResponse,
12291 ::buffa::DecodeError,
12292 > {
12293 self.to_owned_from_source(None)
12294 }
12295 #[allow(clippy::useless_conversion, clippy::needless_update)]
12296 fn to_owned_from_source(
12297 &self,
12298 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
12299 ) -> ::core::result::Result<
12300 super::super::ListFlowsByTxResponse,
12301 ::buffa::DecodeError,
12302 > {
12303 #[allow(unused_imports)]
12304 use ::buffa::alloc::string::ToString as _;
12305 let _ = __buffa_src;
12306 ::core::result::Result::Ok(super::super::ListFlowsByTxResponse {
12307 tx_hash: self.tx_hash.to_string(),
12308 matches: self
12309 .matches
12310 .iter()
12311 .map(|v| v.to_owned_from_source(__buffa_src))
12312 .collect::<::core::result::Result<_, ::buffa::DecodeError>>()?,
12313 next_page_token: self.next_page_token.to_string(),
12314 __buffa_unknown_fields: self
12315 .__buffa_unknown_fields
12316 .to_owned()?
12317 .into(),
12318 ..::core::default::Default::default()
12319 })
12320 }
12321 }
12322 impl<'a> ::buffa::ViewEncode<'a> for ListFlowsByTxResponseView<'a> {
12323 #[allow(clippy::needless_borrow, clippy::let_and_return)]
12324 fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
12325 #[allow(unused_imports)]
12326 use ::buffa::Enumeration as _;
12327 let mut size = 0u32;
12328 if !self.tx_hash.is_empty() {
12329 size
12330 += 1u32
12331 + ::buffa::types::string_encoded_len(&self.tx_hash) as u32;
12332 }
12333 for v in &self.matches {
12334 let __slot = __cache.reserve();
12335 let inner_size = v.compute_size(__cache);
12336 __cache.set(__slot, inner_size);
12337 size
12338 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
12339 + inner_size;
12340 }
12341 if !self.next_page_token.is_empty() {
12342 size
12343 += 1u32
12344 + ::buffa::types::string_encoded_len(&self.next_page_token)
12345 as u32;
12346 }
12347 size += self.__buffa_unknown_fields.encoded_len() as u32;
12348 size
12349 }
12350 #[allow(clippy::needless_borrow)]
12351 fn write_to(
12352 &self,
12353 __cache: &mut ::buffa::SizeCache,
12354 buf: &mut impl ::buffa::bytes::BufMut,
12355 ) {
12356 #[allow(unused_imports)]
12357 use ::buffa::Enumeration as _;
12358 if !self.tx_hash.is_empty() {
12359 ::buffa::types::put_string_field(1u32, &self.tx_hash, buf);
12360 }
12361 for v in &self.matches {
12362 ::buffa::types::put_len_delimited_header(
12363 2u32,
12364 __cache.consume_next(),
12365 buf,
12366 );
12367 v.write_to(__cache, buf);
12368 }
12369 if !self.next_page_token.is_empty() {
12370 ::buffa::types::put_string_field(3u32, &self.next_page_token, buf);
12371 }
12372 self.__buffa_unknown_fields.write_to(buf);
12373 }
12374 }
12375 impl<'__a> ::serde::Serialize for ListFlowsByTxResponseView<'__a> {
12387 fn serialize<__S: ::serde::Serializer>(
12388 &self,
12389 __s: __S,
12390 ) -> ::core::result::Result<__S::Ok, __S::Error> {
12391 use ::serde::ser::SerializeMap as _;
12392 let mut __map = __s.serialize_map(::core::option::Option::None)?;
12393 if !::buffa::json_helpers::skip_if::is_empty_str(self.tx_hash) {
12394 __map.serialize_entry("txHash", self.tx_hash)?;
12395 }
12396 if !self.matches.is_empty() {
12397 __map.serialize_entry("matches", &*self.matches)?;
12398 }
12399 if !::buffa::json_helpers::skip_if::is_empty_str(self.next_page_token) {
12400 __map.serialize_entry("nextPageToken", self.next_page_token)?;
12401 }
12402 __map.end()
12403 }
12404 }
12405 impl<'a> ::buffa::MessageName for ListFlowsByTxResponseView<'a> {
12406 const PACKAGE: &'static str = "chain.lifecycle.v1";
12407 const NAME: &'static str = "ListFlowsByTxResponse";
12408 const FULL_NAME: &'static str = "chain.lifecycle.v1.ListFlowsByTxResponse";
12409 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.ListFlowsByTxResponse";
12410 }
12411 ::buffa::impl_default_view_instance!(ListFlowsByTxResponseView);
12412 ::buffa::impl_view_reborrow!(ListFlowsByTxResponseView);
12413 #[derive(Clone, Debug)]
12419 pub struct ListFlowsByTxResponseOwnedView(
12420 ::buffa::OwnedView<ListFlowsByTxResponseView<'static>>,
12421 );
12422 impl ListFlowsByTxResponseOwnedView {
12423 pub fn decode(
12433 bytes: ::buffa::bytes::Bytes,
12434 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12435 ::core::result::Result::Ok(
12436 ListFlowsByTxResponseOwnedView(::buffa::OwnedView::decode(bytes)?),
12437 )
12438 }
12439 pub fn decode_with_options(
12447 bytes: ::buffa::bytes::Bytes,
12448 opts: &::buffa::DecodeOptions,
12449 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12450 ::core::result::Result::Ok(
12451 ListFlowsByTxResponseOwnedView(
12452 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
12453 ),
12454 )
12455 }
12456 pub fn from_owned(
12463 msg: &super::super::ListFlowsByTxResponse,
12464 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12465 ::core::result::Result::Ok(
12466 ListFlowsByTxResponseOwnedView(::buffa::OwnedView::from_owned(msg)?),
12467 )
12468 }
12469 #[must_use]
12471 pub fn view(&self) -> &ListFlowsByTxResponseView<'_> {
12472 self.0.reborrow()
12473 }
12474 pub fn to_owned_message(
12481 &self,
12482 ) -> ::core::result::Result<
12483 super::super::ListFlowsByTxResponse,
12484 ::buffa::DecodeError,
12485 > {
12486 self.0.to_owned_message()
12487 }
12488 #[must_use]
12490 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
12491 self.0.bytes()
12492 }
12493 #[must_use]
12495 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
12496 self.0.into_bytes()
12497 }
12498 #[must_use]
12502 pub fn tx_hash(&self) -> &'_ str {
12503 self.0.reborrow().tx_hash
12504 }
12505 #[must_use]
12510 pub fn matches(
12511 &self,
12512 ) -> &::buffa::RepeatedView<
12513 '_,
12514 super::super::__buffa::view::FlowTxMatchViewView<'_>,
12515 > {
12516 &self.0.reborrow().matches
12517 }
12518 #[must_use]
12522 pub fn next_page_token(&self) -> &'_ str {
12523 self.0.reborrow().next_page_token
12524 }
12525 }
12526 impl ::core::convert::From<
12527 ::buffa::OwnedView<ListFlowsByTxResponseView<'static>>,
12528 > for ListFlowsByTxResponseOwnedView {
12529 fn from(
12530 inner: ::buffa::OwnedView<ListFlowsByTxResponseView<'static>>,
12531 ) -> Self {
12532 ListFlowsByTxResponseOwnedView(inner)
12533 }
12534 }
12535 impl ::core::convert::From<ListFlowsByTxResponseOwnedView>
12536 for ::buffa::OwnedView<ListFlowsByTxResponseView<'static>> {
12537 fn from(wrapper: ListFlowsByTxResponseOwnedView) -> Self {
12538 wrapper.0
12539 }
12540 }
12541 impl ::core::convert::AsRef<
12542 ::buffa::OwnedView<ListFlowsByTxResponseView<'static>>,
12543 > for ListFlowsByTxResponseOwnedView {
12544 fn as_ref(&self) -> &::buffa::OwnedView<ListFlowsByTxResponseView<'static>> {
12545 &self.0
12546 }
12547 }
12548 impl ::buffa::HasMessageView for super::super::ListFlowsByTxResponse {
12549 type View<'a> = ListFlowsByTxResponseView<'a>;
12550 type ViewHandle = ListFlowsByTxResponseOwnedView;
12551 }
12552 impl ::serde::Serialize for ListFlowsByTxResponseOwnedView {
12553 fn serialize<__S: ::serde::Serializer>(
12554 &self,
12555 __s: __S,
12556 ) -> ::core::result::Result<__S::Ok, __S::Error> {
12557 ::serde::Serialize::serialize(&self.0, __s)
12558 }
12559 }
12560 #[derive(Clone, Debug, Default)]
12563 pub struct FlowSummaryViewView<'a> {
12564 pub owner_account_id: u64,
12568 pub smart_account_address: &'a str,
12574 pub flow_id: &'a str,
12578 pub flow_kind: ::buffa::EnumValue<super::super::FlowKind>,
12582 pub current_step: ::buffa::EnumValue<super::super::FlowStep>,
12587 pub asset_ids: ::buffa::MessageFieldView<
12591 super::super::__buffa::view::AssetIdsView<'a>,
12592 >,
12593 pub polyester_chain_id: u32,
12597 pub amount_e18: ::buffa::MessageFieldView<
12604 super::super::super::super::super::polyester::r#type::v1::__buffa::view::U128View<
12605 'a,
12606 >,
12607 >,
12608 pub request_fee: ::buffa::MessageFieldView<
12613 super::super::__buffa::view::RequestFeeView<'a>,
12614 >,
12615 pub source_tx_hash: &'a str,
12619 pub tx_occurrence_index: u64,
12625 pub source_address: &'a str,
12630 pub destination_address: &'a str,
12635 pub latest_tx_ref: &'a str,
12639 pub source_domain: ::buffa::EnumValue<super::super::FlowDomain>,
12644 pub destination_domain: ::buffa::EnumValue<super::super::FlowDomain>,
12649 pub latest_lifecycle_source: ::buffa::EnumValue<
12654 super::super::LifecycleSource,
12655 >,
12656 pub lifecycle_reason: ::buffa::EnumValue<super::super::LifecycleReason>,
12660 pub zipper_reason: ::buffa::MessageFieldView<
12664 super::super::super::super::zipper::v1::__buffa::view::ZipperReasonDetailsView<
12665 'a,
12666 >,
12667 >,
12668 pub started_at_unix_ms: u64,
12672 pub updated_at_unix_ms: u64,
12676 pub terminal_at_unix_ms: u64,
12680 pub last_activity_at_unix_ms: u64,
12684 pub is_open: bool,
12688 pub is_terminal: bool,
12692 pub current_step_sequence: u32,
12696 pub current_progress: ::buffa::MessageFieldView<
12700 super::super::__buffa::view::FlowSummaryProgressViewView<'a>,
12701 >,
12702 pub progress_timeline: ::buffa::RepeatedView<
12707 'a,
12708 super::super::__buffa::view::FlowTimelineItemViewView<'a>,
12709 >,
12710 pub estimated_completion_unix_ms: u64,
12714 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
12715 }
12716 impl<'a> ::buffa::MessageView<'a> for FlowSummaryViewView<'a> {
12717 type Owned = super::super::FlowSummaryView;
12718 fn decode_view(
12719 buf: &'a [u8],
12720 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12721 let __limit = ::core::cell::Cell::new(
12722 ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
12723 );
12724 <Self as ::buffa::MessageView>::decode_view_ctx(
12725 buf,
12726 ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
12727 )
12728 }
12729 fn decode_view_with_ctx(
12730 buf: &'a [u8],
12731 ctx: ::buffa::DecodeContext<'_>,
12732 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12733 <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
12734 }
12735 fn merge_view_field(
12736 &mut self,
12737 tag: ::buffa::encoding::Tag,
12738 cur: &'a [u8],
12739 before_tag: &'a [u8],
12740 ctx: ::buffa::DecodeContext<'_>,
12741 ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
12742 let _ = ctx;
12743 #[allow(unused_variables)]
12744 let view = self;
12745 let mut cur = cur;
12746 match tag.field_number() {
12747 1u32 => {
12748 ::buffa::encoding::check_wire_type(
12749 tag,
12750 ::buffa::encoding::WireType::Fixed64,
12751 )?;
12752 view.owner_account_id = ::buffa::types::decode_fixed64(
12753 &mut cur,
12754 )?;
12755 }
12756 34u32 => {
12757 ::buffa::encoding::check_wire_type(
12758 tag,
12759 ::buffa::encoding::WireType::LengthDelimited,
12760 )?;
12761 view.smart_account_address = ::buffa::types::borrow_str(
12762 &mut cur,
12763 )?;
12764 }
12765 33u32 => {
12766 ::buffa::encoding::check_wire_type(
12767 tag,
12768 ::buffa::encoding::WireType::LengthDelimited,
12769 )?;
12770 view.flow_id = ::buffa::types::borrow_str(&mut cur)?;
12771 }
12772 4u32 => {
12773 ::buffa::encoding::check_wire_type(
12774 tag,
12775 ::buffa::encoding::WireType::Varint,
12776 )?;
12777 view.flow_kind = ::buffa::EnumValue::from(
12778 ::buffa::types::decode_int32(&mut cur)?,
12779 );
12780 }
12781 6u32 => {
12782 ::buffa::encoding::check_wire_type(
12783 tag,
12784 ::buffa::encoding::WireType::Varint,
12785 )?;
12786 view.current_step = ::buffa::EnumValue::from(
12787 ::buffa::types::decode_int32(&mut cur)?,
12788 );
12789 }
12790 7u32 => {
12791 ::buffa::encoding::check_wire_type(
12792 tag,
12793 ::buffa::encoding::WireType::LengthDelimited,
12794 )?;
12795 let __sub_ctx = ctx.descend()?;
12796 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
12797 match view.asset_ids.as_mut() {
12798 Some(existing) => {
12799 ::buffa::MessageView::merge_into_view(
12800 existing,
12801 sub,
12802 __sub_ctx,
12803 )?
12804 }
12805 None => {
12806 view.asset_ids = ::buffa::MessageFieldView::set(
12807 <super::super::__buffa::view::AssetIdsView as ::buffa::MessageView>::decode_view_ctx(
12808 sub,
12809 __sub_ctx,
12810 )?,
12811 );
12812 }
12813 }
12814 }
12815 8u32 => {
12816 ::buffa::encoding::check_wire_type(
12817 tag,
12818 ::buffa::encoding::WireType::Varint,
12819 )?;
12820 view.polyester_chain_id = ::buffa::types::decode_uint32(
12821 &mut cur,
12822 )?;
12823 }
12824 9u32 => {
12825 ::buffa::encoding::check_wire_type(
12826 tag,
12827 ::buffa::encoding::WireType::LengthDelimited,
12828 )?;
12829 let __sub_ctx = ctx.descend()?;
12830 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
12831 match view.amount_e18.as_mut() {
12832 Some(existing) => {
12833 ::buffa::MessageView::merge_into_view(
12834 existing,
12835 sub,
12836 __sub_ctx,
12837 )?
12838 }
12839 None => {
12840 view.amount_e18 = ::buffa::MessageFieldView::set(
12841 <super::super::super::super::super::polyester::r#type::v1::__buffa::view::U128View as ::buffa::MessageView>::decode_view_ctx(
12842 sub,
12843 __sub_ctx,
12844 )?,
12845 );
12846 }
12847 }
12848 }
12849 28u32 => {
12850 ::buffa::encoding::check_wire_type(
12851 tag,
12852 ::buffa::encoding::WireType::LengthDelimited,
12853 )?;
12854 let __sub_ctx = ctx.descend()?;
12855 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
12856 match view.request_fee.as_mut() {
12857 Some(existing) => {
12858 ::buffa::MessageView::merge_into_view(
12859 existing,
12860 sub,
12861 __sub_ctx,
12862 )?
12863 }
12864 None => {
12865 view.request_fee = ::buffa::MessageFieldView::set(
12866 <super::super::__buffa::view::RequestFeeView as ::buffa::MessageView>::decode_view_ctx(
12867 sub,
12868 __sub_ctx,
12869 )?,
12870 );
12871 }
12872 }
12873 }
12874 11u32 => {
12875 ::buffa::encoding::check_wire_type(
12876 tag,
12877 ::buffa::encoding::WireType::LengthDelimited,
12878 )?;
12879 view.source_tx_hash = ::buffa::types::borrow_str(&mut cur)?;
12880 }
12881 32u32 => {
12882 ::buffa::encoding::check_wire_type(
12883 tag,
12884 ::buffa::encoding::WireType::Varint,
12885 )?;
12886 view.tx_occurrence_index = ::buffa::types::decode_uint64(
12887 &mut cur,
12888 )?;
12889 }
12890 13u32 => {
12891 ::buffa::encoding::check_wire_type(
12892 tag,
12893 ::buffa::encoding::WireType::LengthDelimited,
12894 )?;
12895 view.source_address = ::buffa::types::borrow_str(&mut cur)?;
12896 }
12897 14u32 => {
12898 ::buffa::encoding::check_wire_type(
12899 tag,
12900 ::buffa::encoding::WireType::LengthDelimited,
12901 )?;
12902 view.destination_address = ::buffa::types::borrow_str(&mut cur)?;
12903 }
12904 15u32 => {
12905 ::buffa::encoding::check_wire_type(
12906 tag,
12907 ::buffa::encoding::WireType::LengthDelimited,
12908 )?;
12909 view.latest_tx_ref = ::buffa::types::borrow_str(&mut cur)?;
12910 }
12911 29u32 => {
12912 ::buffa::encoding::check_wire_type(
12913 tag,
12914 ::buffa::encoding::WireType::Varint,
12915 )?;
12916 view.source_domain = ::buffa::EnumValue::from(
12917 ::buffa::types::decode_int32(&mut cur)?,
12918 );
12919 }
12920 30u32 => {
12921 ::buffa::encoding::check_wire_type(
12922 tag,
12923 ::buffa::encoding::WireType::Varint,
12924 )?;
12925 view.destination_domain = ::buffa::EnumValue::from(
12926 ::buffa::types::decode_int32(&mut cur)?,
12927 );
12928 }
12929 16u32 => {
12930 ::buffa::encoding::check_wire_type(
12931 tag,
12932 ::buffa::encoding::WireType::Varint,
12933 )?;
12934 view.latest_lifecycle_source = ::buffa::EnumValue::from(
12935 ::buffa::types::decode_int32(&mut cur)?,
12936 );
12937 }
12938 17u32 => {
12939 ::buffa::encoding::check_wire_type(
12940 tag,
12941 ::buffa::encoding::WireType::Varint,
12942 )?;
12943 view.lifecycle_reason = ::buffa::EnumValue::from(
12944 ::buffa::types::decode_int32(&mut cur)?,
12945 );
12946 }
12947 35u32 => {
12948 ::buffa::encoding::check_wire_type(
12949 tag,
12950 ::buffa::encoding::WireType::LengthDelimited,
12951 )?;
12952 let __sub_ctx = ctx.descend()?;
12953 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
12954 match view.zipper_reason.as_mut() {
12955 Some(existing) => {
12956 ::buffa::MessageView::merge_into_view(
12957 existing,
12958 sub,
12959 __sub_ctx,
12960 )?
12961 }
12962 None => {
12963 view.zipper_reason = ::buffa::MessageFieldView::set(
12964 <super::super::super::super::zipper::v1::__buffa::view::ZipperReasonDetailsView as ::buffa::MessageView>::decode_view_ctx(
12965 sub,
12966 __sub_ctx,
12967 )?,
12968 );
12969 }
12970 }
12971 }
12972 18u32 => {
12973 ::buffa::encoding::check_wire_type(
12974 tag,
12975 ::buffa::encoding::WireType::Varint,
12976 )?;
12977 view.started_at_unix_ms = ::buffa::types::decode_uint64(
12978 &mut cur,
12979 )?;
12980 }
12981 19u32 => {
12982 ::buffa::encoding::check_wire_type(
12983 tag,
12984 ::buffa::encoding::WireType::Varint,
12985 )?;
12986 view.updated_at_unix_ms = ::buffa::types::decode_uint64(
12987 &mut cur,
12988 )?;
12989 }
12990 20u32 => {
12991 ::buffa::encoding::check_wire_type(
12992 tag,
12993 ::buffa::encoding::WireType::Varint,
12994 )?;
12995 view.terminal_at_unix_ms = ::buffa::types::decode_uint64(
12996 &mut cur,
12997 )?;
12998 }
12999 21u32 => {
13000 ::buffa::encoding::check_wire_type(
13001 tag,
13002 ::buffa::encoding::WireType::Varint,
13003 )?;
13004 view.last_activity_at_unix_ms = ::buffa::types::decode_uint64(
13005 &mut cur,
13006 )?;
13007 }
13008 22u32 => {
13009 ::buffa::encoding::check_wire_type(
13010 tag,
13011 ::buffa::encoding::WireType::Varint,
13012 )?;
13013 view.is_open = ::buffa::types::decode_bool(&mut cur)?;
13014 }
13015 23u32 => {
13016 ::buffa::encoding::check_wire_type(
13017 tag,
13018 ::buffa::encoding::WireType::Varint,
13019 )?;
13020 view.is_terminal = ::buffa::types::decode_bool(&mut cur)?;
13021 }
13022 24u32 => {
13023 ::buffa::encoding::check_wire_type(
13024 tag,
13025 ::buffa::encoding::WireType::Varint,
13026 )?;
13027 view.current_step_sequence = ::buffa::types::decode_uint32(
13028 &mut cur,
13029 )?;
13030 }
13031 25u32 => {
13032 ::buffa::encoding::check_wire_type(
13033 tag,
13034 ::buffa::encoding::WireType::LengthDelimited,
13035 )?;
13036 let __sub_ctx = ctx.descend()?;
13037 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
13038 match view.current_progress.as_mut() {
13039 Some(existing) => {
13040 ::buffa::MessageView::merge_into_view(
13041 existing,
13042 sub,
13043 __sub_ctx,
13044 )?
13045 }
13046 None => {
13047 view.current_progress = ::buffa::MessageFieldView::set(
13048 <super::super::__buffa::view::FlowSummaryProgressViewView as ::buffa::MessageView>::decode_view_ctx(
13049 sub,
13050 __sub_ctx,
13051 )?,
13052 );
13053 }
13054 }
13055 }
13056 27u32 => {
13057 ::buffa::encoding::check_wire_type(
13058 tag,
13059 ::buffa::encoding::WireType::Varint,
13060 )?;
13061 view.estimated_completion_unix_ms = ::buffa::types::decode_uint64(
13062 &mut cur,
13063 )?;
13064 }
13065 26u32 => {
13066 ::buffa::encoding::check_wire_type(
13067 tag,
13068 ::buffa::encoding::WireType::LengthDelimited,
13069 )?;
13070 let __sub_ctx = ctx.descend()?;
13071 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
13072 view.progress_timeline
13073 .push(
13074 <super::super::__buffa::view::FlowTimelineItemViewView as ::buffa::MessageView>::decode_view_ctx(
13075 sub,
13076 __sub_ctx,
13077 )?,
13078 );
13079 }
13080 _ => {
13081 ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
13082 let span_len = before_tag.len() - cur.len();
13083 view.__buffa_unknown_fields
13084 .push_record(before_tag, span_len, ctx)?;
13085 }
13086 }
13087 ::core::result::Result::Ok(cur)
13088 }
13089 fn to_owned_message(
13090 &self,
13091 ) -> ::core::result::Result<
13092 super::super::FlowSummaryView,
13093 ::buffa::DecodeError,
13094 > {
13095 self.to_owned_from_source(None)
13096 }
13097 #[allow(clippy::useless_conversion, clippy::needless_update)]
13098 fn to_owned_from_source(
13099 &self,
13100 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
13101 ) -> ::core::result::Result<
13102 super::super::FlowSummaryView,
13103 ::buffa::DecodeError,
13104 > {
13105 #[allow(unused_imports)]
13106 use ::buffa::alloc::string::ToString as _;
13107 let _ = __buffa_src;
13108 ::core::result::Result::Ok(super::super::FlowSummaryView {
13109 owner_account_id: self.owner_account_id,
13110 smart_account_address: self.smart_account_address.to_string(),
13111 flow_id: self.flow_id.to_string(),
13112 flow_kind: self.flow_kind,
13113 current_step: self.current_step,
13114 asset_ids: match self.asset_ids.as_option() {
13115 Some(v) => {
13116 ::buffa::MessageField::<
13117 super::super::AssetIds,
13118 >::some(v.to_owned_from_source(__buffa_src)?)
13119 }
13120 None => ::buffa::MessageField::none(),
13121 },
13122 polyester_chain_id: self.polyester_chain_id,
13123 amount_e18: match self.amount_e18.as_option() {
13124 Some(v) => {
13125 ::buffa::MessageField::<
13126 super::super::super::super::super::polyester::r#type::v1::U128,
13127 >::some(v.to_owned_from_source(__buffa_src)?)
13128 }
13129 None => ::buffa::MessageField::none(),
13130 },
13131 request_fee: match self.request_fee.as_option() {
13132 Some(v) => {
13133 ::buffa::MessageField::<
13134 super::super::RequestFee,
13135 >::some(v.to_owned_from_source(__buffa_src)?)
13136 }
13137 None => ::buffa::MessageField::none(),
13138 },
13139 source_tx_hash: self.source_tx_hash.to_string(),
13140 tx_occurrence_index: self.tx_occurrence_index,
13141 source_address: self.source_address.to_string(),
13142 destination_address: self.destination_address.to_string(),
13143 latest_tx_ref: self.latest_tx_ref.to_string(),
13144 source_domain: self.source_domain,
13145 destination_domain: self.destination_domain,
13146 latest_lifecycle_source: self.latest_lifecycle_source,
13147 lifecycle_reason: self.lifecycle_reason,
13148 zipper_reason: match self.zipper_reason.as_option() {
13149 Some(v) => {
13150 ::buffa::MessageField::<
13151 super::super::super::super::zipper::v1::ZipperReasonDetails,
13152 >::some(v.to_owned_from_source(__buffa_src)?)
13153 }
13154 None => ::buffa::MessageField::none(),
13155 },
13156 started_at_unix_ms: self.started_at_unix_ms,
13157 updated_at_unix_ms: self.updated_at_unix_ms,
13158 terminal_at_unix_ms: self.terminal_at_unix_ms,
13159 last_activity_at_unix_ms: self.last_activity_at_unix_ms,
13160 is_open: self.is_open,
13161 is_terminal: self.is_terminal,
13162 current_step_sequence: self.current_step_sequence,
13163 current_progress: match self.current_progress.as_option() {
13164 Some(v) => {
13165 ::buffa::MessageField::<
13166 super::super::FlowSummaryProgressView,
13167 >::some(v.to_owned_from_source(__buffa_src)?)
13168 }
13169 None => ::buffa::MessageField::none(),
13170 },
13171 progress_timeline: self
13172 .progress_timeline
13173 .iter()
13174 .map(|v| v.to_owned_from_source(__buffa_src))
13175 .collect::<::core::result::Result<_, ::buffa::DecodeError>>()?,
13176 estimated_completion_unix_ms: self.estimated_completion_unix_ms,
13177 __buffa_unknown_fields: self
13178 .__buffa_unknown_fields
13179 .to_owned()?
13180 .into(),
13181 ..::core::default::Default::default()
13182 })
13183 }
13184 }
13185 impl<'a> ::buffa::ViewEncode<'a> for FlowSummaryViewView<'a> {
13186 #[allow(clippy::needless_borrow, clippy::let_and_return)]
13187 fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
13188 #[allow(unused_imports)]
13189 use ::buffa::Enumeration as _;
13190 let mut size = 0u32;
13191 if self.owner_account_id != 0u64 {
13192 size += 1u32 + ::buffa::types::FIXED64_ENCODED_LEN as u32;
13193 }
13194 {
13195 let val = self.flow_kind.to_i32();
13196 if val != 0 {
13197 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
13198 }
13199 }
13200 {
13201 let val = self.current_step.to_i32();
13202 if val != 0 {
13203 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
13204 }
13205 }
13206 if self.asset_ids.is_set() {
13207 let __slot = __cache.reserve();
13208 let inner_size = self.asset_ids.compute_size(__cache);
13209 __cache.set(__slot, inner_size);
13210 size
13211 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
13212 + inner_size;
13213 }
13214 if self.polyester_chain_id != 0u32 {
13215 size
13216 += 1u32
13217 + ::buffa::types::uint32_encoded_len(self.polyester_chain_id)
13218 as u32;
13219 }
13220 if self.amount_e18.is_set() {
13221 let __slot = __cache.reserve();
13222 let inner_size = self.amount_e18.compute_size(__cache);
13223 __cache.set(__slot, inner_size);
13224 size
13225 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
13226 + inner_size;
13227 }
13228 if !self.source_tx_hash.is_empty() {
13229 size
13230 += 1u32
13231 + ::buffa::types::string_encoded_len(&self.source_tx_hash)
13232 as u32;
13233 }
13234 if !self.source_address.is_empty() {
13235 size
13236 += 1u32
13237 + ::buffa::types::string_encoded_len(&self.source_address)
13238 as u32;
13239 }
13240 if !self.destination_address.is_empty() {
13241 size
13242 += 1u32
13243 + ::buffa::types::string_encoded_len(
13244 &self.destination_address,
13245 ) as u32;
13246 }
13247 if !self.latest_tx_ref.is_empty() {
13248 size
13249 += 1u32
13250 + ::buffa::types::string_encoded_len(&self.latest_tx_ref)
13251 as u32;
13252 }
13253 {
13254 let val = self.latest_lifecycle_source.to_i32();
13255 if val != 0 {
13256 size += 2u32 + ::buffa::types::int32_encoded_len(val) as u32;
13257 }
13258 }
13259 {
13260 let val = self.lifecycle_reason.to_i32();
13261 if val != 0 {
13262 size += 2u32 + ::buffa::types::int32_encoded_len(val) as u32;
13263 }
13264 }
13265 if self.started_at_unix_ms != 0u64 {
13266 size
13267 += 2u32
13268 + ::buffa::types::uint64_encoded_len(self.started_at_unix_ms)
13269 as u32;
13270 }
13271 if self.updated_at_unix_ms != 0u64 {
13272 size
13273 += 2u32
13274 + ::buffa::types::uint64_encoded_len(self.updated_at_unix_ms)
13275 as u32;
13276 }
13277 if self.terminal_at_unix_ms != 0u64 {
13278 size
13279 += 2u32
13280 + ::buffa::types::uint64_encoded_len(
13281 self.terminal_at_unix_ms,
13282 ) as u32;
13283 }
13284 if self.last_activity_at_unix_ms != 0u64 {
13285 size
13286 += 2u32
13287 + ::buffa::types::uint64_encoded_len(
13288 self.last_activity_at_unix_ms,
13289 ) as u32;
13290 }
13291 if self.is_open {
13292 size += 2u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
13293 }
13294 if self.is_terminal {
13295 size += 2u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
13296 }
13297 if self.current_step_sequence != 0u32 {
13298 size
13299 += 2u32
13300 + ::buffa::types::uint32_encoded_len(
13301 self.current_step_sequence,
13302 ) as u32;
13303 }
13304 if self.current_progress.is_set() {
13305 let __slot = __cache.reserve();
13306 let inner_size = self.current_progress.compute_size(__cache);
13307 __cache.set(__slot, inner_size);
13308 size
13309 += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
13310 + inner_size;
13311 }
13312 for v in &self.progress_timeline {
13313 let __slot = __cache.reserve();
13314 let inner_size = v.compute_size(__cache);
13315 __cache.set(__slot, inner_size);
13316 size
13317 += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
13318 + inner_size;
13319 }
13320 if self.estimated_completion_unix_ms != 0u64 {
13321 size
13322 += 2u32
13323 + ::buffa::types::uint64_encoded_len(
13324 self.estimated_completion_unix_ms,
13325 ) as u32;
13326 }
13327 if self.request_fee.is_set() {
13328 let __slot = __cache.reserve();
13329 let inner_size = self.request_fee.compute_size(__cache);
13330 __cache.set(__slot, inner_size);
13331 size
13332 += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
13333 + inner_size;
13334 }
13335 {
13336 let val = self.source_domain.to_i32();
13337 if val != 0 {
13338 size += 2u32 + ::buffa::types::int32_encoded_len(val) as u32;
13339 }
13340 }
13341 {
13342 let val = self.destination_domain.to_i32();
13343 if val != 0 {
13344 size += 2u32 + ::buffa::types::int32_encoded_len(val) as u32;
13345 }
13346 }
13347 if self.tx_occurrence_index != 0u64 {
13348 size
13349 += 2u32
13350 + ::buffa::types::uint64_encoded_len(
13351 self.tx_occurrence_index,
13352 ) as u32;
13353 }
13354 if !self.flow_id.is_empty() {
13355 size
13356 += 2u32
13357 + ::buffa::types::string_encoded_len(&self.flow_id) as u32;
13358 }
13359 if !self.smart_account_address.is_empty() {
13360 size
13361 += 2u32
13362 + ::buffa::types::string_encoded_len(
13363 &self.smart_account_address,
13364 ) as u32;
13365 }
13366 if self.zipper_reason.is_set() {
13367 let __slot = __cache.reserve();
13368 let inner_size = self.zipper_reason.compute_size(__cache);
13369 __cache.set(__slot, inner_size);
13370 size
13371 += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
13372 + inner_size;
13373 }
13374 size += self.__buffa_unknown_fields.encoded_len() as u32;
13375 size
13376 }
13377 #[allow(clippy::needless_borrow)]
13378 fn write_to(
13379 &self,
13380 __cache: &mut ::buffa::SizeCache,
13381 buf: &mut impl ::buffa::bytes::BufMut,
13382 ) {
13383 #[allow(unused_imports)]
13384 use ::buffa::Enumeration as _;
13385 if self.owner_account_id != 0u64 {
13386 ::buffa::types::put_fixed64_field(1u32, self.owner_account_id, buf);
13387 }
13388 {
13389 let val = self.flow_kind.to_i32();
13390 if val != 0 {
13391 ::buffa::types::put_int32_field(4u32, val, buf);
13392 }
13393 }
13394 {
13395 let val = self.current_step.to_i32();
13396 if val != 0 {
13397 ::buffa::types::put_int32_field(6u32, val, buf);
13398 }
13399 }
13400 if self.asset_ids.is_set() {
13401 ::buffa::types::put_len_delimited_header(
13402 7u32,
13403 __cache.consume_next(),
13404 buf,
13405 );
13406 self.asset_ids.write_to(__cache, buf);
13407 }
13408 if self.polyester_chain_id != 0u32 {
13409 ::buffa::types::put_uint32_field(8u32, self.polyester_chain_id, buf);
13410 }
13411 if self.amount_e18.is_set() {
13412 ::buffa::types::put_len_delimited_header(
13413 9u32,
13414 __cache.consume_next(),
13415 buf,
13416 );
13417 self.amount_e18.write_to(__cache, buf);
13418 }
13419 if !self.source_tx_hash.is_empty() {
13420 ::buffa::types::put_string_field(11u32, &self.source_tx_hash, buf);
13421 }
13422 if !self.source_address.is_empty() {
13423 ::buffa::types::put_string_field(13u32, &self.source_address, buf);
13424 }
13425 if !self.destination_address.is_empty() {
13426 ::buffa::types::put_string_field(
13427 14u32,
13428 &self.destination_address,
13429 buf,
13430 );
13431 }
13432 if !self.latest_tx_ref.is_empty() {
13433 ::buffa::types::put_string_field(15u32, &self.latest_tx_ref, buf);
13434 }
13435 {
13436 let val = self.latest_lifecycle_source.to_i32();
13437 if val != 0 {
13438 ::buffa::types::put_int32_field(16u32, val, buf);
13439 }
13440 }
13441 {
13442 let val = self.lifecycle_reason.to_i32();
13443 if val != 0 {
13444 ::buffa::types::put_int32_field(17u32, val, buf);
13445 }
13446 }
13447 if self.started_at_unix_ms != 0u64 {
13448 ::buffa::types::put_uint64_field(
13449 18u32,
13450 self.started_at_unix_ms,
13451 buf,
13452 );
13453 }
13454 if self.updated_at_unix_ms != 0u64 {
13455 ::buffa::types::put_uint64_field(
13456 19u32,
13457 self.updated_at_unix_ms,
13458 buf,
13459 );
13460 }
13461 if self.terminal_at_unix_ms != 0u64 {
13462 ::buffa::types::put_uint64_field(
13463 20u32,
13464 self.terminal_at_unix_ms,
13465 buf,
13466 );
13467 }
13468 if self.last_activity_at_unix_ms != 0u64 {
13469 ::buffa::types::put_uint64_field(
13470 21u32,
13471 self.last_activity_at_unix_ms,
13472 buf,
13473 );
13474 }
13475 if self.is_open {
13476 ::buffa::types::put_bool_field(22u32, self.is_open, buf);
13477 }
13478 if self.is_terminal {
13479 ::buffa::types::put_bool_field(23u32, self.is_terminal, buf);
13480 }
13481 if self.current_step_sequence != 0u32 {
13482 ::buffa::types::put_uint32_field(
13483 24u32,
13484 self.current_step_sequence,
13485 buf,
13486 );
13487 }
13488 if self.current_progress.is_set() {
13489 ::buffa::types::put_len_delimited_header(
13490 25u32,
13491 __cache.consume_next(),
13492 buf,
13493 );
13494 self.current_progress.write_to(__cache, buf);
13495 }
13496 for v in &self.progress_timeline {
13497 ::buffa::types::put_len_delimited_header(
13498 26u32,
13499 __cache.consume_next(),
13500 buf,
13501 );
13502 v.write_to(__cache, buf);
13503 }
13504 if self.estimated_completion_unix_ms != 0u64 {
13505 ::buffa::types::put_uint64_field(
13506 27u32,
13507 self.estimated_completion_unix_ms,
13508 buf,
13509 );
13510 }
13511 if self.request_fee.is_set() {
13512 ::buffa::types::put_len_delimited_header(
13513 28u32,
13514 __cache.consume_next(),
13515 buf,
13516 );
13517 self.request_fee.write_to(__cache, buf);
13518 }
13519 {
13520 let val = self.source_domain.to_i32();
13521 if val != 0 {
13522 ::buffa::types::put_int32_field(29u32, val, buf);
13523 }
13524 }
13525 {
13526 let val = self.destination_domain.to_i32();
13527 if val != 0 {
13528 ::buffa::types::put_int32_field(30u32, val, buf);
13529 }
13530 }
13531 if self.tx_occurrence_index != 0u64 {
13532 ::buffa::types::put_uint64_field(
13533 32u32,
13534 self.tx_occurrence_index,
13535 buf,
13536 );
13537 }
13538 if !self.flow_id.is_empty() {
13539 ::buffa::types::put_string_field(33u32, &self.flow_id, buf);
13540 }
13541 if !self.smart_account_address.is_empty() {
13542 ::buffa::types::put_string_field(
13543 34u32,
13544 &self.smart_account_address,
13545 buf,
13546 );
13547 }
13548 if self.zipper_reason.is_set() {
13549 ::buffa::types::put_len_delimited_header(
13550 35u32,
13551 __cache.consume_next(),
13552 buf,
13553 );
13554 self.zipper_reason.write_to(__cache, buf);
13555 }
13556 self.__buffa_unknown_fields.write_to(buf);
13557 }
13558 }
13559 impl<'__a> ::serde::Serialize for FlowSummaryViewView<'__a> {
13571 fn serialize<__S: ::serde::Serializer>(
13572 &self,
13573 __s: __S,
13574 ) -> ::core::result::Result<__S::Ok, __S::Error> {
13575 use ::serde::ser::SerializeMap as _;
13576 let mut __map = __s.serialize_map(::core::option::Option::None)?;
13577 if !::buffa::json_helpers::skip_if::is_zero_u64(&self.owner_account_id) {
13578 __map
13579 .serialize_entry(
13580 "ownerAccountId",
13581 &::buffa::json_helpers::ProtoJson(&self.owner_account_id),
13582 )?;
13583 }
13584 if !::buffa::json_helpers::skip_if::is_empty_str(
13585 self.smart_account_address,
13586 ) {
13587 __map
13588 .serialize_entry(
13589 "smartAccountAddress",
13590 self.smart_account_address,
13591 )?;
13592 }
13593 if !::buffa::json_helpers::skip_if::is_empty_str(self.flow_id) {
13594 __map.serialize_entry("flowId", self.flow_id)?;
13595 }
13596 if !::buffa::json_helpers::skip_if::is_default_enum_value(
13597 &self.flow_kind,
13598 ) {
13599 __map.serialize_entry("flowKind", &self.flow_kind)?;
13600 }
13601 if !::buffa::json_helpers::skip_if::is_default_enum_value(
13602 &self.current_step,
13603 ) {
13604 __map.serialize_entry("currentStep", &self.current_step)?;
13605 }
13606 {
13607 if let ::core::option::Option::Some(__v) = self.asset_ids.as_option()
13608 {
13609 __map.serialize_entry("assetIds", __v)?;
13610 }
13611 }
13612 if !::buffa::json_helpers::skip_if::is_zero_u32(
13613 &self.polyester_chain_id,
13614 ) {
13615 __map
13616 .serialize_entry(
13617 "polyesterChainId",
13618 &::buffa::json_helpers::ProtoJson(&self.polyester_chain_id),
13619 )?;
13620 }
13621 {
13622 if let ::core::option::Option::Some(__v) = self
13623 .amount_e18
13624 .as_option()
13625 {
13626 __map.serialize_entry("amountE18", __v)?;
13627 }
13628 }
13629 {
13630 if let ::core::option::Option::Some(__v) = self
13631 .request_fee
13632 .as_option()
13633 {
13634 __map.serialize_entry("requestFee", __v)?;
13635 }
13636 }
13637 if !::buffa::json_helpers::skip_if::is_empty_str(self.source_tx_hash) {
13638 __map.serialize_entry("sourceTxHash", self.source_tx_hash)?;
13639 }
13640 if !::buffa::json_helpers::skip_if::is_zero_u64(
13641 &self.tx_occurrence_index,
13642 ) {
13643 __map
13644 .serialize_entry(
13645 "txOccurrenceIndex",
13646 &::buffa::json_helpers::ProtoJson(&self.tx_occurrence_index),
13647 )?;
13648 }
13649 if !::buffa::json_helpers::skip_if::is_empty_str(self.source_address) {
13650 __map.serialize_entry("sourceAddress", self.source_address)?;
13651 }
13652 if !::buffa::json_helpers::skip_if::is_empty_str(
13653 self.destination_address,
13654 ) {
13655 __map
13656 .serialize_entry(
13657 "destinationAddress",
13658 self.destination_address,
13659 )?;
13660 }
13661 if !::buffa::json_helpers::skip_if::is_empty_str(self.latest_tx_ref) {
13662 __map.serialize_entry("latestTxRef", self.latest_tx_ref)?;
13663 }
13664 if !::buffa::json_helpers::skip_if::is_default_enum_value(
13665 &self.source_domain,
13666 ) {
13667 __map.serialize_entry("sourceDomain", &self.source_domain)?;
13668 }
13669 if !::buffa::json_helpers::skip_if::is_default_enum_value(
13670 &self.destination_domain,
13671 ) {
13672 __map
13673 .serialize_entry("destinationDomain", &self.destination_domain)?;
13674 }
13675 if !::buffa::json_helpers::skip_if::is_default_enum_value(
13676 &self.latest_lifecycle_source,
13677 ) {
13678 __map
13679 .serialize_entry(
13680 "latestLifecycleSource",
13681 &self.latest_lifecycle_source,
13682 )?;
13683 }
13684 if !::buffa::json_helpers::skip_if::is_default_enum_value(
13685 &self.lifecycle_reason,
13686 ) {
13687 __map.serialize_entry("lifecycleReason", &self.lifecycle_reason)?;
13688 }
13689 {
13690 if let ::core::option::Option::Some(__v) = self
13691 .zipper_reason
13692 .as_option()
13693 {
13694 __map.serialize_entry("zipperReason", __v)?;
13695 }
13696 }
13697 if !::buffa::json_helpers::skip_if::is_zero_u64(
13698 &self.started_at_unix_ms,
13699 ) {
13700 __map
13701 .serialize_entry(
13702 "startedAtUnixMs",
13703 &::buffa::json_helpers::ProtoJson(&self.started_at_unix_ms),
13704 )?;
13705 }
13706 if !::buffa::json_helpers::skip_if::is_zero_u64(
13707 &self.updated_at_unix_ms,
13708 ) {
13709 __map
13710 .serialize_entry(
13711 "updatedAtUnixMs",
13712 &::buffa::json_helpers::ProtoJson(&self.updated_at_unix_ms),
13713 )?;
13714 }
13715 if !::buffa::json_helpers::skip_if::is_zero_u64(
13716 &self.terminal_at_unix_ms,
13717 ) {
13718 __map
13719 .serialize_entry(
13720 "terminalAtUnixMs",
13721 &::buffa::json_helpers::ProtoJson(&self.terminal_at_unix_ms),
13722 )?;
13723 }
13724 if !::buffa::json_helpers::skip_if::is_zero_u64(
13725 &self.last_activity_at_unix_ms,
13726 ) {
13727 __map
13728 .serialize_entry(
13729 "lastActivityAtUnixMs",
13730 &::buffa::json_helpers::ProtoJson(
13731 &self.last_activity_at_unix_ms,
13732 ),
13733 )?;
13734 }
13735 if self.is_open {
13736 __map.serialize_entry("isOpen", &self.is_open)?;
13737 }
13738 if self.is_terminal {
13739 __map.serialize_entry("isTerminal", &self.is_terminal)?;
13740 }
13741 if !::buffa::json_helpers::skip_if::is_zero_u32(
13742 &self.current_step_sequence,
13743 ) {
13744 __map
13745 .serialize_entry(
13746 "currentStepSequence",
13747 &::buffa::json_helpers::ProtoJson(
13748 &self.current_step_sequence,
13749 ),
13750 )?;
13751 }
13752 {
13753 if let ::core::option::Option::Some(__v) = self
13754 .current_progress
13755 .as_option()
13756 {
13757 __map.serialize_entry("currentProgress", __v)?;
13758 }
13759 }
13760 if !self.progress_timeline.is_empty() {
13761 __map.serialize_entry("progressTimeline", &*self.progress_timeline)?;
13762 }
13763 if !::buffa::json_helpers::skip_if::is_zero_u64(
13764 &self.estimated_completion_unix_ms,
13765 ) {
13766 __map
13767 .serialize_entry(
13768 "estimatedCompletionUnixMs",
13769 &::buffa::json_helpers::ProtoJson(
13770 &self.estimated_completion_unix_ms,
13771 ),
13772 )?;
13773 }
13774 __map.end()
13775 }
13776 }
13777 impl<'a> ::buffa::MessageName for FlowSummaryViewView<'a> {
13778 const PACKAGE: &'static str = "chain.lifecycle.v1";
13779 const NAME: &'static str = "FlowSummaryView";
13780 const FULL_NAME: &'static str = "chain.lifecycle.v1.FlowSummaryView";
13781 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowSummaryView";
13782 }
13783 ::buffa::impl_default_view_instance!(FlowSummaryViewView);
13784 ::buffa::impl_view_reborrow!(FlowSummaryViewView);
13785 #[derive(Clone, Debug)]
13791 pub struct FlowSummaryViewOwnedView(
13792 ::buffa::OwnedView<FlowSummaryViewView<'static>>,
13793 );
13794 impl FlowSummaryViewOwnedView {
13795 pub fn decode(
13805 bytes: ::buffa::bytes::Bytes,
13806 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
13807 ::core::result::Result::Ok(
13808 FlowSummaryViewOwnedView(::buffa::OwnedView::decode(bytes)?),
13809 )
13810 }
13811 pub fn decode_with_options(
13819 bytes: ::buffa::bytes::Bytes,
13820 opts: &::buffa::DecodeOptions,
13821 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
13822 ::core::result::Result::Ok(
13823 FlowSummaryViewOwnedView(
13824 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
13825 ),
13826 )
13827 }
13828 pub fn from_owned(
13835 msg: &super::super::FlowSummaryView,
13836 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
13837 ::core::result::Result::Ok(
13838 FlowSummaryViewOwnedView(::buffa::OwnedView::from_owned(msg)?),
13839 )
13840 }
13841 #[must_use]
13843 pub fn view(&self) -> &FlowSummaryViewView<'_> {
13844 self.0.reborrow()
13845 }
13846 pub fn to_owned_message(
13853 &self,
13854 ) -> ::core::result::Result<
13855 super::super::FlowSummaryView,
13856 ::buffa::DecodeError,
13857 > {
13858 self.0.to_owned_message()
13859 }
13860 #[must_use]
13862 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
13863 self.0.bytes()
13864 }
13865 #[must_use]
13867 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
13868 self.0.into_bytes()
13869 }
13870 #[must_use]
13874 pub fn owner_account_id(&self) -> u64 {
13875 self.0.reborrow().owner_account_id
13876 }
13877 #[must_use]
13883 pub fn smart_account_address(&self) -> &'_ str {
13884 self.0.reborrow().smart_account_address
13885 }
13886 #[must_use]
13890 pub fn flow_id(&self) -> &'_ str {
13891 self.0.reborrow().flow_id
13892 }
13893 #[must_use]
13897 pub fn flow_kind(&self) -> ::buffa::EnumValue<super::super::FlowKind> {
13898 self.0.reborrow().flow_kind
13899 }
13900 #[must_use]
13905 pub fn current_step(&self) -> ::buffa::EnumValue<super::super::FlowStep> {
13906 self.0.reborrow().current_step
13907 }
13908 #[must_use]
13912 pub fn asset_ids(
13913 &self,
13914 ) -> &::buffa::MessageFieldView<
13915 super::super::__buffa::view::AssetIdsView<'_>,
13916 > {
13917 &self.0.reborrow().asset_ids
13918 }
13919 #[must_use]
13923 pub fn polyester_chain_id(&self) -> u32 {
13924 self.0.reborrow().polyester_chain_id
13925 }
13926 #[must_use]
13933 pub fn amount_e18(
13934 &self,
13935 ) -> &::buffa::MessageFieldView<
13936 super::super::super::super::super::polyester::r#type::v1::__buffa::view::U128View<
13937 '_,
13938 >,
13939 > {
13940 &self.0.reborrow().amount_e18
13941 }
13942 #[must_use]
13947 pub fn request_fee(
13948 &self,
13949 ) -> &::buffa::MessageFieldView<
13950 super::super::__buffa::view::RequestFeeView<'_>,
13951 > {
13952 &self.0.reborrow().request_fee
13953 }
13954 #[must_use]
13958 pub fn source_tx_hash(&self) -> &'_ str {
13959 self.0.reborrow().source_tx_hash
13960 }
13961 #[must_use]
13967 pub fn tx_occurrence_index(&self) -> u64 {
13968 self.0.reborrow().tx_occurrence_index
13969 }
13970 #[must_use]
13975 pub fn source_address(&self) -> &'_ str {
13976 self.0.reborrow().source_address
13977 }
13978 #[must_use]
13983 pub fn destination_address(&self) -> &'_ str {
13984 self.0.reborrow().destination_address
13985 }
13986 #[must_use]
13990 pub fn latest_tx_ref(&self) -> &'_ str {
13991 self.0.reborrow().latest_tx_ref
13992 }
13993 #[must_use]
13998 pub fn source_domain(&self) -> ::buffa::EnumValue<super::super::FlowDomain> {
13999 self.0.reborrow().source_domain
14000 }
14001 #[must_use]
14006 pub fn destination_domain(
14007 &self,
14008 ) -> ::buffa::EnumValue<super::super::FlowDomain> {
14009 self.0.reborrow().destination_domain
14010 }
14011 #[must_use]
14016 pub fn latest_lifecycle_source(
14017 &self,
14018 ) -> ::buffa::EnumValue<super::super::LifecycleSource> {
14019 self.0.reborrow().latest_lifecycle_source
14020 }
14021 #[must_use]
14025 pub fn lifecycle_reason(
14026 &self,
14027 ) -> ::buffa::EnumValue<super::super::LifecycleReason> {
14028 self.0.reborrow().lifecycle_reason
14029 }
14030 #[must_use]
14034 pub fn zipper_reason(
14035 &self,
14036 ) -> &::buffa::MessageFieldView<
14037 super::super::super::super::zipper::v1::__buffa::view::ZipperReasonDetailsView<
14038 '_,
14039 >,
14040 > {
14041 &self.0.reborrow().zipper_reason
14042 }
14043 #[must_use]
14047 pub fn started_at_unix_ms(&self) -> u64 {
14048 self.0.reborrow().started_at_unix_ms
14049 }
14050 #[must_use]
14054 pub fn updated_at_unix_ms(&self) -> u64 {
14055 self.0.reborrow().updated_at_unix_ms
14056 }
14057 #[must_use]
14061 pub fn terminal_at_unix_ms(&self) -> u64 {
14062 self.0.reborrow().terminal_at_unix_ms
14063 }
14064 #[must_use]
14068 pub fn last_activity_at_unix_ms(&self) -> u64 {
14069 self.0.reborrow().last_activity_at_unix_ms
14070 }
14071 #[must_use]
14075 pub fn is_open(&self) -> bool {
14076 self.0.reborrow().is_open
14077 }
14078 #[must_use]
14082 pub fn is_terminal(&self) -> bool {
14083 self.0.reborrow().is_terminal
14084 }
14085 #[must_use]
14089 pub fn current_step_sequence(&self) -> u32 {
14090 self.0.reborrow().current_step_sequence
14091 }
14092 #[must_use]
14096 pub fn current_progress(
14097 &self,
14098 ) -> &::buffa::MessageFieldView<
14099 super::super::__buffa::view::FlowSummaryProgressViewView<'_>,
14100 > {
14101 &self.0.reborrow().current_progress
14102 }
14103 #[must_use]
14108 pub fn progress_timeline(
14109 &self,
14110 ) -> &::buffa::RepeatedView<
14111 '_,
14112 super::super::__buffa::view::FlowTimelineItemViewView<'_>,
14113 > {
14114 &self.0.reborrow().progress_timeline
14115 }
14116 #[must_use]
14120 pub fn estimated_completion_unix_ms(&self) -> u64 {
14121 self.0.reborrow().estimated_completion_unix_ms
14122 }
14123 }
14124 impl ::core::convert::From<::buffa::OwnedView<FlowSummaryViewView<'static>>>
14125 for FlowSummaryViewOwnedView {
14126 fn from(inner: ::buffa::OwnedView<FlowSummaryViewView<'static>>) -> Self {
14127 FlowSummaryViewOwnedView(inner)
14128 }
14129 }
14130 impl ::core::convert::From<FlowSummaryViewOwnedView>
14131 for ::buffa::OwnedView<FlowSummaryViewView<'static>> {
14132 fn from(wrapper: FlowSummaryViewOwnedView) -> Self {
14133 wrapper.0
14134 }
14135 }
14136 impl ::core::convert::AsRef<::buffa::OwnedView<FlowSummaryViewView<'static>>>
14137 for FlowSummaryViewOwnedView {
14138 fn as_ref(&self) -> &::buffa::OwnedView<FlowSummaryViewView<'static>> {
14139 &self.0
14140 }
14141 }
14142 impl ::buffa::HasMessageView for super::super::FlowSummaryView {
14143 type View<'a> = FlowSummaryViewView<'a>;
14144 type ViewHandle = FlowSummaryViewOwnedView;
14145 }
14146 impl ::serde::Serialize for FlowSummaryViewOwnedView {
14147 fn serialize<__S: ::serde::Serializer>(
14148 &self,
14149 __s: __S,
14150 ) -> ::core::result::Result<__S::Ok, __S::Error> {
14151 ::serde::Serialize::serialize(&self.0, __s)
14152 }
14153 }
14154 #[derive(Clone, Debug, Default)]
14156 pub struct FlowSummaryProgressViewView<'a> {
14157 pub current_step_started_at_unix_ms: u64,
14162 pub current_step_expected_duration_ms: u64,
14166 pub current_confirmations: u32,
14170 pub required_confirmations: u32,
14174 pub approve_count: u32,
14178 pub reject_count: u32,
14182 pub validator_count: u32,
14186 pub required_approvals: u32,
14190 pub required_rejections: u32,
14194 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
14195 }
14196 impl<'a> ::buffa::MessageView<'a> for FlowSummaryProgressViewView<'a> {
14197 type Owned = super::super::FlowSummaryProgressView;
14198 fn decode_view(
14199 buf: &'a [u8],
14200 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
14201 let __limit = ::core::cell::Cell::new(
14202 ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
14203 );
14204 <Self as ::buffa::MessageView>::decode_view_ctx(
14205 buf,
14206 ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
14207 )
14208 }
14209 fn decode_view_with_ctx(
14210 buf: &'a [u8],
14211 ctx: ::buffa::DecodeContext<'_>,
14212 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
14213 <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
14214 }
14215 fn merge_view_field(
14216 &mut self,
14217 tag: ::buffa::encoding::Tag,
14218 cur: &'a [u8],
14219 before_tag: &'a [u8],
14220 ctx: ::buffa::DecodeContext<'_>,
14221 ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
14222 let _ = ctx;
14223 #[allow(unused_variables)]
14224 let view = self;
14225 let mut cur = cur;
14226 match tag.field_number() {
14227 1u32 => {
14228 ::buffa::encoding::check_wire_type(
14229 tag,
14230 ::buffa::encoding::WireType::Varint,
14231 )?;
14232 view.current_step_started_at_unix_ms = ::buffa::types::decode_uint64(
14233 &mut cur,
14234 )?;
14235 }
14236 2u32 => {
14237 ::buffa::encoding::check_wire_type(
14238 tag,
14239 ::buffa::encoding::WireType::Varint,
14240 )?;
14241 view.current_step_expected_duration_ms = ::buffa::types::decode_uint64(
14242 &mut cur,
14243 )?;
14244 }
14245 5u32 => {
14246 ::buffa::encoding::check_wire_type(
14247 tag,
14248 ::buffa::encoding::WireType::Varint,
14249 )?;
14250 view.current_confirmations = ::buffa::types::decode_uint32(
14251 &mut cur,
14252 )?;
14253 }
14254 6u32 => {
14255 ::buffa::encoding::check_wire_type(
14256 tag,
14257 ::buffa::encoding::WireType::Varint,
14258 )?;
14259 view.required_confirmations = ::buffa::types::decode_uint32(
14260 &mut cur,
14261 )?;
14262 }
14263 7u32 => {
14264 ::buffa::encoding::check_wire_type(
14265 tag,
14266 ::buffa::encoding::WireType::Varint,
14267 )?;
14268 view.approve_count = ::buffa::types::decode_uint32(&mut cur)?;
14269 }
14270 8u32 => {
14271 ::buffa::encoding::check_wire_type(
14272 tag,
14273 ::buffa::encoding::WireType::Varint,
14274 )?;
14275 view.reject_count = ::buffa::types::decode_uint32(&mut cur)?;
14276 }
14277 9u32 => {
14278 ::buffa::encoding::check_wire_type(
14279 tag,
14280 ::buffa::encoding::WireType::Varint,
14281 )?;
14282 view.validator_count = ::buffa::types::decode_uint32(&mut cur)?;
14283 }
14284 10u32 => {
14285 ::buffa::encoding::check_wire_type(
14286 tag,
14287 ::buffa::encoding::WireType::Varint,
14288 )?;
14289 view.required_approvals = ::buffa::types::decode_uint32(
14290 &mut cur,
14291 )?;
14292 }
14293 11u32 => {
14294 ::buffa::encoding::check_wire_type(
14295 tag,
14296 ::buffa::encoding::WireType::Varint,
14297 )?;
14298 view.required_rejections = ::buffa::types::decode_uint32(
14299 &mut cur,
14300 )?;
14301 }
14302 _ => {
14303 ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
14304 let span_len = before_tag.len() - cur.len();
14305 view.__buffa_unknown_fields
14306 .push_record(before_tag, span_len, ctx)?;
14307 }
14308 }
14309 ::core::result::Result::Ok(cur)
14310 }
14311 fn to_owned_message(
14312 &self,
14313 ) -> ::core::result::Result<
14314 super::super::FlowSummaryProgressView,
14315 ::buffa::DecodeError,
14316 > {
14317 self.to_owned_from_source(None)
14318 }
14319 #[allow(clippy::useless_conversion, clippy::needless_update)]
14320 fn to_owned_from_source(
14321 &self,
14322 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
14323 ) -> ::core::result::Result<
14324 super::super::FlowSummaryProgressView,
14325 ::buffa::DecodeError,
14326 > {
14327 #[allow(unused_imports)]
14328 use ::buffa::alloc::string::ToString as _;
14329 let _ = __buffa_src;
14330 ::core::result::Result::Ok(super::super::FlowSummaryProgressView {
14331 current_step_started_at_unix_ms: self
14332 .current_step_started_at_unix_ms,
14333 current_step_expected_duration_ms: self
14334 .current_step_expected_duration_ms,
14335 current_confirmations: self.current_confirmations,
14336 required_confirmations: self.required_confirmations,
14337 approve_count: self.approve_count,
14338 reject_count: self.reject_count,
14339 validator_count: self.validator_count,
14340 required_approvals: self.required_approvals,
14341 required_rejections: self.required_rejections,
14342 __buffa_unknown_fields: self
14343 .__buffa_unknown_fields
14344 .to_owned()?
14345 .into(),
14346 ..::core::default::Default::default()
14347 })
14348 }
14349 }
14350 impl<'a> ::buffa::ViewEncode<'a> for FlowSummaryProgressViewView<'a> {
14351 #[allow(clippy::needless_borrow, clippy::let_and_return)]
14352 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
14353 #[allow(unused_imports)]
14354 use ::buffa::Enumeration as _;
14355 let mut size = 0u32;
14356 if self.current_step_started_at_unix_ms != 0u64 {
14357 size
14358 += 1u32
14359 + ::buffa::types::uint64_encoded_len(
14360 self.current_step_started_at_unix_ms,
14361 ) as u32;
14362 }
14363 if self.current_step_expected_duration_ms != 0u64 {
14364 size
14365 += 1u32
14366 + ::buffa::types::uint64_encoded_len(
14367 self.current_step_expected_duration_ms,
14368 ) as u32;
14369 }
14370 if self.current_confirmations != 0u32 {
14371 size
14372 += 1u32
14373 + ::buffa::types::uint32_encoded_len(
14374 self.current_confirmations,
14375 ) as u32;
14376 }
14377 if self.required_confirmations != 0u32 {
14378 size
14379 += 1u32
14380 + ::buffa::types::uint32_encoded_len(
14381 self.required_confirmations,
14382 ) as u32;
14383 }
14384 if self.approve_count != 0u32 {
14385 size
14386 += 1u32
14387 + ::buffa::types::uint32_encoded_len(self.approve_count)
14388 as u32;
14389 }
14390 if self.reject_count != 0u32 {
14391 size
14392 += 1u32
14393 + ::buffa::types::uint32_encoded_len(self.reject_count)
14394 as u32;
14395 }
14396 if self.validator_count != 0u32 {
14397 size
14398 += 1u32
14399 + ::buffa::types::uint32_encoded_len(self.validator_count)
14400 as u32;
14401 }
14402 if self.required_approvals != 0u32 {
14403 size
14404 += 1u32
14405 + ::buffa::types::uint32_encoded_len(self.required_approvals)
14406 as u32;
14407 }
14408 if self.required_rejections != 0u32 {
14409 size
14410 += 1u32
14411 + ::buffa::types::uint32_encoded_len(
14412 self.required_rejections,
14413 ) as u32;
14414 }
14415 size += self.__buffa_unknown_fields.encoded_len() as u32;
14416 size
14417 }
14418 #[allow(clippy::needless_borrow)]
14419 fn write_to(
14420 &self,
14421 _cache: &mut ::buffa::SizeCache,
14422 buf: &mut impl ::buffa::bytes::BufMut,
14423 ) {
14424 #[allow(unused_imports)]
14425 use ::buffa::Enumeration as _;
14426 if self.current_step_started_at_unix_ms != 0u64 {
14427 ::buffa::types::put_uint64_field(
14428 1u32,
14429 self.current_step_started_at_unix_ms,
14430 buf,
14431 );
14432 }
14433 if self.current_step_expected_duration_ms != 0u64 {
14434 ::buffa::types::put_uint64_field(
14435 2u32,
14436 self.current_step_expected_duration_ms,
14437 buf,
14438 );
14439 }
14440 if self.current_confirmations != 0u32 {
14441 ::buffa::types::put_uint32_field(
14442 5u32,
14443 self.current_confirmations,
14444 buf,
14445 );
14446 }
14447 if self.required_confirmations != 0u32 {
14448 ::buffa::types::put_uint32_field(
14449 6u32,
14450 self.required_confirmations,
14451 buf,
14452 );
14453 }
14454 if self.approve_count != 0u32 {
14455 ::buffa::types::put_uint32_field(7u32, self.approve_count, buf);
14456 }
14457 if self.reject_count != 0u32 {
14458 ::buffa::types::put_uint32_field(8u32, self.reject_count, buf);
14459 }
14460 if self.validator_count != 0u32 {
14461 ::buffa::types::put_uint32_field(9u32, self.validator_count, buf);
14462 }
14463 if self.required_approvals != 0u32 {
14464 ::buffa::types::put_uint32_field(
14465 10u32,
14466 self.required_approvals,
14467 buf,
14468 );
14469 }
14470 if self.required_rejections != 0u32 {
14471 ::buffa::types::put_uint32_field(
14472 11u32,
14473 self.required_rejections,
14474 buf,
14475 );
14476 }
14477 self.__buffa_unknown_fields.write_to(buf);
14478 }
14479 }
14480 impl<'__a> ::serde::Serialize for FlowSummaryProgressViewView<'__a> {
14492 fn serialize<__S: ::serde::Serializer>(
14493 &self,
14494 __s: __S,
14495 ) -> ::core::result::Result<__S::Ok, __S::Error> {
14496 use ::serde::ser::SerializeMap as _;
14497 let mut __map = __s.serialize_map(::core::option::Option::None)?;
14498 if !::buffa::json_helpers::skip_if::is_zero_u64(
14499 &self.current_step_started_at_unix_ms,
14500 ) {
14501 __map
14502 .serialize_entry(
14503 "currentStepStartedAtUnixMs",
14504 &::buffa::json_helpers::ProtoJson(
14505 &self.current_step_started_at_unix_ms,
14506 ),
14507 )?;
14508 }
14509 if !::buffa::json_helpers::skip_if::is_zero_u64(
14510 &self.current_step_expected_duration_ms,
14511 ) {
14512 __map
14513 .serialize_entry(
14514 "currentStepExpectedDurationMs",
14515 &::buffa::json_helpers::ProtoJson(
14516 &self.current_step_expected_duration_ms,
14517 ),
14518 )?;
14519 }
14520 if !::buffa::json_helpers::skip_if::is_zero_u32(
14521 &self.current_confirmations,
14522 ) {
14523 __map
14524 .serialize_entry(
14525 "currentConfirmations",
14526 &::buffa::json_helpers::ProtoJson(
14527 &self.current_confirmations,
14528 ),
14529 )?;
14530 }
14531 if !::buffa::json_helpers::skip_if::is_zero_u32(
14532 &self.required_confirmations,
14533 ) {
14534 __map
14535 .serialize_entry(
14536 "requiredConfirmations",
14537 &::buffa::json_helpers::ProtoJson(
14538 &self.required_confirmations,
14539 ),
14540 )?;
14541 }
14542 if !::buffa::json_helpers::skip_if::is_zero_u32(&self.approve_count) {
14543 __map
14544 .serialize_entry(
14545 "approveCount",
14546 &::buffa::json_helpers::ProtoJson(&self.approve_count),
14547 )?;
14548 }
14549 if !::buffa::json_helpers::skip_if::is_zero_u32(&self.reject_count) {
14550 __map
14551 .serialize_entry(
14552 "rejectCount",
14553 &::buffa::json_helpers::ProtoJson(&self.reject_count),
14554 )?;
14555 }
14556 if !::buffa::json_helpers::skip_if::is_zero_u32(&self.validator_count) {
14557 __map
14558 .serialize_entry(
14559 "validatorCount",
14560 &::buffa::json_helpers::ProtoJson(&self.validator_count),
14561 )?;
14562 }
14563 if !::buffa::json_helpers::skip_if::is_zero_u32(
14564 &self.required_approvals,
14565 ) {
14566 __map
14567 .serialize_entry(
14568 "requiredApprovals",
14569 &::buffa::json_helpers::ProtoJson(&self.required_approvals),
14570 )?;
14571 }
14572 if !::buffa::json_helpers::skip_if::is_zero_u32(
14573 &self.required_rejections,
14574 ) {
14575 __map
14576 .serialize_entry(
14577 "requiredRejections",
14578 &::buffa::json_helpers::ProtoJson(&self.required_rejections),
14579 )?;
14580 }
14581 __map.end()
14582 }
14583 }
14584 impl<'a> ::buffa::MessageName for FlowSummaryProgressViewView<'a> {
14585 const PACKAGE: &'static str = "chain.lifecycle.v1";
14586 const NAME: &'static str = "FlowSummaryProgressView";
14587 const FULL_NAME: &'static str = "chain.lifecycle.v1.FlowSummaryProgressView";
14588 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowSummaryProgressView";
14589 }
14590 ::buffa::impl_default_view_instance!(FlowSummaryProgressViewView);
14591 ::buffa::impl_view_reborrow!(FlowSummaryProgressViewView);
14592 #[derive(Clone, Debug)]
14598 pub struct FlowSummaryProgressViewOwnedView(
14599 ::buffa::OwnedView<FlowSummaryProgressViewView<'static>>,
14600 );
14601 impl FlowSummaryProgressViewOwnedView {
14602 pub fn decode(
14612 bytes: ::buffa::bytes::Bytes,
14613 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
14614 ::core::result::Result::Ok(
14615 FlowSummaryProgressViewOwnedView(::buffa::OwnedView::decode(bytes)?),
14616 )
14617 }
14618 pub fn decode_with_options(
14626 bytes: ::buffa::bytes::Bytes,
14627 opts: &::buffa::DecodeOptions,
14628 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
14629 ::core::result::Result::Ok(
14630 FlowSummaryProgressViewOwnedView(
14631 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
14632 ),
14633 )
14634 }
14635 pub fn from_owned(
14642 msg: &super::super::FlowSummaryProgressView,
14643 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
14644 ::core::result::Result::Ok(
14645 FlowSummaryProgressViewOwnedView(
14646 ::buffa::OwnedView::from_owned(msg)?,
14647 ),
14648 )
14649 }
14650 #[must_use]
14652 pub fn view(&self) -> &FlowSummaryProgressViewView<'_> {
14653 self.0.reborrow()
14654 }
14655 pub fn to_owned_message(
14662 &self,
14663 ) -> ::core::result::Result<
14664 super::super::FlowSummaryProgressView,
14665 ::buffa::DecodeError,
14666 > {
14667 self.0.to_owned_message()
14668 }
14669 #[must_use]
14671 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
14672 self.0.bytes()
14673 }
14674 #[must_use]
14676 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
14677 self.0.into_bytes()
14678 }
14679 #[must_use]
14684 pub fn current_step_started_at_unix_ms(&self) -> u64 {
14685 self.0.reborrow().current_step_started_at_unix_ms
14686 }
14687 #[must_use]
14691 pub fn current_step_expected_duration_ms(&self) -> u64 {
14692 self.0.reborrow().current_step_expected_duration_ms
14693 }
14694 #[must_use]
14698 pub fn current_confirmations(&self) -> u32 {
14699 self.0.reborrow().current_confirmations
14700 }
14701 #[must_use]
14705 pub fn required_confirmations(&self) -> u32 {
14706 self.0.reborrow().required_confirmations
14707 }
14708 #[must_use]
14712 pub fn approve_count(&self) -> u32 {
14713 self.0.reborrow().approve_count
14714 }
14715 #[must_use]
14719 pub fn reject_count(&self) -> u32 {
14720 self.0.reborrow().reject_count
14721 }
14722 #[must_use]
14726 pub fn validator_count(&self) -> u32 {
14727 self.0.reborrow().validator_count
14728 }
14729 #[must_use]
14733 pub fn required_approvals(&self) -> u32 {
14734 self.0.reborrow().required_approvals
14735 }
14736 #[must_use]
14740 pub fn required_rejections(&self) -> u32 {
14741 self.0.reborrow().required_rejections
14742 }
14743 }
14744 impl ::core::convert::From<
14745 ::buffa::OwnedView<FlowSummaryProgressViewView<'static>>,
14746 > for FlowSummaryProgressViewOwnedView {
14747 fn from(
14748 inner: ::buffa::OwnedView<FlowSummaryProgressViewView<'static>>,
14749 ) -> Self {
14750 FlowSummaryProgressViewOwnedView(inner)
14751 }
14752 }
14753 impl ::core::convert::From<FlowSummaryProgressViewOwnedView>
14754 for ::buffa::OwnedView<FlowSummaryProgressViewView<'static>> {
14755 fn from(wrapper: FlowSummaryProgressViewOwnedView) -> Self {
14756 wrapper.0
14757 }
14758 }
14759 impl ::core::convert::AsRef<
14760 ::buffa::OwnedView<FlowSummaryProgressViewView<'static>>,
14761 > for FlowSummaryProgressViewOwnedView {
14762 fn as_ref(
14763 &self,
14764 ) -> &::buffa::OwnedView<FlowSummaryProgressViewView<'static>> {
14765 &self.0
14766 }
14767 }
14768 impl ::buffa::HasMessageView for super::super::FlowSummaryProgressView {
14769 type View<'a> = FlowSummaryProgressViewView<'a>;
14770 type ViewHandle = FlowSummaryProgressViewOwnedView;
14771 }
14772 impl ::serde::Serialize for FlowSummaryProgressViewOwnedView {
14773 fn serialize<__S: ::serde::Serializer>(
14774 &self,
14775 __s: __S,
14776 ) -> ::core::result::Result<__S::Ok, __S::Error> {
14777 ::serde::Serialize::serialize(&self.0, __s)
14778 }
14779 }
14780 #[derive(Clone, Debug, Default)]
14784 pub struct FlowStepViewView<'a> {
14785 pub sequence: u32,
14789 pub step: ::buffa::EnumValue<super::super::FlowStep>,
14793 pub asset_ids: ::buffa::MessageFieldView<
14797 super::super::__buffa::view::AssetIdsView<'a>,
14798 >,
14799 pub polyester_chain_id: u32,
14803 pub amount_e18: ::buffa::MessageFieldView<
14808 super::super::super::super::super::polyester::r#type::v1::__buffa::view::U128View<
14809 'a,
14810 >,
14811 >,
14812 pub request_fee: ::buffa::MessageFieldView<
14816 super::super::__buffa::view::RequestFeeView<'a>,
14817 >,
14818 pub milestone_tx_ref: &'a str,
14822 pub lifecycle_source: ::buffa::EnumValue<super::super::LifecycleSource>,
14826 pub lifecycle_reason: ::buffa::EnumValue<super::super::LifecycleReason>,
14830 pub zipper_reason: ::buffa::MessageFieldView<
14834 super::super::super::super::zipper::v1::__buffa::view::ZipperReasonDetailsView<
14835 'a,
14836 >,
14837 >,
14838 pub current_confirmations: u32,
14842 pub required_confirmations: u32,
14846 pub approve_count: u32,
14850 pub reject_count: u32,
14854 pub validator_count: u32,
14858 pub required_approvals: u32,
14862 pub required_rejections: u32,
14866 pub occurred_at_unix_ms: u64,
14870 pub block_time_moving_average_ms: u64,
14874 pub activities: ::buffa::RepeatedView<
14880 'a,
14881 super::super::__buffa::view::FlowStepActivityViewView<'a>,
14882 >,
14883 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
14884 }
14885 impl<'a> ::buffa::MessageView<'a> for FlowStepViewView<'a> {
14886 type Owned = super::super::FlowStepView;
14887 fn decode_view(
14888 buf: &'a [u8],
14889 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
14890 let __limit = ::core::cell::Cell::new(
14891 ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
14892 );
14893 <Self as ::buffa::MessageView>::decode_view_ctx(
14894 buf,
14895 ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
14896 )
14897 }
14898 fn decode_view_with_ctx(
14899 buf: &'a [u8],
14900 ctx: ::buffa::DecodeContext<'_>,
14901 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
14902 <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
14903 }
14904 fn merge_view_field(
14905 &mut self,
14906 tag: ::buffa::encoding::Tag,
14907 cur: &'a [u8],
14908 before_tag: &'a [u8],
14909 ctx: ::buffa::DecodeContext<'_>,
14910 ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
14911 let _ = ctx;
14912 #[allow(unused_variables)]
14913 let view = self;
14914 let mut cur = cur;
14915 match tag.field_number() {
14916 1u32 => {
14917 ::buffa::encoding::check_wire_type(
14918 tag,
14919 ::buffa::encoding::WireType::Varint,
14920 )?;
14921 view.sequence = ::buffa::types::decode_uint32(&mut cur)?;
14922 }
14923 3u32 => {
14924 ::buffa::encoding::check_wire_type(
14925 tag,
14926 ::buffa::encoding::WireType::Varint,
14927 )?;
14928 view.step = ::buffa::EnumValue::from(
14929 ::buffa::types::decode_int32(&mut cur)?,
14930 );
14931 }
14932 7u32 => {
14933 ::buffa::encoding::check_wire_type(
14934 tag,
14935 ::buffa::encoding::WireType::LengthDelimited,
14936 )?;
14937 let __sub_ctx = ctx.descend()?;
14938 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
14939 match view.asset_ids.as_mut() {
14940 Some(existing) => {
14941 ::buffa::MessageView::merge_into_view(
14942 existing,
14943 sub,
14944 __sub_ctx,
14945 )?
14946 }
14947 None => {
14948 view.asset_ids = ::buffa::MessageFieldView::set(
14949 <super::super::__buffa::view::AssetIdsView as ::buffa::MessageView>::decode_view_ctx(
14950 sub,
14951 __sub_ctx,
14952 )?,
14953 );
14954 }
14955 }
14956 }
14957 8u32 => {
14958 ::buffa::encoding::check_wire_type(
14959 tag,
14960 ::buffa::encoding::WireType::Varint,
14961 )?;
14962 view.polyester_chain_id = ::buffa::types::decode_uint32(
14963 &mut cur,
14964 )?;
14965 }
14966 9u32 => {
14967 ::buffa::encoding::check_wire_type(
14968 tag,
14969 ::buffa::encoding::WireType::LengthDelimited,
14970 )?;
14971 let __sub_ctx = ctx.descend()?;
14972 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
14973 match view.amount_e18.as_mut() {
14974 Some(existing) => {
14975 ::buffa::MessageView::merge_into_view(
14976 existing,
14977 sub,
14978 __sub_ctx,
14979 )?
14980 }
14981 None => {
14982 view.amount_e18 = ::buffa::MessageFieldView::set(
14983 <super::super::super::super::super::polyester::r#type::v1::__buffa::view::U128View as ::buffa::MessageView>::decode_view_ctx(
14984 sub,
14985 __sub_ctx,
14986 )?,
14987 );
14988 }
14989 }
14990 }
14991 24u32 => {
14992 ::buffa::encoding::check_wire_type(
14993 tag,
14994 ::buffa::encoding::WireType::LengthDelimited,
14995 )?;
14996 let __sub_ctx = ctx.descend()?;
14997 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
14998 match view.request_fee.as_mut() {
14999 Some(existing) => {
15000 ::buffa::MessageView::merge_into_view(
15001 existing,
15002 sub,
15003 __sub_ctx,
15004 )?
15005 }
15006 None => {
15007 view.request_fee = ::buffa::MessageFieldView::set(
15008 <super::super::__buffa::view::RequestFeeView as ::buffa::MessageView>::decode_view_ctx(
15009 sub,
15010 __sub_ctx,
15011 )?,
15012 );
15013 }
15014 }
15015 }
15016 11u32 => {
15017 ::buffa::encoding::check_wire_type(
15018 tag,
15019 ::buffa::encoding::WireType::LengthDelimited,
15020 )?;
15021 view.milestone_tx_ref = ::buffa::types::borrow_str(&mut cur)?;
15022 }
15023 12u32 => {
15024 ::buffa::encoding::check_wire_type(
15025 tag,
15026 ::buffa::encoding::WireType::Varint,
15027 )?;
15028 view.lifecycle_source = ::buffa::EnumValue::from(
15029 ::buffa::types::decode_int32(&mut cur)?,
15030 );
15031 }
15032 13u32 => {
15033 ::buffa::encoding::check_wire_type(
15034 tag,
15035 ::buffa::encoding::WireType::Varint,
15036 )?;
15037 view.lifecycle_reason = ::buffa::EnumValue::from(
15038 ::buffa::types::decode_int32(&mut cur)?,
15039 );
15040 }
15041 25u32 => {
15042 ::buffa::encoding::check_wire_type(
15043 tag,
15044 ::buffa::encoding::WireType::LengthDelimited,
15045 )?;
15046 let __sub_ctx = ctx.descend()?;
15047 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
15048 match view.zipper_reason.as_mut() {
15049 Some(existing) => {
15050 ::buffa::MessageView::merge_into_view(
15051 existing,
15052 sub,
15053 __sub_ctx,
15054 )?
15055 }
15056 None => {
15057 view.zipper_reason = ::buffa::MessageFieldView::set(
15058 <super::super::super::super::zipper::v1::__buffa::view::ZipperReasonDetailsView as ::buffa::MessageView>::decode_view_ctx(
15059 sub,
15060 __sub_ctx,
15061 )?,
15062 );
15063 }
15064 }
15065 }
15066 14u32 => {
15067 ::buffa::encoding::check_wire_type(
15068 tag,
15069 ::buffa::encoding::WireType::Varint,
15070 )?;
15071 view.current_confirmations = ::buffa::types::decode_uint32(
15072 &mut cur,
15073 )?;
15074 }
15075 15u32 => {
15076 ::buffa::encoding::check_wire_type(
15077 tag,
15078 ::buffa::encoding::WireType::Varint,
15079 )?;
15080 view.required_confirmations = ::buffa::types::decode_uint32(
15081 &mut cur,
15082 )?;
15083 }
15084 16u32 => {
15085 ::buffa::encoding::check_wire_type(
15086 tag,
15087 ::buffa::encoding::WireType::Varint,
15088 )?;
15089 view.approve_count = ::buffa::types::decode_uint32(&mut cur)?;
15090 }
15091 17u32 => {
15092 ::buffa::encoding::check_wire_type(
15093 tag,
15094 ::buffa::encoding::WireType::Varint,
15095 )?;
15096 view.reject_count = ::buffa::types::decode_uint32(&mut cur)?;
15097 }
15098 18u32 => {
15099 ::buffa::encoding::check_wire_type(
15100 tag,
15101 ::buffa::encoding::WireType::Varint,
15102 )?;
15103 view.validator_count = ::buffa::types::decode_uint32(&mut cur)?;
15104 }
15105 22u32 => {
15106 ::buffa::encoding::check_wire_type(
15107 tag,
15108 ::buffa::encoding::WireType::Varint,
15109 )?;
15110 view.required_approvals = ::buffa::types::decode_uint32(
15111 &mut cur,
15112 )?;
15113 }
15114 23u32 => {
15115 ::buffa::encoding::check_wire_type(
15116 tag,
15117 ::buffa::encoding::WireType::Varint,
15118 )?;
15119 view.required_rejections = ::buffa::types::decode_uint32(
15120 &mut cur,
15121 )?;
15122 }
15123 19u32 => {
15124 ::buffa::encoding::check_wire_type(
15125 tag,
15126 ::buffa::encoding::WireType::Varint,
15127 )?;
15128 view.occurred_at_unix_ms = ::buffa::types::decode_uint64(
15129 &mut cur,
15130 )?;
15131 }
15132 20u32 => {
15133 ::buffa::encoding::check_wire_type(
15134 tag,
15135 ::buffa::encoding::WireType::Varint,
15136 )?;
15137 view.block_time_moving_average_ms = ::buffa::types::decode_uint64(
15138 &mut cur,
15139 )?;
15140 }
15141 21u32 => {
15142 ::buffa::encoding::check_wire_type(
15143 tag,
15144 ::buffa::encoding::WireType::LengthDelimited,
15145 )?;
15146 let __sub_ctx = ctx.descend()?;
15147 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
15148 view.activities
15149 .push(
15150 <super::super::__buffa::view::FlowStepActivityViewView as ::buffa::MessageView>::decode_view_ctx(
15151 sub,
15152 __sub_ctx,
15153 )?,
15154 );
15155 }
15156 _ => {
15157 ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
15158 let span_len = before_tag.len() - cur.len();
15159 view.__buffa_unknown_fields
15160 .push_record(before_tag, span_len, ctx)?;
15161 }
15162 }
15163 ::core::result::Result::Ok(cur)
15164 }
15165 fn to_owned_message(
15166 &self,
15167 ) -> ::core::result::Result<
15168 super::super::FlowStepView,
15169 ::buffa::DecodeError,
15170 > {
15171 self.to_owned_from_source(None)
15172 }
15173 #[allow(clippy::useless_conversion, clippy::needless_update)]
15174 fn to_owned_from_source(
15175 &self,
15176 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
15177 ) -> ::core::result::Result<
15178 super::super::FlowStepView,
15179 ::buffa::DecodeError,
15180 > {
15181 #[allow(unused_imports)]
15182 use ::buffa::alloc::string::ToString as _;
15183 let _ = __buffa_src;
15184 ::core::result::Result::Ok(super::super::FlowStepView {
15185 sequence: self.sequence,
15186 step: self.step,
15187 asset_ids: match self.asset_ids.as_option() {
15188 Some(v) => {
15189 ::buffa::MessageField::<
15190 super::super::AssetIds,
15191 >::some(v.to_owned_from_source(__buffa_src)?)
15192 }
15193 None => ::buffa::MessageField::none(),
15194 },
15195 polyester_chain_id: self.polyester_chain_id,
15196 amount_e18: match self.amount_e18.as_option() {
15197 Some(v) => {
15198 ::buffa::MessageField::<
15199 super::super::super::super::super::polyester::r#type::v1::U128,
15200 >::some(v.to_owned_from_source(__buffa_src)?)
15201 }
15202 None => ::buffa::MessageField::none(),
15203 },
15204 request_fee: match self.request_fee.as_option() {
15205 Some(v) => {
15206 ::buffa::MessageField::<
15207 super::super::RequestFee,
15208 >::some(v.to_owned_from_source(__buffa_src)?)
15209 }
15210 None => ::buffa::MessageField::none(),
15211 },
15212 milestone_tx_ref: self.milestone_tx_ref.to_string(),
15213 lifecycle_source: self.lifecycle_source,
15214 lifecycle_reason: self.lifecycle_reason,
15215 zipper_reason: match self.zipper_reason.as_option() {
15216 Some(v) => {
15217 ::buffa::MessageField::<
15218 super::super::super::super::zipper::v1::ZipperReasonDetails,
15219 >::some(v.to_owned_from_source(__buffa_src)?)
15220 }
15221 None => ::buffa::MessageField::none(),
15222 },
15223 current_confirmations: self.current_confirmations,
15224 required_confirmations: self.required_confirmations,
15225 approve_count: self.approve_count,
15226 reject_count: self.reject_count,
15227 validator_count: self.validator_count,
15228 required_approvals: self.required_approvals,
15229 required_rejections: self.required_rejections,
15230 occurred_at_unix_ms: self.occurred_at_unix_ms,
15231 block_time_moving_average_ms: self.block_time_moving_average_ms,
15232 activities: self
15233 .activities
15234 .iter()
15235 .map(|v| v.to_owned_from_source(__buffa_src))
15236 .collect::<::core::result::Result<_, ::buffa::DecodeError>>()?,
15237 __buffa_unknown_fields: self
15238 .__buffa_unknown_fields
15239 .to_owned()?
15240 .into(),
15241 ..::core::default::Default::default()
15242 })
15243 }
15244 }
15245 impl<'a> ::buffa::ViewEncode<'a> for FlowStepViewView<'a> {
15246 #[allow(clippy::needless_borrow, clippy::let_and_return)]
15247 fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
15248 #[allow(unused_imports)]
15249 use ::buffa::Enumeration as _;
15250 let mut size = 0u32;
15251 if self.sequence != 0u32 {
15252 size
15253 += 1u32
15254 + ::buffa::types::uint32_encoded_len(self.sequence) as u32;
15255 }
15256 {
15257 let val = self.step.to_i32();
15258 if val != 0 {
15259 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
15260 }
15261 }
15262 if self.asset_ids.is_set() {
15263 let __slot = __cache.reserve();
15264 let inner_size = self.asset_ids.compute_size(__cache);
15265 __cache.set(__slot, inner_size);
15266 size
15267 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
15268 + inner_size;
15269 }
15270 if self.polyester_chain_id != 0u32 {
15271 size
15272 += 1u32
15273 + ::buffa::types::uint32_encoded_len(self.polyester_chain_id)
15274 as u32;
15275 }
15276 if self.amount_e18.is_set() {
15277 let __slot = __cache.reserve();
15278 let inner_size = self.amount_e18.compute_size(__cache);
15279 __cache.set(__slot, inner_size);
15280 size
15281 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
15282 + inner_size;
15283 }
15284 if !self.milestone_tx_ref.is_empty() {
15285 size
15286 += 1u32
15287 + ::buffa::types::string_encoded_len(&self.milestone_tx_ref)
15288 as u32;
15289 }
15290 {
15291 let val = self.lifecycle_source.to_i32();
15292 if val != 0 {
15293 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
15294 }
15295 }
15296 {
15297 let val = self.lifecycle_reason.to_i32();
15298 if val != 0 {
15299 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
15300 }
15301 }
15302 if self.current_confirmations != 0u32 {
15303 size
15304 += 1u32
15305 + ::buffa::types::uint32_encoded_len(
15306 self.current_confirmations,
15307 ) as u32;
15308 }
15309 if self.required_confirmations != 0u32 {
15310 size
15311 += 1u32
15312 + ::buffa::types::uint32_encoded_len(
15313 self.required_confirmations,
15314 ) as u32;
15315 }
15316 if self.approve_count != 0u32 {
15317 size
15318 += 2u32
15319 + ::buffa::types::uint32_encoded_len(self.approve_count)
15320 as u32;
15321 }
15322 if self.reject_count != 0u32 {
15323 size
15324 += 2u32
15325 + ::buffa::types::uint32_encoded_len(self.reject_count)
15326 as u32;
15327 }
15328 if self.validator_count != 0u32 {
15329 size
15330 += 2u32
15331 + ::buffa::types::uint32_encoded_len(self.validator_count)
15332 as u32;
15333 }
15334 if self.occurred_at_unix_ms != 0u64 {
15335 size
15336 += 2u32
15337 + ::buffa::types::uint64_encoded_len(
15338 self.occurred_at_unix_ms,
15339 ) as u32;
15340 }
15341 if self.block_time_moving_average_ms != 0u64 {
15342 size
15343 += 2u32
15344 + ::buffa::types::uint64_encoded_len(
15345 self.block_time_moving_average_ms,
15346 ) as u32;
15347 }
15348 for v in &self.activities {
15349 let __slot = __cache.reserve();
15350 let inner_size = v.compute_size(__cache);
15351 __cache.set(__slot, inner_size);
15352 size
15353 += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
15354 + inner_size;
15355 }
15356 if self.required_approvals != 0u32 {
15357 size
15358 += 2u32
15359 + ::buffa::types::uint32_encoded_len(self.required_approvals)
15360 as u32;
15361 }
15362 if self.required_rejections != 0u32 {
15363 size
15364 += 2u32
15365 + ::buffa::types::uint32_encoded_len(
15366 self.required_rejections,
15367 ) as u32;
15368 }
15369 if self.request_fee.is_set() {
15370 let __slot = __cache.reserve();
15371 let inner_size = self.request_fee.compute_size(__cache);
15372 __cache.set(__slot, inner_size);
15373 size
15374 += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
15375 + inner_size;
15376 }
15377 if self.zipper_reason.is_set() {
15378 let __slot = __cache.reserve();
15379 let inner_size = self.zipper_reason.compute_size(__cache);
15380 __cache.set(__slot, inner_size);
15381 size
15382 += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
15383 + inner_size;
15384 }
15385 size += self.__buffa_unknown_fields.encoded_len() as u32;
15386 size
15387 }
15388 #[allow(clippy::needless_borrow)]
15389 fn write_to(
15390 &self,
15391 __cache: &mut ::buffa::SizeCache,
15392 buf: &mut impl ::buffa::bytes::BufMut,
15393 ) {
15394 #[allow(unused_imports)]
15395 use ::buffa::Enumeration as _;
15396 if self.sequence != 0u32 {
15397 ::buffa::types::put_uint32_field(1u32, self.sequence, buf);
15398 }
15399 {
15400 let val = self.step.to_i32();
15401 if val != 0 {
15402 ::buffa::types::put_int32_field(3u32, val, buf);
15403 }
15404 }
15405 if self.asset_ids.is_set() {
15406 ::buffa::types::put_len_delimited_header(
15407 7u32,
15408 __cache.consume_next(),
15409 buf,
15410 );
15411 self.asset_ids.write_to(__cache, buf);
15412 }
15413 if self.polyester_chain_id != 0u32 {
15414 ::buffa::types::put_uint32_field(8u32, self.polyester_chain_id, buf);
15415 }
15416 if self.amount_e18.is_set() {
15417 ::buffa::types::put_len_delimited_header(
15418 9u32,
15419 __cache.consume_next(),
15420 buf,
15421 );
15422 self.amount_e18.write_to(__cache, buf);
15423 }
15424 if !self.milestone_tx_ref.is_empty() {
15425 ::buffa::types::put_string_field(11u32, &self.milestone_tx_ref, buf);
15426 }
15427 {
15428 let val = self.lifecycle_source.to_i32();
15429 if val != 0 {
15430 ::buffa::types::put_int32_field(12u32, val, buf);
15431 }
15432 }
15433 {
15434 let val = self.lifecycle_reason.to_i32();
15435 if val != 0 {
15436 ::buffa::types::put_int32_field(13u32, val, buf);
15437 }
15438 }
15439 if self.current_confirmations != 0u32 {
15440 ::buffa::types::put_uint32_field(
15441 14u32,
15442 self.current_confirmations,
15443 buf,
15444 );
15445 }
15446 if self.required_confirmations != 0u32 {
15447 ::buffa::types::put_uint32_field(
15448 15u32,
15449 self.required_confirmations,
15450 buf,
15451 );
15452 }
15453 if self.approve_count != 0u32 {
15454 ::buffa::types::put_uint32_field(16u32, self.approve_count, buf);
15455 }
15456 if self.reject_count != 0u32 {
15457 ::buffa::types::put_uint32_field(17u32, self.reject_count, buf);
15458 }
15459 if self.validator_count != 0u32 {
15460 ::buffa::types::put_uint32_field(18u32, self.validator_count, buf);
15461 }
15462 if self.occurred_at_unix_ms != 0u64 {
15463 ::buffa::types::put_uint64_field(
15464 19u32,
15465 self.occurred_at_unix_ms,
15466 buf,
15467 );
15468 }
15469 if self.block_time_moving_average_ms != 0u64 {
15470 ::buffa::types::put_uint64_field(
15471 20u32,
15472 self.block_time_moving_average_ms,
15473 buf,
15474 );
15475 }
15476 for v in &self.activities {
15477 ::buffa::types::put_len_delimited_header(
15478 21u32,
15479 __cache.consume_next(),
15480 buf,
15481 );
15482 v.write_to(__cache, buf);
15483 }
15484 if self.required_approvals != 0u32 {
15485 ::buffa::types::put_uint32_field(
15486 22u32,
15487 self.required_approvals,
15488 buf,
15489 );
15490 }
15491 if self.required_rejections != 0u32 {
15492 ::buffa::types::put_uint32_field(
15493 23u32,
15494 self.required_rejections,
15495 buf,
15496 );
15497 }
15498 if self.request_fee.is_set() {
15499 ::buffa::types::put_len_delimited_header(
15500 24u32,
15501 __cache.consume_next(),
15502 buf,
15503 );
15504 self.request_fee.write_to(__cache, buf);
15505 }
15506 if self.zipper_reason.is_set() {
15507 ::buffa::types::put_len_delimited_header(
15508 25u32,
15509 __cache.consume_next(),
15510 buf,
15511 );
15512 self.zipper_reason.write_to(__cache, buf);
15513 }
15514 self.__buffa_unknown_fields.write_to(buf);
15515 }
15516 }
15517 impl<'__a> ::serde::Serialize for FlowStepViewView<'__a> {
15529 fn serialize<__S: ::serde::Serializer>(
15530 &self,
15531 __s: __S,
15532 ) -> ::core::result::Result<__S::Ok, __S::Error> {
15533 use ::serde::ser::SerializeMap as _;
15534 let mut __map = __s.serialize_map(::core::option::Option::None)?;
15535 if !::buffa::json_helpers::skip_if::is_zero_u32(&self.sequence) {
15536 __map
15537 .serialize_entry(
15538 "sequence",
15539 &::buffa::json_helpers::ProtoJson(&self.sequence),
15540 )?;
15541 }
15542 if !::buffa::json_helpers::skip_if::is_default_enum_value(&self.step) {
15543 __map.serialize_entry("step", &self.step)?;
15544 }
15545 {
15546 if let ::core::option::Option::Some(__v) = self.asset_ids.as_option()
15547 {
15548 __map.serialize_entry("assetIds", __v)?;
15549 }
15550 }
15551 if !::buffa::json_helpers::skip_if::is_zero_u32(
15552 &self.polyester_chain_id,
15553 ) {
15554 __map
15555 .serialize_entry(
15556 "polyesterChainId",
15557 &::buffa::json_helpers::ProtoJson(&self.polyester_chain_id),
15558 )?;
15559 }
15560 {
15561 if let ::core::option::Option::Some(__v) = self
15562 .amount_e18
15563 .as_option()
15564 {
15565 __map.serialize_entry("amountE18", __v)?;
15566 }
15567 }
15568 {
15569 if let ::core::option::Option::Some(__v) = self
15570 .request_fee
15571 .as_option()
15572 {
15573 __map.serialize_entry("requestFee", __v)?;
15574 }
15575 }
15576 if !::buffa::json_helpers::skip_if::is_empty_str(self.milestone_tx_ref) {
15577 __map.serialize_entry("milestoneTxRef", self.milestone_tx_ref)?;
15578 }
15579 if !::buffa::json_helpers::skip_if::is_default_enum_value(
15580 &self.lifecycle_source,
15581 ) {
15582 __map.serialize_entry("lifecycleSource", &self.lifecycle_source)?;
15583 }
15584 if !::buffa::json_helpers::skip_if::is_default_enum_value(
15585 &self.lifecycle_reason,
15586 ) {
15587 __map.serialize_entry("lifecycleReason", &self.lifecycle_reason)?;
15588 }
15589 {
15590 if let ::core::option::Option::Some(__v) = self
15591 .zipper_reason
15592 .as_option()
15593 {
15594 __map.serialize_entry("zipperReason", __v)?;
15595 }
15596 }
15597 if !::buffa::json_helpers::skip_if::is_zero_u32(
15598 &self.current_confirmations,
15599 ) {
15600 __map
15601 .serialize_entry(
15602 "currentConfirmations",
15603 &::buffa::json_helpers::ProtoJson(
15604 &self.current_confirmations,
15605 ),
15606 )?;
15607 }
15608 if !::buffa::json_helpers::skip_if::is_zero_u32(
15609 &self.required_confirmations,
15610 ) {
15611 __map
15612 .serialize_entry(
15613 "requiredConfirmations",
15614 &::buffa::json_helpers::ProtoJson(
15615 &self.required_confirmations,
15616 ),
15617 )?;
15618 }
15619 if !::buffa::json_helpers::skip_if::is_zero_u32(&self.approve_count) {
15620 __map
15621 .serialize_entry(
15622 "approveCount",
15623 &::buffa::json_helpers::ProtoJson(&self.approve_count),
15624 )?;
15625 }
15626 if !::buffa::json_helpers::skip_if::is_zero_u32(&self.reject_count) {
15627 __map
15628 .serialize_entry(
15629 "rejectCount",
15630 &::buffa::json_helpers::ProtoJson(&self.reject_count),
15631 )?;
15632 }
15633 if !::buffa::json_helpers::skip_if::is_zero_u32(&self.validator_count) {
15634 __map
15635 .serialize_entry(
15636 "validatorCount",
15637 &::buffa::json_helpers::ProtoJson(&self.validator_count),
15638 )?;
15639 }
15640 if !::buffa::json_helpers::skip_if::is_zero_u32(
15641 &self.required_approvals,
15642 ) {
15643 __map
15644 .serialize_entry(
15645 "requiredApprovals",
15646 &::buffa::json_helpers::ProtoJson(&self.required_approvals),
15647 )?;
15648 }
15649 if !::buffa::json_helpers::skip_if::is_zero_u32(
15650 &self.required_rejections,
15651 ) {
15652 __map
15653 .serialize_entry(
15654 "requiredRejections",
15655 &::buffa::json_helpers::ProtoJson(&self.required_rejections),
15656 )?;
15657 }
15658 if !::buffa::json_helpers::skip_if::is_zero_u64(
15659 &self.occurred_at_unix_ms,
15660 ) {
15661 __map
15662 .serialize_entry(
15663 "occurredAtUnixMs",
15664 &::buffa::json_helpers::ProtoJson(&self.occurred_at_unix_ms),
15665 )?;
15666 }
15667 if !::buffa::json_helpers::skip_if::is_zero_u64(
15668 &self.block_time_moving_average_ms,
15669 ) {
15670 __map
15671 .serialize_entry(
15672 "blockTimeMovingAverageMs",
15673 &::buffa::json_helpers::ProtoJson(
15674 &self.block_time_moving_average_ms,
15675 ),
15676 )?;
15677 }
15678 if !self.activities.is_empty() {
15679 __map.serialize_entry("activities", &*self.activities)?;
15680 }
15681 __map.end()
15682 }
15683 }
15684 impl<'a> ::buffa::MessageName for FlowStepViewView<'a> {
15685 const PACKAGE: &'static str = "chain.lifecycle.v1";
15686 const NAME: &'static str = "FlowStepView";
15687 const FULL_NAME: &'static str = "chain.lifecycle.v1.FlowStepView";
15688 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowStepView";
15689 }
15690 ::buffa::impl_default_view_instance!(FlowStepViewView);
15691 ::buffa::impl_view_reborrow!(FlowStepViewView);
15692 #[derive(Clone, Debug)]
15698 pub struct FlowStepViewOwnedView(::buffa::OwnedView<FlowStepViewView<'static>>);
15699 impl FlowStepViewOwnedView {
15700 pub fn decode(
15710 bytes: ::buffa::bytes::Bytes,
15711 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
15712 ::core::result::Result::Ok(
15713 FlowStepViewOwnedView(::buffa::OwnedView::decode(bytes)?),
15714 )
15715 }
15716 pub fn decode_with_options(
15724 bytes: ::buffa::bytes::Bytes,
15725 opts: &::buffa::DecodeOptions,
15726 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
15727 ::core::result::Result::Ok(
15728 FlowStepViewOwnedView(
15729 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
15730 ),
15731 )
15732 }
15733 pub fn from_owned(
15740 msg: &super::super::FlowStepView,
15741 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
15742 ::core::result::Result::Ok(
15743 FlowStepViewOwnedView(::buffa::OwnedView::from_owned(msg)?),
15744 )
15745 }
15746 #[must_use]
15748 pub fn view(&self) -> &FlowStepViewView<'_> {
15749 self.0.reborrow()
15750 }
15751 pub fn to_owned_message(
15758 &self,
15759 ) -> ::core::result::Result<
15760 super::super::FlowStepView,
15761 ::buffa::DecodeError,
15762 > {
15763 self.0.to_owned_message()
15764 }
15765 #[must_use]
15767 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
15768 self.0.bytes()
15769 }
15770 #[must_use]
15772 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
15773 self.0.into_bytes()
15774 }
15775 #[must_use]
15779 pub fn sequence(&self) -> u32 {
15780 self.0.reborrow().sequence
15781 }
15782 #[must_use]
15786 pub fn step(&self) -> ::buffa::EnumValue<super::super::FlowStep> {
15787 self.0.reborrow().step
15788 }
15789 #[must_use]
15793 pub fn asset_ids(
15794 &self,
15795 ) -> &::buffa::MessageFieldView<
15796 super::super::__buffa::view::AssetIdsView<'_>,
15797 > {
15798 &self.0.reborrow().asset_ids
15799 }
15800 #[must_use]
15804 pub fn polyester_chain_id(&self) -> u32 {
15805 self.0.reborrow().polyester_chain_id
15806 }
15807 #[must_use]
15812 pub fn amount_e18(
15813 &self,
15814 ) -> &::buffa::MessageFieldView<
15815 super::super::super::super::super::polyester::r#type::v1::__buffa::view::U128View<
15816 '_,
15817 >,
15818 > {
15819 &self.0.reborrow().amount_e18
15820 }
15821 #[must_use]
15825 pub fn request_fee(
15826 &self,
15827 ) -> &::buffa::MessageFieldView<
15828 super::super::__buffa::view::RequestFeeView<'_>,
15829 > {
15830 &self.0.reborrow().request_fee
15831 }
15832 #[must_use]
15836 pub fn milestone_tx_ref(&self) -> &'_ str {
15837 self.0.reborrow().milestone_tx_ref
15838 }
15839 #[must_use]
15843 pub fn lifecycle_source(
15844 &self,
15845 ) -> ::buffa::EnumValue<super::super::LifecycleSource> {
15846 self.0.reborrow().lifecycle_source
15847 }
15848 #[must_use]
15852 pub fn lifecycle_reason(
15853 &self,
15854 ) -> ::buffa::EnumValue<super::super::LifecycleReason> {
15855 self.0.reborrow().lifecycle_reason
15856 }
15857 #[must_use]
15861 pub fn zipper_reason(
15862 &self,
15863 ) -> &::buffa::MessageFieldView<
15864 super::super::super::super::zipper::v1::__buffa::view::ZipperReasonDetailsView<
15865 '_,
15866 >,
15867 > {
15868 &self.0.reborrow().zipper_reason
15869 }
15870 #[must_use]
15874 pub fn current_confirmations(&self) -> u32 {
15875 self.0.reborrow().current_confirmations
15876 }
15877 #[must_use]
15881 pub fn required_confirmations(&self) -> u32 {
15882 self.0.reborrow().required_confirmations
15883 }
15884 #[must_use]
15888 pub fn approve_count(&self) -> u32 {
15889 self.0.reborrow().approve_count
15890 }
15891 #[must_use]
15895 pub fn reject_count(&self) -> u32 {
15896 self.0.reborrow().reject_count
15897 }
15898 #[must_use]
15902 pub fn validator_count(&self) -> u32 {
15903 self.0.reborrow().validator_count
15904 }
15905 #[must_use]
15909 pub fn required_approvals(&self) -> u32 {
15910 self.0.reborrow().required_approvals
15911 }
15912 #[must_use]
15916 pub fn required_rejections(&self) -> u32 {
15917 self.0.reborrow().required_rejections
15918 }
15919 #[must_use]
15923 pub fn occurred_at_unix_ms(&self) -> u64 {
15924 self.0.reborrow().occurred_at_unix_ms
15925 }
15926 #[must_use]
15930 pub fn block_time_moving_average_ms(&self) -> u64 {
15931 self.0.reborrow().block_time_moving_average_ms
15932 }
15933 #[must_use]
15939 pub fn activities(
15940 &self,
15941 ) -> &::buffa::RepeatedView<
15942 '_,
15943 super::super::__buffa::view::FlowStepActivityViewView<'_>,
15944 > {
15945 &self.0.reborrow().activities
15946 }
15947 }
15948 impl ::core::convert::From<::buffa::OwnedView<FlowStepViewView<'static>>>
15949 for FlowStepViewOwnedView {
15950 fn from(inner: ::buffa::OwnedView<FlowStepViewView<'static>>) -> Self {
15951 FlowStepViewOwnedView(inner)
15952 }
15953 }
15954 impl ::core::convert::From<FlowStepViewOwnedView>
15955 for ::buffa::OwnedView<FlowStepViewView<'static>> {
15956 fn from(wrapper: FlowStepViewOwnedView) -> Self {
15957 wrapper.0
15958 }
15959 }
15960 impl ::core::convert::AsRef<::buffa::OwnedView<FlowStepViewView<'static>>>
15961 for FlowStepViewOwnedView {
15962 fn as_ref(&self) -> &::buffa::OwnedView<FlowStepViewView<'static>> {
15963 &self.0
15964 }
15965 }
15966 impl ::buffa::HasMessageView for super::super::FlowStepView {
15967 type View<'a> = FlowStepViewView<'a>;
15968 type ViewHandle = FlowStepViewOwnedView;
15969 }
15970 impl ::serde::Serialize for FlowStepViewOwnedView {
15971 fn serialize<__S: ::serde::Serializer>(
15972 &self,
15973 __s: __S,
15974 ) -> ::core::result::Result<__S::Ok, __S::Error> {
15975 ::serde::Serialize::serialize(&self.0, __s)
15976 }
15977 }
15978 #[derive(Clone, Debug, Default)]
15980 pub struct FlowStepActivityViewView<'a> {
15981 pub sequence: u32,
15985 pub tx_ref: &'a str,
15989 pub occurred_at_unix_ms: u64,
15993 pub lifecycle_source: ::buffa::EnumValue<super::super::LifecycleSource>,
15997 pub lifecycle_reason: ::buffa::EnumValue<super::super::LifecycleReason>,
16001 pub zipper_reason: ::buffa::MessageFieldView<
16005 super::super::super::super::zipper::v1::__buffa::view::ZipperReasonDetailsView<
16006 'a,
16007 >,
16008 >,
16009 pub current_confirmations: u32,
16013 pub required_confirmations: u32,
16017 pub approve_count: u32,
16021 pub reject_count: u32,
16025 pub validator_count: u32,
16029 pub kind: ::buffa::EnumValue<super::super::FlowStepActivityKind>,
16033 pub required_approvals: u32,
16037 pub required_rejections: u32,
16041 pub amount_e18: ::buffa::MessageFieldView<
16047 super::super::super::super::super::polyester::r#type::v1::__buffa::view::U128View<
16048 'a,
16049 >,
16050 >,
16051 pub ledger_transfer_id: &'a str,
16055 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
16056 }
16057 impl<'a> ::buffa::MessageView<'a> for FlowStepActivityViewView<'a> {
16058 type Owned = super::super::FlowStepActivityView;
16059 fn decode_view(
16060 buf: &'a [u8],
16061 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
16062 let __limit = ::core::cell::Cell::new(
16063 ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
16064 );
16065 <Self as ::buffa::MessageView>::decode_view_ctx(
16066 buf,
16067 ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
16068 )
16069 }
16070 fn decode_view_with_ctx(
16071 buf: &'a [u8],
16072 ctx: ::buffa::DecodeContext<'_>,
16073 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
16074 <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
16075 }
16076 fn merge_view_field(
16077 &mut self,
16078 tag: ::buffa::encoding::Tag,
16079 cur: &'a [u8],
16080 before_tag: &'a [u8],
16081 ctx: ::buffa::DecodeContext<'_>,
16082 ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
16083 let _ = ctx;
16084 #[allow(unused_variables)]
16085 let view = self;
16086 let mut cur = cur;
16087 match tag.field_number() {
16088 1u32 => {
16089 ::buffa::encoding::check_wire_type(
16090 tag,
16091 ::buffa::encoding::WireType::Varint,
16092 )?;
16093 view.sequence = ::buffa::types::decode_uint32(&mut cur)?;
16094 }
16095 2u32 => {
16096 ::buffa::encoding::check_wire_type(
16097 tag,
16098 ::buffa::encoding::WireType::LengthDelimited,
16099 )?;
16100 view.tx_ref = ::buffa::types::borrow_str(&mut cur)?;
16101 }
16102 3u32 => {
16103 ::buffa::encoding::check_wire_type(
16104 tag,
16105 ::buffa::encoding::WireType::Varint,
16106 )?;
16107 view.occurred_at_unix_ms = ::buffa::types::decode_uint64(
16108 &mut cur,
16109 )?;
16110 }
16111 4u32 => {
16112 ::buffa::encoding::check_wire_type(
16113 tag,
16114 ::buffa::encoding::WireType::Varint,
16115 )?;
16116 view.lifecycle_source = ::buffa::EnumValue::from(
16117 ::buffa::types::decode_int32(&mut cur)?,
16118 );
16119 }
16120 5u32 => {
16121 ::buffa::encoding::check_wire_type(
16122 tag,
16123 ::buffa::encoding::WireType::Varint,
16124 )?;
16125 view.lifecycle_reason = ::buffa::EnumValue::from(
16126 ::buffa::types::decode_int32(&mut cur)?,
16127 );
16128 }
16129 16u32 => {
16130 ::buffa::encoding::check_wire_type(
16131 tag,
16132 ::buffa::encoding::WireType::LengthDelimited,
16133 )?;
16134 let __sub_ctx = ctx.descend()?;
16135 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
16136 match view.zipper_reason.as_mut() {
16137 Some(existing) => {
16138 ::buffa::MessageView::merge_into_view(
16139 existing,
16140 sub,
16141 __sub_ctx,
16142 )?
16143 }
16144 None => {
16145 view.zipper_reason = ::buffa::MessageFieldView::set(
16146 <super::super::super::super::zipper::v1::__buffa::view::ZipperReasonDetailsView as ::buffa::MessageView>::decode_view_ctx(
16147 sub,
16148 __sub_ctx,
16149 )?,
16150 );
16151 }
16152 }
16153 }
16154 6u32 => {
16155 ::buffa::encoding::check_wire_type(
16156 tag,
16157 ::buffa::encoding::WireType::Varint,
16158 )?;
16159 view.current_confirmations = ::buffa::types::decode_uint32(
16160 &mut cur,
16161 )?;
16162 }
16163 7u32 => {
16164 ::buffa::encoding::check_wire_type(
16165 tag,
16166 ::buffa::encoding::WireType::Varint,
16167 )?;
16168 view.required_confirmations = ::buffa::types::decode_uint32(
16169 &mut cur,
16170 )?;
16171 }
16172 8u32 => {
16173 ::buffa::encoding::check_wire_type(
16174 tag,
16175 ::buffa::encoding::WireType::Varint,
16176 )?;
16177 view.approve_count = ::buffa::types::decode_uint32(&mut cur)?;
16178 }
16179 9u32 => {
16180 ::buffa::encoding::check_wire_type(
16181 tag,
16182 ::buffa::encoding::WireType::Varint,
16183 )?;
16184 view.reject_count = ::buffa::types::decode_uint32(&mut cur)?;
16185 }
16186 10u32 => {
16187 ::buffa::encoding::check_wire_type(
16188 tag,
16189 ::buffa::encoding::WireType::Varint,
16190 )?;
16191 view.validator_count = ::buffa::types::decode_uint32(&mut cur)?;
16192 }
16193 11u32 => {
16194 ::buffa::encoding::check_wire_type(
16195 tag,
16196 ::buffa::encoding::WireType::Varint,
16197 )?;
16198 view.kind = ::buffa::EnumValue::from(
16199 ::buffa::types::decode_int32(&mut cur)?,
16200 );
16201 }
16202 12u32 => {
16203 ::buffa::encoding::check_wire_type(
16204 tag,
16205 ::buffa::encoding::WireType::Varint,
16206 )?;
16207 view.required_approvals = ::buffa::types::decode_uint32(
16208 &mut cur,
16209 )?;
16210 }
16211 13u32 => {
16212 ::buffa::encoding::check_wire_type(
16213 tag,
16214 ::buffa::encoding::WireType::Varint,
16215 )?;
16216 view.required_rejections = ::buffa::types::decode_uint32(
16217 &mut cur,
16218 )?;
16219 }
16220 14u32 => {
16221 ::buffa::encoding::check_wire_type(
16222 tag,
16223 ::buffa::encoding::WireType::LengthDelimited,
16224 )?;
16225 let __sub_ctx = ctx.descend()?;
16226 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
16227 match view.amount_e18.as_mut() {
16228 Some(existing) => {
16229 ::buffa::MessageView::merge_into_view(
16230 existing,
16231 sub,
16232 __sub_ctx,
16233 )?
16234 }
16235 None => {
16236 view.amount_e18 = ::buffa::MessageFieldView::set(
16237 <super::super::super::super::super::polyester::r#type::v1::__buffa::view::U128View as ::buffa::MessageView>::decode_view_ctx(
16238 sub,
16239 __sub_ctx,
16240 )?,
16241 );
16242 }
16243 }
16244 }
16245 15u32 => {
16246 ::buffa::encoding::check_wire_type(
16247 tag,
16248 ::buffa::encoding::WireType::LengthDelimited,
16249 )?;
16250 view.ledger_transfer_id = ::buffa::types::borrow_str(&mut cur)?;
16251 }
16252 _ => {
16253 ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
16254 let span_len = before_tag.len() - cur.len();
16255 view.__buffa_unknown_fields
16256 .push_record(before_tag, span_len, ctx)?;
16257 }
16258 }
16259 ::core::result::Result::Ok(cur)
16260 }
16261 fn to_owned_message(
16262 &self,
16263 ) -> ::core::result::Result<
16264 super::super::FlowStepActivityView,
16265 ::buffa::DecodeError,
16266 > {
16267 self.to_owned_from_source(None)
16268 }
16269 #[allow(clippy::useless_conversion, clippy::needless_update)]
16270 fn to_owned_from_source(
16271 &self,
16272 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
16273 ) -> ::core::result::Result<
16274 super::super::FlowStepActivityView,
16275 ::buffa::DecodeError,
16276 > {
16277 #[allow(unused_imports)]
16278 use ::buffa::alloc::string::ToString as _;
16279 let _ = __buffa_src;
16280 ::core::result::Result::Ok(super::super::FlowStepActivityView {
16281 sequence: self.sequence,
16282 tx_ref: self.tx_ref.to_string(),
16283 occurred_at_unix_ms: self.occurred_at_unix_ms,
16284 lifecycle_source: self.lifecycle_source,
16285 lifecycle_reason: self.lifecycle_reason,
16286 zipper_reason: match self.zipper_reason.as_option() {
16287 Some(v) => {
16288 ::buffa::MessageField::<
16289 super::super::super::super::zipper::v1::ZipperReasonDetails,
16290 >::some(v.to_owned_from_source(__buffa_src)?)
16291 }
16292 None => ::buffa::MessageField::none(),
16293 },
16294 current_confirmations: self.current_confirmations,
16295 required_confirmations: self.required_confirmations,
16296 approve_count: self.approve_count,
16297 reject_count: self.reject_count,
16298 validator_count: self.validator_count,
16299 kind: self.kind,
16300 required_approvals: self.required_approvals,
16301 required_rejections: self.required_rejections,
16302 amount_e18: match self.amount_e18.as_option() {
16303 Some(v) => {
16304 ::buffa::MessageField::<
16305 super::super::super::super::super::polyester::r#type::v1::U128,
16306 >::some(v.to_owned_from_source(__buffa_src)?)
16307 }
16308 None => ::buffa::MessageField::none(),
16309 },
16310 ledger_transfer_id: self.ledger_transfer_id.to_string(),
16311 __buffa_unknown_fields: self
16312 .__buffa_unknown_fields
16313 .to_owned()?
16314 .into(),
16315 ..::core::default::Default::default()
16316 })
16317 }
16318 }
16319 impl<'a> ::buffa::ViewEncode<'a> for FlowStepActivityViewView<'a> {
16320 #[allow(clippy::needless_borrow, clippy::let_and_return)]
16321 fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
16322 #[allow(unused_imports)]
16323 use ::buffa::Enumeration as _;
16324 let mut size = 0u32;
16325 if self.sequence != 0u32 {
16326 size
16327 += 1u32
16328 + ::buffa::types::uint32_encoded_len(self.sequence) as u32;
16329 }
16330 if !self.tx_ref.is_empty() {
16331 size
16332 += 1u32
16333 + ::buffa::types::string_encoded_len(&self.tx_ref) as u32;
16334 }
16335 if self.occurred_at_unix_ms != 0u64 {
16336 size
16337 += 1u32
16338 + ::buffa::types::uint64_encoded_len(
16339 self.occurred_at_unix_ms,
16340 ) as u32;
16341 }
16342 {
16343 let val = self.lifecycle_source.to_i32();
16344 if val != 0 {
16345 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
16346 }
16347 }
16348 {
16349 let val = self.lifecycle_reason.to_i32();
16350 if val != 0 {
16351 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
16352 }
16353 }
16354 if self.current_confirmations != 0u32 {
16355 size
16356 += 1u32
16357 + ::buffa::types::uint32_encoded_len(
16358 self.current_confirmations,
16359 ) as u32;
16360 }
16361 if self.required_confirmations != 0u32 {
16362 size
16363 += 1u32
16364 + ::buffa::types::uint32_encoded_len(
16365 self.required_confirmations,
16366 ) as u32;
16367 }
16368 if self.approve_count != 0u32 {
16369 size
16370 += 1u32
16371 + ::buffa::types::uint32_encoded_len(self.approve_count)
16372 as u32;
16373 }
16374 if self.reject_count != 0u32 {
16375 size
16376 += 1u32
16377 + ::buffa::types::uint32_encoded_len(self.reject_count)
16378 as u32;
16379 }
16380 if self.validator_count != 0u32 {
16381 size
16382 += 1u32
16383 + ::buffa::types::uint32_encoded_len(self.validator_count)
16384 as u32;
16385 }
16386 {
16387 let val = self.kind.to_i32();
16388 if val != 0 {
16389 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
16390 }
16391 }
16392 if self.required_approvals != 0u32 {
16393 size
16394 += 1u32
16395 + ::buffa::types::uint32_encoded_len(self.required_approvals)
16396 as u32;
16397 }
16398 if self.required_rejections != 0u32 {
16399 size
16400 += 1u32
16401 + ::buffa::types::uint32_encoded_len(
16402 self.required_rejections,
16403 ) as u32;
16404 }
16405 if self.amount_e18.is_set() {
16406 let __slot = __cache.reserve();
16407 let inner_size = self.amount_e18.compute_size(__cache);
16408 __cache.set(__slot, inner_size);
16409 size
16410 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
16411 + inner_size;
16412 }
16413 if !self.ledger_transfer_id.is_empty() {
16414 size
16415 += 1u32
16416 + ::buffa::types::string_encoded_len(
16417 &self.ledger_transfer_id,
16418 ) as u32;
16419 }
16420 if self.zipper_reason.is_set() {
16421 let __slot = __cache.reserve();
16422 let inner_size = self.zipper_reason.compute_size(__cache);
16423 __cache.set(__slot, inner_size);
16424 size
16425 += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
16426 + inner_size;
16427 }
16428 size += self.__buffa_unknown_fields.encoded_len() as u32;
16429 size
16430 }
16431 #[allow(clippy::needless_borrow)]
16432 fn write_to(
16433 &self,
16434 __cache: &mut ::buffa::SizeCache,
16435 buf: &mut impl ::buffa::bytes::BufMut,
16436 ) {
16437 #[allow(unused_imports)]
16438 use ::buffa::Enumeration as _;
16439 if self.sequence != 0u32 {
16440 ::buffa::types::put_uint32_field(1u32, self.sequence, buf);
16441 }
16442 if !self.tx_ref.is_empty() {
16443 ::buffa::types::put_string_field(2u32, &self.tx_ref, buf);
16444 }
16445 if self.occurred_at_unix_ms != 0u64 {
16446 ::buffa::types::put_uint64_field(
16447 3u32,
16448 self.occurred_at_unix_ms,
16449 buf,
16450 );
16451 }
16452 {
16453 let val = self.lifecycle_source.to_i32();
16454 if val != 0 {
16455 ::buffa::types::put_int32_field(4u32, val, buf);
16456 }
16457 }
16458 {
16459 let val = self.lifecycle_reason.to_i32();
16460 if val != 0 {
16461 ::buffa::types::put_int32_field(5u32, val, buf);
16462 }
16463 }
16464 if self.current_confirmations != 0u32 {
16465 ::buffa::types::put_uint32_field(
16466 6u32,
16467 self.current_confirmations,
16468 buf,
16469 );
16470 }
16471 if self.required_confirmations != 0u32 {
16472 ::buffa::types::put_uint32_field(
16473 7u32,
16474 self.required_confirmations,
16475 buf,
16476 );
16477 }
16478 if self.approve_count != 0u32 {
16479 ::buffa::types::put_uint32_field(8u32, self.approve_count, buf);
16480 }
16481 if self.reject_count != 0u32 {
16482 ::buffa::types::put_uint32_field(9u32, self.reject_count, buf);
16483 }
16484 if self.validator_count != 0u32 {
16485 ::buffa::types::put_uint32_field(10u32, self.validator_count, buf);
16486 }
16487 {
16488 let val = self.kind.to_i32();
16489 if val != 0 {
16490 ::buffa::types::put_int32_field(11u32, val, buf);
16491 }
16492 }
16493 if self.required_approvals != 0u32 {
16494 ::buffa::types::put_uint32_field(
16495 12u32,
16496 self.required_approvals,
16497 buf,
16498 );
16499 }
16500 if self.required_rejections != 0u32 {
16501 ::buffa::types::put_uint32_field(
16502 13u32,
16503 self.required_rejections,
16504 buf,
16505 );
16506 }
16507 if self.amount_e18.is_set() {
16508 ::buffa::types::put_len_delimited_header(
16509 14u32,
16510 __cache.consume_next(),
16511 buf,
16512 );
16513 self.amount_e18.write_to(__cache, buf);
16514 }
16515 if !self.ledger_transfer_id.is_empty() {
16516 ::buffa::types::put_string_field(
16517 15u32,
16518 &self.ledger_transfer_id,
16519 buf,
16520 );
16521 }
16522 if self.zipper_reason.is_set() {
16523 ::buffa::types::put_len_delimited_header(
16524 16u32,
16525 __cache.consume_next(),
16526 buf,
16527 );
16528 self.zipper_reason.write_to(__cache, buf);
16529 }
16530 self.__buffa_unknown_fields.write_to(buf);
16531 }
16532 }
16533 impl<'__a> ::serde::Serialize for FlowStepActivityViewView<'__a> {
16545 fn serialize<__S: ::serde::Serializer>(
16546 &self,
16547 __s: __S,
16548 ) -> ::core::result::Result<__S::Ok, __S::Error> {
16549 use ::serde::ser::SerializeMap as _;
16550 let mut __map = __s.serialize_map(::core::option::Option::None)?;
16551 if !::buffa::json_helpers::skip_if::is_zero_u32(&self.sequence) {
16552 __map
16553 .serialize_entry(
16554 "sequence",
16555 &::buffa::json_helpers::ProtoJson(&self.sequence),
16556 )?;
16557 }
16558 if !::buffa::json_helpers::skip_if::is_empty_str(self.tx_ref) {
16559 __map.serialize_entry("txRef", self.tx_ref)?;
16560 }
16561 if !::buffa::json_helpers::skip_if::is_zero_u64(
16562 &self.occurred_at_unix_ms,
16563 ) {
16564 __map
16565 .serialize_entry(
16566 "occurredAtUnixMs",
16567 &::buffa::json_helpers::ProtoJson(&self.occurred_at_unix_ms),
16568 )?;
16569 }
16570 if !::buffa::json_helpers::skip_if::is_default_enum_value(
16571 &self.lifecycle_source,
16572 ) {
16573 __map.serialize_entry("lifecycleSource", &self.lifecycle_source)?;
16574 }
16575 if !::buffa::json_helpers::skip_if::is_default_enum_value(
16576 &self.lifecycle_reason,
16577 ) {
16578 __map.serialize_entry("lifecycleReason", &self.lifecycle_reason)?;
16579 }
16580 {
16581 if let ::core::option::Option::Some(__v) = self
16582 .zipper_reason
16583 .as_option()
16584 {
16585 __map.serialize_entry("zipperReason", __v)?;
16586 }
16587 }
16588 if !::buffa::json_helpers::skip_if::is_zero_u32(
16589 &self.current_confirmations,
16590 ) {
16591 __map
16592 .serialize_entry(
16593 "currentConfirmations",
16594 &::buffa::json_helpers::ProtoJson(
16595 &self.current_confirmations,
16596 ),
16597 )?;
16598 }
16599 if !::buffa::json_helpers::skip_if::is_zero_u32(
16600 &self.required_confirmations,
16601 ) {
16602 __map
16603 .serialize_entry(
16604 "requiredConfirmations",
16605 &::buffa::json_helpers::ProtoJson(
16606 &self.required_confirmations,
16607 ),
16608 )?;
16609 }
16610 if !::buffa::json_helpers::skip_if::is_zero_u32(&self.approve_count) {
16611 __map
16612 .serialize_entry(
16613 "approveCount",
16614 &::buffa::json_helpers::ProtoJson(&self.approve_count),
16615 )?;
16616 }
16617 if !::buffa::json_helpers::skip_if::is_zero_u32(&self.reject_count) {
16618 __map
16619 .serialize_entry(
16620 "rejectCount",
16621 &::buffa::json_helpers::ProtoJson(&self.reject_count),
16622 )?;
16623 }
16624 if !::buffa::json_helpers::skip_if::is_zero_u32(&self.validator_count) {
16625 __map
16626 .serialize_entry(
16627 "validatorCount",
16628 &::buffa::json_helpers::ProtoJson(&self.validator_count),
16629 )?;
16630 }
16631 if !::buffa::json_helpers::skip_if::is_default_enum_value(&self.kind) {
16632 __map.serialize_entry("kind", &self.kind)?;
16633 }
16634 if !::buffa::json_helpers::skip_if::is_zero_u32(
16635 &self.required_approvals,
16636 ) {
16637 __map
16638 .serialize_entry(
16639 "requiredApprovals",
16640 &::buffa::json_helpers::ProtoJson(&self.required_approvals),
16641 )?;
16642 }
16643 if !::buffa::json_helpers::skip_if::is_zero_u32(
16644 &self.required_rejections,
16645 ) {
16646 __map
16647 .serialize_entry(
16648 "requiredRejections",
16649 &::buffa::json_helpers::ProtoJson(&self.required_rejections),
16650 )?;
16651 }
16652 {
16653 if let ::core::option::Option::Some(__v) = self
16654 .amount_e18
16655 .as_option()
16656 {
16657 __map.serialize_entry("amountE18", __v)?;
16658 }
16659 }
16660 if !::buffa::json_helpers::skip_if::is_empty_str(
16661 self.ledger_transfer_id,
16662 ) {
16663 __map.serialize_entry("ledgerTransferId", self.ledger_transfer_id)?;
16664 }
16665 __map.end()
16666 }
16667 }
16668 impl<'a> ::buffa::MessageName for FlowStepActivityViewView<'a> {
16669 const PACKAGE: &'static str = "chain.lifecycle.v1";
16670 const NAME: &'static str = "FlowStepActivityView";
16671 const FULL_NAME: &'static str = "chain.lifecycle.v1.FlowStepActivityView";
16672 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowStepActivityView";
16673 }
16674 ::buffa::impl_default_view_instance!(FlowStepActivityViewView);
16675 ::buffa::impl_view_reborrow!(FlowStepActivityViewView);
16676 #[derive(Clone, Debug)]
16682 pub struct FlowStepActivityViewOwnedView(
16683 ::buffa::OwnedView<FlowStepActivityViewView<'static>>,
16684 );
16685 impl FlowStepActivityViewOwnedView {
16686 pub fn decode(
16696 bytes: ::buffa::bytes::Bytes,
16697 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
16698 ::core::result::Result::Ok(
16699 FlowStepActivityViewOwnedView(::buffa::OwnedView::decode(bytes)?),
16700 )
16701 }
16702 pub fn decode_with_options(
16710 bytes: ::buffa::bytes::Bytes,
16711 opts: &::buffa::DecodeOptions,
16712 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
16713 ::core::result::Result::Ok(
16714 FlowStepActivityViewOwnedView(
16715 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
16716 ),
16717 )
16718 }
16719 pub fn from_owned(
16726 msg: &super::super::FlowStepActivityView,
16727 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
16728 ::core::result::Result::Ok(
16729 FlowStepActivityViewOwnedView(::buffa::OwnedView::from_owned(msg)?),
16730 )
16731 }
16732 #[must_use]
16734 pub fn view(&self) -> &FlowStepActivityViewView<'_> {
16735 self.0.reborrow()
16736 }
16737 pub fn to_owned_message(
16744 &self,
16745 ) -> ::core::result::Result<
16746 super::super::FlowStepActivityView,
16747 ::buffa::DecodeError,
16748 > {
16749 self.0.to_owned_message()
16750 }
16751 #[must_use]
16753 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
16754 self.0.bytes()
16755 }
16756 #[must_use]
16758 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
16759 self.0.into_bytes()
16760 }
16761 #[must_use]
16765 pub fn sequence(&self) -> u32 {
16766 self.0.reborrow().sequence
16767 }
16768 #[must_use]
16772 pub fn tx_ref(&self) -> &'_ str {
16773 self.0.reborrow().tx_ref
16774 }
16775 #[must_use]
16779 pub fn occurred_at_unix_ms(&self) -> u64 {
16780 self.0.reborrow().occurred_at_unix_ms
16781 }
16782 #[must_use]
16786 pub fn lifecycle_source(
16787 &self,
16788 ) -> ::buffa::EnumValue<super::super::LifecycleSource> {
16789 self.0.reborrow().lifecycle_source
16790 }
16791 #[must_use]
16795 pub fn lifecycle_reason(
16796 &self,
16797 ) -> ::buffa::EnumValue<super::super::LifecycleReason> {
16798 self.0.reborrow().lifecycle_reason
16799 }
16800 #[must_use]
16804 pub fn zipper_reason(
16805 &self,
16806 ) -> &::buffa::MessageFieldView<
16807 super::super::super::super::zipper::v1::__buffa::view::ZipperReasonDetailsView<
16808 '_,
16809 >,
16810 > {
16811 &self.0.reborrow().zipper_reason
16812 }
16813 #[must_use]
16817 pub fn current_confirmations(&self) -> u32 {
16818 self.0.reborrow().current_confirmations
16819 }
16820 #[must_use]
16824 pub fn required_confirmations(&self) -> u32 {
16825 self.0.reborrow().required_confirmations
16826 }
16827 #[must_use]
16831 pub fn approve_count(&self) -> u32 {
16832 self.0.reborrow().approve_count
16833 }
16834 #[must_use]
16838 pub fn reject_count(&self) -> u32 {
16839 self.0.reborrow().reject_count
16840 }
16841 #[must_use]
16845 pub fn validator_count(&self) -> u32 {
16846 self.0.reborrow().validator_count
16847 }
16848 #[must_use]
16852 pub fn kind(
16853 &self,
16854 ) -> ::buffa::EnumValue<super::super::FlowStepActivityKind> {
16855 self.0.reborrow().kind
16856 }
16857 #[must_use]
16861 pub fn required_approvals(&self) -> u32 {
16862 self.0.reborrow().required_approvals
16863 }
16864 #[must_use]
16868 pub fn required_rejections(&self) -> u32 {
16869 self.0.reborrow().required_rejections
16870 }
16871 #[must_use]
16877 pub fn amount_e18(
16878 &self,
16879 ) -> &::buffa::MessageFieldView<
16880 super::super::super::super::super::polyester::r#type::v1::__buffa::view::U128View<
16881 '_,
16882 >,
16883 > {
16884 &self.0.reborrow().amount_e18
16885 }
16886 #[must_use]
16890 pub fn ledger_transfer_id(&self) -> &'_ str {
16891 self.0.reborrow().ledger_transfer_id
16892 }
16893 }
16894 impl ::core::convert::From<::buffa::OwnedView<FlowStepActivityViewView<'static>>>
16895 for FlowStepActivityViewOwnedView {
16896 fn from(
16897 inner: ::buffa::OwnedView<FlowStepActivityViewView<'static>>,
16898 ) -> Self {
16899 FlowStepActivityViewOwnedView(inner)
16900 }
16901 }
16902 impl ::core::convert::From<FlowStepActivityViewOwnedView>
16903 for ::buffa::OwnedView<FlowStepActivityViewView<'static>> {
16904 fn from(wrapper: FlowStepActivityViewOwnedView) -> Self {
16905 wrapper.0
16906 }
16907 }
16908 impl ::core::convert::AsRef<
16909 ::buffa::OwnedView<FlowStepActivityViewView<'static>>,
16910 > for FlowStepActivityViewOwnedView {
16911 fn as_ref(&self) -> &::buffa::OwnedView<FlowStepActivityViewView<'static>> {
16912 &self.0
16913 }
16914 }
16915 impl ::buffa::HasMessageView for super::super::FlowStepActivityView {
16916 type View<'a> = FlowStepActivityViewView<'a>;
16917 type ViewHandle = FlowStepActivityViewOwnedView;
16918 }
16919 impl ::serde::Serialize for FlowStepActivityViewOwnedView {
16920 fn serialize<__S: ::serde::Serializer>(
16921 &self,
16922 __s: __S,
16923 ) -> ::core::result::Result<__S::Ok, __S::Error> {
16924 ::serde::Serialize::serialize(&self.0, __s)
16925 }
16926 }
16927 #[derive(Clone, Debug, Default)]
16930 pub struct FlowTimelineItemViewView<'a> {
16931 pub sequence: u32,
16935 pub step: ::buffa::EnumValue<super::super::FlowStep>,
16939 pub status: ::buffa::EnumValue<super::super::FlowTimelineStatus>,
16943 pub expected_duration_ms: u64,
16948 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
16949 }
16950 impl<'a> ::buffa::MessageView<'a> for FlowTimelineItemViewView<'a> {
16951 type Owned = super::super::FlowTimelineItemView;
16952 fn decode_view(
16953 buf: &'a [u8],
16954 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
16955 let __limit = ::core::cell::Cell::new(
16956 ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
16957 );
16958 <Self as ::buffa::MessageView>::decode_view_ctx(
16959 buf,
16960 ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
16961 )
16962 }
16963 fn decode_view_with_ctx(
16964 buf: &'a [u8],
16965 ctx: ::buffa::DecodeContext<'_>,
16966 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
16967 <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
16968 }
16969 fn merge_view_field(
16970 &mut self,
16971 tag: ::buffa::encoding::Tag,
16972 cur: &'a [u8],
16973 before_tag: &'a [u8],
16974 ctx: ::buffa::DecodeContext<'_>,
16975 ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
16976 let _ = ctx;
16977 #[allow(unused_variables)]
16978 let view = self;
16979 let mut cur = cur;
16980 match tag.field_number() {
16981 1u32 => {
16982 ::buffa::encoding::check_wire_type(
16983 tag,
16984 ::buffa::encoding::WireType::Varint,
16985 )?;
16986 view.sequence = ::buffa::types::decode_uint32(&mut cur)?;
16987 }
16988 2u32 => {
16989 ::buffa::encoding::check_wire_type(
16990 tag,
16991 ::buffa::encoding::WireType::Varint,
16992 )?;
16993 view.step = ::buffa::EnumValue::from(
16994 ::buffa::types::decode_int32(&mut cur)?,
16995 );
16996 }
16997 3u32 => {
16998 ::buffa::encoding::check_wire_type(
16999 tag,
17000 ::buffa::encoding::WireType::Varint,
17001 )?;
17002 view.status = ::buffa::EnumValue::from(
17003 ::buffa::types::decode_int32(&mut cur)?,
17004 );
17005 }
17006 4u32 => {
17007 ::buffa::encoding::check_wire_type(
17008 tag,
17009 ::buffa::encoding::WireType::Varint,
17010 )?;
17011 view.expected_duration_ms = ::buffa::types::decode_uint64(
17012 &mut cur,
17013 )?;
17014 }
17015 _ => {
17016 ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
17017 let span_len = before_tag.len() - cur.len();
17018 view.__buffa_unknown_fields
17019 .push_record(before_tag, span_len, ctx)?;
17020 }
17021 }
17022 ::core::result::Result::Ok(cur)
17023 }
17024 fn to_owned_message(
17025 &self,
17026 ) -> ::core::result::Result<
17027 super::super::FlowTimelineItemView,
17028 ::buffa::DecodeError,
17029 > {
17030 self.to_owned_from_source(None)
17031 }
17032 #[allow(clippy::useless_conversion, clippy::needless_update)]
17033 fn to_owned_from_source(
17034 &self,
17035 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
17036 ) -> ::core::result::Result<
17037 super::super::FlowTimelineItemView,
17038 ::buffa::DecodeError,
17039 > {
17040 #[allow(unused_imports)]
17041 use ::buffa::alloc::string::ToString as _;
17042 let _ = __buffa_src;
17043 ::core::result::Result::Ok(super::super::FlowTimelineItemView {
17044 sequence: self.sequence,
17045 step: self.step,
17046 status: self.status,
17047 expected_duration_ms: self.expected_duration_ms,
17048 __buffa_unknown_fields: self
17049 .__buffa_unknown_fields
17050 .to_owned()?
17051 .into(),
17052 ..::core::default::Default::default()
17053 })
17054 }
17055 }
17056 impl<'a> ::buffa::ViewEncode<'a> for FlowTimelineItemViewView<'a> {
17057 #[allow(clippy::needless_borrow, clippy::let_and_return)]
17058 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
17059 #[allow(unused_imports)]
17060 use ::buffa::Enumeration as _;
17061 let mut size = 0u32;
17062 if self.sequence != 0u32 {
17063 size
17064 += 1u32
17065 + ::buffa::types::uint32_encoded_len(self.sequence) as u32;
17066 }
17067 {
17068 let val = self.step.to_i32();
17069 if val != 0 {
17070 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
17071 }
17072 }
17073 {
17074 let val = self.status.to_i32();
17075 if val != 0 {
17076 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
17077 }
17078 }
17079 if self.expected_duration_ms != 0u64 {
17080 size
17081 += 1u32
17082 + ::buffa::types::uint64_encoded_len(
17083 self.expected_duration_ms,
17084 ) as u32;
17085 }
17086 size += self.__buffa_unknown_fields.encoded_len() as u32;
17087 size
17088 }
17089 #[allow(clippy::needless_borrow)]
17090 fn write_to(
17091 &self,
17092 _cache: &mut ::buffa::SizeCache,
17093 buf: &mut impl ::buffa::bytes::BufMut,
17094 ) {
17095 #[allow(unused_imports)]
17096 use ::buffa::Enumeration as _;
17097 if self.sequence != 0u32 {
17098 ::buffa::types::put_uint32_field(1u32, self.sequence, buf);
17099 }
17100 {
17101 let val = self.step.to_i32();
17102 if val != 0 {
17103 ::buffa::types::put_int32_field(2u32, val, buf);
17104 }
17105 }
17106 {
17107 let val = self.status.to_i32();
17108 if val != 0 {
17109 ::buffa::types::put_int32_field(3u32, val, buf);
17110 }
17111 }
17112 if self.expected_duration_ms != 0u64 {
17113 ::buffa::types::put_uint64_field(
17114 4u32,
17115 self.expected_duration_ms,
17116 buf,
17117 );
17118 }
17119 self.__buffa_unknown_fields.write_to(buf);
17120 }
17121 }
17122 impl<'__a> ::serde::Serialize for FlowTimelineItemViewView<'__a> {
17134 fn serialize<__S: ::serde::Serializer>(
17135 &self,
17136 __s: __S,
17137 ) -> ::core::result::Result<__S::Ok, __S::Error> {
17138 use ::serde::ser::SerializeMap as _;
17139 let mut __map = __s.serialize_map(::core::option::Option::None)?;
17140 if !::buffa::json_helpers::skip_if::is_zero_u32(&self.sequence) {
17141 __map
17142 .serialize_entry(
17143 "sequence",
17144 &::buffa::json_helpers::ProtoJson(&self.sequence),
17145 )?;
17146 }
17147 if !::buffa::json_helpers::skip_if::is_default_enum_value(&self.step) {
17148 __map.serialize_entry("step", &self.step)?;
17149 }
17150 if !::buffa::json_helpers::skip_if::is_default_enum_value(&self.status) {
17151 __map.serialize_entry("status", &self.status)?;
17152 }
17153 if !::buffa::json_helpers::skip_if::is_zero_u64(
17154 &self.expected_duration_ms,
17155 ) {
17156 __map
17157 .serialize_entry(
17158 "expectedDurationMs",
17159 &::buffa::json_helpers::ProtoJson(&self.expected_duration_ms),
17160 )?;
17161 }
17162 __map.end()
17163 }
17164 }
17165 impl<'a> ::buffa::MessageName for FlowTimelineItemViewView<'a> {
17166 const PACKAGE: &'static str = "chain.lifecycle.v1";
17167 const NAME: &'static str = "FlowTimelineItemView";
17168 const FULL_NAME: &'static str = "chain.lifecycle.v1.FlowTimelineItemView";
17169 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowTimelineItemView";
17170 }
17171 ::buffa::impl_default_view_instance!(FlowTimelineItemViewView);
17172 ::buffa::impl_view_reborrow!(FlowTimelineItemViewView);
17173 #[derive(Clone, Debug)]
17179 pub struct FlowTimelineItemViewOwnedView(
17180 ::buffa::OwnedView<FlowTimelineItemViewView<'static>>,
17181 );
17182 impl FlowTimelineItemViewOwnedView {
17183 pub fn decode(
17193 bytes: ::buffa::bytes::Bytes,
17194 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
17195 ::core::result::Result::Ok(
17196 FlowTimelineItemViewOwnedView(::buffa::OwnedView::decode(bytes)?),
17197 )
17198 }
17199 pub fn decode_with_options(
17207 bytes: ::buffa::bytes::Bytes,
17208 opts: &::buffa::DecodeOptions,
17209 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
17210 ::core::result::Result::Ok(
17211 FlowTimelineItemViewOwnedView(
17212 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
17213 ),
17214 )
17215 }
17216 pub fn from_owned(
17223 msg: &super::super::FlowTimelineItemView,
17224 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
17225 ::core::result::Result::Ok(
17226 FlowTimelineItemViewOwnedView(::buffa::OwnedView::from_owned(msg)?),
17227 )
17228 }
17229 #[must_use]
17231 pub fn view(&self) -> &FlowTimelineItemViewView<'_> {
17232 self.0.reborrow()
17233 }
17234 pub fn to_owned_message(
17241 &self,
17242 ) -> ::core::result::Result<
17243 super::super::FlowTimelineItemView,
17244 ::buffa::DecodeError,
17245 > {
17246 self.0.to_owned_message()
17247 }
17248 #[must_use]
17250 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
17251 self.0.bytes()
17252 }
17253 #[must_use]
17255 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
17256 self.0.into_bytes()
17257 }
17258 #[must_use]
17262 pub fn sequence(&self) -> u32 {
17263 self.0.reborrow().sequence
17264 }
17265 #[must_use]
17269 pub fn step(&self) -> ::buffa::EnumValue<super::super::FlowStep> {
17270 self.0.reborrow().step
17271 }
17272 #[must_use]
17276 pub fn status(
17277 &self,
17278 ) -> ::buffa::EnumValue<super::super::FlowTimelineStatus> {
17279 self.0.reborrow().status
17280 }
17281 #[must_use]
17286 pub fn expected_duration_ms(&self) -> u64 {
17287 self.0.reborrow().expected_duration_ms
17288 }
17289 }
17290 impl ::core::convert::From<::buffa::OwnedView<FlowTimelineItemViewView<'static>>>
17291 for FlowTimelineItemViewOwnedView {
17292 fn from(
17293 inner: ::buffa::OwnedView<FlowTimelineItemViewView<'static>>,
17294 ) -> Self {
17295 FlowTimelineItemViewOwnedView(inner)
17296 }
17297 }
17298 impl ::core::convert::From<FlowTimelineItemViewOwnedView>
17299 for ::buffa::OwnedView<FlowTimelineItemViewView<'static>> {
17300 fn from(wrapper: FlowTimelineItemViewOwnedView) -> Self {
17301 wrapper.0
17302 }
17303 }
17304 impl ::core::convert::AsRef<
17305 ::buffa::OwnedView<FlowTimelineItemViewView<'static>>,
17306 > for FlowTimelineItemViewOwnedView {
17307 fn as_ref(&self) -> &::buffa::OwnedView<FlowTimelineItemViewView<'static>> {
17308 &self.0
17309 }
17310 }
17311 impl ::buffa::HasMessageView for super::super::FlowTimelineItemView {
17312 type View<'a> = FlowTimelineItemViewView<'a>;
17313 type ViewHandle = FlowTimelineItemViewOwnedView;
17314 }
17315 impl ::serde::Serialize for FlowTimelineItemViewOwnedView {
17316 fn serialize<__S: ::serde::Serializer>(
17317 &self,
17318 __s: __S,
17319 ) -> ::core::result::Result<__S::Ok, __S::Error> {
17320 ::serde::Serialize::serialize(&self.0, __s)
17321 }
17322 }
17323 #[derive(Clone, Debug, Default)]
17325 pub struct FlowDetailViewView<'a> {
17326 pub summary: ::buffa::MessageFieldView<
17330 super::super::__buffa::view::FlowSummaryViewView<'a>,
17331 >,
17332 pub observed_steps: ::buffa::RepeatedView<
17337 'a,
17338 super::super::__buffa::view::FlowStepViewView<'a>,
17339 >,
17340 pub from_live_state: bool,
17345 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
17346 }
17347 impl<'a> ::buffa::MessageView<'a> for FlowDetailViewView<'a> {
17348 type Owned = super::super::FlowDetailView;
17349 fn decode_view(
17350 buf: &'a [u8],
17351 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
17352 let __limit = ::core::cell::Cell::new(
17353 ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
17354 );
17355 <Self as ::buffa::MessageView>::decode_view_ctx(
17356 buf,
17357 ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
17358 )
17359 }
17360 fn decode_view_with_ctx(
17361 buf: &'a [u8],
17362 ctx: ::buffa::DecodeContext<'_>,
17363 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
17364 <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
17365 }
17366 fn merge_view_field(
17367 &mut self,
17368 tag: ::buffa::encoding::Tag,
17369 cur: &'a [u8],
17370 before_tag: &'a [u8],
17371 ctx: ::buffa::DecodeContext<'_>,
17372 ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
17373 let _ = ctx;
17374 #[allow(unused_variables)]
17375 let view = self;
17376 let mut cur = cur;
17377 match tag.field_number() {
17378 1u32 => {
17379 ::buffa::encoding::check_wire_type(
17380 tag,
17381 ::buffa::encoding::WireType::LengthDelimited,
17382 )?;
17383 let __sub_ctx = ctx.descend()?;
17384 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
17385 match view.summary.as_mut() {
17386 Some(existing) => {
17387 ::buffa::MessageView::merge_into_view(
17388 existing,
17389 sub,
17390 __sub_ctx,
17391 )?
17392 }
17393 None => {
17394 view.summary = ::buffa::MessageFieldView::set(
17395 <super::super::__buffa::view::FlowSummaryViewView as ::buffa::MessageView>::decode_view_ctx(
17396 sub,
17397 __sub_ctx,
17398 )?,
17399 );
17400 }
17401 }
17402 }
17403 3u32 => {
17404 ::buffa::encoding::check_wire_type(
17405 tag,
17406 ::buffa::encoding::WireType::Varint,
17407 )?;
17408 view.from_live_state = ::buffa::types::decode_bool(&mut cur)?;
17409 }
17410 2u32 => {
17411 ::buffa::encoding::check_wire_type(
17412 tag,
17413 ::buffa::encoding::WireType::LengthDelimited,
17414 )?;
17415 let __sub_ctx = ctx.descend()?;
17416 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
17417 view.observed_steps
17418 .push(
17419 <super::super::__buffa::view::FlowStepViewView as ::buffa::MessageView>::decode_view_ctx(
17420 sub,
17421 __sub_ctx,
17422 )?,
17423 );
17424 }
17425 _ => {
17426 ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
17427 let span_len = before_tag.len() - cur.len();
17428 view.__buffa_unknown_fields
17429 .push_record(before_tag, span_len, ctx)?;
17430 }
17431 }
17432 ::core::result::Result::Ok(cur)
17433 }
17434 fn to_owned_message(
17435 &self,
17436 ) -> ::core::result::Result<
17437 super::super::FlowDetailView,
17438 ::buffa::DecodeError,
17439 > {
17440 self.to_owned_from_source(None)
17441 }
17442 #[allow(clippy::useless_conversion, clippy::needless_update)]
17443 fn to_owned_from_source(
17444 &self,
17445 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
17446 ) -> ::core::result::Result<
17447 super::super::FlowDetailView,
17448 ::buffa::DecodeError,
17449 > {
17450 #[allow(unused_imports)]
17451 use ::buffa::alloc::string::ToString as _;
17452 let _ = __buffa_src;
17453 ::core::result::Result::Ok(super::super::FlowDetailView {
17454 summary: match self.summary.as_option() {
17455 Some(v) => {
17456 ::buffa::MessageField::<
17457 super::super::FlowSummaryView,
17458 >::some(v.to_owned_from_source(__buffa_src)?)
17459 }
17460 None => ::buffa::MessageField::none(),
17461 },
17462 observed_steps: self
17463 .observed_steps
17464 .iter()
17465 .map(|v| v.to_owned_from_source(__buffa_src))
17466 .collect::<::core::result::Result<_, ::buffa::DecodeError>>()?,
17467 from_live_state: self.from_live_state,
17468 __buffa_unknown_fields: self
17469 .__buffa_unknown_fields
17470 .to_owned()?
17471 .into(),
17472 ..::core::default::Default::default()
17473 })
17474 }
17475 }
17476 impl<'a> ::buffa::ViewEncode<'a> for FlowDetailViewView<'a> {
17477 #[allow(clippy::needless_borrow, clippy::let_and_return)]
17478 fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
17479 #[allow(unused_imports)]
17480 use ::buffa::Enumeration as _;
17481 let mut size = 0u32;
17482 if self.summary.is_set() {
17483 let __slot = __cache.reserve();
17484 let inner_size = self.summary.compute_size(__cache);
17485 __cache.set(__slot, inner_size);
17486 size
17487 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
17488 + inner_size;
17489 }
17490 for v in &self.observed_steps {
17491 let __slot = __cache.reserve();
17492 let inner_size = v.compute_size(__cache);
17493 __cache.set(__slot, inner_size);
17494 size
17495 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
17496 + inner_size;
17497 }
17498 if self.from_live_state {
17499 size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
17500 }
17501 size += self.__buffa_unknown_fields.encoded_len() as u32;
17502 size
17503 }
17504 #[allow(clippy::needless_borrow)]
17505 fn write_to(
17506 &self,
17507 __cache: &mut ::buffa::SizeCache,
17508 buf: &mut impl ::buffa::bytes::BufMut,
17509 ) {
17510 #[allow(unused_imports)]
17511 use ::buffa::Enumeration as _;
17512 if self.summary.is_set() {
17513 ::buffa::types::put_len_delimited_header(
17514 1u32,
17515 __cache.consume_next(),
17516 buf,
17517 );
17518 self.summary.write_to(__cache, buf);
17519 }
17520 for v in &self.observed_steps {
17521 ::buffa::types::put_len_delimited_header(
17522 2u32,
17523 __cache.consume_next(),
17524 buf,
17525 );
17526 v.write_to(__cache, buf);
17527 }
17528 if self.from_live_state {
17529 ::buffa::types::put_bool_field(3u32, self.from_live_state, buf);
17530 }
17531 self.__buffa_unknown_fields.write_to(buf);
17532 }
17533 }
17534 impl<'__a> ::serde::Serialize for FlowDetailViewView<'__a> {
17546 fn serialize<__S: ::serde::Serializer>(
17547 &self,
17548 __s: __S,
17549 ) -> ::core::result::Result<__S::Ok, __S::Error> {
17550 use ::serde::ser::SerializeMap as _;
17551 let mut __map = __s.serialize_map(::core::option::Option::None)?;
17552 {
17553 if let ::core::option::Option::Some(__v) = self.summary.as_option() {
17554 __map.serialize_entry("summary", __v)?;
17555 }
17556 }
17557 if !self.observed_steps.is_empty() {
17558 __map.serialize_entry("observedSteps", &*self.observed_steps)?;
17559 }
17560 if self.from_live_state {
17561 __map.serialize_entry("fromLiveState", &self.from_live_state)?;
17562 }
17563 __map.end()
17564 }
17565 }
17566 impl<'a> ::buffa::MessageName for FlowDetailViewView<'a> {
17567 const PACKAGE: &'static str = "chain.lifecycle.v1";
17568 const NAME: &'static str = "FlowDetailView";
17569 const FULL_NAME: &'static str = "chain.lifecycle.v1.FlowDetailView";
17570 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowDetailView";
17571 }
17572 ::buffa::impl_default_view_instance!(FlowDetailViewView);
17573 ::buffa::impl_view_reborrow!(FlowDetailViewView);
17574 #[derive(Clone, Debug)]
17580 pub struct FlowDetailViewOwnedView(
17581 ::buffa::OwnedView<FlowDetailViewView<'static>>,
17582 );
17583 impl FlowDetailViewOwnedView {
17584 pub fn decode(
17594 bytes: ::buffa::bytes::Bytes,
17595 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
17596 ::core::result::Result::Ok(
17597 FlowDetailViewOwnedView(::buffa::OwnedView::decode(bytes)?),
17598 )
17599 }
17600 pub fn decode_with_options(
17608 bytes: ::buffa::bytes::Bytes,
17609 opts: &::buffa::DecodeOptions,
17610 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
17611 ::core::result::Result::Ok(
17612 FlowDetailViewOwnedView(
17613 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
17614 ),
17615 )
17616 }
17617 pub fn from_owned(
17624 msg: &super::super::FlowDetailView,
17625 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
17626 ::core::result::Result::Ok(
17627 FlowDetailViewOwnedView(::buffa::OwnedView::from_owned(msg)?),
17628 )
17629 }
17630 #[must_use]
17632 pub fn view(&self) -> &FlowDetailViewView<'_> {
17633 self.0.reborrow()
17634 }
17635 pub fn to_owned_message(
17642 &self,
17643 ) -> ::core::result::Result<
17644 super::super::FlowDetailView,
17645 ::buffa::DecodeError,
17646 > {
17647 self.0.to_owned_message()
17648 }
17649 #[must_use]
17651 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
17652 self.0.bytes()
17653 }
17654 #[must_use]
17656 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
17657 self.0.into_bytes()
17658 }
17659 #[must_use]
17663 pub fn summary(
17664 &self,
17665 ) -> &::buffa::MessageFieldView<
17666 super::super::__buffa::view::FlowSummaryViewView<'_>,
17667 > {
17668 &self.0.reborrow().summary
17669 }
17670 #[must_use]
17675 pub fn observed_steps(
17676 &self,
17677 ) -> &::buffa::RepeatedView<
17678 '_,
17679 super::super::__buffa::view::FlowStepViewView<'_>,
17680 > {
17681 &self.0.reborrow().observed_steps
17682 }
17683 #[must_use]
17688 pub fn from_live_state(&self) -> bool {
17689 self.0.reborrow().from_live_state
17690 }
17691 }
17692 impl ::core::convert::From<::buffa::OwnedView<FlowDetailViewView<'static>>>
17693 for FlowDetailViewOwnedView {
17694 fn from(inner: ::buffa::OwnedView<FlowDetailViewView<'static>>) -> Self {
17695 FlowDetailViewOwnedView(inner)
17696 }
17697 }
17698 impl ::core::convert::From<FlowDetailViewOwnedView>
17699 for ::buffa::OwnedView<FlowDetailViewView<'static>> {
17700 fn from(wrapper: FlowDetailViewOwnedView) -> Self {
17701 wrapper.0
17702 }
17703 }
17704 impl ::core::convert::AsRef<::buffa::OwnedView<FlowDetailViewView<'static>>>
17705 for FlowDetailViewOwnedView {
17706 fn as_ref(&self) -> &::buffa::OwnedView<FlowDetailViewView<'static>> {
17707 &self.0
17708 }
17709 }
17710 impl ::buffa::HasMessageView for super::super::FlowDetailView {
17711 type View<'a> = FlowDetailViewView<'a>;
17712 type ViewHandle = FlowDetailViewOwnedView;
17713 }
17714 impl ::serde::Serialize for FlowDetailViewOwnedView {
17715 fn serialize<__S: ::serde::Serializer>(
17716 &self,
17717 __s: __S,
17718 ) -> ::core::result::Result<__S::Ok, __S::Error> {
17719 ::serde::Serialize::serialize(&self.0, __s)
17720 }
17721 }
17722 pub mod oneof {
17723 #[allow(unused_imports)]
17724 use super::*;
17725 pub mod list_flows_request {
17726 #[allow(unused_imports)]
17727 use super::*;
17728 #[derive(Clone, Debug)]
17729 pub enum AccountSelector<'a> {
17730 OwnerAccountId(u64),
17731 SmartAccountAddress(&'a str),
17732 }
17733 }
17734 }
17735 }
17736 pub mod oneof {
17737 #[allow(unused_imports)]
17738 use super::*;
17739 pub mod list_flows_request {
17740 #[allow(unused_imports)]
17741 use super::*;
17742 #[derive(Clone, PartialEq, Debug)]
17745 pub enum AccountSelector {
17746 OwnerAccountId(u64),
17747 SmartAccountAddress(::buffa::alloc::string::String),
17748 }
17749 impl ::buffa::Oneof for AccountSelector {}
17750 impl serde::Serialize for AccountSelector {
17751 fn serialize<S: serde::Serializer>(
17752 &self,
17753 s: S,
17754 ) -> ::core::result::Result<S::Ok, S::Error> {
17755 use serde::ser::SerializeMap;
17756 let mut map = s.serialize_map(Some(1))?;
17757 match self {
17758 Self::OwnerAccountId(v) => {
17759 map.serialize_entry(
17760 "ownerAccountId",
17761 &::buffa::json_helpers::ProtoJson(v),
17762 )?;
17763 }
17764 Self::SmartAccountAddress(v) => {
17765 map.serialize_entry("smartAccountAddress", v)?;
17766 }
17767 }
17768 map.end()
17769 }
17770 }
17771 }
17772 }
17773 pub fn register_types(reg: &mut ::buffa::type_registry::TypeRegistry) {
17775 reg.register_json_any(super::__ASSET_IDS_JSON_ANY);
17776 reg.register_json_any(super::__REQUEST_FEE_JSON_ANY);
17777 reg.register_json_any(super::__GET_FLOW_RESPONSE_JSON_ANY);
17778 reg.register_json_any(super::__GET_FLOW_BY_ID_REQUEST_JSON_ANY);
17779 reg.register_json_any(super::__LIST_FLOWS_BY_TX_REQUEST_JSON_ANY);
17780 reg.register_json_any(super::__LIST_FLOWS_REQUEST_JSON_ANY);
17781 reg.register_json_any(super::__LIST_FLOWS_RESPONSE_JSON_ANY);
17782 reg.register_json_any(super::__FLOW_TX_MATCH_VIEW_JSON_ANY);
17783 reg.register_json_any(super::__LIST_FLOWS_BY_TX_RESPONSE_JSON_ANY);
17784 reg.register_json_any(super::__FLOW_SUMMARY_VIEW_JSON_ANY);
17785 reg.register_json_any(super::__FLOW_SUMMARY_PROGRESS_VIEW_JSON_ANY);
17786 reg.register_json_any(super::__FLOW_STEP_VIEW_JSON_ANY);
17787 reg.register_json_any(super::__FLOW_STEP_ACTIVITY_VIEW_JSON_ANY);
17788 reg.register_json_any(super::__FLOW_TIMELINE_ITEM_VIEW_JSON_ANY);
17789 reg.register_json_any(super::__FLOW_DETAIL_VIEW_JSON_ANY);
17790 }
17791}
17792#[doc(inline)]
17793pub use self::__buffa::view::AssetIdsView;
17794#[doc(inline)]
17795pub use self::__buffa::view::AssetIdsOwnedView;
17796#[doc(inline)]
17797pub use self::__buffa::view::RequestFeeView;
17798#[doc(inline)]
17799pub use self::__buffa::view::RequestFeeOwnedView;
17800#[doc(inline)]
17801pub use self::__buffa::view::GetFlowResponseView;
17802#[doc(inline)]
17803pub use self::__buffa::view::GetFlowResponseOwnedView;
17804#[doc(inline)]
17805pub use self::__buffa::view::GetFlowByIdRequestView;
17806#[doc(inline)]
17807pub use self::__buffa::view::GetFlowByIdRequestOwnedView;
17808#[doc(inline)]
17809pub use self::__buffa::view::ListFlowsByTxRequestView;
17810#[doc(inline)]
17811pub use self::__buffa::view::ListFlowsByTxRequestOwnedView;
17812#[doc(inline)]
17813pub use self::__buffa::view::ListFlowsRequestView;
17814#[doc(inline)]
17815pub use self::__buffa::view::ListFlowsRequestOwnedView;
17816#[doc(inline)]
17817pub use self::__buffa::view::ListFlowsResponseView;
17818#[doc(inline)]
17819pub use self::__buffa::view::ListFlowsResponseOwnedView;
17820#[doc(inline)]
17821pub use self::__buffa::view::FlowTxMatchViewView;
17822#[doc(inline)]
17823pub use self::__buffa::view::FlowTxMatchViewOwnedView;
17824#[doc(inline)]
17825pub use self::__buffa::view::ListFlowsByTxResponseView;
17826#[doc(inline)]
17827pub use self::__buffa::view::ListFlowsByTxResponseOwnedView;
17828#[doc(inline)]
17829pub use self::__buffa::view::FlowSummaryViewView;
17830#[doc(inline)]
17831pub use self::__buffa::view::FlowSummaryViewOwnedView;
17832#[doc(inline)]
17833pub use self::__buffa::view::FlowSummaryProgressViewView;
17834#[doc(inline)]
17835pub use self::__buffa::view::FlowSummaryProgressViewOwnedView;
17836#[doc(inline)]
17837pub use self::__buffa::view::FlowStepViewView;
17838#[doc(inline)]
17839pub use self::__buffa::view::FlowStepViewOwnedView;
17840#[doc(inline)]
17841pub use self::__buffa::view::FlowStepActivityViewView;
17842#[doc(inline)]
17843pub use self::__buffa::view::FlowStepActivityViewOwnedView;
17844#[doc(inline)]
17845pub use self::__buffa::view::FlowTimelineItemViewView;
17846#[doc(inline)]
17847pub use self::__buffa::view::FlowTimelineItemViewOwnedView;
17848#[doc(inline)]
17849pub use self::__buffa::view::FlowDetailViewView;
17850#[doc(inline)]
17851pub use self::__buffa::view::FlowDetailViewOwnedView;
17852#[doc(inline)]
17853pub use self::__buffa::register_types;