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 TRADING_WITHDRAW_POLICY_DENIED = 300i32,
188 TRADING_WITHDRAW_CONTRACT_REVERTED = 301i32,
190 TRADING_WITHDRAW_EXECUTION_FAILED = 302i32,
192}
193impl LifecycleReason {
194 #[allow(non_upper_case_globals)]
196 pub const ReasonUnspecified: Self = Self::REASON_UNSPECIFIED;
197 #[allow(non_upper_case_globals)]
199 pub const ZipperValidationRejected: Self = Self::ZIPPER_VALIDATION_REJECTED;
200 #[allow(non_upper_case_globals)]
202 pub const ZipperExecutionRejected: Self = Self::ZIPPER_EXECUTION_REJECTED;
203 #[allow(non_upper_case_globals)]
205 pub const ZipperWithdrawExecutionFailed: Self = Self::ZIPPER_WITHDRAW_EXECUTION_FAILED;
206 #[allow(non_upper_case_globals)]
208 pub const ZipperDepositRefundFailed: Self = Self::ZIPPER_DEPOSIT_REFUND_FAILED;
209 #[allow(non_upper_case_globals)]
211 pub const LedgerMirrorRejected: Self = Self::LEDGER_MIRROR_REJECTED;
212 #[allow(non_upper_case_globals)]
214 pub const LedgerMirrorTransferExceedsCredits: Self = Self::LEDGER_MIRROR_TRANSFER_EXCEEDS_CREDITS;
215 #[allow(non_upper_case_globals)]
217 pub const LedgerMirrorTransferExists: Self = Self::LEDGER_MIRROR_TRANSFER_EXISTS;
218 #[allow(non_upper_case_globals)]
220 pub const LedgerMirrorPendingTransferNotFound: Self = Self::LEDGER_MIRROR_PENDING_TRANSFER_NOT_FOUND;
221 #[allow(non_upper_case_globals)]
223 pub const LedgerMirrorTransferIdAlreadyFailed: Self = Self::LEDGER_MIRROR_TRANSFER_ID_ALREADY_FAILED;
224 #[allow(non_upper_case_globals)]
226 pub const TradingWithdrawPolicyDenied: Self = Self::TRADING_WITHDRAW_POLICY_DENIED;
227 #[allow(non_upper_case_globals)]
229 pub const TradingWithdrawContractReverted: Self = Self::TRADING_WITHDRAW_CONTRACT_REVERTED;
230 #[allow(non_upper_case_globals)]
232 pub const TradingWithdrawExecutionFailed: Self = Self::TRADING_WITHDRAW_EXECUTION_FAILED;
233}
234impl ::core::default::Default for LifecycleReason {
235 fn default() -> Self {
236 Self::REASON_UNSPECIFIED
237 }
238}
239impl ::serde::Serialize for LifecycleReason {
240 fn serialize<S: ::serde::Serializer>(
241 &self,
242 s: S,
243 ) -> ::core::result::Result<S::Ok, S::Error> {
244 s.serialize_str(::buffa::Enumeration::proto_name(self))
245 }
246}
247impl<'de> ::serde::Deserialize<'de> for LifecycleReason {
248 fn deserialize<D: ::serde::Deserializer<'de>>(
249 d: D,
250 ) -> ::core::result::Result<Self, D::Error> {
251 struct _V;
252 impl ::serde::de::Visitor<'_> for _V {
253 type Value = LifecycleReason;
254 fn expecting(
255 &self,
256 f: &mut ::core::fmt::Formatter<'_>,
257 ) -> ::core::fmt::Result {
258 f.write_str(
259 concat!(
260 "a string, integer, or null for ", stringify!(LifecycleReason)
261 ),
262 )
263 }
264 fn visit_str<E: ::serde::de::Error>(
265 self,
266 v: &str,
267 ) -> ::core::result::Result<LifecycleReason, E> {
268 <LifecycleReason as ::buffa::Enumeration>::from_proto_name(v)
269 .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
270 }
271 fn visit_i64<E: ::serde::de::Error>(
272 self,
273 v: i64,
274 ) -> ::core::result::Result<LifecycleReason, E> {
275 let v32 = i32::try_from(v)
276 .map_err(|_| {
277 ::serde::de::Error::custom(
278 ::buffa::alloc::format!("enum value {v} out of i32 range"),
279 )
280 })?;
281 <LifecycleReason as ::buffa::Enumeration>::from_i32(v32)
282 .ok_or_else(|| {
283 ::serde::de::Error::custom(
284 ::buffa::alloc::format!("unknown enum value {v32}"),
285 )
286 })
287 }
288 fn visit_u64<E: ::serde::de::Error>(
289 self,
290 v: u64,
291 ) -> ::core::result::Result<LifecycleReason, E> {
292 let v32 = i32::try_from(v)
293 .map_err(|_| {
294 ::serde::de::Error::custom(
295 ::buffa::alloc::format!("enum value {v} out of i32 range"),
296 )
297 })?;
298 <LifecycleReason as ::buffa::Enumeration>::from_i32(v32)
299 .ok_or_else(|| {
300 ::serde::de::Error::custom(
301 ::buffa::alloc::format!("unknown enum value {v32}"),
302 )
303 })
304 }
305 fn visit_unit<E: ::serde::de::Error>(
306 self,
307 ) -> ::core::result::Result<LifecycleReason, E> {
308 ::core::result::Result::Ok(::core::default::Default::default())
309 }
310 }
311 d.deserialize_any(_V)
312 }
313}
314impl ::buffa::json_helpers::ProtoElemJson for LifecycleReason {
315 fn serialize_proto_json<S: ::serde::Serializer>(
316 v: &Self,
317 s: S,
318 ) -> ::core::result::Result<S::Ok, S::Error> {
319 ::serde::Serialize::serialize(v, s)
320 }
321 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
322 d: D,
323 ) -> ::core::result::Result<Self, D::Error> {
324 <Self as ::serde::Deserialize>::deserialize(d)
325 }
326}
327impl ::buffa::Enumeration for LifecycleReason {
328 fn from_i32(value: i32) -> ::core::option::Option<Self> {
329 match value {
330 0i32 => ::core::option::Option::Some(Self::REASON_UNSPECIFIED),
331 101i32 => ::core::option::Option::Some(Self::ZIPPER_VALIDATION_REJECTED),
332 102i32 => ::core::option::Option::Some(Self::ZIPPER_EXECUTION_REJECTED),
333 103i32 => {
334 ::core::option::Option::Some(Self::ZIPPER_WITHDRAW_EXECUTION_FAILED)
335 }
336 104i32 => ::core::option::Option::Some(Self::ZIPPER_DEPOSIT_REFUND_FAILED),
337 200i32 => ::core::option::Option::Some(Self::LEDGER_MIRROR_REJECTED),
338 201i32 => {
339 ::core::option::Option::Some(
340 Self::LEDGER_MIRROR_TRANSFER_EXCEEDS_CREDITS,
341 )
342 }
343 202i32 => ::core::option::Option::Some(Self::LEDGER_MIRROR_TRANSFER_EXISTS),
344 203i32 => {
345 ::core::option::Option::Some(
346 Self::LEDGER_MIRROR_PENDING_TRANSFER_NOT_FOUND,
347 )
348 }
349 204i32 => {
350 ::core::option::Option::Some(
351 Self::LEDGER_MIRROR_TRANSFER_ID_ALREADY_FAILED,
352 )
353 }
354 300i32 => ::core::option::Option::Some(Self::TRADING_WITHDRAW_POLICY_DENIED),
355 301i32 => {
356 ::core::option::Option::Some(Self::TRADING_WITHDRAW_CONTRACT_REVERTED)
357 }
358 302i32 => {
359 ::core::option::Option::Some(Self::TRADING_WITHDRAW_EXECUTION_FAILED)
360 }
361 _ => ::core::option::Option::None,
362 }
363 }
364 fn to_i32(&self) -> i32 {
365 *self as i32
366 }
367 fn proto_name(&self) -> &'static str {
368 match self {
369 Self::REASON_UNSPECIFIED => "REASON_UNSPECIFIED",
370 Self::ZIPPER_VALIDATION_REJECTED => "ZIPPER_VALIDATION_REJECTED",
371 Self::ZIPPER_EXECUTION_REJECTED => "ZIPPER_EXECUTION_REJECTED",
372 Self::ZIPPER_WITHDRAW_EXECUTION_FAILED => "ZIPPER_WITHDRAW_EXECUTION_FAILED",
373 Self::ZIPPER_DEPOSIT_REFUND_FAILED => "ZIPPER_DEPOSIT_REFUND_FAILED",
374 Self::LEDGER_MIRROR_REJECTED => "LEDGER_MIRROR_REJECTED",
375 Self::LEDGER_MIRROR_TRANSFER_EXCEEDS_CREDITS => {
376 "LEDGER_MIRROR_TRANSFER_EXCEEDS_CREDITS"
377 }
378 Self::LEDGER_MIRROR_TRANSFER_EXISTS => "LEDGER_MIRROR_TRANSFER_EXISTS",
379 Self::LEDGER_MIRROR_PENDING_TRANSFER_NOT_FOUND => {
380 "LEDGER_MIRROR_PENDING_TRANSFER_NOT_FOUND"
381 }
382 Self::LEDGER_MIRROR_TRANSFER_ID_ALREADY_FAILED => {
383 "LEDGER_MIRROR_TRANSFER_ID_ALREADY_FAILED"
384 }
385 Self::TRADING_WITHDRAW_POLICY_DENIED => "TRADING_WITHDRAW_POLICY_DENIED",
386 Self::TRADING_WITHDRAW_CONTRACT_REVERTED => {
387 "TRADING_WITHDRAW_CONTRACT_REVERTED"
388 }
389 Self::TRADING_WITHDRAW_EXECUTION_FAILED => {
390 "TRADING_WITHDRAW_EXECUTION_FAILED"
391 }
392 }
393 }
394 fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
395 match name {
396 "REASON_UNSPECIFIED" => {
397 ::core::option::Option::Some(Self::REASON_UNSPECIFIED)
398 }
399 "ZIPPER_VALIDATION_REJECTED" => {
400 ::core::option::Option::Some(Self::ZIPPER_VALIDATION_REJECTED)
401 }
402 "ZIPPER_EXECUTION_REJECTED" => {
403 ::core::option::Option::Some(Self::ZIPPER_EXECUTION_REJECTED)
404 }
405 "ZIPPER_WITHDRAW_EXECUTION_FAILED" => {
406 ::core::option::Option::Some(Self::ZIPPER_WITHDRAW_EXECUTION_FAILED)
407 }
408 "ZIPPER_DEPOSIT_REFUND_FAILED" => {
409 ::core::option::Option::Some(Self::ZIPPER_DEPOSIT_REFUND_FAILED)
410 }
411 "LEDGER_MIRROR_REJECTED" => {
412 ::core::option::Option::Some(Self::LEDGER_MIRROR_REJECTED)
413 }
414 "LEDGER_MIRROR_TRANSFER_EXCEEDS_CREDITS" => {
415 ::core::option::Option::Some(
416 Self::LEDGER_MIRROR_TRANSFER_EXCEEDS_CREDITS,
417 )
418 }
419 "LEDGER_MIRROR_TRANSFER_EXISTS" => {
420 ::core::option::Option::Some(Self::LEDGER_MIRROR_TRANSFER_EXISTS)
421 }
422 "LEDGER_MIRROR_PENDING_TRANSFER_NOT_FOUND" => {
423 ::core::option::Option::Some(
424 Self::LEDGER_MIRROR_PENDING_TRANSFER_NOT_FOUND,
425 )
426 }
427 "LEDGER_MIRROR_TRANSFER_ID_ALREADY_FAILED" => {
428 ::core::option::Option::Some(
429 Self::LEDGER_MIRROR_TRANSFER_ID_ALREADY_FAILED,
430 )
431 }
432 "TRADING_WITHDRAW_POLICY_DENIED" => {
433 ::core::option::Option::Some(Self::TRADING_WITHDRAW_POLICY_DENIED)
434 }
435 "TRADING_WITHDRAW_CONTRACT_REVERTED" => {
436 ::core::option::Option::Some(Self::TRADING_WITHDRAW_CONTRACT_REVERTED)
437 }
438 "TRADING_WITHDRAW_EXECUTION_FAILED" => {
439 ::core::option::Option::Some(Self::TRADING_WITHDRAW_EXECUTION_FAILED)
440 }
441 _ => ::core::option::Option::None,
442 }
443 }
444 fn values() -> &'static [Self] {
445 &[
446 Self::REASON_UNSPECIFIED,
447 Self::ZIPPER_VALIDATION_REJECTED,
448 Self::ZIPPER_EXECUTION_REJECTED,
449 Self::ZIPPER_WITHDRAW_EXECUTION_FAILED,
450 Self::ZIPPER_DEPOSIT_REFUND_FAILED,
451 Self::LEDGER_MIRROR_REJECTED,
452 Self::LEDGER_MIRROR_TRANSFER_EXCEEDS_CREDITS,
453 Self::LEDGER_MIRROR_TRANSFER_EXISTS,
454 Self::LEDGER_MIRROR_PENDING_TRANSFER_NOT_FOUND,
455 Self::LEDGER_MIRROR_TRANSFER_ID_ALREADY_FAILED,
456 Self::TRADING_WITHDRAW_POLICY_DENIED,
457 Self::TRADING_WITHDRAW_CONTRACT_REVERTED,
458 Self::TRADING_WITHDRAW_EXECUTION_FAILED,
459 ]
460 }
461}
462#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
464#[repr(i32)]
465pub enum FlowKind {
466 KIND_UNSPECIFIED = 0i32,
467 KIND_DEPOSIT = 1i32,
469 KIND_WITHDRAW = 2i32,
471 KIND_TRANSFER = 3i32,
473}
474impl FlowKind {
475 #[allow(non_upper_case_globals)]
477 pub const KindUnspecified: Self = Self::KIND_UNSPECIFIED;
478 #[allow(non_upper_case_globals)]
480 pub const KindDeposit: Self = Self::KIND_DEPOSIT;
481 #[allow(non_upper_case_globals)]
483 pub const KindWithdraw: Self = Self::KIND_WITHDRAW;
484 #[allow(non_upper_case_globals)]
486 pub const KindTransfer: Self = Self::KIND_TRANSFER;
487}
488impl ::core::default::Default for FlowKind {
489 fn default() -> Self {
490 Self::KIND_UNSPECIFIED
491 }
492}
493impl ::serde::Serialize for FlowKind {
494 fn serialize<S: ::serde::Serializer>(
495 &self,
496 s: S,
497 ) -> ::core::result::Result<S::Ok, S::Error> {
498 s.serialize_str(::buffa::Enumeration::proto_name(self))
499 }
500}
501impl<'de> ::serde::Deserialize<'de> for FlowKind {
502 fn deserialize<D: ::serde::Deserializer<'de>>(
503 d: D,
504 ) -> ::core::result::Result<Self, D::Error> {
505 struct _V;
506 impl ::serde::de::Visitor<'_> for _V {
507 type Value = FlowKind;
508 fn expecting(
509 &self,
510 f: &mut ::core::fmt::Formatter<'_>,
511 ) -> ::core::fmt::Result {
512 f.write_str(
513 concat!("a string, integer, or null for ", stringify!(FlowKind)),
514 )
515 }
516 fn visit_str<E: ::serde::de::Error>(
517 self,
518 v: &str,
519 ) -> ::core::result::Result<FlowKind, E> {
520 <FlowKind as ::buffa::Enumeration>::from_proto_name(v)
521 .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
522 }
523 fn visit_i64<E: ::serde::de::Error>(
524 self,
525 v: i64,
526 ) -> ::core::result::Result<FlowKind, E> {
527 let v32 = i32::try_from(v)
528 .map_err(|_| {
529 ::serde::de::Error::custom(
530 ::buffa::alloc::format!("enum value {v} out of i32 range"),
531 )
532 })?;
533 <FlowKind as ::buffa::Enumeration>::from_i32(v32)
534 .ok_or_else(|| {
535 ::serde::de::Error::custom(
536 ::buffa::alloc::format!("unknown enum value {v32}"),
537 )
538 })
539 }
540 fn visit_u64<E: ::serde::de::Error>(
541 self,
542 v: u64,
543 ) -> ::core::result::Result<FlowKind, E> {
544 let v32 = i32::try_from(v)
545 .map_err(|_| {
546 ::serde::de::Error::custom(
547 ::buffa::alloc::format!("enum value {v} out of i32 range"),
548 )
549 })?;
550 <FlowKind as ::buffa::Enumeration>::from_i32(v32)
551 .ok_or_else(|| {
552 ::serde::de::Error::custom(
553 ::buffa::alloc::format!("unknown enum value {v32}"),
554 )
555 })
556 }
557 fn visit_unit<E: ::serde::de::Error>(
558 self,
559 ) -> ::core::result::Result<FlowKind, E> {
560 ::core::result::Result::Ok(::core::default::Default::default())
561 }
562 }
563 d.deserialize_any(_V)
564 }
565}
566impl ::buffa::json_helpers::ProtoElemJson for FlowKind {
567 fn serialize_proto_json<S: ::serde::Serializer>(
568 v: &Self,
569 s: S,
570 ) -> ::core::result::Result<S::Ok, S::Error> {
571 ::serde::Serialize::serialize(v, s)
572 }
573 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
574 d: D,
575 ) -> ::core::result::Result<Self, D::Error> {
576 <Self as ::serde::Deserialize>::deserialize(d)
577 }
578}
579impl ::buffa::Enumeration for FlowKind {
580 fn from_i32(value: i32) -> ::core::option::Option<Self> {
581 match value {
582 0i32 => ::core::option::Option::Some(Self::KIND_UNSPECIFIED),
583 1i32 => ::core::option::Option::Some(Self::KIND_DEPOSIT),
584 2i32 => ::core::option::Option::Some(Self::KIND_WITHDRAW),
585 3i32 => ::core::option::Option::Some(Self::KIND_TRANSFER),
586 _ => ::core::option::Option::None,
587 }
588 }
589 fn to_i32(&self) -> i32 {
590 *self as i32
591 }
592 fn proto_name(&self) -> &'static str {
593 match self {
594 Self::KIND_UNSPECIFIED => "KIND_UNSPECIFIED",
595 Self::KIND_DEPOSIT => "KIND_DEPOSIT",
596 Self::KIND_WITHDRAW => "KIND_WITHDRAW",
597 Self::KIND_TRANSFER => "KIND_TRANSFER",
598 }
599 }
600 fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
601 match name {
602 "KIND_UNSPECIFIED" => ::core::option::Option::Some(Self::KIND_UNSPECIFIED),
603 "KIND_DEPOSIT" => ::core::option::Option::Some(Self::KIND_DEPOSIT),
604 "KIND_WITHDRAW" => ::core::option::Option::Some(Self::KIND_WITHDRAW),
605 "KIND_TRANSFER" => ::core::option::Option::Some(Self::KIND_TRANSFER),
606 _ => ::core::option::Option::None,
607 }
608 }
609 fn values() -> &'static [Self] {
610 &[
611 Self::KIND_UNSPECIFIED,
612 Self::KIND_DEPOSIT,
613 Self::KIND_WITHDRAW,
614 Self::KIND_TRANSFER,
615 ]
616 }
617}
618#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
621#[repr(i32)]
622pub enum FlowDomain {
623 DOMAIN_UNSPECIFIED = 0i32,
624 DOMAIN_EXTERNAL_CHAIN = 1i32,
626 DOMAIN_ZIPPER = 2i32,
628 DOMAIN_FUNDING = 3i32,
630 DOMAIN_TRADING = 4i32,
632 DOMAIN_LENDING = 5i32,
634}
635impl FlowDomain {
636 #[allow(non_upper_case_globals)]
638 pub const DomainUnspecified: Self = Self::DOMAIN_UNSPECIFIED;
639 #[allow(non_upper_case_globals)]
641 pub const DomainExternalChain: Self = Self::DOMAIN_EXTERNAL_CHAIN;
642 #[allow(non_upper_case_globals)]
644 pub const DomainZipper: Self = Self::DOMAIN_ZIPPER;
645 #[allow(non_upper_case_globals)]
647 pub const DomainFunding: Self = Self::DOMAIN_FUNDING;
648 #[allow(non_upper_case_globals)]
650 pub const DomainTrading: Self = Self::DOMAIN_TRADING;
651 #[allow(non_upper_case_globals)]
653 pub const DomainLending: Self = Self::DOMAIN_LENDING;
654}
655impl ::core::default::Default for FlowDomain {
656 fn default() -> Self {
657 Self::DOMAIN_UNSPECIFIED
658 }
659}
660impl ::serde::Serialize for FlowDomain {
661 fn serialize<S: ::serde::Serializer>(
662 &self,
663 s: S,
664 ) -> ::core::result::Result<S::Ok, S::Error> {
665 s.serialize_str(::buffa::Enumeration::proto_name(self))
666 }
667}
668impl<'de> ::serde::Deserialize<'de> for FlowDomain {
669 fn deserialize<D: ::serde::Deserializer<'de>>(
670 d: D,
671 ) -> ::core::result::Result<Self, D::Error> {
672 struct _V;
673 impl ::serde::de::Visitor<'_> for _V {
674 type Value = FlowDomain;
675 fn expecting(
676 &self,
677 f: &mut ::core::fmt::Formatter<'_>,
678 ) -> ::core::fmt::Result {
679 f.write_str(
680 concat!("a string, integer, or null for ", stringify!(FlowDomain)),
681 )
682 }
683 fn visit_str<E: ::serde::de::Error>(
684 self,
685 v: &str,
686 ) -> ::core::result::Result<FlowDomain, E> {
687 <FlowDomain as ::buffa::Enumeration>::from_proto_name(v)
688 .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
689 }
690 fn visit_i64<E: ::serde::de::Error>(
691 self,
692 v: i64,
693 ) -> ::core::result::Result<FlowDomain, E> {
694 let v32 = i32::try_from(v)
695 .map_err(|_| {
696 ::serde::de::Error::custom(
697 ::buffa::alloc::format!("enum value {v} out of i32 range"),
698 )
699 })?;
700 <FlowDomain as ::buffa::Enumeration>::from_i32(v32)
701 .ok_or_else(|| {
702 ::serde::de::Error::custom(
703 ::buffa::alloc::format!("unknown enum value {v32}"),
704 )
705 })
706 }
707 fn visit_u64<E: ::serde::de::Error>(
708 self,
709 v: u64,
710 ) -> ::core::result::Result<FlowDomain, E> {
711 let v32 = i32::try_from(v)
712 .map_err(|_| {
713 ::serde::de::Error::custom(
714 ::buffa::alloc::format!("enum value {v} out of i32 range"),
715 )
716 })?;
717 <FlowDomain as ::buffa::Enumeration>::from_i32(v32)
718 .ok_or_else(|| {
719 ::serde::de::Error::custom(
720 ::buffa::alloc::format!("unknown enum value {v32}"),
721 )
722 })
723 }
724 fn visit_unit<E: ::serde::de::Error>(
725 self,
726 ) -> ::core::result::Result<FlowDomain, E> {
727 ::core::result::Result::Ok(::core::default::Default::default())
728 }
729 }
730 d.deserialize_any(_V)
731 }
732}
733impl ::buffa::json_helpers::ProtoElemJson for FlowDomain {
734 fn serialize_proto_json<S: ::serde::Serializer>(
735 v: &Self,
736 s: S,
737 ) -> ::core::result::Result<S::Ok, S::Error> {
738 ::serde::Serialize::serialize(v, s)
739 }
740 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
741 d: D,
742 ) -> ::core::result::Result<Self, D::Error> {
743 <Self as ::serde::Deserialize>::deserialize(d)
744 }
745}
746impl ::buffa::Enumeration for FlowDomain {
747 fn from_i32(value: i32) -> ::core::option::Option<Self> {
748 match value {
749 0i32 => ::core::option::Option::Some(Self::DOMAIN_UNSPECIFIED),
750 1i32 => ::core::option::Option::Some(Self::DOMAIN_EXTERNAL_CHAIN),
751 2i32 => ::core::option::Option::Some(Self::DOMAIN_ZIPPER),
752 3i32 => ::core::option::Option::Some(Self::DOMAIN_FUNDING),
753 4i32 => ::core::option::Option::Some(Self::DOMAIN_TRADING),
754 5i32 => ::core::option::Option::Some(Self::DOMAIN_LENDING),
755 _ => ::core::option::Option::None,
756 }
757 }
758 fn to_i32(&self) -> i32 {
759 *self as i32
760 }
761 fn proto_name(&self) -> &'static str {
762 match self {
763 Self::DOMAIN_UNSPECIFIED => "DOMAIN_UNSPECIFIED",
764 Self::DOMAIN_EXTERNAL_CHAIN => "DOMAIN_EXTERNAL_CHAIN",
765 Self::DOMAIN_ZIPPER => "DOMAIN_ZIPPER",
766 Self::DOMAIN_FUNDING => "DOMAIN_FUNDING",
767 Self::DOMAIN_TRADING => "DOMAIN_TRADING",
768 Self::DOMAIN_LENDING => "DOMAIN_LENDING",
769 }
770 }
771 fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
772 match name {
773 "DOMAIN_UNSPECIFIED" => {
774 ::core::option::Option::Some(Self::DOMAIN_UNSPECIFIED)
775 }
776 "DOMAIN_EXTERNAL_CHAIN" => {
777 ::core::option::Option::Some(Self::DOMAIN_EXTERNAL_CHAIN)
778 }
779 "DOMAIN_ZIPPER" => ::core::option::Option::Some(Self::DOMAIN_ZIPPER),
780 "DOMAIN_FUNDING" => ::core::option::Option::Some(Self::DOMAIN_FUNDING),
781 "DOMAIN_TRADING" => ::core::option::Option::Some(Self::DOMAIN_TRADING),
782 "DOMAIN_LENDING" => ::core::option::Option::Some(Self::DOMAIN_LENDING),
783 _ => ::core::option::Option::None,
784 }
785 }
786 fn values() -> &'static [Self] {
787 &[
788 Self::DOMAIN_UNSPECIFIED,
789 Self::DOMAIN_EXTERNAL_CHAIN,
790 Self::DOMAIN_ZIPPER,
791 Self::DOMAIN_FUNDING,
792 Self::DOMAIN_TRADING,
793 Self::DOMAIN_LENDING,
794 ]
795 }
796}
797#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
800#[repr(i32)]
801pub enum LifecycleSource {
802 SOURCE_UNSPECIFIED = 0i32,
803 SOURCE_RELAYER = 1i32,
805 SOURCE_POLYESTER_CHAIN = 2i32,
807 SOURCE_EXECUTOR = 3i32,
809 SOURCE_LEDGER = 4i32,
811}
812impl LifecycleSource {
813 #[allow(non_upper_case_globals)]
815 pub const SourceUnspecified: Self = Self::SOURCE_UNSPECIFIED;
816 #[allow(non_upper_case_globals)]
818 pub const SourceRelayer: Self = Self::SOURCE_RELAYER;
819 #[allow(non_upper_case_globals)]
821 pub const SourcePolyesterChain: Self = Self::SOURCE_POLYESTER_CHAIN;
822 #[allow(non_upper_case_globals)]
824 pub const SourceExecutor: Self = Self::SOURCE_EXECUTOR;
825 #[allow(non_upper_case_globals)]
827 pub const SourceLedger: Self = Self::SOURCE_LEDGER;
828}
829impl ::core::default::Default for LifecycleSource {
830 fn default() -> Self {
831 Self::SOURCE_UNSPECIFIED
832 }
833}
834impl ::serde::Serialize for LifecycleSource {
835 fn serialize<S: ::serde::Serializer>(
836 &self,
837 s: S,
838 ) -> ::core::result::Result<S::Ok, S::Error> {
839 s.serialize_str(::buffa::Enumeration::proto_name(self))
840 }
841}
842impl<'de> ::serde::Deserialize<'de> for LifecycleSource {
843 fn deserialize<D: ::serde::Deserializer<'de>>(
844 d: D,
845 ) -> ::core::result::Result<Self, D::Error> {
846 struct _V;
847 impl ::serde::de::Visitor<'_> for _V {
848 type Value = LifecycleSource;
849 fn expecting(
850 &self,
851 f: &mut ::core::fmt::Formatter<'_>,
852 ) -> ::core::fmt::Result {
853 f.write_str(
854 concat!(
855 "a string, integer, or null for ", stringify!(LifecycleSource)
856 ),
857 )
858 }
859 fn visit_str<E: ::serde::de::Error>(
860 self,
861 v: &str,
862 ) -> ::core::result::Result<LifecycleSource, E> {
863 <LifecycleSource as ::buffa::Enumeration>::from_proto_name(v)
864 .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
865 }
866 fn visit_i64<E: ::serde::de::Error>(
867 self,
868 v: i64,
869 ) -> ::core::result::Result<LifecycleSource, E> {
870 let v32 = i32::try_from(v)
871 .map_err(|_| {
872 ::serde::de::Error::custom(
873 ::buffa::alloc::format!("enum value {v} out of i32 range"),
874 )
875 })?;
876 <LifecycleSource as ::buffa::Enumeration>::from_i32(v32)
877 .ok_or_else(|| {
878 ::serde::de::Error::custom(
879 ::buffa::alloc::format!("unknown enum value {v32}"),
880 )
881 })
882 }
883 fn visit_u64<E: ::serde::de::Error>(
884 self,
885 v: u64,
886 ) -> ::core::result::Result<LifecycleSource, E> {
887 let v32 = i32::try_from(v)
888 .map_err(|_| {
889 ::serde::de::Error::custom(
890 ::buffa::alloc::format!("enum value {v} out of i32 range"),
891 )
892 })?;
893 <LifecycleSource as ::buffa::Enumeration>::from_i32(v32)
894 .ok_or_else(|| {
895 ::serde::de::Error::custom(
896 ::buffa::alloc::format!("unknown enum value {v32}"),
897 )
898 })
899 }
900 fn visit_unit<E: ::serde::de::Error>(
901 self,
902 ) -> ::core::result::Result<LifecycleSource, E> {
903 ::core::result::Result::Ok(::core::default::Default::default())
904 }
905 }
906 d.deserialize_any(_V)
907 }
908}
909impl ::buffa::json_helpers::ProtoElemJson for LifecycleSource {
910 fn serialize_proto_json<S: ::serde::Serializer>(
911 v: &Self,
912 s: S,
913 ) -> ::core::result::Result<S::Ok, S::Error> {
914 ::serde::Serialize::serialize(v, s)
915 }
916 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
917 d: D,
918 ) -> ::core::result::Result<Self, D::Error> {
919 <Self as ::serde::Deserialize>::deserialize(d)
920 }
921}
922impl ::buffa::Enumeration for LifecycleSource {
923 fn from_i32(value: i32) -> ::core::option::Option<Self> {
924 match value {
925 0i32 => ::core::option::Option::Some(Self::SOURCE_UNSPECIFIED),
926 1i32 => ::core::option::Option::Some(Self::SOURCE_RELAYER),
927 2i32 => ::core::option::Option::Some(Self::SOURCE_POLYESTER_CHAIN),
928 3i32 => ::core::option::Option::Some(Self::SOURCE_EXECUTOR),
929 4i32 => ::core::option::Option::Some(Self::SOURCE_LEDGER),
930 _ => ::core::option::Option::None,
931 }
932 }
933 fn to_i32(&self) -> i32 {
934 *self as i32
935 }
936 fn proto_name(&self) -> &'static str {
937 match self {
938 Self::SOURCE_UNSPECIFIED => "SOURCE_UNSPECIFIED",
939 Self::SOURCE_RELAYER => "SOURCE_RELAYER",
940 Self::SOURCE_POLYESTER_CHAIN => "SOURCE_POLYESTER_CHAIN",
941 Self::SOURCE_EXECUTOR => "SOURCE_EXECUTOR",
942 Self::SOURCE_LEDGER => "SOURCE_LEDGER",
943 }
944 }
945 fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
946 match name {
947 "SOURCE_UNSPECIFIED" => {
948 ::core::option::Option::Some(Self::SOURCE_UNSPECIFIED)
949 }
950 "SOURCE_RELAYER" => ::core::option::Option::Some(Self::SOURCE_RELAYER),
951 "SOURCE_POLYESTER_CHAIN" => {
952 ::core::option::Option::Some(Self::SOURCE_POLYESTER_CHAIN)
953 }
954 "SOURCE_EXECUTOR" => ::core::option::Option::Some(Self::SOURCE_EXECUTOR),
955 "SOURCE_LEDGER" => ::core::option::Option::Some(Self::SOURCE_LEDGER),
956 _ => ::core::option::Option::None,
957 }
958 }
959 fn values() -> &'static [Self] {
960 &[
961 Self::SOURCE_UNSPECIFIED,
962 Self::SOURCE_RELAYER,
963 Self::SOURCE_POLYESTER_CHAIN,
964 Self::SOURCE_EXECUTOR,
965 Self::SOURCE_LEDGER,
966 ]
967 }
968}
969#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
971#[repr(i32)]
972pub enum FlowState {
973 STATE_UNSPECIFIED = 0i32,
974 STATE_PENDING_SOURCE = 1i32,
976 STATE_PENDING_POLYESTER_CHAIN = 2i32,
978 STATE_PENDING_LEDGER = 3i32,
980 STATE_COMPLETED = 4i32,
982 STATE_FAILED = 5i32,
984 STATE_DROPPED = 6i32,
986 STATE_REFUNDED = 7i32,
988}
989impl FlowState {
990 #[allow(non_upper_case_globals)]
992 pub const StateUnspecified: Self = Self::STATE_UNSPECIFIED;
993 #[allow(non_upper_case_globals)]
995 pub const StatePendingSource: Self = Self::STATE_PENDING_SOURCE;
996 #[allow(non_upper_case_globals)]
998 pub const StatePendingPolyesterChain: Self = Self::STATE_PENDING_POLYESTER_CHAIN;
999 #[allow(non_upper_case_globals)]
1001 pub const StatePendingLedger: Self = Self::STATE_PENDING_LEDGER;
1002 #[allow(non_upper_case_globals)]
1004 pub const StateCompleted: Self = Self::STATE_COMPLETED;
1005 #[allow(non_upper_case_globals)]
1007 pub const StateFailed: Self = Self::STATE_FAILED;
1008 #[allow(non_upper_case_globals)]
1010 pub const StateDropped: Self = Self::STATE_DROPPED;
1011 #[allow(non_upper_case_globals)]
1013 pub const StateRefunded: Self = Self::STATE_REFUNDED;
1014}
1015impl ::core::default::Default for FlowState {
1016 fn default() -> Self {
1017 Self::STATE_UNSPECIFIED
1018 }
1019}
1020impl ::serde::Serialize for FlowState {
1021 fn serialize<S: ::serde::Serializer>(
1022 &self,
1023 s: S,
1024 ) -> ::core::result::Result<S::Ok, S::Error> {
1025 s.serialize_str(::buffa::Enumeration::proto_name(self))
1026 }
1027}
1028impl<'de> ::serde::Deserialize<'de> for FlowState {
1029 fn deserialize<D: ::serde::Deserializer<'de>>(
1030 d: D,
1031 ) -> ::core::result::Result<Self, D::Error> {
1032 struct _V;
1033 impl ::serde::de::Visitor<'_> for _V {
1034 type Value = FlowState;
1035 fn expecting(
1036 &self,
1037 f: &mut ::core::fmt::Formatter<'_>,
1038 ) -> ::core::fmt::Result {
1039 f.write_str(
1040 concat!("a string, integer, or null for ", stringify!(FlowState)),
1041 )
1042 }
1043 fn visit_str<E: ::serde::de::Error>(
1044 self,
1045 v: &str,
1046 ) -> ::core::result::Result<FlowState, E> {
1047 <FlowState as ::buffa::Enumeration>::from_proto_name(v)
1048 .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
1049 }
1050 fn visit_i64<E: ::serde::de::Error>(
1051 self,
1052 v: i64,
1053 ) -> ::core::result::Result<FlowState, E> {
1054 let v32 = i32::try_from(v)
1055 .map_err(|_| {
1056 ::serde::de::Error::custom(
1057 ::buffa::alloc::format!("enum value {v} out of i32 range"),
1058 )
1059 })?;
1060 <FlowState as ::buffa::Enumeration>::from_i32(v32)
1061 .ok_or_else(|| {
1062 ::serde::de::Error::custom(
1063 ::buffa::alloc::format!("unknown enum value {v32}"),
1064 )
1065 })
1066 }
1067 fn visit_u64<E: ::serde::de::Error>(
1068 self,
1069 v: u64,
1070 ) -> ::core::result::Result<FlowState, E> {
1071 let v32 = i32::try_from(v)
1072 .map_err(|_| {
1073 ::serde::de::Error::custom(
1074 ::buffa::alloc::format!("enum value {v} out of i32 range"),
1075 )
1076 })?;
1077 <FlowState as ::buffa::Enumeration>::from_i32(v32)
1078 .ok_or_else(|| {
1079 ::serde::de::Error::custom(
1080 ::buffa::alloc::format!("unknown enum value {v32}"),
1081 )
1082 })
1083 }
1084 fn visit_unit<E: ::serde::de::Error>(
1085 self,
1086 ) -> ::core::result::Result<FlowState, E> {
1087 ::core::result::Result::Ok(::core::default::Default::default())
1088 }
1089 }
1090 d.deserialize_any(_V)
1091 }
1092}
1093impl ::buffa::json_helpers::ProtoElemJson for FlowState {
1094 fn serialize_proto_json<S: ::serde::Serializer>(
1095 v: &Self,
1096 s: S,
1097 ) -> ::core::result::Result<S::Ok, S::Error> {
1098 ::serde::Serialize::serialize(v, s)
1099 }
1100 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1101 d: D,
1102 ) -> ::core::result::Result<Self, D::Error> {
1103 <Self as ::serde::Deserialize>::deserialize(d)
1104 }
1105}
1106impl ::buffa::Enumeration for FlowState {
1107 fn from_i32(value: i32) -> ::core::option::Option<Self> {
1108 match value {
1109 0i32 => ::core::option::Option::Some(Self::STATE_UNSPECIFIED),
1110 1i32 => ::core::option::Option::Some(Self::STATE_PENDING_SOURCE),
1111 2i32 => ::core::option::Option::Some(Self::STATE_PENDING_POLYESTER_CHAIN),
1112 3i32 => ::core::option::Option::Some(Self::STATE_PENDING_LEDGER),
1113 4i32 => ::core::option::Option::Some(Self::STATE_COMPLETED),
1114 5i32 => ::core::option::Option::Some(Self::STATE_FAILED),
1115 6i32 => ::core::option::Option::Some(Self::STATE_DROPPED),
1116 7i32 => ::core::option::Option::Some(Self::STATE_REFUNDED),
1117 _ => ::core::option::Option::None,
1118 }
1119 }
1120 fn to_i32(&self) -> i32 {
1121 *self as i32
1122 }
1123 fn proto_name(&self) -> &'static str {
1124 match self {
1125 Self::STATE_UNSPECIFIED => "STATE_UNSPECIFIED",
1126 Self::STATE_PENDING_SOURCE => "STATE_PENDING_SOURCE",
1127 Self::STATE_PENDING_POLYESTER_CHAIN => "STATE_PENDING_POLYESTER_CHAIN",
1128 Self::STATE_PENDING_LEDGER => "STATE_PENDING_LEDGER",
1129 Self::STATE_COMPLETED => "STATE_COMPLETED",
1130 Self::STATE_FAILED => "STATE_FAILED",
1131 Self::STATE_DROPPED => "STATE_DROPPED",
1132 Self::STATE_REFUNDED => "STATE_REFUNDED",
1133 }
1134 }
1135 fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
1136 match name {
1137 "STATE_UNSPECIFIED" => ::core::option::Option::Some(Self::STATE_UNSPECIFIED),
1138 "STATE_PENDING_SOURCE" => {
1139 ::core::option::Option::Some(Self::STATE_PENDING_SOURCE)
1140 }
1141 "STATE_PENDING_POLYESTER_CHAIN" => {
1142 ::core::option::Option::Some(Self::STATE_PENDING_POLYESTER_CHAIN)
1143 }
1144 "STATE_PENDING_LEDGER" => {
1145 ::core::option::Option::Some(Self::STATE_PENDING_LEDGER)
1146 }
1147 "STATE_COMPLETED" => ::core::option::Option::Some(Self::STATE_COMPLETED),
1148 "STATE_FAILED" => ::core::option::Option::Some(Self::STATE_FAILED),
1149 "STATE_DROPPED" => ::core::option::Option::Some(Self::STATE_DROPPED),
1150 "STATE_REFUNDED" => ::core::option::Option::Some(Self::STATE_REFUNDED),
1151 _ => ::core::option::Option::None,
1152 }
1153 }
1154 fn values() -> &'static [Self] {
1155 &[
1156 Self::STATE_UNSPECIFIED,
1157 Self::STATE_PENDING_SOURCE,
1158 Self::STATE_PENDING_POLYESTER_CHAIN,
1159 Self::STATE_PENDING_LEDGER,
1160 Self::STATE_COMPLETED,
1161 Self::STATE_FAILED,
1162 Self::STATE_DROPPED,
1163 Self::STATE_REFUNDED,
1164 ]
1165 }
1166}
1167#[derive(Clone, PartialEq, Default)]
1169#[derive(::serde::Serialize, ::serde::Deserialize)]
1170#[serde(default)]
1171pub struct AssetIds {
1172 #[serde(
1179 rename = "zippedAssetId",
1180 alias = "zipped_asset_id",
1181 with = "::buffa::json_helpers::uint32",
1182 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
1183 )]
1184 pub zipped_asset_id: u32,
1185 #[serde(
1192 rename = "unifiedAssetId",
1193 alias = "unified_asset_id",
1194 with = "::buffa::json_helpers::uint32",
1195 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
1196 )]
1197 pub unified_asset_id: u32,
1198 #[serde(skip)]
1199 #[doc(hidden)]
1200 pub __buffa_unknown_fields: ::buffa::UnknownFields,
1201}
1202impl ::core::fmt::Debug for AssetIds {
1203 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1204 f.debug_struct("AssetIds")
1205 .field("zipped_asset_id", &self.zipped_asset_id)
1206 .field("unified_asset_id", &self.unified_asset_id)
1207 .finish()
1208 }
1209}
1210impl AssetIds {
1211 pub const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.AssetIds";
1216}
1217::buffa::impl_default_instance!(AssetIds);
1218impl ::buffa::MessageName for AssetIds {
1219 const PACKAGE: &'static str = "chain.lifecycle.v1";
1220 const NAME: &'static str = "AssetIds";
1221 const FULL_NAME: &'static str = "chain.lifecycle.v1.AssetIds";
1222 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.AssetIds";
1223}
1224impl ::buffa::Message for AssetIds {
1225 #[allow(clippy::let_and_return)]
1231 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
1232 #[allow(unused_imports)]
1233 use ::buffa::Enumeration as _;
1234 let mut size = 0u32;
1235 if self.zipped_asset_id != 0u32 {
1236 size
1237 += 1u32
1238 + ::buffa::types::uint32_encoded_len(self.zipped_asset_id) as u32;
1239 }
1240 if self.unified_asset_id != 0u32 {
1241 size
1242 += 1u32
1243 + ::buffa::types::uint32_encoded_len(self.unified_asset_id) as u32;
1244 }
1245 size += self.__buffa_unknown_fields.encoded_len() as u32;
1246 size
1247 }
1248 fn write_to(
1249 &self,
1250 _cache: &mut ::buffa::SizeCache,
1251 buf: &mut impl ::buffa::bytes::BufMut,
1252 ) {
1253 #[allow(unused_imports)]
1254 use ::buffa::Enumeration as _;
1255 if self.zipped_asset_id != 0u32 {
1256 ::buffa::types::put_uint32_field(1u32, self.zipped_asset_id, buf);
1257 }
1258 if self.unified_asset_id != 0u32 {
1259 ::buffa::types::put_uint32_field(3u32, self.unified_asset_id, buf);
1260 }
1261 self.__buffa_unknown_fields.write_to(buf);
1262 }
1263 fn merge_field(
1264 &mut self,
1265 tag: ::buffa::encoding::Tag,
1266 buf: &mut impl ::buffa::bytes::Buf,
1267 ctx: ::buffa::DecodeContext<'_>,
1268 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1269 #[allow(unused_imports)]
1270 use ::buffa::bytes::Buf as _;
1271 #[allow(unused_imports)]
1272 use ::buffa::Enumeration as _;
1273 match tag.field_number() {
1274 1u32 => {
1275 ::buffa::encoding::check_wire_type(
1276 tag,
1277 ::buffa::encoding::WireType::Varint,
1278 )?;
1279 self.zipped_asset_id = ::buffa::types::decode_uint32(buf)?;
1280 }
1281 3u32 => {
1282 ::buffa::encoding::check_wire_type(
1283 tag,
1284 ::buffa::encoding::WireType::Varint,
1285 )?;
1286 self.unified_asset_id = ::buffa::types::decode_uint32(buf)?;
1287 }
1288 _ => {
1289 self.__buffa_unknown_fields
1290 .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
1291 }
1292 }
1293 ::core::result::Result::Ok(())
1294 }
1295 fn clear(&mut self) {
1296 self.zipped_asset_id = 0u32;
1297 self.unified_asset_id = 0u32;
1298 self.__buffa_unknown_fields.clear();
1299 }
1300}
1301impl ::buffa::ExtensionSet for AssetIds {
1302 const PROTO_FQN: &'static str = "chain.lifecycle.v1.AssetIds";
1303 fn unknown_fields(&self) -> &::buffa::UnknownFields {
1304 &self.__buffa_unknown_fields
1305 }
1306 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1307 &mut self.__buffa_unknown_fields
1308 }
1309}
1310impl ::buffa::json_helpers::ProtoElemJson for AssetIds {
1311 fn serialize_proto_json<S: ::serde::Serializer>(
1312 v: &Self,
1313 s: S,
1314 ) -> ::core::result::Result<S::Ok, S::Error> {
1315 ::serde::Serialize::serialize(v, s)
1316 }
1317 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1318 d: D,
1319 ) -> ::core::result::Result<Self, D::Error> {
1320 <Self as ::serde::Deserialize>::deserialize(d)
1321 }
1322}
1323#[doc(hidden)]
1324pub const __ASSET_IDS_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
1325 type_url: "type.googleapis.com/chain.lifecycle.v1.AssetIds",
1326 to_json: ::buffa::type_registry::any_to_json::<AssetIds>,
1327 from_json: ::buffa::type_registry::any_from_json::<AssetIds>,
1328 is_wkt: false,
1329};
1330#[derive(Clone, PartialEq, Default)]
1334#[derive(::serde::Serialize, ::serde::Deserialize)]
1335#[serde(default)]
1336pub struct RequestFee {
1337 #[serde(
1341 rename = "assetIds",
1342 alias = "asset_ids",
1343 skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
1344 )]
1345 pub asset_ids: ::buffa::MessageField<AssetIds>,
1346 #[serde(
1351 rename = "amountE18",
1352 alias = "amount_e18",
1353 skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
1354 )]
1355 pub amount_e18: ::buffa::MessageField<
1356 super::super::super::polyester::r#type::v1::U128,
1357 >,
1358 #[serde(
1362 rename = "recipientAddress",
1363 alias = "recipient_address",
1364 with = "::buffa::json_helpers::proto_string",
1365 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1366 )]
1367 pub recipient_address: ::buffa::alloc::string::String,
1368 #[serde(
1372 rename = "status",
1373 with = "::buffa::json_helpers::proto_enum",
1374 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
1375 )]
1376 pub status: ::buffa::EnumValue<RequestFeeStatus>,
1377 #[serde(skip)]
1378 #[doc(hidden)]
1379 pub __buffa_unknown_fields: ::buffa::UnknownFields,
1380}
1381impl ::core::fmt::Debug for RequestFee {
1382 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1383 f.debug_struct("RequestFee")
1384 .field("asset_ids", &self.asset_ids)
1385 .field("amount_e18", &self.amount_e18)
1386 .field("recipient_address", &self.recipient_address)
1387 .field("status", &self.status)
1388 .finish()
1389 }
1390}
1391impl RequestFee {
1392 pub const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.RequestFee";
1397}
1398::buffa::impl_default_instance!(RequestFee);
1399impl ::buffa::MessageName for RequestFee {
1400 const PACKAGE: &'static str = "chain.lifecycle.v1";
1401 const NAME: &'static str = "RequestFee";
1402 const FULL_NAME: &'static str = "chain.lifecycle.v1.RequestFee";
1403 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.RequestFee";
1404}
1405impl ::buffa::Message for RequestFee {
1406 #[allow(clippy::let_and_return)]
1412 fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
1413 #[allow(unused_imports)]
1414 use ::buffa::Enumeration as _;
1415 let mut size = 0u32;
1416 if self.asset_ids.is_set() {
1417 let __slot = __cache.reserve();
1418 let inner_size = self.asset_ids.compute_size(__cache);
1419 __cache.set(__slot, inner_size);
1420 size
1421 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
1422 + inner_size;
1423 }
1424 if self.amount_e18.is_set() {
1425 let __slot = __cache.reserve();
1426 let inner_size = self.amount_e18.compute_size(__cache);
1427 __cache.set(__slot, inner_size);
1428 size
1429 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
1430 + inner_size;
1431 }
1432 if !self.recipient_address.is_empty() {
1433 size
1434 += 1u32
1435 + ::buffa::types::string_encoded_len(&self.recipient_address) as u32;
1436 }
1437 {
1438 let val = self.status.to_i32();
1439 if val != 0 {
1440 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
1441 }
1442 }
1443 size += self.__buffa_unknown_fields.encoded_len() as u32;
1444 size
1445 }
1446 fn write_to(
1447 &self,
1448 __cache: &mut ::buffa::SizeCache,
1449 buf: &mut impl ::buffa::bytes::BufMut,
1450 ) {
1451 #[allow(unused_imports)]
1452 use ::buffa::Enumeration as _;
1453 if self.asset_ids.is_set() {
1454 ::buffa::types::put_len_delimited_header(1u32, __cache.consume_next(), buf);
1455 self.asset_ids.write_to(__cache, buf);
1456 }
1457 if self.amount_e18.is_set() {
1458 ::buffa::types::put_len_delimited_header(2u32, __cache.consume_next(), buf);
1459 self.amount_e18.write_to(__cache, buf);
1460 }
1461 if !self.recipient_address.is_empty() {
1462 ::buffa::types::put_string_field(3u32, &self.recipient_address, buf);
1463 }
1464 {
1465 let val = self.status.to_i32();
1466 if val != 0 {
1467 ::buffa::types::put_int32_field(4u32, val, buf);
1468 }
1469 }
1470 self.__buffa_unknown_fields.write_to(buf);
1471 }
1472 fn merge_field(
1473 &mut self,
1474 tag: ::buffa::encoding::Tag,
1475 buf: &mut impl ::buffa::bytes::Buf,
1476 ctx: ::buffa::DecodeContext<'_>,
1477 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1478 #[allow(unused_imports)]
1479 use ::buffa::bytes::Buf as _;
1480 #[allow(unused_imports)]
1481 use ::buffa::Enumeration as _;
1482 match tag.field_number() {
1483 1u32 => {
1484 ::buffa::encoding::check_wire_type(
1485 tag,
1486 ::buffa::encoding::WireType::LengthDelimited,
1487 )?;
1488 ::buffa::Message::merge_length_delimited(
1489 self.asset_ids.get_or_insert_default(),
1490 buf,
1491 ctx,
1492 )?;
1493 }
1494 2u32 => {
1495 ::buffa::encoding::check_wire_type(
1496 tag,
1497 ::buffa::encoding::WireType::LengthDelimited,
1498 )?;
1499 ::buffa::Message::merge_length_delimited(
1500 self.amount_e18.get_or_insert_default(),
1501 buf,
1502 ctx,
1503 )?;
1504 }
1505 3u32 => {
1506 ::buffa::encoding::check_wire_type(
1507 tag,
1508 ::buffa::encoding::WireType::LengthDelimited,
1509 )?;
1510 ::buffa::types::merge_string(&mut self.recipient_address, buf)?;
1511 }
1512 4u32 => {
1513 ::buffa::encoding::check_wire_type(
1514 tag,
1515 ::buffa::encoding::WireType::Varint,
1516 )?;
1517 self.status = ::buffa::EnumValue::from(
1518 ::buffa::types::decode_int32(buf)?,
1519 );
1520 }
1521 _ => {
1522 self.__buffa_unknown_fields
1523 .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
1524 }
1525 }
1526 ::core::result::Result::Ok(())
1527 }
1528 fn clear(&mut self) {
1529 self.asset_ids = ::buffa::MessageField::none();
1530 self.amount_e18 = ::buffa::MessageField::none();
1531 self.recipient_address.clear();
1532 self.status = ::buffa::EnumValue::from(0);
1533 self.__buffa_unknown_fields.clear();
1534 }
1535}
1536impl ::buffa::ExtensionSet for RequestFee {
1537 const PROTO_FQN: &'static str = "chain.lifecycle.v1.RequestFee";
1538 fn unknown_fields(&self) -> &::buffa::UnknownFields {
1539 &self.__buffa_unknown_fields
1540 }
1541 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1542 &mut self.__buffa_unknown_fields
1543 }
1544}
1545impl ::buffa::json_helpers::ProtoElemJson for RequestFee {
1546 fn serialize_proto_json<S: ::serde::Serializer>(
1547 v: &Self,
1548 s: S,
1549 ) -> ::core::result::Result<S::Ok, S::Error> {
1550 ::serde::Serialize::serialize(v, s)
1551 }
1552 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1553 d: D,
1554 ) -> ::core::result::Result<Self, D::Error> {
1555 <Self as ::serde::Deserialize>::deserialize(d)
1556 }
1557}
1558#[doc(hidden)]
1559pub const __REQUEST_FEE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
1560 type_url: "type.googleapis.com/chain.lifecycle.v1.RequestFee",
1561 to_json: ::buffa::type_registry::any_to_json::<RequestFee>,
1562 from_json: ::buffa::type_registry::any_from_json::<RequestFee>,
1563 is_wkt: false,
1564};
1565#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
1567#[repr(i32)]
1568pub enum TxLookupKind {
1569 TX_UNSPECIFIED = 0i32,
1571 TX_SOURCE = 1i32,
1573 TX_ANY = 2i32,
1576}
1577impl TxLookupKind {
1578 #[allow(non_upper_case_globals)]
1580 pub const TxUnspecified: Self = Self::TX_UNSPECIFIED;
1581 #[allow(non_upper_case_globals)]
1583 pub const TxSource: Self = Self::TX_SOURCE;
1584 #[allow(non_upper_case_globals)]
1586 pub const TxAny: Self = Self::TX_ANY;
1587}
1588impl ::core::default::Default for TxLookupKind {
1589 fn default() -> Self {
1590 Self::TX_UNSPECIFIED
1591 }
1592}
1593impl ::serde::Serialize for TxLookupKind {
1594 fn serialize<S: ::serde::Serializer>(
1595 &self,
1596 s: S,
1597 ) -> ::core::result::Result<S::Ok, S::Error> {
1598 s.serialize_str(::buffa::Enumeration::proto_name(self))
1599 }
1600}
1601impl<'de> ::serde::Deserialize<'de> for TxLookupKind {
1602 fn deserialize<D: ::serde::Deserializer<'de>>(
1603 d: D,
1604 ) -> ::core::result::Result<Self, D::Error> {
1605 struct _V;
1606 impl ::serde::de::Visitor<'_> for _V {
1607 type Value = TxLookupKind;
1608 fn expecting(
1609 &self,
1610 f: &mut ::core::fmt::Formatter<'_>,
1611 ) -> ::core::fmt::Result {
1612 f.write_str(
1613 concat!("a string, integer, or null for ", stringify!(TxLookupKind)),
1614 )
1615 }
1616 fn visit_str<E: ::serde::de::Error>(
1617 self,
1618 v: &str,
1619 ) -> ::core::result::Result<TxLookupKind, E> {
1620 <TxLookupKind as ::buffa::Enumeration>::from_proto_name(v)
1621 .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
1622 }
1623 fn visit_i64<E: ::serde::de::Error>(
1624 self,
1625 v: i64,
1626 ) -> ::core::result::Result<TxLookupKind, E> {
1627 let v32 = i32::try_from(v)
1628 .map_err(|_| {
1629 ::serde::de::Error::custom(
1630 ::buffa::alloc::format!("enum value {v} out of i32 range"),
1631 )
1632 })?;
1633 <TxLookupKind as ::buffa::Enumeration>::from_i32(v32)
1634 .ok_or_else(|| {
1635 ::serde::de::Error::custom(
1636 ::buffa::alloc::format!("unknown enum value {v32}"),
1637 )
1638 })
1639 }
1640 fn visit_u64<E: ::serde::de::Error>(
1641 self,
1642 v: u64,
1643 ) -> ::core::result::Result<TxLookupKind, E> {
1644 let v32 = i32::try_from(v)
1645 .map_err(|_| {
1646 ::serde::de::Error::custom(
1647 ::buffa::alloc::format!("enum value {v} out of i32 range"),
1648 )
1649 })?;
1650 <TxLookupKind as ::buffa::Enumeration>::from_i32(v32)
1651 .ok_or_else(|| {
1652 ::serde::de::Error::custom(
1653 ::buffa::alloc::format!("unknown enum value {v32}"),
1654 )
1655 })
1656 }
1657 fn visit_unit<E: ::serde::de::Error>(
1658 self,
1659 ) -> ::core::result::Result<TxLookupKind, E> {
1660 ::core::result::Result::Ok(::core::default::Default::default())
1661 }
1662 }
1663 d.deserialize_any(_V)
1664 }
1665}
1666impl ::buffa::json_helpers::ProtoElemJson for TxLookupKind {
1667 fn serialize_proto_json<S: ::serde::Serializer>(
1668 v: &Self,
1669 s: S,
1670 ) -> ::core::result::Result<S::Ok, S::Error> {
1671 ::serde::Serialize::serialize(v, s)
1672 }
1673 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1674 d: D,
1675 ) -> ::core::result::Result<Self, D::Error> {
1676 <Self as ::serde::Deserialize>::deserialize(d)
1677 }
1678}
1679impl ::buffa::Enumeration for TxLookupKind {
1680 fn from_i32(value: i32) -> ::core::option::Option<Self> {
1681 match value {
1682 0i32 => ::core::option::Option::Some(Self::TX_UNSPECIFIED),
1683 1i32 => ::core::option::Option::Some(Self::TX_SOURCE),
1684 2i32 => ::core::option::Option::Some(Self::TX_ANY),
1685 _ => ::core::option::Option::None,
1686 }
1687 }
1688 fn to_i32(&self) -> i32 {
1689 *self as i32
1690 }
1691 fn proto_name(&self) -> &'static str {
1692 match self {
1693 Self::TX_UNSPECIFIED => "TX_UNSPECIFIED",
1694 Self::TX_SOURCE => "TX_SOURCE",
1695 Self::TX_ANY => "TX_ANY",
1696 }
1697 }
1698 fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
1699 match name {
1700 "TX_UNSPECIFIED" => ::core::option::Option::Some(Self::TX_UNSPECIFIED),
1701 "TX_SOURCE" => ::core::option::Option::Some(Self::TX_SOURCE),
1702 "TX_ANY" => ::core::option::Option::Some(Self::TX_ANY),
1703 _ => ::core::option::Option::None,
1704 }
1705 }
1706 fn values() -> &'static [Self] {
1707 &[Self::TX_UNSPECIFIED, Self::TX_SOURCE, Self::TX_ANY]
1708 }
1709}
1710#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
1712#[repr(i32)]
1713pub enum ListScope {
1714 LIST_UNSPECIFIED = 0i32,
1716 LIST_ALL = 1i32,
1718 LIST_OPEN_ONLY = 2i32,
1720 LIST_TERMINAL_ONLY = 3i32,
1722}
1723impl ListScope {
1724 #[allow(non_upper_case_globals)]
1726 pub const ListUnspecified: Self = Self::LIST_UNSPECIFIED;
1727 #[allow(non_upper_case_globals)]
1729 pub const ListAll: Self = Self::LIST_ALL;
1730 #[allow(non_upper_case_globals)]
1732 pub const ListOpenOnly: Self = Self::LIST_OPEN_ONLY;
1733 #[allow(non_upper_case_globals)]
1735 pub const ListTerminalOnly: Self = Self::LIST_TERMINAL_ONLY;
1736}
1737impl ::core::default::Default for ListScope {
1738 fn default() -> Self {
1739 Self::LIST_UNSPECIFIED
1740 }
1741}
1742impl ::serde::Serialize for ListScope {
1743 fn serialize<S: ::serde::Serializer>(
1744 &self,
1745 s: S,
1746 ) -> ::core::result::Result<S::Ok, S::Error> {
1747 s.serialize_str(::buffa::Enumeration::proto_name(self))
1748 }
1749}
1750impl<'de> ::serde::Deserialize<'de> for ListScope {
1751 fn deserialize<D: ::serde::Deserializer<'de>>(
1752 d: D,
1753 ) -> ::core::result::Result<Self, D::Error> {
1754 struct _V;
1755 impl ::serde::de::Visitor<'_> for _V {
1756 type Value = ListScope;
1757 fn expecting(
1758 &self,
1759 f: &mut ::core::fmt::Formatter<'_>,
1760 ) -> ::core::fmt::Result {
1761 f.write_str(
1762 concat!("a string, integer, or null for ", stringify!(ListScope)),
1763 )
1764 }
1765 fn visit_str<E: ::serde::de::Error>(
1766 self,
1767 v: &str,
1768 ) -> ::core::result::Result<ListScope, E> {
1769 <ListScope as ::buffa::Enumeration>::from_proto_name(v)
1770 .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
1771 }
1772 fn visit_i64<E: ::serde::de::Error>(
1773 self,
1774 v: i64,
1775 ) -> ::core::result::Result<ListScope, E> {
1776 let v32 = i32::try_from(v)
1777 .map_err(|_| {
1778 ::serde::de::Error::custom(
1779 ::buffa::alloc::format!("enum value {v} out of i32 range"),
1780 )
1781 })?;
1782 <ListScope as ::buffa::Enumeration>::from_i32(v32)
1783 .ok_or_else(|| {
1784 ::serde::de::Error::custom(
1785 ::buffa::alloc::format!("unknown enum value {v32}"),
1786 )
1787 })
1788 }
1789 fn visit_u64<E: ::serde::de::Error>(
1790 self,
1791 v: u64,
1792 ) -> ::core::result::Result<ListScope, E> {
1793 let v32 = i32::try_from(v)
1794 .map_err(|_| {
1795 ::serde::de::Error::custom(
1796 ::buffa::alloc::format!("enum value {v} out of i32 range"),
1797 )
1798 })?;
1799 <ListScope as ::buffa::Enumeration>::from_i32(v32)
1800 .ok_or_else(|| {
1801 ::serde::de::Error::custom(
1802 ::buffa::alloc::format!("unknown enum value {v32}"),
1803 )
1804 })
1805 }
1806 fn visit_unit<E: ::serde::de::Error>(
1807 self,
1808 ) -> ::core::result::Result<ListScope, E> {
1809 ::core::result::Result::Ok(::core::default::Default::default())
1810 }
1811 }
1812 d.deserialize_any(_V)
1813 }
1814}
1815impl ::buffa::json_helpers::ProtoElemJson for ListScope {
1816 fn serialize_proto_json<S: ::serde::Serializer>(
1817 v: &Self,
1818 s: S,
1819 ) -> ::core::result::Result<S::Ok, S::Error> {
1820 ::serde::Serialize::serialize(v, s)
1821 }
1822 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1823 d: D,
1824 ) -> ::core::result::Result<Self, D::Error> {
1825 <Self as ::serde::Deserialize>::deserialize(d)
1826 }
1827}
1828impl ::buffa::Enumeration for ListScope {
1829 fn from_i32(value: i32) -> ::core::option::Option<Self> {
1830 match value {
1831 0i32 => ::core::option::Option::Some(Self::LIST_UNSPECIFIED),
1832 1i32 => ::core::option::Option::Some(Self::LIST_ALL),
1833 2i32 => ::core::option::Option::Some(Self::LIST_OPEN_ONLY),
1834 3i32 => ::core::option::Option::Some(Self::LIST_TERMINAL_ONLY),
1835 _ => ::core::option::Option::None,
1836 }
1837 }
1838 fn to_i32(&self) -> i32 {
1839 *self as i32
1840 }
1841 fn proto_name(&self) -> &'static str {
1842 match self {
1843 Self::LIST_UNSPECIFIED => "LIST_UNSPECIFIED",
1844 Self::LIST_ALL => "LIST_ALL",
1845 Self::LIST_OPEN_ONLY => "LIST_OPEN_ONLY",
1846 Self::LIST_TERMINAL_ONLY => "LIST_TERMINAL_ONLY",
1847 }
1848 }
1849 fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
1850 match name {
1851 "LIST_UNSPECIFIED" => ::core::option::Option::Some(Self::LIST_UNSPECIFIED),
1852 "LIST_ALL" => ::core::option::Option::Some(Self::LIST_ALL),
1853 "LIST_OPEN_ONLY" => ::core::option::Option::Some(Self::LIST_OPEN_ONLY),
1854 "LIST_TERMINAL_ONLY" => {
1855 ::core::option::Option::Some(Self::LIST_TERMINAL_ONLY)
1856 }
1857 _ => ::core::option::Option::None,
1858 }
1859 }
1860 fn values() -> &'static [Self] {
1861 &[
1862 Self::LIST_UNSPECIFIED,
1863 Self::LIST_ALL,
1864 Self::LIST_OPEN_ONLY,
1865 Self::LIST_TERMINAL_ONLY,
1866 ]
1867 }
1868}
1869#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
1871#[repr(i32)]
1872pub enum Sort {
1873 SORT_UNSPECIFIED = 0i32,
1875 SORT_NEWEST = 1i32,
1877 SORT_OLDEST = 2i32,
1879}
1880impl Sort {
1881 #[allow(non_upper_case_globals)]
1883 pub const Unspecified: Self = Self::SORT_UNSPECIFIED;
1884 #[allow(non_upper_case_globals)]
1886 pub const Newest: Self = Self::SORT_NEWEST;
1887 #[allow(non_upper_case_globals)]
1889 pub const Oldest: Self = Self::SORT_OLDEST;
1890}
1891impl ::core::default::Default for Sort {
1892 fn default() -> Self {
1893 Self::SORT_UNSPECIFIED
1894 }
1895}
1896impl ::serde::Serialize for Sort {
1897 fn serialize<S: ::serde::Serializer>(
1898 &self,
1899 s: S,
1900 ) -> ::core::result::Result<S::Ok, S::Error> {
1901 s.serialize_str(::buffa::Enumeration::proto_name(self))
1902 }
1903}
1904impl<'de> ::serde::Deserialize<'de> for Sort {
1905 fn deserialize<D: ::serde::Deserializer<'de>>(
1906 d: D,
1907 ) -> ::core::result::Result<Self, D::Error> {
1908 struct _V;
1909 impl ::serde::de::Visitor<'_> for _V {
1910 type Value = Sort;
1911 fn expecting(
1912 &self,
1913 f: &mut ::core::fmt::Formatter<'_>,
1914 ) -> ::core::fmt::Result {
1915 f.write_str(concat!("a string, integer, or null for ", stringify!(Sort)))
1916 }
1917 fn visit_str<E: ::serde::de::Error>(
1918 self,
1919 v: &str,
1920 ) -> ::core::result::Result<Sort, E> {
1921 <Sort as ::buffa::Enumeration>::from_proto_name(v)
1922 .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
1923 }
1924 fn visit_i64<E: ::serde::de::Error>(
1925 self,
1926 v: i64,
1927 ) -> ::core::result::Result<Sort, E> {
1928 let v32 = i32::try_from(v)
1929 .map_err(|_| {
1930 ::serde::de::Error::custom(
1931 ::buffa::alloc::format!("enum value {v} out of i32 range"),
1932 )
1933 })?;
1934 <Sort as ::buffa::Enumeration>::from_i32(v32)
1935 .ok_or_else(|| {
1936 ::serde::de::Error::custom(
1937 ::buffa::alloc::format!("unknown enum value {v32}"),
1938 )
1939 })
1940 }
1941 fn visit_u64<E: ::serde::de::Error>(
1942 self,
1943 v: u64,
1944 ) -> ::core::result::Result<Sort, E> {
1945 let v32 = i32::try_from(v)
1946 .map_err(|_| {
1947 ::serde::de::Error::custom(
1948 ::buffa::alloc::format!("enum value {v} out of i32 range"),
1949 )
1950 })?;
1951 <Sort as ::buffa::Enumeration>::from_i32(v32)
1952 .ok_or_else(|| {
1953 ::serde::de::Error::custom(
1954 ::buffa::alloc::format!("unknown enum value {v32}"),
1955 )
1956 })
1957 }
1958 fn visit_unit<E: ::serde::de::Error>(
1959 self,
1960 ) -> ::core::result::Result<Sort, E> {
1961 ::core::result::Result::Ok(::core::default::Default::default())
1962 }
1963 }
1964 d.deserialize_any(_V)
1965 }
1966}
1967impl ::buffa::json_helpers::ProtoElemJson for Sort {
1968 fn serialize_proto_json<S: ::serde::Serializer>(
1969 v: &Self,
1970 s: S,
1971 ) -> ::core::result::Result<S::Ok, S::Error> {
1972 ::serde::Serialize::serialize(v, s)
1973 }
1974 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1975 d: D,
1976 ) -> ::core::result::Result<Self, D::Error> {
1977 <Self as ::serde::Deserialize>::deserialize(d)
1978 }
1979}
1980impl ::buffa::Enumeration for Sort {
1981 fn from_i32(value: i32) -> ::core::option::Option<Self> {
1982 match value {
1983 0i32 => ::core::option::Option::Some(Self::SORT_UNSPECIFIED),
1984 1i32 => ::core::option::Option::Some(Self::SORT_NEWEST),
1985 2i32 => ::core::option::Option::Some(Self::SORT_OLDEST),
1986 _ => ::core::option::Option::None,
1987 }
1988 }
1989 fn to_i32(&self) -> i32 {
1990 *self as i32
1991 }
1992 fn proto_name(&self) -> &'static str {
1993 match self {
1994 Self::SORT_UNSPECIFIED => "SORT_UNSPECIFIED",
1995 Self::SORT_NEWEST => "SORT_NEWEST",
1996 Self::SORT_OLDEST => "SORT_OLDEST",
1997 }
1998 }
1999 fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
2000 match name {
2001 "SORT_UNSPECIFIED" => ::core::option::Option::Some(Self::SORT_UNSPECIFIED),
2002 "SORT_NEWEST" => ::core::option::Option::Some(Self::SORT_NEWEST),
2003 "SORT_OLDEST" => ::core::option::Option::Some(Self::SORT_OLDEST),
2004 _ => ::core::option::Option::None,
2005 }
2006 }
2007 fn values() -> &'static [Self] {
2008 &[Self::SORT_UNSPECIFIED, Self::SORT_NEWEST, Self::SORT_OLDEST]
2009 }
2010}
2011#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
2013#[repr(i32)]
2014pub enum ListOrderBy {
2015 ORDER_BY_UNSPECIFIED = 0i32,
2017 ORDER_BY_LAST_ACTIVITY = 1i32,
2019 ORDER_BY_STARTED_AT = 2i32,
2022}
2023impl ListOrderBy {
2024 #[allow(non_upper_case_globals)]
2026 pub const OrderByUnspecified: Self = Self::ORDER_BY_UNSPECIFIED;
2027 #[allow(non_upper_case_globals)]
2029 pub const OrderByLastActivity: Self = Self::ORDER_BY_LAST_ACTIVITY;
2030 #[allow(non_upper_case_globals)]
2032 pub const OrderByStartedAt: Self = Self::ORDER_BY_STARTED_AT;
2033}
2034impl ::core::default::Default for ListOrderBy {
2035 fn default() -> Self {
2036 Self::ORDER_BY_UNSPECIFIED
2037 }
2038}
2039impl ::serde::Serialize for ListOrderBy {
2040 fn serialize<S: ::serde::Serializer>(
2041 &self,
2042 s: S,
2043 ) -> ::core::result::Result<S::Ok, S::Error> {
2044 s.serialize_str(::buffa::Enumeration::proto_name(self))
2045 }
2046}
2047impl<'de> ::serde::Deserialize<'de> for ListOrderBy {
2048 fn deserialize<D: ::serde::Deserializer<'de>>(
2049 d: D,
2050 ) -> ::core::result::Result<Self, D::Error> {
2051 struct _V;
2052 impl ::serde::de::Visitor<'_> for _V {
2053 type Value = ListOrderBy;
2054 fn expecting(
2055 &self,
2056 f: &mut ::core::fmt::Formatter<'_>,
2057 ) -> ::core::fmt::Result {
2058 f.write_str(
2059 concat!("a string, integer, or null for ", stringify!(ListOrderBy)),
2060 )
2061 }
2062 fn visit_str<E: ::serde::de::Error>(
2063 self,
2064 v: &str,
2065 ) -> ::core::result::Result<ListOrderBy, E> {
2066 <ListOrderBy as ::buffa::Enumeration>::from_proto_name(v)
2067 .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
2068 }
2069 fn visit_i64<E: ::serde::de::Error>(
2070 self,
2071 v: i64,
2072 ) -> ::core::result::Result<ListOrderBy, E> {
2073 let v32 = i32::try_from(v)
2074 .map_err(|_| {
2075 ::serde::de::Error::custom(
2076 ::buffa::alloc::format!("enum value {v} out of i32 range"),
2077 )
2078 })?;
2079 <ListOrderBy as ::buffa::Enumeration>::from_i32(v32)
2080 .ok_or_else(|| {
2081 ::serde::de::Error::custom(
2082 ::buffa::alloc::format!("unknown enum value {v32}"),
2083 )
2084 })
2085 }
2086 fn visit_u64<E: ::serde::de::Error>(
2087 self,
2088 v: u64,
2089 ) -> ::core::result::Result<ListOrderBy, E> {
2090 let v32 = i32::try_from(v)
2091 .map_err(|_| {
2092 ::serde::de::Error::custom(
2093 ::buffa::alloc::format!("enum value {v} out of i32 range"),
2094 )
2095 })?;
2096 <ListOrderBy as ::buffa::Enumeration>::from_i32(v32)
2097 .ok_or_else(|| {
2098 ::serde::de::Error::custom(
2099 ::buffa::alloc::format!("unknown enum value {v32}"),
2100 )
2101 })
2102 }
2103 fn visit_unit<E: ::serde::de::Error>(
2104 self,
2105 ) -> ::core::result::Result<ListOrderBy, E> {
2106 ::core::result::Result::Ok(::core::default::Default::default())
2107 }
2108 }
2109 d.deserialize_any(_V)
2110 }
2111}
2112impl ::buffa::json_helpers::ProtoElemJson for ListOrderBy {
2113 fn serialize_proto_json<S: ::serde::Serializer>(
2114 v: &Self,
2115 s: S,
2116 ) -> ::core::result::Result<S::Ok, S::Error> {
2117 ::serde::Serialize::serialize(v, s)
2118 }
2119 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2120 d: D,
2121 ) -> ::core::result::Result<Self, D::Error> {
2122 <Self as ::serde::Deserialize>::deserialize(d)
2123 }
2124}
2125impl ::buffa::Enumeration for ListOrderBy {
2126 fn from_i32(value: i32) -> ::core::option::Option<Self> {
2127 match value {
2128 0i32 => ::core::option::Option::Some(Self::ORDER_BY_UNSPECIFIED),
2129 1i32 => ::core::option::Option::Some(Self::ORDER_BY_LAST_ACTIVITY),
2130 2i32 => ::core::option::Option::Some(Self::ORDER_BY_STARTED_AT),
2131 _ => ::core::option::Option::None,
2132 }
2133 }
2134 fn to_i32(&self) -> i32 {
2135 *self as i32
2136 }
2137 fn proto_name(&self) -> &'static str {
2138 match self {
2139 Self::ORDER_BY_UNSPECIFIED => "ORDER_BY_UNSPECIFIED",
2140 Self::ORDER_BY_LAST_ACTIVITY => "ORDER_BY_LAST_ACTIVITY",
2141 Self::ORDER_BY_STARTED_AT => "ORDER_BY_STARTED_AT",
2142 }
2143 }
2144 fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
2145 match name {
2146 "ORDER_BY_UNSPECIFIED" => {
2147 ::core::option::Option::Some(Self::ORDER_BY_UNSPECIFIED)
2148 }
2149 "ORDER_BY_LAST_ACTIVITY" => {
2150 ::core::option::Option::Some(Self::ORDER_BY_LAST_ACTIVITY)
2151 }
2152 "ORDER_BY_STARTED_AT" => {
2153 ::core::option::Option::Some(Self::ORDER_BY_STARTED_AT)
2154 }
2155 _ => ::core::option::Option::None,
2156 }
2157 }
2158 fn values() -> &'static [Self] {
2159 &[
2160 Self::ORDER_BY_UNSPECIFIED,
2161 Self::ORDER_BY_LAST_ACTIVITY,
2162 Self::ORDER_BY_STARTED_AT,
2163 ]
2164 }
2165}
2166#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
2170#[repr(i32)]
2171pub enum FlowStep {
2172 FLOW_STEP_UNSPECIFIED = 0i32,
2174 FLOW_STEP_SOURCE = 1i32,
2176 FLOW_STEP_TRANSFER = 2i32,
2178 FLOW_STEP_REQUEST = 3i32,
2180 FLOW_STEP_VALIDATION = 4i32,
2182 FLOW_STEP_EXECUTION = 5i32,
2184 FLOW_STEP_BRIDGE_FULFILLMENT = 6i32,
2186 FLOW_STEP_DROPPED = 7i32,
2188 FLOW_STEP_FAILED = 8i32,
2190 FLOW_STEP_REFUNDED = 9i32,
2192 FLOW_STEP_FULFILLING = 10i32,
2195 FLOW_STEP_SETTLEMENT = 11i32,
2197}
2198impl FlowStep {
2199 #[allow(non_upper_case_globals)]
2201 pub const Unspecified: Self = Self::FLOW_STEP_UNSPECIFIED;
2202 #[allow(non_upper_case_globals)]
2204 pub const Source: Self = Self::FLOW_STEP_SOURCE;
2205 #[allow(non_upper_case_globals)]
2207 pub const Transfer: Self = Self::FLOW_STEP_TRANSFER;
2208 #[allow(non_upper_case_globals)]
2210 pub const Request: Self = Self::FLOW_STEP_REQUEST;
2211 #[allow(non_upper_case_globals)]
2213 pub const Validation: Self = Self::FLOW_STEP_VALIDATION;
2214 #[allow(non_upper_case_globals)]
2216 pub const Execution: Self = Self::FLOW_STEP_EXECUTION;
2217 #[allow(non_upper_case_globals)]
2219 pub const BridgeFulfillment: Self = Self::FLOW_STEP_BRIDGE_FULFILLMENT;
2220 #[allow(non_upper_case_globals)]
2222 pub const Dropped: Self = Self::FLOW_STEP_DROPPED;
2223 #[allow(non_upper_case_globals)]
2225 pub const Failed: Self = Self::FLOW_STEP_FAILED;
2226 #[allow(non_upper_case_globals)]
2228 pub const Refunded: Self = Self::FLOW_STEP_REFUNDED;
2229 #[allow(non_upper_case_globals)]
2231 pub const Fulfilling: Self = Self::FLOW_STEP_FULFILLING;
2232 #[allow(non_upper_case_globals)]
2234 pub const Settlement: Self = Self::FLOW_STEP_SETTLEMENT;
2235}
2236impl ::core::default::Default for FlowStep {
2237 fn default() -> Self {
2238 Self::FLOW_STEP_UNSPECIFIED
2239 }
2240}
2241impl ::serde::Serialize for FlowStep {
2242 fn serialize<S: ::serde::Serializer>(
2243 &self,
2244 s: S,
2245 ) -> ::core::result::Result<S::Ok, S::Error> {
2246 s.serialize_str(::buffa::Enumeration::proto_name(self))
2247 }
2248}
2249impl<'de> ::serde::Deserialize<'de> for FlowStep {
2250 fn deserialize<D: ::serde::Deserializer<'de>>(
2251 d: D,
2252 ) -> ::core::result::Result<Self, D::Error> {
2253 struct _V;
2254 impl ::serde::de::Visitor<'_> for _V {
2255 type Value = FlowStep;
2256 fn expecting(
2257 &self,
2258 f: &mut ::core::fmt::Formatter<'_>,
2259 ) -> ::core::fmt::Result {
2260 f.write_str(
2261 concat!("a string, integer, or null for ", stringify!(FlowStep)),
2262 )
2263 }
2264 fn visit_str<E: ::serde::de::Error>(
2265 self,
2266 v: &str,
2267 ) -> ::core::result::Result<FlowStep, E> {
2268 <FlowStep as ::buffa::Enumeration>::from_proto_name(v)
2269 .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
2270 }
2271 fn visit_i64<E: ::serde::de::Error>(
2272 self,
2273 v: i64,
2274 ) -> ::core::result::Result<FlowStep, E> {
2275 let v32 = i32::try_from(v)
2276 .map_err(|_| {
2277 ::serde::de::Error::custom(
2278 ::buffa::alloc::format!("enum value {v} out of i32 range"),
2279 )
2280 })?;
2281 <FlowStep as ::buffa::Enumeration>::from_i32(v32)
2282 .ok_or_else(|| {
2283 ::serde::de::Error::custom(
2284 ::buffa::alloc::format!("unknown enum value {v32}"),
2285 )
2286 })
2287 }
2288 fn visit_u64<E: ::serde::de::Error>(
2289 self,
2290 v: u64,
2291 ) -> ::core::result::Result<FlowStep, E> {
2292 let v32 = i32::try_from(v)
2293 .map_err(|_| {
2294 ::serde::de::Error::custom(
2295 ::buffa::alloc::format!("enum value {v} out of i32 range"),
2296 )
2297 })?;
2298 <FlowStep as ::buffa::Enumeration>::from_i32(v32)
2299 .ok_or_else(|| {
2300 ::serde::de::Error::custom(
2301 ::buffa::alloc::format!("unknown enum value {v32}"),
2302 )
2303 })
2304 }
2305 fn visit_unit<E: ::serde::de::Error>(
2306 self,
2307 ) -> ::core::result::Result<FlowStep, E> {
2308 ::core::result::Result::Ok(::core::default::Default::default())
2309 }
2310 }
2311 d.deserialize_any(_V)
2312 }
2313}
2314impl ::buffa::json_helpers::ProtoElemJson for FlowStep {
2315 fn serialize_proto_json<S: ::serde::Serializer>(
2316 v: &Self,
2317 s: S,
2318 ) -> ::core::result::Result<S::Ok, S::Error> {
2319 ::serde::Serialize::serialize(v, s)
2320 }
2321 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2322 d: D,
2323 ) -> ::core::result::Result<Self, D::Error> {
2324 <Self as ::serde::Deserialize>::deserialize(d)
2325 }
2326}
2327impl ::buffa::Enumeration for FlowStep {
2328 fn from_i32(value: i32) -> ::core::option::Option<Self> {
2329 match value {
2330 0i32 => ::core::option::Option::Some(Self::FLOW_STEP_UNSPECIFIED),
2331 1i32 => ::core::option::Option::Some(Self::FLOW_STEP_SOURCE),
2332 2i32 => ::core::option::Option::Some(Self::FLOW_STEP_TRANSFER),
2333 3i32 => ::core::option::Option::Some(Self::FLOW_STEP_REQUEST),
2334 4i32 => ::core::option::Option::Some(Self::FLOW_STEP_VALIDATION),
2335 5i32 => ::core::option::Option::Some(Self::FLOW_STEP_EXECUTION),
2336 6i32 => ::core::option::Option::Some(Self::FLOW_STEP_BRIDGE_FULFILLMENT),
2337 7i32 => ::core::option::Option::Some(Self::FLOW_STEP_DROPPED),
2338 8i32 => ::core::option::Option::Some(Self::FLOW_STEP_FAILED),
2339 9i32 => ::core::option::Option::Some(Self::FLOW_STEP_REFUNDED),
2340 10i32 => ::core::option::Option::Some(Self::FLOW_STEP_FULFILLING),
2341 11i32 => ::core::option::Option::Some(Self::FLOW_STEP_SETTLEMENT),
2342 _ => ::core::option::Option::None,
2343 }
2344 }
2345 fn to_i32(&self) -> i32 {
2346 *self as i32
2347 }
2348 fn proto_name(&self) -> &'static str {
2349 match self {
2350 Self::FLOW_STEP_UNSPECIFIED => "FLOW_STEP_UNSPECIFIED",
2351 Self::FLOW_STEP_SOURCE => "FLOW_STEP_SOURCE",
2352 Self::FLOW_STEP_TRANSFER => "FLOW_STEP_TRANSFER",
2353 Self::FLOW_STEP_REQUEST => "FLOW_STEP_REQUEST",
2354 Self::FLOW_STEP_VALIDATION => "FLOW_STEP_VALIDATION",
2355 Self::FLOW_STEP_EXECUTION => "FLOW_STEP_EXECUTION",
2356 Self::FLOW_STEP_BRIDGE_FULFILLMENT => "FLOW_STEP_BRIDGE_FULFILLMENT",
2357 Self::FLOW_STEP_DROPPED => "FLOW_STEP_DROPPED",
2358 Self::FLOW_STEP_FAILED => "FLOW_STEP_FAILED",
2359 Self::FLOW_STEP_REFUNDED => "FLOW_STEP_REFUNDED",
2360 Self::FLOW_STEP_FULFILLING => "FLOW_STEP_FULFILLING",
2361 Self::FLOW_STEP_SETTLEMENT => "FLOW_STEP_SETTLEMENT",
2362 }
2363 }
2364 fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
2365 match name {
2366 "FLOW_STEP_UNSPECIFIED" => {
2367 ::core::option::Option::Some(Self::FLOW_STEP_UNSPECIFIED)
2368 }
2369 "FLOW_STEP_SOURCE" => ::core::option::Option::Some(Self::FLOW_STEP_SOURCE),
2370 "FLOW_STEP_TRANSFER" => {
2371 ::core::option::Option::Some(Self::FLOW_STEP_TRANSFER)
2372 }
2373 "FLOW_STEP_REQUEST" => ::core::option::Option::Some(Self::FLOW_STEP_REQUEST),
2374 "FLOW_STEP_VALIDATION" => {
2375 ::core::option::Option::Some(Self::FLOW_STEP_VALIDATION)
2376 }
2377 "FLOW_STEP_EXECUTION" => {
2378 ::core::option::Option::Some(Self::FLOW_STEP_EXECUTION)
2379 }
2380 "FLOW_STEP_BRIDGE_FULFILLMENT" => {
2381 ::core::option::Option::Some(Self::FLOW_STEP_BRIDGE_FULFILLMENT)
2382 }
2383 "FLOW_STEP_DROPPED" => ::core::option::Option::Some(Self::FLOW_STEP_DROPPED),
2384 "FLOW_STEP_FAILED" => ::core::option::Option::Some(Self::FLOW_STEP_FAILED),
2385 "FLOW_STEP_REFUNDED" => {
2386 ::core::option::Option::Some(Self::FLOW_STEP_REFUNDED)
2387 }
2388 "FLOW_STEP_FULFILLING" => {
2389 ::core::option::Option::Some(Self::FLOW_STEP_FULFILLING)
2390 }
2391 "FLOW_STEP_SETTLEMENT" => {
2392 ::core::option::Option::Some(Self::FLOW_STEP_SETTLEMENT)
2393 }
2394 _ => ::core::option::Option::None,
2395 }
2396 }
2397 fn values() -> &'static [Self] {
2398 &[
2399 Self::FLOW_STEP_UNSPECIFIED,
2400 Self::FLOW_STEP_SOURCE,
2401 Self::FLOW_STEP_TRANSFER,
2402 Self::FLOW_STEP_REQUEST,
2403 Self::FLOW_STEP_VALIDATION,
2404 Self::FLOW_STEP_EXECUTION,
2405 Self::FLOW_STEP_BRIDGE_FULFILLMENT,
2406 Self::FLOW_STEP_DROPPED,
2407 Self::FLOW_STEP_FAILED,
2408 Self::FLOW_STEP_REFUNDED,
2409 Self::FLOW_STEP_FULFILLING,
2410 Self::FLOW_STEP_SETTLEMENT,
2411 ]
2412 }
2413}
2414#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
2415#[repr(i32)]
2416pub enum FlowStepActivityKind {
2417 ACTIVITY_UNSPECIFIED = 0i32,
2419 ACTIVITY_MINTED = 1i32,
2421 ACTIVITY_FUNDING = 2i32,
2423 ACTIVITY_TRADING = 3i32,
2425}
2426impl FlowStepActivityKind {
2427 #[allow(non_upper_case_globals)]
2429 pub const ActivityUnspecified: Self = Self::ACTIVITY_UNSPECIFIED;
2430 #[allow(non_upper_case_globals)]
2432 pub const ActivityMinted: Self = Self::ACTIVITY_MINTED;
2433 #[allow(non_upper_case_globals)]
2435 pub const ActivityFunding: Self = Self::ACTIVITY_FUNDING;
2436 #[allow(non_upper_case_globals)]
2438 pub const ActivityTrading: Self = Self::ACTIVITY_TRADING;
2439}
2440impl ::core::default::Default for FlowStepActivityKind {
2441 fn default() -> Self {
2442 Self::ACTIVITY_UNSPECIFIED
2443 }
2444}
2445impl ::serde::Serialize for FlowStepActivityKind {
2446 fn serialize<S: ::serde::Serializer>(
2447 &self,
2448 s: S,
2449 ) -> ::core::result::Result<S::Ok, S::Error> {
2450 s.serialize_str(::buffa::Enumeration::proto_name(self))
2451 }
2452}
2453impl<'de> ::serde::Deserialize<'de> for FlowStepActivityKind {
2454 fn deserialize<D: ::serde::Deserializer<'de>>(
2455 d: D,
2456 ) -> ::core::result::Result<Self, D::Error> {
2457 struct _V;
2458 impl ::serde::de::Visitor<'_> for _V {
2459 type Value = FlowStepActivityKind;
2460 fn expecting(
2461 &self,
2462 f: &mut ::core::fmt::Formatter<'_>,
2463 ) -> ::core::fmt::Result {
2464 f.write_str(
2465 concat!(
2466 "a string, integer, or null for ",
2467 stringify!(FlowStepActivityKind)
2468 ),
2469 )
2470 }
2471 fn visit_str<E: ::serde::de::Error>(
2472 self,
2473 v: &str,
2474 ) -> ::core::result::Result<FlowStepActivityKind, E> {
2475 <FlowStepActivityKind as ::buffa::Enumeration>::from_proto_name(v)
2476 .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
2477 }
2478 fn visit_i64<E: ::serde::de::Error>(
2479 self,
2480 v: i64,
2481 ) -> ::core::result::Result<FlowStepActivityKind, E> {
2482 let v32 = i32::try_from(v)
2483 .map_err(|_| {
2484 ::serde::de::Error::custom(
2485 ::buffa::alloc::format!("enum value {v} out of i32 range"),
2486 )
2487 })?;
2488 <FlowStepActivityKind as ::buffa::Enumeration>::from_i32(v32)
2489 .ok_or_else(|| {
2490 ::serde::de::Error::custom(
2491 ::buffa::alloc::format!("unknown enum value {v32}"),
2492 )
2493 })
2494 }
2495 fn visit_u64<E: ::serde::de::Error>(
2496 self,
2497 v: u64,
2498 ) -> ::core::result::Result<FlowStepActivityKind, E> {
2499 let v32 = i32::try_from(v)
2500 .map_err(|_| {
2501 ::serde::de::Error::custom(
2502 ::buffa::alloc::format!("enum value {v} out of i32 range"),
2503 )
2504 })?;
2505 <FlowStepActivityKind as ::buffa::Enumeration>::from_i32(v32)
2506 .ok_or_else(|| {
2507 ::serde::de::Error::custom(
2508 ::buffa::alloc::format!("unknown enum value {v32}"),
2509 )
2510 })
2511 }
2512 fn visit_unit<E: ::serde::de::Error>(
2513 self,
2514 ) -> ::core::result::Result<FlowStepActivityKind, E> {
2515 ::core::result::Result::Ok(::core::default::Default::default())
2516 }
2517 }
2518 d.deserialize_any(_V)
2519 }
2520}
2521impl ::buffa::json_helpers::ProtoElemJson for FlowStepActivityKind {
2522 fn serialize_proto_json<S: ::serde::Serializer>(
2523 v: &Self,
2524 s: S,
2525 ) -> ::core::result::Result<S::Ok, S::Error> {
2526 ::serde::Serialize::serialize(v, s)
2527 }
2528 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2529 d: D,
2530 ) -> ::core::result::Result<Self, D::Error> {
2531 <Self as ::serde::Deserialize>::deserialize(d)
2532 }
2533}
2534impl ::buffa::Enumeration for FlowStepActivityKind {
2535 fn from_i32(value: i32) -> ::core::option::Option<Self> {
2536 match value {
2537 0i32 => ::core::option::Option::Some(Self::ACTIVITY_UNSPECIFIED),
2538 1i32 => ::core::option::Option::Some(Self::ACTIVITY_MINTED),
2539 2i32 => ::core::option::Option::Some(Self::ACTIVITY_FUNDING),
2540 3i32 => ::core::option::Option::Some(Self::ACTIVITY_TRADING),
2541 _ => ::core::option::Option::None,
2542 }
2543 }
2544 fn to_i32(&self) -> i32 {
2545 *self as i32
2546 }
2547 fn proto_name(&self) -> &'static str {
2548 match self {
2549 Self::ACTIVITY_UNSPECIFIED => "ACTIVITY_UNSPECIFIED",
2550 Self::ACTIVITY_MINTED => "ACTIVITY_MINTED",
2551 Self::ACTIVITY_FUNDING => "ACTIVITY_FUNDING",
2552 Self::ACTIVITY_TRADING => "ACTIVITY_TRADING",
2553 }
2554 }
2555 fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
2556 match name {
2557 "ACTIVITY_UNSPECIFIED" => {
2558 ::core::option::Option::Some(Self::ACTIVITY_UNSPECIFIED)
2559 }
2560 "ACTIVITY_MINTED" => ::core::option::Option::Some(Self::ACTIVITY_MINTED),
2561 "ACTIVITY_FUNDING" => ::core::option::Option::Some(Self::ACTIVITY_FUNDING),
2562 "ACTIVITY_TRADING" => ::core::option::Option::Some(Self::ACTIVITY_TRADING),
2563 _ => ::core::option::Option::None,
2564 }
2565 }
2566 fn values() -> &'static [Self] {
2567 &[
2568 Self::ACTIVITY_UNSPECIFIED,
2569 Self::ACTIVITY_MINTED,
2570 Self::ACTIVITY_FUNDING,
2571 Self::ACTIVITY_TRADING,
2572 ]
2573 }
2574}
2575#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
2578#[repr(i32)]
2579pub enum FlowTimelineStatus {
2580 TIMELINE_STATUS_UNSPECIFIED = 0i32,
2582 TIMELINE_STATUS_COMPLETED = 1i32,
2584 TIMELINE_STATUS_CURRENT = 2i32,
2586 TIMELINE_STATUS_PLANNED = 3i32,
2588}
2589impl FlowTimelineStatus {
2590 #[allow(non_upper_case_globals)]
2592 pub const TimelineStatusUnspecified: Self = Self::TIMELINE_STATUS_UNSPECIFIED;
2593 #[allow(non_upper_case_globals)]
2595 pub const TimelineStatusCompleted: Self = Self::TIMELINE_STATUS_COMPLETED;
2596 #[allow(non_upper_case_globals)]
2598 pub const TimelineStatusCurrent: Self = Self::TIMELINE_STATUS_CURRENT;
2599 #[allow(non_upper_case_globals)]
2601 pub const TimelineStatusPlanned: Self = Self::TIMELINE_STATUS_PLANNED;
2602}
2603impl ::core::default::Default for FlowTimelineStatus {
2604 fn default() -> Self {
2605 Self::TIMELINE_STATUS_UNSPECIFIED
2606 }
2607}
2608impl ::serde::Serialize for FlowTimelineStatus {
2609 fn serialize<S: ::serde::Serializer>(
2610 &self,
2611 s: S,
2612 ) -> ::core::result::Result<S::Ok, S::Error> {
2613 s.serialize_str(::buffa::Enumeration::proto_name(self))
2614 }
2615}
2616impl<'de> ::serde::Deserialize<'de> for FlowTimelineStatus {
2617 fn deserialize<D: ::serde::Deserializer<'de>>(
2618 d: D,
2619 ) -> ::core::result::Result<Self, D::Error> {
2620 struct _V;
2621 impl ::serde::de::Visitor<'_> for _V {
2622 type Value = FlowTimelineStatus;
2623 fn expecting(
2624 &self,
2625 f: &mut ::core::fmt::Formatter<'_>,
2626 ) -> ::core::fmt::Result {
2627 f.write_str(
2628 concat!(
2629 "a string, integer, or null for ", stringify!(FlowTimelineStatus)
2630 ),
2631 )
2632 }
2633 fn visit_str<E: ::serde::de::Error>(
2634 self,
2635 v: &str,
2636 ) -> ::core::result::Result<FlowTimelineStatus, E> {
2637 <FlowTimelineStatus as ::buffa::Enumeration>::from_proto_name(v)
2638 .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
2639 }
2640 fn visit_i64<E: ::serde::de::Error>(
2641 self,
2642 v: i64,
2643 ) -> ::core::result::Result<FlowTimelineStatus, E> {
2644 let v32 = i32::try_from(v)
2645 .map_err(|_| {
2646 ::serde::de::Error::custom(
2647 ::buffa::alloc::format!("enum value {v} out of i32 range"),
2648 )
2649 })?;
2650 <FlowTimelineStatus as ::buffa::Enumeration>::from_i32(v32)
2651 .ok_or_else(|| {
2652 ::serde::de::Error::custom(
2653 ::buffa::alloc::format!("unknown enum value {v32}"),
2654 )
2655 })
2656 }
2657 fn visit_u64<E: ::serde::de::Error>(
2658 self,
2659 v: u64,
2660 ) -> ::core::result::Result<FlowTimelineStatus, E> {
2661 let v32 = i32::try_from(v)
2662 .map_err(|_| {
2663 ::serde::de::Error::custom(
2664 ::buffa::alloc::format!("enum value {v} out of i32 range"),
2665 )
2666 })?;
2667 <FlowTimelineStatus as ::buffa::Enumeration>::from_i32(v32)
2668 .ok_or_else(|| {
2669 ::serde::de::Error::custom(
2670 ::buffa::alloc::format!("unknown enum value {v32}"),
2671 )
2672 })
2673 }
2674 fn visit_unit<E: ::serde::de::Error>(
2675 self,
2676 ) -> ::core::result::Result<FlowTimelineStatus, E> {
2677 ::core::result::Result::Ok(::core::default::Default::default())
2678 }
2679 }
2680 d.deserialize_any(_V)
2681 }
2682}
2683impl ::buffa::json_helpers::ProtoElemJson for FlowTimelineStatus {
2684 fn serialize_proto_json<S: ::serde::Serializer>(
2685 v: &Self,
2686 s: S,
2687 ) -> ::core::result::Result<S::Ok, S::Error> {
2688 ::serde::Serialize::serialize(v, s)
2689 }
2690 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2691 d: D,
2692 ) -> ::core::result::Result<Self, D::Error> {
2693 <Self as ::serde::Deserialize>::deserialize(d)
2694 }
2695}
2696impl ::buffa::Enumeration for FlowTimelineStatus {
2697 fn from_i32(value: i32) -> ::core::option::Option<Self> {
2698 match value {
2699 0i32 => ::core::option::Option::Some(Self::TIMELINE_STATUS_UNSPECIFIED),
2700 1i32 => ::core::option::Option::Some(Self::TIMELINE_STATUS_COMPLETED),
2701 2i32 => ::core::option::Option::Some(Self::TIMELINE_STATUS_CURRENT),
2702 3i32 => ::core::option::Option::Some(Self::TIMELINE_STATUS_PLANNED),
2703 _ => ::core::option::Option::None,
2704 }
2705 }
2706 fn to_i32(&self) -> i32 {
2707 *self as i32
2708 }
2709 fn proto_name(&self) -> &'static str {
2710 match self {
2711 Self::TIMELINE_STATUS_UNSPECIFIED => "TIMELINE_STATUS_UNSPECIFIED",
2712 Self::TIMELINE_STATUS_COMPLETED => "TIMELINE_STATUS_COMPLETED",
2713 Self::TIMELINE_STATUS_CURRENT => "TIMELINE_STATUS_CURRENT",
2714 Self::TIMELINE_STATUS_PLANNED => "TIMELINE_STATUS_PLANNED",
2715 }
2716 }
2717 fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
2718 match name {
2719 "TIMELINE_STATUS_UNSPECIFIED" => {
2720 ::core::option::Option::Some(Self::TIMELINE_STATUS_UNSPECIFIED)
2721 }
2722 "TIMELINE_STATUS_COMPLETED" => {
2723 ::core::option::Option::Some(Self::TIMELINE_STATUS_COMPLETED)
2724 }
2725 "TIMELINE_STATUS_CURRENT" => {
2726 ::core::option::Option::Some(Self::TIMELINE_STATUS_CURRENT)
2727 }
2728 "TIMELINE_STATUS_PLANNED" => {
2729 ::core::option::Option::Some(Self::TIMELINE_STATUS_PLANNED)
2730 }
2731 _ => ::core::option::Option::None,
2732 }
2733 }
2734 fn values() -> &'static [Self] {
2735 &[
2736 Self::TIMELINE_STATUS_UNSPECIFIED,
2737 Self::TIMELINE_STATUS_COMPLETED,
2738 Self::TIMELINE_STATUS_CURRENT,
2739 Self::TIMELINE_STATUS_PLANNED,
2740 ]
2741 }
2742}
2743#[derive(Clone, PartialEq, Default)]
2746#[derive(::serde::Serialize, ::serde::Deserialize)]
2747#[serde(default)]
2748pub struct GetFlowResponse {
2749 #[serde(
2753 rename = "flow",
2754 skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
2755 )]
2756 pub flow: ::buffa::MessageField<FlowDetailView>,
2757 #[serde(skip)]
2758 #[doc(hidden)]
2759 pub __buffa_unknown_fields: ::buffa::UnknownFields,
2760}
2761impl ::core::fmt::Debug for GetFlowResponse {
2762 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2763 f.debug_struct("GetFlowResponse").field("flow", &self.flow).finish()
2764 }
2765}
2766impl GetFlowResponse {
2767 pub const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.GetFlowResponse";
2772}
2773::buffa::impl_default_instance!(GetFlowResponse);
2774impl ::buffa::MessageName for GetFlowResponse {
2775 const PACKAGE: &'static str = "chain.lifecycle.v1";
2776 const NAME: &'static str = "GetFlowResponse";
2777 const FULL_NAME: &'static str = "chain.lifecycle.v1.GetFlowResponse";
2778 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.GetFlowResponse";
2779}
2780impl ::buffa::Message for GetFlowResponse {
2781 #[allow(clippy::let_and_return)]
2787 fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
2788 #[allow(unused_imports)]
2789 use ::buffa::Enumeration as _;
2790 let mut size = 0u32;
2791 if self.flow.is_set() {
2792 let __slot = __cache.reserve();
2793 let inner_size = self.flow.compute_size(__cache);
2794 __cache.set(__slot, inner_size);
2795 size
2796 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
2797 + inner_size;
2798 }
2799 size += self.__buffa_unknown_fields.encoded_len() as u32;
2800 size
2801 }
2802 fn write_to(
2803 &self,
2804 __cache: &mut ::buffa::SizeCache,
2805 buf: &mut impl ::buffa::bytes::BufMut,
2806 ) {
2807 #[allow(unused_imports)]
2808 use ::buffa::Enumeration as _;
2809 if self.flow.is_set() {
2810 ::buffa::types::put_len_delimited_header(1u32, __cache.consume_next(), buf);
2811 self.flow.write_to(__cache, buf);
2812 }
2813 self.__buffa_unknown_fields.write_to(buf);
2814 }
2815 fn merge_field(
2816 &mut self,
2817 tag: ::buffa::encoding::Tag,
2818 buf: &mut impl ::buffa::bytes::Buf,
2819 ctx: ::buffa::DecodeContext<'_>,
2820 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
2821 #[allow(unused_imports)]
2822 use ::buffa::bytes::Buf as _;
2823 #[allow(unused_imports)]
2824 use ::buffa::Enumeration as _;
2825 match tag.field_number() {
2826 1u32 => {
2827 ::buffa::encoding::check_wire_type(
2828 tag,
2829 ::buffa::encoding::WireType::LengthDelimited,
2830 )?;
2831 ::buffa::Message::merge_length_delimited(
2832 self.flow.get_or_insert_default(),
2833 buf,
2834 ctx,
2835 )?;
2836 }
2837 _ => {
2838 self.__buffa_unknown_fields
2839 .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
2840 }
2841 }
2842 ::core::result::Result::Ok(())
2843 }
2844 fn clear(&mut self) {
2845 self.flow = ::buffa::MessageField::none();
2846 self.__buffa_unknown_fields.clear();
2847 }
2848}
2849impl ::buffa::ExtensionSet for GetFlowResponse {
2850 const PROTO_FQN: &'static str = "chain.lifecycle.v1.GetFlowResponse";
2851 fn unknown_fields(&self) -> &::buffa::UnknownFields {
2852 &self.__buffa_unknown_fields
2853 }
2854 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
2855 &mut self.__buffa_unknown_fields
2856 }
2857}
2858impl ::buffa::json_helpers::ProtoElemJson for GetFlowResponse {
2859 fn serialize_proto_json<S: ::serde::Serializer>(
2860 v: &Self,
2861 s: S,
2862 ) -> ::core::result::Result<S::Ok, S::Error> {
2863 ::serde::Serialize::serialize(v, s)
2864 }
2865 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2866 d: D,
2867 ) -> ::core::result::Result<Self, D::Error> {
2868 <Self as ::serde::Deserialize>::deserialize(d)
2869 }
2870}
2871#[doc(hidden)]
2872pub const __GET_FLOW_RESPONSE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
2873 type_url: "type.googleapis.com/chain.lifecycle.v1.GetFlowResponse",
2874 to_json: ::buffa::type_registry::any_to_json::<GetFlowResponse>,
2875 from_json: ::buffa::type_registry::any_from_json::<GetFlowResponse>,
2876 is_wkt: false,
2877};
2878#[derive(Clone, PartialEq, Default)]
2880#[derive(::serde::Serialize, ::serde::Deserialize)]
2881#[serde(default)]
2882pub struct GetFlowByIdRequest {
2883 #[serde(
2887 rename = "flowId",
2888 alias = "flow_id",
2889 with = "::buffa::json_helpers::proto_string",
2890 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
2891 )]
2892 pub flow_id: ::buffa::alloc::string::String,
2893 #[serde(skip)]
2894 #[doc(hidden)]
2895 pub __buffa_unknown_fields: ::buffa::UnknownFields,
2896}
2897impl ::core::fmt::Debug for GetFlowByIdRequest {
2898 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2899 f.debug_struct("GetFlowByIdRequest").field("flow_id", &self.flow_id).finish()
2900 }
2901}
2902impl GetFlowByIdRequest {
2903 pub const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.GetFlowByIdRequest";
2908}
2909::buffa::impl_default_instance!(GetFlowByIdRequest);
2910impl ::buffa::MessageName for GetFlowByIdRequest {
2911 const PACKAGE: &'static str = "chain.lifecycle.v1";
2912 const NAME: &'static str = "GetFlowByIdRequest";
2913 const FULL_NAME: &'static str = "chain.lifecycle.v1.GetFlowByIdRequest";
2914 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.GetFlowByIdRequest";
2915}
2916impl ::buffa::Message for GetFlowByIdRequest {
2917 #[allow(clippy::let_and_return)]
2923 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
2924 #[allow(unused_imports)]
2925 use ::buffa::Enumeration as _;
2926 let mut size = 0u32;
2927 if !self.flow_id.is_empty() {
2928 size += 1u32 + ::buffa::types::string_encoded_len(&self.flow_id) as u32;
2929 }
2930 size += self.__buffa_unknown_fields.encoded_len() as u32;
2931 size
2932 }
2933 fn write_to(
2934 &self,
2935 _cache: &mut ::buffa::SizeCache,
2936 buf: &mut impl ::buffa::bytes::BufMut,
2937 ) {
2938 #[allow(unused_imports)]
2939 use ::buffa::Enumeration as _;
2940 if !self.flow_id.is_empty() {
2941 ::buffa::types::put_string_field(1u32, &self.flow_id, buf);
2942 }
2943 self.__buffa_unknown_fields.write_to(buf);
2944 }
2945 fn merge_field(
2946 &mut self,
2947 tag: ::buffa::encoding::Tag,
2948 buf: &mut impl ::buffa::bytes::Buf,
2949 ctx: ::buffa::DecodeContext<'_>,
2950 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
2951 #[allow(unused_imports)]
2952 use ::buffa::bytes::Buf as _;
2953 #[allow(unused_imports)]
2954 use ::buffa::Enumeration as _;
2955 match tag.field_number() {
2956 1u32 => {
2957 ::buffa::encoding::check_wire_type(
2958 tag,
2959 ::buffa::encoding::WireType::LengthDelimited,
2960 )?;
2961 ::buffa::types::merge_string(&mut self.flow_id, buf)?;
2962 }
2963 _ => {
2964 self.__buffa_unknown_fields
2965 .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
2966 }
2967 }
2968 ::core::result::Result::Ok(())
2969 }
2970 fn clear(&mut self) {
2971 self.flow_id.clear();
2972 self.__buffa_unknown_fields.clear();
2973 }
2974}
2975impl ::buffa::ExtensionSet for GetFlowByIdRequest {
2976 const PROTO_FQN: &'static str = "chain.lifecycle.v1.GetFlowByIdRequest";
2977 fn unknown_fields(&self) -> &::buffa::UnknownFields {
2978 &self.__buffa_unknown_fields
2979 }
2980 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
2981 &mut self.__buffa_unknown_fields
2982 }
2983}
2984impl ::buffa::json_helpers::ProtoElemJson for GetFlowByIdRequest {
2985 fn serialize_proto_json<S: ::serde::Serializer>(
2986 v: &Self,
2987 s: S,
2988 ) -> ::core::result::Result<S::Ok, S::Error> {
2989 ::serde::Serialize::serialize(v, s)
2990 }
2991 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2992 d: D,
2993 ) -> ::core::result::Result<Self, D::Error> {
2994 <Self as ::serde::Deserialize>::deserialize(d)
2995 }
2996}
2997#[doc(hidden)]
2998pub const __GET_FLOW_BY_ID_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
2999 type_url: "type.googleapis.com/chain.lifecycle.v1.GetFlowByIdRequest",
3000 to_json: ::buffa::type_registry::any_to_json::<GetFlowByIdRequest>,
3001 from_json: ::buffa::type_registry::any_from_json::<GetFlowByIdRequest>,
3002 is_wkt: false,
3003};
3004#[derive(Clone, PartialEq, Default)]
3007#[derive(::serde::Serialize, ::serde::Deserialize)]
3008#[serde(default)]
3009pub struct ListFlowsByTxRequest {
3010 #[serde(
3017 rename = "txHash",
3018 alias = "tx_hash",
3019 with = "::buffa::json_helpers::proto_string",
3020 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
3021 )]
3022 pub tx_hash: ::buffa::alloc::string::String,
3023 #[serde(
3027 rename = "lookupKind",
3028 alias = "lookup_kind",
3029 with = "::buffa::json_helpers::proto_enum",
3030 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
3031 )]
3032 pub lookup_kind: ::buffa::EnumValue<TxLookupKind>,
3033 #[serde(
3038 rename = "limit",
3039 with = "::buffa::json_helpers::uint32",
3040 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
3041 )]
3042 pub limit: u32,
3043 #[serde(
3048 rename = "pageToken",
3049 alias = "page_token",
3050 with = "::buffa::json_helpers::proto_string",
3051 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
3052 )]
3053 pub page_token: ::buffa::alloc::string::String,
3054 #[serde(skip)]
3055 #[doc(hidden)]
3056 pub __buffa_unknown_fields: ::buffa::UnknownFields,
3057}
3058impl ::core::fmt::Debug for ListFlowsByTxRequest {
3059 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3060 f.debug_struct("ListFlowsByTxRequest")
3061 .field("tx_hash", &self.tx_hash)
3062 .field("lookup_kind", &self.lookup_kind)
3063 .field("limit", &self.limit)
3064 .field("page_token", &self.page_token)
3065 .finish()
3066 }
3067}
3068impl ListFlowsByTxRequest {
3069 pub const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.ListFlowsByTxRequest";
3074}
3075::buffa::impl_default_instance!(ListFlowsByTxRequest);
3076impl ::buffa::MessageName for ListFlowsByTxRequest {
3077 const PACKAGE: &'static str = "chain.lifecycle.v1";
3078 const NAME: &'static str = "ListFlowsByTxRequest";
3079 const FULL_NAME: &'static str = "chain.lifecycle.v1.ListFlowsByTxRequest";
3080 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.ListFlowsByTxRequest";
3081}
3082impl ::buffa::Message for ListFlowsByTxRequest {
3083 #[allow(clippy::let_and_return)]
3089 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
3090 #[allow(unused_imports)]
3091 use ::buffa::Enumeration as _;
3092 let mut size = 0u32;
3093 if !self.tx_hash.is_empty() {
3094 size += 1u32 + ::buffa::types::string_encoded_len(&self.tx_hash) as u32;
3095 }
3096 {
3097 let val = self.lookup_kind.to_i32();
3098 if val != 0 {
3099 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
3100 }
3101 }
3102 if self.limit != 0u32 {
3103 size += 1u32 + ::buffa::types::uint32_encoded_len(self.limit) as u32;
3104 }
3105 if !self.page_token.is_empty() {
3106 size += 1u32 + ::buffa::types::string_encoded_len(&self.page_token) as u32;
3107 }
3108 size += self.__buffa_unknown_fields.encoded_len() as u32;
3109 size
3110 }
3111 fn write_to(
3112 &self,
3113 _cache: &mut ::buffa::SizeCache,
3114 buf: &mut impl ::buffa::bytes::BufMut,
3115 ) {
3116 #[allow(unused_imports)]
3117 use ::buffa::Enumeration as _;
3118 if !self.tx_hash.is_empty() {
3119 ::buffa::types::put_string_field(1u32, &self.tx_hash, buf);
3120 }
3121 {
3122 let val = self.lookup_kind.to_i32();
3123 if val != 0 {
3124 ::buffa::types::put_int32_field(2u32, val, buf);
3125 }
3126 }
3127 if self.limit != 0u32 {
3128 ::buffa::types::put_uint32_field(3u32, self.limit, buf);
3129 }
3130 if !self.page_token.is_empty() {
3131 ::buffa::types::put_string_field(4u32, &self.page_token, buf);
3132 }
3133 self.__buffa_unknown_fields.write_to(buf);
3134 }
3135 fn merge_field(
3136 &mut self,
3137 tag: ::buffa::encoding::Tag,
3138 buf: &mut impl ::buffa::bytes::Buf,
3139 ctx: ::buffa::DecodeContext<'_>,
3140 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
3141 #[allow(unused_imports)]
3142 use ::buffa::bytes::Buf as _;
3143 #[allow(unused_imports)]
3144 use ::buffa::Enumeration as _;
3145 match tag.field_number() {
3146 1u32 => {
3147 ::buffa::encoding::check_wire_type(
3148 tag,
3149 ::buffa::encoding::WireType::LengthDelimited,
3150 )?;
3151 ::buffa::types::merge_string(&mut self.tx_hash, buf)?;
3152 }
3153 2u32 => {
3154 ::buffa::encoding::check_wire_type(
3155 tag,
3156 ::buffa::encoding::WireType::Varint,
3157 )?;
3158 self.lookup_kind = ::buffa::EnumValue::from(
3159 ::buffa::types::decode_int32(buf)?,
3160 );
3161 }
3162 3u32 => {
3163 ::buffa::encoding::check_wire_type(
3164 tag,
3165 ::buffa::encoding::WireType::Varint,
3166 )?;
3167 self.limit = ::buffa::types::decode_uint32(buf)?;
3168 }
3169 4u32 => {
3170 ::buffa::encoding::check_wire_type(
3171 tag,
3172 ::buffa::encoding::WireType::LengthDelimited,
3173 )?;
3174 ::buffa::types::merge_string(&mut self.page_token, buf)?;
3175 }
3176 _ => {
3177 self.__buffa_unknown_fields
3178 .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
3179 }
3180 }
3181 ::core::result::Result::Ok(())
3182 }
3183 fn clear(&mut self) {
3184 self.tx_hash.clear();
3185 self.lookup_kind = ::buffa::EnumValue::from(0);
3186 self.limit = 0u32;
3187 self.page_token.clear();
3188 self.__buffa_unknown_fields.clear();
3189 }
3190}
3191impl ::buffa::ExtensionSet for ListFlowsByTxRequest {
3192 const PROTO_FQN: &'static str = "chain.lifecycle.v1.ListFlowsByTxRequest";
3193 fn unknown_fields(&self) -> &::buffa::UnknownFields {
3194 &self.__buffa_unknown_fields
3195 }
3196 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
3197 &mut self.__buffa_unknown_fields
3198 }
3199}
3200impl ::buffa::json_helpers::ProtoElemJson for ListFlowsByTxRequest {
3201 fn serialize_proto_json<S: ::serde::Serializer>(
3202 v: &Self,
3203 s: S,
3204 ) -> ::core::result::Result<S::Ok, S::Error> {
3205 ::serde::Serialize::serialize(v, s)
3206 }
3207 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
3208 d: D,
3209 ) -> ::core::result::Result<Self, D::Error> {
3210 <Self as ::serde::Deserialize>::deserialize(d)
3211 }
3212}
3213#[doc(hidden)]
3214pub const __LIST_FLOWS_BY_TX_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
3215 type_url: "type.googleapis.com/chain.lifecycle.v1.ListFlowsByTxRequest",
3216 to_json: ::buffa::type_registry::any_to_json::<ListFlowsByTxRequest>,
3217 from_json: ::buffa::type_registry::any_from_json::<ListFlowsByTxRequest>,
3218 is_wkt: false,
3219};
3220#[derive(Clone, PartialEq, Default)]
3222#[derive(::serde::Serialize)]
3223#[serde(default)]
3224pub struct ListFlowsRequest {
3225 #[serde(
3230 rename = "limit",
3231 with = "::buffa::json_helpers::uint32",
3232 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
3233 )]
3234 pub limit: u32,
3235 #[serde(
3239 rename = "sort",
3240 with = "::buffa::json_helpers::proto_enum",
3241 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
3242 )]
3243 pub sort: ::buffa::EnumValue<Sort>,
3244 #[serde(
3248 rename = "flowKind",
3249 alias = "flow_kind",
3250 with = "::buffa::json_helpers::proto_enum",
3251 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
3252 )]
3253 pub flow_kind: ::buffa::EnumValue<FlowKind>,
3254 #[serde(
3259 rename = "flowState",
3260 alias = "flow_state",
3261 with = "::buffa::json_helpers::proto_enum",
3262 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
3263 )]
3264 pub flow_state: ::buffa::EnumValue<FlowState>,
3265 #[serde(
3270 rename = "txRef",
3271 alias = "tx_ref",
3272 with = "::buffa::json_helpers::proto_string",
3273 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
3274 )]
3275 pub tx_ref: ::buffa::alloc::string::String,
3276 #[serde(
3280 rename = "scope",
3281 with = "::buffa::json_helpers::proto_enum",
3282 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
3283 )]
3284 pub scope: ::buffa::EnumValue<ListScope>,
3285 #[serde(
3289 rename = "polyesterChainIds",
3290 alias = "polyester_chain_ids",
3291 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
3292 deserialize_with = "::buffa::json_helpers::null_as_default"
3293 )]
3294 pub polyester_chain_ids: ::buffa::alloc::vec::Vec<u32>,
3295 #[serde(
3299 rename = "zippedAssetIds",
3300 alias = "zipped_asset_ids",
3301 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
3302 deserialize_with = "::buffa::json_helpers::null_as_default"
3303 )]
3304 pub zipped_asset_ids: ::buffa::alloc::vec::Vec<u32>,
3305 #[serde(
3309 rename = "unifiedAssetIds",
3310 alias = "unified_asset_ids",
3311 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
3312 deserialize_with = "::buffa::json_helpers::null_as_default"
3313 )]
3314 pub unified_asset_ids: ::buffa::alloc::vec::Vec<u32>,
3315 #[serde(
3321 rename = "pageToken",
3322 alias = "page_token",
3323 with = "::buffa::json_helpers::proto_string",
3324 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
3325 )]
3326 pub page_token: ::buffa::alloc::string::String,
3327 #[serde(
3331 rename = "orderBy",
3332 alias = "order_by",
3333 with = "::buffa::json_helpers::proto_enum",
3334 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
3335 )]
3336 pub order_by: ::buffa::EnumValue<ListOrderBy>,
3337 #[serde(flatten)]
3338 pub account_selector: ::core::option::Option<
3339 __buffa::oneof::list_flows_request::AccountSelector,
3340 >,
3341 #[serde(skip)]
3342 #[doc(hidden)]
3343 pub __buffa_unknown_fields: ::buffa::UnknownFields,
3344}
3345impl ::core::fmt::Debug for ListFlowsRequest {
3346 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3347 f.debug_struct("ListFlowsRequest")
3348 .field("limit", &self.limit)
3349 .field("sort", &self.sort)
3350 .field("flow_kind", &self.flow_kind)
3351 .field("flow_state", &self.flow_state)
3352 .field("tx_ref", &self.tx_ref)
3353 .field("scope", &self.scope)
3354 .field("polyester_chain_ids", &self.polyester_chain_ids)
3355 .field("zipped_asset_ids", &self.zipped_asset_ids)
3356 .field("unified_asset_ids", &self.unified_asset_ids)
3357 .field("page_token", &self.page_token)
3358 .field("order_by", &self.order_by)
3359 .field("account_selector", &self.account_selector)
3360 .finish()
3361 }
3362}
3363impl ListFlowsRequest {
3364 pub const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.ListFlowsRequest";
3369}
3370::buffa::impl_default_instance!(ListFlowsRequest);
3371impl ::buffa::MessageName for ListFlowsRequest {
3372 const PACKAGE: &'static str = "chain.lifecycle.v1";
3373 const NAME: &'static str = "ListFlowsRequest";
3374 const FULL_NAME: &'static str = "chain.lifecycle.v1.ListFlowsRequest";
3375 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.ListFlowsRequest";
3376}
3377impl ::buffa::Message for ListFlowsRequest {
3378 #[allow(clippy::let_and_return)]
3384 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
3385 #[allow(unused_imports)]
3386 use ::buffa::Enumeration as _;
3387 let mut size = 0u32;
3388 if self.limit != 0u32 {
3389 size += 1u32 + ::buffa::types::uint32_encoded_len(self.limit) as u32;
3390 }
3391 {
3392 let val = self.sort.to_i32();
3393 if val != 0 {
3394 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
3395 }
3396 }
3397 {
3398 let val = self.flow_kind.to_i32();
3399 if val != 0 {
3400 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
3401 }
3402 }
3403 {
3404 let val = self.flow_state.to_i32();
3405 if val != 0 {
3406 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
3407 }
3408 }
3409 if !self.tx_ref.is_empty() {
3410 size += 1u32 + ::buffa::types::string_encoded_len(&self.tx_ref) as u32;
3411 }
3412 {
3413 let val = self.scope.to_i32();
3414 if val != 0 {
3415 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
3416 }
3417 }
3418 if let ::core::option::Option::Some(ref v) = self.account_selector {
3419 match v {
3420 __buffa::oneof::list_flows_request::AccountSelector::OwnerAccountId(
3421 _x,
3422 ) => {
3423 size += 1u32 + ::buffa::types::FIXED64_ENCODED_LEN as u32;
3424 }
3425 __buffa::oneof::list_flows_request::AccountSelector::SmartAccountAddress(
3426 x,
3427 ) => {
3428 size += 1u32 + ::buffa::types::string_encoded_len(x) as u32;
3429 }
3430 }
3431 }
3432 if !self.polyester_chain_ids.is_empty() {
3433 let payload: u32 = self
3434 .polyester_chain_ids
3435 .iter()
3436 .map(|&v| ::buffa::types::uint32_encoded_len(v) as u32)
3437 .sum::<u32>();
3438 size
3439 += 1u32 + ::buffa::encoding::varint_len(payload as u64) as u32 + payload;
3440 }
3441 if !self.zipped_asset_ids.is_empty() {
3442 let payload: u32 = self
3443 .zipped_asset_ids
3444 .iter()
3445 .map(|&v| ::buffa::types::uint32_encoded_len(v) as u32)
3446 .sum::<u32>();
3447 size
3448 += 1u32 + ::buffa::encoding::varint_len(payload as u64) as u32 + payload;
3449 }
3450 if !self.unified_asset_ids.is_empty() {
3451 let payload: u32 = self
3452 .unified_asset_ids
3453 .iter()
3454 .map(|&v| ::buffa::types::uint32_encoded_len(v) as u32)
3455 .sum::<u32>();
3456 size
3457 += 1u32 + ::buffa::encoding::varint_len(payload as u64) as u32 + payload;
3458 }
3459 if !self.page_token.is_empty() {
3460 size += 1u32 + ::buffa::types::string_encoded_len(&self.page_token) as u32;
3461 }
3462 {
3463 let val = self.order_by.to_i32();
3464 if val != 0 {
3465 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
3466 }
3467 }
3468 size += self.__buffa_unknown_fields.encoded_len() as u32;
3469 size
3470 }
3471 fn write_to(
3472 &self,
3473 _cache: &mut ::buffa::SizeCache,
3474 buf: &mut impl ::buffa::bytes::BufMut,
3475 ) {
3476 #[allow(unused_imports)]
3477 use ::buffa::Enumeration as _;
3478 if self.limit != 0u32 {
3479 ::buffa::types::put_uint32_field(1u32, self.limit, buf);
3480 }
3481 {
3482 let val = self.sort.to_i32();
3483 if val != 0 {
3484 ::buffa::types::put_int32_field(2u32, val, buf);
3485 }
3486 }
3487 {
3488 let val = self.flow_kind.to_i32();
3489 if val != 0 {
3490 ::buffa::types::put_int32_field(3u32, val, buf);
3491 }
3492 }
3493 {
3494 let val = self.flow_state.to_i32();
3495 if val != 0 {
3496 ::buffa::types::put_int32_field(4u32, val, buf);
3497 }
3498 }
3499 if !self.tx_ref.is_empty() {
3500 ::buffa::types::put_string_field(5u32, &self.tx_ref, buf);
3501 }
3502 {
3503 let val = self.scope.to_i32();
3504 if val != 0 {
3505 ::buffa::types::put_int32_field(6u32, val, buf);
3506 }
3507 }
3508 if let ::core::option::Option::Some(ref v) = self.account_selector {
3509 match v {
3510 __buffa::oneof::list_flows_request::AccountSelector::OwnerAccountId(
3511 x,
3512 ) => {
3513 ::buffa::types::put_fixed64_field(7u32, *x, buf);
3514 }
3515 __buffa::oneof::list_flows_request::AccountSelector::SmartAccountAddress(
3516 x,
3517 ) => {
3518 ::buffa::types::put_string_field(8u32, x, buf);
3519 }
3520 }
3521 }
3522 if !self.polyester_chain_ids.is_empty() {
3523 let payload: u32 = self
3524 .polyester_chain_ids
3525 .iter()
3526 .map(|&v| ::buffa::types::uint32_encoded_len(v) as u32)
3527 .sum::<u32>();
3528 ::buffa::types::put_len_delimited_header(9u32, payload, buf);
3529 for &v in &self.polyester_chain_ids {
3530 ::buffa::types::encode_uint32(v, buf);
3531 }
3532 }
3533 if !self.zipped_asset_ids.is_empty() {
3534 let payload: u32 = self
3535 .zipped_asset_ids
3536 .iter()
3537 .map(|&v| ::buffa::types::uint32_encoded_len(v) as u32)
3538 .sum::<u32>();
3539 ::buffa::types::put_len_delimited_header(10u32, payload, buf);
3540 for &v in &self.zipped_asset_ids {
3541 ::buffa::types::encode_uint32(v, buf);
3542 }
3543 }
3544 if !self.unified_asset_ids.is_empty() {
3545 let payload: u32 = self
3546 .unified_asset_ids
3547 .iter()
3548 .map(|&v| ::buffa::types::uint32_encoded_len(v) as u32)
3549 .sum::<u32>();
3550 ::buffa::types::put_len_delimited_header(11u32, payload, buf);
3551 for &v in &self.unified_asset_ids {
3552 ::buffa::types::encode_uint32(v, buf);
3553 }
3554 }
3555 if !self.page_token.is_empty() {
3556 ::buffa::types::put_string_field(12u32, &self.page_token, buf);
3557 }
3558 {
3559 let val = self.order_by.to_i32();
3560 if val != 0 {
3561 ::buffa::types::put_int32_field(13u32, val, buf);
3562 }
3563 }
3564 self.__buffa_unknown_fields.write_to(buf);
3565 }
3566 fn merge_field(
3567 &mut self,
3568 tag: ::buffa::encoding::Tag,
3569 buf: &mut impl ::buffa::bytes::Buf,
3570 ctx: ::buffa::DecodeContext<'_>,
3571 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
3572 #[allow(unused_imports)]
3573 use ::buffa::bytes::Buf as _;
3574 #[allow(unused_imports)]
3575 use ::buffa::Enumeration as _;
3576 match tag.field_number() {
3577 1u32 => {
3578 ::buffa::encoding::check_wire_type(
3579 tag,
3580 ::buffa::encoding::WireType::Varint,
3581 )?;
3582 self.limit = ::buffa::types::decode_uint32(buf)?;
3583 }
3584 2u32 => {
3585 ::buffa::encoding::check_wire_type(
3586 tag,
3587 ::buffa::encoding::WireType::Varint,
3588 )?;
3589 self.sort = ::buffa::EnumValue::from(::buffa::types::decode_int32(buf)?);
3590 }
3591 3u32 => {
3592 ::buffa::encoding::check_wire_type(
3593 tag,
3594 ::buffa::encoding::WireType::Varint,
3595 )?;
3596 self.flow_kind = ::buffa::EnumValue::from(
3597 ::buffa::types::decode_int32(buf)?,
3598 );
3599 }
3600 4u32 => {
3601 ::buffa::encoding::check_wire_type(
3602 tag,
3603 ::buffa::encoding::WireType::Varint,
3604 )?;
3605 self.flow_state = ::buffa::EnumValue::from(
3606 ::buffa::types::decode_int32(buf)?,
3607 );
3608 }
3609 5u32 => {
3610 ::buffa::encoding::check_wire_type(
3611 tag,
3612 ::buffa::encoding::WireType::LengthDelimited,
3613 )?;
3614 ::buffa::types::merge_string(&mut self.tx_ref, buf)?;
3615 }
3616 6u32 => {
3617 ::buffa::encoding::check_wire_type(
3618 tag,
3619 ::buffa::encoding::WireType::Varint,
3620 )?;
3621 self.scope = ::buffa::EnumValue::from(
3622 ::buffa::types::decode_int32(buf)?,
3623 );
3624 }
3625 7u32 => {
3626 ::buffa::encoding::check_wire_type(
3627 tag,
3628 ::buffa::encoding::WireType::Fixed64,
3629 )?;
3630 self.account_selector = ::core::option::Option::Some(
3631 __buffa::oneof::list_flows_request::AccountSelector::OwnerAccountId(
3632 ::buffa::types::decode_fixed64(buf)?,
3633 ),
3634 );
3635 }
3636 8u32 => {
3637 ::buffa::encoding::check_wire_type(
3638 tag,
3639 ::buffa::encoding::WireType::LengthDelimited,
3640 )?;
3641 self.account_selector = ::core::option::Option::Some(
3642 __buffa::oneof::list_flows_request::AccountSelector::SmartAccountAddress(
3643 ::buffa::types::decode_string(buf)?,
3644 ),
3645 );
3646 }
3647 9u32 => {
3648 if tag.wire_type() == ::buffa::encoding::WireType::LengthDelimited {
3649 let len = ::buffa::encoding::decode_varint(buf)?;
3650 let len = usize::try_from(len)
3651 .map_err(|_| ::buffa::DecodeError::MessageTooLarge)?;
3652 if buf.remaining() < len {
3653 return ::core::result::Result::Err(
3654 ::buffa::DecodeError::UnexpectedEof,
3655 );
3656 }
3657 self.polyester_chain_ids.reserve(len);
3658 let mut limited = buf.take(len);
3659 while limited.has_remaining() {
3660 self.polyester_chain_ids
3661 .push(::buffa::types::decode_uint32(&mut limited)?);
3662 }
3663 let leftover = limited.remaining();
3664 if leftover > 0 {
3665 limited.advance(leftover);
3666 }
3667 } else if tag.wire_type() == ::buffa::encoding::WireType::Varint {
3668 self.polyester_chain_ids.push(::buffa::types::decode_uint32(buf)?);
3669 } else {
3670 return ::core::result::Result::Err(
3671 ::buffa::encoding::wire_type_mismatch(
3672 tag,
3673 ::buffa::encoding::WireType::LengthDelimited,
3674 ),
3675 );
3676 }
3677 }
3678 10u32 => {
3679 if tag.wire_type() == ::buffa::encoding::WireType::LengthDelimited {
3680 let len = ::buffa::encoding::decode_varint(buf)?;
3681 let len = usize::try_from(len)
3682 .map_err(|_| ::buffa::DecodeError::MessageTooLarge)?;
3683 if buf.remaining() < len {
3684 return ::core::result::Result::Err(
3685 ::buffa::DecodeError::UnexpectedEof,
3686 );
3687 }
3688 self.zipped_asset_ids.reserve(len);
3689 let mut limited = buf.take(len);
3690 while limited.has_remaining() {
3691 self.zipped_asset_ids
3692 .push(::buffa::types::decode_uint32(&mut limited)?);
3693 }
3694 let leftover = limited.remaining();
3695 if leftover > 0 {
3696 limited.advance(leftover);
3697 }
3698 } else if tag.wire_type() == ::buffa::encoding::WireType::Varint {
3699 self.zipped_asset_ids.push(::buffa::types::decode_uint32(buf)?);
3700 } else {
3701 return ::core::result::Result::Err(
3702 ::buffa::encoding::wire_type_mismatch(
3703 tag,
3704 ::buffa::encoding::WireType::LengthDelimited,
3705 ),
3706 );
3707 }
3708 }
3709 11u32 => {
3710 if tag.wire_type() == ::buffa::encoding::WireType::LengthDelimited {
3711 let len = ::buffa::encoding::decode_varint(buf)?;
3712 let len = usize::try_from(len)
3713 .map_err(|_| ::buffa::DecodeError::MessageTooLarge)?;
3714 if buf.remaining() < len {
3715 return ::core::result::Result::Err(
3716 ::buffa::DecodeError::UnexpectedEof,
3717 );
3718 }
3719 self.unified_asset_ids.reserve(len);
3720 let mut limited = buf.take(len);
3721 while limited.has_remaining() {
3722 self.unified_asset_ids
3723 .push(::buffa::types::decode_uint32(&mut limited)?);
3724 }
3725 let leftover = limited.remaining();
3726 if leftover > 0 {
3727 limited.advance(leftover);
3728 }
3729 } else if tag.wire_type() == ::buffa::encoding::WireType::Varint {
3730 self.unified_asset_ids.push(::buffa::types::decode_uint32(buf)?);
3731 } else {
3732 return ::core::result::Result::Err(
3733 ::buffa::encoding::wire_type_mismatch(
3734 tag,
3735 ::buffa::encoding::WireType::LengthDelimited,
3736 ),
3737 );
3738 }
3739 }
3740 12u32 => {
3741 ::buffa::encoding::check_wire_type(
3742 tag,
3743 ::buffa::encoding::WireType::LengthDelimited,
3744 )?;
3745 ::buffa::types::merge_string(&mut self.page_token, buf)?;
3746 }
3747 13u32 => {
3748 ::buffa::encoding::check_wire_type(
3749 tag,
3750 ::buffa::encoding::WireType::Varint,
3751 )?;
3752 self.order_by = ::buffa::EnumValue::from(
3753 ::buffa::types::decode_int32(buf)?,
3754 );
3755 }
3756 _ => {
3757 self.__buffa_unknown_fields
3758 .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
3759 }
3760 }
3761 ::core::result::Result::Ok(())
3762 }
3763 fn clear(&mut self) {
3764 self.limit = 0u32;
3765 self.sort = ::buffa::EnumValue::from(0);
3766 self.flow_kind = ::buffa::EnumValue::from(0);
3767 self.flow_state = ::buffa::EnumValue::from(0);
3768 self.tx_ref.clear();
3769 self.scope = ::buffa::EnumValue::from(0);
3770 self.account_selector = ::core::option::Option::None;
3771 self.polyester_chain_ids.clear();
3772 self.zipped_asset_ids.clear();
3773 self.unified_asset_ids.clear();
3774 self.page_token.clear();
3775 self.order_by = ::buffa::EnumValue::from(0);
3776 self.__buffa_unknown_fields.clear();
3777 }
3778}
3779impl ::buffa::ExtensionSet for ListFlowsRequest {
3780 const PROTO_FQN: &'static str = "chain.lifecycle.v1.ListFlowsRequest";
3781 fn unknown_fields(&self) -> &::buffa::UnknownFields {
3782 &self.__buffa_unknown_fields
3783 }
3784 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
3785 &mut self.__buffa_unknown_fields
3786 }
3787}
3788impl<'de> serde::Deserialize<'de> for ListFlowsRequest {
3789 fn deserialize<D: serde::Deserializer<'de>>(
3790 d: D,
3791 ) -> ::core::result::Result<Self, D::Error> {
3792 struct _V;
3793 impl<'de> serde::de::Visitor<'de> for _V {
3794 type Value = ListFlowsRequest;
3795 fn expecting(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
3796 f.write_str("struct ListFlowsRequest")
3797 }
3798 #[allow(clippy::field_reassign_with_default)]
3799 fn visit_map<A: serde::de::MapAccess<'de>>(
3800 self,
3801 mut map: A,
3802 ) -> ::core::result::Result<ListFlowsRequest, A::Error> {
3803 let mut __f_limit: ::core::option::Option<u32> = None;
3804 let mut __f_sort: ::core::option::Option<::buffa::EnumValue<Sort>> = None;
3805 let mut __f_flow_kind: ::core::option::Option<
3806 ::buffa::EnumValue<FlowKind>,
3807 > = None;
3808 let mut __f_flow_state: ::core::option::Option<
3809 ::buffa::EnumValue<FlowState>,
3810 > = None;
3811 let mut __f_tx_ref: ::core::option::Option<
3812 ::buffa::alloc::string::String,
3813 > = None;
3814 let mut __f_scope: ::core::option::Option<
3815 ::buffa::EnumValue<ListScope>,
3816 > = None;
3817 let mut __f_polyester_chain_ids: ::core::option::Option<
3818 ::buffa::alloc::vec::Vec<u32>,
3819 > = None;
3820 let mut __f_zipped_asset_ids: ::core::option::Option<
3821 ::buffa::alloc::vec::Vec<u32>,
3822 > = None;
3823 let mut __f_unified_asset_ids: ::core::option::Option<
3824 ::buffa::alloc::vec::Vec<u32>,
3825 > = None;
3826 let mut __f_page_token: ::core::option::Option<
3827 ::buffa::alloc::string::String,
3828 > = None;
3829 let mut __f_order_by: ::core::option::Option<
3830 ::buffa::EnumValue<ListOrderBy>,
3831 > = None;
3832 let mut __oneof_account_selector: ::core::option::Option<
3833 __buffa::oneof::list_flows_request::AccountSelector,
3834 > = None;
3835 while let Some(key) = map.next_key::<::buffa::alloc::string::String>()? {
3836 match key.as_str() {
3837 "limit" => {
3838 __f_limit = Some({
3839 struct _S;
3840 impl<'de> serde::de::DeserializeSeed<'de> for _S {
3841 type Value = u32;
3842 fn deserialize<D: serde::Deserializer<'de>>(
3843 self,
3844 d: D,
3845 ) -> ::core::result::Result<u32, D::Error> {
3846 ::buffa::json_helpers::uint32::deserialize(d)
3847 }
3848 }
3849 map.next_value_seed(_S)?
3850 });
3851 }
3852 "sort" => {
3853 __f_sort = Some({
3854 struct _S;
3855 impl<'de> serde::de::DeserializeSeed<'de> for _S {
3856 type Value = ::buffa::EnumValue<Sort>;
3857 fn deserialize<D: serde::Deserializer<'de>>(
3858 self,
3859 d: D,
3860 ) -> ::core::result::Result<
3861 ::buffa::EnumValue<Sort>,
3862 D::Error,
3863 > {
3864 ::buffa::json_helpers::proto_enum::deserialize(d)
3865 }
3866 }
3867 map.next_value_seed(_S)?
3868 });
3869 }
3870 "flowKind" | "flow_kind" => {
3871 __f_flow_kind = Some({
3872 struct _S;
3873 impl<'de> serde::de::DeserializeSeed<'de> for _S {
3874 type Value = ::buffa::EnumValue<FlowKind>;
3875 fn deserialize<D: serde::Deserializer<'de>>(
3876 self,
3877 d: D,
3878 ) -> ::core::result::Result<
3879 ::buffa::EnumValue<FlowKind>,
3880 D::Error,
3881 > {
3882 ::buffa::json_helpers::proto_enum::deserialize(d)
3883 }
3884 }
3885 map.next_value_seed(_S)?
3886 });
3887 }
3888 "flowState" | "flow_state" => {
3889 __f_flow_state = Some({
3890 struct _S;
3891 impl<'de> serde::de::DeserializeSeed<'de> for _S {
3892 type Value = ::buffa::EnumValue<FlowState>;
3893 fn deserialize<D: serde::Deserializer<'de>>(
3894 self,
3895 d: D,
3896 ) -> ::core::result::Result<
3897 ::buffa::EnumValue<FlowState>,
3898 D::Error,
3899 > {
3900 ::buffa::json_helpers::proto_enum::deserialize(d)
3901 }
3902 }
3903 map.next_value_seed(_S)?
3904 });
3905 }
3906 "txRef" | "tx_ref" => {
3907 __f_tx_ref = Some({
3908 struct _S;
3909 impl<'de> serde::de::DeserializeSeed<'de> for _S {
3910 type Value = ::buffa::alloc::string::String;
3911 fn deserialize<D: serde::Deserializer<'de>>(
3912 self,
3913 d: D,
3914 ) -> ::core::result::Result<
3915 ::buffa::alloc::string::String,
3916 D::Error,
3917 > {
3918 ::buffa::json_helpers::proto_string::deserialize(d)
3919 }
3920 }
3921 map.next_value_seed(_S)?
3922 });
3923 }
3924 "scope" => {
3925 __f_scope = Some({
3926 struct _S;
3927 impl<'de> serde::de::DeserializeSeed<'de> for _S {
3928 type Value = ::buffa::EnumValue<ListScope>;
3929 fn deserialize<D: serde::Deserializer<'de>>(
3930 self,
3931 d: D,
3932 ) -> ::core::result::Result<
3933 ::buffa::EnumValue<ListScope>,
3934 D::Error,
3935 > {
3936 ::buffa::json_helpers::proto_enum::deserialize(d)
3937 }
3938 }
3939 map.next_value_seed(_S)?
3940 });
3941 }
3942 "polyesterChainIds" | "polyester_chain_ids" => {
3943 __f_polyester_chain_ids = Some({
3944 struct _S;
3945 impl<'de> serde::de::DeserializeSeed<'de> for _S {
3946 type Value = ::buffa::alloc::vec::Vec<u32>;
3947 fn deserialize<D: serde::Deserializer<'de>>(
3948 self,
3949 d: D,
3950 ) -> ::core::result::Result<
3951 ::buffa::alloc::vec::Vec<u32>,
3952 D::Error,
3953 > {
3954 ::buffa::json_helpers::null_as_default(d)
3955 }
3956 }
3957 map.next_value_seed(_S)?
3958 });
3959 }
3960 "zippedAssetIds" | "zipped_asset_ids" => {
3961 __f_zipped_asset_ids = Some({
3962 struct _S;
3963 impl<'de> serde::de::DeserializeSeed<'de> for _S {
3964 type Value = ::buffa::alloc::vec::Vec<u32>;
3965 fn deserialize<D: serde::Deserializer<'de>>(
3966 self,
3967 d: D,
3968 ) -> ::core::result::Result<
3969 ::buffa::alloc::vec::Vec<u32>,
3970 D::Error,
3971 > {
3972 ::buffa::json_helpers::null_as_default(d)
3973 }
3974 }
3975 map.next_value_seed(_S)?
3976 });
3977 }
3978 "unifiedAssetIds" | "unified_asset_ids" => {
3979 __f_unified_asset_ids = Some({
3980 struct _S;
3981 impl<'de> serde::de::DeserializeSeed<'de> for _S {
3982 type Value = ::buffa::alloc::vec::Vec<u32>;
3983 fn deserialize<D: serde::Deserializer<'de>>(
3984 self,
3985 d: D,
3986 ) -> ::core::result::Result<
3987 ::buffa::alloc::vec::Vec<u32>,
3988 D::Error,
3989 > {
3990 ::buffa::json_helpers::null_as_default(d)
3991 }
3992 }
3993 map.next_value_seed(_S)?
3994 });
3995 }
3996 "pageToken" | "page_token" => {
3997 __f_page_token = Some({
3998 struct _S;
3999 impl<'de> serde::de::DeserializeSeed<'de> for _S {
4000 type Value = ::buffa::alloc::string::String;
4001 fn deserialize<D: serde::Deserializer<'de>>(
4002 self,
4003 d: D,
4004 ) -> ::core::result::Result<
4005 ::buffa::alloc::string::String,
4006 D::Error,
4007 > {
4008 ::buffa::json_helpers::proto_string::deserialize(d)
4009 }
4010 }
4011 map.next_value_seed(_S)?
4012 });
4013 }
4014 "orderBy" | "order_by" => {
4015 __f_order_by = Some({
4016 struct _S;
4017 impl<'de> serde::de::DeserializeSeed<'de> for _S {
4018 type Value = ::buffa::EnumValue<ListOrderBy>;
4019 fn deserialize<D: serde::Deserializer<'de>>(
4020 self,
4021 d: D,
4022 ) -> ::core::result::Result<
4023 ::buffa::EnumValue<ListOrderBy>,
4024 D::Error,
4025 > {
4026 ::buffa::json_helpers::proto_enum::deserialize(d)
4027 }
4028 }
4029 map.next_value_seed(_S)?
4030 });
4031 }
4032 "ownerAccountId" | "owner_account_id" => {
4033 struct _DeserSeed;
4034 impl<'de> serde::de::DeserializeSeed<'de> for _DeserSeed {
4035 type Value = u64;
4036 fn deserialize<D: serde::Deserializer<'de>>(
4037 self,
4038 d: D,
4039 ) -> ::core::result::Result<u64, D::Error> {
4040 ::buffa::json_helpers::uint64::deserialize(d)
4041 }
4042 }
4043 let v: ::core::option::Option<u64> = map
4044 .next_value_seed(
4045 ::buffa::json_helpers::NullableDeserializeSeed(_DeserSeed),
4046 )?;
4047 if let Some(v) = v {
4048 if __oneof_account_selector.is_some() {
4049 return Err(
4050 serde::de::Error::custom(
4051 "multiple oneof fields set for 'account_selector'",
4052 ),
4053 );
4054 }
4055 __oneof_account_selector = Some(
4056 __buffa::oneof::list_flows_request::AccountSelector::OwnerAccountId(
4057 v,
4058 ),
4059 );
4060 }
4061 }
4062 "smartAccountAddress" | "smart_account_address" => {
4063 let v: ::core::option::Option<
4064 ::buffa::alloc::string::String,
4065 > = map
4066 .next_value_seed(
4067 ::buffa::json_helpers::NullableDeserializeSeed(
4068 ::buffa::json_helpers::DefaultDeserializeSeed::<
4069 ::buffa::alloc::string::String,
4070 >::new(),
4071 ),
4072 )?;
4073 if let Some(v) = v {
4074 if __oneof_account_selector.is_some() {
4075 return Err(
4076 serde::de::Error::custom(
4077 "multiple oneof fields set for 'account_selector'",
4078 ),
4079 );
4080 }
4081 __oneof_account_selector = Some(
4082 __buffa::oneof::list_flows_request::AccountSelector::SmartAccountAddress(
4083 v,
4084 ),
4085 );
4086 }
4087 }
4088 _ => {
4089 map.next_value::<serde::de::IgnoredAny>()?;
4090 }
4091 }
4092 }
4093 let mut __r = <ListFlowsRequest as ::core::default::Default>::default();
4094 if let ::core::option::Option::Some(v) = __f_limit {
4095 __r.limit = v;
4096 }
4097 if let ::core::option::Option::Some(v) = __f_sort {
4098 __r.sort = v;
4099 }
4100 if let ::core::option::Option::Some(v) = __f_flow_kind {
4101 __r.flow_kind = v;
4102 }
4103 if let ::core::option::Option::Some(v) = __f_flow_state {
4104 __r.flow_state = v;
4105 }
4106 if let ::core::option::Option::Some(v) = __f_tx_ref {
4107 __r.tx_ref = v;
4108 }
4109 if let ::core::option::Option::Some(v) = __f_scope {
4110 __r.scope = v;
4111 }
4112 if let ::core::option::Option::Some(v) = __f_polyester_chain_ids {
4113 __r.polyester_chain_ids = v;
4114 }
4115 if let ::core::option::Option::Some(v) = __f_zipped_asset_ids {
4116 __r.zipped_asset_ids = v;
4117 }
4118 if let ::core::option::Option::Some(v) = __f_unified_asset_ids {
4119 __r.unified_asset_ids = v;
4120 }
4121 if let ::core::option::Option::Some(v) = __f_page_token {
4122 __r.page_token = v;
4123 }
4124 if let ::core::option::Option::Some(v) = __f_order_by {
4125 __r.order_by = v;
4126 }
4127 __r.account_selector = __oneof_account_selector;
4128 Ok(__r)
4129 }
4130 }
4131 d.deserialize_map(_V)
4132 }
4133}
4134impl ::buffa::json_helpers::ProtoElemJson for ListFlowsRequest {
4135 fn serialize_proto_json<S: ::serde::Serializer>(
4136 v: &Self,
4137 s: S,
4138 ) -> ::core::result::Result<S::Ok, S::Error> {
4139 ::serde::Serialize::serialize(v, s)
4140 }
4141 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
4142 d: D,
4143 ) -> ::core::result::Result<Self, D::Error> {
4144 <Self as ::serde::Deserialize>::deserialize(d)
4145 }
4146}
4147#[doc(hidden)]
4148pub const __LIST_FLOWS_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
4149 type_url: "type.googleapis.com/chain.lifecycle.v1.ListFlowsRequest",
4150 to_json: ::buffa::type_registry::any_to_json::<ListFlowsRequest>,
4151 from_json: ::buffa::type_registry::any_from_json::<ListFlowsRequest>,
4152 is_wkt: false,
4153};
4154pub mod list_flows_request {
4155 #[allow(unused_imports)]
4156 use super::*;
4157 #[doc(inline)]
4158 pub use super::__buffa::oneof::list_flows_request::AccountSelector;
4159 #[doc(inline)]
4160 pub use super::__buffa::view::oneof::list_flows_request::AccountSelector as AccountSelectorView;
4161}
4162#[derive(Clone, PartialEq, Default)]
4164#[derive(::serde::Serialize, ::serde::Deserialize)]
4165#[serde(default)]
4166pub struct ListFlowsResponse {
4167 #[serde(
4172 rename = "flows",
4173 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
4174 deserialize_with = "::buffa::json_helpers::null_as_default"
4175 )]
4176 pub flows: ::buffa::alloc::vec::Vec<FlowSummaryView>,
4177 #[serde(
4181 rename = "nextPageToken",
4182 alias = "next_page_token",
4183 with = "::buffa::json_helpers::proto_string",
4184 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
4185 )]
4186 pub next_page_token: ::buffa::alloc::string::String,
4187 #[serde(skip)]
4188 #[doc(hidden)]
4189 pub __buffa_unknown_fields: ::buffa::UnknownFields,
4190}
4191impl ::core::fmt::Debug for ListFlowsResponse {
4192 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4193 f.debug_struct("ListFlowsResponse")
4194 .field("flows", &self.flows)
4195 .field("next_page_token", &self.next_page_token)
4196 .finish()
4197 }
4198}
4199impl ListFlowsResponse {
4200 pub const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.ListFlowsResponse";
4205}
4206::buffa::impl_default_instance!(ListFlowsResponse);
4207impl ::buffa::MessageName for ListFlowsResponse {
4208 const PACKAGE: &'static str = "chain.lifecycle.v1";
4209 const NAME: &'static str = "ListFlowsResponse";
4210 const FULL_NAME: &'static str = "chain.lifecycle.v1.ListFlowsResponse";
4211 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.ListFlowsResponse";
4212}
4213impl ::buffa::Message for ListFlowsResponse {
4214 #[allow(clippy::let_and_return)]
4220 fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
4221 #[allow(unused_imports)]
4222 use ::buffa::Enumeration as _;
4223 let mut size = 0u32;
4224 for v in &self.flows {
4225 let __slot = __cache.reserve();
4226 let inner_size = v.compute_size(__cache);
4227 __cache.set(__slot, inner_size);
4228 size
4229 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
4230 + inner_size;
4231 }
4232 if !self.next_page_token.is_empty() {
4233 size
4234 += 1u32
4235 + ::buffa::types::string_encoded_len(&self.next_page_token) as u32;
4236 }
4237 size += self.__buffa_unknown_fields.encoded_len() as u32;
4238 size
4239 }
4240 fn write_to(
4241 &self,
4242 __cache: &mut ::buffa::SizeCache,
4243 buf: &mut impl ::buffa::bytes::BufMut,
4244 ) {
4245 #[allow(unused_imports)]
4246 use ::buffa::Enumeration as _;
4247 for v in &self.flows {
4248 ::buffa::types::put_len_delimited_header(1u32, __cache.consume_next(), buf);
4249 v.write_to(__cache, buf);
4250 }
4251 if !self.next_page_token.is_empty() {
4252 ::buffa::types::put_string_field(2u32, &self.next_page_token, buf);
4253 }
4254 self.__buffa_unknown_fields.write_to(buf);
4255 }
4256 fn merge_field(
4257 &mut self,
4258 tag: ::buffa::encoding::Tag,
4259 buf: &mut impl ::buffa::bytes::Buf,
4260 ctx: ::buffa::DecodeContext<'_>,
4261 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
4262 #[allow(unused_imports)]
4263 use ::buffa::bytes::Buf as _;
4264 #[allow(unused_imports)]
4265 use ::buffa::Enumeration as _;
4266 match tag.field_number() {
4267 1u32 => {
4268 ::buffa::encoding::check_wire_type(
4269 tag,
4270 ::buffa::encoding::WireType::LengthDelimited,
4271 )?;
4272 let mut elem = ::core::default::Default::default();
4273 ::buffa::Message::merge_length_delimited(&mut elem, buf, ctx)?;
4274 self.flows.push(elem);
4275 }
4276 2u32 => {
4277 ::buffa::encoding::check_wire_type(
4278 tag,
4279 ::buffa::encoding::WireType::LengthDelimited,
4280 )?;
4281 ::buffa::types::merge_string(&mut self.next_page_token, buf)?;
4282 }
4283 _ => {
4284 self.__buffa_unknown_fields
4285 .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
4286 }
4287 }
4288 ::core::result::Result::Ok(())
4289 }
4290 fn clear(&mut self) {
4291 self.flows.clear();
4292 self.next_page_token.clear();
4293 self.__buffa_unknown_fields.clear();
4294 }
4295}
4296impl ::buffa::ExtensionSet for ListFlowsResponse {
4297 const PROTO_FQN: &'static str = "chain.lifecycle.v1.ListFlowsResponse";
4298 fn unknown_fields(&self) -> &::buffa::UnknownFields {
4299 &self.__buffa_unknown_fields
4300 }
4301 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
4302 &mut self.__buffa_unknown_fields
4303 }
4304}
4305impl ::buffa::json_helpers::ProtoElemJson for ListFlowsResponse {
4306 fn serialize_proto_json<S: ::serde::Serializer>(
4307 v: &Self,
4308 s: S,
4309 ) -> ::core::result::Result<S::Ok, S::Error> {
4310 ::serde::Serialize::serialize(v, s)
4311 }
4312 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
4313 d: D,
4314 ) -> ::core::result::Result<Self, D::Error> {
4315 <Self as ::serde::Deserialize>::deserialize(d)
4316 }
4317}
4318#[doc(hidden)]
4319pub const __LIST_FLOWS_RESPONSE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
4320 type_url: "type.googleapis.com/chain.lifecycle.v1.ListFlowsResponse",
4321 to_json: ::buffa::type_registry::any_to_json::<ListFlowsResponse>,
4322 from_json: ::buffa::type_registry::any_from_json::<ListFlowsResponse>,
4323 is_wkt: false,
4324};
4325#[derive(Clone, PartialEq, Default)]
4327#[derive(::serde::Serialize, ::serde::Deserialize)]
4328#[serde(default)]
4329pub struct FlowTxMatchView {
4330 #[serde(
4334 rename = "flowId",
4335 alias = "flow_id",
4336 with = "::buffa::json_helpers::proto_string",
4337 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
4338 )]
4339 pub flow_id: ::buffa::alloc::string::String,
4340 #[serde(
4344 rename = "flowKind",
4345 alias = "flow_kind",
4346 with = "::buffa::json_helpers::proto_enum",
4347 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
4348 )]
4349 pub flow_kind: ::buffa::EnumValue<FlowKind>,
4350 #[serde(
4354 rename = "sourceTxHash",
4355 alias = "source_tx_hash",
4356 with = "::buffa::json_helpers::proto_string",
4357 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
4358 )]
4359 pub source_tx_hash: ::buffa::alloc::string::String,
4360 #[serde(
4364 rename = "latestTxRef",
4365 alias = "latest_tx_ref",
4366 with = "::buffa::json_helpers::proto_string",
4367 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
4368 )]
4369 pub latest_tx_ref: ::buffa::alloc::string::String,
4370 #[serde(
4376 rename = "txOccurrenceIndex",
4377 alias = "tx_occurrence_index",
4378 with = "::buffa::json_helpers::uint64",
4379 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
4380 )]
4381 pub tx_occurrence_index: u64,
4382 #[serde(
4386 rename = "sourceDomain",
4387 alias = "source_domain",
4388 with = "::buffa::json_helpers::proto_enum",
4389 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
4390 )]
4391 pub source_domain: ::buffa::EnumValue<FlowDomain>,
4392 #[serde(
4396 rename = "destinationDomain",
4397 alias = "destination_domain",
4398 with = "::buffa::json_helpers::proto_enum",
4399 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
4400 )]
4401 pub destination_domain: ::buffa::EnumValue<FlowDomain>,
4402 #[serde(
4406 rename = "currentStep",
4407 alias = "current_step",
4408 with = "::buffa::json_helpers::proto_enum",
4409 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
4410 )]
4411 pub current_step: ::buffa::EnumValue<FlowStep>,
4412 #[serde(
4416 rename = "isOpen",
4417 alias = "is_open",
4418 with = "::buffa::json_helpers::proto_bool",
4419 skip_serializing_if = "::buffa::json_helpers::skip_if::is_false"
4420 )]
4421 pub is_open: bool,
4422 #[serde(
4426 rename = "isTerminal",
4427 alias = "is_terminal",
4428 with = "::buffa::json_helpers::proto_bool",
4429 skip_serializing_if = "::buffa::json_helpers::skip_if::is_false"
4430 )]
4431 pub is_terminal: bool,
4432 #[serde(
4436 rename = "assetIds",
4437 alias = "asset_ids",
4438 skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
4439 )]
4440 pub asset_ids: ::buffa::MessageField<AssetIds>,
4441 #[serde(
4445 rename = "polyesterChainId",
4446 alias = "polyester_chain_id",
4447 with = "::buffa::json_helpers::uint32",
4448 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
4449 )]
4450 pub polyester_chain_id: u32,
4451 #[serde(
4455 rename = "amountE18",
4456 alias = "amount_e18",
4457 skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
4458 )]
4459 pub amount_e18: ::buffa::MessageField<
4460 super::super::super::polyester::r#type::v1::U128,
4461 >,
4462 #[serde(
4466 rename = "sourceAddress",
4467 alias = "source_address",
4468 with = "::buffa::json_helpers::proto_string",
4469 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
4470 )]
4471 pub source_address: ::buffa::alloc::string::String,
4472 #[serde(
4476 rename = "destinationAddress",
4477 alias = "destination_address",
4478 with = "::buffa::json_helpers::proto_string",
4479 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
4480 )]
4481 pub destination_address: ::buffa::alloc::string::String,
4482 #[serde(
4486 rename = "lifecycleReason",
4487 alias = "lifecycle_reason",
4488 with = "::buffa::json_helpers::proto_enum",
4489 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
4490 )]
4491 pub lifecycle_reason: ::buffa::EnumValue<LifecycleReason>,
4492 #[serde(
4496 rename = "lastActivityAtUnixMs",
4497 alias = "last_activity_at_unix_ms",
4498 with = "::buffa::json_helpers::uint64",
4499 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
4500 )]
4501 pub last_activity_at_unix_ms: u64,
4502 #[serde(
4506 rename = "ownerAccountId",
4507 alias = "owner_account_id",
4508 with = "::buffa::json_helpers::uint64",
4509 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
4510 )]
4511 pub owner_account_id: u64,
4512 #[serde(
4516 rename = "smartAccountAddress",
4517 alias = "smart_account_address",
4518 with = "::buffa::json_helpers::proto_string",
4519 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
4520 )]
4521 pub smart_account_address: ::buffa::alloc::string::String,
4522 #[serde(
4526 rename = "zipperReason",
4527 alias = "zipper_reason",
4528 skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
4529 )]
4530 pub zipper_reason: ::buffa::MessageField<
4531 super::super::zipper::v1::ZipperReasonDetails,
4532 >,
4533 #[serde(skip)]
4534 #[doc(hidden)]
4535 pub __buffa_unknown_fields: ::buffa::UnknownFields,
4536}
4537impl ::core::fmt::Debug for FlowTxMatchView {
4538 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4539 f.debug_struct("FlowTxMatchView")
4540 .field("flow_id", &self.flow_id)
4541 .field("flow_kind", &self.flow_kind)
4542 .field("source_tx_hash", &self.source_tx_hash)
4543 .field("latest_tx_ref", &self.latest_tx_ref)
4544 .field("tx_occurrence_index", &self.tx_occurrence_index)
4545 .field("source_domain", &self.source_domain)
4546 .field("destination_domain", &self.destination_domain)
4547 .field("current_step", &self.current_step)
4548 .field("is_open", &self.is_open)
4549 .field("is_terminal", &self.is_terminal)
4550 .field("asset_ids", &self.asset_ids)
4551 .field("polyester_chain_id", &self.polyester_chain_id)
4552 .field("amount_e18", &self.amount_e18)
4553 .field("source_address", &self.source_address)
4554 .field("destination_address", &self.destination_address)
4555 .field("lifecycle_reason", &self.lifecycle_reason)
4556 .field("last_activity_at_unix_ms", &self.last_activity_at_unix_ms)
4557 .field("owner_account_id", &self.owner_account_id)
4558 .field("smart_account_address", &self.smart_account_address)
4559 .field("zipper_reason", &self.zipper_reason)
4560 .finish()
4561 }
4562}
4563impl FlowTxMatchView {
4564 pub const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowTxMatchView";
4569}
4570::buffa::impl_default_instance!(FlowTxMatchView);
4571impl ::buffa::MessageName for FlowTxMatchView {
4572 const PACKAGE: &'static str = "chain.lifecycle.v1";
4573 const NAME: &'static str = "FlowTxMatchView";
4574 const FULL_NAME: &'static str = "chain.lifecycle.v1.FlowTxMatchView";
4575 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowTxMatchView";
4576}
4577impl ::buffa::Message for FlowTxMatchView {
4578 #[allow(clippy::let_and_return)]
4584 fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
4585 #[allow(unused_imports)]
4586 use ::buffa::Enumeration as _;
4587 let mut size = 0u32;
4588 if !self.flow_id.is_empty() {
4589 size += 1u32 + ::buffa::types::string_encoded_len(&self.flow_id) as u32;
4590 }
4591 {
4592 let val = self.flow_kind.to_i32();
4593 if val != 0 {
4594 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
4595 }
4596 }
4597 if !self.source_tx_hash.is_empty() {
4598 size
4599 += 1u32
4600 + ::buffa::types::string_encoded_len(&self.source_tx_hash) as u32;
4601 }
4602 if !self.latest_tx_ref.is_empty() {
4603 size
4604 += 1u32 + ::buffa::types::string_encoded_len(&self.latest_tx_ref) as u32;
4605 }
4606 if self.tx_occurrence_index != 0u64 {
4607 size
4608 += 1u32
4609 + ::buffa::types::uint64_encoded_len(self.tx_occurrence_index)
4610 as u32;
4611 }
4612 {
4613 let val = self.source_domain.to_i32();
4614 if val != 0 {
4615 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
4616 }
4617 }
4618 {
4619 let val = self.destination_domain.to_i32();
4620 if val != 0 {
4621 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
4622 }
4623 }
4624 {
4625 let val = self.current_step.to_i32();
4626 if val != 0 {
4627 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
4628 }
4629 }
4630 if self.is_open {
4631 size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
4632 }
4633 if self.is_terminal {
4634 size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
4635 }
4636 if self.asset_ids.is_set() {
4637 let __slot = __cache.reserve();
4638 let inner_size = self.asset_ids.compute_size(__cache);
4639 __cache.set(__slot, inner_size);
4640 size
4641 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
4642 + inner_size;
4643 }
4644 if self.polyester_chain_id != 0u32 {
4645 size
4646 += 1u32
4647 + ::buffa::types::uint32_encoded_len(self.polyester_chain_id) as u32;
4648 }
4649 if self.amount_e18.is_set() {
4650 let __slot = __cache.reserve();
4651 let inner_size = self.amount_e18.compute_size(__cache);
4652 __cache.set(__slot, inner_size);
4653 size
4654 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
4655 + inner_size;
4656 }
4657 if !self.source_address.is_empty() {
4658 size
4659 += 1u32
4660 + ::buffa::types::string_encoded_len(&self.source_address) as u32;
4661 }
4662 if !self.destination_address.is_empty() {
4663 size
4664 += 2u32
4665 + ::buffa::types::string_encoded_len(&self.destination_address)
4666 as u32;
4667 }
4668 {
4669 let val = self.lifecycle_reason.to_i32();
4670 if val != 0 {
4671 size += 2u32 + ::buffa::types::int32_encoded_len(val) as u32;
4672 }
4673 }
4674 if self.last_activity_at_unix_ms != 0u64 {
4675 size
4676 += 2u32
4677 + ::buffa::types::uint64_encoded_len(self.last_activity_at_unix_ms)
4678 as u32;
4679 }
4680 if self.owner_account_id != 0u64 {
4681 size += 2u32 + ::buffa::types::FIXED64_ENCODED_LEN as u32;
4682 }
4683 if !self.smart_account_address.is_empty() {
4684 size
4685 += 2u32
4686 + ::buffa::types::string_encoded_len(&self.smart_account_address)
4687 as u32;
4688 }
4689 if self.zipper_reason.is_set() {
4690 let __slot = __cache.reserve();
4691 let inner_size = self.zipper_reason.compute_size(__cache);
4692 __cache.set(__slot, inner_size);
4693 size
4694 += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
4695 + inner_size;
4696 }
4697 size += self.__buffa_unknown_fields.encoded_len() as u32;
4698 size
4699 }
4700 fn write_to(
4701 &self,
4702 __cache: &mut ::buffa::SizeCache,
4703 buf: &mut impl ::buffa::bytes::BufMut,
4704 ) {
4705 #[allow(unused_imports)]
4706 use ::buffa::Enumeration as _;
4707 if !self.flow_id.is_empty() {
4708 ::buffa::types::put_string_field(1u32, &self.flow_id, buf);
4709 }
4710 {
4711 let val = self.flow_kind.to_i32();
4712 if val != 0 {
4713 ::buffa::types::put_int32_field(3u32, val, buf);
4714 }
4715 }
4716 if !self.source_tx_hash.is_empty() {
4717 ::buffa::types::put_string_field(4u32, &self.source_tx_hash, buf);
4718 }
4719 if !self.latest_tx_ref.is_empty() {
4720 ::buffa::types::put_string_field(5u32, &self.latest_tx_ref, buf);
4721 }
4722 if self.tx_occurrence_index != 0u64 {
4723 ::buffa::types::put_uint64_field(6u32, self.tx_occurrence_index, buf);
4724 }
4725 {
4726 let val = self.source_domain.to_i32();
4727 if val != 0 {
4728 ::buffa::types::put_int32_field(7u32, val, buf);
4729 }
4730 }
4731 {
4732 let val = self.destination_domain.to_i32();
4733 if val != 0 {
4734 ::buffa::types::put_int32_field(8u32, val, buf);
4735 }
4736 }
4737 {
4738 let val = self.current_step.to_i32();
4739 if val != 0 {
4740 ::buffa::types::put_int32_field(9u32, val, buf);
4741 }
4742 }
4743 if self.is_open {
4744 ::buffa::types::put_bool_field(10u32, self.is_open, buf);
4745 }
4746 if self.is_terminal {
4747 ::buffa::types::put_bool_field(11u32, self.is_terminal, buf);
4748 }
4749 if self.asset_ids.is_set() {
4750 ::buffa::types::put_len_delimited_header(12u32, __cache.consume_next(), buf);
4751 self.asset_ids.write_to(__cache, buf);
4752 }
4753 if self.polyester_chain_id != 0u32 {
4754 ::buffa::types::put_uint32_field(13u32, self.polyester_chain_id, buf);
4755 }
4756 if self.amount_e18.is_set() {
4757 ::buffa::types::put_len_delimited_header(14u32, __cache.consume_next(), buf);
4758 self.amount_e18.write_to(__cache, buf);
4759 }
4760 if !self.source_address.is_empty() {
4761 ::buffa::types::put_string_field(15u32, &self.source_address, buf);
4762 }
4763 if !self.destination_address.is_empty() {
4764 ::buffa::types::put_string_field(16u32, &self.destination_address, buf);
4765 }
4766 {
4767 let val = self.lifecycle_reason.to_i32();
4768 if val != 0 {
4769 ::buffa::types::put_int32_field(17u32, val, buf);
4770 }
4771 }
4772 if self.last_activity_at_unix_ms != 0u64 {
4773 ::buffa::types::put_uint64_field(18u32, self.last_activity_at_unix_ms, buf);
4774 }
4775 if self.owner_account_id != 0u64 {
4776 ::buffa::types::put_fixed64_field(19u32, self.owner_account_id, buf);
4777 }
4778 if !self.smart_account_address.is_empty() {
4779 ::buffa::types::put_string_field(20u32, &self.smart_account_address, buf);
4780 }
4781 if self.zipper_reason.is_set() {
4782 ::buffa::types::put_len_delimited_header(21u32, __cache.consume_next(), buf);
4783 self.zipper_reason.write_to(__cache, buf);
4784 }
4785 self.__buffa_unknown_fields.write_to(buf);
4786 }
4787 fn merge_field(
4788 &mut self,
4789 tag: ::buffa::encoding::Tag,
4790 buf: &mut impl ::buffa::bytes::Buf,
4791 ctx: ::buffa::DecodeContext<'_>,
4792 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
4793 #[allow(unused_imports)]
4794 use ::buffa::bytes::Buf as _;
4795 #[allow(unused_imports)]
4796 use ::buffa::Enumeration as _;
4797 match tag.field_number() {
4798 1u32 => {
4799 ::buffa::encoding::check_wire_type(
4800 tag,
4801 ::buffa::encoding::WireType::LengthDelimited,
4802 )?;
4803 ::buffa::types::merge_string(&mut self.flow_id, buf)?;
4804 }
4805 3u32 => {
4806 ::buffa::encoding::check_wire_type(
4807 tag,
4808 ::buffa::encoding::WireType::Varint,
4809 )?;
4810 self.flow_kind = ::buffa::EnumValue::from(
4811 ::buffa::types::decode_int32(buf)?,
4812 );
4813 }
4814 4u32 => {
4815 ::buffa::encoding::check_wire_type(
4816 tag,
4817 ::buffa::encoding::WireType::LengthDelimited,
4818 )?;
4819 ::buffa::types::merge_string(&mut self.source_tx_hash, buf)?;
4820 }
4821 5u32 => {
4822 ::buffa::encoding::check_wire_type(
4823 tag,
4824 ::buffa::encoding::WireType::LengthDelimited,
4825 )?;
4826 ::buffa::types::merge_string(&mut self.latest_tx_ref, buf)?;
4827 }
4828 6u32 => {
4829 ::buffa::encoding::check_wire_type(
4830 tag,
4831 ::buffa::encoding::WireType::Varint,
4832 )?;
4833 self.tx_occurrence_index = ::buffa::types::decode_uint64(buf)?;
4834 }
4835 7u32 => {
4836 ::buffa::encoding::check_wire_type(
4837 tag,
4838 ::buffa::encoding::WireType::Varint,
4839 )?;
4840 self.source_domain = ::buffa::EnumValue::from(
4841 ::buffa::types::decode_int32(buf)?,
4842 );
4843 }
4844 8u32 => {
4845 ::buffa::encoding::check_wire_type(
4846 tag,
4847 ::buffa::encoding::WireType::Varint,
4848 )?;
4849 self.destination_domain = ::buffa::EnumValue::from(
4850 ::buffa::types::decode_int32(buf)?,
4851 );
4852 }
4853 9u32 => {
4854 ::buffa::encoding::check_wire_type(
4855 tag,
4856 ::buffa::encoding::WireType::Varint,
4857 )?;
4858 self.current_step = ::buffa::EnumValue::from(
4859 ::buffa::types::decode_int32(buf)?,
4860 );
4861 }
4862 10u32 => {
4863 ::buffa::encoding::check_wire_type(
4864 tag,
4865 ::buffa::encoding::WireType::Varint,
4866 )?;
4867 self.is_open = ::buffa::types::decode_bool(buf)?;
4868 }
4869 11u32 => {
4870 ::buffa::encoding::check_wire_type(
4871 tag,
4872 ::buffa::encoding::WireType::Varint,
4873 )?;
4874 self.is_terminal = ::buffa::types::decode_bool(buf)?;
4875 }
4876 12u32 => {
4877 ::buffa::encoding::check_wire_type(
4878 tag,
4879 ::buffa::encoding::WireType::LengthDelimited,
4880 )?;
4881 ::buffa::Message::merge_length_delimited(
4882 self.asset_ids.get_or_insert_default(),
4883 buf,
4884 ctx,
4885 )?;
4886 }
4887 13u32 => {
4888 ::buffa::encoding::check_wire_type(
4889 tag,
4890 ::buffa::encoding::WireType::Varint,
4891 )?;
4892 self.polyester_chain_id = ::buffa::types::decode_uint32(buf)?;
4893 }
4894 14u32 => {
4895 ::buffa::encoding::check_wire_type(
4896 tag,
4897 ::buffa::encoding::WireType::LengthDelimited,
4898 )?;
4899 ::buffa::Message::merge_length_delimited(
4900 self.amount_e18.get_or_insert_default(),
4901 buf,
4902 ctx,
4903 )?;
4904 }
4905 15u32 => {
4906 ::buffa::encoding::check_wire_type(
4907 tag,
4908 ::buffa::encoding::WireType::LengthDelimited,
4909 )?;
4910 ::buffa::types::merge_string(&mut self.source_address, buf)?;
4911 }
4912 16u32 => {
4913 ::buffa::encoding::check_wire_type(
4914 tag,
4915 ::buffa::encoding::WireType::LengthDelimited,
4916 )?;
4917 ::buffa::types::merge_string(&mut self.destination_address, buf)?;
4918 }
4919 17u32 => {
4920 ::buffa::encoding::check_wire_type(
4921 tag,
4922 ::buffa::encoding::WireType::Varint,
4923 )?;
4924 self.lifecycle_reason = ::buffa::EnumValue::from(
4925 ::buffa::types::decode_int32(buf)?,
4926 );
4927 }
4928 18u32 => {
4929 ::buffa::encoding::check_wire_type(
4930 tag,
4931 ::buffa::encoding::WireType::Varint,
4932 )?;
4933 self.last_activity_at_unix_ms = ::buffa::types::decode_uint64(buf)?;
4934 }
4935 19u32 => {
4936 ::buffa::encoding::check_wire_type(
4937 tag,
4938 ::buffa::encoding::WireType::Fixed64,
4939 )?;
4940 self.owner_account_id = ::buffa::types::decode_fixed64(buf)?;
4941 }
4942 20u32 => {
4943 ::buffa::encoding::check_wire_type(
4944 tag,
4945 ::buffa::encoding::WireType::LengthDelimited,
4946 )?;
4947 ::buffa::types::merge_string(&mut self.smart_account_address, buf)?;
4948 }
4949 21u32 => {
4950 ::buffa::encoding::check_wire_type(
4951 tag,
4952 ::buffa::encoding::WireType::LengthDelimited,
4953 )?;
4954 ::buffa::Message::merge_length_delimited(
4955 self.zipper_reason.get_or_insert_default(),
4956 buf,
4957 ctx,
4958 )?;
4959 }
4960 _ => {
4961 self.__buffa_unknown_fields
4962 .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
4963 }
4964 }
4965 ::core::result::Result::Ok(())
4966 }
4967 fn clear(&mut self) {
4968 self.flow_id.clear();
4969 self.flow_kind = ::buffa::EnumValue::from(0);
4970 self.source_tx_hash.clear();
4971 self.latest_tx_ref.clear();
4972 self.tx_occurrence_index = 0u64;
4973 self.source_domain = ::buffa::EnumValue::from(0);
4974 self.destination_domain = ::buffa::EnumValue::from(0);
4975 self.current_step = ::buffa::EnumValue::from(0);
4976 self.is_open = false;
4977 self.is_terminal = false;
4978 self.asset_ids = ::buffa::MessageField::none();
4979 self.polyester_chain_id = 0u32;
4980 self.amount_e18 = ::buffa::MessageField::none();
4981 self.source_address.clear();
4982 self.destination_address.clear();
4983 self.lifecycle_reason = ::buffa::EnumValue::from(0);
4984 self.last_activity_at_unix_ms = 0u64;
4985 self.owner_account_id = 0u64;
4986 self.smart_account_address.clear();
4987 self.zipper_reason = ::buffa::MessageField::none();
4988 self.__buffa_unknown_fields.clear();
4989 }
4990}
4991impl ::buffa::ExtensionSet for FlowTxMatchView {
4992 const PROTO_FQN: &'static str = "chain.lifecycle.v1.FlowTxMatchView";
4993 fn unknown_fields(&self) -> &::buffa::UnknownFields {
4994 &self.__buffa_unknown_fields
4995 }
4996 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
4997 &mut self.__buffa_unknown_fields
4998 }
4999}
5000impl ::buffa::json_helpers::ProtoElemJson for FlowTxMatchView {
5001 fn serialize_proto_json<S: ::serde::Serializer>(
5002 v: &Self,
5003 s: S,
5004 ) -> ::core::result::Result<S::Ok, S::Error> {
5005 ::serde::Serialize::serialize(v, s)
5006 }
5007 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
5008 d: D,
5009 ) -> ::core::result::Result<Self, D::Error> {
5010 <Self as ::serde::Deserialize>::deserialize(d)
5011 }
5012}
5013#[doc(hidden)]
5014pub const __FLOW_TX_MATCH_VIEW_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
5015 type_url: "type.googleapis.com/chain.lifecycle.v1.FlowTxMatchView",
5016 to_json: ::buffa::type_registry::any_to_json::<FlowTxMatchView>,
5017 from_json: ::buffa::type_registry::any_from_json::<FlowTxMatchView>,
5018 is_wkt: false,
5019};
5020#[derive(Clone, PartialEq, Default)]
5023#[derive(::serde::Serialize, ::serde::Deserialize)]
5024#[serde(default)]
5025pub struct ListFlowsByTxResponse {
5026 #[serde(
5030 rename = "txHash",
5031 alias = "tx_hash",
5032 with = "::buffa::json_helpers::proto_string",
5033 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
5034 )]
5035 pub tx_hash: ::buffa::alloc::string::String,
5036 #[serde(
5041 rename = "matches",
5042 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
5043 deserialize_with = "::buffa::json_helpers::null_as_default"
5044 )]
5045 pub matches: ::buffa::alloc::vec::Vec<FlowTxMatchView>,
5046 #[serde(
5050 rename = "nextPageToken",
5051 alias = "next_page_token",
5052 with = "::buffa::json_helpers::proto_string",
5053 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
5054 )]
5055 pub next_page_token: ::buffa::alloc::string::String,
5056 #[serde(skip)]
5057 #[doc(hidden)]
5058 pub __buffa_unknown_fields: ::buffa::UnknownFields,
5059}
5060impl ::core::fmt::Debug for ListFlowsByTxResponse {
5061 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
5062 f.debug_struct("ListFlowsByTxResponse")
5063 .field("tx_hash", &self.tx_hash)
5064 .field("matches", &self.matches)
5065 .field("next_page_token", &self.next_page_token)
5066 .finish()
5067 }
5068}
5069impl ListFlowsByTxResponse {
5070 pub const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.ListFlowsByTxResponse";
5075}
5076::buffa::impl_default_instance!(ListFlowsByTxResponse);
5077impl ::buffa::MessageName for ListFlowsByTxResponse {
5078 const PACKAGE: &'static str = "chain.lifecycle.v1";
5079 const NAME: &'static str = "ListFlowsByTxResponse";
5080 const FULL_NAME: &'static str = "chain.lifecycle.v1.ListFlowsByTxResponse";
5081 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.ListFlowsByTxResponse";
5082}
5083impl ::buffa::Message for ListFlowsByTxResponse {
5084 #[allow(clippy::let_and_return)]
5090 fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
5091 #[allow(unused_imports)]
5092 use ::buffa::Enumeration as _;
5093 let mut size = 0u32;
5094 if !self.tx_hash.is_empty() {
5095 size += 1u32 + ::buffa::types::string_encoded_len(&self.tx_hash) as u32;
5096 }
5097 for v in &self.matches {
5098 let __slot = __cache.reserve();
5099 let inner_size = v.compute_size(__cache);
5100 __cache.set(__slot, inner_size);
5101 size
5102 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
5103 + inner_size;
5104 }
5105 if !self.next_page_token.is_empty() {
5106 size
5107 += 1u32
5108 + ::buffa::types::string_encoded_len(&self.next_page_token) as u32;
5109 }
5110 size += self.__buffa_unknown_fields.encoded_len() as u32;
5111 size
5112 }
5113 fn write_to(
5114 &self,
5115 __cache: &mut ::buffa::SizeCache,
5116 buf: &mut impl ::buffa::bytes::BufMut,
5117 ) {
5118 #[allow(unused_imports)]
5119 use ::buffa::Enumeration as _;
5120 if !self.tx_hash.is_empty() {
5121 ::buffa::types::put_string_field(1u32, &self.tx_hash, buf);
5122 }
5123 for v in &self.matches {
5124 ::buffa::types::put_len_delimited_header(2u32, __cache.consume_next(), buf);
5125 v.write_to(__cache, buf);
5126 }
5127 if !self.next_page_token.is_empty() {
5128 ::buffa::types::put_string_field(3u32, &self.next_page_token, buf);
5129 }
5130 self.__buffa_unknown_fields.write_to(buf);
5131 }
5132 fn merge_field(
5133 &mut self,
5134 tag: ::buffa::encoding::Tag,
5135 buf: &mut impl ::buffa::bytes::Buf,
5136 ctx: ::buffa::DecodeContext<'_>,
5137 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
5138 #[allow(unused_imports)]
5139 use ::buffa::bytes::Buf as _;
5140 #[allow(unused_imports)]
5141 use ::buffa::Enumeration as _;
5142 match tag.field_number() {
5143 1u32 => {
5144 ::buffa::encoding::check_wire_type(
5145 tag,
5146 ::buffa::encoding::WireType::LengthDelimited,
5147 )?;
5148 ::buffa::types::merge_string(&mut self.tx_hash, buf)?;
5149 }
5150 2u32 => {
5151 ::buffa::encoding::check_wire_type(
5152 tag,
5153 ::buffa::encoding::WireType::LengthDelimited,
5154 )?;
5155 let mut elem = ::core::default::Default::default();
5156 ::buffa::Message::merge_length_delimited(&mut elem, buf, ctx)?;
5157 self.matches.push(elem);
5158 }
5159 3u32 => {
5160 ::buffa::encoding::check_wire_type(
5161 tag,
5162 ::buffa::encoding::WireType::LengthDelimited,
5163 )?;
5164 ::buffa::types::merge_string(&mut self.next_page_token, buf)?;
5165 }
5166 _ => {
5167 self.__buffa_unknown_fields
5168 .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
5169 }
5170 }
5171 ::core::result::Result::Ok(())
5172 }
5173 fn clear(&mut self) {
5174 self.tx_hash.clear();
5175 self.matches.clear();
5176 self.next_page_token.clear();
5177 self.__buffa_unknown_fields.clear();
5178 }
5179}
5180impl ::buffa::ExtensionSet for ListFlowsByTxResponse {
5181 const PROTO_FQN: &'static str = "chain.lifecycle.v1.ListFlowsByTxResponse";
5182 fn unknown_fields(&self) -> &::buffa::UnknownFields {
5183 &self.__buffa_unknown_fields
5184 }
5185 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
5186 &mut self.__buffa_unknown_fields
5187 }
5188}
5189impl ::buffa::json_helpers::ProtoElemJson for ListFlowsByTxResponse {
5190 fn serialize_proto_json<S: ::serde::Serializer>(
5191 v: &Self,
5192 s: S,
5193 ) -> ::core::result::Result<S::Ok, S::Error> {
5194 ::serde::Serialize::serialize(v, s)
5195 }
5196 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
5197 d: D,
5198 ) -> ::core::result::Result<Self, D::Error> {
5199 <Self as ::serde::Deserialize>::deserialize(d)
5200 }
5201}
5202#[doc(hidden)]
5203pub const __LIST_FLOWS_BY_TX_RESPONSE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
5204 type_url: "type.googleapis.com/chain.lifecycle.v1.ListFlowsByTxResponse",
5205 to_json: ::buffa::type_registry::any_to_json::<ListFlowsByTxResponse>,
5206 from_json: ::buffa::type_registry::any_from_json::<ListFlowsByTxResponse>,
5207 is_wkt: false,
5208};
5209#[derive(Clone, PartialEq, Default)]
5212#[derive(::serde::Serialize, ::serde::Deserialize)]
5213#[serde(default)]
5214pub struct FlowSummaryView {
5215 #[serde(
5219 rename = "ownerAccountId",
5220 alias = "owner_account_id",
5221 with = "::buffa::json_helpers::uint64",
5222 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
5223 )]
5224 pub owner_account_id: u64,
5225 #[serde(
5231 rename = "smartAccountAddress",
5232 alias = "smart_account_address",
5233 with = "::buffa::json_helpers::proto_string",
5234 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
5235 )]
5236 pub smart_account_address: ::buffa::alloc::string::String,
5237 #[serde(
5241 rename = "flowId",
5242 alias = "flow_id",
5243 with = "::buffa::json_helpers::proto_string",
5244 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
5245 )]
5246 pub flow_id: ::buffa::alloc::string::String,
5247 #[serde(
5251 rename = "flowKind",
5252 alias = "flow_kind",
5253 with = "::buffa::json_helpers::proto_enum",
5254 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
5255 )]
5256 pub flow_kind: ::buffa::EnumValue<FlowKind>,
5257 #[serde(
5262 rename = "currentStep",
5263 alias = "current_step",
5264 with = "::buffa::json_helpers::proto_enum",
5265 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
5266 )]
5267 pub current_step: ::buffa::EnumValue<FlowStep>,
5268 #[serde(
5272 rename = "assetIds",
5273 alias = "asset_ids",
5274 skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
5275 )]
5276 pub asset_ids: ::buffa::MessageField<AssetIds>,
5277 #[serde(
5281 rename = "polyesterChainId",
5282 alias = "polyester_chain_id",
5283 with = "::buffa::json_helpers::uint32",
5284 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
5285 )]
5286 pub polyester_chain_id: u32,
5287 #[serde(
5294 rename = "amountE18",
5295 alias = "amount_e18",
5296 skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
5297 )]
5298 pub amount_e18: ::buffa::MessageField<
5299 super::super::super::polyester::r#type::v1::U128,
5300 >,
5301 #[serde(
5306 rename = "requestFee",
5307 alias = "request_fee",
5308 skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
5309 )]
5310 pub request_fee: ::buffa::MessageField<RequestFee>,
5311 #[serde(
5315 rename = "sourceTxHash",
5316 alias = "source_tx_hash",
5317 with = "::buffa::json_helpers::proto_string",
5318 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
5319 )]
5320 pub source_tx_hash: ::buffa::alloc::string::String,
5321 #[serde(
5327 rename = "txOccurrenceIndex",
5328 alias = "tx_occurrence_index",
5329 with = "::buffa::json_helpers::uint64",
5330 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
5331 )]
5332 pub tx_occurrence_index: u64,
5333 #[serde(
5338 rename = "sourceAddress",
5339 alias = "source_address",
5340 with = "::buffa::json_helpers::proto_string",
5341 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
5342 )]
5343 pub source_address: ::buffa::alloc::string::String,
5344 #[serde(
5349 rename = "destinationAddress",
5350 alias = "destination_address",
5351 with = "::buffa::json_helpers::proto_string",
5352 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
5353 )]
5354 pub destination_address: ::buffa::alloc::string::String,
5355 #[serde(
5359 rename = "latestTxRef",
5360 alias = "latest_tx_ref",
5361 with = "::buffa::json_helpers::proto_string",
5362 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
5363 )]
5364 pub latest_tx_ref: ::buffa::alloc::string::String,
5365 #[serde(
5370 rename = "sourceDomain",
5371 alias = "source_domain",
5372 with = "::buffa::json_helpers::proto_enum",
5373 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
5374 )]
5375 pub source_domain: ::buffa::EnumValue<FlowDomain>,
5376 #[serde(
5381 rename = "destinationDomain",
5382 alias = "destination_domain",
5383 with = "::buffa::json_helpers::proto_enum",
5384 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
5385 )]
5386 pub destination_domain: ::buffa::EnumValue<FlowDomain>,
5387 #[serde(
5392 rename = "latestLifecycleSource",
5393 alias = "latest_lifecycle_source",
5394 with = "::buffa::json_helpers::proto_enum",
5395 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
5396 )]
5397 pub latest_lifecycle_source: ::buffa::EnumValue<LifecycleSource>,
5398 #[serde(
5402 rename = "lifecycleReason",
5403 alias = "lifecycle_reason",
5404 with = "::buffa::json_helpers::proto_enum",
5405 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
5406 )]
5407 pub lifecycle_reason: ::buffa::EnumValue<LifecycleReason>,
5408 #[serde(
5412 rename = "zipperReason",
5413 alias = "zipper_reason",
5414 skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
5415 )]
5416 pub zipper_reason: ::buffa::MessageField<
5417 super::super::zipper::v1::ZipperReasonDetails,
5418 >,
5419 #[serde(
5423 rename = "startedAtUnixMs",
5424 alias = "started_at_unix_ms",
5425 with = "::buffa::json_helpers::uint64",
5426 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
5427 )]
5428 pub started_at_unix_ms: u64,
5429 #[serde(
5433 rename = "updatedAtUnixMs",
5434 alias = "updated_at_unix_ms",
5435 with = "::buffa::json_helpers::uint64",
5436 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
5437 )]
5438 pub updated_at_unix_ms: u64,
5439 #[serde(
5443 rename = "terminalAtUnixMs",
5444 alias = "terminal_at_unix_ms",
5445 with = "::buffa::json_helpers::uint64",
5446 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
5447 )]
5448 pub terminal_at_unix_ms: u64,
5449 #[serde(
5453 rename = "lastActivityAtUnixMs",
5454 alias = "last_activity_at_unix_ms",
5455 with = "::buffa::json_helpers::uint64",
5456 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
5457 )]
5458 pub last_activity_at_unix_ms: u64,
5459 #[serde(
5463 rename = "isOpen",
5464 alias = "is_open",
5465 with = "::buffa::json_helpers::proto_bool",
5466 skip_serializing_if = "::buffa::json_helpers::skip_if::is_false"
5467 )]
5468 pub is_open: bool,
5469 #[serde(
5473 rename = "isTerminal",
5474 alias = "is_terminal",
5475 with = "::buffa::json_helpers::proto_bool",
5476 skip_serializing_if = "::buffa::json_helpers::skip_if::is_false"
5477 )]
5478 pub is_terminal: bool,
5479 #[serde(
5483 rename = "currentStepSequence",
5484 alias = "current_step_sequence",
5485 with = "::buffa::json_helpers::uint32",
5486 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
5487 )]
5488 pub current_step_sequence: u32,
5489 #[serde(
5493 rename = "currentProgress",
5494 alias = "current_progress",
5495 skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
5496 )]
5497 pub current_progress: ::buffa::MessageField<FlowSummaryProgressView>,
5498 #[serde(
5503 rename = "progressTimeline",
5504 alias = "progress_timeline",
5505 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
5506 deserialize_with = "::buffa::json_helpers::null_as_default"
5507 )]
5508 pub progress_timeline: ::buffa::alloc::vec::Vec<FlowTimelineItemView>,
5509 #[serde(
5513 rename = "estimatedCompletionUnixMs",
5514 alias = "estimated_completion_unix_ms",
5515 with = "::buffa::json_helpers::uint64",
5516 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
5517 )]
5518 pub estimated_completion_unix_ms: u64,
5519 #[serde(skip)]
5520 #[doc(hidden)]
5521 pub __buffa_unknown_fields: ::buffa::UnknownFields,
5522}
5523impl ::core::fmt::Debug for FlowSummaryView {
5524 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
5525 f.debug_struct("FlowSummaryView")
5526 .field("owner_account_id", &self.owner_account_id)
5527 .field("smart_account_address", &self.smart_account_address)
5528 .field("flow_id", &self.flow_id)
5529 .field("flow_kind", &self.flow_kind)
5530 .field("current_step", &self.current_step)
5531 .field("asset_ids", &self.asset_ids)
5532 .field("polyester_chain_id", &self.polyester_chain_id)
5533 .field("amount_e18", &self.amount_e18)
5534 .field("request_fee", &self.request_fee)
5535 .field("source_tx_hash", &self.source_tx_hash)
5536 .field("tx_occurrence_index", &self.tx_occurrence_index)
5537 .field("source_address", &self.source_address)
5538 .field("destination_address", &self.destination_address)
5539 .field("latest_tx_ref", &self.latest_tx_ref)
5540 .field("source_domain", &self.source_domain)
5541 .field("destination_domain", &self.destination_domain)
5542 .field("latest_lifecycle_source", &self.latest_lifecycle_source)
5543 .field("lifecycle_reason", &self.lifecycle_reason)
5544 .field("zipper_reason", &self.zipper_reason)
5545 .field("started_at_unix_ms", &self.started_at_unix_ms)
5546 .field("updated_at_unix_ms", &self.updated_at_unix_ms)
5547 .field("terminal_at_unix_ms", &self.terminal_at_unix_ms)
5548 .field("last_activity_at_unix_ms", &self.last_activity_at_unix_ms)
5549 .field("is_open", &self.is_open)
5550 .field("is_terminal", &self.is_terminal)
5551 .field("current_step_sequence", &self.current_step_sequence)
5552 .field("current_progress", &self.current_progress)
5553 .field("progress_timeline", &self.progress_timeline)
5554 .field("estimated_completion_unix_ms", &self.estimated_completion_unix_ms)
5555 .finish()
5556 }
5557}
5558impl FlowSummaryView {
5559 pub const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowSummaryView";
5564}
5565::buffa::impl_default_instance!(FlowSummaryView);
5566impl ::buffa::MessageName for FlowSummaryView {
5567 const PACKAGE: &'static str = "chain.lifecycle.v1";
5568 const NAME: &'static str = "FlowSummaryView";
5569 const FULL_NAME: &'static str = "chain.lifecycle.v1.FlowSummaryView";
5570 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowSummaryView";
5571}
5572impl ::buffa::Message for FlowSummaryView {
5573 #[allow(clippy::let_and_return)]
5579 fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
5580 #[allow(unused_imports)]
5581 use ::buffa::Enumeration as _;
5582 let mut size = 0u32;
5583 if self.owner_account_id != 0u64 {
5584 size += 1u32 + ::buffa::types::FIXED64_ENCODED_LEN as u32;
5585 }
5586 {
5587 let val = self.flow_kind.to_i32();
5588 if val != 0 {
5589 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
5590 }
5591 }
5592 {
5593 let val = self.current_step.to_i32();
5594 if val != 0 {
5595 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
5596 }
5597 }
5598 if self.asset_ids.is_set() {
5599 let __slot = __cache.reserve();
5600 let inner_size = self.asset_ids.compute_size(__cache);
5601 __cache.set(__slot, inner_size);
5602 size
5603 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
5604 + inner_size;
5605 }
5606 if self.polyester_chain_id != 0u32 {
5607 size
5608 += 1u32
5609 + ::buffa::types::uint32_encoded_len(self.polyester_chain_id) as u32;
5610 }
5611 if self.amount_e18.is_set() {
5612 let __slot = __cache.reserve();
5613 let inner_size = self.amount_e18.compute_size(__cache);
5614 __cache.set(__slot, inner_size);
5615 size
5616 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
5617 + inner_size;
5618 }
5619 if !self.source_tx_hash.is_empty() {
5620 size
5621 += 1u32
5622 + ::buffa::types::string_encoded_len(&self.source_tx_hash) as u32;
5623 }
5624 if !self.source_address.is_empty() {
5625 size
5626 += 1u32
5627 + ::buffa::types::string_encoded_len(&self.source_address) as u32;
5628 }
5629 if !self.destination_address.is_empty() {
5630 size
5631 += 1u32
5632 + ::buffa::types::string_encoded_len(&self.destination_address)
5633 as u32;
5634 }
5635 if !self.latest_tx_ref.is_empty() {
5636 size
5637 += 1u32 + ::buffa::types::string_encoded_len(&self.latest_tx_ref) as u32;
5638 }
5639 {
5640 let val = self.latest_lifecycle_source.to_i32();
5641 if val != 0 {
5642 size += 2u32 + ::buffa::types::int32_encoded_len(val) as u32;
5643 }
5644 }
5645 {
5646 let val = self.lifecycle_reason.to_i32();
5647 if val != 0 {
5648 size += 2u32 + ::buffa::types::int32_encoded_len(val) as u32;
5649 }
5650 }
5651 if self.started_at_unix_ms != 0u64 {
5652 size
5653 += 2u32
5654 + ::buffa::types::uint64_encoded_len(self.started_at_unix_ms) as u32;
5655 }
5656 if self.updated_at_unix_ms != 0u64 {
5657 size
5658 += 2u32
5659 + ::buffa::types::uint64_encoded_len(self.updated_at_unix_ms) as u32;
5660 }
5661 if self.terminal_at_unix_ms != 0u64 {
5662 size
5663 += 2u32
5664 + ::buffa::types::uint64_encoded_len(self.terminal_at_unix_ms)
5665 as u32;
5666 }
5667 if self.last_activity_at_unix_ms != 0u64 {
5668 size
5669 += 2u32
5670 + ::buffa::types::uint64_encoded_len(self.last_activity_at_unix_ms)
5671 as u32;
5672 }
5673 if self.is_open {
5674 size += 2u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
5675 }
5676 if self.is_terminal {
5677 size += 2u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
5678 }
5679 if self.current_step_sequence != 0u32 {
5680 size
5681 += 2u32
5682 + ::buffa::types::uint32_encoded_len(self.current_step_sequence)
5683 as u32;
5684 }
5685 if self.current_progress.is_set() {
5686 let __slot = __cache.reserve();
5687 let inner_size = self.current_progress.compute_size(__cache);
5688 __cache.set(__slot, inner_size);
5689 size
5690 += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
5691 + inner_size;
5692 }
5693 for v in &self.progress_timeline {
5694 let __slot = __cache.reserve();
5695 let inner_size = v.compute_size(__cache);
5696 __cache.set(__slot, inner_size);
5697 size
5698 += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
5699 + inner_size;
5700 }
5701 if self.estimated_completion_unix_ms != 0u64 {
5702 size
5703 += 2u32
5704 + ::buffa::types::uint64_encoded_len(
5705 self.estimated_completion_unix_ms,
5706 ) as u32;
5707 }
5708 if self.request_fee.is_set() {
5709 let __slot = __cache.reserve();
5710 let inner_size = self.request_fee.compute_size(__cache);
5711 __cache.set(__slot, inner_size);
5712 size
5713 += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
5714 + inner_size;
5715 }
5716 {
5717 let val = self.source_domain.to_i32();
5718 if val != 0 {
5719 size += 2u32 + ::buffa::types::int32_encoded_len(val) as u32;
5720 }
5721 }
5722 {
5723 let val = self.destination_domain.to_i32();
5724 if val != 0 {
5725 size += 2u32 + ::buffa::types::int32_encoded_len(val) as u32;
5726 }
5727 }
5728 if self.tx_occurrence_index != 0u64 {
5729 size
5730 += 2u32
5731 + ::buffa::types::uint64_encoded_len(self.tx_occurrence_index)
5732 as u32;
5733 }
5734 if !self.flow_id.is_empty() {
5735 size += 2u32 + ::buffa::types::string_encoded_len(&self.flow_id) as u32;
5736 }
5737 if !self.smart_account_address.is_empty() {
5738 size
5739 += 2u32
5740 + ::buffa::types::string_encoded_len(&self.smart_account_address)
5741 as u32;
5742 }
5743 if self.zipper_reason.is_set() {
5744 let __slot = __cache.reserve();
5745 let inner_size = self.zipper_reason.compute_size(__cache);
5746 __cache.set(__slot, inner_size);
5747 size
5748 += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
5749 + inner_size;
5750 }
5751 size += self.__buffa_unknown_fields.encoded_len() as u32;
5752 size
5753 }
5754 fn write_to(
5755 &self,
5756 __cache: &mut ::buffa::SizeCache,
5757 buf: &mut impl ::buffa::bytes::BufMut,
5758 ) {
5759 #[allow(unused_imports)]
5760 use ::buffa::Enumeration as _;
5761 if self.owner_account_id != 0u64 {
5762 ::buffa::types::put_fixed64_field(1u32, self.owner_account_id, buf);
5763 }
5764 {
5765 let val = self.flow_kind.to_i32();
5766 if val != 0 {
5767 ::buffa::types::put_int32_field(4u32, val, buf);
5768 }
5769 }
5770 {
5771 let val = self.current_step.to_i32();
5772 if val != 0 {
5773 ::buffa::types::put_int32_field(6u32, val, buf);
5774 }
5775 }
5776 if self.asset_ids.is_set() {
5777 ::buffa::types::put_len_delimited_header(7u32, __cache.consume_next(), buf);
5778 self.asset_ids.write_to(__cache, buf);
5779 }
5780 if self.polyester_chain_id != 0u32 {
5781 ::buffa::types::put_uint32_field(8u32, self.polyester_chain_id, buf);
5782 }
5783 if self.amount_e18.is_set() {
5784 ::buffa::types::put_len_delimited_header(9u32, __cache.consume_next(), buf);
5785 self.amount_e18.write_to(__cache, buf);
5786 }
5787 if !self.source_tx_hash.is_empty() {
5788 ::buffa::types::put_string_field(11u32, &self.source_tx_hash, buf);
5789 }
5790 if !self.source_address.is_empty() {
5791 ::buffa::types::put_string_field(13u32, &self.source_address, buf);
5792 }
5793 if !self.destination_address.is_empty() {
5794 ::buffa::types::put_string_field(14u32, &self.destination_address, buf);
5795 }
5796 if !self.latest_tx_ref.is_empty() {
5797 ::buffa::types::put_string_field(15u32, &self.latest_tx_ref, buf);
5798 }
5799 {
5800 let val = self.latest_lifecycle_source.to_i32();
5801 if val != 0 {
5802 ::buffa::types::put_int32_field(16u32, val, buf);
5803 }
5804 }
5805 {
5806 let val = self.lifecycle_reason.to_i32();
5807 if val != 0 {
5808 ::buffa::types::put_int32_field(17u32, val, buf);
5809 }
5810 }
5811 if self.started_at_unix_ms != 0u64 {
5812 ::buffa::types::put_uint64_field(18u32, self.started_at_unix_ms, buf);
5813 }
5814 if self.updated_at_unix_ms != 0u64 {
5815 ::buffa::types::put_uint64_field(19u32, self.updated_at_unix_ms, buf);
5816 }
5817 if self.terminal_at_unix_ms != 0u64 {
5818 ::buffa::types::put_uint64_field(20u32, self.terminal_at_unix_ms, buf);
5819 }
5820 if self.last_activity_at_unix_ms != 0u64 {
5821 ::buffa::types::put_uint64_field(21u32, self.last_activity_at_unix_ms, buf);
5822 }
5823 if self.is_open {
5824 ::buffa::types::put_bool_field(22u32, self.is_open, buf);
5825 }
5826 if self.is_terminal {
5827 ::buffa::types::put_bool_field(23u32, self.is_terminal, buf);
5828 }
5829 if self.current_step_sequence != 0u32 {
5830 ::buffa::types::put_uint32_field(24u32, self.current_step_sequence, buf);
5831 }
5832 if self.current_progress.is_set() {
5833 ::buffa::types::put_len_delimited_header(25u32, __cache.consume_next(), buf);
5834 self.current_progress.write_to(__cache, buf);
5835 }
5836 for v in &self.progress_timeline {
5837 ::buffa::types::put_len_delimited_header(26u32, __cache.consume_next(), buf);
5838 v.write_to(__cache, buf);
5839 }
5840 if self.estimated_completion_unix_ms != 0u64 {
5841 ::buffa::types::put_uint64_field(
5842 27u32,
5843 self.estimated_completion_unix_ms,
5844 buf,
5845 );
5846 }
5847 if self.request_fee.is_set() {
5848 ::buffa::types::put_len_delimited_header(28u32, __cache.consume_next(), buf);
5849 self.request_fee.write_to(__cache, buf);
5850 }
5851 {
5852 let val = self.source_domain.to_i32();
5853 if val != 0 {
5854 ::buffa::types::put_int32_field(29u32, val, buf);
5855 }
5856 }
5857 {
5858 let val = self.destination_domain.to_i32();
5859 if val != 0 {
5860 ::buffa::types::put_int32_field(30u32, val, buf);
5861 }
5862 }
5863 if self.tx_occurrence_index != 0u64 {
5864 ::buffa::types::put_uint64_field(32u32, self.tx_occurrence_index, buf);
5865 }
5866 if !self.flow_id.is_empty() {
5867 ::buffa::types::put_string_field(33u32, &self.flow_id, buf);
5868 }
5869 if !self.smart_account_address.is_empty() {
5870 ::buffa::types::put_string_field(34u32, &self.smart_account_address, buf);
5871 }
5872 if self.zipper_reason.is_set() {
5873 ::buffa::types::put_len_delimited_header(35u32, __cache.consume_next(), buf);
5874 self.zipper_reason.write_to(__cache, buf);
5875 }
5876 self.__buffa_unknown_fields.write_to(buf);
5877 }
5878 fn merge_field(
5879 &mut self,
5880 tag: ::buffa::encoding::Tag,
5881 buf: &mut impl ::buffa::bytes::Buf,
5882 ctx: ::buffa::DecodeContext<'_>,
5883 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
5884 #[allow(unused_imports)]
5885 use ::buffa::bytes::Buf as _;
5886 #[allow(unused_imports)]
5887 use ::buffa::Enumeration as _;
5888 match tag.field_number() {
5889 1u32 => {
5890 ::buffa::encoding::check_wire_type(
5891 tag,
5892 ::buffa::encoding::WireType::Fixed64,
5893 )?;
5894 self.owner_account_id = ::buffa::types::decode_fixed64(buf)?;
5895 }
5896 4u32 => {
5897 ::buffa::encoding::check_wire_type(
5898 tag,
5899 ::buffa::encoding::WireType::Varint,
5900 )?;
5901 self.flow_kind = ::buffa::EnumValue::from(
5902 ::buffa::types::decode_int32(buf)?,
5903 );
5904 }
5905 6u32 => {
5906 ::buffa::encoding::check_wire_type(
5907 tag,
5908 ::buffa::encoding::WireType::Varint,
5909 )?;
5910 self.current_step = ::buffa::EnumValue::from(
5911 ::buffa::types::decode_int32(buf)?,
5912 );
5913 }
5914 7u32 => {
5915 ::buffa::encoding::check_wire_type(
5916 tag,
5917 ::buffa::encoding::WireType::LengthDelimited,
5918 )?;
5919 ::buffa::Message::merge_length_delimited(
5920 self.asset_ids.get_or_insert_default(),
5921 buf,
5922 ctx,
5923 )?;
5924 }
5925 8u32 => {
5926 ::buffa::encoding::check_wire_type(
5927 tag,
5928 ::buffa::encoding::WireType::Varint,
5929 )?;
5930 self.polyester_chain_id = ::buffa::types::decode_uint32(buf)?;
5931 }
5932 9u32 => {
5933 ::buffa::encoding::check_wire_type(
5934 tag,
5935 ::buffa::encoding::WireType::LengthDelimited,
5936 )?;
5937 ::buffa::Message::merge_length_delimited(
5938 self.amount_e18.get_or_insert_default(),
5939 buf,
5940 ctx,
5941 )?;
5942 }
5943 11u32 => {
5944 ::buffa::encoding::check_wire_type(
5945 tag,
5946 ::buffa::encoding::WireType::LengthDelimited,
5947 )?;
5948 ::buffa::types::merge_string(&mut self.source_tx_hash, buf)?;
5949 }
5950 13u32 => {
5951 ::buffa::encoding::check_wire_type(
5952 tag,
5953 ::buffa::encoding::WireType::LengthDelimited,
5954 )?;
5955 ::buffa::types::merge_string(&mut self.source_address, buf)?;
5956 }
5957 14u32 => {
5958 ::buffa::encoding::check_wire_type(
5959 tag,
5960 ::buffa::encoding::WireType::LengthDelimited,
5961 )?;
5962 ::buffa::types::merge_string(&mut self.destination_address, buf)?;
5963 }
5964 15u32 => {
5965 ::buffa::encoding::check_wire_type(
5966 tag,
5967 ::buffa::encoding::WireType::LengthDelimited,
5968 )?;
5969 ::buffa::types::merge_string(&mut self.latest_tx_ref, buf)?;
5970 }
5971 16u32 => {
5972 ::buffa::encoding::check_wire_type(
5973 tag,
5974 ::buffa::encoding::WireType::Varint,
5975 )?;
5976 self.latest_lifecycle_source = ::buffa::EnumValue::from(
5977 ::buffa::types::decode_int32(buf)?,
5978 );
5979 }
5980 17u32 => {
5981 ::buffa::encoding::check_wire_type(
5982 tag,
5983 ::buffa::encoding::WireType::Varint,
5984 )?;
5985 self.lifecycle_reason = ::buffa::EnumValue::from(
5986 ::buffa::types::decode_int32(buf)?,
5987 );
5988 }
5989 18u32 => {
5990 ::buffa::encoding::check_wire_type(
5991 tag,
5992 ::buffa::encoding::WireType::Varint,
5993 )?;
5994 self.started_at_unix_ms = ::buffa::types::decode_uint64(buf)?;
5995 }
5996 19u32 => {
5997 ::buffa::encoding::check_wire_type(
5998 tag,
5999 ::buffa::encoding::WireType::Varint,
6000 )?;
6001 self.updated_at_unix_ms = ::buffa::types::decode_uint64(buf)?;
6002 }
6003 20u32 => {
6004 ::buffa::encoding::check_wire_type(
6005 tag,
6006 ::buffa::encoding::WireType::Varint,
6007 )?;
6008 self.terminal_at_unix_ms = ::buffa::types::decode_uint64(buf)?;
6009 }
6010 21u32 => {
6011 ::buffa::encoding::check_wire_type(
6012 tag,
6013 ::buffa::encoding::WireType::Varint,
6014 )?;
6015 self.last_activity_at_unix_ms = ::buffa::types::decode_uint64(buf)?;
6016 }
6017 22u32 => {
6018 ::buffa::encoding::check_wire_type(
6019 tag,
6020 ::buffa::encoding::WireType::Varint,
6021 )?;
6022 self.is_open = ::buffa::types::decode_bool(buf)?;
6023 }
6024 23u32 => {
6025 ::buffa::encoding::check_wire_type(
6026 tag,
6027 ::buffa::encoding::WireType::Varint,
6028 )?;
6029 self.is_terminal = ::buffa::types::decode_bool(buf)?;
6030 }
6031 24u32 => {
6032 ::buffa::encoding::check_wire_type(
6033 tag,
6034 ::buffa::encoding::WireType::Varint,
6035 )?;
6036 self.current_step_sequence = ::buffa::types::decode_uint32(buf)?;
6037 }
6038 25u32 => {
6039 ::buffa::encoding::check_wire_type(
6040 tag,
6041 ::buffa::encoding::WireType::LengthDelimited,
6042 )?;
6043 ::buffa::Message::merge_length_delimited(
6044 self.current_progress.get_or_insert_default(),
6045 buf,
6046 ctx,
6047 )?;
6048 }
6049 26u32 => {
6050 ::buffa::encoding::check_wire_type(
6051 tag,
6052 ::buffa::encoding::WireType::LengthDelimited,
6053 )?;
6054 let mut elem = ::core::default::Default::default();
6055 ::buffa::Message::merge_length_delimited(&mut elem, buf, ctx)?;
6056 self.progress_timeline.push(elem);
6057 }
6058 27u32 => {
6059 ::buffa::encoding::check_wire_type(
6060 tag,
6061 ::buffa::encoding::WireType::Varint,
6062 )?;
6063 self.estimated_completion_unix_ms = ::buffa::types::decode_uint64(buf)?;
6064 }
6065 28u32 => {
6066 ::buffa::encoding::check_wire_type(
6067 tag,
6068 ::buffa::encoding::WireType::LengthDelimited,
6069 )?;
6070 ::buffa::Message::merge_length_delimited(
6071 self.request_fee.get_or_insert_default(),
6072 buf,
6073 ctx,
6074 )?;
6075 }
6076 29u32 => {
6077 ::buffa::encoding::check_wire_type(
6078 tag,
6079 ::buffa::encoding::WireType::Varint,
6080 )?;
6081 self.source_domain = ::buffa::EnumValue::from(
6082 ::buffa::types::decode_int32(buf)?,
6083 );
6084 }
6085 30u32 => {
6086 ::buffa::encoding::check_wire_type(
6087 tag,
6088 ::buffa::encoding::WireType::Varint,
6089 )?;
6090 self.destination_domain = ::buffa::EnumValue::from(
6091 ::buffa::types::decode_int32(buf)?,
6092 );
6093 }
6094 32u32 => {
6095 ::buffa::encoding::check_wire_type(
6096 tag,
6097 ::buffa::encoding::WireType::Varint,
6098 )?;
6099 self.tx_occurrence_index = ::buffa::types::decode_uint64(buf)?;
6100 }
6101 33u32 => {
6102 ::buffa::encoding::check_wire_type(
6103 tag,
6104 ::buffa::encoding::WireType::LengthDelimited,
6105 )?;
6106 ::buffa::types::merge_string(&mut self.flow_id, buf)?;
6107 }
6108 34u32 => {
6109 ::buffa::encoding::check_wire_type(
6110 tag,
6111 ::buffa::encoding::WireType::LengthDelimited,
6112 )?;
6113 ::buffa::types::merge_string(&mut self.smart_account_address, buf)?;
6114 }
6115 35u32 => {
6116 ::buffa::encoding::check_wire_type(
6117 tag,
6118 ::buffa::encoding::WireType::LengthDelimited,
6119 )?;
6120 ::buffa::Message::merge_length_delimited(
6121 self.zipper_reason.get_or_insert_default(),
6122 buf,
6123 ctx,
6124 )?;
6125 }
6126 _ => {
6127 self.__buffa_unknown_fields
6128 .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
6129 }
6130 }
6131 ::core::result::Result::Ok(())
6132 }
6133 fn clear(&mut self) {
6134 self.owner_account_id = 0u64;
6135 self.flow_kind = ::buffa::EnumValue::from(0);
6136 self.current_step = ::buffa::EnumValue::from(0);
6137 self.asset_ids = ::buffa::MessageField::none();
6138 self.polyester_chain_id = 0u32;
6139 self.amount_e18 = ::buffa::MessageField::none();
6140 self.source_tx_hash.clear();
6141 self.source_address.clear();
6142 self.destination_address.clear();
6143 self.latest_tx_ref.clear();
6144 self.latest_lifecycle_source = ::buffa::EnumValue::from(0);
6145 self.lifecycle_reason = ::buffa::EnumValue::from(0);
6146 self.started_at_unix_ms = 0u64;
6147 self.updated_at_unix_ms = 0u64;
6148 self.terminal_at_unix_ms = 0u64;
6149 self.last_activity_at_unix_ms = 0u64;
6150 self.is_open = false;
6151 self.is_terminal = false;
6152 self.current_step_sequence = 0u32;
6153 self.current_progress = ::buffa::MessageField::none();
6154 self.progress_timeline.clear();
6155 self.estimated_completion_unix_ms = 0u64;
6156 self.request_fee = ::buffa::MessageField::none();
6157 self.source_domain = ::buffa::EnumValue::from(0);
6158 self.destination_domain = ::buffa::EnumValue::from(0);
6159 self.tx_occurrence_index = 0u64;
6160 self.flow_id.clear();
6161 self.smart_account_address.clear();
6162 self.zipper_reason = ::buffa::MessageField::none();
6163 self.__buffa_unknown_fields.clear();
6164 }
6165}
6166impl ::buffa::ExtensionSet for FlowSummaryView {
6167 const PROTO_FQN: &'static str = "chain.lifecycle.v1.FlowSummaryView";
6168 fn unknown_fields(&self) -> &::buffa::UnknownFields {
6169 &self.__buffa_unknown_fields
6170 }
6171 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
6172 &mut self.__buffa_unknown_fields
6173 }
6174}
6175impl ::buffa::json_helpers::ProtoElemJson for FlowSummaryView {
6176 fn serialize_proto_json<S: ::serde::Serializer>(
6177 v: &Self,
6178 s: S,
6179 ) -> ::core::result::Result<S::Ok, S::Error> {
6180 ::serde::Serialize::serialize(v, s)
6181 }
6182 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
6183 d: D,
6184 ) -> ::core::result::Result<Self, D::Error> {
6185 <Self as ::serde::Deserialize>::deserialize(d)
6186 }
6187}
6188#[doc(hidden)]
6189pub const __FLOW_SUMMARY_VIEW_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
6190 type_url: "type.googleapis.com/chain.lifecycle.v1.FlowSummaryView",
6191 to_json: ::buffa::type_registry::any_to_json::<FlowSummaryView>,
6192 from_json: ::buffa::type_registry::any_from_json::<FlowSummaryView>,
6193 is_wkt: false,
6194};
6195#[derive(Clone, PartialEq, Default)]
6197#[derive(::serde::Serialize, ::serde::Deserialize)]
6198#[serde(default)]
6199pub struct FlowSummaryProgressView {
6200 #[serde(
6205 rename = "currentStepStartedAtUnixMs",
6206 alias = "current_step_started_at_unix_ms",
6207 with = "::buffa::json_helpers::uint64",
6208 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
6209 )]
6210 pub current_step_started_at_unix_ms: u64,
6211 #[serde(
6215 rename = "currentStepExpectedDurationMs",
6216 alias = "current_step_expected_duration_ms",
6217 with = "::buffa::json_helpers::uint64",
6218 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
6219 )]
6220 pub current_step_expected_duration_ms: u64,
6221 #[serde(
6225 rename = "currentConfirmations",
6226 alias = "current_confirmations",
6227 with = "::buffa::json_helpers::uint32",
6228 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
6229 )]
6230 pub current_confirmations: u32,
6231 #[serde(
6235 rename = "requiredConfirmations",
6236 alias = "required_confirmations",
6237 with = "::buffa::json_helpers::uint32",
6238 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
6239 )]
6240 pub required_confirmations: u32,
6241 #[serde(
6245 rename = "approveCount",
6246 alias = "approve_count",
6247 with = "::buffa::json_helpers::uint32",
6248 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
6249 )]
6250 pub approve_count: u32,
6251 #[serde(
6255 rename = "rejectCount",
6256 alias = "reject_count",
6257 with = "::buffa::json_helpers::uint32",
6258 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
6259 )]
6260 pub reject_count: u32,
6261 #[serde(
6265 rename = "validatorCount",
6266 alias = "validator_count",
6267 with = "::buffa::json_helpers::uint32",
6268 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
6269 )]
6270 pub validator_count: u32,
6271 #[serde(
6275 rename = "requiredApprovals",
6276 alias = "required_approvals",
6277 with = "::buffa::json_helpers::uint32",
6278 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
6279 )]
6280 pub required_approvals: u32,
6281 #[serde(
6285 rename = "requiredRejections",
6286 alias = "required_rejections",
6287 with = "::buffa::json_helpers::uint32",
6288 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
6289 )]
6290 pub required_rejections: u32,
6291 #[serde(skip)]
6292 #[doc(hidden)]
6293 pub __buffa_unknown_fields: ::buffa::UnknownFields,
6294}
6295impl ::core::fmt::Debug for FlowSummaryProgressView {
6296 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
6297 f.debug_struct("FlowSummaryProgressView")
6298 .field(
6299 "current_step_started_at_unix_ms",
6300 &self.current_step_started_at_unix_ms,
6301 )
6302 .field(
6303 "current_step_expected_duration_ms",
6304 &self.current_step_expected_duration_ms,
6305 )
6306 .field("current_confirmations", &self.current_confirmations)
6307 .field("required_confirmations", &self.required_confirmations)
6308 .field("approve_count", &self.approve_count)
6309 .field("reject_count", &self.reject_count)
6310 .field("validator_count", &self.validator_count)
6311 .field("required_approvals", &self.required_approvals)
6312 .field("required_rejections", &self.required_rejections)
6313 .finish()
6314 }
6315}
6316impl FlowSummaryProgressView {
6317 pub const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowSummaryProgressView";
6322}
6323::buffa::impl_default_instance!(FlowSummaryProgressView);
6324impl ::buffa::MessageName for FlowSummaryProgressView {
6325 const PACKAGE: &'static str = "chain.lifecycle.v1";
6326 const NAME: &'static str = "FlowSummaryProgressView";
6327 const FULL_NAME: &'static str = "chain.lifecycle.v1.FlowSummaryProgressView";
6328 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowSummaryProgressView";
6329}
6330impl ::buffa::Message for FlowSummaryProgressView {
6331 #[allow(clippy::let_and_return)]
6337 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
6338 #[allow(unused_imports)]
6339 use ::buffa::Enumeration as _;
6340 let mut size = 0u32;
6341 if self.current_step_started_at_unix_ms != 0u64 {
6342 size
6343 += 1u32
6344 + ::buffa::types::uint64_encoded_len(
6345 self.current_step_started_at_unix_ms,
6346 ) as u32;
6347 }
6348 if self.current_step_expected_duration_ms != 0u64 {
6349 size
6350 += 1u32
6351 + ::buffa::types::uint64_encoded_len(
6352 self.current_step_expected_duration_ms,
6353 ) as u32;
6354 }
6355 if self.current_confirmations != 0u32 {
6356 size
6357 += 1u32
6358 + ::buffa::types::uint32_encoded_len(self.current_confirmations)
6359 as u32;
6360 }
6361 if self.required_confirmations != 0u32 {
6362 size
6363 += 1u32
6364 + ::buffa::types::uint32_encoded_len(self.required_confirmations)
6365 as u32;
6366 }
6367 if self.approve_count != 0u32 {
6368 size += 1u32 + ::buffa::types::uint32_encoded_len(self.approve_count) as u32;
6369 }
6370 if self.reject_count != 0u32 {
6371 size += 1u32 + ::buffa::types::uint32_encoded_len(self.reject_count) as u32;
6372 }
6373 if self.validator_count != 0u32 {
6374 size
6375 += 1u32
6376 + ::buffa::types::uint32_encoded_len(self.validator_count) as u32;
6377 }
6378 if self.required_approvals != 0u32 {
6379 size
6380 += 1u32
6381 + ::buffa::types::uint32_encoded_len(self.required_approvals) as u32;
6382 }
6383 if self.required_rejections != 0u32 {
6384 size
6385 += 1u32
6386 + ::buffa::types::uint32_encoded_len(self.required_rejections)
6387 as u32;
6388 }
6389 size += self.__buffa_unknown_fields.encoded_len() as u32;
6390 size
6391 }
6392 fn write_to(
6393 &self,
6394 _cache: &mut ::buffa::SizeCache,
6395 buf: &mut impl ::buffa::bytes::BufMut,
6396 ) {
6397 #[allow(unused_imports)]
6398 use ::buffa::Enumeration as _;
6399 if self.current_step_started_at_unix_ms != 0u64 {
6400 ::buffa::types::put_uint64_field(
6401 1u32,
6402 self.current_step_started_at_unix_ms,
6403 buf,
6404 );
6405 }
6406 if self.current_step_expected_duration_ms != 0u64 {
6407 ::buffa::types::put_uint64_field(
6408 2u32,
6409 self.current_step_expected_duration_ms,
6410 buf,
6411 );
6412 }
6413 if self.current_confirmations != 0u32 {
6414 ::buffa::types::put_uint32_field(5u32, self.current_confirmations, buf);
6415 }
6416 if self.required_confirmations != 0u32 {
6417 ::buffa::types::put_uint32_field(6u32, self.required_confirmations, buf);
6418 }
6419 if self.approve_count != 0u32 {
6420 ::buffa::types::put_uint32_field(7u32, self.approve_count, buf);
6421 }
6422 if self.reject_count != 0u32 {
6423 ::buffa::types::put_uint32_field(8u32, self.reject_count, buf);
6424 }
6425 if self.validator_count != 0u32 {
6426 ::buffa::types::put_uint32_field(9u32, self.validator_count, buf);
6427 }
6428 if self.required_approvals != 0u32 {
6429 ::buffa::types::put_uint32_field(10u32, self.required_approvals, buf);
6430 }
6431 if self.required_rejections != 0u32 {
6432 ::buffa::types::put_uint32_field(11u32, self.required_rejections, buf);
6433 }
6434 self.__buffa_unknown_fields.write_to(buf);
6435 }
6436 fn merge_field(
6437 &mut self,
6438 tag: ::buffa::encoding::Tag,
6439 buf: &mut impl ::buffa::bytes::Buf,
6440 ctx: ::buffa::DecodeContext<'_>,
6441 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
6442 #[allow(unused_imports)]
6443 use ::buffa::bytes::Buf as _;
6444 #[allow(unused_imports)]
6445 use ::buffa::Enumeration as _;
6446 match tag.field_number() {
6447 1u32 => {
6448 ::buffa::encoding::check_wire_type(
6449 tag,
6450 ::buffa::encoding::WireType::Varint,
6451 )?;
6452 self.current_step_started_at_unix_ms = ::buffa::types::decode_uint64(
6453 buf,
6454 )?;
6455 }
6456 2u32 => {
6457 ::buffa::encoding::check_wire_type(
6458 tag,
6459 ::buffa::encoding::WireType::Varint,
6460 )?;
6461 self.current_step_expected_duration_ms = ::buffa::types::decode_uint64(
6462 buf,
6463 )?;
6464 }
6465 5u32 => {
6466 ::buffa::encoding::check_wire_type(
6467 tag,
6468 ::buffa::encoding::WireType::Varint,
6469 )?;
6470 self.current_confirmations = ::buffa::types::decode_uint32(buf)?;
6471 }
6472 6u32 => {
6473 ::buffa::encoding::check_wire_type(
6474 tag,
6475 ::buffa::encoding::WireType::Varint,
6476 )?;
6477 self.required_confirmations = ::buffa::types::decode_uint32(buf)?;
6478 }
6479 7u32 => {
6480 ::buffa::encoding::check_wire_type(
6481 tag,
6482 ::buffa::encoding::WireType::Varint,
6483 )?;
6484 self.approve_count = ::buffa::types::decode_uint32(buf)?;
6485 }
6486 8u32 => {
6487 ::buffa::encoding::check_wire_type(
6488 tag,
6489 ::buffa::encoding::WireType::Varint,
6490 )?;
6491 self.reject_count = ::buffa::types::decode_uint32(buf)?;
6492 }
6493 9u32 => {
6494 ::buffa::encoding::check_wire_type(
6495 tag,
6496 ::buffa::encoding::WireType::Varint,
6497 )?;
6498 self.validator_count = ::buffa::types::decode_uint32(buf)?;
6499 }
6500 10u32 => {
6501 ::buffa::encoding::check_wire_type(
6502 tag,
6503 ::buffa::encoding::WireType::Varint,
6504 )?;
6505 self.required_approvals = ::buffa::types::decode_uint32(buf)?;
6506 }
6507 11u32 => {
6508 ::buffa::encoding::check_wire_type(
6509 tag,
6510 ::buffa::encoding::WireType::Varint,
6511 )?;
6512 self.required_rejections = ::buffa::types::decode_uint32(buf)?;
6513 }
6514 _ => {
6515 self.__buffa_unknown_fields
6516 .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
6517 }
6518 }
6519 ::core::result::Result::Ok(())
6520 }
6521 fn clear(&mut self) {
6522 self.current_step_started_at_unix_ms = 0u64;
6523 self.current_step_expected_duration_ms = 0u64;
6524 self.current_confirmations = 0u32;
6525 self.required_confirmations = 0u32;
6526 self.approve_count = 0u32;
6527 self.reject_count = 0u32;
6528 self.validator_count = 0u32;
6529 self.required_approvals = 0u32;
6530 self.required_rejections = 0u32;
6531 self.__buffa_unknown_fields.clear();
6532 }
6533}
6534impl ::buffa::ExtensionSet for FlowSummaryProgressView {
6535 const PROTO_FQN: &'static str = "chain.lifecycle.v1.FlowSummaryProgressView";
6536 fn unknown_fields(&self) -> &::buffa::UnknownFields {
6537 &self.__buffa_unknown_fields
6538 }
6539 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
6540 &mut self.__buffa_unknown_fields
6541 }
6542}
6543impl ::buffa::json_helpers::ProtoElemJson for FlowSummaryProgressView {
6544 fn serialize_proto_json<S: ::serde::Serializer>(
6545 v: &Self,
6546 s: S,
6547 ) -> ::core::result::Result<S::Ok, S::Error> {
6548 ::serde::Serialize::serialize(v, s)
6549 }
6550 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
6551 d: D,
6552 ) -> ::core::result::Result<Self, D::Error> {
6553 <Self as ::serde::Deserialize>::deserialize(d)
6554 }
6555}
6556#[doc(hidden)]
6557pub const __FLOW_SUMMARY_PROGRESS_VIEW_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
6558 type_url: "type.googleapis.com/chain.lifecycle.v1.FlowSummaryProgressView",
6559 to_json: ::buffa::type_registry::any_to_json::<FlowSummaryProgressView>,
6560 from_json: ::buffa::type_registry::any_from_json::<FlowSummaryProgressView>,
6561 is_wkt: false,
6562};
6563#[derive(Clone, PartialEq, Default)]
6567#[derive(::serde::Serialize, ::serde::Deserialize)]
6568#[serde(default)]
6569pub struct FlowStepView {
6570 #[serde(
6574 rename = "sequence",
6575 with = "::buffa::json_helpers::uint32",
6576 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
6577 )]
6578 pub sequence: u32,
6579 #[serde(
6583 rename = "step",
6584 with = "::buffa::json_helpers::proto_enum",
6585 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
6586 )]
6587 pub step: ::buffa::EnumValue<FlowStep>,
6588 #[serde(
6592 rename = "assetIds",
6593 alias = "asset_ids",
6594 skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
6595 )]
6596 pub asset_ids: ::buffa::MessageField<AssetIds>,
6597 #[serde(
6601 rename = "polyesterChainId",
6602 alias = "polyester_chain_id",
6603 with = "::buffa::json_helpers::uint32",
6604 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
6605 )]
6606 pub polyester_chain_id: u32,
6607 #[serde(
6612 rename = "amountE18",
6613 alias = "amount_e18",
6614 skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
6615 )]
6616 pub amount_e18: ::buffa::MessageField<
6617 super::super::super::polyester::r#type::v1::U128,
6618 >,
6619 #[serde(
6623 rename = "requestFee",
6624 alias = "request_fee",
6625 skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
6626 )]
6627 pub request_fee: ::buffa::MessageField<RequestFee>,
6628 #[serde(
6632 rename = "milestoneTxRef",
6633 alias = "milestone_tx_ref",
6634 with = "::buffa::json_helpers::proto_string",
6635 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
6636 )]
6637 pub milestone_tx_ref: ::buffa::alloc::string::String,
6638 #[serde(
6642 rename = "lifecycleSource",
6643 alias = "lifecycle_source",
6644 with = "::buffa::json_helpers::proto_enum",
6645 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
6646 )]
6647 pub lifecycle_source: ::buffa::EnumValue<LifecycleSource>,
6648 #[serde(
6652 rename = "lifecycleReason",
6653 alias = "lifecycle_reason",
6654 with = "::buffa::json_helpers::proto_enum",
6655 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
6656 )]
6657 pub lifecycle_reason: ::buffa::EnumValue<LifecycleReason>,
6658 #[serde(
6662 rename = "zipperReason",
6663 alias = "zipper_reason",
6664 skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
6665 )]
6666 pub zipper_reason: ::buffa::MessageField<
6667 super::super::zipper::v1::ZipperReasonDetails,
6668 >,
6669 #[serde(
6673 rename = "currentConfirmations",
6674 alias = "current_confirmations",
6675 with = "::buffa::json_helpers::uint32",
6676 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
6677 )]
6678 pub current_confirmations: u32,
6679 #[serde(
6683 rename = "requiredConfirmations",
6684 alias = "required_confirmations",
6685 with = "::buffa::json_helpers::uint32",
6686 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
6687 )]
6688 pub required_confirmations: u32,
6689 #[serde(
6693 rename = "approveCount",
6694 alias = "approve_count",
6695 with = "::buffa::json_helpers::uint32",
6696 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
6697 )]
6698 pub approve_count: u32,
6699 #[serde(
6703 rename = "rejectCount",
6704 alias = "reject_count",
6705 with = "::buffa::json_helpers::uint32",
6706 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
6707 )]
6708 pub reject_count: u32,
6709 #[serde(
6713 rename = "validatorCount",
6714 alias = "validator_count",
6715 with = "::buffa::json_helpers::uint32",
6716 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
6717 )]
6718 pub validator_count: u32,
6719 #[serde(
6723 rename = "requiredApprovals",
6724 alias = "required_approvals",
6725 with = "::buffa::json_helpers::uint32",
6726 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
6727 )]
6728 pub required_approvals: u32,
6729 #[serde(
6733 rename = "requiredRejections",
6734 alias = "required_rejections",
6735 with = "::buffa::json_helpers::uint32",
6736 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
6737 )]
6738 pub required_rejections: u32,
6739 #[serde(
6743 rename = "occurredAtUnixMs",
6744 alias = "occurred_at_unix_ms",
6745 with = "::buffa::json_helpers::uint64",
6746 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
6747 )]
6748 pub occurred_at_unix_ms: u64,
6749 #[serde(
6753 rename = "blockTimeMovingAverageMs",
6754 alias = "block_time_moving_average_ms",
6755 with = "::buffa::json_helpers::uint64",
6756 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
6757 )]
6758 pub block_time_moving_average_ms: u64,
6759 #[serde(
6765 rename = "activities",
6766 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
6767 deserialize_with = "::buffa::json_helpers::null_as_default"
6768 )]
6769 pub activities: ::buffa::alloc::vec::Vec<FlowStepActivityView>,
6770 #[serde(skip)]
6771 #[doc(hidden)]
6772 pub __buffa_unknown_fields: ::buffa::UnknownFields,
6773}
6774impl ::core::fmt::Debug for FlowStepView {
6775 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
6776 f.debug_struct("FlowStepView")
6777 .field("sequence", &self.sequence)
6778 .field("step", &self.step)
6779 .field("asset_ids", &self.asset_ids)
6780 .field("polyester_chain_id", &self.polyester_chain_id)
6781 .field("amount_e18", &self.amount_e18)
6782 .field("request_fee", &self.request_fee)
6783 .field("milestone_tx_ref", &self.milestone_tx_ref)
6784 .field("lifecycle_source", &self.lifecycle_source)
6785 .field("lifecycle_reason", &self.lifecycle_reason)
6786 .field("zipper_reason", &self.zipper_reason)
6787 .field("current_confirmations", &self.current_confirmations)
6788 .field("required_confirmations", &self.required_confirmations)
6789 .field("approve_count", &self.approve_count)
6790 .field("reject_count", &self.reject_count)
6791 .field("validator_count", &self.validator_count)
6792 .field("required_approvals", &self.required_approvals)
6793 .field("required_rejections", &self.required_rejections)
6794 .field("occurred_at_unix_ms", &self.occurred_at_unix_ms)
6795 .field("block_time_moving_average_ms", &self.block_time_moving_average_ms)
6796 .field("activities", &self.activities)
6797 .finish()
6798 }
6799}
6800impl FlowStepView {
6801 pub const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowStepView";
6806}
6807::buffa::impl_default_instance!(FlowStepView);
6808impl ::buffa::MessageName for FlowStepView {
6809 const PACKAGE: &'static str = "chain.lifecycle.v1";
6810 const NAME: &'static str = "FlowStepView";
6811 const FULL_NAME: &'static str = "chain.lifecycle.v1.FlowStepView";
6812 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowStepView";
6813}
6814impl ::buffa::Message for FlowStepView {
6815 #[allow(clippy::let_and_return)]
6821 fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
6822 #[allow(unused_imports)]
6823 use ::buffa::Enumeration as _;
6824 let mut size = 0u32;
6825 if self.sequence != 0u32 {
6826 size += 1u32 + ::buffa::types::uint32_encoded_len(self.sequence) as u32;
6827 }
6828 {
6829 let val = self.step.to_i32();
6830 if val != 0 {
6831 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
6832 }
6833 }
6834 if self.asset_ids.is_set() {
6835 let __slot = __cache.reserve();
6836 let inner_size = self.asset_ids.compute_size(__cache);
6837 __cache.set(__slot, inner_size);
6838 size
6839 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
6840 + inner_size;
6841 }
6842 if self.polyester_chain_id != 0u32 {
6843 size
6844 += 1u32
6845 + ::buffa::types::uint32_encoded_len(self.polyester_chain_id) as u32;
6846 }
6847 if self.amount_e18.is_set() {
6848 let __slot = __cache.reserve();
6849 let inner_size = self.amount_e18.compute_size(__cache);
6850 __cache.set(__slot, inner_size);
6851 size
6852 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
6853 + inner_size;
6854 }
6855 if !self.milestone_tx_ref.is_empty() {
6856 size
6857 += 1u32
6858 + ::buffa::types::string_encoded_len(&self.milestone_tx_ref) as u32;
6859 }
6860 {
6861 let val = self.lifecycle_source.to_i32();
6862 if val != 0 {
6863 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
6864 }
6865 }
6866 {
6867 let val = self.lifecycle_reason.to_i32();
6868 if val != 0 {
6869 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
6870 }
6871 }
6872 if self.current_confirmations != 0u32 {
6873 size
6874 += 1u32
6875 + ::buffa::types::uint32_encoded_len(self.current_confirmations)
6876 as u32;
6877 }
6878 if self.required_confirmations != 0u32 {
6879 size
6880 += 1u32
6881 + ::buffa::types::uint32_encoded_len(self.required_confirmations)
6882 as u32;
6883 }
6884 if self.approve_count != 0u32 {
6885 size += 2u32 + ::buffa::types::uint32_encoded_len(self.approve_count) as u32;
6886 }
6887 if self.reject_count != 0u32 {
6888 size += 2u32 + ::buffa::types::uint32_encoded_len(self.reject_count) as u32;
6889 }
6890 if self.validator_count != 0u32 {
6891 size
6892 += 2u32
6893 + ::buffa::types::uint32_encoded_len(self.validator_count) as u32;
6894 }
6895 if self.occurred_at_unix_ms != 0u64 {
6896 size
6897 += 2u32
6898 + ::buffa::types::uint64_encoded_len(self.occurred_at_unix_ms)
6899 as u32;
6900 }
6901 if self.block_time_moving_average_ms != 0u64 {
6902 size
6903 += 2u32
6904 + ::buffa::types::uint64_encoded_len(
6905 self.block_time_moving_average_ms,
6906 ) as u32;
6907 }
6908 for v in &self.activities {
6909 let __slot = __cache.reserve();
6910 let inner_size = v.compute_size(__cache);
6911 __cache.set(__slot, inner_size);
6912 size
6913 += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
6914 + inner_size;
6915 }
6916 if self.required_approvals != 0u32 {
6917 size
6918 += 2u32
6919 + ::buffa::types::uint32_encoded_len(self.required_approvals) as u32;
6920 }
6921 if self.required_rejections != 0u32 {
6922 size
6923 += 2u32
6924 + ::buffa::types::uint32_encoded_len(self.required_rejections)
6925 as u32;
6926 }
6927 if self.request_fee.is_set() {
6928 let __slot = __cache.reserve();
6929 let inner_size = self.request_fee.compute_size(__cache);
6930 __cache.set(__slot, inner_size);
6931 size
6932 += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
6933 + inner_size;
6934 }
6935 if self.zipper_reason.is_set() {
6936 let __slot = __cache.reserve();
6937 let inner_size = self.zipper_reason.compute_size(__cache);
6938 __cache.set(__slot, inner_size);
6939 size
6940 += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
6941 + inner_size;
6942 }
6943 size += self.__buffa_unknown_fields.encoded_len() as u32;
6944 size
6945 }
6946 fn write_to(
6947 &self,
6948 __cache: &mut ::buffa::SizeCache,
6949 buf: &mut impl ::buffa::bytes::BufMut,
6950 ) {
6951 #[allow(unused_imports)]
6952 use ::buffa::Enumeration as _;
6953 if self.sequence != 0u32 {
6954 ::buffa::types::put_uint32_field(1u32, self.sequence, buf);
6955 }
6956 {
6957 let val = self.step.to_i32();
6958 if val != 0 {
6959 ::buffa::types::put_int32_field(3u32, val, buf);
6960 }
6961 }
6962 if self.asset_ids.is_set() {
6963 ::buffa::types::put_len_delimited_header(7u32, __cache.consume_next(), buf);
6964 self.asset_ids.write_to(__cache, buf);
6965 }
6966 if self.polyester_chain_id != 0u32 {
6967 ::buffa::types::put_uint32_field(8u32, self.polyester_chain_id, buf);
6968 }
6969 if self.amount_e18.is_set() {
6970 ::buffa::types::put_len_delimited_header(9u32, __cache.consume_next(), buf);
6971 self.amount_e18.write_to(__cache, buf);
6972 }
6973 if !self.milestone_tx_ref.is_empty() {
6974 ::buffa::types::put_string_field(11u32, &self.milestone_tx_ref, buf);
6975 }
6976 {
6977 let val = self.lifecycle_source.to_i32();
6978 if val != 0 {
6979 ::buffa::types::put_int32_field(12u32, val, buf);
6980 }
6981 }
6982 {
6983 let val = self.lifecycle_reason.to_i32();
6984 if val != 0 {
6985 ::buffa::types::put_int32_field(13u32, val, buf);
6986 }
6987 }
6988 if self.current_confirmations != 0u32 {
6989 ::buffa::types::put_uint32_field(14u32, self.current_confirmations, buf);
6990 }
6991 if self.required_confirmations != 0u32 {
6992 ::buffa::types::put_uint32_field(15u32, self.required_confirmations, buf);
6993 }
6994 if self.approve_count != 0u32 {
6995 ::buffa::types::put_uint32_field(16u32, self.approve_count, buf);
6996 }
6997 if self.reject_count != 0u32 {
6998 ::buffa::types::put_uint32_field(17u32, self.reject_count, buf);
6999 }
7000 if self.validator_count != 0u32 {
7001 ::buffa::types::put_uint32_field(18u32, self.validator_count, buf);
7002 }
7003 if self.occurred_at_unix_ms != 0u64 {
7004 ::buffa::types::put_uint64_field(19u32, self.occurred_at_unix_ms, buf);
7005 }
7006 if self.block_time_moving_average_ms != 0u64 {
7007 ::buffa::types::put_uint64_field(
7008 20u32,
7009 self.block_time_moving_average_ms,
7010 buf,
7011 );
7012 }
7013 for v in &self.activities {
7014 ::buffa::types::put_len_delimited_header(21u32, __cache.consume_next(), buf);
7015 v.write_to(__cache, buf);
7016 }
7017 if self.required_approvals != 0u32 {
7018 ::buffa::types::put_uint32_field(22u32, self.required_approvals, buf);
7019 }
7020 if self.required_rejections != 0u32 {
7021 ::buffa::types::put_uint32_field(23u32, self.required_rejections, buf);
7022 }
7023 if self.request_fee.is_set() {
7024 ::buffa::types::put_len_delimited_header(24u32, __cache.consume_next(), buf);
7025 self.request_fee.write_to(__cache, buf);
7026 }
7027 if self.zipper_reason.is_set() {
7028 ::buffa::types::put_len_delimited_header(25u32, __cache.consume_next(), buf);
7029 self.zipper_reason.write_to(__cache, buf);
7030 }
7031 self.__buffa_unknown_fields.write_to(buf);
7032 }
7033 fn merge_field(
7034 &mut self,
7035 tag: ::buffa::encoding::Tag,
7036 buf: &mut impl ::buffa::bytes::Buf,
7037 ctx: ::buffa::DecodeContext<'_>,
7038 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
7039 #[allow(unused_imports)]
7040 use ::buffa::bytes::Buf as _;
7041 #[allow(unused_imports)]
7042 use ::buffa::Enumeration as _;
7043 match tag.field_number() {
7044 1u32 => {
7045 ::buffa::encoding::check_wire_type(
7046 tag,
7047 ::buffa::encoding::WireType::Varint,
7048 )?;
7049 self.sequence = ::buffa::types::decode_uint32(buf)?;
7050 }
7051 3u32 => {
7052 ::buffa::encoding::check_wire_type(
7053 tag,
7054 ::buffa::encoding::WireType::Varint,
7055 )?;
7056 self.step = ::buffa::EnumValue::from(::buffa::types::decode_int32(buf)?);
7057 }
7058 7u32 => {
7059 ::buffa::encoding::check_wire_type(
7060 tag,
7061 ::buffa::encoding::WireType::LengthDelimited,
7062 )?;
7063 ::buffa::Message::merge_length_delimited(
7064 self.asset_ids.get_or_insert_default(),
7065 buf,
7066 ctx,
7067 )?;
7068 }
7069 8u32 => {
7070 ::buffa::encoding::check_wire_type(
7071 tag,
7072 ::buffa::encoding::WireType::Varint,
7073 )?;
7074 self.polyester_chain_id = ::buffa::types::decode_uint32(buf)?;
7075 }
7076 9u32 => {
7077 ::buffa::encoding::check_wire_type(
7078 tag,
7079 ::buffa::encoding::WireType::LengthDelimited,
7080 )?;
7081 ::buffa::Message::merge_length_delimited(
7082 self.amount_e18.get_or_insert_default(),
7083 buf,
7084 ctx,
7085 )?;
7086 }
7087 11u32 => {
7088 ::buffa::encoding::check_wire_type(
7089 tag,
7090 ::buffa::encoding::WireType::LengthDelimited,
7091 )?;
7092 ::buffa::types::merge_string(&mut self.milestone_tx_ref, buf)?;
7093 }
7094 12u32 => {
7095 ::buffa::encoding::check_wire_type(
7096 tag,
7097 ::buffa::encoding::WireType::Varint,
7098 )?;
7099 self.lifecycle_source = ::buffa::EnumValue::from(
7100 ::buffa::types::decode_int32(buf)?,
7101 );
7102 }
7103 13u32 => {
7104 ::buffa::encoding::check_wire_type(
7105 tag,
7106 ::buffa::encoding::WireType::Varint,
7107 )?;
7108 self.lifecycle_reason = ::buffa::EnumValue::from(
7109 ::buffa::types::decode_int32(buf)?,
7110 );
7111 }
7112 14u32 => {
7113 ::buffa::encoding::check_wire_type(
7114 tag,
7115 ::buffa::encoding::WireType::Varint,
7116 )?;
7117 self.current_confirmations = ::buffa::types::decode_uint32(buf)?;
7118 }
7119 15u32 => {
7120 ::buffa::encoding::check_wire_type(
7121 tag,
7122 ::buffa::encoding::WireType::Varint,
7123 )?;
7124 self.required_confirmations = ::buffa::types::decode_uint32(buf)?;
7125 }
7126 16u32 => {
7127 ::buffa::encoding::check_wire_type(
7128 tag,
7129 ::buffa::encoding::WireType::Varint,
7130 )?;
7131 self.approve_count = ::buffa::types::decode_uint32(buf)?;
7132 }
7133 17u32 => {
7134 ::buffa::encoding::check_wire_type(
7135 tag,
7136 ::buffa::encoding::WireType::Varint,
7137 )?;
7138 self.reject_count = ::buffa::types::decode_uint32(buf)?;
7139 }
7140 18u32 => {
7141 ::buffa::encoding::check_wire_type(
7142 tag,
7143 ::buffa::encoding::WireType::Varint,
7144 )?;
7145 self.validator_count = ::buffa::types::decode_uint32(buf)?;
7146 }
7147 19u32 => {
7148 ::buffa::encoding::check_wire_type(
7149 tag,
7150 ::buffa::encoding::WireType::Varint,
7151 )?;
7152 self.occurred_at_unix_ms = ::buffa::types::decode_uint64(buf)?;
7153 }
7154 20u32 => {
7155 ::buffa::encoding::check_wire_type(
7156 tag,
7157 ::buffa::encoding::WireType::Varint,
7158 )?;
7159 self.block_time_moving_average_ms = ::buffa::types::decode_uint64(buf)?;
7160 }
7161 21u32 => {
7162 ::buffa::encoding::check_wire_type(
7163 tag,
7164 ::buffa::encoding::WireType::LengthDelimited,
7165 )?;
7166 let mut elem = ::core::default::Default::default();
7167 ::buffa::Message::merge_length_delimited(&mut elem, buf, ctx)?;
7168 self.activities.push(elem);
7169 }
7170 22u32 => {
7171 ::buffa::encoding::check_wire_type(
7172 tag,
7173 ::buffa::encoding::WireType::Varint,
7174 )?;
7175 self.required_approvals = ::buffa::types::decode_uint32(buf)?;
7176 }
7177 23u32 => {
7178 ::buffa::encoding::check_wire_type(
7179 tag,
7180 ::buffa::encoding::WireType::Varint,
7181 )?;
7182 self.required_rejections = ::buffa::types::decode_uint32(buf)?;
7183 }
7184 24u32 => {
7185 ::buffa::encoding::check_wire_type(
7186 tag,
7187 ::buffa::encoding::WireType::LengthDelimited,
7188 )?;
7189 ::buffa::Message::merge_length_delimited(
7190 self.request_fee.get_or_insert_default(),
7191 buf,
7192 ctx,
7193 )?;
7194 }
7195 25u32 => {
7196 ::buffa::encoding::check_wire_type(
7197 tag,
7198 ::buffa::encoding::WireType::LengthDelimited,
7199 )?;
7200 ::buffa::Message::merge_length_delimited(
7201 self.zipper_reason.get_or_insert_default(),
7202 buf,
7203 ctx,
7204 )?;
7205 }
7206 _ => {
7207 self.__buffa_unknown_fields
7208 .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
7209 }
7210 }
7211 ::core::result::Result::Ok(())
7212 }
7213 fn clear(&mut self) {
7214 self.sequence = 0u32;
7215 self.step = ::buffa::EnumValue::from(0);
7216 self.asset_ids = ::buffa::MessageField::none();
7217 self.polyester_chain_id = 0u32;
7218 self.amount_e18 = ::buffa::MessageField::none();
7219 self.milestone_tx_ref.clear();
7220 self.lifecycle_source = ::buffa::EnumValue::from(0);
7221 self.lifecycle_reason = ::buffa::EnumValue::from(0);
7222 self.current_confirmations = 0u32;
7223 self.required_confirmations = 0u32;
7224 self.approve_count = 0u32;
7225 self.reject_count = 0u32;
7226 self.validator_count = 0u32;
7227 self.occurred_at_unix_ms = 0u64;
7228 self.block_time_moving_average_ms = 0u64;
7229 self.activities.clear();
7230 self.required_approvals = 0u32;
7231 self.required_rejections = 0u32;
7232 self.request_fee = ::buffa::MessageField::none();
7233 self.zipper_reason = ::buffa::MessageField::none();
7234 self.__buffa_unknown_fields.clear();
7235 }
7236}
7237impl ::buffa::ExtensionSet for FlowStepView {
7238 const PROTO_FQN: &'static str = "chain.lifecycle.v1.FlowStepView";
7239 fn unknown_fields(&self) -> &::buffa::UnknownFields {
7240 &self.__buffa_unknown_fields
7241 }
7242 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
7243 &mut self.__buffa_unknown_fields
7244 }
7245}
7246impl ::buffa::json_helpers::ProtoElemJson for FlowStepView {
7247 fn serialize_proto_json<S: ::serde::Serializer>(
7248 v: &Self,
7249 s: S,
7250 ) -> ::core::result::Result<S::Ok, S::Error> {
7251 ::serde::Serialize::serialize(v, s)
7252 }
7253 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
7254 d: D,
7255 ) -> ::core::result::Result<Self, D::Error> {
7256 <Self as ::serde::Deserialize>::deserialize(d)
7257 }
7258}
7259#[doc(hidden)]
7260pub const __FLOW_STEP_VIEW_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
7261 type_url: "type.googleapis.com/chain.lifecycle.v1.FlowStepView",
7262 to_json: ::buffa::type_registry::any_to_json::<FlowStepView>,
7263 from_json: ::buffa::type_registry::any_from_json::<FlowStepView>,
7264 is_wkt: false,
7265};
7266#[derive(Clone, PartialEq, Default)]
7268#[derive(::serde::Serialize, ::serde::Deserialize)]
7269#[serde(default)]
7270pub struct FlowStepActivityView {
7271 #[serde(
7275 rename = "sequence",
7276 with = "::buffa::json_helpers::uint32",
7277 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
7278 )]
7279 pub sequence: u32,
7280 #[serde(
7284 rename = "txRef",
7285 alias = "tx_ref",
7286 with = "::buffa::json_helpers::proto_string",
7287 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
7288 )]
7289 pub tx_ref: ::buffa::alloc::string::String,
7290 #[serde(
7294 rename = "occurredAtUnixMs",
7295 alias = "occurred_at_unix_ms",
7296 with = "::buffa::json_helpers::uint64",
7297 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
7298 )]
7299 pub occurred_at_unix_ms: u64,
7300 #[serde(
7304 rename = "lifecycleSource",
7305 alias = "lifecycle_source",
7306 with = "::buffa::json_helpers::proto_enum",
7307 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
7308 )]
7309 pub lifecycle_source: ::buffa::EnumValue<LifecycleSource>,
7310 #[serde(
7314 rename = "lifecycleReason",
7315 alias = "lifecycle_reason",
7316 with = "::buffa::json_helpers::proto_enum",
7317 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
7318 )]
7319 pub lifecycle_reason: ::buffa::EnumValue<LifecycleReason>,
7320 #[serde(
7324 rename = "zipperReason",
7325 alias = "zipper_reason",
7326 skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
7327 )]
7328 pub zipper_reason: ::buffa::MessageField<
7329 super::super::zipper::v1::ZipperReasonDetails,
7330 >,
7331 #[serde(
7335 rename = "currentConfirmations",
7336 alias = "current_confirmations",
7337 with = "::buffa::json_helpers::uint32",
7338 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
7339 )]
7340 pub current_confirmations: u32,
7341 #[serde(
7345 rename = "requiredConfirmations",
7346 alias = "required_confirmations",
7347 with = "::buffa::json_helpers::uint32",
7348 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
7349 )]
7350 pub required_confirmations: u32,
7351 #[serde(
7355 rename = "approveCount",
7356 alias = "approve_count",
7357 with = "::buffa::json_helpers::uint32",
7358 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
7359 )]
7360 pub approve_count: u32,
7361 #[serde(
7365 rename = "rejectCount",
7366 alias = "reject_count",
7367 with = "::buffa::json_helpers::uint32",
7368 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
7369 )]
7370 pub reject_count: u32,
7371 #[serde(
7375 rename = "validatorCount",
7376 alias = "validator_count",
7377 with = "::buffa::json_helpers::uint32",
7378 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
7379 )]
7380 pub validator_count: u32,
7381 #[serde(
7385 rename = "kind",
7386 with = "::buffa::json_helpers::proto_enum",
7387 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
7388 )]
7389 pub kind: ::buffa::EnumValue<FlowStepActivityKind>,
7390 #[serde(
7394 rename = "requiredApprovals",
7395 alias = "required_approvals",
7396 with = "::buffa::json_helpers::uint32",
7397 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
7398 )]
7399 pub required_approvals: u32,
7400 #[serde(
7404 rename = "requiredRejections",
7405 alias = "required_rejections",
7406 with = "::buffa::json_helpers::uint32",
7407 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
7408 )]
7409 pub required_rejections: u32,
7410 #[serde(
7416 rename = "amountE18",
7417 alias = "amount_e18",
7418 skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
7419 )]
7420 pub amount_e18: ::buffa::MessageField<
7421 super::super::super::polyester::r#type::v1::U128,
7422 >,
7423 #[serde(
7427 rename = "ledgerTransferId",
7428 alias = "ledger_transfer_id",
7429 with = "::buffa::json_helpers::proto_string",
7430 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
7431 )]
7432 pub ledger_transfer_id: ::buffa::alloc::string::String,
7433 #[serde(skip)]
7434 #[doc(hidden)]
7435 pub __buffa_unknown_fields: ::buffa::UnknownFields,
7436}
7437impl ::core::fmt::Debug for FlowStepActivityView {
7438 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7439 f.debug_struct("FlowStepActivityView")
7440 .field("sequence", &self.sequence)
7441 .field("tx_ref", &self.tx_ref)
7442 .field("occurred_at_unix_ms", &self.occurred_at_unix_ms)
7443 .field("lifecycle_source", &self.lifecycle_source)
7444 .field("lifecycle_reason", &self.lifecycle_reason)
7445 .field("zipper_reason", &self.zipper_reason)
7446 .field("current_confirmations", &self.current_confirmations)
7447 .field("required_confirmations", &self.required_confirmations)
7448 .field("approve_count", &self.approve_count)
7449 .field("reject_count", &self.reject_count)
7450 .field("validator_count", &self.validator_count)
7451 .field("kind", &self.kind)
7452 .field("required_approvals", &self.required_approvals)
7453 .field("required_rejections", &self.required_rejections)
7454 .field("amount_e18", &self.amount_e18)
7455 .field("ledger_transfer_id", &self.ledger_transfer_id)
7456 .finish()
7457 }
7458}
7459impl FlowStepActivityView {
7460 pub const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowStepActivityView";
7465}
7466::buffa::impl_default_instance!(FlowStepActivityView);
7467impl ::buffa::MessageName for FlowStepActivityView {
7468 const PACKAGE: &'static str = "chain.lifecycle.v1";
7469 const NAME: &'static str = "FlowStepActivityView";
7470 const FULL_NAME: &'static str = "chain.lifecycle.v1.FlowStepActivityView";
7471 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowStepActivityView";
7472}
7473impl ::buffa::Message for FlowStepActivityView {
7474 #[allow(clippy::let_and_return)]
7480 fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
7481 #[allow(unused_imports)]
7482 use ::buffa::Enumeration as _;
7483 let mut size = 0u32;
7484 if self.sequence != 0u32 {
7485 size += 1u32 + ::buffa::types::uint32_encoded_len(self.sequence) as u32;
7486 }
7487 if !self.tx_ref.is_empty() {
7488 size += 1u32 + ::buffa::types::string_encoded_len(&self.tx_ref) as u32;
7489 }
7490 if self.occurred_at_unix_ms != 0u64 {
7491 size
7492 += 1u32
7493 + ::buffa::types::uint64_encoded_len(self.occurred_at_unix_ms)
7494 as u32;
7495 }
7496 {
7497 let val = self.lifecycle_source.to_i32();
7498 if val != 0 {
7499 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
7500 }
7501 }
7502 {
7503 let val = self.lifecycle_reason.to_i32();
7504 if val != 0 {
7505 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
7506 }
7507 }
7508 if self.current_confirmations != 0u32 {
7509 size
7510 += 1u32
7511 + ::buffa::types::uint32_encoded_len(self.current_confirmations)
7512 as u32;
7513 }
7514 if self.required_confirmations != 0u32 {
7515 size
7516 += 1u32
7517 + ::buffa::types::uint32_encoded_len(self.required_confirmations)
7518 as u32;
7519 }
7520 if self.approve_count != 0u32 {
7521 size += 1u32 + ::buffa::types::uint32_encoded_len(self.approve_count) as u32;
7522 }
7523 if self.reject_count != 0u32 {
7524 size += 1u32 + ::buffa::types::uint32_encoded_len(self.reject_count) as u32;
7525 }
7526 if self.validator_count != 0u32 {
7527 size
7528 += 1u32
7529 + ::buffa::types::uint32_encoded_len(self.validator_count) as u32;
7530 }
7531 {
7532 let val = self.kind.to_i32();
7533 if val != 0 {
7534 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
7535 }
7536 }
7537 if self.required_approvals != 0u32 {
7538 size
7539 += 1u32
7540 + ::buffa::types::uint32_encoded_len(self.required_approvals) as u32;
7541 }
7542 if self.required_rejections != 0u32 {
7543 size
7544 += 1u32
7545 + ::buffa::types::uint32_encoded_len(self.required_rejections)
7546 as u32;
7547 }
7548 if self.amount_e18.is_set() {
7549 let __slot = __cache.reserve();
7550 let inner_size = self.amount_e18.compute_size(__cache);
7551 __cache.set(__slot, inner_size);
7552 size
7553 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
7554 + inner_size;
7555 }
7556 if !self.ledger_transfer_id.is_empty() {
7557 size
7558 += 1u32
7559 + ::buffa::types::string_encoded_len(&self.ledger_transfer_id)
7560 as u32;
7561 }
7562 if self.zipper_reason.is_set() {
7563 let __slot = __cache.reserve();
7564 let inner_size = self.zipper_reason.compute_size(__cache);
7565 __cache.set(__slot, inner_size);
7566 size
7567 += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
7568 + inner_size;
7569 }
7570 size += self.__buffa_unknown_fields.encoded_len() as u32;
7571 size
7572 }
7573 fn write_to(
7574 &self,
7575 __cache: &mut ::buffa::SizeCache,
7576 buf: &mut impl ::buffa::bytes::BufMut,
7577 ) {
7578 #[allow(unused_imports)]
7579 use ::buffa::Enumeration as _;
7580 if self.sequence != 0u32 {
7581 ::buffa::types::put_uint32_field(1u32, self.sequence, buf);
7582 }
7583 if !self.tx_ref.is_empty() {
7584 ::buffa::types::put_string_field(2u32, &self.tx_ref, buf);
7585 }
7586 if self.occurred_at_unix_ms != 0u64 {
7587 ::buffa::types::put_uint64_field(3u32, self.occurred_at_unix_ms, buf);
7588 }
7589 {
7590 let val = self.lifecycle_source.to_i32();
7591 if val != 0 {
7592 ::buffa::types::put_int32_field(4u32, val, buf);
7593 }
7594 }
7595 {
7596 let val = self.lifecycle_reason.to_i32();
7597 if val != 0 {
7598 ::buffa::types::put_int32_field(5u32, val, buf);
7599 }
7600 }
7601 if self.current_confirmations != 0u32 {
7602 ::buffa::types::put_uint32_field(6u32, self.current_confirmations, buf);
7603 }
7604 if self.required_confirmations != 0u32 {
7605 ::buffa::types::put_uint32_field(7u32, self.required_confirmations, buf);
7606 }
7607 if self.approve_count != 0u32 {
7608 ::buffa::types::put_uint32_field(8u32, self.approve_count, buf);
7609 }
7610 if self.reject_count != 0u32 {
7611 ::buffa::types::put_uint32_field(9u32, self.reject_count, buf);
7612 }
7613 if self.validator_count != 0u32 {
7614 ::buffa::types::put_uint32_field(10u32, self.validator_count, buf);
7615 }
7616 {
7617 let val = self.kind.to_i32();
7618 if val != 0 {
7619 ::buffa::types::put_int32_field(11u32, val, buf);
7620 }
7621 }
7622 if self.required_approvals != 0u32 {
7623 ::buffa::types::put_uint32_field(12u32, self.required_approvals, buf);
7624 }
7625 if self.required_rejections != 0u32 {
7626 ::buffa::types::put_uint32_field(13u32, self.required_rejections, buf);
7627 }
7628 if self.amount_e18.is_set() {
7629 ::buffa::types::put_len_delimited_header(14u32, __cache.consume_next(), buf);
7630 self.amount_e18.write_to(__cache, buf);
7631 }
7632 if !self.ledger_transfer_id.is_empty() {
7633 ::buffa::types::put_string_field(15u32, &self.ledger_transfer_id, buf);
7634 }
7635 if self.zipper_reason.is_set() {
7636 ::buffa::types::put_len_delimited_header(16u32, __cache.consume_next(), buf);
7637 self.zipper_reason.write_to(__cache, buf);
7638 }
7639 self.__buffa_unknown_fields.write_to(buf);
7640 }
7641 fn merge_field(
7642 &mut self,
7643 tag: ::buffa::encoding::Tag,
7644 buf: &mut impl ::buffa::bytes::Buf,
7645 ctx: ::buffa::DecodeContext<'_>,
7646 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
7647 #[allow(unused_imports)]
7648 use ::buffa::bytes::Buf as _;
7649 #[allow(unused_imports)]
7650 use ::buffa::Enumeration as _;
7651 match tag.field_number() {
7652 1u32 => {
7653 ::buffa::encoding::check_wire_type(
7654 tag,
7655 ::buffa::encoding::WireType::Varint,
7656 )?;
7657 self.sequence = ::buffa::types::decode_uint32(buf)?;
7658 }
7659 2u32 => {
7660 ::buffa::encoding::check_wire_type(
7661 tag,
7662 ::buffa::encoding::WireType::LengthDelimited,
7663 )?;
7664 ::buffa::types::merge_string(&mut self.tx_ref, buf)?;
7665 }
7666 3u32 => {
7667 ::buffa::encoding::check_wire_type(
7668 tag,
7669 ::buffa::encoding::WireType::Varint,
7670 )?;
7671 self.occurred_at_unix_ms = ::buffa::types::decode_uint64(buf)?;
7672 }
7673 4u32 => {
7674 ::buffa::encoding::check_wire_type(
7675 tag,
7676 ::buffa::encoding::WireType::Varint,
7677 )?;
7678 self.lifecycle_source = ::buffa::EnumValue::from(
7679 ::buffa::types::decode_int32(buf)?,
7680 );
7681 }
7682 5u32 => {
7683 ::buffa::encoding::check_wire_type(
7684 tag,
7685 ::buffa::encoding::WireType::Varint,
7686 )?;
7687 self.lifecycle_reason = ::buffa::EnumValue::from(
7688 ::buffa::types::decode_int32(buf)?,
7689 );
7690 }
7691 6u32 => {
7692 ::buffa::encoding::check_wire_type(
7693 tag,
7694 ::buffa::encoding::WireType::Varint,
7695 )?;
7696 self.current_confirmations = ::buffa::types::decode_uint32(buf)?;
7697 }
7698 7u32 => {
7699 ::buffa::encoding::check_wire_type(
7700 tag,
7701 ::buffa::encoding::WireType::Varint,
7702 )?;
7703 self.required_confirmations = ::buffa::types::decode_uint32(buf)?;
7704 }
7705 8u32 => {
7706 ::buffa::encoding::check_wire_type(
7707 tag,
7708 ::buffa::encoding::WireType::Varint,
7709 )?;
7710 self.approve_count = ::buffa::types::decode_uint32(buf)?;
7711 }
7712 9u32 => {
7713 ::buffa::encoding::check_wire_type(
7714 tag,
7715 ::buffa::encoding::WireType::Varint,
7716 )?;
7717 self.reject_count = ::buffa::types::decode_uint32(buf)?;
7718 }
7719 10u32 => {
7720 ::buffa::encoding::check_wire_type(
7721 tag,
7722 ::buffa::encoding::WireType::Varint,
7723 )?;
7724 self.validator_count = ::buffa::types::decode_uint32(buf)?;
7725 }
7726 11u32 => {
7727 ::buffa::encoding::check_wire_type(
7728 tag,
7729 ::buffa::encoding::WireType::Varint,
7730 )?;
7731 self.kind = ::buffa::EnumValue::from(::buffa::types::decode_int32(buf)?);
7732 }
7733 12u32 => {
7734 ::buffa::encoding::check_wire_type(
7735 tag,
7736 ::buffa::encoding::WireType::Varint,
7737 )?;
7738 self.required_approvals = ::buffa::types::decode_uint32(buf)?;
7739 }
7740 13u32 => {
7741 ::buffa::encoding::check_wire_type(
7742 tag,
7743 ::buffa::encoding::WireType::Varint,
7744 )?;
7745 self.required_rejections = ::buffa::types::decode_uint32(buf)?;
7746 }
7747 14u32 => {
7748 ::buffa::encoding::check_wire_type(
7749 tag,
7750 ::buffa::encoding::WireType::LengthDelimited,
7751 )?;
7752 ::buffa::Message::merge_length_delimited(
7753 self.amount_e18.get_or_insert_default(),
7754 buf,
7755 ctx,
7756 )?;
7757 }
7758 15u32 => {
7759 ::buffa::encoding::check_wire_type(
7760 tag,
7761 ::buffa::encoding::WireType::LengthDelimited,
7762 )?;
7763 ::buffa::types::merge_string(&mut self.ledger_transfer_id, buf)?;
7764 }
7765 16u32 => {
7766 ::buffa::encoding::check_wire_type(
7767 tag,
7768 ::buffa::encoding::WireType::LengthDelimited,
7769 )?;
7770 ::buffa::Message::merge_length_delimited(
7771 self.zipper_reason.get_or_insert_default(),
7772 buf,
7773 ctx,
7774 )?;
7775 }
7776 _ => {
7777 self.__buffa_unknown_fields
7778 .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
7779 }
7780 }
7781 ::core::result::Result::Ok(())
7782 }
7783 fn clear(&mut self) {
7784 self.sequence = 0u32;
7785 self.tx_ref.clear();
7786 self.occurred_at_unix_ms = 0u64;
7787 self.lifecycle_source = ::buffa::EnumValue::from(0);
7788 self.lifecycle_reason = ::buffa::EnumValue::from(0);
7789 self.current_confirmations = 0u32;
7790 self.required_confirmations = 0u32;
7791 self.approve_count = 0u32;
7792 self.reject_count = 0u32;
7793 self.validator_count = 0u32;
7794 self.kind = ::buffa::EnumValue::from(0);
7795 self.required_approvals = 0u32;
7796 self.required_rejections = 0u32;
7797 self.amount_e18 = ::buffa::MessageField::none();
7798 self.ledger_transfer_id.clear();
7799 self.zipper_reason = ::buffa::MessageField::none();
7800 self.__buffa_unknown_fields.clear();
7801 }
7802}
7803impl ::buffa::ExtensionSet for FlowStepActivityView {
7804 const PROTO_FQN: &'static str = "chain.lifecycle.v1.FlowStepActivityView";
7805 fn unknown_fields(&self) -> &::buffa::UnknownFields {
7806 &self.__buffa_unknown_fields
7807 }
7808 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
7809 &mut self.__buffa_unknown_fields
7810 }
7811}
7812impl ::buffa::json_helpers::ProtoElemJson for FlowStepActivityView {
7813 fn serialize_proto_json<S: ::serde::Serializer>(
7814 v: &Self,
7815 s: S,
7816 ) -> ::core::result::Result<S::Ok, S::Error> {
7817 ::serde::Serialize::serialize(v, s)
7818 }
7819 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
7820 d: D,
7821 ) -> ::core::result::Result<Self, D::Error> {
7822 <Self as ::serde::Deserialize>::deserialize(d)
7823 }
7824}
7825#[doc(hidden)]
7826pub const __FLOW_STEP_ACTIVITY_VIEW_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
7827 type_url: "type.googleapis.com/chain.lifecycle.v1.FlowStepActivityView",
7828 to_json: ::buffa::type_registry::any_to_json::<FlowStepActivityView>,
7829 from_json: ::buffa::type_registry::any_from_json::<FlowStepActivityView>,
7830 is_wkt: false,
7831};
7832#[derive(Clone, PartialEq, Default)]
7835#[derive(::serde::Serialize, ::serde::Deserialize)]
7836#[serde(default)]
7837pub struct FlowTimelineItemView {
7838 #[serde(
7842 rename = "sequence",
7843 with = "::buffa::json_helpers::uint32",
7844 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
7845 )]
7846 pub sequence: u32,
7847 #[serde(
7851 rename = "step",
7852 with = "::buffa::json_helpers::proto_enum",
7853 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
7854 )]
7855 pub step: ::buffa::EnumValue<FlowStep>,
7856 #[serde(
7860 rename = "status",
7861 with = "::buffa::json_helpers::proto_enum",
7862 skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
7863 )]
7864 pub status: ::buffa::EnumValue<FlowTimelineStatus>,
7865 #[serde(
7870 rename = "expectedDurationMs",
7871 alias = "expected_duration_ms",
7872 with = "::buffa::json_helpers::uint64",
7873 skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
7874 )]
7875 pub expected_duration_ms: u64,
7876 #[serde(skip)]
7877 #[doc(hidden)]
7878 pub __buffa_unknown_fields: ::buffa::UnknownFields,
7879}
7880impl ::core::fmt::Debug for FlowTimelineItemView {
7881 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7882 f.debug_struct("FlowTimelineItemView")
7883 .field("sequence", &self.sequence)
7884 .field("step", &self.step)
7885 .field("status", &self.status)
7886 .field("expected_duration_ms", &self.expected_duration_ms)
7887 .finish()
7888 }
7889}
7890impl FlowTimelineItemView {
7891 pub const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowTimelineItemView";
7896}
7897::buffa::impl_default_instance!(FlowTimelineItemView);
7898impl ::buffa::MessageName for FlowTimelineItemView {
7899 const PACKAGE: &'static str = "chain.lifecycle.v1";
7900 const NAME: &'static str = "FlowTimelineItemView";
7901 const FULL_NAME: &'static str = "chain.lifecycle.v1.FlowTimelineItemView";
7902 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowTimelineItemView";
7903}
7904impl ::buffa::Message for FlowTimelineItemView {
7905 #[allow(clippy::let_and_return)]
7911 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
7912 #[allow(unused_imports)]
7913 use ::buffa::Enumeration as _;
7914 let mut size = 0u32;
7915 if self.sequence != 0u32 {
7916 size += 1u32 + ::buffa::types::uint32_encoded_len(self.sequence) as u32;
7917 }
7918 {
7919 let val = self.step.to_i32();
7920 if val != 0 {
7921 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
7922 }
7923 }
7924 {
7925 let val = self.status.to_i32();
7926 if val != 0 {
7927 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
7928 }
7929 }
7930 if self.expected_duration_ms != 0u64 {
7931 size
7932 += 1u32
7933 + ::buffa::types::uint64_encoded_len(self.expected_duration_ms)
7934 as u32;
7935 }
7936 size += self.__buffa_unknown_fields.encoded_len() as u32;
7937 size
7938 }
7939 fn write_to(
7940 &self,
7941 _cache: &mut ::buffa::SizeCache,
7942 buf: &mut impl ::buffa::bytes::BufMut,
7943 ) {
7944 #[allow(unused_imports)]
7945 use ::buffa::Enumeration as _;
7946 if self.sequence != 0u32 {
7947 ::buffa::types::put_uint32_field(1u32, self.sequence, buf);
7948 }
7949 {
7950 let val = self.step.to_i32();
7951 if val != 0 {
7952 ::buffa::types::put_int32_field(2u32, val, buf);
7953 }
7954 }
7955 {
7956 let val = self.status.to_i32();
7957 if val != 0 {
7958 ::buffa::types::put_int32_field(3u32, val, buf);
7959 }
7960 }
7961 if self.expected_duration_ms != 0u64 {
7962 ::buffa::types::put_uint64_field(4u32, self.expected_duration_ms, buf);
7963 }
7964 self.__buffa_unknown_fields.write_to(buf);
7965 }
7966 fn merge_field(
7967 &mut self,
7968 tag: ::buffa::encoding::Tag,
7969 buf: &mut impl ::buffa::bytes::Buf,
7970 ctx: ::buffa::DecodeContext<'_>,
7971 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
7972 #[allow(unused_imports)]
7973 use ::buffa::bytes::Buf as _;
7974 #[allow(unused_imports)]
7975 use ::buffa::Enumeration as _;
7976 match tag.field_number() {
7977 1u32 => {
7978 ::buffa::encoding::check_wire_type(
7979 tag,
7980 ::buffa::encoding::WireType::Varint,
7981 )?;
7982 self.sequence = ::buffa::types::decode_uint32(buf)?;
7983 }
7984 2u32 => {
7985 ::buffa::encoding::check_wire_type(
7986 tag,
7987 ::buffa::encoding::WireType::Varint,
7988 )?;
7989 self.step = ::buffa::EnumValue::from(::buffa::types::decode_int32(buf)?);
7990 }
7991 3u32 => {
7992 ::buffa::encoding::check_wire_type(
7993 tag,
7994 ::buffa::encoding::WireType::Varint,
7995 )?;
7996 self.status = ::buffa::EnumValue::from(
7997 ::buffa::types::decode_int32(buf)?,
7998 );
7999 }
8000 4u32 => {
8001 ::buffa::encoding::check_wire_type(
8002 tag,
8003 ::buffa::encoding::WireType::Varint,
8004 )?;
8005 self.expected_duration_ms = ::buffa::types::decode_uint64(buf)?;
8006 }
8007 _ => {
8008 self.__buffa_unknown_fields
8009 .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
8010 }
8011 }
8012 ::core::result::Result::Ok(())
8013 }
8014 fn clear(&mut self) {
8015 self.sequence = 0u32;
8016 self.step = ::buffa::EnumValue::from(0);
8017 self.status = ::buffa::EnumValue::from(0);
8018 self.expected_duration_ms = 0u64;
8019 self.__buffa_unknown_fields.clear();
8020 }
8021}
8022impl ::buffa::ExtensionSet for FlowTimelineItemView {
8023 const PROTO_FQN: &'static str = "chain.lifecycle.v1.FlowTimelineItemView";
8024 fn unknown_fields(&self) -> &::buffa::UnknownFields {
8025 &self.__buffa_unknown_fields
8026 }
8027 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
8028 &mut self.__buffa_unknown_fields
8029 }
8030}
8031impl ::buffa::json_helpers::ProtoElemJson for FlowTimelineItemView {
8032 fn serialize_proto_json<S: ::serde::Serializer>(
8033 v: &Self,
8034 s: S,
8035 ) -> ::core::result::Result<S::Ok, S::Error> {
8036 ::serde::Serialize::serialize(v, s)
8037 }
8038 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
8039 d: D,
8040 ) -> ::core::result::Result<Self, D::Error> {
8041 <Self as ::serde::Deserialize>::deserialize(d)
8042 }
8043}
8044#[doc(hidden)]
8045pub const __FLOW_TIMELINE_ITEM_VIEW_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
8046 type_url: "type.googleapis.com/chain.lifecycle.v1.FlowTimelineItemView",
8047 to_json: ::buffa::type_registry::any_to_json::<FlowTimelineItemView>,
8048 from_json: ::buffa::type_registry::any_from_json::<FlowTimelineItemView>,
8049 is_wkt: false,
8050};
8051#[derive(Clone, PartialEq, Default)]
8053#[derive(::serde::Serialize, ::serde::Deserialize)]
8054#[serde(default)]
8055pub struct FlowDetailView {
8056 #[serde(
8060 rename = "summary",
8061 skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
8062 )]
8063 pub summary: ::buffa::MessageField<FlowSummaryView>,
8064 #[serde(
8069 rename = "observedSteps",
8070 alias = "observed_steps",
8071 skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
8072 deserialize_with = "::buffa::json_helpers::null_as_default"
8073 )]
8074 pub observed_steps: ::buffa::alloc::vec::Vec<FlowStepView>,
8075 #[serde(
8080 rename = "fromLiveState",
8081 alias = "from_live_state",
8082 with = "::buffa::json_helpers::proto_bool",
8083 skip_serializing_if = "::buffa::json_helpers::skip_if::is_false"
8084 )]
8085 pub from_live_state: bool,
8086 #[serde(skip)]
8087 #[doc(hidden)]
8088 pub __buffa_unknown_fields: ::buffa::UnknownFields,
8089}
8090impl ::core::fmt::Debug for FlowDetailView {
8091 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
8092 f.debug_struct("FlowDetailView")
8093 .field("summary", &self.summary)
8094 .field("observed_steps", &self.observed_steps)
8095 .field("from_live_state", &self.from_live_state)
8096 .finish()
8097 }
8098}
8099impl FlowDetailView {
8100 pub const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowDetailView";
8105}
8106::buffa::impl_default_instance!(FlowDetailView);
8107impl ::buffa::MessageName for FlowDetailView {
8108 const PACKAGE: &'static str = "chain.lifecycle.v1";
8109 const NAME: &'static str = "FlowDetailView";
8110 const FULL_NAME: &'static str = "chain.lifecycle.v1.FlowDetailView";
8111 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowDetailView";
8112}
8113impl ::buffa::Message for FlowDetailView {
8114 #[allow(clippy::let_and_return)]
8120 fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
8121 #[allow(unused_imports)]
8122 use ::buffa::Enumeration as _;
8123 let mut size = 0u32;
8124 if self.summary.is_set() {
8125 let __slot = __cache.reserve();
8126 let inner_size = self.summary.compute_size(__cache);
8127 __cache.set(__slot, inner_size);
8128 size
8129 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
8130 + inner_size;
8131 }
8132 for v in &self.observed_steps {
8133 let __slot = __cache.reserve();
8134 let inner_size = v.compute_size(__cache);
8135 __cache.set(__slot, inner_size);
8136 size
8137 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
8138 + inner_size;
8139 }
8140 if self.from_live_state {
8141 size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
8142 }
8143 size += self.__buffa_unknown_fields.encoded_len() as u32;
8144 size
8145 }
8146 fn write_to(
8147 &self,
8148 __cache: &mut ::buffa::SizeCache,
8149 buf: &mut impl ::buffa::bytes::BufMut,
8150 ) {
8151 #[allow(unused_imports)]
8152 use ::buffa::Enumeration as _;
8153 if self.summary.is_set() {
8154 ::buffa::types::put_len_delimited_header(1u32, __cache.consume_next(), buf);
8155 self.summary.write_to(__cache, buf);
8156 }
8157 for v in &self.observed_steps {
8158 ::buffa::types::put_len_delimited_header(2u32, __cache.consume_next(), buf);
8159 v.write_to(__cache, buf);
8160 }
8161 if self.from_live_state {
8162 ::buffa::types::put_bool_field(3u32, self.from_live_state, buf);
8163 }
8164 self.__buffa_unknown_fields.write_to(buf);
8165 }
8166 fn merge_field(
8167 &mut self,
8168 tag: ::buffa::encoding::Tag,
8169 buf: &mut impl ::buffa::bytes::Buf,
8170 ctx: ::buffa::DecodeContext<'_>,
8171 ) -> ::core::result::Result<(), ::buffa::DecodeError> {
8172 #[allow(unused_imports)]
8173 use ::buffa::bytes::Buf as _;
8174 #[allow(unused_imports)]
8175 use ::buffa::Enumeration as _;
8176 match tag.field_number() {
8177 1u32 => {
8178 ::buffa::encoding::check_wire_type(
8179 tag,
8180 ::buffa::encoding::WireType::LengthDelimited,
8181 )?;
8182 ::buffa::Message::merge_length_delimited(
8183 self.summary.get_or_insert_default(),
8184 buf,
8185 ctx,
8186 )?;
8187 }
8188 2u32 => {
8189 ::buffa::encoding::check_wire_type(
8190 tag,
8191 ::buffa::encoding::WireType::LengthDelimited,
8192 )?;
8193 let mut elem = ::core::default::Default::default();
8194 ::buffa::Message::merge_length_delimited(&mut elem, buf, ctx)?;
8195 self.observed_steps.push(elem);
8196 }
8197 3u32 => {
8198 ::buffa::encoding::check_wire_type(
8199 tag,
8200 ::buffa::encoding::WireType::Varint,
8201 )?;
8202 self.from_live_state = ::buffa::types::decode_bool(buf)?;
8203 }
8204 _ => {
8205 self.__buffa_unknown_fields
8206 .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
8207 }
8208 }
8209 ::core::result::Result::Ok(())
8210 }
8211 fn clear(&mut self) {
8212 self.summary = ::buffa::MessageField::none();
8213 self.observed_steps.clear();
8214 self.from_live_state = false;
8215 self.__buffa_unknown_fields.clear();
8216 }
8217}
8218impl ::buffa::ExtensionSet for FlowDetailView {
8219 const PROTO_FQN: &'static str = "chain.lifecycle.v1.FlowDetailView";
8220 fn unknown_fields(&self) -> &::buffa::UnknownFields {
8221 &self.__buffa_unknown_fields
8222 }
8223 fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
8224 &mut self.__buffa_unknown_fields
8225 }
8226}
8227impl ::buffa::json_helpers::ProtoElemJson for FlowDetailView {
8228 fn serialize_proto_json<S: ::serde::Serializer>(
8229 v: &Self,
8230 s: S,
8231 ) -> ::core::result::Result<S::Ok, S::Error> {
8232 ::serde::Serialize::serialize(v, s)
8233 }
8234 fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
8235 d: D,
8236 ) -> ::core::result::Result<Self, D::Error> {
8237 <Self as ::serde::Deserialize>::deserialize(d)
8238 }
8239}
8240#[doc(hidden)]
8241pub const __FLOW_DETAIL_VIEW_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
8242 type_url: "type.googleapis.com/chain.lifecycle.v1.FlowDetailView",
8243 to_json: ::buffa::type_registry::any_to_json::<FlowDetailView>,
8244 from_json: ::buffa::type_registry::any_from_json::<FlowDetailView>,
8245 is_wkt: false,
8246};
8247#[allow(
8248 non_camel_case_types,
8249 dead_code,
8250 unused_imports,
8251 unused_qualifications,
8252 clippy::derivable_impls,
8253 clippy::match_single_binding,
8254 clippy::uninlined_format_args,
8255 clippy::doc_lazy_continuation,
8256 clippy::module_inception
8257)]
8258pub mod __buffa {
8259 #[allow(unused_imports)]
8260 use super::*;
8261 pub mod view {
8262 #[allow(unused_imports)]
8263 use super::*;
8264 #[derive(Clone, Debug, Default)]
8266 pub struct AssetIdsView<'a> {
8267 pub zipped_asset_id: u32,
8274 pub unified_asset_id: u32,
8281 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
8282 }
8283 impl<'a> ::buffa::MessageView<'a> for AssetIdsView<'a> {
8284 type Owned = super::super::AssetIds;
8285 fn decode_view(
8286 buf: &'a [u8],
8287 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8288 let __limit = ::core::cell::Cell::new(
8289 ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
8290 );
8291 <Self as ::buffa::MessageView>::decode_view_ctx(
8292 buf,
8293 ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
8294 )
8295 }
8296 fn decode_view_with_ctx(
8297 buf: &'a [u8],
8298 ctx: ::buffa::DecodeContext<'_>,
8299 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8300 <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
8301 }
8302 fn merge_view_field(
8303 &mut self,
8304 tag: ::buffa::encoding::Tag,
8305 cur: &'a [u8],
8306 before_tag: &'a [u8],
8307 ctx: ::buffa::DecodeContext<'_>,
8308 ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
8309 let _ = ctx;
8310 #[allow(unused_variables)]
8311 let view = self;
8312 let mut cur = cur;
8313 match tag.field_number() {
8314 1u32 => {
8315 ::buffa::encoding::check_wire_type(
8316 tag,
8317 ::buffa::encoding::WireType::Varint,
8318 )?;
8319 view.zipped_asset_id = ::buffa::types::decode_uint32(&mut cur)?;
8320 }
8321 3u32 => {
8322 ::buffa::encoding::check_wire_type(
8323 tag,
8324 ::buffa::encoding::WireType::Varint,
8325 )?;
8326 view.unified_asset_id = ::buffa::types::decode_uint32(&mut cur)?;
8327 }
8328 _ => {
8329 ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
8330 let span_len = before_tag.len() - cur.len();
8331 view.__buffa_unknown_fields
8332 .push_record(before_tag, span_len, ctx)?;
8333 }
8334 }
8335 ::core::result::Result::Ok(cur)
8336 }
8337 fn to_owned_message(
8338 &self,
8339 ) -> ::core::result::Result<super::super::AssetIds, ::buffa::DecodeError> {
8340 self.to_owned_from_source(None)
8341 }
8342 #[allow(clippy::useless_conversion, clippy::needless_update)]
8343 fn to_owned_from_source(
8344 &self,
8345 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
8346 ) -> ::core::result::Result<super::super::AssetIds, ::buffa::DecodeError> {
8347 #[allow(unused_imports)]
8348 use ::buffa::alloc::string::ToString as _;
8349 let _ = __buffa_src;
8350 ::core::result::Result::Ok(super::super::AssetIds {
8351 zipped_asset_id: self.zipped_asset_id,
8352 unified_asset_id: self.unified_asset_id,
8353 __buffa_unknown_fields: self
8354 .__buffa_unknown_fields
8355 .to_owned()?
8356 .into(),
8357 ..::core::default::Default::default()
8358 })
8359 }
8360 }
8361 impl<'a> ::buffa::ViewEncode<'a> for AssetIdsView<'a> {
8362 #[allow(clippy::needless_borrow, clippy::let_and_return)]
8363 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
8364 #[allow(unused_imports)]
8365 use ::buffa::Enumeration as _;
8366 let mut size = 0u32;
8367 if self.zipped_asset_id != 0u32 {
8368 size
8369 += 1u32
8370 + ::buffa::types::uint32_encoded_len(self.zipped_asset_id)
8371 as u32;
8372 }
8373 if self.unified_asset_id != 0u32 {
8374 size
8375 += 1u32
8376 + ::buffa::types::uint32_encoded_len(self.unified_asset_id)
8377 as u32;
8378 }
8379 size += self.__buffa_unknown_fields.encoded_len() as u32;
8380 size
8381 }
8382 #[allow(clippy::needless_borrow)]
8383 fn write_to(
8384 &self,
8385 _cache: &mut ::buffa::SizeCache,
8386 buf: &mut impl ::buffa::bytes::BufMut,
8387 ) {
8388 #[allow(unused_imports)]
8389 use ::buffa::Enumeration as _;
8390 if self.zipped_asset_id != 0u32 {
8391 ::buffa::types::put_uint32_field(1u32, self.zipped_asset_id, buf);
8392 }
8393 if self.unified_asset_id != 0u32 {
8394 ::buffa::types::put_uint32_field(3u32, self.unified_asset_id, buf);
8395 }
8396 self.__buffa_unknown_fields.write_to(buf);
8397 }
8398 }
8399 impl<'__a> ::serde::Serialize for AssetIdsView<'__a> {
8411 fn serialize<__S: ::serde::Serializer>(
8412 &self,
8413 __s: __S,
8414 ) -> ::core::result::Result<__S::Ok, __S::Error> {
8415 use ::serde::ser::SerializeMap as _;
8416 let mut __map = __s.serialize_map(::core::option::Option::None)?;
8417 if !::buffa::json_helpers::skip_if::is_zero_u32(&self.zipped_asset_id) {
8418 __map
8419 .serialize_entry(
8420 "zippedAssetId",
8421 &::buffa::json_helpers::ProtoJson(&self.zipped_asset_id),
8422 )?;
8423 }
8424 if !::buffa::json_helpers::skip_if::is_zero_u32(&self.unified_asset_id) {
8425 __map
8426 .serialize_entry(
8427 "unifiedAssetId",
8428 &::buffa::json_helpers::ProtoJson(&self.unified_asset_id),
8429 )?;
8430 }
8431 __map.end()
8432 }
8433 }
8434 impl<'a> ::buffa::MessageName for AssetIdsView<'a> {
8435 const PACKAGE: &'static str = "chain.lifecycle.v1";
8436 const NAME: &'static str = "AssetIds";
8437 const FULL_NAME: &'static str = "chain.lifecycle.v1.AssetIds";
8438 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.AssetIds";
8439 }
8440 ::buffa::impl_default_view_instance!(AssetIdsView);
8441 ::buffa::impl_view_reborrow!(AssetIdsView);
8442 #[derive(Clone, Debug)]
8448 pub struct AssetIdsOwnedView(::buffa::OwnedView<AssetIdsView<'static>>);
8449 impl AssetIdsOwnedView {
8450 pub fn decode(
8460 bytes: ::buffa::bytes::Bytes,
8461 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8462 ::core::result::Result::Ok(
8463 AssetIdsOwnedView(::buffa::OwnedView::decode(bytes)?),
8464 )
8465 }
8466 pub fn decode_with_options(
8474 bytes: ::buffa::bytes::Bytes,
8475 opts: &::buffa::DecodeOptions,
8476 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8477 ::core::result::Result::Ok(
8478 AssetIdsOwnedView(
8479 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
8480 ),
8481 )
8482 }
8483 pub fn from_owned(
8490 msg: &super::super::AssetIds,
8491 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8492 ::core::result::Result::Ok(
8493 AssetIdsOwnedView(::buffa::OwnedView::from_owned(msg)?),
8494 )
8495 }
8496 #[must_use]
8498 pub fn view(&self) -> &AssetIdsView<'_> {
8499 self.0.reborrow()
8500 }
8501 pub fn to_owned_message(
8508 &self,
8509 ) -> ::core::result::Result<super::super::AssetIds, ::buffa::DecodeError> {
8510 self.0.to_owned_message()
8511 }
8512 #[must_use]
8514 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
8515 self.0.bytes()
8516 }
8517 #[must_use]
8519 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
8520 self.0.into_bytes()
8521 }
8522 #[must_use]
8529 pub fn zipped_asset_id(&self) -> u32 {
8530 self.0.reborrow().zipped_asset_id
8531 }
8532 #[must_use]
8539 pub fn unified_asset_id(&self) -> u32 {
8540 self.0.reborrow().unified_asset_id
8541 }
8542 }
8543 impl ::core::convert::From<::buffa::OwnedView<AssetIdsView<'static>>>
8544 for AssetIdsOwnedView {
8545 fn from(inner: ::buffa::OwnedView<AssetIdsView<'static>>) -> Self {
8546 AssetIdsOwnedView(inner)
8547 }
8548 }
8549 impl ::core::convert::From<AssetIdsOwnedView>
8550 for ::buffa::OwnedView<AssetIdsView<'static>> {
8551 fn from(wrapper: AssetIdsOwnedView) -> Self {
8552 wrapper.0
8553 }
8554 }
8555 impl ::core::convert::AsRef<::buffa::OwnedView<AssetIdsView<'static>>>
8556 for AssetIdsOwnedView {
8557 fn as_ref(&self) -> &::buffa::OwnedView<AssetIdsView<'static>> {
8558 &self.0
8559 }
8560 }
8561 impl ::buffa::HasMessageView for super::super::AssetIds {
8562 type View<'a> = AssetIdsView<'a>;
8563 type ViewHandle = AssetIdsOwnedView;
8564 }
8565 impl ::serde::Serialize for AssetIdsOwnedView {
8566 fn serialize<__S: ::serde::Serializer>(
8567 &self,
8568 __s: __S,
8569 ) -> ::core::result::Result<__S::Ok, __S::Error> {
8570 ::serde::Serialize::serialize(&self.0, __s)
8571 }
8572 }
8573 #[derive(Clone, Debug, Default)]
8577 pub struct RequestFeeView<'a> {
8578 pub asset_ids: ::buffa::MessageFieldView<
8582 super::super::__buffa::view::AssetIdsView<'a>,
8583 >,
8584 pub amount_e18: ::buffa::MessageFieldView<
8589 super::super::super::super::super::polyester::r#type::v1::__buffa::view::U128View<
8590 'a,
8591 >,
8592 >,
8593 pub recipient_address: &'a str,
8597 pub status: ::buffa::EnumValue<super::super::RequestFeeStatus>,
8601 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
8602 }
8603 impl<'a> ::buffa::MessageView<'a> for RequestFeeView<'a> {
8604 type Owned = super::super::RequestFee;
8605 fn decode_view(
8606 buf: &'a [u8],
8607 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8608 let __limit = ::core::cell::Cell::new(
8609 ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
8610 );
8611 <Self as ::buffa::MessageView>::decode_view_ctx(
8612 buf,
8613 ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
8614 )
8615 }
8616 fn decode_view_with_ctx(
8617 buf: &'a [u8],
8618 ctx: ::buffa::DecodeContext<'_>,
8619 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8620 <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
8621 }
8622 fn merge_view_field(
8623 &mut self,
8624 tag: ::buffa::encoding::Tag,
8625 cur: &'a [u8],
8626 before_tag: &'a [u8],
8627 ctx: ::buffa::DecodeContext<'_>,
8628 ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
8629 let _ = ctx;
8630 #[allow(unused_variables)]
8631 let view = self;
8632 let mut cur = cur;
8633 match tag.field_number() {
8634 1u32 => {
8635 ::buffa::encoding::check_wire_type(
8636 tag,
8637 ::buffa::encoding::WireType::LengthDelimited,
8638 )?;
8639 let __sub_ctx = ctx.descend()?;
8640 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
8641 match view.asset_ids.as_mut() {
8642 Some(existing) => {
8643 ::buffa::MessageView::merge_into_view(
8644 existing,
8645 sub,
8646 __sub_ctx,
8647 )?
8648 }
8649 None => {
8650 view.asset_ids = ::buffa::MessageFieldView::set(
8651 <super::super::__buffa::view::AssetIdsView as ::buffa::MessageView>::decode_view_ctx(
8652 sub,
8653 __sub_ctx,
8654 )?,
8655 );
8656 }
8657 }
8658 }
8659 2u32 => {
8660 ::buffa::encoding::check_wire_type(
8661 tag,
8662 ::buffa::encoding::WireType::LengthDelimited,
8663 )?;
8664 let __sub_ctx = ctx.descend()?;
8665 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
8666 match view.amount_e18.as_mut() {
8667 Some(existing) => {
8668 ::buffa::MessageView::merge_into_view(
8669 existing,
8670 sub,
8671 __sub_ctx,
8672 )?
8673 }
8674 None => {
8675 view.amount_e18 = ::buffa::MessageFieldView::set(
8676 <super::super::super::super::super::polyester::r#type::v1::__buffa::view::U128View as ::buffa::MessageView>::decode_view_ctx(
8677 sub,
8678 __sub_ctx,
8679 )?,
8680 );
8681 }
8682 }
8683 }
8684 3u32 => {
8685 ::buffa::encoding::check_wire_type(
8686 tag,
8687 ::buffa::encoding::WireType::LengthDelimited,
8688 )?;
8689 view.recipient_address = ::buffa::types::borrow_str(&mut cur)?;
8690 }
8691 4u32 => {
8692 ::buffa::encoding::check_wire_type(
8693 tag,
8694 ::buffa::encoding::WireType::Varint,
8695 )?;
8696 view.status = ::buffa::EnumValue::from(
8697 ::buffa::types::decode_int32(&mut cur)?,
8698 );
8699 }
8700 _ => {
8701 ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
8702 let span_len = before_tag.len() - cur.len();
8703 view.__buffa_unknown_fields
8704 .push_record(before_tag, span_len, ctx)?;
8705 }
8706 }
8707 ::core::result::Result::Ok(cur)
8708 }
8709 fn to_owned_message(
8710 &self,
8711 ) -> ::core::result::Result<super::super::RequestFee, ::buffa::DecodeError> {
8712 self.to_owned_from_source(None)
8713 }
8714 #[allow(clippy::useless_conversion, clippy::needless_update)]
8715 fn to_owned_from_source(
8716 &self,
8717 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
8718 ) -> ::core::result::Result<super::super::RequestFee, ::buffa::DecodeError> {
8719 #[allow(unused_imports)]
8720 use ::buffa::alloc::string::ToString as _;
8721 let _ = __buffa_src;
8722 ::core::result::Result::Ok(super::super::RequestFee {
8723 asset_ids: match self.asset_ids.as_option() {
8724 Some(v) => {
8725 ::buffa::MessageField::<
8726 super::super::AssetIds,
8727 >::some(v.to_owned_from_source(__buffa_src)?)
8728 }
8729 None => ::buffa::MessageField::none(),
8730 },
8731 amount_e18: match self.amount_e18.as_option() {
8732 Some(v) => {
8733 ::buffa::MessageField::<
8734 super::super::super::super::super::polyester::r#type::v1::U128,
8735 >::some(v.to_owned_from_source(__buffa_src)?)
8736 }
8737 None => ::buffa::MessageField::none(),
8738 },
8739 recipient_address: self.recipient_address.to_string(),
8740 status: self.status,
8741 __buffa_unknown_fields: self
8742 .__buffa_unknown_fields
8743 .to_owned()?
8744 .into(),
8745 ..::core::default::Default::default()
8746 })
8747 }
8748 }
8749 impl<'a> ::buffa::ViewEncode<'a> for RequestFeeView<'a> {
8750 #[allow(clippy::needless_borrow, clippy::let_and_return)]
8751 fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
8752 #[allow(unused_imports)]
8753 use ::buffa::Enumeration as _;
8754 let mut size = 0u32;
8755 if self.asset_ids.is_set() {
8756 let __slot = __cache.reserve();
8757 let inner_size = self.asset_ids.compute_size(__cache);
8758 __cache.set(__slot, inner_size);
8759 size
8760 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
8761 + inner_size;
8762 }
8763 if self.amount_e18.is_set() {
8764 let __slot = __cache.reserve();
8765 let inner_size = self.amount_e18.compute_size(__cache);
8766 __cache.set(__slot, inner_size);
8767 size
8768 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
8769 + inner_size;
8770 }
8771 if !self.recipient_address.is_empty() {
8772 size
8773 += 1u32
8774 + ::buffa::types::string_encoded_len(&self.recipient_address)
8775 as u32;
8776 }
8777 {
8778 let val = self.status.to_i32();
8779 if val != 0 {
8780 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
8781 }
8782 }
8783 size += self.__buffa_unknown_fields.encoded_len() as u32;
8784 size
8785 }
8786 #[allow(clippy::needless_borrow)]
8787 fn write_to(
8788 &self,
8789 __cache: &mut ::buffa::SizeCache,
8790 buf: &mut impl ::buffa::bytes::BufMut,
8791 ) {
8792 #[allow(unused_imports)]
8793 use ::buffa::Enumeration as _;
8794 if self.asset_ids.is_set() {
8795 ::buffa::types::put_len_delimited_header(
8796 1u32,
8797 __cache.consume_next(),
8798 buf,
8799 );
8800 self.asset_ids.write_to(__cache, buf);
8801 }
8802 if self.amount_e18.is_set() {
8803 ::buffa::types::put_len_delimited_header(
8804 2u32,
8805 __cache.consume_next(),
8806 buf,
8807 );
8808 self.amount_e18.write_to(__cache, buf);
8809 }
8810 if !self.recipient_address.is_empty() {
8811 ::buffa::types::put_string_field(3u32, &self.recipient_address, buf);
8812 }
8813 {
8814 let val = self.status.to_i32();
8815 if val != 0 {
8816 ::buffa::types::put_int32_field(4u32, val, buf);
8817 }
8818 }
8819 self.__buffa_unknown_fields.write_to(buf);
8820 }
8821 }
8822 impl<'__a> ::serde::Serialize for RequestFeeView<'__a> {
8834 fn serialize<__S: ::serde::Serializer>(
8835 &self,
8836 __s: __S,
8837 ) -> ::core::result::Result<__S::Ok, __S::Error> {
8838 use ::serde::ser::SerializeMap as _;
8839 let mut __map = __s.serialize_map(::core::option::Option::None)?;
8840 {
8841 if let ::core::option::Option::Some(__v) = self.asset_ids.as_option()
8842 {
8843 __map.serialize_entry("assetIds", __v)?;
8844 }
8845 }
8846 {
8847 if let ::core::option::Option::Some(__v) = self
8848 .amount_e18
8849 .as_option()
8850 {
8851 __map.serialize_entry("amountE18", __v)?;
8852 }
8853 }
8854 if !::buffa::json_helpers::skip_if::is_empty_str(
8855 self.recipient_address,
8856 ) {
8857 __map.serialize_entry("recipientAddress", self.recipient_address)?;
8858 }
8859 if !::buffa::json_helpers::skip_if::is_default_enum_value(&self.status) {
8860 __map.serialize_entry("status", &self.status)?;
8861 }
8862 __map.end()
8863 }
8864 }
8865 impl<'a> ::buffa::MessageName for RequestFeeView<'a> {
8866 const PACKAGE: &'static str = "chain.lifecycle.v1";
8867 const NAME: &'static str = "RequestFee";
8868 const FULL_NAME: &'static str = "chain.lifecycle.v1.RequestFee";
8869 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.RequestFee";
8870 }
8871 ::buffa::impl_default_view_instance!(RequestFeeView);
8872 ::buffa::impl_view_reborrow!(RequestFeeView);
8873 #[derive(Clone, Debug)]
8879 pub struct RequestFeeOwnedView(::buffa::OwnedView<RequestFeeView<'static>>);
8880 impl RequestFeeOwnedView {
8881 pub fn decode(
8891 bytes: ::buffa::bytes::Bytes,
8892 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8893 ::core::result::Result::Ok(
8894 RequestFeeOwnedView(::buffa::OwnedView::decode(bytes)?),
8895 )
8896 }
8897 pub fn decode_with_options(
8905 bytes: ::buffa::bytes::Bytes,
8906 opts: &::buffa::DecodeOptions,
8907 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8908 ::core::result::Result::Ok(
8909 RequestFeeOwnedView(
8910 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
8911 ),
8912 )
8913 }
8914 pub fn from_owned(
8921 msg: &super::super::RequestFee,
8922 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8923 ::core::result::Result::Ok(
8924 RequestFeeOwnedView(::buffa::OwnedView::from_owned(msg)?),
8925 )
8926 }
8927 #[must_use]
8929 pub fn view(&self) -> &RequestFeeView<'_> {
8930 self.0.reborrow()
8931 }
8932 pub fn to_owned_message(
8939 &self,
8940 ) -> ::core::result::Result<super::super::RequestFee, ::buffa::DecodeError> {
8941 self.0.to_owned_message()
8942 }
8943 #[must_use]
8945 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
8946 self.0.bytes()
8947 }
8948 #[must_use]
8950 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
8951 self.0.into_bytes()
8952 }
8953 #[must_use]
8957 pub fn asset_ids(
8958 &self,
8959 ) -> &::buffa::MessageFieldView<
8960 super::super::__buffa::view::AssetIdsView<'_>,
8961 > {
8962 &self.0.reborrow().asset_ids
8963 }
8964 #[must_use]
8969 pub fn amount_e18(
8970 &self,
8971 ) -> &::buffa::MessageFieldView<
8972 super::super::super::super::super::polyester::r#type::v1::__buffa::view::U128View<
8973 '_,
8974 >,
8975 > {
8976 &self.0.reborrow().amount_e18
8977 }
8978 #[must_use]
8982 pub fn recipient_address(&self) -> &'_ str {
8983 self.0.reborrow().recipient_address
8984 }
8985 #[must_use]
8989 pub fn status(&self) -> ::buffa::EnumValue<super::super::RequestFeeStatus> {
8990 self.0.reborrow().status
8991 }
8992 }
8993 impl ::core::convert::From<::buffa::OwnedView<RequestFeeView<'static>>>
8994 for RequestFeeOwnedView {
8995 fn from(inner: ::buffa::OwnedView<RequestFeeView<'static>>) -> Self {
8996 RequestFeeOwnedView(inner)
8997 }
8998 }
8999 impl ::core::convert::From<RequestFeeOwnedView>
9000 for ::buffa::OwnedView<RequestFeeView<'static>> {
9001 fn from(wrapper: RequestFeeOwnedView) -> Self {
9002 wrapper.0
9003 }
9004 }
9005 impl ::core::convert::AsRef<::buffa::OwnedView<RequestFeeView<'static>>>
9006 for RequestFeeOwnedView {
9007 fn as_ref(&self) -> &::buffa::OwnedView<RequestFeeView<'static>> {
9008 &self.0
9009 }
9010 }
9011 impl ::buffa::HasMessageView for super::super::RequestFee {
9012 type View<'a> = RequestFeeView<'a>;
9013 type ViewHandle = RequestFeeOwnedView;
9014 }
9015 impl ::serde::Serialize for RequestFeeOwnedView {
9016 fn serialize<__S: ::serde::Serializer>(
9017 &self,
9018 __s: __S,
9019 ) -> ::core::result::Result<__S::Ok, __S::Error> {
9020 ::serde::Serialize::serialize(&self.0, __s)
9021 }
9022 }
9023 #[derive(Clone, Debug, Default)]
9026 pub struct GetFlowResponseView<'a> {
9027 pub flow: ::buffa::MessageFieldView<
9031 super::super::__buffa::view::FlowDetailViewView<'a>,
9032 >,
9033 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
9034 }
9035 impl<'a> ::buffa::MessageView<'a> for GetFlowResponseView<'a> {
9036 type Owned = super::super::GetFlowResponse;
9037 fn decode_view(
9038 buf: &'a [u8],
9039 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9040 let __limit = ::core::cell::Cell::new(
9041 ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
9042 );
9043 <Self as ::buffa::MessageView>::decode_view_ctx(
9044 buf,
9045 ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
9046 )
9047 }
9048 fn decode_view_with_ctx(
9049 buf: &'a [u8],
9050 ctx: ::buffa::DecodeContext<'_>,
9051 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9052 <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
9053 }
9054 fn merge_view_field(
9055 &mut self,
9056 tag: ::buffa::encoding::Tag,
9057 cur: &'a [u8],
9058 before_tag: &'a [u8],
9059 ctx: ::buffa::DecodeContext<'_>,
9060 ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
9061 let _ = ctx;
9062 #[allow(unused_variables)]
9063 let view = self;
9064 let mut cur = cur;
9065 match tag.field_number() {
9066 1u32 => {
9067 ::buffa::encoding::check_wire_type(
9068 tag,
9069 ::buffa::encoding::WireType::LengthDelimited,
9070 )?;
9071 let __sub_ctx = ctx.descend()?;
9072 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
9073 match view.flow.as_mut() {
9074 Some(existing) => {
9075 ::buffa::MessageView::merge_into_view(
9076 existing,
9077 sub,
9078 __sub_ctx,
9079 )?
9080 }
9081 None => {
9082 view.flow = ::buffa::MessageFieldView::set(
9083 <super::super::__buffa::view::FlowDetailViewView as ::buffa::MessageView>::decode_view_ctx(
9084 sub,
9085 __sub_ctx,
9086 )?,
9087 );
9088 }
9089 }
9090 }
9091 _ => {
9092 ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
9093 let span_len = before_tag.len() - cur.len();
9094 view.__buffa_unknown_fields
9095 .push_record(before_tag, span_len, ctx)?;
9096 }
9097 }
9098 ::core::result::Result::Ok(cur)
9099 }
9100 fn to_owned_message(
9101 &self,
9102 ) -> ::core::result::Result<
9103 super::super::GetFlowResponse,
9104 ::buffa::DecodeError,
9105 > {
9106 self.to_owned_from_source(None)
9107 }
9108 #[allow(clippy::useless_conversion, clippy::needless_update)]
9109 fn to_owned_from_source(
9110 &self,
9111 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
9112 ) -> ::core::result::Result<
9113 super::super::GetFlowResponse,
9114 ::buffa::DecodeError,
9115 > {
9116 #[allow(unused_imports)]
9117 use ::buffa::alloc::string::ToString as _;
9118 let _ = __buffa_src;
9119 ::core::result::Result::Ok(super::super::GetFlowResponse {
9120 flow: match self.flow.as_option() {
9121 Some(v) => {
9122 ::buffa::MessageField::<
9123 super::super::FlowDetailView,
9124 >::some(v.to_owned_from_source(__buffa_src)?)
9125 }
9126 None => ::buffa::MessageField::none(),
9127 },
9128 __buffa_unknown_fields: self
9129 .__buffa_unknown_fields
9130 .to_owned()?
9131 .into(),
9132 ..::core::default::Default::default()
9133 })
9134 }
9135 }
9136 impl<'a> ::buffa::ViewEncode<'a> for GetFlowResponseView<'a> {
9137 #[allow(clippy::needless_borrow, clippy::let_and_return)]
9138 fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
9139 #[allow(unused_imports)]
9140 use ::buffa::Enumeration as _;
9141 let mut size = 0u32;
9142 if self.flow.is_set() {
9143 let __slot = __cache.reserve();
9144 let inner_size = self.flow.compute_size(__cache);
9145 __cache.set(__slot, inner_size);
9146 size
9147 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
9148 + inner_size;
9149 }
9150 size += self.__buffa_unknown_fields.encoded_len() as u32;
9151 size
9152 }
9153 #[allow(clippy::needless_borrow)]
9154 fn write_to(
9155 &self,
9156 __cache: &mut ::buffa::SizeCache,
9157 buf: &mut impl ::buffa::bytes::BufMut,
9158 ) {
9159 #[allow(unused_imports)]
9160 use ::buffa::Enumeration as _;
9161 if self.flow.is_set() {
9162 ::buffa::types::put_len_delimited_header(
9163 1u32,
9164 __cache.consume_next(),
9165 buf,
9166 );
9167 self.flow.write_to(__cache, buf);
9168 }
9169 self.__buffa_unknown_fields.write_to(buf);
9170 }
9171 }
9172 impl<'__a> ::serde::Serialize for GetFlowResponseView<'__a> {
9184 fn serialize<__S: ::serde::Serializer>(
9185 &self,
9186 __s: __S,
9187 ) -> ::core::result::Result<__S::Ok, __S::Error> {
9188 use ::serde::ser::SerializeMap as _;
9189 let mut __map = __s.serialize_map(::core::option::Option::None)?;
9190 {
9191 if let ::core::option::Option::Some(__v) = self.flow.as_option() {
9192 __map.serialize_entry("flow", __v)?;
9193 }
9194 }
9195 __map.end()
9196 }
9197 }
9198 impl<'a> ::buffa::MessageName for GetFlowResponseView<'a> {
9199 const PACKAGE: &'static str = "chain.lifecycle.v1";
9200 const NAME: &'static str = "GetFlowResponse";
9201 const FULL_NAME: &'static str = "chain.lifecycle.v1.GetFlowResponse";
9202 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.GetFlowResponse";
9203 }
9204 ::buffa::impl_default_view_instance!(GetFlowResponseView);
9205 ::buffa::impl_view_reborrow!(GetFlowResponseView);
9206 #[derive(Clone, Debug)]
9212 pub struct GetFlowResponseOwnedView(
9213 ::buffa::OwnedView<GetFlowResponseView<'static>>,
9214 );
9215 impl GetFlowResponseOwnedView {
9216 pub fn decode(
9226 bytes: ::buffa::bytes::Bytes,
9227 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9228 ::core::result::Result::Ok(
9229 GetFlowResponseOwnedView(::buffa::OwnedView::decode(bytes)?),
9230 )
9231 }
9232 pub fn decode_with_options(
9240 bytes: ::buffa::bytes::Bytes,
9241 opts: &::buffa::DecodeOptions,
9242 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9243 ::core::result::Result::Ok(
9244 GetFlowResponseOwnedView(
9245 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
9246 ),
9247 )
9248 }
9249 pub fn from_owned(
9256 msg: &super::super::GetFlowResponse,
9257 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9258 ::core::result::Result::Ok(
9259 GetFlowResponseOwnedView(::buffa::OwnedView::from_owned(msg)?),
9260 )
9261 }
9262 #[must_use]
9264 pub fn view(&self) -> &GetFlowResponseView<'_> {
9265 self.0.reborrow()
9266 }
9267 pub fn to_owned_message(
9274 &self,
9275 ) -> ::core::result::Result<
9276 super::super::GetFlowResponse,
9277 ::buffa::DecodeError,
9278 > {
9279 self.0.to_owned_message()
9280 }
9281 #[must_use]
9283 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
9284 self.0.bytes()
9285 }
9286 #[must_use]
9288 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
9289 self.0.into_bytes()
9290 }
9291 #[must_use]
9295 pub fn flow(
9296 &self,
9297 ) -> &::buffa::MessageFieldView<
9298 super::super::__buffa::view::FlowDetailViewView<'_>,
9299 > {
9300 &self.0.reborrow().flow
9301 }
9302 }
9303 impl ::core::convert::From<::buffa::OwnedView<GetFlowResponseView<'static>>>
9304 for GetFlowResponseOwnedView {
9305 fn from(inner: ::buffa::OwnedView<GetFlowResponseView<'static>>) -> Self {
9306 GetFlowResponseOwnedView(inner)
9307 }
9308 }
9309 impl ::core::convert::From<GetFlowResponseOwnedView>
9310 for ::buffa::OwnedView<GetFlowResponseView<'static>> {
9311 fn from(wrapper: GetFlowResponseOwnedView) -> Self {
9312 wrapper.0
9313 }
9314 }
9315 impl ::core::convert::AsRef<::buffa::OwnedView<GetFlowResponseView<'static>>>
9316 for GetFlowResponseOwnedView {
9317 fn as_ref(&self) -> &::buffa::OwnedView<GetFlowResponseView<'static>> {
9318 &self.0
9319 }
9320 }
9321 impl ::buffa::HasMessageView for super::super::GetFlowResponse {
9322 type View<'a> = GetFlowResponseView<'a>;
9323 type ViewHandle = GetFlowResponseOwnedView;
9324 }
9325 impl ::serde::Serialize for GetFlowResponseOwnedView {
9326 fn serialize<__S: ::serde::Serializer>(
9327 &self,
9328 __s: __S,
9329 ) -> ::core::result::Result<__S::Ok, __S::Error> {
9330 ::serde::Serialize::serialize(&self.0, __s)
9331 }
9332 }
9333 #[derive(Clone, Debug, Default)]
9335 pub struct GetFlowByIdRequestView<'a> {
9336 pub flow_id: &'a str,
9340 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
9341 }
9342 impl<'a> ::buffa::MessageView<'a> for GetFlowByIdRequestView<'a> {
9343 type Owned = super::super::GetFlowByIdRequest;
9344 fn decode_view(
9345 buf: &'a [u8],
9346 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9347 let __limit = ::core::cell::Cell::new(
9348 ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
9349 );
9350 <Self as ::buffa::MessageView>::decode_view_ctx(
9351 buf,
9352 ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
9353 )
9354 }
9355 fn decode_view_with_ctx(
9356 buf: &'a [u8],
9357 ctx: ::buffa::DecodeContext<'_>,
9358 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9359 <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
9360 }
9361 fn merge_view_field(
9362 &mut self,
9363 tag: ::buffa::encoding::Tag,
9364 cur: &'a [u8],
9365 before_tag: &'a [u8],
9366 ctx: ::buffa::DecodeContext<'_>,
9367 ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
9368 let _ = ctx;
9369 #[allow(unused_variables)]
9370 let view = self;
9371 let mut cur = cur;
9372 match tag.field_number() {
9373 1u32 => {
9374 ::buffa::encoding::check_wire_type(
9375 tag,
9376 ::buffa::encoding::WireType::LengthDelimited,
9377 )?;
9378 view.flow_id = ::buffa::types::borrow_str(&mut cur)?;
9379 }
9380 _ => {
9381 ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
9382 let span_len = before_tag.len() - cur.len();
9383 view.__buffa_unknown_fields
9384 .push_record(before_tag, span_len, ctx)?;
9385 }
9386 }
9387 ::core::result::Result::Ok(cur)
9388 }
9389 fn to_owned_message(
9390 &self,
9391 ) -> ::core::result::Result<
9392 super::super::GetFlowByIdRequest,
9393 ::buffa::DecodeError,
9394 > {
9395 self.to_owned_from_source(None)
9396 }
9397 #[allow(clippy::useless_conversion, clippy::needless_update)]
9398 fn to_owned_from_source(
9399 &self,
9400 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
9401 ) -> ::core::result::Result<
9402 super::super::GetFlowByIdRequest,
9403 ::buffa::DecodeError,
9404 > {
9405 #[allow(unused_imports)]
9406 use ::buffa::alloc::string::ToString as _;
9407 let _ = __buffa_src;
9408 ::core::result::Result::Ok(super::super::GetFlowByIdRequest {
9409 flow_id: self.flow_id.to_string(),
9410 __buffa_unknown_fields: self
9411 .__buffa_unknown_fields
9412 .to_owned()?
9413 .into(),
9414 ..::core::default::Default::default()
9415 })
9416 }
9417 }
9418 impl<'a> ::buffa::ViewEncode<'a> for GetFlowByIdRequestView<'a> {
9419 #[allow(clippy::needless_borrow, clippy::let_and_return)]
9420 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
9421 #[allow(unused_imports)]
9422 use ::buffa::Enumeration as _;
9423 let mut size = 0u32;
9424 if !self.flow_id.is_empty() {
9425 size
9426 += 1u32
9427 + ::buffa::types::string_encoded_len(&self.flow_id) as u32;
9428 }
9429 size += self.__buffa_unknown_fields.encoded_len() as u32;
9430 size
9431 }
9432 #[allow(clippy::needless_borrow)]
9433 fn write_to(
9434 &self,
9435 _cache: &mut ::buffa::SizeCache,
9436 buf: &mut impl ::buffa::bytes::BufMut,
9437 ) {
9438 #[allow(unused_imports)]
9439 use ::buffa::Enumeration as _;
9440 if !self.flow_id.is_empty() {
9441 ::buffa::types::put_string_field(1u32, &self.flow_id, buf);
9442 }
9443 self.__buffa_unknown_fields.write_to(buf);
9444 }
9445 }
9446 impl<'__a> ::serde::Serialize for GetFlowByIdRequestView<'__a> {
9458 fn serialize<__S: ::serde::Serializer>(
9459 &self,
9460 __s: __S,
9461 ) -> ::core::result::Result<__S::Ok, __S::Error> {
9462 use ::serde::ser::SerializeMap as _;
9463 let mut __map = __s.serialize_map(::core::option::Option::None)?;
9464 if !::buffa::json_helpers::skip_if::is_empty_str(self.flow_id) {
9465 __map.serialize_entry("flowId", self.flow_id)?;
9466 }
9467 __map.end()
9468 }
9469 }
9470 impl<'a> ::buffa::MessageName for GetFlowByIdRequestView<'a> {
9471 const PACKAGE: &'static str = "chain.lifecycle.v1";
9472 const NAME: &'static str = "GetFlowByIdRequest";
9473 const FULL_NAME: &'static str = "chain.lifecycle.v1.GetFlowByIdRequest";
9474 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.GetFlowByIdRequest";
9475 }
9476 ::buffa::impl_default_view_instance!(GetFlowByIdRequestView);
9477 ::buffa::impl_view_reborrow!(GetFlowByIdRequestView);
9478 #[derive(Clone, Debug)]
9484 pub struct GetFlowByIdRequestOwnedView(
9485 ::buffa::OwnedView<GetFlowByIdRequestView<'static>>,
9486 );
9487 impl GetFlowByIdRequestOwnedView {
9488 pub fn decode(
9498 bytes: ::buffa::bytes::Bytes,
9499 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9500 ::core::result::Result::Ok(
9501 GetFlowByIdRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
9502 )
9503 }
9504 pub fn decode_with_options(
9512 bytes: ::buffa::bytes::Bytes,
9513 opts: &::buffa::DecodeOptions,
9514 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9515 ::core::result::Result::Ok(
9516 GetFlowByIdRequestOwnedView(
9517 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
9518 ),
9519 )
9520 }
9521 pub fn from_owned(
9528 msg: &super::super::GetFlowByIdRequest,
9529 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9530 ::core::result::Result::Ok(
9531 GetFlowByIdRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
9532 )
9533 }
9534 #[must_use]
9536 pub fn view(&self) -> &GetFlowByIdRequestView<'_> {
9537 self.0.reborrow()
9538 }
9539 pub fn to_owned_message(
9546 &self,
9547 ) -> ::core::result::Result<
9548 super::super::GetFlowByIdRequest,
9549 ::buffa::DecodeError,
9550 > {
9551 self.0.to_owned_message()
9552 }
9553 #[must_use]
9555 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
9556 self.0.bytes()
9557 }
9558 #[must_use]
9560 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
9561 self.0.into_bytes()
9562 }
9563 #[must_use]
9567 pub fn flow_id(&self) -> &'_ str {
9568 self.0.reborrow().flow_id
9569 }
9570 }
9571 impl ::core::convert::From<::buffa::OwnedView<GetFlowByIdRequestView<'static>>>
9572 for GetFlowByIdRequestOwnedView {
9573 fn from(inner: ::buffa::OwnedView<GetFlowByIdRequestView<'static>>) -> Self {
9574 GetFlowByIdRequestOwnedView(inner)
9575 }
9576 }
9577 impl ::core::convert::From<GetFlowByIdRequestOwnedView>
9578 for ::buffa::OwnedView<GetFlowByIdRequestView<'static>> {
9579 fn from(wrapper: GetFlowByIdRequestOwnedView) -> Self {
9580 wrapper.0
9581 }
9582 }
9583 impl ::core::convert::AsRef<::buffa::OwnedView<GetFlowByIdRequestView<'static>>>
9584 for GetFlowByIdRequestOwnedView {
9585 fn as_ref(&self) -> &::buffa::OwnedView<GetFlowByIdRequestView<'static>> {
9586 &self.0
9587 }
9588 }
9589 impl ::buffa::HasMessageView for super::super::GetFlowByIdRequest {
9590 type View<'a> = GetFlowByIdRequestView<'a>;
9591 type ViewHandle = GetFlowByIdRequestOwnedView;
9592 }
9593 impl ::serde::Serialize for GetFlowByIdRequestOwnedView {
9594 fn serialize<__S: ::serde::Serializer>(
9595 &self,
9596 __s: __S,
9597 ) -> ::core::result::Result<__S::Ok, __S::Error> {
9598 ::serde::Serialize::serialize(&self.0, __s)
9599 }
9600 }
9601 #[derive(Clone, Debug, Default)]
9604 pub struct ListFlowsByTxRequestView<'a> {
9605 pub tx_hash: &'a str,
9612 pub lookup_kind: ::buffa::EnumValue<super::super::TxLookupKind>,
9616 pub limit: u32,
9621 pub page_token: &'a str,
9626 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
9627 }
9628 impl<'a> ::buffa::MessageView<'a> for ListFlowsByTxRequestView<'a> {
9629 type Owned = super::super::ListFlowsByTxRequest;
9630 fn decode_view(
9631 buf: &'a [u8],
9632 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9633 let __limit = ::core::cell::Cell::new(
9634 ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
9635 );
9636 <Self as ::buffa::MessageView>::decode_view_ctx(
9637 buf,
9638 ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
9639 )
9640 }
9641 fn decode_view_with_ctx(
9642 buf: &'a [u8],
9643 ctx: ::buffa::DecodeContext<'_>,
9644 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9645 <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
9646 }
9647 fn merge_view_field(
9648 &mut self,
9649 tag: ::buffa::encoding::Tag,
9650 cur: &'a [u8],
9651 before_tag: &'a [u8],
9652 ctx: ::buffa::DecodeContext<'_>,
9653 ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
9654 let _ = ctx;
9655 #[allow(unused_variables)]
9656 let view = self;
9657 let mut cur = cur;
9658 match tag.field_number() {
9659 1u32 => {
9660 ::buffa::encoding::check_wire_type(
9661 tag,
9662 ::buffa::encoding::WireType::LengthDelimited,
9663 )?;
9664 view.tx_hash = ::buffa::types::borrow_str(&mut cur)?;
9665 }
9666 2u32 => {
9667 ::buffa::encoding::check_wire_type(
9668 tag,
9669 ::buffa::encoding::WireType::Varint,
9670 )?;
9671 view.lookup_kind = ::buffa::EnumValue::from(
9672 ::buffa::types::decode_int32(&mut cur)?,
9673 );
9674 }
9675 3u32 => {
9676 ::buffa::encoding::check_wire_type(
9677 tag,
9678 ::buffa::encoding::WireType::Varint,
9679 )?;
9680 view.limit = ::buffa::types::decode_uint32(&mut cur)?;
9681 }
9682 4u32 => {
9683 ::buffa::encoding::check_wire_type(
9684 tag,
9685 ::buffa::encoding::WireType::LengthDelimited,
9686 )?;
9687 view.page_token = ::buffa::types::borrow_str(&mut cur)?;
9688 }
9689 _ => {
9690 ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
9691 let span_len = before_tag.len() - cur.len();
9692 view.__buffa_unknown_fields
9693 .push_record(before_tag, span_len, ctx)?;
9694 }
9695 }
9696 ::core::result::Result::Ok(cur)
9697 }
9698 fn to_owned_message(
9699 &self,
9700 ) -> ::core::result::Result<
9701 super::super::ListFlowsByTxRequest,
9702 ::buffa::DecodeError,
9703 > {
9704 self.to_owned_from_source(None)
9705 }
9706 #[allow(clippy::useless_conversion, clippy::needless_update)]
9707 fn to_owned_from_source(
9708 &self,
9709 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
9710 ) -> ::core::result::Result<
9711 super::super::ListFlowsByTxRequest,
9712 ::buffa::DecodeError,
9713 > {
9714 #[allow(unused_imports)]
9715 use ::buffa::alloc::string::ToString as _;
9716 let _ = __buffa_src;
9717 ::core::result::Result::Ok(super::super::ListFlowsByTxRequest {
9718 tx_hash: self.tx_hash.to_string(),
9719 lookup_kind: self.lookup_kind,
9720 limit: self.limit,
9721 page_token: self.page_token.to_string(),
9722 __buffa_unknown_fields: self
9723 .__buffa_unknown_fields
9724 .to_owned()?
9725 .into(),
9726 ..::core::default::Default::default()
9727 })
9728 }
9729 }
9730 impl<'a> ::buffa::ViewEncode<'a> for ListFlowsByTxRequestView<'a> {
9731 #[allow(clippy::needless_borrow, clippy::let_and_return)]
9732 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
9733 #[allow(unused_imports)]
9734 use ::buffa::Enumeration as _;
9735 let mut size = 0u32;
9736 if !self.tx_hash.is_empty() {
9737 size
9738 += 1u32
9739 + ::buffa::types::string_encoded_len(&self.tx_hash) as u32;
9740 }
9741 {
9742 let val = self.lookup_kind.to_i32();
9743 if val != 0 {
9744 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
9745 }
9746 }
9747 if self.limit != 0u32 {
9748 size += 1u32 + ::buffa::types::uint32_encoded_len(self.limit) as u32;
9749 }
9750 if !self.page_token.is_empty() {
9751 size
9752 += 1u32
9753 + ::buffa::types::string_encoded_len(&self.page_token)
9754 as u32;
9755 }
9756 size += self.__buffa_unknown_fields.encoded_len() as u32;
9757 size
9758 }
9759 #[allow(clippy::needless_borrow)]
9760 fn write_to(
9761 &self,
9762 _cache: &mut ::buffa::SizeCache,
9763 buf: &mut impl ::buffa::bytes::BufMut,
9764 ) {
9765 #[allow(unused_imports)]
9766 use ::buffa::Enumeration as _;
9767 if !self.tx_hash.is_empty() {
9768 ::buffa::types::put_string_field(1u32, &self.tx_hash, buf);
9769 }
9770 {
9771 let val = self.lookup_kind.to_i32();
9772 if val != 0 {
9773 ::buffa::types::put_int32_field(2u32, val, buf);
9774 }
9775 }
9776 if self.limit != 0u32 {
9777 ::buffa::types::put_uint32_field(3u32, self.limit, buf);
9778 }
9779 if !self.page_token.is_empty() {
9780 ::buffa::types::put_string_field(4u32, &self.page_token, buf);
9781 }
9782 self.__buffa_unknown_fields.write_to(buf);
9783 }
9784 }
9785 impl<'__a> ::serde::Serialize for ListFlowsByTxRequestView<'__a> {
9797 fn serialize<__S: ::serde::Serializer>(
9798 &self,
9799 __s: __S,
9800 ) -> ::core::result::Result<__S::Ok, __S::Error> {
9801 use ::serde::ser::SerializeMap as _;
9802 let mut __map = __s.serialize_map(::core::option::Option::None)?;
9803 if !::buffa::json_helpers::skip_if::is_empty_str(self.tx_hash) {
9804 __map.serialize_entry("txHash", self.tx_hash)?;
9805 }
9806 if !::buffa::json_helpers::skip_if::is_default_enum_value(
9807 &self.lookup_kind,
9808 ) {
9809 __map.serialize_entry("lookupKind", &self.lookup_kind)?;
9810 }
9811 if !::buffa::json_helpers::skip_if::is_zero_u32(&self.limit) {
9812 __map
9813 .serialize_entry(
9814 "limit",
9815 &::buffa::json_helpers::ProtoJson(&self.limit),
9816 )?;
9817 }
9818 if !::buffa::json_helpers::skip_if::is_empty_str(self.page_token) {
9819 __map.serialize_entry("pageToken", self.page_token)?;
9820 }
9821 __map.end()
9822 }
9823 }
9824 impl<'a> ::buffa::MessageName for ListFlowsByTxRequestView<'a> {
9825 const PACKAGE: &'static str = "chain.lifecycle.v1";
9826 const NAME: &'static str = "ListFlowsByTxRequest";
9827 const FULL_NAME: &'static str = "chain.lifecycle.v1.ListFlowsByTxRequest";
9828 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.ListFlowsByTxRequest";
9829 }
9830 ::buffa::impl_default_view_instance!(ListFlowsByTxRequestView);
9831 ::buffa::impl_view_reborrow!(ListFlowsByTxRequestView);
9832 #[derive(Clone, Debug)]
9838 pub struct ListFlowsByTxRequestOwnedView(
9839 ::buffa::OwnedView<ListFlowsByTxRequestView<'static>>,
9840 );
9841 impl ListFlowsByTxRequestOwnedView {
9842 pub fn decode(
9852 bytes: ::buffa::bytes::Bytes,
9853 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9854 ::core::result::Result::Ok(
9855 ListFlowsByTxRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
9856 )
9857 }
9858 pub fn decode_with_options(
9866 bytes: ::buffa::bytes::Bytes,
9867 opts: &::buffa::DecodeOptions,
9868 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9869 ::core::result::Result::Ok(
9870 ListFlowsByTxRequestOwnedView(
9871 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
9872 ),
9873 )
9874 }
9875 pub fn from_owned(
9882 msg: &super::super::ListFlowsByTxRequest,
9883 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9884 ::core::result::Result::Ok(
9885 ListFlowsByTxRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
9886 )
9887 }
9888 #[must_use]
9890 pub fn view(&self) -> &ListFlowsByTxRequestView<'_> {
9891 self.0.reborrow()
9892 }
9893 pub fn to_owned_message(
9900 &self,
9901 ) -> ::core::result::Result<
9902 super::super::ListFlowsByTxRequest,
9903 ::buffa::DecodeError,
9904 > {
9905 self.0.to_owned_message()
9906 }
9907 #[must_use]
9909 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
9910 self.0.bytes()
9911 }
9912 #[must_use]
9914 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
9915 self.0.into_bytes()
9916 }
9917 #[must_use]
9924 pub fn tx_hash(&self) -> &'_ str {
9925 self.0.reborrow().tx_hash
9926 }
9927 #[must_use]
9931 pub fn lookup_kind(&self) -> ::buffa::EnumValue<super::super::TxLookupKind> {
9932 self.0.reborrow().lookup_kind
9933 }
9934 #[must_use]
9939 pub fn limit(&self) -> u32 {
9940 self.0.reborrow().limit
9941 }
9942 #[must_use]
9947 pub fn page_token(&self) -> &'_ str {
9948 self.0.reborrow().page_token
9949 }
9950 }
9951 impl ::core::convert::From<::buffa::OwnedView<ListFlowsByTxRequestView<'static>>>
9952 for ListFlowsByTxRequestOwnedView {
9953 fn from(
9954 inner: ::buffa::OwnedView<ListFlowsByTxRequestView<'static>>,
9955 ) -> Self {
9956 ListFlowsByTxRequestOwnedView(inner)
9957 }
9958 }
9959 impl ::core::convert::From<ListFlowsByTxRequestOwnedView>
9960 for ::buffa::OwnedView<ListFlowsByTxRequestView<'static>> {
9961 fn from(wrapper: ListFlowsByTxRequestOwnedView) -> Self {
9962 wrapper.0
9963 }
9964 }
9965 impl ::core::convert::AsRef<
9966 ::buffa::OwnedView<ListFlowsByTxRequestView<'static>>,
9967 > for ListFlowsByTxRequestOwnedView {
9968 fn as_ref(&self) -> &::buffa::OwnedView<ListFlowsByTxRequestView<'static>> {
9969 &self.0
9970 }
9971 }
9972 impl ::buffa::HasMessageView for super::super::ListFlowsByTxRequest {
9973 type View<'a> = ListFlowsByTxRequestView<'a>;
9974 type ViewHandle = ListFlowsByTxRequestOwnedView;
9975 }
9976 impl ::serde::Serialize for ListFlowsByTxRequestOwnedView {
9977 fn serialize<__S: ::serde::Serializer>(
9978 &self,
9979 __s: __S,
9980 ) -> ::core::result::Result<__S::Ok, __S::Error> {
9981 ::serde::Serialize::serialize(&self.0, __s)
9982 }
9983 }
9984 #[derive(Clone, Debug, Default)]
9986 pub struct ListFlowsRequestView<'a> {
9987 pub limit: u32,
9992 pub sort: ::buffa::EnumValue<super::super::Sort>,
9996 pub flow_kind: ::buffa::EnumValue<super::super::FlowKind>,
10000 pub flow_state: ::buffa::EnumValue<super::super::FlowState>,
10005 pub tx_ref: &'a str,
10010 pub scope: ::buffa::EnumValue<super::super::ListScope>,
10014 pub polyester_chain_ids: ::buffa::RepeatedView<'a, u32>,
10018 pub zipped_asset_ids: ::buffa::RepeatedView<'a, u32>,
10022 pub unified_asset_ids: ::buffa::RepeatedView<'a, u32>,
10026 pub page_token: &'a str,
10032 pub order_by: ::buffa::EnumValue<super::super::ListOrderBy>,
10036 pub account_selector: ::core::option::Option<
10037 super::super::__buffa::view::oneof::list_flows_request::AccountSelector<
10038 'a,
10039 >,
10040 >,
10041 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
10042 }
10043 impl<'a> ::buffa::MessageView<'a> for ListFlowsRequestView<'a> {
10044 type Owned = super::super::ListFlowsRequest;
10045 fn decode_view(
10046 buf: &'a [u8],
10047 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10048 let __limit = ::core::cell::Cell::new(
10049 ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
10050 );
10051 <Self as ::buffa::MessageView>::decode_view_ctx(
10052 buf,
10053 ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
10054 )
10055 }
10056 fn decode_view_with_ctx(
10057 buf: &'a [u8],
10058 ctx: ::buffa::DecodeContext<'_>,
10059 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10060 <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
10061 }
10062 fn merge_view_field(
10063 &mut self,
10064 tag: ::buffa::encoding::Tag,
10065 cur: &'a [u8],
10066 before_tag: &'a [u8],
10067 ctx: ::buffa::DecodeContext<'_>,
10068 ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
10069 let _ = ctx;
10070 #[allow(unused_variables)]
10071 let view = self;
10072 let mut cur = cur;
10073 match tag.field_number() {
10074 1u32 => {
10075 ::buffa::encoding::check_wire_type(
10076 tag,
10077 ::buffa::encoding::WireType::Varint,
10078 )?;
10079 view.limit = ::buffa::types::decode_uint32(&mut cur)?;
10080 }
10081 2u32 => {
10082 ::buffa::encoding::check_wire_type(
10083 tag,
10084 ::buffa::encoding::WireType::Varint,
10085 )?;
10086 view.sort = ::buffa::EnumValue::from(
10087 ::buffa::types::decode_int32(&mut cur)?,
10088 );
10089 }
10090 3u32 => {
10091 ::buffa::encoding::check_wire_type(
10092 tag,
10093 ::buffa::encoding::WireType::Varint,
10094 )?;
10095 view.flow_kind = ::buffa::EnumValue::from(
10096 ::buffa::types::decode_int32(&mut cur)?,
10097 );
10098 }
10099 4u32 => {
10100 ::buffa::encoding::check_wire_type(
10101 tag,
10102 ::buffa::encoding::WireType::Varint,
10103 )?;
10104 view.flow_state = ::buffa::EnumValue::from(
10105 ::buffa::types::decode_int32(&mut cur)?,
10106 );
10107 }
10108 5u32 => {
10109 ::buffa::encoding::check_wire_type(
10110 tag,
10111 ::buffa::encoding::WireType::LengthDelimited,
10112 )?;
10113 view.tx_ref = ::buffa::types::borrow_str(&mut cur)?;
10114 }
10115 6u32 => {
10116 ::buffa::encoding::check_wire_type(
10117 tag,
10118 ::buffa::encoding::WireType::Varint,
10119 )?;
10120 view.scope = ::buffa::EnumValue::from(
10121 ::buffa::types::decode_int32(&mut cur)?,
10122 );
10123 }
10124 12u32 => {
10125 ::buffa::encoding::check_wire_type(
10126 tag,
10127 ::buffa::encoding::WireType::LengthDelimited,
10128 )?;
10129 view.page_token = ::buffa::types::borrow_str(&mut cur)?;
10130 }
10131 13u32 => {
10132 ::buffa::encoding::check_wire_type(
10133 tag,
10134 ::buffa::encoding::WireType::Varint,
10135 )?;
10136 view.order_by = ::buffa::EnumValue::from(
10137 ::buffa::types::decode_int32(&mut cur)?,
10138 );
10139 }
10140 9u32 => {
10141 if tag.wire_type()
10142 == ::buffa::encoding::WireType::LengthDelimited
10143 {
10144 let payload = ::buffa::types::borrow_bytes(&mut cur)?;
10145 view.polyester_chain_ids
10146 .reserve(::buffa::encoding::count_varints(payload));
10147 let mut pcur: &[u8] = payload;
10148 while !pcur.is_empty() {
10149 view.polyester_chain_ids
10150 .push(::buffa::types::decode_uint32(&mut pcur)?);
10151 }
10152 } else if tag.wire_type() == ::buffa::encoding::WireType::Varint
10153 {
10154 view.polyester_chain_ids
10155 .push(::buffa::types::decode_uint32(&mut cur)?);
10156 } else {
10157 return Err(
10158 ::buffa::encoding::wire_type_mismatch(
10159 tag,
10160 ::buffa::encoding::WireType::LengthDelimited,
10161 ),
10162 );
10163 }
10164 }
10165 10u32 => {
10166 if tag.wire_type()
10167 == ::buffa::encoding::WireType::LengthDelimited
10168 {
10169 let payload = ::buffa::types::borrow_bytes(&mut cur)?;
10170 view.zipped_asset_ids
10171 .reserve(::buffa::encoding::count_varints(payload));
10172 let mut pcur: &[u8] = payload;
10173 while !pcur.is_empty() {
10174 view.zipped_asset_ids
10175 .push(::buffa::types::decode_uint32(&mut pcur)?);
10176 }
10177 } else if tag.wire_type() == ::buffa::encoding::WireType::Varint
10178 {
10179 view.zipped_asset_ids
10180 .push(::buffa::types::decode_uint32(&mut cur)?);
10181 } else {
10182 return Err(
10183 ::buffa::encoding::wire_type_mismatch(
10184 tag,
10185 ::buffa::encoding::WireType::LengthDelimited,
10186 ),
10187 );
10188 }
10189 }
10190 11u32 => {
10191 if tag.wire_type()
10192 == ::buffa::encoding::WireType::LengthDelimited
10193 {
10194 let payload = ::buffa::types::borrow_bytes(&mut cur)?;
10195 view.unified_asset_ids
10196 .reserve(::buffa::encoding::count_varints(payload));
10197 let mut pcur: &[u8] = payload;
10198 while !pcur.is_empty() {
10199 view.unified_asset_ids
10200 .push(::buffa::types::decode_uint32(&mut pcur)?);
10201 }
10202 } else if tag.wire_type() == ::buffa::encoding::WireType::Varint
10203 {
10204 view.unified_asset_ids
10205 .push(::buffa::types::decode_uint32(&mut cur)?);
10206 } else {
10207 return Err(
10208 ::buffa::encoding::wire_type_mismatch(
10209 tag,
10210 ::buffa::encoding::WireType::LengthDelimited,
10211 ),
10212 );
10213 }
10214 }
10215 7u32 => {
10216 ::buffa::encoding::check_wire_type(
10217 tag,
10218 ::buffa::encoding::WireType::Fixed64,
10219 )?;
10220 view.account_selector = Some(
10221 super::super::__buffa::view::oneof::list_flows_request::AccountSelector::OwnerAccountId(
10222 ::buffa::types::decode_fixed64(&mut cur)?,
10223 ),
10224 );
10225 }
10226 8u32 => {
10227 ::buffa::encoding::check_wire_type(
10228 tag,
10229 ::buffa::encoding::WireType::LengthDelimited,
10230 )?;
10231 view.account_selector = Some(
10232 super::super::__buffa::view::oneof::list_flows_request::AccountSelector::SmartAccountAddress(
10233 ::buffa::types::borrow_str(&mut cur)?,
10234 ),
10235 );
10236 }
10237 _ => {
10238 ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
10239 let span_len = before_tag.len() - cur.len();
10240 view.__buffa_unknown_fields
10241 .push_record(before_tag, span_len, ctx)?;
10242 }
10243 }
10244 ::core::result::Result::Ok(cur)
10245 }
10246 fn to_owned_message(
10247 &self,
10248 ) -> ::core::result::Result<
10249 super::super::ListFlowsRequest,
10250 ::buffa::DecodeError,
10251 > {
10252 self.to_owned_from_source(None)
10253 }
10254 #[allow(clippy::useless_conversion, clippy::needless_update)]
10255 fn to_owned_from_source(
10256 &self,
10257 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
10258 ) -> ::core::result::Result<
10259 super::super::ListFlowsRequest,
10260 ::buffa::DecodeError,
10261 > {
10262 #[allow(unused_imports)]
10263 use ::buffa::alloc::string::ToString as _;
10264 let _ = __buffa_src;
10265 ::core::result::Result::Ok(super::super::ListFlowsRequest {
10266 limit: self.limit,
10267 sort: self.sort,
10268 flow_kind: self.flow_kind,
10269 flow_state: self.flow_state,
10270 tx_ref: self.tx_ref.to_string(),
10271 scope: self.scope,
10272 polyester_chain_ids: self.polyester_chain_ids.to_vec(),
10273 zipped_asset_ids: self.zipped_asset_ids.to_vec(),
10274 unified_asset_ids: self.unified_asset_ids.to_vec(),
10275 page_token: self.page_token.to_string(),
10276 order_by: self.order_by,
10277 account_selector: self
10278 .account_selector
10279 .as_ref()
10280 .map(|v| match v {
10281 super::super::__buffa::view::oneof::list_flows_request::AccountSelector::OwnerAccountId(
10282 v,
10283 ) => {
10284 super::super::__buffa::oneof::list_flows_request::AccountSelector::OwnerAccountId(
10285 *v,
10286 )
10287 }
10288 super::super::__buffa::view::oneof::list_flows_request::AccountSelector::SmartAccountAddress(
10289 v,
10290 ) => {
10291 super::super::__buffa::oneof::list_flows_request::AccountSelector::SmartAccountAddress(
10292 v.to_string(),
10293 )
10294 }
10295 }),
10296 __buffa_unknown_fields: self
10297 .__buffa_unknown_fields
10298 .to_owned()?
10299 .into(),
10300 ..::core::default::Default::default()
10301 })
10302 }
10303 }
10304 impl<'a> ::buffa::ViewEncode<'a> for ListFlowsRequestView<'a> {
10305 #[allow(clippy::needless_borrow, clippy::let_and_return)]
10306 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
10307 #[allow(unused_imports)]
10308 use ::buffa::Enumeration as _;
10309 let mut size = 0u32;
10310 if self.limit != 0u32 {
10311 size += 1u32 + ::buffa::types::uint32_encoded_len(self.limit) as u32;
10312 }
10313 {
10314 let val = self.sort.to_i32();
10315 if val != 0 {
10316 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
10317 }
10318 }
10319 {
10320 let val = self.flow_kind.to_i32();
10321 if val != 0 {
10322 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
10323 }
10324 }
10325 {
10326 let val = self.flow_state.to_i32();
10327 if val != 0 {
10328 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
10329 }
10330 }
10331 if !self.tx_ref.is_empty() {
10332 size
10333 += 1u32
10334 + ::buffa::types::string_encoded_len(&self.tx_ref) as u32;
10335 }
10336 {
10337 let val = self.scope.to_i32();
10338 if val != 0 {
10339 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
10340 }
10341 }
10342 if let ::core::option::Option::Some(ref v) = self.account_selector {
10343 match v {
10344 super::super::__buffa::view::oneof::list_flows_request::AccountSelector::OwnerAccountId(
10345 _x,
10346 ) => {
10347 size += 1u32 + ::buffa::types::FIXED64_ENCODED_LEN as u32;
10348 }
10349 super::super::__buffa::view::oneof::list_flows_request::AccountSelector::SmartAccountAddress(
10350 x,
10351 ) => {
10352 size += 1u32 + ::buffa::types::string_encoded_len(x) as u32;
10353 }
10354 }
10355 }
10356 if !self.polyester_chain_ids.is_empty() {
10357 let payload: u32 = self
10358 .polyester_chain_ids
10359 .iter()
10360 .map(|&v| ::buffa::types::uint32_encoded_len(v) as u32)
10361 .sum::<u32>();
10362 size
10363 += 1u32 + ::buffa::encoding::varint_len(payload as u64) as u32
10364 + payload;
10365 }
10366 if !self.zipped_asset_ids.is_empty() {
10367 let payload: u32 = self
10368 .zipped_asset_ids
10369 .iter()
10370 .map(|&v| ::buffa::types::uint32_encoded_len(v) as u32)
10371 .sum::<u32>();
10372 size
10373 += 1u32 + ::buffa::encoding::varint_len(payload as u64) as u32
10374 + payload;
10375 }
10376 if !self.unified_asset_ids.is_empty() {
10377 let payload: u32 = self
10378 .unified_asset_ids
10379 .iter()
10380 .map(|&v| ::buffa::types::uint32_encoded_len(v) as u32)
10381 .sum::<u32>();
10382 size
10383 += 1u32 + ::buffa::encoding::varint_len(payload as u64) as u32
10384 + payload;
10385 }
10386 if !self.page_token.is_empty() {
10387 size
10388 += 1u32
10389 + ::buffa::types::string_encoded_len(&self.page_token)
10390 as u32;
10391 }
10392 {
10393 let val = self.order_by.to_i32();
10394 if val != 0 {
10395 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
10396 }
10397 }
10398 size += self.__buffa_unknown_fields.encoded_len() as u32;
10399 size
10400 }
10401 #[allow(clippy::needless_borrow)]
10402 fn write_to(
10403 &self,
10404 _cache: &mut ::buffa::SizeCache,
10405 buf: &mut impl ::buffa::bytes::BufMut,
10406 ) {
10407 #[allow(unused_imports)]
10408 use ::buffa::Enumeration as _;
10409 if self.limit != 0u32 {
10410 ::buffa::types::put_uint32_field(1u32, self.limit, buf);
10411 }
10412 {
10413 let val = self.sort.to_i32();
10414 if val != 0 {
10415 ::buffa::types::put_int32_field(2u32, val, buf);
10416 }
10417 }
10418 {
10419 let val = self.flow_kind.to_i32();
10420 if val != 0 {
10421 ::buffa::types::put_int32_field(3u32, val, buf);
10422 }
10423 }
10424 {
10425 let val = self.flow_state.to_i32();
10426 if val != 0 {
10427 ::buffa::types::put_int32_field(4u32, val, buf);
10428 }
10429 }
10430 if !self.tx_ref.is_empty() {
10431 ::buffa::types::put_string_field(5u32, &self.tx_ref, buf);
10432 }
10433 {
10434 let val = self.scope.to_i32();
10435 if val != 0 {
10436 ::buffa::types::put_int32_field(6u32, val, buf);
10437 }
10438 }
10439 if let ::core::option::Option::Some(ref v) = self.account_selector {
10440 match v {
10441 super::super::__buffa::view::oneof::list_flows_request::AccountSelector::OwnerAccountId(
10442 x,
10443 ) => {
10444 ::buffa::types::put_fixed64_field(7u32, *x, buf);
10445 }
10446 super::super::__buffa::view::oneof::list_flows_request::AccountSelector::SmartAccountAddress(
10447 x,
10448 ) => {
10449 ::buffa::types::put_string_field(8u32, x, buf);
10450 }
10451 }
10452 }
10453 if !self.polyester_chain_ids.is_empty() {
10454 let payload: u32 = self
10455 .polyester_chain_ids
10456 .iter()
10457 .map(|&v| ::buffa::types::uint32_encoded_len(v) as u32)
10458 .sum::<u32>();
10459 ::buffa::types::put_len_delimited_header(9u32, payload, buf);
10460 for &v in &self.polyester_chain_ids {
10461 ::buffa::types::encode_uint32(v, buf);
10462 }
10463 }
10464 if !self.zipped_asset_ids.is_empty() {
10465 let payload: u32 = self
10466 .zipped_asset_ids
10467 .iter()
10468 .map(|&v| ::buffa::types::uint32_encoded_len(v) as u32)
10469 .sum::<u32>();
10470 ::buffa::types::put_len_delimited_header(10u32, payload, buf);
10471 for &v in &self.zipped_asset_ids {
10472 ::buffa::types::encode_uint32(v, buf);
10473 }
10474 }
10475 if !self.unified_asset_ids.is_empty() {
10476 let payload: u32 = self
10477 .unified_asset_ids
10478 .iter()
10479 .map(|&v| ::buffa::types::uint32_encoded_len(v) as u32)
10480 .sum::<u32>();
10481 ::buffa::types::put_len_delimited_header(11u32, payload, buf);
10482 for &v in &self.unified_asset_ids {
10483 ::buffa::types::encode_uint32(v, buf);
10484 }
10485 }
10486 if !self.page_token.is_empty() {
10487 ::buffa::types::put_string_field(12u32, &self.page_token, buf);
10488 }
10489 {
10490 let val = self.order_by.to_i32();
10491 if val != 0 {
10492 ::buffa::types::put_int32_field(13u32, val, buf);
10493 }
10494 }
10495 self.__buffa_unknown_fields.write_to(buf);
10496 }
10497 }
10498 impl<'__a> ::serde::Serialize for ListFlowsRequestView<'__a> {
10510 fn serialize<__S: ::serde::Serializer>(
10511 &self,
10512 __s: __S,
10513 ) -> ::core::result::Result<__S::Ok, __S::Error> {
10514 use ::serde::ser::SerializeMap as _;
10515 let mut __map = __s.serialize_map(::core::option::Option::None)?;
10516 if !::buffa::json_helpers::skip_if::is_zero_u32(&self.limit) {
10517 __map
10518 .serialize_entry(
10519 "limit",
10520 &::buffa::json_helpers::ProtoJson(&self.limit),
10521 )?;
10522 }
10523 if !::buffa::json_helpers::skip_if::is_default_enum_value(&self.sort) {
10524 __map.serialize_entry("sort", &self.sort)?;
10525 }
10526 if !::buffa::json_helpers::skip_if::is_default_enum_value(
10527 &self.flow_kind,
10528 ) {
10529 __map.serialize_entry("flowKind", &self.flow_kind)?;
10530 }
10531 if !::buffa::json_helpers::skip_if::is_default_enum_value(
10532 &self.flow_state,
10533 ) {
10534 __map.serialize_entry("flowState", &self.flow_state)?;
10535 }
10536 if !::buffa::json_helpers::skip_if::is_empty_str(self.tx_ref) {
10537 __map.serialize_entry("txRef", self.tx_ref)?;
10538 }
10539 if !::buffa::json_helpers::skip_if::is_default_enum_value(&self.scope) {
10540 __map.serialize_entry("scope", &self.scope)?;
10541 }
10542 if !self.polyester_chain_ids.is_empty() {
10543 __map
10544 .serialize_entry(
10545 "polyesterChainIds",
10546 &::buffa::json_helpers::RepeatedJson(
10547 &self.polyester_chain_ids,
10548 ),
10549 )?;
10550 }
10551 if !self.zipped_asset_ids.is_empty() {
10552 __map
10553 .serialize_entry(
10554 "zippedAssetIds",
10555 &::buffa::json_helpers::RepeatedJson(&self.zipped_asset_ids),
10556 )?;
10557 }
10558 if !self.unified_asset_ids.is_empty() {
10559 __map
10560 .serialize_entry(
10561 "unifiedAssetIds",
10562 &::buffa::json_helpers::RepeatedJson(&self.unified_asset_ids),
10563 )?;
10564 }
10565 if !::buffa::json_helpers::skip_if::is_empty_str(self.page_token) {
10566 __map.serialize_entry("pageToken", self.page_token)?;
10567 }
10568 if !::buffa::json_helpers::skip_if::is_default_enum_value(
10569 &self.order_by,
10570 ) {
10571 __map.serialize_entry("orderBy", &self.order_by)?;
10572 }
10573 if let ::core::option::Option::Some(ref __ov) = self.account_selector {
10574 match __ov {
10575 super::super::__buffa::view::oneof::list_flows_request::AccountSelector::OwnerAccountId(
10576 v,
10577 ) => {
10578 __map
10579 .serialize_entry(
10580 "ownerAccountId",
10581 &::buffa::json_helpers::ProtoJson(v),
10582 )?;
10583 }
10584 super::super::__buffa::view::oneof::list_flows_request::AccountSelector::SmartAccountAddress(
10585 v,
10586 ) => {
10587 __map.serialize_entry("smartAccountAddress", v)?;
10588 }
10589 }
10590 }
10591 __map.end()
10592 }
10593 }
10594 impl<'a> ::buffa::MessageName for ListFlowsRequestView<'a> {
10595 const PACKAGE: &'static str = "chain.lifecycle.v1";
10596 const NAME: &'static str = "ListFlowsRequest";
10597 const FULL_NAME: &'static str = "chain.lifecycle.v1.ListFlowsRequest";
10598 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.ListFlowsRequest";
10599 }
10600 ::buffa::impl_default_view_instance!(ListFlowsRequestView);
10601 ::buffa::impl_view_reborrow!(ListFlowsRequestView);
10602 #[derive(Clone, Debug)]
10608 pub struct ListFlowsRequestOwnedView(
10609 ::buffa::OwnedView<ListFlowsRequestView<'static>>,
10610 );
10611 impl ListFlowsRequestOwnedView {
10612 pub fn decode(
10622 bytes: ::buffa::bytes::Bytes,
10623 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10624 ::core::result::Result::Ok(
10625 ListFlowsRequestOwnedView(::buffa::OwnedView::decode(bytes)?),
10626 )
10627 }
10628 pub fn decode_with_options(
10636 bytes: ::buffa::bytes::Bytes,
10637 opts: &::buffa::DecodeOptions,
10638 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10639 ::core::result::Result::Ok(
10640 ListFlowsRequestOwnedView(
10641 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
10642 ),
10643 )
10644 }
10645 pub fn from_owned(
10652 msg: &super::super::ListFlowsRequest,
10653 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10654 ::core::result::Result::Ok(
10655 ListFlowsRequestOwnedView(::buffa::OwnedView::from_owned(msg)?),
10656 )
10657 }
10658 #[must_use]
10660 pub fn view(&self) -> &ListFlowsRequestView<'_> {
10661 self.0.reborrow()
10662 }
10663 pub fn to_owned_message(
10670 &self,
10671 ) -> ::core::result::Result<
10672 super::super::ListFlowsRequest,
10673 ::buffa::DecodeError,
10674 > {
10675 self.0.to_owned_message()
10676 }
10677 #[must_use]
10679 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
10680 self.0.bytes()
10681 }
10682 #[must_use]
10684 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
10685 self.0.into_bytes()
10686 }
10687 #[must_use]
10692 pub fn limit(&self) -> u32 {
10693 self.0.reborrow().limit
10694 }
10695 #[must_use]
10699 pub fn sort(&self) -> ::buffa::EnumValue<super::super::Sort> {
10700 self.0.reborrow().sort
10701 }
10702 #[must_use]
10706 pub fn flow_kind(&self) -> ::buffa::EnumValue<super::super::FlowKind> {
10707 self.0.reborrow().flow_kind
10708 }
10709 #[must_use]
10714 pub fn flow_state(&self) -> ::buffa::EnumValue<super::super::FlowState> {
10715 self.0.reborrow().flow_state
10716 }
10717 #[must_use]
10722 pub fn tx_ref(&self) -> &'_ str {
10723 self.0.reborrow().tx_ref
10724 }
10725 #[must_use]
10729 pub fn scope(&self) -> ::buffa::EnumValue<super::super::ListScope> {
10730 self.0.reborrow().scope
10731 }
10732 #[must_use]
10736 pub fn polyester_chain_ids(&self) -> &::buffa::RepeatedView<'_, u32> {
10737 &self.0.reborrow().polyester_chain_ids
10738 }
10739 #[must_use]
10743 pub fn zipped_asset_ids(&self) -> &::buffa::RepeatedView<'_, u32> {
10744 &self.0.reborrow().zipped_asset_ids
10745 }
10746 #[must_use]
10750 pub fn unified_asset_ids(&self) -> &::buffa::RepeatedView<'_, u32> {
10751 &self.0.reborrow().unified_asset_ids
10752 }
10753 #[must_use]
10759 pub fn page_token(&self) -> &'_ str {
10760 self.0.reborrow().page_token
10761 }
10762 #[must_use]
10766 pub fn order_by(&self) -> ::buffa::EnumValue<super::super::ListOrderBy> {
10767 self.0.reborrow().order_by
10768 }
10769 #[must_use]
10771 pub fn account_selector(
10772 &self,
10773 ) -> ::core::option::Option<
10774 &super::super::__buffa::view::oneof::list_flows_request::AccountSelector<
10775 '_,
10776 >,
10777 > {
10778 self.0.reborrow().account_selector.as_ref()
10779 }
10780 }
10781 impl ::core::convert::From<::buffa::OwnedView<ListFlowsRequestView<'static>>>
10782 for ListFlowsRequestOwnedView {
10783 fn from(inner: ::buffa::OwnedView<ListFlowsRequestView<'static>>) -> Self {
10784 ListFlowsRequestOwnedView(inner)
10785 }
10786 }
10787 impl ::core::convert::From<ListFlowsRequestOwnedView>
10788 for ::buffa::OwnedView<ListFlowsRequestView<'static>> {
10789 fn from(wrapper: ListFlowsRequestOwnedView) -> Self {
10790 wrapper.0
10791 }
10792 }
10793 impl ::core::convert::AsRef<::buffa::OwnedView<ListFlowsRequestView<'static>>>
10794 for ListFlowsRequestOwnedView {
10795 fn as_ref(&self) -> &::buffa::OwnedView<ListFlowsRequestView<'static>> {
10796 &self.0
10797 }
10798 }
10799 impl ::buffa::HasMessageView for super::super::ListFlowsRequest {
10800 type View<'a> = ListFlowsRequestView<'a>;
10801 type ViewHandle = ListFlowsRequestOwnedView;
10802 }
10803 impl ::serde::Serialize for ListFlowsRequestOwnedView {
10804 fn serialize<__S: ::serde::Serializer>(
10805 &self,
10806 __s: __S,
10807 ) -> ::core::result::Result<__S::Ok, __S::Error> {
10808 ::serde::Serialize::serialize(&self.0, __s)
10809 }
10810 }
10811 #[derive(Clone, Debug, Default)]
10813 pub struct ListFlowsResponseView<'a> {
10814 pub flows: ::buffa::RepeatedView<
10819 'a,
10820 super::super::__buffa::view::FlowSummaryViewView<'a>,
10821 >,
10822 pub next_page_token: &'a str,
10826 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
10827 }
10828 impl<'a> ::buffa::MessageView<'a> for ListFlowsResponseView<'a> {
10829 type Owned = super::super::ListFlowsResponse;
10830 fn decode_view(
10831 buf: &'a [u8],
10832 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10833 let __limit = ::core::cell::Cell::new(
10834 ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
10835 );
10836 <Self as ::buffa::MessageView>::decode_view_ctx(
10837 buf,
10838 ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
10839 )
10840 }
10841 fn decode_view_with_ctx(
10842 buf: &'a [u8],
10843 ctx: ::buffa::DecodeContext<'_>,
10844 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
10845 <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
10846 }
10847 fn merge_view_field(
10848 &mut self,
10849 tag: ::buffa::encoding::Tag,
10850 cur: &'a [u8],
10851 before_tag: &'a [u8],
10852 ctx: ::buffa::DecodeContext<'_>,
10853 ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
10854 let _ = ctx;
10855 #[allow(unused_variables)]
10856 let view = self;
10857 let mut cur = cur;
10858 match tag.field_number() {
10859 2u32 => {
10860 ::buffa::encoding::check_wire_type(
10861 tag,
10862 ::buffa::encoding::WireType::LengthDelimited,
10863 )?;
10864 view.next_page_token = ::buffa::types::borrow_str(&mut cur)?;
10865 }
10866 1u32 => {
10867 ::buffa::encoding::check_wire_type(
10868 tag,
10869 ::buffa::encoding::WireType::LengthDelimited,
10870 )?;
10871 let __sub_ctx = ctx.descend()?;
10872 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
10873 view.flows
10874 .push(
10875 <super::super::__buffa::view::FlowSummaryViewView as ::buffa::MessageView>::decode_view_ctx(
10876 sub,
10877 __sub_ctx,
10878 )?,
10879 );
10880 }
10881 _ => {
10882 ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
10883 let span_len = before_tag.len() - cur.len();
10884 view.__buffa_unknown_fields
10885 .push_record(before_tag, span_len, ctx)?;
10886 }
10887 }
10888 ::core::result::Result::Ok(cur)
10889 }
10890 fn to_owned_message(
10891 &self,
10892 ) -> ::core::result::Result<
10893 super::super::ListFlowsResponse,
10894 ::buffa::DecodeError,
10895 > {
10896 self.to_owned_from_source(None)
10897 }
10898 #[allow(clippy::useless_conversion, clippy::needless_update)]
10899 fn to_owned_from_source(
10900 &self,
10901 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
10902 ) -> ::core::result::Result<
10903 super::super::ListFlowsResponse,
10904 ::buffa::DecodeError,
10905 > {
10906 #[allow(unused_imports)]
10907 use ::buffa::alloc::string::ToString as _;
10908 let _ = __buffa_src;
10909 ::core::result::Result::Ok(super::super::ListFlowsResponse {
10910 flows: self
10911 .flows
10912 .iter()
10913 .map(|v| v.to_owned_from_source(__buffa_src))
10914 .collect::<::core::result::Result<_, ::buffa::DecodeError>>()?,
10915 next_page_token: self.next_page_token.to_string(),
10916 __buffa_unknown_fields: self
10917 .__buffa_unknown_fields
10918 .to_owned()?
10919 .into(),
10920 ..::core::default::Default::default()
10921 })
10922 }
10923 }
10924 impl<'a> ::buffa::ViewEncode<'a> for ListFlowsResponseView<'a> {
10925 #[allow(clippy::needless_borrow, clippy::let_and_return)]
10926 fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
10927 #[allow(unused_imports)]
10928 use ::buffa::Enumeration as _;
10929 let mut size = 0u32;
10930 for v in &self.flows {
10931 let __slot = __cache.reserve();
10932 let inner_size = v.compute_size(__cache);
10933 __cache.set(__slot, inner_size);
10934 size
10935 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
10936 + inner_size;
10937 }
10938 if !self.next_page_token.is_empty() {
10939 size
10940 += 1u32
10941 + ::buffa::types::string_encoded_len(&self.next_page_token)
10942 as u32;
10943 }
10944 size += self.__buffa_unknown_fields.encoded_len() as u32;
10945 size
10946 }
10947 #[allow(clippy::needless_borrow)]
10948 fn write_to(
10949 &self,
10950 __cache: &mut ::buffa::SizeCache,
10951 buf: &mut impl ::buffa::bytes::BufMut,
10952 ) {
10953 #[allow(unused_imports)]
10954 use ::buffa::Enumeration as _;
10955 for v in &self.flows {
10956 ::buffa::types::put_len_delimited_header(
10957 1u32,
10958 __cache.consume_next(),
10959 buf,
10960 );
10961 v.write_to(__cache, buf);
10962 }
10963 if !self.next_page_token.is_empty() {
10964 ::buffa::types::put_string_field(2u32, &self.next_page_token, buf);
10965 }
10966 self.__buffa_unknown_fields.write_to(buf);
10967 }
10968 }
10969 impl<'__a> ::serde::Serialize for ListFlowsResponseView<'__a> {
10981 fn serialize<__S: ::serde::Serializer>(
10982 &self,
10983 __s: __S,
10984 ) -> ::core::result::Result<__S::Ok, __S::Error> {
10985 use ::serde::ser::SerializeMap as _;
10986 let mut __map = __s.serialize_map(::core::option::Option::None)?;
10987 if !self.flows.is_empty() {
10988 __map.serialize_entry("flows", &*self.flows)?;
10989 }
10990 if !::buffa::json_helpers::skip_if::is_empty_str(self.next_page_token) {
10991 __map.serialize_entry("nextPageToken", self.next_page_token)?;
10992 }
10993 __map.end()
10994 }
10995 }
10996 impl<'a> ::buffa::MessageName for ListFlowsResponseView<'a> {
10997 const PACKAGE: &'static str = "chain.lifecycle.v1";
10998 const NAME: &'static str = "ListFlowsResponse";
10999 const FULL_NAME: &'static str = "chain.lifecycle.v1.ListFlowsResponse";
11000 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.ListFlowsResponse";
11001 }
11002 ::buffa::impl_default_view_instance!(ListFlowsResponseView);
11003 ::buffa::impl_view_reborrow!(ListFlowsResponseView);
11004 #[derive(Clone, Debug)]
11010 pub struct ListFlowsResponseOwnedView(
11011 ::buffa::OwnedView<ListFlowsResponseView<'static>>,
11012 );
11013 impl ListFlowsResponseOwnedView {
11014 pub fn decode(
11024 bytes: ::buffa::bytes::Bytes,
11025 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
11026 ::core::result::Result::Ok(
11027 ListFlowsResponseOwnedView(::buffa::OwnedView::decode(bytes)?),
11028 )
11029 }
11030 pub fn decode_with_options(
11038 bytes: ::buffa::bytes::Bytes,
11039 opts: &::buffa::DecodeOptions,
11040 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
11041 ::core::result::Result::Ok(
11042 ListFlowsResponseOwnedView(
11043 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
11044 ),
11045 )
11046 }
11047 pub fn from_owned(
11054 msg: &super::super::ListFlowsResponse,
11055 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
11056 ::core::result::Result::Ok(
11057 ListFlowsResponseOwnedView(::buffa::OwnedView::from_owned(msg)?),
11058 )
11059 }
11060 #[must_use]
11062 pub fn view(&self) -> &ListFlowsResponseView<'_> {
11063 self.0.reborrow()
11064 }
11065 pub fn to_owned_message(
11072 &self,
11073 ) -> ::core::result::Result<
11074 super::super::ListFlowsResponse,
11075 ::buffa::DecodeError,
11076 > {
11077 self.0.to_owned_message()
11078 }
11079 #[must_use]
11081 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
11082 self.0.bytes()
11083 }
11084 #[must_use]
11086 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
11087 self.0.into_bytes()
11088 }
11089 #[must_use]
11094 pub fn flows(
11095 &self,
11096 ) -> &::buffa::RepeatedView<
11097 '_,
11098 super::super::__buffa::view::FlowSummaryViewView<'_>,
11099 > {
11100 &self.0.reborrow().flows
11101 }
11102 #[must_use]
11106 pub fn next_page_token(&self) -> &'_ str {
11107 self.0.reborrow().next_page_token
11108 }
11109 }
11110 impl ::core::convert::From<::buffa::OwnedView<ListFlowsResponseView<'static>>>
11111 for ListFlowsResponseOwnedView {
11112 fn from(inner: ::buffa::OwnedView<ListFlowsResponseView<'static>>) -> Self {
11113 ListFlowsResponseOwnedView(inner)
11114 }
11115 }
11116 impl ::core::convert::From<ListFlowsResponseOwnedView>
11117 for ::buffa::OwnedView<ListFlowsResponseView<'static>> {
11118 fn from(wrapper: ListFlowsResponseOwnedView) -> Self {
11119 wrapper.0
11120 }
11121 }
11122 impl ::core::convert::AsRef<::buffa::OwnedView<ListFlowsResponseView<'static>>>
11123 for ListFlowsResponseOwnedView {
11124 fn as_ref(&self) -> &::buffa::OwnedView<ListFlowsResponseView<'static>> {
11125 &self.0
11126 }
11127 }
11128 impl ::buffa::HasMessageView for super::super::ListFlowsResponse {
11129 type View<'a> = ListFlowsResponseView<'a>;
11130 type ViewHandle = ListFlowsResponseOwnedView;
11131 }
11132 impl ::serde::Serialize for ListFlowsResponseOwnedView {
11133 fn serialize<__S: ::serde::Serializer>(
11134 &self,
11135 __s: __S,
11136 ) -> ::core::result::Result<__S::Ok, __S::Error> {
11137 ::serde::Serialize::serialize(&self.0, __s)
11138 }
11139 }
11140 #[derive(Clone, Debug, Default)]
11142 pub struct FlowTxMatchViewView<'a> {
11143 pub flow_id: &'a str,
11147 pub flow_kind: ::buffa::EnumValue<super::super::FlowKind>,
11151 pub source_tx_hash: &'a str,
11155 pub latest_tx_ref: &'a str,
11159 pub tx_occurrence_index: u64,
11165 pub source_domain: ::buffa::EnumValue<super::super::FlowDomain>,
11169 pub destination_domain: ::buffa::EnumValue<super::super::FlowDomain>,
11173 pub current_step: ::buffa::EnumValue<super::super::FlowStep>,
11177 pub is_open: bool,
11181 pub is_terminal: bool,
11185 pub asset_ids: ::buffa::MessageFieldView<
11189 super::super::__buffa::view::AssetIdsView<'a>,
11190 >,
11191 pub polyester_chain_id: u32,
11195 pub amount_e18: ::buffa::MessageFieldView<
11199 super::super::super::super::super::polyester::r#type::v1::__buffa::view::U128View<
11200 'a,
11201 >,
11202 >,
11203 pub source_address: &'a str,
11207 pub destination_address: &'a str,
11211 pub lifecycle_reason: ::buffa::EnumValue<super::super::LifecycleReason>,
11215 pub last_activity_at_unix_ms: u64,
11219 pub owner_account_id: u64,
11223 pub smart_account_address: &'a str,
11227 pub zipper_reason: ::buffa::MessageFieldView<
11231 super::super::super::super::zipper::v1::__buffa::view::ZipperReasonDetailsView<
11232 'a,
11233 >,
11234 >,
11235 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
11236 }
11237 impl<'a> ::buffa::MessageView<'a> for FlowTxMatchViewView<'a> {
11238 type Owned = super::super::FlowTxMatchView;
11239 fn decode_view(
11240 buf: &'a [u8],
11241 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
11242 let __limit = ::core::cell::Cell::new(
11243 ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
11244 );
11245 <Self as ::buffa::MessageView>::decode_view_ctx(
11246 buf,
11247 ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
11248 )
11249 }
11250 fn decode_view_with_ctx(
11251 buf: &'a [u8],
11252 ctx: ::buffa::DecodeContext<'_>,
11253 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
11254 <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
11255 }
11256 fn merge_view_field(
11257 &mut self,
11258 tag: ::buffa::encoding::Tag,
11259 cur: &'a [u8],
11260 before_tag: &'a [u8],
11261 ctx: ::buffa::DecodeContext<'_>,
11262 ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
11263 let _ = ctx;
11264 #[allow(unused_variables)]
11265 let view = self;
11266 let mut cur = cur;
11267 match tag.field_number() {
11268 1u32 => {
11269 ::buffa::encoding::check_wire_type(
11270 tag,
11271 ::buffa::encoding::WireType::LengthDelimited,
11272 )?;
11273 view.flow_id = ::buffa::types::borrow_str(&mut cur)?;
11274 }
11275 3u32 => {
11276 ::buffa::encoding::check_wire_type(
11277 tag,
11278 ::buffa::encoding::WireType::Varint,
11279 )?;
11280 view.flow_kind = ::buffa::EnumValue::from(
11281 ::buffa::types::decode_int32(&mut cur)?,
11282 );
11283 }
11284 4u32 => {
11285 ::buffa::encoding::check_wire_type(
11286 tag,
11287 ::buffa::encoding::WireType::LengthDelimited,
11288 )?;
11289 view.source_tx_hash = ::buffa::types::borrow_str(&mut cur)?;
11290 }
11291 5u32 => {
11292 ::buffa::encoding::check_wire_type(
11293 tag,
11294 ::buffa::encoding::WireType::LengthDelimited,
11295 )?;
11296 view.latest_tx_ref = ::buffa::types::borrow_str(&mut cur)?;
11297 }
11298 6u32 => {
11299 ::buffa::encoding::check_wire_type(
11300 tag,
11301 ::buffa::encoding::WireType::Varint,
11302 )?;
11303 view.tx_occurrence_index = ::buffa::types::decode_uint64(
11304 &mut cur,
11305 )?;
11306 }
11307 7u32 => {
11308 ::buffa::encoding::check_wire_type(
11309 tag,
11310 ::buffa::encoding::WireType::Varint,
11311 )?;
11312 view.source_domain = ::buffa::EnumValue::from(
11313 ::buffa::types::decode_int32(&mut cur)?,
11314 );
11315 }
11316 8u32 => {
11317 ::buffa::encoding::check_wire_type(
11318 tag,
11319 ::buffa::encoding::WireType::Varint,
11320 )?;
11321 view.destination_domain = ::buffa::EnumValue::from(
11322 ::buffa::types::decode_int32(&mut cur)?,
11323 );
11324 }
11325 9u32 => {
11326 ::buffa::encoding::check_wire_type(
11327 tag,
11328 ::buffa::encoding::WireType::Varint,
11329 )?;
11330 view.current_step = ::buffa::EnumValue::from(
11331 ::buffa::types::decode_int32(&mut cur)?,
11332 );
11333 }
11334 10u32 => {
11335 ::buffa::encoding::check_wire_type(
11336 tag,
11337 ::buffa::encoding::WireType::Varint,
11338 )?;
11339 view.is_open = ::buffa::types::decode_bool(&mut cur)?;
11340 }
11341 11u32 => {
11342 ::buffa::encoding::check_wire_type(
11343 tag,
11344 ::buffa::encoding::WireType::Varint,
11345 )?;
11346 view.is_terminal = ::buffa::types::decode_bool(&mut cur)?;
11347 }
11348 12u32 => {
11349 ::buffa::encoding::check_wire_type(
11350 tag,
11351 ::buffa::encoding::WireType::LengthDelimited,
11352 )?;
11353 let __sub_ctx = ctx.descend()?;
11354 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
11355 match view.asset_ids.as_mut() {
11356 Some(existing) => {
11357 ::buffa::MessageView::merge_into_view(
11358 existing,
11359 sub,
11360 __sub_ctx,
11361 )?
11362 }
11363 None => {
11364 view.asset_ids = ::buffa::MessageFieldView::set(
11365 <super::super::__buffa::view::AssetIdsView as ::buffa::MessageView>::decode_view_ctx(
11366 sub,
11367 __sub_ctx,
11368 )?,
11369 );
11370 }
11371 }
11372 }
11373 13u32 => {
11374 ::buffa::encoding::check_wire_type(
11375 tag,
11376 ::buffa::encoding::WireType::Varint,
11377 )?;
11378 view.polyester_chain_id = ::buffa::types::decode_uint32(
11379 &mut cur,
11380 )?;
11381 }
11382 14u32 => {
11383 ::buffa::encoding::check_wire_type(
11384 tag,
11385 ::buffa::encoding::WireType::LengthDelimited,
11386 )?;
11387 let __sub_ctx = ctx.descend()?;
11388 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
11389 match view.amount_e18.as_mut() {
11390 Some(existing) => {
11391 ::buffa::MessageView::merge_into_view(
11392 existing,
11393 sub,
11394 __sub_ctx,
11395 )?
11396 }
11397 None => {
11398 view.amount_e18 = ::buffa::MessageFieldView::set(
11399 <super::super::super::super::super::polyester::r#type::v1::__buffa::view::U128View as ::buffa::MessageView>::decode_view_ctx(
11400 sub,
11401 __sub_ctx,
11402 )?,
11403 );
11404 }
11405 }
11406 }
11407 15u32 => {
11408 ::buffa::encoding::check_wire_type(
11409 tag,
11410 ::buffa::encoding::WireType::LengthDelimited,
11411 )?;
11412 view.source_address = ::buffa::types::borrow_str(&mut cur)?;
11413 }
11414 16u32 => {
11415 ::buffa::encoding::check_wire_type(
11416 tag,
11417 ::buffa::encoding::WireType::LengthDelimited,
11418 )?;
11419 view.destination_address = ::buffa::types::borrow_str(&mut cur)?;
11420 }
11421 17u32 => {
11422 ::buffa::encoding::check_wire_type(
11423 tag,
11424 ::buffa::encoding::WireType::Varint,
11425 )?;
11426 view.lifecycle_reason = ::buffa::EnumValue::from(
11427 ::buffa::types::decode_int32(&mut cur)?,
11428 );
11429 }
11430 18u32 => {
11431 ::buffa::encoding::check_wire_type(
11432 tag,
11433 ::buffa::encoding::WireType::Varint,
11434 )?;
11435 view.last_activity_at_unix_ms = ::buffa::types::decode_uint64(
11436 &mut cur,
11437 )?;
11438 }
11439 19u32 => {
11440 ::buffa::encoding::check_wire_type(
11441 tag,
11442 ::buffa::encoding::WireType::Fixed64,
11443 )?;
11444 view.owner_account_id = ::buffa::types::decode_fixed64(
11445 &mut cur,
11446 )?;
11447 }
11448 20u32 => {
11449 ::buffa::encoding::check_wire_type(
11450 tag,
11451 ::buffa::encoding::WireType::LengthDelimited,
11452 )?;
11453 view.smart_account_address = ::buffa::types::borrow_str(
11454 &mut cur,
11455 )?;
11456 }
11457 21u32 => {
11458 ::buffa::encoding::check_wire_type(
11459 tag,
11460 ::buffa::encoding::WireType::LengthDelimited,
11461 )?;
11462 let __sub_ctx = ctx.descend()?;
11463 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
11464 match view.zipper_reason.as_mut() {
11465 Some(existing) => {
11466 ::buffa::MessageView::merge_into_view(
11467 existing,
11468 sub,
11469 __sub_ctx,
11470 )?
11471 }
11472 None => {
11473 view.zipper_reason = ::buffa::MessageFieldView::set(
11474 <super::super::super::super::zipper::v1::__buffa::view::ZipperReasonDetailsView as ::buffa::MessageView>::decode_view_ctx(
11475 sub,
11476 __sub_ctx,
11477 )?,
11478 );
11479 }
11480 }
11481 }
11482 _ => {
11483 ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
11484 let span_len = before_tag.len() - cur.len();
11485 view.__buffa_unknown_fields
11486 .push_record(before_tag, span_len, ctx)?;
11487 }
11488 }
11489 ::core::result::Result::Ok(cur)
11490 }
11491 fn to_owned_message(
11492 &self,
11493 ) -> ::core::result::Result<
11494 super::super::FlowTxMatchView,
11495 ::buffa::DecodeError,
11496 > {
11497 self.to_owned_from_source(None)
11498 }
11499 #[allow(clippy::useless_conversion, clippy::needless_update)]
11500 fn to_owned_from_source(
11501 &self,
11502 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
11503 ) -> ::core::result::Result<
11504 super::super::FlowTxMatchView,
11505 ::buffa::DecodeError,
11506 > {
11507 #[allow(unused_imports)]
11508 use ::buffa::alloc::string::ToString as _;
11509 let _ = __buffa_src;
11510 ::core::result::Result::Ok(super::super::FlowTxMatchView {
11511 flow_id: self.flow_id.to_string(),
11512 flow_kind: self.flow_kind,
11513 source_tx_hash: self.source_tx_hash.to_string(),
11514 latest_tx_ref: self.latest_tx_ref.to_string(),
11515 tx_occurrence_index: self.tx_occurrence_index,
11516 source_domain: self.source_domain,
11517 destination_domain: self.destination_domain,
11518 current_step: self.current_step,
11519 is_open: self.is_open,
11520 is_terminal: self.is_terminal,
11521 asset_ids: match self.asset_ids.as_option() {
11522 Some(v) => {
11523 ::buffa::MessageField::<
11524 super::super::AssetIds,
11525 >::some(v.to_owned_from_source(__buffa_src)?)
11526 }
11527 None => ::buffa::MessageField::none(),
11528 },
11529 polyester_chain_id: self.polyester_chain_id,
11530 amount_e18: match self.amount_e18.as_option() {
11531 Some(v) => {
11532 ::buffa::MessageField::<
11533 super::super::super::super::super::polyester::r#type::v1::U128,
11534 >::some(v.to_owned_from_source(__buffa_src)?)
11535 }
11536 None => ::buffa::MessageField::none(),
11537 },
11538 source_address: self.source_address.to_string(),
11539 destination_address: self.destination_address.to_string(),
11540 lifecycle_reason: self.lifecycle_reason,
11541 last_activity_at_unix_ms: self.last_activity_at_unix_ms,
11542 owner_account_id: self.owner_account_id,
11543 smart_account_address: self.smart_account_address.to_string(),
11544 zipper_reason: match self.zipper_reason.as_option() {
11545 Some(v) => {
11546 ::buffa::MessageField::<
11547 super::super::super::super::zipper::v1::ZipperReasonDetails,
11548 >::some(v.to_owned_from_source(__buffa_src)?)
11549 }
11550 None => ::buffa::MessageField::none(),
11551 },
11552 __buffa_unknown_fields: self
11553 .__buffa_unknown_fields
11554 .to_owned()?
11555 .into(),
11556 ..::core::default::Default::default()
11557 })
11558 }
11559 }
11560 impl<'a> ::buffa::ViewEncode<'a> for FlowTxMatchViewView<'a> {
11561 #[allow(clippy::needless_borrow, clippy::let_and_return)]
11562 fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
11563 #[allow(unused_imports)]
11564 use ::buffa::Enumeration as _;
11565 let mut size = 0u32;
11566 if !self.flow_id.is_empty() {
11567 size
11568 += 1u32
11569 + ::buffa::types::string_encoded_len(&self.flow_id) as u32;
11570 }
11571 {
11572 let val = self.flow_kind.to_i32();
11573 if val != 0 {
11574 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
11575 }
11576 }
11577 if !self.source_tx_hash.is_empty() {
11578 size
11579 += 1u32
11580 + ::buffa::types::string_encoded_len(&self.source_tx_hash)
11581 as u32;
11582 }
11583 if !self.latest_tx_ref.is_empty() {
11584 size
11585 += 1u32
11586 + ::buffa::types::string_encoded_len(&self.latest_tx_ref)
11587 as u32;
11588 }
11589 if self.tx_occurrence_index != 0u64 {
11590 size
11591 += 1u32
11592 + ::buffa::types::uint64_encoded_len(
11593 self.tx_occurrence_index,
11594 ) as u32;
11595 }
11596 {
11597 let val = self.source_domain.to_i32();
11598 if val != 0 {
11599 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
11600 }
11601 }
11602 {
11603 let val = self.destination_domain.to_i32();
11604 if val != 0 {
11605 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
11606 }
11607 }
11608 {
11609 let val = self.current_step.to_i32();
11610 if val != 0 {
11611 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
11612 }
11613 }
11614 if self.is_open {
11615 size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
11616 }
11617 if self.is_terminal {
11618 size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
11619 }
11620 if self.asset_ids.is_set() {
11621 let __slot = __cache.reserve();
11622 let inner_size = self.asset_ids.compute_size(__cache);
11623 __cache.set(__slot, inner_size);
11624 size
11625 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
11626 + inner_size;
11627 }
11628 if self.polyester_chain_id != 0u32 {
11629 size
11630 += 1u32
11631 + ::buffa::types::uint32_encoded_len(self.polyester_chain_id)
11632 as u32;
11633 }
11634 if self.amount_e18.is_set() {
11635 let __slot = __cache.reserve();
11636 let inner_size = self.amount_e18.compute_size(__cache);
11637 __cache.set(__slot, inner_size);
11638 size
11639 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
11640 + inner_size;
11641 }
11642 if !self.source_address.is_empty() {
11643 size
11644 += 1u32
11645 + ::buffa::types::string_encoded_len(&self.source_address)
11646 as u32;
11647 }
11648 if !self.destination_address.is_empty() {
11649 size
11650 += 2u32
11651 + ::buffa::types::string_encoded_len(
11652 &self.destination_address,
11653 ) as u32;
11654 }
11655 {
11656 let val = self.lifecycle_reason.to_i32();
11657 if val != 0 {
11658 size += 2u32 + ::buffa::types::int32_encoded_len(val) as u32;
11659 }
11660 }
11661 if self.last_activity_at_unix_ms != 0u64 {
11662 size
11663 += 2u32
11664 + ::buffa::types::uint64_encoded_len(
11665 self.last_activity_at_unix_ms,
11666 ) as u32;
11667 }
11668 if self.owner_account_id != 0u64 {
11669 size += 2u32 + ::buffa::types::FIXED64_ENCODED_LEN as u32;
11670 }
11671 if !self.smart_account_address.is_empty() {
11672 size
11673 += 2u32
11674 + ::buffa::types::string_encoded_len(
11675 &self.smart_account_address,
11676 ) as u32;
11677 }
11678 if self.zipper_reason.is_set() {
11679 let __slot = __cache.reserve();
11680 let inner_size = self.zipper_reason.compute_size(__cache);
11681 __cache.set(__slot, inner_size);
11682 size
11683 += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
11684 + inner_size;
11685 }
11686 size += self.__buffa_unknown_fields.encoded_len() as u32;
11687 size
11688 }
11689 #[allow(clippy::needless_borrow)]
11690 fn write_to(
11691 &self,
11692 __cache: &mut ::buffa::SizeCache,
11693 buf: &mut impl ::buffa::bytes::BufMut,
11694 ) {
11695 #[allow(unused_imports)]
11696 use ::buffa::Enumeration as _;
11697 if !self.flow_id.is_empty() {
11698 ::buffa::types::put_string_field(1u32, &self.flow_id, buf);
11699 }
11700 {
11701 let val = self.flow_kind.to_i32();
11702 if val != 0 {
11703 ::buffa::types::put_int32_field(3u32, val, buf);
11704 }
11705 }
11706 if !self.source_tx_hash.is_empty() {
11707 ::buffa::types::put_string_field(4u32, &self.source_tx_hash, buf);
11708 }
11709 if !self.latest_tx_ref.is_empty() {
11710 ::buffa::types::put_string_field(5u32, &self.latest_tx_ref, buf);
11711 }
11712 if self.tx_occurrence_index != 0u64 {
11713 ::buffa::types::put_uint64_field(
11714 6u32,
11715 self.tx_occurrence_index,
11716 buf,
11717 );
11718 }
11719 {
11720 let val = self.source_domain.to_i32();
11721 if val != 0 {
11722 ::buffa::types::put_int32_field(7u32, val, buf);
11723 }
11724 }
11725 {
11726 let val = self.destination_domain.to_i32();
11727 if val != 0 {
11728 ::buffa::types::put_int32_field(8u32, val, buf);
11729 }
11730 }
11731 {
11732 let val = self.current_step.to_i32();
11733 if val != 0 {
11734 ::buffa::types::put_int32_field(9u32, val, buf);
11735 }
11736 }
11737 if self.is_open {
11738 ::buffa::types::put_bool_field(10u32, self.is_open, buf);
11739 }
11740 if self.is_terminal {
11741 ::buffa::types::put_bool_field(11u32, self.is_terminal, buf);
11742 }
11743 if self.asset_ids.is_set() {
11744 ::buffa::types::put_len_delimited_header(
11745 12u32,
11746 __cache.consume_next(),
11747 buf,
11748 );
11749 self.asset_ids.write_to(__cache, buf);
11750 }
11751 if self.polyester_chain_id != 0u32 {
11752 ::buffa::types::put_uint32_field(
11753 13u32,
11754 self.polyester_chain_id,
11755 buf,
11756 );
11757 }
11758 if self.amount_e18.is_set() {
11759 ::buffa::types::put_len_delimited_header(
11760 14u32,
11761 __cache.consume_next(),
11762 buf,
11763 );
11764 self.amount_e18.write_to(__cache, buf);
11765 }
11766 if !self.source_address.is_empty() {
11767 ::buffa::types::put_string_field(15u32, &self.source_address, buf);
11768 }
11769 if !self.destination_address.is_empty() {
11770 ::buffa::types::put_string_field(
11771 16u32,
11772 &self.destination_address,
11773 buf,
11774 );
11775 }
11776 {
11777 let val = self.lifecycle_reason.to_i32();
11778 if val != 0 {
11779 ::buffa::types::put_int32_field(17u32, val, buf);
11780 }
11781 }
11782 if self.last_activity_at_unix_ms != 0u64 {
11783 ::buffa::types::put_uint64_field(
11784 18u32,
11785 self.last_activity_at_unix_ms,
11786 buf,
11787 );
11788 }
11789 if self.owner_account_id != 0u64 {
11790 ::buffa::types::put_fixed64_field(19u32, self.owner_account_id, buf);
11791 }
11792 if !self.smart_account_address.is_empty() {
11793 ::buffa::types::put_string_field(
11794 20u32,
11795 &self.smart_account_address,
11796 buf,
11797 );
11798 }
11799 if self.zipper_reason.is_set() {
11800 ::buffa::types::put_len_delimited_header(
11801 21u32,
11802 __cache.consume_next(),
11803 buf,
11804 );
11805 self.zipper_reason.write_to(__cache, buf);
11806 }
11807 self.__buffa_unknown_fields.write_to(buf);
11808 }
11809 }
11810 impl<'__a> ::serde::Serialize for FlowTxMatchViewView<'__a> {
11822 fn serialize<__S: ::serde::Serializer>(
11823 &self,
11824 __s: __S,
11825 ) -> ::core::result::Result<__S::Ok, __S::Error> {
11826 use ::serde::ser::SerializeMap as _;
11827 let mut __map = __s.serialize_map(::core::option::Option::None)?;
11828 if !::buffa::json_helpers::skip_if::is_empty_str(self.flow_id) {
11829 __map.serialize_entry("flowId", self.flow_id)?;
11830 }
11831 if !::buffa::json_helpers::skip_if::is_default_enum_value(
11832 &self.flow_kind,
11833 ) {
11834 __map.serialize_entry("flowKind", &self.flow_kind)?;
11835 }
11836 if !::buffa::json_helpers::skip_if::is_empty_str(self.source_tx_hash) {
11837 __map.serialize_entry("sourceTxHash", self.source_tx_hash)?;
11838 }
11839 if !::buffa::json_helpers::skip_if::is_empty_str(self.latest_tx_ref) {
11840 __map.serialize_entry("latestTxRef", self.latest_tx_ref)?;
11841 }
11842 if !::buffa::json_helpers::skip_if::is_zero_u64(
11843 &self.tx_occurrence_index,
11844 ) {
11845 __map
11846 .serialize_entry(
11847 "txOccurrenceIndex",
11848 &::buffa::json_helpers::ProtoJson(&self.tx_occurrence_index),
11849 )?;
11850 }
11851 if !::buffa::json_helpers::skip_if::is_default_enum_value(
11852 &self.source_domain,
11853 ) {
11854 __map.serialize_entry("sourceDomain", &self.source_domain)?;
11855 }
11856 if !::buffa::json_helpers::skip_if::is_default_enum_value(
11857 &self.destination_domain,
11858 ) {
11859 __map
11860 .serialize_entry("destinationDomain", &self.destination_domain)?;
11861 }
11862 if !::buffa::json_helpers::skip_if::is_default_enum_value(
11863 &self.current_step,
11864 ) {
11865 __map.serialize_entry("currentStep", &self.current_step)?;
11866 }
11867 if self.is_open {
11868 __map.serialize_entry("isOpen", &self.is_open)?;
11869 }
11870 if self.is_terminal {
11871 __map.serialize_entry("isTerminal", &self.is_terminal)?;
11872 }
11873 {
11874 if let ::core::option::Option::Some(__v) = self.asset_ids.as_option()
11875 {
11876 __map.serialize_entry("assetIds", __v)?;
11877 }
11878 }
11879 if !::buffa::json_helpers::skip_if::is_zero_u32(
11880 &self.polyester_chain_id,
11881 ) {
11882 __map
11883 .serialize_entry(
11884 "polyesterChainId",
11885 &::buffa::json_helpers::ProtoJson(&self.polyester_chain_id),
11886 )?;
11887 }
11888 {
11889 if let ::core::option::Option::Some(__v) = self
11890 .amount_e18
11891 .as_option()
11892 {
11893 __map.serialize_entry("amountE18", __v)?;
11894 }
11895 }
11896 if !::buffa::json_helpers::skip_if::is_empty_str(self.source_address) {
11897 __map.serialize_entry("sourceAddress", self.source_address)?;
11898 }
11899 if !::buffa::json_helpers::skip_if::is_empty_str(
11900 self.destination_address,
11901 ) {
11902 __map
11903 .serialize_entry(
11904 "destinationAddress",
11905 self.destination_address,
11906 )?;
11907 }
11908 if !::buffa::json_helpers::skip_if::is_default_enum_value(
11909 &self.lifecycle_reason,
11910 ) {
11911 __map.serialize_entry("lifecycleReason", &self.lifecycle_reason)?;
11912 }
11913 if !::buffa::json_helpers::skip_if::is_zero_u64(
11914 &self.last_activity_at_unix_ms,
11915 ) {
11916 __map
11917 .serialize_entry(
11918 "lastActivityAtUnixMs",
11919 &::buffa::json_helpers::ProtoJson(
11920 &self.last_activity_at_unix_ms,
11921 ),
11922 )?;
11923 }
11924 if !::buffa::json_helpers::skip_if::is_zero_u64(&self.owner_account_id) {
11925 __map
11926 .serialize_entry(
11927 "ownerAccountId",
11928 &::buffa::json_helpers::ProtoJson(&self.owner_account_id),
11929 )?;
11930 }
11931 if !::buffa::json_helpers::skip_if::is_empty_str(
11932 self.smart_account_address,
11933 ) {
11934 __map
11935 .serialize_entry(
11936 "smartAccountAddress",
11937 self.smart_account_address,
11938 )?;
11939 }
11940 {
11941 if let ::core::option::Option::Some(__v) = self
11942 .zipper_reason
11943 .as_option()
11944 {
11945 __map.serialize_entry("zipperReason", __v)?;
11946 }
11947 }
11948 __map.end()
11949 }
11950 }
11951 impl<'a> ::buffa::MessageName for FlowTxMatchViewView<'a> {
11952 const PACKAGE: &'static str = "chain.lifecycle.v1";
11953 const NAME: &'static str = "FlowTxMatchView";
11954 const FULL_NAME: &'static str = "chain.lifecycle.v1.FlowTxMatchView";
11955 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowTxMatchView";
11956 }
11957 ::buffa::impl_default_view_instance!(FlowTxMatchViewView);
11958 ::buffa::impl_view_reborrow!(FlowTxMatchViewView);
11959 #[derive(Clone, Debug)]
11965 pub struct FlowTxMatchViewOwnedView(
11966 ::buffa::OwnedView<FlowTxMatchViewView<'static>>,
11967 );
11968 impl FlowTxMatchViewOwnedView {
11969 pub fn decode(
11979 bytes: ::buffa::bytes::Bytes,
11980 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
11981 ::core::result::Result::Ok(
11982 FlowTxMatchViewOwnedView(::buffa::OwnedView::decode(bytes)?),
11983 )
11984 }
11985 pub fn decode_with_options(
11993 bytes: ::buffa::bytes::Bytes,
11994 opts: &::buffa::DecodeOptions,
11995 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
11996 ::core::result::Result::Ok(
11997 FlowTxMatchViewOwnedView(
11998 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
11999 ),
12000 )
12001 }
12002 pub fn from_owned(
12009 msg: &super::super::FlowTxMatchView,
12010 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12011 ::core::result::Result::Ok(
12012 FlowTxMatchViewOwnedView(::buffa::OwnedView::from_owned(msg)?),
12013 )
12014 }
12015 #[must_use]
12017 pub fn view(&self) -> &FlowTxMatchViewView<'_> {
12018 self.0.reborrow()
12019 }
12020 pub fn to_owned_message(
12027 &self,
12028 ) -> ::core::result::Result<
12029 super::super::FlowTxMatchView,
12030 ::buffa::DecodeError,
12031 > {
12032 self.0.to_owned_message()
12033 }
12034 #[must_use]
12036 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
12037 self.0.bytes()
12038 }
12039 #[must_use]
12041 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
12042 self.0.into_bytes()
12043 }
12044 #[must_use]
12048 pub fn flow_id(&self) -> &'_ str {
12049 self.0.reborrow().flow_id
12050 }
12051 #[must_use]
12055 pub fn flow_kind(&self) -> ::buffa::EnumValue<super::super::FlowKind> {
12056 self.0.reborrow().flow_kind
12057 }
12058 #[must_use]
12062 pub fn source_tx_hash(&self) -> &'_ str {
12063 self.0.reborrow().source_tx_hash
12064 }
12065 #[must_use]
12069 pub fn latest_tx_ref(&self) -> &'_ str {
12070 self.0.reborrow().latest_tx_ref
12071 }
12072 #[must_use]
12078 pub fn tx_occurrence_index(&self) -> u64 {
12079 self.0.reborrow().tx_occurrence_index
12080 }
12081 #[must_use]
12085 pub fn source_domain(&self) -> ::buffa::EnumValue<super::super::FlowDomain> {
12086 self.0.reborrow().source_domain
12087 }
12088 #[must_use]
12092 pub fn destination_domain(
12093 &self,
12094 ) -> ::buffa::EnumValue<super::super::FlowDomain> {
12095 self.0.reborrow().destination_domain
12096 }
12097 #[must_use]
12101 pub fn current_step(&self) -> ::buffa::EnumValue<super::super::FlowStep> {
12102 self.0.reborrow().current_step
12103 }
12104 #[must_use]
12108 pub fn is_open(&self) -> bool {
12109 self.0.reborrow().is_open
12110 }
12111 #[must_use]
12115 pub fn is_terminal(&self) -> bool {
12116 self.0.reborrow().is_terminal
12117 }
12118 #[must_use]
12122 pub fn asset_ids(
12123 &self,
12124 ) -> &::buffa::MessageFieldView<
12125 super::super::__buffa::view::AssetIdsView<'_>,
12126 > {
12127 &self.0.reborrow().asset_ids
12128 }
12129 #[must_use]
12133 pub fn polyester_chain_id(&self) -> u32 {
12134 self.0.reborrow().polyester_chain_id
12135 }
12136 #[must_use]
12140 pub fn amount_e18(
12141 &self,
12142 ) -> &::buffa::MessageFieldView<
12143 super::super::super::super::super::polyester::r#type::v1::__buffa::view::U128View<
12144 '_,
12145 >,
12146 > {
12147 &self.0.reborrow().amount_e18
12148 }
12149 #[must_use]
12153 pub fn source_address(&self) -> &'_ str {
12154 self.0.reborrow().source_address
12155 }
12156 #[must_use]
12160 pub fn destination_address(&self) -> &'_ str {
12161 self.0.reborrow().destination_address
12162 }
12163 #[must_use]
12167 pub fn lifecycle_reason(
12168 &self,
12169 ) -> ::buffa::EnumValue<super::super::LifecycleReason> {
12170 self.0.reborrow().lifecycle_reason
12171 }
12172 #[must_use]
12176 pub fn last_activity_at_unix_ms(&self) -> u64 {
12177 self.0.reborrow().last_activity_at_unix_ms
12178 }
12179 #[must_use]
12183 pub fn owner_account_id(&self) -> u64 {
12184 self.0.reborrow().owner_account_id
12185 }
12186 #[must_use]
12190 pub fn smart_account_address(&self) -> &'_ str {
12191 self.0.reborrow().smart_account_address
12192 }
12193 #[must_use]
12197 pub fn zipper_reason(
12198 &self,
12199 ) -> &::buffa::MessageFieldView<
12200 super::super::super::super::zipper::v1::__buffa::view::ZipperReasonDetailsView<
12201 '_,
12202 >,
12203 > {
12204 &self.0.reborrow().zipper_reason
12205 }
12206 }
12207 impl ::core::convert::From<::buffa::OwnedView<FlowTxMatchViewView<'static>>>
12208 for FlowTxMatchViewOwnedView {
12209 fn from(inner: ::buffa::OwnedView<FlowTxMatchViewView<'static>>) -> Self {
12210 FlowTxMatchViewOwnedView(inner)
12211 }
12212 }
12213 impl ::core::convert::From<FlowTxMatchViewOwnedView>
12214 for ::buffa::OwnedView<FlowTxMatchViewView<'static>> {
12215 fn from(wrapper: FlowTxMatchViewOwnedView) -> Self {
12216 wrapper.0
12217 }
12218 }
12219 impl ::core::convert::AsRef<::buffa::OwnedView<FlowTxMatchViewView<'static>>>
12220 for FlowTxMatchViewOwnedView {
12221 fn as_ref(&self) -> &::buffa::OwnedView<FlowTxMatchViewView<'static>> {
12222 &self.0
12223 }
12224 }
12225 impl ::buffa::HasMessageView for super::super::FlowTxMatchView {
12226 type View<'a> = FlowTxMatchViewView<'a>;
12227 type ViewHandle = FlowTxMatchViewOwnedView;
12228 }
12229 impl ::serde::Serialize for FlowTxMatchViewOwnedView {
12230 fn serialize<__S: ::serde::Serializer>(
12231 &self,
12232 __s: __S,
12233 ) -> ::core::result::Result<__S::Ok, __S::Error> {
12234 ::serde::Serialize::serialize(&self.0, __s)
12235 }
12236 }
12237 #[derive(Clone, Debug, Default)]
12240 pub struct ListFlowsByTxResponseView<'a> {
12241 pub tx_hash: &'a str,
12245 pub matches: ::buffa::RepeatedView<
12250 'a,
12251 super::super::__buffa::view::FlowTxMatchViewView<'a>,
12252 >,
12253 pub next_page_token: &'a str,
12257 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
12258 }
12259 impl<'a> ::buffa::MessageView<'a> for ListFlowsByTxResponseView<'a> {
12260 type Owned = super::super::ListFlowsByTxResponse;
12261 fn decode_view(
12262 buf: &'a [u8],
12263 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12264 let __limit = ::core::cell::Cell::new(
12265 ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
12266 );
12267 <Self as ::buffa::MessageView>::decode_view_ctx(
12268 buf,
12269 ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
12270 )
12271 }
12272 fn decode_view_with_ctx(
12273 buf: &'a [u8],
12274 ctx: ::buffa::DecodeContext<'_>,
12275 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12276 <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
12277 }
12278 fn merge_view_field(
12279 &mut self,
12280 tag: ::buffa::encoding::Tag,
12281 cur: &'a [u8],
12282 before_tag: &'a [u8],
12283 ctx: ::buffa::DecodeContext<'_>,
12284 ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
12285 let _ = ctx;
12286 #[allow(unused_variables)]
12287 let view = self;
12288 let mut cur = cur;
12289 match tag.field_number() {
12290 1u32 => {
12291 ::buffa::encoding::check_wire_type(
12292 tag,
12293 ::buffa::encoding::WireType::LengthDelimited,
12294 )?;
12295 view.tx_hash = ::buffa::types::borrow_str(&mut cur)?;
12296 }
12297 3u32 => {
12298 ::buffa::encoding::check_wire_type(
12299 tag,
12300 ::buffa::encoding::WireType::LengthDelimited,
12301 )?;
12302 view.next_page_token = ::buffa::types::borrow_str(&mut cur)?;
12303 }
12304 2u32 => {
12305 ::buffa::encoding::check_wire_type(
12306 tag,
12307 ::buffa::encoding::WireType::LengthDelimited,
12308 )?;
12309 let __sub_ctx = ctx.descend()?;
12310 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
12311 view.matches
12312 .push(
12313 <super::super::__buffa::view::FlowTxMatchViewView as ::buffa::MessageView>::decode_view_ctx(
12314 sub,
12315 __sub_ctx,
12316 )?,
12317 );
12318 }
12319 _ => {
12320 ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
12321 let span_len = before_tag.len() - cur.len();
12322 view.__buffa_unknown_fields
12323 .push_record(before_tag, span_len, ctx)?;
12324 }
12325 }
12326 ::core::result::Result::Ok(cur)
12327 }
12328 fn to_owned_message(
12329 &self,
12330 ) -> ::core::result::Result<
12331 super::super::ListFlowsByTxResponse,
12332 ::buffa::DecodeError,
12333 > {
12334 self.to_owned_from_source(None)
12335 }
12336 #[allow(clippy::useless_conversion, clippy::needless_update)]
12337 fn to_owned_from_source(
12338 &self,
12339 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
12340 ) -> ::core::result::Result<
12341 super::super::ListFlowsByTxResponse,
12342 ::buffa::DecodeError,
12343 > {
12344 #[allow(unused_imports)]
12345 use ::buffa::alloc::string::ToString as _;
12346 let _ = __buffa_src;
12347 ::core::result::Result::Ok(super::super::ListFlowsByTxResponse {
12348 tx_hash: self.tx_hash.to_string(),
12349 matches: self
12350 .matches
12351 .iter()
12352 .map(|v| v.to_owned_from_source(__buffa_src))
12353 .collect::<::core::result::Result<_, ::buffa::DecodeError>>()?,
12354 next_page_token: self.next_page_token.to_string(),
12355 __buffa_unknown_fields: self
12356 .__buffa_unknown_fields
12357 .to_owned()?
12358 .into(),
12359 ..::core::default::Default::default()
12360 })
12361 }
12362 }
12363 impl<'a> ::buffa::ViewEncode<'a> for ListFlowsByTxResponseView<'a> {
12364 #[allow(clippy::needless_borrow, clippy::let_and_return)]
12365 fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
12366 #[allow(unused_imports)]
12367 use ::buffa::Enumeration as _;
12368 let mut size = 0u32;
12369 if !self.tx_hash.is_empty() {
12370 size
12371 += 1u32
12372 + ::buffa::types::string_encoded_len(&self.tx_hash) as u32;
12373 }
12374 for v in &self.matches {
12375 let __slot = __cache.reserve();
12376 let inner_size = v.compute_size(__cache);
12377 __cache.set(__slot, inner_size);
12378 size
12379 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
12380 + inner_size;
12381 }
12382 if !self.next_page_token.is_empty() {
12383 size
12384 += 1u32
12385 + ::buffa::types::string_encoded_len(&self.next_page_token)
12386 as u32;
12387 }
12388 size += self.__buffa_unknown_fields.encoded_len() as u32;
12389 size
12390 }
12391 #[allow(clippy::needless_borrow)]
12392 fn write_to(
12393 &self,
12394 __cache: &mut ::buffa::SizeCache,
12395 buf: &mut impl ::buffa::bytes::BufMut,
12396 ) {
12397 #[allow(unused_imports)]
12398 use ::buffa::Enumeration as _;
12399 if !self.tx_hash.is_empty() {
12400 ::buffa::types::put_string_field(1u32, &self.tx_hash, buf);
12401 }
12402 for v in &self.matches {
12403 ::buffa::types::put_len_delimited_header(
12404 2u32,
12405 __cache.consume_next(),
12406 buf,
12407 );
12408 v.write_to(__cache, buf);
12409 }
12410 if !self.next_page_token.is_empty() {
12411 ::buffa::types::put_string_field(3u32, &self.next_page_token, buf);
12412 }
12413 self.__buffa_unknown_fields.write_to(buf);
12414 }
12415 }
12416 impl<'__a> ::serde::Serialize for ListFlowsByTxResponseView<'__a> {
12428 fn serialize<__S: ::serde::Serializer>(
12429 &self,
12430 __s: __S,
12431 ) -> ::core::result::Result<__S::Ok, __S::Error> {
12432 use ::serde::ser::SerializeMap as _;
12433 let mut __map = __s.serialize_map(::core::option::Option::None)?;
12434 if !::buffa::json_helpers::skip_if::is_empty_str(self.tx_hash) {
12435 __map.serialize_entry("txHash", self.tx_hash)?;
12436 }
12437 if !self.matches.is_empty() {
12438 __map.serialize_entry("matches", &*self.matches)?;
12439 }
12440 if !::buffa::json_helpers::skip_if::is_empty_str(self.next_page_token) {
12441 __map.serialize_entry("nextPageToken", self.next_page_token)?;
12442 }
12443 __map.end()
12444 }
12445 }
12446 impl<'a> ::buffa::MessageName for ListFlowsByTxResponseView<'a> {
12447 const PACKAGE: &'static str = "chain.lifecycle.v1";
12448 const NAME: &'static str = "ListFlowsByTxResponse";
12449 const FULL_NAME: &'static str = "chain.lifecycle.v1.ListFlowsByTxResponse";
12450 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.ListFlowsByTxResponse";
12451 }
12452 ::buffa::impl_default_view_instance!(ListFlowsByTxResponseView);
12453 ::buffa::impl_view_reborrow!(ListFlowsByTxResponseView);
12454 #[derive(Clone, Debug)]
12460 pub struct ListFlowsByTxResponseOwnedView(
12461 ::buffa::OwnedView<ListFlowsByTxResponseView<'static>>,
12462 );
12463 impl ListFlowsByTxResponseOwnedView {
12464 pub fn decode(
12474 bytes: ::buffa::bytes::Bytes,
12475 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12476 ::core::result::Result::Ok(
12477 ListFlowsByTxResponseOwnedView(::buffa::OwnedView::decode(bytes)?),
12478 )
12479 }
12480 pub fn decode_with_options(
12488 bytes: ::buffa::bytes::Bytes,
12489 opts: &::buffa::DecodeOptions,
12490 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12491 ::core::result::Result::Ok(
12492 ListFlowsByTxResponseOwnedView(
12493 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
12494 ),
12495 )
12496 }
12497 pub fn from_owned(
12504 msg: &super::super::ListFlowsByTxResponse,
12505 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12506 ::core::result::Result::Ok(
12507 ListFlowsByTxResponseOwnedView(::buffa::OwnedView::from_owned(msg)?),
12508 )
12509 }
12510 #[must_use]
12512 pub fn view(&self) -> &ListFlowsByTxResponseView<'_> {
12513 self.0.reborrow()
12514 }
12515 pub fn to_owned_message(
12522 &self,
12523 ) -> ::core::result::Result<
12524 super::super::ListFlowsByTxResponse,
12525 ::buffa::DecodeError,
12526 > {
12527 self.0.to_owned_message()
12528 }
12529 #[must_use]
12531 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
12532 self.0.bytes()
12533 }
12534 #[must_use]
12536 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
12537 self.0.into_bytes()
12538 }
12539 #[must_use]
12543 pub fn tx_hash(&self) -> &'_ str {
12544 self.0.reborrow().tx_hash
12545 }
12546 #[must_use]
12551 pub fn matches(
12552 &self,
12553 ) -> &::buffa::RepeatedView<
12554 '_,
12555 super::super::__buffa::view::FlowTxMatchViewView<'_>,
12556 > {
12557 &self.0.reborrow().matches
12558 }
12559 #[must_use]
12563 pub fn next_page_token(&self) -> &'_ str {
12564 self.0.reborrow().next_page_token
12565 }
12566 }
12567 impl ::core::convert::From<
12568 ::buffa::OwnedView<ListFlowsByTxResponseView<'static>>,
12569 > for ListFlowsByTxResponseOwnedView {
12570 fn from(
12571 inner: ::buffa::OwnedView<ListFlowsByTxResponseView<'static>>,
12572 ) -> Self {
12573 ListFlowsByTxResponseOwnedView(inner)
12574 }
12575 }
12576 impl ::core::convert::From<ListFlowsByTxResponseOwnedView>
12577 for ::buffa::OwnedView<ListFlowsByTxResponseView<'static>> {
12578 fn from(wrapper: ListFlowsByTxResponseOwnedView) -> Self {
12579 wrapper.0
12580 }
12581 }
12582 impl ::core::convert::AsRef<
12583 ::buffa::OwnedView<ListFlowsByTxResponseView<'static>>,
12584 > for ListFlowsByTxResponseOwnedView {
12585 fn as_ref(&self) -> &::buffa::OwnedView<ListFlowsByTxResponseView<'static>> {
12586 &self.0
12587 }
12588 }
12589 impl ::buffa::HasMessageView for super::super::ListFlowsByTxResponse {
12590 type View<'a> = ListFlowsByTxResponseView<'a>;
12591 type ViewHandle = ListFlowsByTxResponseOwnedView;
12592 }
12593 impl ::serde::Serialize for ListFlowsByTxResponseOwnedView {
12594 fn serialize<__S: ::serde::Serializer>(
12595 &self,
12596 __s: __S,
12597 ) -> ::core::result::Result<__S::Ok, __S::Error> {
12598 ::serde::Serialize::serialize(&self.0, __s)
12599 }
12600 }
12601 #[derive(Clone, Debug, Default)]
12604 pub struct FlowSummaryViewView<'a> {
12605 pub owner_account_id: u64,
12609 pub smart_account_address: &'a str,
12615 pub flow_id: &'a str,
12619 pub flow_kind: ::buffa::EnumValue<super::super::FlowKind>,
12623 pub current_step: ::buffa::EnumValue<super::super::FlowStep>,
12628 pub asset_ids: ::buffa::MessageFieldView<
12632 super::super::__buffa::view::AssetIdsView<'a>,
12633 >,
12634 pub polyester_chain_id: u32,
12638 pub amount_e18: ::buffa::MessageFieldView<
12645 super::super::super::super::super::polyester::r#type::v1::__buffa::view::U128View<
12646 'a,
12647 >,
12648 >,
12649 pub request_fee: ::buffa::MessageFieldView<
12654 super::super::__buffa::view::RequestFeeView<'a>,
12655 >,
12656 pub source_tx_hash: &'a str,
12660 pub tx_occurrence_index: u64,
12666 pub source_address: &'a str,
12671 pub destination_address: &'a str,
12676 pub latest_tx_ref: &'a str,
12680 pub source_domain: ::buffa::EnumValue<super::super::FlowDomain>,
12685 pub destination_domain: ::buffa::EnumValue<super::super::FlowDomain>,
12690 pub latest_lifecycle_source: ::buffa::EnumValue<
12695 super::super::LifecycleSource,
12696 >,
12697 pub lifecycle_reason: ::buffa::EnumValue<super::super::LifecycleReason>,
12701 pub zipper_reason: ::buffa::MessageFieldView<
12705 super::super::super::super::zipper::v1::__buffa::view::ZipperReasonDetailsView<
12706 'a,
12707 >,
12708 >,
12709 pub started_at_unix_ms: u64,
12713 pub updated_at_unix_ms: u64,
12717 pub terminal_at_unix_ms: u64,
12721 pub last_activity_at_unix_ms: u64,
12725 pub is_open: bool,
12729 pub is_terminal: bool,
12733 pub current_step_sequence: u32,
12737 pub current_progress: ::buffa::MessageFieldView<
12741 super::super::__buffa::view::FlowSummaryProgressViewView<'a>,
12742 >,
12743 pub progress_timeline: ::buffa::RepeatedView<
12748 'a,
12749 super::super::__buffa::view::FlowTimelineItemViewView<'a>,
12750 >,
12751 pub estimated_completion_unix_ms: u64,
12755 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
12756 }
12757 impl<'a> ::buffa::MessageView<'a> for FlowSummaryViewView<'a> {
12758 type Owned = super::super::FlowSummaryView;
12759 fn decode_view(
12760 buf: &'a [u8],
12761 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12762 let __limit = ::core::cell::Cell::new(
12763 ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
12764 );
12765 <Self as ::buffa::MessageView>::decode_view_ctx(
12766 buf,
12767 ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
12768 )
12769 }
12770 fn decode_view_with_ctx(
12771 buf: &'a [u8],
12772 ctx: ::buffa::DecodeContext<'_>,
12773 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
12774 <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
12775 }
12776 fn merge_view_field(
12777 &mut self,
12778 tag: ::buffa::encoding::Tag,
12779 cur: &'a [u8],
12780 before_tag: &'a [u8],
12781 ctx: ::buffa::DecodeContext<'_>,
12782 ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
12783 let _ = ctx;
12784 #[allow(unused_variables)]
12785 let view = self;
12786 let mut cur = cur;
12787 match tag.field_number() {
12788 1u32 => {
12789 ::buffa::encoding::check_wire_type(
12790 tag,
12791 ::buffa::encoding::WireType::Fixed64,
12792 )?;
12793 view.owner_account_id = ::buffa::types::decode_fixed64(
12794 &mut cur,
12795 )?;
12796 }
12797 34u32 => {
12798 ::buffa::encoding::check_wire_type(
12799 tag,
12800 ::buffa::encoding::WireType::LengthDelimited,
12801 )?;
12802 view.smart_account_address = ::buffa::types::borrow_str(
12803 &mut cur,
12804 )?;
12805 }
12806 33u32 => {
12807 ::buffa::encoding::check_wire_type(
12808 tag,
12809 ::buffa::encoding::WireType::LengthDelimited,
12810 )?;
12811 view.flow_id = ::buffa::types::borrow_str(&mut cur)?;
12812 }
12813 4u32 => {
12814 ::buffa::encoding::check_wire_type(
12815 tag,
12816 ::buffa::encoding::WireType::Varint,
12817 )?;
12818 view.flow_kind = ::buffa::EnumValue::from(
12819 ::buffa::types::decode_int32(&mut cur)?,
12820 );
12821 }
12822 6u32 => {
12823 ::buffa::encoding::check_wire_type(
12824 tag,
12825 ::buffa::encoding::WireType::Varint,
12826 )?;
12827 view.current_step = ::buffa::EnumValue::from(
12828 ::buffa::types::decode_int32(&mut cur)?,
12829 );
12830 }
12831 7u32 => {
12832 ::buffa::encoding::check_wire_type(
12833 tag,
12834 ::buffa::encoding::WireType::LengthDelimited,
12835 )?;
12836 let __sub_ctx = ctx.descend()?;
12837 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
12838 match view.asset_ids.as_mut() {
12839 Some(existing) => {
12840 ::buffa::MessageView::merge_into_view(
12841 existing,
12842 sub,
12843 __sub_ctx,
12844 )?
12845 }
12846 None => {
12847 view.asset_ids = ::buffa::MessageFieldView::set(
12848 <super::super::__buffa::view::AssetIdsView as ::buffa::MessageView>::decode_view_ctx(
12849 sub,
12850 __sub_ctx,
12851 )?,
12852 );
12853 }
12854 }
12855 }
12856 8u32 => {
12857 ::buffa::encoding::check_wire_type(
12858 tag,
12859 ::buffa::encoding::WireType::Varint,
12860 )?;
12861 view.polyester_chain_id = ::buffa::types::decode_uint32(
12862 &mut cur,
12863 )?;
12864 }
12865 9u32 => {
12866 ::buffa::encoding::check_wire_type(
12867 tag,
12868 ::buffa::encoding::WireType::LengthDelimited,
12869 )?;
12870 let __sub_ctx = ctx.descend()?;
12871 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
12872 match view.amount_e18.as_mut() {
12873 Some(existing) => {
12874 ::buffa::MessageView::merge_into_view(
12875 existing,
12876 sub,
12877 __sub_ctx,
12878 )?
12879 }
12880 None => {
12881 view.amount_e18 = ::buffa::MessageFieldView::set(
12882 <super::super::super::super::super::polyester::r#type::v1::__buffa::view::U128View as ::buffa::MessageView>::decode_view_ctx(
12883 sub,
12884 __sub_ctx,
12885 )?,
12886 );
12887 }
12888 }
12889 }
12890 28u32 => {
12891 ::buffa::encoding::check_wire_type(
12892 tag,
12893 ::buffa::encoding::WireType::LengthDelimited,
12894 )?;
12895 let __sub_ctx = ctx.descend()?;
12896 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
12897 match view.request_fee.as_mut() {
12898 Some(existing) => {
12899 ::buffa::MessageView::merge_into_view(
12900 existing,
12901 sub,
12902 __sub_ctx,
12903 )?
12904 }
12905 None => {
12906 view.request_fee = ::buffa::MessageFieldView::set(
12907 <super::super::__buffa::view::RequestFeeView as ::buffa::MessageView>::decode_view_ctx(
12908 sub,
12909 __sub_ctx,
12910 )?,
12911 );
12912 }
12913 }
12914 }
12915 11u32 => {
12916 ::buffa::encoding::check_wire_type(
12917 tag,
12918 ::buffa::encoding::WireType::LengthDelimited,
12919 )?;
12920 view.source_tx_hash = ::buffa::types::borrow_str(&mut cur)?;
12921 }
12922 32u32 => {
12923 ::buffa::encoding::check_wire_type(
12924 tag,
12925 ::buffa::encoding::WireType::Varint,
12926 )?;
12927 view.tx_occurrence_index = ::buffa::types::decode_uint64(
12928 &mut cur,
12929 )?;
12930 }
12931 13u32 => {
12932 ::buffa::encoding::check_wire_type(
12933 tag,
12934 ::buffa::encoding::WireType::LengthDelimited,
12935 )?;
12936 view.source_address = ::buffa::types::borrow_str(&mut cur)?;
12937 }
12938 14u32 => {
12939 ::buffa::encoding::check_wire_type(
12940 tag,
12941 ::buffa::encoding::WireType::LengthDelimited,
12942 )?;
12943 view.destination_address = ::buffa::types::borrow_str(&mut cur)?;
12944 }
12945 15u32 => {
12946 ::buffa::encoding::check_wire_type(
12947 tag,
12948 ::buffa::encoding::WireType::LengthDelimited,
12949 )?;
12950 view.latest_tx_ref = ::buffa::types::borrow_str(&mut cur)?;
12951 }
12952 29u32 => {
12953 ::buffa::encoding::check_wire_type(
12954 tag,
12955 ::buffa::encoding::WireType::Varint,
12956 )?;
12957 view.source_domain = ::buffa::EnumValue::from(
12958 ::buffa::types::decode_int32(&mut cur)?,
12959 );
12960 }
12961 30u32 => {
12962 ::buffa::encoding::check_wire_type(
12963 tag,
12964 ::buffa::encoding::WireType::Varint,
12965 )?;
12966 view.destination_domain = ::buffa::EnumValue::from(
12967 ::buffa::types::decode_int32(&mut cur)?,
12968 );
12969 }
12970 16u32 => {
12971 ::buffa::encoding::check_wire_type(
12972 tag,
12973 ::buffa::encoding::WireType::Varint,
12974 )?;
12975 view.latest_lifecycle_source = ::buffa::EnumValue::from(
12976 ::buffa::types::decode_int32(&mut cur)?,
12977 );
12978 }
12979 17u32 => {
12980 ::buffa::encoding::check_wire_type(
12981 tag,
12982 ::buffa::encoding::WireType::Varint,
12983 )?;
12984 view.lifecycle_reason = ::buffa::EnumValue::from(
12985 ::buffa::types::decode_int32(&mut cur)?,
12986 );
12987 }
12988 35u32 => {
12989 ::buffa::encoding::check_wire_type(
12990 tag,
12991 ::buffa::encoding::WireType::LengthDelimited,
12992 )?;
12993 let __sub_ctx = ctx.descend()?;
12994 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
12995 match view.zipper_reason.as_mut() {
12996 Some(existing) => {
12997 ::buffa::MessageView::merge_into_view(
12998 existing,
12999 sub,
13000 __sub_ctx,
13001 )?
13002 }
13003 None => {
13004 view.zipper_reason = ::buffa::MessageFieldView::set(
13005 <super::super::super::super::zipper::v1::__buffa::view::ZipperReasonDetailsView as ::buffa::MessageView>::decode_view_ctx(
13006 sub,
13007 __sub_ctx,
13008 )?,
13009 );
13010 }
13011 }
13012 }
13013 18u32 => {
13014 ::buffa::encoding::check_wire_type(
13015 tag,
13016 ::buffa::encoding::WireType::Varint,
13017 )?;
13018 view.started_at_unix_ms = ::buffa::types::decode_uint64(
13019 &mut cur,
13020 )?;
13021 }
13022 19u32 => {
13023 ::buffa::encoding::check_wire_type(
13024 tag,
13025 ::buffa::encoding::WireType::Varint,
13026 )?;
13027 view.updated_at_unix_ms = ::buffa::types::decode_uint64(
13028 &mut cur,
13029 )?;
13030 }
13031 20u32 => {
13032 ::buffa::encoding::check_wire_type(
13033 tag,
13034 ::buffa::encoding::WireType::Varint,
13035 )?;
13036 view.terminal_at_unix_ms = ::buffa::types::decode_uint64(
13037 &mut cur,
13038 )?;
13039 }
13040 21u32 => {
13041 ::buffa::encoding::check_wire_type(
13042 tag,
13043 ::buffa::encoding::WireType::Varint,
13044 )?;
13045 view.last_activity_at_unix_ms = ::buffa::types::decode_uint64(
13046 &mut cur,
13047 )?;
13048 }
13049 22u32 => {
13050 ::buffa::encoding::check_wire_type(
13051 tag,
13052 ::buffa::encoding::WireType::Varint,
13053 )?;
13054 view.is_open = ::buffa::types::decode_bool(&mut cur)?;
13055 }
13056 23u32 => {
13057 ::buffa::encoding::check_wire_type(
13058 tag,
13059 ::buffa::encoding::WireType::Varint,
13060 )?;
13061 view.is_terminal = ::buffa::types::decode_bool(&mut cur)?;
13062 }
13063 24u32 => {
13064 ::buffa::encoding::check_wire_type(
13065 tag,
13066 ::buffa::encoding::WireType::Varint,
13067 )?;
13068 view.current_step_sequence = ::buffa::types::decode_uint32(
13069 &mut cur,
13070 )?;
13071 }
13072 25u32 => {
13073 ::buffa::encoding::check_wire_type(
13074 tag,
13075 ::buffa::encoding::WireType::LengthDelimited,
13076 )?;
13077 let __sub_ctx = ctx.descend()?;
13078 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
13079 match view.current_progress.as_mut() {
13080 Some(existing) => {
13081 ::buffa::MessageView::merge_into_view(
13082 existing,
13083 sub,
13084 __sub_ctx,
13085 )?
13086 }
13087 None => {
13088 view.current_progress = ::buffa::MessageFieldView::set(
13089 <super::super::__buffa::view::FlowSummaryProgressViewView as ::buffa::MessageView>::decode_view_ctx(
13090 sub,
13091 __sub_ctx,
13092 )?,
13093 );
13094 }
13095 }
13096 }
13097 27u32 => {
13098 ::buffa::encoding::check_wire_type(
13099 tag,
13100 ::buffa::encoding::WireType::Varint,
13101 )?;
13102 view.estimated_completion_unix_ms = ::buffa::types::decode_uint64(
13103 &mut cur,
13104 )?;
13105 }
13106 26u32 => {
13107 ::buffa::encoding::check_wire_type(
13108 tag,
13109 ::buffa::encoding::WireType::LengthDelimited,
13110 )?;
13111 let __sub_ctx = ctx.descend()?;
13112 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
13113 view.progress_timeline
13114 .push(
13115 <super::super::__buffa::view::FlowTimelineItemViewView as ::buffa::MessageView>::decode_view_ctx(
13116 sub,
13117 __sub_ctx,
13118 )?,
13119 );
13120 }
13121 _ => {
13122 ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
13123 let span_len = before_tag.len() - cur.len();
13124 view.__buffa_unknown_fields
13125 .push_record(before_tag, span_len, ctx)?;
13126 }
13127 }
13128 ::core::result::Result::Ok(cur)
13129 }
13130 fn to_owned_message(
13131 &self,
13132 ) -> ::core::result::Result<
13133 super::super::FlowSummaryView,
13134 ::buffa::DecodeError,
13135 > {
13136 self.to_owned_from_source(None)
13137 }
13138 #[allow(clippy::useless_conversion, clippy::needless_update)]
13139 fn to_owned_from_source(
13140 &self,
13141 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
13142 ) -> ::core::result::Result<
13143 super::super::FlowSummaryView,
13144 ::buffa::DecodeError,
13145 > {
13146 #[allow(unused_imports)]
13147 use ::buffa::alloc::string::ToString as _;
13148 let _ = __buffa_src;
13149 ::core::result::Result::Ok(super::super::FlowSummaryView {
13150 owner_account_id: self.owner_account_id,
13151 smart_account_address: self.smart_account_address.to_string(),
13152 flow_id: self.flow_id.to_string(),
13153 flow_kind: self.flow_kind,
13154 current_step: self.current_step,
13155 asset_ids: match self.asset_ids.as_option() {
13156 Some(v) => {
13157 ::buffa::MessageField::<
13158 super::super::AssetIds,
13159 >::some(v.to_owned_from_source(__buffa_src)?)
13160 }
13161 None => ::buffa::MessageField::none(),
13162 },
13163 polyester_chain_id: self.polyester_chain_id,
13164 amount_e18: match self.amount_e18.as_option() {
13165 Some(v) => {
13166 ::buffa::MessageField::<
13167 super::super::super::super::super::polyester::r#type::v1::U128,
13168 >::some(v.to_owned_from_source(__buffa_src)?)
13169 }
13170 None => ::buffa::MessageField::none(),
13171 },
13172 request_fee: match self.request_fee.as_option() {
13173 Some(v) => {
13174 ::buffa::MessageField::<
13175 super::super::RequestFee,
13176 >::some(v.to_owned_from_source(__buffa_src)?)
13177 }
13178 None => ::buffa::MessageField::none(),
13179 },
13180 source_tx_hash: self.source_tx_hash.to_string(),
13181 tx_occurrence_index: self.tx_occurrence_index,
13182 source_address: self.source_address.to_string(),
13183 destination_address: self.destination_address.to_string(),
13184 latest_tx_ref: self.latest_tx_ref.to_string(),
13185 source_domain: self.source_domain,
13186 destination_domain: self.destination_domain,
13187 latest_lifecycle_source: self.latest_lifecycle_source,
13188 lifecycle_reason: self.lifecycle_reason,
13189 zipper_reason: match self.zipper_reason.as_option() {
13190 Some(v) => {
13191 ::buffa::MessageField::<
13192 super::super::super::super::zipper::v1::ZipperReasonDetails,
13193 >::some(v.to_owned_from_source(__buffa_src)?)
13194 }
13195 None => ::buffa::MessageField::none(),
13196 },
13197 started_at_unix_ms: self.started_at_unix_ms,
13198 updated_at_unix_ms: self.updated_at_unix_ms,
13199 terminal_at_unix_ms: self.terminal_at_unix_ms,
13200 last_activity_at_unix_ms: self.last_activity_at_unix_ms,
13201 is_open: self.is_open,
13202 is_terminal: self.is_terminal,
13203 current_step_sequence: self.current_step_sequence,
13204 current_progress: match self.current_progress.as_option() {
13205 Some(v) => {
13206 ::buffa::MessageField::<
13207 super::super::FlowSummaryProgressView,
13208 >::some(v.to_owned_from_source(__buffa_src)?)
13209 }
13210 None => ::buffa::MessageField::none(),
13211 },
13212 progress_timeline: self
13213 .progress_timeline
13214 .iter()
13215 .map(|v| v.to_owned_from_source(__buffa_src))
13216 .collect::<::core::result::Result<_, ::buffa::DecodeError>>()?,
13217 estimated_completion_unix_ms: self.estimated_completion_unix_ms,
13218 __buffa_unknown_fields: self
13219 .__buffa_unknown_fields
13220 .to_owned()?
13221 .into(),
13222 ..::core::default::Default::default()
13223 })
13224 }
13225 }
13226 impl<'a> ::buffa::ViewEncode<'a> for FlowSummaryViewView<'a> {
13227 #[allow(clippy::needless_borrow, clippy::let_and_return)]
13228 fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
13229 #[allow(unused_imports)]
13230 use ::buffa::Enumeration as _;
13231 let mut size = 0u32;
13232 if self.owner_account_id != 0u64 {
13233 size += 1u32 + ::buffa::types::FIXED64_ENCODED_LEN as u32;
13234 }
13235 {
13236 let val = self.flow_kind.to_i32();
13237 if val != 0 {
13238 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
13239 }
13240 }
13241 {
13242 let val = self.current_step.to_i32();
13243 if val != 0 {
13244 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
13245 }
13246 }
13247 if self.asset_ids.is_set() {
13248 let __slot = __cache.reserve();
13249 let inner_size = self.asset_ids.compute_size(__cache);
13250 __cache.set(__slot, inner_size);
13251 size
13252 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
13253 + inner_size;
13254 }
13255 if self.polyester_chain_id != 0u32 {
13256 size
13257 += 1u32
13258 + ::buffa::types::uint32_encoded_len(self.polyester_chain_id)
13259 as u32;
13260 }
13261 if self.amount_e18.is_set() {
13262 let __slot = __cache.reserve();
13263 let inner_size = self.amount_e18.compute_size(__cache);
13264 __cache.set(__slot, inner_size);
13265 size
13266 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
13267 + inner_size;
13268 }
13269 if !self.source_tx_hash.is_empty() {
13270 size
13271 += 1u32
13272 + ::buffa::types::string_encoded_len(&self.source_tx_hash)
13273 as u32;
13274 }
13275 if !self.source_address.is_empty() {
13276 size
13277 += 1u32
13278 + ::buffa::types::string_encoded_len(&self.source_address)
13279 as u32;
13280 }
13281 if !self.destination_address.is_empty() {
13282 size
13283 += 1u32
13284 + ::buffa::types::string_encoded_len(
13285 &self.destination_address,
13286 ) as u32;
13287 }
13288 if !self.latest_tx_ref.is_empty() {
13289 size
13290 += 1u32
13291 + ::buffa::types::string_encoded_len(&self.latest_tx_ref)
13292 as u32;
13293 }
13294 {
13295 let val = self.latest_lifecycle_source.to_i32();
13296 if val != 0 {
13297 size += 2u32 + ::buffa::types::int32_encoded_len(val) as u32;
13298 }
13299 }
13300 {
13301 let val = self.lifecycle_reason.to_i32();
13302 if val != 0 {
13303 size += 2u32 + ::buffa::types::int32_encoded_len(val) as u32;
13304 }
13305 }
13306 if self.started_at_unix_ms != 0u64 {
13307 size
13308 += 2u32
13309 + ::buffa::types::uint64_encoded_len(self.started_at_unix_ms)
13310 as u32;
13311 }
13312 if self.updated_at_unix_ms != 0u64 {
13313 size
13314 += 2u32
13315 + ::buffa::types::uint64_encoded_len(self.updated_at_unix_ms)
13316 as u32;
13317 }
13318 if self.terminal_at_unix_ms != 0u64 {
13319 size
13320 += 2u32
13321 + ::buffa::types::uint64_encoded_len(
13322 self.terminal_at_unix_ms,
13323 ) as u32;
13324 }
13325 if self.last_activity_at_unix_ms != 0u64 {
13326 size
13327 += 2u32
13328 + ::buffa::types::uint64_encoded_len(
13329 self.last_activity_at_unix_ms,
13330 ) as u32;
13331 }
13332 if self.is_open {
13333 size += 2u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
13334 }
13335 if self.is_terminal {
13336 size += 2u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
13337 }
13338 if self.current_step_sequence != 0u32 {
13339 size
13340 += 2u32
13341 + ::buffa::types::uint32_encoded_len(
13342 self.current_step_sequence,
13343 ) as u32;
13344 }
13345 if self.current_progress.is_set() {
13346 let __slot = __cache.reserve();
13347 let inner_size = self.current_progress.compute_size(__cache);
13348 __cache.set(__slot, inner_size);
13349 size
13350 += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
13351 + inner_size;
13352 }
13353 for v in &self.progress_timeline {
13354 let __slot = __cache.reserve();
13355 let inner_size = v.compute_size(__cache);
13356 __cache.set(__slot, inner_size);
13357 size
13358 += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
13359 + inner_size;
13360 }
13361 if self.estimated_completion_unix_ms != 0u64 {
13362 size
13363 += 2u32
13364 + ::buffa::types::uint64_encoded_len(
13365 self.estimated_completion_unix_ms,
13366 ) as u32;
13367 }
13368 if self.request_fee.is_set() {
13369 let __slot = __cache.reserve();
13370 let inner_size = self.request_fee.compute_size(__cache);
13371 __cache.set(__slot, inner_size);
13372 size
13373 += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
13374 + inner_size;
13375 }
13376 {
13377 let val = self.source_domain.to_i32();
13378 if val != 0 {
13379 size += 2u32 + ::buffa::types::int32_encoded_len(val) as u32;
13380 }
13381 }
13382 {
13383 let val = self.destination_domain.to_i32();
13384 if val != 0 {
13385 size += 2u32 + ::buffa::types::int32_encoded_len(val) as u32;
13386 }
13387 }
13388 if self.tx_occurrence_index != 0u64 {
13389 size
13390 += 2u32
13391 + ::buffa::types::uint64_encoded_len(
13392 self.tx_occurrence_index,
13393 ) as u32;
13394 }
13395 if !self.flow_id.is_empty() {
13396 size
13397 += 2u32
13398 + ::buffa::types::string_encoded_len(&self.flow_id) as u32;
13399 }
13400 if !self.smart_account_address.is_empty() {
13401 size
13402 += 2u32
13403 + ::buffa::types::string_encoded_len(
13404 &self.smart_account_address,
13405 ) as u32;
13406 }
13407 if self.zipper_reason.is_set() {
13408 let __slot = __cache.reserve();
13409 let inner_size = self.zipper_reason.compute_size(__cache);
13410 __cache.set(__slot, inner_size);
13411 size
13412 += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
13413 + inner_size;
13414 }
13415 size += self.__buffa_unknown_fields.encoded_len() as u32;
13416 size
13417 }
13418 #[allow(clippy::needless_borrow)]
13419 fn write_to(
13420 &self,
13421 __cache: &mut ::buffa::SizeCache,
13422 buf: &mut impl ::buffa::bytes::BufMut,
13423 ) {
13424 #[allow(unused_imports)]
13425 use ::buffa::Enumeration as _;
13426 if self.owner_account_id != 0u64 {
13427 ::buffa::types::put_fixed64_field(1u32, self.owner_account_id, buf);
13428 }
13429 {
13430 let val = self.flow_kind.to_i32();
13431 if val != 0 {
13432 ::buffa::types::put_int32_field(4u32, val, buf);
13433 }
13434 }
13435 {
13436 let val = self.current_step.to_i32();
13437 if val != 0 {
13438 ::buffa::types::put_int32_field(6u32, val, buf);
13439 }
13440 }
13441 if self.asset_ids.is_set() {
13442 ::buffa::types::put_len_delimited_header(
13443 7u32,
13444 __cache.consume_next(),
13445 buf,
13446 );
13447 self.asset_ids.write_to(__cache, buf);
13448 }
13449 if self.polyester_chain_id != 0u32 {
13450 ::buffa::types::put_uint32_field(8u32, self.polyester_chain_id, buf);
13451 }
13452 if self.amount_e18.is_set() {
13453 ::buffa::types::put_len_delimited_header(
13454 9u32,
13455 __cache.consume_next(),
13456 buf,
13457 );
13458 self.amount_e18.write_to(__cache, buf);
13459 }
13460 if !self.source_tx_hash.is_empty() {
13461 ::buffa::types::put_string_field(11u32, &self.source_tx_hash, buf);
13462 }
13463 if !self.source_address.is_empty() {
13464 ::buffa::types::put_string_field(13u32, &self.source_address, buf);
13465 }
13466 if !self.destination_address.is_empty() {
13467 ::buffa::types::put_string_field(
13468 14u32,
13469 &self.destination_address,
13470 buf,
13471 );
13472 }
13473 if !self.latest_tx_ref.is_empty() {
13474 ::buffa::types::put_string_field(15u32, &self.latest_tx_ref, buf);
13475 }
13476 {
13477 let val = self.latest_lifecycle_source.to_i32();
13478 if val != 0 {
13479 ::buffa::types::put_int32_field(16u32, val, buf);
13480 }
13481 }
13482 {
13483 let val = self.lifecycle_reason.to_i32();
13484 if val != 0 {
13485 ::buffa::types::put_int32_field(17u32, val, buf);
13486 }
13487 }
13488 if self.started_at_unix_ms != 0u64 {
13489 ::buffa::types::put_uint64_field(
13490 18u32,
13491 self.started_at_unix_ms,
13492 buf,
13493 );
13494 }
13495 if self.updated_at_unix_ms != 0u64 {
13496 ::buffa::types::put_uint64_field(
13497 19u32,
13498 self.updated_at_unix_ms,
13499 buf,
13500 );
13501 }
13502 if self.terminal_at_unix_ms != 0u64 {
13503 ::buffa::types::put_uint64_field(
13504 20u32,
13505 self.terminal_at_unix_ms,
13506 buf,
13507 );
13508 }
13509 if self.last_activity_at_unix_ms != 0u64 {
13510 ::buffa::types::put_uint64_field(
13511 21u32,
13512 self.last_activity_at_unix_ms,
13513 buf,
13514 );
13515 }
13516 if self.is_open {
13517 ::buffa::types::put_bool_field(22u32, self.is_open, buf);
13518 }
13519 if self.is_terminal {
13520 ::buffa::types::put_bool_field(23u32, self.is_terminal, buf);
13521 }
13522 if self.current_step_sequence != 0u32 {
13523 ::buffa::types::put_uint32_field(
13524 24u32,
13525 self.current_step_sequence,
13526 buf,
13527 );
13528 }
13529 if self.current_progress.is_set() {
13530 ::buffa::types::put_len_delimited_header(
13531 25u32,
13532 __cache.consume_next(),
13533 buf,
13534 );
13535 self.current_progress.write_to(__cache, buf);
13536 }
13537 for v in &self.progress_timeline {
13538 ::buffa::types::put_len_delimited_header(
13539 26u32,
13540 __cache.consume_next(),
13541 buf,
13542 );
13543 v.write_to(__cache, buf);
13544 }
13545 if self.estimated_completion_unix_ms != 0u64 {
13546 ::buffa::types::put_uint64_field(
13547 27u32,
13548 self.estimated_completion_unix_ms,
13549 buf,
13550 );
13551 }
13552 if self.request_fee.is_set() {
13553 ::buffa::types::put_len_delimited_header(
13554 28u32,
13555 __cache.consume_next(),
13556 buf,
13557 );
13558 self.request_fee.write_to(__cache, buf);
13559 }
13560 {
13561 let val = self.source_domain.to_i32();
13562 if val != 0 {
13563 ::buffa::types::put_int32_field(29u32, val, buf);
13564 }
13565 }
13566 {
13567 let val = self.destination_domain.to_i32();
13568 if val != 0 {
13569 ::buffa::types::put_int32_field(30u32, val, buf);
13570 }
13571 }
13572 if self.tx_occurrence_index != 0u64 {
13573 ::buffa::types::put_uint64_field(
13574 32u32,
13575 self.tx_occurrence_index,
13576 buf,
13577 );
13578 }
13579 if !self.flow_id.is_empty() {
13580 ::buffa::types::put_string_field(33u32, &self.flow_id, buf);
13581 }
13582 if !self.smart_account_address.is_empty() {
13583 ::buffa::types::put_string_field(
13584 34u32,
13585 &self.smart_account_address,
13586 buf,
13587 );
13588 }
13589 if self.zipper_reason.is_set() {
13590 ::buffa::types::put_len_delimited_header(
13591 35u32,
13592 __cache.consume_next(),
13593 buf,
13594 );
13595 self.zipper_reason.write_to(__cache, buf);
13596 }
13597 self.__buffa_unknown_fields.write_to(buf);
13598 }
13599 }
13600 impl<'__a> ::serde::Serialize for FlowSummaryViewView<'__a> {
13612 fn serialize<__S: ::serde::Serializer>(
13613 &self,
13614 __s: __S,
13615 ) -> ::core::result::Result<__S::Ok, __S::Error> {
13616 use ::serde::ser::SerializeMap as _;
13617 let mut __map = __s.serialize_map(::core::option::Option::None)?;
13618 if !::buffa::json_helpers::skip_if::is_zero_u64(&self.owner_account_id) {
13619 __map
13620 .serialize_entry(
13621 "ownerAccountId",
13622 &::buffa::json_helpers::ProtoJson(&self.owner_account_id),
13623 )?;
13624 }
13625 if !::buffa::json_helpers::skip_if::is_empty_str(
13626 self.smart_account_address,
13627 ) {
13628 __map
13629 .serialize_entry(
13630 "smartAccountAddress",
13631 self.smart_account_address,
13632 )?;
13633 }
13634 if !::buffa::json_helpers::skip_if::is_empty_str(self.flow_id) {
13635 __map.serialize_entry("flowId", self.flow_id)?;
13636 }
13637 if !::buffa::json_helpers::skip_if::is_default_enum_value(
13638 &self.flow_kind,
13639 ) {
13640 __map.serialize_entry("flowKind", &self.flow_kind)?;
13641 }
13642 if !::buffa::json_helpers::skip_if::is_default_enum_value(
13643 &self.current_step,
13644 ) {
13645 __map.serialize_entry("currentStep", &self.current_step)?;
13646 }
13647 {
13648 if let ::core::option::Option::Some(__v) = self.asset_ids.as_option()
13649 {
13650 __map.serialize_entry("assetIds", __v)?;
13651 }
13652 }
13653 if !::buffa::json_helpers::skip_if::is_zero_u32(
13654 &self.polyester_chain_id,
13655 ) {
13656 __map
13657 .serialize_entry(
13658 "polyesterChainId",
13659 &::buffa::json_helpers::ProtoJson(&self.polyester_chain_id),
13660 )?;
13661 }
13662 {
13663 if let ::core::option::Option::Some(__v) = self
13664 .amount_e18
13665 .as_option()
13666 {
13667 __map.serialize_entry("amountE18", __v)?;
13668 }
13669 }
13670 {
13671 if let ::core::option::Option::Some(__v) = self
13672 .request_fee
13673 .as_option()
13674 {
13675 __map.serialize_entry("requestFee", __v)?;
13676 }
13677 }
13678 if !::buffa::json_helpers::skip_if::is_empty_str(self.source_tx_hash) {
13679 __map.serialize_entry("sourceTxHash", self.source_tx_hash)?;
13680 }
13681 if !::buffa::json_helpers::skip_if::is_zero_u64(
13682 &self.tx_occurrence_index,
13683 ) {
13684 __map
13685 .serialize_entry(
13686 "txOccurrenceIndex",
13687 &::buffa::json_helpers::ProtoJson(&self.tx_occurrence_index),
13688 )?;
13689 }
13690 if !::buffa::json_helpers::skip_if::is_empty_str(self.source_address) {
13691 __map.serialize_entry("sourceAddress", self.source_address)?;
13692 }
13693 if !::buffa::json_helpers::skip_if::is_empty_str(
13694 self.destination_address,
13695 ) {
13696 __map
13697 .serialize_entry(
13698 "destinationAddress",
13699 self.destination_address,
13700 )?;
13701 }
13702 if !::buffa::json_helpers::skip_if::is_empty_str(self.latest_tx_ref) {
13703 __map.serialize_entry("latestTxRef", self.latest_tx_ref)?;
13704 }
13705 if !::buffa::json_helpers::skip_if::is_default_enum_value(
13706 &self.source_domain,
13707 ) {
13708 __map.serialize_entry("sourceDomain", &self.source_domain)?;
13709 }
13710 if !::buffa::json_helpers::skip_if::is_default_enum_value(
13711 &self.destination_domain,
13712 ) {
13713 __map
13714 .serialize_entry("destinationDomain", &self.destination_domain)?;
13715 }
13716 if !::buffa::json_helpers::skip_if::is_default_enum_value(
13717 &self.latest_lifecycle_source,
13718 ) {
13719 __map
13720 .serialize_entry(
13721 "latestLifecycleSource",
13722 &self.latest_lifecycle_source,
13723 )?;
13724 }
13725 if !::buffa::json_helpers::skip_if::is_default_enum_value(
13726 &self.lifecycle_reason,
13727 ) {
13728 __map.serialize_entry("lifecycleReason", &self.lifecycle_reason)?;
13729 }
13730 {
13731 if let ::core::option::Option::Some(__v) = self
13732 .zipper_reason
13733 .as_option()
13734 {
13735 __map.serialize_entry("zipperReason", __v)?;
13736 }
13737 }
13738 if !::buffa::json_helpers::skip_if::is_zero_u64(
13739 &self.started_at_unix_ms,
13740 ) {
13741 __map
13742 .serialize_entry(
13743 "startedAtUnixMs",
13744 &::buffa::json_helpers::ProtoJson(&self.started_at_unix_ms),
13745 )?;
13746 }
13747 if !::buffa::json_helpers::skip_if::is_zero_u64(
13748 &self.updated_at_unix_ms,
13749 ) {
13750 __map
13751 .serialize_entry(
13752 "updatedAtUnixMs",
13753 &::buffa::json_helpers::ProtoJson(&self.updated_at_unix_ms),
13754 )?;
13755 }
13756 if !::buffa::json_helpers::skip_if::is_zero_u64(
13757 &self.terminal_at_unix_ms,
13758 ) {
13759 __map
13760 .serialize_entry(
13761 "terminalAtUnixMs",
13762 &::buffa::json_helpers::ProtoJson(&self.terminal_at_unix_ms),
13763 )?;
13764 }
13765 if !::buffa::json_helpers::skip_if::is_zero_u64(
13766 &self.last_activity_at_unix_ms,
13767 ) {
13768 __map
13769 .serialize_entry(
13770 "lastActivityAtUnixMs",
13771 &::buffa::json_helpers::ProtoJson(
13772 &self.last_activity_at_unix_ms,
13773 ),
13774 )?;
13775 }
13776 if self.is_open {
13777 __map.serialize_entry("isOpen", &self.is_open)?;
13778 }
13779 if self.is_terminal {
13780 __map.serialize_entry("isTerminal", &self.is_terminal)?;
13781 }
13782 if !::buffa::json_helpers::skip_if::is_zero_u32(
13783 &self.current_step_sequence,
13784 ) {
13785 __map
13786 .serialize_entry(
13787 "currentStepSequence",
13788 &::buffa::json_helpers::ProtoJson(
13789 &self.current_step_sequence,
13790 ),
13791 )?;
13792 }
13793 {
13794 if let ::core::option::Option::Some(__v) = self
13795 .current_progress
13796 .as_option()
13797 {
13798 __map.serialize_entry("currentProgress", __v)?;
13799 }
13800 }
13801 if !self.progress_timeline.is_empty() {
13802 __map.serialize_entry("progressTimeline", &*self.progress_timeline)?;
13803 }
13804 if !::buffa::json_helpers::skip_if::is_zero_u64(
13805 &self.estimated_completion_unix_ms,
13806 ) {
13807 __map
13808 .serialize_entry(
13809 "estimatedCompletionUnixMs",
13810 &::buffa::json_helpers::ProtoJson(
13811 &self.estimated_completion_unix_ms,
13812 ),
13813 )?;
13814 }
13815 __map.end()
13816 }
13817 }
13818 impl<'a> ::buffa::MessageName for FlowSummaryViewView<'a> {
13819 const PACKAGE: &'static str = "chain.lifecycle.v1";
13820 const NAME: &'static str = "FlowSummaryView";
13821 const FULL_NAME: &'static str = "chain.lifecycle.v1.FlowSummaryView";
13822 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowSummaryView";
13823 }
13824 ::buffa::impl_default_view_instance!(FlowSummaryViewView);
13825 ::buffa::impl_view_reborrow!(FlowSummaryViewView);
13826 #[derive(Clone, Debug)]
13832 pub struct FlowSummaryViewOwnedView(
13833 ::buffa::OwnedView<FlowSummaryViewView<'static>>,
13834 );
13835 impl FlowSummaryViewOwnedView {
13836 pub fn decode(
13846 bytes: ::buffa::bytes::Bytes,
13847 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
13848 ::core::result::Result::Ok(
13849 FlowSummaryViewOwnedView(::buffa::OwnedView::decode(bytes)?),
13850 )
13851 }
13852 pub fn decode_with_options(
13860 bytes: ::buffa::bytes::Bytes,
13861 opts: &::buffa::DecodeOptions,
13862 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
13863 ::core::result::Result::Ok(
13864 FlowSummaryViewOwnedView(
13865 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
13866 ),
13867 )
13868 }
13869 pub fn from_owned(
13876 msg: &super::super::FlowSummaryView,
13877 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
13878 ::core::result::Result::Ok(
13879 FlowSummaryViewOwnedView(::buffa::OwnedView::from_owned(msg)?),
13880 )
13881 }
13882 #[must_use]
13884 pub fn view(&self) -> &FlowSummaryViewView<'_> {
13885 self.0.reborrow()
13886 }
13887 pub fn to_owned_message(
13894 &self,
13895 ) -> ::core::result::Result<
13896 super::super::FlowSummaryView,
13897 ::buffa::DecodeError,
13898 > {
13899 self.0.to_owned_message()
13900 }
13901 #[must_use]
13903 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
13904 self.0.bytes()
13905 }
13906 #[must_use]
13908 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
13909 self.0.into_bytes()
13910 }
13911 #[must_use]
13915 pub fn owner_account_id(&self) -> u64 {
13916 self.0.reborrow().owner_account_id
13917 }
13918 #[must_use]
13924 pub fn smart_account_address(&self) -> &'_ str {
13925 self.0.reborrow().smart_account_address
13926 }
13927 #[must_use]
13931 pub fn flow_id(&self) -> &'_ str {
13932 self.0.reborrow().flow_id
13933 }
13934 #[must_use]
13938 pub fn flow_kind(&self) -> ::buffa::EnumValue<super::super::FlowKind> {
13939 self.0.reborrow().flow_kind
13940 }
13941 #[must_use]
13946 pub fn current_step(&self) -> ::buffa::EnumValue<super::super::FlowStep> {
13947 self.0.reborrow().current_step
13948 }
13949 #[must_use]
13953 pub fn asset_ids(
13954 &self,
13955 ) -> &::buffa::MessageFieldView<
13956 super::super::__buffa::view::AssetIdsView<'_>,
13957 > {
13958 &self.0.reborrow().asset_ids
13959 }
13960 #[must_use]
13964 pub fn polyester_chain_id(&self) -> u32 {
13965 self.0.reborrow().polyester_chain_id
13966 }
13967 #[must_use]
13974 pub fn amount_e18(
13975 &self,
13976 ) -> &::buffa::MessageFieldView<
13977 super::super::super::super::super::polyester::r#type::v1::__buffa::view::U128View<
13978 '_,
13979 >,
13980 > {
13981 &self.0.reborrow().amount_e18
13982 }
13983 #[must_use]
13988 pub fn request_fee(
13989 &self,
13990 ) -> &::buffa::MessageFieldView<
13991 super::super::__buffa::view::RequestFeeView<'_>,
13992 > {
13993 &self.0.reborrow().request_fee
13994 }
13995 #[must_use]
13999 pub fn source_tx_hash(&self) -> &'_ str {
14000 self.0.reborrow().source_tx_hash
14001 }
14002 #[must_use]
14008 pub fn tx_occurrence_index(&self) -> u64 {
14009 self.0.reborrow().tx_occurrence_index
14010 }
14011 #[must_use]
14016 pub fn source_address(&self) -> &'_ str {
14017 self.0.reborrow().source_address
14018 }
14019 #[must_use]
14024 pub fn destination_address(&self) -> &'_ str {
14025 self.0.reborrow().destination_address
14026 }
14027 #[must_use]
14031 pub fn latest_tx_ref(&self) -> &'_ str {
14032 self.0.reborrow().latest_tx_ref
14033 }
14034 #[must_use]
14039 pub fn source_domain(&self) -> ::buffa::EnumValue<super::super::FlowDomain> {
14040 self.0.reborrow().source_domain
14041 }
14042 #[must_use]
14047 pub fn destination_domain(
14048 &self,
14049 ) -> ::buffa::EnumValue<super::super::FlowDomain> {
14050 self.0.reborrow().destination_domain
14051 }
14052 #[must_use]
14057 pub fn latest_lifecycle_source(
14058 &self,
14059 ) -> ::buffa::EnumValue<super::super::LifecycleSource> {
14060 self.0.reborrow().latest_lifecycle_source
14061 }
14062 #[must_use]
14066 pub fn lifecycle_reason(
14067 &self,
14068 ) -> ::buffa::EnumValue<super::super::LifecycleReason> {
14069 self.0.reborrow().lifecycle_reason
14070 }
14071 #[must_use]
14075 pub fn zipper_reason(
14076 &self,
14077 ) -> &::buffa::MessageFieldView<
14078 super::super::super::super::zipper::v1::__buffa::view::ZipperReasonDetailsView<
14079 '_,
14080 >,
14081 > {
14082 &self.0.reborrow().zipper_reason
14083 }
14084 #[must_use]
14088 pub fn started_at_unix_ms(&self) -> u64 {
14089 self.0.reborrow().started_at_unix_ms
14090 }
14091 #[must_use]
14095 pub fn updated_at_unix_ms(&self) -> u64 {
14096 self.0.reborrow().updated_at_unix_ms
14097 }
14098 #[must_use]
14102 pub fn terminal_at_unix_ms(&self) -> u64 {
14103 self.0.reborrow().terminal_at_unix_ms
14104 }
14105 #[must_use]
14109 pub fn last_activity_at_unix_ms(&self) -> u64 {
14110 self.0.reborrow().last_activity_at_unix_ms
14111 }
14112 #[must_use]
14116 pub fn is_open(&self) -> bool {
14117 self.0.reborrow().is_open
14118 }
14119 #[must_use]
14123 pub fn is_terminal(&self) -> bool {
14124 self.0.reborrow().is_terminal
14125 }
14126 #[must_use]
14130 pub fn current_step_sequence(&self) -> u32 {
14131 self.0.reborrow().current_step_sequence
14132 }
14133 #[must_use]
14137 pub fn current_progress(
14138 &self,
14139 ) -> &::buffa::MessageFieldView<
14140 super::super::__buffa::view::FlowSummaryProgressViewView<'_>,
14141 > {
14142 &self.0.reborrow().current_progress
14143 }
14144 #[must_use]
14149 pub fn progress_timeline(
14150 &self,
14151 ) -> &::buffa::RepeatedView<
14152 '_,
14153 super::super::__buffa::view::FlowTimelineItemViewView<'_>,
14154 > {
14155 &self.0.reborrow().progress_timeline
14156 }
14157 #[must_use]
14161 pub fn estimated_completion_unix_ms(&self) -> u64 {
14162 self.0.reborrow().estimated_completion_unix_ms
14163 }
14164 }
14165 impl ::core::convert::From<::buffa::OwnedView<FlowSummaryViewView<'static>>>
14166 for FlowSummaryViewOwnedView {
14167 fn from(inner: ::buffa::OwnedView<FlowSummaryViewView<'static>>) -> Self {
14168 FlowSummaryViewOwnedView(inner)
14169 }
14170 }
14171 impl ::core::convert::From<FlowSummaryViewOwnedView>
14172 for ::buffa::OwnedView<FlowSummaryViewView<'static>> {
14173 fn from(wrapper: FlowSummaryViewOwnedView) -> Self {
14174 wrapper.0
14175 }
14176 }
14177 impl ::core::convert::AsRef<::buffa::OwnedView<FlowSummaryViewView<'static>>>
14178 for FlowSummaryViewOwnedView {
14179 fn as_ref(&self) -> &::buffa::OwnedView<FlowSummaryViewView<'static>> {
14180 &self.0
14181 }
14182 }
14183 impl ::buffa::HasMessageView for super::super::FlowSummaryView {
14184 type View<'a> = FlowSummaryViewView<'a>;
14185 type ViewHandle = FlowSummaryViewOwnedView;
14186 }
14187 impl ::serde::Serialize for FlowSummaryViewOwnedView {
14188 fn serialize<__S: ::serde::Serializer>(
14189 &self,
14190 __s: __S,
14191 ) -> ::core::result::Result<__S::Ok, __S::Error> {
14192 ::serde::Serialize::serialize(&self.0, __s)
14193 }
14194 }
14195 #[derive(Clone, Debug, Default)]
14197 pub struct FlowSummaryProgressViewView<'a> {
14198 pub current_step_started_at_unix_ms: u64,
14203 pub current_step_expected_duration_ms: u64,
14207 pub current_confirmations: u32,
14211 pub required_confirmations: u32,
14215 pub approve_count: u32,
14219 pub reject_count: u32,
14223 pub validator_count: u32,
14227 pub required_approvals: u32,
14231 pub required_rejections: u32,
14235 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
14236 }
14237 impl<'a> ::buffa::MessageView<'a> for FlowSummaryProgressViewView<'a> {
14238 type Owned = super::super::FlowSummaryProgressView;
14239 fn decode_view(
14240 buf: &'a [u8],
14241 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
14242 let __limit = ::core::cell::Cell::new(
14243 ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
14244 );
14245 <Self as ::buffa::MessageView>::decode_view_ctx(
14246 buf,
14247 ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
14248 )
14249 }
14250 fn decode_view_with_ctx(
14251 buf: &'a [u8],
14252 ctx: ::buffa::DecodeContext<'_>,
14253 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
14254 <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
14255 }
14256 fn merge_view_field(
14257 &mut self,
14258 tag: ::buffa::encoding::Tag,
14259 cur: &'a [u8],
14260 before_tag: &'a [u8],
14261 ctx: ::buffa::DecodeContext<'_>,
14262 ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
14263 let _ = ctx;
14264 #[allow(unused_variables)]
14265 let view = self;
14266 let mut cur = cur;
14267 match tag.field_number() {
14268 1u32 => {
14269 ::buffa::encoding::check_wire_type(
14270 tag,
14271 ::buffa::encoding::WireType::Varint,
14272 )?;
14273 view.current_step_started_at_unix_ms = ::buffa::types::decode_uint64(
14274 &mut cur,
14275 )?;
14276 }
14277 2u32 => {
14278 ::buffa::encoding::check_wire_type(
14279 tag,
14280 ::buffa::encoding::WireType::Varint,
14281 )?;
14282 view.current_step_expected_duration_ms = ::buffa::types::decode_uint64(
14283 &mut cur,
14284 )?;
14285 }
14286 5u32 => {
14287 ::buffa::encoding::check_wire_type(
14288 tag,
14289 ::buffa::encoding::WireType::Varint,
14290 )?;
14291 view.current_confirmations = ::buffa::types::decode_uint32(
14292 &mut cur,
14293 )?;
14294 }
14295 6u32 => {
14296 ::buffa::encoding::check_wire_type(
14297 tag,
14298 ::buffa::encoding::WireType::Varint,
14299 )?;
14300 view.required_confirmations = ::buffa::types::decode_uint32(
14301 &mut cur,
14302 )?;
14303 }
14304 7u32 => {
14305 ::buffa::encoding::check_wire_type(
14306 tag,
14307 ::buffa::encoding::WireType::Varint,
14308 )?;
14309 view.approve_count = ::buffa::types::decode_uint32(&mut cur)?;
14310 }
14311 8u32 => {
14312 ::buffa::encoding::check_wire_type(
14313 tag,
14314 ::buffa::encoding::WireType::Varint,
14315 )?;
14316 view.reject_count = ::buffa::types::decode_uint32(&mut cur)?;
14317 }
14318 9u32 => {
14319 ::buffa::encoding::check_wire_type(
14320 tag,
14321 ::buffa::encoding::WireType::Varint,
14322 )?;
14323 view.validator_count = ::buffa::types::decode_uint32(&mut cur)?;
14324 }
14325 10u32 => {
14326 ::buffa::encoding::check_wire_type(
14327 tag,
14328 ::buffa::encoding::WireType::Varint,
14329 )?;
14330 view.required_approvals = ::buffa::types::decode_uint32(
14331 &mut cur,
14332 )?;
14333 }
14334 11u32 => {
14335 ::buffa::encoding::check_wire_type(
14336 tag,
14337 ::buffa::encoding::WireType::Varint,
14338 )?;
14339 view.required_rejections = ::buffa::types::decode_uint32(
14340 &mut cur,
14341 )?;
14342 }
14343 _ => {
14344 ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
14345 let span_len = before_tag.len() - cur.len();
14346 view.__buffa_unknown_fields
14347 .push_record(before_tag, span_len, ctx)?;
14348 }
14349 }
14350 ::core::result::Result::Ok(cur)
14351 }
14352 fn to_owned_message(
14353 &self,
14354 ) -> ::core::result::Result<
14355 super::super::FlowSummaryProgressView,
14356 ::buffa::DecodeError,
14357 > {
14358 self.to_owned_from_source(None)
14359 }
14360 #[allow(clippy::useless_conversion, clippy::needless_update)]
14361 fn to_owned_from_source(
14362 &self,
14363 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
14364 ) -> ::core::result::Result<
14365 super::super::FlowSummaryProgressView,
14366 ::buffa::DecodeError,
14367 > {
14368 #[allow(unused_imports)]
14369 use ::buffa::alloc::string::ToString as _;
14370 let _ = __buffa_src;
14371 ::core::result::Result::Ok(super::super::FlowSummaryProgressView {
14372 current_step_started_at_unix_ms: self
14373 .current_step_started_at_unix_ms,
14374 current_step_expected_duration_ms: self
14375 .current_step_expected_duration_ms,
14376 current_confirmations: self.current_confirmations,
14377 required_confirmations: self.required_confirmations,
14378 approve_count: self.approve_count,
14379 reject_count: self.reject_count,
14380 validator_count: self.validator_count,
14381 required_approvals: self.required_approvals,
14382 required_rejections: self.required_rejections,
14383 __buffa_unknown_fields: self
14384 .__buffa_unknown_fields
14385 .to_owned()?
14386 .into(),
14387 ..::core::default::Default::default()
14388 })
14389 }
14390 }
14391 impl<'a> ::buffa::ViewEncode<'a> for FlowSummaryProgressViewView<'a> {
14392 #[allow(clippy::needless_borrow, clippy::let_and_return)]
14393 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
14394 #[allow(unused_imports)]
14395 use ::buffa::Enumeration as _;
14396 let mut size = 0u32;
14397 if self.current_step_started_at_unix_ms != 0u64 {
14398 size
14399 += 1u32
14400 + ::buffa::types::uint64_encoded_len(
14401 self.current_step_started_at_unix_ms,
14402 ) as u32;
14403 }
14404 if self.current_step_expected_duration_ms != 0u64 {
14405 size
14406 += 1u32
14407 + ::buffa::types::uint64_encoded_len(
14408 self.current_step_expected_duration_ms,
14409 ) as u32;
14410 }
14411 if self.current_confirmations != 0u32 {
14412 size
14413 += 1u32
14414 + ::buffa::types::uint32_encoded_len(
14415 self.current_confirmations,
14416 ) as u32;
14417 }
14418 if self.required_confirmations != 0u32 {
14419 size
14420 += 1u32
14421 + ::buffa::types::uint32_encoded_len(
14422 self.required_confirmations,
14423 ) as u32;
14424 }
14425 if self.approve_count != 0u32 {
14426 size
14427 += 1u32
14428 + ::buffa::types::uint32_encoded_len(self.approve_count)
14429 as u32;
14430 }
14431 if self.reject_count != 0u32 {
14432 size
14433 += 1u32
14434 + ::buffa::types::uint32_encoded_len(self.reject_count)
14435 as u32;
14436 }
14437 if self.validator_count != 0u32 {
14438 size
14439 += 1u32
14440 + ::buffa::types::uint32_encoded_len(self.validator_count)
14441 as u32;
14442 }
14443 if self.required_approvals != 0u32 {
14444 size
14445 += 1u32
14446 + ::buffa::types::uint32_encoded_len(self.required_approvals)
14447 as u32;
14448 }
14449 if self.required_rejections != 0u32 {
14450 size
14451 += 1u32
14452 + ::buffa::types::uint32_encoded_len(
14453 self.required_rejections,
14454 ) as u32;
14455 }
14456 size += self.__buffa_unknown_fields.encoded_len() as u32;
14457 size
14458 }
14459 #[allow(clippy::needless_borrow)]
14460 fn write_to(
14461 &self,
14462 _cache: &mut ::buffa::SizeCache,
14463 buf: &mut impl ::buffa::bytes::BufMut,
14464 ) {
14465 #[allow(unused_imports)]
14466 use ::buffa::Enumeration as _;
14467 if self.current_step_started_at_unix_ms != 0u64 {
14468 ::buffa::types::put_uint64_field(
14469 1u32,
14470 self.current_step_started_at_unix_ms,
14471 buf,
14472 );
14473 }
14474 if self.current_step_expected_duration_ms != 0u64 {
14475 ::buffa::types::put_uint64_field(
14476 2u32,
14477 self.current_step_expected_duration_ms,
14478 buf,
14479 );
14480 }
14481 if self.current_confirmations != 0u32 {
14482 ::buffa::types::put_uint32_field(
14483 5u32,
14484 self.current_confirmations,
14485 buf,
14486 );
14487 }
14488 if self.required_confirmations != 0u32 {
14489 ::buffa::types::put_uint32_field(
14490 6u32,
14491 self.required_confirmations,
14492 buf,
14493 );
14494 }
14495 if self.approve_count != 0u32 {
14496 ::buffa::types::put_uint32_field(7u32, self.approve_count, buf);
14497 }
14498 if self.reject_count != 0u32 {
14499 ::buffa::types::put_uint32_field(8u32, self.reject_count, buf);
14500 }
14501 if self.validator_count != 0u32 {
14502 ::buffa::types::put_uint32_field(9u32, self.validator_count, buf);
14503 }
14504 if self.required_approvals != 0u32 {
14505 ::buffa::types::put_uint32_field(
14506 10u32,
14507 self.required_approvals,
14508 buf,
14509 );
14510 }
14511 if self.required_rejections != 0u32 {
14512 ::buffa::types::put_uint32_field(
14513 11u32,
14514 self.required_rejections,
14515 buf,
14516 );
14517 }
14518 self.__buffa_unknown_fields.write_to(buf);
14519 }
14520 }
14521 impl<'__a> ::serde::Serialize for FlowSummaryProgressViewView<'__a> {
14533 fn serialize<__S: ::serde::Serializer>(
14534 &self,
14535 __s: __S,
14536 ) -> ::core::result::Result<__S::Ok, __S::Error> {
14537 use ::serde::ser::SerializeMap as _;
14538 let mut __map = __s.serialize_map(::core::option::Option::None)?;
14539 if !::buffa::json_helpers::skip_if::is_zero_u64(
14540 &self.current_step_started_at_unix_ms,
14541 ) {
14542 __map
14543 .serialize_entry(
14544 "currentStepStartedAtUnixMs",
14545 &::buffa::json_helpers::ProtoJson(
14546 &self.current_step_started_at_unix_ms,
14547 ),
14548 )?;
14549 }
14550 if !::buffa::json_helpers::skip_if::is_zero_u64(
14551 &self.current_step_expected_duration_ms,
14552 ) {
14553 __map
14554 .serialize_entry(
14555 "currentStepExpectedDurationMs",
14556 &::buffa::json_helpers::ProtoJson(
14557 &self.current_step_expected_duration_ms,
14558 ),
14559 )?;
14560 }
14561 if !::buffa::json_helpers::skip_if::is_zero_u32(
14562 &self.current_confirmations,
14563 ) {
14564 __map
14565 .serialize_entry(
14566 "currentConfirmations",
14567 &::buffa::json_helpers::ProtoJson(
14568 &self.current_confirmations,
14569 ),
14570 )?;
14571 }
14572 if !::buffa::json_helpers::skip_if::is_zero_u32(
14573 &self.required_confirmations,
14574 ) {
14575 __map
14576 .serialize_entry(
14577 "requiredConfirmations",
14578 &::buffa::json_helpers::ProtoJson(
14579 &self.required_confirmations,
14580 ),
14581 )?;
14582 }
14583 if !::buffa::json_helpers::skip_if::is_zero_u32(&self.approve_count) {
14584 __map
14585 .serialize_entry(
14586 "approveCount",
14587 &::buffa::json_helpers::ProtoJson(&self.approve_count),
14588 )?;
14589 }
14590 if !::buffa::json_helpers::skip_if::is_zero_u32(&self.reject_count) {
14591 __map
14592 .serialize_entry(
14593 "rejectCount",
14594 &::buffa::json_helpers::ProtoJson(&self.reject_count),
14595 )?;
14596 }
14597 if !::buffa::json_helpers::skip_if::is_zero_u32(&self.validator_count) {
14598 __map
14599 .serialize_entry(
14600 "validatorCount",
14601 &::buffa::json_helpers::ProtoJson(&self.validator_count),
14602 )?;
14603 }
14604 if !::buffa::json_helpers::skip_if::is_zero_u32(
14605 &self.required_approvals,
14606 ) {
14607 __map
14608 .serialize_entry(
14609 "requiredApprovals",
14610 &::buffa::json_helpers::ProtoJson(&self.required_approvals),
14611 )?;
14612 }
14613 if !::buffa::json_helpers::skip_if::is_zero_u32(
14614 &self.required_rejections,
14615 ) {
14616 __map
14617 .serialize_entry(
14618 "requiredRejections",
14619 &::buffa::json_helpers::ProtoJson(&self.required_rejections),
14620 )?;
14621 }
14622 __map.end()
14623 }
14624 }
14625 impl<'a> ::buffa::MessageName for FlowSummaryProgressViewView<'a> {
14626 const PACKAGE: &'static str = "chain.lifecycle.v1";
14627 const NAME: &'static str = "FlowSummaryProgressView";
14628 const FULL_NAME: &'static str = "chain.lifecycle.v1.FlowSummaryProgressView";
14629 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowSummaryProgressView";
14630 }
14631 ::buffa::impl_default_view_instance!(FlowSummaryProgressViewView);
14632 ::buffa::impl_view_reborrow!(FlowSummaryProgressViewView);
14633 #[derive(Clone, Debug)]
14639 pub struct FlowSummaryProgressViewOwnedView(
14640 ::buffa::OwnedView<FlowSummaryProgressViewView<'static>>,
14641 );
14642 impl FlowSummaryProgressViewOwnedView {
14643 pub fn decode(
14653 bytes: ::buffa::bytes::Bytes,
14654 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
14655 ::core::result::Result::Ok(
14656 FlowSummaryProgressViewOwnedView(::buffa::OwnedView::decode(bytes)?),
14657 )
14658 }
14659 pub fn decode_with_options(
14667 bytes: ::buffa::bytes::Bytes,
14668 opts: &::buffa::DecodeOptions,
14669 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
14670 ::core::result::Result::Ok(
14671 FlowSummaryProgressViewOwnedView(
14672 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
14673 ),
14674 )
14675 }
14676 pub fn from_owned(
14683 msg: &super::super::FlowSummaryProgressView,
14684 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
14685 ::core::result::Result::Ok(
14686 FlowSummaryProgressViewOwnedView(
14687 ::buffa::OwnedView::from_owned(msg)?,
14688 ),
14689 )
14690 }
14691 #[must_use]
14693 pub fn view(&self) -> &FlowSummaryProgressViewView<'_> {
14694 self.0.reborrow()
14695 }
14696 pub fn to_owned_message(
14703 &self,
14704 ) -> ::core::result::Result<
14705 super::super::FlowSummaryProgressView,
14706 ::buffa::DecodeError,
14707 > {
14708 self.0.to_owned_message()
14709 }
14710 #[must_use]
14712 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
14713 self.0.bytes()
14714 }
14715 #[must_use]
14717 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
14718 self.0.into_bytes()
14719 }
14720 #[must_use]
14725 pub fn current_step_started_at_unix_ms(&self) -> u64 {
14726 self.0.reborrow().current_step_started_at_unix_ms
14727 }
14728 #[must_use]
14732 pub fn current_step_expected_duration_ms(&self) -> u64 {
14733 self.0.reborrow().current_step_expected_duration_ms
14734 }
14735 #[must_use]
14739 pub fn current_confirmations(&self) -> u32 {
14740 self.0.reborrow().current_confirmations
14741 }
14742 #[must_use]
14746 pub fn required_confirmations(&self) -> u32 {
14747 self.0.reborrow().required_confirmations
14748 }
14749 #[must_use]
14753 pub fn approve_count(&self) -> u32 {
14754 self.0.reborrow().approve_count
14755 }
14756 #[must_use]
14760 pub fn reject_count(&self) -> u32 {
14761 self.0.reborrow().reject_count
14762 }
14763 #[must_use]
14767 pub fn validator_count(&self) -> u32 {
14768 self.0.reborrow().validator_count
14769 }
14770 #[must_use]
14774 pub fn required_approvals(&self) -> u32 {
14775 self.0.reborrow().required_approvals
14776 }
14777 #[must_use]
14781 pub fn required_rejections(&self) -> u32 {
14782 self.0.reborrow().required_rejections
14783 }
14784 }
14785 impl ::core::convert::From<
14786 ::buffa::OwnedView<FlowSummaryProgressViewView<'static>>,
14787 > for FlowSummaryProgressViewOwnedView {
14788 fn from(
14789 inner: ::buffa::OwnedView<FlowSummaryProgressViewView<'static>>,
14790 ) -> Self {
14791 FlowSummaryProgressViewOwnedView(inner)
14792 }
14793 }
14794 impl ::core::convert::From<FlowSummaryProgressViewOwnedView>
14795 for ::buffa::OwnedView<FlowSummaryProgressViewView<'static>> {
14796 fn from(wrapper: FlowSummaryProgressViewOwnedView) -> Self {
14797 wrapper.0
14798 }
14799 }
14800 impl ::core::convert::AsRef<
14801 ::buffa::OwnedView<FlowSummaryProgressViewView<'static>>,
14802 > for FlowSummaryProgressViewOwnedView {
14803 fn as_ref(
14804 &self,
14805 ) -> &::buffa::OwnedView<FlowSummaryProgressViewView<'static>> {
14806 &self.0
14807 }
14808 }
14809 impl ::buffa::HasMessageView for super::super::FlowSummaryProgressView {
14810 type View<'a> = FlowSummaryProgressViewView<'a>;
14811 type ViewHandle = FlowSummaryProgressViewOwnedView;
14812 }
14813 impl ::serde::Serialize for FlowSummaryProgressViewOwnedView {
14814 fn serialize<__S: ::serde::Serializer>(
14815 &self,
14816 __s: __S,
14817 ) -> ::core::result::Result<__S::Ok, __S::Error> {
14818 ::serde::Serialize::serialize(&self.0, __s)
14819 }
14820 }
14821 #[derive(Clone, Debug, Default)]
14825 pub struct FlowStepViewView<'a> {
14826 pub sequence: u32,
14830 pub step: ::buffa::EnumValue<super::super::FlowStep>,
14834 pub asset_ids: ::buffa::MessageFieldView<
14838 super::super::__buffa::view::AssetIdsView<'a>,
14839 >,
14840 pub polyester_chain_id: u32,
14844 pub amount_e18: ::buffa::MessageFieldView<
14849 super::super::super::super::super::polyester::r#type::v1::__buffa::view::U128View<
14850 'a,
14851 >,
14852 >,
14853 pub request_fee: ::buffa::MessageFieldView<
14857 super::super::__buffa::view::RequestFeeView<'a>,
14858 >,
14859 pub milestone_tx_ref: &'a str,
14863 pub lifecycle_source: ::buffa::EnumValue<super::super::LifecycleSource>,
14867 pub lifecycle_reason: ::buffa::EnumValue<super::super::LifecycleReason>,
14871 pub zipper_reason: ::buffa::MessageFieldView<
14875 super::super::super::super::zipper::v1::__buffa::view::ZipperReasonDetailsView<
14876 'a,
14877 >,
14878 >,
14879 pub current_confirmations: u32,
14883 pub required_confirmations: u32,
14887 pub approve_count: u32,
14891 pub reject_count: u32,
14895 pub validator_count: u32,
14899 pub required_approvals: u32,
14903 pub required_rejections: u32,
14907 pub occurred_at_unix_ms: u64,
14911 pub block_time_moving_average_ms: u64,
14915 pub activities: ::buffa::RepeatedView<
14921 'a,
14922 super::super::__buffa::view::FlowStepActivityViewView<'a>,
14923 >,
14924 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
14925 }
14926 impl<'a> ::buffa::MessageView<'a> for FlowStepViewView<'a> {
14927 type Owned = super::super::FlowStepView;
14928 fn decode_view(
14929 buf: &'a [u8],
14930 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
14931 let __limit = ::core::cell::Cell::new(
14932 ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
14933 );
14934 <Self as ::buffa::MessageView>::decode_view_ctx(
14935 buf,
14936 ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
14937 )
14938 }
14939 fn decode_view_with_ctx(
14940 buf: &'a [u8],
14941 ctx: ::buffa::DecodeContext<'_>,
14942 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
14943 <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
14944 }
14945 fn merge_view_field(
14946 &mut self,
14947 tag: ::buffa::encoding::Tag,
14948 cur: &'a [u8],
14949 before_tag: &'a [u8],
14950 ctx: ::buffa::DecodeContext<'_>,
14951 ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
14952 let _ = ctx;
14953 #[allow(unused_variables)]
14954 let view = self;
14955 let mut cur = cur;
14956 match tag.field_number() {
14957 1u32 => {
14958 ::buffa::encoding::check_wire_type(
14959 tag,
14960 ::buffa::encoding::WireType::Varint,
14961 )?;
14962 view.sequence = ::buffa::types::decode_uint32(&mut cur)?;
14963 }
14964 3u32 => {
14965 ::buffa::encoding::check_wire_type(
14966 tag,
14967 ::buffa::encoding::WireType::Varint,
14968 )?;
14969 view.step = ::buffa::EnumValue::from(
14970 ::buffa::types::decode_int32(&mut cur)?,
14971 );
14972 }
14973 7u32 => {
14974 ::buffa::encoding::check_wire_type(
14975 tag,
14976 ::buffa::encoding::WireType::LengthDelimited,
14977 )?;
14978 let __sub_ctx = ctx.descend()?;
14979 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
14980 match view.asset_ids.as_mut() {
14981 Some(existing) => {
14982 ::buffa::MessageView::merge_into_view(
14983 existing,
14984 sub,
14985 __sub_ctx,
14986 )?
14987 }
14988 None => {
14989 view.asset_ids = ::buffa::MessageFieldView::set(
14990 <super::super::__buffa::view::AssetIdsView as ::buffa::MessageView>::decode_view_ctx(
14991 sub,
14992 __sub_ctx,
14993 )?,
14994 );
14995 }
14996 }
14997 }
14998 8u32 => {
14999 ::buffa::encoding::check_wire_type(
15000 tag,
15001 ::buffa::encoding::WireType::Varint,
15002 )?;
15003 view.polyester_chain_id = ::buffa::types::decode_uint32(
15004 &mut cur,
15005 )?;
15006 }
15007 9u32 => {
15008 ::buffa::encoding::check_wire_type(
15009 tag,
15010 ::buffa::encoding::WireType::LengthDelimited,
15011 )?;
15012 let __sub_ctx = ctx.descend()?;
15013 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
15014 match view.amount_e18.as_mut() {
15015 Some(existing) => {
15016 ::buffa::MessageView::merge_into_view(
15017 existing,
15018 sub,
15019 __sub_ctx,
15020 )?
15021 }
15022 None => {
15023 view.amount_e18 = ::buffa::MessageFieldView::set(
15024 <super::super::super::super::super::polyester::r#type::v1::__buffa::view::U128View as ::buffa::MessageView>::decode_view_ctx(
15025 sub,
15026 __sub_ctx,
15027 )?,
15028 );
15029 }
15030 }
15031 }
15032 24u32 => {
15033 ::buffa::encoding::check_wire_type(
15034 tag,
15035 ::buffa::encoding::WireType::LengthDelimited,
15036 )?;
15037 let __sub_ctx = ctx.descend()?;
15038 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
15039 match view.request_fee.as_mut() {
15040 Some(existing) => {
15041 ::buffa::MessageView::merge_into_view(
15042 existing,
15043 sub,
15044 __sub_ctx,
15045 )?
15046 }
15047 None => {
15048 view.request_fee = ::buffa::MessageFieldView::set(
15049 <super::super::__buffa::view::RequestFeeView as ::buffa::MessageView>::decode_view_ctx(
15050 sub,
15051 __sub_ctx,
15052 )?,
15053 );
15054 }
15055 }
15056 }
15057 11u32 => {
15058 ::buffa::encoding::check_wire_type(
15059 tag,
15060 ::buffa::encoding::WireType::LengthDelimited,
15061 )?;
15062 view.milestone_tx_ref = ::buffa::types::borrow_str(&mut cur)?;
15063 }
15064 12u32 => {
15065 ::buffa::encoding::check_wire_type(
15066 tag,
15067 ::buffa::encoding::WireType::Varint,
15068 )?;
15069 view.lifecycle_source = ::buffa::EnumValue::from(
15070 ::buffa::types::decode_int32(&mut cur)?,
15071 );
15072 }
15073 13u32 => {
15074 ::buffa::encoding::check_wire_type(
15075 tag,
15076 ::buffa::encoding::WireType::Varint,
15077 )?;
15078 view.lifecycle_reason = ::buffa::EnumValue::from(
15079 ::buffa::types::decode_int32(&mut cur)?,
15080 );
15081 }
15082 25u32 => {
15083 ::buffa::encoding::check_wire_type(
15084 tag,
15085 ::buffa::encoding::WireType::LengthDelimited,
15086 )?;
15087 let __sub_ctx = ctx.descend()?;
15088 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
15089 match view.zipper_reason.as_mut() {
15090 Some(existing) => {
15091 ::buffa::MessageView::merge_into_view(
15092 existing,
15093 sub,
15094 __sub_ctx,
15095 )?
15096 }
15097 None => {
15098 view.zipper_reason = ::buffa::MessageFieldView::set(
15099 <super::super::super::super::zipper::v1::__buffa::view::ZipperReasonDetailsView as ::buffa::MessageView>::decode_view_ctx(
15100 sub,
15101 __sub_ctx,
15102 )?,
15103 );
15104 }
15105 }
15106 }
15107 14u32 => {
15108 ::buffa::encoding::check_wire_type(
15109 tag,
15110 ::buffa::encoding::WireType::Varint,
15111 )?;
15112 view.current_confirmations = ::buffa::types::decode_uint32(
15113 &mut cur,
15114 )?;
15115 }
15116 15u32 => {
15117 ::buffa::encoding::check_wire_type(
15118 tag,
15119 ::buffa::encoding::WireType::Varint,
15120 )?;
15121 view.required_confirmations = ::buffa::types::decode_uint32(
15122 &mut cur,
15123 )?;
15124 }
15125 16u32 => {
15126 ::buffa::encoding::check_wire_type(
15127 tag,
15128 ::buffa::encoding::WireType::Varint,
15129 )?;
15130 view.approve_count = ::buffa::types::decode_uint32(&mut cur)?;
15131 }
15132 17u32 => {
15133 ::buffa::encoding::check_wire_type(
15134 tag,
15135 ::buffa::encoding::WireType::Varint,
15136 )?;
15137 view.reject_count = ::buffa::types::decode_uint32(&mut cur)?;
15138 }
15139 18u32 => {
15140 ::buffa::encoding::check_wire_type(
15141 tag,
15142 ::buffa::encoding::WireType::Varint,
15143 )?;
15144 view.validator_count = ::buffa::types::decode_uint32(&mut cur)?;
15145 }
15146 22u32 => {
15147 ::buffa::encoding::check_wire_type(
15148 tag,
15149 ::buffa::encoding::WireType::Varint,
15150 )?;
15151 view.required_approvals = ::buffa::types::decode_uint32(
15152 &mut cur,
15153 )?;
15154 }
15155 23u32 => {
15156 ::buffa::encoding::check_wire_type(
15157 tag,
15158 ::buffa::encoding::WireType::Varint,
15159 )?;
15160 view.required_rejections = ::buffa::types::decode_uint32(
15161 &mut cur,
15162 )?;
15163 }
15164 19u32 => {
15165 ::buffa::encoding::check_wire_type(
15166 tag,
15167 ::buffa::encoding::WireType::Varint,
15168 )?;
15169 view.occurred_at_unix_ms = ::buffa::types::decode_uint64(
15170 &mut cur,
15171 )?;
15172 }
15173 20u32 => {
15174 ::buffa::encoding::check_wire_type(
15175 tag,
15176 ::buffa::encoding::WireType::Varint,
15177 )?;
15178 view.block_time_moving_average_ms = ::buffa::types::decode_uint64(
15179 &mut cur,
15180 )?;
15181 }
15182 21u32 => {
15183 ::buffa::encoding::check_wire_type(
15184 tag,
15185 ::buffa::encoding::WireType::LengthDelimited,
15186 )?;
15187 let __sub_ctx = ctx.descend()?;
15188 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
15189 view.activities
15190 .push(
15191 <super::super::__buffa::view::FlowStepActivityViewView as ::buffa::MessageView>::decode_view_ctx(
15192 sub,
15193 __sub_ctx,
15194 )?,
15195 );
15196 }
15197 _ => {
15198 ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
15199 let span_len = before_tag.len() - cur.len();
15200 view.__buffa_unknown_fields
15201 .push_record(before_tag, span_len, ctx)?;
15202 }
15203 }
15204 ::core::result::Result::Ok(cur)
15205 }
15206 fn to_owned_message(
15207 &self,
15208 ) -> ::core::result::Result<
15209 super::super::FlowStepView,
15210 ::buffa::DecodeError,
15211 > {
15212 self.to_owned_from_source(None)
15213 }
15214 #[allow(clippy::useless_conversion, clippy::needless_update)]
15215 fn to_owned_from_source(
15216 &self,
15217 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
15218 ) -> ::core::result::Result<
15219 super::super::FlowStepView,
15220 ::buffa::DecodeError,
15221 > {
15222 #[allow(unused_imports)]
15223 use ::buffa::alloc::string::ToString as _;
15224 let _ = __buffa_src;
15225 ::core::result::Result::Ok(super::super::FlowStepView {
15226 sequence: self.sequence,
15227 step: self.step,
15228 asset_ids: match self.asset_ids.as_option() {
15229 Some(v) => {
15230 ::buffa::MessageField::<
15231 super::super::AssetIds,
15232 >::some(v.to_owned_from_source(__buffa_src)?)
15233 }
15234 None => ::buffa::MessageField::none(),
15235 },
15236 polyester_chain_id: self.polyester_chain_id,
15237 amount_e18: match self.amount_e18.as_option() {
15238 Some(v) => {
15239 ::buffa::MessageField::<
15240 super::super::super::super::super::polyester::r#type::v1::U128,
15241 >::some(v.to_owned_from_source(__buffa_src)?)
15242 }
15243 None => ::buffa::MessageField::none(),
15244 },
15245 request_fee: match self.request_fee.as_option() {
15246 Some(v) => {
15247 ::buffa::MessageField::<
15248 super::super::RequestFee,
15249 >::some(v.to_owned_from_source(__buffa_src)?)
15250 }
15251 None => ::buffa::MessageField::none(),
15252 },
15253 milestone_tx_ref: self.milestone_tx_ref.to_string(),
15254 lifecycle_source: self.lifecycle_source,
15255 lifecycle_reason: self.lifecycle_reason,
15256 zipper_reason: match self.zipper_reason.as_option() {
15257 Some(v) => {
15258 ::buffa::MessageField::<
15259 super::super::super::super::zipper::v1::ZipperReasonDetails,
15260 >::some(v.to_owned_from_source(__buffa_src)?)
15261 }
15262 None => ::buffa::MessageField::none(),
15263 },
15264 current_confirmations: self.current_confirmations,
15265 required_confirmations: self.required_confirmations,
15266 approve_count: self.approve_count,
15267 reject_count: self.reject_count,
15268 validator_count: self.validator_count,
15269 required_approvals: self.required_approvals,
15270 required_rejections: self.required_rejections,
15271 occurred_at_unix_ms: self.occurred_at_unix_ms,
15272 block_time_moving_average_ms: self.block_time_moving_average_ms,
15273 activities: self
15274 .activities
15275 .iter()
15276 .map(|v| v.to_owned_from_source(__buffa_src))
15277 .collect::<::core::result::Result<_, ::buffa::DecodeError>>()?,
15278 __buffa_unknown_fields: self
15279 .__buffa_unknown_fields
15280 .to_owned()?
15281 .into(),
15282 ..::core::default::Default::default()
15283 })
15284 }
15285 }
15286 impl<'a> ::buffa::ViewEncode<'a> for FlowStepViewView<'a> {
15287 #[allow(clippy::needless_borrow, clippy::let_and_return)]
15288 fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
15289 #[allow(unused_imports)]
15290 use ::buffa::Enumeration as _;
15291 let mut size = 0u32;
15292 if self.sequence != 0u32 {
15293 size
15294 += 1u32
15295 + ::buffa::types::uint32_encoded_len(self.sequence) as u32;
15296 }
15297 {
15298 let val = self.step.to_i32();
15299 if val != 0 {
15300 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
15301 }
15302 }
15303 if self.asset_ids.is_set() {
15304 let __slot = __cache.reserve();
15305 let inner_size = self.asset_ids.compute_size(__cache);
15306 __cache.set(__slot, inner_size);
15307 size
15308 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
15309 + inner_size;
15310 }
15311 if self.polyester_chain_id != 0u32 {
15312 size
15313 += 1u32
15314 + ::buffa::types::uint32_encoded_len(self.polyester_chain_id)
15315 as u32;
15316 }
15317 if self.amount_e18.is_set() {
15318 let __slot = __cache.reserve();
15319 let inner_size = self.amount_e18.compute_size(__cache);
15320 __cache.set(__slot, inner_size);
15321 size
15322 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
15323 + inner_size;
15324 }
15325 if !self.milestone_tx_ref.is_empty() {
15326 size
15327 += 1u32
15328 + ::buffa::types::string_encoded_len(&self.milestone_tx_ref)
15329 as u32;
15330 }
15331 {
15332 let val = self.lifecycle_source.to_i32();
15333 if val != 0 {
15334 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
15335 }
15336 }
15337 {
15338 let val = self.lifecycle_reason.to_i32();
15339 if val != 0 {
15340 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
15341 }
15342 }
15343 if self.current_confirmations != 0u32 {
15344 size
15345 += 1u32
15346 + ::buffa::types::uint32_encoded_len(
15347 self.current_confirmations,
15348 ) as u32;
15349 }
15350 if self.required_confirmations != 0u32 {
15351 size
15352 += 1u32
15353 + ::buffa::types::uint32_encoded_len(
15354 self.required_confirmations,
15355 ) as u32;
15356 }
15357 if self.approve_count != 0u32 {
15358 size
15359 += 2u32
15360 + ::buffa::types::uint32_encoded_len(self.approve_count)
15361 as u32;
15362 }
15363 if self.reject_count != 0u32 {
15364 size
15365 += 2u32
15366 + ::buffa::types::uint32_encoded_len(self.reject_count)
15367 as u32;
15368 }
15369 if self.validator_count != 0u32 {
15370 size
15371 += 2u32
15372 + ::buffa::types::uint32_encoded_len(self.validator_count)
15373 as u32;
15374 }
15375 if self.occurred_at_unix_ms != 0u64 {
15376 size
15377 += 2u32
15378 + ::buffa::types::uint64_encoded_len(
15379 self.occurred_at_unix_ms,
15380 ) as u32;
15381 }
15382 if self.block_time_moving_average_ms != 0u64 {
15383 size
15384 += 2u32
15385 + ::buffa::types::uint64_encoded_len(
15386 self.block_time_moving_average_ms,
15387 ) as u32;
15388 }
15389 for v in &self.activities {
15390 let __slot = __cache.reserve();
15391 let inner_size = v.compute_size(__cache);
15392 __cache.set(__slot, inner_size);
15393 size
15394 += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
15395 + inner_size;
15396 }
15397 if self.required_approvals != 0u32 {
15398 size
15399 += 2u32
15400 + ::buffa::types::uint32_encoded_len(self.required_approvals)
15401 as u32;
15402 }
15403 if self.required_rejections != 0u32 {
15404 size
15405 += 2u32
15406 + ::buffa::types::uint32_encoded_len(
15407 self.required_rejections,
15408 ) as u32;
15409 }
15410 if self.request_fee.is_set() {
15411 let __slot = __cache.reserve();
15412 let inner_size = self.request_fee.compute_size(__cache);
15413 __cache.set(__slot, inner_size);
15414 size
15415 += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
15416 + inner_size;
15417 }
15418 if self.zipper_reason.is_set() {
15419 let __slot = __cache.reserve();
15420 let inner_size = self.zipper_reason.compute_size(__cache);
15421 __cache.set(__slot, inner_size);
15422 size
15423 += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
15424 + inner_size;
15425 }
15426 size += self.__buffa_unknown_fields.encoded_len() as u32;
15427 size
15428 }
15429 #[allow(clippy::needless_borrow)]
15430 fn write_to(
15431 &self,
15432 __cache: &mut ::buffa::SizeCache,
15433 buf: &mut impl ::buffa::bytes::BufMut,
15434 ) {
15435 #[allow(unused_imports)]
15436 use ::buffa::Enumeration as _;
15437 if self.sequence != 0u32 {
15438 ::buffa::types::put_uint32_field(1u32, self.sequence, buf);
15439 }
15440 {
15441 let val = self.step.to_i32();
15442 if val != 0 {
15443 ::buffa::types::put_int32_field(3u32, val, buf);
15444 }
15445 }
15446 if self.asset_ids.is_set() {
15447 ::buffa::types::put_len_delimited_header(
15448 7u32,
15449 __cache.consume_next(),
15450 buf,
15451 );
15452 self.asset_ids.write_to(__cache, buf);
15453 }
15454 if self.polyester_chain_id != 0u32 {
15455 ::buffa::types::put_uint32_field(8u32, self.polyester_chain_id, buf);
15456 }
15457 if self.amount_e18.is_set() {
15458 ::buffa::types::put_len_delimited_header(
15459 9u32,
15460 __cache.consume_next(),
15461 buf,
15462 );
15463 self.amount_e18.write_to(__cache, buf);
15464 }
15465 if !self.milestone_tx_ref.is_empty() {
15466 ::buffa::types::put_string_field(11u32, &self.milestone_tx_ref, buf);
15467 }
15468 {
15469 let val = self.lifecycle_source.to_i32();
15470 if val != 0 {
15471 ::buffa::types::put_int32_field(12u32, val, buf);
15472 }
15473 }
15474 {
15475 let val = self.lifecycle_reason.to_i32();
15476 if val != 0 {
15477 ::buffa::types::put_int32_field(13u32, val, buf);
15478 }
15479 }
15480 if self.current_confirmations != 0u32 {
15481 ::buffa::types::put_uint32_field(
15482 14u32,
15483 self.current_confirmations,
15484 buf,
15485 );
15486 }
15487 if self.required_confirmations != 0u32 {
15488 ::buffa::types::put_uint32_field(
15489 15u32,
15490 self.required_confirmations,
15491 buf,
15492 );
15493 }
15494 if self.approve_count != 0u32 {
15495 ::buffa::types::put_uint32_field(16u32, self.approve_count, buf);
15496 }
15497 if self.reject_count != 0u32 {
15498 ::buffa::types::put_uint32_field(17u32, self.reject_count, buf);
15499 }
15500 if self.validator_count != 0u32 {
15501 ::buffa::types::put_uint32_field(18u32, self.validator_count, buf);
15502 }
15503 if self.occurred_at_unix_ms != 0u64 {
15504 ::buffa::types::put_uint64_field(
15505 19u32,
15506 self.occurred_at_unix_ms,
15507 buf,
15508 );
15509 }
15510 if self.block_time_moving_average_ms != 0u64 {
15511 ::buffa::types::put_uint64_field(
15512 20u32,
15513 self.block_time_moving_average_ms,
15514 buf,
15515 );
15516 }
15517 for v in &self.activities {
15518 ::buffa::types::put_len_delimited_header(
15519 21u32,
15520 __cache.consume_next(),
15521 buf,
15522 );
15523 v.write_to(__cache, buf);
15524 }
15525 if self.required_approvals != 0u32 {
15526 ::buffa::types::put_uint32_field(
15527 22u32,
15528 self.required_approvals,
15529 buf,
15530 );
15531 }
15532 if self.required_rejections != 0u32 {
15533 ::buffa::types::put_uint32_field(
15534 23u32,
15535 self.required_rejections,
15536 buf,
15537 );
15538 }
15539 if self.request_fee.is_set() {
15540 ::buffa::types::put_len_delimited_header(
15541 24u32,
15542 __cache.consume_next(),
15543 buf,
15544 );
15545 self.request_fee.write_to(__cache, buf);
15546 }
15547 if self.zipper_reason.is_set() {
15548 ::buffa::types::put_len_delimited_header(
15549 25u32,
15550 __cache.consume_next(),
15551 buf,
15552 );
15553 self.zipper_reason.write_to(__cache, buf);
15554 }
15555 self.__buffa_unknown_fields.write_to(buf);
15556 }
15557 }
15558 impl<'__a> ::serde::Serialize for FlowStepViewView<'__a> {
15570 fn serialize<__S: ::serde::Serializer>(
15571 &self,
15572 __s: __S,
15573 ) -> ::core::result::Result<__S::Ok, __S::Error> {
15574 use ::serde::ser::SerializeMap as _;
15575 let mut __map = __s.serialize_map(::core::option::Option::None)?;
15576 if !::buffa::json_helpers::skip_if::is_zero_u32(&self.sequence) {
15577 __map
15578 .serialize_entry(
15579 "sequence",
15580 &::buffa::json_helpers::ProtoJson(&self.sequence),
15581 )?;
15582 }
15583 if !::buffa::json_helpers::skip_if::is_default_enum_value(&self.step) {
15584 __map.serialize_entry("step", &self.step)?;
15585 }
15586 {
15587 if let ::core::option::Option::Some(__v) = self.asset_ids.as_option()
15588 {
15589 __map.serialize_entry("assetIds", __v)?;
15590 }
15591 }
15592 if !::buffa::json_helpers::skip_if::is_zero_u32(
15593 &self.polyester_chain_id,
15594 ) {
15595 __map
15596 .serialize_entry(
15597 "polyesterChainId",
15598 &::buffa::json_helpers::ProtoJson(&self.polyester_chain_id),
15599 )?;
15600 }
15601 {
15602 if let ::core::option::Option::Some(__v) = self
15603 .amount_e18
15604 .as_option()
15605 {
15606 __map.serialize_entry("amountE18", __v)?;
15607 }
15608 }
15609 {
15610 if let ::core::option::Option::Some(__v) = self
15611 .request_fee
15612 .as_option()
15613 {
15614 __map.serialize_entry("requestFee", __v)?;
15615 }
15616 }
15617 if !::buffa::json_helpers::skip_if::is_empty_str(self.milestone_tx_ref) {
15618 __map.serialize_entry("milestoneTxRef", self.milestone_tx_ref)?;
15619 }
15620 if !::buffa::json_helpers::skip_if::is_default_enum_value(
15621 &self.lifecycle_source,
15622 ) {
15623 __map.serialize_entry("lifecycleSource", &self.lifecycle_source)?;
15624 }
15625 if !::buffa::json_helpers::skip_if::is_default_enum_value(
15626 &self.lifecycle_reason,
15627 ) {
15628 __map.serialize_entry("lifecycleReason", &self.lifecycle_reason)?;
15629 }
15630 {
15631 if let ::core::option::Option::Some(__v) = self
15632 .zipper_reason
15633 .as_option()
15634 {
15635 __map.serialize_entry("zipperReason", __v)?;
15636 }
15637 }
15638 if !::buffa::json_helpers::skip_if::is_zero_u32(
15639 &self.current_confirmations,
15640 ) {
15641 __map
15642 .serialize_entry(
15643 "currentConfirmations",
15644 &::buffa::json_helpers::ProtoJson(
15645 &self.current_confirmations,
15646 ),
15647 )?;
15648 }
15649 if !::buffa::json_helpers::skip_if::is_zero_u32(
15650 &self.required_confirmations,
15651 ) {
15652 __map
15653 .serialize_entry(
15654 "requiredConfirmations",
15655 &::buffa::json_helpers::ProtoJson(
15656 &self.required_confirmations,
15657 ),
15658 )?;
15659 }
15660 if !::buffa::json_helpers::skip_if::is_zero_u32(&self.approve_count) {
15661 __map
15662 .serialize_entry(
15663 "approveCount",
15664 &::buffa::json_helpers::ProtoJson(&self.approve_count),
15665 )?;
15666 }
15667 if !::buffa::json_helpers::skip_if::is_zero_u32(&self.reject_count) {
15668 __map
15669 .serialize_entry(
15670 "rejectCount",
15671 &::buffa::json_helpers::ProtoJson(&self.reject_count),
15672 )?;
15673 }
15674 if !::buffa::json_helpers::skip_if::is_zero_u32(&self.validator_count) {
15675 __map
15676 .serialize_entry(
15677 "validatorCount",
15678 &::buffa::json_helpers::ProtoJson(&self.validator_count),
15679 )?;
15680 }
15681 if !::buffa::json_helpers::skip_if::is_zero_u32(
15682 &self.required_approvals,
15683 ) {
15684 __map
15685 .serialize_entry(
15686 "requiredApprovals",
15687 &::buffa::json_helpers::ProtoJson(&self.required_approvals),
15688 )?;
15689 }
15690 if !::buffa::json_helpers::skip_if::is_zero_u32(
15691 &self.required_rejections,
15692 ) {
15693 __map
15694 .serialize_entry(
15695 "requiredRejections",
15696 &::buffa::json_helpers::ProtoJson(&self.required_rejections),
15697 )?;
15698 }
15699 if !::buffa::json_helpers::skip_if::is_zero_u64(
15700 &self.occurred_at_unix_ms,
15701 ) {
15702 __map
15703 .serialize_entry(
15704 "occurredAtUnixMs",
15705 &::buffa::json_helpers::ProtoJson(&self.occurred_at_unix_ms),
15706 )?;
15707 }
15708 if !::buffa::json_helpers::skip_if::is_zero_u64(
15709 &self.block_time_moving_average_ms,
15710 ) {
15711 __map
15712 .serialize_entry(
15713 "blockTimeMovingAverageMs",
15714 &::buffa::json_helpers::ProtoJson(
15715 &self.block_time_moving_average_ms,
15716 ),
15717 )?;
15718 }
15719 if !self.activities.is_empty() {
15720 __map.serialize_entry("activities", &*self.activities)?;
15721 }
15722 __map.end()
15723 }
15724 }
15725 impl<'a> ::buffa::MessageName for FlowStepViewView<'a> {
15726 const PACKAGE: &'static str = "chain.lifecycle.v1";
15727 const NAME: &'static str = "FlowStepView";
15728 const FULL_NAME: &'static str = "chain.lifecycle.v1.FlowStepView";
15729 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowStepView";
15730 }
15731 ::buffa::impl_default_view_instance!(FlowStepViewView);
15732 ::buffa::impl_view_reborrow!(FlowStepViewView);
15733 #[derive(Clone, Debug)]
15739 pub struct FlowStepViewOwnedView(::buffa::OwnedView<FlowStepViewView<'static>>);
15740 impl FlowStepViewOwnedView {
15741 pub fn decode(
15751 bytes: ::buffa::bytes::Bytes,
15752 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
15753 ::core::result::Result::Ok(
15754 FlowStepViewOwnedView(::buffa::OwnedView::decode(bytes)?),
15755 )
15756 }
15757 pub fn decode_with_options(
15765 bytes: ::buffa::bytes::Bytes,
15766 opts: &::buffa::DecodeOptions,
15767 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
15768 ::core::result::Result::Ok(
15769 FlowStepViewOwnedView(
15770 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
15771 ),
15772 )
15773 }
15774 pub fn from_owned(
15781 msg: &super::super::FlowStepView,
15782 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
15783 ::core::result::Result::Ok(
15784 FlowStepViewOwnedView(::buffa::OwnedView::from_owned(msg)?),
15785 )
15786 }
15787 #[must_use]
15789 pub fn view(&self) -> &FlowStepViewView<'_> {
15790 self.0.reborrow()
15791 }
15792 pub fn to_owned_message(
15799 &self,
15800 ) -> ::core::result::Result<
15801 super::super::FlowStepView,
15802 ::buffa::DecodeError,
15803 > {
15804 self.0.to_owned_message()
15805 }
15806 #[must_use]
15808 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
15809 self.0.bytes()
15810 }
15811 #[must_use]
15813 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
15814 self.0.into_bytes()
15815 }
15816 #[must_use]
15820 pub fn sequence(&self) -> u32 {
15821 self.0.reborrow().sequence
15822 }
15823 #[must_use]
15827 pub fn step(&self) -> ::buffa::EnumValue<super::super::FlowStep> {
15828 self.0.reborrow().step
15829 }
15830 #[must_use]
15834 pub fn asset_ids(
15835 &self,
15836 ) -> &::buffa::MessageFieldView<
15837 super::super::__buffa::view::AssetIdsView<'_>,
15838 > {
15839 &self.0.reborrow().asset_ids
15840 }
15841 #[must_use]
15845 pub fn polyester_chain_id(&self) -> u32 {
15846 self.0.reborrow().polyester_chain_id
15847 }
15848 #[must_use]
15853 pub fn amount_e18(
15854 &self,
15855 ) -> &::buffa::MessageFieldView<
15856 super::super::super::super::super::polyester::r#type::v1::__buffa::view::U128View<
15857 '_,
15858 >,
15859 > {
15860 &self.0.reborrow().amount_e18
15861 }
15862 #[must_use]
15866 pub fn request_fee(
15867 &self,
15868 ) -> &::buffa::MessageFieldView<
15869 super::super::__buffa::view::RequestFeeView<'_>,
15870 > {
15871 &self.0.reborrow().request_fee
15872 }
15873 #[must_use]
15877 pub fn milestone_tx_ref(&self) -> &'_ str {
15878 self.0.reborrow().milestone_tx_ref
15879 }
15880 #[must_use]
15884 pub fn lifecycle_source(
15885 &self,
15886 ) -> ::buffa::EnumValue<super::super::LifecycleSource> {
15887 self.0.reborrow().lifecycle_source
15888 }
15889 #[must_use]
15893 pub fn lifecycle_reason(
15894 &self,
15895 ) -> ::buffa::EnumValue<super::super::LifecycleReason> {
15896 self.0.reborrow().lifecycle_reason
15897 }
15898 #[must_use]
15902 pub fn zipper_reason(
15903 &self,
15904 ) -> &::buffa::MessageFieldView<
15905 super::super::super::super::zipper::v1::__buffa::view::ZipperReasonDetailsView<
15906 '_,
15907 >,
15908 > {
15909 &self.0.reborrow().zipper_reason
15910 }
15911 #[must_use]
15915 pub fn current_confirmations(&self) -> u32 {
15916 self.0.reborrow().current_confirmations
15917 }
15918 #[must_use]
15922 pub fn required_confirmations(&self) -> u32 {
15923 self.0.reborrow().required_confirmations
15924 }
15925 #[must_use]
15929 pub fn approve_count(&self) -> u32 {
15930 self.0.reborrow().approve_count
15931 }
15932 #[must_use]
15936 pub fn reject_count(&self) -> u32 {
15937 self.0.reborrow().reject_count
15938 }
15939 #[must_use]
15943 pub fn validator_count(&self) -> u32 {
15944 self.0.reborrow().validator_count
15945 }
15946 #[must_use]
15950 pub fn required_approvals(&self) -> u32 {
15951 self.0.reborrow().required_approvals
15952 }
15953 #[must_use]
15957 pub fn required_rejections(&self) -> u32 {
15958 self.0.reborrow().required_rejections
15959 }
15960 #[must_use]
15964 pub fn occurred_at_unix_ms(&self) -> u64 {
15965 self.0.reborrow().occurred_at_unix_ms
15966 }
15967 #[must_use]
15971 pub fn block_time_moving_average_ms(&self) -> u64 {
15972 self.0.reborrow().block_time_moving_average_ms
15973 }
15974 #[must_use]
15980 pub fn activities(
15981 &self,
15982 ) -> &::buffa::RepeatedView<
15983 '_,
15984 super::super::__buffa::view::FlowStepActivityViewView<'_>,
15985 > {
15986 &self.0.reborrow().activities
15987 }
15988 }
15989 impl ::core::convert::From<::buffa::OwnedView<FlowStepViewView<'static>>>
15990 for FlowStepViewOwnedView {
15991 fn from(inner: ::buffa::OwnedView<FlowStepViewView<'static>>) -> Self {
15992 FlowStepViewOwnedView(inner)
15993 }
15994 }
15995 impl ::core::convert::From<FlowStepViewOwnedView>
15996 for ::buffa::OwnedView<FlowStepViewView<'static>> {
15997 fn from(wrapper: FlowStepViewOwnedView) -> Self {
15998 wrapper.0
15999 }
16000 }
16001 impl ::core::convert::AsRef<::buffa::OwnedView<FlowStepViewView<'static>>>
16002 for FlowStepViewOwnedView {
16003 fn as_ref(&self) -> &::buffa::OwnedView<FlowStepViewView<'static>> {
16004 &self.0
16005 }
16006 }
16007 impl ::buffa::HasMessageView for super::super::FlowStepView {
16008 type View<'a> = FlowStepViewView<'a>;
16009 type ViewHandle = FlowStepViewOwnedView;
16010 }
16011 impl ::serde::Serialize for FlowStepViewOwnedView {
16012 fn serialize<__S: ::serde::Serializer>(
16013 &self,
16014 __s: __S,
16015 ) -> ::core::result::Result<__S::Ok, __S::Error> {
16016 ::serde::Serialize::serialize(&self.0, __s)
16017 }
16018 }
16019 #[derive(Clone, Debug, Default)]
16021 pub struct FlowStepActivityViewView<'a> {
16022 pub sequence: u32,
16026 pub tx_ref: &'a str,
16030 pub occurred_at_unix_ms: u64,
16034 pub lifecycle_source: ::buffa::EnumValue<super::super::LifecycleSource>,
16038 pub lifecycle_reason: ::buffa::EnumValue<super::super::LifecycleReason>,
16042 pub zipper_reason: ::buffa::MessageFieldView<
16046 super::super::super::super::zipper::v1::__buffa::view::ZipperReasonDetailsView<
16047 'a,
16048 >,
16049 >,
16050 pub current_confirmations: u32,
16054 pub required_confirmations: u32,
16058 pub approve_count: u32,
16062 pub reject_count: u32,
16066 pub validator_count: u32,
16070 pub kind: ::buffa::EnumValue<super::super::FlowStepActivityKind>,
16074 pub required_approvals: u32,
16078 pub required_rejections: u32,
16082 pub amount_e18: ::buffa::MessageFieldView<
16088 super::super::super::super::super::polyester::r#type::v1::__buffa::view::U128View<
16089 'a,
16090 >,
16091 >,
16092 pub ledger_transfer_id: &'a str,
16096 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
16097 }
16098 impl<'a> ::buffa::MessageView<'a> for FlowStepActivityViewView<'a> {
16099 type Owned = super::super::FlowStepActivityView;
16100 fn decode_view(
16101 buf: &'a [u8],
16102 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
16103 let __limit = ::core::cell::Cell::new(
16104 ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
16105 );
16106 <Self as ::buffa::MessageView>::decode_view_ctx(
16107 buf,
16108 ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
16109 )
16110 }
16111 fn decode_view_with_ctx(
16112 buf: &'a [u8],
16113 ctx: ::buffa::DecodeContext<'_>,
16114 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
16115 <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
16116 }
16117 fn merge_view_field(
16118 &mut self,
16119 tag: ::buffa::encoding::Tag,
16120 cur: &'a [u8],
16121 before_tag: &'a [u8],
16122 ctx: ::buffa::DecodeContext<'_>,
16123 ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
16124 let _ = ctx;
16125 #[allow(unused_variables)]
16126 let view = self;
16127 let mut cur = cur;
16128 match tag.field_number() {
16129 1u32 => {
16130 ::buffa::encoding::check_wire_type(
16131 tag,
16132 ::buffa::encoding::WireType::Varint,
16133 )?;
16134 view.sequence = ::buffa::types::decode_uint32(&mut cur)?;
16135 }
16136 2u32 => {
16137 ::buffa::encoding::check_wire_type(
16138 tag,
16139 ::buffa::encoding::WireType::LengthDelimited,
16140 )?;
16141 view.tx_ref = ::buffa::types::borrow_str(&mut cur)?;
16142 }
16143 3u32 => {
16144 ::buffa::encoding::check_wire_type(
16145 tag,
16146 ::buffa::encoding::WireType::Varint,
16147 )?;
16148 view.occurred_at_unix_ms = ::buffa::types::decode_uint64(
16149 &mut cur,
16150 )?;
16151 }
16152 4u32 => {
16153 ::buffa::encoding::check_wire_type(
16154 tag,
16155 ::buffa::encoding::WireType::Varint,
16156 )?;
16157 view.lifecycle_source = ::buffa::EnumValue::from(
16158 ::buffa::types::decode_int32(&mut cur)?,
16159 );
16160 }
16161 5u32 => {
16162 ::buffa::encoding::check_wire_type(
16163 tag,
16164 ::buffa::encoding::WireType::Varint,
16165 )?;
16166 view.lifecycle_reason = ::buffa::EnumValue::from(
16167 ::buffa::types::decode_int32(&mut cur)?,
16168 );
16169 }
16170 16u32 => {
16171 ::buffa::encoding::check_wire_type(
16172 tag,
16173 ::buffa::encoding::WireType::LengthDelimited,
16174 )?;
16175 let __sub_ctx = ctx.descend()?;
16176 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
16177 match view.zipper_reason.as_mut() {
16178 Some(existing) => {
16179 ::buffa::MessageView::merge_into_view(
16180 existing,
16181 sub,
16182 __sub_ctx,
16183 )?
16184 }
16185 None => {
16186 view.zipper_reason = ::buffa::MessageFieldView::set(
16187 <super::super::super::super::zipper::v1::__buffa::view::ZipperReasonDetailsView as ::buffa::MessageView>::decode_view_ctx(
16188 sub,
16189 __sub_ctx,
16190 )?,
16191 );
16192 }
16193 }
16194 }
16195 6u32 => {
16196 ::buffa::encoding::check_wire_type(
16197 tag,
16198 ::buffa::encoding::WireType::Varint,
16199 )?;
16200 view.current_confirmations = ::buffa::types::decode_uint32(
16201 &mut cur,
16202 )?;
16203 }
16204 7u32 => {
16205 ::buffa::encoding::check_wire_type(
16206 tag,
16207 ::buffa::encoding::WireType::Varint,
16208 )?;
16209 view.required_confirmations = ::buffa::types::decode_uint32(
16210 &mut cur,
16211 )?;
16212 }
16213 8u32 => {
16214 ::buffa::encoding::check_wire_type(
16215 tag,
16216 ::buffa::encoding::WireType::Varint,
16217 )?;
16218 view.approve_count = ::buffa::types::decode_uint32(&mut cur)?;
16219 }
16220 9u32 => {
16221 ::buffa::encoding::check_wire_type(
16222 tag,
16223 ::buffa::encoding::WireType::Varint,
16224 )?;
16225 view.reject_count = ::buffa::types::decode_uint32(&mut cur)?;
16226 }
16227 10u32 => {
16228 ::buffa::encoding::check_wire_type(
16229 tag,
16230 ::buffa::encoding::WireType::Varint,
16231 )?;
16232 view.validator_count = ::buffa::types::decode_uint32(&mut cur)?;
16233 }
16234 11u32 => {
16235 ::buffa::encoding::check_wire_type(
16236 tag,
16237 ::buffa::encoding::WireType::Varint,
16238 )?;
16239 view.kind = ::buffa::EnumValue::from(
16240 ::buffa::types::decode_int32(&mut cur)?,
16241 );
16242 }
16243 12u32 => {
16244 ::buffa::encoding::check_wire_type(
16245 tag,
16246 ::buffa::encoding::WireType::Varint,
16247 )?;
16248 view.required_approvals = ::buffa::types::decode_uint32(
16249 &mut cur,
16250 )?;
16251 }
16252 13u32 => {
16253 ::buffa::encoding::check_wire_type(
16254 tag,
16255 ::buffa::encoding::WireType::Varint,
16256 )?;
16257 view.required_rejections = ::buffa::types::decode_uint32(
16258 &mut cur,
16259 )?;
16260 }
16261 14u32 => {
16262 ::buffa::encoding::check_wire_type(
16263 tag,
16264 ::buffa::encoding::WireType::LengthDelimited,
16265 )?;
16266 let __sub_ctx = ctx.descend()?;
16267 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
16268 match view.amount_e18.as_mut() {
16269 Some(existing) => {
16270 ::buffa::MessageView::merge_into_view(
16271 existing,
16272 sub,
16273 __sub_ctx,
16274 )?
16275 }
16276 None => {
16277 view.amount_e18 = ::buffa::MessageFieldView::set(
16278 <super::super::super::super::super::polyester::r#type::v1::__buffa::view::U128View as ::buffa::MessageView>::decode_view_ctx(
16279 sub,
16280 __sub_ctx,
16281 )?,
16282 );
16283 }
16284 }
16285 }
16286 15u32 => {
16287 ::buffa::encoding::check_wire_type(
16288 tag,
16289 ::buffa::encoding::WireType::LengthDelimited,
16290 )?;
16291 view.ledger_transfer_id = ::buffa::types::borrow_str(&mut cur)?;
16292 }
16293 _ => {
16294 ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
16295 let span_len = before_tag.len() - cur.len();
16296 view.__buffa_unknown_fields
16297 .push_record(before_tag, span_len, ctx)?;
16298 }
16299 }
16300 ::core::result::Result::Ok(cur)
16301 }
16302 fn to_owned_message(
16303 &self,
16304 ) -> ::core::result::Result<
16305 super::super::FlowStepActivityView,
16306 ::buffa::DecodeError,
16307 > {
16308 self.to_owned_from_source(None)
16309 }
16310 #[allow(clippy::useless_conversion, clippy::needless_update)]
16311 fn to_owned_from_source(
16312 &self,
16313 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
16314 ) -> ::core::result::Result<
16315 super::super::FlowStepActivityView,
16316 ::buffa::DecodeError,
16317 > {
16318 #[allow(unused_imports)]
16319 use ::buffa::alloc::string::ToString as _;
16320 let _ = __buffa_src;
16321 ::core::result::Result::Ok(super::super::FlowStepActivityView {
16322 sequence: self.sequence,
16323 tx_ref: self.tx_ref.to_string(),
16324 occurred_at_unix_ms: self.occurred_at_unix_ms,
16325 lifecycle_source: self.lifecycle_source,
16326 lifecycle_reason: self.lifecycle_reason,
16327 zipper_reason: match self.zipper_reason.as_option() {
16328 Some(v) => {
16329 ::buffa::MessageField::<
16330 super::super::super::super::zipper::v1::ZipperReasonDetails,
16331 >::some(v.to_owned_from_source(__buffa_src)?)
16332 }
16333 None => ::buffa::MessageField::none(),
16334 },
16335 current_confirmations: self.current_confirmations,
16336 required_confirmations: self.required_confirmations,
16337 approve_count: self.approve_count,
16338 reject_count: self.reject_count,
16339 validator_count: self.validator_count,
16340 kind: self.kind,
16341 required_approvals: self.required_approvals,
16342 required_rejections: self.required_rejections,
16343 amount_e18: match self.amount_e18.as_option() {
16344 Some(v) => {
16345 ::buffa::MessageField::<
16346 super::super::super::super::super::polyester::r#type::v1::U128,
16347 >::some(v.to_owned_from_source(__buffa_src)?)
16348 }
16349 None => ::buffa::MessageField::none(),
16350 },
16351 ledger_transfer_id: self.ledger_transfer_id.to_string(),
16352 __buffa_unknown_fields: self
16353 .__buffa_unknown_fields
16354 .to_owned()?
16355 .into(),
16356 ..::core::default::Default::default()
16357 })
16358 }
16359 }
16360 impl<'a> ::buffa::ViewEncode<'a> for FlowStepActivityViewView<'a> {
16361 #[allow(clippy::needless_borrow, clippy::let_and_return)]
16362 fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
16363 #[allow(unused_imports)]
16364 use ::buffa::Enumeration as _;
16365 let mut size = 0u32;
16366 if self.sequence != 0u32 {
16367 size
16368 += 1u32
16369 + ::buffa::types::uint32_encoded_len(self.sequence) as u32;
16370 }
16371 if !self.tx_ref.is_empty() {
16372 size
16373 += 1u32
16374 + ::buffa::types::string_encoded_len(&self.tx_ref) as u32;
16375 }
16376 if self.occurred_at_unix_ms != 0u64 {
16377 size
16378 += 1u32
16379 + ::buffa::types::uint64_encoded_len(
16380 self.occurred_at_unix_ms,
16381 ) as u32;
16382 }
16383 {
16384 let val = self.lifecycle_source.to_i32();
16385 if val != 0 {
16386 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
16387 }
16388 }
16389 {
16390 let val = self.lifecycle_reason.to_i32();
16391 if val != 0 {
16392 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
16393 }
16394 }
16395 if self.current_confirmations != 0u32 {
16396 size
16397 += 1u32
16398 + ::buffa::types::uint32_encoded_len(
16399 self.current_confirmations,
16400 ) as u32;
16401 }
16402 if self.required_confirmations != 0u32 {
16403 size
16404 += 1u32
16405 + ::buffa::types::uint32_encoded_len(
16406 self.required_confirmations,
16407 ) as u32;
16408 }
16409 if self.approve_count != 0u32 {
16410 size
16411 += 1u32
16412 + ::buffa::types::uint32_encoded_len(self.approve_count)
16413 as u32;
16414 }
16415 if self.reject_count != 0u32 {
16416 size
16417 += 1u32
16418 + ::buffa::types::uint32_encoded_len(self.reject_count)
16419 as u32;
16420 }
16421 if self.validator_count != 0u32 {
16422 size
16423 += 1u32
16424 + ::buffa::types::uint32_encoded_len(self.validator_count)
16425 as u32;
16426 }
16427 {
16428 let val = self.kind.to_i32();
16429 if val != 0 {
16430 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
16431 }
16432 }
16433 if self.required_approvals != 0u32 {
16434 size
16435 += 1u32
16436 + ::buffa::types::uint32_encoded_len(self.required_approvals)
16437 as u32;
16438 }
16439 if self.required_rejections != 0u32 {
16440 size
16441 += 1u32
16442 + ::buffa::types::uint32_encoded_len(
16443 self.required_rejections,
16444 ) as u32;
16445 }
16446 if self.amount_e18.is_set() {
16447 let __slot = __cache.reserve();
16448 let inner_size = self.amount_e18.compute_size(__cache);
16449 __cache.set(__slot, inner_size);
16450 size
16451 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
16452 + inner_size;
16453 }
16454 if !self.ledger_transfer_id.is_empty() {
16455 size
16456 += 1u32
16457 + ::buffa::types::string_encoded_len(
16458 &self.ledger_transfer_id,
16459 ) as u32;
16460 }
16461 if self.zipper_reason.is_set() {
16462 let __slot = __cache.reserve();
16463 let inner_size = self.zipper_reason.compute_size(__cache);
16464 __cache.set(__slot, inner_size);
16465 size
16466 += 2u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
16467 + inner_size;
16468 }
16469 size += self.__buffa_unknown_fields.encoded_len() as u32;
16470 size
16471 }
16472 #[allow(clippy::needless_borrow)]
16473 fn write_to(
16474 &self,
16475 __cache: &mut ::buffa::SizeCache,
16476 buf: &mut impl ::buffa::bytes::BufMut,
16477 ) {
16478 #[allow(unused_imports)]
16479 use ::buffa::Enumeration as _;
16480 if self.sequence != 0u32 {
16481 ::buffa::types::put_uint32_field(1u32, self.sequence, buf);
16482 }
16483 if !self.tx_ref.is_empty() {
16484 ::buffa::types::put_string_field(2u32, &self.tx_ref, buf);
16485 }
16486 if self.occurred_at_unix_ms != 0u64 {
16487 ::buffa::types::put_uint64_field(
16488 3u32,
16489 self.occurred_at_unix_ms,
16490 buf,
16491 );
16492 }
16493 {
16494 let val = self.lifecycle_source.to_i32();
16495 if val != 0 {
16496 ::buffa::types::put_int32_field(4u32, val, buf);
16497 }
16498 }
16499 {
16500 let val = self.lifecycle_reason.to_i32();
16501 if val != 0 {
16502 ::buffa::types::put_int32_field(5u32, val, buf);
16503 }
16504 }
16505 if self.current_confirmations != 0u32 {
16506 ::buffa::types::put_uint32_field(
16507 6u32,
16508 self.current_confirmations,
16509 buf,
16510 );
16511 }
16512 if self.required_confirmations != 0u32 {
16513 ::buffa::types::put_uint32_field(
16514 7u32,
16515 self.required_confirmations,
16516 buf,
16517 );
16518 }
16519 if self.approve_count != 0u32 {
16520 ::buffa::types::put_uint32_field(8u32, self.approve_count, buf);
16521 }
16522 if self.reject_count != 0u32 {
16523 ::buffa::types::put_uint32_field(9u32, self.reject_count, buf);
16524 }
16525 if self.validator_count != 0u32 {
16526 ::buffa::types::put_uint32_field(10u32, self.validator_count, buf);
16527 }
16528 {
16529 let val = self.kind.to_i32();
16530 if val != 0 {
16531 ::buffa::types::put_int32_field(11u32, val, buf);
16532 }
16533 }
16534 if self.required_approvals != 0u32 {
16535 ::buffa::types::put_uint32_field(
16536 12u32,
16537 self.required_approvals,
16538 buf,
16539 );
16540 }
16541 if self.required_rejections != 0u32 {
16542 ::buffa::types::put_uint32_field(
16543 13u32,
16544 self.required_rejections,
16545 buf,
16546 );
16547 }
16548 if self.amount_e18.is_set() {
16549 ::buffa::types::put_len_delimited_header(
16550 14u32,
16551 __cache.consume_next(),
16552 buf,
16553 );
16554 self.amount_e18.write_to(__cache, buf);
16555 }
16556 if !self.ledger_transfer_id.is_empty() {
16557 ::buffa::types::put_string_field(
16558 15u32,
16559 &self.ledger_transfer_id,
16560 buf,
16561 );
16562 }
16563 if self.zipper_reason.is_set() {
16564 ::buffa::types::put_len_delimited_header(
16565 16u32,
16566 __cache.consume_next(),
16567 buf,
16568 );
16569 self.zipper_reason.write_to(__cache, buf);
16570 }
16571 self.__buffa_unknown_fields.write_to(buf);
16572 }
16573 }
16574 impl<'__a> ::serde::Serialize for FlowStepActivityViewView<'__a> {
16586 fn serialize<__S: ::serde::Serializer>(
16587 &self,
16588 __s: __S,
16589 ) -> ::core::result::Result<__S::Ok, __S::Error> {
16590 use ::serde::ser::SerializeMap as _;
16591 let mut __map = __s.serialize_map(::core::option::Option::None)?;
16592 if !::buffa::json_helpers::skip_if::is_zero_u32(&self.sequence) {
16593 __map
16594 .serialize_entry(
16595 "sequence",
16596 &::buffa::json_helpers::ProtoJson(&self.sequence),
16597 )?;
16598 }
16599 if !::buffa::json_helpers::skip_if::is_empty_str(self.tx_ref) {
16600 __map.serialize_entry("txRef", self.tx_ref)?;
16601 }
16602 if !::buffa::json_helpers::skip_if::is_zero_u64(
16603 &self.occurred_at_unix_ms,
16604 ) {
16605 __map
16606 .serialize_entry(
16607 "occurredAtUnixMs",
16608 &::buffa::json_helpers::ProtoJson(&self.occurred_at_unix_ms),
16609 )?;
16610 }
16611 if !::buffa::json_helpers::skip_if::is_default_enum_value(
16612 &self.lifecycle_source,
16613 ) {
16614 __map.serialize_entry("lifecycleSource", &self.lifecycle_source)?;
16615 }
16616 if !::buffa::json_helpers::skip_if::is_default_enum_value(
16617 &self.lifecycle_reason,
16618 ) {
16619 __map.serialize_entry("lifecycleReason", &self.lifecycle_reason)?;
16620 }
16621 {
16622 if let ::core::option::Option::Some(__v) = self
16623 .zipper_reason
16624 .as_option()
16625 {
16626 __map.serialize_entry("zipperReason", __v)?;
16627 }
16628 }
16629 if !::buffa::json_helpers::skip_if::is_zero_u32(
16630 &self.current_confirmations,
16631 ) {
16632 __map
16633 .serialize_entry(
16634 "currentConfirmations",
16635 &::buffa::json_helpers::ProtoJson(
16636 &self.current_confirmations,
16637 ),
16638 )?;
16639 }
16640 if !::buffa::json_helpers::skip_if::is_zero_u32(
16641 &self.required_confirmations,
16642 ) {
16643 __map
16644 .serialize_entry(
16645 "requiredConfirmations",
16646 &::buffa::json_helpers::ProtoJson(
16647 &self.required_confirmations,
16648 ),
16649 )?;
16650 }
16651 if !::buffa::json_helpers::skip_if::is_zero_u32(&self.approve_count) {
16652 __map
16653 .serialize_entry(
16654 "approveCount",
16655 &::buffa::json_helpers::ProtoJson(&self.approve_count),
16656 )?;
16657 }
16658 if !::buffa::json_helpers::skip_if::is_zero_u32(&self.reject_count) {
16659 __map
16660 .serialize_entry(
16661 "rejectCount",
16662 &::buffa::json_helpers::ProtoJson(&self.reject_count),
16663 )?;
16664 }
16665 if !::buffa::json_helpers::skip_if::is_zero_u32(&self.validator_count) {
16666 __map
16667 .serialize_entry(
16668 "validatorCount",
16669 &::buffa::json_helpers::ProtoJson(&self.validator_count),
16670 )?;
16671 }
16672 if !::buffa::json_helpers::skip_if::is_default_enum_value(&self.kind) {
16673 __map.serialize_entry("kind", &self.kind)?;
16674 }
16675 if !::buffa::json_helpers::skip_if::is_zero_u32(
16676 &self.required_approvals,
16677 ) {
16678 __map
16679 .serialize_entry(
16680 "requiredApprovals",
16681 &::buffa::json_helpers::ProtoJson(&self.required_approvals),
16682 )?;
16683 }
16684 if !::buffa::json_helpers::skip_if::is_zero_u32(
16685 &self.required_rejections,
16686 ) {
16687 __map
16688 .serialize_entry(
16689 "requiredRejections",
16690 &::buffa::json_helpers::ProtoJson(&self.required_rejections),
16691 )?;
16692 }
16693 {
16694 if let ::core::option::Option::Some(__v) = self
16695 .amount_e18
16696 .as_option()
16697 {
16698 __map.serialize_entry("amountE18", __v)?;
16699 }
16700 }
16701 if !::buffa::json_helpers::skip_if::is_empty_str(
16702 self.ledger_transfer_id,
16703 ) {
16704 __map.serialize_entry("ledgerTransferId", self.ledger_transfer_id)?;
16705 }
16706 __map.end()
16707 }
16708 }
16709 impl<'a> ::buffa::MessageName for FlowStepActivityViewView<'a> {
16710 const PACKAGE: &'static str = "chain.lifecycle.v1";
16711 const NAME: &'static str = "FlowStepActivityView";
16712 const FULL_NAME: &'static str = "chain.lifecycle.v1.FlowStepActivityView";
16713 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowStepActivityView";
16714 }
16715 ::buffa::impl_default_view_instance!(FlowStepActivityViewView);
16716 ::buffa::impl_view_reborrow!(FlowStepActivityViewView);
16717 #[derive(Clone, Debug)]
16723 pub struct FlowStepActivityViewOwnedView(
16724 ::buffa::OwnedView<FlowStepActivityViewView<'static>>,
16725 );
16726 impl FlowStepActivityViewOwnedView {
16727 pub fn decode(
16737 bytes: ::buffa::bytes::Bytes,
16738 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
16739 ::core::result::Result::Ok(
16740 FlowStepActivityViewOwnedView(::buffa::OwnedView::decode(bytes)?),
16741 )
16742 }
16743 pub fn decode_with_options(
16751 bytes: ::buffa::bytes::Bytes,
16752 opts: &::buffa::DecodeOptions,
16753 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
16754 ::core::result::Result::Ok(
16755 FlowStepActivityViewOwnedView(
16756 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
16757 ),
16758 )
16759 }
16760 pub fn from_owned(
16767 msg: &super::super::FlowStepActivityView,
16768 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
16769 ::core::result::Result::Ok(
16770 FlowStepActivityViewOwnedView(::buffa::OwnedView::from_owned(msg)?),
16771 )
16772 }
16773 #[must_use]
16775 pub fn view(&self) -> &FlowStepActivityViewView<'_> {
16776 self.0.reborrow()
16777 }
16778 pub fn to_owned_message(
16785 &self,
16786 ) -> ::core::result::Result<
16787 super::super::FlowStepActivityView,
16788 ::buffa::DecodeError,
16789 > {
16790 self.0.to_owned_message()
16791 }
16792 #[must_use]
16794 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
16795 self.0.bytes()
16796 }
16797 #[must_use]
16799 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
16800 self.0.into_bytes()
16801 }
16802 #[must_use]
16806 pub fn sequence(&self) -> u32 {
16807 self.0.reborrow().sequence
16808 }
16809 #[must_use]
16813 pub fn tx_ref(&self) -> &'_ str {
16814 self.0.reborrow().tx_ref
16815 }
16816 #[must_use]
16820 pub fn occurred_at_unix_ms(&self) -> u64 {
16821 self.0.reborrow().occurred_at_unix_ms
16822 }
16823 #[must_use]
16827 pub fn lifecycle_source(
16828 &self,
16829 ) -> ::buffa::EnumValue<super::super::LifecycleSource> {
16830 self.0.reborrow().lifecycle_source
16831 }
16832 #[must_use]
16836 pub fn lifecycle_reason(
16837 &self,
16838 ) -> ::buffa::EnumValue<super::super::LifecycleReason> {
16839 self.0.reborrow().lifecycle_reason
16840 }
16841 #[must_use]
16845 pub fn zipper_reason(
16846 &self,
16847 ) -> &::buffa::MessageFieldView<
16848 super::super::super::super::zipper::v1::__buffa::view::ZipperReasonDetailsView<
16849 '_,
16850 >,
16851 > {
16852 &self.0.reborrow().zipper_reason
16853 }
16854 #[must_use]
16858 pub fn current_confirmations(&self) -> u32 {
16859 self.0.reborrow().current_confirmations
16860 }
16861 #[must_use]
16865 pub fn required_confirmations(&self) -> u32 {
16866 self.0.reborrow().required_confirmations
16867 }
16868 #[must_use]
16872 pub fn approve_count(&self) -> u32 {
16873 self.0.reborrow().approve_count
16874 }
16875 #[must_use]
16879 pub fn reject_count(&self) -> u32 {
16880 self.0.reborrow().reject_count
16881 }
16882 #[must_use]
16886 pub fn validator_count(&self) -> u32 {
16887 self.0.reborrow().validator_count
16888 }
16889 #[must_use]
16893 pub fn kind(
16894 &self,
16895 ) -> ::buffa::EnumValue<super::super::FlowStepActivityKind> {
16896 self.0.reborrow().kind
16897 }
16898 #[must_use]
16902 pub fn required_approvals(&self) -> u32 {
16903 self.0.reborrow().required_approvals
16904 }
16905 #[must_use]
16909 pub fn required_rejections(&self) -> u32 {
16910 self.0.reborrow().required_rejections
16911 }
16912 #[must_use]
16918 pub fn amount_e18(
16919 &self,
16920 ) -> &::buffa::MessageFieldView<
16921 super::super::super::super::super::polyester::r#type::v1::__buffa::view::U128View<
16922 '_,
16923 >,
16924 > {
16925 &self.0.reborrow().amount_e18
16926 }
16927 #[must_use]
16931 pub fn ledger_transfer_id(&self) -> &'_ str {
16932 self.0.reborrow().ledger_transfer_id
16933 }
16934 }
16935 impl ::core::convert::From<::buffa::OwnedView<FlowStepActivityViewView<'static>>>
16936 for FlowStepActivityViewOwnedView {
16937 fn from(
16938 inner: ::buffa::OwnedView<FlowStepActivityViewView<'static>>,
16939 ) -> Self {
16940 FlowStepActivityViewOwnedView(inner)
16941 }
16942 }
16943 impl ::core::convert::From<FlowStepActivityViewOwnedView>
16944 for ::buffa::OwnedView<FlowStepActivityViewView<'static>> {
16945 fn from(wrapper: FlowStepActivityViewOwnedView) -> Self {
16946 wrapper.0
16947 }
16948 }
16949 impl ::core::convert::AsRef<
16950 ::buffa::OwnedView<FlowStepActivityViewView<'static>>,
16951 > for FlowStepActivityViewOwnedView {
16952 fn as_ref(&self) -> &::buffa::OwnedView<FlowStepActivityViewView<'static>> {
16953 &self.0
16954 }
16955 }
16956 impl ::buffa::HasMessageView for super::super::FlowStepActivityView {
16957 type View<'a> = FlowStepActivityViewView<'a>;
16958 type ViewHandle = FlowStepActivityViewOwnedView;
16959 }
16960 impl ::serde::Serialize for FlowStepActivityViewOwnedView {
16961 fn serialize<__S: ::serde::Serializer>(
16962 &self,
16963 __s: __S,
16964 ) -> ::core::result::Result<__S::Ok, __S::Error> {
16965 ::serde::Serialize::serialize(&self.0, __s)
16966 }
16967 }
16968 #[derive(Clone, Debug, Default)]
16971 pub struct FlowTimelineItemViewView<'a> {
16972 pub sequence: u32,
16976 pub step: ::buffa::EnumValue<super::super::FlowStep>,
16980 pub status: ::buffa::EnumValue<super::super::FlowTimelineStatus>,
16984 pub expected_duration_ms: u64,
16989 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
16990 }
16991 impl<'a> ::buffa::MessageView<'a> for FlowTimelineItemViewView<'a> {
16992 type Owned = super::super::FlowTimelineItemView;
16993 fn decode_view(
16994 buf: &'a [u8],
16995 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
16996 let __limit = ::core::cell::Cell::new(
16997 ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
16998 );
16999 <Self as ::buffa::MessageView>::decode_view_ctx(
17000 buf,
17001 ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
17002 )
17003 }
17004 fn decode_view_with_ctx(
17005 buf: &'a [u8],
17006 ctx: ::buffa::DecodeContext<'_>,
17007 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
17008 <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
17009 }
17010 fn merge_view_field(
17011 &mut self,
17012 tag: ::buffa::encoding::Tag,
17013 cur: &'a [u8],
17014 before_tag: &'a [u8],
17015 ctx: ::buffa::DecodeContext<'_>,
17016 ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
17017 let _ = ctx;
17018 #[allow(unused_variables)]
17019 let view = self;
17020 let mut cur = cur;
17021 match tag.field_number() {
17022 1u32 => {
17023 ::buffa::encoding::check_wire_type(
17024 tag,
17025 ::buffa::encoding::WireType::Varint,
17026 )?;
17027 view.sequence = ::buffa::types::decode_uint32(&mut cur)?;
17028 }
17029 2u32 => {
17030 ::buffa::encoding::check_wire_type(
17031 tag,
17032 ::buffa::encoding::WireType::Varint,
17033 )?;
17034 view.step = ::buffa::EnumValue::from(
17035 ::buffa::types::decode_int32(&mut cur)?,
17036 );
17037 }
17038 3u32 => {
17039 ::buffa::encoding::check_wire_type(
17040 tag,
17041 ::buffa::encoding::WireType::Varint,
17042 )?;
17043 view.status = ::buffa::EnumValue::from(
17044 ::buffa::types::decode_int32(&mut cur)?,
17045 );
17046 }
17047 4u32 => {
17048 ::buffa::encoding::check_wire_type(
17049 tag,
17050 ::buffa::encoding::WireType::Varint,
17051 )?;
17052 view.expected_duration_ms = ::buffa::types::decode_uint64(
17053 &mut cur,
17054 )?;
17055 }
17056 _ => {
17057 ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
17058 let span_len = before_tag.len() - cur.len();
17059 view.__buffa_unknown_fields
17060 .push_record(before_tag, span_len, ctx)?;
17061 }
17062 }
17063 ::core::result::Result::Ok(cur)
17064 }
17065 fn to_owned_message(
17066 &self,
17067 ) -> ::core::result::Result<
17068 super::super::FlowTimelineItemView,
17069 ::buffa::DecodeError,
17070 > {
17071 self.to_owned_from_source(None)
17072 }
17073 #[allow(clippy::useless_conversion, clippy::needless_update)]
17074 fn to_owned_from_source(
17075 &self,
17076 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
17077 ) -> ::core::result::Result<
17078 super::super::FlowTimelineItemView,
17079 ::buffa::DecodeError,
17080 > {
17081 #[allow(unused_imports)]
17082 use ::buffa::alloc::string::ToString as _;
17083 let _ = __buffa_src;
17084 ::core::result::Result::Ok(super::super::FlowTimelineItemView {
17085 sequence: self.sequence,
17086 step: self.step,
17087 status: self.status,
17088 expected_duration_ms: self.expected_duration_ms,
17089 __buffa_unknown_fields: self
17090 .__buffa_unknown_fields
17091 .to_owned()?
17092 .into(),
17093 ..::core::default::Default::default()
17094 })
17095 }
17096 }
17097 impl<'a> ::buffa::ViewEncode<'a> for FlowTimelineItemViewView<'a> {
17098 #[allow(clippy::needless_borrow, clippy::let_and_return)]
17099 fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
17100 #[allow(unused_imports)]
17101 use ::buffa::Enumeration as _;
17102 let mut size = 0u32;
17103 if self.sequence != 0u32 {
17104 size
17105 += 1u32
17106 + ::buffa::types::uint32_encoded_len(self.sequence) as u32;
17107 }
17108 {
17109 let val = self.step.to_i32();
17110 if val != 0 {
17111 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
17112 }
17113 }
17114 {
17115 let val = self.status.to_i32();
17116 if val != 0 {
17117 size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
17118 }
17119 }
17120 if self.expected_duration_ms != 0u64 {
17121 size
17122 += 1u32
17123 + ::buffa::types::uint64_encoded_len(
17124 self.expected_duration_ms,
17125 ) as u32;
17126 }
17127 size += self.__buffa_unknown_fields.encoded_len() as u32;
17128 size
17129 }
17130 #[allow(clippy::needless_borrow)]
17131 fn write_to(
17132 &self,
17133 _cache: &mut ::buffa::SizeCache,
17134 buf: &mut impl ::buffa::bytes::BufMut,
17135 ) {
17136 #[allow(unused_imports)]
17137 use ::buffa::Enumeration as _;
17138 if self.sequence != 0u32 {
17139 ::buffa::types::put_uint32_field(1u32, self.sequence, buf);
17140 }
17141 {
17142 let val = self.step.to_i32();
17143 if val != 0 {
17144 ::buffa::types::put_int32_field(2u32, val, buf);
17145 }
17146 }
17147 {
17148 let val = self.status.to_i32();
17149 if val != 0 {
17150 ::buffa::types::put_int32_field(3u32, val, buf);
17151 }
17152 }
17153 if self.expected_duration_ms != 0u64 {
17154 ::buffa::types::put_uint64_field(
17155 4u32,
17156 self.expected_duration_ms,
17157 buf,
17158 );
17159 }
17160 self.__buffa_unknown_fields.write_to(buf);
17161 }
17162 }
17163 impl<'__a> ::serde::Serialize for FlowTimelineItemViewView<'__a> {
17175 fn serialize<__S: ::serde::Serializer>(
17176 &self,
17177 __s: __S,
17178 ) -> ::core::result::Result<__S::Ok, __S::Error> {
17179 use ::serde::ser::SerializeMap as _;
17180 let mut __map = __s.serialize_map(::core::option::Option::None)?;
17181 if !::buffa::json_helpers::skip_if::is_zero_u32(&self.sequence) {
17182 __map
17183 .serialize_entry(
17184 "sequence",
17185 &::buffa::json_helpers::ProtoJson(&self.sequence),
17186 )?;
17187 }
17188 if !::buffa::json_helpers::skip_if::is_default_enum_value(&self.step) {
17189 __map.serialize_entry("step", &self.step)?;
17190 }
17191 if !::buffa::json_helpers::skip_if::is_default_enum_value(&self.status) {
17192 __map.serialize_entry("status", &self.status)?;
17193 }
17194 if !::buffa::json_helpers::skip_if::is_zero_u64(
17195 &self.expected_duration_ms,
17196 ) {
17197 __map
17198 .serialize_entry(
17199 "expectedDurationMs",
17200 &::buffa::json_helpers::ProtoJson(&self.expected_duration_ms),
17201 )?;
17202 }
17203 __map.end()
17204 }
17205 }
17206 impl<'a> ::buffa::MessageName for FlowTimelineItemViewView<'a> {
17207 const PACKAGE: &'static str = "chain.lifecycle.v1";
17208 const NAME: &'static str = "FlowTimelineItemView";
17209 const FULL_NAME: &'static str = "chain.lifecycle.v1.FlowTimelineItemView";
17210 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowTimelineItemView";
17211 }
17212 ::buffa::impl_default_view_instance!(FlowTimelineItemViewView);
17213 ::buffa::impl_view_reborrow!(FlowTimelineItemViewView);
17214 #[derive(Clone, Debug)]
17220 pub struct FlowTimelineItemViewOwnedView(
17221 ::buffa::OwnedView<FlowTimelineItemViewView<'static>>,
17222 );
17223 impl FlowTimelineItemViewOwnedView {
17224 pub fn decode(
17234 bytes: ::buffa::bytes::Bytes,
17235 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
17236 ::core::result::Result::Ok(
17237 FlowTimelineItemViewOwnedView(::buffa::OwnedView::decode(bytes)?),
17238 )
17239 }
17240 pub fn decode_with_options(
17248 bytes: ::buffa::bytes::Bytes,
17249 opts: &::buffa::DecodeOptions,
17250 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
17251 ::core::result::Result::Ok(
17252 FlowTimelineItemViewOwnedView(
17253 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
17254 ),
17255 )
17256 }
17257 pub fn from_owned(
17264 msg: &super::super::FlowTimelineItemView,
17265 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
17266 ::core::result::Result::Ok(
17267 FlowTimelineItemViewOwnedView(::buffa::OwnedView::from_owned(msg)?),
17268 )
17269 }
17270 #[must_use]
17272 pub fn view(&self) -> &FlowTimelineItemViewView<'_> {
17273 self.0.reborrow()
17274 }
17275 pub fn to_owned_message(
17282 &self,
17283 ) -> ::core::result::Result<
17284 super::super::FlowTimelineItemView,
17285 ::buffa::DecodeError,
17286 > {
17287 self.0.to_owned_message()
17288 }
17289 #[must_use]
17291 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
17292 self.0.bytes()
17293 }
17294 #[must_use]
17296 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
17297 self.0.into_bytes()
17298 }
17299 #[must_use]
17303 pub fn sequence(&self) -> u32 {
17304 self.0.reborrow().sequence
17305 }
17306 #[must_use]
17310 pub fn step(&self) -> ::buffa::EnumValue<super::super::FlowStep> {
17311 self.0.reborrow().step
17312 }
17313 #[must_use]
17317 pub fn status(
17318 &self,
17319 ) -> ::buffa::EnumValue<super::super::FlowTimelineStatus> {
17320 self.0.reborrow().status
17321 }
17322 #[must_use]
17327 pub fn expected_duration_ms(&self) -> u64 {
17328 self.0.reborrow().expected_duration_ms
17329 }
17330 }
17331 impl ::core::convert::From<::buffa::OwnedView<FlowTimelineItemViewView<'static>>>
17332 for FlowTimelineItemViewOwnedView {
17333 fn from(
17334 inner: ::buffa::OwnedView<FlowTimelineItemViewView<'static>>,
17335 ) -> Self {
17336 FlowTimelineItemViewOwnedView(inner)
17337 }
17338 }
17339 impl ::core::convert::From<FlowTimelineItemViewOwnedView>
17340 for ::buffa::OwnedView<FlowTimelineItemViewView<'static>> {
17341 fn from(wrapper: FlowTimelineItemViewOwnedView) -> Self {
17342 wrapper.0
17343 }
17344 }
17345 impl ::core::convert::AsRef<
17346 ::buffa::OwnedView<FlowTimelineItemViewView<'static>>,
17347 > for FlowTimelineItemViewOwnedView {
17348 fn as_ref(&self) -> &::buffa::OwnedView<FlowTimelineItemViewView<'static>> {
17349 &self.0
17350 }
17351 }
17352 impl ::buffa::HasMessageView for super::super::FlowTimelineItemView {
17353 type View<'a> = FlowTimelineItemViewView<'a>;
17354 type ViewHandle = FlowTimelineItemViewOwnedView;
17355 }
17356 impl ::serde::Serialize for FlowTimelineItemViewOwnedView {
17357 fn serialize<__S: ::serde::Serializer>(
17358 &self,
17359 __s: __S,
17360 ) -> ::core::result::Result<__S::Ok, __S::Error> {
17361 ::serde::Serialize::serialize(&self.0, __s)
17362 }
17363 }
17364 #[derive(Clone, Debug, Default)]
17366 pub struct FlowDetailViewView<'a> {
17367 pub summary: ::buffa::MessageFieldView<
17371 super::super::__buffa::view::FlowSummaryViewView<'a>,
17372 >,
17373 pub observed_steps: ::buffa::RepeatedView<
17378 'a,
17379 super::super::__buffa::view::FlowStepViewView<'a>,
17380 >,
17381 pub from_live_state: bool,
17386 pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
17387 }
17388 impl<'a> ::buffa::MessageView<'a> for FlowDetailViewView<'a> {
17389 type Owned = super::super::FlowDetailView;
17390 fn decode_view(
17391 buf: &'a [u8],
17392 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
17393 let __limit = ::core::cell::Cell::new(
17394 ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
17395 );
17396 <Self as ::buffa::MessageView>::decode_view_ctx(
17397 buf,
17398 ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
17399 )
17400 }
17401 fn decode_view_with_ctx(
17402 buf: &'a [u8],
17403 ctx: ::buffa::DecodeContext<'_>,
17404 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
17405 <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
17406 }
17407 fn merge_view_field(
17408 &mut self,
17409 tag: ::buffa::encoding::Tag,
17410 cur: &'a [u8],
17411 before_tag: &'a [u8],
17412 ctx: ::buffa::DecodeContext<'_>,
17413 ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
17414 let _ = ctx;
17415 #[allow(unused_variables)]
17416 let view = self;
17417 let mut cur = cur;
17418 match tag.field_number() {
17419 1u32 => {
17420 ::buffa::encoding::check_wire_type(
17421 tag,
17422 ::buffa::encoding::WireType::LengthDelimited,
17423 )?;
17424 let __sub_ctx = ctx.descend()?;
17425 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
17426 match view.summary.as_mut() {
17427 Some(existing) => {
17428 ::buffa::MessageView::merge_into_view(
17429 existing,
17430 sub,
17431 __sub_ctx,
17432 )?
17433 }
17434 None => {
17435 view.summary = ::buffa::MessageFieldView::set(
17436 <super::super::__buffa::view::FlowSummaryViewView as ::buffa::MessageView>::decode_view_ctx(
17437 sub,
17438 __sub_ctx,
17439 )?,
17440 );
17441 }
17442 }
17443 }
17444 3u32 => {
17445 ::buffa::encoding::check_wire_type(
17446 tag,
17447 ::buffa::encoding::WireType::Varint,
17448 )?;
17449 view.from_live_state = ::buffa::types::decode_bool(&mut cur)?;
17450 }
17451 2u32 => {
17452 ::buffa::encoding::check_wire_type(
17453 tag,
17454 ::buffa::encoding::WireType::LengthDelimited,
17455 )?;
17456 let __sub_ctx = ctx.descend()?;
17457 let sub = ::buffa::types::borrow_bytes(&mut cur)?;
17458 view.observed_steps
17459 .push(
17460 <super::super::__buffa::view::FlowStepViewView as ::buffa::MessageView>::decode_view_ctx(
17461 sub,
17462 __sub_ctx,
17463 )?,
17464 );
17465 }
17466 _ => {
17467 ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
17468 let span_len = before_tag.len() - cur.len();
17469 view.__buffa_unknown_fields
17470 .push_record(before_tag, span_len, ctx)?;
17471 }
17472 }
17473 ::core::result::Result::Ok(cur)
17474 }
17475 fn to_owned_message(
17476 &self,
17477 ) -> ::core::result::Result<
17478 super::super::FlowDetailView,
17479 ::buffa::DecodeError,
17480 > {
17481 self.to_owned_from_source(None)
17482 }
17483 #[allow(clippy::useless_conversion, clippy::needless_update)]
17484 fn to_owned_from_source(
17485 &self,
17486 __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
17487 ) -> ::core::result::Result<
17488 super::super::FlowDetailView,
17489 ::buffa::DecodeError,
17490 > {
17491 #[allow(unused_imports)]
17492 use ::buffa::alloc::string::ToString as _;
17493 let _ = __buffa_src;
17494 ::core::result::Result::Ok(super::super::FlowDetailView {
17495 summary: match self.summary.as_option() {
17496 Some(v) => {
17497 ::buffa::MessageField::<
17498 super::super::FlowSummaryView,
17499 >::some(v.to_owned_from_source(__buffa_src)?)
17500 }
17501 None => ::buffa::MessageField::none(),
17502 },
17503 observed_steps: self
17504 .observed_steps
17505 .iter()
17506 .map(|v| v.to_owned_from_source(__buffa_src))
17507 .collect::<::core::result::Result<_, ::buffa::DecodeError>>()?,
17508 from_live_state: self.from_live_state,
17509 __buffa_unknown_fields: self
17510 .__buffa_unknown_fields
17511 .to_owned()?
17512 .into(),
17513 ..::core::default::Default::default()
17514 })
17515 }
17516 }
17517 impl<'a> ::buffa::ViewEncode<'a> for FlowDetailViewView<'a> {
17518 #[allow(clippy::needless_borrow, clippy::let_and_return)]
17519 fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
17520 #[allow(unused_imports)]
17521 use ::buffa::Enumeration as _;
17522 let mut size = 0u32;
17523 if self.summary.is_set() {
17524 let __slot = __cache.reserve();
17525 let inner_size = self.summary.compute_size(__cache);
17526 __cache.set(__slot, inner_size);
17527 size
17528 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
17529 + inner_size;
17530 }
17531 for v in &self.observed_steps {
17532 let __slot = __cache.reserve();
17533 let inner_size = v.compute_size(__cache);
17534 __cache.set(__slot, inner_size);
17535 size
17536 += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
17537 + inner_size;
17538 }
17539 if self.from_live_state {
17540 size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
17541 }
17542 size += self.__buffa_unknown_fields.encoded_len() as u32;
17543 size
17544 }
17545 #[allow(clippy::needless_borrow)]
17546 fn write_to(
17547 &self,
17548 __cache: &mut ::buffa::SizeCache,
17549 buf: &mut impl ::buffa::bytes::BufMut,
17550 ) {
17551 #[allow(unused_imports)]
17552 use ::buffa::Enumeration as _;
17553 if self.summary.is_set() {
17554 ::buffa::types::put_len_delimited_header(
17555 1u32,
17556 __cache.consume_next(),
17557 buf,
17558 );
17559 self.summary.write_to(__cache, buf);
17560 }
17561 for v in &self.observed_steps {
17562 ::buffa::types::put_len_delimited_header(
17563 2u32,
17564 __cache.consume_next(),
17565 buf,
17566 );
17567 v.write_to(__cache, buf);
17568 }
17569 if self.from_live_state {
17570 ::buffa::types::put_bool_field(3u32, self.from_live_state, buf);
17571 }
17572 self.__buffa_unknown_fields.write_to(buf);
17573 }
17574 }
17575 impl<'__a> ::serde::Serialize for FlowDetailViewView<'__a> {
17587 fn serialize<__S: ::serde::Serializer>(
17588 &self,
17589 __s: __S,
17590 ) -> ::core::result::Result<__S::Ok, __S::Error> {
17591 use ::serde::ser::SerializeMap as _;
17592 let mut __map = __s.serialize_map(::core::option::Option::None)?;
17593 {
17594 if let ::core::option::Option::Some(__v) = self.summary.as_option() {
17595 __map.serialize_entry("summary", __v)?;
17596 }
17597 }
17598 if !self.observed_steps.is_empty() {
17599 __map.serialize_entry("observedSteps", &*self.observed_steps)?;
17600 }
17601 if self.from_live_state {
17602 __map.serialize_entry("fromLiveState", &self.from_live_state)?;
17603 }
17604 __map.end()
17605 }
17606 }
17607 impl<'a> ::buffa::MessageName for FlowDetailViewView<'a> {
17608 const PACKAGE: &'static str = "chain.lifecycle.v1";
17609 const NAME: &'static str = "FlowDetailView";
17610 const FULL_NAME: &'static str = "chain.lifecycle.v1.FlowDetailView";
17611 const TYPE_URL: &'static str = "type.googleapis.com/chain.lifecycle.v1.FlowDetailView";
17612 }
17613 ::buffa::impl_default_view_instance!(FlowDetailViewView);
17614 ::buffa::impl_view_reborrow!(FlowDetailViewView);
17615 #[derive(Clone, Debug)]
17621 pub struct FlowDetailViewOwnedView(
17622 ::buffa::OwnedView<FlowDetailViewView<'static>>,
17623 );
17624 impl FlowDetailViewOwnedView {
17625 pub fn decode(
17635 bytes: ::buffa::bytes::Bytes,
17636 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
17637 ::core::result::Result::Ok(
17638 FlowDetailViewOwnedView(::buffa::OwnedView::decode(bytes)?),
17639 )
17640 }
17641 pub fn decode_with_options(
17649 bytes: ::buffa::bytes::Bytes,
17650 opts: &::buffa::DecodeOptions,
17651 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
17652 ::core::result::Result::Ok(
17653 FlowDetailViewOwnedView(
17654 ::buffa::OwnedView::decode_with_options(bytes, opts)?,
17655 ),
17656 )
17657 }
17658 pub fn from_owned(
17665 msg: &super::super::FlowDetailView,
17666 ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
17667 ::core::result::Result::Ok(
17668 FlowDetailViewOwnedView(::buffa::OwnedView::from_owned(msg)?),
17669 )
17670 }
17671 #[must_use]
17673 pub fn view(&self) -> &FlowDetailViewView<'_> {
17674 self.0.reborrow()
17675 }
17676 pub fn to_owned_message(
17683 &self,
17684 ) -> ::core::result::Result<
17685 super::super::FlowDetailView,
17686 ::buffa::DecodeError,
17687 > {
17688 self.0.to_owned_message()
17689 }
17690 #[must_use]
17692 pub fn bytes(&self) -> &::buffa::bytes::Bytes {
17693 self.0.bytes()
17694 }
17695 #[must_use]
17697 pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
17698 self.0.into_bytes()
17699 }
17700 #[must_use]
17704 pub fn summary(
17705 &self,
17706 ) -> &::buffa::MessageFieldView<
17707 super::super::__buffa::view::FlowSummaryViewView<'_>,
17708 > {
17709 &self.0.reborrow().summary
17710 }
17711 #[must_use]
17716 pub fn observed_steps(
17717 &self,
17718 ) -> &::buffa::RepeatedView<
17719 '_,
17720 super::super::__buffa::view::FlowStepViewView<'_>,
17721 > {
17722 &self.0.reborrow().observed_steps
17723 }
17724 #[must_use]
17729 pub fn from_live_state(&self) -> bool {
17730 self.0.reborrow().from_live_state
17731 }
17732 }
17733 impl ::core::convert::From<::buffa::OwnedView<FlowDetailViewView<'static>>>
17734 for FlowDetailViewOwnedView {
17735 fn from(inner: ::buffa::OwnedView<FlowDetailViewView<'static>>) -> Self {
17736 FlowDetailViewOwnedView(inner)
17737 }
17738 }
17739 impl ::core::convert::From<FlowDetailViewOwnedView>
17740 for ::buffa::OwnedView<FlowDetailViewView<'static>> {
17741 fn from(wrapper: FlowDetailViewOwnedView) -> Self {
17742 wrapper.0
17743 }
17744 }
17745 impl ::core::convert::AsRef<::buffa::OwnedView<FlowDetailViewView<'static>>>
17746 for FlowDetailViewOwnedView {
17747 fn as_ref(&self) -> &::buffa::OwnedView<FlowDetailViewView<'static>> {
17748 &self.0
17749 }
17750 }
17751 impl ::buffa::HasMessageView for super::super::FlowDetailView {
17752 type View<'a> = FlowDetailViewView<'a>;
17753 type ViewHandle = FlowDetailViewOwnedView;
17754 }
17755 impl ::serde::Serialize for FlowDetailViewOwnedView {
17756 fn serialize<__S: ::serde::Serializer>(
17757 &self,
17758 __s: __S,
17759 ) -> ::core::result::Result<__S::Ok, __S::Error> {
17760 ::serde::Serialize::serialize(&self.0, __s)
17761 }
17762 }
17763 pub mod oneof {
17764 #[allow(unused_imports)]
17765 use super::*;
17766 pub mod list_flows_request {
17767 #[allow(unused_imports)]
17768 use super::*;
17769 #[derive(Clone, Debug)]
17770 pub enum AccountSelector<'a> {
17771 OwnerAccountId(u64),
17772 SmartAccountAddress(&'a str),
17773 }
17774 }
17775 }
17776 }
17777 pub mod oneof {
17778 #[allow(unused_imports)]
17779 use super::*;
17780 pub mod list_flows_request {
17781 #[allow(unused_imports)]
17782 use super::*;
17783 #[derive(Clone, PartialEq, Debug)]
17786 pub enum AccountSelector {
17787 OwnerAccountId(u64),
17788 SmartAccountAddress(::buffa::alloc::string::String),
17789 }
17790 impl ::buffa::Oneof for AccountSelector {}
17791 impl serde::Serialize for AccountSelector {
17792 fn serialize<S: serde::Serializer>(
17793 &self,
17794 s: S,
17795 ) -> ::core::result::Result<S::Ok, S::Error> {
17796 use serde::ser::SerializeMap;
17797 let mut map = s.serialize_map(Some(1))?;
17798 match self {
17799 Self::OwnerAccountId(v) => {
17800 map.serialize_entry(
17801 "ownerAccountId",
17802 &::buffa::json_helpers::ProtoJson(v),
17803 )?;
17804 }
17805 Self::SmartAccountAddress(v) => {
17806 map.serialize_entry("smartAccountAddress", v)?;
17807 }
17808 }
17809 map.end()
17810 }
17811 }
17812 }
17813 }
17814 pub fn register_types(reg: &mut ::buffa::type_registry::TypeRegistry) {
17816 reg.register_json_any(super::__ASSET_IDS_JSON_ANY);
17817 reg.register_json_any(super::__REQUEST_FEE_JSON_ANY);
17818 reg.register_json_any(super::__GET_FLOW_RESPONSE_JSON_ANY);
17819 reg.register_json_any(super::__GET_FLOW_BY_ID_REQUEST_JSON_ANY);
17820 reg.register_json_any(super::__LIST_FLOWS_BY_TX_REQUEST_JSON_ANY);
17821 reg.register_json_any(super::__LIST_FLOWS_REQUEST_JSON_ANY);
17822 reg.register_json_any(super::__LIST_FLOWS_RESPONSE_JSON_ANY);
17823 reg.register_json_any(super::__FLOW_TX_MATCH_VIEW_JSON_ANY);
17824 reg.register_json_any(super::__LIST_FLOWS_BY_TX_RESPONSE_JSON_ANY);
17825 reg.register_json_any(super::__FLOW_SUMMARY_VIEW_JSON_ANY);
17826 reg.register_json_any(super::__FLOW_SUMMARY_PROGRESS_VIEW_JSON_ANY);
17827 reg.register_json_any(super::__FLOW_STEP_VIEW_JSON_ANY);
17828 reg.register_json_any(super::__FLOW_STEP_ACTIVITY_VIEW_JSON_ANY);
17829 reg.register_json_any(super::__FLOW_TIMELINE_ITEM_VIEW_JSON_ANY);
17830 reg.register_json_any(super::__FLOW_DETAIL_VIEW_JSON_ANY);
17831 }
17832}
17833#[doc(inline)]
17834pub use self::__buffa::view::AssetIdsView;
17835#[doc(inline)]
17836pub use self::__buffa::view::AssetIdsOwnedView;
17837#[doc(inline)]
17838pub use self::__buffa::view::RequestFeeView;
17839#[doc(inline)]
17840pub use self::__buffa::view::RequestFeeOwnedView;
17841#[doc(inline)]
17842pub use self::__buffa::view::GetFlowResponseView;
17843#[doc(inline)]
17844pub use self::__buffa::view::GetFlowResponseOwnedView;
17845#[doc(inline)]
17846pub use self::__buffa::view::GetFlowByIdRequestView;
17847#[doc(inline)]
17848pub use self::__buffa::view::GetFlowByIdRequestOwnedView;
17849#[doc(inline)]
17850pub use self::__buffa::view::ListFlowsByTxRequestView;
17851#[doc(inline)]
17852pub use self::__buffa::view::ListFlowsByTxRequestOwnedView;
17853#[doc(inline)]
17854pub use self::__buffa::view::ListFlowsRequestView;
17855#[doc(inline)]
17856pub use self::__buffa::view::ListFlowsRequestOwnedView;
17857#[doc(inline)]
17858pub use self::__buffa::view::ListFlowsResponseView;
17859#[doc(inline)]
17860pub use self::__buffa::view::ListFlowsResponseOwnedView;
17861#[doc(inline)]
17862pub use self::__buffa::view::FlowTxMatchViewView;
17863#[doc(inline)]
17864pub use self::__buffa::view::FlowTxMatchViewOwnedView;
17865#[doc(inline)]
17866pub use self::__buffa::view::ListFlowsByTxResponseView;
17867#[doc(inline)]
17868pub use self::__buffa::view::ListFlowsByTxResponseOwnedView;
17869#[doc(inline)]
17870pub use self::__buffa::view::FlowSummaryViewView;
17871#[doc(inline)]
17872pub use self::__buffa::view::FlowSummaryViewOwnedView;
17873#[doc(inline)]
17874pub use self::__buffa::view::FlowSummaryProgressViewView;
17875#[doc(inline)]
17876pub use self::__buffa::view::FlowSummaryProgressViewOwnedView;
17877#[doc(inline)]
17878pub use self::__buffa::view::FlowStepViewView;
17879#[doc(inline)]
17880pub use self::__buffa::view::FlowStepViewOwnedView;
17881#[doc(inline)]
17882pub use self::__buffa::view::FlowStepActivityViewView;
17883#[doc(inline)]
17884pub use self::__buffa::view::FlowStepActivityViewOwnedView;
17885#[doc(inline)]
17886pub use self::__buffa::view::FlowTimelineItemViewView;
17887#[doc(inline)]
17888pub use self::__buffa::view::FlowTimelineItemViewOwnedView;
17889#[doc(inline)]
17890pub use self::__buffa::view::FlowDetailViewView;
17891#[doc(inline)]
17892pub use self::__buffa::view::FlowDetailViewOwnedView;
17893#[doc(inline)]
17894pub use self::__buffa::register_types;