1mod _accessor_impls {
2 #![allow(clippy::useless_conversion)]
3 impl super::AccumulatorWrite {
4 pub const fn const_default() -> Self {
5 Self {
6 address: None,
7 accumulator_type: None,
8 operation: None,
9 value_kind: None,
10 integer_value: None,
11 integer_tuple: Vec::new(),
12 event_digest_value: Vec::new(),
13 }
14 }
15 #[doc(hidden)]
16 pub fn default_instance() -> &'static Self {
17 static DEFAULT: super::AccumulatorWrite = super::AccumulatorWrite::const_default();
18 &DEFAULT
19 }
20 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
22 self.address.as_mut().map(|field| field as _)
23 }
24 pub fn address_mut(&mut self) -> &mut String {
27 self.address.get_or_insert_default()
28 }
29 pub fn address_opt(&self) -> Option<&str> {
31 self.address.as_ref().map(|field| field as _)
32 }
33 pub fn set_address<T: Into<String>>(&mut self, field: T) {
35 self.address = Some(field.into().into());
36 }
37 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
39 self.set_address(field.into());
40 self
41 }
42 pub fn accumulator_type_opt_mut(&mut self) -> Option<&mut String> {
44 self.accumulator_type.as_mut().map(|field| field as _)
45 }
46 pub fn accumulator_type_mut(&mut self) -> &mut String {
49 self.accumulator_type.get_or_insert_default()
50 }
51 pub fn accumulator_type_opt(&self) -> Option<&str> {
53 self.accumulator_type.as_ref().map(|field| field as _)
54 }
55 pub fn set_accumulator_type<T: Into<String>>(&mut self, field: T) {
57 self.accumulator_type = Some(field.into().into());
58 }
59 pub fn with_accumulator_type<T: Into<String>>(mut self, field: T) -> Self {
61 self.set_accumulator_type(field.into());
62 self
63 }
64 pub fn with_operation<T: Into<super::accumulator_write::AccumulatorOperation>>(
66 mut self,
67 field: T,
68 ) -> Self {
69 self.set_operation(field.into());
70 self
71 }
72 pub fn with_value_kind<T: Into<super::accumulator_write::AccumulatorValue>>(
74 mut self,
75 field: T,
76 ) -> Self {
77 self.set_value_kind(field.into());
78 self
79 }
80 pub fn integer_value_opt_mut(&mut self) -> Option<&mut u64> {
82 self.integer_value.as_mut().map(|field| field as _)
83 }
84 pub fn integer_value_mut(&mut self) -> &mut u64 {
87 self.integer_value.get_or_insert_default()
88 }
89 pub fn integer_value_opt(&self) -> Option<u64> {
91 self.integer_value.as_ref().map(|field| *field)
92 }
93 pub fn set_integer_value(&mut self, field: u64) {
95 self.integer_value = Some(field);
96 }
97 pub fn with_integer_value(mut self, field: u64) -> Self {
99 self.set_integer_value(field);
100 self
101 }
102 pub fn integer_tuple(&self) -> &[u64] {
104 &self.integer_tuple
105 }
106 pub fn integer_tuple_mut(&mut self) -> &mut Vec<u64> {
109 &mut self.integer_tuple
110 }
111 pub fn set_integer_tuple(&mut self, field: Vec<u64>) {
113 self.integer_tuple = field;
114 }
115 pub fn with_integer_tuple(mut self, field: Vec<u64>) -> Self {
117 self.set_integer_tuple(field);
118 self
119 }
120 pub fn event_digest_value(&self) -> &[super::EventDigestEntry] {
122 &self.event_digest_value
123 }
124 pub fn event_digest_value_mut(&mut self) -> &mut Vec<super::EventDigestEntry> {
127 &mut self.event_digest_value
128 }
129 pub fn set_event_digest_value(&mut self, field: Vec<super::EventDigestEntry>) {
131 self.event_digest_value = field;
132 }
133 pub fn with_event_digest_value(
135 mut self,
136 field: Vec<super::EventDigestEntry>,
137 ) -> Self {
138 self.set_event_digest_value(field);
139 self
140 }
141 }
142 impl super::ActiveJwk {
143 pub const fn const_default() -> Self {
144 Self {
145 id: None,
146 jwk: None,
147 epoch: None,
148 }
149 }
150 #[doc(hidden)]
151 pub fn default_instance() -> &'static Self {
152 static DEFAULT: super::ActiveJwk = super::ActiveJwk::const_default();
153 &DEFAULT
154 }
155 pub fn id(&self) -> &super::JwkId {
157 self.id
158 .as_ref()
159 .map(|field| field as _)
160 .unwrap_or_else(|| super::JwkId::default_instance() as _)
161 }
162 pub fn id_opt_mut(&mut self) -> Option<&mut super::JwkId> {
164 self.id.as_mut().map(|field| field as _)
165 }
166 pub fn id_mut(&mut self) -> &mut super::JwkId {
169 self.id.get_or_insert_default()
170 }
171 pub fn id_opt(&self) -> Option<&super::JwkId> {
173 self.id.as_ref().map(|field| field as _)
174 }
175 pub fn set_id<T: Into<super::JwkId>>(&mut self, field: T) {
177 self.id = Some(field.into().into());
178 }
179 pub fn with_id<T: Into<super::JwkId>>(mut self, field: T) -> Self {
181 self.set_id(field.into());
182 self
183 }
184 pub fn jwk(&self) -> &super::Jwk {
186 self.jwk
187 .as_ref()
188 .map(|field| field as _)
189 .unwrap_or_else(|| super::Jwk::default_instance() as _)
190 }
191 pub fn jwk_opt_mut(&mut self) -> Option<&mut super::Jwk> {
193 self.jwk.as_mut().map(|field| field as _)
194 }
195 pub fn jwk_mut(&mut self) -> &mut super::Jwk {
198 self.jwk.get_or_insert_default()
199 }
200 pub fn jwk_opt(&self) -> Option<&super::Jwk> {
202 self.jwk.as_ref().map(|field| field as _)
203 }
204 pub fn set_jwk<T: Into<super::Jwk>>(&mut self, field: T) {
206 self.jwk = Some(field.into().into());
207 }
208 pub fn with_jwk<T: Into<super::Jwk>>(mut self, field: T) -> Self {
210 self.set_jwk(field.into());
211 self
212 }
213 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
215 self.epoch.as_mut().map(|field| field as _)
216 }
217 pub fn epoch_mut(&mut self) -> &mut u64 {
220 self.epoch.get_or_insert_default()
221 }
222 pub fn epoch_opt(&self) -> Option<u64> {
224 self.epoch.as_ref().map(|field| *field)
225 }
226 pub fn set_epoch(&mut self, field: u64) {
228 self.epoch = Some(field);
229 }
230 pub fn with_epoch(mut self, field: u64) -> Self {
232 self.set_epoch(field);
233 self
234 }
235 }
236 impl super::AddressAliasesVersion {
237 pub const fn const_default() -> Self {
238 Self { version: None }
239 }
240 #[doc(hidden)]
241 pub fn default_instance() -> &'static Self {
242 static DEFAULT: super::AddressAliasesVersion = super::AddressAliasesVersion::const_default();
243 &DEFAULT
244 }
245 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
247 self.version.as_mut().map(|field| field as _)
248 }
249 pub fn version_mut(&mut self) -> &mut u64 {
252 self.version.get_or_insert_default()
253 }
254 pub fn version_opt(&self) -> Option<u64> {
256 self.version.as_ref().map(|field| *field)
257 }
258 pub fn set_version(&mut self, field: u64) {
260 self.version = Some(field);
261 }
262 pub fn with_version(mut self, field: u64) -> Self {
264 self.set_version(field);
265 self
266 }
267 }
268 impl super::AffectedAddressFilter {
269 pub const fn const_default() -> Self {
270 Self { address: None }
271 }
272 #[doc(hidden)]
273 pub fn default_instance() -> &'static Self {
274 static DEFAULT: super::AffectedAddressFilter = super::AffectedAddressFilter::const_default();
275 &DEFAULT
276 }
277 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
279 self.address.as_mut().map(|field| field as _)
280 }
281 pub fn address_mut(&mut self) -> &mut String {
284 self.address.get_or_insert_default()
285 }
286 pub fn address_opt(&self) -> Option<&str> {
288 self.address.as_ref().map(|field| field as _)
289 }
290 pub fn set_address<T: Into<String>>(&mut self, field: T) {
292 self.address = Some(field.into().into());
293 }
294 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
296 self.set_address(field.into());
297 self
298 }
299 }
300 impl super::AffectedObjectFilter {
301 pub const fn const_default() -> Self {
302 Self { object_id: None }
303 }
304 #[doc(hidden)]
305 pub fn default_instance() -> &'static Self {
306 static DEFAULT: super::AffectedObjectFilter = super::AffectedObjectFilter::const_default();
307 &DEFAULT
308 }
309 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
311 self.object_id.as_mut().map(|field| field as _)
312 }
313 pub fn object_id_mut(&mut self) -> &mut String {
316 self.object_id.get_or_insert_default()
317 }
318 pub fn object_id_opt(&self) -> Option<&str> {
320 self.object_id.as_ref().map(|field| field as _)
321 }
322 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
324 self.object_id = Some(field.into().into());
325 }
326 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
328 self.set_object_id(field.into());
329 self
330 }
331 }
332 impl super::Argument {
333 pub const fn const_default() -> Self {
334 Self {
335 kind: None,
336 input: None,
337 result: None,
338 subresult: None,
339 }
340 }
341 #[doc(hidden)]
342 pub fn default_instance() -> &'static Self {
343 static DEFAULT: super::Argument = super::Argument::const_default();
344 &DEFAULT
345 }
346 pub fn with_kind<T: Into<super::argument::ArgumentKind>>(
348 mut self,
349 field: T,
350 ) -> Self {
351 self.set_kind(field.into());
352 self
353 }
354 pub fn input_opt_mut(&mut self) -> Option<&mut u32> {
356 self.input.as_mut().map(|field| field as _)
357 }
358 pub fn input_mut(&mut self) -> &mut u32 {
361 self.input.get_or_insert_default()
362 }
363 pub fn input_opt(&self) -> Option<u32> {
365 self.input.as_ref().map(|field| *field)
366 }
367 pub fn set_input(&mut self, field: u32) {
369 self.input = Some(field);
370 }
371 pub fn with_input(mut self, field: u32) -> Self {
373 self.set_input(field);
374 self
375 }
376 pub fn result_opt_mut(&mut self) -> Option<&mut u32> {
378 self.result.as_mut().map(|field| field as _)
379 }
380 pub fn result_mut(&mut self) -> &mut u32 {
383 self.result.get_or_insert_default()
384 }
385 pub fn result_opt(&self) -> Option<u32> {
387 self.result.as_ref().map(|field| *field)
388 }
389 pub fn set_result(&mut self, field: u32) {
391 self.result = Some(field);
392 }
393 pub fn with_result(mut self, field: u32) -> Self {
395 self.set_result(field);
396 self
397 }
398 pub fn subresult_opt_mut(&mut self) -> Option<&mut u32> {
400 self.subresult.as_mut().map(|field| field as _)
401 }
402 pub fn subresult_mut(&mut self) -> &mut u32 {
405 self.subresult.get_or_insert_default()
406 }
407 pub fn subresult_opt(&self) -> Option<u32> {
409 self.subresult.as_ref().map(|field| *field)
410 }
411 pub fn set_subresult(&mut self, field: u32) {
413 self.subresult = Some(field);
414 }
415 pub fn with_subresult(mut self, field: u32) -> Self {
417 self.set_subresult(field);
418 self
419 }
420 }
421 impl super::AuthenticatorStateExpire {
422 pub const fn const_default() -> Self {
423 Self {
424 min_epoch: None,
425 authenticator_object_initial_shared_version: None,
426 }
427 }
428 #[doc(hidden)]
429 pub fn default_instance() -> &'static Self {
430 static DEFAULT: super::AuthenticatorStateExpire = super::AuthenticatorStateExpire::const_default();
431 &DEFAULT
432 }
433 pub fn min_epoch_opt_mut(&mut self) -> Option<&mut u64> {
435 self.min_epoch.as_mut().map(|field| field as _)
436 }
437 pub fn min_epoch_mut(&mut self) -> &mut u64 {
440 self.min_epoch.get_or_insert_default()
441 }
442 pub fn min_epoch_opt(&self) -> Option<u64> {
444 self.min_epoch.as_ref().map(|field| *field)
445 }
446 pub fn set_min_epoch(&mut self, field: u64) {
448 self.min_epoch = Some(field);
449 }
450 pub fn with_min_epoch(mut self, field: u64) -> Self {
452 self.set_min_epoch(field);
453 self
454 }
455 pub fn authenticator_object_initial_shared_version_opt_mut(
457 &mut self,
458 ) -> Option<&mut u64> {
459 self.authenticator_object_initial_shared_version
460 .as_mut()
461 .map(|field| field as _)
462 }
463 pub fn authenticator_object_initial_shared_version_mut(&mut self) -> &mut u64 {
466 self.authenticator_object_initial_shared_version.get_or_insert_default()
467 }
468 pub fn authenticator_object_initial_shared_version_opt(&self) -> Option<u64> {
470 self.authenticator_object_initial_shared_version.as_ref().map(|field| *field)
471 }
472 pub fn set_authenticator_object_initial_shared_version(&mut self, field: u64) {
474 self.authenticator_object_initial_shared_version = Some(field);
475 }
476 pub fn with_authenticator_object_initial_shared_version(
478 mut self,
479 field: u64,
480 ) -> Self {
481 self.set_authenticator_object_initial_shared_version(field);
482 self
483 }
484 }
485 impl super::AuthenticatorStateUpdate {
486 pub const fn const_default() -> Self {
487 Self {
488 epoch: None,
489 round: None,
490 new_active_jwks: Vec::new(),
491 authenticator_object_initial_shared_version: None,
492 }
493 }
494 #[doc(hidden)]
495 pub fn default_instance() -> &'static Self {
496 static DEFAULT: super::AuthenticatorStateUpdate = super::AuthenticatorStateUpdate::const_default();
497 &DEFAULT
498 }
499 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
501 self.epoch.as_mut().map(|field| field as _)
502 }
503 pub fn epoch_mut(&mut self) -> &mut u64 {
506 self.epoch.get_or_insert_default()
507 }
508 pub fn epoch_opt(&self) -> Option<u64> {
510 self.epoch.as_ref().map(|field| *field)
511 }
512 pub fn set_epoch(&mut self, field: u64) {
514 self.epoch = Some(field);
515 }
516 pub fn with_epoch(mut self, field: u64) -> Self {
518 self.set_epoch(field);
519 self
520 }
521 pub fn round_opt_mut(&mut self) -> Option<&mut u64> {
523 self.round.as_mut().map(|field| field as _)
524 }
525 pub fn round_mut(&mut self) -> &mut u64 {
528 self.round.get_or_insert_default()
529 }
530 pub fn round_opt(&self) -> Option<u64> {
532 self.round.as_ref().map(|field| *field)
533 }
534 pub fn set_round(&mut self, field: u64) {
536 self.round = Some(field);
537 }
538 pub fn with_round(mut self, field: u64) -> Self {
540 self.set_round(field);
541 self
542 }
543 pub fn new_active_jwks(&self) -> &[super::ActiveJwk] {
545 &self.new_active_jwks
546 }
547 pub fn new_active_jwks_mut(&mut self) -> &mut Vec<super::ActiveJwk> {
550 &mut self.new_active_jwks
551 }
552 pub fn set_new_active_jwks(&mut self, field: Vec<super::ActiveJwk>) {
554 self.new_active_jwks = field;
555 }
556 pub fn with_new_active_jwks(mut self, field: Vec<super::ActiveJwk>) -> Self {
558 self.set_new_active_jwks(field);
559 self
560 }
561 pub fn authenticator_object_initial_shared_version_opt_mut(
563 &mut self,
564 ) -> Option<&mut u64> {
565 self.authenticator_object_initial_shared_version
566 .as_mut()
567 .map(|field| field as _)
568 }
569 pub fn authenticator_object_initial_shared_version_mut(&mut self) -> &mut u64 {
572 self.authenticator_object_initial_shared_version.get_or_insert_default()
573 }
574 pub fn authenticator_object_initial_shared_version_opt(&self) -> Option<u64> {
576 self.authenticator_object_initial_shared_version.as_ref().map(|field| *field)
577 }
578 pub fn set_authenticator_object_initial_shared_version(&mut self, field: u64) {
580 self.authenticator_object_initial_shared_version = Some(field);
581 }
582 pub fn with_authenticator_object_initial_shared_version(
584 mut self,
585 field: u64,
586 ) -> Self {
587 self.set_authenticator_object_initial_shared_version(field);
588 self
589 }
590 }
591 impl super::Balance {
592 pub const fn const_default() -> Self {
593 Self {
594 coin_type: None,
595 balance: None,
596 address_balance: None,
597 coin_balance: None,
598 }
599 }
600 #[doc(hidden)]
601 pub fn default_instance() -> &'static Self {
602 static DEFAULT: super::Balance = super::Balance::const_default();
603 &DEFAULT
604 }
605 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
607 self.coin_type.as_mut().map(|field| field as _)
608 }
609 pub fn coin_type_mut(&mut self) -> &mut String {
612 self.coin_type.get_or_insert_default()
613 }
614 pub fn coin_type_opt(&self) -> Option<&str> {
616 self.coin_type.as_ref().map(|field| field as _)
617 }
618 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
620 self.coin_type = Some(field.into().into());
621 }
622 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
624 self.set_coin_type(field.into());
625 self
626 }
627 pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
629 self.balance.as_mut().map(|field| field as _)
630 }
631 pub fn balance_mut(&mut self) -> &mut u64 {
634 self.balance.get_or_insert_default()
635 }
636 pub fn balance_opt(&self) -> Option<u64> {
638 self.balance.as_ref().map(|field| *field)
639 }
640 pub fn set_balance(&mut self, field: u64) {
642 self.balance = Some(field);
643 }
644 pub fn with_balance(mut self, field: u64) -> Self {
646 self.set_balance(field);
647 self
648 }
649 pub fn address_balance_opt_mut(&mut self) -> Option<&mut u64> {
651 self.address_balance.as_mut().map(|field| field as _)
652 }
653 pub fn address_balance_mut(&mut self) -> &mut u64 {
656 self.address_balance.get_or_insert_default()
657 }
658 pub fn address_balance_opt(&self) -> Option<u64> {
660 self.address_balance.as_ref().map(|field| *field)
661 }
662 pub fn set_address_balance(&mut self, field: u64) {
664 self.address_balance = Some(field);
665 }
666 pub fn with_address_balance(mut self, field: u64) -> Self {
668 self.set_address_balance(field);
669 self
670 }
671 pub fn coin_balance_opt_mut(&mut self) -> Option<&mut u64> {
673 self.coin_balance.as_mut().map(|field| field as _)
674 }
675 pub fn coin_balance_mut(&mut self) -> &mut u64 {
678 self.coin_balance.get_or_insert_default()
679 }
680 pub fn coin_balance_opt(&self) -> Option<u64> {
682 self.coin_balance.as_ref().map(|field| *field)
683 }
684 pub fn set_coin_balance(&mut self, field: u64) {
686 self.coin_balance = Some(field);
687 }
688 pub fn with_coin_balance(mut self, field: u64) -> Self {
690 self.set_coin_balance(field);
691 self
692 }
693 }
694 impl super::BalanceChange {
695 pub const fn const_default() -> Self {
696 Self {
697 address: None,
698 coin_type: None,
699 amount: None,
700 }
701 }
702 #[doc(hidden)]
703 pub fn default_instance() -> &'static Self {
704 static DEFAULT: super::BalanceChange = super::BalanceChange::const_default();
705 &DEFAULT
706 }
707 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
709 self.address.as_mut().map(|field| field as _)
710 }
711 pub fn address_mut(&mut self) -> &mut String {
714 self.address.get_or_insert_default()
715 }
716 pub fn address_opt(&self) -> Option<&str> {
718 self.address.as_ref().map(|field| field as _)
719 }
720 pub fn set_address<T: Into<String>>(&mut self, field: T) {
722 self.address = Some(field.into().into());
723 }
724 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
726 self.set_address(field.into());
727 self
728 }
729 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
731 self.coin_type.as_mut().map(|field| field as _)
732 }
733 pub fn coin_type_mut(&mut self) -> &mut String {
736 self.coin_type.get_or_insert_default()
737 }
738 pub fn coin_type_opt(&self) -> Option<&str> {
740 self.coin_type.as_ref().map(|field| field as _)
741 }
742 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
744 self.coin_type = Some(field.into().into());
745 }
746 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
748 self.set_coin_type(field.into());
749 self
750 }
751 pub fn amount_opt_mut(&mut self) -> Option<&mut String> {
753 self.amount.as_mut().map(|field| field as _)
754 }
755 pub fn amount_mut(&mut self) -> &mut String {
758 self.amount.get_or_insert_default()
759 }
760 pub fn amount_opt(&self) -> Option<&str> {
762 self.amount.as_ref().map(|field| field as _)
763 }
764 pub fn set_amount<T: Into<String>>(&mut self, field: T) {
766 self.amount = Some(field.into().into());
767 }
768 pub fn with_amount<T: Into<String>>(mut self, field: T) -> Self {
770 self.set_amount(field.into());
771 self
772 }
773 }
774 impl super::BatchGetObjectsRequest {
775 pub const fn const_default() -> Self {
776 Self {
777 requests: Vec::new(),
778 read_mask: None,
779 }
780 }
781 #[doc(hidden)]
782 pub fn default_instance() -> &'static Self {
783 static DEFAULT: super::BatchGetObjectsRequest = super::BatchGetObjectsRequest::const_default();
784 &DEFAULT
785 }
786 pub fn requests(&self) -> &[super::GetObjectRequest] {
788 &self.requests
789 }
790 pub fn requests_mut(&mut self) -> &mut Vec<super::GetObjectRequest> {
793 &mut self.requests
794 }
795 pub fn set_requests(&mut self, field: Vec<super::GetObjectRequest>) {
797 self.requests = field;
798 }
799 pub fn with_requests(mut self, field: Vec<super::GetObjectRequest>) -> Self {
801 self.set_requests(field);
802 self
803 }
804 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
806 self.read_mask.as_mut().map(|field| field as _)
807 }
808 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
811 self.read_mask.get_or_insert_default()
812 }
813 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
815 self.read_mask.as_ref().map(|field| field as _)
816 }
817 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
819 self.read_mask = Some(field.into().into());
820 }
821 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
823 mut self,
824 field: T,
825 ) -> Self {
826 self.set_read_mask(field.into());
827 self
828 }
829 }
830 impl super::BatchGetObjectsResponse {
831 pub const fn const_default() -> Self {
832 Self { objects: Vec::new() }
833 }
834 #[doc(hidden)]
835 pub fn default_instance() -> &'static Self {
836 static DEFAULT: super::BatchGetObjectsResponse = super::BatchGetObjectsResponse::const_default();
837 &DEFAULT
838 }
839 pub fn objects(&self) -> &[super::GetObjectResult] {
841 &self.objects
842 }
843 pub fn objects_mut(&mut self) -> &mut Vec<super::GetObjectResult> {
846 &mut self.objects
847 }
848 pub fn set_objects(&mut self, field: Vec<super::GetObjectResult>) {
850 self.objects = field;
851 }
852 pub fn with_objects(mut self, field: Vec<super::GetObjectResult>) -> Self {
854 self.set_objects(field);
855 self
856 }
857 }
858 impl super::BatchGetTransactionsRequest {
859 pub const fn const_default() -> Self {
860 Self {
861 digests: Vec::new(),
862 read_mask: None,
863 }
864 }
865 #[doc(hidden)]
866 pub fn default_instance() -> &'static Self {
867 static DEFAULT: super::BatchGetTransactionsRequest = super::BatchGetTransactionsRequest::const_default();
868 &DEFAULT
869 }
870 pub fn digests(&self) -> &[String] {
872 &self.digests
873 }
874 pub fn digests_mut(&mut self) -> &mut Vec<String> {
877 &mut self.digests
878 }
879 pub fn set_digests(&mut self, field: Vec<String>) {
881 self.digests = field;
882 }
883 pub fn with_digests(mut self, field: Vec<String>) -> Self {
885 self.set_digests(field);
886 self
887 }
888 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
890 self.read_mask.as_mut().map(|field| field as _)
891 }
892 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
895 self.read_mask.get_or_insert_default()
896 }
897 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
899 self.read_mask.as_ref().map(|field| field as _)
900 }
901 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
903 self.read_mask = Some(field.into().into());
904 }
905 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
907 mut self,
908 field: T,
909 ) -> Self {
910 self.set_read_mask(field.into());
911 self
912 }
913 }
914 impl super::BatchGetTransactionsResponse {
915 pub const fn const_default() -> Self {
916 Self { transactions: Vec::new() }
917 }
918 #[doc(hidden)]
919 pub fn default_instance() -> &'static Self {
920 static DEFAULT: super::BatchGetTransactionsResponse = super::BatchGetTransactionsResponse::const_default();
921 &DEFAULT
922 }
923 pub fn transactions(&self) -> &[super::GetTransactionResult] {
925 &self.transactions
926 }
927 pub fn transactions_mut(&mut self) -> &mut Vec<super::GetTransactionResult> {
930 &mut self.transactions
931 }
932 pub fn set_transactions(&mut self, field: Vec<super::GetTransactionResult>) {
934 self.transactions = field;
935 }
936 pub fn with_transactions(
938 mut self,
939 field: Vec<super::GetTransactionResult>,
940 ) -> Self {
941 self.set_transactions(field);
942 self
943 }
944 }
945 impl super::Bcs {
946 pub const fn const_default() -> Self {
947 Self { name: None, value: None }
948 }
949 #[doc(hidden)]
950 pub fn default_instance() -> &'static Self {
951 static DEFAULT: super::Bcs = super::Bcs::const_default();
952 &DEFAULT
953 }
954 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
956 self.name.as_mut().map(|field| field as _)
957 }
958 pub fn name_mut(&mut self) -> &mut String {
961 self.name.get_or_insert_default()
962 }
963 pub fn name_opt(&self) -> Option<&str> {
965 self.name.as_ref().map(|field| field as _)
966 }
967 pub fn set_name<T: Into<String>>(&mut self, field: T) {
969 self.name = Some(field.into().into());
970 }
971 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
973 self.set_name(field.into());
974 self
975 }
976 pub fn value_opt(&self) -> Option<&[u8]> {
978 self.value.as_ref().map(|field| field as _)
979 }
980 pub fn set_value<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
982 self.value = Some(field.into().into());
983 }
984 pub fn with_value<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
986 self.set_value(field.into());
987 self
988 }
989 }
990 impl super::CanceledTransaction {
991 pub const fn const_default() -> Self {
992 Self {
993 digest: None,
994 version_assignments: Vec::new(),
995 }
996 }
997 #[doc(hidden)]
998 pub fn default_instance() -> &'static Self {
999 static DEFAULT: super::CanceledTransaction = super::CanceledTransaction::const_default();
1000 &DEFAULT
1001 }
1002 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1004 self.digest.as_mut().map(|field| field as _)
1005 }
1006 pub fn digest_mut(&mut self) -> &mut String {
1009 self.digest.get_or_insert_default()
1010 }
1011 pub fn digest_opt(&self) -> Option<&str> {
1013 self.digest.as_ref().map(|field| field as _)
1014 }
1015 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1017 self.digest = Some(field.into().into());
1018 }
1019 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1021 self.set_digest(field.into());
1022 self
1023 }
1024 pub fn version_assignments(&self) -> &[super::VersionAssignment] {
1026 &self.version_assignments
1027 }
1028 pub fn version_assignments_mut(&mut self) -> &mut Vec<super::VersionAssignment> {
1031 &mut self.version_assignments
1032 }
1033 pub fn set_version_assignments(&mut self, field: Vec<super::VersionAssignment>) {
1035 self.version_assignments = field;
1036 }
1037 pub fn with_version_assignments(
1039 mut self,
1040 field: Vec<super::VersionAssignment>,
1041 ) -> Self {
1042 self.set_version_assignments(field);
1043 self
1044 }
1045 }
1046 impl super::ChangeEpoch {
1047 pub const fn const_default() -> Self {
1048 Self {
1049 epoch: None,
1050 protocol_version: None,
1051 storage_charge: None,
1052 computation_charge: None,
1053 storage_rebate: None,
1054 non_refundable_storage_fee: None,
1055 epoch_start_timestamp: None,
1056 system_packages: Vec::new(),
1057 }
1058 }
1059 #[doc(hidden)]
1060 pub fn default_instance() -> &'static Self {
1061 static DEFAULT: super::ChangeEpoch = super::ChangeEpoch::const_default();
1062 &DEFAULT
1063 }
1064 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
1066 self.epoch.as_mut().map(|field| field as _)
1067 }
1068 pub fn epoch_mut(&mut self) -> &mut u64 {
1071 self.epoch.get_or_insert_default()
1072 }
1073 pub fn epoch_opt(&self) -> Option<u64> {
1075 self.epoch.as_ref().map(|field| *field)
1076 }
1077 pub fn set_epoch(&mut self, field: u64) {
1079 self.epoch = Some(field);
1080 }
1081 pub fn with_epoch(mut self, field: u64) -> Self {
1083 self.set_epoch(field);
1084 self
1085 }
1086 pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
1088 self.protocol_version.as_mut().map(|field| field as _)
1089 }
1090 pub fn protocol_version_mut(&mut self) -> &mut u64 {
1093 self.protocol_version.get_or_insert_default()
1094 }
1095 pub fn protocol_version_opt(&self) -> Option<u64> {
1097 self.protocol_version.as_ref().map(|field| *field)
1098 }
1099 pub fn set_protocol_version(&mut self, field: u64) {
1101 self.protocol_version = Some(field);
1102 }
1103 pub fn with_protocol_version(mut self, field: u64) -> Self {
1105 self.set_protocol_version(field);
1106 self
1107 }
1108 pub fn storage_charge_opt_mut(&mut self) -> Option<&mut u64> {
1110 self.storage_charge.as_mut().map(|field| field as _)
1111 }
1112 pub fn storage_charge_mut(&mut self) -> &mut u64 {
1115 self.storage_charge.get_or_insert_default()
1116 }
1117 pub fn storage_charge_opt(&self) -> Option<u64> {
1119 self.storage_charge.as_ref().map(|field| *field)
1120 }
1121 pub fn set_storage_charge(&mut self, field: u64) {
1123 self.storage_charge = Some(field);
1124 }
1125 pub fn with_storage_charge(mut self, field: u64) -> Self {
1127 self.set_storage_charge(field);
1128 self
1129 }
1130 pub fn computation_charge_opt_mut(&mut self) -> Option<&mut u64> {
1132 self.computation_charge.as_mut().map(|field| field as _)
1133 }
1134 pub fn computation_charge_mut(&mut self) -> &mut u64 {
1137 self.computation_charge.get_or_insert_default()
1138 }
1139 pub fn computation_charge_opt(&self) -> Option<u64> {
1141 self.computation_charge.as_ref().map(|field| *field)
1142 }
1143 pub fn set_computation_charge(&mut self, field: u64) {
1145 self.computation_charge = Some(field);
1146 }
1147 pub fn with_computation_charge(mut self, field: u64) -> Self {
1149 self.set_computation_charge(field);
1150 self
1151 }
1152 pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
1154 self.storage_rebate.as_mut().map(|field| field as _)
1155 }
1156 pub fn storage_rebate_mut(&mut self) -> &mut u64 {
1159 self.storage_rebate.get_or_insert_default()
1160 }
1161 pub fn storage_rebate_opt(&self) -> Option<u64> {
1163 self.storage_rebate.as_ref().map(|field| *field)
1164 }
1165 pub fn set_storage_rebate(&mut self, field: u64) {
1167 self.storage_rebate = Some(field);
1168 }
1169 pub fn with_storage_rebate(mut self, field: u64) -> Self {
1171 self.set_storage_rebate(field);
1172 self
1173 }
1174 pub fn non_refundable_storage_fee_opt_mut(&mut self) -> Option<&mut u64> {
1176 self.non_refundable_storage_fee.as_mut().map(|field| field as _)
1177 }
1178 pub fn non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
1181 self.non_refundable_storage_fee.get_or_insert_default()
1182 }
1183 pub fn non_refundable_storage_fee_opt(&self) -> Option<u64> {
1185 self.non_refundable_storage_fee.as_ref().map(|field| *field)
1186 }
1187 pub fn set_non_refundable_storage_fee(&mut self, field: u64) {
1189 self.non_refundable_storage_fee = Some(field);
1190 }
1191 pub fn with_non_refundable_storage_fee(mut self, field: u64) -> Self {
1193 self.set_non_refundable_storage_fee(field);
1194 self
1195 }
1196 pub fn epoch_start_timestamp_opt_mut(
1198 &mut self,
1199 ) -> Option<&mut ::prost_types::Timestamp> {
1200 self.epoch_start_timestamp.as_mut().map(|field| field as _)
1201 }
1202 pub fn epoch_start_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
1205 self.epoch_start_timestamp.get_or_insert_default()
1206 }
1207 pub fn epoch_start_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
1209 self.epoch_start_timestamp.as_ref().map(|field| field as _)
1210 }
1211 pub fn set_epoch_start_timestamp<T: Into<::prost_types::Timestamp>>(
1213 &mut self,
1214 field: T,
1215 ) {
1216 self.epoch_start_timestamp = Some(field.into().into());
1217 }
1218 pub fn with_epoch_start_timestamp<T: Into<::prost_types::Timestamp>>(
1220 mut self,
1221 field: T,
1222 ) -> Self {
1223 self.set_epoch_start_timestamp(field.into());
1224 self
1225 }
1226 pub fn system_packages(&self) -> &[super::SystemPackage] {
1228 &self.system_packages
1229 }
1230 pub fn system_packages_mut(&mut self) -> &mut Vec<super::SystemPackage> {
1233 &mut self.system_packages
1234 }
1235 pub fn set_system_packages(&mut self, field: Vec<super::SystemPackage>) {
1237 self.system_packages = field;
1238 }
1239 pub fn with_system_packages(mut self, field: Vec<super::SystemPackage>) -> Self {
1241 self.set_system_packages(field);
1242 self
1243 }
1244 }
1245 impl super::ChangedObject {
1246 pub const fn const_default() -> Self {
1247 Self {
1248 object_id: None,
1249 input_state: None,
1250 input_version: None,
1251 input_digest: None,
1252 input_owner: None,
1253 output_state: None,
1254 output_version: None,
1255 output_digest: None,
1256 output_owner: None,
1257 accumulator_write: None,
1258 id_operation: None,
1259 object_type: None,
1260 }
1261 }
1262 #[doc(hidden)]
1263 pub fn default_instance() -> &'static Self {
1264 static DEFAULT: super::ChangedObject = super::ChangedObject::const_default();
1265 &DEFAULT
1266 }
1267 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
1269 self.object_id.as_mut().map(|field| field as _)
1270 }
1271 pub fn object_id_mut(&mut self) -> &mut String {
1274 self.object_id.get_or_insert_default()
1275 }
1276 pub fn object_id_opt(&self) -> Option<&str> {
1278 self.object_id.as_ref().map(|field| field as _)
1279 }
1280 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
1282 self.object_id = Some(field.into().into());
1283 }
1284 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
1286 self.set_object_id(field.into());
1287 self
1288 }
1289 pub fn with_input_state<T: Into<super::changed_object::InputObjectState>>(
1291 mut self,
1292 field: T,
1293 ) -> Self {
1294 self.set_input_state(field.into());
1295 self
1296 }
1297 pub fn input_version_opt_mut(&mut self) -> Option<&mut u64> {
1299 self.input_version.as_mut().map(|field| field as _)
1300 }
1301 pub fn input_version_mut(&mut self) -> &mut u64 {
1304 self.input_version.get_or_insert_default()
1305 }
1306 pub fn input_version_opt(&self) -> Option<u64> {
1308 self.input_version.as_ref().map(|field| *field)
1309 }
1310 pub fn set_input_version(&mut self, field: u64) {
1312 self.input_version = Some(field);
1313 }
1314 pub fn with_input_version(mut self, field: u64) -> Self {
1316 self.set_input_version(field);
1317 self
1318 }
1319 pub fn input_digest_opt_mut(&mut self) -> Option<&mut String> {
1321 self.input_digest.as_mut().map(|field| field as _)
1322 }
1323 pub fn input_digest_mut(&mut self) -> &mut String {
1326 self.input_digest.get_or_insert_default()
1327 }
1328 pub fn input_digest_opt(&self) -> Option<&str> {
1330 self.input_digest.as_ref().map(|field| field as _)
1331 }
1332 pub fn set_input_digest<T: Into<String>>(&mut self, field: T) {
1334 self.input_digest = Some(field.into().into());
1335 }
1336 pub fn with_input_digest<T: Into<String>>(mut self, field: T) -> Self {
1338 self.set_input_digest(field.into());
1339 self
1340 }
1341 pub fn input_owner(&self) -> &super::Owner {
1343 self.input_owner
1344 .as_ref()
1345 .map(|field| field as _)
1346 .unwrap_or_else(|| super::Owner::default_instance() as _)
1347 }
1348 pub fn input_owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
1350 self.input_owner.as_mut().map(|field| field as _)
1351 }
1352 pub fn input_owner_mut(&mut self) -> &mut super::Owner {
1355 self.input_owner.get_or_insert_default()
1356 }
1357 pub fn input_owner_opt(&self) -> Option<&super::Owner> {
1359 self.input_owner.as_ref().map(|field| field as _)
1360 }
1361 pub fn set_input_owner<T: Into<super::Owner>>(&mut self, field: T) {
1363 self.input_owner = Some(field.into().into());
1364 }
1365 pub fn with_input_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
1367 self.set_input_owner(field.into());
1368 self
1369 }
1370 pub fn with_output_state<T: Into<super::changed_object::OutputObjectState>>(
1372 mut self,
1373 field: T,
1374 ) -> Self {
1375 self.set_output_state(field.into());
1376 self
1377 }
1378 pub fn output_version_opt_mut(&mut self) -> Option<&mut u64> {
1380 self.output_version.as_mut().map(|field| field as _)
1381 }
1382 pub fn output_version_mut(&mut self) -> &mut u64 {
1385 self.output_version.get_or_insert_default()
1386 }
1387 pub fn output_version_opt(&self) -> Option<u64> {
1389 self.output_version.as_ref().map(|field| *field)
1390 }
1391 pub fn set_output_version(&mut self, field: u64) {
1393 self.output_version = Some(field);
1394 }
1395 pub fn with_output_version(mut self, field: u64) -> Self {
1397 self.set_output_version(field);
1398 self
1399 }
1400 pub fn output_digest_opt_mut(&mut self) -> Option<&mut String> {
1402 self.output_digest.as_mut().map(|field| field as _)
1403 }
1404 pub fn output_digest_mut(&mut self) -> &mut String {
1407 self.output_digest.get_or_insert_default()
1408 }
1409 pub fn output_digest_opt(&self) -> Option<&str> {
1411 self.output_digest.as_ref().map(|field| field as _)
1412 }
1413 pub fn set_output_digest<T: Into<String>>(&mut self, field: T) {
1415 self.output_digest = Some(field.into().into());
1416 }
1417 pub fn with_output_digest<T: Into<String>>(mut self, field: T) -> Self {
1419 self.set_output_digest(field.into());
1420 self
1421 }
1422 pub fn output_owner(&self) -> &super::Owner {
1424 self.output_owner
1425 .as_ref()
1426 .map(|field| field as _)
1427 .unwrap_or_else(|| super::Owner::default_instance() as _)
1428 }
1429 pub fn output_owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
1431 self.output_owner.as_mut().map(|field| field as _)
1432 }
1433 pub fn output_owner_mut(&mut self) -> &mut super::Owner {
1436 self.output_owner.get_or_insert_default()
1437 }
1438 pub fn output_owner_opt(&self) -> Option<&super::Owner> {
1440 self.output_owner.as_ref().map(|field| field as _)
1441 }
1442 pub fn set_output_owner<T: Into<super::Owner>>(&mut self, field: T) {
1444 self.output_owner = Some(field.into().into());
1445 }
1446 pub fn with_output_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
1448 self.set_output_owner(field.into());
1449 self
1450 }
1451 pub fn accumulator_write(&self) -> &super::AccumulatorWrite {
1453 self.accumulator_write
1454 .as_ref()
1455 .map(|field| field as _)
1456 .unwrap_or_else(|| super::AccumulatorWrite::default_instance() as _)
1457 }
1458 pub fn accumulator_write_opt_mut(
1460 &mut self,
1461 ) -> Option<&mut super::AccumulatorWrite> {
1462 self.accumulator_write.as_mut().map(|field| field as _)
1463 }
1464 pub fn accumulator_write_mut(&mut self) -> &mut super::AccumulatorWrite {
1467 self.accumulator_write.get_or_insert_default()
1468 }
1469 pub fn accumulator_write_opt(&self) -> Option<&super::AccumulatorWrite> {
1471 self.accumulator_write.as_ref().map(|field| field as _)
1472 }
1473 pub fn set_accumulator_write<T: Into<super::AccumulatorWrite>>(
1475 &mut self,
1476 field: T,
1477 ) {
1478 self.accumulator_write = Some(field.into().into());
1479 }
1480 pub fn with_accumulator_write<T: Into<super::AccumulatorWrite>>(
1482 mut self,
1483 field: T,
1484 ) -> Self {
1485 self.set_accumulator_write(field.into());
1486 self
1487 }
1488 pub fn with_id_operation<T: Into<super::changed_object::IdOperation>>(
1490 mut self,
1491 field: T,
1492 ) -> Self {
1493 self.set_id_operation(field.into());
1494 self
1495 }
1496 pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
1498 self.object_type.as_mut().map(|field| field as _)
1499 }
1500 pub fn object_type_mut(&mut self) -> &mut String {
1503 self.object_type.get_or_insert_default()
1504 }
1505 pub fn object_type_opt(&self) -> Option<&str> {
1507 self.object_type.as_ref().map(|field| field as _)
1508 }
1509 pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
1511 self.object_type = Some(field.into().into());
1512 }
1513 pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
1515 self.set_object_type(field.into());
1516 self
1517 }
1518 }
1519 impl super::Checkpoint {
1520 pub const fn const_default() -> Self {
1521 Self {
1522 sequence_number: None,
1523 digest: None,
1524 summary: None,
1525 signature: None,
1526 contents: None,
1527 transactions: Vec::new(),
1528 objects: None,
1529 }
1530 }
1531 #[doc(hidden)]
1532 pub fn default_instance() -> &'static Self {
1533 static DEFAULT: super::Checkpoint = super::Checkpoint::const_default();
1534 &DEFAULT
1535 }
1536 pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
1538 self.sequence_number.as_mut().map(|field| field as _)
1539 }
1540 pub fn sequence_number_mut(&mut self) -> &mut u64 {
1543 self.sequence_number.get_or_insert_default()
1544 }
1545 pub fn sequence_number_opt(&self) -> Option<u64> {
1547 self.sequence_number.as_ref().map(|field| *field)
1548 }
1549 pub fn set_sequence_number(&mut self, field: u64) {
1551 self.sequence_number = Some(field);
1552 }
1553 pub fn with_sequence_number(mut self, field: u64) -> Self {
1555 self.set_sequence_number(field);
1556 self
1557 }
1558 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1560 self.digest.as_mut().map(|field| field as _)
1561 }
1562 pub fn digest_mut(&mut self) -> &mut String {
1565 self.digest.get_or_insert_default()
1566 }
1567 pub fn digest_opt(&self) -> Option<&str> {
1569 self.digest.as_ref().map(|field| field as _)
1570 }
1571 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1573 self.digest = Some(field.into().into());
1574 }
1575 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1577 self.set_digest(field.into());
1578 self
1579 }
1580 pub fn summary(&self) -> &super::CheckpointSummary {
1582 self.summary
1583 .as_ref()
1584 .map(|field| field as _)
1585 .unwrap_or_else(|| super::CheckpointSummary::default_instance() as _)
1586 }
1587 pub fn summary_opt_mut(&mut self) -> Option<&mut super::CheckpointSummary> {
1589 self.summary.as_mut().map(|field| field as _)
1590 }
1591 pub fn summary_mut(&mut self) -> &mut super::CheckpointSummary {
1594 self.summary.get_or_insert_default()
1595 }
1596 pub fn summary_opt(&self) -> Option<&super::CheckpointSummary> {
1598 self.summary.as_ref().map(|field| field as _)
1599 }
1600 pub fn set_summary<T: Into<super::CheckpointSummary>>(&mut self, field: T) {
1602 self.summary = Some(field.into().into());
1603 }
1604 pub fn with_summary<T: Into<super::CheckpointSummary>>(
1606 mut self,
1607 field: T,
1608 ) -> Self {
1609 self.set_summary(field.into());
1610 self
1611 }
1612 pub fn signature(&self) -> &super::ValidatorAggregatedSignature {
1614 self.signature
1615 .as_ref()
1616 .map(|field| field as _)
1617 .unwrap_or_else(|| {
1618 super::ValidatorAggregatedSignature::default_instance() as _
1619 })
1620 }
1621 pub fn signature_opt_mut(
1623 &mut self,
1624 ) -> Option<&mut super::ValidatorAggregatedSignature> {
1625 self.signature.as_mut().map(|field| field as _)
1626 }
1627 pub fn signature_mut(&mut self) -> &mut super::ValidatorAggregatedSignature {
1630 self.signature.get_or_insert_default()
1631 }
1632 pub fn signature_opt(&self) -> Option<&super::ValidatorAggregatedSignature> {
1634 self.signature.as_ref().map(|field| field as _)
1635 }
1636 pub fn set_signature<T: Into<super::ValidatorAggregatedSignature>>(
1638 &mut self,
1639 field: T,
1640 ) {
1641 self.signature = Some(field.into().into());
1642 }
1643 pub fn with_signature<T: Into<super::ValidatorAggregatedSignature>>(
1645 mut self,
1646 field: T,
1647 ) -> Self {
1648 self.set_signature(field.into());
1649 self
1650 }
1651 pub fn contents(&self) -> &super::CheckpointContents {
1653 self.contents
1654 .as_ref()
1655 .map(|field| field as _)
1656 .unwrap_or_else(|| super::CheckpointContents::default_instance() as _)
1657 }
1658 pub fn contents_opt_mut(&mut self) -> Option<&mut super::CheckpointContents> {
1660 self.contents.as_mut().map(|field| field as _)
1661 }
1662 pub fn contents_mut(&mut self) -> &mut super::CheckpointContents {
1665 self.contents.get_or_insert_default()
1666 }
1667 pub fn contents_opt(&self) -> Option<&super::CheckpointContents> {
1669 self.contents.as_ref().map(|field| field as _)
1670 }
1671 pub fn set_contents<T: Into<super::CheckpointContents>>(&mut self, field: T) {
1673 self.contents = Some(field.into().into());
1674 }
1675 pub fn with_contents<T: Into<super::CheckpointContents>>(
1677 mut self,
1678 field: T,
1679 ) -> Self {
1680 self.set_contents(field.into());
1681 self
1682 }
1683 pub fn transactions(&self) -> &[super::ExecutedTransaction] {
1685 &self.transactions
1686 }
1687 pub fn transactions_mut(&mut self) -> &mut Vec<super::ExecutedTransaction> {
1690 &mut self.transactions
1691 }
1692 pub fn set_transactions(&mut self, field: Vec<super::ExecutedTransaction>) {
1694 self.transactions = field;
1695 }
1696 pub fn with_transactions(
1698 mut self,
1699 field: Vec<super::ExecutedTransaction>,
1700 ) -> Self {
1701 self.set_transactions(field);
1702 self
1703 }
1704 pub fn objects(&self) -> &super::ObjectSet {
1706 self.objects
1707 .as_ref()
1708 .map(|field| field as _)
1709 .unwrap_or_else(|| super::ObjectSet::default_instance() as _)
1710 }
1711 pub fn objects_opt_mut(&mut self) -> Option<&mut super::ObjectSet> {
1713 self.objects.as_mut().map(|field| field as _)
1714 }
1715 pub fn objects_mut(&mut self) -> &mut super::ObjectSet {
1718 self.objects.get_or_insert_default()
1719 }
1720 pub fn objects_opt(&self) -> Option<&super::ObjectSet> {
1722 self.objects.as_ref().map(|field| field as _)
1723 }
1724 pub fn set_objects<T: Into<super::ObjectSet>>(&mut self, field: T) {
1726 self.objects = Some(field.into().into());
1727 }
1728 pub fn with_objects<T: Into<super::ObjectSet>>(mut self, field: T) -> Self {
1730 self.set_objects(field.into());
1731 self
1732 }
1733 }
1734 impl super::CheckpointCommitment {
1735 pub const fn const_default() -> Self {
1736 Self { kind: None, digest: None }
1737 }
1738 #[doc(hidden)]
1739 pub fn default_instance() -> &'static Self {
1740 static DEFAULT: super::CheckpointCommitment = super::CheckpointCommitment::const_default();
1741 &DEFAULT
1742 }
1743 pub fn with_kind<
1745 T: Into<super::checkpoint_commitment::CheckpointCommitmentKind>,
1746 >(mut self, field: T) -> Self {
1747 self.set_kind(field.into());
1748 self
1749 }
1750 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1752 self.digest.as_mut().map(|field| field as _)
1753 }
1754 pub fn digest_mut(&mut self) -> &mut String {
1757 self.digest.get_or_insert_default()
1758 }
1759 pub fn digest_opt(&self) -> Option<&str> {
1761 self.digest.as_ref().map(|field| field as _)
1762 }
1763 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1765 self.digest = Some(field.into().into());
1766 }
1767 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1769 self.set_digest(field.into());
1770 self
1771 }
1772 }
1773 impl super::CheckpointContents {
1774 pub const fn const_default() -> Self {
1775 Self {
1776 bcs: None,
1777 digest: None,
1778 version: None,
1779 transactions: Vec::new(),
1780 }
1781 }
1782 #[doc(hidden)]
1783 pub fn default_instance() -> &'static Self {
1784 static DEFAULT: super::CheckpointContents = super::CheckpointContents::const_default();
1785 &DEFAULT
1786 }
1787 pub fn bcs(&self) -> &super::Bcs {
1789 self.bcs
1790 .as_ref()
1791 .map(|field| field as _)
1792 .unwrap_or_else(|| super::Bcs::default_instance() as _)
1793 }
1794 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
1796 self.bcs.as_mut().map(|field| field as _)
1797 }
1798 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
1801 self.bcs.get_or_insert_default()
1802 }
1803 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
1805 self.bcs.as_ref().map(|field| field as _)
1806 }
1807 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
1809 self.bcs = Some(field.into().into());
1810 }
1811 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
1813 self.set_bcs(field.into());
1814 self
1815 }
1816 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1818 self.digest.as_mut().map(|field| field as _)
1819 }
1820 pub fn digest_mut(&mut self) -> &mut String {
1823 self.digest.get_or_insert_default()
1824 }
1825 pub fn digest_opt(&self) -> Option<&str> {
1827 self.digest.as_ref().map(|field| field as _)
1828 }
1829 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1831 self.digest = Some(field.into().into());
1832 }
1833 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1835 self.set_digest(field.into());
1836 self
1837 }
1838 pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
1840 self.version.as_mut().map(|field| field as _)
1841 }
1842 pub fn version_mut(&mut self) -> &mut i32 {
1845 self.version.get_or_insert_default()
1846 }
1847 pub fn version_opt(&self) -> Option<i32> {
1849 self.version.as_ref().map(|field| *field)
1850 }
1851 pub fn set_version(&mut self, field: i32) {
1853 self.version = Some(field);
1854 }
1855 pub fn with_version(mut self, field: i32) -> Self {
1857 self.set_version(field);
1858 self
1859 }
1860 pub fn transactions(&self) -> &[super::CheckpointedTransactionInfo] {
1862 &self.transactions
1863 }
1864 pub fn transactions_mut(
1867 &mut self,
1868 ) -> &mut Vec<super::CheckpointedTransactionInfo> {
1869 &mut self.transactions
1870 }
1871 pub fn set_transactions(
1873 &mut self,
1874 field: Vec<super::CheckpointedTransactionInfo>,
1875 ) {
1876 self.transactions = field;
1877 }
1878 pub fn with_transactions(
1880 mut self,
1881 field: Vec<super::CheckpointedTransactionInfo>,
1882 ) -> Self {
1883 self.set_transactions(field);
1884 self
1885 }
1886 }
1887 impl super::CheckpointSummary {
1888 pub const fn const_default() -> Self {
1889 Self {
1890 bcs: None,
1891 digest: None,
1892 epoch: None,
1893 sequence_number: None,
1894 total_network_transactions: None,
1895 content_digest: None,
1896 previous_digest: None,
1897 epoch_rolling_gas_cost_summary: None,
1898 timestamp: None,
1899 commitments: Vec::new(),
1900 end_of_epoch_data: None,
1901 version_specific_data: None,
1902 }
1903 }
1904 #[doc(hidden)]
1905 pub fn default_instance() -> &'static Self {
1906 static DEFAULT: super::CheckpointSummary = super::CheckpointSummary::const_default();
1907 &DEFAULT
1908 }
1909 pub fn bcs(&self) -> &super::Bcs {
1911 self.bcs
1912 .as_ref()
1913 .map(|field| field as _)
1914 .unwrap_or_else(|| super::Bcs::default_instance() as _)
1915 }
1916 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
1918 self.bcs.as_mut().map(|field| field as _)
1919 }
1920 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
1923 self.bcs.get_or_insert_default()
1924 }
1925 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
1927 self.bcs.as_ref().map(|field| field as _)
1928 }
1929 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
1931 self.bcs = Some(field.into().into());
1932 }
1933 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
1935 self.set_bcs(field.into());
1936 self
1937 }
1938 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1940 self.digest.as_mut().map(|field| field as _)
1941 }
1942 pub fn digest_mut(&mut self) -> &mut String {
1945 self.digest.get_or_insert_default()
1946 }
1947 pub fn digest_opt(&self) -> Option<&str> {
1949 self.digest.as_ref().map(|field| field as _)
1950 }
1951 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1953 self.digest = Some(field.into().into());
1954 }
1955 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1957 self.set_digest(field.into());
1958 self
1959 }
1960 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
1962 self.epoch.as_mut().map(|field| field as _)
1963 }
1964 pub fn epoch_mut(&mut self) -> &mut u64 {
1967 self.epoch.get_or_insert_default()
1968 }
1969 pub fn epoch_opt(&self) -> Option<u64> {
1971 self.epoch.as_ref().map(|field| *field)
1972 }
1973 pub fn set_epoch(&mut self, field: u64) {
1975 self.epoch = Some(field);
1976 }
1977 pub fn with_epoch(mut self, field: u64) -> Self {
1979 self.set_epoch(field);
1980 self
1981 }
1982 pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
1984 self.sequence_number.as_mut().map(|field| field as _)
1985 }
1986 pub fn sequence_number_mut(&mut self) -> &mut u64 {
1989 self.sequence_number.get_or_insert_default()
1990 }
1991 pub fn sequence_number_opt(&self) -> Option<u64> {
1993 self.sequence_number.as_ref().map(|field| *field)
1994 }
1995 pub fn set_sequence_number(&mut self, field: u64) {
1997 self.sequence_number = Some(field);
1998 }
1999 pub fn with_sequence_number(mut self, field: u64) -> Self {
2001 self.set_sequence_number(field);
2002 self
2003 }
2004 pub fn total_network_transactions_opt_mut(&mut self) -> Option<&mut u64> {
2006 self.total_network_transactions.as_mut().map(|field| field as _)
2007 }
2008 pub fn total_network_transactions_mut(&mut self) -> &mut u64 {
2011 self.total_network_transactions.get_or_insert_default()
2012 }
2013 pub fn total_network_transactions_opt(&self) -> Option<u64> {
2015 self.total_network_transactions.as_ref().map(|field| *field)
2016 }
2017 pub fn set_total_network_transactions(&mut self, field: u64) {
2019 self.total_network_transactions = Some(field);
2020 }
2021 pub fn with_total_network_transactions(mut self, field: u64) -> Self {
2023 self.set_total_network_transactions(field);
2024 self
2025 }
2026 pub fn content_digest_opt_mut(&mut self) -> Option<&mut String> {
2028 self.content_digest.as_mut().map(|field| field as _)
2029 }
2030 pub fn content_digest_mut(&mut self) -> &mut String {
2033 self.content_digest.get_or_insert_default()
2034 }
2035 pub fn content_digest_opt(&self) -> Option<&str> {
2037 self.content_digest.as_ref().map(|field| field as _)
2038 }
2039 pub fn set_content_digest<T: Into<String>>(&mut self, field: T) {
2041 self.content_digest = Some(field.into().into());
2042 }
2043 pub fn with_content_digest<T: Into<String>>(mut self, field: T) -> Self {
2045 self.set_content_digest(field.into());
2046 self
2047 }
2048 pub fn previous_digest_opt_mut(&mut self) -> Option<&mut String> {
2050 self.previous_digest.as_mut().map(|field| field as _)
2051 }
2052 pub fn previous_digest_mut(&mut self) -> &mut String {
2055 self.previous_digest.get_or_insert_default()
2056 }
2057 pub fn previous_digest_opt(&self) -> Option<&str> {
2059 self.previous_digest.as_ref().map(|field| field as _)
2060 }
2061 pub fn set_previous_digest<T: Into<String>>(&mut self, field: T) {
2063 self.previous_digest = Some(field.into().into());
2064 }
2065 pub fn with_previous_digest<T: Into<String>>(mut self, field: T) -> Self {
2067 self.set_previous_digest(field.into());
2068 self
2069 }
2070 pub fn epoch_rolling_gas_cost_summary(&self) -> &super::GasCostSummary {
2072 self.epoch_rolling_gas_cost_summary
2073 .as_ref()
2074 .map(|field| field as _)
2075 .unwrap_or_else(|| super::GasCostSummary::default_instance() as _)
2076 }
2077 pub fn epoch_rolling_gas_cost_summary_opt_mut(
2079 &mut self,
2080 ) -> Option<&mut super::GasCostSummary> {
2081 self.epoch_rolling_gas_cost_summary.as_mut().map(|field| field as _)
2082 }
2083 pub fn epoch_rolling_gas_cost_summary_mut(
2086 &mut self,
2087 ) -> &mut super::GasCostSummary {
2088 self.epoch_rolling_gas_cost_summary.get_or_insert_default()
2089 }
2090 pub fn epoch_rolling_gas_cost_summary_opt(
2092 &self,
2093 ) -> Option<&super::GasCostSummary> {
2094 self.epoch_rolling_gas_cost_summary.as_ref().map(|field| field as _)
2095 }
2096 pub fn set_epoch_rolling_gas_cost_summary<T: Into<super::GasCostSummary>>(
2098 &mut self,
2099 field: T,
2100 ) {
2101 self.epoch_rolling_gas_cost_summary = Some(field.into().into());
2102 }
2103 pub fn with_epoch_rolling_gas_cost_summary<T: Into<super::GasCostSummary>>(
2105 mut self,
2106 field: T,
2107 ) -> Self {
2108 self.set_epoch_rolling_gas_cost_summary(field.into());
2109 self
2110 }
2111 pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
2113 self.timestamp.as_mut().map(|field| field as _)
2114 }
2115 pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
2118 self.timestamp.get_or_insert_default()
2119 }
2120 pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
2122 self.timestamp.as_ref().map(|field| field as _)
2123 }
2124 pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
2126 self.timestamp = Some(field.into().into());
2127 }
2128 pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
2130 mut self,
2131 field: T,
2132 ) -> Self {
2133 self.set_timestamp(field.into());
2134 self
2135 }
2136 pub fn commitments(&self) -> &[super::CheckpointCommitment] {
2138 &self.commitments
2139 }
2140 pub fn commitments_mut(&mut self) -> &mut Vec<super::CheckpointCommitment> {
2143 &mut self.commitments
2144 }
2145 pub fn set_commitments(&mut self, field: Vec<super::CheckpointCommitment>) {
2147 self.commitments = field;
2148 }
2149 pub fn with_commitments(
2151 mut self,
2152 field: Vec<super::CheckpointCommitment>,
2153 ) -> Self {
2154 self.set_commitments(field);
2155 self
2156 }
2157 pub fn end_of_epoch_data(&self) -> &super::EndOfEpochData {
2159 self.end_of_epoch_data
2160 .as_ref()
2161 .map(|field| field as _)
2162 .unwrap_or_else(|| super::EndOfEpochData::default_instance() as _)
2163 }
2164 pub fn end_of_epoch_data_opt_mut(
2166 &mut self,
2167 ) -> Option<&mut super::EndOfEpochData> {
2168 self.end_of_epoch_data.as_mut().map(|field| field as _)
2169 }
2170 pub fn end_of_epoch_data_mut(&mut self) -> &mut super::EndOfEpochData {
2173 self.end_of_epoch_data.get_or_insert_default()
2174 }
2175 pub fn end_of_epoch_data_opt(&self) -> Option<&super::EndOfEpochData> {
2177 self.end_of_epoch_data.as_ref().map(|field| field as _)
2178 }
2179 pub fn set_end_of_epoch_data<T: Into<super::EndOfEpochData>>(
2181 &mut self,
2182 field: T,
2183 ) {
2184 self.end_of_epoch_data = Some(field.into().into());
2185 }
2186 pub fn with_end_of_epoch_data<T: Into<super::EndOfEpochData>>(
2188 mut self,
2189 field: T,
2190 ) -> Self {
2191 self.set_end_of_epoch_data(field.into());
2192 self
2193 }
2194 pub fn version_specific_data_opt(&self) -> Option<&[u8]> {
2196 self.version_specific_data.as_ref().map(|field| field as _)
2197 }
2198 pub fn set_version_specific_data<T: Into<::prost::bytes::Bytes>>(
2200 &mut self,
2201 field: T,
2202 ) {
2203 self.version_specific_data = Some(field.into().into());
2204 }
2205 pub fn with_version_specific_data<T: Into<::prost::bytes::Bytes>>(
2207 mut self,
2208 field: T,
2209 ) -> Self {
2210 self.set_version_specific_data(field.into());
2211 self
2212 }
2213 }
2214 impl super::CheckpointedTransactionInfo {
2215 pub const fn const_default() -> Self {
2216 Self {
2217 transaction: None,
2218 effects: None,
2219 signatures: Vec::new(),
2220 address_aliases_versions: Vec::new(),
2221 }
2222 }
2223 #[doc(hidden)]
2224 pub fn default_instance() -> &'static Self {
2225 static DEFAULT: super::CheckpointedTransactionInfo = super::CheckpointedTransactionInfo::const_default();
2226 &DEFAULT
2227 }
2228 pub fn transaction_opt_mut(&mut self) -> Option<&mut String> {
2230 self.transaction.as_mut().map(|field| field as _)
2231 }
2232 pub fn transaction_mut(&mut self) -> &mut String {
2235 self.transaction.get_or_insert_default()
2236 }
2237 pub fn transaction_opt(&self) -> Option<&str> {
2239 self.transaction.as_ref().map(|field| field as _)
2240 }
2241 pub fn set_transaction<T: Into<String>>(&mut self, field: T) {
2243 self.transaction = Some(field.into().into());
2244 }
2245 pub fn with_transaction<T: Into<String>>(mut self, field: T) -> Self {
2247 self.set_transaction(field.into());
2248 self
2249 }
2250 pub fn effects_opt_mut(&mut self) -> Option<&mut String> {
2252 self.effects.as_mut().map(|field| field as _)
2253 }
2254 pub fn effects_mut(&mut self) -> &mut String {
2257 self.effects.get_or_insert_default()
2258 }
2259 pub fn effects_opt(&self) -> Option<&str> {
2261 self.effects.as_ref().map(|field| field as _)
2262 }
2263 pub fn set_effects<T: Into<String>>(&mut self, field: T) {
2265 self.effects = Some(field.into().into());
2266 }
2267 pub fn with_effects<T: Into<String>>(mut self, field: T) -> Self {
2269 self.set_effects(field.into());
2270 self
2271 }
2272 pub fn signatures(&self) -> &[super::UserSignature] {
2274 &self.signatures
2275 }
2276 pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
2279 &mut self.signatures
2280 }
2281 pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
2283 self.signatures = field;
2284 }
2285 pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
2287 self.set_signatures(field);
2288 self
2289 }
2290 pub fn address_aliases_versions(&self) -> &[super::AddressAliasesVersion] {
2292 &self.address_aliases_versions
2293 }
2294 pub fn address_aliases_versions_mut(
2297 &mut self,
2298 ) -> &mut Vec<super::AddressAliasesVersion> {
2299 &mut self.address_aliases_versions
2300 }
2301 pub fn set_address_aliases_versions(
2303 &mut self,
2304 field: Vec<super::AddressAliasesVersion>,
2305 ) {
2306 self.address_aliases_versions = field;
2307 }
2308 pub fn with_address_aliases_versions(
2310 mut self,
2311 field: Vec<super::AddressAliasesVersion>,
2312 ) -> Self {
2313 self.set_address_aliases_versions(field);
2314 self
2315 }
2316 }
2317 impl super::CircomG1 {
2318 pub const fn const_default() -> Self {
2319 Self {
2320 e0: None,
2321 e1: None,
2322 e2: None,
2323 }
2324 }
2325 #[doc(hidden)]
2326 pub fn default_instance() -> &'static Self {
2327 static DEFAULT: super::CircomG1 = super::CircomG1::const_default();
2328 &DEFAULT
2329 }
2330 pub fn e0_opt_mut(&mut self) -> Option<&mut String> {
2332 self.e0.as_mut().map(|field| field as _)
2333 }
2334 pub fn e0_mut(&mut self) -> &mut String {
2337 self.e0.get_or_insert_default()
2338 }
2339 pub fn e0_opt(&self) -> Option<&str> {
2341 self.e0.as_ref().map(|field| field as _)
2342 }
2343 pub fn set_e0<T: Into<String>>(&mut self, field: T) {
2345 self.e0 = Some(field.into().into());
2346 }
2347 pub fn with_e0<T: Into<String>>(mut self, field: T) -> Self {
2349 self.set_e0(field.into());
2350 self
2351 }
2352 pub fn e1_opt_mut(&mut self) -> Option<&mut String> {
2354 self.e1.as_mut().map(|field| field as _)
2355 }
2356 pub fn e1_mut(&mut self) -> &mut String {
2359 self.e1.get_or_insert_default()
2360 }
2361 pub fn e1_opt(&self) -> Option<&str> {
2363 self.e1.as_ref().map(|field| field as _)
2364 }
2365 pub fn set_e1<T: Into<String>>(&mut self, field: T) {
2367 self.e1 = Some(field.into().into());
2368 }
2369 pub fn with_e1<T: Into<String>>(mut self, field: T) -> Self {
2371 self.set_e1(field.into());
2372 self
2373 }
2374 pub fn e2_opt_mut(&mut self) -> Option<&mut String> {
2376 self.e2.as_mut().map(|field| field as _)
2377 }
2378 pub fn e2_mut(&mut self) -> &mut String {
2381 self.e2.get_or_insert_default()
2382 }
2383 pub fn e2_opt(&self) -> Option<&str> {
2385 self.e2.as_ref().map(|field| field as _)
2386 }
2387 pub fn set_e2<T: Into<String>>(&mut self, field: T) {
2389 self.e2 = Some(field.into().into());
2390 }
2391 pub fn with_e2<T: Into<String>>(mut self, field: T) -> Self {
2393 self.set_e2(field.into());
2394 self
2395 }
2396 }
2397 impl super::CircomG2 {
2398 pub const fn const_default() -> Self {
2399 Self {
2400 e00: None,
2401 e01: None,
2402 e10: None,
2403 e11: None,
2404 e20: None,
2405 e21: None,
2406 }
2407 }
2408 #[doc(hidden)]
2409 pub fn default_instance() -> &'static Self {
2410 static DEFAULT: super::CircomG2 = super::CircomG2::const_default();
2411 &DEFAULT
2412 }
2413 pub fn e00_opt_mut(&mut self) -> Option<&mut String> {
2415 self.e00.as_mut().map(|field| field as _)
2416 }
2417 pub fn e00_mut(&mut self) -> &mut String {
2420 self.e00.get_or_insert_default()
2421 }
2422 pub fn e00_opt(&self) -> Option<&str> {
2424 self.e00.as_ref().map(|field| field as _)
2425 }
2426 pub fn set_e00<T: Into<String>>(&mut self, field: T) {
2428 self.e00 = Some(field.into().into());
2429 }
2430 pub fn with_e00<T: Into<String>>(mut self, field: T) -> Self {
2432 self.set_e00(field.into());
2433 self
2434 }
2435 pub fn e01_opt_mut(&mut self) -> Option<&mut String> {
2437 self.e01.as_mut().map(|field| field as _)
2438 }
2439 pub fn e01_mut(&mut self) -> &mut String {
2442 self.e01.get_or_insert_default()
2443 }
2444 pub fn e01_opt(&self) -> Option<&str> {
2446 self.e01.as_ref().map(|field| field as _)
2447 }
2448 pub fn set_e01<T: Into<String>>(&mut self, field: T) {
2450 self.e01 = Some(field.into().into());
2451 }
2452 pub fn with_e01<T: Into<String>>(mut self, field: T) -> Self {
2454 self.set_e01(field.into());
2455 self
2456 }
2457 pub fn e10_opt_mut(&mut self) -> Option<&mut String> {
2459 self.e10.as_mut().map(|field| field as _)
2460 }
2461 pub fn e10_mut(&mut self) -> &mut String {
2464 self.e10.get_or_insert_default()
2465 }
2466 pub fn e10_opt(&self) -> Option<&str> {
2468 self.e10.as_ref().map(|field| field as _)
2469 }
2470 pub fn set_e10<T: Into<String>>(&mut self, field: T) {
2472 self.e10 = Some(field.into().into());
2473 }
2474 pub fn with_e10<T: Into<String>>(mut self, field: T) -> Self {
2476 self.set_e10(field.into());
2477 self
2478 }
2479 pub fn e11_opt_mut(&mut self) -> Option<&mut String> {
2481 self.e11.as_mut().map(|field| field as _)
2482 }
2483 pub fn e11_mut(&mut self) -> &mut String {
2486 self.e11.get_or_insert_default()
2487 }
2488 pub fn e11_opt(&self) -> Option<&str> {
2490 self.e11.as_ref().map(|field| field as _)
2491 }
2492 pub fn set_e11<T: Into<String>>(&mut self, field: T) {
2494 self.e11 = Some(field.into().into());
2495 }
2496 pub fn with_e11<T: Into<String>>(mut self, field: T) -> Self {
2498 self.set_e11(field.into());
2499 self
2500 }
2501 pub fn e20_opt_mut(&mut self) -> Option<&mut String> {
2503 self.e20.as_mut().map(|field| field as _)
2504 }
2505 pub fn e20_mut(&mut self) -> &mut String {
2508 self.e20.get_or_insert_default()
2509 }
2510 pub fn e20_opt(&self) -> Option<&str> {
2512 self.e20.as_ref().map(|field| field as _)
2513 }
2514 pub fn set_e20<T: Into<String>>(&mut self, field: T) {
2516 self.e20 = Some(field.into().into());
2517 }
2518 pub fn with_e20<T: Into<String>>(mut self, field: T) -> Self {
2520 self.set_e20(field.into());
2521 self
2522 }
2523 pub fn e21_opt_mut(&mut self) -> Option<&mut String> {
2525 self.e21.as_mut().map(|field| field as _)
2526 }
2527 pub fn e21_mut(&mut self) -> &mut String {
2530 self.e21.get_or_insert_default()
2531 }
2532 pub fn e21_opt(&self) -> Option<&str> {
2534 self.e21.as_ref().map(|field| field as _)
2535 }
2536 pub fn set_e21<T: Into<String>>(&mut self, field: T) {
2538 self.e21 = Some(field.into().into());
2539 }
2540 pub fn with_e21<T: Into<String>>(mut self, field: T) -> Self {
2542 self.set_e21(field.into());
2543 self
2544 }
2545 }
2546 impl super::CleverError {
2547 pub const fn const_default() -> Self {
2548 Self {
2549 error_code: None,
2550 line_number: None,
2551 constant_name: None,
2552 constant_type: None,
2553 value: None,
2554 }
2555 }
2556 #[doc(hidden)]
2557 pub fn default_instance() -> &'static Self {
2558 static DEFAULT: super::CleverError = super::CleverError::const_default();
2559 &DEFAULT
2560 }
2561 pub fn error_code_opt_mut(&mut self) -> Option<&mut u64> {
2563 self.error_code.as_mut().map(|field| field as _)
2564 }
2565 pub fn error_code_mut(&mut self) -> &mut u64 {
2568 self.error_code.get_or_insert_default()
2569 }
2570 pub fn error_code_opt(&self) -> Option<u64> {
2572 self.error_code.as_ref().map(|field| *field)
2573 }
2574 pub fn set_error_code(&mut self, field: u64) {
2576 self.error_code = Some(field);
2577 }
2578 pub fn with_error_code(mut self, field: u64) -> Self {
2580 self.set_error_code(field);
2581 self
2582 }
2583 pub fn line_number_opt_mut(&mut self) -> Option<&mut u64> {
2585 self.line_number.as_mut().map(|field| field as _)
2586 }
2587 pub fn line_number_mut(&mut self) -> &mut u64 {
2590 self.line_number.get_or_insert_default()
2591 }
2592 pub fn line_number_opt(&self) -> Option<u64> {
2594 self.line_number.as_ref().map(|field| *field)
2595 }
2596 pub fn set_line_number(&mut self, field: u64) {
2598 self.line_number = Some(field);
2599 }
2600 pub fn with_line_number(mut self, field: u64) -> Self {
2602 self.set_line_number(field);
2603 self
2604 }
2605 pub fn constant_name_opt_mut(&mut self) -> Option<&mut String> {
2607 self.constant_name.as_mut().map(|field| field as _)
2608 }
2609 pub fn constant_name_mut(&mut self) -> &mut String {
2612 self.constant_name.get_or_insert_default()
2613 }
2614 pub fn constant_name_opt(&self) -> Option<&str> {
2616 self.constant_name.as_ref().map(|field| field as _)
2617 }
2618 pub fn set_constant_name<T: Into<String>>(&mut self, field: T) {
2620 self.constant_name = Some(field.into().into());
2621 }
2622 pub fn with_constant_name<T: Into<String>>(mut self, field: T) -> Self {
2624 self.set_constant_name(field.into());
2625 self
2626 }
2627 pub fn constant_type_opt_mut(&mut self) -> Option<&mut String> {
2629 self.constant_type.as_mut().map(|field| field as _)
2630 }
2631 pub fn constant_type_mut(&mut self) -> &mut String {
2634 self.constant_type.get_or_insert_default()
2635 }
2636 pub fn constant_type_opt(&self) -> Option<&str> {
2638 self.constant_type.as_ref().map(|field| field as _)
2639 }
2640 pub fn set_constant_type<T: Into<String>>(&mut self, field: T) {
2642 self.constant_type = Some(field.into().into());
2643 }
2644 pub fn with_constant_type<T: Into<String>>(mut self, field: T) -> Self {
2646 self.set_constant_type(field.into());
2647 self
2648 }
2649 pub fn rendered(&self) -> &str {
2651 if let Some(super::clever_error::Value::Rendered(field)) = &self.value {
2652 field as _
2653 } else {
2654 ""
2655 }
2656 }
2657 pub fn rendered_opt(&self) -> Option<&str> {
2659 if let Some(super::clever_error::Value::Rendered(field)) = &self.value {
2660 Some(field as _)
2661 } else {
2662 None
2663 }
2664 }
2665 pub fn rendered_opt_mut(&mut self) -> Option<&mut String> {
2667 if let Some(super::clever_error::Value::Rendered(field)) = &mut self.value {
2668 Some(field as _)
2669 } else {
2670 None
2671 }
2672 }
2673 pub fn rendered_mut(&mut self) -> &mut String {
2677 if self.rendered_opt_mut().is_none() {
2678 self.value = Some(
2679 super::clever_error::Value::Rendered(String::default()),
2680 );
2681 }
2682 self.rendered_opt_mut().unwrap()
2683 }
2684 pub fn set_rendered<T: Into<String>>(&mut self, field: T) {
2687 self.value = Some(super::clever_error::Value::Rendered(field.into().into()));
2688 }
2689 pub fn with_rendered<T: Into<String>>(mut self, field: T) -> Self {
2692 self.set_rendered(field.into());
2693 self
2694 }
2695 pub fn raw(&self) -> &[u8] {
2697 if let Some(super::clever_error::Value::Raw(field)) = &self.value {
2698 field as _
2699 } else {
2700 &[]
2701 }
2702 }
2703 pub fn raw_opt(&self) -> Option<&[u8]> {
2705 if let Some(super::clever_error::Value::Raw(field)) = &self.value {
2706 Some(field as _)
2707 } else {
2708 None
2709 }
2710 }
2711 pub fn raw_opt_mut(&mut self) -> Option<&mut ::prost::bytes::Bytes> {
2713 if let Some(super::clever_error::Value::Raw(field)) = &mut self.value {
2714 Some(field as _)
2715 } else {
2716 None
2717 }
2718 }
2719 pub fn raw_mut(&mut self) -> &mut ::prost::bytes::Bytes {
2723 if self.raw_opt_mut().is_none() {
2724 self.value = Some(
2725 super::clever_error::Value::Raw(::prost::bytes::Bytes::default()),
2726 );
2727 }
2728 self.raw_opt_mut().unwrap()
2729 }
2730 pub fn set_raw<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
2733 self.value = Some(super::clever_error::Value::Raw(field.into().into()));
2734 }
2735 pub fn with_raw<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
2738 self.set_raw(field.into());
2739 self
2740 }
2741 }
2742 impl super::CoinDenyListError {
2743 pub const fn const_default() -> Self {
2744 Self {
2745 address: None,
2746 coin_type: None,
2747 }
2748 }
2749 #[doc(hidden)]
2750 pub fn default_instance() -> &'static Self {
2751 static DEFAULT: super::CoinDenyListError = super::CoinDenyListError::const_default();
2752 &DEFAULT
2753 }
2754 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
2756 self.address.as_mut().map(|field| field as _)
2757 }
2758 pub fn address_mut(&mut self) -> &mut String {
2761 self.address.get_or_insert_default()
2762 }
2763 pub fn address_opt(&self) -> Option<&str> {
2765 self.address.as_ref().map(|field| field as _)
2766 }
2767 pub fn set_address<T: Into<String>>(&mut self, field: T) {
2769 self.address = Some(field.into().into());
2770 }
2771 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
2773 self.set_address(field.into());
2774 self
2775 }
2776 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
2778 self.coin_type.as_mut().map(|field| field as _)
2779 }
2780 pub fn coin_type_mut(&mut self) -> &mut String {
2783 self.coin_type.get_or_insert_default()
2784 }
2785 pub fn coin_type_opt(&self) -> Option<&str> {
2787 self.coin_type.as_ref().map(|field| field as _)
2788 }
2789 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
2791 self.coin_type = Some(field.into().into());
2792 }
2793 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
2795 self.set_coin_type(field.into());
2796 self
2797 }
2798 }
2799 impl super::CoinMetadata {
2800 pub const fn const_default() -> Self {
2801 Self {
2802 id: None,
2803 decimals: None,
2804 name: None,
2805 symbol: None,
2806 description: None,
2807 icon_url: None,
2808 metadata_cap_id: None,
2809 metadata_cap_state: None,
2810 }
2811 }
2812 #[doc(hidden)]
2813 pub fn default_instance() -> &'static Self {
2814 static DEFAULT: super::CoinMetadata = super::CoinMetadata::const_default();
2815 &DEFAULT
2816 }
2817 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
2819 self.id.as_mut().map(|field| field as _)
2820 }
2821 pub fn id_mut(&mut self) -> &mut String {
2824 self.id.get_or_insert_default()
2825 }
2826 pub fn id_opt(&self) -> Option<&str> {
2828 self.id.as_ref().map(|field| field as _)
2829 }
2830 pub fn set_id<T: Into<String>>(&mut self, field: T) {
2832 self.id = Some(field.into().into());
2833 }
2834 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
2836 self.set_id(field.into());
2837 self
2838 }
2839 pub fn decimals_opt_mut(&mut self) -> Option<&mut u32> {
2841 self.decimals.as_mut().map(|field| field as _)
2842 }
2843 pub fn decimals_mut(&mut self) -> &mut u32 {
2846 self.decimals.get_or_insert_default()
2847 }
2848 pub fn decimals_opt(&self) -> Option<u32> {
2850 self.decimals.as_ref().map(|field| *field)
2851 }
2852 pub fn set_decimals(&mut self, field: u32) {
2854 self.decimals = Some(field);
2855 }
2856 pub fn with_decimals(mut self, field: u32) -> Self {
2858 self.set_decimals(field);
2859 self
2860 }
2861 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
2863 self.name.as_mut().map(|field| field as _)
2864 }
2865 pub fn name_mut(&mut self) -> &mut String {
2868 self.name.get_or_insert_default()
2869 }
2870 pub fn name_opt(&self) -> Option<&str> {
2872 self.name.as_ref().map(|field| field as _)
2873 }
2874 pub fn set_name<T: Into<String>>(&mut self, field: T) {
2876 self.name = Some(field.into().into());
2877 }
2878 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
2880 self.set_name(field.into());
2881 self
2882 }
2883 pub fn symbol_opt_mut(&mut self) -> Option<&mut String> {
2885 self.symbol.as_mut().map(|field| field as _)
2886 }
2887 pub fn symbol_mut(&mut self) -> &mut String {
2890 self.symbol.get_or_insert_default()
2891 }
2892 pub fn symbol_opt(&self) -> Option<&str> {
2894 self.symbol.as_ref().map(|field| field as _)
2895 }
2896 pub fn set_symbol<T: Into<String>>(&mut self, field: T) {
2898 self.symbol = Some(field.into().into());
2899 }
2900 pub fn with_symbol<T: Into<String>>(mut self, field: T) -> Self {
2902 self.set_symbol(field.into());
2903 self
2904 }
2905 pub fn description_opt_mut(&mut self) -> Option<&mut String> {
2907 self.description.as_mut().map(|field| field as _)
2908 }
2909 pub fn description_mut(&mut self) -> &mut String {
2912 self.description.get_or_insert_default()
2913 }
2914 pub fn description_opt(&self) -> Option<&str> {
2916 self.description.as_ref().map(|field| field as _)
2917 }
2918 pub fn set_description<T: Into<String>>(&mut self, field: T) {
2920 self.description = Some(field.into().into());
2921 }
2922 pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
2924 self.set_description(field.into());
2925 self
2926 }
2927 pub fn icon_url_opt_mut(&mut self) -> Option<&mut String> {
2929 self.icon_url.as_mut().map(|field| field as _)
2930 }
2931 pub fn icon_url_mut(&mut self) -> &mut String {
2934 self.icon_url.get_or_insert_default()
2935 }
2936 pub fn icon_url_opt(&self) -> Option<&str> {
2938 self.icon_url.as_ref().map(|field| field as _)
2939 }
2940 pub fn set_icon_url<T: Into<String>>(&mut self, field: T) {
2942 self.icon_url = Some(field.into().into());
2943 }
2944 pub fn with_icon_url<T: Into<String>>(mut self, field: T) -> Self {
2946 self.set_icon_url(field.into());
2947 self
2948 }
2949 pub fn metadata_cap_id_opt_mut(&mut self) -> Option<&mut String> {
2951 self.metadata_cap_id.as_mut().map(|field| field as _)
2952 }
2953 pub fn metadata_cap_id_mut(&mut self) -> &mut String {
2956 self.metadata_cap_id.get_or_insert_default()
2957 }
2958 pub fn metadata_cap_id_opt(&self) -> Option<&str> {
2960 self.metadata_cap_id.as_ref().map(|field| field as _)
2961 }
2962 pub fn set_metadata_cap_id<T: Into<String>>(&mut self, field: T) {
2964 self.metadata_cap_id = Some(field.into().into());
2965 }
2966 pub fn with_metadata_cap_id<T: Into<String>>(mut self, field: T) -> Self {
2968 self.set_metadata_cap_id(field.into());
2969 self
2970 }
2971 pub fn with_metadata_cap_state<T: Into<super::coin_metadata::MetadataCapState>>(
2973 mut self,
2974 field: T,
2975 ) -> Self {
2976 self.set_metadata_cap_state(field.into());
2977 self
2978 }
2979 }
2980 impl super::CoinTreasury {
2981 pub const fn const_default() -> Self {
2982 Self {
2983 id: None,
2984 total_supply: None,
2985 supply_state: None,
2986 }
2987 }
2988 #[doc(hidden)]
2989 pub fn default_instance() -> &'static Self {
2990 static DEFAULT: super::CoinTreasury = super::CoinTreasury::const_default();
2991 &DEFAULT
2992 }
2993 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
2995 self.id.as_mut().map(|field| field as _)
2996 }
2997 pub fn id_mut(&mut self) -> &mut String {
3000 self.id.get_or_insert_default()
3001 }
3002 pub fn id_opt(&self) -> Option<&str> {
3004 self.id.as_ref().map(|field| field as _)
3005 }
3006 pub fn set_id<T: Into<String>>(&mut self, field: T) {
3008 self.id = Some(field.into().into());
3009 }
3010 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
3012 self.set_id(field.into());
3013 self
3014 }
3015 pub fn total_supply_opt_mut(&mut self) -> Option<&mut u64> {
3017 self.total_supply.as_mut().map(|field| field as _)
3018 }
3019 pub fn total_supply_mut(&mut self) -> &mut u64 {
3022 self.total_supply.get_or_insert_default()
3023 }
3024 pub fn total_supply_opt(&self) -> Option<u64> {
3026 self.total_supply.as_ref().map(|field| *field)
3027 }
3028 pub fn set_total_supply(&mut self, field: u64) {
3030 self.total_supply = Some(field);
3031 }
3032 pub fn with_total_supply(mut self, field: u64) -> Self {
3034 self.set_total_supply(field);
3035 self
3036 }
3037 pub fn with_supply_state<T: Into<super::coin_treasury::SupplyState>>(
3039 mut self,
3040 field: T,
3041 ) -> Self {
3042 self.set_supply_state(field.into());
3043 self
3044 }
3045 }
3046 impl super::Command {
3047 pub const fn const_default() -> Self {
3048 Self { command: None }
3049 }
3050 #[doc(hidden)]
3051 pub fn default_instance() -> &'static Self {
3052 static DEFAULT: super::Command = super::Command::const_default();
3053 &DEFAULT
3054 }
3055 pub fn move_call(&self) -> &super::MoveCall {
3057 if let Some(super::command::Command::MoveCall(field)) = &self.command {
3058 field as _
3059 } else {
3060 super::MoveCall::default_instance() as _
3061 }
3062 }
3063 pub fn move_call_opt(&self) -> Option<&super::MoveCall> {
3065 if let Some(super::command::Command::MoveCall(field)) = &self.command {
3066 Some(field as _)
3067 } else {
3068 None
3069 }
3070 }
3071 pub fn move_call_opt_mut(&mut self) -> Option<&mut super::MoveCall> {
3073 if let Some(super::command::Command::MoveCall(field)) = &mut self.command {
3074 Some(field as _)
3075 } else {
3076 None
3077 }
3078 }
3079 pub fn move_call_mut(&mut self) -> &mut super::MoveCall {
3083 if self.move_call_opt_mut().is_none() {
3084 self.command = Some(
3085 super::command::Command::MoveCall(super::MoveCall::default()),
3086 );
3087 }
3088 self.move_call_opt_mut().unwrap()
3089 }
3090 pub fn set_move_call<T: Into<super::MoveCall>>(&mut self, field: T) {
3093 self.command = Some(super::command::Command::MoveCall(field.into().into()));
3094 }
3095 pub fn with_move_call<T: Into<super::MoveCall>>(mut self, field: T) -> Self {
3098 self.set_move_call(field.into());
3099 self
3100 }
3101 pub fn transfer_objects(&self) -> &super::TransferObjects {
3103 if let Some(super::command::Command::TransferObjects(field)) = &self.command
3104 {
3105 field as _
3106 } else {
3107 super::TransferObjects::default_instance() as _
3108 }
3109 }
3110 pub fn transfer_objects_opt(&self) -> Option<&super::TransferObjects> {
3112 if let Some(super::command::Command::TransferObjects(field)) = &self.command
3113 {
3114 Some(field as _)
3115 } else {
3116 None
3117 }
3118 }
3119 pub fn transfer_objects_opt_mut(
3121 &mut self,
3122 ) -> Option<&mut super::TransferObjects> {
3123 if let Some(super::command::Command::TransferObjects(field)) = &mut self
3124 .command
3125 {
3126 Some(field as _)
3127 } else {
3128 None
3129 }
3130 }
3131 pub fn transfer_objects_mut(&mut self) -> &mut super::TransferObjects {
3135 if self.transfer_objects_opt_mut().is_none() {
3136 self.command = Some(
3137 super::command::Command::TransferObjects(
3138 super::TransferObjects::default(),
3139 ),
3140 );
3141 }
3142 self.transfer_objects_opt_mut().unwrap()
3143 }
3144 pub fn set_transfer_objects<T: Into<super::TransferObjects>>(
3147 &mut self,
3148 field: T,
3149 ) {
3150 self.command = Some(
3151 super::command::Command::TransferObjects(field.into().into()),
3152 );
3153 }
3154 pub fn with_transfer_objects<T: Into<super::TransferObjects>>(
3157 mut self,
3158 field: T,
3159 ) -> Self {
3160 self.set_transfer_objects(field.into());
3161 self
3162 }
3163 pub fn split_coins(&self) -> &super::SplitCoins {
3165 if let Some(super::command::Command::SplitCoins(field)) = &self.command {
3166 field as _
3167 } else {
3168 super::SplitCoins::default_instance() as _
3169 }
3170 }
3171 pub fn split_coins_opt(&self) -> Option<&super::SplitCoins> {
3173 if let Some(super::command::Command::SplitCoins(field)) = &self.command {
3174 Some(field as _)
3175 } else {
3176 None
3177 }
3178 }
3179 pub fn split_coins_opt_mut(&mut self) -> Option<&mut super::SplitCoins> {
3181 if let Some(super::command::Command::SplitCoins(field)) = &mut self.command {
3182 Some(field as _)
3183 } else {
3184 None
3185 }
3186 }
3187 pub fn split_coins_mut(&mut self) -> &mut super::SplitCoins {
3191 if self.split_coins_opt_mut().is_none() {
3192 self.command = Some(
3193 super::command::Command::SplitCoins(super::SplitCoins::default()),
3194 );
3195 }
3196 self.split_coins_opt_mut().unwrap()
3197 }
3198 pub fn set_split_coins<T: Into<super::SplitCoins>>(&mut self, field: T) {
3201 self.command = Some(
3202 super::command::Command::SplitCoins(field.into().into()),
3203 );
3204 }
3205 pub fn with_split_coins<T: Into<super::SplitCoins>>(mut self, field: T) -> Self {
3208 self.set_split_coins(field.into());
3209 self
3210 }
3211 pub fn merge_coins(&self) -> &super::MergeCoins {
3213 if let Some(super::command::Command::MergeCoins(field)) = &self.command {
3214 field as _
3215 } else {
3216 super::MergeCoins::default_instance() as _
3217 }
3218 }
3219 pub fn merge_coins_opt(&self) -> Option<&super::MergeCoins> {
3221 if let Some(super::command::Command::MergeCoins(field)) = &self.command {
3222 Some(field as _)
3223 } else {
3224 None
3225 }
3226 }
3227 pub fn merge_coins_opt_mut(&mut self) -> Option<&mut super::MergeCoins> {
3229 if let Some(super::command::Command::MergeCoins(field)) = &mut self.command {
3230 Some(field as _)
3231 } else {
3232 None
3233 }
3234 }
3235 pub fn merge_coins_mut(&mut self) -> &mut super::MergeCoins {
3239 if self.merge_coins_opt_mut().is_none() {
3240 self.command = Some(
3241 super::command::Command::MergeCoins(super::MergeCoins::default()),
3242 );
3243 }
3244 self.merge_coins_opt_mut().unwrap()
3245 }
3246 pub fn set_merge_coins<T: Into<super::MergeCoins>>(&mut self, field: T) {
3249 self.command = Some(
3250 super::command::Command::MergeCoins(field.into().into()),
3251 );
3252 }
3253 pub fn with_merge_coins<T: Into<super::MergeCoins>>(mut self, field: T) -> Self {
3256 self.set_merge_coins(field.into());
3257 self
3258 }
3259 pub fn publish(&self) -> &super::Publish {
3261 if let Some(super::command::Command::Publish(field)) = &self.command {
3262 field as _
3263 } else {
3264 super::Publish::default_instance() as _
3265 }
3266 }
3267 pub fn publish_opt(&self) -> Option<&super::Publish> {
3269 if let Some(super::command::Command::Publish(field)) = &self.command {
3270 Some(field as _)
3271 } else {
3272 None
3273 }
3274 }
3275 pub fn publish_opt_mut(&mut self) -> Option<&mut super::Publish> {
3277 if let Some(super::command::Command::Publish(field)) = &mut self.command {
3278 Some(field as _)
3279 } else {
3280 None
3281 }
3282 }
3283 pub fn publish_mut(&mut self) -> &mut super::Publish {
3287 if self.publish_opt_mut().is_none() {
3288 self.command = Some(
3289 super::command::Command::Publish(super::Publish::default()),
3290 );
3291 }
3292 self.publish_opt_mut().unwrap()
3293 }
3294 pub fn set_publish<T: Into<super::Publish>>(&mut self, field: T) {
3297 self.command = Some(super::command::Command::Publish(field.into().into()));
3298 }
3299 pub fn with_publish<T: Into<super::Publish>>(mut self, field: T) -> Self {
3302 self.set_publish(field.into());
3303 self
3304 }
3305 pub fn make_move_vector(&self) -> &super::MakeMoveVector {
3307 if let Some(super::command::Command::MakeMoveVector(field)) = &self.command {
3308 field as _
3309 } else {
3310 super::MakeMoveVector::default_instance() as _
3311 }
3312 }
3313 pub fn make_move_vector_opt(&self) -> Option<&super::MakeMoveVector> {
3315 if let Some(super::command::Command::MakeMoveVector(field)) = &self.command {
3316 Some(field as _)
3317 } else {
3318 None
3319 }
3320 }
3321 pub fn make_move_vector_opt_mut(
3323 &mut self,
3324 ) -> Option<&mut super::MakeMoveVector> {
3325 if let Some(super::command::Command::MakeMoveVector(field)) = &mut self
3326 .command
3327 {
3328 Some(field as _)
3329 } else {
3330 None
3331 }
3332 }
3333 pub fn make_move_vector_mut(&mut self) -> &mut super::MakeMoveVector {
3337 if self.make_move_vector_opt_mut().is_none() {
3338 self.command = Some(
3339 super::command::Command::MakeMoveVector(
3340 super::MakeMoveVector::default(),
3341 ),
3342 );
3343 }
3344 self.make_move_vector_opt_mut().unwrap()
3345 }
3346 pub fn set_make_move_vector<T: Into<super::MakeMoveVector>>(
3349 &mut self,
3350 field: T,
3351 ) {
3352 self.command = Some(
3353 super::command::Command::MakeMoveVector(field.into().into()),
3354 );
3355 }
3356 pub fn with_make_move_vector<T: Into<super::MakeMoveVector>>(
3359 mut self,
3360 field: T,
3361 ) -> Self {
3362 self.set_make_move_vector(field.into());
3363 self
3364 }
3365 pub fn upgrade(&self) -> &super::Upgrade {
3367 if let Some(super::command::Command::Upgrade(field)) = &self.command {
3368 field as _
3369 } else {
3370 super::Upgrade::default_instance() as _
3371 }
3372 }
3373 pub fn upgrade_opt(&self) -> Option<&super::Upgrade> {
3375 if let Some(super::command::Command::Upgrade(field)) = &self.command {
3376 Some(field as _)
3377 } else {
3378 None
3379 }
3380 }
3381 pub fn upgrade_opt_mut(&mut self) -> Option<&mut super::Upgrade> {
3383 if let Some(super::command::Command::Upgrade(field)) = &mut self.command {
3384 Some(field as _)
3385 } else {
3386 None
3387 }
3388 }
3389 pub fn upgrade_mut(&mut self) -> &mut super::Upgrade {
3393 if self.upgrade_opt_mut().is_none() {
3394 self.command = Some(
3395 super::command::Command::Upgrade(super::Upgrade::default()),
3396 );
3397 }
3398 self.upgrade_opt_mut().unwrap()
3399 }
3400 pub fn set_upgrade<T: Into<super::Upgrade>>(&mut self, field: T) {
3403 self.command = Some(super::command::Command::Upgrade(field.into().into()));
3404 }
3405 pub fn with_upgrade<T: Into<super::Upgrade>>(mut self, field: T) -> Self {
3408 self.set_upgrade(field.into());
3409 self
3410 }
3411 }
3412 impl super::CommandArgumentError {
3413 pub const fn const_default() -> Self {
3414 Self {
3415 argument: None,
3416 kind: None,
3417 index_error: None,
3418 }
3419 }
3420 #[doc(hidden)]
3421 pub fn default_instance() -> &'static Self {
3422 static DEFAULT: super::CommandArgumentError = super::CommandArgumentError::const_default();
3423 &DEFAULT
3424 }
3425 pub fn argument_opt_mut(&mut self) -> Option<&mut u32> {
3427 self.argument.as_mut().map(|field| field as _)
3428 }
3429 pub fn argument_mut(&mut self) -> &mut u32 {
3432 self.argument.get_or_insert_default()
3433 }
3434 pub fn argument_opt(&self) -> Option<u32> {
3436 self.argument.as_ref().map(|field| *field)
3437 }
3438 pub fn set_argument(&mut self, field: u32) {
3440 self.argument = Some(field);
3441 }
3442 pub fn with_argument(mut self, field: u32) -> Self {
3444 self.set_argument(field);
3445 self
3446 }
3447 pub fn with_kind<
3449 T: Into<super::command_argument_error::CommandArgumentErrorKind>,
3450 >(mut self, field: T) -> Self {
3451 self.set_kind(field.into());
3452 self
3453 }
3454 pub fn index_error(&self) -> &super::IndexError {
3456 self.index_error
3457 .as_ref()
3458 .map(|field| field as _)
3459 .unwrap_or_else(|| super::IndexError::default_instance() as _)
3460 }
3461 pub fn index_error_opt_mut(&mut self) -> Option<&mut super::IndexError> {
3463 self.index_error.as_mut().map(|field| field as _)
3464 }
3465 pub fn index_error_mut(&mut self) -> &mut super::IndexError {
3468 self.index_error.get_or_insert_default()
3469 }
3470 pub fn index_error_opt(&self) -> Option<&super::IndexError> {
3472 self.index_error.as_ref().map(|field| field as _)
3473 }
3474 pub fn set_index_error<T: Into<super::IndexError>>(&mut self, field: T) {
3476 self.index_error = Some(field.into().into());
3477 }
3478 pub fn with_index_error<T: Into<super::IndexError>>(mut self, field: T) -> Self {
3480 self.set_index_error(field.into());
3481 self
3482 }
3483 }
3484 impl super::CommandOutput {
3485 pub const fn const_default() -> Self {
3486 Self {
3487 argument: None,
3488 value: None,
3489 json: None,
3490 }
3491 }
3492 #[doc(hidden)]
3493 pub fn default_instance() -> &'static Self {
3494 static DEFAULT: super::CommandOutput = super::CommandOutput::const_default();
3495 &DEFAULT
3496 }
3497 pub fn argument(&self) -> &super::Argument {
3499 self.argument
3500 .as_ref()
3501 .map(|field| field as _)
3502 .unwrap_or_else(|| super::Argument::default_instance() as _)
3503 }
3504 pub fn argument_opt_mut(&mut self) -> Option<&mut super::Argument> {
3506 self.argument.as_mut().map(|field| field as _)
3507 }
3508 pub fn argument_mut(&mut self) -> &mut super::Argument {
3511 self.argument.get_or_insert_default()
3512 }
3513 pub fn argument_opt(&self) -> Option<&super::Argument> {
3515 self.argument.as_ref().map(|field| field as _)
3516 }
3517 pub fn set_argument<T: Into<super::Argument>>(&mut self, field: T) {
3519 self.argument = Some(field.into().into());
3520 }
3521 pub fn with_argument<T: Into<super::Argument>>(mut self, field: T) -> Self {
3523 self.set_argument(field.into());
3524 self
3525 }
3526 pub fn value(&self) -> &super::Bcs {
3528 self.value
3529 .as_ref()
3530 .map(|field| field as _)
3531 .unwrap_or_else(|| super::Bcs::default_instance() as _)
3532 }
3533 pub fn value_opt_mut(&mut self) -> Option<&mut super::Bcs> {
3535 self.value.as_mut().map(|field| field as _)
3536 }
3537 pub fn value_mut(&mut self) -> &mut super::Bcs {
3540 self.value.get_or_insert_default()
3541 }
3542 pub fn value_opt(&self) -> Option<&super::Bcs> {
3544 self.value.as_ref().map(|field| field as _)
3545 }
3546 pub fn set_value<T: Into<super::Bcs>>(&mut self, field: T) {
3548 self.value = Some(field.into().into());
3549 }
3550 pub fn with_value<T: Into<super::Bcs>>(mut self, field: T) -> Self {
3552 self.set_value(field.into());
3553 self
3554 }
3555 pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
3557 self.json.as_mut().map(|field| field as _)
3558 }
3559 pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
3562 self.json.get_or_insert_default()
3563 }
3564 pub fn json_opt(&self) -> Option<&::prost_types::Value> {
3566 self.json.as_ref().map(|field| field as _)
3567 }
3568 pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
3570 self.json = Some(field.into().into());
3571 }
3572 pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
3574 self.set_json(field.into());
3575 self
3576 }
3577 }
3578 impl super::CommandResult {
3579 pub const fn const_default() -> Self {
3580 Self {
3581 return_values: Vec::new(),
3582 mutated_by_ref: Vec::new(),
3583 }
3584 }
3585 #[doc(hidden)]
3586 pub fn default_instance() -> &'static Self {
3587 static DEFAULT: super::CommandResult = super::CommandResult::const_default();
3588 &DEFAULT
3589 }
3590 pub fn return_values(&self) -> &[super::CommandOutput] {
3592 &self.return_values
3593 }
3594 pub fn return_values_mut(&mut self) -> &mut Vec<super::CommandOutput> {
3597 &mut self.return_values
3598 }
3599 pub fn set_return_values(&mut self, field: Vec<super::CommandOutput>) {
3601 self.return_values = field;
3602 }
3603 pub fn with_return_values(mut self, field: Vec<super::CommandOutput>) -> Self {
3605 self.set_return_values(field);
3606 self
3607 }
3608 pub fn mutated_by_ref(&self) -> &[super::CommandOutput] {
3610 &self.mutated_by_ref
3611 }
3612 pub fn mutated_by_ref_mut(&mut self) -> &mut Vec<super::CommandOutput> {
3615 &mut self.mutated_by_ref
3616 }
3617 pub fn set_mutated_by_ref(&mut self, field: Vec<super::CommandOutput>) {
3619 self.mutated_by_ref = field;
3620 }
3621 pub fn with_mutated_by_ref(mut self, field: Vec<super::CommandOutput>) -> Self {
3623 self.set_mutated_by_ref(field);
3624 self
3625 }
3626 }
3627 impl super::CongestedObjects {
3628 pub const fn const_default() -> Self {
3629 Self { objects: Vec::new() }
3630 }
3631 #[doc(hidden)]
3632 pub fn default_instance() -> &'static Self {
3633 static DEFAULT: super::CongestedObjects = super::CongestedObjects::const_default();
3634 &DEFAULT
3635 }
3636 pub fn objects(&self) -> &[String] {
3638 &self.objects
3639 }
3640 pub fn objects_mut(&mut self) -> &mut Vec<String> {
3643 &mut self.objects
3644 }
3645 pub fn set_objects(&mut self, field: Vec<String>) {
3647 self.objects = field;
3648 }
3649 pub fn with_objects(mut self, field: Vec<String>) -> Self {
3651 self.set_objects(field);
3652 self
3653 }
3654 }
3655 impl super::ConsensusCommitPrologue {
3656 pub const fn const_default() -> Self {
3657 Self {
3658 epoch: None,
3659 round: None,
3660 commit_timestamp: None,
3661 consensus_commit_digest: None,
3662 sub_dag_index: None,
3663 consensus_determined_version_assignments: None,
3664 additional_state_digest: None,
3665 }
3666 }
3667 #[doc(hidden)]
3668 pub fn default_instance() -> &'static Self {
3669 static DEFAULT: super::ConsensusCommitPrologue = super::ConsensusCommitPrologue::const_default();
3670 &DEFAULT
3671 }
3672 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
3674 self.epoch.as_mut().map(|field| field as _)
3675 }
3676 pub fn epoch_mut(&mut self) -> &mut u64 {
3679 self.epoch.get_or_insert_default()
3680 }
3681 pub fn epoch_opt(&self) -> Option<u64> {
3683 self.epoch.as_ref().map(|field| *field)
3684 }
3685 pub fn set_epoch(&mut self, field: u64) {
3687 self.epoch = Some(field);
3688 }
3689 pub fn with_epoch(mut self, field: u64) -> Self {
3691 self.set_epoch(field);
3692 self
3693 }
3694 pub fn round_opt_mut(&mut self) -> Option<&mut u64> {
3696 self.round.as_mut().map(|field| field as _)
3697 }
3698 pub fn round_mut(&mut self) -> &mut u64 {
3701 self.round.get_or_insert_default()
3702 }
3703 pub fn round_opt(&self) -> Option<u64> {
3705 self.round.as_ref().map(|field| *field)
3706 }
3707 pub fn set_round(&mut self, field: u64) {
3709 self.round = Some(field);
3710 }
3711 pub fn with_round(mut self, field: u64) -> Self {
3713 self.set_round(field);
3714 self
3715 }
3716 pub fn commit_timestamp_opt_mut(
3718 &mut self,
3719 ) -> Option<&mut ::prost_types::Timestamp> {
3720 self.commit_timestamp.as_mut().map(|field| field as _)
3721 }
3722 pub fn commit_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
3725 self.commit_timestamp.get_or_insert_default()
3726 }
3727 pub fn commit_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
3729 self.commit_timestamp.as_ref().map(|field| field as _)
3730 }
3731 pub fn set_commit_timestamp<T: Into<::prost_types::Timestamp>>(
3733 &mut self,
3734 field: T,
3735 ) {
3736 self.commit_timestamp = Some(field.into().into());
3737 }
3738 pub fn with_commit_timestamp<T: Into<::prost_types::Timestamp>>(
3740 mut self,
3741 field: T,
3742 ) -> Self {
3743 self.set_commit_timestamp(field.into());
3744 self
3745 }
3746 pub fn consensus_commit_digest_opt_mut(&mut self) -> Option<&mut String> {
3748 self.consensus_commit_digest.as_mut().map(|field| field as _)
3749 }
3750 pub fn consensus_commit_digest_mut(&mut self) -> &mut String {
3753 self.consensus_commit_digest.get_or_insert_default()
3754 }
3755 pub fn consensus_commit_digest_opt(&self) -> Option<&str> {
3757 self.consensus_commit_digest.as_ref().map(|field| field as _)
3758 }
3759 pub fn set_consensus_commit_digest<T: Into<String>>(&mut self, field: T) {
3761 self.consensus_commit_digest = Some(field.into().into());
3762 }
3763 pub fn with_consensus_commit_digest<T: Into<String>>(
3765 mut self,
3766 field: T,
3767 ) -> Self {
3768 self.set_consensus_commit_digest(field.into());
3769 self
3770 }
3771 pub fn sub_dag_index_opt_mut(&mut self) -> Option<&mut u64> {
3773 self.sub_dag_index.as_mut().map(|field| field as _)
3774 }
3775 pub fn sub_dag_index_mut(&mut self) -> &mut u64 {
3778 self.sub_dag_index.get_or_insert_default()
3779 }
3780 pub fn sub_dag_index_opt(&self) -> Option<u64> {
3782 self.sub_dag_index.as_ref().map(|field| *field)
3783 }
3784 pub fn set_sub_dag_index(&mut self, field: u64) {
3786 self.sub_dag_index = Some(field);
3787 }
3788 pub fn with_sub_dag_index(mut self, field: u64) -> Self {
3790 self.set_sub_dag_index(field);
3791 self
3792 }
3793 pub fn consensus_determined_version_assignments(
3795 &self,
3796 ) -> &super::ConsensusDeterminedVersionAssignments {
3797 self.consensus_determined_version_assignments
3798 .as_ref()
3799 .map(|field| field as _)
3800 .unwrap_or_else(|| {
3801 super::ConsensusDeterminedVersionAssignments::default_instance() as _
3802 })
3803 }
3804 pub fn consensus_determined_version_assignments_opt_mut(
3806 &mut self,
3807 ) -> Option<&mut super::ConsensusDeterminedVersionAssignments> {
3808 self.consensus_determined_version_assignments
3809 .as_mut()
3810 .map(|field| field as _)
3811 }
3812 pub fn consensus_determined_version_assignments_mut(
3815 &mut self,
3816 ) -> &mut super::ConsensusDeterminedVersionAssignments {
3817 self.consensus_determined_version_assignments.get_or_insert_default()
3818 }
3819 pub fn consensus_determined_version_assignments_opt(
3821 &self,
3822 ) -> Option<&super::ConsensusDeterminedVersionAssignments> {
3823 self.consensus_determined_version_assignments
3824 .as_ref()
3825 .map(|field| field as _)
3826 }
3827 pub fn set_consensus_determined_version_assignments<
3829 T: Into<super::ConsensusDeterminedVersionAssignments>,
3830 >(&mut self, field: T) {
3831 self.consensus_determined_version_assignments = Some(field.into().into());
3832 }
3833 pub fn with_consensus_determined_version_assignments<
3835 T: Into<super::ConsensusDeterminedVersionAssignments>,
3836 >(mut self, field: T) -> Self {
3837 self.set_consensus_determined_version_assignments(field.into());
3838 self
3839 }
3840 pub fn additional_state_digest_opt_mut(&mut self) -> Option<&mut String> {
3842 self.additional_state_digest.as_mut().map(|field| field as _)
3843 }
3844 pub fn additional_state_digest_mut(&mut self) -> &mut String {
3847 self.additional_state_digest.get_or_insert_default()
3848 }
3849 pub fn additional_state_digest_opt(&self) -> Option<&str> {
3851 self.additional_state_digest.as_ref().map(|field| field as _)
3852 }
3853 pub fn set_additional_state_digest<T: Into<String>>(&mut self, field: T) {
3855 self.additional_state_digest = Some(field.into().into());
3856 }
3857 pub fn with_additional_state_digest<T: Into<String>>(
3859 mut self,
3860 field: T,
3861 ) -> Self {
3862 self.set_additional_state_digest(field.into());
3863 self
3864 }
3865 }
3866 impl super::ConsensusDeterminedVersionAssignments {
3867 pub const fn const_default() -> Self {
3868 Self {
3869 version: None,
3870 canceled_transactions: Vec::new(),
3871 }
3872 }
3873 #[doc(hidden)]
3874 pub fn default_instance() -> &'static Self {
3875 static DEFAULT: super::ConsensusDeterminedVersionAssignments = super::ConsensusDeterminedVersionAssignments::const_default();
3876 &DEFAULT
3877 }
3878 pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
3880 self.version.as_mut().map(|field| field as _)
3881 }
3882 pub fn version_mut(&mut self) -> &mut i32 {
3885 self.version.get_or_insert_default()
3886 }
3887 pub fn version_opt(&self) -> Option<i32> {
3889 self.version.as_ref().map(|field| *field)
3890 }
3891 pub fn set_version(&mut self, field: i32) {
3893 self.version = Some(field);
3894 }
3895 pub fn with_version(mut self, field: i32) -> Self {
3897 self.set_version(field);
3898 self
3899 }
3900 pub fn canceled_transactions(&self) -> &[super::CanceledTransaction] {
3902 &self.canceled_transactions
3903 }
3904 pub fn canceled_transactions_mut(
3907 &mut self,
3908 ) -> &mut Vec<super::CanceledTransaction> {
3909 &mut self.canceled_transactions
3910 }
3911 pub fn set_canceled_transactions(
3913 &mut self,
3914 field: Vec<super::CanceledTransaction>,
3915 ) {
3916 self.canceled_transactions = field;
3917 }
3918 pub fn with_canceled_transactions(
3920 mut self,
3921 field: Vec<super::CanceledTransaction>,
3922 ) -> Self {
3923 self.set_canceled_transactions(field);
3924 self
3925 }
3926 }
3927 impl super::DatatypeDescriptor {
3928 pub const fn const_default() -> Self {
3929 Self {
3930 type_name: None,
3931 defining_id: None,
3932 module: None,
3933 name: None,
3934 abilities: Vec::new(),
3935 type_parameters: Vec::new(),
3936 kind: None,
3937 fields: Vec::new(),
3938 variants: Vec::new(),
3939 }
3940 }
3941 #[doc(hidden)]
3942 pub fn default_instance() -> &'static Self {
3943 static DEFAULT: super::DatatypeDescriptor = super::DatatypeDescriptor::const_default();
3944 &DEFAULT
3945 }
3946 pub fn type_name_opt_mut(&mut self) -> Option<&mut String> {
3948 self.type_name.as_mut().map(|field| field as _)
3949 }
3950 pub fn type_name_mut(&mut self) -> &mut String {
3953 self.type_name.get_or_insert_default()
3954 }
3955 pub fn type_name_opt(&self) -> Option<&str> {
3957 self.type_name.as_ref().map(|field| field as _)
3958 }
3959 pub fn set_type_name<T: Into<String>>(&mut self, field: T) {
3961 self.type_name = Some(field.into().into());
3962 }
3963 pub fn with_type_name<T: Into<String>>(mut self, field: T) -> Self {
3965 self.set_type_name(field.into());
3966 self
3967 }
3968 pub fn defining_id_opt_mut(&mut self) -> Option<&mut String> {
3970 self.defining_id.as_mut().map(|field| field as _)
3971 }
3972 pub fn defining_id_mut(&mut self) -> &mut String {
3975 self.defining_id.get_or_insert_default()
3976 }
3977 pub fn defining_id_opt(&self) -> Option<&str> {
3979 self.defining_id.as_ref().map(|field| field as _)
3980 }
3981 pub fn set_defining_id<T: Into<String>>(&mut self, field: T) {
3983 self.defining_id = Some(field.into().into());
3984 }
3985 pub fn with_defining_id<T: Into<String>>(mut self, field: T) -> Self {
3987 self.set_defining_id(field.into());
3988 self
3989 }
3990 pub fn module_opt_mut(&mut self) -> Option<&mut String> {
3992 self.module.as_mut().map(|field| field as _)
3993 }
3994 pub fn module_mut(&mut self) -> &mut String {
3997 self.module.get_or_insert_default()
3998 }
3999 pub fn module_opt(&self) -> Option<&str> {
4001 self.module.as_ref().map(|field| field as _)
4002 }
4003 pub fn set_module<T: Into<String>>(&mut self, field: T) {
4005 self.module = Some(field.into().into());
4006 }
4007 pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
4009 self.set_module(field.into());
4010 self
4011 }
4012 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
4014 self.name.as_mut().map(|field| field as _)
4015 }
4016 pub fn name_mut(&mut self) -> &mut String {
4019 self.name.get_or_insert_default()
4020 }
4021 pub fn name_opt(&self) -> Option<&str> {
4023 self.name.as_ref().map(|field| field as _)
4024 }
4025 pub fn set_name<T: Into<String>>(&mut self, field: T) {
4027 self.name = Some(field.into().into());
4028 }
4029 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
4031 self.set_name(field.into());
4032 self
4033 }
4034 pub fn type_parameters(&self) -> &[super::TypeParameter] {
4036 &self.type_parameters
4037 }
4038 pub fn type_parameters_mut(&mut self) -> &mut Vec<super::TypeParameter> {
4041 &mut self.type_parameters
4042 }
4043 pub fn set_type_parameters(&mut self, field: Vec<super::TypeParameter>) {
4045 self.type_parameters = field;
4046 }
4047 pub fn with_type_parameters(mut self, field: Vec<super::TypeParameter>) -> Self {
4049 self.set_type_parameters(field);
4050 self
4051 }
4052 pub fn with_kind<T: Into<super::datatype_descriptor::DatatypeKind>>(
4054 mut self,
4055 field: T,
4056 ) -> Self {
4057 self.set_kind(field.into());
4058 self
4059 }
4060 pub fn fields(&self) -> &[super::FieldDescriptor] {
4062 &self.fields
4063 }
4064 pub fn fields_mut(&mut self) -> &mut Vec<super::FieldDescriptor> {
4067 &mut self.fields
4068 }
4069 pub fn set_fields(&mut self, field: Vec<super::FieldDescriptor>) {
4071 self.fields = field;
4072 }
4073 pub fn with_fields(mut self, field: Vec<super::FieldDescriptor>) -> Self {
4075 self.set_fields(field);
4076 self
4077 }
4078 pub fn variants(&self) -> &[super::VariantDescriptor] {
4080 &self.variants
4081 }
4082 pub fn variants_mut(&mut self) -> &mut Vec<super::VariantDescriptor> {
4085 &mut self.variants
4086 }
4087 pub fn set_variants(&mut self, field: Vec<super::VariantDescriptor>) {
4089 self.variants = field;
4090 }
4091 pub fn with_variants(mut self, field: Vec<super::VariantDescriptor>) -> Self {
4093 self.set_variants(field);
4094 self
4095 }
4096 }
4097 impl super::Display {
4098 pub const fn const_default() -> Self {
4099 Self { output: None, errors: None }
4100 }
4101 #[doc(hidden)]
4102 pub fn default_instance() -> &'static Self {
4103 static DEFAULT: super::Display = super::Display::const_default();
4104 &DEFAULT
4105 }
4106 pub fn output_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
4108 self.output.as_mut().map(|field| field as _)
4109 }
4110 pub fn output_mut(&mut self) -> &mut ::prost_types::Value {
4113 self.output.get_or_insert_default()
4114 }
4115 pub fn output_opt(&self) -> Option<&::prost_types::Value> {
4117 self.output.as_ref().map(|field| field as _)
4118 }
4119 pub fn set_output<T: Into<::prost_types::Value>>(&mut self, field: T) {
4121 self.output = Some(field.into().into());
4122 }
4123 pub fn with_output<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
4125 self.set_output(field.into());
4126 self
4127 }
4128 pub fn errors_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
4130 self.errors.as_mut().map(|field| field as _)
4131 }
4132 pub fn errors_mut(&mut self) -> &mut ::prost_types::Value {
4135 self.errors.get_or_insert_default()
4136 }
4137 pub fn errors_opt(&self) -> Option<&::prost_types::Value> {
4139 self.errors.as_ref().map(|field| field as _)
4140 }
4141 pub fn set_errors<T: Into<::prost_types::Value>>(&mut self, field: T) {
4143 self.errors = Some(field.into().into());
4144 }
4145 pub fn with_errors<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
4147 self.set_errors(field.into());
4148 self
4149 }
4150 }
4151 impl super::DynamicField {
4152 pub const fn const_default() -> Self {
4153 Self {
4154 kind: None,
4155 parent: None,
4156 field_id: None,
4157 field_object: None,
4158 name: None,
4159 value: None,
4160 value_type: None,
4161 child_id: None,
4162 child_object: None,
4163 }
4164 }
4165 #[doc(hidden)]
4166 pub fn default_instance() -> &'static Self {
4167 static DEFAULT: super::DynamicField = super::DynamicField::const_default();
4168 &DEFAULT
4169 }
4170 pub fn with_kind<T: Into<super::dynamic_field::DynamicFieldKind>>(
4172 mut self,
4173 field: T,
4174 ) -> Self {
4175 self.set_kind(field.into());
4176 self
4177 }
4178 pub fn parent_opt_mut(&mut self) -> Option<&mut String> {
4180 self.parent.as_mut().map(|field| field as _)
4181 }
4182 pub fn parent_mut(&mut self) -> &mut String {
4185 self.parent.get_or_insert_default()
4186 }
4187 pub fn parent_opt(&self) -> Option<&str> {
4189 self.parent.as_ref().map(|field| field as _)
4190 }
4191 pub fn set_parent<T: Into<String>>(&mut self, field: T) {
4193 self.parent = Some(field.into().into());
4194 }
4195 pub fn with_parent<T: Into<String>>(mut self, field: T) -> Self {
4197 self.set_parent(field.into());
4198 self
4199 }
4200 pub fn field_id_opt_mut(&mut self) -> Option<&mut String> {
4202 self.field_id.as_mut().map(|field| field as _)
4203 }
4204 pub fn field_id_mut(&mut self) -> &mut String {
4207 self.field_id.get_or_insert_default()
4208 }
4209 pub fn field_id_opt(&self) -> Option<&str> {
4211 self.field_id.as_ref().map(|field| field as _)
4212 }
4213 pub fn set_field_id<T: Into<String>>(&mut self, field: T) {
4215 self.field_id = Some(field.into().into());
4216 }
4217 pub fn with_field_id<T: Into<String>>(mut self, field: T) -> Self {
4219 self.set_field_id(field.into());
4220 self
4221 }
4222 pub fn field_object(&self) -> &super::Object {
4224 self.field_object
4225 .as_ref()
4226 .map(|field| field as _)
4227 .unwrap_or_else(|| super::Object::default_instance() as _)
4228 }
4229 pub fn field_object_opt_mut(&mut self) -> Option<&mut super::Object> {
4231 self.field_object.as_mut().map(|field| field as _)
4232 }
4233 pub fn field_object_mut(&mut self) -> &mut super::Object {
4236 self.field_object.get_or_insert_default()
4237 }
4238 pub fn field_object_opt(&self) -> Option<&super::Object> {
4240 self.field_object.as_ref().map(|field| field as _)
4241 }
4242 pub fn set_field_object<T: Into<super::Object>>(&mut self, field: T) {
4244 self.field_object = Some(field.into().into());
4245 }
4246 pub fn with_field_object<T: Into<super::Object>>(mut self, field: T) -> Self {
4248 self.set_field_object(field.into());
4249 self
4250 }
4251 pub fn name(&self) -> &super::Bcs {
4253 self.name
4254 .as_ref()
4255 .map(|field| field as _)
4256 .unwrap_or_else(|| super::Bcs::default_instance() as _)
4257 }
4258 pub fn name_opt_mut(&mut self) -> Option<&mut super::Bcs> {
4260 self.name.as_mut().map(|field| field as _)
4261 }
4262 pub fn name_mut(&mut self) -> &mut super::Bcs {
4265 self.name.get_or_insert_default()
4266 }
4267 pub fn name_opt(&self) -> Option<&super::Bcs> {
4269 self.name.as_ref().map(|field| field as _)
4270 }
4271 pub fn set_name<T: Into<super::Bcs>>(&mut self, field: T) {
4273 self.name = Some(field.into().into());
4274 }
4275 pub fn with_name<T: Into<super::Bcs>>(mut self, field: T) -> Self {
4277 self.set_name(field.into());
4278 self
4279 }
4280 pub fn value(&self) -> &super::Bcs {
4282 self.value
4283 .as_ref()
4284 .map(|field| field as _)
4285 .unwrap_or_else(|| super::Bcs::default_instance() as _)
4286 }
4287 pub fn value_opt_mut(&mut self) -> Option<&mut super::Bcs> {
4289 self.value.as_mut().map(|field| field as _)
4290 }
4291 pub fn value_mut(&mut self) -> &mut super::Bcs {
4294 self.value.get_or_insert_default()
4295 }
4296 pub fn value_opt(&self) -> Option<&super::Bcs> {
4298 self.value.as_ref().map(|field| field as _)
4299 }
4300 pub fn set_value<T: Into<super::Bcs>>(&mut self, field: T) {
4302 self.value = Some(field.into().into());
4303 }
4304 pub fn with_value<T: Into<super::Bcs>>(mut self, field: T) -> Self {
4306 self.set_value(field.into());
4307 self
4308 }
4309 pub fn value_type_opt_mut(&mut self) -> Option<&mut String> {
4311 self.value_type.as_mut().map(|field| field as _)
4312 }
4313 pub fn value_type_mut(&mut self) -> &mut String {
4316 self.value_type.get_or_insert_default()
4317 }
4318 pub fn value_type_opt(&self) -> Option<&str> {
4320 self.value_type.as_ref().map(|field| field as _)
4321 }
4322 pub fn set_value_type<T: Into<String>>(&mut self, field: T) {
4324 self.value_type = Some(field.into().into());
4325 }
4326 pub fn with_value_type<T: Into<String>>(mut self, field: T) -> Self {
4328 self.set_value_type(field.into());
4329 self
4330 }
4331 pub fn child_id_opt_mut(&mut self) -> Option<&mut String> {
4333 self.child_id.as_mut().map(|field| field as _)
4334 }
4335 pub fn child_id_mut(&mut self) -> &mut String {
4338 self.child_id.get_or_insert_default()
4339 }
4340 pub fn child_id_opt(&self) -> Option<&str> {
4342 self.child_id.as_ref().map(|field| field as _)
4343 }
4344 pub fn set_child_id<T: Into<String>>(&mut self, field: T) {
4346 self.child_id = Some(field.into().into());
4347 }
4348 pub fn with_child_id<T: Into<String>>(mut self, field: T) -> Self {
4350 self.set_child_id(field.into());
4351 self
4352 }
4353 pub fn child_object(&self) -> &super::Object {
4355 self.child_object
4356 .as_ref()
4357 .map(|field| field as _)
4358 .unwrap_or_else(|| super::Object::default_instance() as _)
4359 }
4360 pub fn child_object_opt_mut(&mut self) -> Option<&mut super::Object> {
4362 self.child_object.as_mut().map(|field| field as _)
4363 }
4364 pub fn child_object_mut(&mut self) -> &mut super::Object {
4367 self.child_object.get_or_insert_default()
4368 }
4369 pub fn child_object_opt(&self) -> Option<&super::Object> {
4371 self.child_object.as_ref().map(|field| field as _)
4372 }
4373 pub fn set_child_object<T: Into<super::Object>>(&mut self, field: T) {
4375 self.child_object = Some(field.into().into());
4376 }
4377 pub fn with_child_object<T: Into<super::Object>>(mut self, field: T) -> Self {
4379 self.set_child_object(field.into());
4380 self
4381 }
4382 }
4383 impl super::EmitModuleFilter {
4384 pub const fn const_default() -> Self {
4385 Self { module: None }
4386 }
4387 #[doc(hidden)]
4388 pub fn default_instance() -> &'static Self {
4389 static DEFAULT: super::EmitModuleFilter = super::EmitModuleFilter::const_default();
4390 &DEFAULT
4391 }
4392 pub fn module_opt_mut(&mut self) -> Option<&mut String> {
4394 self.module.as_mut().map(|field| field as _)
4395 }
4396 pub fn module_mut(&mut self) -> &mut String {
4399 self.module.get_or_insert_default()
4400 }
4401 pub fn module_opt(&self) -> Option<&str> {
4403 self.module.as_ref().map(|field| field as _)
4404 }
4405 pub fn set_module<T: Into<String>>(&mut self, field: T) {
4407 self.module = Some(field.into().into());
4408 }
4409 pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
4411 self.set_module(field.into());
4412 self
4413 }
4414 }
4415 impl super::EndOfEpochData {
4416 pub const fn const_default() -> Self {
4417 Self {
4418 next_epoch_committee: Vec::new(),
4419 next_epoch_protocol_version: None,
4420 epoch_commitments: Vec::new(),
4421 }
4422 }
4423 #[doc(hidden)]
4424 pub fn default_instance() -> &'static Self {
4425 static DEFAULT: super::EndOfEpochData = super::EndOfEpochData::const_default();
4426 &DEFAULT
4427 }
4428 pub fn next_epoch_committee(&self) -> &[super::ValidatorCommitteeMember] {
4430 &self.next_epoch_committee
4431 }
4432 pub fn next_epoch_committee_mut(
4435 &mut self,
4436 ) -> &mut Vec<super::ValidatorCommitteeMember> {
4437 &mut self.next_epoch_committee
4438 }
4439 pub fn set_next_epoch_committee(
4441 &mut self,
4442 field: Vec<super::ValidatorCommitteeMember>,
4443 ) {
4444 self.next_epoch_committee = field;
4445 }
4446 pub fn with_next_epoch_committee(
4448 mut self,
4449 field: Vec<super::ValidatorCommitteeMember>,
4450 ) -> Self {
4451 self.set_next_epoch_committee(field);
4452 self
4453 }
4454 pub fn next_epoch_protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
4456 self.next_epoch_protocol_version.as_mut().map(|field| field as _)
4457 }
4458 pub fn next_epoch_protocol_version_mut(&mut self) -> &mut u64 {
4461 self.next_epoch_protocol_version.get_or_insert_default()
4462 }
4463 pub fn next_epoch_protocol_version_opt(&self) -> Option<u64> {
4465 self.next_epoch_protocol_version.as_ref().map(|field| *field)
4466 }
4467 pub fn set_next_epoch_protocol_version(&mut self, field: u64) {
4469 self.next_epoch_protocol_version = Some(field);
4470 }
4471 pub fn with_next_epoch_protocol_version(mut self, field: u64) -> Self {
4473 self.set_next_epoch_protocol_version(field);
4474 self
4475 }
4476 pub fn epoch_commitments(&self) -> &[super::CheckpointCommitment] {
4478 &self.epoch_commitments
4479 }
4480 pub fn epoch_commitments_mut(
4483 &mut self,
4484 ) -> &mut Vec<super::CheckpointCommitment> {
4485 &mut self.epoch_commitments
4486 }
4487 pub fn set_epoch_commitments(
4489 &mut self,
4490 field: Vec<super::CheckpointCommitment>,
4491 ) {
4492 self.epoch_commitments = field;
4493 }
4494 pub fn with_epoch_commitments(
4496 mut self,
4497 field: Vec<super::CheckpointCommitment>,
4498 ) -> Self {
4499 self.set_epoch_commitments(field);
4500 self
4501 }
4502 }
4503 impl super::EndOfEpochTransaction {
4504 pub const fn const_default() -> Self {
4505 Self { transactions: Vec::new() }
4506 }
4507 #[doc(hidden)]
4508 pub fn default_instance() -> &'static Self {
4509 static DEFAULT: super::EndOfEpochTransaction = super::EndOfEpochTransaction::const_default();
4510 &DEFAULT
4511 }
4512 pub fn transactions(&self) -> &[super::EndOfEpochTransactionKind] {
4514 &self.transactions
4515 }
4516 pub fn transactions_mut(
4519 &mut self,
4520 ) -> &mut Vec<super::EndOfEpochTransactionKind> {
4521 &mut self.transactions
4522 }
4523 pub fn set_transactions(
4525 &mut self,
4526 field: Vec<super::EndOfEpochTransactionKind>,
4527 ) {
4528 self.transactions = field;
4529 }
4530 pub fn with_transactions(
4532 mut self,
4533 field: Vec<super::EndOfEpochTransactionKind>,
4534 ) -> Self {
4535 self.set_transactions(field);
4536 self
4537 }
4538 }
4539 impl super::EndOfEpochTransactionKind {
4540 pub const fn const_default() -> Self {
4541 Self { kind: None, data: None }
4542 }
4543 #[doc(hidden)]
4544 pub fn default_instance() -> &'static Self {
4545 static DEFAULT: super::EndOfEpochTransactionKind = super::EndOfEpochTransactionKind::const_default();
4546 &DEFAULT
4547 }
4548 pub fn with_kind<T: Into<super::end_of_epoch_transaction_kind::Kind>>(
4550 mut self,
4551 field: T,
4552 ) -> Self {
4553 self.set_kind(field.into());
4554 self
4555 }
4556 pub fn change_epoch(&self) -> &super::ChangeEpoch {
4558 if let Some(
4559 super::end_of_epoch_transaction_kind::Data::ChangeEpoch(field),
4560 ) = &self.data
4561 {
4562 field as _
4563 } else {
4564 super::ChangeEpoch::default_instance() as _
4565 }
4566 }
4567 pub fn change_epoch_opt(&self) -> Option<&super::ChangeEpoch> {
4569 if let Some(
4570 super::end_of_epoch_transaction_kind::Data::ChangeEpoch(field),
4571 ) = &self.data
4572 {
4573 Some(field as _)
4574 } else {
4575 None
4576 }
4577 }
4578 pub fn change_epoch_opt_mut(&mut self) -> Option<&mut super::ChangeEpoch> {
4580 if let Some(
4581 super::end_of_epoch_transaction_kind::Data::ChangeEpoch(field),
4582 ) = &mut self.data
4583 {
4584 Some(field as _)
4585 } else {
4586 None
4587 }
4588 }
4589 pub fn change_epoch_mut(&mut self) -> &mut super::ChangeEpoch {
4593 if self.change_epoch_opt_mut().is_none() {
4594 self.data = Some(
4595 super::end_of_epoch_transaction_kind::Data::ChangeEpoch(
4596 super::ChangeEpoch::default(),
4597 ),
4598 );
4599 }
4600 self.change_epoch_opt_mut().unwrap()
4601 }
4602 pub fn set_change_epoch<T: Into<super::ChangeEpoch>>(&mut self, field: T) {
4605 self.data = Some(
4606 super::end_of_epoch_transaction_kind::Data::ChangeEpoch(
4607 field.into().into(),
4608 ),
4609 );
4610 }
4611 pub fn with_change_epoch<T: Into<super::ChangeEpoch>>(
4614 mut self,
4615 field: T,
4616 ) -> Self {
4617 self.set_change_epoch(field.into());
4618 self
4619 }
4620 pub fn authenticator_state_expire(&self) -> &super::AuthenticatorStateExpire {
4622 if let Some(
4623 super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4624 field,
4625 ),
4626 ) = &self.data
4627 {
4628 field as _
4629 } else {
4630 super::AuthenticatorStateExpire::default_instance() as _
4631 }
4632 }
4633 pub fn authenticator_state_expire_opt(
4635 &self,
4636 ) -> Option<&super::AuthenticatorStateExpire> {
4637 if let Some(
4638 super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4639 field,
4640 ),
4641 ) = &self.data
4642 {
4643 Some(field as _)
4644 } else {
4645 None
4646 }
4647 }
4648 pub fn authenticator_state_expire_opt_mut(
4650 &mut self,
4651 ) -> Option<&mut super::AuthenticatorStateExpire> {
4652 if let Some(
4653 super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4654 field,
4655 ),
4656 ) = &mut self.data
4657 {
4658 Some(field as _)
4659 } else {
4660 None
4661 }
4662 }
4663 pub fn authenticator_state_expire_mut(
4667 &mut self,
4668 ) -> &mut super::AuthenticatorStateExpire {
4669 if self.authenticator_state_expire_opt_mut().is_none() {
4670 self.data = Some(
4671 super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4672 super::AuthenticatorStateExpire::default(),
4673 ),
4674 );
4675 }
4676 self.authenticator_state_expire_opt_mut().unwrap()
4677 }
4678 pub fn set_authenticator_state_expire<T: Into<super::AuthenticatorStateExpire>>(
4681 &mut self,
4682 field: T,
4683 ) {
4684 self.data = Some(
4685 super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4686 field.into().into(),
4687 ),
4688 );
4689 }
4690 pub fn with_authenticator_state_expire<T: Into<super::AuthenticatorStateExpire>>(
4693 mut self,
4694 field: T,
4695 ) -> Self {
4696 self.set_authenticator_state_expire(field.into());
4697 self
4698 }
4699 pub fn execution_time_observations(&self) -> &super::ExecutionTimeObservations {
4701 if let Some(
4702 super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4703 field,
4704 ),
4705 ) = &self.data
4706 {
4707 field as _
4708 } else {
4709 super::ExecutionTimeObservations::default_instance() as _
4710 }
4711 }
4712 pub fn execution_time_observations_opt(
4714 &self,
4715 ) -> Option<&super::ExecutionTimeObservations> {
4716 if let Some(
4717 super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4718 field,
4719 ),
4720 ) = &self.data
4721 {
4722 Some(field as _)
4723 } else {
4724 None
4725 }
4726 }
4727 pub fn execution_time_observations_opt_mut(
4729 &mut self,
4730 ) -> Option<&mut super::ExecutionTimeObservations> {
4731 if let Some(
4732 super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4733 field,
4734 ),
4735 ) = &mut self.data
4736 {
4737 Some(field as _)
4738 } else {
4739 None
4740 }
4741 }
4742 pub fn execution_time_observations_mut(
4746 &mut self,
4747 ) -> &mut super::ExecutionTimeObservations {
4748 if self.execution_time_observations_opt_mut().is_none() {
4749 self.data = Some(
4750 super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4751 super::ExecutionTimeObservations::default(),
4752 ),
4753 );
4754 }
4755 self.execution_time_observations_opt_mut().unwrap()
4756 }
4757 pub fn set_execution_time_observations<
4760 T: Into<super::ExecutionTimeObservations>,
4761 >(&mut self, field: T) {
4762 self.data = Some(
4763 super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4764 field.into().into(),
4765 ),
4766 );
4767 }
4768 pub fn with_execution_time_observations<
4771 T: Into<super::ExecutionTimeObservations>,
4772 >(mut self, field: T) -> Self {
4773 self.set_execution_time_observations(field.into());
4774 self
4775 }
4776 pub fn bridge_chain_id(&self) -> &str {
4778 if let Some(
4779 super::end_of_epoch_transaction_kind::Data::BridgeChainId(field),
4780 ) = &self.data
4781 {
4782 field as _
4783 } else {
4784 ""
4785 }
4786 }
4787 pub fn bridge_chain_id_opt(&self) -> Option<&str> {
4789 if let Some(
4790 super::end_of_epoch_transaction_kind::Data::BridgeChainId(field),
4791 ) = &self.data
4792 {
4793 Some(field as _)
4794 } else {
4795 None
4796 }
4797 }
4798 pub fn bridge_chain_id_opt_mut(&mut self) -> Option<&mut String> {
4800 if let Some(
4801 super::end_of_epoch_transaction_kind::Data::BridgeChainId(field),
4802 ) = &mut self.data
4803 {
4804 Some(field as _)
4805 } else {
4806 None
4807 }
4808 }
4809 pub fn bridge_chain_id_mut(&mut self) -> &mut String {
4813 if self.bridge_chain_id_opt_mut().is_none() {
4814 self.data = Some(
4815 super::end_of_epoch_transaction_kind::Data::BridgeChainId(
4816 String::default(),
4817 ),
4818 );
4819 }
4820 self.bridge_chain_id_opt_mut().unwrap()
4821 }
4822 pub fn set_bridge_chain_id<T: Into<String>>(&mut self, field: T) {
4825 self.data = Some(
4826 super::end_of_epoch_transaction_kind::Data::BridgeChainId(
4827 field.into().into(),
4828 ),
4829 );
4830 }
4831 pub fn with_bridge_chain_id<T: Into<String>>(mut self, field: T) -> Self {
4834 self.set_bridge_chain_id(field.into());
4835 self
4836 }
4837 pub fn bridge_object_version(&self) -> u64 {
4839 if let Some(
4840 super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4841 ) = &self.data
4842 {
4843 *field
4844 } else {
4845 0u64
4846 }
4847 }
4848 pub fn bridge_object_version_opt(&self) -> Option<u64> {
4850 if let Some(
4851 super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4852 ) = &self.data
4853 {
4854 Some(*field)
4855 } else {
4856 None
4857 }
4858 }
4859 pub fn bridge_object_version_opt_mut(&mut self) -> Option<&mut u64> {
4861 if let Some(
4862 super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4863 ) = &mut self.data
4864 {
4865 Some(field as _)
4866 } else {
4867 None
4868 }
4869 }
4870 pub fn bridge_object_version_mut(&mut self) -> &mut u64 {
4874 if self.bridge_object_version_opt_mut().is_none() {
4875 self.data = Some(
4876 super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(
4877 u64::default(),
4878 ),
4879 );
4880 }
4881 self.bridge_object_version_opt_mut().unwrap()
4882 }
4883 pub fn set_bridge_object_version(&mut self, field: u64) {
4886 self.data = Some(
4887 super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4888 );
4889 }
4890 pub fn with_bridge_object_version(mut self, field: u64) -> Self {
4893 self.set_bridge_object_version(field);
4894 self
4895 }
4896 pub fn storage_cost(&self) -> u64 {
4898 if let Some(
4899 super::end_of_epoch_transaction_kind::Data::StorageCost(field),
4900 ) = &self.data
4901 {
4902 *field
4903 } else {
4904 0u64
4905 }
4906 }
4907 pub fn storage_cost_opt(&self) -> Option<u64> {
4909 if let Some(
4910 super::end_of_epoch_transaction_kind::Data::StorageCost(field),
4911 ) = &self.data
4912 {
4913 Some(*field)
4914 } else {
4915 None
4916 }
4917 }
4918 pub fn storage_cost_opt_mut(&mut self) -> Option<&mut u64> {
4920 if let Some(
4921 super::end_of_epoch_transaction_kind::Data::StorageCost(field),
4922 ) = &mut self.data
4923 {
4924 Some(field as _)
4925 } else {
4926 None
4927 }
4928 }
4929 pub fn storage_cost_mut(&mut self) -> &mut u64 {
4933 if self.storage_cost_opt_mut().is_none() {
4934 self.data = Some(
4935 super::end_of_epoch_transaction_kind::Data::StorageCost(
4936 u64::default(),
4937 ),
4938 );
4939 }
4940 self.storage_cost_opt_mut().unwrap()
4941 }
4942 pub fn set_storage_cost(&mut self, field: u64) {
4945 self.data = Some(
4946 super::end_of_epoch_transaction_kind::Data::StorageCost(field),
4947 );
4948 }
4949 pub fn with_storage_cost(mut self, field: u64) -> Self {
4952 self.set_storage_cost(field);
4953 self
4954 }
4955 }
4956 impl super::Epoch {
4957 pub const fn const_default() -> Self {
4958 Self {
4959 epoch: None,
4960 committee: None,
4961 system_state: None,
4962 first_checkpoint: None,
4963 last_checkpoint: None,
4964 start: None,
4965 end: None,
4966 reference_gas_price: None,
4967 protocol_config: None,
4968 }
4969 }
4970 #[doc(hidden)]
4971 pub fn default_instance() -> &'static Self {
4972 static DEFAULT: super::Epoch = super::Epoch::const_default();
4973 &DEFAULT
4974 }
4975 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
4977 self.epoch.as_mut().map(|field| field as _)
4978 }
4979 pub fn epoch_mut(&mut self) -> &mut u64 {
4982 self.epoch.get_or_insert_default()
4983 }
4984 pub fn epoch_opt(&self) -> Option<u64> {
4986 self.epoch.as_ref().map(|field| *field)
4987 }
4988 pub fn set_epoch(&mut self, field: u64) {
4990 self.epoch = Some(field);
4991 }
4992 pub fn with_epoch(mut self, field: u64) -> Self {
4994 self.set_epoch(field);
4995 self
4996 }
4997 pub fn committee(&self) -> &super::ValidatorCommittee {
4999 self.committee
5000 .as_ref()
5001 .map(|field| field as _)
5002 .unwrap_or_else(|| super::ValidatorCommittee::default_instance() as _)
5003 }
5004 pub fn committee_opt_mut(&mut self) -> Option<&mut super::ValidatorCommittee> {
5006 self.committee.as_mut().map(|field| field as _)
5007 }
5008 pub fn committee_mut(&mut self) -> &mut super::ValidatorCommittee {
5011 self.committee.get_or_insert_default()
5012 }
5013 pub fn committee_opt(&self) -> Option<&super::ValidatorCommittee> {
5015 self.committee.as_ref().map(|field| field as _)
5016 }
5017 pub fn set_committee<T: Into<super::ValidatorCommittee>>(&mut self, field: T) {
5019 self.committee = Some(field.into().into());
5020 }
5021 pub fn with_committee<T: Into<super::ValidatorCommittee>>(
5023 mut self,
5024 field: T,
5025 ) -> Self {
5026 self.set_committee(field.into());
5027 self
5028 }
5029 pub fn system_state(&self) -> &super::SystemState {
5031 self.system_state
5032 .as_ref()
5033 .map(|field| field as _)
5034 .unwrap_or_else(|| super::SystemState::default_instance() as _)
5035 }
5036 pub fn system_state_opt_mut(&mut self) -> Option<&mut super::SystemState> {
5038 self.system_state.as_mut().map(|field| field as _)
5039 }
5040 pub fn system_state_mut(&mut self) -> &mut super::SystemState {
5043 self.system_state.get_or_insert_default()
5044 }
5045 pub fn system_state_opt(&self) -> Option<&super::SystemState> {
5047 self.system_state.as_ref().map(|field| field as _)
5048 }
5049 pub fn set_system_state<T: Into<super::SystemState>>(&mut self, field: T) {
5051 self.system_state = Some(field.into().into());
5052 }
5053 pub fn with_system_state<T: Into<super::SystemState>>(
5055 mut self,
5056 field: T,
5057 ) -> Self {
5058 self.set_system_state(field.into());
5059 self
5060 }
5061 pub fn first_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
5063 self.first_checkpoint.as_mut().map(|field| field as _)
5064 }
5065 pub fn first_checkpoint_mut(&mut self) -> &mut u64 {
5068 self.first_checkpoint.get_or_insert_default()
5069 }
5070 pub fn first_checkpoint_opt(&self) -> Option<u64> {
5072 self.first_checkpoint.as_ref().map(|field| *field)
5073 }
5074 pub fn set_first_checkpoint(&mut self, field: u64) {
5076 self.first_checkpoint = Some(field);
5077 }
5078 pub fn with_first_checkpoint(mut self, field: u64) -> Self {
5080 self.set_first_checkpoint(field);
5081 self
5082 }
5083 pub fn last_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
5085 self.last_checkpoint.as_mut().map(|field| field as _)
5086 }
5087 pub fn last_checkpoint_mut(&mut self) -> &mut u64 {
5090 self.last_checkpoint.get_or_insert_default()
5091 }
5092 pub fn last_checkpoint_opt(&self) -> Option<u64> {
5094 self.last_checkpoint.as_ref().map(|field| *field)
5095 }
5096 pub fn set_last_checkpoint(&mut self, field: u64) {
5098 self.last_checkpoint = Some(field);
5099 }
5100 pub fn with_last_checkpoint(mut self, field: u64) -> Self {
5102 self.set_last_checkpoint(field);
5103 self
5104 }
5105 pub fn start_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
5107 self.start.as_mut().map(|field| field as _)
5108 }
5109 pub fn start_mut(&mut self) -> &mut ::prost_types::Timestamp {
5112 self.start.get_or_insert_default()
5113 }
5114 pub fn start_opt(&self) -> Option<&::prost_types::Timestamp> {
5116 self.start.as_ref().map(|field| field as _)
5117 }
5118 pub fn set_start<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
5120 self.start = Some(field.into().into());
5121 }
5122 pub fn with_start<T: Into<::prost_types::Timestamp>>(
5124 mut self,
5125 field: T,
5126 ) -> Self {
5127 self.set_start(field.into());
5128 self
5129 }
5130 pub fn end_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
5132 self.end.as_mut().map(|field| field as _)
5133 }
5134 pub fn end_mut(&mut self) -> &mut ::prost_types::Timestamp {
5137 self.end.get_or_insert_default()
5138 }
5139 pub fn end_opt(&self) -> Option<&::prost_types::Timestamp> {
5141 self.end.as_ref().map(|field| field as _)
5142 }
5143 pub fn set_end<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
5145 self.end = Some(field.into().into());
5146 }
5147 pub fn with_end<T: Into<::prost_types::Timestamp>>(mut self, field: T) -> Self {
5149 self.set_end(field.into());
5150 self
5151 }
5152 pub fn reference_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
5154 self.reference_gas_price.as_mut().map(|field| field as _)
5155 }
5156 pub fn reference_gas_price_mut(&mut self) -> &mut u64 {
5159 self.reference_gas_price.get_or_insert_default()
5160 }
5161 pub fn reference_gas_price_opt(&self) -> Option<u64> {
5163 self.reference_gas_price.as_ref().map(|field| *field)
5164 }
5165 pub fn set_reference_gas_price(&mut self, field: u64) {
5167 self.reference_gas_price = Some(field);
5168 }
5169 pub fn with_reference_gas_price(mut self, field: u64) -> Self {
5171 self.set_reference_gas_price(field);
5172 self
5173 }
5174 pub fn protocol_config(&self) -> &super::ProtocolConfig {
5176 self.protocol_config
5177 .as_ref()
5178 .map(|field| field as _)
5179 .unwrap_or_else(|| super::ProtocolConfig::default_instance() as _)
5180 }
5181 pub fn protocol_config_opt_mut(&mut self) -> Option<&mut super::ProtocolConfig> {
5183 self.protocol_config.as_mut().map(|field| field as _)
5184 }
5185 pub fn protocol_config_mut(&mut self) -> &mut super::ProtocolConfig {
5188 self.protocol_config.get_or_insert_default()
5189 }
5190 pub fn protocol_config_opt(&self) -> Option<&super::ProtocolConfig> {
5192 self.protocol_config.as_ref().map(|field| field as _)
5193 }
5194 pub fn set_protocol_config<T: Into<super::ProtocolConfig>>(&mut self, field: T) {
5196 self.protocol_config = Some(field.into().into());
5197 }
5198 pub fn with_protocol_config<T: Into<super::ProtocolConfig>>(
5200 mut self,
5201 field: T,
5202 ) -> Self {
5203 self.set_protocol_config(field.into());
5204 self
5205 }
5206 }
5207 impl super::Event {
5208 pub const fn const_default() -> Self {
5209 Self {
5210 package_id: None,
5211 module: None,
5212 sender: None,
5213 event_type: None,
5214 contents: None,
5215 json: None,
5216 checkpoint: None,
5217 transaction_digest: None,
5218 transaction_index: None,
5219 event_index: None,
5220 }
5221 }
5222 #[doc(hidden)]
5223 pub fn default_instance() -> &'static Self {
5224 static DEFAULT: super::Event = super::Event::const_default();
5225 &DEFAULT
5226 }
5227 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
5229 self.package_id.as_mut().map(|field| field as _)
5230 }
5231 pub fn package_id_mut(&mut self) -> &mut String {
5234 self.package_id.get_or_insert_default()
5235 }
5236 pub fn package_id_opt(&self) -> Option<&str> {
5238 self.package_id.as_ref().map(|field| field as _)
5239 }
5240 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
5242 self.package_id = Some(field.into().into());
5243 }
5244 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
5246 self.set_package_id(field.into());
5247 self
5248 }
5249 pub fn module_opt_mut(&mut self) -> Option<&mut String> {
5251 self.module.as_mut().map(|field| field as _)
5252 }
5253 pub fn module_mut(&mut self) -> &mut String {
5256 self.module.get_or_insert_default()
5257 }
5258 pub fn module_opt(&self) -> Option<&str> {
5260 self.module.as_ref().map(|field| field as _)
5261 }
5262 pub fn set_module<T: Into<String>>(&mut self, field: T) {
5264 self.module = Some(field.into().into());
5265 }
5266 pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
5268 self.set_module(field.into());
5269 self
5270 }
5271 pub fn sender_opt_mut(&mut self) -> Option<&mut String> {
5273 self.sender.as_mut().map(|field| field as _)
5274 }
5275 pub fn sender_mut(&mut self) -> &mut String {
5278 self.sender.get_or_insert_default()
5279 }
5280 pub fn sender_opt(&self) -> Option<&str> {
5282 self.sender.as_ref().map(|field| field as _)
5283 }
5284 pub fn set_sender<T: Into<String>>(&mut self, field: T) {
5286 self.sender = Some(field.into().into());
5287 }
5288 pub fn with_sender<T: Into<String>>(mut self, field: T) -> Self {
5290 self.set_sender(field.into());
5291 self
5292 }
5293 pub fn event_type_opt_mut(&mut self) -> Option<&mut String> {
5295 self.event_type.as_mut().map(|field| field as _)
5296 }
5297 pub fn event_type_mut(&mut self) -> &mut String {
5300 self.event_type.get_or_insert_default()
5301 }
5302 pub fn event_type_opt(&self) -> Option<&str> {
5304 self.event_type.as_ref().map(|field| field as _)
5305 }
5306 pub fn set_event_type<T: Into<String>>(&mut self, field: T) {
5308 self.event_type = Some(field.into().into());
5309 }
5310 pub fn with_event_type<T: Into<String>>(mut self, field: T) -> Self {
5312 self.set_event_type(field.into());
5313 self
5314 }
5315 pub fn contents(&self) -> &super::Bcs {
5317 self.contents
5318 .as_ref()
5319 .map(|field| field as _)
5320 .unwrap_or_else(|| super::Bcs::default_instance() as _)
5321 }
5322 pub fn contents_opt_mut(&mut self) -> Option<&mut super::Bcs> {
5324 self.contents.as_mut().map(|field| field as _)
5325 }
5326 pub fn contents_mut(&mut self) -> &mut super::Bcs {
5329 self.contents.get_or_insert_default()
5330 }
5331 pub fn contents_opt(&self) -> Option<&super::Bcs> {
5333 self.contents.as_ref().map(|field| field as _)
5334 }
5335 pub fn set_contents<T: Into<super::Bcs>>(&mut self, field: T) {
5337 self.contents = Some(field.into().into());
5338 }
5339 pub fn with_contents<T: Into<super::Bcs>>(mut self, field: T) -> Self {
5341 self.set_contents(field.into());
5342 self
5343 }
5344 pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
5346 self.json.as_mut().map(|field| field as _)
5347 }
5348 pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
5351 self.json.get_or_insert_default()
5352 }
5353 pub fn json_opt(&self) -> Option<&::prost_types::Value> {
5355 self.json.as_ref().map(|field| field as _)
5356 }
5357 pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
5359 self.json = Some(field.into().into());
5360 }
5361 pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
5363 self.set_json(field.into());
5364 self
5365 }
5366 pub fn checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
5368 self.checkpoint.as_mut().map(|field| field as _)
5369 }
5370 pub fn checkpoint_mut(&mut self) -> &mut u64 {
5373 self.checkpoint.get_or_insert_default()
5374 }
5375 pub fn checkpoint_opt(&self) -> Option<u64> {
5377 self.checkpoint.as_ref().map(|field| *field)
5378 }
5379 pub fn set_checkpoint(&mut self, field: u64) {
5381 self.checkpoint = Some(field);
5382 }
5383 pub fn with_checkpoint(mut self, field: u64) -> Self {
5385 self.set_checkpoint(field);
5386 self
5387 }
5388 pub fn transaction_digest_opt_mut(&mut self) -> Option<&mut String> {
5390 self.transaction_digest.as_mut().map(|field| field as _)
5391 }
5392 pub fn transaction_digest_mut(&mut self) -> &mut String {
5395 self.transaction_digest.get_or_insert_default()
5396 }
5397 pub fn transaction_digest_opt(&self) -> Option<&str> {
5399 self.transaction_digest.as_ref().map(|field| field as _)
5400 }
5401 pub fn set_transaction_digest<T: Into<String>>(&mut self, field: T) {
5403 self.transaction_digest = Some(field.into().into());
5404 }
5405 pub fn with_transaction_digest<T: Into<String>>(mut self, field: T) -> Self {
5407 self.set_transaction_digest(field.into());
5408 self
5409 }
5410 pub fn transaction_index_opt_mut(&mut self) -> Option<&mut u64> {
5412 self.transaction_index.as_mut().map(|field| field as _)
5413 }
5414 pub fn transaction_index_mut(&mut self) -> &mut u64 {
5417 self.transaction_index.get_or_insert_default()
5418 }
5419 pub fn transaction_index_opt(&self) -> Option<u64> {
5421 self.transaction_index.as_ref().map(|field| *field)
5422 }
5423 pub fn set_transaction_index(&mut self, field: u64) {
5425 self.transaction_index = Some(field);
5426 }
5427 pub fn with_transaction_index(mut self, field: u64) -> Self {
5429 self.set_transaction_index(field);
5430 self
5431 }
5432 pub fn event_index_opt_mut(&mut self) -> Option<&mut u32> {
5434 self.event_index.as_mut().map(|field| field as _)
5435 }
5436 pub fn event_index_mut(&mut self) -> &mut u32 {
5439 self.event_index.get_or_insert_default()
5440 }
5441 pub fn event_index_opt(&self) -> Option<u32> {
5443 self.event_index.as_ref().map(|field| *field)
5444 }
5445 pub fn set_event_index(&mut self, field: u32) {
5447 self.event_index = Some(field);
5448 }
5449 pub fn with_event_index(mut self, field: u32) -> Self {
5451 self.set_event_index(field);
5452 self
5453 }
5454 }
5455 impl super::EventDigestEntry {
5456 pub const fn const_default() -> Self {
5457 Self {
5458 event_index: None,
5459 digest: None,
5460 }
5461 }
5462 #[doc(hidden)]
5463 pub fn default_instance() -> &'static Self {
5464 static DEFAULT: super::EventDigestEntry = super::EventDigestEntry::const_default();
5465 &DEFAULT
5466 }
5467 pub fn event_index_opt_mut(&mut self) -> Option<&mut u64> {
5469 self.event_index.as_mut().map(|field| field as _)
5470 }
5471 pub fn event_index_mut(&mut self) -> &mut u64 {
5474 self.event_index.get_or_insert_default()
5475 }
5476 pub fn event_index_opt(&self) -> Option<u64> {
5478 self.event_index.as_ref().map(|field| *field)
5479 }
5480 pub fn set_event_index(&mut self, field: u64) {
5482 self.event_index = Some(field);
5483 }
5484 pub fn with_event_index(mut self, field: u64) -> Self {
5486 self.set_event_index(field);
5487 self
5488 }
5489 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
5491 self.digest.as_mut().map(|field| field as _)
5492 }
5493 pub fn digest_mut(&mut self) -> &mut String {
5496 self.digest.get_or_insert_default()
5497 }
5498 pub fn digest_opt(&self) -> Option<&str> {
5500 self.digest.as_ref().map(|field| field as _)
5501 }
5502 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
5504 self.digest = Some(field.into().into());
5505 }
5506 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
5508 self.set_digest(field.into());
5509 self
5510 }
5511 }
5512 impl super::EventFilter {
5513 pub const fn const_default() -> Self {
5514 Self { terms: Vec::new() }
5515 }
5516 #[doc(hidden)]
5517 pub fn default_instance() -> &'static Self {
5518 static DEFAULT: super::EventFilter = super::EventFilter::const_default();
5519 &DEFAULT
5520 }
5521 pub fn terms(&self) -> &[super::EventTerm] {
5523 &self.terms
5524 }
5525 pub fn terms_mut(&mut self) -> &mut Vec<super::EventTerm> {
5528 &mut self.terms
5529 }
5530 pub fn set_terms(&mut self, field: Vec<super::EventTerm>) {
5532 self.terms = field;
5533 }
5534 pub fn with_terms(mut self, field: Vec<super::EventTerm>) -> Self {
5536 self.set_terms(field);
5537 self
5538 }
5539 }
5540 impl super::EventLiteral {
5541 pub const fn const_default() -> Self {
5542 Self {
5543 negated: false,
5544 predicate: None,
5545 }
5546 }
5547 #[doc(hidden)]
5548 pub fn default_instance() -> &'static Self {
5549 static DEFAULT: super::EventLiteral = super::EventLiteral::const_default();
5550 &DEFAULT
5551 }
5552 pub fn negated_mut(&mut self) -> &mut bool {
5555 &mut self.negated
5556 }
5557 pub fn set_negated(&mut self, field: bool) {
5559 self.negated = field;
5560 }
5561 pub fn with_negated(mut self, field: bool) -> Self {
5563 self.set_negated(field);
5564 self
5565 }
5566 pub fn sender(&self) -> &super::SenderFilter {
5568 if let Some(super::event_literal::Predicate::Sender(field)) = &self.predicate
5569 {
5570 field as _
5571 } else {
5572 super::SenderFilter::default_instance() as _
5573 }
5574 }
5575 pub fn sender_opt(&self) -> Option<&super::SenderFilter> {
5577 if let Some(super::event_literal::Predicate::Sender(field)) = &self.predicate
5578 {
5579 Some(field as _)
5580 } else {
5581 None
5582 }
5583 }
5584 pub fn sender_opt_mut(&mut self) -> Option<&mut super::SenderFilter> {
5586 if let Some(super::event_literal::Predicate::Sender(field)) = &mut self
5587 .predicate
5588 {
5589 Some(field as _)
5590 } else {
5591 None
5592 }
5593 }
5594 pub fn sender_mut(&mut self) -> &mut super::SenderFilter {
5598 if self.sender_opt_mut().is_none() {
5599 self.predicate = Some(
5600 super::event_literal::Predicate::Sender(
5601 super::SenderFilter::default(),
5602 ),
5603 );
5604 }
5605 self.sender_opt_mut().unwrap()
5606 }
5607 pub fn set_sender<T: Into<super::SenderFilter>>(&mut self, field: T) {
5610 self.predicate = Some(
5611 super::event_literal::Predicate::Sender(field.into().into()),
5612 );
5613 }
5614 pub fn with_sender<T: Into<super::SenderFilter>>(mut self, field: T) -> Self {
5617 self.set_sender(field.into());
5618 self
5619 }
5620 pub fn emit_module(&self) -> &super::EmitModuleFilter {
5622 if let Some(super::event_literal::Predicate::EmitModule(field)) = &self
5623 .predicate
5624 {
5625 field as _
5626 } else {
5627 super::EmitModuleFilter::default_instance() as _
5628 }
5629 }
5630 pub fn emit_module_opt(&self) -> Option<&super::EmitModuleFilter> {
5632 if let Some(super::event_literal::Predicate::EmitModule(field)) = &self
5633 .predicate
5634 {
5635 Some(field as _)
5636 } else {
5637 None
5638 }
5639 }
5640 pub fn emit_module_opt_mut(&mut self) -> Option<&mut super::EmitModuleFilter> {
5642 if let Some(super::event_literal::Predicate::EmitModule(field)) = &mut self
5643 .predicate
5644 {
5645 Some(field as _)
5646 } else {
5647 None
5648 }
5649 }
5650 pub fn emit_module_mut(&mut self) -> &mut super::EmitModuleFilter {
5654 if self.emit_module_opt_mut().is_none() {
5655 self.predicate = Some(
5656 super::event_literal::Predicate::EmitModule(
5657 super::EmitModuleFilter::default(),
5658 ),
5659 );
5660 }
5661 self.emit_module_opt_mut().unwrap()
5662 }
5663 pub fn set_emit_module<T: Into<super::EmitModuleFilter>>(&mut self, field: T) {
5666 self.predicate = Some(
5667 super::event_literal::Predicate::EmitModule(field.into().into()),
5668 );
5669 }
5670 pub fn with_emit_module<T: Into<super::EmitModuleFilter>>(
5673 mut self,
5674 field: T,
5675 ) -> Self {
5676 self.set_emit_module(field.into());
5677 self
5678 }
5679 pub fn event_type(&self) -> &super::EventTypeFilter {
5681 if let Some(super::event_literal::Predicate::EventType(field)) = &self
5682 .predicate
5683 {
5684 field as _
5685 } else {
5686 super::EventTypeFilter::default_instance() as _
5687 }
5688 }
5689 pub fn event_type_opt(&self) -> Option<&super::EventTypeFilter> {
5691 if let Some(super::event_literal::Predicate::EventType(field)) = &self
5692 .predicate
5693 {
5694 Some(field as _)
5695 } else {
5696 None
5697 }
5698 }
5699 pub fn event_type_opt_mut(&mut self) -> Option<&mut super::EventTypeFilter> {
5701 if let Some(super::event_literal::Predicate::EventType(field)) = &mut self
5702 .predicate
5703 {
5704 Some(field as _)
5705 } else {
5706 None
5707 }
5708 }
5709 pub fn event_type_mut(&mut self) -> &mut super::EventTypeFilter {
5713 if self.event_type_opt_mut().is_none() {
5714 self.predicate = Some(
5715 super::event_literal::Predicate::EventType(
5716 super::EventTypeFilter::default(),
5717 ),
5718 );
5719 }
5720 self.event_type_opt_mut().unwrap()
5721 }
5722 pub fn set_event_type<T: Into<super::EventTypeFilter>>(&mut self, field: T) {
5725 self.predicate = Some(
5726 super::event_literal::Predicate::EventType(field.into().into()),
5727 );
5728 }
5729 pub fn with_event_type<T: Into<super::EventTypeFilter>>(
5732 mut self,
5733 field: T,
5734 ) -> Self {
5735 self.set_event_type(field.into());
5736 self
5737 }
5738 pub fn event_stream_head(&self) -> &super::EventStreamHeadFilter {
5740 if let Some(super::event_literal::Predicate::EventStreamHead(field)) = &self
5741 .predicate
5742 {
5743 field as _
5744 } else {
5745 super::EventStreamHeadFilter::default_instance() as _
5746 }
5747 }
5748 pub fn event_stream_head_opt(&self) -> Option<&super::EventStreamHeadFilter> {
5750 if let Some(super::event_literal::Predicate::EventStreamHead(field)) = &self
5751 .predicate
5752 {
5753 Some(field as _)
5754 } else {
5755 None
5756 }
5757 }
5758 pub fn event_stream_head_opt_mut(
5760 &mut self,
5761 ) -> Option<&mut super::EventStreamHeadFilter> {
5762 if let Some(super::event_literal::Predicate::EventStreamHead(field)) = &mut self
5763 .predicate
5764 {
5765 Some(field as _)
5766 } else {
5767 None
5768 }
5769 }
5770 pub fn event_stream_head_mut(&mut self) -> &mut super::EventStreamHeadFilter {
5774 if self.event_stream_head_opt_mut().is_none() {
5775 self.predicate = Some(
5776 super::event_literal::Predicate::EventStreamHead(
5777 super::EventStreamHeadFilter::default(),
5778 ),
5779 );
5780 }
5781 self.event_stream_head_opt_mut().unwrap()
5782 }
5783 pub fn set_event_stream_head<T: Into<super::EventStreamHeadFilter>>(
5786 &mut self,
5787 field: T,
5788 ) {
5789 self.predicate = Some(
5790 super::event_literal::Predicate::EventStreamHead(field.into().into()),
5791 );
5792 }
5793 pub fn with_event_stream_head<T: Into<super::EventStreamHeadFilter>>(
5796 mut self,
5797 field: T,
5798 ) -> Self {
5799 self.set_event_stream_head(field.into());
5800 self
5801 }
5802 }
5803 impl super::EventStreamHeadFilter {
5804 pub const fn const_default() -> Self {
5805 Self { stream_id: None }
5806 }
5807 #[doc(hidden)]
5808 pub fn default_instance() -> &'static Self {
5809 static DEFAULT: super::EventStreamHeadFilter = super::EventStreamHeadFilter::const_default();
5810 &DEFAULT
5811 }
5812 pub fn stream_id_opt_mut(&mut self) -> Option<&mut String> {
5814 self.stream_id.as_mut().map(|field| field as _)
5815 }
5816 pub fn stream_id_mut(&mut self) -> &mut String {
5819 self.stream_id.get_or_insert_default()
5820 }
5821 pub fn stream_id_opt(&self) -> Option<&str> {
5823 self.stream_id.as_ref().map(|field| field as _)
5824 }
5825 pub fn set_stream_id<T: Into<String>>(&mut self, field: T) {
5827 self.stream_id = Some(field.into().into());
5828 }
5829 pub fn with_stream_id<T: Into<String>>(mut self, field: T) -> Self {
5831 self.set_stream_id(field.into());
5832 self
5833 }
5834 }
5835 impl super::EventTerm {
5836 pub const fn const_default() -> Self {
5837 Self { literals: Vec::new() }
5838 }
5839 #[doc(hidden)]
5840 pub fn default_instance() -> &'static Self {
5841 static DEFAULT: super::EventTerm = super::EventTerm::const_default();
5842 &DEFAULT
5843 }
5844 pub fn literals(&self) -> &[super::EventLiteral] {
5846 &self.literals
5847 }
5848 pub fn literals_mut(&mut self) -> &mut Vec<super::EventLiteral> {
5851 &mut self.literals
5852 }
5853 pub fn set_literals(&mut self, field: Vec<super::EventLiteral>) {
5855 self.literals = field;
5856 }
5857 pub fn with_literals(mut self, field: Vec<super::EventLiteral>) -> Self {
5859 self.set_literals(field);
5860 self
5861 }
5862 }
5863 impl super::EventTypeFilter {
5864 pub const fn const_default() -> Self {
5865 Self { event_type: None }
5866 }
5867 #[doc(hidden)]
5868 pub fn default_instance() -> &'static Self {
5869 static DEFAULT: super::EventTypeFilter = super::EventTypeFilter::const_default();
5870 &DEFAULT
5871 }
5872 pub fn event_type_opt_mut(&mut self) -> Option<&mut String> {
5874 self.event_type.as_mut().map(|field| field as _)
5875 }
5876 pub fn event_type_mut(&mut self) -> &mut String {
5879 self.event_type.get_or_insert_default()
5880 }
5881 pub fn event_type_opt(&self) -> Option<&str> {
5883 self.event_type.as_ref().map(|field| field as _)
5884 }
5885 pub fn set_event_type<T: Into<String>>(&mut self, field: T) {
5887 self.event_type = Some(field.into().into());
5888 }
5889 pub fn with_event_type<T: Into<String>>(mut self, field: T) -> Self {
5891 self.set_event_type(field.into());
5892 self
5893 }
5894 }
5895 impl super::ExecuteTransactionRequest {
5896 pub const fn const_default() -> Self {
5897 Self {
5898 transaction: None,
5899 signatures: Vec::new(),
5900 read_mask: None,
5901 }
5902 }
5903 #[doc(hidden)]
5904 pub fn default_instance() -> &'static Self {
5905 static DEFAULT: super::ExecuteTransactionRequest = super::ExecuteTransactionRequest::const_default();
5906 &DEFAULT
5907 }
5908 pub fn transaction(&self) -> &super::Transaction {
5910 self.transaction
5911 .as_ref()
5912 .map(|field| field as _)
5913 .unwrap_or_else(|| super::Transaction::default_instance() as _)
5914 }
5915 pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
5917 self.transaction.as_mut().map(|field| field as _)
5918 }
5919 pub fn transaction_mut(&mut self) -> &mut super::Transaction {
5922 self.transaction.get_or_insert_default()
5923 }
5924 pub fn transaction_opt(&self) -> Option<&super::Transaction> {
5926 self.transaction.as_ref().map(|field| field as _)
5927 }
5928 pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
5930 self.transaction = Some(field.into().into());
5931 }
5932 pub fn with_transaction<T: Into<super::Transaction>>(
5934 mut self,
5935 field: T,
5936 ) -> Self {
5937 self.set_transaction(field.into());
5938 self
5939 }
5940 pub fn signatures(&self) -> &[super::UserSignature] {
5942 &self.signatures
5943 }
5944 pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
5947 &mut self.signatures
5948 }
5949 pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
5951 self.signatures = field;
5952 }
5953 pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
5955 self.set_signatures(field);
5956 self
5957 }
5958 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
5960 self.read_mask.as_mut().map(|field| field as _)
5961 }
5962 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
5965 self.read_mask.get_or_insert_default()
5966 }
5967 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
5969 self.read_mask.as_ref().map(|field| field as _)
5970 }
5971 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
5973 self.read_mask = Some(field.into().into());
5974 }
5975 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
5977 mut self,
5978 field: T,
5979 ) -> Self {
5980 self.set_read_mask(field.into());
5981 self
5982 }
5983 }
5984 impl super::ExecuteTransactionResponse {
5985 pub const fn const_default() -> Self {
5986 Self { transaction: None }
5987 }
5988 #[doc(hidden)]
5989 pub fn default_instance() -> &'static Self {
5990 static DEFAULT: super::ExecuteTransactionResponse = super::ExecuteTransactionResponse::const_default();
5991 &DEFAULT
5992 }
5993 pub fn transaction(&self) -> &super::ExecutedTransaction {
5995 self.transaction
5996 .as_ref()
5997 .map(|field| field as _)
5998 .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
5999 }
6000 pub fn transaction_opt_mut(
6002 &mut self,
6003 ) -> Option<&mut super::ExecutedTransaction> {
6004 self.transaction.as_mut().map(|field| field as _)
6005 }
6006 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
6009 self.transaction.get_or_insert_default()
6010 }
6011 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
6013 self.transaction.as_ref().map(|field| field as _)
6014 }
6015 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
6017 &mut self,
6018 field: T,
6019 ) {
6020 self.transaction = Some(field.into().into());
6021 }
6022 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
6024 mut self,
6025 field: T,
6026 ) -> Self {
6027 self.set_transaction(field.into());
6028 self
6029 }
6030 }
6031 impl super::ExecutedTransaction {
6032 pub const fn const_default() -> Self {
6033 Self {
6034 digest: None,
6035 transaction: None,
6036 signatures: Vec::new(),
6037 effects: None,
6038 events: None,
6039 checkpoint: None,
6040 timestamp: None,
6041 balance_changes: Vec::new(),
6042 objects: None,
6043 transaction_index: None,
6044 }
6045 }
6046 #[doc(hidden)]
6047 pub fn default_instance() -> &'static Self {
6048 static DEFAULT: super::ExecutedTransaction = super::ExecutedTransaction::const_default();
6049 &DEFAULT
6050 }
6051 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
6053 self.digest.as_mut().map(|field| field as _)
6054 }
6055 pub fn digest_mut(&mut self) -> &mut String {
6058 self.digest.get_or_insert_default()
6059 }
6060 pub fn digest_opt(&self) -> Option<&str> {
6062 self.digest.as_ref().map(|field| field as _)
6063 }
6064 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
6066 self.digest = Some(field.into().into());
6067 }
6068 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
6070 self.set_digest(field.into());
6071 self
6072 }
6073 pub fn transaction(&self) -> &super::Transaction {
6075 self.transaction
6076 .as_ref()
6077 .map(|field| field as _)
6078 .unwrap_or_else(|| super::Transaction::default_instance() as _)
6079 }
6080 pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
6082 self.transaction.as_mut().map(|field| field as _)
6083 }
6084 pub fn transaction_mut(&mut self) -> &mut super::Transaction {
6087 self.transaction.get_or_insert_default()
6088 }
6089 pub fn transaction_opt(&self) -> Option<&super::Transaction> {
6091 self.transaction.as_ref().map(|field| field as _)
6092 }
6093 pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
6095 self.transaction = Some(field.into().into());
6096 }
6097 pub fn with_transaction<T: Into<super::Transaction>>(
6099 mut self,
6100 field: T,
6101 ) -> Self {
6102 self.set_transaction(field.into());
6103 self
6104 }
6105 pub fn signatures(&self) -> &[super::UserSignature] {
6107 &self.signatures
6108 }
6109 pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
6112 &mut self.signatures
6113 }
6114 pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
6116 self.signatures = field;
6117 }
6118 pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
6120 self.set_signatures(field);
6121 self
6122 }
6123 pub fn effects(&self) -> &super::TransactionEffects {
6125 self.effects
6126 .as_ref()
6127 .map(|field| field as _)
6128 .unwrap_or_else(|| super::TransactionEffects::default_instance() as _)
6129 }
6130 pub fn effects_opt_mut(&mut self) -> Option<&mut super::TransactionEffects> {
6132 self.effects.as_mut().map(|field| field as _)
6133 }
6134 pub fn effects_mut(&mut self) -> &mut super::TransactionEffects {
6137 self.effects.get_or_insert_default()
6138 }
6139 pub fn effects_opt(&self) -> Option<&super::TransactionEffects> {
6141 self.effects.as_ref().map(|field| field as _)
6142 }
6143 pub fn set_effects<T: Into<super::TransactionEffects>>(&mut self, field: T) {
6145 self.effects = Some(field.into().into());
6146 }
6147 pub fn with_effects<T: Into<super::TransactionEffects>>(
6149 mut self,
6150 field: T,
6151 ) -> Self {
6152 self.set_effects(field.into());
6153 self
6154 }
6155 pub fn events(&self) -> &super::TransactionEvents {
6157 self.events
6158 .as_ref()
6159 .map(|field| field as _)
6160 .unwrap_or_else(|| super::TransactionEvents::default_instance() as _)
6161 }
6162 pub fn events_opt_mut(&mut self) -> Option<&mut super::TransactionEvents> {
6164 self.events.as_mut().map(|field| field as _)
6165 }
6166 pub fn events_mut(&mut self) -> &mut super::TransactionEvents {
6169 self.events.get_or_insert_default()
6170 }
6171 pub fn events_opt(&self) -> Option<&super::TransactionEvents> {
6173 self.events.as_ref().map(|field| field as _)
6174 }
6175 pub fn set_events<T: Into<super::TransactionEvents>>(&mut self, field: T) {
6177 self.events = Some(field.into().into());
6178 }
6179 pub fn with_events<T: Into<super::TransactionEvents>>(
6181 mut self,
6182 field: T,
6183 ) -> Self {
6184 self.set_events(field.into());
6185 self
6186 }
6187 pub fn checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
6189 self.checkpoint.as_mut().map(|field| field as _)
6190 }
6191 pub fn checkpoint_mut(&mut self) -> &mut u64 {
6194 self.checkpoint.get_or_insert_default()
6195 }
6196 pub fn checkpoint_opt(&self) -> Option<u64> {
6198 self.checkpoint.as_ref().map(|field| *field)
6199 }
6200 pub fn set_checkpoint(&mut self, field: u64) {
6202 self.checkpoint = Some(field);
6203 }
6204 pub fn with_checkpoint(mut self, field: u64) -> Self {
6206 self.set_checkpoint(field);
6207 self
6208 }
6209 pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
6211 self.timestamp.as_mut().map(|field| field as _)
6212 }
6213 pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
6216 self.timestamp.get_or_insert_default()
6217 }
6218 pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
6220 self.timestamp.as_ref().map(|field| field as _)
6221 }
6222 pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
6224 self.timestamp = Some(field.into().into());
6225 }
6226 pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
6228 mut self,
6229 field: T,
6230 ) -> Self {
6231 self.set_timestamp(field.into());
6232 self
6233 }
6234 pub fn balance_changes(&self) -> &[super::BalanceChange] {
6236 &self.balance_changes
6237 }
6238 pub fn balance_changes_mut(&mut self) -> &mut Vec<super::BalanceChange> {
6241 &mut self.balance_changes
6242 }
6243 pub fn set_balance_changes(&mut self, field: Vec<super::BalanceChange>) {
6245 self.balance_changes = field;
6246 }
6247 pub fn with_balance_changes(mut self, field: Vec<super::BalanceChange>) -> Self {
6249 self.set_balance_changes(field);
6250 self
6251 }
6252 pub fn objects(&self) -> &super::ObjectSet {
6254 self.objects
6255 .as_ref()
6256 .map(|field| field as _)
6257 .unwrap_or_else(|| super::ObjectSet::default_instance() as _)
6258 }
6259 pub fn objects_opt_mut(&mut self) -> Option<&mut super::ObjectSet> {
6261 self.objects.as_mut().map(|field| field as _)
6262 }
6263 pub fn objects_mut(&mut self) -> &mut super::ObjectSet {
6266 self.objects.get_or_insert_default()
6267 }
6268 pub fn objects_opt(&self) -> Option<&super::ObjectSet> {
6270 self.objects.as_ref().map(|field| field as _)
6271 }
6272 pub fn set_objects<T: Into<super::ObjectSet>>(&mut self, field: T) {
6274 self.objects = Some(field.into().into());
6275 }
6276 pub fn with_objects<T: Into<super::ObjectSet>>(mut self, field: T) -> Self {
6278 self.set_objects(field.into());
6279 self
6280 }
6281 pub fn transaction_index_opt_mut(&mut self) -> Option<&mut u64> {
6283 self.transaction_index.as_mut().map(|field| field as _)
6284 }
6285 pub fn transaction_index_mut(&mut self) -> &mut u64 {
6288 self.transaction_index.get_or_insert_default()
6289 }
6290 pub fn transaction_index_opt(&self) -> Option<u64> {
6292 self.transaction_index.as_ref().map(|field| *field)
6293 }
6294 pub fn set_transaction_index(&mut self, field: u64) {
6296 self.transaction_index = Some(field);
6297 }
6298 pub fn with_transaction_index(mut self, field: u64) -> Self {
6300 self.set_transaction_index(field);
6301 self
6302 }
6303 }
6304 impl super::ExecutionError {
6305 pub const fn const_default() -> Self {
6306 Self {
6307 description: None,
6308 command: None,
6309 kind: None,
6310 error_details: None,
6311 }
6312 }
6313 #[doc(hidden)]
6314 pub fn default_instance() -> &'static Self {
6315 static DEFAULT: super::ExecutionError = super::ExecutionError::const_default();
6316 &DEFAULT
6317 }
6318 pub fn description_opt_mut(&mut self) -> Option<&mut String> {
6320 self.description.as_mut().map(|field| field as _)
6321 }
6322 pub fn description_mut(&mut self) -> &mut String {
6325 self.description.get_or_insert_default()
6326 }
6327 pub fn description_opt(&self) -> Option<&str> {
6329 self.description.as_ref().map(|field| field as _)
6330 }
6331 pub fn set_description<T: Into<String>>(&mut self, field: T) {
6333 self.description = Some(field.into().into());
6334 }
6335 pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
6337 self.set_description(field.into());
6338 self
6339 }
6340 pub fn command_opt_mut(&mut self) -> Option<&mut u64> {
6342 self.command.as_mut().map(|field| field as _)
6343 }
6344 pub fn command_mut(&mut self) -> &mut u64 {
6347 self.command.get_or_insert_default()
6348 }
6349 pub fn command_opt(&self) -> Option<u64> {
6351 self.command.as_ref().map(|field| *field)
6352 }
6353 pub fn set_command(&mut self, field: u64) {
6355 self.command = Some(field);
6356 }
6357 pub fn with_command(mut self, field: u64) -> Self {
6359 self.set_command(field);
6360 self
6361 }
6362 pub fn with_kind<T: Into<super::execution_error::ExecutionErrorKind>>(
6364 mut self,
6365 field: T,
6366 ) -> Self {
6367 self.set_kind(field.into());
6368 self
6369 }
6370 pub fn abort(&self) -> &super::MoveAbort {
6372 if let Some(super::execution_error::ErrorDetails::Abort(field)) = &self
6373 .error_details
6374 {
6375 field as _
6376 } else {
6377 super::MoveAbort::default_instance() as _
6378 }
6379 }
6380 pub fn abort_opt(&self) -> Option<&super::MoveAbort> {
6382 if let Some(super::execution_error::ErrorDetails::Abort(field)) = &self
6383 .error_details
6384 {
6385 Some(field as _)
6386 } else {
6387 None
6388 }
6389 }
6390 pub fn abort_opt_mut(&mut self) -> Option<&mut super::MoveAbort> {
6392 if let Some(super::execution_error::ErrorDetails::Abort(field)) = &mut self
6393 .error_details
6394 {
6395 Some(field as _)
6396 } else {
6397 None
6398 }
6399 }
6400 pub fn abort_mut(&mut self) -> &mut super::MoveAbort {
6404 if self.abort_opt_mut().is_none() {
6405 self.error_details = Some(
6406 super::execution_error::ErrorDetails::Abort(
6407 super::MoveAbort::default(),
6408 ),
6409 );
6410 }
6411 self.abort_opt_mut().unwrap()
6412 }
6413 pub fn set_abort<T: Into<super::MoveAbort>>(&mut self, field: T) {
6416 self.error_details = Some(
6417 super::execution_error::ErrorDetails::Abort(field.into().into()),
6418 );
6419 }
6420 pub fn with_abort<T: Into<super::MoveAbort>>(mut self, field: T) -> Self {
6423 self.set_abort(field.into());
6424 self
6425 }
6426 pub fn size_error(&self) -> &super::SizeError {
6428 if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &self
6429 .error_details
6430 {
6431 field as _
6432 } else {
6433 super::SizeError::default_instance() as _
6434 }
6435 }
6436 pub fn size_error_opt(&self) -> Option<&super::SizeError> {
6438 if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &self
6439 .error_details
6440 {
6441 Some(field as _)
6442 } else {
6443 None
6444 }
6445 }
6446 pub fn size_error_opt_mut(&mut self) -> Option<&mut super::SizeError> {
6448 if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &mut self
6449 .error_details
6450 {
6451 Some(field as _)
6452 } else {
6453 None
6454 }
6455 }
6456 pub fn size_error_mut(&mut self) -> &mut super::SizeError {
6460 if self.size_error_opt_mut().is_none() {
6461 self.error_details = Some(
6462 super::execution_error::ErrorDetails::SizeError(
6463 super::SizeError::default(),
6464 ),
6465 );
6466 }
6467 self.size_error_opt_mut().unwrap()
6468 }
6469 pub fn set_size_error<T: Into<super::SizeError>>(&mut self, field: T) {
6472 self.error_details = Some(
6473 super::execution_error::ErrorDetails::SizeError(field.into().into()),
6474 );
6475 }
6476 pub fn with_size_error<T: Into<super::SizeError>>(mut self, field: T) -> Self {
6479 self.set_size_error(field.into());
6480 self
6481 }
6482 pub fn command_argument_error(&self) -> &super::CommandArgumentError {
6484 if let Some(
6485 super::execution_error::ErrorDetails::CommandArgumentError(field),
6486 ) = &self.error_details
6487 {
6488 field as _
6489 } else {
6490 super::CommandArgumentError::default_instance() as _
6491 }
6492 }
6493 pub fn command_argument_error_opt(
6495 &self,
6496 ) -> Option<&super::CommandArgumentError> {
6497 if let Some(
6498 super::execution_error::ErrorDetails::CommandArgumentError(field),
6499 ) = &self.error_details
6500 {
6501 Some(field as _)
6502 } else {
6503 None
6504 }
6505 }
6506 pub fn command_argument_error_opt_mut(
6508 &mut self,
6509 ) -> Option<&mut super::CommandArgumentError> {
6510 if let Some(
6511 super::execution_error::ErrorDetails::CommandArgumentError(field),
6512 ) = &mut self.error_details
6513 {
6514 Some(field as _)
6515 } else {
6516 None
6517 }
6518 }
6519 pub fn command_argument_error_mut(
6523 &mut self,
6524 ) -> &mut super::CommandArgumentError {
6525 if self.command_argument_error_opt_mut().is_none() {
6526 self.error_details = Some(
6527 super::execution_error::ErrorDetails::CommandArgumentError(
6528 super::CommandArgumentError::default(),
6529 ),
6530 );
6531 }
6532 self.command_argument_error_opt_mut().unwrap()
6533 }
6534 pub fn set_command_argument_error<T: Into<super::CommandArgumentError>>(
6537 &mut self,
6538 field: T,
6539 ) {
6540 self.error_details = Some(
6541 super::execution_error::ErrorDetails::CommandArgumentError(
6542 field.into().into(),
6543 ),
6544 );
6545 }
6546 pub fn with_command_argument_error<T: Into<super::CommandArgumentError>>(
6549 mut self,
6550 field: T,
6551 ) -> Self {
6552 self.set_command_argument_error(field.into());
6553 self
6554 }
6555 pub fn type_argument_error(&self) -> &super::TypeArgumentError {
6557 if let Some(
6558 super::execution_error::ErrorDetails::TypeArgumentError(field),
6559 ) = &self.error_details
6560 {
6561 field as _
6562 } else {
6563 super::TypeArgumentError::default_instance() as _
6564 }
6565 }
6566 pub fn type_argument_error_opt(&self) -> Option<&super::TypeArgumentError> {
6568 if let Some(
6569 super::execution_error::ErrorDetails::TypeArgumentError(field),
6570 ) = &self.error_details
6571 {
6572 Some(field as _)
6573 } else {
6574 None
6575 }
6576 }
6577 pub fn type_argument_error_opt_mut(
6579 &mut self,
6580 ) -> Option<&mut super::TypeArgumentError> {
6581 if let Some(
6582 super::execution_error::ErrorDetails::TypeArgumentError(field),
6583 ) = &mut self.error_details
6584 {
6585 Some(field as _)
6586 } else {
6587 None
6588 }
6589 }
6590 pub fn type_argument_error_mut(&mut self) -> &mut super::TypeArgumentError {
6594 if self.type_argument_error_opt_mut().is_none() {
6595 self.error_details = Some(
6596 super::execution_error::ErrorDetails::TypeArgumentError(
6597 super::TypeArgumentError::default(),
6598 ),
6599 );
6600 }
6601 self.type_argument_error_opt_mut().unwrap()
6602 }
6603 pub fn set_type_argument_error<T: Into<super::TypeArgumentError>>(
6606 &mut self,
6607 field: T,
6608 ) {
6609 self.error_details = Some(
6610 super::execution_error::ErrorDetails::TypeArgumentError(
6611 field.into().into(),
6612 ),
6613 );
6614 }
6615 pub fn with_type_argument_error<T: Into<super::TypeArgumentError>>(
6618 mut self,
6619 field: T,
6620 ) -> Self {
6621 self.set_type_argument_error(field.into());
6622 self
6623 }
6624 pub fn package_upgrade_error(&self) -> &super::PackageUpgradeError {
6626 if let Some(
6627 super::execution_error::ErrorDetails::PackageUpgradeError(field),
6628 ) = &self.error_details
6629 {
6630 field as _
6631 } else {
6632 super::PackageUpgradeError::default_instance() as _
6633 }
6634 }
6635 pub fn package_upgrade_error_opt(&self) -> Option<&super::PackageUpgradeError> {
6637 if let Some(
6638 super::execution_error::ErrorDetails::PackageUpgradeError(field),
6639 ) = &self.error_details
6640 {
6641 Some(field as _)
6642 } else {
6643 None
6644 }
6645 }
6646 pub fn package_upgrade_error_opt_mut(
6648 &mut self,
6649 ) -> Option<&mut super::PackageUpgradeError> {
6650 if let Some(
6651 super::execution_error::ErrorDetails::PackageUpgradeError(field),
6652 ) = &mut self.error_details
6653 {
6654 Some(field as _)
6655 } else {
6656 None
6657 }
6658 }
6659 pub fn package_upgrade_error_mut(&mut self) -> &mut super::PackageUpgradeError {
6663 if self.package_upgrade_error_opt_mut().is_none() {
6664 self.error_details = Some(
6665 super::execution_error::ErrorDetails::PackageUpgradeError(
6666 super::PackageUpgradeError::default(),
6667 ),
6668 );
6669 }
6670 self.package_upgrade_error_opt_mut().unwrap()
6671 }
6672 pub fn set_package_upgrade_error<T: Into<super::PackageUpgradeError>>(
6675 &mut self,
6676 field: T,
6677 ) {
6678 self.error_details = Some(
6679 super::execution_error::ErrorDetails::PackageUpgradeError(
6680 field.into().into(),
6681 ),
6682 );
6683 }
6684 pub fn with_package_upgrade_error<T: Into<super::PackageUpgradeError>>(
6687 mut self,
6688 field: T,
6689 ) -> Self {
6690 self.set_package_upgrade_error(field.into());
6691 self
6692 }
6693 pub fn index_error(&self) -> &super::IndexError {
6695 if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &self
6696 .error_details
6697 {
6698 field as _
6699 } else {
6700 super::IndexError::default_instance() as _
6701 }
6702 }
6703 pub fn index_error_opt(&self) -> Option<&super::IndexError> {
6705 if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &self
6706 .error_details
6707 {
6708 Some(field as _)
6709 } else {
6710 None
6711 }
6712 }
6713 pub fn index_error_opt_mut(&mut self) -> Option<&mut super::IndexError> {
6715 if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &mut self
6716 .error_details
6717 {
6718 Some(field as _)
6719 } else {
6720 None
6721 }
6722 }
6723 pub fn index_error_mut(&mut self) -> &mut super::IndexError {
6727 if self.index_error_opt_mut().is_none() {
6728 self.error_details = Some(
6729 super::execution_error::ErrorDetails::IndexError(
6730 super::IndexError::default(),
6731 ),
6732 );
6733 }
6734 self.index_error_opt_mut().unwrap()
6735 }
6736 pub fn set_index_error<T: Into<super::IndexError>>(&mut self, field: T) {
6739 self.error_details = Some(
6740 super::execution_error::ErrorDetails::IndexError(field.into().into()),
6741 );
6742 }
6743 pub fn with_index_error<T: Into<super::IndexError>>(mut self, field: T) -> Self {
6746 self.set_index_error(field.into());
6747 self
6748 }
6749 pub fn object_id(&self) -> &str {
6751 if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &self
6752 .error_details
6753 {
6754 field as _
6755 } else {
6756 ""
6757 }
6758 }
6759 pub fn object_id_opt(&self) -> Option<&str> {
6761 if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &self
6762 .error_details
6763 {
6764 Some(field as _)
6765 } else {
6766 None
6767 }
6768 }
6769 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
6771 if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &mut self
6772 .error_details
6773 {
6774 Some(field as _)
6775 } else {
6776 None
6777 }
6778 }
6779 pub fn object_id_mut(&mut self) -> &mut String {
6783 if self.object_id_opt_mut().is_none() {
6784 self.error_details = Some(
6785 super::execution_error::ErrorDetails::ObjectId(String::default()),
6786 );
6787 }
6788 self.object_id_opt_mut().unwrap()
6789 }
6790 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
6793 self.error_details = Some(
6794 super::execution_error::ErrorDetails::ObjectId(field.into().into()),
6795 );
6796 }
6797 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
6800 self.set_object_id(field.into());
6801 self
6802 }
6803 pub fn coin_deny_list_error(&self) -> &super::CoinDenyListError {
6805 if let Some(
6806 super::execution_error::ErrorDetails::CoinDenyListError(field),
6807 ) = &self.error_details
6808 {
6809 field as _
6810 } else {
6811 super::CoinDenyListError::default_instance() as _
6812 }
6813 }
6814 pub fn coin_deny_list_error_opt(&self) -> Option<&super::CoinDenyListError> {
6816 if let Some(
6817 super::execution_error::ErrorDetails::CoinDenyListError(field),
6818 ) = &self.error_details
6819 {
6820 Some(field as _)
6821 } else {
6822 None
6823 }
6824 }
6825 pub fn coin_deny_list_error_opt_mut(
6827 &mut self,
6828 ) -> Option<&mut super::CoinDenyListError> {
6829 if let Some(
6830 super::execution_error::ErrorDetails::CoinDenyListError(field),
6831 ) = &mut self.error_details
6832 {
6833 Some(field as _)
6834 } else {
6835 None
6836 }
6837 }
6838 pub fn coin_deny_list_error_mut(&mut self) -> &mut super::CoinDenyListError {
6842 if self.coin_deny_list_error_opt_mut().is_none() {
6843 self.error_details = Some(
6844 super::execution_error::ErrorDetails::CoinDenyListError(
6845 super::CoinDenyListError::default(),
6846 ),
6847 );
6848 }
6849 self.coin_deny_list_error_opt_mut().unwrap()
6850 }
6851 pub fn set_coin_deny_list_error<T: Into<super::CoinDenyListError>>(
6854 &mut self,
6855 field: T,
6856 ) {
6857 self.error_details = Some(
6858 super::execution_error::ErrorDetails::CoinDenyListError(
6859 field.into().into(),
6860 ),
6861 );
6862 }
6863 pub fn with_coin_deny_list_error<T: Into<super::CoinDenyListError>>(
6866 mut self,
6867 field: T,
6868 ) -> Self {
6869 self.set_coin_deny_list_error(field.into());
6870 self
6871 }
6872 pub fn congested_objects(&self) -> &super::CongestedObjects {
6874 if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &self
6875 .error_details
6876 {
6877 field as _
6878 } else {
6879 super::CongestedObjects::default_instance() as _
6880 }
6881 }
6882 pub fn congested_objects_opt(&self) -> Option<&super::CongestedObjects> {
6884 if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &self
6885 .error_details
6886 {
6887 Some(field as _)
6888 } else {
6889 None
6890 }
6891 }
6892 pub fn congested_objects_opt_mut(
6894 &mut self,
6895 ) -> Option<&mut super::CongestedObjects> {
6896 if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &mut self
6897 .error_details
6898 {
6899 Some(field as _)
6900 } else {
6901 None
6902 }
6903 }
6904 pub fn congested_objects_mut(&mut self) -> &mut super::CongestedObjects {
6908 if self.congested_objects_opt_mut().is_none() {
6909 self.error_details = Some(
6910 super::execution_error::ErrorDetails::CongestedObjects(
6911 super::CongestedObjects::default(),
6912 ),
6913 );
6914 }
6915 self.congested_objects_opt_mut().unwrap()
6916 }
6917 pub fn set_congested_objects<T: Into<super::CongestedObjects>>(
6920 &mut self,
6921 field: T,
6922 ) {
6923 self.error_details = Some(
6924 super::execution_error::ErrorDetails::CongestedObjects(
6925 field.into().into(),
6926 ),
6927 );
6928 }
6929 pub fn with_congested_objects<T: Into<super::CongestedObjects>>(
6932 mut self,
6933 field: T,
6934 ) -> Self {
6935 self.set_congested_objects(field.into());
6936 self
6937 }
6938 }
6939 impl super::ExecutionStatus {
6940 pub const fn const_default() -> Self {
6941 Self { success: None, error: None }
6942 }
6943 #[doc(hidden)]
6944 pub fn default_instance() -> &'static Self {
6945 static DEFAULT: super::ExecutionStatus = super::ExecutionStatus::const_default();
6946 &DEFAULT
6947 }
6948 pub fn success_opt_mut(&mut self) -> Option<&mut bool> {
6950 self.success.as_mut().map(|field| field as _)
6951 }
6952 pub fn success_mut(&mut self) -> &mut bool {
6955 self.success.get_or_insert_default()
6956 }
6957 pub fn success_opt(&self) -> Option<bool> {
6959 self.success.as_ref().map(|field| *field)
6960 }
6961 pub fn set_success(&mut self, field: bool) {
6963 self.success = Some(field);
6964 }
6965 pub fn with_success(mut self, field: bool) -> Self {
6967 self.set_success(field);
6968 self
6969 }
6970 pub fn error(&self) -> &super::ExecutionError {
6972 self.error
6973 .as_ref()
6974 .map(|field| field as _)
6975 .unwrap_or_else(|| super::ExecutionError::default_instance() as _)
6976 }
6977 pub fn error_opt_mut(&mut self) -> Option<&mut super::ExecutionError> {
6979 self.error.as_mut().map(|field| field as _)
6980 }
6981 pub fn error_mut(&mut self) -> &mut super::ExecutionError {
6984 self.error.get_or_insert_default()
6985 }
6986 pub fn error_opt(&self) -> Option<&super::ExecutionError> {
6988 self.error.as_ref().map(|field| field as _)
6989 }
6990 pub fn set_error<T: Into<super::ExecutionError>>(&mut self, field: T) {
6992 self.error = Some(field.into().into());
6993 }
6994 pub fn with_error<T: Into<super::ExecutionError>>(mut self, field: T) -> Self {
6996 self.set_error(field.into());
6997 self
6998 }
6999 }
7000 impl super::ExecutionTimeObservation {
7001 pub const fn const_default() -> Self {
7002 Self {
7003 kind: None,
7004 move_entry_point: None,
7005 validator_observations: Vec::new(),
7006 }
7007 }
7008 #[doc(hidden)]
7009 pub fn default_instance() -> &'static Self {
7010 static DEFAULT: super::ExecutionTimeObservation = super::ExecutionTimeObservation::const_default();
7011 &DEFAULT
7012 }
7013 pub fn with_kind<
7015 T: Into<super::execution_time_observation::ExecutionTimeObservationKind>,
7016 >(mut self, field: T) -> Self {
7017 self.set_kind(field.into());
7018 self
7019 }
7020 pub fn move_entry_point(&self) -> &super::MoveCall {
7022 self.move_entry_point
7023 .as_ref()
7024 .map(|field| field as _)
7025 .unwrap_or_else(|| super::MoveCall::default_instance() as _)
7026 }
7027 pub fn move_entry_point_opt_mut(&mut self) -> Option<&mut super::MoveCall> {
7029 self.move_entry_point.as_mut().map(|field| field as _)
7030 }
7031 pub fn move_entry_point_mut(&mut self) -> &mut super::MoveCall {
7034 self.move_entry_point.get_or_insert_default()
7035 }
7036 pub fn move_entry_point_opt(&self) -> Option<&super::MoveCall> {
7038 self.move_entry_point.as_ref().map(|field| field as _)
7039 }
7040 pub fn set_move_entry_point<T: Into<super::MoveCall>>(&mut self, field: T) {
7042 self.move_entry_point = Some(field.into().into());
7043 }
7044 pub fn with_move_entry_point<T: Into<super::MoveCall>>(
7046 mut self,
7047 field: T,
7048 ) -> Self {
7049 self.set_move_entry_point(field.into());
7050 self
7051 }
7052 pub fn validator_observations(
7054 &self,
7055 ) -> &[super::ValidatorExecutionTimeObservation] {
7056 &self.validator_observations
7057 }
7058 pub fn validator_observations_mut(
7061 &mut self,
7062 ) -> &mut Vec<super::ValidatorExecutionTimeObservation> {
7063 &mut self.validator_observations
7064 }
7065 pub fn set_validator_observations(
7067 &mut self,
7068 field: Vec<super::ValidatorExecutionTimeObservation>,
7069 ) {
7070 self.validator_observations = field;
7071 }
7072 pub fn with_validator_observations(
7074 mut self,
7075 field: Vec<super::ValidatorExecutionTimeObservation>,
7076 ) -> Self {
7077 self.set_validator_observations(field);
7078 self
7079 }
7080 }
7081 impl super::ExecutionTimeObservations {
7082 pub const fn const_default() -> Self {
7083 Self {
7084 version: None,
7085 observations: Vec::new(),
7086 }
7087 }
7088 #[doc(hidden)]
7089 pub fn default_instance() -> &'static Self {
7090 static DEFAULT: super::ExecutionTimeObservations = super::ExecutionTimeObservations::const_default();
7091 &DEFAULT
7092 }
7093 pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
7095 self.version.as_mut().map(|field| field as _)
7096 }
7097 pub fn version_mut(&mut self) -> &mut i32 {
7100 self.version.get_or_insert_default()
7101 }
7102 pub fn version_opt(&self) -> Option<i32> {
7104 self.version.as_ref().map(|field| *field)
7105 }
7106 pub fn set_version(&mut self, field: i32) {
7108 self.version = Some(field);
7109 }
7110 pub fn with_version(mut self, field: i32) -> Self {
7112 self.set_version(field);
7113 self
7114 }
7115 pub fn observations(&self) -> &[super::ExecutionTimeObservation] {
7117 &self.observations
7118 }
7119 pub fn observations_mut(&mut self) -> &mut Vec<super::ExecutionTimeObservation> {
7122 &mut self.observations
7123 }
7124 pub fn set_observations(&mut self, field: Vec<super::ExecutionTimeObservation>) {
7126 self.observations = field;
7127 }
7128 pub fn with_observations(
7130 mut self,
7131 field: Vec<super::ExecutionTimeObservation>,
7132 ) -> Self {
7133 self.set_observations(field);
7134 self
7135 }
7136 }
7137 impl super::FieldDescriptor {
7138 pub const fn const_default() -> Self {
7139 Self {
7140 name: None,
7141 position: None,
7142 r#type: None,
7143 }
7144 }
7145 #[doc(hidden)]
7146 pub fn default_instance() -> &'static Self {
7147 static DEFAULT: super::FieldDescriptor = super::FieldDescriptor::const_default();
7148 &DEFAULT
7149 }
7150 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
7152 self.name.as_mut().map(|field| field as _)
7153 }
7154 pub fn name_mut(&mut self) -> &mut String {
7157 self.name.get_or_insert_default()
7158 }
7159 pub fn name_opt(&self) -> Option<&str> {
7161 self.name.as_ref().map(|field| field as _)
7162 }
7163 pub fn set_name<T: Into<String>>(&mut self, field: T) {
7165 self.name = Some(field.into().into());
7166 }
7167 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
7169 self.set_name(field.into());
7170 self
7171 }
7172 pub fn position_opt_mut(&mut self) -> Option<&mut u32> {
7174 self.position.as_mut().map(|field| field as _)
7175 }
7176 pub fn position_mut(&mut self) -> &mut u32 {
7179 self.position.get_or_insert_default()
7180 }
7181 pub fn position_opt(&self) -> Option<u32> {
7183 self.position.as_ref().map(|field| *field)
7184 }
7185 pub fn set_position(&mut self, field: u32) {
7187 self.position = Some(field);
7188 }
7189 pub fn with_position(mut self, field: u32) -> Self {
7191 self.set_position(field);
7192 self
7193 }
7194 pub fn r#type(&self) -> &super::OpenSignatureBody {
7196 self.r#type
7197 .as_ref()
7198 .map(|field| field as _)
7199 .unwrap_or_else(|| super::OpenSignatureBody::default_instance() as _)
7200 }
7201 pub fn type_opt_mut(&mut self) -> Option<&mut super::OpenSignatureBody> {
7203 self.r#type.as_mut().map(|field| field as _)
7204 }
7205 pub fn type_mut(&mut self) -> &mut super::OpenSignatureBody {
7208 self.r#type.get_or_insert_default()
7209 }
7210 pub fn type_opt(&self) -> Option<&super::OpenSignatureBody> {
7212 self.r#type.as_ref().map(|field| field as _)
7213 }
7214 pub fn set_type<T: Into<super::OpenSignatureBody>>(&mut self, field: T) {
7216 self.r#type = Some(field.into().into());
7217 }
7218 pub fn with_type<T: Into<super::OpenSignatureBody>>(mut self, field: T) -> Self {
7220 self.set_type(field.into());
7221 self
7222 }
7223 }
7224 impl super::FunctionDescriptor {
7225 pub const fn const_default() -> Self {
7226 Self {
7227 name: None,
7228 visibility: None,
7229 is_entry: None,
7230 type_parameters: Vec::new(),
7231 parameters: Vec::new(),
7232 returns: Vec::new(),
7233 }
7234 }
7235 #[doc(hidden)]
7236 pub fn default_instance() -> &'static Self {
7237 static DEFAULT: super::FunctionDescriptor = super::FunctionDescriptor::const_default();
7238 &DEFAULT
7239 }
7240 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
7242 self.name.as_mut().map(|field| field as _)
7243 }
7244 pub fn name_mut(&mut self) -> &mut String {
7247 self.name.get_or_insert_default()
7248 }
7249 pub fn name_opt(&self) -> Option<&str> {
7251 self.name.as_ref().map(|field| field as _)
7252 }
7253 pub fn set_name<T: Into<String>>(&mut self, field: T) {
7255 self.name = Some(field.into().into());
7256 }
7257 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
7259 self.set_name(field.into());
7260 self
7261 }
7262 pub fn with_visibility<T: Into<super::function_descriptor::Visibility>>(
7264 mut self,
7265 field: T,
7266 ) -> Self {
7267 self.set_visibility(field.into());
7268 self
7269 }
7270 pub fn is_entry_opt_mut(&mut self) -> Option<&mut bool> {
7272 self.is_entry.as_mut().map(|field| field as _)
7273 }
7274 pub fn is_entry_mut(&mut self) -> &mut bool {
7277 self.is_entry.get_or_insert_default()
7278 }
7279 pub fn is_entry_opt(&self) -> Option<bool> {
7281 self.is_entry.as_ref().map(|field| *field)
7282 }
7283 pub fn set_is_entry(&mut self, field: bool) {
7285 self.is_entry = Some(field);
7286 }
7287 pub fn with_is_entry(mut self, field: bool) -> Self {
7289 self.set_is_entry(field);
7290 self
7291 }
7292 pub fn type_parameters(&self) -> &[super::TypeParameter] {
7294 &self.type_parameters
7295 }
7296 pub fn type_parameters_mut(&mut self) -> &mut Vec<super::TypeParameter> {
7299 &mut self.type_parameters
7300 }
7301 pub fn set_type_parameters(&mut self, field: Vec<super::TypeParameter>) {
7303 self.type_parameters = field;
7304 }
7305 pub fn with_type_parameters(mut self, field: Vec<super::TypeParameter>) -> Self {
7307 self.set_type_parameters(field);
7308 self
7309 }
7310 pub fn parameters(&self) -> &[super::OpenSignature] {
7312 &self.parameters
7313 }
7314 pub fn parameters_mut(&mut self) -> &mut Vec<super::OpenSignature> {
7317 &mut self.parameters
7318 }
7319 pub fn set_parameters(&mut self, field: Vec<super::OpenSignature>) {
7321 self.parameters = field;
7322 }
7323 pub fn with_parameters(mut self, field: Vec<super::OpenSignature>) -> Self {
7325 self.set_parameters(field);
7326 self
7327 }
7328 pub fn returns(&self) -> &[super::OpenSignature] {
7330 &self.returns
7331 }
7332 pub fn returns_mut(&mut self) -> &mut Vec<super::OpenSignature> {
7335 &mut self.returns
7336 }
7337 pub fn set_returns(&mut self, field: Vec<super::OpenSignature>) {
7339 self.returns = field;
7340 }
7341 pub fn with_returns(mut self, field: Vec<super::OpenSignature>) -> Self {
7343 self.set_returns(field);
7344 self
7345 }
7346 }
7347 impl super::FundsWithdrawal {
7348 pub const fn const_default() -> Self {
7349 Self {
7350 amount: None,
7351 coin_type: None,
7352 source: None,
7353 }
7354 }
7355 #[doc(hidden)]
7356 pub fn default_instance() -> &'static Self {
7357 static DEFAULT: super::FundsWithdrawal = super::FundsWithdrawal::const_default();
7358 &DEFAULT
7359 }
7360 pub fn amount_opt_mut(&mut self) -> Option<&mut u64> {
7362 self.amount.as_mut().map(|field| field as _)
7363 }
7364 pub fn amount_mut(&mut self) -> &mut u64 {
7367 self.amount.get_or_insert_default()
7368 }
7369 pub fn amount_opt(&self) -> Option<u64> {
7371 self.amount.as_ref().map(|field| *field)
7372 }
7373 pub fn set_amount(&mut self, field: u64) {
7375 self.amount = Some(field);
7376 }
7377 pub fn with_amount(mut self, field: u64) -> Self {
7379 self.set_amount(field);
7380 self
7381 }
7382 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
7384 self.coin_type.as_mut().map(|field| field as _)
7385 }
7386 pub fn coin_type_mut(&mut self) -> &mut String {
7389 self.coin_type.get_or_insert_default()
7390 }
7391 pub fn coin_type_opt(&self) -> Option<&str> {
7393 self.coin_type.as_ref().map(|field| field as _)
7394 }
7395 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
7397 self.coin_type = Some(field.into().into());
7398 }
7399 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
7401 self.set_coin_type(field.into());
7402 self
7403 }
7404 pub fn with_source<T: Into<super::funds_withdrawal::Source>>(
7406 mut self,
7407 field: T,
7408 ) -> Self {
7409 self.set_source(field.into());
7410 self
7411 }
7412 }
7413 impl super::GasCostSummary {
7414 pub const fn const_default() -> Self {
7415 Self {
7416 computation_cost: None,
7417 storage_cost: None,
7418 storage_rebate: None,
7419 non_refundable_storage_fee: None,
7420 }
7421 }
7422 #[doc(hidden)]
7423 pub fn default_instance() -> &'static Self {
7424 static DEFAULT: super::GasCostSummary = super::GasCostSummary::const_default();
7425 &DEFAULT
7426 }
7427 pub fn computation_cost_opt_mut(&mut self) -> Option<&mut u64> {
7429 self.computation_cost.as_mut().map(|field| field as _)
7430 }
7431 pub fn computation_cost_mut(&mut self) -> &mut u64 {
7434 self.computation_cost.get_or_insert_default()
7435 }
7436 pub fn computation_cost_opt(&self) -> Option<u64> {
7438 self.computation_cost.as_ref().map(|field| *field)
7439 }
7440 pub fn set_computation_cost(&mut self, field: u64) {
7442 self.computation_cost = Some(field);
7443 }
7444 pub fn with_computation_cost(mut self, field: u64) -> Self {
7446 self.set_computation_cost(field);
7447 self
7448 }
7449 pub fn storage_cost_opt_mut(&mut self) -> Option<&mut u64> {
7451 self.storage_cost.as_mut().map(|field| field as _)
7452 }
7453 pub fn storage_cost_mut(&mut self) -> &mut u64 {
7456 self.storage_cost.get_or_insert_default()
7457 }
7458 pub fn storage_cost_opt(&self) -> Option<u64> {
7460 self.storage_cost.as_ref().map(|field| *field)
7461 }
7462 pub fn set_storage_cost(&mut self, field: u64) {
7464 self.storage_cost = Some(field);
7465 }
7466 pub fn with_storage_cost(mut self, field: u64) -> Self {
7468 self.set_storage_cost(field);
7469 self
7470 }
7471 pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
7473 self.storage_rebate.as_mut().map(|field| field as _)
7474 }
7475 pub fn storage_rebate_mut(&mut self) -> &mut u64 {
7478 self.storage_rebate.get_or_insert_default()
7479 }
7480 pub fn storage_rebate_opt(&self) -> Option<u64> {
7482 self.storage_rebate.as_ref().map(|field| *field)
7483 }
7484 pub fn set_storage_rebate(&mut self, field: u64) {
7486 self.storage_rebate = Some(field);
7487 }
7488 pub fn with_storage_rebate(mut self, field: u64) -> Self {
7490 self.set_storage_rebate(field);
7491 self
7492 }
7493 pub fn non_refundable_storage_fee_opt_mut(&mut self) -> Option<&mut u64> {
7495 self.non_refundable_storage_fee.as_mut().map(|field| field as _)
7496 }
7497 pub fn non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
7500 self.non_refundable_storage_fee.get_or_insert_default()
7501 }
7502 pub fn non_refundable_storage_fee_opt(&self) -> Option<u64> {
7504 self.non_refundable_storage_fee.as_ref().map(|field| *field)
7505 }
7506 pub fn set_non_refundable_storage_fee(&mut self, field: u64) {
7508 self.non_refundable_storage_fee = Some(field);
7509 }
7510 pub fn with_non_refundable_storage_fee(mut self, field: u64) -> Self {
7512 self.set_non_refundable_storage_fee(field);
7513 self
7514 }
7515 }
7516 impl super::GasPayment {
7517 pub const fn const_default() -> Self {
7518 Self {
7519 objects: Vec::new(),
7520 owner: None,
7521 price: None,
7522 budget: None,
7523 }
7524 }
7525 #[doc(hidden)]
7526 pub fn default_instance() -> &'static Self {
7527 static DEFAULT: super::GasPayment = super::GasPayment::const_default();
7528 &DEFAULT
7529 }
7530 pub fn objects(&self) -> &[super::ObjectReference] {
7532 &self.objects
7533 }
7534 pub fn objects_mut(&mut self) -> &mut Vec<super::ObjectReference> {
7537 &mut self.objects
7538 }
7539 pub fn set_objects(&mut self, field: Vec<super::ObjectReference>) {
7541 self.objects = field;
7542 }
7543 pub fn with_objects(mut self, field: Vec<super::ObjectReference>) -> Self {
7545 self.set_objects(field);
7546 self
7547 }
7548 pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
7550 self.owner.as_mut().map(|field| field as _)
7551 }
7552 pub fn owner_mut(&mut self) -> &mut String {
7555 self.owner.get_or_insert_default()
7556 }
7557 pub fn owner_opt(&self) -> Option<&str> {
7559 self.owner.as_ref().map(|field| field as _)
7560 }
7561 pub fn set_owner<T: Into<String>>(&mut self, field: T) {
7563 self.owner = Some(field.into().into());
7564 }
7565 pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
7567 self.set_owner(field.into());
7568 self
7569 }
7570 pub fn price_opt_mut(&mut self) -> Option<&mut u64> {
7572 self.price.as_mut().map(|field| field as _)
7573 }
7574 pub fn price_mut(&mut self) -> &mut u64 {
7577 self.price.get_or_insert_default()
7578 }
7579 pub fn price_opt(&self) -> Option<u64> {
7581 self.price.as_ref().map(|field| *field)
7582 }
7583 pub fn set_price(&mut self, field: u64) {
7585 self.price = Some(field);
7586 }
7587 pub fn with_price(mut self, field: u64) -> Self {
7589 self.set_price(field);
7590 self
7591 }
7592 pub fn budget_opt_mut(&mut self) -> Option<&mut u64> {
7594 self.budget.as_mut().map(|field| field as _)
7595 }
7596 pub fn budget_mut(&mut self) -> &mut u64 {
7599 self.budget.get_or_insert_default()
7600 }
7601 pub fn budget_opt(&self) -> Option<u64> {
7603 self.budget.as_ref().map(|field| *field)
7604 }
7605 pub fn set_budget(&mut self, field: u64) {
7607 self.budget = Some(field);
7608 }
7609 pub fn with_budget(mut self, field: u64) -> Self {
7611 self.set_budget(field);
7612 self
7613 }
7614 }
7615 impl super::GenesisTransaction {
7616 pub const fn const_default() -> Self {
7617 Self { objects: Vec::new() }
7618 }
7619 #[doc(hidden)]
7620 pub fn default_instance() -> &'static Self {
7621 static DEFAULT: super::GenesisTransaction = super::GenesisTransaction::const_default();
7622 &DEFAULT
7623 }
7624 pub fn objects(&self) -> &[super::Object] {
7626 &self.objects
7627 }
7628 pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
7631 &mut self.objects
7632 }
7633 pub fn set_objects(&mut self, field: Vec<super::Object>) {
7635 self.objects = field;
7636 }
7637 pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
7639 self.set_objects(field);
7640 self
7641 }
7642 }
7643 impl super::GetBalanceRequest {
7644 pub const fn const_default() -> Self {
7645 Self {
7646 owner: None,
7647 coin_type: None,
7648 }
7649 }
7650 #[doc(hidden)]
7651 pub fn default_instance() -> &'static Self {
7652 static DEFAULT: super::GetBalanceRequest = super::GetBalanceRequest::const_default();
7653 &DEFAULT
7654 }
7655 pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
7657 self.owner.as_mut().map(|field| field as _)
7658 }
7659 pub fn owner_mut(&mut self) -> &mut String {
7662 self.owner.get_or_insert_default()
7663 }
7664 pub fn owner_opt(&self) -> Option<&str> {
7666 self.owner.as_ref().map(|field| field as _)
7667 }
7668 pub fn set_owner<T: Into<String>>(&mut self, field: T) {
7670 self.owner = Some(field.into().into());
7671 }
7672 pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
7674 self.set_owner(field.into());
7675 self
7676 }
7677 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
7679 self.coin_type.as_mut().map(|field| field as _)
7680 }
7681 pub fn coin_type_mut(&mut self) -> &mut String {
7684 self.coin_type.get_or_insert_default()
7685 }
7686 pub fn coin_type_opt(&self) -> Option<&str> {
7688 self.coin_type.as_ref().map(|field| field as _)
7689 }
7690 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
7692 self.coin_type = Some(field.into().into());
7693 }
7694 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
7696 self.set_coin_type(field.into());
7697 self
7698 }
7699 }
7700 impl super::GetBalanceResponse {
7701 pub const fn const_default() -> Self {
7702 Self { balance: None }
7703 }
7704 #[doc(hidden)]
7705 pub fn default_instance() -> &'static Self {
7706 static DEFAULT: super::GetBalanceResponse = super::GetBalanceResponse::const_default();
7707 &DEFAULT
7708 }
7709 pub fn balance(&self) -> &super::Balance {
7711 self.balance
7712 .as_ref()
7713 .map(|field| field as _)
7714 .unwrap_or_else(|| super::Balance::default_instance() as _)
7715 }
7716 pub fn balance_opt_mut(&mut self) -> Option<&mut super::Balance> {
7718 self.balance.as_mut().map(|field| field as _)
7719 }
7720 pub fn balance_mut(&mut self) -> &mut super::Balance {
7723 self.balance.get_or_insert_default()
7724 }
7725 pub fn balance_opt(&self) -> Option<&super::Balance> {
7727 self.balance.as_ref().map(|field| field as _)
7728 }
7729 pub fn set_balance<T: Into<super::Balance>>(&mut self, field: T) {
7731 self.balance = Some(field.into().into());
7732 }
7733 pub fn with_balance<T: Into<super::Balance>>(mut self, field: T) -> Self {
7735 self.set_balance(field.into());
7736 self
7737 }
7738 }
7739 impl super::GetCheckpointRequest {
7740 pub const fn const_default() -> Self {
7741 Self {
7742 read_mask: None,
7743 checkpoint_id: None,
7744 }
7745 }
7746 #[doc(hidden)]
7747 pub fn default_instance() -> &'static Self {
7748 static DEFAULT: super::GetCheckpointRequest = super::GetCheckpointRequest::const_default();
7749 &DEFAULT
7750 }
7751 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
7753 self.read_mask.as_mut().map(|field| field as _)
7754 }
7755 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
7758 self.read_mask.get_or_insert_default()
7759 }
7760 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
7762 self.read_mask.as_ref().map(|field| field as _)
7763 }
7764 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
7766 self.read_mask = Some(field.into().into());
7767 }
7768 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
7770 mut self,
7771 field: T,
7772 ) -> Self {
7773 self.set_read_mask(field.into());
7774 self
7775 }
7776 pub fn sequence_number(&self) -> u64 {
7778 if let Some(
7779 super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
7780 ) = &self.checkpoint_id
7781 {
7782 *field
7783 } else {
7784 0u64
7785 }
7786 }
7787 pub fn sequence_number_opt(&self) -> Option<u64> {
7789 if let Some(
7790 super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
7791 ) = &self.checkpoint_id
7792 {
7793 Some(*field)
7794 } else {
7795 None
7796 }
7797 }
7798 pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
7800 if let Some(
7801 super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
7802 ) = &mut self.checkpoint_id
7803 {
7804 Some(field as _)
7805 } else {
7806 None
7807 }
7808 }
7809 pub fn sequence_number_mut(&mut self) -> &mut u64 {
7813 if self.sequence_number_opt_mut().is_none() {
7814 self.checkpoint_id = Some(
7815 super::get_checkpoint_request::CheckpointId::SequenceNumber(
7816 u64::default(),
7817 ),
7818 );
7819 }
7820 self.sequence_number_opt_mut().unwrap()
7821 }
7822 pub fn set_sequence_number(&mut self, field: u64) {
7825 self.checkpoint_id = Some(
7826 super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
7827 );
7828 }
7829 pub fn with_sequence_number(mut self, field: u64) -> Self {
7832 self.set_sequence_number(field);
7833 self
7834 }
7835 pub fn digest(&self) -> &str {
7837 if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &self
7838 .checkpoint_id
7839 {
7840 field as _
7841 } else {
7842 ""
7843 }
7844 }
7845 pub fn digest_opt(&self) -> Option<&str> {
7847 if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &self
7848 .checkpoint_id
7849 {
7850 Some(field as _)
7851 } else {
7852 None
7853 }
7854 }
7855 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
7857 if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &mut self
7858 .checkpoint_id
7859 {
7860 Some(field as _)
7861 } else {
7862 None
7863 }
7864 }
7865 pub fn digest_mut(&mut self) -> &mut String {
7869 if self.digest_opt_mut().is_none() {
7870 self.checkpoint_id = Some(
7871 super::get_checkpoint_request::CheckpointId::Digest(
7872 String::default(),
7873 ),
7874 );
7875 }
7876 self.digest_opt_mut().unwrap()
7877 }
7878 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
7881 self.checkpoint_id = Some(
7882 super::get_checkpoint_request::CheckpointId::Digest(field.into().into()),
7883 );
7884 }
7885 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
7888 self.set_digest(field.into());
7889 self
7890 }
7891 }
7892 impl super::GetCheckpointResponse {
7893 pub const fn const_default() -> Self {
7894 Self { checkpoint: None }
7895 }
7896 #[doc(hidden)]
7897 pub fn default_instance() -> &'static Self {
7898 static DEFAULT: super::GetCheckpointResponse = super::GetCheckpointResponse::const_default();
7899 &DEFAULT
7900 }
7901 pub fn checkpoint(&self) -> &super::Checkpoint {
7903 self.checkpoint
7904 .as_ref()
7905 .map(|field| field as _)
7906 .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
7907 }
7908 pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
7910 self.checkpoint.as_mut().map(|field| field as _)
7911 }
7912 pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
7915 self.checkpoint.get_or_insert_default()
7916 }
7917 pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
7919 self.checkpoint.as_ref().map(|field| field as _)
7920 }
7921 pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
7923 self.checkpoint = Some(field.into().into());
7924 }
7925 pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
7927 self.set_checkpoint(field.into());
7928 self
7929 }
7930 }
7931 impl super::GetCoinInfoRequest {
7932 pub const fn const_default() -> Self {
7933 Self { coin_type: None }
7934 }
7935 #[doc(hidden)]
7936 pub fn default_instance() -> &'static Self {
7937 static DEFAULT: super::GetCoinInfoRequest = super::GetCoinInfoRequest::const_default();
7938 &DEFAULT
7939 }
7940 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
7942 self.coin_type.as_mut().map(|field| field as _)
7943 }
7944 pub fn coin_type_mut(&mut self) -> &mut String {
7947 self.coin_type.get_or_insert_default()
7948 }
7949 pub fn coin_type_opt(&self) -> Option<&str> {
7951 self.coin_type.as_ref().map(|field| field as _)
7952 }
7953 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
7955 self.coin_type = Some(field.into().into());
7956 }
7957 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
7959 self.set_coin_type(field.into());
7960 self
7961 }
7962 }
7963 impl super::GetCoinInfoResponse {
7964 pub const fn const_default() -> Self {
7965 Self {
7966 coin_type: None,
7967 metadata: None,
7968 treasury: None,
7969 regulated_metadata: None,
7970 }
7971 }
7972 #[doc(hidden)]
7973 pub fn default_instance() -> &'static Self {
7974 static DEFAULT: super::GetCoinInfoResponse = super::GetCoinInfoResponse::const_default();
7975 &DEFAULT
7976 }
7977 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
7979 self.coin_type.as_mut().map(|field| field as _)
7980 }
7981 pub fn coin_type_mut(&mut self) -> &mut String {
7984 self.coin_type.get_or_insert_default()
7985 }
7986 pub fn coin_type_opt(&self) -> Option<&str> {
7988 self.coin_type.as_ref().map(|field| field as _)
7989 }
7990 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
7992 self.coin_type = Some(field.into().into());
7993 }
7994 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
7996 self.set_coin_type(field.into());
7997 self
7998 }
7999 pub fn metadata(&self) -> &super::CoinMetadata {
8001 self.metadata
8002 .as_ref()
8003 .map(|field| field as _)
8004 .unwrap_or_else(|| super::CoinMetadata::default_instance() as _)
8005 }
8006 pub fn metadata_opt_mut(&mut self) -> Option<&mut super::CoinMetadata> {
8008 self.metadata.as_mut().map(|field| field as _)
8009 }
8010 pub fn metadata_mut(&mut self) -> &mut super::CoinMetadata {
8013 self.metadata.get_or_insert_default()
8014 }
8015 pub fn metadata_opt(&self) -> Option<&super::CoinMetadata> {
8017 self.metadata.as_ref().map(|field| field as _)
8018 }
8019 pub fn set_metadata<T: Into<super::CoinMetadata>>(&mut self, field: T) {
8021 self.metadata = Some(field.into().into());
8022 }
8023 pub fn with_metadata<T: Into<super::CoinMetadata>>(mut self, field: T) -> Self {
8025 self.set_metadata(field.into());
8026 self
8027 }
8028 pub fn treasury(&self) -> &super::CoinTreasury {
8030 self.treasury
8031 .as_ref()
8032 .map(|field| field as _)
8033 .unwrap_or_else(|| super::CoinTreasury::default_instance() as _)
8034 }
8035 pub fn treasury_opt_mut(&mut self) -> Option<&mut super::CoinTreasury> {
8037 self.treasury.as_mut().map(|field| field as _)
8038 }
8039 pub fn treasury_mut(&mut self) -> &mut super::CoinTreasury {
8042 self.treasury.get_or_insert_default()
8043 }
8044 pub fn treasury_opt(&self) -> Option<&super::CoinTreasury> {
8046 self.treasury.as_ref().map(|field| field as _)
8047 }
8048 pub fn set_treasury<T: Into<super::CoinTreasury>>(&mut self, field: T) {
8050 self.treasury = Some(field.into().into());
8051 }
8052 pub fn with_treasury<T: Into<super::CoinTreasury>>(mut self, field: T) -> Self {
8054 self.set_treasury(field.into());
8055 self
8056 }
8057 pub fn regulated_metadata(&self) -> &super::RegulatedCoinMetadata {
8059 self.regulated_metadata
8060 .as_ref()
8061 .map(|field| field as _)
8062 .unwrap_or_else(|| super::RegulatedCoinMetadata::default_instance() as _)
8063 }
8064 pub fn regulated_metadata_opt_mut(
8066 &mut self,
8067 ) -> Option<&mut super::RegulatedCoinMetadata> {
8068 self.regulated_metadata.as_mut().map(|field| field as _)
8069 }
8070 pub fn regulated_metadata_mut(&mut self) -> &mut super::RegulatedCoinMetadata {
8073 self.regulated_metadata.get_or_insert_default()
8074 }
8075 pub fn regulated_metadata_opt(&self) -> Option<&super::RegulatedCoinMetadata> {
8077 self.regulated_metadata.as_ref().map(|field| field as _)
8078 }
8079 pub fn set_regulated_metadata<T: Into<super::RegulatedCoinMetadata>>(
8081 &mut self,
8082 field: T,
8083 ) {
8084 self.regulated_metadata = Some(field.into().into());
8085 }
8086 pub fn with_regulated_metadata<T: Into<super::RegulatedCoinMetadata>>(
8088 mut self,
8089 field: T,
8090 ) -> Self {
8091 self.set_regulated_metadata(field.into());
8092 self
8093 }
8094 }
8095 impl super::GetDatatypeRequest {
8096 pub const fn const_default() -> Self {
8097 Self {
8098 package_id: None,
8099 module_name: None,
8100 name: None,
8101 }
8102 }
8103 #[doc(hidden)]
8104 pub fn default_instance() -> &'static Self {
8105 static DEFAULT: super::GetDatatypeRequest = super::GetDatatypeRequest::const_default();
8106 &DEFAULT
8107 }
8108 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
8110 self.package_id.as_mut().map(|field| field as _)
8111 }
8112 pub fn package_id_mut(&mut self) -> &mut String {
8115 self.package_id.get_or_insert_default()
8116 }
8117 pub fn package_id_opt(&self) -> Option<&str> {
8119 self.package_id.as_ref().map(|field| field as _)
8120 }
8121 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
8123 self.package_id = Some(field.into().into());
8124 }
8125 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
8127 self.set_package_id(field.into());
8128 self
8129 }
8130 pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
8132 self.module_name.as_mut().map(|field| field as _)
8133 }
8134 pub fn module_name_mut(&mut self) -> &mut String {
8137 self.module_name.get_or_insert_default()
8138 }
8139 pub fn module_name_opt(&self) -> Option<&str> {
8141 self.module_name.as_ref().map(|field| field as _)
8142 }
8143 pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
8145 self.module_name = Some(field.into().into());
8146 }
8147 pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
8149 self.set_module_name(field.into());
8150 self
8151 }
8152 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
8154 self.name.as_mut().map(|field| field as _)
8155 }
8156 pub fn name_mut(&mut self) -> &mut String {
8159 self.name.get_or_insert_default()
8160 }
8161 pub fn name_opt(&self) -> Option<&str> {
8163 self.name.as_ref().map(|field| field as _)
8164 }
8165 pub fn set_name<T: Into<String>>(&mut self, field: T) {
8167 self.name = Some(field.into().into());
8168 }
8169 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
8171 self.set_name(field.into());
8172 self
8173 }
8174 }
8175 impl super::GetDatatypeResponse {
8176 pub const fn const_default() -> Self {
8177 Self { datatype: None }
8178 }
8179 #[doc(hidden)]
8180 pub fn default_instance() -> &'static Self {
8181 static DEFAULT: super::GetDatatypeResponse = super::GetDatatypeResponse::const_default();
8182 &DEFAULT
8183 }
8184 pub fn datatype(&self) -> &super::DatatypeDescriptor {
8186 self.datatype
8187 .as_ref()
8188 .map(|field| field as _)
8189 .unwrap_or_else(|| super::DatatypeDescriptor::default_instance() as _)
8190 }
8191 pub fn datatype_opt_mut(&mut self) -> Option<&mut super::DatatypeDescriptor> {
8193 self.datatype.as_mut().map(|field| field as _)
8194 }
8195 pub fn datatype_mut(&mut self) -> &mut super::DatatypeDescriptor {
8198 self.datatype.get_or_insert_default()
8199 }
8200 pub fn datatype_opt(&self) -> Option<&super::DatatypeDescriptor> {
8202 self.datatype.as_ref().map(|field| field as _)
8203 }
8204 pub fn set_datatype<T: Into<super::DatatypeDescriptor>>(&mut self, field: T) {
8206 self.datatype = Some(field.into().into());
8207 }
8208 pub fn with_datatype<T: Into<super::DatatypeDescriptor>>(
8210 mut self,
8211 field: T,
8212 ) -> Self {
8213 self.set_datatype(field.into());
8214 self
8215 }
8216 }
8217 impl super::GetEpochRequest {
8218 pub const fn const_default() -> Self {
8219 Self {
8220 epoch: None,
8221 read_mask: None,
8222 }
8223 }
8224 #[doc(hidden)]
8225 pub fn default_instance() -> &'static Self {
8226 static DEFAULT: super::GetEpochRequest = super::GetEpochRequest::const_default();
8227 &DEFAULT
8228 }
8229 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
8231 self.epoch.as_mut().map(|field| field as _)
8232 }
8233 pub fn epoch_mut(&mut self) -> &mut u64 {
8236 self.epoch.get_or_insert_default()
8237 }
8238 pub fn epoch_opt(&self) -> Option<u64> {
8240 self.epoch.as_ref().map(|field| *field)
8241 }
8242 pub fn set_epoch(&mut self, field: u64) {
8244 self.epoch = Some(field);
8245 }
8246 pub fn with_epoch(mut self, field: u64) -> Self {
8248 self.set_epoch(field);
8249 self
8250 }
8251 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
8253 self.read_mask.as_mut().map(|field| field as _)
8254 }
8255 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
8258 self.read_mask.get_or_insert_default()
8259 }
8260 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
8262 self.read_mask.as_ref().map(|field| field as _)
8263 }
8264 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
8266 self.read_mask = Some(field.into().into());
8267 }
8268 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
8270 mut self,
8271 field: T,
8272 ) -> Self {
8273 self.set_read_mask(field.into());
8274 self
8275 }
8276 }
8277 impl super::GetEpochResponse {
8278 pub const fn const_default() -> Self {
8279 Self { epoch: None }
8280 }
8281 #[doc(hidden)]
8282 pub fn default_instance() -> &'static Self {
8283 static DEFAULT: super::GetEpochResponse = super::GetEpochResponse::const_default();
8284 &DEFAULT
8285 }
8286 pub fn epoch(&self) -> &super::Epoch {
8288 self.epoch
8289 .as_ref()
8290 .map(|field| field as _)
8291 .unwrap_or_else(|| super::Epoch::default_instance() as _)
8292 }
8293 pub fn epoch_opt_mut(&mut self) -> Option<&mut super::Epoch> {
8295 self.epoch.as_mut().map(|field| field as _)
8296 }
8297 pub fn epoch_mut(&mut self) -> &mut super::Epoch {
8300 self.epoch.get_or_insert_default()
8301 }
8302 pub fn epoch_opt(&self) -> Option<&super::Epoch> {
8304 self.epoch.as_ref().map(|field| field as _)
8305 }
8306 pub fn set_epoch<T: Into<super::Epoch>>(&mut self, field: T) {
8308 self.epoch = Some(field.into().into());
8309 }
8310 pub fn with_epoch<T: Into<super::Epoch>>(mut self, field: T) -> Self {
8312 self.set_epoch(field.into());
8313 self
8314 }
8315 }
8316 impl super::GetFunctionRequest {
8317 pub const fn const_default() -> Self {
8318 Self {
8319 package_id: None,
8320 module_name: None,
8321 name: None,
8322 }
8323 }
8324 #[doc(hidden)]
8325 pub fn default_instance() -> &'static Self {
8326 static DEFAULT: super::GetFunctionRequest = super::GetFunctionRequest::const_default();
8327 &DEFAULT
8328 }
8329 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
8331 self.package_id.as_mut().map(|field| field as _)
8332 }
8333 pub fn package_id_mut(&mut self) -> &mut String {
8336 self.package_id.get_or_insert_default()
8337 }
8338 pub fn package_id_opt(&self) -> Option<&str> {
8340 self.package_id.as_ref().map(|field| field as _)
8341 }
8342 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
8344 self.package_id = Some(field.into().into());
8345 }
8346 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
8348 self.set_package_id(field.into());
8349 self
8350 }
8351 pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
8353 self.module_name.as_mut().map(|field| field as _)
8354 }
8355 pub fn module_name_mut(&mut self) -> &mut String {
8358 self.module_name.get_or_insert_default()
8359 }
8360 pub fn module_name_opt(&self) -> Option<&str> {
8362 self.module_name.as_ref().map(|field| field as _)
8363 }
8364 pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
8366 self.module_name = Some(field.into().into());
8367 }
8368 pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
8370 self.set_module_name(field.into());
8371 self
8372 }
8373 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
8375 self.name.as_mut().map(|field| field as _)
8376 }
8377 pub fn name_mut(&mut self) -> &mut String {
8380 self.name.get_or_insert_default()
8381 }
8382 pub fn name_opt(&self) -> Option<&str> {
8384 self.name.as_ref().map(|field| field as _)
8385 }
8386 pub fn set_name<T: Into<String>>(&mut self, field: T) {
8388 self.name = Some(field.into().into());
8389 }
8390 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
8392 self.set_name(field.into());
8393 self
8394 }
8395 }
8396 impl super::GetFunctionResponse {
8397 pub const fn const_default() -> Self {
8398 Self { function: None }
8399 }
8400 #[doc(hidden)]
8401 pub fn default_instance() -> &'static Self {
8402 static DEFAULT: super::GetFunctionResponse = super::GetFunctionResponse::const_default();
8403 &DEFAULT
8404 }
8405 pub fn function(&self) -> &super::FunctionDescriptor {
8407 self.function
8408 .as_ref()
8409 .map(|field| field as _)
8410 .unwrap_or_else(|| super::FunctionDescriptor::default_instance() as _)
8411 }
8412 pub fn function_opt_mut(&mut self) -> Option<&mut super::FunctionDescriptor> {
8414 self.function.as_mut().map(|field| field as _)
8415 }
8416 pub fn function_mut(&mut self) -> &mut super::FunctionDescriptor {
8419 self.function.get_or_insert_default()
8420 }
8421 pub fn function_opt(&self) -> Option<&super::FunctionDescriptor> {
8423 self.function.as_ref().map(|field| field as _)
8424 }
8425 pub fn set_function<T: Into<super::FunctionDescriptor>>(&mut self, field: T) {
8427 self.function = Some(field.into().into());
8428 }
8429 pub fn with_function<T: Into<super::FunctionDescriptor>>(
8431 mut self,
8432 field: T,
8433 ) -> Self {
8434 self.set_function(field.into());
8435 self
8436 }
8437 }
8438 impl super::GetObjectRequest {
8439 pub const fn const_default() -> Self {
8440 Self {
8441 object_id: None,
8442 version: None,
8443 read_mask: None,
8444 }
8445 }
8446 #[doc(hidden)]
8447 pub fn default_instance() -> &'static Self {
8448 static DEFAULT: super::GetObjectRequest = super::GetObjectRequest::const_default();
8449 &DEFAULT
8450 }
8451 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
8453 self.object_id.as_mut().map(|field| field as _)
8454 }
8455 pub fn object_id_mut(&mut self) -> &mut String {
8458 self.object_id.get_or_insert_default()
8459 }
8460 pub fn object_id_opt(&self) -> Option<&str> {
8462 self.object_id.as_ref().map(|field| field as _)
8463 }
8464 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
8466 self.object_id = Some(field.into().into());
8467 }
8468 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
8470 self.set_object_id(field.into());
8471 self
8472 }
8473 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
8475 self.version.as_mut().map(|field| field as _)
8476 }
8477 pub fn version_mut(&mut self) -> &mut u64 {
8480 self.version.get_or_insert_default()
8481 }
8482 pub fn version_opt(&self) -> Option<u64> {
8484 self.version.as_ref().map(|field| *field)
8485 }
8486 pub fn set_version(&mut self, field: u64) {
8488 self.version = Some(field);
8489 }
8490 pub fn with_version(mut self, field: u64) -> Self {
8492 self.set_version(field);
8493 self
8494 }
8495 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
8497 self.read_mask.as_mut().map(|field| field as _)
8498 }
8499 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
8502 self.read_mask.get_or_insert_default()
8503 }
8504 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
8506 self.read_mask.as_ref().map(|field| field as _)
8507 }
8508 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
8510 self.read_mask = Some(field.into().into());
8511 }
8512 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
8514 mut self,
8515 field: T,
8516 ) -> Self {
8517 self.set_read_mask(field.into());
8518 self
8519 }
8520 }
8521 impl super::GetObjectResponse {
8522 pub const fn const_default() -> Self {
8523 Self { object: None }
8524 }
8525 #[doc(hidden)]
8526 pub fn default_instance() -> &'static Self {
8527 static DEFAULT: super::GetObjectResponse = super::GetObjectResponse::const_default();
8528 &DEFAULT
8529 }
8530 pub fn object(&self) -> &super::Object {
8532 self.object
8533 .as_ref()
8534 .map(|field| field as _)
8535 .unwrap_or_else(|| super::Object::default_instance() as _)
8536 }
8537 pub fn object_opt_mut(&mut self) -> Option<&mut super::Object> {
8539 self.object.as_mut().map(|field| field as _)
8540 }
8541 pub fn object_mut(&mut self) -> &mut super::Object {
8544 self.object.get_or_insert_default()
8545 }
8546 pub fn object_opt(&self) -> Option<&super::Object> {
8548 self.object.as_ref().map(|field| field as _)
8549 }
8550 pub fn set_object<T: Into<super::Object>>(&mut self, field: T) {
8552 self.object = Some(field.into().into());
8553 }
8554 pub fn with_object<T: Into<super::Object>>(mut self, field: T) -> Self {
8556 self.set_object(field.into());
8557 self
8558 }
8559 }
8560 impl super::GetObjectResult {
8561 pub const fn const_default() -> Self {
8562 Self { result: None }
8563 }
8564 #[doc(hidden)]
8565 pub fn default_instance() -> &'static Self {
8566 static DEFAULT: super::GetObjectResult = super::GetObjectResult::const_default();
8567 &DEFAULT
8568 }
8569 pub fn object(&self) -> &super::Object {
8571 if let Some(super::get_object_result::Result::Object(field)) = &self.result {
8572 field as _
8573 } else {
8574 super::Object::default_instance() as _
8575 }
8576 }
8577 pub fn object_opt(&self) -> Option<&super::Object> {
8579 if let Some(super::get_object_result::Result::Object(field)) = &self.result {
8580 Some(field as _)
8581 } else {
8582 None
8583 }
8584 }
8585 pub fn object_opt_mut(&mut self) -> Option<&mut super::Object> {
8587 if let Some(super::get_object_result::Result::Object(field)) = &mut self
8588 .result
8589 {
8590 Some(field as _)
8591 } else {
8592 None
8593 }
8594 }
8595 pub fn object_mut(&mut self) -> &mut super::Object {
8599 if self.object_opt_mut().is_none() {
8600 self.result = Some(
8601 super::get_object_result::Result::Object(super::Object::default()),
8602 );
8603 }
8604 self.object_opt_mut().unwrap()
8605 }
8606 pub fn set_object<T: Into<super::Object>>(&mut self, field: T) {
8609 self.result = Some(
8610 super::get_object_result::Result::Object(field.into().into()),
8611 );
8612 }
8613 pub fn with_object<T: Into<super::Object>>(mut self, field: T) -> Self {
8616 self.set_object(field.into());
8617 self
8618 }
8619 pub fn error(&self) -> &super::super::super::super::google::rpc::Status {
8621 if let Some(super::get_object_result::Result::Error(field)) = &self.result {
8622 field as _
8623 } else {
8624 super::super::super::super::google::rpc::Status::default_instance() as _
8625 }
8626 }
8627 pub fn error_opt(
8629 &self,
8630 ) -> Option<&super::super::super::super::google::rpc::Status> {
8631 if let Some(super::get_object_result::Result::Error(field)) = &self.result {
8632 Some(field as _)
8633 } else {
8634 None
8635 }
8636 }
8637 pub fn error_opt_mut(
8639 &mut self,
8640 ) -> Option<&mut super::super::super::super::google::rpc::Status> {
8641 if let Some(super::get_object_result::Result::Error(field)) = &mut self
8642 .result
8643 {
8644 Some(field as _)
8645 } else {
8646 None
8647 }
8648 }
8649 pub fn error_mut(
8653 &mut self,
8654 ) -> &mut super::super::super::super::google::rpc::Status {
8655 if self.error_opt_mut().is_none() {
8656 self.result = Some(
8657 super::get_object_result::Result::Error(
8658 super::super::super::super::google::rpc::Status::default(),
8659 ),
8660 );
8661 }
8662 self.error_opt_mut().unwrap()
8663 }
8664 pub fn set_error<T: Into<super::super::super::super::google::rpc::Status>>(
8667 &mut self,
8668 field: T,
8669 ) {
8670 self.result = Some(
8671 super::get_object_result::Result::Error(field.into().into()),
8672 );
8673 }
8674 pub fn with_error<T: Into<super::super::super::super::google::rpc::Status>>(
8677 mut self,
8678 field: T,
8679 ) -> Self {
8680 self.set_error(field.into());
8681 self
8682 }
8683 }
8684 impl super::GetPackageRequest {
8685 pub const fn const_default() -> Self {
8686 Self { package_id: None }
8687 }
8688 #[doc(hidden)]
8689 pub fn default_instance() -> &'static Self {
8690 static DEFAULT: super::GetPackageRequest = super::GetPackageRequest::const_default();
8691 &DEFAULT
8692 }
8693 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
8695 self.package_id.as_mut().map(|field| field as _)
8696 }
8697 pub fn package_id_mut(&mut self) -> &mut String {
8700 self.package_id.get_or_insert_default()
8701 }
8702 pub fn package_id_opt(&self) -> Option<&str> {
8704 self.package_id.as_ref().map(|field| field as _)
8705 }
8706 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
8708 self.package_id = Some(field.into().into());
8709 }
8710 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
8712 self.set_package_id(field.into());
8713 self
8714 }
8715 }
8716 impl super::GetPackageResponse {
8717 pub const fn const_default() -> Self {
8718 Self { package: None }
8719 }
8720 #[doc(hidden)]
8721 pub fn default_instance() -> &'static Self {
8722 static DEFAULT: super::GetPackageResponse = super::GetPackageResponse::const_default();
8723 &DEFAULT
8724 }
8725 pub fn package(&self) -> &super::Package {
8727 self.package
8728 .as_ref()
8729 .map(|field| field as _)
8730 .unwrap_or_else(|| super::Package::default_instance() as _)
8731 }
8732 pub fn package_opt_mut(&mut self) -> Option<&mut super::Package> {
8734 self.package.as_mut().map(|field| field as _)
8735 }
8736 pub fn package_mut(&mut self) -> &mut super::Package {
8739 self.package.get_or_insert_default()
8740 }
8741 pub fn package_opt(&self) -> Option<&super::Package> {
8743 self.package.as_ref().map(|field| field as _)
8744 }
8745 pub fn set_package<T: Into<super::Package>>(&mut self, field: T) {
8747 self.package = Some(field.into().into());
8748 }
8749 pub fn with_package<T: Into<super::Package>>(mut self, field: T) -> Self {
8751 self.set_package(field.into());
8752 self
8753 }
8754 }
8755 impl super::GetServiceInfoRequest {
8756 pub const fn const_default() -> Self {
8757 Self {}
8758 }
8759 #[doc(hidden)]
8760 pub fn default_instance() -> &'static Self {
8761 static DEFAULT: super::GetServiceInfoRequest = super::GetServiceInfoRequest::const_default();
8762 &DEFAULT
8763 }
8764 }
8765 impl super::GetServiceInfoResponse {
8766 pub const fn const_default() -> Self {
8767 Self {
8768 chain_id: None,
8769 chain: None,
8770 epoch: None,
8771 checkpoint_height: None,
8772 timestamp: None,
8773 lowest_available_checkpoint: None,
8774 lowest_available_checkpoint_objects: None,
8775 server: None,
8776 }
8777 }
8778 #[doc(hidden)]
8779 pub fn default_instance() -> &'static Self {
8780 static DEFAULT: super::GetServiceInfoResponse = super::GetServiceInfoResponse::const_default();
8781 &DEFAULT
8782 }
8783 pub fn chain_id_opt_mut(&mut self) -> Option<&mut String> {
8785 self.chain_id.as_mut().map(|field| field as _)
8786 }
8787 pub fn chain_id_mut(&mut self) -> &mut String {
8790 self.chain_id.get_or_insert_default()
8791 }
8792 pub fn chain_id_opt(&self) -> Option<&str> {
8794 self.chain_id.as_ref().map(|field| field as _)
8795 }
8796 pub fn set_chain_id<T: Into<String>>(&mut self, field: T) {
8798 self.chain_id = Some(field.into().into());
8799 }
8800 pub fn with_chain_id<T: Into<String>>(mut self, field: T) -> Self {
8802 self.set_chain_id(field.into());
8803 self
8804 }
8805 pub fn chain_opt_mut(&mut self) -> Option<&mut String> {
8807 self.chain.as_mut().map(|field| field as _)
8808 }
8809 pub fn chain_mut(&mut self) -> &mut String {
8812 self.chain.get_or_insert_default()
8813 }
8814 pub fn chain_opt(&self) -> Option<&str> {
8816 self.chain.as_ref().map(|field| field as _)
8817 }
8818 pub fn set_chain<T: Into<String>>(&mut self, field: T) {
8820 self.chain = Some(field.into().into());
8821 }
8822 pub fn with_chain<T: Into<String>>(mut self, field: T) -> Self {
8824 self.set_chain(field.into());
8825 self
8826 }
8827 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
8829 self.epoch.as_mut().map(|field| field as _)
8830 }
8831 pub fn epoch_mut(&mut self) -> &mut u64 {
8834 self.epoch.get_or_insert_default()
8835 }
8836 pub fn epoch_opt(&self) -> Option<u64> {
8838 self.epoch.as_ref().map(|field| *field)
8839 }
8840 pub fn set_epoch(&mut self, field: u64) {
8842 self.epoch = Some(field);
8843 }
8844 pub fn with_epoch(mut self, field: u64) -> Self {
8846 self.set_epoch(field);
8847 self
8848 }
8849 pub fn checkpoint_height_opt_mut(&mut self) -> Option<&mut u64> {
8851 self.checkpoint_height.as_mut().map(|field| field as _)
8852 }
8853 pub fn checkpoint_height_mut(&mut self) -> &mut u64 {
8856 self.checkpoint_height.get_or_insert_default()
8857 }
8858 pub fn checkpoint_height_opt(&self) -> Option<u64> {
8860 self.checkpoint_height.as_ref().map(|field| *field)
8861 }
8862 pub fn set_checkpoint_height(&mut self, field: u64) {
8864 self.checkpoint_height = Some(field);
8865 }
8866 pub fn with_checkpoint_height(mut self, field: u64) -> Self {
8868 self.set_checkpoint_height(field);
8869 self
8870 }
8871 pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
8873 self.timestamp.as_mut().map(|field| field as _)
8874 }
8875 pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
8878 self.timestamp.get_or_insert_default()
8879 }
8880 pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
8882 self.timestamp.as_ref().map(|field| field as _)
8883 }
8884 pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
8886 self.timestamp = Some(field.into().into());
8887 }
8888 pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
8890 mut self,
8891 field: T,
8892 ) -> Self {
8893 self.set_timestamp(field.into());
8894 self
8895 }
8896 pub fn lowest_available_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
8898 self.lowest_available_checkpoint.as_mut().map(|field| field as _)
8899 }
8900 pub fn lowest_available_checkpoint_mut(&mut self) -> &mut u64 {
8903 self.lowest_available_checkpoint.get_or_insert_default()
8904 }
8905 pub fn lowest_available_checkpoint_opt(&self) -> Option<u64> {
8907 self.lowest_available_checkpoint.as_ref().map(|field| *field)
8908 }
8909 pub fn set_lowest_available_checkpoint(&mut self, field: u64) {
8911 self.lowest_available_checkpoint = Some(field);
8912 }
8913 pub fn with_lowest_available_checkpoint(mut self, field: u64) -> Self {
8915 self.set_lowest_available_checkpoint(field);
8916 self
8917 }
8918 pub fn lowest_available_checkpoint_objects_opt_mut(
8920 &mut self,
8921 ) -> Option<&mut u64> {
8922 self.lowest_available_checkpoint_objects.as_mut().map(|field| field as _)
8923 }
8924 pub fn lowest_available_checkpoint_objects_mut(&mut self) -> &mut u64 {
8927 self.lowest_available_checkpoint_objects.get_or_insert_default()
8928 }
8929 pub fn lowest_available_checkpoint_objects_opt(&self) -> Option<u64> {
8931 self.lowest_available_checkpoint_objects.as_ref().map(|field| *field)
8932 }
8933 pub fn set_lowest_available_checkpoint_objects(&mut self, field: u64) {
8935 self.lowest_available_checkpoint_objects = Some(field);
8936 }
8937 pub fn with_lowest_available_checkpoint_objects(mut self, field: u64) -> Self {
8939 self.set_lowest_available_checkpoint_objects(field);
8940 self
8941 }
8942 pub fn server_opt_mut(&mut self) -> Option<&mut String> {
8944 self.server.as_mut().map(|field| field as _)
8945 }
8946 pub fn server_mut(&mut self) -> &mut String {
8949 self.server.get_or_insert_default()
8950 }
8951 pub fn server_opt(&self) -> Option<&str> {
8953 self.server.as_ref().map(|field| field as _)
8954 }
8955 pub fn set_server<T: Into<String>>(&mut self, field: T) {
8957 self.server = Some(field.into().into());
8958 }
8959 pub fn with_server<T: Into<String>>(mut self, field: T) -> Self {
8961 self.set_server(field.into());
8962 self
8963 }
8964 }
8965 impl super::GetTransactionRequest {
8966 pub const fn const_default() -> Self {
8967 Self {
8968 digest: None,
8969 read_mask: None,
8970 }
8971 }
8972 #[doc(hidden)]
8973 pub fn default_instance() -> &'static Self {
8974 static DEFAULT: super::GetTransactionRequest = super::GetTransactionRequest::const_default();
8975 &DEFAULT
8976 }
8977 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
8979 self.digest.as_mut().map(|field| field as _)
8980 }
8981 pub fn digest_mut(&mut self) -> &mut String {
8984 self.digest.get_or_insert_default()
8985 }
8986 pub fn digest_opt(&self) -> Option<&str> {
8988 self.digest.as_ref().map(|field| field as _)
8989 }
8990 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
8992 self.digest = Some(field.into().into());
8993 }
8994 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
8996 self.set_digest(field.into());
8997 self
8998 }
8999 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
9001 self.read_mask.as_mut().map(|field| field as _)
9002 }
9003 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
9006 self.read_mask.get_or_insert_default()
9007 }
9008 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
9010 self.read_mask.as_ref().map(|field| field as _)
9011 }
9012 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
9014 self.read_mask = Some(field.into().into());
9015 }
9016 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
9018 mut self,
9019 field: T,
9020 ) -> Self {
9021 self.set_read_mask(field.into());
9022 self
9023 }
9024 }
9025 impl super::GetTransactionResponse {
9026 pub const fn const_default() -> Self {
9027 Self { transaction: None }
9028 }
9029 #[doc(hidden)]
9030 pub fn default_instance() -> &'static Self {
9031 static DEFAULT: super::GetTransactionResponse = super::GetTransactionResponse::const_default();
9032 &DEFAULT
9033 }
9034 pub fn transaction(&self) -> &super::ExecutedTransaction {
9036 self.transaction
9037 .as_ref()
9038 .map(|field| field as _)
9039 .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
9040 }
9041 pub fn transaction_opt_mut(
9043 &mut self,
9044 ) -> Option<&mut super::ExecutedTransaction> {
9045 self.transaction.as_mut().map(|field| field as _)
9046 }
9047 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
9050 self.transaction.get_or_insert_default()
9051 }
9052 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
9054 self.transaction.as_ref().map(|field| field as _)
9055 }
9056 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
9058 &mut self,
9059 field: T,
9060 ) {
9061 self.transaction = Some(field.into().into());
9062 }
9063 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
9065 mut self,
9066 field: T,
9067 ) -> Self {
9068 self.set_transaction(field.into());
9069 self
9070 }
9071 }
9072 impl super::GetTransactionResult {
9073 pub const fn const_default() -> Self {
9074 Self { result: None }
9075 }
9076 #[doc(hidden)]
9077 pub fn default_instance() -> &'static Self {
9078 static DEFAULT: super::GetTransactionResult = super::GetTransactionResult::const_default();
9079 &DEFAULT
9080 }
9081 pub fn transaction(&self) -> &super::ExecutedTransaction {
9083 if let Some(super::get_transaction_result::Result::Transaction(field)) = &self
9084 .result
9085 {
9086 field as _
9087 } else {
9088 super::ExecutedTransaction::default_instance() as _
9089 }
9090 }
9091 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
9093 if let Some(super::get_transaction_result::Result::Transaction(field)) = &self
9094 .result
9095 {
9096 Some(field as _)
9097 } else {
9098 None
9099 }
9100 }
9101 pub fn transaction_opt_mut(
9103 &mut self,
9104 ) -> Option<&mut super::ExecutedTransaction> {
9105 if let Some(super::get_transaction_result::Result::Transaction(field)) = &mut self
9106 .result
9107 {
9108 Some(field as _)
9109 } else {
9110 None
9111 }
9112 }
9113 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
9117 if self.transaction_opt_mut().is_none() {
9118 self.result = Some(
9119 super::get_transaction_result::Result::Transaction(
9120 super::ExecutedTransaction::default(),
9121 ),
9122 );
9123 }
9124 self.transaction_opt_mut().unwrap()
9125 }
9126 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
9129 &mut self,
9130 field: T,
9131 ) {
9132 self.result = Some(
9133 super::get_transaction_result::Result::Transaction(field.into().into()),
9134 );
9135 }
9136 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
9139 mut self,
9140 field: T,
9141 ) -> Self {
9142 self.set_transaction(field.into());
9143 self
9144 }
9145 pub fn error(&self) -> &super::super::super::super::google::rpc::Status {
9147 if let Some(super::get_transaction_result::Result::Error(field)) = &self
9148 .result
9149 {
9150 field as _
9151 } else {
9152 super::super::super::super::google::rpc::Status::default_instance() as _
9153 }
9154 }
9155 pub fn error_opt(
9157 &self,
9158 ) -> Option<&super::super::super::super::google::rpc::Status> {
9159 if let Some(super::get_transaction_result::Result::Error(field)) = &self
9160 .result
9161 {
9162 Some(field as _)
9163 } else {
9164 None
9165 }
9166 }
9167 pub fn error_opt_mut(
9169 &mut self,
9170 ) -> Option<&mut super::super::super::super::google::rpc::Status> {
9171 if let Some(super::get_transaction_result::Result::Error(field)) = &mut self
9172 .result
9173 {
9174 Some(field as _)
9175 } else {
9176 None
9177 }
9178 }
9179 pub fn error_mut(
9183 &mut self,
9184 ) -> &mut super::super::super::super::google::rpc::Status {
9185 if self.error_opt_mut().is_none() {
9186 self.result = Some(
9187 super::get_transaction_result::Result::Error(
9188 super::super::super::super::google::rpc::Status::default(),
9189 ),
9190 );
9191 }
9192 self.error_opt_mut().unwrap()
9193 }
9194 pub fn set_error<T: Into<super::super::super::super::google::rpc::Status>>(
9197 &mut self,
9198 field: T,
9199 ) {
9200 self.result = Some(
9201 super::get_transaction_result::Result::Error(field.into().into()),
9202 );
9203 }
9204 pub fn with_error<T: Into<super::super::super::super::google::rpc::Status>>(
9207 mut self,
9208 field: T,
9209 ) -> Self {
9210 self.set_error(field.into());
9211 self
9212 }
9213 }
9214 impl super::IndexError {
9215 pub const fn const_default() -> Self {
9216 Self {
9217 index: None,
9218 subresult: None,
9219 }
9220 }
9221 #[doc(hidden)]
9222 pub fn default_instance() -> &'static Self {
9223 static DEFAULT: super::IndexError = super::IndexError::const_default();
9224 &DEFAULT
9225 }
9226 pub fn index_opt_mut(&mut self) -> Option<&mut u32> {
9228 self.index.as_mut().map(|field| field as _)
9229 }
9230 pub fn index_mut(&mut self) -> &mut u32 {
9233 self.index.get_or_insert_default()
9234 }
9235 pub fn index_opt(&self) -> Option<u32> {
9237 self.index.as_ref().map(|field| *field)
9238 }
9239 pub fn set_index(&mut self, field: u32) {
9241 self.index = Some(field);
9242 }
9243 pub fn with_index(mut self, field: u32) -> Self {
9245 self.set_index(field);
9246 self
9247 }
9248 pub fn subresult_opt_mut(&mut self) -> Option<&mut u32> {
9250 self.subresult.as_mut().map(|field| field as _)
9251 }
9252 pub fn subresult_mut(&mut self) -> &mut u32 {
9255 self.subresult.get_or_insert_default()
9256 }
9257 pub fn subresult_opt(&self) -> Option<u32> {
9259 self.subresult.as_ref().map(|field| *field)
9260 }
9261 pub fn set_subresult(&mut self, field: u32) {
9263 self.subresult = Some(field);
9264 }
9265 pub fn with_subresult(mut self, field: u32) -> Self {
9267 self.set_subresult(field);
9268 self
9269 }
9270 }
9271 impl super::Input {
9272 pub const fn const_default() -> Self {
9273 Self {
9274 kind: None,
9275 pure: None,
9276 object_id: None,
9277 version: None,
9278 digest: None,
9279 mutable: None,
9280 mutability: None,
9281 funds_withdrawal: None,
9282 literal: None,
9283 }
9284 }
9285 #[doc(hidden)]
9286 pub fn default_instance() -> &'static Self {
9287 static DEFAULT: super::Input = super::Input::const_default();
9288 &DEFAULT
9289 }
9290 pub fn with_kind<T: Into<super::input::InputKind>>(mut self, field: T) -> Self {
9292 self.set_kind(field.into());
9293 self
9294 }
9295 pub fn pure_opt(&self) -> Option<&[u8]> {
9297 self.pure.as_ref().map(|field| field as _)
9298 }
9299 pub fn set_pure<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9301 self.pure = Some(field.into().into());
9302 }
9303 pub fn with_pure<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
9305 self.set_pure(field.into());
9306 self
9307 }
9308 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
9310 self.object_id.as_mut().map(|field| field as _)
9311 }
9312 pub fn object_id_mut(&mut self) -> &mut String {
9315 self.object_id.get_or_insert_default()
9316 }
9317 pub fn object_id_opt(&self) -> Option<&str> {
9319 self.object_id.as_ref().map(|field| field as _)
9320 }
9321 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
9323 self.object_id = Some(field.into().into());
9324 }
9325 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
9327 self.set_object_id(field.into());
9328 self
9329 }
9330 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
9332 self.version.as_mut().map(|field| field as _)
9333 }
9334 pub fn version_mut(&mut self) -> &mut u64 {
9337 self.version.get_or_insert_default()
9338 }
9339 pub fn version_opt(&self) -> Option<u64> {
9341 self.version.as_ref().map(|field| *field)
9342 }
9343 pub fn set_version(&mut self, field: u64) {
9345 self.version = Some(field);
9346 }
9347 pub fn with_version(mut self, field: u64) -> Self {
9349 self.set_version(field);
9350 self
9351 }
9352 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
9354 self.digest.as_mut().map(|field| field as _)
9355 }
9356 pub fn digest_mut(&mut self) -> &mut String {
9359 self.digest.get_or_insert_default()
9360 }
9361 pub fn digest_opt(&self) -> Option<&str> {
9363 self.digest.as_ref().map(|field| field as _)
9364 }
9365 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
9367 self.digest = Some(field.into().into());
9368 }
9369 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
9371 self.set_digest(field.into());
9372 self
9373 }
9374 pub fn mutable_opt_mut(&mut self) -> Option<&mut bool> {
9376 self.mutable.as_mut().map(|field| field as _)
9377 }
9378 pub fn mutable_mut(&mut self) -> &mut bool {
9381 self.mutable.get_or_insert_default()
9382 }
9383 pub fn mutable_opt(&self) -> Option<bool> {
9385 self.mutable.as_ref().map(|field| *field)
9386 }
9387 pub fn set_mutable(&mut self, field: bool) {
9389 self.mutable = Some(field);
9390 }
9391 pub fn with_mutable(mut self, field: bool) -> Self {
9393 self.set_mutable(field);
9394 self
9395 }
9396 pub fn with_mutability<T: Into<super::input::Mutability>>(
9398 mut self,
9399 field: T,
9400 ) -> Self {
9401 self.set_mutability(field.into());
9402 self
9403 }
9404 pub fn funds_withdrawal(&self) -> &super::FundsWithdrawal {
9406 self.funds_withdrawal
9407 .as_ref()
9408 .map(|field| field as _)
9409 .unwrap_or_else(|| super::FundsWithdrawal::default_instance() as _)
9410 }
9411 pub fn funds_withdrawal_opt_mut(
9413 &mut self,
9414 ) -> Option<&mut super::FundsWithdrawal> {
9415 self.funds_withdrawal.as_mut().map(|field| field as _)
9416 }
9417 pub fn funds_withdrawal_mut(&mut self) -> &mut super::FundsWithdrawal {
9420 self.funds_withdrawal.get_or_insert_default()
9421 }
9422 pub fn funds_withdrawal_opt(&self) -> Option<&super::FundsWithdrawal> {
9424 self.funds_withdrawal.as_ref().map(|field| field as _)
9425 }
9426 pub fn set_funds_withdrawal<T: Into<super::FundsWithdrawal>>(
9428 &mut self,
9429 field: T,
9430 ) {
9431 self.funds_withdrawal = Some(field.into().into());
9432 }
9433 pub fn with_funds_withdrawal<T: Into<super::FundsWithdrawal>>(
9435 mut self,
9436 field: T,
9437 ) -> Self {
9438 self.set_funds_withdrawal(field.into());
9439 self
9440 }
9441 pub fn literal_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
9443 self.literal.as_mut().map(|field| field as _)
9444 }
9445 pub fn literal_mut(&mut self) -> &mut ::prost_types::Value {
9448 self.literal.get_or_insert_default()
9449 }
9450 pub fn literal_opt(&self) -> Option<&::prost_types::Value> {
9452 self.literal.as_ref().map(|field| field as _)
9453 }
9454 pub fn set_literal<T: Into<::prost_types::Value>>(&mut self, field: T) {
9456 self.literal = Some(field.into().into());
9457 }
9458 pub fn with_literal<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
9460 self.set_literal(field.into());
9461 self
9462 }
9463 }
9464 impl super::Jwk {
9465 pub const fn const_default() -> Self {
9466 Self {
9467 kty: None,
9468 e: None,
9469 n: None,
9470 alg: None,
9471 }
9472 }
9473 #[doc(hidden)]
9474 pub fn default_instance() -> &'static Self {
9475 static DEFAULT: super::Jwk = super::Jwk::const_default();
9476 &DEFAULT
9477 }
9478 pub fn kty_opt_mut(&mut self) -> Option<&mut String> {
9480 self.kty.as_mut().map(|field| field as _)
9481 }
9482 pub fn kty_mut(&mut self) -> &mut String {
9485 self.kty.get_or_insert_default()
9486 }
9487 pub fn kty_opt(&self) -> Option<&str> {
9489 self.kty.as_ref().map(|field| field as _)
9490 }
9491 pub fn set_kty<T: Into<String>>(&mut self, field: T) {
9493 self.kty = Some(field.into().into());
9494 }
9495 pub fn with_kty<T: Into<String>>(mut self, field: T) -> Self {
9497 self.set_kty(field.into());
9498 self
9499 }
9500 pub fn e_opt_mut(&mut self) -> Option<&mut String> {
9502 self.e.as_mut().map(|field| field as _)
9503 }
9504 pub fn e_mut(&mut self) -> &mut String {
9507 self.e.get_or_insert_default()
9508 }
9509 pub fn e_opt(&self) -> Option<&str> {
9511 self.e.as_ref().map(|field| field as _)
9512 }
9513 pub fn set_e<T: Into<String>>(&mut self, field: T) {
9515 self.e = Some(field.into().into());
9516 }
9517 pub fn with_e<T: Into<String>>(mut self, field: T) -> Self {
9519 self.set_e(field.into());
9520 self
9521 }
9522 pub fn n_opt_mut(&mut self) -> Option<&mut String> {
9524 self.n.as_mut().map(|field| field as _)
9525 }
9526 pub fn n_mut(&mut self) -> &mut String {
9529 self.n.get_or_insert_default()
9530 }
9531 pub fn n_opt(&self) -> Option<&str> {
9533 self.n.as_ref().map(|field| field as _)
9534 }
9535 pub fn set_n<T: Into<String>>(&mut self, field: T) {
9537 self.n = Some(field.into().into());
9538 }
9539 pub fn with_n<T: Into<String>>(mut self, field: T) -> Self {
9541 self.set_n(field.into());
9542 self
9543 }
9544 pub fn alg_opt_mut(&mut self) -> Option<&mut String> {
9546 self.alg.as_mut().map(|field| field as _)
9547 }
9548 pub fn alg_mut(&mut self) -> &mut String {
9551 self.alg.get_or_insert_default()
9552 }
9553 pub fn alg_opt(&self) -> Option<&str> {
9555 self.alg.as_ref().map(|field| field as _)
9556 }
9557 pub fn set_alg<T: Into<String>>(&mut self, field: T) {
9559 self.alg = Some(field.into().into());
9560 }
9561 pub fn with_alg<T: Into<String>>(mut self, field: T) -> Self {
9563 self.set_alg(field.into());
9564 self
9565 }
9566 }
9567 impl super::JwkId {
9568 pub const fn const_default() -> Self {
9569 Self { iss: None, kid: None }
9570 }
9571 #[doc(hidden)]
9572 pub fn default_instance() -> &'static Self {
9573 static DEFAULT: super::JwkId = super::JwkId::const_default();
9574 &DEFAULT
9575 }
9576 pub fn iss_opt_mut(&mut self) -> Option<&mut String> {
9578 self.iss.as_mut().map(|field| field as _)
9579 }
9580 pub fn iss_mut(&mut self) -> &mut String {
9583 self.iss.get_or_insert_default()
9584 }
9585 pub fn iss_opt(&self) -> Option<&str> {
9587 self.iss.as_ref().map(|field| field as _)
9588 }
9589 pub fn set_iss<T: Into<String>>(&mut self, field: T) {
9591 self.iss = Some(field.into().into());
9592 }
9593 pub fn with_iss<T: Into<String>>(mut self, field: T) -> Self {
9595 self.set_iss(field.into());
9596 self
9597 }
9598 pub fn kid_opt_mut(&mut self) -> Option<&mut String> {
9600 self.kid.as_mut().map(|field| field as _)
9601 }
9602 pub fn kid_mut(&mut self) -> &mut String {
9605 self.kid.get_or_insert_default()
9606 }
9607 pub fn kid_opt(&self) -> Option<&str> {
9609 self.kid.as_ref().map(|field| field as _)
9610 }
9611 pub fn set_kid<T: Into<String>>(&mut self, field: T) {
9613 self.kid = Some(field.into().into());
9614 }
9615 pub fn with_kid<T: Into<String>>(mut self, field: T) -> Self {
9617 self.set_kid(field.into());
9618 self
9619 }
9620 }
9621 impl super::Linkage {
9622 pub const fn const_default() -> Self {
9623 Self {
9624 original_id: None,
9625 upgraded_id: None,
9626 upgraded_version: None,
9627 }
9628 }
9629 #[doc(hidden)]
9630 pub fn default_instance() -> &'static Self {
9631 static DEFAULT: super::Linkage = super::Linkage::const_default();
9632 &DEFAULT
9633 }
9634 pub fn original_id_opt_mut(&mut self) -> Option<&mut String> {
9636 self.original_id.as_mut().map(|field| field as _)
9637 }
9638 pub fn original_id_mut(&mut self) -> &mut String {
9641 self.original_id.get_or_insert_default()
9642 }
9643 pub fn original_id_opt(&self) -> Option<&str> {
9645 self.original_id.as_ref().map(|field| field as _)
9646 }
9647 pub fn set_original_id<T: Into<String>>(&mut self, field: T) {
9649 self.original_id = Some(field.into().into());
9650 }
9651 pub fn with_original_id<T: Into<String>>(mut self, field: T) -> Self {
9653 self.set_original_id(field.into());
9654 self
9655 }
9656 pub fn upgraded_id_opt_mut(&mut self) -> Option<&mut String> {
9658 self.upgraded_id.as_mut().map(|field| field as _)
9659 }
9660 pub fn upgraded_id_mut(&mut self) -> &mut String {
9663 self.upgraded_id.get_or_insert_default()
9664 }
9665 pub fn upgraded_id_opt(&self) -> Option<&str> {
9667 self.upgraded_id.as_ref().map(|field| field as _)
9668 }
9669 pub fn set_upgraded_id<T: Into<String>>(&mut self, field: T) {
9671 self.upgraded_id = Some(field.into().into());
9672 }
9673 pub fn with_upgraded_id<T: Into<String>>(mut self, field: T) -> Self {
9675 self.set_upgraded_id(field.into());
9676 self
9677 }
9678 pub fn upgraded_version_opt_mut(&mut self) -> Option<&mut u64> {
9680 self.upgraded_version.as_mut().map(|field| field as _)
9681 }
9682 pub fn upgraded_version_mut(&mut self) -> &mut u64 {
9685 self.upgraded_version.get_or_insert_default()
9686 }
9687 pub fn upgraded_version_opt(&self) -> Option<u64> {
9689 self.upgraded_version.as_ref().map(|field| *field)
9690 }
9691 pub fn set_upgraded_version(&mut self, field: u64) {
9693 self.upgraded_version = Some(field);
9694 }
9695 pub fn with_upgraded_version(mut self, field: u64) -> Self {
9697 self.set_upgraded_version(field);
9698 self
9699 }
9700 }
9701 impl super::ListBalancesRequest {
9702 pub const fn const_default() -> Self {
9703 Self {
9704 owner: None,
9705 page_size: None,
9706 page_token: None,
9707 }
9708 }
9709 #[doc(hidden)]
9710 pub fn default_instance() -> &'static Self {
9711 static DEFAULT: super::ListBalancesRequest = super::ListBalancesRequest::const_default();
9712 &DEFAULT
9713 }
9714 pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
9716 self.owner.as_mut().map(|field| field as _)
9717 }
9718 pub fn owner_mut(&mut self) -> &mut String {
9721 self.owner.get_or_insert_default()
9722 }
9723 pub fn owner_opt(&self) -> Option<&str> {
9725 self.owner.as_ref().map(|field| field as _)
9726 }
9727 pub fn set_owner<T: Into<String>>(&mut self, field: T) {
9729 self.owner = Some(field.into().into());
9730 }
9731 pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
9733 self.set_owner(field.into());
9734 self
9735 }
9736 pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
9738 self.page_size.as_mut().map(|field| field as _)
9739 }
9740 pub fn page_size_mut(&mut self) -> &mut u32 {
9743 self.page_size.get_or_insert_default()
9744 }
9745 pub fn page_size_opt(&self) -> Option<u32> {
9747 self.page_size.as_ref().map(|field| *field)
9748 }
9749 pub fn set_page_size(&mut self, field: u32) {
9751 self.page_size = Some(field);
9752 }
9753 pub fn with_page_size(mut self, field: u32) -> Self {
9755 self.set_page_size(field);
9756 self
9757 }
9758 pub fn page_token_opt(&self) -> Option<&[u8]> {
9760 self.page_token.as_ref().map(|field| field as _)
9761 }
9762 pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9764 self.page_token = Some(field.into().into());
9765 }
9766 pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
9768 mut self,
9769 field: T,
9770 ) -> Self {
9771 self.set_page_token(field.into());
9772 self
9773 }
9774 }
9775 impl super::ListBalancesResponse {
9776 pub const fn const_default() -> Self {
9777 Self {
9778 balances: Vec::new(),
9779 next_page_token: None,
9780 }
9781 }
9782 #[doc(hidden)]
9783 pub fn default_instance() -> &'static Self {
9784 static DEFAULT: super::ListBalancesResponse = super::ListBalancesResponse::const_default();
9785 &DEFAULT
9786 }
9787 pub fn balances(&self) -> &[super::Balance] {
9789 &self.balances
9790 }
9791 pub fn balances_mut(&mut self) -> &mut Vec<super::Balance> {
9794 &mut self.balances
9795 }
9796 pub fn set_balances(&mut self, field: Vec<super::Balance>) {
9798 self.balances = field;
9799 }
9800 pub fn with_balances(mut self, field: Vec<super::Balance>) -> Self {
9802 self.set_balances(field);
9803 self
9804 }
9805 pub fn next_page_token_opt(&self) -> Option<&[u8]> {
9807 self.next_page_token.as_ref().map(|field| field as _)
9808 }
9809 pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9811 self.next_page_token = Some(field.into().into());
9812 }
9813 pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
9815 mut self,
9816 field: T,
9817 ) -> Self {
9818 self.set_next_page_token(field.into());
9819 self
9820 }
9821 }
9822 impl super::ListCheckpointsRequest {
9823 pub const fn const_default() -> Self {
9824 Self {
9825 read_mask: None,
9826 start_checkpoint: None,
9827 end_checkpoint: None,
9828 filter: None,
9829 options: None,
9830 }
9831 }
9832 #[doc(hidden)]
9833 pub fn default_instance() -> &'static Self {
9834 static DEFAULT: super::ListCheckpointsRequest = super::ListCheckpointsRequest::const_default();
9835 &DEFAULT
9836 }
9837 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
9839 self.read_mask.as_mut().map(|field| field as _)
9840 }
9841 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
9844 self.read_mask.get_or_insert_default()
9845 }
9846 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
9848 self.read_mask.as_ref().map(|field| field as _)
9849 }
9850 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
9852 self.read_mask = Some(field.into().into());
9853 }
9854 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
9856 mut self,
9857 field: T,
9858 ) -> Self {
9859 self.set_read_mask(field.into());
9860 self
9861 }
9862 pub fn start_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
9864 self.start_checkpoint.as_mut().map(|field| field as _)
9865 }
9866 pub fn start_checkpoint_mut(&mut self) -> &mut u64 {
9869 self.start_checkpoint.get_or_insert_default()
9870 }
9871 pub fn start_checkpoint_opt(&self) -> Option<u64> {
9873 self.start_checkpoint.as_ref().map(|field| *field)
9874 }
9875 pub fn set_start_checkpoint(&mut self, field: u64) {
9877 self.start_checkpoint = Some(field);
9878 }
9879 pub fn with_start_checkpoint(mut self, field: u64) -> Self {
9881 self.set_start_checkpoint(field);
9882 self
9883 }
9884 pub fn end_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
9886 self.end_checkpoint.as_mut().map(|field| field as _)
9887 }
9888 pub fn end_checkpoint_mut(&mut self) -> &mut u64 {
9891 self.end_checkpoint.get_or_insert_default()
9892 }
9893 pub fn end_checkpoint_opt(&self) -> Option<u64> {
9895 self.end_checkpoint.as_ref().map(|field| *field)
9896 }
9897 pub fn set_end_checkpoint(&mut self, field: u64) {
9899 self.end_checkpoint = Some(field);
9900 }
9901 pub fn with_end_checkpoint(mut self, field: u64) -> Self {
9903 self.set_end_checkpoint(field);
9904 self
9905 }
9906 pub fn filter(&self) -> &super::TransactionFilter {
9908 self.filter
9909 .as_ref()
9910 .map(|field| field as _)
9911 .unwrap_or_else(|| super::TransactionFilter::default_instance() as _)
9912 }
9913 pub fn filter_opt_mut(&mut self) -> Option<&mut super::TransactionFilter> {
9915 self.filter.as_mut().map(|field| field as _)
9916 }
9917 pub fn filter_mut(&mut self) -> &mut super::TransactionFilter {
9920 self.filter.get_or_insert_default()
9921 }
9922 pub fn filter_opt(&self) -> Option<&super::TransactionFilter> {
9924 self.filter.as_ref().map(|field| field as _)
9925 }
9926 pub fn set_filter<T: Into<super::TransactionFilter>>(&mut self, field: T) {
9928 self.filter = Some(field.into().into());
9929 }
9930 pub fn with_filter<T: Into<super::TransactionFilter>>(
9932 mut self,
9933 field: T,
9934 ) -> Self {
9935 self.set_filter(field.into());
9936 self
9937 }
9938 pub fn options(&self) -> &super::QueryOptions {
9940 self.options
9941 .as_ref()
9942 .map(|field| field as _)
9943 .unwrap_or_else(|| super::QueryOptions::default_instance() as _)
9944 }
9945 pub fn options_opt_mut(&mut self) -> Option<&mut super::QueryOptions> {
9947 self.options.as_mut().map(|field| field as _)
9948 }
9949 pub fn options_mut(&mut self) -> &mut super::QueryOptions {
9952 self.options.get_or_insert_default()
9953 }
9954 pub fn options_opt(&self) -> Option<&super::QueryOptions> {
9956 self.options.as_ref().map(|field| field as _)
9957 }
9958 pub fn set_options<T: Into<super::QueryOptions>>(&mut self, field: T) {
9960 self.options = Some(field.into().into());
9961 }
9962 pub fn with_options<T: Into<super::QueryOptions>>(mut self, field: T) -> Self {
9964 self.set_options(field.into());
9965 self
9966 }
9967 }
9968 impl super::ListCheckpointsResponse {
9969 pub const fn const_default() -> Self {
9970 Self {
9971 checkpoint: None,
9972 watermark: None,
9973 end: None,
9974 }
9975 }
9976 #[doc(hidden)]
9977 pub fn default_instance() -> &'static Self {
9978 static DEFAULT: super::ListCheckpointsResponse = super::ListCheckpointsResponse::const_default();
9979 &DEFAULT
9980 }
9981 pub fn checkpoint(&self) -> &super::Checkpoint {
9983 self.checkpoint
9984 .as_ref()
9985 .map(|field| field as _)
9986 .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
9987 }
9988 pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
9990 self.checkpoint.as_mut().map(|field| field as _)
9991 }
9992 pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
9995 self.checkpoint.get_or_insert_default()
9996 }
9997 pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
9999 self.checkpoint.as_ref().map(|field| field as _)
10000 }
10001 pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
10003 self.checkpoint = Some(field.into().into());
10004 }
10005 pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
10007 self.set_checkpoint(field.into());
10008 self
10009 }
10010 pub fn watermark(&self) -> &super::Watermark {
10012 self.watermark
10013 .as_ref()
10014 .map(|field| field as _)
10015 .unwrap_or_else(|| super::Watermark::default_instance() as _)
10016 }
10017 pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
10019 self.watermark.as_mut().map(|field| field as _)
10020 }
10021 pub fn watermark_mut(&mut self) -> &mut super::Watermark {
10024 self.watermark.get_or_insert_default()
10025 }
10026 pub fn watermark_opt(&self) -> Option<&super::Watermark> {
10028 self.watermark.as_ref().map(|field| field as _)
10029 }
10030 pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
10032 self.watermark = Some(field.into().into());
10033 }
10034 pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
10036 self.set_watermark(field.into());
10037 self
10038 }
10039 pub fn end(&self) -> &super::QueryEnd {
10041 self.end
10042 .as_ref()
10043 .map(|field| field as _)
10044 .unwrap_or_else(|| super::QueryEnd::default_instance() as _)
10045 }
10046 pub fn end_opt_mut(&mut self) -> Option<&mut super::QueryEnd> {
10048 self.end.as_mut().map(|field| field as _)
10049 }
10050 pub fn end_mut(&mut self) -> &mut super::QueryEnd {
10053 self.end.get_or_insert_default()
10054 }
10055 pub fn end_opt(&self) -> Option<&super::QueryEnd> {
10057 self.end.as_ref().map(|field| field as _)
10058 }
10059 pub fn set_end<T: Into<super::QueryEnd>>(&mut self, field: T) {
10061 self.end = Some(field.into().into());
10062 }
10063 pub fn with_end<T: Into<super::QueryEnd>>(mut self, field: T) -> Self {
10065 self.set_end(field.into());
10066 self
10067 }
10068 }
10069 impl super::ListDynamicFieldsRequest {
10070 pub const fn const_default() -> Self {
10071 Self {
10072 parent: None,
10073 page_size: None,
10074 page_token: None,
10075 read_mask: None,
10076 }
10077 }
10078 #[doc(hidden)]
10079 pub fn default_instance() -> &'static Self {
10080 static DEFAULT: super::ListDynamicFieldsRequest = super::ListDynamicFieldsRequest::const_default();
10081 &DEFAULT
10082 }
10083 pub fn parent_opt_mut(&mut self) -> Option<&mut String> {
10085 self.parent.as_mut().map(|field| field as _)
10086 }
10087 pub fn parent_mut(&mut self) -> &mut String {
10090 self.parent.get_or_insert_default()
10091 }
10092 pub fn parent_opt(&self) -> Option<&str> {
10094 self.parent.as_ref().map(|field| field as _)
10095 }
10096 pub fn set_parent<T: Into<String>>(&mut self, field: T) {
10098 self.parent = Some(field.into().into());
10099 }
10100 pub fn with_parent<T: Into<String>>(mut self, field: T) -> Self {
10102 self.set_parent(field.into());
10103 self
10104 }
10105 pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
10107 self.page_size.as_mut().map(|field| field as _)
10108 }
10109 pub fn page_size_mut(&mut self) -> &mut u32 {
10112 self.page_size.get_or_insert_default()
10113 }
10114 pub fn page_size_opt(&self) -> Option<u32> {
10116 self.page_size.as_ref().map(|field| *field)
10117 }
10118 pub fn set_page_size(&mut self, field: u32) {
10120 self.page_size = Some(field);
10121 }
10122 pub fn with_page_size(mut self, field: u32) -> Self {
10124 self.set_page_size(field);
10125 self
10126 }
10127 pub fn page_token_opt(&self) -> Option<&[u8]> {
10129 self.page_token.as_ref().map(|field| field as _)
10130 }
10131 pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10133 self.page_token = Some(field.into().into());
10134 }
10135 pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
10137 mut self,
10138 field: T,
10139 ) -> Self {
10140 self.set_page_token(field.into());
10141 self
10142 }
10143 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
10145 self.read_mask.as_mut().map(|field| field as _)
10146 }
10147 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
10150 self.read_mask.get_or_insert_default()
10151 }
10152 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
10154 self.read_mask.as_ref().map(|field| field as _)
10155 }
10156 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
10158 self.read_mask = Some(field.into().into());
10159 }
10160 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
10162 mut self,
10163 field: T,
10164 ) -> Self {
10165 self.set_read_mask(field.into());
10166 self
10167 }
10168 }
10169 impl super::ListDynamicFieldsResponse {
10170 pub const fn const_default() -> Self {
10171 Self {
10172 dynamic_fields: Vec::new(),
10173 next_page_token: None,
10174 }
10175 }
10176 #[doc(hidden)]
10177 pub fn default_instance() -> &'static Self {
10178 static DEFAULT: super::ListDynamicFieldsResponse = super::ListDynamicFieldsResponse::const_default();
10179 &DEFAULT
10180 }
10181 pub fn dynamic_fields(&self) -> &[super::DynamicField] {
10183 &self.dynamic_fields
10184 }
10185 pub fn dynamic_fields_mut(&mut self) -> &mut Vec<super::DynamicField> {
10188 &mut self.dynamic_fields
10189 }
10190 pub fn set_dynamic_fields(&mut self, field: Vec<super::DynamicField>) {
10192 self.dynamic_fields = field;
10193 }
10194 pub fn with_dynamic_fields(mut self, field: Vec<super::DynamicField>) -> Self {
10196 self.set_dynamic_fields(field);
10197 self
10198 }
10199 pub fn next_page_token_opt(&self) -> Option<&[u8]> {
10201 self.next_page_token.as_ref().map(|field| field as _)
10202 }
10203 pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10205 self.next_page_token = Some(field.into().into());
10206 }
10207 pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
10209 mut self,
10210 field: T,
10211 ) -> Self {
10212 self.set_next_page_token(field.into());
10213 self
10214 }
10215 }
10216 impl super::ListEventsRequest {
10217 pub const fn const_default() -> Self {
10218 Self {
10219 read_mask: None,
10220 start_checkpoint: None,
10221 end_checkpoint: None,
10222 filter: None,
10223 options: None,
10224 }
10225 }
10226 #[doc(hidden)]
10227 pub fn default_instance() -> &'static Self {
10228 static DEFAULT: super::ListEventsRequest = super::ListEventsRequest::const_default();
10229 &DEFAULT
10230 }
10231 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
10233 self.read_mask.as_mut().map(|field| field as _)
10234 }
10235 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
10238 self.read_mask.get_or_insert_default()
10239 }
10240 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
10242 self.read_mask.as_ref().map(|field| field as _)
10243 }
10244 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
10246 self.read_mask = Some(field.into().into());
10247 }
10248 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
10250 mut self,
10251 field: T,
10252 ) -> Self {
10253 self.set_read_mask(field.into());
10254 self
10255 }
10256 pub fn start_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
10258 self.start_checkpoint.as_mut().map(|field| field as _)
10259 }
10260 pub fn start_checkpoint_mut(&mut self) -> &mut u64 {
10263 self.start_checkpoint.get_or_insert_default()
10264 }
10265 pub fn start_checkpoint_opt(&self) -> Option<u64> {
10267 self.start_checkpoint.as_ref().map(|field| *field)
10268 }
10269 pub fn set_start_checkpoint(&mut self, field: u64) {
10271 self.start_checkpoint = Some(field);
10272 }
10273 pub fn with_start_checkpoint(mut self, field: u64) -> Self {
10275 self.set_start_checkpoint(field);
10276 self
10277 }
10278 pub fn end_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
10280 self.end_checkpoint.as_mut().map(|field| field as _)
10281 }
10282 pub fn end_checkpoint_mut(&mut self) -> &mut u64 {
10285 self.end_checkpoint.get_or_insert_default()
10286 }
10287 pub fn end_checkpoint_opt(&self) -> Option<u64> {
10289 self.end_checkpoint.as_ref().map(|field| *field)
10290 }
10291 pub fn set_end_checkpoint(&mut self, field: u64) {
10293 self.end_checkpoint = Some(field);
10294 }
10295 pub fn with_end_checkpoint(mut self, field: u64) -> Self {
10297 self.set_end_checkpoint(field);
10298 self
10299 }
10300 pub fn filter(&self) -> &super::EventFilter {
10302 self.filter
10303 .as_ref()
10304 .map(|field| field as _)
10305 .unwrap_or_else(|| super::EventFilter::default_instance() as _)
10306 }
10307 pub fn filter_opt_mut(&mut self) -> Option<&mut super::EventFilter> {
10309 self.filter.as_mut().map(|field| field as _)
10310 }
10311 pub fn filter_mut(&mut self) -> &mut super::EventFilter {
10314 self.filter.get_or_insert_default()
10315 }
10316 pub fn filter_opt(&self) -> Option<&super::EventFilter> {
10318 self.filter.as_ref().map(|field| field as _)
10319 }
10320 pub fn set_filter<T: Into<super::EventFilter>>(&mut self, field: T) {
10322 self.filter = Some(field.into().into());
10323 }
10324 pub fn with_filter<T: Into<super::EventFilter>>(mut self, field: T) -> Self {
10326 self.set_filter(field.into());
10327 self
10328 }
10329 pub fn options(&self) -> &super::QueryOptions {
10331 self.options
10332 .as_ref()
10333 .map(|field| field as _)
10334 .unwrap_or_else(|| super::QueryOptions::default_instance() as _)
10335 }
10336 pub fn options_opt_mut(&mut self) -> Option<&mut super::QueryOptions> {
10338 self.options.as_mut().map(|field| field as _)
10339 }
10340 pub fn options_mut(&mut self) -> &mut super::QueryOptions {
10343 self.options.get_or_insert_default()
10344 }
10345 pub fn options_opt(&self) -> Option<&super::QueryOptions> {
10347 self.options.as_ref().map(|field| field as _)
10348 }
10349 pub fn set_options<T: Into<super::QueryOptions>>(&mut self, field: T) {
10351 self.options = Some(field.into().into());
10352 }
10353 pub fn with_options<T: Into<super::QueryOptions>>(mut self, field: T) -> Self {
10355 self.set_options(field.into());
10356 self
10357 }
10358 }
10359 impl super::ListEventsResponse {
10360 pub const fn const_default() -> Self {
10361 Self {
10362 event: None,
10363 watermark: None,
10364 end: None,
10365 }
10366 }
10367 #[doc(hidden)]
10368 pub fn default_instance() -> &'static Self {
10369 static DEFAULT: super::ListEventsResponse = super::ListEventsResponse::const_default();
10370 &DEFAULT
10371 }
10372 pub fn event(&self) -> &super::Event {
10374 self.event
10375 .as_ref()
10376 .map(|field| field as _)
10377 .unwrap_or_else(|| super::Event::default_instance() as _)
10378 }
10379 pub fn event_opt_mut(&mut self) -> Option<&mut super::Event> {
10381 self.event.as_mut().map(|field| field as _)
10382 }
10383 pub fn event_mut(&mut self) -> &mut super::Event {
10386 self.event.get_or_insert_default()
10387 }
10388 pub fn event_opt(&self) -> Option<&super::Event> {
10390 self.event.as_ref().map(|field| field as _)
10391 }
10392 pub fn set_event<T: Into<super::Event>>(&mut self, field: T) {
10394 self.event = Some(field.into().into());
10395 }
10396 pub fn with_event<T: Into<super::Event>>(mut self, field: T) -> Self {
10398 self.set_event(field.into());
10399 self
10400 }
10401 pub fn watermark(&self) -> &super::Watermark {
10403 self.watermark
10404 .as_ref()
10405 .map(|field| field as _)
10406 .unwrap_or_else(|| super::Watermark::default_instance() as _)
10407 }
10408 pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
10410 self.watermark.as_mut().map(|field| field as _)
10411 }
10412 pub fn watermark_mut(&mut self) -> &mut super::Watermark {
10415 self.watermark.get_or_insert_default()
10416 }
10417 pub fn watermark_opt(&self) -> Option<&super::Watermark> {
10419 self.watermark.as_ref().map(|field| field as _)
10420 }
10421 pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
10423 self.watermark = Some(field.into().into());
10424 }
10425 pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
10427 self.set_watermark(field.into());
10428 self
10429 }
10430 pub fn end(&self) -> &super::QueryEnd {
10432 self.end
10433 .as_ref()
10434 .map(|field| field as _)
10435 .unwrap_or_else(|| super::QueryEnd::default_instance() as _)
10436 }
10437 pub fn end_opt_mut(&mut self) -> Option<&mut super::QueryEnd> {
10439 self.end.as_mut().map(|field| field as _)
10440 }
10441 pub fn end_mut(&mut self) -> &mut super::QueryEnd {
10444 self.end.get_or_insert_default()
10445 }
10446 pub fn end_opt(&self) -> Option<&super::QueryEnd> {
10448 self.end.as_ref().map(|field| field as _)
10449 }
10450 pub fn set_end<T: Into<super::QueryEnd>>(&mut self, field: T) {
10452 self.end = Some(field.into().into());
10453 }
10454 pub fn with_end<T: Into<super::QueryEnd>>(mut self, field: T) -> Self {
10456 self.set_end(field.into());
10457 self
10458 }
10459 }
10460 impl super::ListOwnedObjectsRequest {
10461 pub const fn const_default() -> Self {
10462 Self {
10463 owner: None,
10464 page_size: None,
10465 page_token: None,
10466 read_mask: None,
10467 object_type: None,
10468 }
10469 }
10470 #[doc(hidden)]
10471 pub fn default_instance() -> &'static Self {
10472 static DEFAULT: super::ListOwnedObjectsRequest = super::ListOwnedObjectsRequest::const_default();
10473 &DEFAULT
10474 }
10475 pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
10477 self.owner.as_mut().map(|field| field as _)
10478 }
10479 pub fn owner_mut(&mut self) -> &mut String {
10482 self.owner.get_or_insert_default()
10483 }
10484 pub fn owner_opt(&self) -> Option<&str> {
10486 self.owner.as_ref().map(|field| field as _)
10487 }
10488 pub fn set_owner<T: Into<String>>(&mut self, field: T) {
10490 self.owner = Some(field.into().into());
10491 }
10492 pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
10494 self.set_owner(field.into());
10495 self
10496 }
10497 pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
10499 self.page_size.as_mut().map(|field| field as _)
10500 }
10501 pub fn page_size_mut(&mut self) -> &mut u32 {
10504 self.page_size.get_or_insert_default()
10505 }
10506 pub fn page_size_opt(&self) -> Option<u32> {
10508 self.page_size.as_ref().map(|field| *field)
10509 }
10510 pub fn set_page_size(&mut self, field: u32) {
10512 self.page_size = Some(field);
10513 }
10514 pub fn with_page_size(mut self, field: u32) -> Self {
10516 self.set_page_size(field);
10517 self
10518 }
10519 pub fn page_token_opt(&self) -> Option<&[u8]> {
10521 self.page_token.as_ref().map(|field| field as _)
10522 }
10523 pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10525 self.page_token = Some(field.into().into());
10526 }
10527 pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
10529 mut self,
10530 field: T,
10531 ) -> Self {
10532 self.set_page_token(field.into());
10533 self
10534 }
10535 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
10537 self.read_mask.as_mut().map(|field| field as _)
10538 }
10539 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
10542 self.read_mask.get_or_insert_default()
10543 }
10544 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
10546 self.read_mask.as_ref().map(|field| field as _)
10547 }
10548 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
10550 self.read_mask = Some(field.into().into());
10551 }
10552 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
10554 mut self,
10555 field: T,
10556 ) -> Self {
10557 self.set_read_mask(field.into());
10558 self
10559 }
10560 pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
10562 self.object_type.as_mut().map(|field| field as _)
10563 }
10564 pub fn object_type_mut(&mut self) -> &mut String {
10567 self.object_type.get_or_insert_default()
10568 }
10569 pub fn object_type_opt(&self) -> Option<&str> {
10571 self.object_type.as_ref().map(|field| field as _)
10572 }
10573 pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
10575 self.object_type = Some(field.into().into());
10576 }
10577 pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
10579 self.set_object_type(field.into());
10580 self
10581 }
10582 }
10583 impl super::ListOwnedObjectsResponse {
10584 pub const fn const_default() -> Self {
10585 Self {
10586 objects: Vec::new(),
10587 next_page_token: None,
10588 }
10589 }
10590 #[doc(hidden)]
10591 pub fn default_instance() -> &'static Self {
10592 static DEFAULT: super::ListOwnedObjectsResponse = super::ListOwnedObjectsResponse::const_default();
10593 &DEFAULT
10594 }
10595 pub fn objects(&self) -> &[super::Object] {
10597 &self.objects
10598 }
10599 pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
10602 &mut self.objects
10603 }
10604 pub fn set_objects(&mut self, field: Vec<super::Object>) {
10606 self.objects = field;
10607 }
10608 pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
10610 self.set_objects(field);
10611 self
10612 }
10613 pub fn next_page_token_opt(&self) -> Option<&[u8]> {
10615 self.next_page_token.as_ref().map(|field| field as _)
10616 }
10617 pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10619 self.next_page_token = Some(field.into().into());
10620 }
10621 pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
10623 mut self,
10624 field: T,
10625 ) -> Self {
10626 self.set_next_page_token(field.into());
10627 self
10628 }
10629 }
10630 impl super::ListPackageVersionsRequest {
10631 pub const fn const_default() -> Self {
10632 Self {
10633 package_id: None,
10634 page_size: None,
10635 page_token: None,
10636 }
10637 }
10638 #[doc(hidden)]
10639 pub fn default_instance() -> &'static Self {
10640 static DEFAULT: super::ListPackageVersionsRequest = super::ListPackageVersionsRequest::const_default();
10641 &DEFAULT
10642 }
10643 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
10645 self.package_id.as_mut().map(|field| field as _)
10646 }
10647 pub fn package_id_mut(&mut self) -> &mut String {
10650 self.package_id.get_or_insert_default()
10651 }
10652 pub fn package_id_opt(&self) -> Option<&str> {
10654 self.package_id.as_ref().map(|field| field as _)
10655 }
10656 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
10658 self.package_id = Some(field.into().into());
10659 }
10660 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
10662 self.set_package_id(field.into());
10663 self
10664 }
10665 pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
10667 self.page_size.as_mut().map(|field| field as _)
10668 }
10669 pub fn page_size_mut(&mut self) -> &mut u32 {
10672 self.page_size.get_or_insert_default()
10673 }
10674 pub fn page_size_opt(&self) -> Option<u32> {
10676 self.page_size.as_ref().map(|field| *field)
10677 }
10678 pub fn set_page_size(&mut self, field: u32) {
10680 self.page_size = Some(field);
10681 }
10682 pub fn with_page_size(mut self, field: u32) -> Self {
10684 self.set_page_size(field);
10685 self
10686 }
10687 pub fn page_token_opt(&self) -> Option<&[u8]> {
10689 self.page_token.as_ref().map(|field| field as _)
10690 }
10691 pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10693 self.page_token = Some(field.into().into());
10694 }
10695 pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
10697 mut self,
10698 field: T,
10699 ) -> Self {
10700 self.set_page_token(field.into());
10701 self
10702 }
10703 }
10704 impl super::ListPackageVersionsResponse {
10705 pub const fn const_default() -> Self {
10706 Self {
10707 versions: Vec::new(),
10708 next_page_token: None,
10709 }
10710 }
10711 #[doc(hidden)]
10712 pub fn default_instance() -> &'static Self {
10713 static DEFAULT: super::ListPackageVersionsResponse = super::ListPackageVersionsResponse::const_default();
10714 &DEFAULT
10715 }
10716 pub fn versions(&self) -> &[super::PackageVersion] {
10718 &self.versions
10719 }
10720 pub fn versions_mut(&mut self) -> &mut Vec<super::PackageVersion> {
10723 &mut self.versions
10724 }
10725 pub fn set_versions(&mut self, field: Vec<super::PackageVersion>) {
10727 self.versions = field;
10728 }
10729 pub fn with_versions(mut self, field: Vec<super::PackageVersion>) -> Self {
10731 self.set_versions(field);
10732 self
10733 }
10734 pub fn next_page_token_opt(&self) -> Option<&[u8]> {
10736 self.next_page_token.as_ref().map(|field| field as _)
10737 }
10738 pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10740 self.next_page_token = Some(field.into().into());
10741 }
10742 pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
10744 mut self,
10745 field: T,
10746 ) -> Self {
10747 self.set_next_page_token(field.into());
10748 self
10749 }
10750 }
10751 impl super::ListTransactionsRequest {
10752 pub const fn const_default() -> Self {
10753 Self {
10754 read_mask: None,
10755 start_checkpoint: None,
10756 end_checkpoint: None,
10757 filter: None,
10758 options: None,
10759 }
10760 }
10761 #[doc(hidden)]
10762 pub fn default_instance() -> &'static Self {
10763 static DEFAULT: super::ListTransactionsRequest = super::ListTransactionsRequest::const_default();
10764 &DEFAULT
10765 }
10766 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
10768 self.read_mask.as_mut().map(|field| field as _)
10769 }
10770 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
10773 self.read_mask.get_or_insert_default()
10774 }
10775 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
10777 self.read_mask.as_ref().map(|field| field as _)
10778 }
10779 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
10781 self.read_mask = Some(field.into().into());
10782 }
10783 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
10785 mut self,
10786 field: T,
10787 ) -> Self {
10788 self.set_read_mask(field.into());
10789 self
10790 }
10791 pub fn start_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
10793 self.start_checkpoint.as_mut().map(|field| field as _)
10794 }
10795 pub fn start_checkpoint_mut(&mut self) -> &mut u64 {
10798 self.start_checkpoint.get_or_insert_default()
10799 }
10800 pub fn start_checkpoint_opt(&self) -> Option<u64> {
10802 self.start_checkpoint.as_ref().map(|field| *field)
10803 }
10804 pub fn set_start_checkpoint(&mut self, field: u64) {
10806 self.start_checkpoint = Some(field);
10807 }
10808 pub fn with_start_checkpoint(mut self, field: u64) -> Self {
10810 self.set_start_checkpoint(field);
10811 self
10812 }
10813 pub fn end_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
10815 self.end_checkpoint.as_mut().map(|field| field as _)
10816 }
10817 pub fn end_checkpoint_mut(&mut self) -> &mut u64 {
10820 self.end_checkpoint.get_or_insert_default()
10821 }
10822 pub fn end_checkpoint_opt(&self) -> Option<u64> {
10824 self.end_checkpoint.as_ref().map(|field| *field)
10825 }
10826 pub fn set_end_checkpoint(&mut self, field: u64) {
10828 self.end_checkpoint = Some(field);
10829 }
10830 pub fn with_end_checkpoint(mut self, field: u64) -> Self {
10832 self.set_end_checkpoint(field);
10833 self
10834 }
10835 pub fn filter(&self) -> &super::TransactionFilter {
10837 self.filter
10838 .as_ref()
10839 .map(|field| field as _)
10840 .unwrap_or_else(|| super::TransactionFilter::default_instance() as _)
10841 }
10842 pub fn filter_opt_mut(&mut self) -> Option<&mut super::TransactionFilter> {
10844 self.filter.as_mut().map(|field| field as _)
10845 }
10846 pub fn filter_mut(&mut self) -> &mut super::TransactionFilter {
10849 self.filter.get_or_insert_default()
10850 }
10851 pub fn filter_opt(&self) -> Option<&super::TransactionFilter> {
10853 self.filter.as_ref().map(|field| field as _)
10854 }
10855 pub fn set_filter<T: Into<super::TransactionFilter>>(&mut self, field: T) {
10857 self.filter = Some(field.into().into());
10858 }
10859 pub fn with_filter<T: Into<super::TransactionFilter>>(
10861 mut self,
10862 field: T,
10863 ) -> Self {
10864 self.set_filter(field.into());
10865 self
10866 }
10867 pub fn options(&self) -> &super::QueryOptions {
10869 self.options
10870 .as_ref()
10871 .map(|field| field as _)
10872 .unwrap_or_else(|| super::QueryOptions::default_instance() as _)
10873 }
10874 pub fn options_opt_mut(&mut self) -> Option<&mut super::QueryOptions> {
10876 self.options.as_mut().map(|field| field as _)
10877 }
10878 pub fn options_mut(&mut self) -> &mut super::QueryOptions {
10881 self.options.get_or_insert_default()
10882 }
10883 pub fn options_opt(&self) -> Option<&super::QueryOptions> {
10885 self.options.as_ref().map(|field| field as _)
10886 }
10887 pub fn set_options<T: Into<super::QueryOptions>>(&mut self, field: T) {
10889 self.options = Some(field.into().into());
10890 }
10891 pub fn with_options<T: Into<super::QueryOptions>>(mut self, field: T) -> Self {
10893 self.set_options(field.into());
10894 self
10895 }
10896 }
10897 impl super::ListTransactionsResponse {
10898 pub const fn const_default() -> Self {
10899 Self {
10900 transaction: None,
10901 watermark: None,
10902 end: None,
10903 }
10904 }
10905 #[doc(hidden)]
10906 pub fn default_instance() -> &'static Self {
10907 static DEFAULT: super::ListTransactionsResponse = super::ListTransactionsResponse::const_default();
10908 &DEFAULT
10909 }
10910 pub fn transaction(&self) -> &super::ExecutedTransaction {
10912 self.transaction
10913 .as_ref()
10914 .map(|field| field as _)
10915 .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
10916 }
10917 pub fn transaction_opt_mut(
10919 &mut self,
10920 ) -> Option<&mut super::ExecutedTransaction> {
10921 self.transaction.as_mut().map(|field| field as _)
10922 }
10923 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
10926 self.transaction.get_or_insert_default()
10927 }
10928 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
10930 self.transaction.as_ref().map(|field| field as _)
10931 }
10932 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
10934 &mut self,
10935 field: T,
10936 ) {
10937 self.transaction = Some(field.into().into());
10938 }
10939 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
10941 mut self,
10942 field: T,
10943 ) -> Self {
10944 self.set_transaction(field.into());
10945 self
10946 }
10947 pub fn watermark(&self) -> &super::Watermark {
10949 self.watermark
10950 .as_ref()
10951 .map(|field| field as _)
10952 .unwrap_or_else(|| super::Watermark::default_instance() as _)
10953 }
10954 pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
10956 self.watermark.as_mut().map(|field| field as _)
10957 }
10958 pub fn watermark_mut(&mut self) -> &mut super::Watermark {
10961 self.watermark.get_or_insert_default()
10962 }
10963 pub fn watermark_opt(&self) -> Option<&super::Watermark> {
10965 self.watermark.as_ref().map(|field| field as _)
10966 }
10967 pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
10969 self.watermark = Some(field.into().into());
10970 }
10971 pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
10973 self.set_watermark(field.into());
10974 self
10975 }
10976 pub fn end(&self) -> &super::QueryEnd {
10978 self.end
10979 .as_ref()
10980 .map(|field| field as _)
10981 .unwrap_or_else(|| super::QueryEnd::default_instance() as _)
10982 }
10983 pub fn end_opt_mut(&mut self) -> Option<&mut super::QueryEnd> {
10985 self.end.as_mut().map(|field| field as _)
10986 }
10987 pub fn end_mut(&mut self) -> &mut super::QueryEnd {
10990 self.end.get_or_insert_default()
10991 }
10992 pub fn end_opt(&self) -> Option<&super::QueryEnd> {
10994 self.end.as_ref().map(|field| field as _)
10995 }
10996 pub fn set_end<T: Into<super::QueryEnd>>(&mut self, field: T) {
10998 self.end = Some(field.into().into());
10999 }
11000 pub fn with_end<T: Into<super::QueryEnd>>(mut self, field: T) -> Self {
11002 self.set_end(field.into());
11003 self
11004 }
11005 }
11006 impl super::LookupNameRequest {
11007 pub const fn const_default() -> Self {
11008 Self { name: None }
11009 }
11010 #[doc(hidden)]
11011 pub fn default_instance() -> &'static Self {
11012 static DEFAULT: super::LookupNameRequest = super::LookupNameRequest::const_default();
11013 &DEFAULT
11014 }
11015 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
11017 self.name.as_mut().map(|field| field as _)
11018 }
11019 pub fn name_mut(&mut self) -> &mut String {
11022 self.name.get_or_insert_default()
11023 }
11024 pub fn name_opt(&self) -> Option<&str> {
11026 self.name.as_ref().map(|field| field as _)
11027 }
11028 pub fn set_name<T: Into<String>>(&mut self, field: T) {
11030 self.name = Some(field.into().into());
11031 }
11032 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
11034 self.set_name(field.into());
11035 self
11036 }
11037 }
11038 impl super::LookupNameResponse {
11039 pub const fn const_default() -> Self {
11040 Self { record: None }
11041 }
11042 #[doc(hidden)]
11043 pub fn default_instance() -> &'static Self {
11044 static DEFAULT: super::LookupNameResponse = super::LookupNameResponse::const_default();
11045 &DEFAULT
11046 }
11047 pub fn record(&self) -> &super::NameRecord {
11049 self.record
11050 .as_ref()
11051 .map(|field| field as _)
11052 .unwrap_or_else(|| super::NameRecord::default_instance() as _)
11053 }
11054 pub fn record_opt_mut(&mut self) -> Option<&mut super::NameRecord> {
11056 self.record.as_mut().map(|field| field as _)
11057 }
11058 pub fn record_mut(&mut self) -> &mut super::NameRecord {
11061 self.record.get_or_insert_default()
11062 }
11063 pub fn record_opt(&self) -> Option<&super::NameRecord> {
11065 self.record.as_ref().map(|field| field as _)
11066 }
11067 pub fn set_record<T: Into<super::NameRecord>>(&mut self, field: T) {
11069 self.record = Some(field.into().into());
11070 }
11071 pub fn with_record<T: Into<super::NameRecord>>(mut self, field: T) -> Self {
11073 self.set_record(field.into());
11074 self
11075 }
11076 }
11077 impl super::MakeMoveVector {
11078 pub const fn const_default() -> Self {
11079 Self {
11080 element_type: None,
11081 elements: Vec::new(),
11082 }
11083 }
11084 #[doc(hidden)]
11085 pub fn default_instance() -> &'static Self {
11086 static DEFAULT: super::MakeMoveVector = super::MakeMoveVector::const_default();
11087 &DEFAULT
11088 }
11089 pub fn element_type_opt_mut(&mut self) -> Option<&mut String> {
11091 self.element_type.as_mut().map(|field| field as _)
11092 }
11093 pub fn element_type_mut(&mut self) -> &mut String {
11096 self.element_type.get_or_insert_default()
11097 }
11098 pub fn element_type_opt(&self) -> Option<&str> {
11100 self.element_type.as_ref().map(|field| field as _)
11101 }
11102 pub fn set_element_type<T: Into<String>>(&mut self, field: T) {
11104 self.element_type = Some(field.into().into());
11105 }
11106 pub fn with_element_type<T: Into<String>>(mut self, field: T) -> Self {
11108 self.set_element_type(field.into());
11109 self
11110 }
11111 pub fn elements(&self) -> &[super::Argument] {
11113 &self.elements
11114 }
11115 pub fn elements_mut(&mut self) -> &mut Vec<super::Argument> {
11118 &mut self.elements
11119 }
11120 pub fn set_elements(&mut self, field: Vec<super::Argument>) {
11122 self.elements = field;
11123 }
11124 pub fn with_elements(mut self, field: Vec<super::Argument>) -> Self {
11126 self.set_elements(field);
11127 self
11128 }
11129 }
11130 impl super::MergeCoins {
11131 pub const fn const_default() -> Self {
11132 Self {
11133 coin: None,
11134 coins_to_merge: Vec::new(),
11135 }
11136 }
11137 #[doc(hidden)]
11138 pub fn default_instance() -> &'static Self {
11139 static DEFAULT: super::MergeCoins = super::MergeCoins::const_default();
11140 &DEFAULT
11141 }
11142 pub fn coin(&self) -> &super::Argument {
11144 self.coin
11145 .as_ref()
11146 .map(|field| field as _)
11147 .unwrap_or_else(|| super::Argument::default_instance() as _)
11148 }
11149 pub fn coin_opt_mut(&mut self) -> Option<&mut super::Argument> {
11151 self.coin.as_mut().map(|field| field as _)
11152 }
11153 pub fn coin_mut(&mut self) -> &mut super::Argument {
11156 self.coin.get_or_insert_default()
11157 }
11158 pub fn coin_opt(&self) -> Option<&super::Argument> {
11160 self.coin.as_ref().map(|field| field as _)
11161 }
11162 pub fn set_coin<T: Into<super::Argument>>(&mut self, field: T) {
11164 self.coin = Some(field.into().into());
11165 }
11166 pub fn with_coin<T: Into<super::Argument>>(mut self, field: T) -> Self {
11168 self.set_coin(field.into());
11169 self
11170 }
11171 pub fn coins_to_merge(&self) -> &[super::Argument] {
11173 &self.coins_to_merge
11174 }
11175 pub fn coins_to_merge_mut(&mut self) -> &mut Vec<super::Argument> {
11178 &mut self.coins_to_merge
11179 }
11180 pub fn set_coins_to_merge(&mut self, field: Vec<super::Argument>) {
11182 self.coins_to_merge = field;
11183 }
11184 pub fn with_coins_to_merge(mut self, field: Vec<super::Argument>) -> Self {
11186 self.set_coins_to_merge(field);
11187 self
11188 }
11189 }
11190 impl super::Module {
11191 pub const fn const_default() -> Self {
11192 Self {
11193 name: None,
11194 contents: None,
11195 datatypes: Vec::new(),
11196 functions: Vec::new(),
11197 }
11198 }
11199 #[doc(hidden)]
11200 pub fn default_instance() -> &'static Self {
11201 static DEFAULT: super::Module = super::Module::const_default();
11202 &DEFAULT
11203 }
11204 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
11206 self.name.as_mut().map(|field| field as _)
11207 }
11208 pub fn name_mut(&mut self) -> &mut String {
11211 self.name.get_or_insert_default()
11212 }
11213 pub fn name_opt(&self) -> Option<&str> {
11215 self.name.as_ref().map(|field| field as _)
11216 }
11217 pub fn set_name<T: Into<String>>(&mut self, field: T) {
11219 self.name = Some(field.into().into());
11220 }
11221 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
11223 self.set_name(field.into());
11224 self
11225 }
11226 pub fn contents_opt(&self) -> Option<&[u8]> {
11228 self.contents.as_ref().map(|field| field as _)
11229 }
11230 pub fn set_contents<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
11232 self.contents = Some(field.into().into());
11233 }
11234 pub fn with_contents<T: Into<::prost::bytes::Bytes>>(
11236 mut self,
11237 field: T,
11238 ) -> Self {
11239 self.set_contents(field.into());
11240 self
11241 }
11242 pub fn datatypes(&self) -> &[super::DatatypeDescriptor] {
11244 &self.datatypes
11245 }
11246 pub fn datatypes_mut(&mut self) -> &mut Vec<super::DatatypeDescriptor> {
11249 &mut self.datatypes
11250 }
11251 pub fn set_datatypes(&mut self, field: Vec<super::DatatypeDescriptor>) {
11253 self.datatypes = field;
11254 }
11255 pub fn with_datatypes(mut self, field: Vec<super::DatatypeDescriptor>) -> Self {
11257 self.set_datatypes(field);
11258 self
11259 }
11260 pub fn functions(&self) -> &[super::FunctionDescriptor] {
11262 &self.functions
11263 }
11264 pub fn functions_mut(&mut self) -> &mut Vec<super::FunctionDescriptor> {
11267 &mut self.functions
11268 }
11269 pub fn set_functions(&mut self, field: Vec<super::FunctionDescriptor>) {
11271 self.functions = field;
11272 }
11273 pub fn with_functions(mut self, field: Vec<super::FunctionDescriptor>) -> Self {
11275 self.set_functions(field);
11276 self
11277 }
11278 }
11279 impl super::MoveAbort {
11280 pub const fn const_default() -> Self {
11281 Self {
11282 abort_code: None,
11283 location: None,
11284 clever_error: None,
11285 }
11286 }
11287 #[doc(hidden)]
11288 pub fn default_instance() -> &'static Self {
11289 static DEFAULT: super::MoveAbort = super::MoveAbort::const_default();
11290 &DEFAULT
11291 }
11292 pub fn abort_code_opt_mut(&mut self) -> Option<&mut u64> {
11294 self.abort_code.as_mut().map(|field| field as _)
11295 }
11296 pub fn abort_code_mut(&mut self) -> &mut u64 {
11299 self.abort_code.get_or_insert_default()
11300 }
11301 pub fn abort_code_opt(&self) -> Option<u64> {
11303 self.abort_code.as_ref().map(|field| *field)
11304 }
11305 pub fn set_abort_code(&mut self, field: u64) {
11307 self.abort_code = Some(field);
11308 }
11309 pub fn with_abort_code(mut self, field: u64) -> Self {
11311 self.set_abort_code(field);
11312 self
11313 }
11314 pub fn location(&self) -> &super::MoveLocation {
11316 self.location
11317 .as_ref()
11318 .map(|field| field as _)
11319 .unwrap_or_else(|| super::MoveLocation::default_instance() as _)
11320 }
11321 pub fn location_opt_mut(&mut self) -> Option<&mut super::MoveLocation> {
11323 self.location.as_mut().map(|field| field as _)
11324 }
11325 pub fn location_mut(&mut self) -> &mut super::MoveLocation {
11328 self.location.get_or_insert_default()
11329 }
11330 pub fn location_opt(&self) -> Option<&super::MoveLocation> {
11332 self.location.as_ref().map(|field| field as _)
11333 }
11334 pub fn set_location<T: Into<super::MoveLocation>>(&mut self, field: T) {
11336 self.location = Some(field.into().into());
11337 }
11338 pub fn with_location<T: Into<super::MoveLocation>>(mut self, field: T) -> Self {
11340 self.set_location(field.into());
11341 self
11342 }
11343 pub fn clever_error(&self) -> &super::CleverError {
11345 self.clever_error
11346 .as_ref()
11347 .map(|field| field as _)
11348 .unwrap_or_else(|| super::CleverError::default_instance() as _)
11349 }
11350 pub fn clever_error_opt_mut(&mut self) -> Option<&mut super::CleverError> {
11352 self.clever_error.as_mut().map(|field| field as _)
11353 }
11354 pub fn clever_error_mut(&mut self) -> &mut super::CleverError {
11357 self.clever_error.get_or_insert_default()
11358 }
11359 pub fn clever_error_opt(&self) -> Option<&super::CleverError> {
11361 self.clever_error.as_ref().map(|field| field as _)
11362 }
11363 pub fn set_clever_error<T: Into<super::CleverError>>(&mut self, field: T) {
11365 self.clever_error = Some(field.into().into());
11366 }
11367 pub fn with_clever_error<T: Into<super::CleverError>>(
11369 mut self,
11370 field: T,
11371 ) -> Self {
11372 self.set_clever_error(field.into());
11373 self
11374 }
11375 }
11376 impl super::MoveCall {
11377 pub const fn const_default() -> Self {
11378 Self {
11379 package: None,
11380 module: None,
11381 function: None,
11382 type_arguments: Vec::new(),
11383 arguments: Vec::new(),
11384 }
11385 }
11386 #[doc(hidden)]
11387 pub fn default_instance() -> &'static Self {
11388 static DEFAULT: super::MoveCall = super::MoveCall::const_default();
11389 &DEFAULT
11390 }
11391 pub fn package_opt_mut(&mut self) -> Option<&mut String> {
11393 self.package.as_mut().map(|field| field as _)
11394 }
11395 pub fn package_mut(&mut self) -> &mut String {
11398 self.package.get_or_insert_default()
11399 }
11400 pub fn package_opt(&self) -> Option<&str> {
11402 self.package.as_ref().map(|field| field as _)
11403 }
11404 pub fn set_package<T: Into<String>>(&mut self, field: T) {
11406 self.package = Some(field.into().into());
11407 }
11408 pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
11410 self.set_package(field.into());
11411 self
11412 }
11413 pub fn module_opt_mut(&mut self) -> Option<&mut String> {
11415 self.module.as_mut().map(|field| field as _)
11416 }
11417 pub fn module_mut(&mut self) -> &mut String {
11420 self.module.get_or_insert_default()
11421 }
11422 pub fn module_opt(&self) -> Option<&str> {
11424 self.module.as_ref().map(|field| field as _)
11425 }
11426 pub fn set_module<T: Into<String>>(&mut self, field: T) {
11428 self.module = Some(field.into().into());
11429 }
11430 pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
11432 self.set_module(field.into());
11433 self
11434 }
11435 pub fn function_opt_mut(&mut self) -> Option<&mut String> {
11437 self.function.as_mut().map(|field| field as _)
11438 }
11439 pub fn function_mut(&mut self) -> &mut String {
11442 self.function.get_or_insert_default()
11443 }
11444 pub fn function_opt(&self) -> Option<&str> {
11446 self.function.as_ref().map(|field| field as _)
11447 }
11448 pub fn set_function<T: Into<String>>(&mut self, field: T) {
11450 self.function = Some(field.into().into());
11451 }
11452 pub fn with_function<T: Into<String>>(mut self, field: T) -> Self {
11454 self.set_function(field.into());
11455 self
11456 }
11457 pub fn type_arguments(&self) -> &[String] {
11459 &self.type_arguments
11460 }
11461 pub fn type_arguments_mut(&mut self) -> &mut Vec<String> {
11464 &mut self.type_arguments
11465 }
11466 pub fn set_type_arguments(&mut self, field: Vec<String>) {
11468 self.type_arguments = field;
11469 }
11470 pub fn with_type_arguments(mut self, field: Vec<String>) -> Self {
11472 self.set_type_arguments(field);
11473 self
11474 }
11475 pub fn arguments(&self) -> &[super::Argument] {
11477 &self.arguments
11478 }
11479 pub fn arguments_mut(&mut self) -> &mut Vec<super::Argument> {
11482 &mut self.arguments
11483 }
11484 pub fn set_arguments(&mut self, field: Vec<super::Argument>) {
11486 self.arguments = field;
11487 }
11488 pub fn with_arguments(mut self, field: Vec<super::Argument>) -> Self {
11490 self.set_arguments(field);
11491 self
11492 }
11493 }
11494 impl super::MoveCallFilter {
11495 pub const fn const_default() -> Self {
11496 Self { function: None }
11497 }
11498 #[doc(hidden)]
11499 pub fn default_instance() -> &'static Self {
11500 static DEFAULT: super::MoveCallFilter = super::MoveCallFilter::const_default();
11501 &DEFAULT
11502 }
11503 pub fn function_opt_mut(&mut self) -> Option<&mut String> {
11505 self.function.as_mut().map(|field| field as _)
11506 }
11507 pub fn function_mut(&mut self) -> &mut String {
11510 self.function.get_or_insert_default()
11511 }
11512 pub fn function_opt(&self) -> Option<&str> {
11514 self.function.as_ref().map(|field| field as _)
11515 }
11516 pub fn set_function<T: Into<String>>(&mut self, field: T) {
11518 self.function = Some(field.into().into());
11519 }
11520 pub fn with_function<T: Into<String>>(mut self, field: T) -> Self {
11522 self.set_function(field.into());
11523 self
11524 }
11525 }
11526 impl super::MoveLocation {
11527 pub const fn const_default() -> Self {
11528 Self {
11529 package: None,
11530 module: None,
11531 function: None,
11532 instruction: None,
11533 function_name: None,
11534 }
11535 }
11536 #[doc(hidden)]
11537 pub fn default_instance() -> &'static Self {
11538 static DEFAULT: super::MoveLocation = super::MoveLocation::const_default();
11539 &DEFAULT
11540 }
11541 pub fn package_opt_mut(&mut self) -> Option<&mut String> {
11543 self.package.as_mut().map(|field| field as _)
11544 }
11545 pub fn package_mut(&mut self) -> &mut String {
11548 self.package.get_or_insert_default()
11549 }
11550 pub fn package_opt(&self) -> Option<&str> {
11552 self.package.as_ref().map(|field| field as _)
11553 }
11554 pub fn set_package<T: Into<String>>(&mut self, field: T) {
11556 self.package = Some(field.into().into());
11557 }
11558 pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
11560 self.set_package(field.into());
11561 self
11562 }
11563 pub fn module_opt_mut(&mut self) -> Option<&mut String> {
11565 self.module.as_mut().map(|field| field as _)
11566 }
11567 pub fn module_mut(&mut self) -> &mut String {
11570 self.module.get_or_insert_default()
11571 }
11572 pub fn module_opt(&self) -> Option<&str> {
11574 self.module.as_ref().map(|field| field as _)
11575 }
11576 pub fn set_module<T: Into<String>>(&mut self, field: T) {
11578 self.module = Some(field.into().into());
11579 }
11580 pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
11582 self.set_module(field.into());
11583 self
11584 }
11585 pub fn function_opt_mut(&mut self) -> Option<&mut u32> {
11587 self.function.as_mut().map(|field| field as _)
11588 }
11589 pub fn function_mut(&mut self) -> &mut u32 {
11592 self.function.get_or_insert_default()
11593 }
11594 pub fn function_opt(&self) -> Option<u32> {
11596 self.function.as_ref().map(|field| *field)
11597 }
11598 pub fn set_function(&mut self, field: u32) {
11600 self.function = Some(field);
11601 }
11602 pub fn with_function(mut self, field: u32) -> Self {
11604 self.set_function(field);
11605 self
11606 }
11607 pub fn instruction_opt_mut(&mut self) -> Option<&mut u32> {
11609 self.instruction.as_mut().map(|field| field as _)
11610 }
11611 pub fn instruction_mut(&mut self) -> &mut u32 {
11614 self.instruction.get_or_insert_default()
11615 }
11616 pub fn instruction_opt(&self) -> Option<u32> {
11618 self.instruction.as_ref().map(|field| *field)
11619 }
11620 pub fn set_instruction(&mut self, field: u32) {
11622 self.instruction = Some(field);
11623 }
11624 pub fn with_instruction(mut self, field: u32) -> Self {
11626 self.set_instruction(field);
11627 self
11628 }
11629 pub fn function_name_opt_mut(&mut self) -> Option<&mut String> {
11631 self.function_name.as_mut().map(|field| field as _)
11632 }
11633 pub fn function_name_mut(&mut self) -> &mut String {
11636 self.function_name.get_or_insert_default()
11637 }
11638 pub fn function_name_opt(&self) -> Option<&str> {
11640 self.function_name.as_ref().map(|field| field as _)
11641 }
11642 pub fn set_function_name<T: Into<String>>(&mut self, field: T) {
11644 self.function_name = Some(field.into().into());
11645 }
11646 pub fn with_function_name<T: Into<String>>(mut self, field: T) -> Self {
11648 self.set_function_name(field.into());
11649 self
11650 }
11651 }
11652 impl super::MoveTable {
11653 pub const fn const_default() -> Self {
11654 Self { id: None, size: None }
11655 }
11656 #[doc(hidden)]
11657 pub fn default_instance() -> &'static Self {
11658 static DEFAULT: super::MoveTable = super::MoveTable::const_default();
11659 &DEFAULT
11660 }
11661 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
11663 self.id.as_mut().map(|field| field as _)
11664 }
11665 pub fn id_mut(&mut self) -> &mut String {
11668 self.id.get_or_insert_default()
11669 }
11670 pub fn id_opt(&self) -> Option<&str> {
11672 self.id.as_ref().map(|field| field as _)
11673 }
11674 pub fn set_id<T: Into<String>>(&mut self, field: T) {
11676 self.id = Some(field.into().into());
11677 }
11678 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
11680 self.set_id(field.into());
11681 self
11682 }
11683 pub fn size_opt_mut(&mut self) -> Option<&mut u64> {
11685 self.size.as_mut().map(|field| field as _)
11686 }
11687 pub fn size_mut(&mut self) -> &mut u64 {
11690 self.size.get_or_insert_default()
11691 }
11692 pub fn size_opt(&self) -> Option<u64> {
11694 self.size.as_ref().map(|field| *field)
11695 }
11696 pub fn set_size(&mut self, field: u64) {
11698 self.size = Some(field);
11699 }
11700 pub fn with_size(mut self, field: u64) -> Self {
11702 self.set_size(field);
11703 self
11704 }
11705 }
11706 impl super::MultisigAggregatedSignature {
11707 pub const fn const_default() -> Self {
11708 Self {
11709 signatures: Vec::new(),
11710 bitmap: None,
11711 legacy_bitmap: None,
11712 committee: None,
11713 }
11714 }
11715 #[doc(hidden)]
11716 pub fn default_instance() -> &'static Self {
11717 static DEFAULT: super::MultisigAggregatedSignature = super::MultisigAggregatedSignature::const_default();
11718 &DEFAULT
11719 }
11720 pub fn signatures(&self) -> &[super::MultisigMemberSignature] {
11722 &self.signatures
11723 }
11724 pub fn signatures_mut(&mut self) -> &mut Vec<super::MultisigMemberSignature> {
11727 &mut self.signatures
11728 }
11729 pub fn set_signatures(&mut self, field: Vec<super::MultisigMemberSignature>) {
11731 self.signatures = field;
11732 }
11733 pub fn with_signatures(
11735 mut self,
11736 field: Vec<super::MultisigMemberSignature>,
11737 ) -> Self {
11738 self.set_signatures(field);
11739 self
11740 }
11741 pub fn bitmap_opt_mut(&mut self) -> Option<&mut u32> {
11743 self.bitmap.as_mut().map(|field| field as _)
11744 }
11745 pub fn bitmap_mut(&mut self) -> &mut u32 {
11748 self.bitmap.get_or_insert_default()
11749 }
11750 pub fn bitmap_opt(&self) -> Option<u32> {
11752 self.bitmap.as_ref().map(|field| *field)
11753 }
11754 pub fn set_bitmap(&mut self, field: u32) {
11756 self.bitmap = Some(field);
11757 }
11758 pub fn with_bitmap(mut self, field: u32) -> Self {
11760 self.set_bitmap(field);
11761 self
11762 }
11763 pub fn legacy_bitmap_opt(&self) -> Option<&[u8]> {
11765 self.legacy_bitmap.as_ref().map(|field| field as _)
11766 }
11767 pub fn set_legacy_bitmap<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
11769 self.legacy_bitmap = Some(field.into().into());
11770 }
11771 pub fn with_legacy_bitmap<T: Into<::prost::bytes::Bytes>>(
11773 mut self,
11774 field: T,
11775 ) -> Self {
11776 self.set_legacy_bitmap(field.into());
11777 self
11778 }
11779 pub fn committee(&self) -> &super::MultisigCommittee {
11781 self.committee
11782 .as_ref()
11783 .map(|field| field as _)
11784 .unwrap_or_else(|| super::MultisigCommittee::default_instance() as _)
11785 }
11786 pub fn committee_opt_mut(&mut self) -> Option<&mut super::MultisigCommittee> {
11788 self.committee.as_mut().map(|field| field as _)
11789 }
11790 pub fn committee_mut(&mut self) -> &mut super::MultisigCommittee {
11793 self.committee.get_or_insert_default()
11794 }
11795 pub fn committee_opt(&self) -> Option<&super::MultisigCommittee> {
11797 self.committee.as_ref().map(|field| field as _)
11798 }
11799 pub fn set_committee<T: Into<super::MultisigCommittee>>(&mut self, field: T) {
11801 self.committee = Some(field.into().into());
11802 }
11803 pub fn with_committee<T: Into<super::MultisigCommittee>>(
11805 mut self,
11806 field: T,
11807 ) -> Self {
11808 self.set_committee(field.into());
11809 self
11810 }
11811 }
11812 impl super::MultisigCommittee {
11813 pub const fn const_default() -> Self {
11814 Self {
11815 members: Vec::new(),
11816 threshold: None,
11817 }
11818 }
11819 #[doc(hidden)]
11820 pub fn default_instance() -> &'static Self {
11821 static DEFAULT: super::MultisigCommittee = super::MultisigCommittee::const_default();
11822 &DEFAULT
11823 }
11824 pub fn members(&self) -> &[super::MultisigMember] {
11826 &self.members
11827 }
11828 pub fn members_mut(&mut self) -> &mut Vec<super::MultisigMember> {
11831 &mut self.members
11832 }
11833 pub fn set_members(&mut self, field: Vec<super::MultisigMember>) {
11835 self.members = field;
11836 }
11837 pub fn with_members(mut self, field: Vec<super::MultisigMember>) -> Self {
11839 self.set_members(field);
11840 self
11841 }
11842 pub fn threshold_opt_mut(&mut self) -> Option<&mut u32> {
11844 self.threshold.as_mut().map(|field| field as _)
11845 }
11846 pub fn threshold_mut(&mut self) -> &mut u32 {
11849 self.threshold.get_or_insert_default()
11850 }
11851 pub fn threshold_opt(&self) -> Option<u32> {
11853 self.threshold.as_ref().map(|field| *field)
11854 }
11855 pub fn set_threshold(&mut self, field: u32) {
11857 self.threshold = Some(field);
11858 }
11859 pub fn with_threshold(mut self, field: u32) -> Self {
11861 self.set_threshold(field);
11862 self
11863 }
11864 }
11865 impl super::MultisigMember {
11866 pub const fn const_default() -> Self {
11867 Self {
11868 public_key: None,
11869 weight: None,
11870 }
11871 }
11872 #[doc(hidden)]
11873 pub fn default_instance() -> &'static Self {
11874 static DEFAULT: super::MultisigMember = super::MultisigMember::const_default();
11875 &DEFAULT
11876 }
11877 pub fn public_key(&self) -> &super::MultisigMemberPublicKey {
11879 self.public_key
11880 .as_ref()
11881 .map(|field| field as _)
11882 .unwrap_or_else(|| {
11883 super::MultisigMemberPublicKey::default_instance() as _
11884 })
11885 }
11886 pub fn public_key_opt_mut(
11888 &mut self,
11889 ) -> Option<&mut super::MultisigMemberPublicKey> {
11890 self.public_key.as_mut().map(|field| field as _)
11891 }
11892 pub fn public_key_mut(&mut self) -> &mut super::MultisigMemberPublicKey {
11895 self.public_key.get_or_insert_default()
11896 }
11897 pub fn public_key_opt(&self) -> Option<&super::MultisigMemberPublicKey> {
11899 self.public_key.as_ref().map(|field| field as _)
11900 }
11901 pub fn set_public_key<T: Into<super::MultisigMemberPublicKey>>(
11903 &mut self,
11904 field: T,
11905 ) {
11906 self.public_key = Some(field.into().into());
11907 }
11908 pub fn with_public_key<T: Into<super::MultisigMemberPublicKey>>(
11910 mut self,
11911 field: T,
11912 ) -> Self {
11913 self.set_public_key(field.into());
11914 self
11915 }
11916 pub fn weight_opt_mut(&mut self) -> Option<&mut u32> {
11918 self.weight.as_mut().map(|field| field as _)
11919 }
11920 pub fn weight_mut(&mut self) -> &mut u32 {
11923 self.weight.get_or_insert_default()
11924 }
11925 pub fn weight_opt(&self) -> Option<u32> {
11927 self.weight.as_ref().map(|field| *field)
11928 }
11929 pub fn set_weight(&mut self, field: u32) {
11931 self.weight = Some(field);
11932 }
11933 pub fn with_weight(mut self, field: u32) -> Self {
11935 self.set_weight(field);
11936 self
11937 }
11938 }
11939 impl super::MultisigMemberPublicKey {
11940 pub const fn const_default() -> Self {
11941 Self {
11942 scheme: None,
11943 public_key: None,
11944 zklogin: None,
11945 }
11946 }
11947 #[doc(hidden)]
11948 pub fn default_instance() -> &'static Self {
11949 static DEFAULT: super::MultisigMemberPublicKey = super::MultisigMemberPublicKey::const_default();
11950 &DEFAULT
11951 }
11952 pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
11954 self.set_scheme(field.into());
11955 self
11956 }
11957 pub fn public_key_opt(&self) -> Option<&[u8]> {
11959 self.public_key.as_ref().map(|field| field as _)
11960 }
11961 pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
11963 self.public_key = Some(field.into().into());
11964 }
11965 pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
11967 mut self,
11968 field: T,
11969 ) -> Self {
11970 self.set_public_key(field.into());
11971 self
11972 }
11973 pub fn zklogin(&self) -> &super::ZkLoginPublicIdentifier {
11975 self.zklogin
11976 .as_ref()
11977 .map(|field| field as _)
11978 .unwrap_or_else(|| {
11979 super::ZkLoginPublicIdentifier::default_instance() as _
11980 })
11981 }
11982 pub fn zklogin_opt_mut(
11984 &mut self,
11985 ) -> Option<&mut super::ZkLoginPublicIdentifier> {
11986 self.zklogin.as_mut().map(|field| field as _)
11987 }
11988 pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginPublicIdentifier {
11991 self.zklogin.get_or_insert_default()
11992 }
11993 pub fn zklogin_opt(&self) -> Option<&super::ZkLoginPublicIdentifier> {
11995 self.zklogin.as_ref().map(|field| field as _)
11996 }
11997 pub fn set_zklogin<T: Into<super::ZkLoginPublicIdentifier>>(
11999 &mut self,
12000 field: T,
12001 ) {
12002 self.zklogin = Some(field.into().into());
12003 }
12004 pub fn with_zklogin<T: Into<super::ZkLoginPublicIdentifier>>(
12006 mut self,
12007 field: T,
12008 ) -> Self {
12009 self.set_zklogin(field.into());
12010 self
12011 }
12012 }
12013 impl super::MultisigMemberSignature {
12014 pub const fn const_default() -> Self {
12015 Self {
12016 scheme: None,
12017 signature: None,
12018 zklogin: None,
12019 passkey: None,
12020 }
12021 }
12022 #[doc(hidden)]
12023 pub fn default_instance() -> &'static Self {
12024 static DEFAULT: super::MultisigMemberSignature = super::MultisigMemberSignature::const_default();
12025 &DEFAULT
12026 }
12027 pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
12029 self.set_scheme(field.into());
12030 self
12031 }
12032 pub fn signature_opt(&self) -> Option<&[u8]> {
12034 self.signature.as_ref().map(|field| field as _)
12035 }
12036 pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
12038 self.signature = Some(field.into().into());
12039 }
12040 pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
12042 mut self,
12043 field: T,
12044 ) -> Self {
12045 self.set_signature(field.into());
12046 self
12047 }
12048 pub fn zklogin(&self) -> &super::ZkLoginAuthenticator {
12050 self.zklogin
12051 .as_ref()
12052 .map(|field| field as _)
12053 .unwrap_or_else(|| super::ZkLoginAuthenticator::default_instance() as _)
12054 }
12055 pub fn zklogin_opt_mut(&mut self) -> Option<&mut super::ZkLoginAuthenticator> {
12057 self.zklogin.as_mut().map(|field| field as _)
12058 }
12059 pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginAuthenticator {
12062 self.zklogin.get_or_insert_default()
12063 }
12064 pub fn zklogin_opt(&self) -> Option<&super::ZkLoginAuthenticator> {
12066 self.zklogin.as_ref().map(|field| field as _)
12067 }
12068 pub fn set_zklogin<T: Into<super::ZkLoginAuthenticator>>(&mut self, field: T) {
12070 self.zklogin = Some(field.into().into());
12071 }
12072 pub fn with_zklogin<T: Into<super::ZkLoginAuthenticator>>(
12074 mut self,
12075 field: T,
12076 ) -> Self {
12077 self.set_zklogin(field.into());
12078 self
12079 }
12080 pub fn passkey(&self) -> &super::PasskeyAuthenticator {
12082 self.passkey
12083 .as_ref()
12084 .map(|field| field as _)
12085 .unwrap_or_else(|| super::PasskeyAuthenticator::default_instance() as _)
12086 }
12087 pub fn passkey_opt_mut(&mut self) -> Option<&mut super::PasskeyAuthenticator> {
12089 self.passkey.as_mut().map(|field| field as _)
12090 }
12091 pub fn passkey_mut(&mut self) -> &mut super::PasskeyAuthenticator {
12094 self.passkey.get_or_insert_default()
12095 }
12096 pub fn passkey_opt(&self) -> Option<&super::PasskeyAuthenticator> {
12098 self.passkey.as_ref().map(|field| field as _)
12099 }
12100 pub fn set_passkey<T: Into<super::PasskeyAuthenticator>>(&mut self, field: T) {
12102 self.passkey = Some(field.into().into());
12103 }
12104 pub fn with_passkey<T: Into<super::PasskeyAuthenticator>>(
12106 mut self,
12107 field: T,
12108 ) -> Self {
12109 self.set_passkey(field.into());
12110 self
12111 }
12112 }
12113 impl super::NameRecord {
12114 pub const fn const_default() -> Self {
12115 Self {
12116 id: None,
12117 name: None,
12118 registration_nft_id: None,
12119 expiration_timestamp: None,
12120 target_address: None,
12121 data: std::collections::BTreeMap::new(),
12122 }
12123 }
12124 #[doc(hidden)]
12125 pub fn default_instance() -> &'static Self {
12126 static DEFAULT: super::NameRecord = super::NameRecord::const_default();
12127 &DEFAULT
12128 }
12129 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
12131 self.id.as_mut().map(|field| field as _)
12132 }
12133 pub fn id_mut(&mut self) -> &mut String {
12136 self.id.get_or_insert_default()
12137 }
12138 pub fn id_opt(&self) -> Option<&str> {
12140 self.id.as_ref().map(|field| field as _)
12141 }
12142 pub fn set_id<T: Into<String>>(&mut self, field: T) {
12144 self.id = Some(field.into().into());
12145 }
12146 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
12148 self.set_id(field.into());
12149 self
12150 }
12151 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
12153 self.name.as_mut().map(|field| field as _)
12154 }
12155 pub fn name_mut(&mut self) -> &mut String {
12158 self.name.get_or_insert_default()
12159 }
12160 pub fn name_opt(&self) -> Option<&str> {
12162 self.name.as_ref().map(|field| field as _)
12163 }
12164 pub fn set_name<T: Into<String>>(&mut self, field: T) {
12166 self.name = Some(field.into().into());
12167 }
12168 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
12170 self.set_name(field.into());
12171 self
12172 }
12173 pub fn registration_nft_id_opt_mut(&mut self) -> Option<&mut String> {
12175 self.registration_nft_id.as_mut().map(|field| field as _)
12176 }
12177 pub fn registration_nft_id_mut(&mut self) -> &mut String {
12180 self.registration_nft_id.get_or_insert_default()
12181 }
12182 pub fn registration_nft_id_opt(&self) -> Option<&str> {
12184 self.registration_nft_id.as_ref().map(|field| field as _)
12185 }
12186 pub fn set_registration_nft_id<T: Into<String>>(&mut self, field: T) {
12188 self.registration_nft_id = Some(field.into().into());
12189 }
12190 pub fn with_registration_nft_id<T: Into<String>>(mut self, field: T) -> Self {
12192 self.set_registration_nft_id(field.into());
12193 self
12194 }
12195 pub fn expiration_timestamp_opt_mut(
12197 &mut self,
12198 ) -> Option<&mut ::prost_types::Timestamp> {
12199 self.expiration_timestamp.as_mut().map(|field| field as _)
12200 }
12201 pub fn expiration_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
12204 self.expiration_timestamp.get_or_insert_default()
12205 }
12206 pub fn expiration_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
12208 self.expiration_timestamp.as_ref().map(|field| field as _)
12209 }
12210 pub fn set_expiration_timestamp<T: Into<::prost_types::Timestamp>>(
12212 &mut self,
12213 field: T,
12214 ) {
12215 self.expiration_timestamp = Some(field.into().into());
12216 }
12217 pub fn with_expiration_timestamp<T: Into<::prost_types::Timestamp>>(
12219 mut self,
12220 field: T,
12221 ) -> Self {
12222 self.set_expiration_timestamp(field.into());
12223 self
12224 }
12225 pub fn target_address_opt_mut(&mut self) -> Option<&mut String> {
12227 self.target_address.as_mut().map(|field| field as _)
12228 }
12229 pub fn target_address_mut(&mut self) -> &mut String {
12232 self.target_address.get_or_insert_default()
12233 }
12234 pub fn target_address_opt(&self) -> Option<&str> {
12236 self.target_address.as_ref().map(|field| field as _)
12237 }
12238 pub fn set_target_address<T: Into<String>>(&mut self, field: T) {
12240 self.target_address = Some(field.into().into());
12241 }
12242 pub fn with_target_address<T: Into<String>>(mut self, field: T) -> Self {
12244 self.set_target_address(field.into());
12245 self
12246 }
12247 pub fn data(&self) -> &::std::collections::BTreeMap<String, String> {
12249 &self.data
12250 }
12251 pub fn data_mut(&mut self) -> &mut ::std::collections::BTreeMap<String, String> {
12254 &mut self.data
12255 }
12256 pub fn set_data(&mut self, field: ::std::collections::BTreeMap<String, String>) {
12258 self.data = field;
12259 }
12260 pub fn with_data(
12262 mut self,
12263 field: ::std::collections::BTreeMap<String, String>,
12264 ) -> Self {
12265 self.set_data(field);
12266 self
12267 }
12268 }
12269 impl super::Object {
12270 pub const fn const_default() -> Self {
12271 Self {
12272 bcs: None,
12273 object_id: None,
12274 version: None,
12275 digest: None,
12276 owner: None,
12277 object_type: None,
12278 has_public_transfer: None,
12279 contents: None,
12280 package: None,
12281 previous_transaction: None,
12282 storage_rebate: None,
12283 json: None,
12284 balance: None,
12285 display: None,
12286 }
12287 }
12288 #[doc(hidden)]
12289 pub fn default_instance() -> &'static Self {
12290 static DEFAULT: super::Object = super::Object::const_default();
12291 &DEFAULT
12292 }
12293 pub fn bcs(&self) -> &super::Bcs {
12295 self.bcs
12296 .as_ref()
12297 .map(|field| field as _)
12298 .unwrap_or_else(|| super::Bcs::default_instance() as _)
12299 }
12300 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
12302 self.bcs.as_mut().map(|field| field as _)
12303 }
12304 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
12307 self.bcs.get_or_insert_default()
12308 }
12309 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
12311 self.bcs.as_ref().map(|field| field as _)
12312 }
12313 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
12315 self.bcs = Some(field.into().into());
12316 }
12317 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
12319 self.set_bcs(field.into());
12320 self
12321 }
12322 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
12324 self.object_id.as_mut().map(|field| field as _)
12325 }
12326 pub fn object_id_mut(&mut self) -> &mut String {
12329 self.object_id.get_or_insert_default()
12330 }
12331 pub fn object_id_opt(&self) -> Option<&str> {
12333 self.object_id.as_ref().map(|field| field as _)
12334 }
12335 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
12337 self.object_id = Some(field.into().into());
12338 }
12339 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
12341 self.set_object_id(field.into());
12342 self
12343 }
12344 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
12346 self.version.as_mut().map(|field| field as _)
12347 }
12348 pub fn version_mut(&mut self) -> &mut u64 {
12351 self.version.get_or_insert_default()
12352 }
12353 pub fn version_opt(&self) -> Option<u64> {
12355 self.version.as_ref().map(|field| *field)
12356 }
12357 pub fn set_version(&mut self, field: u64) {
12359 self.version = Some(field);
12360 }
12361 pub fn with_version(mut self, field: u64) -> Self {
12363 self.set_version(field);
12364 self
12365 }
12366 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
12368 self.digest.as_mut().map(|field| field as _)
12369 }
12370 pub fn digest_mut(&mut self) -> &mut String {
12373 self.digest.get_or_insert_default()
12374 }
12375 pub fn digest_opt(&self) -> Option<&str> {
12377 self.digest.as_ref().map(|field| field as _)
12378 }
12379 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
12381 self.digest = Some(field.into().into());
12382 }
12383 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
12385 self.set_digest(field.into());
12386 self
12387 }
12388 pub fn owner(&self) -> &super::Owner {
12390 self.owner
12391 .as_ref()
12392 .map(|field| field as _)
12393 .unwrap_or_else(|| super::Owner::default_instance() as _)
12394 }
12395 pub fn owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
12397 self.owner.as_mut().map(|field| field as _)
12398 }
12399 pub fn owner_mut(&mut self) -> &mut super::Owner {
12402 self.owner.get_or_insert_default()
12403 }
12404 pub fn owner_opt(&self) -> Option<&super::Owner> {
12406 self.owner.as_ref().map(|field| field as _)
12407 }
12408 pub fn set_owner<T: Into<super::Owner>>(&mut self, field: T) {
12410 self.owner = Some(field.into().into());
12411 }
12412 pub fn with_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
12414 self.set_owner(field.into());
12415 self
12416 }
12417 pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
12419 self.object_type.as_mut().map(|field| field as _)
12420 }
12421 pub fn object_type_mut(&mut self) -> &mut String {
12424 self.object_type.get_or_insert_default()
12425 }
12426 pub fn object_type_opt(&self) -> Option<&str> {
12428 self.object_type.as_ref().map(|field| field as _)
12429 }
12430 pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
12432 self.object_type = Some(field.into().into());
12433 }
12434 pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
12436 self.set_object_type(field.into());
12437 self
12438 }
12439 pub fn has_public_transfer_opt_mut(&mut self) -> Option<&mut bool> {
12441 self.has_public_transfer.as_mut().map(|field| field as _)
12442 }
12443 pub fn has_public_transfer_mut(&mut self) -> &mut bool {
12446 self.has_public_transfer.get_or_insert_default()
12447 }
12448 pub fn has_public_transfer_opt(&self) -> Option<bool> {
12450 self.has_public_transfer.as_ref().map(|field| *field)
12451 }
12452 pub fn set_has_public_transfer(&mut self, field: bool) {
12454 self.has_public_transfer = Some(field);
12455 }
12456 pub fn with_has_public_transfer(mut self, field: bool) -> Self {
12458 self.set_has_public_transfer(field);
12459 self
12460 }
12461 pub fn contents(&self) -> &super::Bcs {
12463 self.contents
12464 .as_ref()
12465 .map(|field| field as _)
12466 .unwrap_or_else(|| super::Bcs::default_instance() as _)
12467 }
12468 pub fn contents_opt_mut(&mut self) -> Option<&mut super::Bcs> {
12470 self.contents.as_mut().map(|field| field as _)
12471 }
12472 pub fn contents_mut(&mut self) -> &mut super::Bcs {
12475 self.contents.get_or_insert_default()
12476 }
12477 pub fn contents_opt(&self) -> Option<&super::Bcs> {
12479 self.contents.as_ref().map(|field| field as _)
12480 }
12481 pub fn set_contents<T: Into<super::Bcs>>(&mut self, field: T) {
12483 self.contents = Some(field.into().into());
12484 }
12485 pub fn with_contents<T: Into<super::Bcs>>(mut self, field: T) -> Self {
12487 self.set_contents(field.into());
12488 self
12489 }
12490 pub fn package(&self) -> &super::Package {
12492 self.package
12493 .as_ref()
12494 .map(|field| field as _)
12495 .unwrap_or_else(|| super::Package::default_instance() as _)
12496 }
12497 pub fn package_opt_mut(&mut self) -> Option<&mut super::Package> {
12499 self.package.as_mut().map(|field| field as _)
12500 }
12501 pub fn package_mut(&mut self) -> &mut super::Package {
12504 self.package.get_or_insert_default()
12505 }
12506 pub fn package_opt(&self) -> Option<&super::Package> {
12508 self.package.as_ref().map(|field| field as _)
12509 }
12510 pub fn set_package<T: Into<super::Package>>(&mut self, field: T) {
12512 self.package = Some(field.into().into());
12513 }
12514 pub fn with_package<T: Into<super::Package>>(mut self, field: T) -> Self {
12516 self.set_package(field.into());
12517 self
12518 }
12519 pub fn previous_transaction_opt_mut(&mut self) -> Option<&mut String> {
12521 self.previous_transaction.as_mut().map(|field| field as _)
12522 }
12523 pub fn previous_transaction_mut(&mut self) -> &mut String {
12526 self.previous_transaction.get_or_insert_default()
12527 }
12528 pub fn previous_transaction_opt(&self) -> Option<&str> {
12530 self.previous_transaction.as_ref().map(|field| field as _)
12531 }
12532 pub fn set_previous_transaction<T: Into<String>>(&mut self, field: T) {
12534 self.previous_transaction = Some(field.into().into());
12535 }
12536 pub fn with_previous_transaction<T: Into<String>>(mut self, field: T) -> Self {
12538 self.set_previous_transaction(field.into());
12539 self
12540 }
12541 pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
12543 self.storage_rebate.as_mut().map(|field| field as _)
12544 }
12545 pub fn storage_rebate_mut(&mut self) -> &mut u64 {
12548 self.storage_rebate.get_or_insert_default()
12549 }
12550 pub fn storage_rebate_opt(&self) -> Option<u64> {
12552 self.storage_rebate.as_ref().map(|field| *field)
12553 }
12554 pub fn set_storage_rebate(&mut self, field: u64) {
12556 self.storage_rebate = Some(field);
12557 }
12558 pub fn with_storage_rebate(mut self, field: u64) -> Self {
12560 self.set_storage_rebate(field);
12561 self
12562 }
12563 pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
12565 self.json.as_mut().map(|field| field as _)
12566 }
12567 pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
12570 self.json.get_or_insert_default()
12571 }
12572 pub fn json_opt(&self) -> Option<&::prost_types::Value> {
12574 self.json.as_ref().map(|field| field as _)
12575 }
12576 pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
12578 self.json = Some(field.into().into());
12579 }
12580 pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
12582 self.set_json(field.into());
12583 self
12584 }
12585 pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
12587 self.balance.as_mut().map(|field| field as _)
12588 }
12589 pub fn balance_mut(&mut self) -> &mut u64 {
12592 self.balance.get_or_insert_default()
12593 }
12594 pub fn balance_opt(&self) -> Option<u64> {
12596 self.balance.as_ref().map(|field| *field)
12597 }
12598 pub fn set_balance(&mut self, field: u64) {
12600 self.balance = Some(field);
12601 }
12602 pub fn with_balance(mut self, field: u64) -> Self {
12604 self.set_balance(field);
12605 self
12606 }
12607 pub fn display(&self) -> &super::Display {
12609 self.display
12610 .as_ref()
12611 .map(|field| field as _)
12612 .unwrap_or_else(|| super::Display::default_instance() as _)
12613 }
12614 pub fn display_opt_mut(&mut self) -> Option<&mut super::Display> {
12616 self.display.as_mut().map(|field| field as _)
12617 }
12618 pub fn display_mut(&mut self) -> &mut super::Display {
12621 self.display.get_or_insert_default()
12622 }
12623 pub fn display_opt(&self) -> Option<&super::Display> {
12625 self.display.as_ref().map(|field| field as _)
12626 }
12627 pub fn set_display<T: Into<super::Display>>(&mut self, field: T) {
12629 self.display = Some(field.into().into());
12630 }
12631 pub fn with_display<T: Into<super::Display>>(mut self, field: T) -> Self {
12633 self.set_display(field.into());
12634 self
12635 }
12636 }
12637 impl super::ObjectReference {
12638 pub const fn const_default() -> Self {
12639 Self {
12640 object_id: None,
12641 version: None,
12642 digest: None,
12643 }
12644 }
12645 #[doc(hidden)]
12646 pub fn default_instance() -> &'static Self {
12647 static DEFAULT: super::ObjectReference = super::ObjectReference::const_default();
12648 &DEFAULT
12649 }
12650 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
12652 self.object_id.as_mut().map(|field| field as _)
12653 }
12654 pub fn object_id_mut(&mut self) -> &mut String {
12657 self.object_id.get_or_insert_default()
12658 }
12659 pub fn object_id_opt(&self) -> Option<&str> {
12661 self.object_id.as_ref().map(|field| field as _)
12662 }
12663 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
12665 self.object_id = Some(field.into().into());
12666 }
12667 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
12669 self.set_object_id(field.into());
12670 self
12671 }
12672 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
12674 self.version.as_mut().map(|field| field as _)
12675 }
12676 pub fn version_mut(&mut self) -> &mut u64 {
12679 self.version.get_or_insert_default()
12680 }
12681 pub fn version_opt(&self) -> Option<u64> {
12683 self.version.as_ref().map(|field| *field)
12684 }
12685 pub fn set_version(&mut self, field: u64) {
12687 self.version = Some(field);
12688 }
12689 pub fn with_version(mut self, field: u64) -> Self {
12691 self.set_version(field);
12692 self
12693 }
12694 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
12696 self.digest.as_mut().map(|field| field as _)
12697 }
12698 pub fn digest_mut(&mut self) -> &mut String {
12701 self.digest.get_or_insert_default()
12702 }
12703 pub fn digest_opt(&self) -> Option<&str> {
12705 self.digest.as_ref().map(|field| field as _)
12706 }
12707 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
12709 self.digest = Some(field.into().into());
12710 }
12711 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
12713 self.set_digest(field.into());
12714 self
12715 }
12716 }
12717 impl super::ObjectSet {
12718 pub const fn const_default() -> Self {
12719 Self { objects: Vec::new() }
12720 }
12721 #[doc(hidden)]
12722 pub fn default_instance() -> &'static Self {
12723 static DEFAULT: super::ObjectSet = super::ObjectSet::const_default();
12724 &DEFAULT
12725 }
12726 pub fn objects(&self) -> &[super::Object] {
12728 &self.objects
12729 }
12730 pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
12733 &mut self.objects
12734 }
12735 pub fn set_objects(&mut self, field: Vec<super::Object>) {
12737 self.objects = field;
12738 }
12739 pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
12741 self.set_objects(field);
12742 self
12743 }
12744 }
12745 impl super::OpenSignature {
12746 pub const fn const_default() -> Self {
12747 Self {
12748 reference: None,
12749 body: None,
12750 }
12751 }
12752 #[doc(hidden)]
12753 pub fn default_instance() -> &'static Self {
12754 static DEFAULT: super::OpenSignature = super::OpenSignature::const_default();
12755 &DEFAULT
12756 }
12757 pub fn with_reference<T: Into<super::open_signature::Reference>>(
12759 mut self,
12760 field: T,
12761 ) -> Self {
12762 self.set_reference(field.into());
12763 self
12764 }
12765 pub fn body(&self) -> &super::OpenSignatureBody {
12767 self.body
12768 .as_ref()
12769 .map(|field| field as _)
12770 .unwrap_or_else(|| super::OpenSignatureBody::default_instance() as _)
12771 }
12772 pub fn body_opt_mut(&mut self) -> Option<&mut super::OpenSignatureBody> {
12774 self.body.as_mut().map(|field| field as _)
12775 }
12776 pub fn body_mut(&mut self) -> &mut super::OpenSignatureBody {
12779 self.body.get_or_insert_default()
12780 }
12781 pub fn body_opt(&self) -> Option<&super::OpenSignatureBody> {
12783 self.body.as_ref().map(|field| field as _)
12784 }
12785 pub fn set_body<T: Into<super::OpenSignatureBody>>(&mut self, field: T) {
12787 self.body = Some(field.into().into());
12788 }
12789 pub fn with_body<T: Into<super::OpenSignatureBody>>(mut self, field: T) -> Self {
12791 self.set_body(field.into());
12792 self
12793 }
12794 }
12795 impl super::OpenSignatureBody {
12796 pub const fn const_default() -> Self {
12797 Self {
12798 r#type: None,
12799 type_name: None,
12800 type_parameter_instantiation: Vec::new(),
12801 type_parameter: None,
12802 }
12803 }
12804 #[doc(hidden)]
12805 pub fn default_instance() -> &'static Self {
12806 static DEFAULT: super::OpenSignatureBody = super::OpenSignatureBody::const_default();
12807 &DEFAULT
12808 }
12809 pub fn with_type<T: Into<super::open_signature_body::Type>>(
12811 mut self,
12812 field: T,
12813 ) -> Self {
12814 self.set_type(field.into());
12815 self
12816 }
12817 pub fn type_name_opt_mut(&mut self) -> Option<&mut String> {
12819 self.type_name.as_mut().map(|field| field as _)
12820 }
12821 pub fn type_name_mut(&mut self) -> &mut String {
12824 self.type_name.get_or_insert_default()
12825 }
12826 pub fn type_name_opt(&self) -> Option<&str> {
12828 self.type_name.as_ref().map(|field| field as _)
12829 }
12830 pub fn set_type_name<T: Into<String>>(&mut self, field: T) {
12832 self.type_name = Some(field.into().into());
12833 }
12834 pub fn with_type_name<T: Into<String>>(mut self, field: T) -> Self {
12836 self.set_type_name(field.into());
12837 self
12838 }
12839 pub fn type_parameter_instantiation(&self) -> &[super::OpenSignatureBody] {
12841 &self.type_parameter_instantiation
12842 }
12843 pub fn type_parameter_instantiation_mut(
12846 &mut self,
12847 ) -> &mut Vec<super::OpenSignatureBody> {
12848 &mut self.type_parameter_instantiation
12849 }
12850 pub fn set_type_parameter_instantiation(
12852 &mut self,
12853 field: Vec<super::OpenSignatureBody>,
12854 ) {
12855 self.type_parameter_instantiation = field;
12856 }
12857 pub fn with_type_parameter_instantiation(
12859 mut self,
12860 field: Vec<super::OpenSignatureBody>,
12861 ) -> Self {
12862 self.set_type_parameter_instantiation(field);
12863 self
12864 }
12865 pub fn type_parameter_opt_mut(&mut self) -> Option<&mut u32> {
12867 self.type_parameter.as_mut().map(|field| field as _)
12868 }
12869 pub fn type_parameter_mut(&mut self) -> &mut u32 {
12872 self.type_parameter.get_or_insert_default()
12873 }
12874 pub fn type_parameter_opt(&self) -> Option<u32> {
12876 self.type_parameter.as_ref().map(|field| *field)
12877 }
12878 pub fn set_type_parameter(&mut self, field: u32) {
12880 self.type_parameter = Some(field);
12881 }
12882 pub fn with_type_parameter(mut self, field: u32) -> Self {
12884 self.set_type_parameter(field);
12885 self
12886 }
12887 }
12888 impl super::Owner {
12889 pub const fn const_default() -> Self {
12890 Self {
12891 kind: None,
12892 address: None,
12893 version: None,
12894 }
12895 }
12896 #[doc(hidden)]
12897 pub fn default_instance() -> &'static Self {
12898 static DEFAULT: super::Owner = super::Owner::const_default();
12899 &DEFAULT
12900 }
12901 pub fn with_kind<T: Into<super::owner::OwnerKind>>(mut self, field: T) -> Self {
12903 self.set_kind(field.into());
12904 self
12905 }
12906 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
12908 self.address.as_mut().map(|field| field as _)
12909 }
12910 pub fn address_mut(&mut self) -> &mut String {
12913 self.address.get_or_insert_default()
12914 }
12915 pub fn address_opt(&self) -> Option<&str> {
12917 self.address.as_ref().map(|field| field as _)
12918 }
12919 pub fn set_address<T: Into<String>>(&mut self, field: T) {
12921 self.address = Some(field.into().into());
12922 }
12923 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
12925 self.set_address(field.into());
12926 self
12927 }
12928 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
12930 self.version.as_mut().map(|field| field as _)
12931 }
12932 pub fn version_mut(&mut self) -> &mut u64 {
12935 self.version.get_or_insert_default()
12936 }
12937 pub fn version_opt(&self) -> Option<u64> {
12939 self.version.as_ref().map(|field| *field)
12940 }
12941 pub fn set_version(&mut self, field: u64) {
12943 self.version = Some(field);
12944 }
12945 pub fn with_version(mut self, field: u64) -> Self {
12947 self.set_version(field);
12948 self
12949 }
12950 }
12951 impl super::Package {
12952 pub const fn const_default() -> Self {
12953 Self {
12954 storage_id: None,
12955 original_id: None,
12956 version: None,
12957 modules: Vec::new(),
12958 type_origins: Vec::new(),
12959 linkage: Vec::new(),
12960 }
12961 }
12962 #[doc(hidden)]
12963 pub fn default_instance() -> &'static Self {
12964 static DEFAULT: super::Package = super::Package::const_default();
12965 &DEFAULT
12966 }
12967 pub fn storage_id_opt_mut(&mut self) -> Option<&mut String> {
12969 self.storage_id.as_mut().map(|field| field as _)
12970 }
12971 pub fn storage_id_mut(&mut self) -> &mut String {
12974 self.storage_id.get_or_insert_default()
12975 }
12976 pub fn storage_id_opt(&self) -> Option<&str> {
12978 self.storage_id.as_ref().map(|field| field as _)
12979 }
12980 pub fn set_storage_id<T: Into<String>>(&mut self, field: T) {
12982 self.storage_id = Some(field.into().into());
12983 }
12984 pub fn with_storage_id<T: Into<String>>(mut self, field: T) -> Self {
12986 self.set_storage_id(field.into());
12987 self
12988 }
12989 pub fn original_id_opt_mut(&mut self) -> Option<&mut String> {
12991 self.original_id.as_mut().map(|field| field as _)
12992 }
12993 pub fn original_id_mut(&mut self) -> &mut String {
12996 self.original_id.get_or_insert_default()
12997 }
12998 pub fn original_id_opt(&self) -> Option<&str> {
13000 self.original_id.as_ref().map(|field| field as _)
13001 }
13002 pub fn set_original_id<T: Into<String>>(&mut self, field: T) {
13004 self.original_id = Some(field.into().into());
13005 }
13006 pub fn with_original_id<T: Into<String>>(mut self, field: T) -> Self {
13008 self.set_original_id(field.into());
13009 self
13010 }
13011 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
13013 self.version.as_mut().map(|field| field as _)
13014 }
13015 pub fn version_mut(&mut self) -> &mut u64 {
13018 self.version.get_or_insert_default()
13019 }
13020 pub fn version_opt(&self) -> Option<u64> {
13022 self.version.as_ref().map(|field| *field)
13023 }
13024 pub fn set_version(&mut self, field: u64) {
13026 self.version = Some(field);
13027 }
13028 pub fn with_version(mut self, field: u64) -> Self {
13030 self.set_version(field);
13031 self
13032 }
13033 pub fn modules(&self) -> &[super::Module] {
13035 &self.modules
13036 }
13037 pub fn modules_mut(&mut self) -> &mut Vec<super::Module> {
13040 &mut self.modules
13041 }
13042 pub fn set_modules(&mut self, field: Vec<super::Module>) {
13044 self.modules = field;
13045 }
13046 pub fn with_modules(mut self, field: Vec<super::Module>) -> Self {
13048 self.set_modules(field);
13049 self
13050 }
13051 pub fn type_origins(&self) -> &[super::TypeOrigin] {
13053 &self.type_origins
13054 }
13055 pub fn type_origins_mut(&mut self) -> &mut Vec<super::TypeOrigin> {
13058 &mut self.type_origins
13059 }
13060 pub fn set_type_origins(&mut self, field: Vec<super::TypeOrigin>) {
13062 self.type_origins = field;
13063 }
13064 pub fn with_type_origins(mut self, field: Vec<super::TypeOrigin>) -> Self {
13066 self.set_type_origins(field);
13067 self
13068 }
13069 pub fn linkage(&self) -> &[super::Linkage] {
13071 &self.linkage
13072 }
13073 pub fn linkage_mut(&mut self) -> &mut Vec<super::Linkage> {
13076 &mut self.linkage
13077 }
13078 pub fn set_linkage(&mut self, field: Vec<super::Linkage>) {
13080 self.linkage = field;
13081 }
13082 pub fn with_linkage(mut self, field: Vec<super::Linkage>) -> Self {
13084 self.set_linkage(field);
13085 self
13086 }
13087 }
13088 impl super::PackageUpgradeError {
13089 pub const fn const_default() -> Self {
13090 Self {
13091 kind: None,
13092 package_id: None,
13093 digest: None,
13094 policy: None,
13095 ticket_id: None,
13096 }
13097 }
13098 #[doc(hidden)]
13099 pub fn default_instance() -> &'static Self {
13100 static DEFAULT: super::PackageUpgradeError = super::PackageUpgradeError::const_default();
13101 &DEFAULT
13102 }
13103 pub fn with_kind<T: Into<super::package_upgrade_error::PackageUpgradeErrorKind>>(
13105 mut self,
13106 field: T,
13107 ) -> Self {
13108 self.set_kind(field.into());
13109 self
13110 }
13111 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
13113 self.package_id.as_mut().map(|field| field as _)
13114 }
13115 pub fn package_id_mut(&mut self) -> &mut String {
13118 self.package_id.get_or_insert_default()
13119 }
13120 pub fn package_id_opt(&self) -> Option<&str> {
13122 self.package_id.as_ref().map(|field| field as _)
13123 }
13124 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
13126 self.package_id = Some(field.into().into());
13127 }
13128 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
13130 self.set_package_id(field.into());
13131 self
13132 }
13133 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
13135 self.digest.as_mut().map(|field| field as _)
13136 }
13137 pub fn digest_mut(&mut self) -> &mut String {
13140 self.digest.get_or_insert_default()
13141 }
13142 pub fn digest_opt(&self) -> Option<&str> {
13144 self.digest.as_ref().map(|field| field as _)
13145 }
13146 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
13148 self.digest = Some(field.into().into());
13149 }
13150 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
13152 self.set_digest(field.into());
13153 self
13154 }
13155 pub fn policy_opt_mut(&mut self) -> Option<&mut u32> {
13157 self.policy.as_mut().map(|field| field as _)
13158 }
13159 pub fn policy_mut(&mut self) -> &mut u32 {
13162 self.policy.get_or_insert_default()
13163 }
13164 pub fn policy_opt(&self) -> Option<u32> {
13166 self.policy.as_ref().map(|field| *field)
13167 }
13168 pub fn set_policy(&mut self, field: u32) {
13170 self.policy = Some(field);
13171 }
13172 pub fn with_policy(mut self, field: u32) -> Self {
13174 self.set_policy(field);
13175 self
13176 }
13177 pub fn ticket_id_opt_mut(&mut self) -> Option<&mut String> {
13179 self.ticket_id.as_mut().map(|field| field as _)
13180 }
13181 pub fn ticket_id_mut(&mut self) -> &mut String {
13184 self.ticket_id.get_or_insert_default()
13185 }
13186 pub fn ticket_id_opt(&self) -> Option<&str> {
13188 self.ticket_id.as_ref().map(|field| field as _)
13189 }
13190 pub fn set_ticket_id<T: Into<String>>(&mut self, field: T) {
13192 self.ticket_id = Some(field.into().into());
13193 }
13194 pub fn with_ticket_id<T: Into<String>>(mut self, field: T) -> Self {
13196 self.set_ticket_id(field.into());
13197 self
13198 }
13199 }
13200 impl super::PackageVersion {
13201 pub const fn const_default() -> Self {
13202 Self {
13203 package_id: None,
13204 version: None,
13205 }
13206 }
13207 #[doc(hidden)]
13208 pub fn default_instance() -> &'static Self {
13209 static DEFAULT: super::PackageVersion = super::PackageVersion::const_default();
13210 &DEFAULT
13211 }
13212 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
13214 self.package_id.as_mut().map(|field| field as _)
13215 }
13216 pub fn package_id_mut(&mut self) -> &mut String {
13219 self.package_id.get_or_insert_default()
13220 }
13221 pub fn package_id_opt(&self) -> Option<&str> {
13223 self.package_id.as_ref().map(|field| field as _)
13224 }
13225 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
13227 self.package_id = Some(field.into().into());
13228 }
13229 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
13231 self.set_package_id(field.into());
13232 self
13233 }
13234 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
13236 self.version.as_mut().map(|field| field as _)
13237 }
13238 pub fn version_mut(&mut self) -> &mut u64 {
13241 self.version.get_or_insert_default()
13242 }
13243 pub fn version_opt(&self) -> Option<u64> {
13245 self.version.as_ref().map(|field| *field)
13246 }
13247 pub fn set_version(&mut self, field: u64) {
13249 self.version = Some(field);
13250 }
13251 pub fn with_version(mut self, field: u64) -> Self {
13253 self.set_version(field);
13254 self
13255 }
13256 }
13257 impl super::PackageWriteFilter {
13258 pub const fn const_default() -> Self {
13259 Self {}
13260 }
13261 #[doc(hidden)]
13262 pub fn default_instance() -> &'static Self {
13263 static DEFAULT: super::PackageWriteFilter = super::PackageWriteFilter::const_default();
13264 &DEFAULT
13265 }
13266 }
13267 impl super::PasskeyAuthenticator {
13268 pub const fn const_default() -> Self {
13269 Self {
13270 authenticator_data: None,
13271 client_data_json: None,
13272 signature: None,
13273 }
13274 }
13275 #[doc(hidden)]
13276 pub fn default_instance() -> &'static Self {
13277 static DEFAULT: super::PasskeyAuthenticator = super::PasskeyAuthenticator::const_default();
13278 &DEFAULT
13279 }
13280 pub fn authenticator_data_opt(&self) -> Option<&[u8]> {
13282 self.authenticator_data.as_ref().map(|field| field as _)
13283 }
13284 pub fn set_authenticator_data<T: Into<::prost::bytes::Bytes>>(
13286 &mut self,
13287 field: T,
13288 ) {
13289 self.authenticator_data = Some(field.into().into());
13290 }
13291 pub fn with_authenticator_data<T: Into<::prost::bytes::Bytes>>(
13293 mut self,
13294 field: T,
13295 ) -> Self {
13296 self.set_authenticator_data(field.into());
13297 self
13298 }
13299 pub fn client_data_json_opt_mut(&mut self) -> Option<&mut String> {
13301 self.client_data_json.as_mut().map(|field| field as _)
13302 }
13303 pub fn client_data_json_mut(&mut self) -> &mut String {
13306 self.client_data_json.get_or_insert_default()
13307 }
13308 pub fn client_data_json_opt(&self) -> Option<&str> {
13310 self.client_data_json.as_ref().map(|field| field as _)
13311 }
13312 pub fn set_client_data_json<T: Into<String>>(&mut self, field: T) {
13314 self.client_data_json = Some(field.into().into());
13315 }
13316 pub fn with_client_data_json<T: Into<String>>(mut self, field: T) -> Self {
13318 self.set_client_data_json(field.into());
13319 self
13320 }
13321 pub fn signature(&self) -> &super::SimpleSignature {
13323 self.signature
13324 .as_ref()
13325 .map(|field| field as _)
13326 .unwrap_or_else(|| super::SimpleSignature::default_instance() as _)
13327 }
13328 pub fn signature_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
13330 self.signature.as_mut().map(|field| field as _)
13331 }
13332 pub fn signature_mut(&mut self) -> &mut super::SimpleSignature {
13335 self.signature.get_or_insert_default()
13336 }
13337 pub fn signature_opt(&self) -> Option<&super::SimpleSignature> {
13339 self.signature.as_ref().map(|field| field as _)
13340 }
13341 pub fn set_signature<T: Into<super::SimpleSignature>>(&mut self, field: T) {
13343 self.signature = Some(field.into().into());
13344 }
13345 pub fn with_signature<T: Into<super::SimpleSignature>>(
13347 mut self,
13348 field: T,
13349 ) -> Self {
13350 self.set_signature(field.into());
13351 self
13352 }
13353 }
13354 impl super::ProgrammableTransaction {
13355 pub const fn const_default() -> Self {
13356 Self {
13357 inputs: Vec::new(),
13358 commands: Vec::new(),
13359 }
13360 }
13361 #[doc(hidden)]
13362 pub fn default_instance() -> &'static Self {
13363 static DEFAULT: super::ProgrammableTransaction = super::ProgrammableTransaction::const_default();
13364 &DEFAULT
13365 }
13366 pub fn inputs(&self) -> &[super::Input] {
13368 &self.inputs
13369 }
13370 pub fn inputs_mut(&mut self) -> &mut Vec<super::Input> {
13373 &mut self.inputs
13374 }
13375 pub fn set_inputs(&mut self, field: Vec<super::Input>) {
13377 self.inputs = field;
13378 }
13379 pub fn with_inputs(mut self, field: Vec<super::Input>) -> Self {
13381 self.set_inputs(field);
13382 self
13383 }
13384 pub fn commands(&self) -> &[super::Command] {
13386 &self.commands
13387 }
13388 pub fn commands_mut(&mut self) -> &mut Vec<super::Command> {
13391 &mut self.commands
13392 }
13393 pub fn set_commands(&mut self, field: Vec<super::Command>) {
13395 self.commands = field;
13396 }
13397 pub fn with_commands(mut self, field: Vec<super::Command>) -> Self {
13399 self.set_commands(field);
13400 self
13401 }
13402 }
13403 impl super::ProtocolConfig {
13404 pub const fn const_default() -> Self {
13405 Self {
13406 protocol_version: None,
13407 feature_flags: std::collections::BTreeMap::new(),
13408 attributes: std::collections::BTreeMap::new(),
13409 configs: std::collections::BTreeMap::new(),
13410 }
13411 }
13412 #[doc(hidden)]
13413 pub fn default_instance() -> &'static Self {
13414 static DEFAULT: super::ProtocolConfig = super::ProtocolConfig::const_default();
13415 &DEFAULT
13416 }
13417 pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
13419 self.protocol_version.as_mut().map(|field| field as _)
13420 }
13421 pub fn protocol_version_mut(&mut self) -> &mut u64 {
13424 self.protocol_version.get_or_insert_default()
13425 }
13426 pub fn protocol_version_opt(&self) -> Option<u64> {
13428 self.protocol_version.as_ref().map(|field| *field)
13429 }
13430 pub fn set_protocol_version(&mut self, field: u64) {
13432 self.protocol_version = Some(field);
13433 }
13434 pub fn with_protocol_version(mut self, field: u64) -> Self {
13436 self.set_protocol_version(field);
13437 self
13438 }
13439 pub fn feature_flags(&self) -> &::std::collections::BTreeMap<String, bool> {
13441 &self.feature_flags
13442 }
13443 pub fn feature_flags_mut(
13446 &mut self,
13447 ) -> &mut ::std::collections::BTreeMap<String, bool> {
13448 &mut self.feature_flags
13449 }
13450 pub fn set_feature_flags(
13452 &mut self,
13453 field: ::std::collections::BTreeMap<String, bool>,
13454 ) {
13455 self.feature_flags = field;
13456 }
13457 pub fn with_feature_flags(
13459 mut self,
13460 field: ::std::collections::BTreeMap<String, bool>,
13461 ) -> Self {
13462 self.set_feature_flags(field);
13463 self
13464 }
13465 pub fn attributes(&self) -> &::std::collections::BTreeMap<String, String> {
13467 &self.attributes
13468 }
13469 pub fn attributes_mut(
13472 &mut self,
13473 ) -> &mut ::std::collections::BTreeMap<String, String> {
13474 &mut self.attributes
13475 }
13476 pub fn set_attributes(
13478 &mut self,
13479 field: ::std::collections::BTreeMap<String, String>,
13480 ) {
13481 self.attributes = field;
13482 }
13483 pub fn with_attributes(
13485 mut self,
13486 field: ::std::collections::BTreeMap<String, String>,
13487 ) -> Self {
13488 self.set_attributes(field);
13489 self
13490 }
13491 pub fn configs(
13493 &self,
13494 ) -> &::std::collections::BTreeMap<String, ::prost_types::Value> {
13495 &self.configs
13496 }
13497 pub fn configs_mut(
13500 &mut self,
13501 ) -> &mut ::std::collections::BTreeMap<String, ::prost_types::Value> {
13502 &mut self.configs
13503 }
13504 pub fn set_configs(
13506 &mut self,
13507 field: ::std::collections::BTreeMap<String, ::prost_types::Value>,
13508 ) {
13509 self.configs = field;
13510 }
13511 pub fn with_configs(
13513 mut self,
13514 field: ::std::collections::BTreeMap<String, ::prost_types::Value>,
13515 ) -> Self {
13516 self.set_configs(field);
13517 self
13518 }
13519 }
13520 impl super::Publish {
13521 pub const fn const_default() -> Self {
13522 Self {
13523 modules: Vec::new(),
13524 dependencies: Vec::new(),
13525 }
13526 }
13527 #[doc(hidden)]
13528 pub fn default_instance() -> &'static Self {
13529 static DEFAULT: super::Publish = super::Publish::const_default();
13530 &DEFAULT
13531 }
13532 pub fn modules(&self) -> &[::prost::bytes::Bytes] {
13534 &self.modules
13535 }
13536 pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
13539 &mut self.modules
13540 }
13541 pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
13543 self.modules = field;
13544 }
13545 pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
13547 self.set_modules(field);
13548 self
13549 }
13550 pub fn dependencies(&self) -> &[String] {
13552 &self.dependencies
13553 }
13554 pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
13557 &mut self.dependencies
13558 }
13559 pub fn set_dependencies(&mut self, field: Vec<String>) {
13561 self.dependencies = field;
13562 }
13563 pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
13565 self.set_dependencies(field);
13566 self
13567 }
13568 }
13569 impl super::QueryEnd {
13570 pub const fn const_default() -> Self {
13571 Self { reason: None }
13572 }
13573 #[doc(hidden)]
13574 pub fn default_instance() -> &'static Self {
13575 static DEFAULT: super::QueryEnd = super::QueryEnd::const_default();
13576 &DEFAULT
13577 }
13578 pub fn with_reason<T: Into<super::QueryEndReason>>(mut self, field: T) -> Self {
13580 self.set_reason(field.into());
13581 self
13582 }
13583 }
13584 impl super::QueryOptions {
13585 pub const fn const_default() -> Self {
13586 Self {
13587 limit: None,
13588 after: None,
13589 before: None,
13590 ordering: None,
13591 }
13592 }
13593 #[doc(hidden)]
13594 pub fn default_instance() -> &'static Self {
13595 static DEFAULT: super::QueryOptions = super::QueryOptions::const_default();
13596 &DEFAULT
13597 }
13598 pub fn limit_opt_mut(&mut self) -> Option<&mut u32> {
13600 self.limit.as_mut().map(|field| field as _)
13601 }
13602 pub fn limit_mut(&mut self) -> &mut u32 {
13605 self.limit.get_or_insert_default()
13606 }
13607 pub fn limit_opt(&self) -> Option<u32> {
13609 self.limit.as_ref().map(|field| *field)
13610 }
13611 pub fn set_limit(&mut self, field: u32) {
13613 self.limit = Some(field);
13614 }
13615 pub fn with_limit(mut self, field: u32) -> Self {
13617 self.set_limit(field);
13618 self
13619 }
13620 pub fn after_opt(&self) -> Option<&[u8]> {
13622 self.after.as_ref().map(|field| field as _)
13623 }
13624 pub fn set_after<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
13626 self.after = Some(field.into().into());
13627 }
13628 pub fn with_after<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
13630 self.set_after(field.into());
13631 self
13632 }
13633 pub fn before_opt(&self) -> Option<&[u8]> {
13635 self.before.as_ref().map(|field| field as _)
13636 }
13637 pub fn set_before<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
13639 self.before = Some(field.into().into());
13640 }
13641 pub fn with_before<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
13643 self.set_before(field.into());
13644 self
13645 }
13646 pub fn with_ordering<T: Into<super::Ordering>>(mut self, field: T) -> Self {
13648 self.set_ordering(field.into());
13649 self
13650 }
13651 }
13652 impl super::RandomnessStateUpdate {
13653 pub const fn const_default() -> Self {
13654 Self {
13655 epoch: None,
13656 randomness_round: None,
13657 random_bytes: None,
13658 randomness_object_initial_shared_version: None,
13659 }
13660 }
13661 #[doc(hidden)]
13662 pub fn default_instance() -> &'static Self {
13663 static DEFAULT: super::RandomnessStateUpdate = super::RandomnessStateUpdate::const_default();
13664 &DEFAULT
13665 }
13666 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
13668 self.epoch.as_mut().map(|field| field as _)
13669 }
13670 pub fn epoch_mut(&mut self) -> &mut u64 {
13673 self.epoch.get_or_insert_default()
13674 }
13675 pub fn epoch_opt(&self) -> Option<u64> {
13677 self.epoch.as_ref().map(|field| *field)
13678 }
13679 pub fn set_epoch(&mut self, field: u64) {
13681 self.epoch = Some(field);
13682 }
13683 pub fn with_epoch(mut self, field: u64) -> Self {
13685 self.set_epoch(field);
13686 self
13687 }
13688 pub fn randomness_round_opt_mut(&mut self) -> Option<&mut u64> {
13690 self.randomness_round.as_mut().map(|field| field as _)
13691 }
13692 pub fn randomness_round_mut(&mut self) -> &mut u64 {
13695 self.randomness_round.get_or_insert_default()
13696 }
13697 pub fn randomness_round_opt(&self) -> Option<u64> {
13699 self.randomness_round.as_ref().map(|field| *field)
13700 }
13701 pub fn set_randomness_round(&mut self, field: u64) {
13703 self.randomness_round = Some(field);
13704 }
13705 pub fn with_randomness_round(mut self, field: u64) -> Self {
13707 self.set_randomness_round(field);
13708 self
13709 }
13710 pub fn random_bytes_opt(&self) -> Option<&[u8]> {
13712 self.random_bytes.as_ref().map(|field| field as _)
13713 }
13714 pub fn set_random_bytes<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
13716 self.random_bytes = Some(field.into().into());
13717 }
13718 pub fn with_random_bytes<T: Into<::prost::bytes::Bytes>>(
13720 mut self,
13721 field: T,
13722 ) -> Self {
13723 self.set_random_bytes(field.into());
13724 self
13725 }
13726 pub fn randomness_object_initial_shared_version_opt_mut(
13728 &mut self,
13729 ) -> Option<&mut u64> {
13730 self.randomness_object_initial_shared_version
13731 .as_mut()
13732 .map(|field| field as _)
13733 }
13734 pub fn randomness_object_initial_shared_version_mut(&mut self) -> &mut u64 {
13737 self.randomness_object_initial_shared_version.get_or_insert_default()
13738 }
13739 pub fn randomness_object_initial_shared_version_opt(&self) -> Option<u64> {
13741 self.randomness_object_initial_shared_version.as_ref().map(|field| *field)
13742 }
13743 pub fn set_randomness_object_initial_shared_version(&mut self, field: u64) {
13745 self.randomness_object_initial_shared_version = Some(field);
13746 }
13747 pub fn with_randomness_object_initial_shared_version(
13749 mut self,
13750 field: u64,
13751 ) -> Self {
13752 self.set_randomness_object_initial_shared_version(field);
13753 self
13754 }
13755 }
13756 impl super::RegulatedCoinMetadata {
13757 pub const fn const_default() -> Self {
13758 Self {
13759 id: None,
13760 coin_metadata_object: None,
13761 deny_cap_object: None,
13762 allow_global_pause: None,
13763 variant: None,
13764 coin_regulated_state: None,
13765 }
13766 }
13767 #[doc(hidden)]
13768 pub fn default_instance() -> &'static Self {
13769 static DEFAULT: super::RegulatedCoinMetadata = super::RegulatedCoinMetadata::const_default();
13770 &DEFAULT
13771 }
13772 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
13774 self.id.as_mut().map(|field| field as _)
13775 }
13776 pub fn id_mut(&mut self) -> &mut String {
13779 self.id.get_or_insert_default()
13780 }
13781 pub fn id_opt(&self) -> Option<&str> {
13783 self.id.as_ref().map(|field| field as _)
13784 }
13785 pub fn set_id<T: Into<String>>(&mut self, field: T) {
13787 self.id = Some(field.into().into());
13788 }
13789 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
13791 self.set_id(field.into());
13792 self
13793 }
13794 pub fn coin_metadata_object_opt_mut(&mut self) -> Option<&mut String> {
13796 self.coin_metadata_object.as_mut().map(|field| field as _)
13797 }
13798 pub fn coin_metadata_object_mut(&mut self) -> &mut String {
13801 self.coin_metadata_object.get_or_insert_default()
13802 }
13803 pub fn coin_metadata_object_opt(&self) -> Option<&str> {
13805 self.coin_metadata_object.as_ref().map(|field| field as _)
13806 }
13807 pub fn set_coin_metadata_object<T: Into<String>>(&mut self, field: T) {
13809 self.coin_metadata_object = Some(field.into().into());
13810 }
13811 pub fn with_coin_metadata_object<T: Into<String>>(mut self, field: T) -> Self {
13813 self.set_coin_metadata_object(field.into());
13814 self
13815 }
13816 pub fn deny_cap_object_opt_mut(&mut self) -> Option<&mut String> {
13818 self.deny_cap_object.as_mut().map(|field| field as _)
13819 }
13820 pub fn deny_cap_object_mut(&mut self) -> &mut String {
13823 self.deny_cap_object.get_or_insert_default()
13824 }
13825 pub fn deny_cap_object_opt(&self) -> Option<&str> {
13827 self.deny_cap_object.as_ref().map(|field| field as _)
13828 }
13829 pub fn set_deny_cap_object<T: Into<String>>(&mut self, field: T) {
13831 self.deny_cap_object = Some(field.into().into());
13832 }
13833 pub fn with_deny_cap_object<T: Into<String>>(mut self, field: T) -> Self {
13835 self.set_deny_cap_object(field.into());
13836 self
13837 }
13838 pub fn allow_global_pause_opt_mut(&mut self) -> Option<&mut bool> {
13840 self.allow_global_pause.as_mut().map(|field| field as _)
13841 }
13842 pub fn allow_global_pause_mut(&mut self) -> &mut bool {
13845 self.allow_global_pause.get_or_insert_default()
13846 }
13847 pub fn allow_global_pause_opt(&self) -> Option<bool> {
13849 self.allow_global_pause.as_ref().map(|field| *field)
13850 }
13851 pub fn set_allow_global_pause(&mut self, field: bool) {
13853 self.allow_global_pause = Some(field);
13854 }
13855 pub fn with_allow_global_pause(mut self, field: bool) -> Self {
13857 self.set_allow_global_pause(field);
13858 self
13859 }
13860 pub fn variant_opt_mut(&mut self) -> Option<&mut u32> {
13862 self.variant.as_mut().map(|field| field as _)
13863 }
13864 pub fn variant_mut(&mut self) -> &mut u32 {
13867 self.variant.get_or_insert_default()
13868 }
13869 pub fn variant_opt(&self) -> Option<u32> {
13871 self.variant.as_ref().map(|field| *field)
13872 }
13873 pub fn set_variant(&mut self, field: u32) {
13875 self.variant = Some(field);
13876 }
13877 pub fn with_variant(mut self, field: u32) -> Self {
13879 self.set_variant(field);
13880 self
13881 }
13882 pub fn with_coin_regulated_state<
13884 T: Into<super::regulated_coin_metadata::CoinRegulatedState>,
13885 >(mut self, field: T) -> Self {
13886 self.set_coin_regulated_state(field.into());
13887 self
13888 }
13889 }
13890 impl super::ReverseLookupNameRequest {
13891 pub const fn const_default() -> Self {
13892 Self { address: None }
13893 }
13894 #[doc(hidden)]
13895 pub fn default_instance() -> &'static Self {
13896 static DEFAULT: super::ReverseLookupNameRequest = super::ReverseLookupNameRequest::const_default();
13897 &DEFAULT
13898 }
13899 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
13901 self.address.as_mut().map(|field| field as _)
13902 }
13903 pub fn address_mut(&mut self) -> &mut String {
13906 self.address.get_or_insert_default()
13907 }
13908 pub fn address_opt(&self) -> Option<&str> {
13910 self.address.as_ref().map(|field| field as _)
13911 }
13912 pub fn set_address<T: Into<String>>(&mut self, field: T) {
13914 self.address = Some(field.into().into());
13915 }
13916 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
13918 self.set_address(field.into());
13919 self
13920 }
13921 }
13922 impl super::ReverseLookupNameResponse {
13923 pub const fn const_default() -> Self {
13924 Self { record: None }
13925 }
13926 #[doc(hidden)]
13927 pub fn default_instance() -> &'static Self {
13928 static DEFAULT: super::ReverseLookupNameResponse = super::ReverseLookupNameResponse::const_default();
13929 &DEFAULT
13930 }
13931 pub fn record(&self) -> &super::NameRecord {
13933 self.record
13934 .as_ref()
13935 .map(|field| field as _)
13936 .unwrap_or_else(|| super::NameRecord::default_instance() as _)
13937 }
13938 pub fn record_opt_mut(&mut self) -> Option<&mut super::NameRecord> {
13940 self.record.as_mut().map(|field| field as _)
13941 }
13942 pub fn record_mut(&mut self) -> &mut super::NameRecord {
13945 self.record.get_or_insert_default()
13946 }
13947 pub fn record_opt(&self) -> Option<&super::NameRecord> {
13949 self.record.as_ref().map(|field| field as _)
13950 }
13951 pub fn set_record<T: Into<super::NameRecord>>(&mut self, field: T) {
13953 self.record = Some(field.into().into());
13954 }
13955 pub fn with_record<T: Into<super::NameRecord>>(mut self, field: T) -> Self {
13957 self.set_record(field.into());
13958 self
13959 }
13960 }
13961 impl super::SenderFilter {
13962 pub const fn const_default() -> Self {
13963 Self { address: None }
13964 }
13965 #[doc(hidden)]
13966 pub fn default_instance() -> &'static Self {
13967 static DEFAULT: super::SenderFilter = super::SenderFilter::const_default();
13968 &DEFAULT
13969 }
13970 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
13972 self.address.as_mut().map(|field| field as _)
13973 }
13974 pub fn address_mut(&mut self) -> &mut String {
13977 self.address.get_or_insert_default()
13978 }
13979 pub fn address_opt(&self) -> Option<&str> {
13981 self.address.as_ref().map(|field| field as _)
13982 }
13983 pub fn set_address<T: Into<String>>(&mut self, field: T) {
13985 self.address = Some(field.into().into());
13986 }
13987 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
13989 self.set_address(field.into());
13990 self
13991 }
13992 }
13993 impl super::SimpleSignature {
13994 pub const fn const_default() -> Self {
13995 Self {
13996 scheme: None,
13997 signature: None,
13998 public_key: None,
13999 }
14000 }
14001 #[doc(hidden)]
14002 pub fn default_instance() -> &'static Self {
14003 static DEFAULT: super::SimpleSignature = super::SimpleSignature::const_default();
14004 &DEFAULT
14005 }
14006 pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
14008 self.set_scheme(field.into());
14009 self
14010 }
14011 pub fn signature_opt(&self) -> Option<&[u8]> {
14013 self.signature.as_ref().map(|field| field as _)
14014 }
14015 pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
14017 self.signature = Some(field.into().into());
14018 }
14019 pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
14021 mut self,
14022 field: T,
14023 ) -> Self {
14024 self.set_signature(field.into());
14025 self
14026 }
14027 pub fn public_key_opt(&self) -> Option<&[u8]> {
14029 self.public_key.as_ref().map(|field| field as _)
14030 }
14031 pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
14033 self.public_key = Some(field.into().into());
14034 }
14035 pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
14037 mut self,
14038 field: T,
14039 ) -> Self {
14040 self.set_public_key(field.into());
14041 self
14042 }
14043 }
14044 impl super::SimulateTransactionRequest {
14045 pub const fn const_default() -> Self {
14046 Self {
14047 transaction: None,
14048 read_mask: None,
14049 checks: None,
14050 do_gas_selection: None,
14051 }
14052 }
14053 #[doc(hidden)]
14054 pub fn default_instance() -> &'static Self {
14055 static DEFAULT: super::SimulateTransactionRequest = super::SimulateTransactionRequest::const_default();
14056 &DEFAULT
14057 }
14058 pub fn transaction(&self) -> &super::Transaction {
14060 self.transaction
14061 .as_ref()
14062 .map(|field| field as _)
14063 .unwrap_or_else(|| super::Transaction::default_instance() as _)
14064 }
14065 pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
14067 self.transaction.as_mut().map(|field| field as _)
14068 }
14069 pub fn transaction_mut(&mut self) -> &mut super::Transaction {
14072 self.transaction.get_or_insert_default()
14073 }
14074 pub fn transaction_opt(&self) -> Option<&super::Transaction> {
14076 self.transaction.as_ref().map(|field| field as _)
14077 }
14078 pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
14080 self.transaction = Some(field.into().into());
14081 }
14082 pub fn with_transaction<T: Into<super::Transaction>>(
14084 mut self,
14085 field: T,
14086 ) -> Self {
14087 self.set_transaction(field.into());
14088 self
14089 }
14090 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
14092 self.read_mask.as_mut().map(|field| field as _)
14093 }
14094 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
14097 self.read_mask.get_or_insert_default()
14098 }
14099 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
14101 self.read_mask.as_ref().map(|field| field as _)
14102 }
14103 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
14105 self.read_mask = Some(field.into().into());
14106 }
14107 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
14109 mut self,
14110 field: T,
14111 ) -> Self {
14112 self.set_read_mask(field.into());
14113 self
14114 }
14115 pub fn with_checks<
14117 T: Into<super::simulate_transaction_request::TransactionChecks>,
14118 >(mut self, field: T) -> Self {
14119 self.set_checks(field.into());
14120 self
14121 }
14122 pub fn do_gas_selection_opt_mut(&mut self) -> Option<&mut bool> {
14124 self.do_gas_selection.as_mut().map(|field| field as _)
14125 }
14126 pub fn do_gas_selection_mut(&mut self) -> &mut bool {
14129 self.do_gas_selection.get_or_insert_default()
14130 }
14131 pub fn do_gas_selection_opt(&self) -> Option<bool> {
14133 self.do_gas_selection.as_ref().map(|field| *field)
14134 }
14135 pub fn set_do_gas_selection(&mut self, field: bool) {
14137 self.do_gas_selection = Some(field);
14138 }
14139 pub fn with_do_gas_selection(mut self, field: bool) -> Self {
14141 self.set_do_gas_selection(field);
14142 self
14143 }
14144 }
14145 impl super::SimulateTransactionResponse {
14146 pub const fn const_default() -> Self {
14147 Self {
14148 transaction: None,
14149 command_outputs: Vec::new(),
14150 suggested_gas_price: None,
14151 }
14152 }
14153 #[doc(hidden)]
14154 pub fn default_instance() -> &'static Self {
14155 static DEFAULT: super::SimulateTransactionResponse = super::SimulateTransactionResponse::const_default();
14156 &DEFAULT
14157 }
14158 pub fn transaction(&self) -> &super::ExecutedTransaction {
14160 self.transaction
14161 .as_ref()
14162 .map(|field| field as _)
14163 .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
14164 }
14165 pub fn transaction_opt_mut(
14167 &mut self,
14168 ) -> Option<&mut super::ExecutedTransaction> {
14169 self.transaction.as_mut().map(|field| field as _)
14170 }
14171 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
14174 self.transaction.get_or_insert_default()
14175 }
14176 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
14178 self.transaction.as_ref().map(|field| field as _)
14179 }
14180 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
14182 &mut self,
14183 field: T,
14184 ) {
14185 self.transaction = Some(field.into().into());
14186 }
14187 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
14189 mut self,
14190 field: T,
14191 ) -> Self {
14192 self.set_transaction(field.into());
14193 self
14194 }
14195 pub fn command_outputs(&self) -> &[super::CommandResult] {
14197 &self.command_outputs
14198 }
14199 pub fn command_outputs_mut(&mut self) -> &mut Vec<super::CommandResult> {
14202 &mut self.command_outputs
14203 }
14204 pub fn set_command_outputs(&mut self, field: Vec<super::CommandResult>) {
14206 self.command_outputs = field;
14207 }
14208 pub fn with_command_outputs(mut self, field: Vec<super::CommandResult>) -> Self {
14210 self.set_command_outputs(field);
14211 self
14212 }
14213 pub fn suggested_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
14215 self.suggested_gas_price.as_mut().map(|field| field as _)
14216 }
14217 pub fn suggested_gas_price_mut(&mut self) -> &mut u64 {
14220 self.suggested_gas_price.get_or_insert_default()
14221 }
14222 pub fn suggested_gas_price_opt(&self) -> Option<u64> {
14224 self.suggested_gas_price.as_ref().map(|field| *field)
14225 }
14226 pub fn set_suggested_gas_price(&mut self, field: u64) {
14228 self.suggested_gas_price = Some(field);
14229 }
14230 pub fn with_suggested_gas_price(mut self, field: u64) -> Self {
14232 self.set_suggested_gas_price(field);
14233 self
14234 }
14235 }
14236 impl super::SizeError {
14237 pub const fn const_default() -> Self {
14238 Self { size: None, max_size: None }
14239 }
14240 #[doc(hidden)]
14241 pub fn default_instance() -> &'static Self {
14242 static DEFAULT: super::SizeError = super::SizeError::const_default();
14243 &DEFAULT
14244 }
14245 pub fn size_opt_mut(&mut self) -> Option<&mut u64> {
14247 self.size.as_mut().map(|field| field as _)
14248 }
14249 pub fn size_mut(&mut self) -> &mut u64 {
14252 self.size.get_or_insert_default()
14253 }
14254 pub fn size_opt(&self) -> Option<u64> {
14256 self.size.as_ref().map(|field| *field)
14257 }
14258 pub fn set_size(&mut self, field: u64) {
14260 self.size = Some(field);
14261 }
14262 pub fn with_size(mut self, field: u64) -> Self {
14264 self.set_size(field);
14265 self
14266 }
14267 pub fn max_size_opt_mut(&mut self) -> Option<&mut u64> {
14269 self.max_size.as_mut().map(|field| field as _)
14270 }
14271 pub fn max_size_mut(&mut self) -> &mut u64 {
14274 self.max_size.get_or_insert_default()
14275 }
14276 pub fn max_size_opt(&self) -> Option<u64> {
14278 self.max_size.as_ref().map(|field| *field)
14279 }
14280 pub fn set_max_size(&mut self, field: u64) {
14282 self.max_size = Some(field);
14283 }
14284 pub fn with_max_size(mut self, field: u64) -> Self {
14286 self.set_max_size(field);
14287 self
14288 }
14289 }
14290 impl super::SplitCoins {
14291 pub const fn const_default() -> Self {
14292 Self {
14293 coin: None,
14294 amounts: Vec::new(),
14295 }
14296 }
14297 #[doc(hidden)]
14298 pub fn default_instance() -> &'static Self {
14299 static DEFAULT: super::SplitCoins = super::SplitCoins::const_default();
14300 &DEFAULT
14301 }
14302 pub fn coin(&self) -> &super::Argument {
14304 self.coin
14305 .as_ref()
14306 .map(|field| field as _)
14307 .unwrap_or_else(|| super::Argument::default_instance() as _)
14308 }
14309 pub fn coin_opt_mut(&mut self) -> Option<&mut super::Argument> {
14311 self.coin.as_mut().map(|field| field as _)
14312 }
14313 pub fn coin_mut(&mut self) -> &mut super::Argument {
14316 self.coin.get_or_insert_default()
14317 }
14318 pub fn coin_opt(&self) -> Option<&super::Argument> {
14320 self.coin.as_ref().map(|field| field as _)
14321 }
14322 pub fn set_coin<T: Into<super::Argument>>(&mut self, field: T) {
14324 self.coin = Some(field.into().into());
14325 }
14326 pub fn with_coin<T: Into<super::Argument>>(mut self, field: T) -> Self {
14328 self.set_coin(field.into());
14329 self
14330 }
14331 pub fn amounts(&self) -> &[super::Argument] {
14333 &self.amounts
14334 }
14335 pub fn amounts_mut(&mut self) -> &mut Vec<super::Argument> {
14338 &mut self.amounts
14339 }
14340 pub fn set_amounts(&mut self, field: Vec<super::Argument>) {
14342 self.amounts = field;
14343 }
14344 pub fn with_amounts(mut self, field: Vec<super::Argument>) -> Self {
14346 self.set_amounts(field);
14347 self
14348 }
14349 }
14350 impl super::StakeSubsidy {
14351 pub const fn const_default() -> Self {
14352 Self {
14353 balance: None,
14354 distribution_counter: None,
14355 current_distribution_amount: None,
14356 stake_subsidy_period_length: None,
14357 stake_subsidy_decrease_rate: None,
14358 extra_fields: None,
14359 }
14360 }
14361 #[doc(hidden)]
14362 pub fn default_instance() -> &'static Self {
14363 static DEFAULT: super::StakeSubsidy = super::StakeSubsidy::const_default();
14364 &DEFAULT
14365 }
14366 pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
14368 self.balance.as_mut().map(|field| field as _)
14369 }
14370 pub fn balance_mut(&mut self) -> &mut u64 {
14373 self.balance.get_or_insert_default()
14374 }
14375 pub fn balance_opt(&self) -> Option<u64> {
14377 self.balance.as_ref().map(|field| *field)
14378 }
14379 pub fn set_balance(&mut self, field: u64) {
14381 self.balance = Some(field);
14382 }
14383 pub fn with_balance(mut self, field: u64) -> Self {
14385 self.set_balance(field);
14386 self
14387 }
14388 pub fn distribution_counter_opt_mut(&mut self) -> Option<&mut u64> {
14390 self.distribution_counter.as_mut().map(|field| field as _)
14391 }
14392 pub fn distribution_counter_mut(&mut self) -> &mut u64 {
14395 self.distribution_counter.get_or_insert_default()
14396 }
14397 pub fn distribution_counter_opt(&self) -> Option<u64> {
14399 self.distribution_counter.as_ref().map(|field| *field)
14400 }
14401 pub fn set_distribution_counter(&mut self, field: u64) {
14403 self.distribution_counter = Some(field);
14404 }
14405 pub fn with_distribution_counter(mut self, field: u64) -> Self {
14407 self.set_distribution_counter(field);
14408 self
14409 }
14410 pub fn current_distribution_amount_opt_mut(&mut self) -> Option<&mut u64> {
14412 self.current_distribution_amount.as_mut().map(|field| field as _)
14413 }
14414 pub fn current_distribution_amount_mut(&mut self) -> &mut u64 {
14417 self.current_distribution_amount.get_or_insert_default()
14418 }
14419 pub fn current_distribution_amount_opt(&self) -> Option<u64> {
14421 self.current_distribution_amount.as_ref().map(|field| *field)
14422 }
14423 pub fn set_current_distribution_amount(&mut self, field: u64) {
14425 self.current_distribution_amount = Some(field);
14426 }
14427 pub fn with_current_distribution_amount(mut self, field: u64) -> Self {
14429 self.set_current_distribution_amount(field);
14430 self
14431 }
14432 pub fn stake_subsidy_period_length_opt_mut(&mut self) -> Option<&mut u64> {
14434 self.stake_subsidy_period_length.as_mut().map(|field| field as _)
14435 }
14436 pub fn stake_subsidy_period_length_mut(&mut self) -> &mut u64 {
14439 self.stake_subsidy_period_length.get_or_insert_default()
14440 }
14441 pub fn stake_subsidy_period_length_opt(&self) -> Option<u64> {
14443 self.stake_subsidy_period_length.as_ref().map(|field| *field)
14444 }
14445 pub fn set_stake_subsidy_period_length(&mut self, field: u64) {
14447 self.stake_subsidy_period_length = Some(field);
14448 }
14449 pub fn with_stake_subsidy_period_length(mut self, field: u64) -> Self {
14451 self.set_stake_subsidy_period_length(field);
14452 self
14453 }
14454 pub fn stake_subsidy_decrease_rate_opt_mut(&mut self) -> Option<&mut u32> {
14456 self.stake_subsidy_decrease_rate.as_mut().map(|field| field as _)
14457 }
14458 pub fn stake_subsidy_decrease_rate_mut(&mut self) -> &mut u32 {
14461 self.stake_subsidy_decrease_rate.get_or_insert_default()
14462 }
14463 pub fn stake_subsidy_decrease_rate_opt(&self) -> Option<u32> {
14465 self.stake_subsidy_decrease_rate.as_ref().map(|field| *field)
14466 }
14467 pub fn set_stake_subsidy_decrease_rate(&mut self, field: u32) {
14469 self.stake_subsidy_decrease_rate = Some(field);
14470 }
14471 pub fn with_stake_subsidy_decrease_rate(mut self, field: u32) -> Self {
14473 self.set_stake_subsidy_decrease_rate(field);
14474 self
14475 }
14476 pub fn extra_fields(&self) -> &super::MoveTable {
14478 self.extra_fields
14479 .as_ref()
14480 .map(|field| field as _)
14481 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
14482 }
14483 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
14485 self.extra_fields.as_mut().map(|field| field as _)
14486 }
14487 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
14490 self.extra_fields.get_or_insert_default()
14491 }
14492 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
14494 self.extra_fields.as_ref().map(|field| field as _)
14495 }
14496 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
14498 self.extra_fields = Some(field.into().into());
14499 }
14500 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
14502 self.set_extra_fields(field.into());
14503 self
14504 }
14505 }
14506 impl super::StakingPool {
14507 pub const fn const_default() -> Self {
14508 Self {
14509 id: None,
14510 activation_epoch: None,
14511 deactivation_epoch: None,
14512 sui_balance: None,
14513 rewards_pool: None,
14514 pool_token_balance: None,
14515 exchange_rates: None,
14516 pending_stake: None,
14517 pending_total_sui_withdraw: None,
14518 pending_pool_token_withdraw: None,
14519 extra_fields: None,
14520 }
14521 }
14522 #[doc(hidden)]
14523 pub fn default_instance() -> &'static Self {
14524 static DEFAULT: super::StakingPool = super::StakingPool::const_default();
14525 &DEFAULT
14526 }
14527 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
14529 self.id.as_mut().map(|field| field as _)
14530 }
14531 pub fn id_mut(&mut self) -> &mut String {
14534 self.id.get_or_insert_default()
14535 }
14536 pub fn id_opt(&self) -> Option<&str> {
14538 self.id.as_ref().map(|field| field as _)
14539 }
14540 pub fn set_id<T: Into<String>>(&mut self, field: T) {
14542 self.id = Some(field.into().into());
14543 }
14544 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
14546 self.set_id(field.into());
14547 self
14548 }
14549 pub fn activation_epoch_opt_mut(&mut self) -> Option<&mut u64> {
14551 self.activation_epoch.as_mut().map(|field| field as _)
14552 }
14553 pub fn activation_epoch_mut(&mut self) -> &mut u64 {
14556 self.activation_epoch.get_or_insert_default()
14557 }
14558 pub fn activation_epoch_opt(&self) -> Option<u64> {
14560 self.activation_epoch.as_ref().map(|field| *field)
14561 }
14562 pub fn set_activation_epoch(&mut self, field: u64) {
14564 self.activation_epoch = Some(field);
14565 }
14566 pub fn with_activation_epoch(mut self, field: u64) -> Self {
14568 self.set_activation_epoch(field);
14569 self
14570 }
14571 pub fn deactivation_epoch_opt_mut(&mut self) -> Option<&mut u64> {
14573 self.deactivation_epoch.as_mut().map(|field| field as _)
14574 }
14575 pub fn deactivation_epoch_mut(&mut self) -> &mut u64 {
14578 self.deactivation_epoch.get_or_insert_default()
14579 }
14580 pub fn deactivation_epoch_opt(&self) -> Option<u64> {
14582 self.deactivation_epoch.as_ref().map(|field| *field)
14583 }
14584 pub fn set_deactivation_epoch(&mut self, field: u64) {
14586 self.deactivation_epoch = Some(field);
14587 }
14588 pub fn with_deactivation_epoch(mut self, field: u64) -> Self {
14590 self.set_deactivation_epoch(field);
14591 self
14592 }
14593 pub fn sui_balance_opt_mut(&mut self) -> Option<&mut u64> {
14595 self.sui_balance.as_mut().map(|field| field as _)
14596 }
14597 pub fn sui_balance_mut(&mut self) -> &mut u64 {
14600 self.sui_balance.get_or_insert_default()
14601 }
14602 pub fn sui_balance_opt(&self) -> Option<u64> {
14604 self.sui_balance.as_ref().map(|field| *field)
14605 }
14606 pub fn set_sui_balance(&mut self, field: u64) {
14608 self.sui_balance = Some(field);
14609 }
14610 pub fn with_sui_balance(mut self, field: u64) -> Self {
14612 self.set_sui_balance(field);
14613 self
14614 }
14615 pub fn rewards_pool_opt_mut(&mut self) -> Option<&mut u64> {
14617 self.rewards_pool.as_mut().map(|field| field as _)
14618 }
14619 pub fn rewards_pool_mut(&mut self) -> &mut u64 {
14622 self.rewards_pool.get_or_insert_default()
14623 }
14624 pub fn rewards_pool_opt(&self) -> Option<u64> {
14626 self.rewards_pool.as_ref().map(|field| *field)
14627 }
14628 pub fn set_rewards_pool(&mut self, field: u64) {
14630 self.rewards_pool = Some(field);
14631 }
14632 pub fn with_rewards_pool(mut self, field: u64) -> Self {
14634 self.set_rewards_pool(field);
14635 self
14636 }
14637 pub fn pool_token_balance_opt_mut(&mut self) -> Option<&mut u64> {
14639 self.pool_token_balance.as_mut().map(|field| field as _)
14640 }
14641 pub fn pool_token_balance_mut(&mut self) -> &mut u64 {
14644 self.pool_token_balance.get_or_insert_default()
14645 }
14646 pub fn pool_token_balance_opt(&self) -> Option<u64> {
14648 self.pool_token_balance.as_ref().map(|field| *field)
14649 }
14650 pub fn set_pool_token_balance(&mut self, field: u64) {
14652 self.pool_token_balance = Some(field);
14653 }
14654 pub fn with_pool_token_balance(mut self, field: u64) -> Self {
14656 self.set_pool_token_balance(field);
14657 self
14658 }
14659 pub fn exchange_rates(&self) -> &super::MoveTable {
14661 self.exchange_rates
14662 .as_ref()
14663 .map(|field| field as _)
14664 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
14665 }
14666 pub fn exchange_rates_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
14668 self.exchange_rates.as_mut().map(|field| field as _)
14669 }
14670 pub fn exchange_rates_mut(&mut self) -> &mut super::MoveTable {
14673 self.exchange_rates.get_or_insert_default()
14674 }
14675 pub fn exchange_rates_opt(&self) -> Option<&super::MoveTable> {
14677 self.exchange_rates.as_ref().map(|field| field as _)
14678 }
14679 pub fn set_exchange_rates<T: Into<super::MoveTable>>(&mut self, field: T) {
14681 self.exchange_rates = Some(field.into().into());
14682 }
14683 pub fn with_exchange_rates<T: Into<super::MoveTable>>(
14685 mut self,
14686 field: T,
14687 ) -> Self {
14688 self.set_exchange_rates(field.into());
14689 self
14690 }
14691 pub fn pending_stake_opt_mut(&mut self) -> Option<&mut u64> {
14693 self.pending_stake.as_mut().map(|field| field as _)
14694 }
14695 pub fn pending_stake_mut(&mut self) -> &mut u64 {
14698 self.pending_stake.get_or_insert_default()
14699 }
14700 pub fn pending_stake_opt(&self) -> Option<u64> {
14702 self.pending_stake.as_ref().map(|field| *field)
14703 }
14704 pub fn set_pending_stake(&mut self, field: u64) {
14706 self.pending_stake = Some(field);
14707 }
14708 pub fn with_pending_stake(mut self, field: u64) -> Self {
14710 self.set_pending_stake(field);
14711 self
14712 }
14713 pub fn pending_total_sui_withdraw_opt_mut(&mut self) -> Option<&mut u64> {
14715 self.pending_total_sui_withdraw.as_mut().map(|field| field as _)
14716 }
14717 pub fn pending_total_sui_withdraw_mut(&mut self) -> &mut u64 {
14720 self.pending_total_sui_withdraw.get_or_insert_default()
14721 }
14722 pub fn pending_total_sui_withdraw_opt(&self) -> Option<u64> {
14724 self.pending_total_sui_withdraw.as_ref().map(|field| *field)
14725 }
14726 pub fn set_pending_total_sui_withdraw(&mut self, field: u64) {
14728 self.pending_total_sui_withdraw = Some(field);
14729 }
14730 pub fn with_pending_total_sui_withdraw(mut self, field: u64) -> Self {
14732 self.set_pending_total_sui_withdraw(field);
14733 self
14734 }
14735 pub fn pending_pool_token_withdraw_opt_mut(&mut self) -> Option<&mut u64> {
14737 self.pending_pool_token_withdraw.as_mut().map(|field| field as _)
14738 }
14739 pub fn pending_pool_token_withdraw_mut(&mut self) -> &mut u64 {
14742 self.pending_pool_token_withdraw.get_or_insert_default()
14743 }
14744 pub fn pending_pool_token_withdraw_opt(&self) -> Option<u64> {
14746 self.pending_pool_token_withdraw.as_ref().map(|field| *field)
14747 }
14748 pub fn set_pending_pool_token_withdraw(&mut self, field: u64) {
14750 self.pending_pool_token_withdraw = Some(field);
14751 }
14752 pub fn with_pending_pool_token_withdraw(mut self, field: u64) -> Self {
14754 self.set_pending_pool_token_withdraw(field);
14755 self
14756 }
14757 pub fn extra_fields(&self) -> &super::MoveTable {
14759 self.extra_fields
14760 .as_ref()
14761 .map(|field| field as _)
14762 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
14763 }
14764 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
14766 self.extra_fields.as_mut().map(|field| field as _)
14767 }
14768 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
14771 self.extra_fields.get_or_insert_default()
14772 }
14773 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
14775 self.extra_fields.as_ref().map(|field| field as _)
14776 }
14777 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
14779 self.extra_fields = Some(field.into().into());
14780 }
14781 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
14783 self.set_extra_fields(field.into());
14784 self
14785 }
14786 }
14787 impl super::StorageFund {
14788 pub const fn const_default() -> Self {
14789 Self {
14790 total_object_storage_rebates: None,
14791 non_refundable_balance: None,
14792 }
14793 }
14794 #[doc(hidden)]
14795 pub fn default_instance() -> &'static Self {
14796 static DEFAULT: super::StorageFund = super::StorageFund::const_default();
14797 &DEFAULT
14798 }
14799 pub fn total_object_storage_rebates_opt_mut(&mut self) -> Option<&mut u64> {
14801 self.total_object_storage_rebates.as_mut().map(|field| field as _)
14802 }
14803 pub fn total_object_storage_rebates_mut(&mut self) -> &mut u64 {
14806 self.total_object_storage_rebates.get_or_insert_default()
14807 }
14808 pub fn total_object_storage_rebates_opt(&self) -> Option<u64> {
14810 self.total_object_storage_rebates.as_ref().map(|field| *field)
14811 }
14812 pub fn set_total_object_storage_rebates(&mut self, field: u64) {
14814 self.total_object_storage_rebates = Some(field);
14815 }
14816 pub fn with_total_object_storage_rebates(mut self, field: u64) -> Self {
14818 self.set_total_object_storage_rebates(field);
14819 self
14820 }
14821 pub fn non_refundable_balance_opt_mut(&mut self) -> Option<&mut u64> {
14823 self.non_refundable_balance.as_mut().map(|field| field as _)
14824 }
14825 pub fn non_refundable_balance_mut(&mut self) -> &mut u64 {
14828 self.non_refundable_balance.get_or_insert_default()
14829 }
14830 pub fn non_refundable_balance_opt(&self) -> Option<u64> {
14832 self.non_refundable_balance.as_ref().map(|field| *field)
14833 }
14834 pub fn set_non_refundable_balance(&mut self, field: u64) {
14836 self.non_refundable_balance = Some(field);
14837 }
14838 pub fn with_non_refundable_balance(mut self, field: u64) -> Self {
14840 self.set_non_refundable_balance(field);
14841 self
14842 }
14843 }
14844 impl super::SubscribeCheckpointsRequest {
14845 pub const fn const_default() -> Self {
14846 Self {
14847 read_mask: None,
14848 filter: None,
14849 }
14850 }
14851 #[doc(hidden)]
14852 pub fn default_instance() -> &'static Self {
14853 static DEFAULT: super::SubscribeCheckpointsRequest = super::SubscribeCheckpointsRequest::const_default();
14854 &DEFAULT
14855 }
14856 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
14858 self.read_mask.as_mut().map(|field| field as _)
14859 }
14860 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
14863 self.read_mask.get_or_insert_default()
14864 }
14865 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
14867 self.read_mask.as_ref().map(|field| field as _)
14868 }
14869 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
14871 self.read_mask = Some(field.into().into());
14872 }
14873 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
14875 mut self,
14876 field: T,
14877 ) -> Self {
14878 self.set_read_mask(field.into());
14879 self
14880 }
14881 pub fn filter(&self) -> &super::TransactionFilter {
14883 self.filter
14884 .as_ref()
14885 .map(|field| field as _)
14886 .unwrap_or_else(|| super::TransactionFilter::default_instance() as _)
14887 }
14888 pub fn filter_opt_mut(&mut self) -> Option<&mut super::TransactionFilter> {
14890 self.filter.as_mut().map(|field| field as _)
14891 }
14892 pub fn filter_mut(&mut self) -> &mut super::TransactionFilter {
14895 self.filter.get_or_insert_default()
14896 }
14897 pub fn filter_opt(&self) -> Option<&super::TransactionFilter> {
14899 self.filter.as_ref().map(|field| field as _)
14900 }
14901 pub fn set_filter<T: Into<super::TransactionFilter>>(&mut self, field: T) {
14903 self.filter = Some(field.into().into());
14904 }
14905 pub fn with_filter<T: Into<super::TransactionFilter>>(
14907 mut self,
14908 field: T,
14909 ) -> Self {
14910 self.set_filter(field.into());
14911 self
14912 }
14913 }
14914 impl super::SubscribeCheckpointsResponse {
14915 pub const fn const_default() -> Self {
14916 Self {
14917 cursor: None,
14918 checkpoint: None,
14919 }
14920 }
14921 #[doc(hidden)]
14922 pub fn default_instance() -> &'static Self {
14923 static DEFAULT: super::SubscribeCheckpointsResponse = super::SubscribeCheckpointsResponse::const_default();
14924 &DEFAULT
14925 }
14926 pub fn cursor_opt_mut(&mut self) -> Option<&mut u64> {
14928 self.cursor.as_mut().map(|field| field as _)
14929 }
14930 pub fn cursor_mut(&mut self) -> &mut u64 {
14933 self.cursor.get_or_insert_default()
14934 }
14935 pub fn cursor_opt(&self) -> Option<u64> {
14937 self.cursor.as_ref().map(|field| *field)
14938 }
14939 pub fn set_cursor(&mut self, field: u64) {
14941 self.cursor = Some(field);
14942 }
14943 pub fn with_cursor(mut self, field: u64) -> Self {
14945 self.set_cursor(field);
14946 self
14947 }
14948 pub fn checkpoint(&self) -> &super::Checkpoint {
14950 self.checkpoint
14951 .as_ref()
14952 .map(|field| field as _)
14953 .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
14954 }
14955 pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
14957 self.checkpoint.as_mut().map(|field| field as _)
14958 }
14959 pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
14962 self.checkpoint.get_or_insert_default()
14963 }
14964 pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
14966 self.checkpoint.as_ref().map(|field| field as _)
14967 }
14968 pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
14970 self.checkpoint = Some(field.into().into());
14971 }
14972 pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
14974 self.set_checkpoint(field.into());
14975 self
14976 }
14977 }
14978 impl super::SubscribeEventsRequest {
14979 pub const fn const_default() -> Self {
14980 Self {
14981 read_mask: None,
14982 filter: None,
14983 }
14984 }
14985 #[doc(hidden)]
14986 pub fn default_instance() -> &'static Self {
14987 static DEFAULT: super::SubscribeEventsRequest = super::SubscribeEventsRequest::const_default();
14988 &DEFAULT
14989 }
14990 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
14992 self.read_mask.as_mut().map(|field| field as _)
14993 }
14994 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
14997 self.read_mask.get_or_insert_default()
14998 }
14999 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
15001 self.read_mask.as_ref().map(|field| field as _)
15002 }
15003 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
15005 self.read_mask = Some(field.into().into());
15006 }
15007 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
15009 mut self,
15010 field: T,
15011 ) -> Self {
15012 self.set_read_mask(field.into());
15013 self
15014 }
15015 pub fn filter(&self) -> &super::EventFilter {
15017 self.filter
15018 .as_ref()
15019 .map(|field| field as _)
15020 .unwrap_or_else(|| super::EventFilter::default_instance() as _)
15021 }
15022 pub fn filter_opt_mut(&mut self) -> Option<&mut super::EventFilter> {
15024 self.filter.as_mut().map(|field| field as _)
15025 }
15026 pub fn filter_mut(&mut self) -> &mut super::EventFilter {
15029 self.filter.get_or_insert_default()
15030 }
15031 pub fn filter_opt(&self) -> Option<&super::EventFilter> {
15033 self.filter.as_ref().map(|field| field as _)
15034 }
15035 pub fn set_filter<T: Into<super::EventFilter>>(&mut self, field: T) {
15037 self.filter = Some(field.into().into());
15038 }
15039 pub fn with_filter<T: Into<super::EventFilter>>(mut self, field: T) -> Self {
15041 self.set_filter(field.into());
15042 self
15043 }
15044 }
15045 impl super::SubscribeEventsResponse {
15046 pub const fn const_default() -> Self {
15047 Self {
15048 event: None,
15049 watermark: None,
15050 }
15051 }
15052 #[doc(hidden)]
15053 pub fn default_instance() -> &'static Self {
15054 static DEFAULT: super::SubscribeEventsResponse = super::SubscribeEventsResponse::const_default();
15055 &DEFAULT
15056 }
15057 pub fn event(&self) -> &super::Event {
15059 self.event
15060 .as_ref()
15061 .map(|field| field as _)
15062 .unwrap_or_else(|| super::Event::default_instance() as _)
15063 }
15064 pub fn event_opt_mut(&mut self) -> Option<&mut super::Event> {
15066 self.event.as_mut().map(|field| field as _)
15067 }
15068 pub fn event_mut(&mut self) -> &mut super::Event {
15071 self.event.get_or_insert_default()
15072 }
15073 pub fn event_opt(&self) -> Option<&super::Event> {
15075 self.event.as_ref().map(|field| field as _)
15076 }
15077 pub fn set_event<T: Into<super::Event>>(&mut self, field: T) {
15079 self.event = Some(field.into().into());
15080 }
15081 pub fn with_event<T: Into<super::Event>>(mut self, field: T) -> Self {
15083 self.set_event(field.into());
15084 self
15085 }
15086 pub fn watermark(&self) -> &super::Watermark {
15088 self.watermark
15089 .as_ref()
15090 .map(|field| field as _)
15091 .unwrap_or_else(|| super::Watermark::default_instance() as _)
15092 }
15093 pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
15095 self.watermark.as_mut().map(|field| field as _)
15096 }
15097 pub fn watermark_mut(&mut self) -> &mut super::Watermark {
15100 self.watermark.get_or_insert_default()
15101 }
15102 pub fn watermark_opt(&self) -> Option<&super::Watermark> {
15104 self.watermark.as_ref().map(|field| field as _)
15105 }
15106 pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
15108 self.watermark = Some(field.into().into());
15109 }
15110 pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
15112 self.set_watermark(field.into());
15113 self
15114 }
15115 }
15116 impl super::SubscribeTransactionsRequest {
15117 pub const fn const_default() -> Self {
15118 Self {
15119 read_mask: None,
15120 filter: None,
15121 }
15122 }
15123 #[doc(hidden)]
15124 pub fn default_instance() -> &'static Self {
15125 static DEFAULT: super::SubscribeTransactionsRequest = super::SubscribeTransactionsRequest::const_default();
15126 &DEFAULT
15127 }
15128 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
15130 self.read_mask.as_mut().map(|field| field as _)
15131 }
15132 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
15135 self.read_mask.get_or_insert_default()
15136 }
15137 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
15139 self.read_mask.as_ref().map(|field| field as _)
15140 }
15141 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
15143 self.read_mask = Some(field.into().into());
15144 }
15145 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
15147 mut self,
15148 field: T,
15149 ) -> Self {
15150 self.set_read_mask(field.into());
15151 self
15152 }
15153 pub fn filter(&self) -> &super::TransactionFilter {
15155 self.filter
15156 .as_ref()
15157 .map(|field| field as _)
15158 .unwrap_or_else(|| super::TransactionFilter::default_instance() as _)
15159 }
15160 pub fn filter_opt_mut(&mut self) -> Option<&mut super::TransactionFilter> {
15162 self.filter.as_mut().map(|field| field as _)
15163 }
15164 pub fn filter_mut(&mut self) -> &mut super::TransactionFilter {
15167 self.filter.get_or_insert_default()
15168 }
15169 pub fn filter_opt(&self) -> Option<&super::TransactionFilter> {
15171 self.filter.as_ref().map(|field| field as _)
15172 }
15173 pub fn set_filter<T: Into<super::TransactionFilter>>(&mut self, field: T) {
15175 self.filter = Some(field.into().into());
15176 }
15177 pub fn with_filter<T: Into<super::TransactionFilter>>(
15179 mut self,
15180 field: T,
15181 ) -> Self {
15182 self.set_filter(field.into());
15183 self
15184 }
15185 }
15186 impl super::SubscribeTransactionsResponse {
15187 pub const fn const_default() -> Self {
15188 Self {
15189 transaction: None,
15190 watermark: None,
15191 }
15192 }
15193 #[doc(hidden)]
15194 pub fn default_instance() -> &'static Self {
15195 static DEFAULT: super::SubscribeTransactionsResponse = super::SubscribeTransactionsResponse::const_default();
15196 &DEFAULT
15197 }
15198 pub fn transaction(&self) -> &super::ExecutedTransaction {
15200 self.transaction
15201 .as_ref()
15202 .map(|field| field as _)
15203 .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
15204 }
15205 pub fn transaction_opt_mut(
15207 &mut self,
15208 ) -> Option<&mut super::ExecutedTransaction> {
15209 self.transaction.as_mut().map(|field| field as _)
15210 }
15211 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
15214 self.transaction.get_or_insert_default()
15215 }
15216 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
15218 self.transaction.as_ref().map(|field| field as _)
15219 }
15220 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
15222 &mut self,
15223 field: T,
15224 ) {
15225 self.transaction = Some(field.into().into());
15226 }
15227 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
15229 mut self,
15230 field: T,
15231 ) -> Self {
15232 self.set_transaction(field.into());
15233 self
15234 }
15235 pub fn watermark(&self) -> &super::Watermark {
15237 self.watermark
15238 .as_ref()
15239 .map(|field| field as _)
15240 .unwrap_or_else(|| super::Watermark::default_instance() as _)
15241 }
15242 pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
15244 self.watermark.as_mut().map(|field| field as _)
15245 }
15246 pub fn watermark_mut(&mut self) -> &mut super::Watermark {
15249 self.watermark.get_or_insert_default()
15250 }
15251 pub fn watermark_opt(&self) -> Option<&super::Watermark> {
15253 self.watermark.as_ref().map(|field| field as _)
15254 }
15255 pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
15257 self.watermark = Some(field.into().into());
15258 }
15259 pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
15261 self.set_watermark(field.into());
15262 self
15263 }
15264 }
15265 impl super::SystemPackage {
15266 pub const fn const_default() -> Self {
15267 Self {
15268 version: None,
15269 modules: Vec::new(),
15270 dependencies: Vec::new(),
15271 }
15272 }
15273 #[doc(hidden)]
15274 pub fn default_instance() -> &'static Self {
15275 static DEFAULT: super::SystemPackage = super::SystemPackage::const_default();
15276 &DEFAULT
15277 }
15278 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
15280 self.version.as_mut().map(|field| field as _)
15281 }
15282 pub fn version_mut(&mut self) -> &mut u64 {
15285 self.version.get_or_insert_default()
15286 }
15287 pub fn version_opt(&self) -> Option<u64> {
15289 self.version.as_ref().map(|field| *field)
15290 }
15291 pub fn set_version(&mut self, field: u64) {
15293 self.version = Some(field);
15294 }
15295 pub fn with_version(mut self, field: u64) -> Self {
15297 self.set_version(field);
15298 self
15299 }
15300 pub fn modules(&self) -> &[::prost::bytes::Bytes] {
15302 &self.modules
15303 }
15304 pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
15307 &mut self.modules
15308 }
15309 pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
15311 self.modules = field;
15312 }
15313 pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
15315 self.set_modules(field);
15316 self
15317 }
15318 pub fn dependencies(&self) -> &[String] {
15320 &self.dependencies
15321 }
15322 pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
15325 &mut self.dependencies
15326 }
15327 pub fn set_dependencies(&mut self, field: Vec<String>) {
15329 self.dependencies = field;
15330 }
15331 pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
15333 self.set_dependencies(field);
15334 self
15335 }
15336 }
15337 impl super::SystemParameters {
15338 pub const fn const_default() -> Self {
15339 Self {
15340 epoch_duration_ms: None,
15341 stake_subsidy_start_epoch: None,
15342 min_validator_count: None,
15343 max_validator_count: None,
15344 min_validator_joining_stake: None,
15345 validator_low_stake_threshold: None,
15346 validator_very_low_stake_threshold: None,
15347 validator_low_stake_grace_period: None,
15348 extra_fields: None,
15349 }
15350 }
15351 #[doc(hidden)]
15352 pub fn default_instance() -> &'static Self {
15353 static DEFAULT: super::SystemParameters = super::SystemParameters::const_default();
15354 &DEFAULT
15355 }
15356 pub fn epoch_duration_ms_opt_mut(&mut self) -> Option<&mut u64> {
15358 self.epoch_duration_ms.as_mut().map(|field| field as _)
15359 }
15360 pub fn epoch_duration_ms_mut(&mut self) -> &mut u64 {
15363 self.epoch_duration_ms.get_or_insert_default()
15364 }
15365 pub fn epoch_duration_ms_opt(&self) -> Option<u64> {
15367 self.epoch_duration_ms.as_ref().map(|field| *field)
15368 }
15369 pub fn set_epoch_duration_ms(&mut self, field: u64) {
15371 self.epoch_duration_ms = Some(field);
15372 }
15373 pub fn with_epoch_duration_ms(mut self, field: u64) -> Self {
15375 self.set_epoch_duration_ms(field);
15376 self
15377 }
15378 pub fn stake_subsidy_start_epoch_opt_mut(&mut self) -> Option<&mut u64> {
15380 self.stake_subsidy_start_epoch.as_mut().map(|field| field as _)
15381 }
15382 pub fn stake_subsidy_start_epoch_mut(&mut self) -> &mut u64 {
15385 self.stake_subsidy_start_epoch.get_or_insert_default()
15386 }
15387 pub fn stake_subsidy_start_epoch_opt(&self) -> Option<u64> {
15389 self.stake_subsidy_start_epoch.as_ref().map(|field| *field)
15390 }
15391 pub fn set_stake_subsidy_start_epoch(&mut self, field: u64) {
15393 self.stake_subsidy_start_epoch = Some(field);
15394 }
15395 pub fn with_stake_subsidy_start_epoch(mut self, field: u64) -> Self {
15397 self.set_stake_subsidy_start_epoch(field);
15398 self
15399 }
15400 pub fn min_validator_count_opt_mut(&mut self) -> Option<&mut u64> {
15402 self.min_validator_count.as_mut().map(|field| field as _)
15403 }
15404 pub fn min_validator_count_mut(&mut self) -> &mut u64 {
15407 self.min_validator_count.get_or_insert_default()
15408 }
15409 pub fn min_validator_count_opt(&self) -> Option<u64> {
15411 self.min_validator_count.as_ref().map(|field| *field)
15412 }
15413 pub fn set_min_validator_count(&mut self, field: u64) {
15415 self.min_validator_count = Some(field);
15416 }
15417 pub fn with_min_validator_count(mut self, field: u64) -> Self {
15419 self.set_min_validator_count(field);
15420 self
15421 }
15422 pub fn max_validator_count_opt_mut(&mut self) -> Option<&mut u64> {
15424 self.max_validator_count.as_mut().map(|field| field as _)
15425 }
15426 pub fn max_validator_count_mut(&mut self) -> &mut u64 {
15429 self.max_validator_count.get_or_insert_default()
15430 }
15431 pub fn max_validator_count_opt(&self) -> Option<u64> {
15433 self.max_validator_count.as_ref().map(|field| *field)
15434 }
15435 pub fn set_max_validator_count(&mut self, field: u64) {
15437 self.max_validator_count = Some(field);
15438 }
15439 pub fn with_max_validator_count(mut self, field: u64) -> Self {
15441 self.set_max_validator_count(field);
15442 self
15443 }
15444 pub fn min_validator_joining_stake_opt_mut(&mut self) -> Option<&mut u64> {
15446 self.min_validator_joining_stake.as_mut().map(|field| field as _)
15447 }
15448 pub fn min_validator_joining_stake_mut(&mut self) -> &mut u64 {
15451 self.min_validator_joining_stake.get_or_insert_default()
15452 }
15453 pub fn min_validator_joining_stake_opt(&self) -> Option<u64> {
15455 self.min_validator_joining_stake.as_ref().map(|field| *field)
15456 }
15457 pub fn set_min_validator_joining_stake(&mut self, field: u64) {
15459 self.min_validator_joining_stake = Some(field);
15460 }
15461 pub fn with_min_validator_joining_stake(mut self, field: u64) -> Self {
15463 self.set_min_validator_joining_stake(field);
15464 self
15465 }
15466 pub fn validator_low_stake_threshold_opt_mut(&mut self) -> Option<&mut u64> {
15468 self.validator_low_stake_threshold.as_mut().map(|field| field as _)
15469 }
15470 pub fn validator_low_stake_threshold_mut(&mut self) -> &mut u64 {
15473 self.validator_low_stake_threshold.get_or_insert_default()
15474 }
15475 pub fn validator_low_stake_threshold_opt(&self) -> Option<u64> {
15477 self.validator_low_stake_threshold.as_ref().map(|field| *field)
15478 }
15479 pub fn set_validator_low_stake_threshold(&mut self, field: u64) {
15481 self.validator_low_stake_threshold = Some(field);
15482 }
15483 pub fn with_validator_low_stake_threshold(mut self, field: u64) -> Self {
15485 self.set_validator_low_stake_threshold(field);
15486 self
15487 }
15488 pub fn validator_very_low_stake_threshold_opt_mut(
15490 &mut self,
15491 ) -> Option<&mut u64> {
15492 self.validator_very_low_stake_threshold.as_mut().map(|field| field as _)
15493 }
15494 pub fn validator_very_low_stake_threshold_mut(&mut self) -> &mut u64 {
15497 self.validator_very_low_stake_threshold.get_or_insert_default()
15498 }
15499 pub fn validator_very_low_stake_threshold_opt(&self) -> Option<u64> {
15501 self.validator_very_low_stake_threshold.as_ref().map(|field| *field)
15502 }
15503 pub fn set_validator_very_low_stake_threshold(&mut self, field: u64) {
15505 self.validator_very_low_stake_threshold = Some(field);
15506 }
15507 pub fn with_validator_very_low_stake_threshold(mut self, field: u64) -> Self {
15509 self.set_validator_very_low_stake_threshold(field);
15510 self
15511 }
15512 pub fn validator_low_stake_grace_period_opt_mut(&mut self) -> Option<&mut u64> {
15514 self.validator_low_stake_grace_period.as_mut().map(|field| field as _)
15515 }
15516 pub fn validator_low_stake_grace_period_mut(&mut self) -> &mut u64 {
15519 self.validator_low_stake_grace_period.get_or_insert_default()
15520 }
15521 pub fn validator_low_stake_grace_period_opt(&self) -> Option<u64> {
15523 self.validator_low_stake_grace_period.as_ref().map(|field| *field)
15524 }
15525 pub fn set_validator_low_stake_grace_period(&mut self, field: u64) {
15527 self.validator_low_stake_grace_period = Some(field);
15528 }
15529 pub fn with_validator_low_stake_grace_period(mut self, field: u64) -> Self {
15531 self.set_validator_low_stake_grace_period(field);
15532 self
15533 }
15534 pub fn extra_fields(&self) -> &super::MoveTable {
15536 self.extra_fields
15537 .as_ref()
15538 .map(|field| field as _)
15539 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
15540 }
15541 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
15543 self.extra_fields.as_mut().map(|field| field as _)
15544 }
15545 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
15548 self.extra_fields.get_or_insert_default()
15549 }
15550 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
15552 self.extra_fields.as_ref().map(|field| field as _)
15553 }
15554 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
15556 self.extra_fields = Some(field.into().into());
15557 }
15558 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
15560 self.set_extra_fields(field.into());
15561 self
15562 }
15563 }
15564 impl super::SystemState {
15565 pub const fn const_default() -> Self {
15566 Self {
15567 version: None,
15568 epoch: None,
15569 protocol_version: None,
15570 validators: None,
15571 storage_fund: None,
15572 parameters: None,
15573 reference_gas_price: None,
15574 validator_report_records: Vec::new(),
15575 stake_subsidy: None,
15576 safe_mode: None,
15577 safe_mode_storage_rewards: None,
15578 safe_mode_computation_rewards: None,
15579 safe_mode_storage_rebates: None,
15580 safe_mode_non_refundable_storage_fee: None,
15581 epoch_start_timestamp_ms: None,
15582 extra_fields: None,
15583 }
15584 }
15585 #[doc(hidden)]
15586 pub fn default_instance() -> &'static Self {
15587 static DEFAULT: super::SystemState = super::SystemState::const_default();
15588 &DEFAULT
15589 }
15590 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
15592 self.version.as_mut().map(|field| field as _)
15593 }
15594 pub fn version_mut(&mut self) -> &mut u64 {
15597 self.version.get_or_insert_default()
15598 }
15599 pub fn version_opt(&self) -> Option<u64> {
15601 self.version.as_ref().map(|field| *field)
15602 }
15603 pub fn set_version(&mut self, field: u64) {
15605 self.version = Some(field);
15606 }
15607 pub fn with_version(mut self, field: u64) -> Self {
15609 self.set_version(field);
15610 self
15611 }
15612 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
15614 self.epoch.as_mut().map(|field| field as _)
15615 }
15616 pub fn epoch_mut(&mut self) -> &mut u64 {
15619 self.epoch.get_or_insert_default()
15620 }
15621 pub fn epoch_opt(&self) -> Option<u64> {
15623 self.epoch.as_ref().map(|field| *field)
15624 }
15625 pub fn set_epoch(&mut self, field: u64) {
15627 self.epoch = Some(field);
15628 }
15629 pub fn with_epoch(mut self, field: u64) -> Self {
15631 self.set_epoch(field);
15632 self
15633 }
15634 pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
15636 self.protocol_version.as_mut().map(|field| field as _)
15637 }
15638 pub fn protocol_version_mut(&mut self) -> &mut u64 {
15641 self.protocol_version.get_or_insert_default()
15642 }
15643 pub fn protocol_version_opt(&self) -> Option<u64> {
15645 self.protocol_version.as_ref().map(|field| *field)
15646 }
15647 pub fn set_protocol_version(&mut self, field: u64) {
15649 self.protocol_version = Some(field);
15650 }
15651 pub fn with_protocol_version(mut self, field: u64) -> Self {
15653 self.set_protocol_version(field);
15654 self
15655 }
15656 pub fn validators(&self) -> &super::ValidatorSet {
15658 self.validators
15659 .as_ref()
15660 .map(|field| field as _)
15661 .unwrap_or_else(|| super::ValidatorSet::default_instance() as _)
15662 }
15663 pub fn validators_opt_mut(&mut self) -> Option<&mut super::ValidatorSet> {
15665 self.validators.as_mut().map(|field| field as _)
15666 }
15667 pub fn validators_mut(&mut self) -> &mut super::ValidatorSet {
15670 self.validators.get_or_insert_default()
15671 }
15672 pub fn validators_opt(&self) -> Option<&super::ValidatorSet> {
15674 self.validators.as_ref().map(|field| field as _)
15675 }
15676 pub fn set_validators<T: Into<super::ValidatorSet>>(&mut self, field: T) {
15678 self.validators = Some(field.into().into());
15679 }
15680 pub fn with_validators<T: Into<super::ValidatorSet>>(
15682 mut self,
15683 field: T,
15684 ) -> Self {
15685 self.set_validators(field.into());
15686 self
15687 }
15688 pub fn storage_fund(&self) -> &super::StorageFund {
15690 self.storage_fund
15691 .as_ref()
15692 .map(|field| field as _)
15693 .unwrap_or_else(|| super::StorageFund::default_instance() as _)
15694 }
15695 pub fn storage_fund_opt_mut(&mut self) -> Option<&mut super::StorageFund> {
15697 self.storage_fund.as_mut().map(|field| field as _)
15698 }
15699 pub fn storage_fund_mut(&mut self) -> &mut super::StorageFund {
15702 self.storage_fund.get_or_insert_default()
15703 }
15704 pub fn storage_fund_opt(&self) -> Option<&super::StorageFund> {
15706 self.storage_fund.as_ref().map(|field| field as _)
15707 }
15708 pub fn set_storage_fund<T: Into<super::StorageFund>>(&mut self, field: T) {
15710 self.storage_fund = Some(field.into().into());
15711 }
15712 pub fn with_storage_fund<T: Into<super::StorageFund>>(
15714 mut self,
15715 field: T,
15716 ) -> Self {
15717 self.set_storage_fund(field.into());
15718 self
15719 }
15720 pub fn parameters(&self) -> &super::SystemParameters {
15722 self.parameters
15723 .as_ref()
15724 .map(|field| field as _)
15725 .unwrap_or_else(|| super::SystemParameters::default_instance() as _)
15726 }
15727 pub fn parameters_opt_mut(&mut self) -> Option<&mut super::SystemParameters> {
15729 self.parameters.as_mut().map(|field| field as _)
15730 }
15731 pub fn parameters_mut(&mut self) -> &mut super::SystemParameters {
15734 self.parameters.get_or_insert_default()
15735 }
15736 pub fn parameters_opt(&self) -> Option<&super::SystemParameters> {
15738 self.parameters.as_ref().map(|field| field as _)
15739 }
15740 pub fn set_parameters<T: Into<super::SystemParameters>>(&mut self, field: T) {
15742 self.parameters = Some(field.into().into());
15743 }
15744 pub fn with_parameters<T: Into<super::SystemParameters>>(
15746 mut self,
15747 field: T,
15748 ) -> Self {
15749 self.set_parameters(field.into());
15750 self
15751 }
15752 pub fn reference_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
15754 self.reference_gas_price.as_mut().map(|field| field as _)
15755 }
15756 pub fn reference_gas_price_mut(&mut self) -> &mut u64 {
15759 self.reference_gas_price.get_or_insert_default()
15760 }
15761 pub fn reference_gas_price_opt(&self) -> Option<u64> {
15763 self.reference_gas_price.as_ref().map(|field| *field)
15764 }
15765 pub fn set_reference_gas_price(&mut self, field: u64) {
15767 self.reference_gas_price = Some(field);
15768 }
15769 pub fn with_reference_gas_price(mut self, field: u64) -> Self {
15771 self.set_reference_gas_price(field);
15772 self
15773 }
15774 pub fn validator_report_records(&self) -> &[super::ValidatorReportRecord] {
15776 &self.validator_report_records
15777 }
15778 pub fn validator_report_records_mut(
15781 &mut self,
15782 ) -> &mut Vec<super::ValidatorReportRecord> {
15783 &mut self.validator_report_records
15784 }
15785 pub fn set_validator_report_records(
15787 &mut self,
15788 field: Vec<super::ValidatorReportRecord>,
15789 ) {
15790 self.validator_report_records = field;
15791 }
15792 pub fn with_validator_report_records(
15794 mut self,
15795 field: Vec<super::ValidatorReportRecord>,
15796 ) -> Self {
15797 self.set_validator_report_records(field);
15798 self
15799 }
15800 pub fn stake_subsidy(&self) -> &super::StakeSubsidy {
15802 self.stake_subsidy
15803 .as_ref()
15804 .map(|field| field as _)
15805 .unwrap_or_else(|| super::StakeSubsidy::default_instance() as _)
15806 }
15807 pub fn stake_subsidy_opt_mut(&mut self) -> Option<&mut super::StakeSubsidy> {
15809 self.stake_subsidy.as_mut().map(|field| field as _)
15810 }
15811 pub fn stake_subsidy_mut(&mut self) -> &mut super::StakeSubsidy {
15814 self.stake_subsidy.get_or_insert_default()
15815 }
15816 pub fn stake_subsidy_opt(&self) -> Option<&super::StakeSubsidy> {
15818 self.stake_subsidy.as_ref().map(|field| field as _)
15819 }
15820 pub fn set_stake_subsidy<T: Into<super::StakeSubsidy>>(&mut self, field: T) {
15822 self.stake_subsidy = Some(field.into().into());
15823 }
15824 pub fn with_stake_subsidy<T: Into<super::StakeSubsidy>>(
15826 mut self,
15827 field: T,
15828 ) -> Self {
15829 self.set_stake_subsidy(field.into());
15830 self
15831 }
15832 pub fn safe_mode_opt_mut(&mut self) -> Option<&mut bool> {
15834 self.safe_mode.as_mut().map(|field| field as _)
15835 }
15836 pub fn safe_mode_mut(&mut self) -> &mut bool {
15839 self.safe_mode.get_or_insert_default()
15840 }
15841 pub fn safe_mode_opt(&self) -> Option<bool> {
15843 self.safe_mode.as_ref().map(|field| *field)
15844 }
15845 pub fn set_safe_mode(&mut self, field: bool) {
15847 self.safe_mode = Some(field);
15848 }
15849 pub fn with_safe_mode(mut self, field: bool) -> Self {
15851 self.set_safe_mode(field);
15852 self
15853 }
15854 pub fn safe_mode_storage_rewards_opt_mut(&mut self) -> Option<&mut u64> {
15856 self.safe_mode_storage_rewards.as_mut().map(|field| field as _)
15857 }
15858 pub fn safe_mode_storage_rewards_mut(&mut self) -> &mut u64 {
15861 self.safe_mode_storage_rewards.get_or_insert_default()
15862 }
15863 pub fn safe_mode_storage_rewards_opt(&self) -> Option<u64> {
15865 self.safe_mode_storage_rewards.as_ref().map(|field| *field)
15866 }
15867 pub fn set_safe_mode_storage_rewards(&mut self, field: u64) {
15869 self.safe_mode_storage_rewards = Some(field);
15870 }
15871 pub fn with_safe_mode_storage_rewards(mut self, field: u64) -> Self {
15873 self.set_safe_mode_storage_rewards(field);
15874 self
15875 }
15876 pub fn safe_mode_computation_rewards_opt_mut(&mut self) -> Option<&mut u64> {
15878 self.safe_mode_computation_rewards.as_mut().map(|field| field as _)
15879 }
15880 pub fn safe_mode_computation_rewards_mut(&mut self) -> &mut u64 {
15883 self.safe_mode_computation_rewards.get_or_insert_default()
15884 }
15885 pub fn safe_mode_computation_rewards_opt(&self) -> Option<u64> {
15887 self.safe_mode_computation_rewards.as_ref().map(|field| *field)
15888 }
15889 pub fn set_safe_mode_computation_rewards(&mut self, field: u64) {
15891 self.safe_mode_computation_rewards = Some(field);
15892 }
15893 pub fn with_safe_mode_computation_rewards(mut self, field: u64) -> Self {
15895 self.set_safe_mode_computation_rewards(field);
15896 self
15897 }
15898 pub fn safe_mode_storage_rebates_opt_mut(&mut self) -> Option<&mut u64> {
15900 self.safe_mode_storage_rebates.as_mut().map(|field| field as _)
15901 }
15902 pub fn safe_mode_storage_rebates_mut(&mut self) -> &mut u64 {
15905 self.safe_mode_storage_rebates.get_or_insert_default()
15906 }
15907 pub fn safe_mode_storage_rebates_opt(&self) -> Option<u64> {
15909 self.safe_mode_storage_rebates.as_ref().map(|field| *field)
15910 }
15911 pub fn set_safe_mode_storage_rebates(&mut self, field: u64) {
15913 self.safe_mode_storage_rebates = Some(field);
15914 }
15915 pub fn with_safe_mode_storage_rebates(mut self, field: u64) -> Self {
15917 self.set_safe_mode_storage_rebates(field);
15918 self
15919 }
15920 pub fn safe_mode_non_refundable_storage_fee_opt_mut(
15922 &mut self,
15923 ) -> Option<&mut u64> {
15924 self.safe_mode_non_refundable_storage_fee.as_mut().map(|field| field as _)
15925 }
15926 pub fn safe_mode_non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
15929 self.safe_mode_non_refundable_storage_fee.get_or_insert_default()
15930 }
15931 pub fn safe_mode_non_refundable_storage_fee_opt(&self) -> Option<u64> {
15933 self.safe_mode_non_refundable_storage_fee.as_ref().map(|field| *field)
15934 }
15935 pub fn set_safe_mode_non_refundable_storage_fee(&mut self, field: u64) {
15937 self.safe_mode_non_refundable_storage_fee = Some(field);
15938 }
15939 pub fn with_safe_mode_non_refundable_storage_fee(mut self, field: u64) -> Self {
15941 self.set_safe_mode_non_refundable_storage_fee(field);
15942 self
15943 }
15944 pub fn epoch_start_timestamp_ms_opt_mut(&mut self) -> Option<&mut u64> {
15946 self.epoch_start_timestamp_ms.as_mut().map(|field| field as _)
15947 }
15948 pub fn epoch_start_timestamp_ms_mut(&mut self) -> &mut u64 {
15951 self.epoch_start_timestamp_ms.get_or_insert_default()
15952 }
15953 pub fn epoch_start_timestamp_ms_opt(&self) -> Option<u64> {
15955 self.epoch_start_timestamp_ms.as_ref().map(|field| *field)
15956 }
15957 pub fn set_epoch_start_timestamp_ms(&mut self, field: u64) {
15959 self.epoch_start_timestamp_ms = Some(field);
15960 }
15961 pub fn with_epoch_start_timestamp_ms(mut self, field: u64) -> Self {
15963 self.set_epoch_start_timestamp_ms(field);
15964 self
15965 }
15966 pub fn extra_fields(&self) -> &super::MoveTable {
15968 self.extra_fields
15969 .as_ref()
15970 .map(|field| field as _)
15971 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
15972 }
15973 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
15975 self.extra_fields.as_mut().map(|field| field as _)
15976 }
15977 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
15980 self.extra_fields.get_or_insert_default()
15981 }
15982 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
15984 self.extra_fields.as_ref().map(|field| field as _)
15985 }
15986 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
15988 self.extra_fields = Some(field.into().into());
15989 }
15990 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
15992 self.set_extra_fields(field.into());
15993 self
15994 }
15995 }
15996 impl super::Transaction {
15997 pub const fn const_default() -> Self {
15998 Self {
15999 bcs: None,
16000 digest: None,
16001 version: None,
16002 kind: None,
16003 sender: None,
16004 gas_payment: None,
16005 expiration: None,
16006 }
16007 }
16008 #[doc(hidden)]
16009 pub fn default_instance() -> &'static Self {
16010 static DEFAULT: super::Transaction = super::Transaction::const_default();
16011 &DEFAULT
16012 }
16013 pub fn bcs(&self) -> &super::Bcs {
16015 self.bcs
16016 .as_ref()
16017 .map(|field| field as _)
16018 .unwrap_or_else(|| super::Bcs::default_instance() as _)
16019 }
16020 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
16022 self.bcs.as_mut().map(|field| field as _)
16023 }
16024 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
16027 self.bcs.get_or_insert_default()
16028 }
16029 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
16031 self.bcs.as_ref().map(|field| field as _)
16032 }
16033 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
16035 self.bcs = Some(field.into().into());
16036 }
16037 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
16039 self.set_bcs(field.into());
16040 self
16041 }
16042 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
16044 self.digest.as_mut().map(|field| field as _)
16045 }
16046 pub fn digest_mut(&mut self) -> &mut String {
16049 self.digest.get_or_insert_default()
16050 }
16051 pub fn digest_opt(&self) -> Option<&str> {
16053 self.digest.as_ref().map(|field| field as _)
16054 }
16055 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
16057 self.digest = Some(field.into().into());
16058 }
16059 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
16061 self.set_digest(field.into());
16062 self
16063 }
16064 pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
16066 self.version.as_mut().map(|field| field as _)
16067 }
16068 pub fn version_mut(&mut self) -> &mut i32 {
16071 self.version.get_or_insert_default()
16072 }
16073 pub fn version_opt(&self) -> Option<i32> {
16075 self.version.as_ref().map(|field| *field)
16076 }
16077 pub fn set_version(&mut self, field: i32) {
16079 self.version = Some(field);
16080 }
16081 pub fn with_version(mut self, field: i32) -> Self {
16083 self.set_version(field);
16084 self
16085 }
16086 pub fn kind(&self) -> &super::TransactionKind {
16088 self.kind
16089 .as_ref()
16090 .map(|field| field as _)
16091 .unwrap_or_else(|| super::TransactionKind::default_instance() as _)
16092 }
16093 pub fn kind_opt_mut(&mut self) -> Option<&mut super::TransactionKind> {
16095 self.kind.as_mut().map(|field| field as _)
16096 }
16097 pub fn kind_mut(&mut self) -> &mut super::TransactionKind {
16100 self.kind.get_or_insert_default()
16101 }
16102 pub fn kind_opt(&self) -> Option<&super::TransactionKind> {
16104 self.kind.as_ref().map(|field| field as _)
16105 }
16106 pub fn set_kind<T: Into<super::TransactionKind>>(&mut self, field: T) {
16108 self.kind = Some(field.into().into());
16109 }
16110 pub fn with_kind<T: Into<super::TransactionKind>>(mut self, field: T) -> Self {
16112 self.set_kind(field.into());
16113 self
16114 }
16115 pub fn sender_opt_mut(&mut self) -> Option<&mut String> {
16117 self.sender.as_mut().map(|field| field as _)
16118 }
16119 pub fn sender_mut(&mut self) -> &mut String {
16122 self.sender.get_or_insert_default()
16123 }
16124 pub fn sender_opt(&self) -> Option<&str> {
16126 self.sender.as_ref().map(|field| field as _)
16127 }
16128 pub fn set_sender<T: Into<String>>(&mut self, field: T) {
16130 self.sender = Some(field.into().into());
16131 }
16132 pub fn with_sender<T: Into<String>>(mut self, field: T) -> Self {
16134 self.set_sender(field.into());
16135 self
16136 }
16137 pub fn gas_payment(&self) -> &super::GasPayment {
16139 self.gas_payment
16140 .as_ref()
16141 .map(|field| field as _)
16142 .unwrap_or_else(|| super::GasPayment::default_instance() as _)
16143 }
16144 pub fn gas_payment_opt_mut(&mut self) -> Option<&mut super::GasPayment> {
16146 self.gas_payment.as_mut().map(|field| field as _)
16147 }
16148 pub fn gas_payment_mut(&mut self) -> &mut super::GasPayment {
16151 self.gas_payment.get_or_insert_default()
16152 }
16153 pub fn gas_payment_opt(&self) -> Option<&super::GasPayment> {
16155 self.gas_payment.as_ref().map(|field| field as _)
16156 }
16157 pub fn set_gas_payment<T: Into<super::GasPayment>>(&mut self, field: T) {
16159 self.gas_payment = Some(field.into().into());
16160 }
16161 pub fn with_gas_payment<T: Into<super::GasPayment>>(mut self, field: T) -> Self {
16163 self.set_gas_payment(field.into());
16164 self
16165 }
16166 pub fn expiration(&self) -> &super::TransactionExpiration {
16168 self.expiration
16169 .as_ref()
16170 .map(|field| field as _)
16171 .unwrap_or_else(|| super::TransactionExpiration::default_instance() as _)
16172 }
16173 pub fn expiration_opt_mut(
16175 &mut self,
16176 ) -> Option<&mut super::TransactionExpiration> {
16177 self.expiration.as_mut().map(|field| field as _)
16178 }
16179 pub fn expiration_mut(&mut self) -> &mut super::TransactionExpiration {
16182 self.expiration.get_or_insert_default()
16183 }
16184 pub fn expiration_opt(&self) -> Option<&super::TransactionExpiration> {
16186 self.expiration.as_ref().map(|field| field as _)
16187 }
16188 pub fn set_expiration<T: Into<super::TransactionExpiration>>(
16190 &mut self,
16191 field: T,
16192 ) {
16193 self.expiration = Some(field.into().into());
16194 }
16195 pub fn with_expiration<T: Into<super::TransactionExpiration>>(
16197 mut self,
16198 field: T,
16199 ) -> Self {
16200 self.set_expiration(field.into());
16201 self
16202 }
16203 }
16204 impl super::TransactionEffects {
16205 pub const fn const_default() -> Self {
16206 Self {
16207 bcs: None,
16208 digest: None,
16209 version: None,
16210 status: None,
16211 epoch: None,
16212 gas_used: None,
16213 transaction_digest: None,
16214 gas_object: None,
16215 events_digest: None,
16216 dependencies: Vec::new(),
16217 lamport_version: None,
16218 changed_objects: Vec::new(),
16219 unchanged_consensus_objects: Vec::new(),
16220 auxiliary_data_digest: None,
16221 unchanged_loaded_runtime_objects: Vec::new(),
16222 }
16223 }
16224 #[doc(hidden)]
16225 pub fn default_instance() -> &'static Self {
16226 static DEFAULT: super::TransactionEffects = super::TransactionEffects::const_default();
16227 &DEFAULT
16228 }
16229 pub fn bcs(&self) -> &super::Bcs {
16231 self.bcs
16232 .as_ref()
16233 .map(|field| field as _)
16234 .unwrap_or_else(|| super::Bcs::default_instance() as _)
16235 }
16236 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
16238 self.bcs.as_mut().map(|field| field as _)
16239 }
16240 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
16243 self.bcs.get_or_insert_default()
16244 }
16245 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
16247 self.bcs.as_ref().map(|field| field as _)
16248 }
16249 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
16251 self.bcs = Some(field.into().into());
16252 }
16253 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
16255 self.set_bcs(field.into());
16256 self
16257 }
16258 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
16260 self.digest.as_mut().map(|field| field as _)
16261 }
16262 pub fn digest_mut(&mut self) -> &mut String {
16265 self.digest.get_or_insert_default()
16266 }
16267 pub fn digest_opt(&self) -> Option<&str> {
16269 self.digest.as_ref().map(|field| field as _)
16270 }
16271 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
16273 self.digest = Some(field.into().into());
16274 }
16275 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
16277 self.set_digest(field.into());
16278 self
16279 }
16280 pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
16282 self.version.as_mut().map(|field| field as _)
16283 }
16284 pub fn version_mut(&mut self) -> &mut i32 {
16287 self.version.get_or_insert_default()
16288 }
16289 pub fn version_opt(&self) -> Option<i32> {
16291 self.version.as_ref().map(|field| *field)
16292 }
16293 pub fn set_version(&mut self, field: i32) {
16295 self.version = Some(field);
16296 }
16297 pub fn with_version(mut self, field: i32) -> Self {
16299 self.set_version(field);
16300 self
16301 }
16302 pub fn status(&self) -> &super::ExecutionStatus {
16304 self.status
16305 .as_ref()
16306 .map(|field| field as _)
16307 .unwrap_or_else(|| super::ExecutionStatus::default_instance() as _)
16308 }
16309 pub fn status_opt_mut(&mut self) -> Option<&mut super::ExecutionStatus> {
16311 self.status.as_mut().map(|field| field as _)
16312 }
16313 pub fn status_mut(&mut self) -> &mut super::ExecutionStatus {
16316 self.status.get_or_insert_default()
16317 }
16318 pub fn status_opt(&self) -> Option<&super::ExecutionStatus> {
16320 self.status.as_ref().map(|field| field as _)
16321 }
16322 pub fn set_status<T: Into<super::ExecutionStatus>>(&mut self, field: T) {
16324 self.status = Some(field.into().into());
16325 }
16326 pub fn with_status<T: Into<super::ExecutionStatus>>(mut self, field: T) -> Self {
16328 self.set_status(field.into());
16329 self
16330 }
16331 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
16333 self.epoch.as_mut().map(|field| field as _)
16334 }
16335 pub fn epoch_mut(&mut self) -> &mut u64 {
16338 self.epoch.get_or_insert_default()
16339 }
16340 pub fn epoch_opt(&self) -> Option<u64> {
16342 self.epoch.as_ref().map(|field| *field)
16343 }
16344 pub fn set_epoch(&mut self, field: u64) {
16346 self.epoch = Some(field);
16347 }
16348 pub fn with_epoch(mut self, field: u64) -> Self {
16350 self.set_epoch(field);
16351 self
16352 }
16353 pub fn gas_used(&self) -> &super::GasCostSummary {
16355 self.gas_used
16356 .as_ref()
16357 .map(|field| field as _)
16358 .unwrap_or_else(|| super::GasCostSummary::default_instance() as _)
16359 }
16360 pub fn gas_used_opt_mut(&mut self) -> Option<&mut super::GasCostSummary> {
16362 self.gas_used.as_mut().map(|field| field as _)
16363 }
16364 pub fn gas_used_mut(&mut self) -> &mut super::GasCostSummary {
16367 self.gas_used.get_or_insert_default()
16368 }
16369 pub fn gas_used_opt(&self) -> Option<&super::GasCostSummary> {
16371 self.gas_used.as_ref().map(|field| field as _)
16372 }
16373 pub fn set_gas_used<T: Into<super::GasCostSummary>>(&mut self, field: T) {
16375 self.gas_used = Some(field.into().into());
16376 }
16377 pub fn with_gas_used<T: Into<super::GasCostSummary>>(
16379 mut self,
16380 field: T,
16381 ) -> Self {
16382 self.set_gas_used(field.into());
16383 self
16384 }
16385 pub fn transaction_digest_opt_mut(&mut self) -> Option<&mut String> {
16387 self.transaction_digest.as_mut().map(|field| field as _)
16388 }
16389 pub fn transaction_digest_mut(&mut self) -> &mut String {
16392 self.transaction_digest.get_or_insert_default()
16393 }
16394 pub fn transaction_digest_opt(&self) -> Option<&str> {
16396 self.transaction_digest.as_ref().map(|field| field as _)
16397 }
16398 pub fn set_transaction_digest<T: Into<String>>(&mut self, field: T) {
16400 self.transaction_digest = Some(field.into().into());
16401 }
16402 pub fn with_transaction_digest<T: Into<String>>(mut self, field: T) -> Self {
16404 self.set_transaction_digest(field.into());
16405 self
16406 }
16407 pub fn gas_object(&self) -> &super::ChangedObject {
16409 self.gas_object
16410 .as_ref()
16411 .map(|field| field as _)
16412 .unwrap_or_else(|| super::ChangedObject::default_instance() as _)
16413 }
16414 pub fn gas_object_opt_mut(&mut self) -> Option<&mut super::ChangedObject> {
16416 self.gas_object.as_mut().map(|field| field as _)
16417 }
16418 pub fn gas_object_mut(&mut self) -> &mut super::ChangedObject {
16421 self.gas_object.get_or_insert_default()
16422 }
16423 pub fn gas_object_opt(&self) -> Option<&super::ChangedObject> {
16425 self.gas_object.as_ref().map(|field| field as _)
16426 }
16427 pub fn set_gas_object<T: Into<super::ChangedObject>>(&mut self, field: T) {
16429 self.gas_object = Some(field.into().into());
16430 }
16431 pub fn with_gas_object<T: Into<super::ChangedObject>>(
16433 mut self,
16434 field: T,
16435 ) -> Self {
16436 self.set_gas_object(field.into());
16437 self
16438 }
16439 pub fn events_digest_opt_mut(&mut self) -> Option<&mut String> {
16441 self.events_digest.as_mut().map(|field| field as _)
16442 }
16443 pub fn events_digest_mut(&mut self) -> &mut String {
16446 self.events_digest.get_or_insert_default()
16447 }
16448 pub fn events_digest_opt(&self) -> Option<&str> {
16450 self.events_digest.as_ref().map(|field| field as _)
16451 }
16452 pub fn set_events_digest<T: Into<String>>(&mut self, field: T) {
16454 self.events_digest = Some(field.into().into());
16455 }
16456 pub fn with_events_digest<T: Into<String>>(mut self, field: T) -> Self {
16458 self.set_events_digest(field.into());
16459 self
16460 }
16461 pub fn dependencies(&self) -> &[String] {
16463 &self.dependencies
16464 }
16465 pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
16468 &mut self.dependencies
16469 }
16470 pub fn set_dependencies(&mut self, field: Vec<String>) {
16472 self.dependencies = field;
16473 }
16474 pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
16476 self.set_dependencies(field);
16477 self
16478 }
16479 pub fn lamport_version_opt_mut(&mut self) -> Option<&mut u64> {
16481 self.lamport_version.as_mut().map(|field| field as _)
16482 }
16483 pub fn lamport_version_mut(&mut self) -> &mut u64 {
16486 self.lamport_version.get_or_insert_default()
16487 }
16488 pub fn lamport_version_opt(&self) -> Option<u64> {
16490 self.lamport_version.as_ref().map(|field| *field)
16491 }
16492 pub fn set_lamport_version(&mut self, field: u64) {
16494 self.lamport_version = Some(field);
16495 }
16496 pub fn with_lamport_version(mut self, field: u64) -> Self {
16498 self.set_lamport_version(field);
16499 self
16500 }
16501 pub fn changed_objects(&self) -> &[super::ChangedObject] {
16503 &self.changed_objects
16504 }
16505 pub fn changed_objects_mut(&mut self) -> &mut Vec<super::ChangedObject> {
16508 &mut self.changed_objects
16509 }
16510 pub fn set_changed_objects(&mut self, field: Vec<super::ChangedObject>) {
16512 self.changed_objects = field;
16513 }
16514 pub fn with_changed_objects(mut self, field: Vec<super::ChangedObject>) -> Self {
16516 self.set_changed_objects(field);
16517 self
16518 }
16519 pub fn unchanged_consensus_objects(&self) -> &[super::UnchangedConsensusObject] {
16521 &self.unchanged_consensus_objects
16522 }
16523 pub fn unchanged_consensus_objects_mut(
16526 &mut self,
16527 ) -> &mut Vec<super::UnchangedConsensusObject> {
16528 &mut self.unchanged_consensus_objects
16529 }
16530 pub fn set_unchanged_consensus_objects(
16532 &mut self,
16533 field: Vec<super::UnchangedConsensusObject>,
16534 ) {
16535 self.unchanged_consensus_objects = field;
16536 }
16537 pub fn with_unchanged_consensus_objects(
16539 mut self,
16540 field: Vec<super::UnchangedConsensusObject>,
16541 ) -> Self {
16542 self.set_unchanged_consensus_objects(field);
16543 self
16544 }
16545 pub fn auxiliary_data_digest_opt_mut(&mut self) -> Option<&mut String> {
16547 self.auxiliary_data_digest.as_mut().map(|field| field as _)
16548 }
16549 pub fn auxiliary_data_digest_mut(&mut self) -> &mut String {
16552 self.auxiliary_data_digest.get_or_insert_default()
16553 }
16554 pub fn auxiliary_data_digest_opt(&self) -> Option<&str> {
16556 self.auxiliary_data_digest.as_ref().map(|field| field as _)
16557 }
16558 pub fn set_auxiliary_data_digest<T: Into<String>>(&mut self, field: T) {
16560 self.auxiliary_data_digest = Some(field.into().into());
16561 }
16562 pub fn with_auxiliary_data_digest<T: Into<String>>(mut self, field: T) -> Self {
16564 self.set_auxiliary_data_digest(field.into());
16565 self
16566 }
16567 pub fn unchanged_loaded_runtime_objects(&self) -> &[super::ObjectReference] {
16569 &self.unchanged_loaded_runtime_objects
16570 }
16571 pub fn unchanged_loaded_runtime_objects_mut(
16574 &mut self,
16575 ) -> &mut Vec<super::ObjectReference> {
16576 &mut self.unchanged_loaded_runtime_objects
16577 }
16578 pub fn set_unchanged_loaded_runtime_objects(
16580 &mut self,
16581 field: Vec<super::ObjectReference>,
16582 ) {
16583 self.unchanged_loaded_runtime_objects = field;
16584 }
16585 pub fn with_unchanged_loaded_runtime_objects(
16587 mut self,
16588 field: Vec<super::ObjectReference>,
16589 ) -> Self {
16590 self.set_unchanged_loaded_runtime_objects(field);
16591 self
16592 }
16593 }
16594 impl super::TransactionEvents {
16595 pub const fn const_default() -> Self {
16596 Self {
16597 bcs: None,
16598 digest: None,
16599 events: Vec::new(),
16600 }
16601 }
16602 #[doc(hidden)]
16603 pub fn default_instance() -> &'static Self {
16604 static DEFAULT: super::TransactionEvents = super::TransactionEvents::const_default();
16605 &DEFAULT
16606 }
16607 pub fn bcs(&self) -> &super::Bcs {
16609 self.bcs
16610 .as_ref()
16611 .map(|field| field as _)
16612 .unwrap_or_else(|| super::Bcs::default_instance() as _)
16613 }
16614 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
16616 self.bcs.as_mut().map(|field| field as _)
16617 }
16618 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
16621 self.bcs.get_or_insert_default()
16622 }
16623 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
16625 self.bcs.as_ref().map(|field| field as _)
16626 }
16627 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
16629 self.bcs = Some(field.into().into());
16630 }
16631 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
16633 self.set_bcs(field.into());
16634 self
16635 }
16636 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
16638 self.digest.as_mut().map(|field| field as _)
16639 }
16640 pub fn digest_mut(&mut self) -> &mut String {
16643 self.digest.get_or_insert_default()
16644 }
16645 pub fn digest_opt(&self) -> Option<&str> {
16647 self.digest.as_ref().map(|field| field as _)
16648 }
16649 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
16651 self.digest = Some(field.into().into());
16652 }
16653 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
16655 self.set_digest(field.into());
16656 self
16657 }
16658 pub fn events(&self) -> &[super::Event] {
16660 &self.events
16661 }
16662 pub fn events_mut(&mut self) -> &mut Vec<super::Event> {
16665 &mut self.events
16666 }
16667 pub fn set_events(&mut self, field: Vec<super::Event>) {
16669 self.events = field;
16670 }
16671 pub fn with_events(mut self, field: Vec<super::Event>) -> Self {
16673 self.set_events(field);
16674 self
16675 }
16676 }
16677 impl super::TransactionExpiration {
16678 pub const fn const_default() -> Self {
16679 Self {
16680 kind: None,
16681 epoch: None,
16682 min_epoch: None,
16683 min_timestamp: None,
16684 max_timestamp: None,
16685 chain: None,
16686 nonce: None,
16687 }
16688 }
16689 #[doc(hidden)]
16690 pub fn default_instance() -> &'static Self {
16691 static DEFAULT: super::TransactionExpiration = super::TransactionExpiration::const_default();
16692 &DEFAULT
16693 }
16694 pub fn with_kind<
16696 T: Into<super::transaction_expiration::TransactionExpirationKind>,
16697 >(mut self, field: T) -> Self {
16698 self.set_kind(field.into());
16699 self
16700 }
16701 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
16703 self.epoch.as_mut().map(|field| field as _)
16704 }
16705 pub fn epoch_mut(&mut self) -> &mut u64 {
16708 self.epoch.get_or_insert_default()
16709 }
16710 pub fn epoch_opt(&self) -> Option<u64> {
16712 self.epoch.as_ref().map(|field| *field)
16713 }
16714 pub fn set_epoch(&mut self, field: u64) {
16716 self.epoch = Some(field);
16717 }
16718 pub fn with_epoch(mut self, field: u64) -> Self {
16720 self.set_epoch(field);
16721 self
16722 }
16723 pub fn min_epoch_opt_mut(&mut self) -> Option<&mut u64> {
16725 self.min_epoch.as_mut().map(|field| field as _)
16726 }
16727 pub fn min_epoch_mut(&mut self) -> &mut u64 {
16730 self.min_epoch.get_or_insert_default()
16731 }
16732 pub fn min_epoch_opt(&self) -> Option<u64> {
16734 self.min_epoch.as_ref().map(|field| *field)
16735 }
16736 pub fn set_min_epoch(&mut self, field: u64) {
16738 self.min_epoch = Some(field);
16739 }
16740 pub fn with_min_epoch(mut self, field: u64) -> Self {
16742 self.set_min_epoch(field);
16743 self
16744 }
16745 pub fn min_timestamp_opt_mut(
16747 &mut self,
16748 ) -> Option<&mut ::prost_types::Timestamp> {
16749 self.min_timestamp.as_mut().map(|field| field as _)
16750 }
16751 pub fn min_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
16754 self.min_timestamp.get_or_insert_default()
16755 }
16756 pub fn min_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
16758 self.min_timestamp.as_ref().map(|field| field as _)
16759 }
16760 pub fn set_min_timestamp<T: Into<::prost_types::Timestamp>>(
16762 &mut self,
16763 field: T,
16764 ) {
16765 self.min_timestamp = Some(field.into().into());
16766 }
16767 pub fn with_min_timestamp<T: Into<::prost_types::Timestamp>>(
16769 mut self,
16770 field: T,
16771 ) -> Self {
16772 self.set_min_timestamp(field.into());
16773 self
16774 }
16775 pub fn max_timestamp_opt_mut(
16777 &mut self,
16778 ) -> Option<&mut ::prost_types::Timestamp> {
16779 self.max_timestamp.as_mut().map(|field| field as _)
16780 }
16781 pub fn max_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
16784 self.max_timestamp.get_or_insert_default()
16785 }
16786 pub fn max_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
16788 self.max_timestamp.as_ref().map(|field| field as _)
16789 }
16790 pub fn set_max_timestamp<T: Into<::prost_types::Timestamp>>(
16792 &mut self,
16793 field: T,
16794 ) {
16795 self.max_timestamp = Some(field.into().into());
16796 }
16797 pub fn with_max_timestamp<T: Into<::prost_types::Timestamp>>(
16799 mut self,
16800 field: T,
16801 ) -> Self {
16802 self.set_max_timestamp(field.into());
16803 self
16804 }
16805 pub fn chain_opt_mut(&mut self) -> Option<&mut String> {
16807 self.chain.as_mut().map(|field| field as _)
16808 }
16809 pub fn chain_mut(&mut self) -> &mut String {
16812 self.chain.get_or_insert_default()
16813 }
16814 pub fn chain_opt(&self) -> Option<&str> {
16816 self.chain.as_ref().map(|field| field as _)
16817 }
16818 pub fn set_chain<T: Into<String>>(&mut self, field: T) {
16820 self.chain = Some(field.into().into());
16821 }
16822 pub fn with_chain<T: Into<String>>(mut self, field: T) -> Self {
16824 self.set_chain(field.into());
16825 self
16826 }
16827 pub fn nonce_opt_mut(&mut self) -> Option<&mut u32> {
16829 self.nonce.as_mut().map(|field| field as _)
16830 }
16831 pub fn nonce_mut(&mut self) -> &mut u32 {
16834 self.nonce.get_or_insert_default()
16835 }
16836 pub fn nonce_opt(&self) -> Option<u32> {
16838 self.nonce.as_ref().map(|field| *field)
16839 }
16840 pub fn set_nonce(&mut self, field: u32) {
16842 self.nonce = Some(field);
16843 }
16844 pub fn with_nonce(mut self, field: u32) -> Self {
16846 self.set_nonce(field);
16847 self
16848 }
16849 }
16850 impl super::TransactionFilter {
16851 pub const fn const_default() -> Self {
16852 Self { terms: Vec::new() }
16853 }
16854 #[doc(hidden)]
16855 pub fn default_instance() -> &'static Self {
16856 static DEFAULT: super::TransactionFilter = super::TransactionFilter::const_default();
16857 &DEFAULT
16858 }
16859 pub fn terms(&self) -> &[super::TransactionTerm] {
16861 &self.terms
16862 }
16863 pub fn terms_mut(&mut self) -> &mut Vec<super::TransactionTerm> {
16866 &mut self.terms
16867 }
16868 pub fn set_terms(&mut self, field: Vec<super::TransactionTerm>) {
16870 self.terms = field;
16871 }
16872 pub fn with_terms(mut self, field: Vec<super::TransactionTerm>) -> Self {
16874 self.set_terms(field);
16875 self
16876 }
16877 }
16878 impl super::TransactionKind {
16879 pub const fn const_default() -> Self {
16880 Self { kind: None, data: None }
16881 }
16882 #[doc(hidden)]
16883 pub fn default_instance() -> &'static Self {
16884 static DEFAULT: super::TransactionKind = super::TransactionKind::const_default();
16885 &DEFAULT
16886 }
16887 pub fn with_kind<T: Into<super::transaction_kind::Kind>>(
16889 mut self,
16890 field: T,
16891 ) -> Self {
16892 self.set_kind(field.into());
16893 self
16894 }
16895 pub fn programmable_transaction(&self) -> &super::ProgrammableTransaction {
16897 if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &self
16898 .data
16899 {
16900 field as _
16901 } else {
16902 super::ProgrammableTransaction::default_instance() as _
16903 }
16904 }
16905 pub fn programmable_transaction_opt(
16907 &self,
16908 ) -> Option<&super::ProgrammableTransaction> {
16909 if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &self
16910 .data
16911 {
16912 Some(field as _)
16913 } else {
16914 None
16915 }
16916 }
16917 pub fn programmable_transaction_opt_mut(
16919 &mut self,
16920 ) -> Option<&mut super::ProgrammableTransaction> {
16921 if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &mut self
16922 .data
16923 {
16924 Some(field as _)
16925 } else {
16926 None
16927 }
16928 }
16929 pub fn programmable_transaction_mut(
16933 &mut self,
16934 ) -> &mut super::ProgrammableTransaction {
16935 if self.programmable_transaction_opt_mut().is_none() {
16936 self.data = Some(
16937 super::transaction_kind::Data::ProgrammableTransaction(
16938 super::ProgrammableTransaction::default(),
16939 ),
16940 );
16941 }
16942 self.programmable_transaction_opt_mut().unwrap()
16943 }
16944 pub fn set_programmable_transaction<T: Into<super::ProgrammableTransaction>>(
16947 &mut self,
16948 field: T,
16949 ) {
16950 self.data = Some(
16951 super::transaction_kind::Data::ProgrammableTransaction(
16952 field.into().into(),
16953 ),
16954 );
16955 }
16956 pub fn with_programmable_transaction<T: Into<super::ProgrammableTransaction>>(
16959 mut self,
16960 field: T,
16961 ) -> Self {
16962 self.set_programmable_transaction(field.into());
16963 self
16964 }
16965 pub fn change_epoch(&self) -> &super::ChangeEpoch {
16967 if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &self.data {
16968 field as _
16969 } else {
16970 super::ChangeEpoch::default_instance() as _
16971 }
16972 }
16973 pub fn change_epoch_opt(&self) -> Option<&super::ChangeEpoch> {
16975 if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &self.data {
16976 Some(field as _)
16977 } else {
16978 None
16979 }
16980 }
16981 pub fn change_epoch_opt_mut(&mut self) -> Option<&mut super::ChangeEpoch> {
16983 if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &mut self
16984 .data
16985 {
16986 Some(field as _)
16987 } else {
16988 None
16989 }
16990 }
16991 pub fn change_epoch_mut(&mut self) -> &mut super::ChangeEpoch {
16995 if self.change_epoch_opt_mut().is_none() {
16996 self.data = Some(
16997 super::transaction_kind::Data::ChangeEpoch(
16998 super::ChangeEpoch::default(),
16999 ),
17000 );
17001 }
17002 self.change_epoch_opt_mut().unwrap()
17003 }
17004 pub fn set_change_epoch<T: Into<super::ChangeEpoch>>(&mut self, field: T) {
17007 self.data = Some(
17008 super::transaction_kind::Data::ChangeEpoch(field.into().into()),
17009 );
17010 }
17011 pub fn with_change_epoch<T: Into<super::ChangeEpoch>>(
17014 mut self,
17015 field: T,
17016 ) -> Self {
17017 self.set_change_epoch(field.into());
17018 self
17019 }
17020 pub fn genesis(&self) -> &super::GenesisTransaction {
17022 if let Some(super::transaction_kind::Data::Genesis(field)) = &self.data {
17023 field as _
17024 } else {
17025 super::GenesisTransaction::default_instance() as _
17026 }
17027 }
17028 pub fn genesis_opt(&self) -> Option<&super::GenesisTransaction> {
17030 if let Some(super::transaction_kind::Data::Genesis(field)) = &self.data {
17031 Some(field as _)
17032 } else {
17033 None
17034 }
17035 }
17036 pub fn genesis_opt_mut(&mut self) -> Option<&mut super::GenesisTransaction> {
17038 if let Some(super::transaction_kind::Data::Genesis(field)) = &mut self.data {
17039 Some(field as _)
17040 } else {
17041 None
17042 }
17043 }
17044 pub fn genesis_mut(&mut self) -> &mut super::GenesisTransaction {
17048 if self.genesis_opt_mut().is_none() {
17049 self.data = Some(
17050 super::transaction_kind::Data::Genesis(
17051 super::GenesisTransaction::default(),
17052 ),
17053 );
17054 }
17055 self.genesis_opt_mut().unwrap()
17056 }
17057 pub fn set_genesis<T: Into<super::GenesisTransaction>>(&mut self, field: T) {
17060 self.data = Some(
17061 super::transaction_kind::Data::Genesis(field.into().into()),
17062 );
17063 }
17064 pub fn with_genesis<T: Into<super::GenesisTransaction>>(
17067 mut self,
17068 field: T,
17069 ) -> Self {
17070 self.set_genesis(field.into());
17071 self
17072 }
17073 pub fn consensus_commit_prologue(&self) -> &super::ConsensusCommitPrologue {
17075 if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &self
17076 .data
17077 {
17078 field as _
17079 } else {
17080 super::ConsensusCommitPrologue::default_instance() as _
17081 }
17082 }
17083 pub fn consensus_commit_prologue_opt(
17085 &self,
17086 ) -> Option<&super::ConsensusCommitPrologue> {
17087 if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &self
17088 .data
17089 {
17090 Some(field as _)
17091 } else {
17092 None
17093 }
17094 }
17095 pub fn consensus_commit_prologue_opt_mut(
17097 &mut self,
17098 ) -> Option<&mut super::ConsensusCommitPrologue> {
17099 if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &mut self
17100 .data
17101 {
17102 Some(field as _)
17103 } else {
17104 None
17105 }
17106 }
17107 pub fn consensus_commit_prologue_mut(
17111 &mut self,
17112 ) -> &mut super::ConsensusCommitPrologue {
17113 if self.consensus_commit_prologue_opt_mut().is_none() {
17114 self.data = Some(
17115 super::transaction_kind::Data::ConsensusCommitPrologue(
17116 super::ConsensusCommitPrologue::default(),
17117 ),
17118 );
17119 }
17120 self.consensus_commit_prologue_opt_mut().unwrap()
17121 }
17122 pub fn set_consensus_commit_prologue<T: Into<super::ConsensusCommitPrologue>>(
17125 &mut self,
17126 field: T,
17127 ) {
17128 self.data = Some(
17129 super::transaction_kind::Data::ConsensusCommitPrologue(
17130 field.into().into(),
17131 ),
17132 );
17133 }
17134 pub fn with_consensus_commit_prologue<T: Into<super::ConsensusCommitPrologue>>(
17137 mut self,
17138 field: T,
17139 ) -> Self {
17140 self.set_consensus_commit_prologue(field.into());
17141 self
17142 }
17143 pub fn authenticator_state_update(&self) -> &super::AuthenticatorStateUpdate {
17145 if let Some(
17146 super::transaction_kind::Data::AuthenticatorStateUpdate(field),
17147 ) = &self.data
17148 {
17149 field as _
17150 } else {
17151 super::AuthenticatorStateUpdate::default_instance() as _
17152 }
17153 }
17154 pub fn authenticator_state_update_opt(
17156 &self,
17157 ) -> Option<&super::AuthenticatorStateUpdate> {
17158 if let Some(
17159 super::transaction_kind::Data::AuthenticatorStateUpdate(field),
17160 ) = &self.data
17161 {
17162 Some(field as _)
17163 } else {
17164 None
17165 }
17166 }
17167 pub fn authenticator_state_update_opt_mut(
17169 &mut self,
17170 ) -> Option<&mut super::AuthenticatorStateUpdate> {
17171 if let Some(
17172 super::transaction_kind::Data::AuthenticatorStateUpdate(field),
17173 ) = &mut self.data
17174 {
17175 Some(field as _)
17176 } else {
17177 None
17178 }
17179 }
17180 pub fn authenticator_state_update_mut(
17184 &mut self,
17185 ) -> &mut super::AuthenticatorStateUpdate {
17186 if self.authenticator_state_update_opt_mut().is_none() {
17187 self.data = Some(
17188 super::transaction_kind::Data::AuthenticatorStateUpdate(
17189 super::AuthenticatorStateUpdate::default(),
17190 ),
17191 );
17192 }
17193 self.authenticator_state_update_opt_mut().unwrap()
17194 }
17195 pub fn set_authenticator_state_update<T: Into<super::AuthenticatorStateUpdate>>(
17198 &mut self,
17199 field: T,
17200 ) {
17201 self.data = Some(
17202 super::transaction_kind::Data::AuthenticatorStateUpdate(
17203 field.into().into(),
17204 ),
17205 );
17206 }
17207 pub fn with_authenticator_state_update<T: Into<super::AuthenticatorStateUpdate>>(
17210 mut self,
17211 field: T,
17212 ) -> Self {
17213 self.set_authenticator_state_update(field.into());
17214 self
17215 }
17216 pub fn end_of_epoch(&self) -> &super::EndOfEpochTransaction {
17218 if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &self.data {
17219 field as _
17220 } else {
17221 super::EndOfEpochTransaction::default_instance() as _
17222 }
17223 }
17224 pub fn end_of_epoch_opt(&self) -> Option<&super::EndOfEpochTransaction> {
17226 if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &self.data {
17227 Some(field as _)
17228 } else {
17229 None
17230 }
17231 }
17232 pub fn end_of_epoch_opt_mut(
17234 &mut self,
17235 ) -> Option<&mut super::EndOfEpochTransaction> {
17236 if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &mut self
17237 .data
17238 {
17239 Some(field as _)
17240 } else {
17241 None
17242 }
17243 }
17244 pub fn end_of_epoch_mut(&mut self) -> &mut super::EndOfEpochTransaction {
17248 if self.end_of_epoch_opt_mut().is_none() {
17249 self.data = Some(
17250 super::transaction_kind::Data::EndOfEpoch(
17251 super::EndOfEpochTransaction::default(),
17252 ),
17253 );
17254 }
17255 self.end_of_epoch_opt_mut().unwrap()
17256 }
17257 pub fn set_end_of_epoch<T: Into<super::EndOfEpochTransaction>>(
17260 &mut self,
17261 field: T,
17262 ) {
17263 self.data = Some(
17264 super::transaction_kind::Data::EndOfEpoch(field.into().into()),
17265 );
17266 }
17267 pub fn with_end_of_epoch<T: Into<super::EndOfEpochTransaction>>(
17270 mut self,
17271 field: T,
17272 ) -> Self {
17273 self.set_end_of_epoch(field.into());
17274 self
17275 }
17276 pub fn randomness_state_update(&self) -> &super::RandomnessStateUpdate {
17278 if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &self
17279 .data
17280 {
17281 field as _
17282 } else {
17283 super::RandomnessStateUpdate::default_instance() as _
17284 }
17285 }
17286 pub fn randomness_state_update_opt(
17288 &self,
17289 ) -> Option<&super::RandomnessStateUpdate> {
17290 if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &self
17291 .data
17292 {
17293 Some(field as _)
17294 } else {
17295 None
17296 }
17297 }
17298 pub fn randomness_state_update_opt_mut(
17300 &mut self,
17301 ) -> Option<&mut super::RandomnessStateUpdate> {
17302 if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &mut self
17303 .data
17304 {
17305 Some(field as _)
17306 } else {
17307 None
17308 }
17309 }
17310 pub fn randomness_state_update_mut(
17314 &mut self,
17315 ) -> &mut super::RandomnessStateUpdate {
17316 if self.randomness_state_update_opt_mut().is_none() {
17317 self.data = Some(
17318 super::transaction_kind::Data::RandomnessStateUpdate(
17319 super::RandomnessStateUpdate::default(),
17320 ),
17321 );
17322 }
17323 self.randomness_state_update_opt_mut().unwrap()
17324 }
17325 pub fn set_randomness_state_update<T: Into<super::RandomnessStateUpdate>>(
17328 &mut self,
17329 field: T,
17330 ) {
17331 self.data = Some(
17332 super::transaction_kind::Data::RandomnessStateUpdate(field.into().into()),
17333 );
17334 }
17335 pub fn with_randomness_state_update<T: Into<super::RandomnessStateUpdate>>(
17338 mut self,
17339 field: T,
17340 ) -> Self {
17341 self.set_randomness_state_update(field.into());
17342 self
17343 }
17344 }
17345 impl super::TransactionLiteral {
17346 pub const fn const_default() -> Self {
17347 Self {
17348 negated: false,
17349 predicate: None,
17350 }
17351 }
17352 #[doc(hidden)]
17353 pub fn default_instance() -> &'static Self {
17354 static DEFAULT: super::TransactionLiteral = super::TransactionLiteral::const_default();
17355 &DEFAULT
17356 }
17357 pub fn negated_mut(&mut self) -> &mut bool {
17360 &mut self.negated
17361 }
17362 pub fn set_negated(&mut self, field: bool) {
17364 self.negated = field;
17365 }
17366 pub fn with_negated(mut self, field: bool) -> Self {
17368 self.set_negated(field);
17369 self
17370 }
17371 pub fn sender(&self) -> &super::SenderFilter {
17373 if let Some(super::transaction_literal::Predicate::Sender(field)) = &self
17374 .predicate
17375 {
17376 field as _
17377 } else {
17378 super::SenderFilter::default_instance() as _
17379 }
17380 }
17381 pub fn sender_opt(&self) -> Option<&super::SenderFilter> {
17383 if let Some(super::transaction_literal::Predicate::Sender(field)) = &self
17384 .predicate
17385 {
17386 Some(field as _)
17387 } else {
17388 None
17389 }
17390 }
17391 pub fn sender_opt_mut(&mut self) -> Option<&mut super::SenderFilter> {
17393 if let Some(super::transaction_literal::Predicate::Sender(field)) = &mut self
17394 .predicate
17395 {
17396 Some(field as _)
17397 } else {
17398 None
17399 }
17400 }
17401 pub fn sender_mut(&mut self) -> &mut super::SenderFilter {
17405 if self.sender_opt_mut().is_none() {
17406 self.predicate = Some(
17407 super::transaction_literal::Predicate::Sender(
17408 super::SenderFilter::default(),
17409 ),
17410 );
17411 }
17412 self.sender_opt_mut().unwrap()
17413 }
17414 pub fn set_sender<T: Into<super::SenderFilter>>(&mut self, field: T) {
17417 self.predicate = Some(
17418 super::transaction_literal::Predicate::Sender(field.into().into()),
17419 );
17420 }
17421 pub fn with_sender<T: Into<super::SenderFilter>>(mut self, field: T) -> Self {
17424 self.set_sender(field.into());
17425 self
17426 }
17427 pub fn affected_address(&self) -> &super::AffectedAddressFilter {
17429 if let Some(super::transaction_literal::Predicate::AffectedAddress(field)) = &self
17430 .predicate
17431 {
17432 field as _
17433 } else {
17434 super::AffectedAddressFilter::default_instance() as _
17435 }
17436 }
17437 pub fn affected_address_opt(&self) -> Option<&super::AffectedAddressFilter> {
17439 if let Some(super::transaction_literal::Predicate::AffectedAddress(field)) = &self
17440 .predicate
17441 {
17442 Some(field as _)
17443 } else {
17444 None
17445 }
17446 }
17447 pub fn affected_address_opt_mut(
17449 &mut self,
17450 ) -> Option<&mut super::AffectedAddressFilter> {
17451 if let Some(super::transaction_literal::Predicate::AffectedAddress(field)) = &mut self
17452 .predicate
17453 {
17454 Some(field as _)
17455 } else {
17456 None
17457 }
17458 }
17459 pub fn affected_address_mut(&mut self) -> &mut super::AffectedAddressFilter {
17463 if self.affected_address_opt_mut().is_none() {
17464 self.predicate = Some(
17465 super::transaction_literal::Predicate::AffectedAddress(
17466 super::AffectedAddressFilter::default(),
17467 ),
17468 );
17469 }
17470 self.affected_address_opt_mut().unwrap()
17471 }
17472 pub fn set_affected_address<T: Into<super::AffectedAddressFilter>>(
17475 &mut self,
17476 field: T,
17477 ) {
17478 self.predicate = Some(
17479 super::transaction_literal::Predicate::AffectedAddress(
17480 field.into().into(),
17481 ),
17482 );
17483 }
17484 pub fn with_affected_address<T: Into<super::AffectedAddressFilter>>(
17487 mut self,
17488 field: T,
17489 ) -> Self {
17490 self.set_affected_address(field.into());
17491 self
17492 }
17493 pub fn affected_object(&self) -> &super::AffectedObjectFilter {
17495 if let Some(super::transaction_literal::Predicate::AffectedObject(field)) = &self
17496 .predicate
17497 {
17498 field as _
17499 } else {
17500 super::AffectedObjectFilter::default_instance() as _
17501 }
17502 }
17503 pub fn affected_object_opt(&self) -> Option<&super::AffectedObjectFilter> {
17505 if let Some(super::transaction_literal::Predicate::AffectedObject(field)) = &self
17506 .predicate
17507 {
17508 Some(field as _)
17509 } else {
17510 None
17511 }
17512 }
17513 pub fn affected_object_opt_mut(
17515 &mut self,
17516 ) -> Option<&mut super::AffectedObjectFilter> {
17517 if let Some(super::transaction_literal::Predicate::AffectedObject(field)) = &mut self
17518 .predicate
17519 {
17520 Some(field as _)
17521 } else {
17522 None
17523 }
17524 }
17525 pub fn affected_object_mut(&mut self) -> &mut super::AffectedObjectFilter {
17529 if self.affected_object_opt_mut().is_none() {
17530 self.predicate = Some(
17531 super::transaction_literal::Predicate::AffectedObject(
17532 super::AffectedObjectFilter::default(),
17533 ),
17534 );
17535 }
17536 self.affected_object_opt_mut().unwrap()
17537 }
17538 pub fn set_affected_object<T: Into<super::AffectedObjectFilter>>(
17541 &mut self,
17542 field: T,
17543 ) {
17544 self.predicate = Some(
17545 super::transaction_literal::Predicate::AffectedObject(
17546 field.into().into(),
17547 ),
17548 );
17549 }
17550 pub fn with_affected_object<T: Into<super::AffectedObjectFilter>>(
17553 mut self,
17554 field: T,
17555 ) -> Self {
17556 self.set_affected_object(field.into());
17557 self
17558 }
17559 pub fn move_call(&self) -> &super::MoveCallFilter {
17561 if let Some(super::transaction_literal::Predicate::MoveCall(field)) = &self
17562 .predicate
17563 {
17564 field as _
17565 } else {
17566 super::MoveCallFilter::default_instance() as _
17567 }
17568 }
17569 pub fn move_call_opt(&self) -> Option<&super::MoveCallFilter> {
17571 if let Some(super::transaction_literal::Predicate::MoveCall(field)) = &self
17572 .predicate
17573 {
17574 Some(field as _)
17575 } else {
17576 None
17577 }
17578 }
17579 pub fn move_call_opt_mut(&mut self) -> Option<&mut super::MoveCallFilter> {
17581 if let Some(super::transaction_literal::Predicate::MoveCall(field)) = &mut self
17582 .predicate
17583 {
17584 Some(field as _)
17585 } else {
17586 None
17587 }
17588 }
17589 pub fn move_call_mut(&mut self) -> &mut super::MoveCallFilter {
17593 if self.move_call_opt_mut().is_none() {
17594 self.predicate = Some(
17595 super::transaction_literal::Predicate::MoveCall(
17596 super::MoveCallFilter::default(),
17597 ),
17598 );
17599 }
17600 self.move_call_opt_mut().unwrap()
17601 }
17602 pub fn set_move_call<T: Into<super::MoveCallFilter>>(&mut self, field: T) {
17605 self.predicate = Some(
17606 super::transaction_literal::Predicate::MoveCall(field.into().into()),
17607 );
17608 }
17609 pub fn with_move_call<T: Into<super::MoveCallFilter>>(
17612 mut self,
17613 field: T,
17614 ) -> Self {
17615 self.set_move_call(field.into());
17616 self
17617 }
17618 pub fn emit_module(&self) -> &super::EmitModuleFilter {
17620 if let Some(super::transaction_literal::Predicate::EmitModule(field)) = &self
17621 .predicate
17622 {
17623 field as _
17624 } else {
17625 super::EmitModuleFilter::default_instance() as _
17626 }
17627 }
17628 pub fn emit_module_opt(&self) -> Option<&super::EmitModuleFilter> {
17630 if let Some(super::transaction_literal::Predicate::EmitModule(field)) = &self
17631 .predicate
17632 {
17633 Some(field as _)
17634 } else {
17635 None
17636 }
17637 }
17638 pub fn emit_module_opt_mut(&mut self) -> Option<&mut super::EmitModuleFilter> {
17640 if let Some(super::transaction_literal::Predicate::EmitModule(field)) = &mut self
17641 .predicate
17642 {
17643 Some(field as _)
17644 } else {
17645 None
17646 }
17647 }
17648 pub fn emit_module_mut(&mut self) -> &mut super::EmitModuleFilter {
17652 if self.emit_module_opt_mut().is_none() {
17653 self.predicate = Some(
17654 super::transaction_literal::Predicate::EmitModule(
17655 super::EmitModuleFilter::default(),
17656 ),
17657 );
17658 }
17659 self.emit_module_opt_mut().unwrap()
17660 }
17661 pub fn set_emit_module<T: Into<super::EmitModuleFilter>>(&mut self, field: T) {
17664 self.predicate = Some(
17665 super::transaction_literal::Predicate::EmitModule(field.into().into()),
17666 );
17667 }
17668 pub fn with_emit_module<T: Into<super::EmitModuleFilter>>(
17671 mut self,
17672 field: T,
17673 ) -> Self {
17674 self.set_emit_module(field.into());
17675 self
17676 }
17677 pub fn event_type(&self) -> &super::EventTypeFilter {
17679 if let Some(super::transaction_literal::Predicate::EventType(field)) = &self
17680 .predicate
17681 {
17682 field as _
17683 } else {
17684 super::EventTypeFilter::default_instance() as _
17685 }
17686 }
17687 pub fn event_type_opt(&self) -> Option<&super::EventTypeFilter> {
17689 if let Some(super::transaction_literal::Predicate::EventType(field)) = &self
17690 .predicate
17691 {
17692 Some(field as _)
17693 } else {
17694 None
17695 }
17696 }
17697 pub fn event_type_opt_mut(&mut self) -> Option<&mut super::EventTypeFilter> {
17699 if let Some(super::transaction_literal::Predicate::EventType(field)) = &mut self
17700 .predicate
17701 {
17702 Some(field as _)
17703 } else {
17704 None
17705 }
17706 }
17707 pub fn event_type_mut(&mut self) -> &mut super::EventTypeFilter {
17711 if self.event_type_opt_mut().is_none() {
17712 self.predicate = Some(
17713 super::transaction_literal::Predicate::EventType(
17714 super::EventTypeFilter::default(),
17715 ),
17716 );
17717 }
17718 self.event_type_opt_mut().unwrap()
17719 }
17720 pub fn set_event_type<T: Into<super::EventTypeFilter>>(&mut self, field: T) {
17723 self.predicate = Some(
17724 super::transaction_literal::Predicate::EventType(field.into().into()),
17725 );
17726 }
17727 pub fn with_event_type<T: Into<super::EventTypeFilter>>(
17730 mut self,
17731 field: T,
17732 ) -> Self {
17733 self.set_event_type(field.into());
17734 self
17735 }
17736 pub fn event_stream_head(&self) -> &super::EventStreamHeadFilter {
17738 if let Some(super::transaction_literal::Predicate::EventStreamHead(field)) = &self
17739 .predicate
17740 {
17741 field as _
17742 } else {
17743 super::EventStreamHeadFilter::default_instance() as _
17744 }
17745 }
17746 pub fn event_stream_head_opt(&self) -> Option<&super::EventStreamHeadFilter> {
17748 if let Some(super::transaction_literal::Predicate::EventStreamHead(field)) = &self
17749 .predicate
17750 {
17751 Some(field as _)
17752 } else {
17753 None
17754 }
17755 }
17756 pub fn event_stream_head_opt_mut(
17758 &mut self,
17759 ) -> Option<&mut super::EventStreamHeadFilter> {
17760 if let Some(super::transaction_literal::Predicate::EventStreamHead(field)) = &mut self
17761 .predicate
17762 {
17763 Some(field as _)
17764 } else {
17765 None
17766 }
17767 }
17768 pub fn event_stream_head_mut(&mut self) -> &mut super::EventStreamHeadFilter {
17772 if self.event_stream_head_opt_mut().is_none() {
17773 self.predicate = Some(
17774 super::transaction_literal::Predicate::EventStreamHead(
17775 super::EventStreamHeadFilter::default(),
17776 ),
17777 );
17778 }
17779 self.event_stream_head_opt_mut().unwrap()
17780 }
17781 pub fn set_event_stream_head<T: Into<super::EventStreamHeadFilter>>(
17784 &mut self,
17785 field: T,
17786 ) {
17787 self.predicate = Some(
17788 super::transaction_literal::Predicate::EventStreamHead(
17789 field.into().into(),
17790 ),
17791 );
17792 }
17793 pub fn with_event_stream_head<T: Into<super::EventStreamHeadFilter>>(
17796 mut self,
17797 field: T,
17798 ) -> Self {
17799 self.set_event_stream_head(field.into());
17800 self
17801 }
17802 pub fn package_write(&self) -> &super::PackageWriteFilter {
17804 if let Some(super::transaction_literal::Predicate::PackageWrite(field)) = &self
17805 .predicate
17806 {
17807 field as _
17808 } else {
17809 super::PackageWriteFilter::default_instance() as _
17810 }
17811 }
17812 pub fn package_write_opt(&self) -> Option<&super::PackageWriteFilter> {
17814 if let Some(super::transaction_literal::Predicate::PackageWrite(field)) = &self
17815 .predicate
17816 {
17817 Some(field as _)
17818 } else {
17819 None
17820 }
17821 }
17822 pub fn package_write_opt_mut(
17824 &mut self,
17825 ) -> Option<&mut super::PackageWriteFilter> {
17826 if let Some(super::transaction_literal::Predicate::PackageWrite(field)) = &mut self
17827 .predicate
17828 {
17829 Some(field as _)
17830 } else {
17831 None
17832 }
17833 }
17834 pub fn package_write_mut(&mut self) -> &mut super::PackageWriteFilter {
17838 if self.package_write_opt_mut().is_none() {
17839 self.predicate = Some(
17840 super::transaction_literal::Predicate::PackageWrite(
17841 super::PackageWriteFilter::default(),
17842 ),
17843 );
17844 }
17845 self.package_write_opt_mut().unwrap()
17846 }
17847 pub fn set_package_write<T: Into<super::PackageWriteFilter>>(
17850 &mut self,
17851 field: T,
17852 ) {
17853 self.predicate = Some(
17854 super::transaction_literal::Predicate::PackageWrite(field.into().into()),
17855 );
17856 }
17857 pub fn with_package_write<T: Into<super::PackageWriteFilter>>(
17860 mut self,
17861 field: T,
17862 ) -> Self {
17863 self.set_package_write(field.into());
17864 self
17865 }
17866 }
17867 impl super::TransactionTerm {
17868 pub const fn const_default() -> Self {
17869 Self { literals: Vec::new() }
17870 }
17871 #[doc(hidden)]
17872 pub fn default_instance() -> &'static Self {
17873 static DEFAULT: super::TransactionTerm = super::TransactionTerm::const_default();
17874 &DEFAULT
17875 }
17876 pub fn literals(&self) -> &[super::TransactionLiteral] {
17878 &self.literals
17879 }
17880 pub fn literals_mut(&mut self) -> &mut Vec<super::TransactionLiteral> {
17883 &mut self.literals
17884 }
17885 pub fn set_literals(&mut self, field: Vec<super::TransactionLiteral>) {
17887 self.literals = field;
17888 }
17889 pub fn with_literals(mut self, field: Vec<super::TransactionLiteral>) -> Self {
17891 self.set_literals(field);
17892 self
17893 }
17894 }
17895 impl super::TransferObjects {
17896 pub const fn const_default() -> Self {
17897 Self {
17898 objects: Vec::new(),
17899 address: None,
17900 }
17901 }
17902 #[doc(hidden)]
17903 pub fn default_instance() -> &'static Self {
17904 static DEFAULT: super::TransferObjects = super::TransferObjects::const_default();
17905 &DEFAULT
17906 }
17907 pub fn objects(&self) -> &[super::Argument] {
17909 &self.objects
17910 }
17911 pub fn objects_mut(&mut self) -> &mut Vec<super::Argument> {
17914 &mut self.objects
17915 }
17916 pub fn set_objects(&mut self, field: Vec<super::Argument>) {
17918 self.objects = field;
17919 }
17920 pub fn with_objects(mut self, field: Vec<super::Argument>) -> Self {
17922 self.set_objects(field);
17923 self
17924 }
17925 pub fn address(&self) -> &super::Argument {
17927 self.address
17928 .as_ref()
17929 .map(|field| field as _)
17930 .unwrap_or_else(|| super::Argument::default_instance() as _)
17931 }
17932 pub fn address_opt_mut(&mut self) -> Option<&mut super::Argument> {
17934 self.address.as_mut().map(|field| field as _)
17935 }
17936 pub fn address_mut(&mut self) -> &mut super::Argument {
17939 self.address.get_or_insert_default()
17940 }
17941 pub fn address_opt(&self) -> Option<&super::Argument> {
17943 self.address.as_ref().map(|field| field as _)
17944 }
17945 pub fn set_address<T: Into<super::Argument>>(&mut self, field: T) {
17947 self.address = Some(field.into().into());
17948 }
17949 pub fn with_address<T: Into<super::Argument>>(mut self, field: T) -> Self {
17951 self.set_address(field.into());
17952 self
17953 }
17954 }
17955 impl super::TypeArgumentError {
17956 pub const fn const_default() -> Self {
17957 Self {
17958 type_argument: None,
17959 kind: None,
17960 }
17961 }
17962 #[doc(hidden)]
17963 pub fn default_instance() -> &'static Self {
17964 static DEFAULT: super::TypeArgumentError = super::TypeArgumentError::const_default();
17965 &DEFAULT
17966 }
17967 pub fn type_argument_opt_mut(&mut self) -> Option<&mut u32> {
17969 self.type_argument.as_mut().map(|field| field as _)
17970 }
17971 pub fn type_argument_mut(&mut self) -> &mut u32 {
17974 self.type_argument.get_or_insert_default()
17975 }
17976 pub fn type_argument_opt(&self) -> Option<u32> {
17978 self.type_argument.as_ref().map(|field| *field)
17979 }
17980 pub fn set_type_argument(&mut self, field: u32) {
17982 self.type_argument = Some(field);
17983 }
17984 pub fn with_type_argument(mut self, field: u32) -> Self {
17986 self.set_type_argument(field);
17987 self
17988 }
17989 pub fn with_kind<T: Into<super::type_argument_error::TypeArgumentErrorKind>>(
17991 mut self,
17992 field: T,
17993 ) -> Self {
17994 self.set_kind(field.into());
17995 self
17996 }
17997 }
17998 impl super::TypeOrigin {
17999 pub const fn const_default() -> Self {
18000 Self {
18001 module_name: None,
18002 datatype_name: None,
18003 package_id: None,
18004 }
18005 }
18006 #[doc(hidden)]
18007 pub fn default_instance() -> &'static Self {
18008 static DEFAULT: super::TypeOrigin = super::TypeOrigin::const_default();
18009 &DEFAULT
18010 }
18011 pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
18013 self.module_name.as_mut().map(|field| field as _)
18014 }
18015 pub fn module_name_mut(&mut self) -> &mut String {
18018 self.module_name.get_or_insert_default()
18019 }
18020 pub fn module_name_opt(&self) -> Option<&str> {
18022 self.module_name.as_ref().map(|field| field as _)
18023 }
18024 pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
18026 self.module_name = Some(field.into().into());
18027 }
18028 pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
18030 self.set_module_name(field.into());
18031 self
18032 }
18033 pub fn datatype_name_opt_mut(&mut self) -> Option<&mut String> {
18035 self.datatype_name.as_mut().map(|field| field as _)
18036 }
18037 pub fn datatype_name_mut(&mut self) -> &mut String {
18040 self.datatype_name.get_or_insert_default()
18041 }
18042 pub fn datatype_name_opt(&self) -> Option<&str> {
18044 self.datatype_name.as_ref().map(|field| field as _)
18045 }
18046 pub fn set_datatype_name<T: Into<String>>(&mut self, field: T) {
18048 self.datatype_name = Some(field.into().into());
18049 }
18050 pub fn with_datatype_name<T: Into<String>>(mut self, field: T) -> Self {
18052 self.set_datatype_name(field.into());
18053 self
18054 }
18055 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
18057 self.package_id.as_mut().map(|field| field as _)
18058 }
18059 pub fn package_id_mut(&mut self) -> &mut String {
18062 self.package_id.get_or_insert_default()
18063 }
18064 pub fn package_id_opt(&self) -> Option<&str> {
18066 self.package_id.as_ref().map(|field| field as _)
18067 }
18068 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
18070 self.package_id = Some(field.into().into());
18071 }
18072 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
18074 self.set_package_id(field.into());
18075 self
18076 }
18077 }
18078 impl super::TypeParameter {
18079 pub const fn const_default() -> Self {
18080 Self {
18081 constraints: Vec::new(),
18082 is_phantom: None,
18083 }
18084 }
18085 #[doc(hidden)]
18086 pub fn default_instance() -> &'static Self {
18087 static DEFAULT: super::TypeParameter = super::TypeParameter::const_default();
18088 &DEFAULT
18089 }
18090 pub fn is_phantom_opt_mut(&mut self) -> Option<&mut bool> {
18092 self.is_phantom.as_mut().map(|field| field as _)
18093 }
18094 pub fn is_phantom_mut(&mut self) -> &mut bool {
18097 self.is_phantom.get_or_insert_default()
18098 }
18099 pub fn is_phantom_opt(&self) -> Option<bool> {
18101 self.is_phantom.as_ref().map(|field| *field)
18102 }
18103 pub fn set_is_phantom(&mut self, field: bool) {
18105 self.is_phantom = Some(field);
18106 }
18107 pub fn with_is_phantom(mut self, field: bool) -> Self {
18109 self.set_is_phantom(field);
18110 self
18111 }
18112 }
18113 impl super::UnchangedConsensusObject {
18114 pub const fn const_default() -> Self {
18115 Self {
18116 kind: None,
18117 object_id: None,
18118 version: None,
18119 digest: None,
18120 object_type: None,
18121 }
18122 }
18123 #[doc(hidden)]
18124 pub fn default_instance() -> &'static Self {
18125 static DEFAULT: super::UnchangedConsensusObject = super::UnchangedConsensusObject::const_default();
18126 &DEFAULT
18127 }
18128 pub fn with_kind<
18130 T: Into<super::unchanged_consensus_object::UnchangedConsensusObjectKind>,
18131 >(mut self, field: T) -> Self {
18132 self.set_kind(field.into());
18133 self
18134 }
18135 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
18137 self.object_id.as_mut().map(|field| field as _)
18138 }
18139 pub fn object_id_mut(&mut self) -> &mut String {
18142 self.object_id.get_or_insert_default()
18143 }
18144 pub fn object_id_opt(&self) -> Option<&str> {
18146 self.object_id.as_ref().map(|field| field as _)
18147 }
18148 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
18150 self.object_id = Some(field.into().into());
18151 }
18152 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
18154 self.set_object_id(field.into());
18155 self
18156 }
18157 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
18159 self.version.as_mut().map(|field| field as _)
18160 }
18161 pub fn version_mut(&mut self) -> &mut u64 {
18164 self.version.get_or_insert_default()
18165 }
18166 pub fn version_opt(&self) -> Option<u64> {
18168 self.version.as_ref().map(|field| *field)
18169 }
18170 pub fn set_version(&mut self, field: u64) {
18172 self.version = Some(field);
18173 }
18174 pub fn with_version(mut self, field: u64) -> Self {
18176 self.set_version(field);
18177 self
18178 }
18179 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
18181 self.digest.as_mut().map(|field| field as _)
18182 }
18183 pub fn digest_mut(&mut self) -> &mut String {
18186 self.digest.get_or_insert_default()
18187 }
18188 pub fn digest_opt(&self) -> Option<&str> {
18190 self.digest.as_ref().map(|field| field as _)
18191 }
18192 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
18194 self.digest = Some(field.into().into());
18195 }
18196 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
18198 self.set_digest(field.into());
18199 self
18200 }
18201 pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
18203 self.object_type.as_mut().map(|field| field as _)
18204 }
18205 pub fn object_type_mut(&mut self) -> &mut String {
18208 self.object_type.get_or_insert_default()
18209 }
18210 pub fn object_type_opt(&self) -> Option<&str> {
18212 self.object_type.as_ref().map(|field| field as _)
18213 }
18214 pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
18216 self.object_type = Some(field.into().into());
18217 }
18218 pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
18220 self.set_object_type(field.into());
18221 self
18222 }
18223 }
18224 impl super::Upgrade {
18225 pub const fn const_default() -> Self {
18226 Self {
18227 modules: Vec::new(),
18228 dependencies: Vec::new(),
18229 package: None,
18230 ticket: None,
18231 }
18232 }
18233 #[doc(hidden)]
18234 pub fn default_instance() -> &'static Self {
18235 static DEFAULT: super::Upgrade = super::Upgrade::const_default();
18236 &DEFAULT
18237 }
18238 pub fn modules(&self) -> &[::prost::bytes::Bytes] {
18240 &self.modules
18241 }
18242 pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
18245 &mut self.modules
18246 }
18247 pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
18249 self.modules = field;
18250 }
18251 pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
18253 self.set_modules(field);
18254 self
18255 }
18256 pub fn dependencies(&self) -> &[String] {
18258 &self.dependencies
18259 }
18260 pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
18263 &mut self.dependencies
18264 }
18265 pub fn set_dependencies(&mut self, field: Vec<String>) {
18267 self.dependencies = field;
18268 }
18269 pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
18271 self.set_dependencies(field);
18272 self
18273 }
18274 pub fn package_opt_mut(&mut self) -> Option<&mut String> {
18276 self.package.as_mut().map(|field| field as _)
18277 }
18278 pub fn package_mut(&mut self) -> &mut String {
18281 self.package.get_or_insert_default()
18282 }
18283 pub fn package_opt(&self) -> Option<&str> {
18285 self.package.as_ref().map(|field| field as _)
18286 }
18287 pub fn set_package<T: Into<String>>(&mut self, field: T) {
18289 self.package = Some(field.into().into());
18290 }
18291 pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
18293 self.set_package(field.into());
18294 self
18295 }
18296 pub fn ticket(&self) -> &super::Argument {
18298 self.ticket
18299 .as_ref()
18300 .map(|field| field as _)
18301 .unwrap_or_else(|| super::Argument::default_instance() as _)
18302 }
18303 pub fn ticket_opt_mut(&mut self) -> Option<&mut super::Argument> {
18305 self.ticket.as_mut().map(|field| field as _)
18306 }
18307 pub fn ticket_mut(&mut self) -> &mut super::Argument {
18310 self.ticket.get_or_insert_default()
18311 }
18312 pub fn ticket_opt(&self) -> Option<&super::Argument> {
18314 self.ticket.as_ref().map(|field| field as _)
18315 }
18316 pub fn set_ticket<T: Into<super::Argument>>(&mut self, field: T) {
18318 self.ticket = Some(field.into().into());
18319 }
18320 pub fn with_ticket<T: Into<super::Argument>>(mut self, field: T) -> Self {
18322 self.set_ticket(field.into());
18323 self
18324 }
18325 }
18326 impl super::UserSignature {
18327 pub const fn const_default() -> Self {
18328 Self {
18329 bcs: None,
18330 scheme: None,
18331 signature: None,
18332 }
18333 }
18334 #[doc(hidden)]
18335 pub fn default_instance() -> &'static Self {
18336 static DEFAULT: super::UserSignature = super::UserSignature::const_default();
18337 &DEFAULT
18338 }
18339 pub fn bcs(&self) -> &super::Bcs {
18341 self.bcs
18342 .as_ref()
18343 .map(|field| field as _)
18344 .unwrap_or_else(|| super::Bcs::default_instance() as _)
18345 }
18346 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
18348 self.bcs.as_mut().map(|field| field as _)
18349 }
18350 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
18353 self.bcs.get_or_insert_default()
18354 }
18355 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
18357 self.bcs.as_ref().map(|field| field as _)
18358 }
18359 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
18361 self.bcs = Some(field.into().into());
18362 }
18363 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
18365 self.set_bcs(field.into());
18366 self
18367 }
18368 pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
18370 self.set_scheme(field.into());
18371 self
18372 }
18373 pub fn simple(&self) -> &super::SimpleSignature {
18375 if let Some(super::user_signature::Signature::Simple(field)) = &self
18376 .signature
18377 {
18378 field as _
18379 } else {
18380 super::SimpleSignature::default_instance() as _
18381 }
18382 }
18383 pub fn simple_opt(&self) -> Option<&super::SimpleSignature> {
18385 if let Some(super::user_signature::Signature::Simple(field)) = &self
18386 .signature
18387 {
18388 Some(field as _)
18389 } else {
18390 None
18391 }
18392 }
18393 pub fn simple_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
18395 if let Some(super::user_signature::Signature::Simple(field)) = &mut self
18396 .signature
18397 {
18398 Some(field as _)
18399 } else {
18400 None
18401 }
18402 }
18403 pub fn simple_mut(&mut self) -> &mut super::SimpleSignature {
18407 if self.simple_opt_mut().is_none() {
18408 self.signature = Some(
18409 super::user_signature::Signature::Simple(
18410 super::SimpleSignature::default(),
18411 ),
18412 );
18413 }
18414 self.simple_opt_mut().unwrap()
18415 }
18416 pub fn set_simple<T: Into<super::SimpleSignature>>(&mut self, field: T) {
18419 self.signature = Some(
18420 super::user_signature::Signature::Simple(field.into().into()),
18421 );
18422 }
18423 pub fn with_simple<T: Into<super::SimpleSignature>>(mut self, field: T) -> Self {
18426 self.set_simple(field.into());
18427 self
18428 }
18429 pub fn multisig(&self) -> &super::MultisigAggregatedSignature {
18431 if let Some(super::user_signature::Signature::Multisig(field)) = &self
18432 .signature
18433 {
18434 field as _
18435 } else {
18436 super::MultisigAggregatedSignature::default_instance() as _
18437 }
18438 }
18439 pub fn multisig_opt(&self) -> Option<&super::MultisigAggregatedSignature> {
18441 if let Some(super::user_signature::Signature::Multisig(field)) = &self
18442 .signature
18443 {
18444 Some(field as _)
18445 } else {
18446 None
18447 }
18448 }
18449 pub fn multisig_opt_mut(
18451 &mut self,
18452 ) -> Option<&mut super::MultisigAggregatedSignature> {
18453 if let Some(super::user_signature::Signature::Multisig(field)) = &mut self
18454 .signature
18455 {
18456 Some(field as _)
18457 } else {
18458 None
18459 }
18460 }
18461 pub fn multisig_mut(&mut self) -> &mut super::MultisigAggregatedSignature {
18465 if self.multisig_opt_mut().is_none() {
18466 self.signature = Some(
18467 super::user_signature::Signature::Multisig(
18468 super::MultisigAggregatedSignature::default(),
18469 ),
18470 );
18471 }
18472 self.multisig_opt_mut().unwrap()
18473 }
18474 pub fn set_multisig<T: Into<super::MultisigAggregatedSignature>>(
18477 &mut self,
18478 field: T,
18479 ) {
18480 self.signature = Some(
18481 super::user_signature::Signature::Multisig(field.into().into()),
18482 );
18483 }
18484 pub fn with_multisig<T: Into<super::MultisigAggregatedSignature>>(
18487 mut self,
18488 field: T,
18489 ) -> Self {
18490 self.set_multisig(field.into());
18491 self
18492 }
18493 pub fn zklogin(&self) -> &super::ZkLoginAuthenticator {
18495 if let Some(super::user_signature::Signature::Zklogin(field)) = &self
18496 .signature
18497 {
18498 field as _
18499 } else {
18500 super::ZkLoginAuthenticator::default_instance() as _
18501 }
18502 }
18503 pub fn zklogin_opt(&self) -> Option<&super::ZkLoginAuthenticator> {
18505 if let Some(super::user_signature::Signature::Zklogin(field)) = &self
18506 .signature
18507 {
18508 Some(field as _)
18509 } else {
18510 None
18511 }
18512 }
18513 pub fn zklogin_opt_mut(&mut self) -> Option<&mut super::ZkLoginAuthenticator> {
18515 if let Some(super::user_signature::Signature::Zklogin(field)) = &mut self
18516 .signature
18517 {
18518 Some(field as _)
18519 } else {
18520 None
18521 }
18522 }
18523 pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginAuthenticator {
18527 if self.zklogin_opt_mut().is_none() {
18528 self.signature = Some(
18529 super::user_signature::Signature::Zklogin(
18530 super::ZkLoginAuthenticator::default(),
18531 ),
18532 );
18533 }
18534 self.zklogin_opt_mut().unwrap()
18535 }
18536 pub fn set_zklogin<T: Into<super::ZkLoginAuthenticator>>(&mut self, field: T) {
18539 self.signature = Some(
18540 super::user_signature::Signature::Zklogin(field.into().into()),
18541 );
18542 }
18543 pub fn with_zklogin<T: Into<super::ZkLoginAuthenticator>>(
18546 mut self,
18547 field: T,
18548 ) -> Self {
18549 self.set_zklogin(field.into());
18550 self
18551 }
18552 pub fn passkey(&self) -> &super::PasskeyAuthenticator {
18554 if let Some(super::user_signature::Signature::Passkey(field)) = &self
18555 .signature
18556 {
18557 field as _
18558 } else {
18559 super::PasskeyAuthenticator::default_instance() as _
18560 }
18561 }
18562 pub fn passkey_opt(&self) -> Option<&super::PasskeyAuthenticator> {
18564 if let Some(super::user_signature::Signature::Passkey(field)) = &self
18565 .signature
18566 {
18567 Some(field as _)
18568 } else {
18569 None
18570 }
18571 }
18572 pub fn passkey_opt_mut(&mut self) -> Option<&mut super::PasskeyAuthenticator> {
18574 if let Some(super::user_signature::Signature::Passkey(field)) = &mut self
18575 .signature
18576 {
18577 Some(field as _)
18578 } else {
18579 None
18580 }
18581 }
18582 pub fn passkey_mut(&mut self) -> &mut super::PasskeyAuthenticator {
18586 if self.passkey_opt_mut().is_none() {
18587 self.signature = Some(
18588 super::user_signature::Signature::Passkey(
18589 super::PasskeyAuthenticator::default(),
18590 ),
18591 );
18592 }
18593 self.passkey_opt_mut().unwrap()
18594 }
18595 pub fn set_passkey<T: Into<super::PasskeyAuthenticator>>(&mut self, field: T) {
18598 self.signature = Some(
18599 super::user_signature::Signature::Passkey(field.into().into()),
18600 );
18601 }
18602 pub fn with_passkey<T: Into<super::PasskeyAuthenticator>>(
18605 mut self,
18606 field: T,
18607 ) -> Self {
18608 self.set_passkey(field.into());
18609 self
18610 }
18611 }
18612 impl super::Validator {
18613 pub const fn const_default() -> Self {
18614 Self {
18615 name: None,
18616 address: None,
18617 description: None,
18618 image_url: None,
18619 project_url: None,
18620 protocol_public_key: None,
18621 proof_of_possession: None,
18622 network_public_key: None,
18623 worker_public_key: None,
18624 network_address: None,
18625 p2p_address: None,
18626 primary_address: None,
18627 worker_address: None,
18628 next_epoch_protocol_public_key: None,
18629 next_epoch_proof_of_possession: None,
18630 next_epoch_network_public_key: None,
18631 next_epoch_worker_public_key: None,
18632 next_epoch_network_address: None,
18633 next_epoch_p2p_address: None,
18634 next_epoch_primary_address: None,
18635 next_epoch_worker_address: None,
18636 metadata_extra_fields: None,
18637 voting_power: None,
18638 operation_cap_id: None,
18639 gas_price: None,
18640 staking_pool: None,
18641 commission_rate: None,
18642 next_epoch_stake: None,
18643 next_epoch_gas_price: None,
18644 next_epoch_commission_rate: None,
18645 extra_fields: None,
18646 }
18647 }
18648 #[doc(hidden)]
18649 pub fn default_instance() -> &'static Self {
18650 static DEFAULT: super::Validator = super::Validator::const_default();
18651 &DEFAULT
18652 }
18653 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
18655 self.name.as_mut().map(|field| field as _)
18656 }
18657 pub fn name_mut(&mut self) -> &mut String {
18660 self.name.get_or_insert_default()
18661 }
18662 pub fn name_opt(&self) -> Option<&str> {
18664 self.name.as_ref().map(|field| field as _)
18665 }
18666 pub fn set_name<T: Into<String>>(&mut self, field: T) {
18668 self.name = Some(field.into().into());
18669 }
18670 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
18672 self.set_name(field.into());
18673 self
18674 }
18675 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
18677 self.address.as_mut().map(|field| field as _)
18678 }
18679 pub fn address_mut(&mut self) -> &mut String {
18682 self.address.get_or_insert_default()
18683 }
18684 pub fn address_opt(&self) -> Option<&str> {
18686 self.address.as_ref().map(|field| field as _)
18687 }
18688 pub fn set_address<T: Into<String>>(&mut self, field: T) {
18690 self.address = Some(field.into().into());
18691 }
18692 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
18694 self.set_address(field.into());
18695 self
18696 }
18697 pub fn description_opt_mut(&mut self) -> Option<&mut String> {
18699 self.description.as_mut().map(|field| field as _)
18700 }
18701 pub fn description_mut(&mut self) -> &mut String {
18704 self.description.get_or_insert_default()
18705 }
18706 pub fn description_opt(&self) -> Option<&str> {
18708 self.description.as_ref().map(|field| field as _)
18709 }
18710 pub fn set_description<T: Into<String>>(&mut self, field: T) {
18712 self.description = Some(field.into().into());
18713 }
18714 pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
18716 self.set_description(field.into());
18717 self
18718 }
18719 pub fn image_url_opt_mut(&mut self) -> Option<&mut String> {
18721 self.image_url.as_mut().map(|field| field as _)
18722 }
18723 pub fn image_url_mut(&mut self) -> &mut String {
18726 self.image_url.get_or_insert_default()
18727 }
18728 pub fn image_url_opt(&self) -> Option<&str> {
18730 self.image_url.as_ref().map(|field| field as _)
18731 }
18732 pub fn set_image_url<T: Into<String>>(&mut self, field: T) {
18734 self.image_url = Some(field.into().into());
18735 }
18736 pub fn with_image_url<T: Into<String>>(mut self, field: T) -> Self {
18738 self.set_image_url(field.into());
18739 self
18740 }
18741 pub fn project_url_opt_mut(&mut self) -> Option<&mut String> {
18743 self.project_url.as_mut().map(|field| field as _)
18744 }
18745 pub fn project_url_mut(&mut self) -> &mut String {
18748 self.project_url.get_or_insert_default()
18749 }
18750 pub fn project_url_opt(&self) -> Option<&str> {
18752 self.project_url.as_ref().map(|field| field as _)
18753 }
18754 pub fn set_project_url<T: Into<String>>(&mut self, field: T) {
18756 self.project_url = Some(field.into().into());
18757 }
18758 pub fn with_project_url<T: Into<String>>(mut self, field: T) -> Self {
18760 self.set_project_url(field.into());
18761 self
18762 }
18763 pub fn protocol_public_key_opt(&self) -> Option<&[u8]> {
18765 self.protocol_public_key.as_ref().map(|field| field as _)
18766 }
18767 pub fn set_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
18769 &mut self,
18770 field: T,
18771 ) {
18772 self.protocol_public_key = Some(field.into().into());
18773 }
18774 pub fn with_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
18776 mut self,
18777 field: T,
18778 ) -> Self {
18779 self.set_protocol_public_key(field.into());
18780 self
18781 }
18782 pub fn proof_of_possession_opt(&self) -> Option<&[u8]> {
18784 self.proof_of_possession.as_ref().map(|field| field as _)
18785 }
18786 pub fn set_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
18788 &mut self,
18789 field: T,
18790 ) {
18791 self.proof_of_possession = Some(field.into().into());
18792 }
18793 pub fn with_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
18795 mut self,
18796 field: T,
18797 ) -> Self {
18798 self.set_proof_of_possession(field.into());
18799 self
18800 }
18801 pub fn network_public_key_opt(&self) -> Option<&[u8]> {
18803 self.network_public_key.as_ref().map(|field| field as _)
18804 }
18805 pub fn set_network_public_key<T: Into<::prost::bytes::Bytes>>(
18807 &mut self,
18808 field: T,
18809 ) {
18810 self.network_public_key = Some(field.into().into());
18811 }
18812 pub fn with_network_public_key<T: Into<::prost::bytes::Bytes>>(
18814 mut self,
18815 field: T,
18816 ) -> Self {
18817 self.set_network_public_key(field.into());
18818 self
18819 }
18820 pub fn worker_public_key_opt(&self) -> Option<&[u8]> {
18822 self.worker_public_key.as_ref().map(|field| field as _)
18823 }
18824 pub fn set_worker_public_key<T: Into<::prost::bytes::Bytes>>(
18826 &mut self,
18827 field: T,
18828 ) {
18829 self.worker_public_key = Some(field.into().into());
18830 }
18831 pub fn with_worker_public_key<T: Into<::prost::bytes::Bytes>>(
18833 mut self,
18834 field: T,
18835 ) -> Self {
18836 self.set_worker_public_key(field.into());
18837 self
18838 }
18839 pub fn network_address_opt_mut(&mut self) -> Option<&mut String> {
18841 self.network_address.as_mut().map(|field| field as _)
18842 }
18843 pub fn network_address_mut(&mut self) -> &mut String {
18846 self.network_address.get_or_insert_default()
18847 }
18848 pub fn network_address_opt(&self) -> Option<&str> {
18850 self.network_address.as_ref().map(|field| field as _)
18851 }
18852 pub fn set_network_address<T: Into<String>>(&mut self, field: T) {
18854 self.network_address = Some(field.into().into());
18855 }
18856 pub fn with_network_address<T: Into<String>>(mut self, field: T) -> Self {
18858 self.set_network_address(field.into());
18859 self
18860 }
18861 pub fn p2p_address_opt_mut(&mut self) -> Option<&mut String> {
18863 self.p2p_address.as_mut().map(|field| field as _)
18864 }
18865 pub fn p2p_address_mut(&mut self) -> &mut String {
18868 self.p2p_address.get_or_insert_default()
18869 }
18870 pub fn p2p_address_opt(&self) -> Option<&str> {
18872 self.p2p_address.as_ref().map(|field| field as _)
18873 }
18874 pub fn set_p2p_address<T: Into<String>>(&mut self, field: T) {
18876 self.p2p_address = Some(field.into().into());
18877 }
18878 pub fn with_p2p_address<T: Into<String>>(mut self, field: T) -> Self {
18880 self.set_p2p_address(field.into());
18881 self
18882 }
18883 pub fn primary_address_opt_mut(&mut self) -> Option<&mut String> {
18885 self.primary_address.as_mut().map(|field| field as _)
18886 }
18887 pub fn primary_address_mut(&mut self) -> &mut String {
18890 self.primary_address.get_or_insert_default()
18891 }
18892 pub fn primary_address_opt(&self) -> Option<&str> {
18894 self.primary_address.as_ref().map(|field| field as _)
18895 }
18896 pub fn set_primary_address<T: Into<String>>(&mut self, field: T) {
18898 self.primary_address = Some(field.into().into());
18899 }
18900 pub fn with_primary_address<T: Into<String>>(mut self, field: T) -> Self {
18902 self.set_primary_address(field.into());
18903 self
18904 }
18905 pub fn worker_address_opt_mut(&mut self) -> Option<&mut String> {
18907 self.worker_address.as_mut().map(|field| field as _)
18908 }
18909 pub fn worker_address_mut(&mut self) -> &mut String {
18912 self.worker_address.get_or_insert_default()
18913 }
18914 pub fn worker_address_opt(&self) -> Option<&str> {
18916 self.worker_address.as_ref().map(|field| field as _)
18917 }
18918 pub fn set_worker_address<T: Into<String>>(&mut self, field: T) {
18920 self.worker_address = Some(field.into().into());
18921 }
18922 pub fn with_worker_address<T: Into<String>>(mut self, field: T) -> Self {
18924 self.set_worker_address(field.into());
18925 self
18926 }
18927 pub fn next_epoch_protocol_public_key_opt(&self) -> Option<&[u8]> {
18929 self.next_epoch_protocol_public_key.as_ref().map(|field| field as _)
18930 }
18931 pub fn set_next_epoch_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
18933 &mut self,
18934 field: T,
18935 ) {
18936 self.next_epoch_protocol_public_key = Some(field.into().into());
18937 }
18938 pub fn with_next_epoch_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
18940 mut self,
18941 field: T,
18942 ) -> Self {
18943 self.set_next_epoch_protocol_public_key(field.into());
18944 self
18945 }
18946 pub fn next_epoch_proof_of_possession_opt(&self) -> Option<&[u8]> {
18948 self.next_epoch_proof_of_possession.as_ref().map(|field| field as _)
18949 }
18950 pub fn set_next_epoch_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
18952 &mut self,
18953 field: T,
18954 ) {
18955 self.next_epoch_proof_of_possession = Some(field.into().into());
18956 }
18957 pub fn with_next_epoch_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
18959 mut self,
18960 field: T,
18961 ) -> Self {
18962 self.set_next_epoch_proof_of_possession(field.into());
18963 self
18964 }
18965 pub fn next_epoch_network_public_key_opt(&self) -> Option<&[u8]> {
18967 self.next_epoch_network_public_key.as_ref().map(|field| field as _)
18968 }
18969 pub fn set_next_epoch_network_public_key<T: Into<::prost::bytes::Bytes>>(
18971 &mut self,
18972 field: T,
18973 ) {
18974 self.next_epoch_network_public_key = Some(field.into().into());
18975 }
18976 pub fn with_next_epoch_network_public_key<T: Into<::prost::bytes::Bytes>>(
18978 mut self,
18979 field: T,
18980 ) -> Self {
18981 self.set_next_epoch_network_public_key(field.into());
18982 self
18983 }
18984 pub fn next_epoch_worker_public_key_opt(&self) -> Option<&[u8]> {
18986 self.next_epoch_worker_public_key.as_ref().map(|field| field as _)
18987 }
18988 pub fn set_next_epoch_worker_public_key<T: Into<::prost::bytes::Bytes>>(
18990 &mut self,
18991 field: T,
18992 ) {
18993 self.next_epoch_worker_public_key = Some(field.into().into());
18994 }
18995 pub fn with_next_epoch_worker_public_key<T: Into<::prost::bytes::Bytes>>(
18997 mut self,
18998 field: T,
18999 ) -> Self {
19000 self.set_next_epoch_worker_public_key(field.into());
19001 self
19002 }
19003 pub fn next_epoch_network_address_opt_mut(&mut self) -> Option<&mut String> {
19005 self.next_epoch_network_address.as_mut().map(|field| field as _)
19006 }
19007 pub fn next_epoch_network_address_mut(&mut self) -> &mut String {
19010 self.next_epoch_network_address.get_or_insert_default()
19011 }
19012 pub fn next_epoch_network_address_opt(&self) -> Option<&str> {
19014 self.next_epoch_network_address.as_ref().map(|field| field as _)
19015 }
19016 pub fn set_next_epoch_network_address<T: Into<String>>(&mut self, field: T) {
19018 self.next_epoch_network_address = Some(field.into().into());
19019 }
19020 pub fn with_next_epoch_network_address<T: Into<String>>(
19022 mut self,
19023 field: T,
19024 ) -> Self {
19025 self.set_next_epoch_network_address(field.into());
19026 self
19027 }
19028 pub fn next_epoch_p2p_address_opt_mut(&mut self) -> Option<&mut String> {
19030 self.next_epoch_p2p_address.as_mut().map(|field| field as _)
19031 }
19032 pub fn next_epoch_p2p_address_mut(&mut self) -> &mut String {
19035 self.next_epoch_p2p_address.get_or_insert_default()
19036 }
19037 pub fn next_epoch_p2p_address_opt(&self) -> Option<&str> {
19039 self.next_epoch_p2p_address.as_ref().map(|field| field as _)
19040 }
19041 pub fn set_next_epoch_p2p_address<T: Into<String>>(&mut self, field: T) {
19043 self.next_epoch_p2p_address = Some(field.into().into());
19044 }
19045 pub fn with_next_epoch_p2p_address<T: Into<String>>(mut self, field: T) -> Self {
19047 self.set_next_epoch_p2p_address(field.into());
19048 self
19049 }
19050 pub fn next_epoch_primary_address_opt_mut(&mut self) -> Option<&mut String> {
19052 self.next_epoch_primary_address.as_mut().map(|field| field as _)
19053 }
19054 pub fn next_epoch_primary_address_mut(&mut self) -> &mut String {
19057 self.next_epoch_primary_address.get_or_insert_default()
19058 }
19059 pub fn next_epoch_primary_address_opt(&self) -> Option<&str> {
19061 self.next_epoch_primary_address.as_ref().map(|field| field as _)
19062 }
19063 pub fn set_next_epoch_primary_address<T: Into<String>>(&mut self, field: T) {
19065 self.next_epoch_primary_address = Some(field.into().into());
19066 }
19067 pub fn with_next_epoch_primary_address<T: Into<String>>(
19069 mut self,
19070 field: T,
19071 ) -> Self {
19072 self.set_next_epoch_primary_address(field.into());
19073 self
19074 }
19075 pub fn next_epoch_worker_address_opt_mut(&mut self) -> Option<&mut String> {
19077 self.next_epoch_worker_address.as_mut().map(|field| field as _)
19078 }
19079 pub fn next_epoch_worker_address_mut(&mut self) -> &mut String {
19082 self.next_epoch_worker_address.get_or_insert_default()
19083 }
19084 pub fn next_epoch_worker_address_opt(&self) -> Option<&str> {
19086 self.next_epoch_worker_address.as_ref().map(|field| field as _)
19087 }
19088 pub fn set_next_epoch_worker_address<T: Into<String>>(&mut self, field: T) {
19090 self.next_epoch_worker_address = Some(field.into().into());
19091 }
19092 pub fn with_next_epoch_worker_address<T: Into<String>>(
19094 mut self,
19095 field: T,
19096 ) -> Self {
19097 self.set_next_epoch_worker_address(field.into());
19098 self
19099 }
19100 pub fn metadata_extra_fields(&self) -> &super::MoveTable {
19102 self.metadata_extra_fields
19103 .as_ref()
19104 .map(|field| field as _)
19105 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
19106 }
19107 pub fn metadata_extra_fields_opt_mut(
19109 &mut self,
19110 ) -> Option<&mut super::MoveTable> {
19111 self.metadata_extra_fields.as_mut().map(|field| field as _)
19112 }
19113 pub fn metadata_extra_fields_mut(&mut self) -> &mut super::MoveTable {
19116 self.metadata_extra_fields.get_or_insert_default()
19117 }
19118 pub fn metadata_extra_fields_opt(&self) -> Option<&super::MoveTable> {
19120 self.metadata_extra_fields.as_ref().map(|field| field as _)
19121 }
19122 pub fn set_metadata_extra_fields<T: Into<super::MoveTable>>(
19124 &mut self,
19125 field: T,
19126 ) {
19127 self.metadata_extra_fields = Some(field.into().into());
19128 }
19129 pub fn with_metadata_extra_fields<T: Into<super::MoveTable>>(
19131 mut self,
19132 field: T,
19133 ) -> Self {
19134 self.set_metadata_extra_fields(field.into());
19135 self
19136 }
19137 pub fn voting_power_opt_mut(&mut self) -> Option<&mut u64> {
19139 self.voting_power.as_mut().map(|field| field as _)
19140 }
19141 pub fn voting_power_mut(&mut self) -> &mut u64 {
19144 self.voting_power.get_or_insert_default()
19145 }
19146 pub fn voting_power_opt(&self) -> Option<u64> {
19148 self.voting_power.as_ref().map(|field| *field)
19149 }
19150 pub fn set_voting_power(&mut self, field: u64) {
19152 self.voting_power = Some(field);
19153 }
19154 pub fn with_voting_power(mut self, field: u64) -> Self {
19156 self.set_voting_power(field);
19157 self
19158 }
19159 pub fn operation_cap_id_opt_mut(&mut self) -> Option<&mut String> {
19161 self.operation_cap_id.as_mut().map(|field| field as _)
19162 }
19163 pub fn operation_cap_id_mut(&mut self) -> &mut String {
19166 self.operation_cap_id.get_or_insert_default()
19167 }
19168 pub fn operation_cap_id_opt(&self) -> Option<&str> {
19170 self.operation_cap_id.as_ref().map(|field| field as _)
19171 }
19172 pub fn set_operation_cap_id<T: Into<String>>(&mut self, field: T) {
19174 self.operation_cap_id = Some(field.into().into());
19175 }
19176 pub fn with_operation_cap_id<T: Into<String>>(mut self, field: T) -> Self {
19178 self.set_operation_cap_id(field.into());
19179 self
19180 }
19181 pub fn gas_price_opt_mut(&mut self) -> Option<&mut u64> {
19183 self.gas_price.as_mut().map(|field| field as _)
19184 }
19185 pub fn gas_price_mut(&mut self) -> &mut u64 {
19188 self.gas_price.get_or_insert_default()
19189 }
19190 pub fn gas_price_opt(&self) -> Option<u64> {
19192 self.gas_price.as_ref().map(|field| *field)
19193 }
19194 pub fn set_gas_price(&mut self, field: u64) {
19196 self.gas_price = Some(field);
19197 }
19198 pub fn with_gas_price(mut self, field: u64) -> Self {
19200 self.set_gas_price(field);
19201 self
19202 }
19203 pub fn staking_pool(&self) -> &super::StakingPool {
19205 self.staking_pool
19206 .as_ref()
19207 .map(|field| field as _)
19208 .unwrap_or_else(|| super::StakingPool::default_instance() as _)
19209 }
19210 pub fn staking_pool_opt_mut(&mut self) -> Option<&mut super::StakingPool> {
19212 self.staking_pool.as_mut().map(|field| field as _)
19213 }
19214 pub fn staking_pool_mut(&mut self) -> &mut super::StakingPool {
19217 self.staking_pool.get_or_insert_default()
19218 }
19219 pub fn staking_pool_opt(&self) -> Option<&super::StakingPool> {
19221 self.staking_pool.as_ref().map(|field| field as _)
19222 }
19223 pub fn set_staking_pool<T: Into<super::StakingPool>>(&mut self, field: T) {
19225 self.staking_pool = Some(field.into().into());
19226 }
19227 pub fn with_staking_pool<T: Into<super::StakingPool>>(
19229 mut self,
19230 field: T,
19231 ) -> Self {
19232 self.set_staking_pool(field.into());
19233 self
19234 }
19235 pub fn commission_rate_opt_mut(&mut self) -> Option<&mut u64> {
19237 self.commission_rate.as_mut().map(|field| field as _)
19238 }
19239 pub fn commission_rate_mut(&mut self) -> &mut u64 {
19242 self.commission_rate.get_or_insert_default()
19243 }
19244 pub fn commission_rate_opt(&self) -> Option<u64> {
19246 self.commission_rate.as_ref().map(|field| *field)
19247 }
19248 pub fn set_commission_rate(&mut self, field: u64) {
19250 self.commission_rate = Some(field);
19251 }
19252 pub fn with_commission_rate(mut self, field: u64) -> Self {
19254 self.set_commission_rate(field);
19255 self
19256 }
19257 pub fn next_epoch_stake_opt_mut(&mut self) -> Option<&mut u64> {
19259 self.next_epoch_stake.as_mut().map(|field| field as _)
19260 }
19261 pub fn next_epoch_stake_mut(&mut self) -> &mut u64 {
19264 self.next_epoch_stake.get_or_insert_default()
19265 }
19266 pub fn next_epoch_stake_opt(&self) -> Option<u64> {
19268 self.next_epoch_stake.as_ref().map(|field| *field)
19269 }
19270 pub fn set_next_epoch_stake(&mut self, field: u64) {
19272 self.next_epoch_stake = Some(field);
19273 }
19274 pub fn with_next_epoch_stake(mut self, field: u64) -> Self {
19276 self.set_next_epoch_stake(field);
19277 self
19278 }
19279 pub fn next_epoch_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
19281 self.next_epoch_gas_price.as_mut().map(|field| field as _)
19282 }
19283 pub fn next_epoch_gas_price_mut(&mut self) -> &mut u64 {
19286 self.next_epoch_gas_price.get_or_insert_default()
19287 }
19288 pub fn next_epoch_gas_price_opt(&self) -> Option<u64> {
19290 self.next_epoch_gas_price.as_ref().map(|field| *field)
19291 }
19292 pub fn set_next_epoch_gas_price(&mut self, field: u64) {
19294 self.next_epoch_gas_price = Some(field);
19295 }
19296 pub fn with_next_epoch_gas_price(mut self, field: u64) -> Self {
19298 self.set_next_epoch_gas_price(field);
19299 self
19300 }
19301 pub fn next_epoch_commission_rate_opt_mut(&mut self) -> Option<&mut u64> {
19303 self.next_epoch_commission_rate.as_mut().map(|field| field as _)
19304 }
19305 pub fn next_epoch_commission_rate_mut(&mut self) -> &mut u64 {
19308 self.next_epoch_commission_rate.get_or_insert_default()
19309 }
19310 pub fn next_epoch_commission_rate_opt(&self) -> Option<u64> {
19312 self.next_epoch_commission_rate.as_ref().map(|field| *field)
19313 }
19314 pub fn set_next_epoch_commission_rate(&mut self, field: u64) {
19316 self.next_epoch_commission_rate = Some(field);
19317 }
19318 pub fn with_next_epoch_commission_rate(mut self, field: u64) -> Self {
19320 self.set_next_epoch_commission_rate(field);
19321 self
19322 }
19323 pub fn extra_fields(&self) -> &super::MoveTable {
19325 self.extra_fields
19326 .as_ref()
19327 .map(|field| field as _)
19328 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
19329 }
19330 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
19332 self.extra_fields.as_mut().map(|field| field as _)
19333 }
19334 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
19337 self.extra_fields.get_or_insert_default()
19338 }
19339 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
19341 self.extra_fields.as_ref().map(|field| field as _)
19342 }
19343 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
19345 self.extra_fields = Some(field.into().into());
19346 }
19347 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
19349 self.set_extra_fields(field.into());
19350 self
19351 }
19352 }
19353 impl super::ValidatorAggregatedSignature {
19354 pub const fn const_default() -> Self {
19355 Self {
19356 epoch: None,
19357 signature: None,
19358 bitmap: None,
19359 }
19360 }
19361 #[doc(hidden)]
19362 pub fn default_instance() -> &'static Self {
19363 static DEFAULT: super::ValidatorAggregatedSignature = super::ValidatorAggregatedSignature::const_default();
19364 &DEFAULT
19365 }
19366 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
19368 self.epoch.as_mut().map(|field| field as _)
19369 }
19370 pub fn epoch_mut(&mut self) -> &mut u64 {
19373 self.epoch.get_or_insert_default()
19374 }
19375 pub fn epoch_opt(&self) -> Option<u64> {
19377 self.epoch.as_ref().map(|field| *field)
19378 }
19379 pub fn set_epoch(&mut self, field: u64) {
19381 self.epoch = Some(field);
19382 }
19383 pub fn with_epoch(mut self, field: u64) -> Self {
19385 self.set_epoch(field);
19386 self
19387 }
19388 pub fn signature_opt(&self) -> Option<&[u8]> {
19390 self.signature.as_ref().map(|field| field as _)
19391 }
19392 pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
19394 self.signature = Some(field.into().into());
19395 }
19396 pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
19398 mut self,
19399 field: T,
19400 ) -> Self {
19401 self.set_signature(field.into());
19402 self
19403 }
19404 pub fn bitmap_opt(&self) -> Option<&[u8]> {
19406 self.bitmap.as_ref().map(|field| field as _)
19407 }
19408 pub fn set_bitmap<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
19410 self.bitmap = Some(field.into().into());
19411 }
19412 pub fn with_bitmap<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
19414 self.set_bitmap(field.into());
19415 self
19416 }
19417 }
19418 impl super::ValidatorCommittee {
19419 pub const fn const_default() -> Self {
19420 Self {
19421 epoch: None,
19422 members: Vec::new(),
19423 }
19424 }
19425 #[doc(hidden)]
19426 pub fn default_instance() -> &'static Self {
19427 static DEFAULT: super::ValidatorCommittee = super::ValidatorCommittee::const_default();
19428 &DEFAULT
19429 }
19430 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
19432 self.epoch.as_mut().map(|field| field as _)
19433 }
19434 pub fn epoch_mut(&mut self) -> &mut u64 {
19437 self.epoch.get_or_insert_default()
19438 }
19439 pub fn epoch_opt(&self) -> Option<u64> {
19441 self.epoch.as_ref().map(|field| *field)
19442 }
19443 pub fn set_epoch(&mut self, field: u64) {
19445 self.epoch = Some(field);
19446 }
19447 pub fn with_epoch(mut self, field: u64) -> Self {
19449 self.set_epoch(field);
19450 self
19451 }
19452 pub fn members(&self) -> &[super::ValidatorCommitteeMember] {
19454 &self.members
19455 }
19456 pub fn members_mut(&mut self) -> &mut Vec<super::ValidatorCommitteeMember> {
19459 &mut self.members
19460 }
19461 pub fn set_members(&mut self, field: Vec<super::ValidatorCommitteeMember>) {
19463 self.members = field;
19464 }
19465 pub fn with_members(
19467 mut self,
19468 field: Vec<super::ValidatorCommitteeMember>,
19469 ) -> Self {
19470 self.set_members(field);
19471 self
19472 }
19473 }
19474 impl super::ValidatorCommitteeMember {
19475 pub const fn const_default() -> Self {
19476 Self {
19477 public_key: None,
19478 weight: None,
19479 }
19480 }
19481 #[doc(hidden)]
19482 pub fn default_instance() -> &'static Self {
19483 static DEFAULT: super::ValidatorCommitteeMember = super::ValidatorCommitteeMember::const_default();
19484 &DEFAULT
19485 }
19486 pub fn public_key_opt(&self) -> Option<&[u8]> {
19488 self.public_key.as_ref().map(|field| field as _)
19489 }
19490 pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
19492 self.public_key = Some(field.into().into());
19493 }
19494 pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
19496 mut self,
19497 field: T,
19498 ) -> Self {
19499 self.set_public_key(field.into());
19500 self
19501 }
19502 pub fn weight_opt_mut(&mut self) -> Option<&mut u64> {
19504 self.weight.as_mut().map(|field| field as _)
19505 }
19506 pub fn weight_mut(&mut self) -> &mut u64 {
19509 self.weight.get_or_insert_default()
19510 }
19511 pub fn weight_opt(&self) -> Option<u64> {
19513 self.weight.as_ref().map(|field| *field)
19514 }
19515 pub fn set_weight(&mut self, field: u64) {
19517 self.weight = Some(field);
19518 }
19519 pub fn with_weight(mut self, field: u64) -> Self {
19521 self.set_weight(field);
19522 self
19523 }
19524 }
19525 impl super::ValidatorExecutionTimeObservation {
19526 pub const fn const_default() -> Self {
19527 Self {
19528 validator: None,
19529 duration: None,
19530 }
19531 }
19532 #[doc(hidden)]
19533 pub fn default_instance() -> &'static Self {
19534 static DEFAULT: super::ValidatorExecutionTimeObservation = super::ValidatorExecutionTimeObservation::const_default();
19535 &DEFAULT
19536 }
19537 pub fn validator_opt(&self) -> Option<&[u8]> {
19539 self.validator.as_ref().map(|field| field as _)
19540 }
19541 pub fn set_validator<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
19543 self.validator = Some(field.into().into());
19544 }
19545 pub fn with_validator<T: Into<::prost::bytes::Bytes>>(
19547 mut self,
19548 field: T,
19549 ) -> Self {
19550 self.set_validator(field.into());
19551 self
19552 }
19553 pub fn duration_opt_mut(&mut self) -> Option<&mut ::prost_types::Duration> {
19555 self.duration.as_mut().map(|field| field as _)
19556 }
19557 pub fn duration_mut(&mut self) -> &mut ::prost_types::Duration {
19560 self.duration.get_or_insert_default()
19561 }
19562 pub fn duration_opt(&self) -> Option<&::prost_types::Duration> {
19564 self.duration.as_ref().map(|field| field as _)
19565 }
19566 pub fn set_duration<T: Into<::prost_types::Duration>>(&mut self, field: T) {
19568 self.duration = Some(field.into().into());
19569 }
19570 pub fn with_duration<T: Into<::prost_types::Duration>>(
19572 mut self,
19573 field: T,
19574 ) -> Self {
19575 self.set_duration(field.into());
19576 self
19577 }
19578 }
19579 impl super::ValidatorReportRecord {
19580 pub const fn const_default() -> Self {
19581 Self {
19582 reported: None,
19583 reporters: Vec::new(),
19584 }
19585 }
19586 #[doc(hidden)]
19587 pub fn default_instance() -> &'static Self {
19588 static DEFAULT: super::ValidatorReportRecord = super::ValidatorReportRecord::const_default();
19589 &DEFAULT
19590 }
19591 pub fn reported_opt_mut(&mut self) -> Option<&mut String> {
19593 self.reported.as_mut().map(|field| field as _)
19594 }
19595 pub fn reported_mut(&mut self) -> &mut String {
19598 self.reported.get_or_insert_default()
19599 }
19600 pub fn reported_opt(&self) -> Option<&str> {
19602 self.reported.as_ref().map(|field| field as _)
19603 }
19604 pub fn set_reported<T: Into<String>>(&mut self, field: T) {
19606 self.reported = Some(field.into().into());
19607 }
19608 pub fn with_reported<T: Into<String>>(mut self, field: T) -> Self {
19610 self.set_reported(field.into());
19611 self
19612 }
19613 pub fn reporters(&self) -> &[String] {
19615 &self.reporters
19616 }
19617 pub fn reporters_mut(&mut self) -> &mut Vec<String> {
19620 &mut self.reporters
19621 }
19622 pub fn set_reporters(&mut self, field: Vec<String>) {
19624 self.reporters = field;
19625 }
19626 pub fn with_reporters(mut self, field: Vec<String>) -> Self {
19628 self.set_reporters(field);
19629 self
19630 }
19631 }
19632 impl super::ValidatorSet {
19633 pub const fn const_default() -> Self {
19634 Self {
19635 total_stake: None,
19636 active_validators: Vec::new(),
19637 pending_active_validators: None,
19638 pending_removals: Vec::new(),
19639 staking_pool_mappings: None,
19640 inactive_validators: None,
19641 validator_candidates: None,
19642 at_risk_validators: std::collections::BTreeMap::new(),
19643 extra_fields: None,
19644 }
19645 }
19646 #[doc(hidden)]
19647 pub fn default_instance() -> &'static Self {
19648 static DEFAULT: super::ValidatorSet = super::ValidatorSet::const_default();
19649 &DEFAULT
19650 }
19651 pub fn total_stake_opt_mut(&mut self) -> Option<&mut u64> {
19653 self.total_stake.as_mut().map(|field| field as _)
19654 }
19655 pub fn total_stake_mut(&mut self) -> &mut u64 {
19658 self.total_stake.get_or_insert_default()
19659 }
19660 pub fn total_stake_opt(&self) -> Option<u64> {
19662 self.total_stake.as_ref().map(|field| *field)
19663 }
19664 pub fn set_total_stake(&mut self, field: u64) {
19666 self.total_stake = Some(field);
19667 }
19668 pub fn with_total_stake(mut self, field: u64) -> Self {
19670 self.set_total_stake(field);
19671 self
19672 }
19673 pub fn active_validators(&self) -> &[super::Validator] {
19675 &self.active_validators
19676 }
19677 pub fn active_validators_mut(&mut self) -> &mut Vec<super::Validator> {
19680 &mut self.active_validators
19681 }
19682 pub fn set_active_validators(&mut self, field: Vec<super::Validator>) {
19684 self.active_validators = field;
19685 }
19686 pub fn with_active_validators(mut self, field: Vec<super::Validator>) -> Self {
19688 self.set_active_validators(field);
19689 self
19690 }
19691 pub fn pending_active_validators(&self) -> &super::MoveTable {
19693 self.pending_active_validators
19694 .as_ref()
19695 .map(|field| field as _)
19696 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
19697 }
19698 pub fn pending_active_validators_opt_mut(
19700 &mut self,
19701 ) -> Option<&mut super::MoveTable> {
19702 self.pending_active_validators.as_mut().map(|field| field as _)
19703 }
19704 pub fn pending_active_validators_mut(&mut self) -> &mut super::MoveTable {
19707 self.pending_active_validators.get_or_insert_default()
19708 }
19709 pub fn pending_active_validators_opt(&self) -> Option<&super::MoveTable> {
19711 self.pending_active_validators.as_ref().map(|field| field as _)
19712 }
19713 pub fn set_pending_active_validators<T: Into<super::MoveTable>>(
19715 &mut self,
19716 field: T,
19717 ) {
19718 self.pending_active_validators = Some(field.into().into());
19719 }
19720 pub fn with_pending_active_validators<T: Into<super::MoveTable>>(
19722 mut self,
19723 field: T,
19724 ) -> Self {
19725 self.set_pending_active_validators(field.into());
19726 self
19727 }
19728 pub fn pending_removals(&self) -> &[u64] {
19730 &self.pending_removals
19731 }
19732 pub fn pending_removals_mut(&mut self) -> &mut Vec<u64> {
19735 &mut self.pending_removals
19736 }
19737 pub fn set_pending_removals(&mut self, field: Vec<u64>) {
19739 self.pending_removals = field;
19740 }
19741 pub fn with_pending_removals(mut self, field: Vec<u64>) -> Self {
19743 self.set_pending_removals(field);
19744 self
19745 }
19746 pub fn staking_pool_mappings(&self) -> &super::MoveTable {
19748 self.staking_pool_mappings
19749 .as_ref()
19750 .map(|field| field as _)
19751 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
19752 }
19753 pub fn staking_pool_mappings_opt_mut(
19755 &mut self,
19756 ) -> Option<&mut super::MoveTable> {
19757 self.staking_pool_mappings.as_mut().map(|field| field as _)
19758 }
19759 pub fn staking_pool_mappings_mut(&mut self) -> &mut super::MoveTable {
19762 self.staking_pool_mappings.get_or_insert_default()
19763 }
19764 pub fn staking_pool_mappings_opt(&self) -> Option<&super::MoveTable> {
19766 self.staking_pool_mappings.as_ref().map(|field| field as _)
19767 }
19768 pub fn set_staking_pool_mappings<T: Into<super::MoveTable>>(
19770 &mut self,
19771 field: T,
19772 ) {
19773 self.staking_pool_mappings = Some(field.into().into());
19774 }
19775 pub fn with_staking_pool_mappings<T: Into<super::MoveTable>>(
19777 mut self,
19778 field: T,
19779 ) -> Self {
19780 self.set_staking_pool_mappings(field.into());
19781 self
19782 }
19783 pub fn inactive_validators(&self) -> &super::MoveTable {
19785 self.inactive_validators
19786 .as_ref()
19787 .map(|field| field as _)
19788 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
19789 }
19790 pub fn inactive_validators_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
19792 self.inactive_validators.as_mut().map(|field| field as _)
19793 }
19794 pub fn inactive_validators_mut(&mut self) -> &mut super::MoveTable {
19797 self.inactive_validators.get_or_insert_default()
19798 }
19799 pub fn inactive_validators_opt(&self) -> Option<&super::MoveTable> {
19801 self.inactive_validators.as_ref().map(|field| field as _)
19802 }
19803 pub fn set_inactive_validators<T: Into<super::MoveTable>>(&mut self, field: T) {
19805 self.inactive_validators = Some(field.into().into());
19806 }
19807 pub fn with_inactive_validators<T: Into<super::MoveTable>>(
19809 mut self,
19810 field: T,
19811 ) -> Self {
19812 self.set_inactive_validators(field.into());
19813 self
19814 }
19815 pub fn validator_candidates(&self) -> &super::MoveTable {
19817 self.validator_candidates
19818 .as_ref()
19819 .map(|field| field as _)
19820 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
19821 }
19822 pub fn validator_candidates_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
19824 self.validator_candidates.as_mut().map(|field| field as _)
19825 }
19826 pub fn validator_candidates_mut(&mut self) -> &mut super::MoveTable {
19829 self.validator_candidates.get_or_insert_default()
19830 }
19831 pub fn validator_candidates_opt(&self) -> Option<&super::MoveTable> {
19833 self.validator_candidates.as_ref().map(|field| field as _)
19834 }
19835 pub fn set_validator_candidates<T: Into<super::MoveTable>>(&mut self, field: T) {
19837 self.validator_candidates = Some(field.into().into());
19838 }
19839 pub fn with_validator_candidates<T: Into<super::MoveTable>>(
19841 mut self,
19842 field: T,
19843 ) -> Self {
19844 self.set_validator_candidates(field.into());
19845 self
19846 }
19847 pub fn at_risk_validators(&self) -> &::std::collections::BTreeMap<String, u64> {
19849 &self.at_risk_validators
19850 }
19851 pub fn at_risk_validators_mut(
19854 &mut self,
19855 ) -> &mut ::std::collections::BTreeMap<String, u64> {
19856 &mut self.at_risk_validators
19857 }
19858 pub fn set_at_risk_validators(
19860 &mut self,
19861 field: ::std::collections::BTreeMap<String, u64>,
19862 ) {
19863 self.at_risk_validators = field;
19864 }
19865 pub fn with_at_risk_validators(
19867 mut self,
19868 field: ::std::collections::BTreeMap<String, u64>,
19869 ) -> Self {
19870 self.set_at_risk_validators(field);
19871 self
19872 }
19873 pub fn extra_fields(&self) -> &super::MoveTable {
19875 self.extra_fields
19876 .as_ref()
19877 .map(|field| field as _)
19878 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
19879 }
19880 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
19882 self.extra_fields.as_mut().map(|field| field as _)
19883 }
19884 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
19887 self.extra_fields.get_or_insert_default()
19888 }
19889 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
19891 self.extra_fields.as_ref().map(|field| field as _)
19892 }
19893 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
19895 self.extra_fields = Some(field.into().into());
19896 }
19897 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
19899 self.set_extra_fields(field.into());
19900 self
19901 }
19902 }
19903 impl super::VariantDescriptor {
19904 pub const fn const_default() -> Self {
19905 Self {
19906 name: None,
19907 position: None,
19908 fields: Vec::new(),
19909 }
19910 }
19911 #[doc(hidden)]
19912 pub fn default_instance() -> &'static Self {
19913 static DEFAULT: super::VariantDescriptor = super::VariantDescriptor::const_default();
19914 &DEFAULT
19915 }
19916 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
19918 self.name.as_mut().map(|field| field as _)
19919 }
19920 pub fn name_mut(&mut self) -> &mut String {
19923 self.name.get_or_insert_default()
19924 }
19925 pub fn name_opt(&self) -> Option<&str> {
19927 self.name.as_ref().map(|field| field as _)
19928 }
19929 pub fn set_name<T: Into<String>>(&mut self, field: T) {
19931 self.name = Some(field.into().into());
19932 }
19933 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
19935 self.set_name(field.into());
19936 self
19937 }
19938 pub fn position_opt_mut(&mut self) -> Option<&mut u32> {
19940 self.position.as_mut().map(|field| field as _)
19941 }
19942 pub fn position_mut(&mut self) -> &mut u32 {
19945 self.position.get_or_insert_default()
19946 }
19947 pub fn position_opt(&self) -> Option<u32> {
19949 self.position.as_ref().map(|field| *field)
19950 }
19951 pub fn set_position(&mut self, field: u32) {
19953 self.position = Some(field);
19954 }
19955 pub fn with_position(mut self, field: u32) -> Self {
19957 self.set_position(field);
19958 self
19959 }
19960 pub fn fields(&self) -> &[super::FieldDescriptor] {
19962 &self.fields
19963 }
19964 pub fn fields_mut(&mut self) -> &mut Vec<super::FieldDescriptor> {
19967 &mut self.fields
19968 }
19969 pub fn set_fields(&mut self, field: Vec<super::FieldDescriptor>) {
19971 self.fields = field;
19972 }
19973 pub fn with_fields(mut self, field: Vec<super::FieldDescriptor>) -> Self {
19975 self.set_fields(field);
19976 self
19977 }
19978 }
19979 impl super::VerifySignatureRequest {
19980 pub const fn const_default() -> Self {
19981 Self {
19982 message: None,
19983 signature: None,
19984 address: None,
19985 jwks: Vec::new(),
19986 }
19987 }
19988 #[doc(hidden)]
19989 pub fn default_instance() -> &'static Self {
19990 static DEFAULT: super::VerifySignatureRequest = super::VerifySignatureRequest::const_default();
19991 &DEFAULT
19992 }
19993 pub fn message(&self) -> &super::Bcs {
19995 self.message
19996 .as_ref()
19997 .map(|field| field as _)
19998 .unwrap_or_else(|| super::Bcs::default_instance() as _)
19999 }
20000 pub fn message_opt_mut(&mut self) -> Option<&mut super::Bcs> {
20002 self.message.as_mut().map(|field| field as _)
20003 }
20004 pub fn message_mut(&mut self) -> &mut super::Bcs {
20007 self.message.get_or_insert_default()
20008 }
20009 pub fn message_opt(&self) -> Option<&super::Bcs> {
20011 self.message.as_ref().map(|field| field as _)
20012 }
20013 pub fn set_message<T: Into<super::Bcs>>(&mut self, field: T) {
20015 self.message = Some(field.into().into());
20016 }
20017 pub fn with_message<T: Into<super::Bcs>>(mut self, field: T) -> Self {
20019 self.set_message(field.into());
20020 self
20021 }
20022 pub fn signature(&self) -> &super::UserSignature {
20024 self.signature
20025 .as_ref()
20026 .map(|field| field as _)
20027 .unwrap_or_else(|| super::UserSignature::default_instance() as _)
20028 }
20029 pub fn signature_opt_mut(&mut self) -> Option<&mut super::UserSignature> {
20031 self.signature.as_mut().map(|field| field as _)
20032 }
20033 pub fn signature_mut(&mut self) -> &mut super::UserSignature {
20036 self.signature.get_or_insert_default()
20037 }
20038 pub fn signature_opt(&self) -> Option<&super::UserSignature> {
20040 self.signature.as_ref().map(|field| field as _)
20041 }
20042 pub fn set_signature<T: Into<super::UserSignature>>(&mut self, field: T) {
20044 self.signature = Some(field.into().into());
20045 }
20046 pub fn with_signature<T: Into<super::UserSignature>>(
20048 mut self,
20049 field: T,
20050 ) -> Self {
20051 self.set_signature(field.into());
20052 self
20053 }
20054 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
20056 self.address.as_mut().map(|field| field as _)
20057 }
20058 pub fn address_mut(&mut self) -> &mut String {
20061 self.address.get_or_insert_default()
20062 }
20063 pub fn address_opt(&self) -> Option<&str> {
20065 self.address.as_ref().map(|field| field as _)
20066 }
20067 pub fn set_address<T: Into<String>>(&mut self, field: T) {
20069 self.address = Some(field.into().into());
20070 }
20071 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
20073 self.set_address(field.into());
20074 self
20075 }
20076 pub fn jwks(&self) -> &[super::ActiveJwk] {
20078 &self.jwks
20079 }
20080 pub fn jwks_mut(&mut self) -> &mut Vec<super::ActiveJwk> {
20083 &mut self.jwks
20084 }
20085 pub fn set_jwks(&mut self, field: Vec<super::ActiveJwk>) {
20087 self.jwks = field;
20088 }
20089 pub fn with_jwks(mut self, field: Vec<super::ActiveJwk>) -> Self {
20091 self.set_jwks(field);
20092 self
20093 }
20094 }
20095 impl super::VerifySignatureResponse {
20096 pub const fn const_default() -> Self {
20097 Self {
20098 is_valid: None,
20099 reason: None,
20100 }
20101 }
20102 #[doc(hidden)]
20103 pub fn default_instance() -> &'static Self {
20104 static DEFAULT: super::VerifySignatureResponse = super::VerifySignatureResponse::const_default();
20105 &DEFAULT
20106 }
20107 pub fn is_valid_opt_mut(&mut self) -> Option<&mut bool> {
20109 self.is_valid.as_mut().map(|field| field as _)
20110 }
20111 pub fn is_valid_mut(&mut self) -> &mut bool {
20114 self.is_valid.get_or_insert_default()
20115 }
20116 pub fn is_valid_opt(&self) -> Option<bool> {
20118 self.is_valid.as_ref().map(|field| *field)
20119 }
20120 pub fn set_is_valid(&mut self, field: bool) {
20122 self.is_valid = Some(field);
20123 }
20124 pub fn with_is_valid(mut self, field: bool) -> Self {
20126 self.set_is_valid(field);
20127 self
20128 }
20129 pub fn reason_opt_mut(&mut self) -> Option<&mut String> {
20131 self.reason.as_mut().map(|field| field as _)
20132 }
20133 pub fn reason_mut(&mut self) -> &mut String {
20136 self.reason.get_or_insert_default()
20137 }
20138 pub fn reason_opt(&self) -> Option<&str> {
20140 self.reason.as_ref().map(|field| field as _)
20141 }
20142 pub fn set_reason<T: Into<String>>(&mut self, field: T) {
20144 self.reason = Some(field.into().into());
20145 }
20146 pub fn with_reason<T: Into<String>>(mut self, field: T) -> Self {
20148 self.set_reason(field.into());
20149 self
20150 }
20151 }
20152 impl super::VersionAssignment {
20153 pub const fn const_default() -> Self {
20154 Self {
20155 object_id: None,
20156 start_version: None,
20157 version: None,
20158 }
20159 }
20160 #[doc(hidden)]
20161 pub fn default_instance() -> &'static Self {
20162 static DEFAULT: super::VersionAssignment = super::VersionAssignment::const_default();
20163 &DEFAULT
20164 }
20165 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
20167 self.object_id.as_mut().map(|field| field as _)
20168 }
20169 pub fn object_id_mut(&mut self) -> &mut String {
20172 self.object_id.get_or_insert_default()
20173 }
20174 pub fn object_id_opt(&self) -> Option<&str> {
20176 self.object_id.as_ref().map(|field| field as _)
20177 }
20178 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
20180 self.object_id = Some(field.into().into());
20181 }
20182 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
20184 self.set_object_id(field.into());
20185 self
20186 }
20187 pub fn start_version_opt_mut(&mut self) -> Option<&mut u64> {
20189 self.start_version.as_mut().map(|field| field as _)
20190 }
20191 pub fn start_version_mut(&mut self) -> &mut u64 {
20194 self.start_version.get_or_insert_default()
20195 }
20196 pub fn start_version_opt(&self) -> Option<u64> {
20198 self.start_version.as_ref().map(|field| *field)
20199 }
20200 pub fn set_start_version(&mut self, field: u64) {
20202 self.start_version = Some(field);
20203 }
20204 pub fn with_start_version(mut self, field: u64) -> Self {
20206 self.set_start_version(field);
20207 self
20208 }
20209 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
20211 self.version.as_mut().map(|field| field as _)
20212 }
20213 pub fn version_mut(&mut self) -> &mut u64 {
20216 self.version.get_or_insert_default()
20217 }
20218 pub fn version_opt(&self) -> Option<u64> {
20220 self.version.as_ref().map(|field| *field)
20221 }
20222 pub fn set_version(&mut self, field: u64) {
20224 self.version = Some(field);
20225 }
20226 pub fn with_version(mut self, field: u64) -> Self {
20228 self.set_version(field);
20229 self
20230 }
20231 }
20232 impl super::Watermark {
20233 pub const fn const_default() -> Self {
20234 Self {
20235 cursor: None,
20236 checkpoint: None,
20237 }
20238 }
20239 #[doc(hidden)]
20240 pub fn default_instance() -> &'static Self {
20241 static DEFAULT: super::Watermark = super::Watermark::const_default();
20242 &DEFAULT
20243 }
20244 pub fn cursor_opt(&self) -> Option<&[u8]> {
20246 self.cursor.as_ref().map(|field| field as _)
20247 }
20248 pub fn set_cursor<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
20250 self.cursor = Some(field.into().into());
20251 }
20252 pub fn with_cursor<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
20254 self.set_cursor(field.into());
20255 self
20256 }
20257 pub fn checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
20259 self.checkpoint.as_mut().map(|field| field as _)
20260 }
20261 pub fn checkpoint_mut(&mut self) -> &mut u64 {
20264 self.checkpoint.get_or_insert_default()
20265 }
20266 pub fn checkpoint_opt(&self) -> Option<u64> {
20268 self.checkpoint.as_ref().map(|field| *field)
20269 }
20270 pub fn set_checkpoint(&mut self, field: u64) {
20272 self.checkpoint = Some(field);
20273 }
20274 pub fn with_checkpoint(mut self, field: u64) -> Self {
20276 self.set_checkpoint(field);
20277 self
20278 }
20279 }
20280 impl super::ZkLoginAuthenticator {
20281 pub const fn const_default() -> Self {
20282 Self {
20283 inputs: None,
20284 max_epoch: None,
20285 signature: None,
20286 public_identifier: None,
20287 jwk_id: None,
20288 }
20289 }
20290 #[doc(hidden)]
20291 pub fn default_instance() -> &'static Self {
20292 static DEFAULT: super::ZkLoginAuthenticator = super::ZkLoginAuthenticator::const_default();
20293 &DEFAULT
20294 }
20295 pub fn inputs(&self) -> &super::ZkLoginInputs {
20297 self.inputs
20298 .as_ref()
20299 .map(|field| field as _)
20300 .unwrap_or_else(|| super::ZkLoginInputs::default_instance() as _)
20301 }
20302 pub fn inputs_opt_mut(&mut self) -> Option<&mut super::ZkLoginInputs> {
20304 self.inputs.as_mut().map(|field| field as _)
20305 }
20306 pub fn inputs_mut(&mut self) -> &mut super::ZkLoginInputs {
20309 self.inputs.get_or_insert_default()
20310 }
20311 pub fn inputs_opt(&self) -> Option<&super::ZkLoginInputs> {
20313 self.inputs.as_ref().map(|field| field as _)
20314 }
20315 pub fn set_inputs<T: Into<super::ZkLoginInputs>>(&mut self, field: T) {
20317 self.inputs = Some(field.into().into());
20318 }
20319 pub fn with_inputs<T: Into<super::ZkLoginInputs>>(mut self, field: T) -> Self {
20321 self.set_inputs(field.into());
20322 self
20323 }
20324 pub fn max_epoch_opt_mut(&mut self) -> Option<&mut u64> {
20326 self.max_epoch.as_mut().map(|field| field as _)
20327 }
20328 pub fn max_epoch_mut(&mut self) -> &mut u64 {
20331 self.max_epoch.get_or_insert_default()
20332 }
20333 pub fn max_epoch_opt(&self) -> Option<u64> {
20335 self.max_epoch.as_ref().map(|field| *field)
20336 }
20337 pub fn set_max_epoch(&mut self, field: u64) {
20339 self.max_epoch = Some(field);
20340 }
20341 pub fn with_max_epoch(mut self, field: u64) -> Self {
20343 self.set_max_epoch(field);
20344 self
20345 }
20346 pub fn signature(&self) -> &super::SimpleSignature {
20348 self.signature
20349 .as_ref()
20350 .map(|field| field as _)
20351 .unwrap_or_else(|| super::SimpleSignature::default_instance() as _)
20352 }
20353 pub fn signature_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
20355 self.signature.as_mut().map(|field| field as _)
20356 }
20357 pub fn signature_mut(&mut self) -> &mut super::SimpleSignature {
20360 self.signature.get_or_insert_default()
20361 }
20362 pub fn signature_opt(&self) -> Option<&super::SimpleSignature> {
20364 self.signature.as_ref().map(|field| field as _)
20365 }
20366 pub fn set_signature<T: Into<super::SimpleSignature>>(&mut self, field: T) {
20368 self.signature = Some(field.into().into());
20369 }
20370 pub fn with_signature<T: Into<super::SimpleSignature>>(
20372 mut self,
20373 field: T,
20374 ) -> Self {
20375 self.set_signature(field.into());
20376 self
20377 }
20378 pub fn public_identifier(&self) -> &super::ZkLoginPublicIdentifier {
20380 self.public_identifier
20381 .as_ref()
20382 .map(|field| field as _)
20383 .unwrap_or_else(|| {
20384 super::ZkLoginPublicIdentifier::default_instance() as _
20385 })
20386 }
20387 pub fn public_identifier_opt_mut(
20389 &mut self,
20390 ) -> Option<&mut super::ZkLoginPublicIdentifier> {
20391 self.public_identifier.as_mut().map(|field| field as _)
20392 }
20393 pub fn public_identifier_mut(&mut self) -> &mut super::ZkLoginPublicIdentifier {
20396 self.public_identifier.get_or_insert_default()
20397 }
20398 pub fn public_identifier_opt(&self) -> Option<&super::ZkLoginPublicIdentifier> {
20400 self.public_identifier.as_ref().map(|field| field as _)
20401 }
20402 pub fn set_public_identifier<T: Into<super::ZkLoginPublicIdentifier>>(
20404 &mut self,
20405 field: T,
20406 ) {
20407 self.public_identifier = Some(field.into().into());
20408 }
20409 pub fn with_public_identifier<T: Into<super::ZkLoginPublicIdentifier>>(
20411 mut self,
20412 field: T,
20413 ) -> Self {
20414 self.set_public_identifier(field.into());
20415 self
20416 }
20417 pub fn jwk_id(&self) -> &super::JwkId {
20419 self.jwk_id
20420 .as_ref()
20421 .map(|field| field as _)
20422 .unwrap_or_else(|| super::JwkId::default_instance() as _)
20423 }
20424 pub fn jwk_id_opt_mut(&mut self) -> Option<&mut super::JwkId> {
20426 self.jwk_id.as_mut().map(|field| field as _)
20427 }
20428 pub fn jwk_id_mut(&mut self) -> &mut super::JwkId {
20431 self.jwk_id.get_or_insert_default()
20432 }
20433 pub fn jwk_id_opt(&self) -> Option<&super::JwkId> {
20435 self.jwk_id.as_ref().map(|field| field as _)
20436 }
20437 pub fn set_jwk_id<T: Into<super::JwkId>>(&mut self, field: T) {
20439 self.jwk_id = Some(field.into().into());
20440 }
20441 pub fn with_jwk_id<T: Into<super::JwkId>>(mut self, field: T) -> Self {
20443 self.set_jwk_id(field.into());
20444 self
20445 }
20446 }
20447 impl super::ZkLoginClaim {
20448 pub const fn const_default() -> Self {
20449 Self {
20450 value: None,
20451 index_mod_4: None,
20452 }
20453 }
20454 #[doc(hidden)]
20455 pub fn default_instance() -> &'static Self {
20456 static DEFAULT: super::ZkLoginClaim = super::ZkLoginClaim::const_default();
20457 &DEFAULT
20458 }
20459 pub fn value_opt_mut(&mut self) -> Option<&mut String> {
20461 self.value.as_mut().map(|field| field as _)
20462 }
20463 pub fn value_mut(&mut self) -> &mut String {
20466 self.value.get_or_insert_default()
20467 }
20468 pub fn value_opt(&self) -> Option<&str> {
20470 self.value.as_ref().map(|field| field as _)
20471 }
20472 pub fn set_value<T: Into<String>>(&mut self, field: T) {
20474 self.value = Some(field.into().into());
20475 }
20476 pub fn with_value<T: Into<String>>(mut self, field: T) -> Self {
20478 self.set_value(field.into());
20479 self
20480 }
20481 pub fn index_mod_4_opt_mut(&mut self) -> Option<&mut u32> {
20483 self.index_mod_4.as_mut().map(|field| field as _)
20484 }
20485 pub fn index_mod_4_mut(&mut self) -> &mut u32 {
20488 self.index_mod_4.get_or_insert_default()
20489 }
20490 pub fn index_mod_4_opt(&self) -> Option<u32> {
20492 self.index_mod_4.as_ref().map(|field| *field)
20493 }
20494 pub fn set_index_mod_4(&mut self, field: u32) {
20496 self.index_mod_4 = Some(field);
20497 }
20498 pub fn with_index_mod_4(mut self, field: u32) -> Self {
20500 self.set_index_mod_4(field);
20501 self
20502 }
20503 }
20504 impl super::ZkLoginInputs {
20505 pub const fn const_default() -> Self {
20506 Self {
20507 proof_points: None,
20508 iss_base64_details: None,
20509 header_base64: None,
20510 address_seed: None,
20511 }
20512 }
20513 #[doc(hidden)]
20514 pub fn default_instance() -> &'static Self {
20515 static DEFAULT: super::ZkLoginInputs = super::ZkLoginInputs::const_default();
20516 &DEFAULT
20517 }
20518 pub fn proof_points(&self) -> &super::ZkLoginProof {
20520 self.proof_points
20521 .as_ref()
20522 .map(|field| field as _)
20523 .unwrap_or_else(|| super::ZkLoginProof::default_instance() as _)
20524 }
20525 pub fn proof_points_opt_mut(&mut self) -> Option<&mut super::ZkLoginProof> {
20527 self.proof_points.as_mut().map(|field| field as _)
20528 }
20529 pub fn proof_points_mut(&mut self) -> &mut super::ZkLoginProof {
20532 self.proof_points.get_or_insert_default()
20533 }
20534 pub fn proof_points_opt(&self) -> Option<&super::ZkLoginProof> {
20536 self.proof_points.as_ref().map(|field| field as _)
20537 }
20538 pub fn set_proof_points<T: Into<super::ZkLoginProof>>(&mut self, field: T) {
20540 self.proof_points = Some(field.into().into());
20541 }
20542 pub fn with_proof_points<T: Into<super::ZkLoginProof>>(
20544 mut self,
20545 field: T,
20546 ) -> Self {
20547 self.set_proof_points(field.into());
20548 self
20549 }
20550 pub fn iss_base64_details(&self) -> &super::ZkLoginClaim {
20552 self.iss_base64_details
20553 .as_ref()
20554 .map(|field| field as _)
20555 .unwrap_or_else(|| super::ZkLoginClaim::default_instance() as _)
20556 }
20557 pub fn iss_base64_details_opt_mut(
20559 &mut self,
20560 ) -> Option<&mut super::ZkLoginClaim> {
20561 self.iss_base64_details.as_mut().map(|field| field as _)
20562 }
20563 pub fn iss_base64_details_mut(&mut self) -> &mut super::ZkLoginClaim {
20566 self.iss_base64_details.get_or_insert_default()
20567 }
20568 pub fn iss_base64_details_opt(&self) -> Option<&super::ZkLoginClaim> {
20570 self.iss_base64_details.as_ref().map(|field| field as _)
20571 }
20572 pub fn set_iss_base64_details<T: Into<super::ZkLoginClaim>>(
20574 &mut self,
20575 field: T,
20576 ) {
20577 self.iss_base64_details = Some(field.into().into());
20578 }
20579 pub fn with_iss_base64_details<T: Into<super::ZkLoginClaim>>(
20581 mut self,
20582 field: T,
20583 ) -> Self {
20584 self.set_iss_base64_details(field.into());
20585 self
20586 }
20587 pub fn header_base64_opt_mut(&mut self) -> Option<&mut String> {
20589 self.header_base64.as_mut().map(|field| field as _)
20590 }
20591 pub fn header_base64_mut(&mut self) -> &mut String {
20594 self.header_base64.get_or_insert_default()
20595 }
20596 pub fn header_base64_opt(&self) -> Option<&str> {
20598 self.header_base64.as_ref().map(|field| field as _)
20599 }
20600 pub fn set_header_base64<T: Into<String>>(&mut self, field: T) {
20602 self.header_base64 = Some(field.into().into());
20603 }
20604 pub fn with_header_base64<T: Into<String>>(mut self, field: T) -> Self {
20606 self.set_header_base64(field.into());
20607 self
20608 }
20609 pub fn address_seed_opt_mut(&mut self) -> Option<&mut String> {
20611 self.address_seed.as_mut().map(|field| field as _)
20612 }
20613 pub fn address_seed_mut(&mut self) -> &mut String {
20616 self.address_seed.get_or_insert_default()
20617 }
20618 pub fn address_seed_opt(&self) -> Option<&str> {
20620 self.address_seed.as_ref().map(|field| field as _)
20621 }
20622 pub fn set_address_seed<T: Into<String>>(&mut self, field: T) {
20624 self.address_seed = Some(field.into().into());
20625 }
20626 pub fn with_address_seed<T: Into<String>>(mut self, field: T) -> Self {
20628 self.set_address_seed(field.into());
20629 self
20630 }
20631 }
20632 impl super::ZkLoginProof {
20633 pub const fn const_default() -> Self {
20634 Self { a: None, b: None, c: None }
20635 }
20636 #[doc(hidden)]
20637 pub fn default_instance() -> &'static Self {
20638 static DEFAULT: super::ZkLoginProof = super::ZkLoginProof::const_default();
20639 &DEFAULT
20640 }
20641 pub fn a(&self) -> &super::CircomG1 {
20643 self.a
20644 .as_ref()
20645 .map(|field| field as _)
20646 .unwrap_or_else(|| super::CircomG1::default_instance() as _)
20647 }
20648 pub fn a_opt_mut(&mut self) -> Option<&mut super::CircomG1> {
20650 self.a.as_mut().map(|field| field as _)
20651 }
20652 pub fn a_mut(&mut self) -> &mut super::CircomG1 {
20655 self.a.get_or_insert_default()
20656 }
20657 pub fn a_opt(&self) -> Option<&super::CircomG1> {
20659 self.a.as_ref().map(|field| field as _)
20660 }
20661 pub fn set_a<T: Into<super::CircomG1>>(&mut self, field: T) {
20663 self.a = Some(field.into().into());
20664 }
20665 pub fn with_a<T: Into<super::CircomG1>>(mut self, field: T) -> Self {
20667 self.set_a(field.into());
20668 self
20669 }
20670 pub fn b(&self) -> &super::CircomG2 {
20672 self.b
20673 .as_ref()
20674 .map(|field| field as _)
20675 .unwrap_or_else(|| super::CircomG2::default_instance() as _)
20676 }
20677 pub fn b_opt_mut(&mut self) -> Option<&mut super::CircomG2> {
20679 self.b.as_mut().map(|field| field as _)
20680 }
20681 pub fn b_mut(&mut self) -> &mut super::CircomG2 {
20684 self.b.get_or_insert_default()
20685 }
20686 pub fn b_opt(&self) -> Option<&super::CircomG2> {
20688 self.b.as_ref().map(|field| field as _)
20689 }
20690 pub fn set_b<T: Into<super::CircomG2>>(&mut self, field: T) {
20692 self.b = Some(field.into().into());
20693 }
20694 pub fn with_b<T: Into<super::CircomG2>>(mut self, field: T) -> Self {
20696 self.set_b(field.into());
20697 self
20698 }
20699 pub fn c(&self) -> &super::CircomG1 {
20701 self.c
20702 .as_ref()
20703 .map(|field| field as _)
20704 .unwrap_or_else(|| super::CircomG1::default_instance() as _)
20705 }
20706 pub fn c_opt_mut(&mut self) -> Option<&mut super::CircomG1> {
20708 self.c.as_mut().map(|field| field as _)
20709 }
20710 pub fn c_mut(&mut self) -> &mut super::CircomG1 {
20713 self.c.get_or_insert_default()
20714 }
20715 pub fn c_opt(&self) -> Option<&super::CircomG1> {
20717 self.c.as_ref().map(|field| field as _)
20718 }
20719 pub fn set_c<T: Into<super::CircomG1>>(&mut self, field: T) {
20721 self.c = Some(field.into().into());
20722 }
20723 pub fn with_c<T: Into<super::CircomG1>>(mut self, field: T) -> Self {
20725 self.set_c(field.into());
20726 self
20727 }
20728 }
20729 impl super::ZkLoginPublicIdentifier {
20730 pub const fn const_default() -> Self {
20731 Self {
20732 iss: None,
20733 address_seed: None,
20734 }
20735 }
20736 #[doc(hidden)]
20737 pub fn default_instance() -> &'static Self {
20738 static DEFAULT: super::ZkLoginPublicIdentifier = super::ZkLoginPublicIdentifier::const_default();
20739 &DEFAULT
20740 }
20741 pub fn iss_opt_mut(&mut self) -> Option<&mut String> {
20743 self.iss.as_mut().map(|field| field as _)
20744 }
20745 pub fn iss_mut(&mut self) -> &mut String {
20748 self.iss.get_or_insert_default()
20749 }
20750 pub fn iss_opt(&self) -> Option<&str> {
20752 self.iss.as_ref().map(|field| field as _)
20753 }
20754 pub fn set_iss<T: Into<String>>(&mut self, field: T) {
20756 self.iss = Some(field.into().into());
20757 }
20758 pub fn with_iss<T: Into<String>>(mut self, field: T) -> Self {
20760 self.set_iss(field.into());
20761 self
20762 }
20763 pub fn address_seed_opt_mut(&mut self) -> Option<&mut String> {
20765 self.address_seed.as_mut().map(|field| field as _)
20766 }
20767 pub fn address_seed_mut(&mut self) -> &mut String {
20770 self.address_seed.get_or_insert_default()
20771 }
20772 pub fn address_seed_opt(&self) -> Option<&str> {
20774 self.address_seed.as_ref().map(|field| field as _)
20775 }
20776 pub fn set_address_seed<T: Into<String>>(&mut self, field: T) {
20778 self.address_seed = Some(field.into().into());
20779 }
20780 pub fn with_address_seed<T: Into<String>>(mut self, field: T) -> Self {
20782 self.set_address_seed(field.into());
20783 self
20784 }
20785 }
20786}