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: None,
10 }
11 }
12 #[doc(hidden)]
13 pub fn default_instance() -> &'static Self {
14 static DEFAULT: super::AccumulatorWrite = super::AccumulatorWrite::const_default();
15 &DEFAULT
16 }
17 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
19 self.address.as_mut().map(|field| field as _)
20 }
21 pub fn address_mut(&mut self) -> &mut String {
24 self.address.get_or_insert_default()
25 }
26 pub fn address_opt(&self) -> Option<&str> {
28 self.address.as_ref().map(|field| field as _)
29 }
30 pub fn set_address<T: Into<String>>(&mut self, field: T) {
32 self.address = Some(field.into().into());
33 }
34 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
36 self.set_address(field.into());
37 self
38 }
39 pub fn accumulator_type_opt_mut(&mut self) -> Option<&mut String> {
41 self.accumulator_type.as_mut().map(|field| field as _)
42 }
43 pub fn accumulator_type_mut(&mut self) -> &mut String {
46 self.accumulator_type.get_or_insert_default()
47 }
48 pub fn accumulator_type_opt(&self) -> Option<&str> {
50 self.accumulator_type.as_ref().map(|field| field as _)
51 }
52 pub fn set_accumulator_type<T: Into<String>>(&mut self, field: T) {
54 self.accumulator_type = Some(field.into().into());
55 }
56 pub fn with_accumulator_type<T: Into<String>>(mut self, field: T) -> Self {
58 self.set_accumulator_type(field.into());
59 self
60 }
61 pub fn with_operation<T: Into<super::accumulator_write::AccumulatorOperation>>(
63 mut self,
64 field: T,
65 ) -> Self {
66 self.set_operation(field.into());
67 self
68 }
69 pub fn value_opt_mut(&mut self) -> Option<&mut u64> {
71 self.value.as_mut().map(|field| field as _)
72 }
73 pub fn value_mut(&mut self) -> &mut u64 {
76 self.value.get_or_insert_default()
77 }
78 pub fn value_opt(&self) -> Option<u64> {
80 self.value.as_ref().map(|field| *field)
81 }
82 pub fn set_value(&mut self, field: u64) {
84 self.value = Some(field);
85 }
86 pub fn with_value(mut self, field: u64) -> Self {
88 self.set_value(field);
89 self
90 }
91 }
92 impl super::ActiveJwk {
93 pub const fn const_default() -> Self {
94 Self {
95 id: None,
96 jwk: None,
97 epoch: None,
98 }
99 }
100 #[doc(hidden)]
101 pub fn default_instance() -> &'static Self {
102 static DEFAULT: super::ActiveJwk = super::ActiveJwk::const_default();
103 &DEFAULT
104 }
105 pub fn id(&self) -> &super::JwkId {
107 self.id
108 .as_ref()
109 .map(|field| field as _)
110 .unwrap_or_else(|| super::JwkId::default_instance() as _)
111 }
112 pub fn id_opt_mut(&mut self) -> Option<&mut super::JwkId> {
114 self.id.as_mut().map(|field| field as _)
115 }
116 pub fn id_mut(&mut self) -> &mut super::JwkId {
119 self.id.get_or_insert_default()
120 }
121 pub fn id_opt(&self) -> Option<&super::JwkId> {
123 self.id.as_ref().map(|field| field as _)
124 }
125 pub fn set_id<T: Into<super::JwkId>>(&mut self, field: T) {
127 self.id = Some(field.into().into());
128 }
129 pub fn with_id<T: Into<super::JwkId>>(mut self, field: T) -> Self {
131 self.set_id(field.into());
132 self
133 }
134 pub fn jwk(&self) -> &super::Jwk {
136 self.jwk
137 .as_ref()
138 .map(|field| field as _)
139 .unwrap_or_else(|| super::Jwk::default_instance() as _)
140 }
141 pub fn jwk_opt_mut(&mut self) -> Option<&mut super::Jwk> {
143 self.jwk.as_mut().map(|field| field as _)
144 }
145 pub fn jwk_mut(&mut self) -> &mut super::Jwk {
148 self.jwk.get_or_insert_default()
149 }
150 pub fn jwk_opt(&self) -> Option<&super::Jwk> {
152 self.jwk.as_ref().map(|field| field as _)
153 }
154 pub fn set_jwk<T: Into<super::Jwk>>(&mut self, field: T) {
156 self.jwk = Some(field.into().into());
157 }
158 pub fn with_jwk<T: Into<super::Jwk>>(mut self, field: T) -> Self {
160 self.set_jwk(field.into());
161 self
162 }
163 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
165 self.epoch.as_mut().map(|field| field as _)
166 }
167 pub fn epoch_mut(&mut self) -> &mut u64 {
170 self.epoch.get_or_insert_default()
171 }
172 pub fn epoch_opt(&self) -> Option<u64> {
174 self.epoch.as_ref().map(|field| *field)
175 }
176 pub fn set_epoch(&mut self, field: u64) {
178 self.epoch = Some(field);
179 }
180 pub fn with_epoch(mut self, field: u64) -> Self {
182 self.set_epoch(field);
183 self
184 }
185 }
186 impl super::AddressAliasesVersion {
187 pub const fn const_default() -> Self {
188 Self { version: None }
189 }
190 #[doc(hidden)]
191 pub fn default_instance() -> &'static Self {
192 static DEFAULT: super::AddressAliasesVersion = super::AddressAliasesVersion::const_default();
193 &DEFAULT
194 }
195 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
197 self.version.as_mut().map(|field| field as _)
198 }
199 pub fn version_mut(&mut self) -> &mut u64 {
202 self.version.get_or_insert_default()
203 }
204 pub fn version_opt(&self) -> Option<u64> {
206 self.version.as_ref().map(|field| *field)
207 }
208 pub fn set_version(&mut self, field: u64) {
210 self.version = Some(field);
211 }
212 pub fn with_version(mut self, field: u64) -> Self {
214 self.set_version(field);
215 self
216 }
217 }
218 impl super::Argument {
219 pub const fn const_default() -> Self {
220 Self {
221 kind: None,
222 input: None,
223 result: None,
224 subresult: None,
225 }
226 }
227 #[doc(hidden)]
228 pub fn default_instance() -> &'static Self {
229 static DEFAULT: super::Argument = super::Argument::const_default();
230 &DEFAULT
231 }
232 pub fn with_kind<T: Into<super::argument::ArgumentKind>>(
234 mut self,
235 field: T,
236 ) -> Self {
237 self.set_kind(field.into());
238 self
239 }
240 pub fn input_opt_mut(&mut self) -> Option<&mut u32> {
242 self.input.as_mut().map(|field| field as _)
243 }
244 pub fn input_mut(&mut self) -> &mut u32 {
247 self.input.get_or_insert_default()
248 }
249 pub fn input_opt(&self) -> Option<u32> {
251 self.input.as_ref().map(|field| *field)
252 }
253 pub fn set_input(&mut self, field: u32) {
255 self.input = Some(field);
256 }
257 pub fn with_input(mut self, field: u32) -> Self {
259 self.set_input(field);
260 self
261 }
262 pub fn result_opt_mut(&mut self) -> Option<&mut u32> {
264 self.result.as_mut().map(|field| field as _)
265 }
266 pub fn result_mut(&mut self) -> &mut u32 {
269 self.result.get_or_insert_default()
270 }
271 pub fn result_opt(&self) -> Option<u32> {
273 self.result.as_ref().map(|field| *field)
274 }
275 pub fn set_result(&mut self, field: u32) {
277 self.result = Some(field);
278 }
279 pub fn with_result(mut self, field: u32) -> Self {
281 self.set_result(field);
282 self
283 }
284 pub fn subresult_opt_mut(&mut self) -> Option<&mut u32> {
286 self.subresult.as_mut().map(|field| field as _)
287 }
288 pub fn subresult_mut(&mut self) -> &mut u32 {
291 self.subresult.get_or_insert_default()
292 }
293 pub fn subresult_opt(&self) -> Option<u32> {
295 self.subresult.as_ref().map(|field| *field)
296 }
297 pub fn set_subresult(&mut self, field: u32) {
299 self.subresult = Some(field);
300 }
301 pub fn with_subresult(mut self, field: u32) -> Self {
303 self.set_subresult(field);
304 self
305 }
306 }
307 impl super::AuthenticatorStateExpire {
308 pub const fn const_default() -> Self {
309 Self {
310 min_epoch: None,
311 authenticator_object_initial_shared_version: None,
312 }
313 }
314 #[doc(hidden)]
315 pub fn default_instance() -> &'static Self {
316 static DEFAULT: super::AuthenticatorStateExpire = super::AuthenticatorStateExpire::const_default();
317 &DEFAULT
318 }
319 pub fn min_epoch_opt_mut(&mut self) -> Option<&mut u64> {
321 self.min_epoch.as_mut().map(|field| field as _)
322 }
323 pub fn min_epoch_mut(&mut self) -> &mut u64 {
326 self.min_epoch.get_or_insert_default()
327 }
328 pub fn min_epoch_opt(&self) -> Option<u64> {
330 self.min_epoch.as_ref().map(|field| *field)
331 }
332 pub fn set_min_epoch(&mut self, field: u64) {
334 self.min_epoch = Some(field);
335 }
336 pub fn with_min_epoch(mut self, field: u64) -> Self {
338 self.set_min_epoch(field);
339 self
340 }
341 pub fn authenticator_object_initial_shared_version_opt_mut(
343 &mut self,
344 ) -> Option<&mut u64> {
345 self.authenticator_object_initial_shared_version
346 .as_mut()
347 .map(|field| field as _)
348 }
349 pub fn authenticator_object_initial_shared_version_mut(&mut self) -> &mut u64 {
352 self.authenticator_object_initial_shared_version.get_or_insert_default()
353 }
354 pub fn authenticator_object_initial_shared_version_opt(&self) -> Option<u64> {
356 self.authenticator_object_initial_shared_version.as_ref().map(|field| *field)
357 }
358 pub fn set_authenticator_object_initial_shared_version(&mut self, field: u64) {
360 self.authenticator_object_initial_shared_version = Some(field);
361 }
362 pub fn with_authenticator_object_initial_shared_version(
364 mut self,
365 field: u64,
366 ) -> Self {
367 self.set_authenticator_object_initial_shared_version(field);
368 self
369 }
370 }
371 impl super::AuthenticatorStateUpdate {
372 pub const fn const_default() -> Self {
373 Self {
374 epoch: None,
375 round: None,
376 new_active_jwks: Vec::new(),
377 authenticator_object_initial_shared_version: None,
378 }
379 }
380 #[doc(hidden)]
381 pub fn default_instance() -> &'static Self {
382 static DEFAULT: super::AuthenticatorStateUpdate = super::AuthenticatorStateUpdate::const_default();
383 &DEFAULT
384 }
385 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
387 self.epoch.as_mut().map(|field| field as _)
388 }
389 pub fn epoch_mut(&mut self) -> &mut u64 {
392 self.epoch.get_or_insert_default()
393 }
394 pub fn epoch_opt(&self) -> Option<u64> {
396 self.epoch.as_ref().map(|field| *field)
397 }
398 pub fn set_epoch(&mut self, field: u64) {
400 self.epoch = Some(field);
401 }
402 pub fn with_epoch(mut self, field: u64) -> Self {
404 self.set_epoch(field);
405 self
406 }
407 pub fn round_opt_mut(&mut self) -> Option<&mut u64> {
409 self.round.as_mut().map(|field| field as _)
410 }
411 pub fn round_mut(&mut self) -> &mut u64 {
414 self.round.get_or_insert_default()
415 }
416 pub fn round_opt(&self) -> Option<u64> {
418 self.round.as_ref().map(|field| *field)
419 }
420 pub fn set_round(&mut self, field: u64) {
422 self.round = Some(field);
423 }
424 pub fn with_round(mut self, field: u64) -> Self {
426 self.set_round(field);
427 self
428 }
429 pub fn new_active_jwks(&self) -> &[super::ActiveJwk] {
431 &self.new_active_jwks
432 }
433 pub fn new_active_jwks_mut(&mut self) -> &mut Vec<super::ActiveJwk> {
436 &mut self.new_active_jwks
437 }
438 pub fn set_new_active_jwks(&mut self, field: Vec<super::ActiveJwk>) {
440 self.new_active_jwks = field;
441 }
442 pub fn with_new_active_jwks(mut self, field: Vec<super::ActiveJwk>) -> Self {
444 self.set_new_active_jwks(field);
445 self
446 }
447 pub fn authenticator_object_initial_shared_version_opt_mut(
449 &mut self,
450 ) -> Option<&mut u64> {
451 self.authenticator_object_initial_shared_version
452 .as_mut()
453 .map(|field| field as _)
454 }
455 pub fn authenticator_object_initial_shared_version_mut(&mut self) -> &mut u64 {
458 self.authenticator_object_initial_shared_version.get_or_insert_default()
459 }
460 pub fn authenticator_object_initial_shared_version_opt(&self) -> Option<u64> {
462 self.authenticator_object_initial_shared_version.as_ref().map(|field| *field)
463 }
464 pub fn set_authenticator_object_initial_shared_version(&mut self, field: u64) {
466 self.authenticator_object_initial_shared_version = Some(field);
467 }
468 pub fn with_authenticator_object_initial_shared_version(
470 mut self,
471 field: u64,
472 ) -> Self {
473 self.set_authenticator_object_initial_shared_version(field);
474 self
475 }
476 }
477 impl super::Balance {
478 pub const fn const_default() -> Self {
479 Self {
480 coin_type: None,
481 balance: None,
482 address_balance: None,
483 coin_balance: None,
484 }
485 }
486 #[doc(hidden)]
487 pub fn default_instance() -> &'static Self {
488 static DEFAULT: super::Balance = super::Balance::const_default();
489 &DEFAULT
490 }
491 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
493 self.coin_type.as_mut().map(|field| field as _)
494 }
495 pub fn coin_type_mut(&mut self) -> &mut String {
498 self.coin_type.get_or_insert_default()
499 }
500 pub fn coin_type_opt(&self) -> Option<&str> {
502 self.coin_type.as_ref().map(|field| field as _)
503 }
504 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
506 self.coin_type = Some(field.into().into());
507 }
508 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
510 self.set_coin_type(field.into());
511 self
512 }
513 pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
515 self.balance.as_mut().map(|field| field as _)
516 }
517 pub fn balance_mut(&mut self) -> &mut u64 {
520 self.balance.get_or_insert_default()
521 }
522 pub fn balance_opt(&self) -> Option<u64> {
524 self.balance.as_ref().map(|field| *field)
525 }
526 pub fn set_balance(&mut self, field: u64) {
528 self.balance = Some(field);
529 }
530 pub fn with_balance(mut self, field: u64) -> Self {
532 self.set_balance(field);
533 self
534 }
535 pub fn address_balance_opt_mut(&mut self) -> Option<&mut u64> {
537 self.address_balance.as_mut().map(|field| field as _)
538 }
539 pub fn address_balance_mut(&mut self) -> &mut u64 {
542 self.address_balance.get_or_insert_default()
543 }
544 pub fn address_balance_opt(&self) -> Option<u64> {
546 self.address_balance.as_ref().map(|field| *field)
547 }
548 pub fn set_address_balance(&mut self, field: u64) {
550 self.address_balance = Some(field);
551 }
552 pub fn with_address_balance(mut self, field: u64) -> Self {
554 self.set_address_balance(field);
555 self
556 }
557 pub fn coin_balance_opt_mut(&mut self) -> Option<&mut u64> {
559 self.coin_balance.as_mut().map(|field| field as _)
560 }
561 pub fn coin_balance_mut(&mut self) -> &mut u64 {
564 self.coin_balance.get_or_insert_default()
565 }
566 pub fn coin_balance_opt(&self) -> Option<u64> {
568 self.coin_balance.as_ref().map(|field| *field)
569 }
570 pub fn set_coin_balance(&mut self, field: u64) {
572 self.coin_balance = Some(field);
573 }
574 pub fn with_coin_balance(mut self, field: u64) -> Self {
576 self.set_coin_balance(field);
577 self
578 }
579 }
580 impl super::BalanceChange {
581 pub const fn const_default() -> Self {
582 Self {
583 address: None,
584 coin_type: None,
585 amount: None,
586 }
587 }
588 #[doc(hidden)]
589 pub fn default_instance() -> &'static Self {
590 static DEFAULT: super::BalanceChange = super::BalanceChange::const_default();
591 &DEFAULT
592 }
593 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
595 self.address.as_mut().map(|field| field as _)
596 }
597 pub fn address_mut(&mut self) -> &mut String {
600 self.address.get_or_insert_default()
601 }
602 pub fn address_opt(&self) -> Option<&str> {
604 self.address.as_ref().map(|field| field as _)
605 }
606 pub fn set_address<T: Into<String>>(&mut self, field: T) {
608 self.address = Some(field.into().into());
609 }
610 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
612 self.set_address(field.into());
613 self
614 }
615 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
617 self.coin_type.as_mut().map(|field| field as _)
618 }
619 pub fn coin_type_mut(&mut self) -> &mut String {
622 self.coin_type.get_or_insert_default()
623 }
624 pub fn coin_type_opt(&self) -> Option<&str> {
626 self.coin_type.as_ref().map(|field| field as _)
627 }
628 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
630 self.coin_type = Some(field.into().into());
631 }
632 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
634 self.set_coin_type(field.into());
635 self
636 }
637 pub fn amount_opt_mut(&mut self) -> Option<&mut String> {
639 self.amount.as_mut().map(|field| field as _)
640 }
641 pub fn amount_mut(&mut self) -> &mut String {
644 self.amount.get_or_insert_default()
645 }
646 pub fn amount_opt(&self) -> Option<&str> {
648 self.amount.as_ref().map(|field| field as _)
649 }
650 pub fn set_amount<T: Into<String>>(&mut self, field: T) {
652 self.amount = Some(field.into().into());
653 }
654 pub fn with_amount<T: Into<String>>(mut self, field: T) -> Self {
656 self.set_amount(field.into());
657 self
658 }
659 }
660 impl super::BatchGetObjectsRequest {
661 pub const fn const_default() -> Self {
662 Self {
663 requests: Vec::new(),
664 read_mask: None,
665 }
666 }
667 #[doc(hidden)]
668 pub fn default_instance() -> &'static Self {
669 static DEFAULT: super::BatchGetObjectsRequest = super::BatchGetObjectsRequest::const_default();
670 &DEFAULT
671 }
672 pub fn requests(&self) -> &[super::GetObjectRequest] {
674 &self.requests
675 }
676 pub fn requests_mut(&mut self) -> &mut Vec<super::GetObjectRequest> {
679 &mut self.requests
680 }
681 pub fn set_requests(&mut self, field: Vec<super::GetObjectRequest>) {
683 self.requests = field;
684 }
685 pub fn with_requests(mut self, field: Vec<super::GetObjectRequest>) -> Self {
687 self.set_requests(field);
688 self
689 }
690 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
692 self.read_mask.as_mut().map(|field| field as _)
693 }
694 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
697 self.read_mask.get_or_insert_default()
698 }
699 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
701 self.read_mask.as_ref().map(|field| field as _)
702 }
703 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
705 self.read_mask = Some(field.into().into());
706 }
707 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
709 mut self,
710 field: T,
711 ) -> Self {
712 self.set_read_mask(field.into());
713 self
714 }
715 }
716 impl super::BatchGetObjectsResponse {
717 pub const fn const_default() -> Self {
718 Self { objects: Vec::new() }
719 }
720 #[doc(hidden)]
721 pub fn default_instance() -> &'static Self {
722 static DEFAULT: super::BatchGetObjectsResponse = super::BatchGetObjectsResponse::const_default();
723 &DEFAULT
724 }
725 pub fn objects(&self) -> &[super::GetObjectResult] {
727 &self.objects
728 }
729 pub fn objects_mut(&mut self) -> &mut Vec<super::GetObjectResult> {
732 &mut self.objects
733 }
734 pub fn set_objects(&mut self, field: Vec<super::GetObjectResult>) {
736 self.objects = field;
737 }
738 pub fn with_objects(mut self, field: Vec<super::GetObjectResult>) -> Self {
740 self.set_objects(field);
741 self
742 }
743 }
744 impl super::BatchGetTransactionsRequest {
745 pub const fn const_default() -> Self {
746 Self {
747 digests: Vec::new(),
748 read_mask: None,
749 }
750 }
751 #[doc(hidden)]
752 pub fn default_instance() -> &'static Self {
753 static DEFAULT: super::BatchGetTransactionsRequest = super::BatchGetTransactionsRequest::const_default();
754 &DEFAULT
755 }
756 pub fn digests(&self) -> &[String] {
758 &self.digests
759 }
760 pub fn digests_mut(&mut self) -> &mut Vec<String> {
763 &mut self.digests
764 }
765 pub fn set_digests(&mut self, field: Vec<String>) {
767 self.digests = field;
768 }
769 pub fn with_digests(mut self, field: Vec<String>) -> Self {
771 self.set_digests(field);
772 self
773 }
774 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
776 self.read_mask.as_mut().map(|field| field as _)
777 }
778 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
781 self.read_mask.get_or_insert_default()
782 }
783 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
785 self.read_mask.as_ref().map(|field| field as _)
786 }
787 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
789 self.read_mask = Some(field.into().into());
790 }
791 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
793 mut self,
794 field: T,
795 ) -> Self {
796 self.set_read_mask(field.into());
797 self
798 }
799 }
800 impl super::BatchGetTransactionsResponse {
801 pub const fn const_default() -> Self {
802 Self { transactions: Vec::new() }
803 }
804 #[doc(hidden)]
805 pub fn default_instance() -> &'static Self {
806 static DEFAULT: super::BatchGetTransactionsResponse = super::BatchGetTransactionsResponse::const_default();
807 &DEFAULT
808 }
809 pub fn transactions(&self) -> &[super::GetTransactionResult] {
811 &self.transactions
812 }
813 pub fn transactions_mut(&mut self) -> &mut Vec<super::GetTransactionResult> {
816 &mut self.transactions
817 }
818 pub fn set_transactions(&mut self, field: Vec<super::GetTransactionResult>) {
820 self.transactions = field;
821 }
822 pub fn with_transactions(
824 mut self,
825 field: Vec<super::GetTransactionResult>,
826 ) -> Self {
827 self.set_transactions(field);
828 self
829 }
830 }
831 impl super::Bcs {
832 pub const fn const_default() -> Self {
833 Self { name: None, value: None }
834 }
835 #[doc(hidden)]
836 pub fn default_instance() -> &'static Self {
837 static DEFAULT: super::Bcs = super::Bcs::const_default();
838 &DEFAULT
839 }
840 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
842 self.name.as_mut().map(|field| field as _)
843 }
844 pub fn name_mut(&mut self) -> &mut String {
847 self.name.get_or_insert_default()
848 }
849 pub fn name_opt(&self) -> Option<&str> {
851 self.name.as_ref().map(|field| field as _)
852 }
853 pub fn set_name<T: Into<String>>(&mut self, field: T) {
855 self.name = Some(field.into().into());
856 }
857 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
859 self.set_name(field.into());
860 self
861 }
862 pub fn value_opt(&self) -> Option<&[u8]> {
864 self.value.as_ref().map(|field| field as _)
865 }
866 pub fn set_value<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
868 self.value = Some(field.into().into());
869 }
870 pub fn with_value<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
872 self.set_value(field.into());
873 self
874 }
875 }
876 impl super::CanceledTransaction {
877 pub const fn const_default() -> Self {
878 Self {
879 digest: None,
880 version_assignments: Vec::new(),
881 }
882 }
883 #[doc(hidden)]
884 pub fn default_instance() -> &'static Self {
885 static DEFAULT: super::CanceledTransaction = super::CanceledTransaction::const_default();
886 &DEFAULT
887 }
888 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
890 self.digest.as_mut().map(|field| field as _)
891 }
892 pub fn digest_mut(&mut self) -> &mut String {
895 self.digest.get_or_insert_default()
896 }
897 pub fn digest_opt(&self) -> Option<&str> {
899 self.digest.as_ref().map(|field| field as _)
900 }
901 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
903 self.digest = Some(field.into().into());
904 }
905 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
907 self.set_digest(field.into());
908 self
909 }
910 pub fn version_assignments(&self) -> &[super::VersionAssignment] {
912 &self.version_assignments
913 }
914 pub fn version_assignments_mut(&mut self) -> &mut Vec<super::VersionAssignment> {
917 &mut self.version_assignments
918 }
919 pub fn set_version_assignments(&mut self, field: Vec<super::VersionAssignment>) {
921 self.version_assignments = field;
922 }
923 pub fn with_version_assignments(
925 mut self,
926 field: Vec<super::VersionAssignment>,
927 ) -> Self {
928 self.set_version_assignments(field);
929 self
930 }
931 }
932 impl super::ChangeEpoch {
933 pub const fn const_default() -> Self {
934 Self {
935 epoch: None,
936 protocol_version: None,
937 storage_charge: None,
938 computation_charge: None,
939 storage_rebate: None,
940 non_refundable_storage_fee: None,
941 epoch_start_timestamp: None,
942 system_packages: Vec::new(),
943 }
944 }
945 #[doc(hidden)]
946 pub fn default_instance() -> &'static Self {
947 static DEFAULT: super::ChangeEpoch = super::ChangeEpoch::const_default();
948 &DEFAULT
949 }
950 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
952 self.epoch.as_mut().map(|field| field as _)
953 }
954 pub fn epoch_mut(&mut self) -> &mut u64 {
957 self.epoch.get_or_insert_default()
958 }
959 pub fn epoch_opt(&self) -> Option<u64> {
961 self.epoch.as_ref().map(|field| *field)
962 }
963 pub fn set_epoch(&mut self, field: u64) {
965 self.epoch = Some(field);
966 }
967 pub fn with_epoch(mut self, field: u64) -> Self {
969 self.set_epoch(field);
970 self
971 }
972 pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
974 self.protocol_version.as_mut().map(|field| field as _)
975 }
976 pub fn protocol_version_mut(&mut self) -> &mut u64 {
979 self.protocol_version.get_or_insert_default()
980 }
981 pub fn protocol_version_opt(&self) -> Option<u64> {
983 self.protocol_version.as_ref().map(|field| *field)
984 }
985 pub fn set_protocol_version(&mut self, field: u64) {
987 self.protocol_version = Some(field);
988 }
989 pub fn with_protocol_version(mut self, field: u64) -> Self {
991 self.set_protocol_version(field);
992 self
993 }
994 pub fn storage_charge_opt_mut(&mut self) -> Option<&mut u64> {
996 self.storage_charge.as_mut().map(|field| field as _)
997 }
998 pub fn storage_charge_mut(&mut self) -> &mut u64 {
1001 self.storage_charge.get_or_insert_default()
1002 }
1003 pub fn storage_charge_opt(&self) -> Option<u64> {
1005 self.storage_charge.as_ref().map(|field| *field)
1006 }
1007 pub fn set_storage_charge(&mut self, field: u64) {
1009 self.storage_charge = Some(field);
1010 }
1011 pub fn with_storage_charge(mut self, field: u64) -> Self {
1013 self.set_storage_charge(field);
1014 self
1015 }
1016 pub fn computation_charge_opt_mut(&mut self) -> Option<&mut u64> {
1018 self.computation_charge.as_mut().map(|field| field as _)
1019 }
1020 pub fn computation_charge_mut(&mut self) -> &mut u64 {
1023 self.computation_charge.get_or_insert_default()
1024 }
1025 pub fn computation_charge_opt(&self) -> Option<u64> {
1027 self.computation_charge.as_ref().map(|field| *field)
1028 }
1029 pub fn set_computation_charge(&mut self, field: u64) {
1031 self.computation_charge = Some(field);
1032 }
1033 pub fn with_computation_charge(mut self, field: u64) -> Self {
1035 self.set_computation_charge(field);
1036 self
1037 }
1038 pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
1040 self.storage_rebate.as_mut().map(|field| field as _)
1041 }
1042 pub fn storage_rebate_mut(&mut self) -> &mut u64 {
1045 self.storage_rebate.get_or_insert_default()
1046 }
1047 pub fn storage_rebate_opt(&self) -> Option<u64> {
1049 self.storage_rebate.as_ref().map(|field| *field)
1050 }
1051 pub fn set_storage_rebate(&mut self, field: u64) {
1053 self.storage_rebate = Some(field);
1054 }
1055 pub fn with_storage_rebate(mut self, field: u64) -> Self {
1057 self.set_storage_rebate(field);
1058 self
1059 }
1060 pub fn non_refundable_storage_fee_opt_mut(&mut self) -> Option<&mut u64> {
1062 self.non_refundable_storage_fee.as_mut().map(|field| field as _)
1063 }
1064 pub fn non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
1067 self.non_refundable_storage_fee.get_or_insert_default()
1068 }
1069 pub fn non_refundable_storage_fee_opt(&self) -> Option<u64> {
1071 self.non_refundable_storage_fee.as_ref().map(|field| *field)
1072 }
1073 pub fn set_non_refundable_storage_fee(&mut self, field: u64) {
1075 self.non_refundable_storage_fee = Some(field);
1076 }
1077 pub fn with_non_refundable_storage_fee(mut self, field: u64) -> Self {
1079 self.set_non_refundable_storage_fee(field);
1080 self
1081 }
1082 pub fn epoch_start_timestamp_opt_mut(
1084 &mut self,
1085 ) -> Option<&mut ::prost_types::Timestamp> {
1086 self.epoch_start_timestamp.as_mut().map(|field| field as _)
1087 }
1088 pub fn epoch_start_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
1091 self.epoch_start_timestamp.get_or_insert_default()
1092 }
1093 pub fn epoch_start_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
1095 self.epoch_start_timestamp.as_ref().map(|field| field as _)
1096 }
1097 pub fn set_epoch_start_timestamp<T: Into<::prost_types::Timestamp>>(
1099 &mut self,
1100 field: T,
1101 ) {
1102 self.epoch_start_timestamp = Some(field.into().into());
1103 }
1104 pub fn with_epoch_start_timestamp<T: Into<::prost_types::Timestamp>>(
1106 mut self,
1107 field: T,
1108 ) -> Self {
1109 self.set_epoch_start_timestamp(field.into());
1110 self
1111 }
1112 pub fn system_packages(&self) -> &[super::SystemPackage] {
1114 &self.system_packages
1115 }
1116 pub fn system_packages_mut(&mut self) -> &mut Vec<super::SystemPackage> {
1119 &mut self.system_packages
1120 }
1121 pub fn set_system_packages(&mut self, field: Vec<super::SystemPackage>) {
1123 self.system_packages = field;
1124 }
1125 pub fn with_system_packages(mut self, field: Vec<super::SystemPackage>) -> Self {
1127 self.set_system_packages(field);
1128 self
1129 }
1130 }
1131 impl super::ChangedObject {
1132 pub const fn const_default() -> Self {
1133 Self {
1134 object_id: None,
1135 input_state: None,
1136 input_version: None,
1137 input_digest: None,
1138 input_owner: None,
1139 output_state: None,
1140 output_version: None,
1141 output_digest: None,
1142 output_owner: None,
1143 accumulator_write: None,
1144 id_operation: None,
1145 object_type: None,
1146 }
1147 }
1148 #[doc(hidden)]
1149 pub fn default_instance() -> &'static Self {
1150 static DEFAULT: super::ChangedObject = super::ChangedObject::const_default();
1151 &DEFAULT
1152 }
1153 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
1155 self.object_id.as_mut().map(|field| field as _)
1156 }
1157 pub fn object_id_mut(&mut self) -> &mut String {
1160 self.object_id.get_or_insert_default()
1161 }
1162 pub fn object_id_opt(&self) -> Option<&str> {
1164 self.object_id.as_ref().map(|field| field as _)
1165 }
1166 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
1168 self.object_id = Some(field.into().into());
1169 }
1170 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
1172 self.set_object_id(field.into());
1173 self
1174 }
1175 pub fn with_input_state<T: Into<super::changed_object::InputObjectState>>(
1177 mut self,
1178 field: T,
1179 ) -> Self {
1180 self.set_input_state(field.into());
1181 self
1182 }
1183 pub fn input_version_opt_mut(&mut self) -> Option<&mut u64> {
1185 self.input_version.as_mut().map(|field| field as _)
1186 }
1187 pub fn input_version_mut(&mut self) -> &mut u64 {
1190 self.input_version.get_or_insert_default()
1191 }
1192 pub fn input_version_opt(&self) -> Option<u64> {
1194 self.input_version.as_ref().map(|field| *field)
1195 }
1196 pub fn set_input_version(&mut self, field: u64) {
1198 self.input_version = Some(field);
1199 }
1200 pub fn with_input_version(mut self, field: u64) -> Self {
1202 self.set_input_version(field);
1203 self
1204 }
1205 pub fn input_digest_opt_mut(&mut self) -> Option<&mut String> {
1207 self.input_digest.as_mut().map(|field| field as _)
1208 }
1209 pub fn input_digest_mut(&mut self) -> &mut String {
1212 self.input_digest.get_or_insert_default()
1213 }
1214 pub fn input_digest_opt(&self) -> Option<&str> {
1216 self.input_digest.as_ref().map(|field| field as _)
1217 }
1218 pub fn set_input_digest<T: Into<String>>(&mut self, field: T) {
1220 self.input_digest = Some(field.into().into());
1221 }
1222 pub fn with_input_digest<T: Into<String>>(mut self, field: T) -> Self {
1224 self.set_input_digest(field.into());
1225 self
1226 }
1227 pub fn input_owner(&self) -> &super::Owner {
1229 self.input_owner
1230 .as_ref()
1231 .map(|field| field as _)
1232 .unwrap_or_else(|| super::Owner::default_instance() as _)
1233 }
1234 pub fn input_owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
1236 self.input_owner.as_mut().map(|field| field as _)
1237 }
1238 pub fn input_owner_mut(&mut self) -> &mut super::Owner {
1241 self.input_owner.get_or_insert_default()
1242 }
1243 pub fn input_owner_opt(&self) -> Option<&super::Owner> {
1245 self.input_owner.as_ref().map(|field| field as _)
1246 }
1247 pub fn set_input_owner<T: Into<super::Owner>>(&mut self, field: T) {
1249 self.input_owner = Some(field.into().into());
1250 }
1251 pub fn with_input_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
1253 self.set_input_owner(field.into());
1254 self
1255 }
1256 pub fn with_output_state<T: Into<super::changed_object::OutputObjectState>>(
1258 mut self,
1259 field: T,
1260 ) -> Self {
1261 self.set_output_state(field.into());
1262 self
1263 }
1264 pub fn output_version_opt_mut(&mut self) -> Option<&mut u64> {
1266 self.output_version.as_mut().map(|field| field as _)
1267 }
1268 pub fn output_version_mut(&mut self) -> &mut u64 {
1271 self.output_version.get_or_insert_default()
1272 }
1273 pub fn output_version_opt(&self) -> Option<u64> {
1275 self.output_version.as_ref().map(|field| *field)
1276 }
1277 pub fn set_output_version(&mut self, field: u64) {
1279 self.output_version = Some(field);
1280 }
1281 pub fn with_output_version(mut self, field: u64) -> Self {
1283 self.set_output_version(field);
1284 self
1285 }
1286 pub fn output_digest_opt_mut(&mut self) -> Option<&mut String> {
1288 self.output_digest.as_mut().map(|field| field as _)
1289 }
1290 pub fn output_digest_mut(&mut self) -> &mut String {
1293 self.output_digest.get_or_insert_default()
1294 }
1295 pub fn output_digest_opt(&self) -> Option<&str> {
1297 self.output_digest.as_ref().map(|field| field as _)
1298 }
1299 pub fn set_output_digest<T: Into<String>>(&mut self, field: T) {
1301 self.output_digest = Some(field.into().into());
1302 }
1303 pub fn with_output_digest<T: Into<String>>(mut self, field: T) -> Self {
1305 self.set_output_digest(field.into());
1306 self
1307 }
1308 pub fn output_owner(&self) -> &super::Owner {
1310 self.output_owner
1311 .as_ref()
1312 .map(|field| field as _)
1313 .unwrap_or_else(|| super::Owner::default_instance() as _)
1314 }
1315 pub fn output_owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
1317 self.output_owner.as_mut().map(|field| field as _)
1318 }
1319 pub fn output_owner_mut(&mut self) -> &mut super::Owner {
1322 self.output_owner.get_or_insert_default()
1323 }
1324 pub fn output_owner_opt(&self) -> Option<&super::Owner> {
1326 self.output_owner.as_ref().map(|field| field as _)
1327 }
1328 pub fn set_output_owner<T: Into<super::Owner>>(&mut self, field: T) {
1330 self.output_owner = Some(field.into().into());
1331 }
1332 pub fn with_output_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
1334 self.set_output_owner(field.into());
1335 self
1336 }
1337 pub fn accumulator_write(&self) -> &super::AccumulatorWrite {
1339 self.accumulator_write
1340 .as_ref()
1341 .map(|field| field as _)
1342 .unwrap_or_else(|| super::AccumulatorWrite::default_instance() as _)
1343 }
1344 pub fn accumulator_write_opt_mut(
1346 &mut self,
1347 ) -> Option<&mut super::AccumulatorWrite> {
1348 self.accumulator_write.as_mut().map(|field| field as _)
1349 }
1350 pub fn accumulator_write_mut(&mut self) -> &mut super::AccumulatorWrite {
1353 self.accumulator_write.get_or_insert_default()
1354 }
1355 pub fn accumulator_write_opt(&self) -> Option<&super::AccumulatorWrite> {
1357 self.accumulator_write.as_ref().map(|field| field as _)
1358 }
1359 pub fn set_accumulator_write<T: Into<super::AccumulatorWrite>>(
1361 &mut self,
1362 field: T,
1363 ) {
1364 self.accumulator_write = Some(field.into().into());
1365 }
1366 pub fn with_accumulator_write<T: Into<super::AccumulatorWrite>>(
1368 mut self,
1369 field: T,
1370 ) -> Self {
1371 self.set_accumulator_write(field.into());
1372 self
1373 }
1374 pub fn with_id_operation<T: Into<super::changed_object::IdOperation>>(
1376 mut self,
1377 field: T,
1378 ) -> Self {
1379 self.set_id_operation(field.into());
1380 self
1381 }
1382 pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
1384 self.object_type.as_mut().map(|field| field as _)
1385 }
1386 pub fn object_type_mut(&mut self) -> &mut String {
1389 self.object_type.get_or_insert_default()
1390 }
1391 pub fn object_type_opt(&self) -> Option<&str> {
1393 self.object_type.as_ref().map(|field| field as _)
1394 }
1395 pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
1397 self.object_type = Some(field.into().into());
1398 }
1399 pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
1401 self.set_object_type(field.into());
1402 self
1403 }
1404 }
1405 impl super::Checkpoint {
1406 pub const fn const_default() -> Self {
1407 Self {
1408 sequence_number: None,
1409 digest: None,
1410 summary: None,
1411 signature: None,
1412 contents: None,
1413 transactions: Vec::new(),
1414 objects: None,
1415 }
1416 }
1417 #[doc(hidden)]
1418 pub fn default_instance() -> &'static Self {
1419 static DEFAULT: super::Checkpoint = super::Checkpoint::const_default();
1420 &DEFAULT
1421 }
1422 pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
1424 self.sequence_number.as_mut().map(|field| field as _)
1425 }
1426 pub fn sequence_number_mut(&mut self) -> &mut u64 {
1429 self.sequence_number.get_or_insert_default()
1430 }
1431 pub fn sequence_number_opt(&self) -> Option<u64> {
1433 self.sequence_number.as_ref().map(|field| *field)
1434 }
1435 pub fn set_sequence_number(&mut self, field: u64) {
1437 self.sequence_number = Some(field);
1438 }
1439 pub fn with_sequence_number(mut self, field: u64) -> Self {
1441 self.set_sequence_number(field);
1442 self
1443 }
1444 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1446 self.digest.as_mut().map(|field| field as _)
1447 }
1448 pub fn digest_mut(&mut self) -> &mut String {
1451 self.digest.get_or_insert_default()
1452 }
1453 pub fn digest_opt(&self) -> Option<&str> {
1455 self.digest.as_ref().map(|field| field as _)
1456 }
1457 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1459 self.digest = Some(field.into().into());
1460 }
1461 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1463 self.set_digest(field.into());
1464 self
1465 }
1466 pub fn summary(&self) -> &super::CheckpointSummary {
1468 self.summary
1469 .as_ref()
1470 .map(|field| field as _)
1471 .unwrap_or_else(|| super::CheckpointSummary::default_instance() as _)
1472 }
1473 pub fn summary_opt_mut(&mut self) -> Option<&mut super::CheckpointSummary> {
1475 self.summary.as_mut().map(|field| field as _)
1476 }
1477 pub fn summary_mut(&mut self) -> &mut super::CheckpointSummary {
1480 self.summary.get_or_insert_default()
1481 }
1482 pub fn summary_opt(&self) -> Option<&super::CheckpointSummary> {
1484 self.summary.as_ref().map(|field| field as _)
1485 }
1486 pub fn set_summary<T: Into<super::CheckpointSummary>>(&mut self, field: T) {
1488 self.summary = Some(field.into().into());
1489 }
1490 pub fn with_summary<T: Into<super::CheckpointSummary>>(
1492 mut self,
1493 field: T,
1494 ) -> Self {
1495 self.set_summary(field.into());
1496 self
1497 }
1498 pub fn signature(&self) -> &super::ValidatorAggregatedSignature {
1500 self.signature
1501 .as_ref()
1502 .map(|field| field as _)
1503 .unwrap_or_else(|| {
1504 super::ValidatorAggregatedSignature::default_instance() as _
1505 })
1506 }
1507 pub fn signature_opt_mut(
1509 &mut self,
1510 ) -> Option<&mut super::ValidatorAggregatedSignature> {
1511 self.signature.as_mut().map(|field| field as _)
1512 }
1513 pub fn signature_mut(&mut self) -> &mut super::ValidatorAggregatedSignature {
1516 self.signature.get_or_insert_default()
1517 }
1518 pub fn signature_opt(&self) -> Option<&super::ValidatorAggregatedSignature> {
1520 self.signature.as_ref().map(|field| field as _)
1521 }
1522 pub fn set_signature<T: Into<super::ValidatorAggregatedSignature>>(
1524 &mut self,
1525 field: T,
1526 ) {
1527 self.signature = Some(field.into().into());
1528 }
1529 pub fn with_signature<T: Into<super::ValidatorAggregatedSignature>>(
1531 mut self,
1532 field: T,
1533 ) -> Self {
1534 self.set_signature(field.into());
1535 self
1536 }
1537 pub fn contents(&self) -> &super::CheckpointContents {
1539 self.contents
1540 .as_ref()
1541 .map(|field| field as _)
1542 .unwrap_or_else(|| super::CheckpointContents::default_instance() as _)
1543 }
1544 pub fn contents_opt_mut(&mut self) -> Option<&mut super::CheckpointContents> {
1546 self.contents.as_mut().map(|field| field as _)
1547 }
1548 pub fn contents_mut(&mut self) -> &mut super::CheckpointContents {
1551 self.contents.get_or_insert_default()
1552 }
1553 pub fn contents_opt(&self) -> Option<&super::CheckpointContents> {
1555 self.contents.as_ref().map(|field| field as _)
1556 }
1557 pub fn set_contents<T: Into<super::CheckpointContents>>(&mut self, field: T) {
1559 self.contents = Some(field.into().into());
1560 }
1561 pub fn with_contents<T: Into<super::CheckpointContents>>(
1563 mut self,
1564 field: T,
1565 ) -> Self {
1566 self.set_contents(field.into());
1567 self
1568 }
1569 pub fn transactions(&self) -> &[super::ExecutedTransaction] {
1571 &self.transactions
1572 }
1573 pub fn transactions_mut(&mut self) -> &mut Vec<super::ExecutedTransaction> {
1576 &mut self.transactions
1577 }
1578 pub fn set_transactions(&mut self, field: Vec<super::ExecutedTransaction>) {
1580 self.transactions = field;
1581 }
1582 pub fn with_transactions(
1584 mut self,
1585 field: Vec<super::ExecutedTransaction>,
1586 ) -> Self {
1587 self.set_transactions(field);
1588 self
1589 }
1590 pub fn objects(&self) -> &super::ObjectSet {
1592 self.objects
1593 .as_ref()
1594 .map(|field| field as _)
1595 .unwrap_or_else(|| super::ObjectSet::default_instance() as _)
1596 }
1597 pub fn objects_opt_mut(&mut self) -> Option<&mut super::ObjectSet> {
1599 self.objects.as_mut().map(|field| field as _)
1600 }
1601 pub fn objects_mut(&mut self) -> &mut super::ObjectSet {
1604 self.objects.get_or_insert_default()
1605 }
1606 pub fn objects_opt(&self) -> Option<&super::ObjectSet> {
1608 self.objects.as_ref().map(|field| field as _)
1609 }
1610 pub fn set_objects<T: Into<super::ObjectSet>>(&mut self, field: T) {
1612 self.objects = Some(field.into().into());
1613 }
1614 pub fn with_objects<T: Into<super::ObjectSet>>(mut self, field: T) -> Self {
1616 self.set_objects(field.into());
1617 self
1618 }
1619 }
1620 impl super::CheckpointCommitment {
1621 pub const fn const_default() -> Self {
1622 Self { kind: None, digest: None }
1623 }
1624 #[doc(hidden)]
1625 pub fn default_instance() -> &'static Self {
1626 static DEFAULT: super::CheckpointCommitment = super::CheckpointCommitment::const_default();
1627 &DEFAULT
1628 }
1629 pub fn with_kind<
1631 T: Into<super::checkpoint_commitment::CheckpointCommitmentKind>,
1632 >(mut self, field: T) -> Self {
1633 self.set_kind(field.into());
1634 self
1635 }
1636 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1638 self.digest.as_mut().map(|field| field as _)
1639 }
1640 pub fn digest_mut(&mut self) -> &mut String {
1643 self.digest.get_or_insert_default()
1644 }
1645 pub fn digest_opt(&self) -> Option<&str> {
1647 self.digest.as_ref().map(|field| field as _)
1648 }
1649 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1651 self.digest = Some(field.into().into());
1652 }
1653 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1655 self.set_digest(field.into());
1656 self
1657 }
1658 }
1659 impl super::CheckpointContents {
1660 pub const fn const_default() -> Self {
1661 Self {
1662 bcs: None,
1663 digest: None,
1664 version: None,
1665 transactions: Vec::new(),
1666 }
1667 }
1668 #[doc(hidden)]
1669 pub fn default_instance() -> &'static Self {
1670 static DEFAULT: super::CheckpointContents = super::CheckpointContents::const_default();
1671 &DEFAULT
1672 }
1673 pub fn bcs(&self) -> &super::Bcs {
1675 self.bcs
1676 .as_ref()
1677 .map(|field| field as _)
1678 .unwrap_or_else(|| super::Bcs::default_instance() as _)
1679 }
1680 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
1682 self.bcs.as_mut().map(|field| field as _)
1683 }
1684 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
1687 self.bcs.get_or_insert_default()
1688 }
1689 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
1691 self.bcs.as_ref().map(|field| field as _)
1692 }
1693 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
1695 self.bcs = Some(field.into().into());
1696 }
1697 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
1699 self.set_bcs(field.into());
1700 self
1701 }
1702 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1704 self.digest.as_mut().map(|field| field as _)
1705 }
1706 pub fn digest_mut(&mut self) -> &mut String {
1709 self.digest.get_or_insert_default()
1710 }
1711 pub fn digest_opt(&self) -> Option<&str> {
1713 self.digest.as_ref().map(|field| field as _)
1714 }
1715 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1717 self.digest = Some(field.into().into());
1718 }
1719 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1721 self.set_digest(field.into());
1722 self
1723 }
1724 pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
1726 self.version.as_mut().map(|field| field as _)
1727 }
1728 pub fn version_mut(&mut self) -> &mut i32 {
1731 self.version.get_or_insert_default()
1732 }
1733 pub fn version_opt(&self) -> Option<i32> {
1735 self.version.as_ref().map(|field| *field)
1736 }
1737 pub fn set_version(&mut self, field: i32) {
1739 self.version = Some(field);
1740 }
1741 pub fn with_version(mut self, field: i32) -> Self {
1743 self.set_version(field);
1744 self
1745 }
1746 pub fn transactions(&self) -> &[super::CheckpointedTransactionInfo] {
1748 &self.transactions
1749 }
1750 pub fn transactions_mut(
1753 &mut self,
1754 ) -> &mut Vec<super::CheckpointedTransactionInfo> {
1755 &mut self.transactions
1756 }
1757 pub fn set_transactions(
1759 &mut self,
1760 field: Vec<super::CheckpointedTransactionInfo>,
1761 ) {
1762 self.transactions = field;
1763 }
1764 pub fn with_transactions(
1766 mut self,
1767 field: Vec<super::CheckpointedTransactionInfo>,
1768 ) -> Self {
1769 self.set_transactions(field);
1770 self
1771 }
1772 }
1773 impl super::CheckpointSummary {
1774 pub const fn const_default() -> Self {
1775 Self {
1776 bcs: None,
1777 digest: None,
1778 epoch: None,
1779 sequence_number: None,
1780 total_network_transactions: None,
1781 content_digest: None,
1782 previous_digest: None,
1783 epoch_rolling_gas_cost_summary: None,
1784 timestamp: None,
1785 commitments: Vec::new(),
1786 end_of_epoch_data: None,
1787 version_specific_data: None,
1788 }
1789 }
1790 #[doc(hidden)]
1791 pub fn default_instance() -> &'static Self {
1792 static DEFAULT: super::CheckpointSummary = super::CheckpointSummary::const_default();
1793 &DEFAULT
1794 }
1795 pub fn bcs(&self) -> &super::Bcs {
1797 self.bcs
1798 .as_ref()
1799 .map(|field| field as _)
1800 .unwrap_or_else(|| super::Bcs::default_instance() as _)
1801 }
1802 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
1804 self.bcs.as_mut().map(|field| field as _)
1805 }
1806 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
1809 self.bcs.get_or_insert_default()
1810 }
1811 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
1813 self.bcs.as_ref().map(|field| field as _)
1814 }
1815 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
1817 self.bcs = Some(field.into().into());
1818 }
1819 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
1821 self.set_bcs(field.into());
1822 self
1823 }
1824 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1826 self.digest.as_mut().map(|field| field as _)
1827 }
1828 pub fn digest_mut(&mut self) -> &mut String {
1831 self.digest.get_or_insert_default()
1832 }
1833 pub fn digest_opt(&self) -> Option<&str> {
1835 self.digest.as_ref().map(|field| field as _)
1836 }
1837 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1839 self.digest = Some(field.into().into());
1840 }
1841 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1843 self.set_digest(field.into());
1844 self
1845 }
1846 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
1848 self.epoch.as_mut().map(|field| field as _)
1849 }
1850 pub fn epoch_mut(&mut self) -> &mut u64 {
1853 self.epoch.get_or_insert_default()
1854 }
1855 pub fn epoch_opt(&self) -> Option<u64> {
1857 self.epoch.as_ref().map(|field| *field)
1858 }
1859 pub fn set_epoch(&mut self, field: u64) {
1861 self.epoch = Some(field);
1862 }
1863 pub fn with_epoch(mut self, field: u64) -> Self {
1865 self.set_epoch(field);
1866 self
1867 }
1868 pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
1870 self.sequence_number.as_mut().map(|field| field as _)
1871 }
1872 pub fn sequence_number_mut(&mut self) -> &mut u64 {
1875 self.sequence_number.get_or_insert_default()
1876 }
1877 pub fn sequence_number_opt(&self) -> Option<u64> {
1879 self.sequence_number.as_ref().map(|field| *field)
1880 }
1881 pub fn set_sequence_number(&mut self, field: u64) {
1883 self.sequence_number = Some(field);
1884 }
1885 pub fn with_sequence_number(mut self, field: u64) -> Self {
1887 self.set_sequence_number(field);
1888 self
1889 }
1890 pub fn total_network_transactions_opt_mut(&mut self) -> Option<&mut u64> {
1892 self.total_network_transactions.as_mut().map(|field| field as _)
1893 }
1894 pub fn total_network_transactions_mut(&mut self) -> &mut u64 {
1897 self.total_network_transactions.get_or_insert_default()
1898 }
1899 pub fn total_network_transactions_opt(&self) -> Option<u64> {
1901 self.total_network_transactions.as_ref().map(|field| *field)
1902 }
1903 pub fn set_total_network_transactions(&mut self, field: u64) {
1905 self.total_network_transactions = Some(field);
1906 }
1907 pub fn with_total_network_transactions(mut self, field: u64) -> Self {
1909 self.set_total_network_transactions(field);
1910 self
1911 }
1912 pub fn content_digest_opt_mut(&mut self) -> Option<&mut String> {
1914 self.content_digest.as_mut().map(|field| field as _)
1915 }
1916 pub fn content_digest_mut(&mut self) -> &mut String {
1919 self.content_digest.get_or_insert_default()
1920 }
1921 pub fn content_digest_opt(&self) -> Option<&str> {
1923 self.content_digest.as_ref().map(|field| field as _)
1924 }
1925 pub fn set_content_digest<T: Into<String>>(&mut self, field: T) {
1927 self.content_digest = Some(field.into().into());
1928 }
1929 pub fn with_content_digest<T: Into<String>>(mut self, field: T) -> Self {
1931 self.set_content_digest(field.into());
1932 self
1933 }
1934 pub fn previous_digest_opt_mut(&mut self) -> Option<&mut String> {
1936 self.previous_digest.as_mut().map(|field| field as _)
1937 }
1938 pub fn previous_digest_mut(&mut self) -> &mut String {
1941 self.previous_digest.get_or_insert_default()
1942 }
1943 pub fn previous_digest_opt(&self) -> Option<&str> {
1945 self.previous_digest.as_ref().map(|field| field as _)
1946 }
1947 pub fn set_previous_digest<T: Into<String>>(&mut self, field: T) {
1949 self.previous_digest = Some(field.into().into());
1950 }
1951 pub fn with_previous_digest<T: Into<String>>(mut self, field: T) -> Self {
1953 self.set_previous_digest(field.into());
1954 self
1955 }
1956 pub fn epoch_rolling_gas_cost_summary(&self) -> &super::GasCostSummary {
1958 self.epoch_rolling_gas_cost_summary
1959 .as_ref()
1960 .map(|field| field as _)
1961 .unwrap_or_else(|| super::GasCostSummary::default_instance() as _)
1962 }
1963 pub fn epoch_rolling_gas_cost_summary_opt_mut(
1965 &mut self,
1966 ) -> Option<&mut super::GasCostSummary> {
1967 self.epoch_rolling_gas_cost_summary.as_mut().map(|field| field as _)
1968 }
1969 pub fn epoch_rolling_gas_cost_summary_mut(
1972 &mut self,
1973 ) -> &mut super::GasCostSummary {
1974 self.epoch_rolling_gas_cost_summary.get_or_insert_default()
1975 }
1976 pub fn epoch_rolling_gas_cost_summary_opt(
1978 &self,
1979 ) -> Option<&super::GasCostSummary> {
1980 self.epoch_rolling_gas_cost_summary.as_ref().map(|field| field as _)
1981 }
1982 pub fn set_epoch_rolling_gas_cost_summary<T: Into<super::GasCostSummary>>(
1984 &mut self,
1985 field: T,
1986 ) {
1987 self.epoch_rolling_gas_cost_summary = Some(field.into().into());
1988 }
1989 pub fn with_epoch_rolling_gas_cost_summary<T: Into<super::GasCostSummary>>(
1991 mut self,
1992 field: T,
1993 ) -> Self {
1994 self.set_epoch_rolling_gas_cost_summary(field.into());
1995 self
1996 }
1997 pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
1999 self.timestamp.as_mut().map(|field| field as _)
2000 }
2001 pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
2004 self.timestamp.get_or_insert_default()
2005 }
2006 pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
2008 self.timestamp.as_ref().map(|field| field as _)
2009 }
2010 pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
2012 self.timestamp = Some(field.into().into());
2013 }
2014 pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
2016 mut self,
2017 field: T,
2018 ) -> Self {
2019 self.set_timestamp(field.into());
2020 self
2021 }
2022 pub fn commitments(&self) -> &[super::CheckpointCommitment] {
2024 &self.commitments
2025 }
2026 pub fn commitments_mut(&mut self) -> &mut Vec<super::CheckpointCommitment> {
2029 &mut self.commitments
2030 }
2031 pub fn set_commitments(&mut self, field: Vec<super::CheckpointCommitment>) {
2033 self.commitments = field;
2034 }
2035 pub fn with_commitments(
2037 mut self,
2038 field: Vec<super::CheckpointCommitment>,
2039 ) -> Self {
2040 self.set_commitments(field);
2041 self
2042 }
2043 pub fn end_of_epoch_data(&self) -> &super::EndOfEpochData {
2045 self.end_of_epoch_data
2046 .as_ref()
2047 .map(|field| field as _)
2048 .unwrap_or_else(|| super::EndOfEpochData::default_instance() as _)
2049 }
2050 pub fn end_of_epoch_data_opt_mut(
2052 &mut self,
2053 ) -> Option<&mut super::EndOfEpochData> {
2054 self.end_of_epoch_data.as_mut().map(|field| field as _)
2055 }
2056 pub fn end_of_epoch_data_mut(&mut self) -> &mut super::EndOfEpochData {
2059 self.end_of_epoch_data.get_or_insert_default()
2060 }
2061 pub fn end_of_epoch_data_opt(&self) -> Option<&super::EndOfEpochData> {
2063 self.end_of_epoch_data.as_ref().map(|field| field as _)
2064 }
2065 pub fn set_end_of_epoch_data<T: Into<super::EndOfEpochData>>(
2067 &mut self,
2068 field: T,
2069 ) {
2070 self.end_of_epoch_data = Some(field.into().into());
2071 }
2072 pub fn with_end_of_epoch_data<T: Into<super::EndOfEpochData>>(
2074 mut self,
2075 field: T,
2076 ) -> Self {
2077 self.set_end_of_epoch_data(field.into());
2078 self
2079 }
2080 pub fn version_specific_data_opt(&self) -> Option<&[u8]> {
2082 self.version_specific_data.as_ref().map(|field| field as _)
2083 }
2084 pub fn set_version_specific_data<T: Into<::prost::bytes::Bytes>>(
2086 &mut self,
2087 field: T,
2088 ) {
2089 self.version_specific_data = Some(field.into().into());
2090 }
2091 pub fn with_version_specific_data<T: Into<::prost::bytes::Bytes>>(
2093 mut self,
2094 field: T,
2095 ) -> Self {
2096 self.set_version_specific_data(field.into());
2097 self
2098 }
2099 }
2100 impl super::CheckpointedTransactionInfo {
2101 pub const fn const_default() -> Self {
2102 Self {
2103 transaction: None,
2104 effects: None,
2105 signatures: Vec::new(),
2106 address_aliases_versions: Vec::new(),
2107 }
2108 }
2109 #[doc(hidden)]
2110 pub fn default_instance() -> &'static Self {
2111 static DEFAULT: super::CheckpointedTransactionInfo = super::CheckpointedTransactionInfo::const_default();
2112 &DEFAULT
2113 }
2114 pub fn transaction_opt_mut(&mut self) -> Option<&mut String> {
2116 self.transaction.as_mut().map(|field| field as _)
2117 }
2118 pub fn transaction_mut(&mut self) -> &mut String {
2121 self.transaction.get_or_insert_default()
2122 }
2123 pub fn transaction_opt(&self) -> Option<&str> {
2125 self.transaction.as_ref().map(|field| field as _)
2126 }
2127 pub fn set_transaction<T: Into<String>>(&mut self, field: T) {
2129 self.transaction = Some(field.into().into());
2130 }
2131 pub fn with_transaction<T: Into<String>>(mut self, field: T) -> Self {
2133 self.set_transaction(field.into());
2134 self
2135 }
2136 pub fn effects_opt_mut(&mut self) -> Option<&mut String> {
2138 self.effects.as_mut().map(|field| field as _)
2139 }
2140 pub fn effects_mut(&mut self) -> &mut String {
2143 self.effects.get_or_insert_default()
2144 }
2145 pub fn effects_opt(&self) -> Option<&str> {
2147 self.effects.as_ref().map(|field| field as _)
2148 }
2149 pub fn set_effects<T: Into<String>>(&mut self, field: T) {
2151 self.effects = Some(field.into().into());
2152 }
2153 pub fn with_effects<T: Into<String>>(mut self, field: T) -> Self {
2155 self.set_effects(field.into());
2156 self
2157 }
2158 pub fn signatures(&self) -> &[super::UserSignature] {
2160 &self.signatures
2161 }
2162 pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
2165 &mut self.signatures
2166 }
2167 pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
2169 self.signatures = field;
2170 }
2171 pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
2173 self.set_signatures(field);
2174 self
2175 }
2176 pub fn address_aliases_versions(&self) -> &[super::AddressAliasesVersion] {
2178 &self.address_aliases_versions
2179 }
2180 pub fn address_aliases_versions_mut(
2183 &mut self,
2184 ) -> &mut Vec<super::AddressAliasesVersion> {
2185 &mut self.address_aliases_versions
2186 }
2187 pub fn set_address_aliases_versions(
2189 &mut self,
2190 field: Vec<super::AddressAliasesVersion>,
2191 ) {
2192 self.address_aliases_versions = field;
2193 }
2194 pub fn with_address_aliases_versions(
2196 mut self,
2197 field: Vec<super::AddressAliasesVersion>,
2198 ) -> Self {
2199 self.set_address_aliases_versions(field);
2200 self
2201 }
2202 }
2203 impl super::CircomG1 {
2204 pub const fn const_default() -> Self {
2205 Self {
2206 e0: None,
2207 e1: None,
2208 e2: None,
2209 }
2210 }
2211 #[doc(hidden)]
2212 pub fn default_instance() -> &'static Self {
2213 static DEFAULT: super::CircomG1 = super::CircomG1::const_default();
2214 &DEFAULT
2215 }
2216 pub fn e0_opt_mut(&mut self) -> Option<&mut String> {
2218 self.e0.as_mut().map(|field| field as _)
2219 }
2220 pub fn e0_mut(&mut self) -> &mut String {
2223 self.e0.get_or_insert_default()
2224 }
2225 pub fn e0_opt(&self) -> Option<&str> {
2227 self.e0.as_ref().map(|field| field as _)
2228 }
2229 pub fn set_e0<T: Into<String>>(&mut self, field: T) {
2231 self.e0 = Some(field.into().into());
2232 }
2233 pub fn with_e0<T: Into<String>>(mut self, field: T) -> Self {
2235 self.set_e0(field.into());
2236 self
2237 }
2238 pub fn e1_opt_mut(&mut self) -> Option<&mut String> {
2240 self.e1.as_mut().map(|field| field as _)
2241 }
2242 pub fn e1_mut(&mut self) -> &mut String {
2245 self.e1.get_or_insert_default()
2246 }
2247 pub fn e1_opt(&self) -> Option<&str> {
2249 self.e1.as_ref().map(|field| field as _)
2250 }
2251 pub fn set_e1<T: Into<String>>(&mut self, field: T) {
2253 self.e1 = Some(field.into().into());
2254 }
2255 pub fn with_e1<T: Into<String>>(mut self, field: T) -> Self {
2257 self.set_e1(field.into());
2258 self
2259 }
2260 pub fn e2_opt_mut(&mut self) -> Option<&mut String> {
2262 self.e2.as_mut().map(|field| field as _)
2263 }
2264 pub fn e2_mut(&mut self) -> &mut String {
2267 self.e2.get_or_insert_default()
2268 }
2269 pub fn e2_opt(&self) -> Option<&str> {
2271 self.e2.as_ref().map(|field| field as _)
2272 }
2273 pub fn set_e2<T: Into<String>>(&mut self, field: T) {
2275 self.e2 = Some(field.into().into());
2276 }
2277 pub fn with_e2<T: Into<String>>(mut self, field: T) -> Self {
2279 self.set_e2(field.into());
2280 self
2281 }
2282 }
2283 impl super::CircomG2 {
2284 pub const fn const_default() -> Self {
2285 Self {
2286 e00: None,
2287 e01: None,
2288 e10: None,
2289 e11: None,
2290 e20: None,
2291 e21: None,
2292 }
2293 }
2294 #[doc(hidden)]
2295 pub fn default_instance() -> &'static Self {
2296 static DEFAULT: super::CircomG2 = super::CircomG2::const_default();
2297 &DEFAULT
2298 }
2299 pub fn e00_opt_mut(&mut self) -> Option<&mut String> {
2301 self.e00.as_mut().map(|field| field as _)
2302 }
2303 pub fn e00_mut(&mut self) -> &mut String {
2306 self.e00.get_or_insert_default()
2307 }
2308 pub fn e00_opt(&self) -> Option<&str> {
2310 self.e00.as_ref().map(|field| field as _)
2311 }
2312 pub fn set_e00<T: Into<String>>(&mut self, field: T) {
2314 self.e00 = Some(field.into().into());
2315 }
2316 pub fn with_e00<T: Into<String>>(mut self, field: T) -> Self {
2318 self.set_e00(field.into());
2319 self
2320 }
2321 pub fn e01_opt_mut(&mut self) -> Option<&mut String> {
2323 self.e01.as_mut().map(|field| field as _)
2324 }
2325 pub fn e01_mut(&mut self) -> &mut String {
2328 self.e01.get_or_insert_default()
2329 }
2330 pub fn e01_opt(&self) -> Option<&str> {
2332 self.e01.as_ref().map(|field| field as _)
2333 }
2334 pub fn set_e01<T: Into<String>>(&mut self, field: T) {
2336 self.e01 = Some(field.into().into());
2337 }
2338 pub fn with_e01<T: Into<String>>(mut self, field: T) -> Self {
2340 self.set_e01(field.into());
2341 self
2342 }
2343 pub fn e10_opt_mut(&mut self) -> Option<&mut String> {
2345 self.e10.as_mut().map(|field| field as _)
2346 }
2347 pub fn e10_mut(&mut self) -> &mut String {
2350 self.e10.get_or_insert_default()
2351 }
2352 pub fn e10_opt(&self) -> Option<&str> {
2354 self.e10.as_ref().map(|field| field as _)
2355 }
2356 pub fn set_e10<T: Into<String>>(&mut self, field: T) {
2358 self.e10 = Some(field.into().into());
2359 }
2360 pub fn with_e10<T: Into<String>>(mut self, field: T) -> Self {
2362 self.set_e10(field.into());
2363 self
2364 }
2365 pub fn e11_opt_mut(&mut self) -> Option<&mut String> {
2367 self.e11.as_mut().map(|field| field as _)
2368 }
2369 pub fn e11_mut(&mut self) -> &mut String {
2372 self.e11.get_or_insert_default()
2373 }
2374 pub fn e11_opt(&self) -> Option<&str> {
2376 self.e11.as_ref().map(|field| field as _)
2377 }
2378 pub fn set_e11<T: Into<String>>(&mut self, field: T) {
2380 self.e11 = Some(field.into().into());
2381 }
2382 pub fn with_e11<T: Into<String>>(mut self, field: T) -> Self {
2384 self.set_e11(field.into());
2385 self
2386 }
2387 pub fn e20_opt_mut(&mut self) -> Option<&mut String> {
2389 self.e20.as_mut().map(|field| field as _)
2390 }
2391 pub fn e20_mut(&mut self) -> &mut String {
2394 self.e20.get_or_insert_default()
2395 }
2396 pub fn e20_opt(&self) -> Option<&str> {
2398 self.e20.as_ref().map(|field| field as _)
2399 }
2400 pub fn set_e20<T: Into<String>>(&mut self, field: T) {
2402 self.e20 = Some(field.into().into());
2403 }
2404 pub fn with_e20<T: Into<String>>(mut self, field: T) -> Self {
2406 self.set_e20(field.into());
2407 self
2408 }
2409 pub fn e21_opt_mut(&mut self) -> Option<&mut String> {
2411 self.e21.as_mut().map(|field| field as _)
2412 }
2413 pub fn e21_mut(&mut self) -> &mut String {
2416 self.e21.get_or_insert_default()
2417 }
2418 pub fn e21_opt(&self) -> Option<&str> {
2420 self.e21.as_ref().map(|field| field as _)
2421 }
2422 pub fn set_e21<T: Into<String>>(&mut self, field: T) {
2424 self.e21 = Some(field.into().into());
2425 }
2426 pub fn with_e21<T: Into<String>>(mut self, field: T) -> Self {
2428 self.set_e21(field.into());
2429 self
2430 }
2431 }
2432 impl super::CleverError {
2433 pub const fn const_default() -> Self {
2434 Self {
2435 error_code: None,
2436 line_number: None,
2437 constant_name: None,
2438 constant_type: None,
2439 value: None,
2440 }
2441 }
2442 #[doc(hidden)]
2443 pub fn default_instance() -> &'static Self {
2444 static DEFAULT: super::CleverError = super::CleverError::const_default();
2445 &DEFAULT
2446 }
2447 pub fn error_code_opt_mut(&mut self) -> Option<&mut u64> {
2449 self.error_code.as_mut().map(|field| field as _)
2450 }
2451 pub fn error_code_mut(&mut self) -> &mut u64 {
2454 self.error_code.get_or_insert_default()
2455 }
2456 pub fn error_code_opt(&self) -> Option<u64> {
2458 self.error_code.as_ref().map(|field| *field)
2459 }
2460 pub fn set_error_code(&mut self, field: u64) {
2462 self.error_code = Some(field);
2463 }
2464 pub fn with_error_code(mut self, field: u64) -> Self {
2466 self.set_error_code(field);
2467 self
2468 }
2469 pub fn line_number_opt_mut(&mut self) -> Option<&mut u64> {
2471 self.line_number.as_mut().map(|field| field as _)
2472 }
2473 pub fn line_number_mut(&mut self) -> &mut u64 {
2476 self.line_number.get_or_insert_default()
2477 }
2478 pub fn line_number_opt(&self) -> Option<u64> {
2480 self.line_number.as_ref().map(|field| *field)
2481 }
2482 pub fn set_line_number(&mut self, field: u64) {
2484 self.line_number = Some(field);
2485 }
2486 pub fn with_line_number(mut self, field: u64) -> Self {
2488 self.set_line_number(field);
2489 self
2490 }
2491 pub fn constant_name_opt_mut(&mut self) -> Option<&mut String> {
2493 self.constant_name.as_mut().map(|field| field as _)
2494 }
2495 pub fn constant_name_mut(&mut self) -> &mut String {
2498 self.constant_name.get_or_insert_default()
2499 }
2500 pub fn constant_name_opt(&self) -> Option<&str> {
2502 self.constant_name.as_ref().map(|field| field as _)
2503 }
2504 pub fn set_constant_name<T: Into<String>>(&mut self, field: T) {
2506 self.constant_name = Some(field.into().into());
2507 }
2508 pub fn with_constant_name<T: Into<String>>(mut self, field: T) -> Self {
2510 self.set_constant_name(field.into());
2511 self
2512 }
2513 pub fn constant_type_opt_mut(&mut self) -> Option<&mut String> {
2515 self.constant_type.as_mut().map(|field| field as _)
2516 }
2517 pub fn constant_type_mut(&mut self) -> &mut String {
2520 self.constant_type.get_or_insert_default()
2521 }
2522 pub fn constant_type_opt(&self) -> Option<&str> {
2524 self.constant_type.as_ref().map(|field| field as _)
2525 }
2526 pub fn set_constant_type<T: Into<String>>(&mut self, field: T) {
2528 self.constant_type = Some(field.into().into());
2529 }
2530 pub fn with_constant_type<T: Into<String>>(mut self, field: T) -> Self {
2532 self.set_constant_type(field.into());
2533 self
2534 }
2535 pub fn rendered(&self) -> &str {
2537 if let Some(super::clever_error::Value::Rendered(field)) = &self.value {
2538 field as _
2539 } else {
2540 ""
2541 }
2542 }
2543 pub fn rendered_opt(&self) -> Option<&str> {
2545 if let Some(super::clever_error::Value::Rendered(field)) = &self.value {
2546 Some(field as _)
2547 } else {
2548 None
2549 }
2550 }
2551 pub fn rendered_opt_mut(&mut self) -> Option<&mut String> {
2553 if let Some(super::clever_error::Value::Rendered(field)) = &mut self.value {
2554 Some(field as _)
2555 } else {
2556 None
2557 }
2558 }
2559 pub fn rendered_mut(&mut self) -> &mut String {
2563 if self.rendered_opt_mut().is_none() {
2564 self.value = Some(
2565 super::clever_error::Value::Rendered(String::default()),
2566 );
2567 }
2568 self.rendered_opt_mut().unwrap()
2569 }
2570 pub fn set_rendered<T: Into<String>>(&mut self, field: T) {
2573 self.value = Some(super::clever_error::Value::Rendered(field.into().into()));
2574 }
2575 pub fn with_rendered<T: Into<String>>(mut self, field: T) -> Self {
2578 self.set_rendered(field.into());
2579 self
2580 }
2581 pub fn raw(&self) -> &[u8] {
2583 if let Some(super::clever_error::Value::Raw(field)) = &self.value {
2584 field as _
2585 } else {
2586 &[]
2587 }
2588 }
2589 pub fn raw_opt(&self) -> Option<&[u8]> {
2591 if let Some(super::clever_error::Value::Raw(field)) = &self.value {
2592 Some(field as _)
2593 } else {
2594 None
2595 }
2596 }
2597 pub fn raw_opt_mut(&mut self) -> Option<&mut ::prost::bytes::Bytes> {
2599 if let Some(super::clever_error::Value::Raw(field)) = &mut self.value {
2600 Some(field as _)
2601 } else {
2602 None
2603 }
2604 }
2605 pub fn raw_mut(&mut self) -> &mut ::prost::bytes::Bytes {
2609 if self.raw_opt_mut().is_none() {
2610 self.value = Some(
2611 super::clever_error::Value::Raw(::prost::bytes::Bytes::default()),
2612 );
2613 }
2614 self.raw_opt_mut().unwrap()
2615 }
2616 pub fn set_raw<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
2619 self.value = Some(super::clever_error::Value::Raw(field.into().into()));
2620 }
2621 pub fn with_raw<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
2624 self.set_raw(field.into());
2625 self
2626 }
2627 }
2628 impl super::CoinDenyListError {
2629 pub const fn const_default() -> Self {
2630 Self {
2631 address: None,
2632 coin_type: None,
2633 }
2634 }
2635 #[doc(hidden)]
2636 pub fn default_instance() -> &'static Self {
2637 static DEFAULT: super::CoinDenyListError = super::CoinDenyListError::const_default();
2638 &DEFAULT
2639 }
2640 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
2642 self.address.as_mut().map(|field| field as _)
2643 }
2644 pub fn address_mut(&mut self) -> &mut String {
2647 self.address.get_or_insert_default()
2648 }
2649 pub fn address_opt(&self) -> Option<&str> {
2651 self.address.as_ref().map(|field| field as _)
2652 }
2653 pub fn set_address<T: Into<String>>(&mut self, field: T) {
2655 self.address = Some(field.into().into());
2656 }
2657 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
2659 self.set_address(field.into());
2660 self
2661 }
2662 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
2664 self.coin_type.as_mut().map(|field| field as _)
2665 }
2666 pub fn coin_type_mut(&mut self) -> &mut String {
2669 self.coin_type.get_or_insert_default()
2670 }
2671 pub fn coin_type_opt(&self) -> Option<&str> {
2673 self.coin_type.as_ref().map(|field| field as _)
2674 }
2675 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
2677 self.coin_type = Some(field.into().into());
2678 }
2679 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
2681 self.set_coin_type(field.into());
2682 self
2683 }
2684 }
2685 impl super::CoinMetadata {
2686 pub const fn const_default() -> Self {
2687 Self {
2688 id: None,
2689 decimals: None,
2690 name: None,
2691 symbol: None,
2692 description: None,
2693 icon_url: None,
2694 metadata_cap_id: None,
2695 metadata_cap_state: None,
2696 }
2697 }
2698 #[doc(hidden)]
2699 pub fn default_instance() -> &'static Self {
2700 static DEFAULT: super::CoinMetadata = super::CoinMetadata::const_default();
2701 &DEFAULT
2702 }
2703 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
2705 self.id.as_mut().map(|field| field as _)
2706 }
2707 pub fn id_mut(&mut self) -> &mut String {
2710 self.id.get_or_insert_default()
2711 }
2712 pub fn id_opt(&self) -> Option<&str> {
2714 self.id.as_ref().map(|field| field as _)
2715 }
2716 pub fn set_id<T: Into<String>>(&mut self, field: T) {
2718 self.id = Some(field.into().into());
2719 }
2720 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
2722 self.set_id(field.into());
2723 self
2724 }
2725 pub fn decimals_opt_mut(&mut self) -> Option<&mut u32> {
2727 self.decimals.as_mut().map(|field| field as _)
2728 }
2729 pub fn decimals_mut(&mut self) -> &mut u32 {
2732 self.decimals.get_or_insert_default()
2733 }
2734 pub fn decimals_opt(&self) -> Option<u32> {
2736 self.decimals.as_ref().map(|field| *field)
2737 }
2738 pub fn set_decimals(&mut self, field: u32) {
2740 self.decimals = Some(field);
2741 }
2742 pub fn with_decimals(mut self, field: u32) -> Self {
2744 self.set_decimals(field);
2745 self
2746 }
2747 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
2749 self.name.as_mut().map(|field| field as _)
2750 }
2751 pub fn name_mut(&mut self) -> &mut String {
2754 self.name.get_or_insert_default()
2755 }
2756 pub fn name_opt(&self) -> Option<&str> {
2758 self.name.as_ref().map(|field| field as _)
2759 }
2760 pub fn set_name<T: Into<String>>(&mut self, field: T) {
2762 self.name = Some(field.into().into());
2763 }
2764 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
2766 self.set_name(field.into());
2767 self
2768 }
2769 pub fn symbol_opt_mut(&mut self) -> Option<&mut String> {
2771 self.symbol.as_mut().map(|field| field as _)
2772 }
2773 pub fn symbol_mut(&mut self) -> &mut String {
2776 self.symbol.get_or_insert_default()
2777 }
2778 pub fn symbol_opt(&self) -> Option<&str> {
2780 self.symbol.as_ref().map(|field| field as _)
2781 }
2782 pub fn set_symbol<T: Into<String>>(&mut self, field: T) {
2784 self.symbol = Some(field.into().into());
2785 }
2786 pub fn with_symbol<T: Into<String>>(mut self, field: T) -> Self {
2788 self.set_symbol(field.into());
2789 self
2790 }
2791 pub fn description_opt_mut(&mut self) -> Option<&mut String> {
2793 self.description.as_mut().map(|field| field as _)
2794 }
2795 pub fn description_mut(&mut self) -> &mut String {
2798 self.description.get_or_insert_default()
2799 }
2800 pub fn description_opt(&self) -> Option<&str> {
2802 self.description.as_ref().map(|field| field as _)
2803 }
2804 pub fn set_description<T: Into<String>>(&mut self, field: T) {
2806 self.description = Some(field.into().into());
2807 }
2808 pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
2810 self.set_description(field.into());
2811 self
2812 }
2813 pub fn icon_url_opt_mut(&mut self) -> Option<&mut String> {
2815 self.icon_url.as_mut().map(|field| field as _)
2816 }
2817 pub fn icon_url_mut(&mut self) -> &mut String {
2820 self.icon_url.get_or_insert_default()
2821 }
2822 pub fn icon_url_opt(&self) -> Option<&str> {
2824 self.icon_url.as_ref().map(|field| field as _)
2825 }
2826 pub fn set_icon_url<T: Into<String>>(&mut self, field: T) {
2828 self.icon_url = Some(field.into().into());
2829 }
2830 pub fn with_icon_url<T: Into<String>>(mut self, field: T) -> Self {
2832 self.set_icon_url(field.into());
2833 self
2834 }
2835 pub fn metadata_cap_id_opt_mut(&mut self) -> Option<&mut String> {
2837 self.metadata_cap_id.as_mut().map(|field| field as _)
2838 }
2839 pub fn metadata_cap_id_mut(&mut self) -> &mut String {
2842 self.metadata_cap_id.get_or_insert_default()
2843 }
2844 pub fn metadata_cap_id_opt(&self) -> Option<&str> {
2846 self.metadata_cap_id.as_ref().map(|field| field as _)
2847 }
2848 pub fn set_metadata_cap_id<T: Into<String>>(&mut self, field: T) {
2850 self.metadata_cap_id = Some(field.into().into());
2851 }
2852 pub fn with_metadata_cap_id<T: Into<String>>(mut self, field: T) -> Self {
2854 self.set_metadata_cap_id(field.into());
2855 self
2856 }
2857 pub fn with_metadata_cap_state<T: Into<super::coin_metadata::MetadataCapState>>(
2859 mut self,
2860 field: T,
2861 ) -> Self {
2862 self.set_metadata_cap_state(field.into());
2863 self
2864 }
2865 }
2866 impl super::CoinTreasury {
2867 pub const fn const_default() -> Self {
2868 Self {
2869 id: None,
2870 total_supply: None,
2871 supply_state: None,
2872 }
2873 }
2874 #[doc(hidden)]
2875 pub fn default_instance() -> &'static Self {
2876 static DEFAULT: super::CoinTreasury = super::CoinTreasury::const_default();
2877 &DEFAULT
2878 }
2879 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
2881 self.id.as_mut().map(|field| field as _)
2882 }
2883 pub fn id_mut(&mut self) -> &mut String {
2886 self.id.get_or_insert_default()
2887 }
2888 pub fn id_opt(&self) -> Option<&str> {
2890 self.id.as_ref().map(|field| field as _)
2891 }
2892 pub fn set_id<T: Into<String>>(&mut self, field: T) {
2894 self.id = Some(field.into().into());
2895 }
2896 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
2898 self.set_id(field.into());
2899 self
2900 }
2901 pub fn total_supply_opt_mut(&mut self) -> Option<&mut u64> {
2903 self.total_supply.as_mut().map(|field| field as _)
2904 }
2905 pub fn total_supply_mut(&mut self) -> &mut u64 {
2908 self.total_supply.get_or_insert_default()
2909 }
2910 pub fn total_supply_opt(&self) -> Option<u64> {
2912 self.total_supply.as_ref().map(|field| *field)
2913 }
2914 pub fn set_total_supply(&mut self, field: u64) {
2916 self.total_supply = Some(field);
2917 }
2918 pub fn with_total_supply(mut self, field: u64) -> Self {
2920 self.set_total_supply(field);
2921 self
2922 }
2923 pub fn with_supply_state<T: Into<super::coin_treasury::SupplyState>>(
2925 mut self,
2926 field: T,
2927 ) -> Self {
2928 self.set_supply_state(field.into());
2929 self
2930 }
2931 }
2932 impl super::Command {
2933 pub const fn const_default() -> Self {
2934 Self { command: None }
2935 }
2936 #[doc(hidden)]
2937 pub fn default_instance() -> &'static Self {
2938 static DEFAULT: super::Command = super::Command::const_default();
2939 &DEFAULT
2940 }
2941 pub fn move_call(&self) -> &super::MoveCall {
2943 if let Some(super::command::Command::MoveCall(field)) = &self.command {
2944 field as _
2945 } else {
2946 super::MoveCall::default_instance() as _
2947 }
2948 }
2949 pub fn move_call_opt(&self) -> Option<&super::MoveCall> {
2951 if let Some(super::command::Command::MoveCall(field)) = &self.command {
2952 Some(field as _)
2953 } else {
2954 None
2955 }
2956 }
2957 pub fn move_call_opt_mut(&mut self) -> Option<&mut super::MoveCall> {
2959 if let Some(super::command::Command::MoveCall(field)) = &mut self.command {
2960 Some(field as _)
2961 } else {
2962 None
2963 }
2964 }
2965 pub fn move_call_mut(&mut self) -> &mut super::MoveCall {
2969 if self.move_call_opt_mut().is_none() {
2970 self.command = Some(
2971 super::command::Command::MoveCall(super::MoveCall::default()),
2972 );
2973 }
2974 self.move_call_opt_mut().unwrap()
2975 }
2976 pub fn set_move_call<T: Into<super::MoveCall>>(&mut self, field: T) {
2979 self.command = Some(super::command::Command::MoveCall(field.into().into()));
2980 }
2981 pub fn with_move_call<T: Into<super::MoveCall>>(mut self, field: T) -> Self {
2984 self.set_move_call(field.into());
2985 self
2986 }
2987 pub fn transfer_objects(&self) -> &super::TransferObjects {
2989 if let Some(super::command::Command::TransferObjects(field)) = &self.command
2990 {
2991 field as _
2992 } else {
2993 super::TransferObjects::default_instance() as _
2994 }
2995 }
2996 pub fn transfer_objects_opt(&self) -> Option<&super::TransferObjects> {
2998 if let Some(super::command::Command::TransferObjects(field)) = &self.command
2999 {
3000 Some(field as _)
3001 } else {
3002 None
3003 }
3004 }
3005 pub fn transfer_objects_opt_mut(
3007 &mut self,
3008 ) -> Option<&mut super::TransferObjects> {
3009 if let Some(super::command::Command::TransferObjects(field)) = &mut self
3010 .command
3011 {
3012 Some(field as _)
3013 } else {
3014 None
3015 }
3016 }
3017 pub fn transfer_objects_mut(&mut self) -> &mut super::TransferObjects {
3021 if self.transfer_objects_opt_mut().is_none() {
3022 self.command = Some(
3023 super::command::Command::TransferObjects(
3024 super::TransferObjects::default(),
3025 ),
3026 );
3027 }
3028 self.transfer_objects_opt_mut().unwrap()
3029 }
3030 pub fn set_transfer_objects<T: Into<super::TransferObjects>>(
3033 &mut self,
3034 field: T,
3035 ) {
3036 self.command = Some(
3037 super::command::Command::TransferObjects(field.into().into()),
3038 );
3039 }
3040 pub fn with_transfer_objects<T: Into<super::TransferObjects>>(
3043 mut self,
3044 field: T,
3045 ) -> Self {
3046 self.set_transfer_objects(field.into());
3047 self
3048 }
3049 pub fn split_coins(&self) -> &super::SplitCoins {
3051 if let Some(super::command::Command::SplitCoins(field)) = &self.command {
3052 field as _
3053 } else {
3054 super::SplitCoins::default_instance() as _
3055 }
3056 }
3057 pub fn split_coins_opt(&self) -> Option<&super::SplitCoins> {
3059 if let Some(super::command::Command::SplitCoins(field)) = &self.command {
3060 Some(field as _)
3061 } else {
3062 None
3063 }
3064 }
3065 pub fn split_coins_opt_mut(&mut self) -> Option<&mut super::SplitCoins> {
3067 if let Some(super::command::Command::SplitCoins(field)) = &mut self.command {
3068 Some(field as _)
3069 } else {
3070 None
3071 }
3072 }
3073 pub fn split_coins_mut(&mut self) -> &mut super::SplitCoins {
3077 if self.split_coins_opt_mut().is_none() {
3078 self.command = Some(
3079 super::command::Command::SplitCoins(super::SplitCoins::default()),
3080 );
3081 }
3082 self.split_coins_opt_mut().unwrap()
3083 }
3084 pub fn set_split_coins<T: Into<super::SplitCoins>>(&mut self, field: T) {
3087 self.command = Some(
3088 super::command::Command::SplitCoins(field.into().into()),
3089 );
3090 }
3091 pub fn with_split_coins<T: Into<super::SplitCoins>>(mut self, field: T) -> Self {
3094 self.set_split_coins(field.into());
3095 self
3096 }
3097 pub fn merge_coins(&self) -> &super::MergeCoins {
3099 if let Some(super::command::Command::MergeCoins(field)) = &self.command {
3100 field as _
3101 } else {
3102 super::MergeCoins::default_instance() as _
3103 }
3104 }
3105 pub fn merge_coins_opt(&self) -> Option<&super::MergeCoins> {
3107 if let Some(super::command::Command::MergeCoins(field)) = &self.command {
3108 Some(field as _)
3109 } else {
3110 None
3111 }
3112 }
3113 pub fn merge_coins_opt_mut(&mut self) -> Option<&mut super::MergeCoins> {
3115 if let Some(super::command::Command::MergeCoins(field)) = &mut self.command {
3116 Some(field as _)
3117 } else {
3118 None
3119 }
3120 }
3121 pub fn merge_coins_mut(&mut self) -> &mut super::MergeCoins {
3125 if self.merge_coins_opt_mut().is_none() {
3126 self.command = Some(
3127 super::command::Command::MergeCoins(super::MergeCoins::default()),
3128 );
3129 }
3130 self.merge_coins_opt_mut().unwrap()
3131 }
3132 pub fn set_merge_coins<T: Into<super::MergeCoins>>(&mut self, field: T) {
3135 self.command = Some(
3136 super::command::Command::MergeCoins(field.into().into()),
3137 );
3138 }
3139 pub fn with_merge_coins<T: Into<super::MergeCoins>>(mut self, field: T) -> Self {
3142 self.set_merge_coins(field.into());
3143 self
3144 }
3145 pub fn publish(&self) -> &super::Publish {
3147 if let Some(super::command::Command::Publish(field)) = &self.command {
3148 field as _
3149 } else {
3150 super::Publish::default_instance() as _
3151 }
3152 }
3153 pub fn publish_opt(&self) -> Option<&super::Publish> {
3155 if let Some(super::command::Command::Publish(field)) = &self.command {
3156 Some(field as _)
3157 } else {
3158 None
3159 }
3160 }
3161 pub fn publish_opt_mut(&mut self) -> Option<&mut super::Publish> {
3163 if let Some(super::command::Command::Publish(field)) = &mut self.command {
3164 Some(field as _)
3165 } else {
3166 None
3167 }
3168 }
3169 pub fn publish_mut(&mut self) -> &mut super::Publish {
3173 if self.publish_opt_mut().is_none() {
3174 self.command = Some(
3175 super::command::Command::Publish(super::Publish::default()),
3176 );
3177 }
3178 self.publish_opt_mut().unwrap()
3179 }
3180 pub fn set_publish<T: Into<super::Publish>>(&mut self, field: T) {
3183 self.command = Some(super::command::Command::Publish(field.into().into()));
3184 }
3185 pub fn with_publish<T: Into<super::Publish>>(mut self, field: T) -> Self {
3188 self.set_publish(field.into());
3189 self
3190 }
3191 pub fn make_move_vector(&self) -> &super::MakeMoveVector {
3193 if let Some(super::command::Command::MakeMoveVector(field)) = &self.command {
3194 field as _
3195 } else {
3196 super::MakeMoveVector::default_instance() as _
3197 }
3198 }
3199 pub fn make_move_vector_opt(&self) -> Option<&super::MakeMoveVector> {
3201 if let Some(super::command::Command::MakeMoveVector(field)) = &self.command {
3202 Some(field as _)
3203 } else {
3204 None
3205 }
3206 }
3207 pub fn make_move_vector_opt_mut(
3209 &mut self,
3210 ) -> Option<&mut super::MakeMoveVector> {
3211 if let Some(super::command::Command::MakeMoveVector(field)) = &mut self
3212 .command
3213 {
3214 Some(field as _)
3215 } else {
3216 None
3217 }
3218 }
3219 pub fn make_move_vector_mut(&mut self) -> &mut super::MakeMoveVector {
3223 if self.make_move_vector_opt_mut().is_none() {
3224 self.command = Some(
3225 super::command::Command::MakeMoveVector(
3226 super::MakeMoveVector::default(),
3227 ),
3228 );
3229 }
3230 self.make_move_vector_opt_mut().unwrap()
3231 }
3232 pub fn set_make_move_vector<T: Into<super::MakeMoveVector>>(
3235 &mut self,
3236 field: T,
3237 ) {
3238 self.command = Some(
3239 super::command::Command::MakeMoveVector(field.into().into()),
3240 );
3241 }
3242 pub fn with_make_move_vector<T: Into<super::MakeMoveVector>>(
3245 mut self,
3246 field: T,
3247 ) -> Self {
3248 self.set_make_move_vector(field.into());
3249 self
3250 }
3251 pub fn upgrade(&self) -> &super::Upgrade {
3253 if let Some(super::command::Command::Upgrade(field)) = &self.command {
3254 field as _
3255 } else {
3256 super::Upgrade::default_instance() as _
3257 }
3258 }
3259 pub fn upgrade_opt(&self) -> Option<&super::Upgrade> {
3261 if let Some(super::command::Command::Upgrade(field)) = &self.command {
3262 Some(field as _)
3263 } else {
3264 None
3265 }
3266 }
3267 pub fn upgrade_opt_mut(&mut self) -> Option<&mut super::Upgrade> {
3269 if let Some(super::command::Command::Upgrade(field)) = &mut self.command {
3270 Some(field as _)
3271 } else {
3272 None
3273 }
3274 }
3275 pub fn upgrade_mut(&mut self) -> &mut super::Upgrade {
3279 if self.upgrade_opt_mut().is_none() {
3280 self.command = Some(
3281 super::command::Command::Upgrade(super::Upgrade::default()),
3282 );
3283 }
3284 self.upgrade_opt_mut().unwrap()
3285 }
3286 pub fn set_upgrade<T: Into<super::Upgrade>>(&mut self, field: T) {
3289 self.command = Some(super::command::Command::Upgrade(field.into().into()));
3290 }
3291 pub fn with_upgrade<T: Into<super::Upgrade>>(mut self, field: T) -> Self {
3294 self.set_upgrade(field.into());
3295 self
3296 }
3297 }
3298 impl super::CommandArgumentError {
3299 pub const fn const_default() -> Self {
3300 Self {
3301 argument: None,
3302 kind: None,
3303 index_error: None,
3304 }
3305 }
3306 #[doc(hidden)]
3307 pub fn default_instance() -> &'static Self {
3308 static DEFAULT: super::CommandArgumentError = super::CommandArgumentError::const_default();
3309 &DEFAULT
3310 }
3311 pub fn argument_opt_mut(&mut self) -> Option<&mut u32> {
3313 self.argument.as_mut().map(|field| field as _)
3314 }
3315 pub fn argument_mut(&mut self) -> &mut u32 {
3318 self.argument.get_or_insert_default()
3319 }
3320 pub fn argument_opt(&self) -> Option<u32> {
3322 self.argument.as_ref().map(|field| *field)
3323 }
3324 pub fn set_argument(&mut self, field: u32) {
3326 self.argument = Some(field);
3327 }
3328 pub fn with_argument(mut self, field: u32) -> Self {
3330 self.set_argument(field);
3331 self
3332 }
3333 pub fn with_kind<
3335 T: Into<super::command_argument_error::CommandArgumentErrorKind>,
3336 >(mut self, field: T) -> Self {
3337 self.set_kind(field.into());
3338 self
3339 }
3340 pub fn index_error(&self) -> &super::IndexError {
3342 self.index_error
3343 .as_ref()
3344 .map(|field| field as _)
3345 .unwrap_or_else(|| super::IndexError::default_instance() as _)
3346 }
3347 pub fn index_error_opt_mut(&mut self) -> Option<&mut super::IndexError> {
3349 self.index_error.as_mut().map(|field| field as _)
3350 }
3351 pub fn index_error_mut(&mut self) -> &mut super::IndexError {
3354 self.index_error.get_or_insert_default()
3355 }
3356 pub fn index_error_opt(&self) -> Option<&super::IndexError> {
3358 self.index_error.as_ref().map(|field| field as _)
3359 }
3360 pub fn set_index_error<T: Into<super::IndexError>>(&mut self, field: T) {
3362 self.index_error = Some(field.into().into());
3363 }
3364 pub fn with_index_error<T: Into<super::IndexError>>(mut self, field: T) -> Self {
3366 self.set_index_error(field.into());
3367 self
3368 }
3369 }
3370 impl super::CommandOutput {
3371 pub const fn const_default() -> Self {
3372 Self {
3373 argument: None,
3374 value: None,
3375 json: None,
3376 }
3377 }
3378 #[doc(hidden)]
3379 pub fn default_instance() -> &'static Self {
3380 static DEFAULT: super::CommandOutput = super::CommandOutput::const_default();
3381 &DEFAULT
3382 }
3383 pub fn argument(&self) -> &super::Argument {
3385 self.argument
3386 .as_ref()
3387 .map(|field| field as _)
3388 .unwrap_or_else(|| super::Argument::default_instance() as _)
3389 }
3390 pub fn argument_opt_mut(&mut self) -> Option<&mut super::Argument> {
3392 self.argument.as_mut().map(|field| field as _)
3393 }
3394 pub fn argument_mut(&mut self) -> &mut super::Argument {
3397 self.argument.get_or_insert_default()
3398 }
3399 pub fn argument_opt(&self) -> Option<&super::Argument> {
3401 self.argument.as_ref().map(|field| field as _)
3402 }
3403 pub fn set_argument<T: Into<super::Argument>>(&mut self, field: T) {
3405 self.argument = Some(field.into().into());
3406 }
3407 pub fn with_argument<T: Into<super::Argument>>(mut self, field: T) -> Self {
3409 self.set_argument(field.into());
3410 self
3411 }
3412 pub fn value(&self) -> &super::Bcs {
3414 self.value
3415 .as_ref()
3416 .map(|field| field as _)
3417 .unwrap_or_else(|| super::Bcs::default_instance() as _)
3418 }
3419 pub fn value_opt_mut(&mut self) -> Option<&mut super::Bcs> {
3421 self.value.as_mut().map(|field| field as _)
3422 }
3423 pub fn value_mut(&mut self) -> &mut super::Bcs {
3426 self.value.get_or_insert_default()
3427 }
3428 pub fn value_opt(&self) -> Option<&super::Bcs> {
3430 self.value.as_ref().map(|field| field as _)
3431 }
3432 pub fn set_value<T: Into<super::Bcs>>(&mut self, field: T) {
3434 self.value = Some(field.into().into());
3435 }
3436 pub fn with_value<T: Into<super::Bcs>>(mut self, field: T) -> Self {
3438 self.set_value(field.into());
3439 self
3440 }
3441 pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
3443 self.json.as_mut().map(|field| field as _)
3444 }
3445 pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
3448 self.json.get_or_insert_default()
3449 }
3450 pub fn json_opt(&self) -> Option<&::prost_types::Value> {
3452 self.json.as_ref().map(|field| field as _)
3453 }
3454 pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
3456 self.json = Some(field.into().into());
3457 }
3458 pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
3460 self.set_json(field.into());
3461 self
3462 }
3463 }
3464 impl super::CommandResult {
3465 pub const fn const_default() -> Self {
3466 Self {
3467 return_values: Vec::new(),
3468 mutated_by_ref: Vec::new(),
3469 }
3470 }
3471 #[doc(hidden)]
3472 pub fn default_instance() -> &'static Self {
3473 static DEFAULT: super::CommandResult = super::CommandResult::const_default();
3474 &DEFAULT
3475 }
3476 pub fn return_values(&self) -> &[super::CommandOutput] {
3478 &self.return_values
3479 }
3480 pub fn return_values_mut(&mut self) -> &mut Vec<super::CommandOutput> {
3483 &mut self.return_values
3484 }
3485 pub fn set_return_values(&mut self, field: Vec<super::CommandOutput>) {
3487 self.return_values = field;
3488 }
3489 pub fn with_return_values(mut self, field: Vec<super::CommandOutput>) -> Self {
3491 self.set_return_values(field);
3492 self
3493 }
3494 pub fn mutated_by_ref(&self) -> &[super::CommandOutput] {
3496 &self.mutated_by_ref
3497 }
3498 pub fn mutated_by_ref_mut(&mut self) -> &mut Vec<super::CommandOutput> {
3501 &mut self.mutated_by_ref
3502 }
3503 pub fn set_mutated_by_ref(&mut self, field: Vec<super::CommandOutput>) {
3505 self.mutated_by_ref = field;
3506 }
3507 pub fn with_mutated_by_ref(mut self, field: Vec<super::CommandOutput>) -> Self {
3509 self.set_mutated_by_ref(field);
3510 self
3511 }
3512 }
3513 impl super::CongestedObjects {
3514 pub const fn const_default() -> Self {
3515 Self { objects: Vec::new() }
3516 }
3517 #[doc(hidden)]
3518 pub fn default_instance() -> &'static Self {
3519 static DEFAULT: super::CongestedObjects = super::CongestedObjects::const_default();
3520 &DEFAULT
3521 }
3522 pub fn objects(&self) -> &[String] {
3524 &self.objects
3525 }
3526 pub fn objects_mut(&mut self) -> &mut Vec<String> {
3529 &mut self.objects
3530 }
3531 pub fn set_objects(&mut self, field: Vec<String>) {
3533 self.objects = field;
3534 }
3535 pub fn with_objects(mut self, field: Vec<String>) -> Self {
3537 self.set_objects(field);
3538 self
3539 }
3540 }
3541 impl super::ConsensusCommitPrologue {
3542 pub const fn const_default() -> Self {
3543 Self {
3544 epoch: None,
3545 round: None,
3546 commit_timestamp: None,
3547 consensus_commit_digest: None,
3548 sub_dag_index: None,
3549 consensus_determined_version_assignments: None,
3550 additional_state_digest: None,
3551 }
3552 }
3553 #[doc(hidden)]
3554 pub fn default_instance() -> &'static Self {
3555 static DEFAULT: super::ConsensusCommitPrologue = super::ConsensusCommitPrologue::const_default();
3556 &DEFAULT
3557 }
3558 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
3560 self.epoch.as_mut().map(|field| field as _)
3561 }
3562 pub fn epoch_mut(&mut self) -> &mut u64 {
3565 self.epoch.get_or_insert_default()
3566 }
3567 pub fn epoch_opt(&self) -> Option<u64> {
3569 self.epoch.as_ref().map(|field| *field)
3570 }
3571 pub fn set_epoch(&mut self, field: u64) {
3573 self.epoch = Some(field);
3574 }
3575 pub fn with_epoch(mut self, field: u64) -> Self {
3577 self.set_epoch(field);
3578 self
3579 }
3580 pub fn round_opt_mut(&mut self) -> Option<&mut u64> {
3582 self.round.as_mut().map(|field| field as _)
3583 }
3584 pub fn round_mut(&mut self) -> &mut u64 {
3587 self.round.get_or_insert_default()
3588 }
3589 pub fn round_opt(&self) -> Option<u64> {
3591 self.round.as_ref().map(|field| *field)
3592 }
3593 pub fn set_round(&mut self, field: u64) {
3595 self.round = Some(field);
3596 }
3597 pub fn with_round(mut self, field: u64) -> Self {
3599 self.set_round(field);
3600 self
3601 }
3602 pub fn commit_timestamp_opt_mut(
3604 &mut self,
3605 ) -> Option<&mut ::prost_types::Timestamp> {
3606 self.commit_timestamp.as_mut().map(|field| field as _)
3607 }
3608 pub fn commit_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
3611 self.commit_timestamp.get_or_insert_default()
3612 }
3613 pub fn commit_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
3615 self.commit_timestamp.as_ref().map(|field| field as _)
3616 }
3617 pub fn set_commit_timestamp<T: Into<::prost_types::Timestamp>>(
3619 &mut self,
3620 field: T,
3621 ) {
3622 self.commit_timestamp = Some(field.into().into());
3623 }
3624 pub fn with_commit_timestamp<T: Into<::prost_types::Timestamp>>(
3626 mut self,
3627 field: T,
3628 ) -> Self {
3629 self.set_commit_timestamp(field.into());
3630 self
3631 }
3632 pub fn consensus_commit_digest_opt_mut(&mut self) -> Option<&mut String> {
3634 self.consensus_commit_digest.as_mut().map(|field| field as _)
3635 }
3636 pub fn consensus_commit_digest_mut(&mut self) -> &mut String {
3639 self.consensus_commit_digest.get_or_insert_default()
3640 }
3641 pub fn consensus_commit_digest_opt(&self) -> Option<&str> {
3643 self.consensus_commit_digest.as_ref().map(|field| field as _)
3644 }
3645 pub fn set_consensus_commit_digest<T: Into<String>>(&mut self, field: T) {
3647 self.consensus_commit_digest = Some(field.into().into());
3648 }
3649 pub fn with_consensus_commit_digest<T: Into<String>>(
3651 mut self,
3652 field: T,
3653 ) -> Self {
3654 self.set_consensus_commit_digest(field.into());
3655 self
3656 }
3657 pub fn sub_dag_index_opt_mut(&mut self) -> Option<&mut u64> {
3659 self.sub_dag_index.as_mut().map(|field| field as _)
3660 }
3661 pub fn sub_dag_index_mut(&mut self) -> &mut u64 {
3664 self.sub_dag_index.get_or_insert_default()
3665 }
3666 pub fn sub_dag_index_opt(&self) -> Option<u64> {
3668 self.sub_dag_index.as_ref().map(|field| *field)
3669 }
3670 pub fn set_sub_dag_index(&mut self, field: u64) {
3672 self.sub_dag_index = Some(field);
3673 }
3674 pub fn with_sub_dag_index(mut self, field: u64) -> Self {
3676 self.set_sub_dag_index(field);
3677 self
3678 }
3679 pub fn consensus_determined_version_assignments(
3681 &self,
3682 ) -> &super::ConsensusDeterminedVersionAssignments {
3683 self.consensus_determined_version_assignments
3684 .as_ref()
3685 .map(|field| field as _)
3686 .unwrap_or_else(|| {
3687 super::ConsensusDeterminedVersionAssignments::default_instance() as _
3688 })
3689 }
3690 pub fn consensus_determined_version_assignments_opt_mut(
3692 &mut self,
3693 ) -> Option<&mut super::ConsensusDeterminedVersionAssignments> {
3694 self.consensus_determined_version_assignments
3695 .as_mut()
3696 .map(|field| field as _)
3697 }
3698 pub fn consensus_determined_version_assignments_mut(
3701 &mut self,
3702 ) -> &mut super::ConsensusDeterminedVersionAssignments {
3703 self.consensus_determined_version_assignments.get_or_insert_default()
3704 }
3705 pub fn consensus_determined_version_assignments_opt(
3707 &self,
3708 ) -> Option<&super::ConsensusDeterminedVersionAssignments> {
3709 self.consensus_determined_version_assignments
3710 .as_ref()
3711 .map(|field| field as _)
3712 }
3713 pub fn set_consensus_determined_version_assignments<
3715 T: Into<super::ConsensusDeterminedVersionAssignments>,
3716 >(&mut self, field: T) {
3717 self.consensus_determined_version_assignments = Some(field.into().into());
3718 }
3719 pub fn with_consensus_determined_version_assignments<
3721 T: Into<super::ConsensusDeterminedVersionAssignments>,
3722 >(mut self, field: T) -> Self {
3723 self.set_consensus_determined_version_assignments(field.into());
3724 self
3725 }
3726 pub fn additional_state_digest_opt_mut(&mut self) -> Option<&mut String> {
3728 self.additional_state_digest.as_mut().map(|field| field as _)
3729 }
3730 pub fn additional_state_digest_mut(&mut self) -> &mut String {
3733 self.additional_state_digest.get_or_insert_default()
3734 }
3735 pub fn additional_state_digest_opt(&self) -> Option<&str> {
3737 self.additional_state_digest.as_ref().map(|field| field as _)
3738 }
3739 pub fn set_additional_state_digest<T: Into<String>>(&mut self, field: T) {
3741 self.additional_state_digest = Some(field.into().into());
3742 }
3743 pub fn with_additional_state_digest<T: Into<String>>(
3745 mut self,
3746 field: T,
3747 ) -> Self {
3748 self.set_additional_state_digest(field.into());
3749 self
3750 }
3751 }
3752 impl super::ConsensusDeterminedVersionAssignments {
3753 pub const fn const_default() -> Self {
3754 Self {
3755 version: None,
3756 canceled_transactions: Vec::new(),
3757 }
3758 }
3759 #[doc(hidden)]
3760 pub fn default_instance() -> &'static Self {
3761 static DEFAULT: super::ConsensusDeterminedVersionAssignments = super::ConsensusDeterminedVersionAssignments::const_default();
3762 &DEFAULT
3763 }
3764 pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
3766 self.version.as_mut().map(|field| field as _)
3767 }
3768 pub fn version_mut(&mut self) -> &mut i32 {
3771 self.version.get_or_insert_default()
3772 }
3773 pub fn version_opt(&self) -> Option<i32> {
3775 self.version.as_ref().map(|field| *field)
3776 }
3777 pub fn set_version(&mut self, field: i32) {
3779 self.version = Some(field);
3780 }
3781 pub fn with_version(mut self, field: i32) -> Self {
3783 self.set_version(field);
3784 self
3785 }
3786 pub fn canceled_transactions(&self) -> &[super::CanceledTransaction] {
3788 &self.canceled_transactions
3789 }
3790 pub fn canceled_transactions_mut(
3793 &mut self,
3794 ) -> &mut Vec<super::CanceledTransaction> {
3795 &mut self.canceled_transactions
3796 }
3797 pub fn set_canceled_transactions(
3799 &mut self,
3800 field: Vec<super::CanceledTransaction>,
3801 ) {
3802 self.canceled_transactions = field;
3803 }
3804 pub fn with_canceled_transactions(
3806 mut self,
3807 field: Vec<super::CanceledTransaction>,
3808 ) -> Self {
3809 self.set_canceled_transactions(field);
3810 self
3811 }
3812 }
3813 impl super::DatatypeDescriptor {
3814 pub const fn const_default() -> Self {
3815 Self {
3816 type_name: None,
3817 defining_id: None,
3818 module: None,
3819 name: None,
3820 abilities: Vec::new(),
3821 type_parameters: Vec::new(),
3822 kind: None,
3823 fields: Vec::new(),
3824 variants: Vec::new(),
3825 }
3826 }
3827 #[doc(hidden)]
3828 pub fn default_instance() -> &'static Self {
3829 static DEFAULT: super::DatatypeDescriptor = super::DatatypeDescriptor::const_default();
3830 &DEFAULT
3831 }
3832 pub fn type_name_opt_mut(&mut self) -> Option<&mut String> {
3834 self.type_name.as_mut().map(|field| field as _)
3835 }
3836 pub fn type_name_mut(&mut self) -> &mut String {
3839 self.type_name.get_or_insert_default()
3840 }
3841 pub fn type_name_opt(&self) -> Option<&str> {
3843 self.type_name.as_ref().map(|field| field as _)
3844 }
3845 pub fn set_type_name<T: Into<String>>(&mut self, field: T) {
3847 self.type_name = Some(field.into().into());
3848 }
3849 pub fn with_type_name<T: Into<String>>(mut self, field: T) -> Self {
3851 self.set_type_name(field.into());
3852 self
3853 }
3854 pub fn defining_id_opt_mut(&mut self) -> Option<&mut String> {
3856 self.defining_id.as_mut().map(|field| field as _)
3857 }
3858 pub fn defining_id_mut(&mut self) -> &mut String {
3861 self.defining_id.get_or_insert_default()
3862 }
3863 pub fn defining_id_opt(&self) -> Option<&str> {
3865 self.defining_id.as_ref().map(|field| field as _)
3866 }
3867 pub fn set_defining_id<T: Into<String>>(&mut self, field: T) {
3869 self.defining_id = Some(field.into().into());
3870 }
3871 pub fn with_defining_id<T: Into<String>>(mut self, field: T) -> Self {
3873 self.set_defining_id(field.into());
3874 self
3875 }
3876 pub fn module_opt_mut(&mut self) -> Option<&mut String> {
3878 self.module.as_mut().map(|field| field as _)
3879 }
3880 pub fn module_mut(&mut self) -> &mut String {
3883 self.module.get_or_insert_default()
3884 }
3885 pub fn module_opt(&self) -> Option<&str> {
3887 self.module.as_ref().map(|field| field as _)
3888 }
3889 pub fn set_module<T: Into<String>>(&mut self, field: T) {
3891 self.module = Some(field.into().into());
3892 }
3893 pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
3895 self.set_module(field.into());
3896 self
3897 }
3898 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
3900 self.name.as_mut().map(|field| field as _)
3901 }
3902 pub fn name_mut(&mut self) -> &mut String {
3905 self.name.get_or_insert_default()
3906 }
3907 pub fn name_opt(&self) -> Option<&str> {
3909 self.name.as_ref().map(|field| field as _)
3910 }
3911 pub fn set_name<T: Into<String>>(&mut self, field: T) {
3913 self.name = Some(field.into().into());
3914 }
3915 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
3917 self.set_name(field.into());
3918 self
3919 }
3920 pub fn type_parameters(&self) -> &[super::TypeParameter] {
3922 &self.type_parameters
3923 }
3924 pub fn type_parameters_mut(&mut self) -> &mut Vec<super::TypeParameter> {
3927 &mut self.type_parameters
3928 }
3929 pub fn set_type_parameters(&mut self, field: Vec<super::TypeParameter>) {
3931 self.type_parameters = field;
3932 }
3933 pub fn with_type_parameters(mut self, field: Vec<super::TypeParameter>) -> Self {
3935 self.set_type_parameters(field);
3936 self
3937 }
3938 pub fn with_kind<T: Into<super::datatype_descriptor::DatatypeKind>>(
3940 mut self,
3941 field: T,
3942 ) -> Self {
3943 self.set_kind(field.into());
3944 self
3945 }
3946 pub fn fields(&self) -> &[super::FieldDescriptor] {
3948 &self.fields
3949 }
3950 pub fn fields_mut(&mut self) -> &mut Vec<super::FieldDescriptor> {
3953 &mut self.fields
3954 }
3955 pub fn set_fields(&mut self, field: Vec<super::FieldDescriptor>) {
3957 self.fields = field;
3958 }
3959 pub fn with_fields(mut self, field: Vec<super::FieldDescriptor>) -> Self {
3961 self.set_fields(field);
3962 self
3963 }
3964 pub fn variants(&self) -> &[super::VariantDescriptor] {
3966 &self.variants
3967 }
3968 pub fn variants_mut(&mut self) -> &mut Vec<super::VariantDescriptor> {
3971 &mut self.variants
3972 }
3973 pub fn set_variants(&mut self, field: Vec<super::VariantDescriptor>) {
3975 self.variants = field;
3976 }
3977 pub fn with_variants(mut self, field: Vec<super::VariantDescriptor>) -> Self {
3979 self.set_variants(field);
3980 self
3981 }
3982 }
3983 impl super::DynamicField {
3984 pub const fn const_default() -> Self {
3985 Self {
3986 kind: None,
3987 parent: None,
3988 field_id: None,
3989 field_object: None,
3990 name: None,
3991 value: None,
3992 value_type: None,
3993 child_id: None,
3994 child_object: None,
3995 }
3996 }
3997 #[doc(hidden)]
3998 pub fn default_instance() -> &'static Self {
3999 static DEFAULT: super::DynamicField = super::DynamicField::const_default();
4000 &DEFAULT
4001 }
4002 pub fn with_kind<T: Into<super::dynamic_field::DynamicFieldKind>>(
4004 mut self,
4005 field: T,
4006 ) -> Self {
4007 self.set_kind(field.into());
4008 self
4009 }
4010 pub fn parent_opt_mut(&mut self) -> Option<&mut String> {
4012 self.parent.as_mut().map(|field| field as _)
4013 }
4014 pub fn parent_mut(&mut self) -> &mut String {
4017 self.parent.get_or_insert_default()
4018 }
4019 pub fn parent_opt(&self) -> Option<&str> {
4021 self.parent.as_ref().map(|field| field as _)
4022 }
4023 pub fn set_parent<T: Into<String>>(&mut self, field: T) {
4025 self.parent = Some(field.into().into());
4026 }
4027 pub fn with_parent<T: Into<String>>(mut self, field: T) -> Self {
4029 self.set_parent(field.into());
4030 self
4031 }
4032 pub fn field_id_opt_mut(&mut self) -> Option<&mut String> {
4034 self.field_id.as_mut().map(|field| field as _)
4035 }
4036 pub fn field_id_mut(&mut self) -> &mut String {
4039 self.field_id.get_or_insert_default()
4040 }
4041 pub fn field_id_opt(&self) -> Option<&str> {
4043 self.field_id.as_ref().map(|field| field as _)
4044 }
4045 pub fn set_field_id<T: Into<String>>(&mut self, field: T) {
4047 self.field_id = Some(field.into().into());
4048 }
4049 pub fn with_field_id<T: Into<String>>(mut self, field: T) -> Self {
4051 self.set_field_id(field.into());
4052 self
4053 }
4054 pub fn field_object(&self) -> &super::Object {
4056 self.field_object
4057 .as_ref()
4058 .map(|field| field as _)
4059 .unwrap_or_else(|| super::Object::default_instance() as _)
4060 }
4061 pub fn field_object_opt_mut(&mut self) -> Option<&mut super::Object> {
4063 self.field_object.as_mut().map(|field| field as _)
4064 }
4065 pub fn field_object_mut(&mut self) -> &mut super::Object {
4068 self.field_object.get_or_insert_default()
4069 }
4070 pub fn field_object_opt(&self) -> Option<&super::Object> {
4072 self.field_object.as_ref().map(|field| field as _)
4073 }
4074 pub fn set_field_object<T: Into<super::Object>>(&mut self, field: T) {
4076 self.field_object = Some(field.into().into());
4077 }
4078 pub fn with_field_object<T: Into<super::Object>>(mut self, field: T) -> Self {
4080 self.set_field_object(field.into());
4081 self
4082 }
4083 pub fn name(&self) -> &super::Bcs {
4085 self.name
4086 .as_ref()
4087 .map(|field| field as _)
4088 .unwrap_or_else(|| super::Bcs::default_instance() as _)
4089 }
4090 pub fn name_opt_mut(&mut self) -> Option<&mut super::Bcs> {
4092 self.name.as_mut().map(|field| field as _)
4093 }
4094 pub fn name_mut(&mut self) -> &mut super::Bcs {
4097 self.name.get_or_insert_default()
4098 }
4099 pub fn name_opt(&self) -> Option<&super::Bcs> {
4101 self.name.as_ref().map(|field| field as _)
4102 }
4103 pub fn set_name<T: Into<super::Bcs>>(&mut self, field: T) {
4105 self.name = Some(field.into().into());
4106 }
4107 pub fn with_name<T: Into<super::Bcs>>(mut self, field: T) -> Self {
4109 self.set_name(field.into());
4110 self
4111 }
4112 pub fn value(&self) -> &super::Bcs {
4114 self.value
4115 .as_ref()
4116 .map(|field| field as _)
4117 .unwrap_or_else(|| super::Bcs::default_instance() as _)
4118 }
4119 pub fn value_opt_mut(&mut self) -> Option<&mut super::Bcs> {
4121 self.value.as_mut().map(|field| field as _)
4122 }
4123 pub fn value_mut(&mut self) -> &mut super::Bcs {
4126 self.value.get_or_insert_default()
4127 }
4128 pub fn value_opt(&self) -> Option<&super::Bcs> {
4130 self.value.as_ref().map(|field| field as _)
4131 }
4132 pub fn set_value<T: Into<super::Bcs>>(&mut self, field: T) {
4134 self.value = Some(field.into().into());
4135 }
4136 pub fn with_value<T: Into<super::Bcs>>(mut self, field: T) -> Self {
4138 self.set_value(field.into());
4139 self
4140 }
4141 pub fn value_type_opt_mut(&mut self) -> Option<&mut String> {
4143 self.value_type.as_mut().map(|field| field as _)
4144 }
4145 pub fn value_type_mut(&mut self) -> &mut String {
4148 self.value_type.get_or_insert_default()
4149 }
4150 pub fn value_type_opt(&self) -> Option<&str> {
4152 self.value_type.as_ref().map(|field| field as _)
4153 }
4154 pub fn set_value_type<T: Into<String>>(&mut self, field: T) {
4156 self.value_type = Some(field.into().into());
4157 }
4158 pub fn with_value_type<T: Into<String>>(mut self, field: T) -> Self {
4160 self.set_value_type(field.into());
4161 self
4162 }
4163 pub fn child_id_opt_mut(&mut self) -> Option<&mut String> {
4165 self.child_id.as_mut().map(|field| field as _)
4166 }
4167 pub fn child_id_mut(&mut self) -> &mut String {
4170 self.child_id.get_or_insert_default()
4171 }
4172 pub fn child_id_opt(&self) -> Option<&str> {
4174 self.child_id.as_ref().map(|field| field as _)
4175 }
4176 pub fn set_child_id<T: Into<String>>(&mut self, field: T) {
4178 self.child_id = Some(field.into().into());
4179 }
4180 pub fn with_child_id<T: Into<String>>(mut self, field: T) -> Self {
4182 self.set_child_id(field.into());
4183 self
4184 }
4185 pub fn child_object(&self) -> &super::Object {
4187 self.child_object
4188 .as_ref()
4189 .map(|field| field as _)
4190 .unwrap_or_else(|| super::Object::default_instance() as _)
4191 }
4192 pub fn child_object_opt_mut(&mut self) -> Option<&mut super::Object> {
4194 self.child_object.as_mut().map(|field| field as _)
4195 }
4196 pub fn child_object_mut(&mut self) -> &mut super::Object {
4199 self.child_object.get_or_insert_default()
4200 }
4201 pub fn child_object_opt(&self) -> Option<&super::Object> {
4203 self.child_object.as_ref().map(|field| field as _)
4204 }
4205 pub fn set_child_object<T: Into<super::Object>>(&mut self, field: T) {
4207 self.child_object = Some(field.into().into());
4208 }
4209 pub fn with_child_object<T: Into<super::Object>>(mut self, field: T) -> Self {
4211 self.set_child_object(field.into());
4212 self
4213 }
4214 }
4215 impl super::EndOfEpochData {
4216 pub const fn const_default() -> Self {
4217 Self {
4218 next_epoch_committee: Vec::new(),
4219 next_epoch_protocol_version: None,
4220 epoch_commitments: Vec::new(),
4221 }
4222 }
4223 #[doc(hidden)]
4224 pub fn default_instance() -> &'static Self {
4225 static DEFAULT: super::EndOfEpochData = super::EndOfEpochData::const_default();
4226 &DEFAULT
4227 }
4228 pub fn next_epoch_committee(&self) -> &[super::ValidatorCommitteeMember] {
4230 &self.next_epoch_committee
4231 }
4232 pub fn next_epoch_committee_mut(
4235 &mut self,
4236 ) -> &mut Vec<super::ValidatorCommitteeMember> {
4237 &mut self.next_epoch_committee
4238 }
4239 pub fn set_next_epoch_committee(
4241 &mut self,
4242 field: Vec<super::ValidatorCommitteeMember>,
4243 ) {
4244 self.next_epoch_committee = field;
4245 }
4246 pub fn with_next_epoch_committee(
4248 mut self,
4249 field: Vec<super::ValidatorCommitteeMember>,
4250 ) -> Self {
4251 self.set_next_epoch_committee(field);
4252 self
4253 }
4254 pub fn next_epoch_protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
4256 self.next_epoch_protocol_version.as_mut().map(|field| field as _)
4257 }
4258 pub fn next_epoch_protocol_version_mut(&mut self) -> &mut u64 {
4261 self.next_epoch_protocol_version.get_or_insert_default()
4262 }
4263 pub fn next_epoch_protocol_version_opt(&self) -> Option<u64> {
4265 self.next_epoch_protocol_version.as_ref().map(|field| *field)
4266 }
4267 pub fn set_next_epoch_protocol_version(&mut self, field: u64) {
4269 self.next_epoch_protocol_version = Some(field);
4270 }
4271 pub fn with_next_epoch_protocol_version(mut self, field: u64) -> Self {
4273 self.set_next_epoch_protocol_version(field);
4274 self
4275 }
4276 pub fn epoch_commitments(&self) -> &[super::CheckpointCommitment] {
4278 &self.epoch_commitments
4279 }
4280 pub fn epoch_commitments_mut(
4283 &mut self,
4284 ) -> &mut Vec<super::CheckpointCommitment> {
4285 &mut self.epoch_commitments
4286 }
4287 pub fn set_epoch_commitments(
4289 &mut self,
4290 field: Vec<super::CheckpointCommitment>,
4291 ) {
4292 self.epoch_commitments = field;
4293 }
4294 pub fn with_epoch_commitments(
4296 mut self,
4297 field: Vec<super::CheckpointCommitment>,
4298 ) -> Self {
4299 self.set_epoch_commitments(field);
4300 self
4301 }
4302 }
4303 impl super::EndOfEpochTransaction {
4304 pub const fn const_default() -> Self {
4305 Self { transactions: Vec::new() }
4306 }
4307 #[doc(hidden)]
4308 pub fn default_instance() -> &'static Self {
4309 static DEFAULT: super::EndOfEpochTransaction = super::EndOfEpochTransaction::const_default();
4310 &DEFAULT
4311 }
4312 pub fn transactions(&self) -> &[super::EndOfEpochTransactionKind] {
4314 &self.transactions
4315 }
4316 pub fn transactions_mut(
4319 &mut self,
4320 ) -> &mut Vec<super::EndOfEpochTransactionKind> {
4321 &mut self.transactions
4322 }
4323 pub fn set_transactions(
4325 &mut self,
4326 field: Vec<super::EndOfEpochTransactionKind>,
4327 ) {
4328 self.transactions = field;
4329 }
4330 pub fn with_transactions(
4332 mut self,
4333 field: Vec<super::EndOfEpochTransactionKind>,
4334 ) -> Self {
4335 self.set_transactions(field);
4336 self
4337 }
4338 }
4339 impl super::EndOfEpochTransactionKind {
4340 pub const fn const_default() -> Self {
4341 Self { kind: None, data: None }
4342 }
4343 #[doc(hidden)]
4344 pub fn default_instance() -> &'static Self {
4345 static DEFAULT: super::EndOfEpochTransactionKind = super::EndOfEpochTransactionKind::const_default();
4346 &DEFAULT
4347 }
4348 pub fn with_kind<T: Into<super::end_of_epoch_transaction_kind::Kind>>(
4350 mut self,
4351 field: T,
4352 ) -> Self {
4353 self.set_kind(field.into());
4354 self
4355 }
4356 pub fn change_epoch(&self) -> &super::ChangeEpoch {
4358 if let Some(
4359 super::end_of_epoch_transaction_kind::Data::ChangeEpoch(field),
4360 ) = &self.data
4361 {
4362 field as _
4363 } else {
4364 super::ChangeEpoch::default_instance() as _
4365 }
4366 }
4367 pub fn change_epoch_opt(&self) -> Option<&super::ChangeEpoch> {
4369 if let Some(
4370 super::end_of_epoch_transaction_kind::Data::ChangeEpoch(field),
4371 ) = &self.data
4372 {
4373 Some(field as _)
4374 } else {
4375 None
4376 }
4377 }
4378 pub fn change_epoch_opt_mut(&mut self) -> Option<&mut super::ChangeEpoch> {
4380 if let Some(
4381 super::end_of_epoch_transaction_kind::Data::ChangeEpoch(field),
4382 ) = &mut self.data
4383 {
4384 Some(field as _)
4385 } else {
4386 None
4387 }
4388 }
4389 pub fn change_epoch_mut(&mut self) -> &mut super::ChangeEpoch {
4393 if self.change_epoch_opt_mut().is_none() {
4394 self.data = Some(
4395 super::end_of_epoch_transaction_kind::Data::ChangeEpoch(
4396 super::ChangeEpoch::default(),
4397 ),
4398 );
4399 }
4400 self.change_epoch_opt_mut().unwrap()
4401 }
4402 pub fn set_change_epoch<T: Into<super::ChangeEpoch>>(&mut self, field: T) {
4405 self.data = Some(
4406 super::end_of_epoch_transaction_kind::Data::ChangeEpoch(
4407 field.into().into(),
4408 ),
4409 );
4410 }
4411 pub fn with_change_epoch<T: Into<super::ChangeEpoch>>(
4414 mut self,
4415 field: T,
4416 ) -> Self {
4417 self.set_change_epoch(field.into());
4418 self
4419 }
4420 pub fn authenticator_state_expire(&self) -> &super::AuthenticatorStateExpire {
4422 if let Some(
4423 super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4424 field,
4425 ),
4426 ) = &self.data
4427 {
4428 field as _
4429 } else {
4430 super::AuthenticatorStateExpire::default_instance() as _
4431 }
4432 }
4433 pub fn authenticator_state_expire_opt(
4435 &self,
4436 ) -> Option<&super::AuthenticatorStateExpire> {
4437 if let Some(
4438 super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4439 field,
4440 ),
4441 ) = &self.data
4442 {
4443 Some(field as _)
4444 } else {
4445 None
4446 }
4447 }
4448 pub fn authenticator_state_expire_opt_mut(
4450 &mut self,
4451 ) -> Option<&mut super::AuthenticatorStateExpire> {
4452 if let Some(
4453 super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4454 field,
4455 ),
4456 ) = &mut self.data
4457 {
4458 Some(field as _)
4459 } else {
4460 None
4461 }
4462 }
4463 pub fn authenticator_state_expire_mut(
4467 &mut self,
4468 ) -> &mut super::AuthenticatorStateExpire {
4469 if self.authenticator_state_expire_opt_mut().is_none() {
4470 self.data = Some(
4471 super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4472 super::AuthenticatorStateExpire::default(),
4473 ),
4474 );
4475 }
4476 self.authenticator_state_expire_opt_mut().unwrap()
4477 }
4478 pub fn set_authenticator_state_expire<T: Into<super::AuthenticatorStateExpire>>(
4481 &mut self,
4482 field: T,
4483 ) {
4484 self.data = Some(
4485 super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4486 field.into().into(),
4487 ),
4488 );
4489 }
4490 pub fn with_authenticator_state_expire<T: Into<super::AuthenticatorStateExpire>>(
4493 mut self,
4494 field: T,
4495 ) -> Self {
4496 self.set_authenticator_state_expire(field.into());
4497 self
4498 }
4499 pub fn execution_time_observations(&self) -> &super::ExecutionTimeObservations {
4501 if let Some(
4502 super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4503 field,
4504 ),
4505 ) = &self.data
4506 {
4507 field as _
4508 } else {
4509 super::ExecutionTimeObservations::default_instance() as _
4510 }
4511 }
4512 pub fn execution_time_observations_opt(
4514 &self,
4515 ) -> Option<&super::ExecutionTimeObservations> {
4516 if let Some(
4517 super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4518 field,
4519 ),
4520 ) = &self.data
4521 {
4522 Some(field as _)
4523 } else {
4524 None
4525 }
4526 }
4527 pub fn execution_time_observations_opt_mut(
4529 &mut self,
4530 ) -> Option<&mut super::ExecutionTimeObservations> {
4531 if let Some(
4532 super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4533 field,
4534 ),
4535 ) = &mut self.data
4536 {
4537 Some(field as _)
4538 } else {
4539 None
4540 }
4541 }
4542 pub fn execution_time_observations_mut(
4546 &mut self,
4547 ) -> &mut super::ExecutionTimeObservations {
4548 if self.execution_time_observations_opt_mut().is_none() {
4549 self.data = Some(
4550 super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4551 super::ExecutionTimeObservations::default(),
4552 ),
4553 );
4554 }
4555 self.execution_time_observations_opt_mut().unwrap()
4556 }
4557 pub fn set_execution_time_observations<
4560 T: Into<super::ExecutionTimeObservations>,
4561 >(&mut self, field: T) {
4562 self.data = Some(
4563 super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4564 field.into().into(),
4565 ),
4566 );
4567 }
4568 pub fn with_execution_time_observations<
4571 T: Into<super::ExecutionTimeObservations>,
4572 >(mut self, field: T) -> Self {
4573 self.set_execution_time_observations(field.into());
4574 self
4575 }
4576 pub fn bridge_chain_id(&self) -> &str {
4578 if let Some(
4579 super::end_of_epoch_transaction_kind::Data::BridgeChainId(field),
4580 ) = &self.data
4581 {
4582 field as _
4583 } else {
4584 ""
4585 }
4586 }
4587 pub fn bridge_chain_id_opt(&self) -> Option<&str> {
4589 if let Some(
4590 super::end_of_epoch_transaction_kind::Data::BridgeChainId(field),
4591 ) = &self.data
4592 {
4593 Some(field as _)
4594 } else {
4595 None
4596 }
4597 }
4598 pub fn bridge_chain_id_opt_mut(&mut self) -> Option<&mut String> {
4600 if let Some(
4601 super::end_of_epoch_transaction_kind::Data::BridgeChainId(field),
4602 ) = &mut self.data
4603 {
4604 Some(field as _)
4605 } else {
4606 None
4607 }
4608 }
4609 pub fn bridge_chain_id_mut(&mut self) -> &mut String {
4613 if self.bridge_chain_id_opt_mut().is_none() {
4614 self.data = Some(
4615 super::end_of_epoch_transaction_kind::Data::BridgeChainId(
4616 String::default(),
4617 ),
4618 );
4619 }
4620 self.bridge_chain_id_opt_mut().unwrap()
4621 }
4622 pub fn set_bridge_chain_id<T: Into<String>>(&mut self, field: T) {
4625 self.data = Some(
4626 super::end_of_epoch_transaction_kind::Data::BridgeChainId(
4627 field.into().into(),
4628 ),
4629 );
4630 }
4631 pub fn with_bridge_chain_id<T: Into<String>>(mut self, field: T) -> Self {
4634 self.set_bridge_chain_id(field.into());
4635 self
4636 }
4637 pub fn bridge_object_version(&self) -> u64 {
4639 if let Some(
4640 super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4641 ) = &self.data
4642 {
4643 *field
4644 } else {
4645 0u64
4646 }
4647 }
4648 pub fn bridge_object_version_opt(&self) -> Option<u64> {
4650 if let Some(
4651 super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4652 ) = &self.data
4653 {
4654 Some(*field)
4655 } else {
4656 None
4657 }
4658 }
4659 pub fn bridge_object_version_opt_mut(&mut self) -> Option<&mut u64> {
4661 if let Some(
4662 super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4663 ) = &mut self.data
4664 {
4665 Some(field as _)
4666 } else {
4667 None
4668 }
4669 }
4670 pub fn bridge_object_version_mut(&mut self) -> &mut u64 {
4674 if self.bridge_object_version_opt_mut().is_none() {
4675 self.data = Some(
4676 super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(
4677 u64::default(),
4678 ),
4679 );
4680 }
4681 self.bridge_object_version_opt_mut().unwrap()
4682 }
4683 pub fn set_bridge_object_version(&mut self, field: u64) {
4686 self.data = Some(
4687 super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4688 );
4689 }
4690 pub fn with_bridge_object_version(mut self, field: u64) -> Self {
4693 self.set_bridge_object_version(field);
4694 self
4695 }
4696 pub fn storage_cost(&self) -> u64 {
4698 if let Some(
4699 super::end_of_epoch_transaction_kind::Data::StorageCost(field),
4700 ) = &self.data
4701 {
4702 *field
4703 } else {
4704 0u64
4705 }
4706 }
4707 pub fn storage_cost_opt(&self) -> Option<u64> {
4709 if let Some(
4710 super::end_of_epoch_transaction_kind::Data::StorageCost(field),
4711 ) = &self.data
4712 {
4713 Some(*field)
4714 } else {
4715 None
4716 }
4717 }
4718 pub fn storage_cost_opt_mut(&mut self) -> Option<&mut u64> {
4720 if let Some(
4721 super::end_of_epoch_transaction_kind::Data::StorageCost(field),
4722 ) = &mut self.data
4723 {
4724 Some(field as _)
4725 } else {
4726 None
4727 }
4728 }
4729 pub fn storage_cost_mut(&mut self) -> &mut u64 {
4733 if self.storage_cost_opt_mut().is_none() {
4734 self.data = Some(
4735 super::end_of_epoch_transaction_kind::Data::StorageCost(
4736 u64::default(),
4737 ),
4738 );
4739 }
4740 self.storage_cost_opt_mut().unwrap()
4741 }
4742 pub fn set_storage_cost(&mut self, field: u64) {
4745 self.data = Some(
4746 super::end_of_epoch_transaction_kind::Data::StorageCost(field),
4747 );
4748 }
4749 pub fn with_storage_cost(mut self, field: u64) -> Self {
4752 self.set_storage_cost(field);
4753 self
4754 }
4755 }
4756 impl super::Epoch {
4757 pub const fn const_default() -> Self {
4758 Self {
4759 epoch: None,
4760 committee: None,
4761 system_state: None,
4762 first_checkpoint: None,
4763 last_checkpoint: None,
4764 start: None,
4765 end: None,
4766 reference_gas_price: None,
4767 protocol_config: None,
4768 }
4769 }
4770 #[doc(hidden)]
4771 pub fn default_instance() -> &'static Self {
4772 static DEFAULT: super::Epoch = super::Epoch::const_default();
4773 &DEFAULT
4774 }
4775 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
4777 self.epoch.as_mut().map(|field| field as _)
4778 }
4779 pub fn epoch_mut(&mut self) -> &mut u64 {
4782 self.epoch.get_or_insert_default()
4783 }
4784 pub fn epoch_opt(&self) -> Option<u64> {
4786 self.epoch.as_ref().map(|field| *field)
4787 }
4788 pub fn set_epoch(&mut self, field: u64) {
4790 self.epoch = Some(field);
4791 }
4792 pub fn with_epoch(mut self, field: u64) -> Self {
4794 self.set_epoch(field);
4795 self
4796 }
4797 pub fn committee(&self) -> &super::ValidatorCommittee {
4799 self.committee
4800 .as_ref()
4801 .map(|field| field as _)
4802 .unwrap_or_else(|| super::ValidatorCommittee::default_instance() as _)
4803 }
4804 pub fn committee_opt_mut(&mut self) -> Option<&mut super::ValidatorCommittee> {
4806 self.committee.as_mut().map(|field| field as _)
4807 }
4808 pub fn committee_mut(&mut self) -> &mut super::ValidatorCommittee {
4811 self.committee.get_or_insert_default()
4812 }
4813 pub fn committee_opt(&self) -> Option<&super::ValidatorCommittee> {
4815 self.committee.as_ref().map(|field| field as _)
4816 }
4817 pub fn set_committee<T: Into<super::ValidatorCommittee>>(&mut self, field: T) {
4819 self.committee = Some(field.into().into());
4820 }
4821 pub fn with_committee<T: Into<super::ValidatorCommittee>>(
4823 mut self,
4824 field: T,
4825 ) -> Self {
4826 self.set_committee(field.into());
4827 self
4828 }
4829 pub fn system_state(&self) -> &super::SystemState {
4831 self.system_state
4832 .as_ref()
4833 .map(|field| field as _)
4834 .unwrap_or_else(|| super::SystemState::default_instance() as _)
4835 }
4836 pub fn system_state_opt_mut(&mut self) -> Option<&mut super::SystemState> {
4838 self.system_state.as_mut().map(|field| field as _)
4839 }
4840 pub fn system_state_mut(&mut self) -> &mut super::SystemState {
4843 self.system_state.get_or_insert_default()
4844 }
4845 pub fn system_state_opt(&self) -> Option<&super::SystemState> {
4847 self.system_state.as_ref().map(|field| field as _)
4848 }
4849 pub fn set_system_state<T: Into<super::SystemState>>(&mut self, field: T) {
4851 self.system_state = Some(field.into().into());
4852 }
4853 pub fn with_system_state<T: Into<super::SystemState>>(
4855 mut self,
4856 field: T,
4857 ) -> Self {
4858 self.set_system_state(field.into());
4859 self
4860 }
4861 pub fn first_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
4863 self.first_checkpoint.as_mut().map(|field| field as _)
4864 }
4865 pub fn first_checkpoint_mut(&mut self) -> &mut u64 {
4868 self.first_checkpoint.get_or_insert_default()
4869 }
4870 pub fn first_checkpoint_opt(&self) -> Option<u64> {
4872 self.first_checkpoint.as_ref().map(|field| *field)
4873 }
4874 pub fn set_first_checkpoint(&mut self, field: u64) {
4876 self.first_checkpoint = Some(field);
4877 }
4878 pub fn with_first_checkpoint(mut self, field: u64) -> Self {
4880 self.set_first_checkpoint(field);
4881 self
4882 }
4883 pub fn last_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
4885 self.last_checkpoint.as_mut().map(|field| field as _)
4886 }
4887 pub fn last_checkpoint_mut(&mut self) -> &mut u64 {
4890 self.last_checkpoint.get_or_insert_default()
4891 }
4892 pub fn last_checkpoint_opt(&self) -> Option<u64> {
4894 self.last_checkpoint.as_ref().map(|field| *field)
4895 }
4896 pub fn set_last_checkpoint(&mut self, field: u64) {
4898 self.last_checkpoint = Some(field);
4899 }
4900 pub fn with_last_checkpoint(mut self, field: u64) -> Self {
4902 self.set_last_checkpoint(field);
4903 self
4904 }
4905 pub fn start_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
4907 self.start.as_mut().map(|field| field as _)
4908 }
4909 pub fn start_mut(&mut self) -> &mut ::prost_types::Timestamp {
4912 self.start.get_or_insert_default()
4913 }
4914 pub fn start_opt(&self) -> Option<&::prost_types::Timestamp> {
4916 self.start.as_ref().map(|field| field as _)
4917 }
4918 pub fn set_start<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
4920 self.start = Some(field.into().into());
4921 }
4922 pub fn with_start<T: Into<::prost_types::Timestamp>>(
4924 mut self,
4925 field: T,
4926 ) -> Self {
4927 self.set_start(field.into());
4928 self
4929 }
4930 pub fn end_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
4932 self.end.as_mut().map(|field| field as _)
4933 }
4934 pub fn end_mut(&mut self) -> &mut ::prost_types::Timestamp {
4937 self.end.get_or_insert_default()
4938 }
4939 pub fn end_opt(&self) -> Option<&::prost_types::Timestamp> {
4941 self.end.as_ref().map(|field| field as _)
4942 }
4943 pub fn set_end<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
4945 self.end = Some(field.into().into());
4946 }
4947 pub fn with_end<T: Into<::prost_types::Timestamp>>(mut self, field: T) -> Self {
4949 self.set_end(field.into());
4950 self
4951 }
4952 pub fn reference_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
4954 self.reference_gas_price.as_mut().map(|field| field as _)
4955 }
4956 pub fn reference_gas_price_mut(&mut self) -> &mut u64 {
4959 self.reference_gas_price.get_or_insert_default()
4960 }
4961 pub fn reference_gas_price_opt(&self) -> Option<u64> {
4963 self.reference_gas_price.as_ref().map(|field| *field)
4964 }
4965 pub fn set_reference_gas_price(&mut self, field: u64) {
4967 self.reference_gas_price = Some(field);
4968 }
4969 pub fn with_reference_gas_price(mut self, field: u64) -> Self {
4971 self.set_reference_gas_price(field);
4972 self
4973 }
4974 pub fn protocol_config(&self) -> &super::ProtocolConfig {
4976 self.protocol_config
4977 .as_ref()
4978 .map(|field| field as _)
4979 .unwrap_or_else(|| super::ProtocolConfig::default_instance() as _)
4980 }
4981 pub fn protocol_config_opt_mut(&mut self) -> Option<&mut super::ProtocolConfig> {
4983 self.protocol_config.as_mut().map(|field| field as _)
4984 }
4985 pub fn protocol_config_mut(&mut self) -> &mut super::ProtocolConfig {
4988 self.protocol_config.get_or_insert_default()
4989 }
4990 pub fn protocol_config_opt(&self) -> Option<&super::ProtocolConfig> {
4992 self.protocol_config.as_ref().map(|field| field as _)
4993 }
4994 pub fn set_protocol_config<T: Into<super::ProtocolConfig>>(&mut self, field: T) {
4996 self.protocol_config = Some(field.into().into());
4997 }
4998 pub fn with_protocol_config<T: Into<super::ProtocolConfig>>(
5000 mut self,
5001 field: T,
5002 ) -> Self {
5003 self.set_protocol_config(field.into());
5004 self
5005 }
5006 }
5007 impl super::Event {
5008 pub const fn const_default() -> Self {
5009 Self {
5010 package_id: None,
5011 module: None,
5012 sender: None,
5013 event_type: None,
5014 contents: None,
5015 json: None,
5016 }
5017 }
5018 #[doc(hidden)]
5019 pub fn default_instance() -> &'static Self {
5020 static DEFAULT: super::Event = super::Event::const_default();
5021 &DEFAULT
5022 }
5023 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
5025 self.package_id.as_mut().map(|field| field as _)
5026 }
5027 pub fn package_id_mut(&mut self) -> &mut String {
5030 self.package_id.get_or_insert_default()
5031 }
5032 pub fn package_id_opt(&self) -> Option<&str> {
5034 self.package_id.as_ref().map(|field| field as _)
5035 }
5036 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
5038 self.package_id = Some(field.into().into());
5039 }
5040 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
5042 self.set_package_id(field.into());
5043 self
5044 }
5045 pub fn module_opt_mut(&mut self) -> Option<&mut String> {
5047 self.module.as_mut().map(|field| field as _)
5048 }
5049 pub fn module_mut(&mut self) -> &mut String {
5052 self.module.get_or_insert_default()
5053 }
5054 pub fn module_opt(&self) -> Option<&str> {
5056 self.module.as_ref().map(|field| field as _)
5057 }
5058 pub fn set_module<T: Into<String>>(&mut self, field: T) {
5060 self.module = Some(field.into().into());
5061 }
5062 pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
5064 self.set_module(field.into());
5065 self
5066 }
5067 pub fn sender_opt_mut(&mut self) -> Option<&mut String> {
5069 self.sender.as_mut().map(|field| field as _)
5070 }
5071 pub fn sender_mut(&mut self) -> &mut String {
5074 self.sender.get_or_insert_default()
5075 }
5076 pub fn sender_opt(&self) -> Option<&str> {
5078 self.sender.as_ref().map(|field| field as _)
5079 }
5080 pub fn set_sender<T: Into<String>>(&mut self, field: T) {
5082 self.sender = Some(field.into().into());
5083 }
5084 pub fn with_sender<T: Into<String>>(mut self, field: T) -> Self {
5086 self.set_sender(field.into());
5087 self
5088 }
5089 pub fn event_type_opt_mut(&mut self) -> Option<&mut String> {
5091 self.event_type.as_mut().map(|field| field as _)
5092 }
5093 pub fn event_type_mut(&mut self) -> &mut String {
5096 self.event_type.get_or_insert_default()
5097 }
5098 pub fn event_type_opt(&self) -> Option<&str> {
5100 self.event_type.as_ref().map(|field| field as _)
5101 }
5102 pub fn set_event_type<T: Into<String>>(&mut self, field: T) {
5104 self.event_type = Some(field.into().into());
5105 }
5106 pub fn with_event_type<T: Into<String>>(mut self, field: T) -> Self {
5108 self.set_event_type(field.into());
5109 self
5110 }
5111 pub fn contents(&self) -> &super::Bcs {
5113 self.contents
5114 .as_ref()
5115 .map(|field| field as _)
5116 .unwrap_or_else(|| super::Bcs::default_instance() as _)
5117 }
5118 pub fn contents_opt_mut(&mut self) -> Option<&mut super::Bcs> {
5120 self.contents.as_mut().map(|field| field as _)
5121 }
5122 pub fn contents_mut(&mut self) -> &mut super::Bcs {
5125 self.contents.get_or_insert_default()
5126 }
5127 pub fn contents_opt(&self) -> Option<&super::Bcs> {
5129 self.contents.as_ref().map(|field| field as _)
5130 }
5131 pub fn set_contents<T: Into<super::Bcs>>(&mut self, field: T) {
5133 self.contents = Some(field.into().into());
5134 }
5135 pub fn with_contents<T: Into<super::Bcs>>(mut self, field: T) -> Self {
5137 self.set_contents(field.into());
5138 self
5139 }
5140 pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
5142 self.json.as_mut().map(|field| field as _)
5143 }
5144 pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
5147 self.json.get_or_insert_default()
5148 }
5149 pub fn json_opt(&self) -> Option<&::prost_types::Value> {
5151 self.json.as_ref().map(|field| field as _)
5152 }
5153 pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
5155 self.json = Some(field.into().into());
5156 }
5157 pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
5159 self.set_json(field.into());
5160 self
5161 }
5162 }
5163 impl super::ExecuteTransactionRequest {
5164 pub const fn const_default() -> Self {
5165 Self {
5166 transaction: None,
5167 signatures: Vec::new(),
5168 read_mask: None,
5169 }
5170 }
5171 #[doc(hidden)]
5172 pub fn default_instance() -> &'static Self {
5173 static DEFAULT: super::ExecuteTransactionRequest = super::ExecuteTransactionRequest::const_default();
5174 &DEFAULT
5175 }
5176 pub fn transaction(&self) -> &super::Transaction {
5178 self.transaction
5179 .as_ref()
5180 .map(|field| field as _)
5181 .unwrap_or_else(|| super::Transaction::default_instance() as _)
5182 }
5183 pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
5185 self.transaction.as_mut().map(|field| field as _)
5186 }
5187 pub fn transaction_mut(&mut self) -> &mut super::Transaction {
5190 self.transaction.get_or_insert_default()
5191 }
5192 pub fn transaction_opt(&self) -> Option<&super::Transaction> {
5194 self.transaction.as_ref().map(|field| field as _)
5195 }
5196 pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
5198 self.transaction = Some(field.into().into());
5199 }
5200 pub fn with_transaction<T: Into<super::Transaction>>(
5202 mut self,
5203 field: T,
5204 ) -> Self {
5205 self.set_transaction(field.into());
5206 self
5207 }
5208 pub fn signatures(&self) -> &[super::UserSignature] {
5210 &self.signatures
5211 }
5212 pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
5215 &mut self.signatures
5216 }
5217 pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
5219 self.signatures = field;
5220 }
5221 pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
5223 self.set_signatures(field);
5224 self
5225 }
5226 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
5228 self.read_mask.as_mut().map(|field| field as _)
5229 }
5230 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
5233 self.read_mask.get_or_insert_default()
5234 }
5235 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
5237 self.read_mask.as_ref().map(|field| field as _)
5238 }
5239 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
5241 self.read_mask = Some(field.into().into());
5242 }
5243 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
5245 mut self,
5246 field: T,
5247 ) -> Self {
5248 self.set_read_mask(field.into());
5249 self
5250 }
5251 }
5252 impl super::ExecuteTransactionResponse {
5253 pub const fn const_default() -> Self {
5254 Self { transaction: None }
5255 }
5256 #[doc(hidden)]
5257 pub fn default_instance() -> &'static Self {
5258 static DEFAULT: super::ExecuteTransactionResponse = super::ExecuteTransactionResponse::const_default();
5259 &DEFAULT
5260 }
5261 pub fn transaction(&self) -> &super::ExecutedTransaction {
5263 self.transaction
5264 .as_ref()
5265 .map(|field| field as _)
5266 .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
5267 }
5268 pub fn transaction_opt_mut(
5270 &mut self,
5271 ) -> Option<&mut super::ExecutedTransaction> {
5272 self.transaction.as_mut().map(|field| field as _)
5273 }
5274 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
5277 self.transaction.get_or_insert_default()
5278 }
5279 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
5281 self.transaction.as_ref().map(|field| field as _)
5282 }
5283 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
5285 &mut self,
5286 field: T,
5287 ) {
5288 self.transaction = Some(field.into().into());
5289 }
5290 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
5292 mut self,
5293 field: T,
5294 ) -> Self {
5295 self.set_transaction(field.into());
5296 self
5297 }
5298 }
5299 impl super::ExecutedTransaction {
5300 pub const fn const_default() -> Self {
5301 Self {
5302 digest: None,
5303 transaction: None,
5304 signatures: Vec::new(),
5305 effects: None,
5306 events: None,
5307 checkpoint: None,
5308 timestamp: None,
5309 balance_changes: Vec::new(),
5310 objects: None,
5311 }
5312 }
5313 #[doc(hidden)]
5314 pub fn default_instance() -> &'static Self {
5315 static DEFAULT: super::ExecutedTransaction = super::ExecutedTransaction::const_default();
5316 &DEFAULT
5317 }
5318 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
5320 self.digest.as_mut().map(|field| field as _)
5321 }
5322 pub fn digest_mut(&mut self) -> &mut String {
5325 self.digest.get_or_insert_default()
5326 }
5327 pub fn digest_opt(&self) -> Option<&str> {
5329 self.digest.as_ref().map(|field| field as _)
5330 }
5331 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
5333 self.digest = Some(field.into().into());
5334 }
5335 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
5337 self.set_digest(field.into());
5338 self
5339 }
5340 pub fn transaction(&self) -> &super::Transaction {
5342 self.transaction
5343 .as_ref()
5344 .map(|field| field as _)
5345 .unwrap_or_else(|| super::Transaction::default_instance() as _)
5346 }
5347 pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
5349 self.transaction.as_mut().map(|field| field as _)
5350 }
5351 pub fn transaction_mut(&mut self) -> &mut super::Transaction {
5354 self.transaction.get_or_insert_default()
5355 }
5356 pub fn transaction_opt(&self) -> Option<&super::Transaction> {
5358 self.transaction.as_ref().map(|field| field as _)
5359 }
5360 pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
5362 self.transaction = Some(field.into().into());
5363 }
5364 pub fn with_transaction<T: Into<super::Transaction>>(
5366 mut self,
5367 field: T,
5368 ) -> Self {
5369 self.set_transaction(field.into());
5370 self
5371 }
5372 pub fn signatures(&self) -> &[super::UserSignature] {
5374 &self.signatures
5375 }
5376 pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
5379 &mut self.signatures
5380 }
5381 pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
5383 self.signatures = field;
5384 }
5385 pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
5387 self.set_signatures(field);
5388 self
5389 }
5390 pub fn effects(&self) -> &super::TransactionEffects {
5392 self.effects
5393 .as_ref()
5394 .map(|field| field as _)
5395 .unwrap_or_else(|| super::TransactionEffects::default_instance() as _)
5396 }
5397 pub fn effects_opt_mut(&mut self) -> Option<&mut super::TransactionEffects> {
5399 self.effects.as_mut().map(|field| field as _)
5400 }
5401 pub fn effects_mut(&mut self) -> &mut super::TransactionEffects {
5404 self.effects.get_or_insert_default()
5405 }
5406 pub fn effects_opt(&self) -> Option<&super::TransactionEffects> {
5408 self.effects.as_ref().map(|field| field as _)
5409 }
5410 pub fn set_effects<T: Into<super::TransactionEffects>>(&mut self, field: T) {
5412 self.effects = Some(field.into().into());
5413 }
5414 pub fn with_effects<T: Into<super::TransactionEffects>>(
5416 mut self,
5417 field: T,
5418 ) -> Self {
5419 self.set_effects(field.into());
5420 self
5421 }
5422 pub fn events(&self) -> &super::TransactionEvents {
5424 self.events
5425 .as_ref()
5426 .map(|field| field as _)
5427 .unwrap_or_else(|| super::TransactionEvents::default_instance() as _)
5428 }
5429 pub fn events_opt_mut(&mut self) -> Option<&mut super::TransactionEvents> {
5431 self.events.as_mut().map(|field| field as _)
5432 }
5433 pub fn events_mut(&mut self) -> &mut super::TransactionEvents {
5436 self.events.get_or_insert_default()
5437 }
5438 pub fn events_opt(&self) -> Option<&super::TransactionEvents> {
5440 self.events.as_ref().map(|field| field as _)
5441 }
5442 pub fn set_events<T: Into<super::TransactionEvents>>(&mut self, field: T) {
5444 self.events = Some(field.into().into());
5445 }
5446 pub fn with_events<T: Into<super::TransactionEvents>>(
5448 mut self,
5449 field: T,
5450 ) -> Self {
5451 self.set_events(field.into());
5452 self
5453 }
5454 pub fn checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
5456 self.checkpoint.as_mut().map(|field| field as _)
5457 }
5458 pub fn checkpoint_mut(&mut self) -> &mut u64 {
5461 self.checkpoint.get_or_insert_default()
5462 }
5463 pub fn checkpoint_opt(&self) -> Option<u64> {
5465 self.checkpoint.as_ref().map(|field| *field)
5466 }
5467 pub fn set_checkpoint(&mut self, field: u64) {
5469 self.checkpoint = Some(field);
5470 }
5471 pub fn with_checkpoint(mut self, field: u64) -> Self {
5473 self.set_checkpoint(field);
5474 self
5475 }
5476 pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
5478 self.timestamp.as_mut().map(|field| field as _)
5479 }
5480 pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
5483 self.timestamp.get_or_insert_default()
5484 }
5485 pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
5487 self.timestamp.as_ref().map(|field| field as _)
5488 }
5489 pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
5491 self.timestamp = Some(field.into().into());
5492 }
5493 pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
5495 mut self,
5496 field: T,
5497 ) -> Self {
5498 self.set_timestamp(field.into());
5499 self
5500 }
5501 pub fn balance_changes(&self) -> &[super::BalanceChange] {
5503 &self.balance_changes
5504 }
5505 pub fn balance_changes_mut(&mut self) -> &mut Vec<super::BalanceChange> {
5508 &mut self.balance_changes
5509 }
5510 pub fn set_balance_changes(&mut self, field: Vec<super::BalanceChange>) {
5512 self.balance_changes = field;
5513 }
5514 pub fn with_balance_changes(mut self, field: Vec<super::BalanceChange>) -> Self {
5516 self.set_balance_changes(field);
5517 self
5518 }
5519 pub fn objects(&self) -> &super::ObjectSet {
5521 self.objects
5522 .as_ref()
5523 .map(|field| field as _)
5524 .unwrap_or_else(|| super::ObjectSet::default_instance() as _)
5525 }
5526 pub fn objects_opt_mut(&mut self) -> Option<&mut super::ObjectSet> {
5528 self.objects.as_mut().map(|field| field as _)
5529 }
5530 pub fn objects_mut(&mut self) -> &mut super::ObjectSet {
5533 self.objects.get_or_insert_default()
5534 }
5535 pub fn objects_opt(&self) -> Option<&super::ObjectSet> {
5537 self.objects.as_ref().map(|field| field as _)
5538 }
5539 pub fn set_objects<T: Into<super::ObjectSet>>(&mut self, field: T) {
5541 self.objects = Some(field.into().into());
5542 }
5543 pub fn with_objects<T: Into<super::ObjectSet>>(mut self, field: T) -> Self {
5545 self.set_objects(field.into());
5546 self
5547 }
5548 }
5549 impl super::ExecutionError {
5550 pub const fn const_default() -> Self {
5551 Self {
5552 description: None,
5553 command: None,
5554 kind: None,
5555 error_details: None,
5556 }
5557 }
5558 #[doc(hidden)]
5559 pub fn default_instance() -> &'static Self {
5560 static DEFAULT: super::ExecutionError = super::ExecutionError::const_default();
5561 &DEFAULT
5562 }
5563 pub fn description_opt_mut(&mut self) -> Option<&mut String> {
5565 self.description.as_mut().map(|field| field as _)
5566 }
5567 pub fn description_mut(&mut self) -> &mut String {
5570 self.description.get_or_insert_default()
5571 }
5572 pub fn description_opt(&self) -> Option<&str> {
5574 self.description.as_ref().map(|field| field as _)
5575 }
5576 pub fn set_description<T: Into<String>>(&mut self, field: T) {
5578 self.description = Some(field.into().into());
5579 }
5580 pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
5582 self.set_description(field.into());
5583 self
5584 }
5585 pub fn command_opt_mut(&mut self) -> Option<&mut u64> {
5587 self.command.as_mut().map(|field| field as _)
5588 }
5589 pub fn command_mut(&mut self) -> &mut u64 {
5592 self.command.get_or_insert_default()
5593 }
5594 pub fn command_opt(&self) -> Option<u64> {
5596 self.command.as_ref().map(|field| *field)
5597 }
5598 pub fn set_command(&mut self, field: u64) {
5600 self.command = Some(field);
5601 }
5602 pub fn with_command(mut self, field: u64) -> Self {
5604 self.set_command(field);
5605 self
5606 }
5607 pub fn with_kind<T: Into<super::execution_error::ExecutionErrorKind>>(
5609 mut self,
5610 field: T,
5611 ) -> Self {
5612 self.set_kind(field.into());
5613 self
5614 }
5615 pub fn abort(&self) -> &super::MoveAbort {
5617 if let Some(super::execution_error::ErrorDetails::Abort(field)) = &self
5618 .error_details
5619 {
5620 field as _
5621 } else {
5622 super::MoveAbort::default_instance() as _
5623 }
5624 }
5625 pub fn abort_opt(&self) -> Option<&super::MoveAbort> {
5627 if let Some(super::execution_error::ErrorDetails::Abort(field)) = &self
5628 .error_details
5629 {
5630 Some(field as _)
5631 } else {
5632 None
5633 }
5634 }
5635 pub fn abort_opt_mut(&mut self) -> Option<&mut super::MoveAbort> {
5637 if let Some(super::execution_error::ErrorDetails::Abort(field)) = &mut self
5638 .error_details
5639 {
5640 Some(field as _)
5641 } else {
5642 None
5643 }
5644 }
5645 pub fn abort_mut(&mut self) -> &mut super::MoveAbort {
5649 if self.abort_opt_mut().is_none() {
5650 self.error_details = Some(
5651 super::execution_error::ErrorDetails::Abort(
5652 super::MoveAbort::default(),
5653 ),
5654 );
5655 }
5656 self.abort_opt_mut().unwrap()
5657 }
5658 pub fn set_abort<T: Into<super::MoveAbort>>(&mut self, field: T) {
5661 self.error_details = Some(
5662 super::execution_error::ErrorDetails::Abort(field.into().into()),
5663 );
5664 }
5665 pub fn with_abort<T: Into<super::MoveAbort>>(mut self, field: T) -> Self {
5668 self.set_abort(field.into());
5669 self
5670 }
5671 pub fn size_error(&self) -> &super::SizeError {
5673 if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &self
5674 .error_details
5675 {
5676 field as _
5677 } else {
5678 super::SizeError::default_instance() as _
5679 }
5680 }
5681 pub fn size_error_opt(&self) -> Option<&super::SizeError> {
5683 if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &self
5684 .error_details
5685 {
5686 Some(field as _)
5687 } else {
5688 None
5689 }
5690 }
5691 pub fn size_error_opt_mut(&mut self) -> Option<&mut super::SizeError> {
5693 if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &mut self
5694 .error_details
5695 {
5696 Some(field as _)
5697 } else {
5698 None
5699 }
5700 }
5701 pub fn size_error_mut(&mut self) -> &mut super::SizeError {
5705 if self.size_error_opt_mut().is_none() {
5706 self.error_details = Some(
5707 super::execution_error::ErrorDetails::SizeError(
5708 super::SizeError::default(),
5709 ),
5710 );
5711 }
5712 self.size_error_opt_mut().unwrap()
5713 }
5714 pub fn set_size_error<T: Into<super::SizeError>>(&mut self, field: T) {
5717 self.error_details = Some(
5718 super::execution_error::ErrorDetails::SizeError(field.into().into()),
5719 );
5720 }
5721 pub fn with_size_error<T: Into<super::SizeError>>(mut self, field: T) -> Self {
5724 self.set_size_error(field.into());
5725 self
5726 }
5727 pub fn command_argument_error(&self) -> &super::CommandArgumentError {
5729 if let Some(
5730 super::execution_error::ErrorDetails::CommandArgumentError(field),
5731 ) = &self.error_details
5732 {
5733 field as _
5734 } else {
5735 super::CommandArgumentError::default_instance() as _
5736 }
5737 }
5738 pub fn command_argument_error_opt(
5740 &self,
5741 ) -> Option<&super::CommandArgumentError> {
5742 if let Some(
5743 super::execution_error::ErrorDetails::CommandArgumentError(field),
5744 ) = &self.error_details
5745 {
5746 Some(field as _)
5747 } else {
5748 None
5749 }
5750 }
5751 pub fn command_argument_error_opt_mut(
5753 &mut self,
5754 ) -> Option<&mut super::CommandArgumentError> {
5755 if let Some(
5756 super::execution_error::ErrorDetails::CommandArgumentError(field),
5757 ) = &mut self.error_details
5758 {
5759 Some(field as _)
5760 } else {
5761 None
5762 }
5763 }
5764 pub fn command_argument_error_mut(
5768 &mut self,
5769 ) -> &mut super::CommandArgumentError {
5770 if self.command_argument_error_opt_mut().is_none() {
5771 self.error_details = Some(
5772 super::execution_error::ErrorDetails::CommandArgumentError(
5773 super::CommandArgumentError::default(),
5774 ),
5775 );
5776 }
5777 self.command_argument_error_opt_mut().unwrap()
5778 }
5779 pub fn set_command_argument_error<T: Into<super::CommandArgumentError>>(
5782 &mut self,
5783 field: T,
5784 ) {
5785 self.error_details = Some(
5786 super::execution_error::ErrorDetails::CommandArgumentError(
5787 field.into().into(),
5788 ),
5789 );
5790 }
5791 pub fn with_command_argument_error<T: Into<super::CommandArgumentError>>(
5794 mut self,
5795 field: T,
5796 ) -> Self {
5797 self.set_command_argument_error(field.into());
5798 self
5799 }
5800 pub fn type_argument_error(&self) -> &super::TypeArgumentError {
5802 if let Some(
5803 super::execution_error::ErrorDetails::TypeArgumentError(field),
5804 ) = &self.error_details
5805 {
5806 field as _
5807 } else {
5808 super::TypeArgumentError::default_instance() as _
5809 }
5810 }
5811 pub fn type_argument_error_opt(&self) -> Option<&super::TypeArgumentError> {
5813 if let Some(
5814 super::execution_error::ErrorDetails::TypeArgumentError(field),
5815 ) = &self.error_details
5816 {
5817 Some(field as _)
5818 } else {
5819 None
5820 }
5821 }
5822 pub fn type_argument_error_opt_mut(
5824 &mut self,
5825 ) -> Option<&mut super::TypeArgumentError> {
5826 if let Some(
5827 super::execution_error::ErrorDetails::TypeArgumentError(field),
5828 ) = &mut self.error_details
5829 {
5830 Some(field as _)
5831 } else {
5832 None
5833 }
5834 }
5835 pub fn type_argument_error_mut(&mut self) -> &mut super::TypeArgumentError {
5839 if self.type_argument_error_opt_mut().is_none() {
5840 self.error_details = Some(
5841 super::execution_error::ErrorDetails::TypeArgumentError(
5842 super::TypeArgumentError::default(),
5843 ),
5844 );
5845 }
5846 self.type_argument_error_opt_mut().unwrap()
5847 }
5848 pub fn set_type_argument_error<T: Into<super::TypeArgumentError>>(
5851 &mut self,
5852 field: T,
5853 ) {
5854 self.error_details = Some(
5855 super::execution_error::ErrorDetails::TypeArgumentError(
5856 field.into().into(),
5857 ),
5858 );
5859 }
5860 pub fn with_type_argument_error<T: Into<super::TypeArgumentError>>(
5863 mut self,
5864 field: T,
5865 ) -> Self {
5866 self.set_type_argument_error(field.into());
5867 self
5868 }
5869 pub fn package_upgrade_error(&self) -> &super::PackageUpgradeError {
5871 if let Some(
5872 super::execution_error::ErrorDetails::PackageUpgradeError(field),
5873 ) = &self.error_details
5874 {
5875 field as _
5876 } else {
5877 super::PackageUpgradeError::default_instance() as _
5878 }
5879 }
5880 pub fn package_upgrade_error_opt(&self) -> Option<&super::PackageUpgradeError> {
5882 if let Some(
5883 super::execution_error::ErrorDetails::PackageUpgradeError(field),
5884 ) = &self.error_details
5885 {
5886 Some(field as _)
5887 } else {
5888 None
5889 }
5890 }
5891 pub fn package_upgrade_error_opt_mut(
5893 &mut self,
5894 ) -> Option<&mut super::PackageUpgradeError> {
5895 if let Some(
5896 super::execution_error::ErrorDetails::PackageUpgradeError(field),
5897 ) = &mut self.error_details
5898 {
5899 Some(field as _)
5900 } else {
5901 None
5902 }
5903 }
5904 pub fn package_upgrade_error_mut(&mut self) -> &mut super::PackageUpgradeError {
5908 if self.package_upgrade_error_opt_mut().is_none() {
5909 self.error_details = Some(
5910 super::execution_error::ErrorDetails::PackageUpgradeError(
5911 super::PackageUpgradeError::default(),
5912 ),
5913 );
5914 }
5915 self.package_upgrade_error_opt_mut().unwrap()
5916 }
5917 pub fn set_package_upgrade_error<T: Into<super::PackageUpgradeError>>(
5920 &mut self,
5921 field: T,
5922 ) {
5923 self.error_details = Some(
5924 super::execution_error::ErrorDetails::PackageUpgradeError(
5925 field.into().into(),
5926 ),
5927 );
5928 }
5929 pub fn with_package_upgrade_error<T: Into<super::PackageUpgradeError>>(
5932 mut self,
5933 field: T,
5934 ) -> Self {
5935 self.set_package_upgrade_error(field.into());
5936 self
5937 }
5938 pub fn index_error(&self) -> &super::IndexError {
5940 if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &self
5941 .error_details
5942 {
5943 field as _
5944 } else {
5945 super::IndexError::default_instance() as _
5946 }
5947 }
5948 pub fn index_error_opt(&self) -> Option<&super::IndexError> {
5950 if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &self
5951 .error_details
5952 {
5953 Some(field as _)
5954 } else {
5955 None
5956 }
5957 }
5958 pub fn index_error_opt_mut(&mut self) -> Option<&mut super::IndexError> {
5960 if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &mut self
5961 .error_details
5962 {
5963 Some(field as _)
5964 } else {
5965 None
5966 }
5967 }
5968 pub fn index_error_mut(&mut self) -> &mut super::IndexError {
5972 if self.index_error_opt_mut().is_none() {
5973 self.error_details = Some(
5974 super::execution_error::ErrorDetails::IndexError(
5975 super::IndexError::default(),
5976 ),
5977 );
5978 }
5979 self.index_error_opt_mut().unwrap()
5980 }
5981 pub fn set_index_error<T: Into<super::IndexError>>(&mut self, field: T) {
5984 self.error_details = Some(
5985 super::execution_error::ErrorDetails::IndexError(field.into().into()),
5986 );
5987 }
5988 pub fn with_index_error<T: Into<super::IndexError>>(mut self, field: T) -> Self {
5991 self.set_index_error(field.into());
5992 self
5993 }
5994 pub fn object_id(&self) -> &str {
5996 if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &self
5997 .error_details
5998 {
5999 field as _
6000 } else {
6001 ""
6002 }
6003 }
6004 pub fn object_id_opt(&self) -> Option<&str> {
6006 if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &self
6007 .error_details
6008 {
6009 Some(field as _)
6010 } else {
6011 None
6012 }
6013 }
6014 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
6016 if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &mut self
6017 .error_details
6018 {
6019 Some(field as _)
6020 } else {
6021 None
6022 }
6023 }
6024 pub fn object_id_mut(&mut self) -> &mut String {
6028 if self.object_id_opt_mut().is_none() {
6029 self.error_details = Some(
6030 super::execution_error::ErrorDetails::ObjectId(String::default()),
6031 );
6032 }
6033 self.object_id_opt_mut().unwrap()
6034 }
6035 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
6038 self.error_details = Some(
6039 super::execution_error::ErrorDetails::ObjectId(field.into().into()),
6040 );
6041 }
6042 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
6045 self.set_object_id(field.into());
6046 self
6047 }
6048 pub fn coin_deny_list_error(&self) -> &super::CoinDenyListError {
6050 if let Some(
6051 super::execution_error::ErrorDetails::CoinDenyListError(field),
6052 ) = &self.error_details
6053 {
6054 field as _
6055 } else {
6056 super::CoinDenyListError::default_instance() as _
6057 }
6058 }
6059 pub fn coin_deny_list_error_opt(&self) -> Option<&super::CoinDenyListError> {
6061 if let Some(
6062 super::execution_error::ErrorDetails::CoinDenyListError(field),
6063 ) = &self.error_details
6064 {
6065 Some(field as _)
6066 } else {
6067 None
6068 }
6069 }
6070 pub fn coin_deny_list_error_opt_mut(
6072 &mut self,
6073 ) -> Option<&mut super::CoinDenyListError> {
6074 if let Some(
6075 super::execution_error::ErrorDetails::CoinDenyListError(field),
6076 ) = &mut self.error_details
6077 {
6078 Some(field as _)
6079 } else {
6080 None
6081 }
6082 }
6083 pub fn coin_deny_list_error_mut(&mut self) -> &mut super::CoinDenyListError {
6087 if self.coin_deny_list_error_opt_mut().is_none() {
6088 self.error_details = Some(
6089 super::execution_error::ErrorDetails::CoinDenyListError(
6090 super::CoinDenyListError::default(),
6091 ),
6092 );
6093 }
6094 self.coin_deny_list_error_opt_mut().unwrap()
6095 }
6096 pub fn set_coin_deny_list_error<T: Into<super::CoinDenyListError>>(
6099 &mut self,
6100 field: T,
6101 ) {
6102 self.error_details = Some(
6103 super::execution_error::ErrorDetails::CoinDenyListError(
6104 field.into().into(),
6105 ),
6106 );
6107 }
6108 pub fn with_coin_deny_list_error<T: Into<super::CoinDenyListError>>(
6111 mut self,
6112 field: T,
6113 ) -> Self {
6114 self.set_coin_deny_list_error(field.into());
6115 self
6116 }
6117 pub fn congested_objects(&self) -> &super::CongestedObjects {
6119 if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &self
6120 .error_details
6121 {
6122 field as _
6123 } else {
6124 super::CongestedObjects::default_instance() as _
6125 }
6126 }
6127 pub fn congested_objects_opt(&self) -> Option<&super::CongestedObjects> {
6129 if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &self
6130 .error_details
6131 {
6132 Some(field as _)
6133 } else {
6134 None
6135 }
6136 }
6137 pub fn congested_objects_opt_mut(
6139 &mut self,
6140 ) -> Option<&mut super::CongestedObjects> {
6141 if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &mut self
6142 .error_details
6143 {
6144 Some(field as _)
6145 } else {
6146 None
6147 }
6148 }
6149 pub fn congested_objects_mut(&mut self) -> &mut super::CongestedObjects {
6153 if self.congested_objects_opt_mut().is_none() {
6154 self.error_details = Some(
6155 super::execution_error::ErrorDetails::CongestedObjects(
6156 super::CongestedObjects::default(),
6157 ),
6158 );
6159 }
6160 self.congested_objects_opt_mut().unwrap()
6161 }
6162 pub fn set_congested_objects<T: Into<super::CongestedObjects>>(
6165 &mut self,
6166 field: T,
6167 ) {
6168 self.error_details = Some(
6169 super::execution_error::ErrorDetails::CongestedObjects(
6170 field.into().into(),
6171 ),
6172 );
6173 }
6174 pub fn with_congested_objects<T: Into<super::CongestedObjects>>(
6177 mut self,
6178 field: T,
6179 ) -> Self {
6180 self.set_congested_objects(field.into());
6181 self
6182 }
6183 }
6184 impl super::ExecutionStatus {
6185 pub const fn const_default() -> Self {
6186 Self { success: None, error: None }
6187 }
6188 #[doc(hidden)]
6189 pub fn default_instance() -> &'static Self {
6190 static DEFAULT: super::ExecutionStatus = super::ExecutionStatus::const_default();
6191 &DEFAULT
6192 }
6193 pub fn success_opt_mut(&mut self) -> Option<&mut bool> {
6195 self.success.as_mut().map(|field| field as _)
6196 }
6197 pub fn success_mut(&mut self) -> &mut bool {
6200 self.success.get_or_insert_default()
6201 }
6202 pub fn success_opt(&self) -> Option<bool> {
6204 self.success.as_ref().map(|field| *field)
6205 }
6206 pub fn set_success(&mut self, field: bool) {
6208 self.success = Some(field);
6209 }
6210 pub fn with_success(mut self, field: bool) -> Self {
6212 self.set_success(field);
6213 self
6214 }
6215 pub fn error(&self) -> &super::ExecutionError {
6217 self.error
6218 .as_ref()
6219 .map(|field| field as _)
6220 .unwrap_or_else(|| super::ExecutionError::default_instance() as _)
6221 }
6222 pub fn error_opt_mut(&mut self) -> Option<&mut super::ExecutionError> {
6224 self.error.as_mut().map(|field| field as _)
6225 }
6226 pub fn error_mut(&mut self) -> &mut super::ExecutionError {
6229 self.error.get_or_insert_default()
6230 }
6231 pub fn error_opt(&self) -> Option<&super::ExecutionError> {
6233 self.error.as_ref().map(|field| field as _)
6234 }
6235 pub fn set_error<T: Into<super::ExecutionError>>(&mut self, field: T) {
6237 self.error = Some(field.into().into());
6238 }
6239 pub fn with_error<T: Into<super::ExecutionError>>(mut self, field: T) -> Self {
6241 self.set_error(field.into());
6242 self
6243 }
6244 }
6245 impl super::ExecutionTimeObservation {
6246 pub const fn const_default() -> Self {
6247 Self {
6248 kind: None,
6249 move_entry_point: None,
6250 validator_observations: Vec::new(),
6251 }
6252 }
6253 #[doc(hidden)]
6254 pub fn default_instance() -> &'static Self {
6255 static DEFAULT: super::ExecutionTimeObservation = super::ExecutionTimeObservation::const_default();
6256 &DEFAULT
6257 }
6258 pub fn with_kind<
6260 T: Into<super::execution_time_observation::ExecutionTimeObservationKind>,
6261 >(mut self, field: T) -> Self {
6262 self.set_kind(field.into());
6263 self
6264 }
6265 pub fn move_entry_point(&self) -> &super::MoveCall {
6267 self.move_entry_point
6268 .as_ref()
6269 .map(|field| field as _)
6270 .unwrap_or_else(|| super::MoveCall::default_instance() as _)
6271 }
6272 pub fn move_entry_point_opt_mut(&mut self) -> Option<&mut super::MoveCall> {
6274 self.move_entry_point.as_mut().map(|field| field as _)
6275 }
6276 pub fn move_entry_point_mut(&mut self) -> &mut super::MoveCall {
6279 self.move_entry_point.get_or_insert_default()
6280 }
6281 pub fn move_entry_point_opt(&self) -> Option<&super::MoveCall> {
6283 self.move_entry_point.as_ref().map(|field| field as _)
6284 }
6285 pub fn set_move_entry_point<T: Into<super::MoveCall>>(&mut self, field: T) {
6287 self.move_entry_point = Some(field.into().into());
6288 }
6289 pub fn with_move_entry_point<T: Into<super::MoveCall>>(
6291 mut self,
6292 field: T,
6293 ) -> Self {
6294 self.set_move_entry_point(field.into());
6295 self
6296 }
6297 pub fn validator_observations(
6299 &self,
6300 ) -> &[super::ValidatorExecutionTimeObservation] {
6301 &self.validator_observations
6302 }
6303 pub fn validator_observations_mut(
6306 &mut self,
6307 ) -> &mut Vec<super::ValidatorExecutionTimeObservation> {
6308 &mut self.validator_observations
6309 }
6310 pub fn set_validator_observations(
6312 &mut self,
6313 field: Vec<super::ValidatorExecutionTimeObservation>,
6314 ) {
6315 self.validator_observations = field;
6316 }
6317 pub fn with_validator_observations(
6319 mut self,
6320 field: Vec<super::ValidatorExecutionTimeObservation>,
6321 ) -> Self {
6322 self.set_validator_observations(field);
6323 self
6324 }
6325 }
6326 impl super::ExecutionTimeObservations {
6327 pub const fn const_default() -> Self {
6328 Self {
6329 version: None,
6330 observations: Vec::new(),
6331 }
6332 }
6333 #[doc(hidden)]
6334 pub fn default_instance() -> &'static Self {
6335 static DEFAULT: super::ExecutionTimeObservations = super::ExecutionTimeObservations::const_default();
6336 &DEFAULT
6337 }
6338 pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
6340 self.version.as_mut().map(|field| field as _)
6341 }
6342 pub fn version_mut(&mut self) -> &mut i32 {
6345 self.version.get_or_insert_default()
6346 }
6347 pub fn version_opt(&self) -> Option<i32> {
6349 self.version.as_ref().map(|field| *field)
6350 }
6351 pub fn set_version(&mut self, field: i32) {
6353 self.version = Some(field);
6354 }
6355 pub fn with_version(mut self, field: i32) -> Self {
6357 self.set_version(field);
6358 self
6359 }
6360 pub fn observations(&self) -> &[super::ExecutionTimeObservation] {
6362 &self.observations
6363 }
6364 pub fn observations_mut(&mut self) -> &mut Vec<super::ExecutionTimeObservation> {
6367 &mut self.observations
6368 }
6369 pub fn set_observations(&mut self, field: Vec<super::ExecutionTimeObservation>) {
6371 self.observations = field;
6372 }
6373 pub fn with_observations(
6375 mut self,
6376 field: Vec<super::ExecutionTimeObservation>,
6377 ) -> Self {
6378 self.set_observations(field);
6379 self
6380 }
6381 }
6382 impl super::FieldDescriptor {
6383 pub const fn const_default() -> Self {
6384 Self {
6385 name: None,
6386 position: None,
6387 r#type: None,
6388 }
6389 }
6390 #[doc(hidden)]
6391 pub fn default_instance() -> &'static Self {
6392 static DEFAULT: super::FieldDescriptor = super::FieldDescriptor::const_default();
6393 &DEFAULT
6394 }
6395 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
6397 self.name.as_mut().map(|field| field as _)
6398 }
6399 pub fn name_mut(&mut self) -> &mut String {
6402 self.name.get_or_insert_default()
6403 }
6404 pub fn name_opt(&self) -> Option<&str> {
6406 self.name.as_ref().map(|field| field as _)
6407 }
6408 pub fn set_name<T: Into<String>>(&mut self, field: T) {
6410 self.name = Some(field.into().into());
6411 }
6412 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
6414 self.set_name(field.into());
6415 self
6416 }
6417 pub fn position_opt_mut(&mut self) -> Option<&mut u32> {
6419 self.position.as_mut().map(|field| field as _)
6420 }
6421 pub fn position_mut(&mut self) -> &mut u32 {
6424 self.position.get_or_insert_default()
6425 }
6426 pub fn position_opt(&self) -> Option<u32> {
6428 self.position.as_ref().map(|field| *field)
6429 }
6430 pub fn set_position(&mut self, field: u32) {
6432 self.position = Some(field);
6433 }
6434 pub fn with_position(mut self, field: u32) -> Self {
6436 self.set_position(field);
6437 self
6438 }
6439 pub fn r#type(&self) -> &super::OpenSignatureBody {
6441 self.r#type
6442 .as_ref()
6443 .map(|field| field as _)
6444 .unwrap_or_else(|| super::OpenSignatureBody::default_instance() as _)
6445 }
6446 pub fn type_opt_mut(&mut self) -> Option<&mut super::OpenSignatureBody> {
6448 self.r#type.as_mut().map(|field| field as _)
6449 }
6450 pub fn type_mut(&mut self) -> &mut super::OpenSignatureBody {
6453 self.r#type.get_or_insert_default()
6454 }
6455 pub fn type_opt(&self) -> Option<&super::OpenSignatureBody> {
6457 self.r#type.as_ref().map(|field| field as _)
6458 }
6459 pub fn set_type<T: Into<super::OpenSignatureBody>>(&mut self, field: T) {
6461 self.r#type = Some(field.into().into());
6462 }
6463 pub fn with_type<T: Into<super::OpenSignatureBody>>(mut self, field: T) -> Self {
6465 self.set_type(field.into());
6466 self
6467 }
6468 }
6469 impl super::FunctionDescriptor {
6470 pub const fn const_default() -> Self {
6471 Self {
6472 name: None,
6473 visibility: None,
6474 is_entry: None,
6475 type_parameters: Vec::new(),
6476 parameters: Vec::new(),
6477 returns: Vec::new(),
6478 }
6479 }
6480 #[doc(hidden)]
6481 pub fn default_instance() -> &'static Self {
6482 static DEFAULT: super::FunctionDescriptor = super::FunctionDescriptor::const_default();
6483 &DEFAULT
6484 }
6485 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
6487 self.name.as_mut().map(|field| field as _)
6488 }
6489 pub fn name_mut(&mut self) -> &mut String {
6492 self.name.get_or_insert_default()
6493 }
6494 pub fn name_opt(&self) -> Option<&str> {
6496 self.name.as_ref().map(|field| field as _)
6497 }
6498 pub fn set_name<T: Into<String>>(&mut self, field: T) {
6500 self.name = Some(field.into().into());
6501 }
6502 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
6504 self.set_name(field.into());
6505 self
6506 }
6507 pub fn with_visibility<T: Into<super::function_descriptor::Visibility>>(
6509 mut self,
6510 field: T,
6511 ) -> Self {
6512 self.set_visibility(field.into());
6513 self
6514 }
6515 pub fn is_entry_opt_mut(&mut self) -> Option<&mut bool> {
6517 self.is_entry.as_mut().map(|field| field as _)
6518 }
6519 pub fn is_entry_mut(&mut self) -> &mut bool {
6522 self.is_entry.get_or_insert_default()
6523 }
6524 pub fn is_entry_opt(&self) -> Option<bool> {
6526 self.is_entry.as_ref().map(|field| *field)
6527 }
6528 pub fn set_is_entry(&mut self, field: bool) {
6530 self.is_entry = Some(field);
6531 }
6532 pub fn with_is_entry(mut self, field: bool) -> Self {
6534 self.set_is_entry(field);
6535 self
6536 }
6537 pub fn type_parameters(&self) -> &[super::TypeParameter] {
6539 &self.type_parameters
6540 }
6541 pub fn type_parameters_mut(&mut self) -> &mut Vec<super::TypeParameter> {
6544 &mut self.type_parameters
6545 }
6546 pub fn set_type_parameters(&mut self, field: Vec<super::TypeParameter>) {
6548 self.type_parameters = field;
6549 }
6550 pub fn with_type_parameters(mut self, field: Vec<super::TypeParameter>) -> Self {
6552 self.set_type_parameters(field);
6553 self
6554 }
6555 pub fn parameters(&self) -> &[super::OpenSignature] {
6557 &self.parameters
6558 }
6559 pub fn parameters_mut(&mut self) -> &mut Vec<super::OpenSignature> {
6562 &mut self.parameters
6563 }
6564 pub fn set_parameters(&mut self, field: Vec<super::OpenSignature>) {
6566 self.parameters = field;
6567 }
6568 pub fn with_parameters(mut self, field: Vec<super::OpenSignature>) -> Self {
6570 self.set_parameters(field);
6571 self
6572 }
6573 pub fn returns(&self) -> &[super::OpenSignature] {
6575 &self.returns
6576 }
6577 pub fn returns_mut(&mut self) -> &mut Vec<super::OpenSignature> {
6580 &mut self.returns
6581 }
6582 pub fn set_returns(&mut self, field: Vec<super::OpenSignature>) {
6584 self.returns = field;
6585 }
6586 pub fn with_returns(mut self, field: Vec<super::OpenSignature>) -> Self {
6588 self.set_returns(field);
6589 self
6590 }
6591 }
6592 impl super::FundsWithdrawal {
6593 pub const fn const_default() -> Self {
6594 Self {
6595 amount: None,
6596 coin_type: None,
6597 source: None,
6598 }
6599 }
6600 #[doc(hidden)]
6601 pub fn default_instance() -> &'static Self {
6602 static DEFAULT: super::FundsWithdrawal = super::FundsWithdrawal::const_default();
6603 &DEFAULT
6604 }
6605 pub fn amount_opt_mut(&mut self) -> Option<&mut u64> {
6607 self.amount.as_mut().map(|field| field as _)
6608 }
6609 pub fn amount_mut(&mut self) -> &mut u64 {
6612 self.amount.get_or_insert_default()
6613 }
6614 pub fn amount_opt(&self) -> Option<u64> {
6616 self.amount.as_ref().map(|field| *field)
6617 }
6618 pub fn set_amount(&mut self, field: u64) {
6620 self.amount = Some(field);
6621 }
6622 pub fn with_amount(mut self, field: u64) -> Self {
6624 self.set_amount(field);
6625 self
6626 }
6627 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
6629 self.coin_type.as_mut().map(|field| field as _)
6630 }
6631 pub fn coin_type_mut(&mut self) -> &mut String {
6634 self.coin_type.get_or_insert_default()
6635 }
6636 pub fn coin_type_opt(&self) -> Option<&str> {
6638 self.coin_type.as_ref().map(|field| field as _)
6639 }
6640 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
6642 self.coin_type = Some(field.into().into());
6643 }
6644 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
6646 self.set_coin_type(field.into());
6647 self
6648 }
6649 pub fn with_source<T: Into<super::funds_withdrawal::Source>>(
6651 mut self,
6652 field: T,
6653 ) -> Self {
6654 self.set_source(field.into());
6655 self
6656 }
6657 }
6658 impl super::GasCostSummary {
6659 pub const fn const_default() -> Self {
6660 Self {
6661 computation_cost: None,
6662 storage_cost: None,
6663 storage_rebate: None,
6664 non_refundable_storage_fee: None,
6665 }
6666 }
6667 #[doc(hidden)]
6668 pub fn default_instance() -> &'static Self {
6669 static DEFAULT: super::GasCostSummary = super::GasCostSummary::const_default();
6670 &DEFAULT
6671 }
6672 pub fn computation_cost_opt_mut(&mut self) -> Option<&mut u64> {
6674 self.computation_cost.as_mut().map(|field| field as _)
6675 }
6676 pub fn computation_cost_mut(&mut self) -> &mut u64 {
6679 self.computation_cost.get_or_insert_default()
6680 }
6681 pub fn computation_cost_opt(&self) -> Option<u64> {
6683 self.computation_cost.as_ref().map(|field| *field)
6684 }
6685 pub fn set_computation_cost(&mut self, field: u64) {
6687 self.computation_cost = Some(field);
6688 }
6689 pub fn with_computation_cost(mut self, field: u64) -> Self {
6691 self.set_computation_cost(field);
6692 self
6693 }
6694 pub fn storage_cost_opt_mut(&mut self) -> Option<&mut u64> {
6696 self.storage_cost.as_mut().map(|field| field as _)
6697 }
6698 pub fn storage_cost_mut(&mut self) -> &mut u64 {
6701 self.storage_cost.get_or_insert_default()
6702 }
6703 pub fn storage_cost_opt(&self) -> Option<u64> {
6705 self.storage_cost.as_ref().map(|field| *field)
6706 }
6707 pub fn set_storage_cost(&mut self, field: u64) {
6709 self.storage_cost = Some(field);
6710 }
6711 pub fn with_storage_cost(mut self, field: u64) -> Self {
6713 self.set_storage_cost(field);
6714 self
6715 }
6716 pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
6718 self.storage_rebate.as_mut().map(|field| field as _)
6719 }
6720 pub fn storage_rebate_mut(&mut self) -> &mut u64 {
6723 self.storage_rebate.get_or_insert_default()
6724 }
6725 pub fn storage_rebate_opt(&self) -> Option<u64> {
6727 self.storage_rebate.as_ref().map(|field| *field)
6728 }
6729 pub fn set_storage_rebate(&mut self, field: u64) {
6731 self.storage_rebate = Some(field);
6732 }
6733 pub fn with_storage_rebate(mut self, field: u64) -> Self {
6735 self.set_storage_rebate(field);
6736 self
6737 }
6738 pub fn non_refundable_storage_fee_opt_mut(&mut self) -> Option<&mut u64> {
6740 self.non_refundable_storage_fee.as_mut().map(|field| field as _)
6741 }
6742 pub fn non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
6745 self.non_refundable_storage_fee.get_or_insert_default()
6746 }
6747 pub fn non_refundable_storage_fee_opt(&self) -> Option<u64> {
6749 self.non_refundable_storage_fee.as_ref().map(|field| *field)
6750 }
6751 pub fn set_non_refundable_storage_fee(&mut self, field: u64) {
6753 self.non_refundable_storage_fee = Some(field);
6754 }
6755 pub fn with_non_refundable_storage_fee(mut self, field: u64) -> Self {
6757 self.set_non_refundable_storage_fee(field);
6758 self
6759 }
6760 }
6761 impl super::GasPayment {
6762 pub const fn const_default() -> Self {
6763 Self {
6764 objects: Vec::new(),
6765 owner: None,
6766 price: None,
6767 budget: None,
6768 }
6769 }
6770 #[doc(hidden)]
6771 pub fn default_instance() -> &'static Self {
6772 static DEFAULT: super::GasPayment = super::GasPayment::const_default();
6773 &DEFAULT
6774 }
6775 pub fn objects(&self) -> &[super::ObjectReference] {
6777 &self.objects
6778 }
6779 pub fn objects_mut(&mut self) -> &mut Vec<super::ObjectReference> {
6782 &mut self.objects
6783 }
6784 pub fn set_objects(&mut self, field: Vec<super::ObjectReference>) {
6786 self.objects = field;
6787 }
6788 pub fn with_objects(mut self, field: Vec<super::ObjectReference>) -> Self {
6790 self.set_objects(field);
6791 self
6792 }
6793 pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
6795 self.owner.as_mut().map(|field| field as _)
6796 }
6797 pub fn owner_mut(&mut self) -> &mut String {
6800 self.owner.get_or_insert_default()
6801 }
6802 pub fn owner_opt(&self) -> Option<&str> {
6804 self.owner.as_ref().map(|field| field as _)
6805 }
6806 pub fn set_owner<T: Into<String>>(&mut self, field: T) {
6808 self.owner = Some(field.into().into());
6809 }
6810 pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
6812 self.set_owner(field.into());
6813 self
6814 }
6815 pub fn price_opt_mut(&mut self) -> Option<&mut u64> {
6817 self.price.as_mut().map(|field| field as _)
6818 }
6819 pub fn price_mut(&mut self) -> &mut u64 {
6822 self.price.get_or_insert_default()
6823 }
6824 pub fn price_opt(&self) -> Option<u64> {
6826 self.price.as_ref().map(|field| *field)
6827 }
6828 pub fn set_price(&mut self, field: u64) {
6830 self.price = Some(field);
6831 }
6832 pub fn with_price(mut self, field: u64) -> Self {
6834 self.set_price(field);
6835 self
6836 }
6837 pub fn budget_opt_mut(&mut self) -> Option<&mut u64> {
6839 self.budget.as_mut().map(|field| field as _)
6840 }
6841 pub fn budget_mut(&mut self) -> &mut u64 {
6844 self.budget.get_or_insert_default()
6845 }
6846 pub fn budget_opt(&self) -> Option<u64> {
6848 self.budget.as_ref().map(|field| *field)
6849 }
6850 pub fn set_budget(&mut self, field: u64) {
6852 self.budget = Some(field);
6853 }
6854 pub fn with_budget(mut self, field: u64) -> Self {
6856 self.set_budget(field);
6857 self
6858 }
6859 }
6860 impl super::GenesisTransaction {
6861 pub const fn const_default() -> Self {
6862 Self { objects: Vec::new() }
6863 }
6864 #[doc(hidden)]
6865 pub fn default_instance() -> &'static Self {
6866 static DEFAULT: super::GenesisTransaction = super::GenesisTransaction::const_default();
6867 &DEFAULT
6868 }
6869 pub fn objects(&self) -> &[super::Object] {
6871 &self.objects
6872 }
6873 pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
6876 &mut self.objects
6877 }
6878 pub fn set_objects(&mut self, field: Vec<super::Object>) {
6880 self.objects = field;
6881 }
6882 pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
6884 self.set_objects(field);
6885 self
6886 }
6887 }
6888 impl super::GetBalanceRequest {
6889 pub const fn const_default() -> Self {
6890 Self {
6891 owner: None,
6892 coin_type: None,
6893 }
6894 }
6895 #[doc(hidden)]
6896 pub fn default_instance() -> &'static Self {
6897 static DEFAULT: super::GetBalanceRequest = super::GetBalanceRequest::const_default();
6898 &DEFAULT
6899 }
6900 pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
6902 self.owner.as_mut().map(|field| field as _)
6903 }
6904 pub fn owner_mut(&mut self) -> &mut String {
6907 self.owner.get_or_insert_default()
6908 }
6909 pub fn owner_opt(&self) -> Option<&str> {
6911 self.owner.as_ref().map(|field| field as _)
6912 }
6913 pub fn set_owner<T: Into<String>>(&mut self, field: T) {
6915 self.owner = Some(field.into().into());
6916 }
6917 pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
6919 self.set_owner(field.into());
6920 self
6921 }
6922 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
6924 self.coin_type.as_mut().map(|field| field as _)
6925 }
6926 pub fn coin_type_mut(&mut self) -> &mut String {
6929 self.coin_type.get_or_insert_default()
6930 }
6931 pub fn coin_type_opt(&self) -> Option<&str> {
6933 self.coin_type.as_ref().map(|field| field as _)
6934 }
6935 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
6937 self.coin_type = Some(field.into().into());
6938 }
6939 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
6941 self.set_coin_type(field.into());
6942 self
6943 }
6944 }
6945 impl super::GetBalanceResponse {
6946 pub const fn const_default() -> Self {
6947 Self { balance: None }
6948 }
6949 #[doc(hidden)]
6950 pub fn default_instance() -> &'static Self {
6951 static DEFAULT: super::GetBalanceResponse = super::GetBalanceResponse::const_default();
6952 &DEFAULT
6953 }
6954 pub fn balance(&self) -> &super::Balance {
6956 self.balance
6957 .as_ref()
6958 .map(|field| field as _)
6959 .unwrap_or_else(|| super::Balance::default_instance() as _)
6960 }
6961 pub fn balance_opt_mut(&mut self) -> Option<&mut super::Balance> {
6963 self.balance.as_mut().map(|field| field as _)
6964 }
6965 pub fn balance_mut(&mut self) -> &mut super::Balance {
6968 self.balance.get_or_insert_default()
6969 }
6970 pub fn balance_opt(&self) -> Option<&super::Balance> {
6972 self.balance.as_ref().map(|field| field as _)
6973 }
6974 pub fn set_balance<T: Into<super::Balance>>(&mut self, field: T) {
6976 self.balance = Some(field.into().into());
6977 }
6978 pub fn with_balance<T: Into<super::Balance>>(mut self, field: T) -> Self {
6980 self.set_balance(field.into());
6981 self
6982 }
6983 }
6984 impl super::GetCheckpointRequest {
6985 pub const fn const_default() -> Self {
6986 Self {
6987 read_mask: None,
6988 checkpoint_id: None,
6989 }
6990 }
6991 #[doc(hidden)]
6992 pub fn default_instance() -> &'static Self {
6993 static DEFAULT: super::GetCheckpointRequest = super::GetCheckpointRequest::const_default();
6994 &DEFAULT
6995 }
6996 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
6998 self.read_mask.as_mut().map(|field| field as _)
6999 }
7000 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
7003 self.read_mask.get_or_insert_default()
7004 }
7005 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
7007 self.read_mask.as_ref().map(|field| field as _)
7008 }
7009 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
7011 self.read_mask = Some(field.into().into());
7012 }
7013 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
7015 mut self,
7016 field: T,
7017 ) -> Self {
7018 self.set_read_mask(field.into());
7019 self
7020 }
7021 pub fn sequence_number(&self) -> u64 {
7023 if let Some(
7024 super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
7025 ) = &self.checkpoint_id
7026 {
7027 *field
7028 } else {
7029 0u64
7030 }
7031 }
7032 pub fn sequence_number_opt(&self) -> Option<u64> {
7034 if let Some(
7035 super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
7036 ) = &self.checkpoint_id
7037 {
7038 Some(*field)
7039 } else {
7040 None
7041 }
7042 }
7043 pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
7045 if let Some(
7046 super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
7047 ) = &mut self.checkpoint_id
7048 {
7049 Some(field as _)
7050 } else {
7051 None
7052 }
7053 }
7054 pub fn sequence_number_mut(&mut self) -> &mut u64 {
7058 if self.sequence_number_opt_mut().is_none() {
7059 self.checkpoint_id = Some(
7060 super::get_checkpoint_request::CheckpointId::SequenceNumber(
7061 u64::default(),
7062 ),
7063 );
7064 }
7065 self.sequence_number_opt_mut().unwrap()
7066 }
7067 pub fn set_sequence_number(&mut self, field: u64) {
7070 self.checkpoint_id = Some(
7071 super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
7072 );
7073 }
7074 pub fn with_sequence_number(mut self, field: u64) -> Self {
7077 self.set_sequence_number(field);
7078 self
7079 }
7080 pub fn digest(&self) -> &str {
7082 if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &self
7083 .checkpoint_id
7084 {
7085 field as _
7086 } else {
7087 ""
7088 }
7089 }
7090 pub fn digest_opt(&self) -> Option<&str> {
7092 if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &self
7093 .checkpoint_id
7094 {
7095 Some(field as _)
7096 } else {
7097 None
7098 }
7099 }
7100 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
7102 if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &mut self
7103 .checkpoint_id
7104 {
7105 Some(field as _)
7106 } else {
7107 None
7108 }
7109 }
7110 pub fn digest_mut(&mut self) -> &mut String {
7114 if self.digest_opt_mut().is_none() {
7115 self.checkpoint_id = Some(
7116 super::get_checkpoint_request::CheckpointId::Digest(
7117 String::default(),
7118 ),
7119 );
7120 }
7121 self.digest_opt_mut().unwrap()
7122 }
7123 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
7126 self.checkpoint_id = Some(
7127 super::get_checkpoint_request::CheckpointId::Digest(field.into().into()),
7128 );
7129 }
7130 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
7133 self.set_digest(field.into());
7134 self
7135 }
7136 }
7137 impl super::GetCheckpointResponse {
7138 pub const fn const_default() -> Self {
7139 Self { checkpoint: None }
7140 }
7141 #[doc(hidden)]
7142 pub fn default_instance() -> &'static Self {
7143 static DEFAULT: super::GetCheckpointResponse = super::GetCheckpointResponse::const_default();
7144 &DEFAULT
7145 }
7146 pub fn checkpoint(&self) -> &super::Checkpoint {
7148 self.checkpoint
7149 .as_ref()
7150 .map(|field| field as _)
7151 .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
7152 }
7153 pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
7155 self.checkpoint.as_mut().map(|field| field as _)
7156 }
7157 pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
7160 self.checkpoint.get_or_insert_default()
7161 }
7162 pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
7164 self.checkpoint.as_ref().map(|field| field as _)
7165 }
7166 pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
7168 self.checkpoint = Some(field.into().into());
7169 }
7170 pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
7172 self.set_checkpoint(field.into());
7173 self
7174 }
7175 }
7176 impl super::GetCoinInfoRequest {
7177 pub const fn const_default() -> Self {
7178 Self { coin_type: None }
7179 }
7180 #[doc(hidden)]
7181 pub fn default_instance() -> &'static Self {
7182 static DEFAULT: super::GetCoinInfoRequest = super::GetCoinInfoRequest::const_default();
7183 &DEFAULT
7184 }
7185 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
7187 self.coin_type.as_mut().map(|field| field as _)
7188 }
7189 pub fn coin_type_mut(&mut self) -> &mut String {
7192 self.coin_type.get_or_insert_default()
7193 }
7194 pub fn coin_type_opt(&self) -> Option<&str> {
7196 self.coin_type.as_ref().map(|field| field as _)
7197 }
7198 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
7200 self.coin_type = Some(field.into().into());
7201 }
7202 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
7204 self.set_coin_type(field.into());
7205 self
7206 }
7207 }
7208 impl super::GetCoinInfoResponse {
7209 pub const fn const_default() -> Self {
7210 Self {
7211 coin_type: None,
7212 metadata: None,
7213 treasury: None,
7214 regulated_metadata: None,
7215 }
7216 }
7217 #[doc(hidden)]
7218 pub fn default_instance() -> &'static Self {
7219 static DEFAULT: super::GetCoinInfoResponse = super::GetCoinInfoResponse::const_default();
7220 &DEFAULT
7221 }
7222 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
7224 self.coin_type.as_mut().map(|field| field as _)
7225 }
7226 pub fn coin_type_mut(&mut self) -> &mut String {
7229 self.coin_type.get_or_insert_default()
7230 }
7231 pub fn coin_type_opt(&self) -> Option<&str> {
7233 self.coin_type.as_ref().map(|field| field as _)
7234 }
7235 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
7237 self.coin_type = Some(field.into().into());
7238 }
7239 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
7241 self.set_coin_type(field.into());
7242 self
7243 }
7244 pub fn metadata(&self) -> &super::CoinMetadata {
7246 self.metadata
7247 .as_ref()
7248 .map(|field| field as _)
7249 .unwrap_or_else(|| super::CoinMetadata::default_instance() as _)
7250 }
7251 pub fn metadata_opt_mut(&mut self) -> Option<&mut super::CoinMetadata> {
7253 self.metadata.as_mut().map(|field| field as _)
7254 }
7255 pub fn metadata_mut(&mut self) -> &mut super::CoinMetadata {
7258 self.metadata.get_or_insert_default()
7259 }
7260 pub fn metadata_opt(&self) -> Option<&super::CoinMetadata> {
7262 self.metadata.as_ref().map(|field| field as _)
7263 }
7264 pub fn set_metadata<T: Into<super::CoinMetadata>>(&mut self, field: T) {
7266 self.metadata = Some(field.into().into());
7267 }
7268 pub fn with_metadata<T: Into<super::CoinMetadata>>(mut self, field: T) -> Self {
7270 self.set_metadata(field.into());
7271 self
7272 }
7273 pub fn treasury(&self) -> &super::CoinTreasury {
7275 self.treasury
7276 .as_ref()
7277 .map(|field| field as _)
7278 .unwrap_or_else(|| super::CoinTreasury::default_instance() as _)
7279 }
7280 pub fn treasury_opt_mut(&mut self) -> Option<&mut super::CoinTreasury> {
7282 self.treasury.as_mut().map(|field| field as _)
7283 }
7284 pub fn treasury_mut(&mut self) -> &mut super::CoinTreasury {
7287 self.treasury.get_or_insert_default()
7288 }
7289 pub fn treasury_opt(&self) -> Option<&super::CoinTreasury> {
7291 self.treasury.as_ref().map(|field| field as _)
7292 }
7293 pub fn set_treasury<T: Into<super::CoinTreasury>>(&mut self, field: T) {
7295 self.treasury = Some(field.into().into());
7296 }
7297 pub fn with_treasury<T: Into<super::CoinTreasury>>(mut self, field: T) -> Self {
7299 self.set_treasury(field.into());
7300 self
7301 }
7302 pub fn regulated_metadata(&self) -> &super::RegulatedCoinMetadata {
7304 self.regulated_metadata
7305 .as_ref()
7306 .map(|field| field as _)
7307 .unwrap_or_else(|| super::RegulatedCoinMetadata::default_instance() as _)
7308 }
7309 pub fn regulated_metadata_opt_mut(
7311 &mut self,
7312 ) -> Option<&mut super::RegulatedCoinMetadata> {
7313 self.regulated_metadata.as_mut().map(|field| field as _)
7314 }
7315 pub fn regulated_metadata_mut(&mut self) -> &mut super::RegulatedCoinMetadata {
7318 self.regulated_metadata.get_or_insert_default()
7319 }
7320 pub fn regulated_metadata_opt(&self) -> Option<&super::RegulatedCoinMetadata> {
7322 self.regulated_metadata.as_ref().map(|field| field as _)
7323 }
7324 pub fn set_regulated_metadata<T: Into<super::RegulatedCoinMetadata>>(
7326 &mut self,
7327 field: T,
7328 ) {
7329 self.regulated_metadata = Some(field.into().into());
7330 }
7331 pub fn with_regulated_metadata<T: Into<super::RegulatedCoinMetadata>>(
7333 mut self,
7334 field: T,
7335 ) -> Self {
7336 self.set_regulated_metadata(field.into());
7337 self
7338 }
7339 }
7340 impl super::GetDatatypeRequest {
7341 pub const fn const_default() -> Self {
7342 Self {
7343 package_id: None,
7344 module_name: None,
7345 name: None,
7346 }
7347 }
7348 #[doc(hidden)]
7349 pub fn default_instance() -> &'static Self {
7350 static DEFAULT: super::GetDatatypeRequest = super::GetDatatypeRequest::const_default();
7351 &DEFAULT
7352 }
7353 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
7355 self.package_id.as_mut().map(|field| field as _)
7356 }
7357 pub fn package_id_mut(&mut self) -> &mut String {
7360 self.package_id.get_or_insert_default()
7361 }
7362 pub fn package_id_opt(&self) -> Option<&str> {
7364 self.package_id.as_ref().map(|field| field as _)
7365 }
7366 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
7368 self.package_id = Some(field.into().into());
7369 }
7370 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
7372 self.set_package_id(field.into());
7373 self
7374 }
7375 pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
7377 self.module_name.as_mut().map(|field| field as _)
7378 }
7379 pub fn module_name_mut(&mut self) -> &mut String {
7382 self.module_name.get_or_insert_default()
7383 }
7384 pub fn module_name_opt(&self) -> Option<&str> {
7386 self.module_name.as_ref().map(|field| field as _)
7387 }
7388 pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
7390 self.module_name = Some(field.into().into());
7391 }
7392 pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
7394 self.set_module_name(field.into());
7395 self
7396 }
7397 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
7399 self.name.as_mut().map(|field| field as _)
7400 }
7401 pub fn name_mut(&mut self) -> &mut String {
7404 self.name.get_or_insert_default()
7405 }
7406 pub fn name_opt(&self) -> Option<&str> {
7408 self.name.as_ref().map(|field| field as _)
7409 }
7410 pub fn set_name<T: Into<String>>(&mut self, field: T) {
7412 self.name = Some(field.into().into());
7413 }
7414 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
7416 self.set_name(field.into());
7417 self
7418 }
7419 }
7420 impl super::GetDatatypeResponse {
7421 pub const fn const_default() -> Self {
7422 Self { datatype: None }
7423 }
7424 #[doc(hidden)]
7425 pub fn default_instance() -> &'static Self {
7426 static DEFAULT: super::GetDatatypeResponse = super::GetDatatypeResponse::const_default();
7427 &DEFAULT
7428 }
7429 pub fn datatype(&self) -> &super::DatatypeDescriptor {
7431 self.datatype
7432 .as_ref()
7433 .map(|field| field as _)
7434 .unwrap_or_else(|| super::DatatypeDescriptor::default_instance() as _)
7435 }
7436 pub fn datatype_opt_mut(&mut self) -> Option<&mut super::DatatypeDescriptor> {
7438 self.datatype.as_mut().map(|field| field as _)
7439 }
7440 pub fn datatype_mut(&mut self) -> &mut super::DatatypeDescriptor {
7443 self.datatype.get_or_insert_default()
7444 }
7445 pub fn datatype_opt(&self) -> Option<&super::DatatypeDescriptor> {
7447 self.datatype.as_ref().map(|field| field as _)
7448 }
7449 pub fn set_datatype<T: Into<super::DatatypeDescriptor>>(&mut self, field: T) {
7451 self.datatype = Some(field.into().into());
7452 }
7453 pub fn with_datatype<T: Into<super::DatatypeDescriptor>>(
7455 mut self,
7456 field: T,
7457 ) -> Self {
7458 self.set_datatype(field.into());
7459 self
7460 }
7461 }
7462 impl super::GetEpochRequest {
7463 pub const fn const_default() -> Self {
7464 Self {
7465 epoch: None,
7466 read_mask: None,
7467 }
7468 }
7469 #[doc(hidden)]
7470 pub fn default_instance() -> &'static Self {
7471 static DEFAULT: super::GetEpochRequest = super::GetEpochRequest::const_default();
7472 &DEFAULT
7473 }
7474 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
7476 self.epoch.as_mut().map(|field| field as _)
7477 }
7478 pub fn epoch_mut(&mut self) -> &mut u64 {
7481 self.epoch.get_or_insert_default()
7482 }
7483 pub fn epoch_opt(&self) -> Option<u64> {
7485 self.epoch.as_ref().map(|field| *field)
7486 }
7487 pub fn set_epoch(&mut self, field: u64) {
7489 self.epoch = Some(field);
7490 }
7491 pub fn with_epoch(mut self, field: u64) -> Self {
7493 self.set_epoch(field);
7494 self
7495 }
7496 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
7498 self.read_mask.as_mut().map(|field| field as _)
7499 }
7500 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
7503 self.read_mask.get_or_insert_default()
7504 }
7505 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
7507 self.read_mask.as_ref().map(|field| field as _)
7508 }
7509 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
7511 self.read_mask = Some(field.into().into());
7512 }
7513 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
7515 mut self,
7516 field: T,
7517 ) -> Self {
7518 self.set_read_mask(field.into());
7519 self
7520 }
7521 }
7522 impl super::GetEpochResponse {
7523 pub const fn const_default() -> Self {
7524 Self { epoch: None }
7525 }
7526 #[doc(hidden)]
7527 pub fn default_instance() -> &'static Self {
7528 static DEFAULT: super::GetEpochResponse = super::GetEpochResponse::const_default();
7529 &DEFAULT
7530 }
7531 pub fn epoch(&self) -> &super::Epoch {
7533 self.epoch
7534 .as_ref()
7535 .map(|field| field as _)
7536 .unwrap_or_else(|| super::Epoch::default_instance() as _)
7537 }
7538 pub fn epoch_opt_mut(&mut self) -> Option<&mut super::Epoch> {
7540 self.epoch.as_mut().map(|field| field as _)
7541 }
7542 pub fn epoch_mut(&mut self) -> &mut super::Epoch {
7545 self.epoch.get_or_insert_default()
7546 }
7547 pub fn epoch_opt(&self) -> Option<&super::Epoch> {
7549 self.epoch.as_ref().map(|field| field as _)
7550 }
7551 pub fn set_epoch<T: Into<super::Epoch>>(&mut self, field: T) {
7553 self.epoch = Some(field.into().into());
7554 }
7555 pub fn with_epoch<T: Into<super::Epoch>>(mut self, field: T) -> Self {
7557 self.set_epoch(field.into());
7558 self
7559 }
7560 }
7561 impl super::GetFunctionRequest {
7562 pub const fn const_default() -> Self {
7563 Self {
7564 package_id: None,
7565 module_name: None,
7566 name: None,
7567 }
7568 }
7569 #[doc(hidden)]
7570 pub fn default_instance() -> &'static Self {
7571 static DEFAULT: super::GetFunctionRequest = super::GetFunctionRequest::const_default();
7572 &DEFAULT
7573 }
7574 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
7576 self.package_id.as_mut().map(|field| field as _)
7577 }
7578 pub fn package_id_mut(&mut self) -> &mut String {
7581 self.package_id.get_or_insert_default()
7582 }
7583 pub fn package_id_opt(&self) -> Option<&str> {
7585 self.package_id.as_ref().map(|field| field as _)
7586 }
7587 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
7589 self.package_id = Some(field.into().into());
7590 }
7591 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
7593 self.set_package_id(field.into());
7594 self
7595 }
7596 pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
7598 self.module_name.as_mut().map(|field| field as _)
7599 }
7600 pub fn module_name_mut(&mut self) -> &mut String {
7603 self.module_name.get_or_insert_default()
7604 }
7605 pub fn module_name_opt(&self) -> Option<&str> {
7607 self.module_name.as_ref().map(|field| field as _)
7608 }
7609 pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
7611 self.module_name = Some(field.into().into());
7612 }
7613 pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
7615 self.set_module_name(field.into());
7616 self
7617 }
7618 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
7620 self.name.as_mut().map(|field| field as _)
7621 }
7622 pub fn name_mut(&mut self) -> &mut String {
7625 self.name.get_or_insert_default()
7626 }
7627 pub fn name_opt(&self) -> Option<&str> {
7629 self.name.as_ref().map(|field| field as _)
7630 }
7631 pub fn set_name<T: Into<String>>(&mut self, field: T) {
7633 self.name = Some(field.into().into());
7634 }
7635 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
7637 self.set_name(field.into());
7638 self
7639 }
7640 }
7641 impl super::GetFunctionResponse {
7642 pub const fn const_default() -> Self {
7643 Self { function: None }
7644 }
7645 #[doc(hidden)]
7646 pub fn default_instance() -> &'static Self {
7647 static DEFAULT: super::GetFunctionResponse = super::GetFunctionResponse::const_default();
7648 &DEFAULT
7649 }
7650 pub fn function(&self) -> &super::FunctionDescriptor {
7652 self.function
7653 .as_ref()
7654 .map(|field| field as _)
7655 .unwrap_or_else(|| super::FunctionDescriptor::default_instance() as _)
7656 }
7657 pub fn function_opt_mut(&mut self) -> Option<&mut super::FunctionDescriptor> {
7659 self.function.as_mut().map(|field| field as _)
7660 }
7661 pub fn function_mut(&mut self) -> &mut super::FunctionDescriptor {
7664 self.function.get_or_insert_default()
7665 }
7666 pub fn function_opt(&self) -> Option<&super::FunctionDescriptor> {
7668 self.function.as_ref().map(|field| field as _)
7669 }
7670 pub fn set_function<T: Into<super::FunctionDescriptor>>(&mut self, field: T) {
7672 self.function = Some(field.into().into());
7673 }
7674 pub fn with_function<T: Into<super::FunctionDescriptor>>(
7676 mut self,
7677 field: T,
7678 ) -> Self {
7679 self.set_function(field.into());
7680 self
7681 }
7682 }
7683 impl super::GetObjectRequest {
7684 pub const fn const_default() -> Self {
7685 Self {
7686 object_id: None,
7687 version: None,
7688 read_mask: None,
7689 }
7690 }
7691 #[doc(hidden)]
7692 pub fn default_instance() -> &'static Self {
7693 static DEFAULT: super::GetObjectRequest = super::GetObjectRequest::const_default();
7694 &DEFAULT
7695 }
7696 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
7698 self.object_id.as_mut().map(|field| field as _)
7699 }
7700 pub fn object_id_mut(&mut self) -> &mut String {
7703 self.object_id.get_or_insert_default()
7704 }
7705 pub fn object_id_opt(&self) -> Option<&str> {
7707 self.object_id.as_ref().map(|field| field as _)
7708 }
7709 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
7711 self.object_id = Some(field.into().into());
7712 }
7713 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
7715 self.set_object_id(field.into());
7716 self
7717 }
7718 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
7720 self.version.as_mut().map(|field| field as _)
7721 }
7722 pub fn version_mut(&mut self) -> &mut u64 {
7725 self.version.get_or_insert_default()
7726 }
7727 pub fn version_opt(&self) -> Option<u64> {
7729 self.version.as_ref().map(|field| *field)
7730 }
7731 pub fn set_version(&mut self, field: u64) {
7733 self.version = Some(field);
7734 }
7735 pub fn with_version(mut self, field: u64) -> Self {
7737 self.set_version(field);
7738 self
7739 }
7740 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
7742 self.read_mask.as_mut().map(|field| field as _)
7743 }
7744 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
7747 self.read_mask.get_or_insert_default()
7748 }
7749 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
7751 self.read_mask.as_ref().map(|field| field as _)
7752 }
7753 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
7755 self.read_mask = Some(field.into().into());
7756 }
7757 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
7759 mut self,
7760 field: T,
7761 ) -> Self {
7762 self.set_read_mask(field.into());
7763 self
7764 }
7765 }
7766 impl super::GetObjectResponse {
7767 pub const fn const_default() -> Self {
7768 Self { object: None }
7769 }
7770 #[doc(hidden)]
7771 pub fn default_instance() -> &'static Self {
7772 static DEFAULT: super::GetObjectResponse = super::GetObjectResponse::const_default();
7773 &DEFAULT
7774 }
7775 pub fn object(&self) -> &super::Object {
7777 self.object
7778 .as_ref()
7779 .map(|field| field as _)
7780 .unwrap_or_else(|| super::Object::default_instance() as _)
7781 }
7782 pub fn object_opt_mut(&mut self) -> Option<&mut super::Object> {
7784 self.object.as_mut().map(|field| field as _)
7785 }
7786 pub fn object_mut(&mut self) -> &mut super::Object {
7789 self.object.get_or_insert_default()
7790 }
7791 pub fn object_opt(&self) -> Option<&super::Object> {
7793 self.object.as_ref().map(|field| field as _)
7794 }
7795 pub fn set_object<T: Into<super::Object>>(&mut self, field: T) {
7797 self.object = Some(field.into().into());
7798 }
7799 pub fn with_object<T: Into<super::Object>>(mut self, field: T) -> Self {
7801 self.set_object(field.into());
7802 self
7803 }
7804 }
7805 impl super::GetObjectResult {
7806 pub const fn const_default() -> Self {
7807 Self { result: None }
7808 }
7809 #[doc(hidden)]
7810 pub fn default_instance() -> &'static Self {
7811 static DEFAULT: super::GetObjectResult = super::GetObjectResult::const_default();
7812 &DEFAULT
7813 }
7814 pub fn object(&self) -> &super::Object {
7816 if let Some(super::get_object_result::Result::Object(field)) = &self.result {
7817 field as _
7818 } else {
7819 super::Object::default_instance() as _
7820 }
7821 }
7822 pub fn object_opt(&self) -> Option<&super::Object> {
7824 if let Some(super::get_object_result::Result::Object(field)) = &self.result {
7825 Some(field as _)
7826 } else {
7827 None
7828 }
7829 }
7830 pub fn object_opt_mut(&mut self) -> Option<&mut super::Object> {
7832 if let Some(super::get_object_result::Result::Object(field)) = &mut self
7833 .result
7834 {
7835 Some(field as _)
7836 } else {
7837 None
7838 }
7839 }
7840 pub fn object_mut(&mut self) -> &mut super::Object {
7844 if self.object_opt_mut().is_none() {
7845 self.result = Some(
7846 super::get_object_result::Result::Object(super::Object::default()),
7847 );
7848 }
7849 self.object_opt_mut().unwrap()
7850 }
7851 pub fn set_object<T: Into<super::Object>>(&mut self, field: T) {
7854 self.result = Some(
7855 super::get_object_result::Result::Object(field.into().into()),
7856 );
7857 }
7858 pub fn with_object<T: Into<super::Object>>(mut self, field: T) -> Self {
7861 self.set_object(field.into());
7862 self
7863 }
7864 pub fn error(&self) -> &super::super::super::super::google::rpc::Status {
7866 if let Some(super::get_object_result::Result::Error(field)) = &self.result {
7867 field as _
7868 } else {
7869 super::super::super::super::google::rpc::Status::default_instance() as _
7870 }
7871 }
7872 pub fn error_opt(
7874 &self,
7875 ) -> Option<&super::super::super::super::google::rpc::Status> {
7876 if let Some(super::get_object_result::Result::Error(field)) = &self.result {
7877 Some(field as _)
7878 } else {
7879 None
7880 }
7881 }
7882 pub fn error_opt_mut(
7884 &mut self,
7885 ) -> Option<&mut super::super::super::super::google::rpc::Status> {
7886 if let Some(super::get_object_result::Result::Error(field)) = &mut self
7887 .result
7888 {
7889 Some(field as _)
7890 } else {
7891 None
7892 }
7893 }
7894 pub fn error_mut(
7898 &mut self,
7899 ) -> &mut super::super::super::super::google::rpc::Status {
7900 if self.error_opt_mut().is_none() {
7901 self.result = Some(
7902 super::get_object_result::Result::Error(
7903 super::super::super::super::google::rpc::Status::default(),
7904 ),
7905 );
7906 }
7907 self.error_opt_mut().unwrap()
7908 }
7909 pub fn set_error<T: Into<super::super::super::super::google::rpc::Status>>(
7912 &mut self,
7913 field: T,
7914 ) {
7915 self.result = Some(
7916 super::get_object_result::Result::Error(field.into().into()),
7917 );
7918 }
7919 pub fn with_error<T: Into<super::super::super::super::google::rpc::Status>>(
7922 mut self,
7923 field: T,
7924 ) -> Self {
7925 self.set_error(field.into());
7926 self
7927 }
7928 }
7929 impl super::GetPackageRequest {
7930 pub const fn const_default() -> Self {
7931 Self { package_id: None }
7932 }
7933 #[doc(hidden)]
7934 pub fn default_instance() -> &'static Self {
7935 static DEFAULT: super::GetPackageRequest = super::GetPackageRequest::const_default();
7936 &DEFAULT
7937 }
7938 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
7940 self.package_id.as_mut().map(|field| field as _)
7941 }
7942 pub fn package_id_mut(&mut self) -> &mut String {
7945 self.package_id.get_or_insert_default()
7946 }
7947 pub fn package_id_opt(&self) -> Option<&str> {
7949 self.package_id.as_ref().map(|field| field as _)
7950 }
7951 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
7953 self.package_id = Some(field.into().into());
7954 }
7955 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
7957 self.set_package_id(field.into());
7958 self
7959 }
7960 }
7961 impl super::GetPackageResponse {
7962 pub const fn const_default() -> Self {
7963 Self { package: None }
7964 }
7965 #[doc(hidden)]
7966 pub fn default_instance() -> &'static Self {
7967 static DEFAULT: super::GetPackageResponse = super::GetPackageResponse::const_default();
7968 &DEFAULT
7969 }
7970 pub fn package(&self) -> &super::Package {
7972 self.package
7973 .as_ref()
7974 .map(|field| field as _)
7975 .unwrap_or_else(|| super::Package::default_instance() as _)
7976 }
7977 pub fn package_opt_mut(&mut self) -> Option<&mut super::Package> {
7979 self.package.as_mut().map(|field| field as _)
7980 }
7981 pub fn package_mut(&mut self) -> &mut super::Package {
7984 self.package.get_or_insert_default()
7985 }
7986 pub fn package_opt(&self) -> Option<&super::Package> {
7988 self.package.as_ref().map(|field| field as _)
7989 }
7990 pub fn set_package<T: Into<super::Package>>(&mut self, field: T) {
7992 self.package = Some(field.into().into());
7993 }
7994 pub fn with_package<T: Into<super::Package>>(mut self, field: T) -> Self {
7996 self.set_package(field.into());
7997 self
7998 }
7999 }
8000 impl super::GetServiceInfoRequest {
8001 pub const fn const_default() -> Self {
8002 Self {}
8003 }
8004 #[doc(hidden)]
8005 pub fn default_instance() -> &'static Self {
8006 static DEFAULT: super::GetServiceInfoRequest = super::GetServiceInfoRequest::const_default();
8007 &DEFAULT
8008 }
8009 }
8010 impl super::GetServiceInfoResponse {
8011 pub const fn const_default() -> Self {
8012 Self {
8013 chain_id: None,
8014 chain: None,
8015 epoch: None,
8016 checkpoint_height: None,
8017 timestamp: None,
8018 lowest_available_checkpoint: None,
8019 lowest_available_checkpoint_objects: None,
8020 server: None,
8021 }
8022 }
8023 #[doc(hidden)]
8024 pub fn default_instance() -> &'static Self {
8025 static DEFAULT: super::GetServiceInfoResponse = super::GetServiceInfoResponse::const_default();
8026 &DEFAULT
8027 }
8028 pub fn chain_id_opt_mut(&mut self) -> Option<&mut String> {
8030 self.chain_id.as_mut().map(|field| field as _)
8031 }
8032 pub fn chain_id_mut(&mut self) -> &mut String {
8035 self.chain_id.get_or_insert_default()
8036 }
8037 pub fn chain_id_opt(&self) -> Option<&str> {
8039 self.chain_id.as_ref().map(|field| field as _)
8040 }
8041 pub fn set_chain_id<T: Into<String>>(&mut self, field: T) {
8043 self.chain_id = Some(field.into().into());
8044 }
8045 pub fn with_chain_id<T: Into<String>>(mut self, field: T) -> Self {
8047 self.set_chain_id(field.into());
8048 self
8049 }
8050 pub fn chain_opt_mut(&mut self) -> Option<&mut String> {
8052 self.chain.as_mut().map(|field| field as _)
8053 }
8054 pub fn chain_mut(&mut self) -> &mut String {
8057 self.chain.get_or_insert_default()
8058 }
8059 pub fn chain_opt(&self) -> Option<&str> {
8061 self.chain.as_ref().map(|field| field as _)
8062 }
8063 pub fn set_chain<T: Into<String>>(&mut self, field: T) {
8065 self.chain = Some(field.into().into());
8066 }
8067 pub fn with_chain<T: Into<String>>(mut self, field: T) -> Self {
8069 self.set_chain(field.into());
8070 self
8071 }
8072 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
8074 self.epoch.as_mut().map(|field| field as _)
8075 }
8076 pub fn epoch_mut(&mut self) -> &mut u64 {
8079 self.epoch.get_or_insert_default()
8080 }
8081 pub fn epoch_opt(&self) -> Option<u64> {
8083 self.epoch.as_ref().map(|field| *field)
8084 }
8085 pub fn set_epoch(&mut self, field: u64) {
8087 self.epoch = Some(field);
8088 }
8089 pub fn with_epoch(mut self, field: u64) -> Self {
8091 self.set_epoch(field);
8092 self
8093 }
8094 pub fn checkpoint_height_opt_mut(&mut self) -> Option<&mut u64> {
8096 self.checkpoint_height.as_mut().map(|field| field as _)
8097 }
8098 pub fn checkpoint_height_mut(&mut self) -> &mut u64 {
8101 self.checkpoint_height.get_or_insert_default()
8102 }
8103 pub fn checkpoint_height_opt(&self) -> Option<u64> {
8105 self.checkpoint_height.as_ref().map(|field| *field)
8106 }
8107 pub fn set_checkpoint_height(&mut self, field: u64) {
8109 self.checkpoint_height = Some(field);
8110 }
8111 pub fn with_checkpoint_height(mut self, field: u64) -> Self {
8113 self.set_checkpoint_height(field);
8114 self
8115 }
8116 pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
8118 self.timestamp.as_mut().map(|field| field as _)
8119 }
8120 pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
8123 self.timestamp.get_or_insert_default()
8124 }
8125 pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
8127 self.timestamp.as_ref().map(|field| field as _)
8128 }
8129 pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
8131 self.timestamp = Some(field.into().into());
8132 }
8133 pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
8135 mut self,
8136 field: T,
8137 ) -> Self {
8138 self.set_timestamp(field.into());
8139 self
8140 }
8141 pub fn lowest_available_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
8143 self.lowest_available_checkpoint.as_mut().map(|field| field as _)
8144 }
8145 pub fn lowest_available_checkpoint_mut(&mut self) -> &mut u64 {
8148 self.lowest_available_checkpoint.get_or_insert_default()
8149 }
8150 pub fn lowest_available_checkpoint_opt(&self) -> Option<u64> {
8152 self.lowest_available_checkpoint.as_ref().map(|field| *field)
8153 }
8154 pub fn set_lowest_available_checkpoint(&mut self, field: u64) {
8156 self.lowest_available_checkpoint = Some(field);
8157 }
8158 pub fn with_lowest_available_checkpoint(mut self, field: u64) -> Self {
8160 self.set_lowest_available_checkpoint(field);
8161 self
8162 }
8163 pub fn lowest_available_checkpoint_objects_opt_mut(
8165 &mut self,
8166 ) -> Option<&mut u64> {
8167 self.lowest_available_checkpoint_objects.as_mut().map(|field| field as _)
8168 }
8169 pub fn lowest_available_checkpoint_objects_mut(&mut self) -> &mut u64 {
8172 self.lowest_available_checkpoint_objects.get_or_insert_default()
8173 }
8174 pub fn lowest_available_checkpoint_objects_opt(&self) -> Option<u64> {
8176 self.lowest_available_checkpoint_objects.as_ref().map(|field| *field)
8177 }
8178 pub fn set_lowest_available_checkpoint_objects(&mut self, field: u64) {
8180 self.lowest_available_checkpoint_objects = Some(field);
8181 }
8182 pub fn with_lowest_available_checkpoint_objects(mut self, field: u64) -> Self {
8184 self.set_lowest_available_checkpoint_objects(field);
8185 self
8186 }
8187 pub fn server_opt_mut(&mut self) -> Option<&mut String> {
8189 self.server.as_mut().map(|field| field as _)
8190 }
8191 pub fn server_mut(&mut self) -> &mut String {
8194 self.server.get_or_insert_default()
8195 }
8196 pub fn server_opt(&self) -> Option<&str> {
8198 self.server.as_ref().map(|field| field as _)
8199 }
8200 pub fn set_server<T: Into<String>>(&mut self, field: T) {
8202 self.server = Some(field.into().into());
8203 }
8204 pub fn with_server<T: Into<String>>(mut self, field: T) -> Self {
8206 self.set_server(field.into());
8207 self
8208 }
8209 }
8210 impl super::GetTransactionRequest {
8211 pub const fn const_default() -> Self {
8212 Self {
8213 digest: None,
8214 read_mask: None,
8215 }
8216 }
8217 #[doc(hidden)]
8218 pub fn default_instance() -> &'static Self {
8219 static DEFAULT: super::GetTransactionRequest = super::GetTransactionRequest::const_default();
8220 &DEFAULT
8221 }
8222 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
8224 self.digest.as_mut().map(|field| field as _)
8225 }
8226 pub fn digest_mut(&mut self) -> &mut String {
8229 self.digest.get_or_insert_default()
8230 }
8231 pub fn digest_opt(&self) -> Option<&str> {
8233 self.digest.as_ref().map(|field| field as _)
8234 }
8235 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
8237 self.digest = Some(field.into().into());
8238 }
8239 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
8241 self.set_digest(field.into());
8242 self
8243 }
8244 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
8246 self.read_mask.as_mut().map(|field| field as _)
8247 }
8248 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
8251 self.read_mask.get_or_insert_default()
8252 }
8253 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
8255 self.read_mask.as_ref().map(|field| field as _)
8256 }
8257 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
8259 self.read_mask = Some(field.into().into());
8260 }
8261 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
8263 mut self,
8264 field: T,
8265 ) -> Self {
8266 self.set_read_mask(field.into());
8267 self
8268 }
8269 }
8270 impl super::GetTransactionResponse {
8271 pub const fn const_default() -> Self {
8272 Self { transaction: None }
8273 }
8274 #[doc(hidden)]
8275 pub fn default_instance() -> &'static Self {
8276 static DEFAULT: super::GetTransactionResponse = super::GetTransactionResponse::const_default();
8277 &DEFAULT
8278 }
8279 pub fn transaction(&self) -> &super::ExecutedTransaction {
8281 self.transaction
8282 .as_ref()
8283 .map(|field| field as _)
8284 .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
8285 }
8286 pub fn transaction_opt_mut(
8288 &mut self,
8289 ) -> Option<&mut super::ExecutedTransaction> {
8290 self.transaction.as_mut().map(|field| field as _)
8291 }
8292 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
8295 self.transaction.get_or_insert_default()
8296 }
8297 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
8299 self.transaction.as_ref().map(|field| field as _)
8300 }
8301 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
8303 &mut self,
8304 field: T,
8305 ) {
8306 self.transaction = Some(field.into().into());
8307 }
8308 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
8310 mut self,
8311 field: T,
8312 ) -> Self {
8313 self.set_transaction(field.into());
8314 self
8315 }
8316 }
8317 impl super::GetTransactionResult {
8318 pub const fn const_default() -> Self {
8319 Self { result: None }
8320 }
8321 #[doc(hidden)]
8322 pub fn default_instance() -> &'static Self {
8323 static DEFAULT: super::GetTransactionResult = super::GetTransactionResult::const_default();
8324 &DEFAULT
8325 }
8326 pub fn transaction(&self) -> &super::ExecutedTransaction {
8328 if let Some(super::get_transaction_result::Result::Transaction(field)) = &self
8329 .result
8330 {
8331 field as _
8332 } else {
8333 super::ExecutedTransaction::default_instance() as _
8334 }
8335 }
8336 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
8338 if let Some(super::get_transaction_result::Result::Transaction(field)) = &self
8339 .result
8340 {
8341 Some(field as _)
8342 } else {
8343 None
8344 }
8345 }
8346 pub fn transaction_opt_mut(
8348 &mut self,
8349 ) -> Option<&mut super::ExecutedTransaction> {
8350 if let Some(super::get_transaction_result::Result::Transaction(field)) = &mut self
8351 .result
8352 {
8353 Some(field as _)
8354 } else {
8355 None
8356 }
8357 }
8358 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
8362 if self.transaction_opt_mut().is_none() {
8363 self.result = Some(
8364 super::get_transaction_result::Result::Transaction(
8365 super::ExecutedTransaction::default(),
8366 ),
8367 );
8368 }
8369 self.transaction_opt_mut().unwrap()
8370 }
8371 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
8374 &mut self,
8375 field: T,
8376 ) {
8377 self.result = Some(
8378 super::get_transaction_result::Result::Transaction(field.into().into()),
8379 );
8380 }
8381 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
8384 mut self,
8385 field: T,
8386 ) -> Self {
8387 self.set_transaction(field.into());
8388 self
8389 }
8390 pub fn error(&self) -> &super::super::super::super::google::rpc::Status {
8392 if let Some(super::get_transaction_result::Result::Error(field)) = &self
8393 .result
8394 {
8395 field as _
8396 } else {
8397 super::super::super::super::google::rpc::Status::default_instance() as _
8398 }
8399 }
8400 pub fn error_opt(
8402 &self,
8403 ) -> Option<&super::super::super::super::google::rpc::Status> {
8404 if let Some(super::get_transaction_result::Result::Error(field)) = &self
8405 .result
8406 {
8407 Some(field as _)
8408 } else {
8409 None
8410 }
8411 }
8412 pub fn error_opt_mut(
8414 &mut self,
8415 ) -> Option<&mut super::super::super::super::google::rpc::Status> {
8416 if let Some(super::get_transaction_result::Result::Error(field)) = &mut self
8417 .result
8418 {
8419 Some(field as _)
8420 } else {
8421 None
8422 }
8423 }
8424 pub fn error_mut(
8428 &mut self,
8429 ) -> &mut super::super::super::super::google::rpc::Status {
8430 if self.error_opt_mut().is_none() {
8431 self.result = Some(
8432 super::get_transaction_result::Result::Error(
8433 super::super::super::super::google::rpc::Status::default(),
8434 ),
8435 );
8436 }
8437 self.error_opt_mut().unwrap()
8438 }
8439 pub fn set_error<T: Into<super::super::super::super::google::rpc::Status>>(
8442 &mut self,
8443 field: T,
8444 ) {
8445 self.result = Some(
8446 super::get_transaction_result::Result::Error(field.into().into()),
8447 );
8448 }
8449 pub fn with_error<T: Into<super::super::super::super::google::rpc::Status>>(
8452 mut self,
8453 field: T,
8454 ) -> Self {
8455 self.set_error(field.into());
8456 self
8457 }
8458 }
8459 impl super::IndexError {
8460 pub const fn const_default() -> Self {
8461 Self {
8462 index: None,
8463 subresult: None,
8464 }
8465 }
8466 #[doc(hidden)]
8467 pub fn default_instance() -> &'static Self {
8468 static DEFAULT: super::IndexError = super::IndexError::const_default();
8469 &DEFAULT
8470 }
8471 pub fn index_opt_mut(&mut self) -> Option<&mut u32> {
8473 self.index.as_mut().map(|field| field as _)
8474 }
8475 pub fn index_mut(&mut self) -> &mut u32 {
8478 self.index.get_or_insert_default()
8479 }
8480 pub fn index_opt(&self) -> Option<u32> {
8482 self.index.as_ref().map(|field| *field)
8483 }
8484 pub fn set_index(&mut self, field: u32) {
8486 self.index = Some(field);
8487 }
8488 pub fn with_index(mut self, field: u32) -> Self {
8490 self.set_index(field);
8491 self
8492 }
8493 pub fn subresult_opt_mut(&mut self) -> Option<&mut u32> {
8495 self.subresult.as_mut().map(|field| field as _)
8496 }
8497 pub fn subresult_mut(&mut self) -> &mut u32 {
8500 self.subresult.get_or_insert_default()
8501 }
8502 pub fn subresult_opt(&self) -> Option<u32> {
8504 self.subresult.as_ref().map(|field| *field)
8505 }
8506 pub fn set_subresult(&mut self, field: u32) {
8508 self.subresult = Some(field);
8509 }
8510 pub fn with_subresult(mut self, field: u32) -> Self {
8512 self.set_subresult(field);
8513 self
8514 }
8515 }
8516 impl super::Input {
8517 pub const fn const_default() -> Self {
8518 Self {
8519 kind: None,
8520 pure: None,
8521 object_id: None,
8522 version: None,
8523 digest: None,
8524 mutable: None,
8525 mutability: None,
8526 funds_withdrawal: None,
8527 literal: None,
8528 }
8529 }
8530 #[doc(hidden)]
8531 pub fn default_instance() -> &'static Self {
8532 static DEFAULT: super::Input = super::Input::const_default();
8533 &DEFAULT
8534 }
8535 pub fn with_kind<T: Into<super::input::InputKind>>(mut self, field: T) -> Self {
8537 self.set_kind(field.into());
8538 self
8539 }
8540 pub fn pure_opt(&self) -> Option<&[u8]> {
8542 self.pure.as_ref().map(|field| field as _)
8543 }
8544 pub fn set_pure<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
8546 self.pure = Some(field.into().into());
8547 }
8548 pub fn with_pure<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
8550 self.set_pure(field.into());
8551 self
8552 }
8553 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
8555 self.object_id.as_mut().map(|field| field as _)
8556 }
8557 pub fn object_id_mut(&mut self) -> &mut String {
8560 self.object_id.get_or_insert_default()
8561 }
8562 pub fn object_id_opt(&self) -> Option<&str> {
8564 self.object_id.as_ref().map(|field| field as _)
8565 }
8566 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
8568 self.object_id = Some(field.into().into());
8569 }
8570 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
8572 self.set_object_id(field.into());
8573 self
8574 }
8575 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
8577 self.version.as_mut().map(|field| field as _)
8578 }
8579 pub fn version_mut(&mut self) -> &mut u64 {
8582 self.version.get_or_insert_default()
8583 }
8584 pub fn version_opt(&self) -> Option<u64> {
8586 self.version.as_ref().map(|field| *field)
8587 }
8588 pub fn set_version(&mut self, field: u64) {
8590 self.version = Some(field);
8591 }
8592 pub fn with_version(mut self, field: u64) -> Self {
8594 self.set_version(field);
8595 self
8596 }
8597 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
8599 self.digest.as_mut().map(|field| field as _)
8600 }
8601 pub fn digest_mut(&mut self) -> &mut String {
8604 self.digest.get_or_insert_default()
8605 }
8606 pub fn digest_opt(&self) -> Option<&str> {
8608 self.digest.as_ref().map(|field| field as _)
8609 }
8610 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
8612 self.digest = Some(field.into().into());
8613 }
8614 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
8616 self.set_digest(field.into());
8617 self
8618 }
8619 pub fn mutable_opt_mut(&mut self) -> Option<&mut bool> {
8621 self.mutable.as_mut().map(|field| field as _)
8622 }
8623 pub fn mutable_mut(&mut self) -> &mut bool {
8626 self.mutable.get_or_insert_default()
8627 }
8628 pub fn mutable_opt(&self) -> Option<bool> {
8630 self.mutable.as_ref().map(|field| *field)
8631 }
8632 pub fn set_mutable(&mut self, field: bool) {
8634 self.mutable = Some(field);
8635 }
8636 pub fn with_mutable(mut self, field: bool) -> Self {
8638 self.set_mutable(field);
8639 self
8640 }
8641 pub fn with_mutability<T: Into<super::input::Mutability>>(
8643 mut self,
8644 field: T,
8645 ) -> Self {
8646 self.set_mutability(field.into());
8647 self
8648 }
8649 pub fn funds_withdrawal(&self) -> &super::FundsWithdrawal {
8651 self.funds_withdrawal
8652 .as_ref()
8653 .map(|field| field as _)
8654 .unwrap_or_else(|| super::FundsWithdrawal::default_instance() as _)
8655 }
8656 pub fn funds_withdrawal_opt_mut(
8658 &mut self,
8659 ) -> Option<&mut super::FundsWithdrawal> {
8660 self.funds_withdrawal.as_mut().map(|field| field as _)
8661 }
8662 pub fn funds_withdrawal_mut(&mut self) -> &mut super::FundsWithdrawal {
8665 self.funds_withdrawal.get_or_insert_default()
8666 }
8667 pub fn funds_withdrawal_opt(&self) -> Option<&super::FundsWithdrawal> {
8669 self.funds_withdrawal.as_ref().map(|field| field as _)
8670 }
8671 pub fn set_funds_withdrawal<T: Into<super::FundsWithdrawal>>(
8673 &mut self,
8674 field: T,
8675 ) {
8676 self.funds_withdrawal = Some(field.into().into());
8677 }
8678 pub fn with_funds_withdrawal<T: Into<super::FundsWithdrawal>>(
8680 mut self,
8681 field: T,
8682 ) -> Self {
8683 self.set_funds_withdrawal(field.into());
8684 self
8685 }
8686 pub fn literal_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
8688 self.literal.as_mut().map(|field| field as _)
8689 }
8690 pub fn literal_mut(&mut self) -> &mut ::prost_types::Value {
8693 self.literal.get_or_insert_default()
8694 }
8695 pub fn literal_opt(&self) -> Option<&::prost_types::Value> {
8697 self.literal.as_ref().map(|field| field as _)
8698 }
8699 pub fn set_literal<T: Into<::prost_types::Value>>(&mut self, field: T) {
8701 self.literal = Some(field.into().into());
8702 }
8703 pub fn with_literal<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
8705 self.set_literal(field.into());
8706 self
8707 }
8708 }
8709 impl super::Jwk {
8710 pub const fn const_default() -> Self {
8711 Self {
8712 kty: None,
8713 e: None,
8714 n: None,
8715 alg: None,
8716 }
8717 }
8718 #[doc(hidden)]
8719 pub fn default_instance() -> &'static Self {
8720 static DEFAULT: super::Jwk = super::Jwk::const_default();
8721 &DEFAULT
8722 }
8723 pub fn kty_opt_mut(&mut self) -> Option<&mut String> {
8725 self.kty.as_mut().map(|field| field as _)
8726 }
8727 pub fn kty_mut(&mut self) -> &mut String {
8730 self.kty.get_or_insert_default()
8731 }
8732 pub fn kty_opt(&self) -> Option<&str> {
8734 self.kty.as_ref().map(|field| field as _)
8735 }
8736 pub fn set_kty<T: Into<String>>(&mut self, field: T) {
8738 self.kty = Some(field.into().into());
8739 }
8740 pub fn with_kty<T: Into<String>>(mut self, field: T) -> Self {
8742 self.set_kty(field.into());
8743 self
8744 }
8745 pub fn e_opt_mut(&mut self) -> Option<&mut String> {
8747 self.e.as_mut().map(|field| field as _)
8748 }
8749 pub fn e_mut(&mut self) -> &mut String {
8752 self.e.get_or_insert_default()
8753 }
8754 pub fn e_opt(&self) -> Option<&str> {
8756 self.e.as_ref().map(|field| field as _)
8757 }
8758 pub fn set_e<T: Into<String>>(&mut self, field: T) {
8760 self.e = Some(field.into().into());
8761 }
8762 pub fn with_e<T: Into<String>>(mut self, field: T) -> Self {
8764 self.set_e(field.into());
8765 self
8766 }
8767 pub fn n_opt_mut(&mut self) -> Option<&mut String> {
8769 self.n.as_mut().map(|field| field as _)
8770 }
8771 pub fn n_mut(&mut self) -> &mut String {
8774 self.n.get_or_insert_default()
8775 }
8776 pub fn n_opt(&self) -> Option<&str> {
8778 self.n.as_ref().map(|field| field as _)
8779 }
8780 pub fn set_n<T: Into<String>>(&mut self, field: T) {
8782 self.n = Some(field.into().into());
8783 }
8784 pub fn with_n<T: Into<String>>(mut self, field: T) -> Self {
8786 self.set_n(field.into());
8787 self
8788 }
8789 pub fn alg_opt_mut(&mut self) -> Option<&mut String> {
8791 self.alg.as_mut().map(|field| field as _)
8792 }
8793 pub fn alg_mut(&mut self) -> &mut String {
8796 self.alg.get_or_insert_default()
8797 }
8798 pub fn alg_opt(&self) -> Option<&str> {
8800 self.alg.as_ref().map(|field| field as _)
8801 }
8802 pub fn set_alg<T: Into<String>>(&mut self, field: T) {
8804 self.alg = Some(field.into().into());
8805 }
8806 pub fn with_alg<T: Into<String>>(mut self, field: T) -> Self {
8808 self.set_alg(field.into());
8809 self
8810 }
8811 }
8812 impl super::JwkId {
8813 pub const fn const_default() -> Self {
8814 Self { iss: None, kid: None }
8815 }
8816 #[doc(hidden)]
8817 pub fn default_instance() -> &'static Self {
8818 static DEFAULT: super::JwkId = super::JwkId::const_default();
8819 &DEFAULT
8820 }
8821 pub fn iss_opt_mut(&mut self) -> Option<&mut String> {
8823 self.iss.as_mut().map(|field| field as _)
8824 }
8825 pub fn iss_mut(&mut self) -> &mut String {
8828 self.iss.get_or_insert_default()
8829 }
8830 pub fn iss_opt(&self) -> Option<&str> {
8832 self.iss.as_ref().map(|field| field as _)
8833 }
8834 pub fn set_iss<T: Into<String>>(&mut self, field: T) {
8836 self.iss = Some(field.into().into());
8837 }
8838 pub fn with_iss<T: Into<String>>(mut self, field: T) -> Self {
8840 self.set_iss(field.into());
8841 self
8842 }
8843 pub fn kid_opt_mut(&mut self) -> Option<&mut String> {
8845 self.kid.as_mut().map(|field| field as _)
8846 }
8847 pub fn kid_mut(&mut self) -> &mut String {
8850 self.kid.get_or_insert_default()
8851 }
8852 pub fn kid_opt(&self) -> Option<&str> {
8854 self.kid.as_ref().map(|field| field as _)
8855 }
8856 pub fn set_kid<T: Into<String>>(&mut self, field: T) {
8858 self.kid = Some(field.into().into());
8859 }
8860 pub fn with_kid<T: Into<String>>(mut self, field: T) -> Self {
8862 self.set_kid(field.into());
8863 self
8864 }
8865 }
8866 impl super::Linkage {
8867 pub const fn const_default() -> Self {
8868 Self {
8869 original_id: None,
8870 upgraded_id: None,
8871 upgraded_version: None,
8872 }
8873 }
8874 #[doc(hidden)]
8875 pub fn default_instance() -> &'static Self {
8876 static DEFAULT: super::Linkage = super::Linkage::const_default();
8877 &DEFAULT
8878 }
8879 pub fn original_id_opt_mut(&mut self) -> Option<&mut String> {
8881 self.original_id.as_mut().map(|field| field as _)
8882 }
8883 pub fn original_id_mut(&mut self) -> &mut String {
8886 self.original_id.get_or_insert_default()
8887 }
8888 pub fn original_id_opt(&self) -> Option<&str> {
8890 self.original_id.as_ref().map(|field| field as _)
8891 }
8892 pub fn set_original_id<T: Into<String>>(&mut self, field: T) {
8894 self.original_id = Some(field.into().into());
8895 }
8896 pub fn with_original_id<T: Into<String>>(mut self, field: T) -> Self {
8898 self.set_original_id(field.into());
8899 self
8900 }
8901 pub fn upgraded_id_opt_mut(&mut self) -> Option<&mut String> {
8903 self.upgraded_id.as_mut().map(|field| field as _)
8904 }
8905 pub fn upgraded_id_mut(&mut self) -> &mut String {
8908 self.upgraded_id.get_or_insert_default()
8909 }
8910 pub fn upgraded_id_opt(&self) -> Option<&str> {
8912 self.upgraded_id.as_ref().map(|field| field as _)
8913 }
8914 pub fn set_upgraded_id<T: Into<String>>(&mut self, field: T) {
8916 self.upgraded_id = Some(field.into().into());
8917 }
8918 pub fn with_upgraded_id<T: Into<String>>(mut self, field: T) -> Self {
8920 self.set_upgraded_id(field.into());
8921 self
8922 }
8923 pub fn upgraded_version_opt_mut(&mut self) -> Option<&mut u64> {
8925 self.upgraded_version.as_mut().map(|field| field as _)
8926 }
8927 pub fn upgraded_version_mut(&mut self) -> &mut u64 {
8930 self.upgraded_version.get_or_insert_default()
8931 }
8932 pub fn upgraded_version_opt(&self) -> Option<u64> {
8934 self.upgraded_version.as_ref().map(|field| *field)
8935 }
8936 pub fn set_upgraded_version(&mut self, field: u64) {
8938 self.upgraded_version = Some(field);
8939 }
8940 pub fn with_upgraded_version(mut self, field: u64) -> Self {
8942 self.set_upgraded_version(field);
8943 self
8944 }
8945 }
8946 impl super::ListBalancesRequest {
8947 pub const fn const_default() -> Self {
8948 Self {
8949 owner: None,
8950 page_size: None,
8951 page_token: None,
8952 }
8953 }
8954 #[doc(hidden)]
8955 pub fn default_instance() -> &'static Self {
8956 static DEFAULT: super::ListBalancesRequest = super::ListBalancesRequest::const_default();
8957 &DEFAULT
8958 }
8959 pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
8961 self.owner.as_mut().map(|field| field as _)
8962 }
8963 pub fn owner_mut(&mut self) -> &mut String {
8966 self.owner.get_or_insert_default()
8967 }
8968 pub fn owner_opt(&self) -> Option<&str> {
8970 self.owner.as_ref().map(|field| field as _)
8971 }
8972 pub fn set_owner<T: Into<String>>(&mut self, field: T) {
8974 self.owner = Some(field.into().into());
8975 }
8976 pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
8978 self.set_owner(field.into());
8979 self
8980 }
8981 pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
8983 self.page_size.as_mut().map(|field| field as _)
8984 }
8985 pub fn page_size_mut(&mut self) -> &mut u32 {
8988 self.page_size.get_or_insert_default()
8989 }
8990 pub fn page_size_opt(&self) -> Option<u32> {
8992 self.page_size.as_ref().map(|field| *field)
8993 }
8994 pub fn set_page_size(&mut self, field: u32) {
8996 self.page_size = Some(field);
8997 }
8998 pub fn with_page_size(mut self, field: u32) -> Self {
9000 self.set_page_size(field);
9001 self
9002 }
9003 pub fn page_token_opt(&self) -> Option<&[u8]> {
9005 self.page_token.as_ref().map(|field| field as _)
9006 }
9007 pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9009 self.page_token = Some(field.into().into());
9010 }
9011 pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
9013 mut self,
9014 field: T,
9015 ) -> Self {
9016 self.set_page_token(field.into());
9017 self
9018 }
9019 }
9020 impl super::ListBalancesResponse {
9021 pub const fn const_default() -> Self {
9022 Self {
9023 balances: Vec::new(),
9024 next_page_token: None,
9025 }
9026 }
9027 #[doc(hidden)]
9028 pub fn default_instance() -> &'static Self {
9029 static DEFAULT: super::ListBalancesResponse = super::ListBalancesResponse::const_default();
9030 &DEFAULT
9031 }
9032 pub fn balances(&self) -> &[super::Balance] {
9034 &self.balances
9035 }
9036 pub fn balances_mut(&mut self) -> &mut Vec<super::Balance> {
9039 &mut self.balances
9040 }
9041 pub fn set_balances(&mut self, field: Vec<super::Balance>) {
9043 self.balances = field;
9044 }
9045 pub fn with_balances(mut self, field: Vec<super::Balance>) -> Self {
9047 self.set_balances(field);
9048 self
9049 }
9050 pub fn next_page_token_opt(&self) -> Option<&[u8]> {
9052 self.next_page_token.as_ref().map(|field| field as _)
9053 }
9054 pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9056 self.next_page_token = Some(field.into().into());
9057 }
9058 pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
9060 mut self,
9061 field: T,
9062 ) -> Self {
9063 self.set_next_page_token(field.into());
9064 self
9065 }
9066 }
9067 impl super::ListDynamicFieldsRequest {
9068 pub const fn const_default() -> Self {
9069 Self {
9070 parent: None,
9071 page_size: None,
9072 page_token: None,
9073 read_mask: None,
9074 }
9075 }
9076 #[doc(hidden)]
9077 pub fn default_instance() -> &'static Self {
9078 static DEFAULT: super::ListDynamicFieldsRequest = super::ListDynamicFieldsRequest::const_default();
9079 &DEFAULT
9080 }
9081 pub fn parent_opt_mut(&mut self) -> Option<&mut String> {
9083 self.parent.as_mut().map(|field| field as _)
9084 }
9085 pub fn parent_mut(&mut self) -> &mut String {
9088 self.parent.get_or_insert_default()
9089 }
9090 pub fn parent_opt(&self) -> Option<&str> {
9092 self.parent.as_ref().map(|field| field as _)
9093 }
9094 pub fn set_parent<T: Into<String>>(&mut self, field: T) {
9096 self.parent = Some(field.into().into());
9097 }
9098 pub fn with_parent<T: Into<String>>(mut self, field: T) -> Self {
9100 self.set_parent(field.into());
9101 self
9102 }
9103 pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
9105 self.page_size.as_mut().map(|field| field as _)
9106 }
9107 pub fn page_size_mut(&mut self) -> &mut u32 {
9110 self.page_size.get_or_insert_default()
9111 }
9112 pub fn page_size_opt(&self) -> Option<u32> {
9114 self.page_size.as_ref().map(|field| *field)
9115 }
9116 pub fn set_page_size(&mut self, field: u32) {
9118 self.page_size = Some(field);
9119 }
9120 pub fn with_page_size(mut self, field: u32) -> Self {
9122 self.set_page_size(field);
9123 self
9124 }
9125 pub fn page_token_opt(&self) -> Option<&[u8]> {
9127 self.page_token.as_ref().map(|field| field as _)
9128 }
9129 pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9131 self.page_token = Some(field.into().into());
9132 }
9133 pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
9135 mut self,
9136 field: T,
9137 ) -> Self {
9138 self.set_page_token(field.into());
9139 self
9140 }
9141 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
9143 self.read_mask.as_mut().map(|field| field as _)
9144 }
9145 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
9148 self.read_mask.get_or_insert_default()
9149 }
9150 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
9152 self.read_mask.as_ref().map(|field| field as _)
9153 }
9154 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
9156 self.read_mask = Some(field.into().into());
9157 }
9158 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
9160 mut self,
9161 field: T,
9162 ) -> Self {
9163 self.set_read_mask(field.into());
9164 self
9165 }
9166 }
9167 impl super::ListDynamicFieldsResponse {
9168 pub const fn const_default() -> Self {
9169 Self {
9170 dynamic_fields: Vec::new(),
9171 next_page_token: None,
9172 }
9173 }
9174 #[doc(hidden)]
9175 pub fn default_instance() -> &'static Self {
9176 static DEFAULT: super::ListDynamicFieldsResponse = super::ListDynamicFieldsResponse::const_default();
9177 &DEFAULT
9178 }
9179 pub fn dynamic_fields(&self) -> &[super::DynamicField] {
9181 &self.dynamic_fields
9182 }
9183 pub fn dynamic_fields_mut(&mut self) -> &mut Vec<super::DynamicField> {
9186 &mut self.dynamic_fields
9187 }
9188 pub fn set_dynamic_fields(&mut self, field: Vec<super::DynamicField>) {
9190 self.dynamic_fields = field;
9191 }
9192 pub fn with_dynamic_fields(mut self, field: Vec<super::DynamicField>) -> Self {
9194 self.set_dynamic_fields(field);
9195 self
9196 }
9197 pub fn next_page_token_opt(&self) -> Option<&[u8]> {
9199 self.next_page_token.as_ref().map(|field| field as _)
9200 }
9201 pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9203 self.next_page_token = Some(field.into().into());
9204 }
9205 pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
9207 mut self,
9208 field: T,
9209 ) -> Self {
9210 self.set_next_page_token(field.into());
9211 self
9212 }
9213 }
9214 impl super::ListOwnedObjectsRequest {
9215 pub const fn const_default() -> Self {
9216 Self {
9217 owner: None,
9218 page_size: None,
9219 page_token: None,
9220 read_mask: None,
9221 object_type: None,
9222 }
9223 }
9224 #[doc(hidden)]
9225 pub fn default_instance() -> &'static Self {
9226 static DEFAULT: super::ListOwnedObjectsRequest = super::ListOwnedObjectsRequest::const_default();
9227 &DEFAULT
9228 }
9229 pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
9231 self.owner.as_mut().map(|field| field as _)
9232 }
9233 pub fn owner_mut(&mut self) -> &mut String {
9236 self.owner.get_or_insert_default()
9237 }
9238 pub fn owner_opt(&self) -> Option<&str> {
9240 self.owner.as_ref().map(|field| field as _)
9241 }
9242 pub fn set_owner<T: Into<String>>(&mut self, field: T) {
9244 self.owner = Some(field.into().into());
9245 }
9246 pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
9248 self.set_owner(field.into());
9249 self
9250 }
9251 pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
9253 self.page_size.as_mut().map(|field| field as _)
9254 }
9255 pub fn page_size_mut(&mut self) -> &mut u32 {
9258 self.page_size.get_or_insert_default()
9259 }
9260 pub fn page_size_opt(&self) -> Option<u32> {
9262 self.page_size.as_ref().map(|field| *field)
9263 }
9264 pub fn set_page_size(&mut self, field: u32) {
9266 self.page_size = Some(field);
9267 }
9268 pub fn with_page_size(mut self, field: u32) -> Self {
9270 self.set_page_size(field);
9271 self
9272 }
9273 pub fn page_token_opt(&self) -> Option<&[u8]> {
9275 self.page_token.as_ref().map(|field| field as _)
9276 }
9277 pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9279 self.page_token = Some(field.into().into());
9280 }
9281 pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
9283 mut self,
9284 field: T,
9285 ) -> Self {
9286 self.set_page_token(field.into());
9287 self
9288 }
9289 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
9291 self.read_mask.as_mut().map(|field| field as _)
9292 }
9293 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
9296 self.read_mask.get_or_insert_default()
9297 }
9298 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
9300 self.read_mask.as_ref().map(|field| field as _)
9301 }
9302 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
9304 self.read_mask = Some(field.into().into());
9305 }
9306 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
9308 mut self,
9309 field: T,
9310 ) -> Self {
9311 self.set_read_mask(field.into());
9312 self
9313 }
9314 pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
9316 self.object_type.as_mut().map(|field| field as _)
9317 }
9318 pub fn object_type_mut(&mut self) -> &mut String {
9321 self.object_type.get_or_insert_default()
9322 }
9323 pub fn object_type_opt(&self) -> Option<&str> {
9325 self.object_type.as_ref().map(|field| field as _)
9326 }
9327 pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
9329 self.object_type = Some(field.into().into());
9330 }
9331 pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
9333 self.set_object_type(field.into());
9334 self
9335 }
9336 }
9337 impl super::ListOwnedObjectsResponse {
9338 pub const fn const_default() -> Self {
9339 Self {
9340 objects: Vec::new(),
9341 next_page_token: None,
9342 }
9343 }
9344 #[doc(hidden)]
9345 pub fn default_instance() -> &'static Self {
9346 static DEFAULT: super::ListOwnedObjectsResponse = super::ListOwnedObjectsResponse::const_default();
9347 &DEFAULT
9348 }
9349 pub fn objects(&self) -> &[super::Object] {
9351 &self.objects
9352 }
9353 pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
9356 &mut self.objects
9357 }
9358 pub fn set_objects(&mut self, field: Vec<super::Object>) {
9360 self.objects = field;
9361 }
9362 pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
9364 self.set_objects(field);
9365 self
9366 }
9367 pub fn next_page_token_opt(&self) -> Option<&[u8]> {
9369 self.next_page_token.as_ref().map(|field| field as _)
9370 }
9371 pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9373 self.next_page_token = Some(field.into().into());
9374 }
9375 pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
9377 mut self,
9378 field: T,
9379 ) -> Self {
9380 self.set_next_page_token(field.into());
9381 self
9382 }
9383 }
9384 impl super::ListPackageVersionsRequest {
9385 pub const fn const_default() -> Self {
9386 Self {
9387 package_id: None,
9388 page_size: None,
9389 page_token: None,
9390 }
9391 }
9392 #[doc(hidden)]
9393 pub fn default_instance() -> &'static Self {
9394 static DEFAULT: super::ListPackageVersionsRequest = super::ListPackageVersionsRequest::const_default();
9395 &DEFAULT
9396 }
9397 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
9399 self.package_id.as_mut().map(|field| field as _)
9400 }
9401 pub fn package_id_mut(&mut self) -> &mut String {
9404 self.package_id.get_or_insert_default()
9405 }
9406 pub fn package_id_opt(&self) -> Option<&str> {
9408 self.package_id.as_ref().map(|field| field as _)
9409 }
9410 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
9412 self.package_id = Some(field.into().into());
9413 }
9414 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
9416 self.set_package_id(field.into());
9417 self
9418 }
9419 pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
9421 self.page_size.as_mut().map(|field| field as _)
9422 }
9423 pub fn page_size_mut(&mut self) -> &mut u32 {
9426 self.page_size.get_or_insert_default()
9427 }
9428 pub fn page_size_opt(&self) -> Option<u32> {
9430 self.page_size.as_ref().map(|field| *field)
9431 }
9432 pub fn set_page_size(&mut self, field: u32) {
9434 self.page_size = Some(field);
9435 }
9436 pub fn with_page_size(mut self, field: u32) -> Self {
9438 self.set_page_size(field);
9439 self
9440 }
9441 pub fn page_token_opt(&self) -> Option<&[u8]> {
9443 self.page_token.as_ref().map(|field| field as _)
9444 }
9445 pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9447 self.page_token = Some(field.into().into());
9448 }
9449 pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
9451 mut self,
9452 field: T,
9453 ) -> Self {
9454 self.set_page_token(field.into());
9455 self
9456 }
9457 }
9458 impl super::ListPackageVersionsResponse {
9459 pub const fn const_default() -> Self {
9460 Self {
9461 versions: Vec::new(),
9462 next_page_token: None,
9463 }
9464 }
9465 #[doc(hidden)]
9466 pub fn default_instance() -> &'static Self {
9467 static DEFAULT: super::ListPackageVersionsResponse = super::ListPackageVersionsResponse::const_default();
9468 &DEFAULT
9469 }
9470 pub fn versions(&self) -> &[super::PackageVersion] {
9472 &self.versions
9473 }
9474 pub fn versions_mut(&mut self) -> &mut Vec<super::PackageVersion> {
9477 &mut self.versions
9478 }
9479 pub fn set_versions(&mut self, field: Vec<super::PackageVersion>) {
9481 self.versions = field;
9482 }
9483 pub fn with_versions(mut self, field: Vec<super::PackageVersion>) -> Self {
9485 self.set_versions(field);
9486 self
9487 }
9488 pub fn next_page_token_opt(&self) -> Option<&[u8]> {
9490 self.next_page_token.as_ref().map(|field| field as _)
9491 }
9492 pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9494 self.next_page_token = Some(field.into().into());
9495 }
9496 pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
9498 mut self,
9499 field: T,
9500 ) -> Self {
9501 self.set_next_page_token(field.into());
9502 self
9503 }
9504 }
9505 impl super::LookupNameRequest {
9506 pub const fn const_default() -> Self {
9507 Self { name: None }
9508 }
9509 #[doc(hidden)]
9510 pub fn default_instance() -> &'static Self {
9511 static DEFAULT: super::LookupNameRequest = super::LookupNameRequest::const_default();
9512 &DEFAULT
9513 }
9514 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
9516 self.name.as_mut().map(|field| field as _)
9517 }
9518 pub fn name_mut(&mut self) -> &mut String {
9521 self.name.get_or_insert_default()
9522 }
9523 pub fn name_opt(&self) -> Option<&str> {
9525 self.name.as_ref().map(|field| field as _)
9526 }
9527 pub fn set_name<T: Into<String>>(&mut self, field: T) {
9529 self.name = Some(field.into().into());
9530 }
9531 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
9533 self.set_name(field.into());
9534 self
9535 }
9536 }
9537 impl super::LookupNameResponse {
9538 pub const fn const_default() -> Self {
9539 Self { record: None }
9540 }
9541 #[doc(hidden)]
9542 pub fn default_instance() -> &'static Self {
9543 static DEFAULT: super::LookupNameResponse = super::LookupNameResponse::const_default();
9544 &DEFAULT
9545 }
9546 pub fn record(&self) -> &super::NameRecord {
9548 self.record
9549 .as_ref()
9550 .map(|field| field as _)
9551 .unwrap_or_else(|| super::NameRecord::default_instance() as _)
9552 }
9553 pub fn record_opt_mut(&mut self) -> Option<&mut super::NameRecord> {
9555 self.record.as_mut().map(|field| field as _)
9556 }
9557 pub fn record_mut(&mut self) -> &mut super::NameRecord {
9560 self.record.get_or_insert_default()
9561 }
9562 pub fn record_opt(&self) -> Option<&super::NameRecord> {
9564 self.record.as_ref().map(|field| field as _)
9565 }
9566 pub fn set_record<T: Into<super::NameRecord>>(&mut self, field: T) {
9568 self.record = Some(field.into().into());
9569 }
9570 pub fn with_record<T: Into<super::NameRecord>>(mut self, field: T) -> Self {
9572 self.set_record(field.into());
9573 self
9574 }
9575 }
9576 impl super::MakeMoveVector {
9577 pub const fn const_default() -> Self {
9578 Self {
9579 element_type: None,
9580 elements: Vec::new(),
9581 }
9582 }
9583 #[doc(hidden)]
9584 pub fn default_instance() -> &'static Self {
9585 static DEFAULT: super::MakeMoveVector = super::MakeMoveVector::const_default();
9586 &DEFAULT
9587 }
9588 pub fn element_type_opt_mut(&mut self) -> Option<&mut String> {
9590 self.element_type.as_mut().map(|field| field as _)
9591 }
9592 pub fn element_type_mut(&mut self) -> &mut String {
9595 self.element_type.get_or_insert_default()
9596 }
9597 pub fn element_type_opt(&self) -> Option<&str> {
9599 self.element_type.as_ref().map(|field| field as _)
9600 }
9601 pub fn set_element_type<T: Into<String>>(&mut self, field: T) {
9603 self.element_type = Some(field.into().into());
9604 }
9605 pub fn with_element_type<T: Into<String>>(mut self, field: T) -> Self {
9607 self.set_element_type(field.into());
9608 self
9609 }
9610 pub fn elements(&self) -> &[super::Argument] {
9612 &self.elements
9613 }
9614 pub fn elements_mut(&mut self) -> &mut Vec<super::Argument> {
9617 &mut self.elements
9618 }
9619 pub fn set_elements(&mut self, field: Vec<super::Argument>) {
9621 self.elements = field;
9622 }
9623 pub fn with_elements(mut self, field: Vec<super::Argument>) -> Self {
9625 self.set_elements(field);
9626 self
9627 }
9628 }
9629 impl super::MergeCoins {
9630 pub const fn const_default() -> Self {
9631 Self {
9632 coin: None,
9633 coins_to_merge: Vec::new(),
9634 }
9635 }
9636 #[doc(hidden)]
9637 pub fn default_instance() -> &'static Self {
9638 static DEFAULT: super::MergeCoins = super::MergeCoins::const_default();
9639 &DEFAULT
9640 }
9641 pub fn coin(&self) -> &super::Argument {
9643 self.coin
9644 .as_ref()
9645 .map(|field| field as _)
9646 .unwrap_or_else(|| super::Argument::default_instance() as _)
9647 }
9648 pub fn coin_opt_mut(&mut self) -> Option<&mut super::Argument> {
9650 self.coin.as_mut().map(|field| field as _)
9651 }
9652 pub fn coin_mut(&mut self) -> &mut super::Argument {
9655 self.coin.get_or_insert_default()
9656 }
9657 pub fn coin_opt(&self) -> Option<&super::Argument> {
9659 self.coin.as_ref().map(|field| field as _)
9660 }
9661 pub fn set_coin<T: Into<super::Argument>>(&mut self, field: T) {
9663 self.coin = Some(field.into().into());
9664 }
9665 pub fn with_coin<T: Into<super::Argument>>(mut self, field: T) -> Self {
9667 self.set_coin(field.into());
9668 self
9669 }
9670 pub fn coins_to_merge(&self) -> &[super::Argument] {
9672 &self.coins_to_merge
9673 }
9674 pub fn coins_to_merge_mut(&mut self) -> &mut Vec<super::Argument> {
9677 &mut self.coins_to_merge
9678 }
9679 pub fn set_coins_to_merge(&mut self, field: Vec<super::Argument>) {
9681 self.coins_to_merge = field;
9682 }
9683 pub fn with_coins_to_merge(mut self, field: Vec<super::Argument>) -> Self {
9685 self.set_coins_to_merge(field);
9686 self
9687 }
9688 }
9689 impl super::Module {
9690 pub const fn const_default() -> Self {
9691 Self {
9692 name: None,
9693 contents: None,
9694 datatypes: Vec::new(),
9695 functions: Vec::new(),
9696 }
9697 }
9698 #[doc(hidden)]
9699 pub fn default_instance() -> &'static Self {
9700 static DEFAULT: super::Module = super::Module::const_default();
9701 &DEFAULT
9702 }
9703 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
9705 self.name.as_mut().map(|field| field as _)
9706 }
9707 pub fn name_mut(&mut self) -> &mut String {
9710 self.name.get_or_insert_default()
9711 }
9712 pub fn name_opt(&self) -> Option<&str> {
9714 self.name.as_ref().map(|field| field as _)
9715 }
9716 pub fn set_name<T: Into<String>>(&mut self, field: T) {
9718 self.name = Some(field.into().into());
9719 }
9720 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
9722 self.set_name(field.into());
9723 self
9724 }
9725 pub fn contents_opt(&self) -> Option<&[u8]> {
9727 self.contents.as_ref().map(|field| field as _)
9728 }
9729 pub fn set_contents<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9731 self.contents = Some(field.into().into());
9732 }
9733 pub fn with_contents<T: Into<::prost::bytes::Bytes>>(
9735 mut self,
9736 field: T,
9737 ) -> Self {
9738 self.set_contents(field.into());
9739 self
9740 }
9741 pub fn datatypes(&self) -> &[super::DatatypeDescriptor] {
9743 &self.datatypes
9744 }
9745 pub fn datatypes_mut(&mut self) -> &mut Vec<super::DatatypeDescriptor> {
9748 &mut self.datatypes
9749 }
9750 pub fn set_datatypes(&mut self, field: Vec<super::DatatypeDescriptor>) {
9752 self.datatypes = field;
9753 }
9754 pub fn with_datatypes(mut self, field: Vec<super::DatatypeDescriptor>) -> Self {
9756 self.set_datatypes(field);
9757 self
9758 }
9759 pub fn functions(&self) -> &[super::FunctionDescriptor] {
9761 &self.functions
9762 }
9763 pub fn functions_mut(&mut self) -> &mut Vec<super::FunctionDescriptor> {
9766 &mut self.functions
9767 }
9768 pub fn set_functions(&mut self, field: Vec<super::FunctionDescriptor>) {
9770 self.functions = field;
9771 }
9772 pub fn with_functions(mut self, field: Vec<super::FunctionDescriptor>) -> Self {
9774 self.set_functions(field);
9775 self
9776 }
9777 }
9778 impl super::MoveAbort {
9779 pub const fn const_default() -> Self {
9780 Self {
9781 abort_code: None,
9782 location: None,
9783 clever_error: None,
9784 }
9785 }
9786 #[doc(hidden)]
9787 pub fn default_instance() -> &'static Self {
9788 static DEFAULT: super::MoveAbort = super::MoveAbort::const_default();
9789 &DEFAULT
9790 }
9791 pub fn abort_code_opt_mut(&mut self) -> Option<&mut u64> {
9793 self.abort_code.as_mut().map(|field| field as _)
9794 }
9795 pub fn abort_code_mut(&mut self) -> &mut u64 {
9798 self.abort_code.get_or_insert_default()
9799 }
9800 pub fn abort_code_opt(&self) -> Option<u64> {
9802 self.abort_code.as_ref().map(|field| *field)
9803 }
9804 pub fn set_abort_code(&mut self, field: u64) {
9806 self.abort_code = Some(field);
9807 }
9808 pub fn with_abort_code(mut self, field: u64) -> Self {
9810 self.set_abort_code(field);
9811 self
9812 }
9813 pub fn location(&self) -> &super::MoveLocation {
9815 self.location
9816 .as_ref()
9817 .map(|field| field as _)
9818 .unwrap_or_else(|| super::MoveLocation::default_instance() as _)
9819 }
9820 pub fn location_opt_mut(&mut self) -> Option<&mut super::MoveLocation> {
9822 self.location.as_mut().map(|field| field as _)
9823 }
9824 pub fn location_mut(&mut self) -> &mut super::MoveLocation {
9827 self.location.get_or_insert_default()
9828 }
9829 pub fn location_opt(&self) -> Option<&super::MoveLocation> {
9831 self.location.as_ref().map(|field| field as _)
9832 }
9833 pub fn set_location<T: Into<super::MoveLocation>>(&mut self, field: T) {
9835 self.location = Some(field.into().into());
9836 }
9837 pub fn with_location<T: Into<super::MoveLocation>>(mut self, field: T) -> Self {
9839 self.set_location(field.into());
9840 self
9841 }
9842 pub fn clever_error(&self) -> &super::CleverError {
9844 self.clever_error
9845 .as_ref()
9846 .map(|field| field as _)
9847 .unwrap_or_else(|| super::CleverError::default_instance() as _)
9848 }
9849 pub fn clever_error_opt_mut(&mut self) -> Option<&mut super::CleverError> {
9851 self.clever_error.as_mut().map(|field| field as _)
9852 }
9853 pub fn clever_error_mut(&mut self) -> &mut super::CleverError {
9856 self.clever_error.get_or_insert_default()
9857 }
9858 pub fn clever_error_opt(&self) -> Option<&super::CleverError> {
9860 self.clever_error.as_ref().map(|field| field as _)
9861 }
9862 pub fn set_clever_error<T: Into<super::CleverError>>(&mut self, field: T) {
9864 self.clever_error = Some(field.into().into());
9865 }
9866 pub fn with_clever_error<T: Into<super::CleverError>>(
9868 mut self,
9869 field: T,
9870 ) -> Self {
9871 self.set_clever_error(field.into());
9872 self
9873 }
9874 }
9875 impl super::MoveCall {
9876 pub const fn const_default() -> Self {
9877 Self {
9878 package: None,
9879 module: None,
9880 function: None,
9881 type_arguments: Vec::new(),
9882 arguments: Vec::new(),
9883 }
9884 }
9885 #[doc(hidden)]
9886 pub fn default_instance() -> &'static Self {
9887 static DEFAULT: super::MoveCall = super::MoveCall::const_default();
9888 &DEFAULT
9889 }
9890 pub fn package_opt_mut(&mut self) -> Option<&mut String> {
9892 self.package.as_mut().map(|field| field as _)
9893 }
9894 pub fn package_mut(&mut self) -> &mut String {
9897 self.package.get_or_insert_default()
9898 }
9899 pub fn package_opt(&self) -> Option<&str> {
9901 self.package.as_ref().map(|field| field as _)
9902 }
9903 pub fn set_package<T: Into<String>>(&mut self, field: T) {
9905 self.package = Some(field.into().into());
9906 }
9907 pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
9909 self.set_package(field.into());
9910 self
9911 }
9912 pub fn module_opt_mut(&mut self) -> Option<&mut String> {
9914 self.module.as_mut().map(|field| field as _)
9915 }
9916 pub fn module_mut(&mut self) -> &mut String {
9919 self.module.get_or_insert_default()
9920 }
9921 pub fn module_opt(&self) -> Option<&str> {
9923 self.module.as_ref().map(|field| field as _)
9924 }
9925 pub fn set_module<T: Into<String>>(&mut self, field: T) {
9927 self.module = Some(field.into().into());
9928 }
9929 pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
9931 self.set_module(field.into());
9932 self
9933 }
9934 pub fn function_opt_mut(&mut self) -> Option<&mut String> {
9936 self.function.as_mut().map(|field| field as _)
9937 }
9938 pub fn function_mut(&mut self) -> &mut String {
9941 self.function.get_or_insert_default()
9942 }
9943 pub fn function_opt(&self) -> Option<&str> {
9945 self.function.as_ref().map(|field| field as _)
9946 }
9947 pub fn set_function<T: Into<String>>(&mut self, field: T) {
9949 self.function = Some(field.into().into());
9950 }
9951 pub fn with_function<T: Into<String>>(mut self, field: T) -> Self {
9953 self.set_function(field.into());
9954 self
9955 }
9956 pub fn type_arguments(&self) -> &[String] {
9958 &self.type_arguments
9959 }
9960 pub fn type_arguments_mut(&mut self) -> &mut Vec<String> {
9963 &mut self.type_arguments
9964 }
9965 pub fn set_type_arguments(&mut self, field: Vec<String>) {
9967 self.type_arguments = field;
9968 }
9969 pub fn with_type_arguments(mut self, field: Vec<String>) -> Self {
9971 self.set_type_arguments(field);
9972 self
9973 }
9974 pub fn arguments(&self) -> &[super::Argument] {
9976 &self.arguments
9977 }
9978 pub fn arguments_mut(&mut self) -> &mut Vec<super::Argument> {
9981 &mut self.arguments
9982 }
9983 pub fn set_arguments(&mut self, field: Vec<super::Argument>) {
9985 self.arguments = field;
9986 }
9987 pub fn with_arguments(mut self, field: Vec<super::Argument>) -> Self {
9989 self.set_arguments(field);
9990 self
9991 }
9992 }
9993 impl super::MoveLocation {
9994 pub const fn const_default() -> Self {
9995 Self {
9996 package: None,
9997 module: None,
9998 function: None,
9999 instruction: None,
10000 function_name: None,
10001 }
10002 }
10003 #[doc(hidden)]
10004 pub fn default_instance() -> &'static Self {
10005 static DEFAULT: super::MoveLocation = super::MoveLocation::const_default();
10006 &DEFAULT
10007 }
10008 pub fn package_opt_mut(&mut self) -> Option<&mut String> {
10010 self.package.as_mut().map(|field| field as _)
10011 }
10012 pub fn package_mut(&mut self) -> &mut String {
10015 self.package.get_or_insert_default()
10016 }
10017 pub fn package_opt(&self) -> Option<&str> {
10019 self.package.as_ref().map(|field| field as _)
10020 }
10021 pub fn set_package<T: Into<String>>(&mut self, field: T) {
10023 self.package = Some(field.into().into());
10024 }
10025 pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
10027 self.set_package(field.into());
10028 self
10029 }
10030 pub fn module_opt_mut(&mut self) -> Option<&mut String> {
10032 self.module.as_mut().map(|field| field as _)
10033 }
10034 pub fn module_mut(&mut self) -> &mut String {
10037 self.module.get_or_insert_default()
10038 }
10039 pub fn module_opt(&self) -> Option<&str> {
10041 self.module.as_ref().map(|field| field as _)
10042 }
10043 pub fn set_module<T: Into<String>>(&mut self, field: T) {
10045 self.module = Some(field.into().into());
10046 }
10047 pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
10049 self.set_module(field.into());
10050 self
10051 }
10052 pub fn function_opt_mut(&mut self) -> Option<&mut u32> {
10054 self.function.as_mut().map(|field| field as _)
10055 }
10056 pub fn function_mut(&mut self) -> &mut u32 {
10059 self.function.get_or_insert_default()
10060 }
10061 pub fn function_opt(&self) -> Option<u32> {
10063 self.function.as_ref().map(|field| *field)
10064 }
10065 pub fn set_function(&mut self, field: u32) {
10067 self.function = Some(field);
10068 }
10069 pub fn with_function(mut self, field: u32) -> Self {
10071 self.set_function(field);
10072 self
10073 }
10074 pub fn instruction_opt_mut(&mut self) -> Option<&mut u32> {
10076 self.instruction.as_mut().map(|field| field as _)
10077 }
10078 pub fn instruction_mut(&mut self) -> &mut u32 {
10081 self.instruction.get_or_insert_default()
10082 }
10083 pub fn instruction_opt(&self) -> Option<u32> {
10085 self.instruction.as_ref().map(|field| *field)
10086 }
10087 pub fn set_instruction(&mut self, field: u32) {
10089 self.instruction = Some(field);
10090 }
10091 pub fn with_instruction(mut self, field: u32) -> Self {
10093 self.set_instruction(field);
10094 self
10095 }
10096 pub fn function_name_opt_mut(&mut self) -> Option<&mut String> {
10098 self.function_name.as_mut().map(|field| field as _)
10099 }
10100 pub fn function_name_mut(&mut self) -> &mut String {
10103 self.function_name.get_or_insert_default()
10104 }
10105 pub fn function_name_opt(&self) -> Option<&str> {
10107 self.function_name.as_ref().map(|field| field as _)
10108 }
10109 pub fn set_function_name<T: Into<String>>(&mut self, field: T) {
10111 self.function_name = Some(field.into().into());
10112 }
10113 pub fn with_function_name<T: Into<String>>(mut self, field: T) -> Self {
10115 self.set_function_name(field.into());
10116 self
10117 }
10118 }
10119 impl super::MoveTable {
10120 pub const fn const_default() -> Self {
10121 Self { id: None, size: None }
10122 }
10123 #[doc(hidden)]
10124 pub fn default_instance() -> &'static Self {
10125 static DEFAULT: super::MoveTable = super::MoveTable::const_default();
10126 &DEFAULT
10127 }
10128 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
10130 self.id.as_mut().map(|field| field as _)
10131 }
10132 pub fn id_mut(&mut self) -> &mut String {
10135 self.id.get_or_insert_default()
10136 }
10137 pub fn id_opt(&self) -> Option<&str> {
10139 self.id.as_ref().map(|field| field as _)
10140 }
10141 pub fn set_id<T: Into<String>>(&mut self, field: T) {
10143 self.id = Some(field.into().into());
10144 }
10145 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
10147 self.set_id(field.into());
10148 self
10149 }
10150 pub fn size_opt_mut(&mut self) -> Option<&mut u64> {
10152 self.size.as_mut().map(|field| field as _)
10153 }
10154 pub fn size_mut(&mut self) -> &mut u64 {
10157 self.size.get_or_insert_default()
10158 }
10159 pub fn size_opt(&self) -> Option<u64> {
10161 self.size.as_ref().map(|field| *field)
10162 }
10163 pub fn set_size(&mut self, field: u64) {
10165 self.size = Some(field);
10166 }
10167 pub fn with_size(mut self, field: u64) -> Self {
10169 self.set_size(field);
10170 self
10171 }
10172 }
10173 impl super::MultisigAggregatedSignature {
10174 pub const fn const_default() -> Self {
10175 Self {
10176 signatures: Vec::new(),
10177 bitmap: None,
10178 legacy_bitmap: None,
10179 committee: None,
10180 }
10181 }
10182 #[doc(hidden)]
10183 pub fn default_instance() -> &'static Self {
10184 static DEFAULT: super::MultisigAggregatedSignature = super::MultisigAggregatedSignature::const_default();
10185 &DEFAULT
10186 }
10187 pub fn signatures(&self) -> &[super::MultisigMemberSignature] {
10189 &self.signatures
10190 }
10191 pub fn signatures_mut(&mut self) -> &mut Vec<super::MultisigMemberSignature> {
10194 &mut self.signatures
10195 }
10196 pub fn set_signatures(&mut self, field: Vec<super::MultisigMemberSignature>) {
10198 self.signatures = field;
10199 }
10200 pub fn with_signatures(
10202 mut self,
10203 field: Vec<super::MultisigMemberSignature>,
10204 ) -> Self {
10205 self.set_signatures(field);
10206 self
10207 }
10208 pub fn bitmap_opt_mut(&mut self) -> Option<&mut u32> {
10210 self.bitmap.as_mut().map(|field| field as _)
10211 }
10212 pub fn bitmap_mut(&mut self) -> &mut u32 {
10215 self.bitmap.get_or_insert_default()
10216 }
10217 pub fn bitmap_opt(&self) -> Option<u32> {
10219 self.bitmap.as_ref().map(|field| *field)
10220 }
10221 pub fn set_bitmap(&mut self, field: u32) {
10223 self.bitmap = Some(field);
10224 }
10225 pub fn with_bitmap(mut self, field: u32) -> Self {
10227 self.set_bitmap(field);
10228 self
10229 }
10230 pub fn legacy_bitmap_opt(&self) -> Option<&[u8]> {
10232 self.legacy_bitmap.as_ref().map(|field| field as _)
10233 }
10234 pub fn set_legacy_bitmap<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10236 self.legacy_bitmap = Some(field.into().into());
10237 }
10238 pub fn with_legacy_bitmap<T: Into<::prost::bytes::Bytes>>(
10240 mut self,
10241 field: T,
10242 ) -> Self {
10243 self.set_legacy_bitmap(field.into());
10244 self
10245 }
10246 pub fn committee(&self) -> &super::MultisigCommittee {
10248 self.committee
10249 .as_ref()
10250 .map(|field| field as _)
10251 .unwrap_or_else(|| super::MultisigCommittee::default_instance() as _)
10252 }
10253 pub fn committee_opt_mut(&mut self) -> Option<&mut super::MultisigCommittee> {
10255 self.committee.as_mut().map(|field| field as _)
10256 }
10257 pub fn committee_mut(&mut self) -> &mut super::MultisigCommittee {
10260 self.committee.get_or_insert_default()
10261 }
10262 pub fn committee_opt(&self) -> Option<&super::MultisigCommittee> {
10264 self.committee.as_ref().map(|field| field as _)
10265 }
10266 pub fn set_committee<T: Into<super::MultisigCommittee>>(&mut self, field: T) {
10268 self.committee = Some(field.into().into());
10269 }
10270 pub fn with_committee<T: Into<super::MultisigCommittee>>(
10272 mut self,
10273 field: T,
10274 ) -> Self {
10275 self.set_committee(field.into());
10276 self
10277 }
10278 }
10279 impl super::MultisigCommittee {
10280 pub const fn const_default() -> Self {
10281 Self {
10282 members: Vec::new(),
10283 threshold: None,
10284 }
10285 }
10286 #[doc(hidden)]
10287 pub fn default_instance() -> &'static Self {
10288 static DEFAULT: super::MultisigCommittee = super::MultisigCommittee::const_default();
10289 &DEFAULT
10290 }
10291 pub fn members(&self) -> &[super::MultisigMember] {
10293 &self.members
10294 }
10295 pub fn members_mut(&mut self) -> &mut Vec<super::MultisigMember> {
10298 &mut self.members
10299 }
10300 pub fn set_members(&mut self, field: Vec<super::MultisigMember>) {
10302 self.members = field;
10303 }
10304 pub fn with_members(mut self, field: Vec<super::MultisigMember>) -> Self {
10306 self.set_members(field);
10307 self
10308 }
10309 pub fn threshold_opt_mut(&mut self) -> Option<&mut u32> {
10311 self.threshold.as_mut().map(|field| field as _)
10312 }
10313 pub fn threshold_mut(&mut self) -> &mut u32 {
10316 self.threshold.get_or_insert_default()
10317 }
10318 pub fn threshold_opt(&self) -> Option<u32> {
10320 self.threshold.as_ref().map(|field| *field)
10321 }
10322 pub fn set_threshold(&mut self, field: u32) {
10324 self.threshold = Some(field);
10325 }
10326 pub fn with_threshold(mut self, field: u32) -> Self {
10328 self.set_threshold(field);
10329 self
10330 }
10331 }
10332 impl super::MultisigMember {
10333 pub const fn const_default() -> Self {
10334 Self {
10335 public_key: None,
10336 weight: None,
10337 }
10338 }
10339 #[doc(hidden)]
10340 pub fn default_instance() -> &'static Self {
10341 static DEFAULT: super::MultisigMember = super::MultisigMember::const_default();
10342 &DEFAULT
10343 }
10344 pub fn public_key(&self) -> &super::MultisigMemberPublicKey {
10346 self.public_key
10347 .as_ref()
10348 .map(|field| field as _)
10349 .unwrap_or_else(|| {
10350 super::MultisigMemberPublicKey::default_instance() as _
10351 })
10352 }
10353 pub fn public_key_opt_mut(
10355 &mut self,
10356 ) -> Option<&mut super::MultisigMemberPublicKey> {
10357 self.public_key.as_mut().map(|field| field as _)
10358 }
10359 pub fn public_key_mut(&mut self) -> &mut super::MultisigMemberPublicKey {
10362 self.public_key.get_or_insert_default()
10363 }
10364 pub fn public_key_opt(&self) -> Option<&super::MultisigMemberPublicKey> {
10366 self.public_key.as_ref().map(|field| field as _)
10367 }
10368 pub fn set_public_key<T: Into<super::MultisigMemberPublicKey>>(
10370 &mut self,
10371 field: T,
10372 ) {
10373 self.public_key = Some(field.into().into());
10374 }
10375 pub fn with_public_key<T: Into<super::MultisigMemberPublicKey>>(
10377 mut self,
10378 field: T,
10379 ) -> Self {
10380 self.set_public_key(field.into());
10381 self
10382 }
10383 pub fn weight_opt_mut(&mut self) -> Option<&mut u32> {
10385 self.weight.as_mut().map(|field| field as _)
10386 }
10387 pub fn weight_mut(&mut self) -> &mut u32 {
10390 self.weight.get_or_insert_default()
10391 }
10392 pub fn weight_opt(&self) -> Option<u32> {
10394 self.weight.as_ref().map(|field| *field)
10395 }
10396 pub fn set_weight(&mut self, field: u32) {
10398 self.weight = Some(field);
10399 }
10400 pub fn with_weight(mut self, field: u32) -> Self {
10402 self.set_weight(field);
10403 self
10404 }
10405 }
10406 impl super::MultisigMemberPublicKey {
10407 pub const fn const_default() -> Self {
10408 Self {
10409 scheme: None,
10410 public_key: None,
10411 zklogin: None,
10412 }
10413 }
10414 #[doc(hidden)]
10415 pub fn default_instance() -> &'static Self {
10416 static DEFAULT: super::MultisigMemberPublicKey = super::MultisigMemberPublicKey::const_default();
10417 &DEFAULT
10418 }
10419 pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
10421 self.set_scheme(field.into());
10422 self
10423 }
10424 pub fn public_key_opt(&self) -> Option<&[u8]> {
10426 self.public_key.as_ref().map(|field| field as _)
10427 }
10428 pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10430 self.public_key = Some(field.into().into());
10431 }
10432 pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
10434 mut self,
10435 field: T,
10436 ) -> Self {
10437 self.set_public_key(field.into());
10438 self
10439 }
10440 pub fn zklogin(&self) -> &super::ZkLoginPublicIdentifier {
10442 self.zklogin
10443 .as_ref()
10444 .map(|field| field as _)
10445 .unwrap_or_else(|| {
10446 super::ZkLoginPublicIdentifier::default_instance() as _
10447 })
10448 }
10449 pub fn zklogin_opt_mut(
10451 &mut self,
10452 ) -> Option<&mut super::ZkLoginPublicIdentifier> {
10453 self.zklogin.as_mut().map(|field| field as _)
10454 }
10455 pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginPublicIdentifier {
10458 self.zklogin.get_or_insert_default()
10459 }
10460 pub fn zklogin_opt(&self) -> Option<&super::ZkLoginPublicIdentifier> {
10462 self.zklogin.as_ref().map(|field| field as _)
10463 }
10464 pub fn set_zklogin<T: Into<super::ZkLoginPublicIdentifier>>(
10466 &mut self,
10467 field: T,
10468 ) {
10469 self.zklogin = Some(field.into().into());
10470 }
10471 pub fn with_zklogin<T: Into<super::ZkLoginPublicIdentifier>>(
10473 mut self,
10474 field: T,
10475 ) -> Self {
10476 self.set_zklogin(field.into());
10477 self
10478 }
10479 }
10480 impl super::MultisigMemberSignature {
10481 pub const fn const_default() -> Self {
10482 Self {
10483 scheme: None,
10484 signature: None,
10485 zklogin: None,
10486 passkey: None,
10487 }
10488 }
10489 #[doc(hidden)]
10490 pub fn default_instance() -> &'static Self {
10491 static DEFAULT: super::MultisigMemberSignature = super::MultisigMemberSignature::const_default();
10492 &DEFAULT
10493 }
10494 pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
10496 self.set_scheme(field.into());
10497 self
10498 }
10499 pub fn signature_opt(&self) -> Option<&[u8]> {
10501 self.signature.as_ref().map(|field| field as _)
10502 }
10503 pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10505 self.signature = Some(field.into().into());
10506 }
10507 pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
10509 mut self,
10510 field: T,
10511 ) -> Self {
10512 self.set_signature(field.into());
10513 self
10514 }
10515 pub fn zklogin(&self) -> &super::ZkLoginAuthenticator {
10517 self.zklogin
10518 .as_ref()
10519 .map(|field| field as _)
10520 .unwrap_or_else(|| super::ZkLoginAuthenticator::default_instance() as _)
10521 }
10522 pub fn zklogin_opt_mut(&mut self) -> Option<&mut super::ZkLoginAuthenticator> {
10524 self.zklogin.as_mut().map(|field| field as _)
10525 }
10526 pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginAuthenticator {
10529 self.zklogin.get_or_insert_default()
10530 }
10531 pub fn zklogin_opt(&self) -> Option<&super::ZkLoginAuthenticator> {
10533 self.zklogin.as_ref().map(|field| field as _)
10534 }
10535 pub fn set_zklogin<T: Into<super::ZkLoginAuthenticator>>(&mut self, field: T) {
10537 self.zklogin = Some(field.into().into());
10538 }
10539 pub fn with_zklogin<T: Into<super::ZkLoginAuthenticator>>(
10541 mut self,
10542 field: T,
10543 ) -> Self {
10544 self.set_zklogin(field.into());
10545 self
10546 }
10547 pub fn passkey(&self) -> &super::PasskeyAuthenticator {
10549 self.passkey
10550 .as_ref()
10551 .map(|field| field as _)
10552 .unwrap_or_else(|| super::PasskeyAuthenticator::default_instance() as _)
10553 }
10554 pub fn passkey_opt_mut(&mut self) -> Option<&mut super::PasskeyAuthenticator> {
10556 self.passkey.as_mut().map(|field| field as _)
10557 }
10558 pub fn passkey_mut(&mut self) -> &mut super::PasskeyAuthenticator {
10561 self.passkey.get_or_insert_default()
10562 }
10563 pub fn passkey_opt(&self) -> Option<&super::PasskeyAuthenticator> {
10565 self.passkey.as_ref().map(|field| field as _)
10566 }
10567 pub fn set_passkey<T: Into<super::PasskeyAuthenticator>>(&mut self, field: T) {
10569 self.passkey = Some(field.into().into());
10570 }
10571 pub fn with_passkey<T: Into<super::PasskeyAuthenticator>>(
10573 mut self,
10574 field: T,
10575 ) -> Self {
10576 self.set_passkey(field.into());
10577 self
10578 }
10579 }
10580 impl super::NameRecord {
10581 pub const fn const_default() -> Self {
10582 Self {
10583 id: None,
10584 name: None,
10585 registration_nft_id: None,
10586 expiration_timestamp: None,
10587 target_address: None,
10588 data: std::collections::BTreeMap::new(),
10589 }
10590 }
10591 #[doc(hidden)]
10592 pub fn default_instance() -> &'static Self {
10593 static DEFAULT: super::NameRecord = super::NameRecord::const_default();
10594 &DEFAULT
10595 }
10596 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
10598 self.id.as_mut().map(|field| field as _)
10599 }
10600 pub fn id_mut(&mut self) -> &mut String {
10603 self.id.get_or_insert_default()
10604 }
10605 pub fn id_opt(&self) -> Option<&str> {
10607 self.id.as_ref().map(|field| field as _)
10608 }
10609 pub fn set_id<T: Into<String>>(&mut self, field: T) {
10611 self.id = Some(field.into().into());
10612 }
10613 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
10615 self.set_id(field.into());
10616 self
10617 }
10618 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
10620 self.name.as_mut().map(|field| field as _)
10621 }
10622 pub fn name_mut(&mut self) -> &mut String {
10625 self.name.get_or_insert_default()
10626 }
10627 pub fn name_opt(&self) -> Option<&str> {
10629 self.name.as_ref().map(|field| field as _)
10630 }
10631 pub fn set_name<T: Into<String>>(&mut self, field: T) {
10633 self.name = Some(field.into().into());
10634 }
10635 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
10637 self.set_name(field.into());
10638 self
10639 }
10640 pub fn registration_nft_id_opt_mut(&mut self) -> Option<&mut String> {
10642 self.registration_nft_id.as_mut().map(|field| field as _)
10643 }
10644 pub fn registration_nft_id_mut(&mut self) -> &mut String {
10647 self.registration_nft_id.get_or_insert_default()
10648 }
10649 pub fn registration_nft_id_opt(&self) -> Option<&str> {
10651 self.registration_nft_id.as_ref().map(|field| field as _)
10652 }
10653 pub fn set_registration_nft_id<T: Into<String>>(&mut self, field: T) {
10655 self.registration_nft_id = Some(field.into().into());
10656 }
10657 pub fn with_registration_nft_id<T: Into<String>>(mut self, field: T) -> Self {
10659 self.set_registration_nft_id(field.into());
10660 self
10661 }
10662 pub fn expiration_timestamp_opt_mut(
10664 &mut self,
10665 ) -> Option<&mut ::prost_types::Timestamp> {
10666 self.expiration_timestamp.as_mut().map(|field| field as _)
10667 }
10668 pub fn expiration_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
10671 self.expiration_timestamp.get_or_insert_default()
10672 }
10673 pub fn expiration_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
10675 self.expiration_timestamp.as_ref().map(|field| field as _)
10676 }
10677 pub fn set_expiration_timestamp<T: Into<::prost_types::Timestamp>>(
10679 &mut self,
10680 field: T,
10681 ) {
10682 self.expiration_timestamp = Some(field.into().into());
10683 }
10684 pub fn with_expiration_timestamp<T: Into<::prost_types::Timestamp>>(
10686 mut self,
10687 field: T,
10688 ) -> Self {
10689 self.set_expiration_timestamp(field.into());
10690 self
10691 }
10692 pub fn target_address_opt_mut(&mut self) -> Option<&mut String> {
10694 self.target_address.as_mut().map(|field| field as _)
10695 }
10696 pub fn target_address_mut(&mut self) -> &mut String {
10699 self.target_address.get_or_insert_default()
10700 }
10701 pub fn target_address_opt(&self) -> Option<&str> {
10703 self.target_address.as_ref().map(|field| field as _)
10704 }
10705 pub fn set_target_address<T: Into<String>>(&mut self, field: T) {
10707 self.target_address = Some(field.into().into());
10708 }
10709 pub fn with_target_address<T: Into<String>>(mut self, field: T) -> Self {
10711 self.set_target_address(field.into());
10712 self
10713 }
10714 pub fn data(&self) -> &::std::collections::BTreeMap<String, String> {
10716 &self.data
10717 }
10718 pub fn data_mut(&mut self) -> &mut ::std::collections::BTreeMap<String, String> {
10721 &mut self.data
10722 }
10723 pub fn set_data(&mut self, field: ::std::collections::BTreeMap<String, String>) {
10725 self.data = field;
10726 }
10727 pub fn with_data(
10729 mut self,
10730 field: ::std::collections::BTreeMap<String, String>,
10731 ) -> Self {
10732 self.set_data(field);
10733 self
10734 }
10735 }
10736 impl super::Object {
10737 pub const fn const_default() -> Self {
10738 Self {
10739 bcs: None,
10740 object_id: None,
10741 version: None,
10742 digest: None,
10743 owner: None,
10744 object_type: None,
10745 has_public_transfer: None,
10746 contents: None,
10747 package: None,
10748 previous_transaction: None,
10749 storage_rebate: None,
10750 json: None,
10751 balance: None,
10752 }
10753 }
10754 #[doc(hidden)]
10755 pub fn default_instance() -> &'static Self {
10756 static DEFAULT: super::Object = super::Object::const_default();
10757 &DEFAULT
10758 }
10759 pub fn bcs(&self) -> &super::Bcs {
10761 self.bcs
10762 .as_ref()
10763 .map(|field| field as _)
10764 .unwrap_or_else(|| super::Bcs::default_instance() as _)
10765 }
10766 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
10768 self.bcs.as_mut().map(|field| field as _)
10769 }
10770 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
10773 self.bcs.get_or_insert_default()
10774 }
10775 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
10777 self.bcs.as_ref().map(|field| field as _)
10778 }
10779 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
10781 self.bcs = Some(field.into().into());
10782 }
10783 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
10785 self.set_bcs(field.into());
10786 self
10787 }
10788 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
10790 self.object_id.as_mut().map(|field| field as _)
10791 }
10792 pub fn object_id_mut(&mut self) -> &mut String {
10795 self.object_id.get_or_insert_default()
10796 }
10797 pub fn object_id_opt(&self) -> Option<&str> {
10799 self.object_id.as_ref().map(|field| field as _)
10800 }
10801 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
10803 self.object_id = Some(field.into().into());
10804 }
10805 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
10807 self.set_object_id(field.into());
10808 self
10809 }
10810 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
10812 self.version.as_mut().map(|field| field as _)
10813 }
10814 pub fn version_mut(&mut self) -> &mut u64 {
10817 self.version.get_or_insert_default()
10818 }
10819 pub fn version_opt(&self) -> Option<u64> {
10821 self.version.as_ref().map(|field| *field)
10822 }
10823 pub fn set_version(&mut self, field: u64) {
10825 self.version = Some(field);
10826 }
10827 pub fn with_version(mut self, field: u64) -> Self {
10829 self.set_version(field);
10830 self
10831 }
10832 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
10834 self.digest.as_mut().map(|field| field as _)
10835 }
10836 pub fn digest_mut(&mut self) -> &mut String {
10839 self.digest.get_or_insert_default()
10840 }
10841 pub fn digest_opt(&self) -> Option<&str> {
10843 self.digest.as_ref().map(|field| field as _)
10844 }
10845 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
10847 self.digest = Some(field.into().into());
10848 }
10849 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
10851 self.set_digest(field.into());
10852 self
10853 }
10854 pub fn owner(&self) -> &super::Owner {
10856 self.owner
10857 .as_ref()
10858 .map(|field| field as _)
10859 .unwrap_or_else(|| super::Owner::default_instance() as _)
10860 }
10861 pub fn owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
10863 self.owner.as_mut().map(|field| field as _)
10864 }
10865 pub fn owner_mut(&mut self) -> &mut super::Owner {
10868 self.owner.get_or_insert_default()
10869 }
10870 pub fn owner_opt(&self) -> Option<&super::Owner> {
10872 self.owner.as_ref().map(|field| field as _)
10873 }
10874 pub fn set_owner<T: Into<super::Owner>>(&mut self, field: T) {
10876 self.owner = Some(field.into().into());
10877 }
10878 pub fn with_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
10880 self.set_owner(field.into());
10881 self
10882 }
10883 pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
10885 self.object_type.as_mut().map(|field| field as _)
10886 }
10887 pub fn object_type_mut(&mut self) -> &mut String {
10890 self.object_type.get_or_insert_default()
10891 }
10892 pub fn object_type_opt(&self) -> Option<&str> {
10894 self.object_type.as_ref().map(|field| field as _)
10895 }
10896 pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
10898 self.object_type = Some(field.into().into());
10899 }
10900 pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
10902 self.set_object_type(field.into());
10903 self
10904 }
10905 pub fn has_public_transfer_opt_mut(&mut self) -> Option<&mut bool> {
10907 self.has_public_transfer.as_mut().map(|field| field as _)
10908 }
10909 pub fn has_public_transfer_mut(&mut self) -> &mut bool {
10912 self.has_public_transfer.get_or_insert_default()
10913 }
10914 pub fn has_public_transfer_opt(&self) -> Option<bool> {
10916 self.has_public_transfer.as_ref().map(|field| *field)
10917 }
10918 pub fn set_has_public_transfer(&mut self, field: bool) {
10920 self.has_public_transfer = Some(field);
10921 }
10922 pub fn with_has_public_transfer(mut self, field: bool) -> Self {
10924 self.set_has_public_transfer(field);
10925 self
10926 }
10927 pub fn contents(&self) -> &super::Bcs {
10929 self.contents
10930 .as_ref()
10931 .map(|field| field as _)
10932 .unwrap_or_else(|| super::Bcs::default_instance() as _)
10933 }
10934 pub fn contents_opt_mut(&mut self) -> Option<&mut super::Bcs> {
10936 self.contents.as_mut().map(|field| field as _)
10937 }
10938 pub fn contents_mut(&mut self) -> &mut super::Bcs {
10941 self.contents.get_or_insert_default()
10942 }
10943 pub fn contents_opt(&self) -> Option<&super::Bcs> {
10945 self.contents.as_ref().map(|field| field as _)
10946 }
10947 pub fn set_contents<T: Into<super::Bcs>>(&mut self, field: T) {
10949 self.contents = Some(field.into().into());
10950 }
10951 pub fn with_contents<T: Into<super::Bcs>>(mut self, field: T) -> Self {
10953 self.set_contents(field.into());
10954 self
10955 }
10956 pub fn package(&self) -> &super::Package {
10958 self.package
10959 .as_ref()
10960 .map(|field| field as _)
10961 .unwrap_or_else(|| super::Package::default_instance() as _)
10962 }
10963 pub fn package_opt_mut(&mut self) -> Option<&mut super::Package> {
10965 self.package.as_mut().map(|field| field as _)
10966 }
10967 pub fn package_mut(&mut self) -> &mut super::Package {
10970 self.package.get_or_insert_default()
10971 }
10972 pub fn package_opt(&self) -> Option<&super::Package> {
10974 self.package.as_ref().map(|field| field as _)
10975 }
10976 pub fn set_package<T: Into<super::Package>>(&mut self, field: T) {
10978 self.package = Some(field.into().into());
10979 }
10980 pub fn with_package<T: Into<super::Package>>(mut self, field: T) -> Self {
10982 self.set_package(field.into());
10983 self
10984 }
10985 pub fn previous_transaction_opt_mut(&mut self) -> Option<&mut String> {
10987 self.previous_transaction.as_mut().map(|field| field as _)
10988 }
10989 pub fn previous_transaction_mut(&mut self) -> &mut String {
10992 self.previous_transaction.get_or_insert_default()
10993 }
10994 pub fn previous_transaction_opt(&self) -> Option<&str> {
10996 self.previous_transaction.as_ref().map(|field| field as _)
10997 }
10998 pub fn set_previous_transaction<T: Into<String>>(&mut self, field: T) {
11000 self.previous_transaction = Some(field.into().into());
11001 }
11002 pub fn with_previous_transaction<T: Into<String>>(mut self, field: T) -> Self {
11004 self.set_previous_transaction(field.into());
11005 self
11006 }
11007 pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
11009 self.storage_rebate.as_mut().map(|field| field as _)
11010 }
11011 pub fn storage_rebate_mut(&mut self) -> &mut u64 {
11014 self.storage_rebate.get_or_insert_default()
11015 }
11016 pub fn storage_rebate_opt(&self) -> Option<u64> {
11018 self.storage_rebate.as_ref().map(|field| *field)
11019 }
11020 pub fn set_storage_rebate(&mut self, field: u64) {
11022 self.storage_rebate = Some(field);
11023 }
11024 pub fn with_storage_rebate(mut self, field: u64) -> Self {
11026 self.set_storage_rebate(field);
11027 self
11028 }
11029 pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
11031 self.json.as_mut().map(|field| field as _)
11032 }
11033 pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
11036 self.json.get_or_insert_default()
11037 }
11038 pub fn json_opt(&self) -> Option<&::prost_types::Value> {
11040 self.json.as_ref().map(|field| field as _)
11041 }
11042 pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
11044 self.json = Some(field.into().into());
11045 }
11046 pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
11048 self.set_json(field.into());
11049 self
11050 }
11051 pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
11053 self.balance.as_mut().map(|field| field as _)
11054 }
11055 pub fn balance_mut(&mut self) -> &mut u64 {
11058 self.balance.get_or_insert_default()
11059 }
11060 pub fn balance_opt(&self) -> Option<u64> {
11062 self.balance.as_ref().map(|field| *field)
11063 }
11064 pub fn set_balance(&mut self, field: u64) {
11066 self.balance = Some(field);
11067 }
11068 pub fn with_balance(mut self, field: u64) -> Self {
11070 self.set_balance(field);
11071 self
11072 }
11073 }
11074 impl super::ObjectReference {
11075 pub const fn const_default() -> Self {
11076 Self {
11077 object_id: None,
11078 version: None,
11079 digest: None,
11080 }
11081 }
11082 #[doc(hidden)]
11083 pub fn default_instance() -> &'static Self {
11084 static DEFAULT: super::ObjectReference = super::ObjectReference::const_default();
11085 &DEFAULT
11086 }
11087 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
11089 self.object_id.as_mut().map(|field| field as _)
11090 }
11091 pub fn object_id_mut(&mut self) -> &mut String {
11094 self.object_id.get_or_insert_default()
11095 }
11096 pub fn object_id_opt(&self) -> Option<&str> {
11098 self.object_id.as_ref().map(|field| field as _)
11099 }
11100 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
11102 self.object_id = Some(field.into().into());
11103 }
11104 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
11106 self.set_object_id(field.into());
11107 self
11108 }
11109 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
11111 self.version.as_mut().map(|field| field as _)
11112 }
11113 pub fn version_mut(&mut self) -> &mut u64 {
11116 self.version.get_or_insert_default()
11117 }
11118 pub fn version_opt(&self) -> Option<u64> {
11120 self.version.as_ref().map(|field| *field)
11121 }
11122 pub fn set_version(&mut self, field: u64) {
11124 self.version = Some(field);
11125 }
11126 pub fn with_version(mut self, field: u64) -> Self {
11128 self.set_version(field);
11129 self
11130 }
11131 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
11133 self.digest.as_mut().map(|field| field as _)
11134 }
11135 pub fn digest_mut(&mut self) -> &mut String {
11138 self.digest.get_or_insert_default()
11139 }
11140 pub fn digest_opt(&self) -> Option<&str> {
11142 self.digest.as_ref().map(|field| field as _)
11143 }
11144 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
11146 self.digest = Some(field.into().into());
11147 }
11148 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
11150 self.set_digest(field.into());
11151 self
11152 }
11153 }
11154 impl super::ObjectSet {
11155 pub const fn const_default() -> Self {
11156 Self { objects: Vec::new() }
11157 }
11158 #[doc(hidden)]
11159 pub fn default_instance() -> &'static Self {
11160 static DEFAULT: super::ObjectSet = super::ObjectSet::const_default();
11161 &DEFAULT
11162 }
11163 pub fn objects(&self) -> &[super::Object] {
11165 &self.objects
11166 }
11167 pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
11170 &mut self.objects
11171 }
11172 pub fn set_objects(&mut self, field: Vec<super::Object>) {
11174 self.objects = field;
11175 }
11176 pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
11178 self.set_objects(field);
11179 self
11180 }
11181 }
11182 impl super::OpenSignature {
11183 pub const fn const_default() -> Self {
11184 Self {
11185 reference: None,
11186 body: None,
11187 }
11188 }
11189 #[doc(hidden)]
11190 pub fn default_instance() -> &'static Self {
11191 static DEFAULT: super::OpenSignature = super::OpenSignature::const_default();
11192 &DEFAULT
11193 }
11194 pub fn with_reference<T: Into<super::open_signature::Reference>>(
11196 mut self,
11197 field: T,
11198 ) -> Self {
11199 self.set_reference(field.into());
11200 self
11201 }
11202 pub fn body(&self) -> &super::OpenSignatureBody {
11204 self.body
11205 .as_ref()
11206 .map(|field| field as _)
11207 .unwrap_or_else(|| super::OpenSignatureBody::default_instance() as _)
11208 }
11209 pub fn body_opt_mut(&mut self) -> Option<&mut super::OpenSignatureBody> {
11211 self.body.as_mut().map(|field| field as _)
11212 }
11213 pub fn body_mut(&mut self) -> &mut super::OpenSignatureBody {
11216 self.body.get_or_insert_default()
11217 }
11218 pub fn body_opt(&self) -> Option<&super::OpenSignatureBody> {
11220 self.body.as_ref().map(|field| field as _)
11221 }
11222 pub fn set_body<T: Into<super::OpenSignatureBody>>(&mut self, field: T) {
11224 self.body = Some(field.into().into());
11225 }
11226 pub fn with_body<T: Into<super::OpenSignatureBody>>(mut self, field: T) -> Self {
11228 self.set_body(field.into());
11229 self
11230 }
11231 }
11232 impl super::OpenSignatureBody {
11233 pub const fn const_default() -> Self {
11234 Self {
11235 r#type: None,
11236 type_name: None,
11237 type_parameter_instantiation: Vec::new(),
11238 type_parameter: None,
11239 }
11240 }
11241 #[doc(hidden)]
11242 pub fn default_instance() -> &'static Self {
11243 static DEFAULT: super::OpenSignatureBody = super::OpenSignatureBody::const_default();
11244 &DEFAULT
11245 }
11246 pub fn with_type<T: Into<super::open_signature_body::Type>>(
11248 mut self,
11249 field: T,
11250 ) -> Self {
11251 self.set_type(field.into());
11252 self
11253 }
11254 pub fn type_name_opt_mut(&mut self) -> Option<&mut String> {
11256 self.type_name.as_mut().map(|field| field as _)
11257 }
11258 pub fn type_name_mut(&mut self) -> &mut String {
11261 self.type_name.get_or_insert_default()
11262 }
11263 pub fn type_name_opt(&self) -> Option<&str> {
11265 self.type_name.as_ref().map(|field| field as _)
11266 }
11267 pub fn set_type_name<T: Into<String>>(&mut self, field: T) {
11269 self.type_name = Some(field.into().into());
11270 }
11271 pub fn with_type_name<T: Into<String>>(mut self, field: T) -> Self {
11273 self.set_type_name(field.into());
11274 self
11275 }
11276 pub fn type_parameter_instantiation(&self) -> &[super::OpenSignatureBody] {
11278 &self.type_parameter_instantiation
11279 }
11280 pub fn type_parameter_instantiation_mut(
11283 &mut self,
11284 ) -> &mut Vec<super::OpenSignatureBody> {
11285 &mut self.type_parameter_instantiation
11286 }
11287 pub fn set_type_parameter_instantiation(
11289 &mut self,
11290 field: Vec<super::OpenSignatureBody>,
11291 ) {
11292 self.type_parameter_instantiation = field;
11293 }
11294 pub fn with_type_parameter_instantiation(
11296 mut self,
11297 field: Vec<super::OpenSignatureBody>,
11298 ) -> Self {
11299 self.set_type_parameter_instantiation(field);
11300 self
11301 }
11302 pub fn type_parameter_opt_mut(&mut self) -> Option<&mut u32> {
11304 self.type_parameter.as_mut().map(|field| field as _)
11305 }
11306 pub fn type_parameter_mut(&mut self) -> &mut u32 {
11309 self.type_parameter.get_or_insert_default()
11310 }
11311 pub fn type_parameter_opt(&self) -> Option<u32> {
11313 self.type_parameter.as_ref().map(|field| *field)
11314 }
11315 pub fn set_type_parameter(&mut self, field: u32) {
11317 self.type_parameter = Some(field);
11318 }
11319 pub fn with_type_parameter(mut self, field: u32) -> Self {
11321 self.set_type_parameter(field);
11322 self
11323 }
11324 }
11325 impl super::Owner {
11326 pub const fn const_default() -> Self {
11327 Self {
11328 kind: None,
11329 address: None,
11330 version: None,
11331 }
11332 }
11333 #[doc(hidden)]
11334 pub fn default_instance() -> &'static Self {
11335 static DEFAULT: super::Owner = super::Owner::const_default();
11336 &DEFAULT
11337 }
11338 pub fn with_kind<T: Into<super::owner::OwnerKind>>(mut self, field: T) -> Self {
11340 self.set_kind(field.into());
11341 self
11342 }
11343 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
11345 self.address.as_mut().map(|field| field as _)
11346 }
11347 pub fn address_mut(&mut self) -> &mut String {
11350 self.address.get_or_insert_default()
11351 }
11352 pub fn address_opt(&self) -> Option<&str> {
11354 self.address.as_ref().map(|field| field as _)
11355 }
11356 pub fn set_address<T: Into<String>>(&mut self, field: T) {
11358 self.address = Some(field.into().into());
11359 }
11360 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
11362 self.set_address(field.into());
11363 self
11364 }
11365 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
11367 self.version.as_mut().map(|field| field as _)
11368 }
11369 pub fn version_mut(&mut self) -> &mut u64 {
11372 self.version.get_or_insert_default()
11373 }
11374 pub fn version_opt(&self) -> Option<u64> {
11376 self.version.as_ref().map(|field| *field)
11377 }
11378 pub fn set_version(&mut self, field: u64) {
11380 self.version = Some(field);
11381 }
11382 pub fn with_version(mut self, field: u64) -> Self {
11384 self.set_version(field);
11385 self
11386 }
11387 }
11388 impl super::Package {
11389 pub const fn const_default() -> Self {
11390 Self {
11391 storage_id: None,
11392 original_id: None,
11393 version: None,
11394 modules: Vec::new(),
11395 type_origins: Vec::new(),
11396 linkage: Vec::new(),
11397 }
11398 }
11399 #[doc(hidden)]
11400 pub fn default_instance() -> &'static Self {
11401 static DEFAULT: super::Package = super::Package::const_default();
11402 &DEFAULT
11403 }
11404 pub fn storage_id_opt_mut(&mut self) -> Option<&mut String> {
11406 self.storage_id.as_mut().map(|field| field as _)
11407 }
11408 pub fn storage_id_mut(&mut self) -> &mut String {
11411 self.storage_id.get_or_insert_default()
11412 }
11413 pub fn storage_id_opt(&self) -> Option<&str> {
11415 self.storage_id.as_ref().map(|field| field as _)
11416 }
11417 pub fn set_storage_id<T: Into<String>>(&mut self, field: T) {
11419 self.storage_id = Some(field.into().into());
11420 }
11421 pub fn with_storage_id<T: Into<String>>(mut self, field: T) -> Self {
11423 self.set_storage_id(field.into());
11424 self
11425 }
11426 pub fn original_id_opt_mut(&mut self) -> Option<&mut String> {
11428 self.original_id.as_mut().map(|field| field as _)
11429 }
11430 pub fn original_id_mut(&mut self) -> &mut String {
11433 self.original_id.get_or_insert_default()
11434 }
11435 pub fn original_id_opt(&self) -> Option<&str> {
11437 self.original_id.as_ref().map(|field| field as _)
11438 }
11439 pub fn set_original_id<T: Into<String>>(&mut self, field: T) {
11441 self.original_id = Some(field.into().into());
11442 }
11443 pub fn with_original_id<T: Into<String>>(mut self, field: T) -> Self {
11445 self.set_original_id(field.into());
11446 self
11447 }
11448 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
11450 self.version.as_mut().map(|field| field as _)
11451 }
11452 pub fn version_mut(&mut self) -> &mut u64 {
11455 self.version.get_or_insert_default()
11456 }
11457 pub fn version_opt(&self) -> Option<u64> {
11459 self.version.as_ref().map(|field| *field)
11460 }
11461 pub fn set_version(&mut self, field: u64) {
11463 self.version = Some(field);
11464 }
11465 pub fn with_version(mut self, field: u64) -> Self {
11467 self.set_version(field);
11468 self
11469 }
11470 pub fn modules(&self) -> &[super::Module] {
11472 &self.modules
11473 }
11474 pub fn modules_mut(&mut self) -> &mut Vec<super::Module> {
11477 &mut self.modules
11478 }
11479 pub fn set_modules(&mut self, field: Vec<super::Module>) {
11481 self.modules = field;
11482 }
11483 pub fn with_modules(mut self, field: Vec<super::Module>) -> Self {
11485 self.set_modules(field);
11486 self
11487 }
11488 pub fn type_origins(&self) -> &[super::TypeOrigin] {
11490 &self.type_origins
11491 }
11492 pub fn type_origins_mut(&mut self) -> &mut Vec<super::TypeOrigin> {
11495 &mut self.type_origins
11496 }
11497 pub fn set_type_origins(&mut self, field: Vec<super::TypeOrigin>) {
11499 self.type_origins = field;
11500 }
11501 pub fn with_type_origins(mut self, field: Vec<super::TypeOrigin>) -> Self {
11503 self.set_type_origins(field);
11504 self
11505 }
11506 pub fn linkage(&self) -> &[super::Linkage] {
11508 &self.linkage
11509 }
11510 pub fn linkage_mut(&mut self) -> &mut Vec<super::Linkage> {
11513 &mut self.linkage
11514 }
11515 pub fn set_linkage(&mut self, field: Vec<super::Linkage>) {
11517 self.linkage = field;
11518 }
11519 pub fn with_linkage(mut self, field: Vec<super::Linkage>) -> Self {
11521 self.set_linkage(field);
11522 self
11523 }
11524 }
11525 impl super::PackageUpgradeError {
11526 pub const fn const_default() -> Self {
11527 Self {
11528 kind: None,
11529 package_id: None,
11530 digest: None,
11531 policy: None,
11532 ticket_id: None,
11533 }
11534 }
11535 #[doc(hidden)]
11536 pub fn default_instance() -> &'static Self {
11537 static DEFAULT: super::PackageUpgradeError = super::PackageUpgradeError::const_default();
11538 &DEFAULT
11539 }
11540 pub fn with_kind<T: Into<super::package_upgrade_error::PackageUpgradeErrorKind>>(
11542 mut self,
11543 field: T,
11544 ) -> Self {
11545 self.set_kind(field.into());
11546 self
11547 }
11548 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
11550 self.package_id.as_mut().map(|field| field as _)
11551 }
11552 pub fn package_id_mut(&mut self) -> &mut String {
11555 self.package_id.get_or_insert_default()
11556 }
11557 pub fn package_id_opt(&self) -> Option<&str> {
11559 self.package_id.as_ref().map(|field| field as _)
11560 }
11561 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
11563 self.package_id = Some(field.into().into());
11564 }
11565 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
11567 self.set_package_id(field.into());
11568 self
11569 }
11570 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
11572 self.digest.as_mut().map(|field| field as _)
11573 }
11574 pub fn digest_mut(&mut self) -> &mut String {
11577 self.digest.get_or_insert_default()
11578 }
11579 pub fn digest_opt(&self) -> Option<&str> {
11581 self.digest.as_ref().map(|field| field as _)
11582 }
11583 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
11585 self.digest = Some(field.into().into());
11586 }
11587 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
11589 self.set_digest(field.into());
11590 self
11591 }
11592 pub fn policy_opt_mut(&mut self) -> Option<&mut u32> {
11594 self.policy.as_mut().map(|field| field as _)
11595 }
11596 pub fn policy_mut(&mut self) -> &mut u32 {
11599 self.policy.get_or_insert_default()
11600 }
11601 pub fn policy_opt(&self) -> Option<u32> {
11603 self.policy.as_ref().map(|field| *field)
11604 }
11605 pub fn set_policy(&mut self, field: u32) {
11607 self.policy = Some(field);
11608 }
11609 pub fn with_policy(mut self, field: u32) -> Self {
11611 self.set_policy(field);
11612 self
11613 }
11614 pub fn ticket_id_opt_mut(&mut self) -> Option<&mut String> {
11616 self.ticket_id.as_mut().map(|field| field as _)
11617 }
11618 pub fn ticket_id_mut(&mut self) -> &mut String {
11621 self.ticket_id.get_or_insert_default()
11622 }
11623 pub fn ticket_id_opt(&self) -> Option<&str> {
11625 self.ticket_id.as_ref().map(|field| field as _)
11626 }
11627 pub fn set_ticket_id<T: Into<String>>(&mut self, field: T) {
11629 self.ticket_id = Some(field.into().into());
11630 }
11631 pub fn with_ticket_id<T: Into<String>>(mut self, field: T) -> Self {
11633 self.set_ticket_id(field.into());
11634 self
11635 }
11636 }
11637 impl super::PackageVersion {
11638 pub const fn const_default() -> Self {
11639 Self {
11640 package_id: None,
11641 version: None,
11642 }
11643 }
11644 #[doc(hidden)]
11645 pub fn default_instance() -> &'static Self {
11646 static DEFAULT: super::PackageVersion = super::PackageVersion::const_default();
11647 &DEFAULT
11648 }
11649 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
11651 self.package_id.as_mut().map(|field| field as _)
11652 }
11653 pub fn package_id_mut(&mut self) -> &mut String {
11656 self.package_id.get_or_insert_default()
11657 }
11658 pub fn package_id_opt(&self) -> Option<&str> {
11660 self.package_id.as_ref().map(|field| field as _)
11661 }
11662 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
11664 self.package_id = Some(field.into().into());
11665 }
11666 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
11668 self.set_package_id(field.into());
11669 self
11670 }
11671 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
11673 self.version.as_mut().map(|field| field as _)
11674 }
11675 pub fn version_mut(&mut self) -> &mut u64 {
11678 self.version.get_or_insert_default()
11679 }
11680 pub fn version_opt(&self) -> Option<u64> {
11682 self.version.as_ref().map(|field| *field)
11683 }
11684 pub fn set_version(&mut self, field: u64) {
11686 self.version = Some(field);
11687 }
11688 pub fn with_version(mut self, field: u64) -> Self {
11690 self.set_version(field);
11691 self
11692 }
11693 }
11694 impl super::PasskeyAuthenticator {
11695 pub const fn const_default() -> Self {
11696 Self {
11697 authenticator_data: None,
11698 client_data_json: None,
11699 signature: None,
11700 }
11701 }
11702 #[doc(hidden)]
11703 pub fn default_instance() -> &'static Self {
11704 static DEFAULT: super::PasskeyAuthenticator = super::PasskeyAuthenticator::const_default();
11705 &DEFAULT
11706 }
11707 pub fn authenticator_data_opt(&self) -> Option<&[u8]> {
11709 self.authenticator_data.as_ref().map(|field| field as _)
11710 }
11711 pub fn set_authenticator_data<T: Into<::prost::bytes::Bytes>>(
11713 &mut self,
11714 field: T,
11715 ) {
11716 self.authenticator_data = Some(field.into().into());
11717 }
11718 pub fn with_authenticator_data<T: Into<::prost::bytes::Bytes>>(
11720 mut self,
11721 field: T,
11722 ) -> Self {
11723 self.set_authenticator_data(field.into());
11724 self
11725 }
11726 pub fn client_data_json_opt_mut(&mut self) -> Option<&mut String> {
11728 self.client_data_json.as_mut().map(|field| field as _)
11729 }
11730 pub fn client_data_json_mut(&mut self) -> &mut String {
11733 self.client_data_json.get_or_insert_default()
11734 }
11735 pub fn client_data_json_opt(&self) -> Option<&str> {
11737 self.client_data_json.as_ref().map(|field| field as _)
11738 }
11739 pub fn set_client_data_json<T: Into<String>>(&mut self, field: T) {
11741 self.client_data_json = Some(field.into().into());
11742 }
11743 pub fn with_client_data_json<T: Into<String>>(mut self, field: T) -> Self {
11745 self.set_client_data_json(field.into());
11746 self
11747 }
11748 pub fn signature(&self) -> &super::SimpleSignature {
11750 self.signature
11751 .as_ref()
11752 .map(|field| field as _)
11753 .unwrap_or_else(|| super::SimpleSignature::default_instance() as _)
11754 }
11755 pub fn signature_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
11757 self.signature.as_mut().map(|field| field as _)
11758 }
11759 pub fn signature_mut(&mut self) -> &mut super::SimpleSignature {
11762 self.signature.get_or_insert_default()
11763 }
11764 pub fn signature_opt(&self) -> Option<&super::SimpleSignature> {
11766 self.signature.as_ref().map(|field| field as _)
11767 }
11768 pub fn set_signature<T: Into<super::SimpleSignature>>(&mut self, field: T) {
11770 self.signature = Some(field.into().into());
11771 }
11772 pub fn with_signature<T: Into<super::SimpleSignature>>(
11774 mut self,
11775 field: T,
11776 ) -> Self {
11777 self.set_signature(field.into());
11778 self
11779 }
11780 }
11781 impl super::ProgrammableTransaction {
11782 pub const fn const_default() -> Self {
11783 Self {
11784 inputs: Vec::new(),
11785 commands: Vec::new(),
11786 }
11787 }
11788 #[doc(hidden)]
11789 pub fn default_instance() -> &'static Self {
11790 static DEFAULT: super::ProgrammableTransaction = super::ProgrammableTransaction::const_default();
11791 &DEFAULT
11792 }
11793 pub fn inputs(&self) -> &[super::Input] {
11795 &self.inputs
11796 }
11797 pub fn inputs_mut(&mut self) -> &mut Vec<super::Input> {
11800 &mut self.inputs
11801 }
11802 pub fn set_inputs(&mut self, field: Vec<super::Input>) {
11804 self.inputs = field;
11805 }
11806 pub fn with_inputs(mut self, field: Vec<super::Input>) -> Self {
11808 self.set_inputs(field);
11809 self
11810 }
11811 pub fn commands(&self) -> &[super::Command] {
11813 &self.commands
11814 }
11815 pub fn commands_mut(&mut self) -> &mut Vec<super::Command> {
11818 &mut self.commands
11819 }
11820 pub fn set_commands(&mut self, field: Vec<super::Command>) {
11822 self.commands = field;
11823 }
11824 pub fn with_commands(mut self, field: Vec<super::Command>) -> Self {
11826 self.set_commands(field);
11827 self
11828 }
11829 }
11830 impl super::ProtocolConfig {
11831 pub const fn const_default() -> Self {
11832 Self {
11833 protocol_version: None,
11834 feature_flags: std::collections::BTreeMap::new(),
11835 attributes: std::collections::BTreeMap::new(),
11836 }
11837 }
11838 #[doc(hidden)]
11839 pub fn default_instance() -> &'static Self {
11840 static DEFAULT: super::ProtocolConfig = super::ProtocolConfig::const_default();
11841 &DEFAULT
11842 }
11843 pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
11845 self.protocol_version.as_mut().map(|field| field as _)
11846 }
11847 pub fn protocol_version_mut(&mut self) -> &mut u64 {
11850 self.protocol_version.get_or_insert_default()
11851 }
11852 pub fn protocol_version_opt(&self) -> Option<u64> {
11854 self.protocol_version.as_ref().map(|field| *field)
11855 }
11856 pub fn set_protocol_version(&mut self, field: u64) {
11858 self.protocol_version = Some(field);
11859 }
11860 pub fn with_protocol_version(mut self, field: u64) -> Self {
11862 self.set_protocol_version(field);
11863 self
11864 }
11865 pub fn feature_flags(&self) -> &::std::collections::BTreeMap<String, bool> {
11867 &self.feature_flags
11868 }
11869 pub fn feature_flags_mut(
11872 &mut self,
11873 ) -> &mut ::std::collections::BTreeMap<String, bool> {
11874 &mut self.feature_flags
11875 }
11876 pub fn set_feature_flags(
11878 &mut self,
11879 field: ::std::collections::BTreeMap<String, bool>,
11880 ) {
11881 self.feature_flags = field;
11882 }
11883 pub fn with_feature_flags(
11885 mut self,
11886 field: ::std::collections::BTreeMap<String, bool>,
11887 ) -> Self {
11888 self.set_feature_flags(field);
11889 self
11890 }
11891 pub fn attributes(&self) -> &::std::collections::BTreeMap<String, String> {
11893 &self.attributes
11894 }
11895 pub fn attributes_mut(
11898 &mut self,
11899 ) -> &mut ::std::collections::BTreeMap<String, String> {
11900 &mut self.attributes
11901 }
11902 pub fn set_attributes(
11904 &mut self,
11905 field: ::std::collections::BTreeMap<String, String>,
11906 ) {
11907 self.attributes = field;
11908 }
11909 pub fn with_attributes(
11911 mut self,
11912 field: ::std::collections::BTreeMap<String, String>,
11913 ) -> Self {
11914 self.set_attributes(field);
11915 self
11916 }
11917 }
11918 impl super::Publish {
11919 pub const fn const_default() -> Self {
11920 Self {
11921 modules: Vec::new(),
11922 dependencies: Vec::new(),
11923 }
11924 }
11925 #[doc(hidden)]
11926 pub fn default_instance() -> &'static Self {
11927 static DEFAULT: super::Publish = super::Publish::const_default();
11928 &DEFAULT
11929 }
11930 pub fn modules(&self) -> &[::prost::bytes::Bytes] {
11932 &self.modules
11933 }
11934 pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
11937 &mut self.modules
11938 }
11939 pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
11941 self.modules = field;
11942 }
11943 pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
11945 self.set_modules(field);
11946 self
11947 }
11948 pub fn dependencies(&self) -> &[String] {
11950 &self.dependencies
11951 }
11952 pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
11955 &mut self.dependencies
11956 }
11957 pub fn set_dependencies(&mut self, field: Vec<String>) {
11959 self.dependencies = field;
11960 }
11961 pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
11963 self.set_dependencies(field);
11964 self
11965 }
11966 }
11967 impl super::RandomnessStateUpdate {
11968 pub const fn const_default() -> Self {
11969 Self {
11970 epoch: None,
11971 randomness_round: None,
11972 random_bytes: None,
11973 randomness_object_initial_shared_version: None,
11974 }
11975 }
11976 #[doc(hidden)]
11977 pub fn default_instance() -> &'static Self {
11978 static DEFAULT: super::RandomnessStateUpdate = super::RandomnessStateUpdate::const_default();
11979 &DEFAULT
11980 }
11981 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
11983 self.epoch.as_mut().map(|field| field as _)
11984 }
11985 pub fn epoch_mut(&mut self) -> &mut u64 {
11988 self.epoch.get_or_insert_default()
11989 }
11990 pub fn epoch_opt(&self) -> Option<u64> {
11992 self.epoch.as_ref().map(|field| *field)
11993 }
11994 pub fn set_epoch(&mut self, field: u64) {
11996 self.epoch = Some(field);
11997 }
11998 pub fn with_epoch(mut self, field: u64) -> Self {
12000 self.set_epoch(field);
12001 self
12002 }
12003 pub fn randomness_round_opt_mut(&mut self) -> Option<&mut u64> {
12005 self.randomness_round.as_mut().map(|field| field as _)
12006 }
12007 pub fn randomness_round_mut(&mut self) -> &mut u64 {
12010 self.randomness_round.get_or_insert_default()
12011 }
12012 pub fn randomness_round_opt(&self) -> Option<u64> {
12014 self.randomness_round.as_ref().map(|field| *field)
12015 }
12016 pub fn set_randomness_round(&mut self, field: u64) {
12018 self.randomness_round = Some(field);
12019 }
12020 pub fn with_randomness_round(mut self, field: u64) -> Self {
12022 self.set_randomness_round(field);
12023 self
12024 }
12025 pub fn random_bytes_opt(&self) -> Option<&[u8]> {
12027 self.random_bytes.as_ref().map(|field| field as _)
12028 }
12029 pub fn set_random_bytes<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
12031 self.random_bytes = Some(field.into().into());
12032 }
12033 pub fn with_random_bytes<T: Into<::prost::bytes::Bytes>>(
12035 mut self,
12036 field: T,
12037 ) -> Self {
12038 self.set_random_bytes(field.into());
12039 self
12040 }
12041 pub fn randomness_object_initial_shared_version_opt_mut(
12043 &mut self,
12044 ) -> Option<&mut u64> {
12045 self.randomness_object_initial_shared_version
12046 .as_mut()
12047 .map(|field| field as _)
12048 }
12049 pub fn randomness_object_initial_shared_version_mut(&mut self) -> &mut u64 {
12052 self.randomness_object_initial_shared_version.get_or_insert_default()
12053 }
12054 pub fn randomness_object_initial_shared_version_opt(&self) -> Option<u64> {
12056 self.randomness_object_initial_shared_version.as_ref().map(|field| *field)
12057 }
12058 pub fn set_randomness_object_initial_shared_version(&mut self, field: u64) {
12060 self.randomness_object_initial_shared_version = Some(field);
12061 }
12062 pub fn with_randomness_object_initial_shared_version(
12064 mut self,
12065 field: u64,
12066 ) -> Self {
12067 self.set_randomness_object_initial_shared_version(field);
12068 self
12069 }
12070 }
12071 impl super::RegulatedCoinMetadata {
12072 pub const fn const_default() -> Self {
12073 Self {
12074 id: None,
12075 coin_metadata_object: None,
12076 deny_cap_object: None,
12077 allow_global_pause: None,
12078 variant: None,
12079 coin_regulated_state: None,
12080 }
12081 }
12082 #[doc(hidden)]
12083 pub fn default_instance() -> &'static Self {
12084 static DEFAULT: super::RegulatedCoinMetadata = super::RegulatedCoinMetadata::const_default();
12085 &DEFAULT
12086 }
12087 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
12089 self.id.as_mut().map(|field| field as _)
12090 }
12091 pub fn id_mut(&mut self) -> &mut String {
12094 self.id.get_or_insert_default()
12095 }
12096 pub fn id_opt(&self) -> Option<&str> {
12098 self.id.as_ref().map(|field| field as _)
12099 }
12100 pub fn set_id<T: Into<String>>(&mut self, field: T) {
12102 self.id = Some(field.into().into());
12103 }
12104 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
12106 self.set_id(field.into());
12107 self
12108 }
12109 pub fn coin_metadata_object_opt_mut(&mut self) -> Option<&mut String> {
12111 self.coin_metadata_object.as_mut().map(|field| field as _)
12112 }
12113 pub fn coin_metadata_object_mut(&mut self) -> &mut String {
12116 self.coin_metadata_object.get_or_insert_default()
12117 }
12118 pub fn coin_metadata_object_opt(&self) -> Option<&str> {
12120 self.coin_metadata_object.as_ref().map(|field| field as _)
12121 }
12122 pub fn set_coin_metadata_object<T: Into<String>>(&mut self, field: T) {
12124 self.coin_metadata_object = Some(field.into().into());
12125 }
12126 pub fn with_coin_metadata_object<T: Into<String>>(mut self, field: T) -> Self {
12128 self.set_coin_metadata_object(field.into());
12129 self
12130 }
12131 pub fn deny_cap_object_opt_mut(&mut self) -> Option<&mut String> {
12133 self.deny_cap_object.as_mut().map(|field| field as _)
12134 }
12135 pub fn deny_cap_object_mut(&mut self) -> &mut String {
12138 self.deny_cap_object.get_or_insert_default()
12139 }
12140 pub fn deny_cap_object_opt(&self) -> Option<&str> {
12142 self.deny_cap_object.as_ref().map(|field| field as _)
12143 }
12144 pub fn set_deny_cap_object<T: Into<String>>(&mut self, field: T) {
12146 self.deny_cap_object = Some(field.into().into());
12147 }
12148 pub fn with_deny_cap_object<T: Into<String>>(mut self, field: T) -> Self {
12150 self.set_deny_cap_object(field.into());
12151 self
12152 }
12153 pub fn allow_global_pause_opt_mut(&mut self) -> Option<&mut bool> {
12155 self.allow_global_pause.as_mut().map(|field| field as _)
12156 }
12157 pub fn allow_global_pause_mut(&mut self) -> &mut bool {
12160 self.allow_global_pause.get_or_insert_default()
12161 }
12162 pub fn allow_global_pause_opt(&self) -> Option<bool> {
12164 self.allow_global_pause.as_ref().map(|field| *field)
12165 }
12166 pub fn set_allow_global_pause(&mut self, field: bool) {
12168 self.allow_global_pause = Some(field);
12169 }
12170 pub fn with_allow_global_pause(mut self, field: bool) -> Self {
12172 self.set_allow_global_pause(field);
12173 self
12174 }
12175 pub fn variant_opt_mut(&mut self) -> Option<&mut u32> {
12177 self.variant.as_mut().map(|field| field as _)
12178 }
12179 pub fn variant_mut(&mut self) -> &mut u32 {
12182 self.variant.get_or_insert_default()
12183 }
12184 pub fn variant_opt(&self) -> Option<u32> {
12186 self.variant.as_ref().map(|field| *field)
12187 }
12188 pub fn set_variant(&mut self, field: u32) {
12190 self.variant = Some(field);
12191 }
12192 pub fn with_variant(mut self, field: u32) -> Self {
12194 self.set_variant(field);
12195 self
12196 }
12197 pub fn with_coin_regulated_state<
12199 T: Into<super::regulated_coin_metadata::CoinRegulatedState>,
12200 >(mut self, field: T) -> Self {
12201 self.set_coin_regulated_state(field.into());
12202 self
12203 }
12204 }
12205 impl super::ReverseLookupNameRequest {
12206 pub const fn const_default() -> Self {
12207 Self { address: None }
12208 }
12209 #[doc(hidden)]
12210 pub fn default_instance() -> &'static Self {
12211 static DEFAULT: super::ReverseLookupNameRequest = super::ReverseLookupNameRequest::const_default();
12212 &DEFAULT
12213 }
12214 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
12216 self.address.as_mut().map(|field| field as _)
12217 }
12218 pub fn address_mut(&mut self) -> &mut String {
12221 self.address.get_or_insert_default()
12222 }
12223 pub fn address_opt(&self) -> Option<&str> {
12225 self.address.as_ref().map(|field| field as _)
12226 }
12227 pub fn set_address<T: Into<String>>(&mut self, field: T) {
12229 self.address = Some(field.into().into());
12230 }
12231 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
12233 self.set_address(field.into());
12234 self
12235 }
12236 }
12237 impl super::ReverseLookupNameResponse {
12238 pub const fn const_default() -> Self {
12239 Self { record: None }
12240 }
12241 #[doc(hidden)]
12242 pub fn default_instance() -> &'static Self {
12243 static DEFAULT: super::ReverseLookupNameResponse = super::ReverseLookupNameResponse::const_default();
12244 &DEFAULT
12245 }
12246 pub fn record(&self) -> &super::NameRecord {
12248 self.record
12249 .as_ref()
12250 .map(|field| field as _)
12251 .unwrap_or_else(|| super::NameRecord::default_instance() as _)
12252 }
12253 pub fn record_opt_mut(&mut self) -> Option<&mut super::NameRecord> {
12255 self.record.as_mut().map(|field| field as _)
12256 }
12257 pub fn record_mut(&mut self) -> &mut super::NameRecord {
12260 self.record.get_or_insert_default()
12261 }
12262 pub fn record_opt(&self) -> Option<&super::NameRecord> {
12264 self.record.as_ref().map(|field| field as _)
12265 }
12266 pub fn set_record<T: Into<super::NameRecord>>(&mut self, field: T) {
12268 self.record = Some(field.into().into());
12269 }
12270 pub fn with_record<T: Into<super::NameRecord>>(mut self, field: T) -> Self {
12272 self.set_record(field.into());
12273 self
12274 }
12275 }
12276 impl super::SimpleSignature {
12277 pub const fn const_default() -> Self {
12278 Self {
12279 scheme: None,
12280 signature: None,
12281 public_key: None,
12282 }
12283 }
12284 #[doc(hidden)]
12285 pub fn default_instance() -> &'static Self {
12286 static DEFAULT: super::SimpleSignature = super::SimpleSignature::const_default();
12287 &DEFAULT
12288 }
12289 pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
12291 self.set_scheme(field.into());
12292 self
12293 }
12294 pub fn signature_opt(&self) -> Option<&[u8]> {
12296 self.signature.as_ref().map(|field| field as _)
12297 }
12298 pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
12300 self.signature = Some(field.into().into());
12301 }
12302 pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
12304 mut self,
12305 field: T,
12306 ) -> Self {
12307 self.set_signature(field.into());
12308 self
12309 }
12310 pub fn public_key_opt(&self) -> Option<&[u8]> {
12312 self.public_key.as_ref().map(|field| field as _)
12313 }
12314 pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
12316 self.public_key = Some(field.into().into());
12317 }
12318 pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
12320 mut self,
12321 field: T,
12322 ) -> Self {
12323 self.set_public_key(field.into());
12324 self
12325 }
12326 }
12327 impl super::SimulateTransactionRequest {
12328 pub const fn const_default() -> Self {
12329 Self {
12330 transaction: None,
12331 read_mask: None,
12332 checks: None,
12333 do_gas_selection: None,
12334 }
12335 }
12336 #[doc(hidden)]
12337 pub fn default_instance() -> &'static Self {
12338 static DEFAULT: super::SimulateTransactionRequest = super::SimulateTransactionRequest::const_default();
12339 &DEFAULT
12340 }
12341 pub fn transaction(&self) -> &super::Transaction {
12343 self.transaction
12344 .as_ref()
12345 .map(|field| field as _)
12346 .unwrap_or_else(|| super::Transaction::default_instance() as _)
12347 }
12348 pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
12350 self.transaction.as_mut().map(|field| field as _)
12351 }
12352 pub fn transaction_mut(&mut self) -> &mut super::Transaction {
12355 self.transaction.get_or_insert_default()
12356 }
12357 pub fn transaction_opt(&self) -> Option<&super::Transaction> {
12359 self.transaction.as_ref().map(|field| field as _)
12360 }
12361 pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
12363 self.transaction = Some(field.into().into());
12364 }
12365 pub fn with_transaction<T: Into<super::Transaction>>(
12367 mut self,
12368 field: T,
12369 ) -> Self {
12370 self.set_transaction(field.into());
12371 self
12372 }
12373 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
12375 self.read_mask.as_mut().map(|field| field as _)
12376 }
12377 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
12380 self.read_mask.get_or_insert_default()
12381 }
12382 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
12384 self.read_mask.as_ref().map(|field| field as _)
12385 }
12386 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
12388 self.read_mask = Some(field.into().into());
12389 }
12390 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
12392 mut self,
12393 field: T,
12394 ) -> Self {
12395 self.set_read_mask(field.into());
12396 self
12397 }
12398 pub fn with_checks<
12400 T: Into<super::simulate_transaction_request::TransactionChecks>,
12401 >(mut self, field: T) -> Self {
12402 self.set_checks(field.into());
12403 self
12404 }
12405 pub fn do_gas_selection_opt_mut(&mut self) -> Option<&mut bool> {
12407 self.do_gas_selection.as_mut().map(|field| field as _)
12408 }
12409 pub fn do_gas_selection_mut(&mut self) -> &mut bool {
12412 self.do_gas_selection.get_or_insert_default()
12413 }
12414 pub fn do_gas_selection_opt(&self) -> Option<bool> {
12416 self.do_gas_selection.as_ref().map(|field| *field)
12417 }
12418 pub fn set_do_gas_selection(&mut self, field: bool) {
12420 self.do_gas_selection = Some(field);
12421 }
12422 pub fn with_do_gas_selection(mut self, field: bool) -> Self {
12424 self.set_do_gas_selection(field);
12425 self
12426 }
12427 }
12428 impl super::SimulateTransactionResponse {
12429 pub const fn const_default() -> Self {
12430 Self {
12431 transaction: None,
12432 command_outputs: Vec::new(),
12433 }
12434 }
12435 #[doc(hidden)]
12436 pub fn default_instance() -> &'static Self {
12437 static DEFAULT: super::SimulateTransactionResponse = super::SimulateTransactionResponse::const_default();
12438 &DEFAULT
12439 }
12440 pub fn transaction(&self) -> &super::ExecutedTransaction {
12442 self.transaction
12443 .as_ref()
12444 .map(|field| field as _)
12445 .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
12446 }
12447 pub fn transaction_opt_mut(
12449 &mut self,
12450 ) -> Option<&mut super::ExecutedTransaction> {
12451 self.transaction.as_mut().map(|field| field as _)
12452 }
12453 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
12456 self.transaction.get_or_insert_default()
12457 }
12458 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
12460 self.transaction.as_ref().map(|field| field as _)
12461 }
12462 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
12464 &mut self,
12465 field: T,
12466 ) {
12467 self.transaction = Some(field.into().into());
12468 }
12469 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
12471 mut self,
12472 field: T,
12473 ) -> Self {
12474 self.set_transaction(field.into());
12475 self
12476 }
12477 pub fn command_outputs(&self) -> &[super::CommandResult] {
12479 &self.command_outputs
12480 }
12481 pub fn command_outputs_mut(&mut self) -> &mut Vec<super::CommandResult> {
12484 &mut self.command_outputs
12485 }
12486 pub fn set_command_outputs(&mut self, field: Vec<super::CommandResult>) {
12488 self.command_outputs = field;
12489 }
12490 pub fn with_command_outputs(mut self, field: Vec<super::CommandResult>) -> Self {
12492 self.set_command_outputs(field);
12493 self
12494 }
12495 }
12496 impl super::SizeError {
12497 pub const fn const_default() -> Self {
12498 Self { size: None, max_size: None }
12499 }
12500 #[doc(hidden)]
12501 pub fn default_instance() -> &'static Self {
12502 static DEFAULT: super::SizeError = super::SizeError::const_default();
12503 &DEFAULT
12504 }
12505 pub fn size_opt_mut(&mut self) -> Option<&mut u64> {
12507 self.size.as_mut().map(|field| field as _)
12508 }
12509 pub fn size_mut(&mut self) -> &mut u64 {
12512 self.size.get_or_insert_default()
12513 }
12514 pub fn size_opt(&self) -> Option<u64> {
12516 self.size.as_ref().map(|field| *field)
12517 }
12518 pub fn set_size(&mut self, field: u64) {
12520 self.size = Some(field);
12521 }
12522 pub fn with_size(mut self, field: u64) -> Self {
12524 self.set_size(field);
12525 self
12526 }
12527 pub fn max_size_opt_mut(&mut self) -> Option<&mut u64> {
12529 self.max_size.as_mut().map(|field| field as _)
12530 }
12531 pub fn max_size_mut(&mut self) -> &mut u64 {
12534 self.max_size.get_or_insert_default()
12535 }
12536 pub fn max_size_opt(&self) -> Option<u64> {
12538 self.max_size.as_ref().map(|field| *field)
12539 }
12540 pub fn set_max_size(&mut self, field: u64) {
12542 self.max_size = Some(field);
12543 }
12544 pub fn with_max_size(mut self, field: u64) -> Self {
12546 self.set_max_size(field);
12547 self
12548 }
12549 }
12550 impl super::SplitCoins {
12551 pub const fn const_default() -> Self {
12552 Self {
12553 coin: None,
12554 amounts: Vec::new(),
12555 }
12556 }
12557 #[doc(hidden)]
12558 pub fn default_instance() -> &'static Self {
12559 static DEFAULT: super::SplitCoins = super::SplitCoins::const_default();
12560 &DEFAULT
12561 }
12562 pub fn coin(&self) -> &super::Argument {
12564 self.coin
12565 .as_ref()
12566 .map(|field| field as _)
12567 .unwrap_or_else(|| super::Argument::default_instance() as _)
12568 }
12569 pub fn coin_opt_mut(&mut self) -> Option<&mut super::Argument> {
12571 self.coin.as_mut().map(|field| field as _)
12572 }
12573 pub fn coin_mut(&mut self) -> &mut super::Argument {
12576 self.coin.get_or_insert_default()
12577 }
12578 pub fn coin_opt(&self) -> Option<&super::Argument> {
12580 self.coin.as_ref().map(|field| field as _)
12581 }
12582 pub fn set_coin<T: Into<super::Argument>>(&mut self, field: T) {
12584 self.coin = Some(field.into().into());
12585 }
12586 pub fn with_coin<T: Into<super::Argument>>(mut self, field: T) -> Self {
12588 self.set_coin(field.into());
12589 self
12590 }
12591 pub fn amounts(&self) -> &[super::Argument] {
12593 &self.amounts
12594 }
12595 pub fn amounts_mut(&mut self) -> &mut Vec<super::Argument> {
12598 &mut self.amounts
12599 }
12600 pub fn set_amounts(&mut self, field: Vec<super::Argument>) {
12602 self.amounts = field;
12603 }
12604 pub fn with_amounts(mut self, field: Vec<super::Argument>) -> Self {
12606 self.set_amounts(field);
12607 self
12608 }
12609 }
12610 impl super::StakeSubsidy {
12611 pub const fn const_default() -> Self {
12612 Self {
12613 balance: None,
12614 distribution_counter: None,
12615 current_distribution_amount: None,
12616 stake_subsidy_period_length: None,
12617 stake_subsidy_decrease_rate: None,
12618 extra_fields: None,
12619 }
12620 }
12621 #[doc(hidden)]
12622 pub fn default_instance() -> &'static Self {
12623 static DEFAULT: super::StakeSubsidy = super::StakeSubsidy::const_default();
12624 &DEFAULT
12625 }
12626 pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
12628 self.balance.as_mut().map(|field| field as _)
12629 }
12630 pub fn balance_mut(&mut self) -> &mut u64 {
12633 self.balance.get_or_insert_default()
12634 }
12635 pub fn balance_opt(&self) -> Option<u64> {
12637 self.balance.as_ref().map(|field| *field)
12638 }
12639 pub fn set_balance(&mut self, field: u64) {
12641 self.balance = Some(field);
12642 }
12643 pub fn with_balance(mut self, field: u64) -> Self {
12645 self.set_balance(field);
12646 self
12647 }
12648 pub fn distribution_counter_opt_mut(&mut self) -> Option<&mut u64> {
12650 self.distribution_counter.as_mut().map(|field| field as _)
12651 }
12652 pub fn distribution_counter_mut(&mut self) -> &mut u64 {
12655 self.distribution_counter.get_or_insert_default()
12656 }
12657 pub fn distribution_counter_opt(&self) -> Option<u64> {
12659 self.distribution_counter.as_ref().map(|field| *field)
12660 }
12661 pub fn set_distribution_counter(&mut self, field: u64) {
12663 self.distribution_counter = Some(field);
12664 }
12665 pub fn with_distribution_counter(mut self, field: u64) -> Self {
12667 self.set_distribution_counter(field);
12668 self
12669 }
12670 pub fn current_distribution_amount_opt_mut(&mut self) -> Option<&mut u64> {
12672 self.current_distribution_amount.as_mut().map(|field| field as _)
12673 }
12674 pub fn current_distribution_amount_mut(&mut self) -> &mut u64 {
12677 self.current_distribution_amount.get_or_insert_default()
12678 }
12679 pub fn current_distribution_amount_opt(&self) -> Option<u64> {
12681 self.current_distribution_amount.as_ref().map(|field| *field)
12682 }
12683 pub fn set_current_distribution_amount(&mut self, field: u64) {
12685 self.current_distribution_amount = Some(field);
12686 }
12687 pub fn with_current_distribution_amount(mut self, field: u64) -> Self {
12689 self.set_current_distribution_amount(field);
12690 self
12691 }
12692 pub fn stake_subsidy_period_length_opt_mut(&mut self) -> Option<&mut u64> {
12694 self.stake_subsidy_period_length.as_mut().map(|field| field as _)
12695 }
12696 pub fn stake_subsidy_period_length_mut(&mut self) -> &mut u64 {
12699 self.stake_subsidy_period_length.get_or_insert_default()
12700 }
12701 pub fn stake_subsidy_period_length_opt(&self) -> Option<u64> {
12703 self.stake_subsidy_period_length.as_ref().map(|field| *field)
12704 }
12705 pub fn set_stake_subsidy_period_length(&mut self, field: u64) {
12707 self.stake_subsidy_period_length = Some(field);
12708 }
12709 pub fn with_stake_subsidy_period_length(mut self, field: u64) -> Self {
12711 self.set_stake_subsidy_period_length(field);
12712 self
12713 }
12714 pub fn stake_subsidy_decrease_rate_opt_mut(&mut self) -> Option<&mut u32> {
12716 self.stake_subsidy_decrease_rate.as_mut().map(|field| field as _)
12717 }
12718 pub fn stake_subsidy_decrease_rate_mut(&mut self) -> &mut u32 {
12721 self.stake_subsidy_decrease_rate.get_or_insert_default()
12722 }
12723 pub fn stake_subsidy_decrease_rate_opt(&self) -> Option<u32> {
12725 self.stake_subsidy_decrease_rate.as_ref().map(|field| *field)
12726 }
12727 pub fn set_stake_subsidy_decrease_rate(&mut self, field: u32) {
12729 self.stake_subsidy_decrease_rate = Some(field);
12730 }
12731 pub fn with_stake_subsidy_decrease_rate(mut self, field: u32) -> Self {
12733 self.set_stake_subsidy_decrease_rate(field);
12734 self
12735 }
12736 pub fn extra_fields(&self) -> &super::MoveTable {
12738 self.extra_fields
12739 .as_ref()
12740 .map(|field| field as _)
12741 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
12742 }
12743 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
12745 self.extra_fields.as_mut().map(|field| field as _)
12746 }
12747 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
12750 self.extra_fields.get_or_insert_default()
12751 }
12752 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
12754 self.extra_fields.as_ref().map(|field| field as _)
12755 }
12756 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
12758 self.extra_fields = Some(field.into().into());
12759 }
12760 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
12762 self.set_extra_fields(field.into());
12763 self
12764 }
12765 }
12766 impl super::StakingPool {
12767 pub const fn const_default() -> Self {
12768 Self {
12769 id: None,
12770 activation_epoch: None,
12771 deactivation_epoch: None,
12772 sui_balance: None,
12773 rewards_pool: None,
12774 pool_token_balance: None,
12775 exchange_rates: None,
12776 pending_stake: None,
12777 pending_total_sui_withdraw: None,
12778 pending_pool_token_withdraw: None,
12779 extra_fields: None,
12780 }
12781 }
12782 #[doc(hidden)]
12783 pub fn default_instance() -> &'static Self {
12784 static DEFAULT: super::StakingPool = super::StakingPool::const_default();
12785 &DEFAULT
12786 }
12787 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
12789 self.id.as_mut().map(|field| field as _)
12790 }
12791 pub fn id_mut(&mut self) -> &mut String {
12794 self.id.get_or_insert_default()
12795 }
12796 pub fn id_opt(&self) -> Option<&str> {
12798 self.id.as_ref().map(|field| field as _)
12799 }
12800 pub fn set_id<T: Into<String>>(&mut self, field: T) {
12802 self.id = Some(field.into().into());
12803 }
12804 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
12806 self.set_id(field.into());
12807 self
12808 }
12809 pub fn activation_epoch_opt_mut(&mut self) -> Option<&mut u64> {
12811 self.activation_epoch.as_mut().map(|field| field as _)
12812 }
12813 pub fn activation_epoch_mut(&mut self) -> &mut u64 {
12816 self.activation_epoch.get_or_insert_default()
12817 }
12818 pub fn activation_epoch_opt(&self) -> Option<u64> {
12820 self.activation_epoch.as_ref().map(|field| *field)
12821 }
12822 pub fn set_activation_epoch(&mut self, field: u64) {
12824 self.activation_epoch = Some(field);
12825 }
12826 pub fn with_activation_epoch(mut self, field: u64) -> Self {
12828 self.set_activation_epoch(field);
12829 self
12830 }
12831 pub fn deactivation_epoch_opt_mut(&mut self) -> Option<&mut u64> {
12833 self.deactivation_epoch.as_mut().map(|field| field as _)
12834 }
12835 pub fn deactivation_epoch_mut(&mut self) -> &mut u64 {
12838 self.deactivation_epoch.get_or_insert_default()
12839 }
12840 pub fn deactivation_epoch_opt(&self) -> Option<u64> {
12842 self.deactivation_epoch.as_ref().map(|field| *field)
12843 }
12844 pub fn set_deactivation_epoch(&mut self, field: u64) {
12846 self.deactivation_epoch = Some(field);
12847 }
12848 pub fn with_deactivation_epoch(mut self, field: u64) -> Self {
12850 self.set_deactivation_epoch(field);
12851 self
12852 }
12853 pub fn sui_balance_opt_mut(&mut self) -> Option<&mut u64> {
12855 self.sui_balance.as_mut().map(|field| field as _)
12856 }
12857 pub fn sui_balance_mut(&mut self) -> &mut u64 {
12860 self.sui_balance.get_or_insert_default()
12861 }
12862 pub fn sui_balance_opt(&self) -> Option<u64> {
12864 self.sui_balance.as_ref().map(|field| *field)
12865 }
12866 pub fn set_sui_balance(&mut self, field: u64) {
12868 self.sui_balance = Some(field);
12869 }
12870 pub fn with_sui_balance(mut self, field: u64) -> Self {
12872 self.set_sui_balance(field);
12873 self
12874 }
12875 pub fn rewards_pool_opt_mut(&mut self) -> Option<&mut u64> {
12877 self.rewards_pool.as_mut().map(|field| field as _)
12878 }
12879 pub fn rewards_pool_mut(&mut self) -> &mut u64 {
12882 self.rewards_pool.get_or_insert_default()
12883 }
12884 pub fn rewards_pool_opt(&self) -> Option<u64> {
12886 self.rewards_pool.as_ref().map(|field| *field)
12887 }
12888 pub fn set_rewards_pool(&mut self, field: u64) {
12890 self.rewards_pool = Some(field);
12891 }
12892 pub fn with_rewards_pool(mut self, field: u64) -> Self {
12894 self.set_rewards_pool(field);
12895 self
12896 }
12897 pub fn pool_token_balance_opt_mut(&mut self) -> Option<&mut u64> {
12899 self.pool_token_balance.as_mut().map(|field| field as _)
12900 }
12901 pub fn pool_token_balance_mut(&mut self) -> &mut u64 {
12904 self.pool_token_balance.get_or_insert_default()
12905 }
12906 pub fn pool_token_balance_opt(&self) -> Option<u64> {
12908 self.pool_token_balance.as_ref().map(|field| *field)
12909 }
12910 pub fn set_pool_token_balance(&mut self, field: u64) {
12912 self.pool_token_balance = Some(field);
12913 }
12914 pub fn with_pool_token_balance(mut self, field: u64) -> Self {
12916 self.set_pool_token_balance(field);
12917 self
12918 }
12919 pub fn exchange_rates(&self) -> &super::MoveTable {
12921 self.exchange_rates
12922 .as_ref()
12923 .map(|field| field as _)
12924 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
12925 }
12926 pub fn exchange_rates_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
12928 self.exchange_rates.as_mut().map(|field| field as _)
12929 }
12930 pub fn exchange_rates_mut(&mut self) -> &mut super::MoveTable {
12933 self.exchange_rates.get_or_insert_default()
12934 }
12935 pub fn exchange_rates_opt(&self) -> Option<&super::MoveTable> {
12937 self.exchange_rates.as_ref().map(|field| field as _)
12938 }
12939 pub fn set_exchange_rates<T: Into<super::MoveTable>>(&mut self, field: T) {
12941 self.exchange_rates = Some(field.into().into());
12942 }
12943 pub fn with_exchange_rates<T: Into<super::MoveTable>>(
12945 mut self,
12946 field: T,
12947 ) -> Self {
12948 self.set_exchange_rates(field.into());
12949 self
12950 }
12951 pub fn pending_stake_opt_mut(&mut self) -> Option<&mut u64> {
12953 self.pending_stake.as_mut().map(|field| field as _)
12954 }
12955 pub fn pending_stake_mut(&mut self) -> &mut u64 {
12958 self.pending_stake.get_or_insert_default()
12959 }
12960 pub fn pending_stake_opt(&self) -> Option<u64> {
12962 self.pending_stake.as_ref().map(|field| *field)
12963 }
12964 pub fn set_pending_stake(&mut self, field: u64) {
12966 self.pending_stake = Some(field);
12967 }
12968 pub fn with_pending_stake(mut self, field: u64) -> Self {
12970 self.set_pending_stake(field);
12971 self
12972 }
12973 pub fn pending_total_sui_withdraw_opt_mut(&mut self) -> Option<&mut u64> {
12975 self.pending_total_sui_withdraw.as_mut().map(|field| field as _)
12976 }
12977 pub fn pending_total_sui_withdraw_mut(&mut self) -> &mut u64 {
12980 self.pending_total_sui_withdraw.get_or_insert_default()
12981 }
12982 pub fn pending_total_sui_withdraw_opt(&self) -> Option<u64> {
12984 self.pending_total_sui_withdraw.as_ref().map(|field| *field)
12985 }
12986 pub fn set_pending_total_sui_withdraw(&mut self, field: u64) {
12988 self.pending_total_sui_withdraw = Some(field);
12989 }
12990 pub fn with_pending_total_sui_withdraw(mut self, field: u64) -> Self {
12992 self.set_pending_total_sui_withdraw(field);
12993 self
12994 }
12995 pub fn pending_pool_token_withdraw_opt_mut(&mut self) -> Option<&mut u64> {
12997 self.pending_pool_token_withdraw.as_mut().map(|field| field as _)
12998 }
12999 pub fn pending_pool_token_withdraw_mut(&mut self) -> &mut u64 {
13002 self.pending_pool_token_withdraw.get_or_insert_default()
13003 }
13004 pub fn pending_pool_token_withdraw_opt(&self) -> Option<u64> {
13006 self.pending_pool_token_withdraw.as_ref().map(|field| *field)
13007 }
13008 pub fn set_pending_pool_token_withdraw(&mut self, field: u64) {
13010 self.pending_pool_token_withdraw = Some(field);
13011 }
13012 pub fn with_pending_pool_token_withdraw(mut self, field: u64) -> Self {
13014 self.set_pending_pool_token_withdraw(field);
13015 self
13016 }
13017 pub fn extra_fields(&self) -> &super::MoveTable {
13019 self.extra_fields
13020 .as_ref()
13021 .map(|field| field as _)
13022 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
13023 }
13024 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
13026 self.extra_fields.as_mut().map(|field| field as _)
13027 }
13028 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
13031 self.extra_fields.get_or_insert_default()
13032 }
13033 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
13035 self.extra_fields.as_ref().map(|field| field as _)
13036 }
13037 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
13039 self.extra_fields = Some(field.into().into());
13040 }
13041 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
13043 self.set_extra_fields(field.into());
13044 self
13045 }
13046 }
13047 impl super::StorageFund {
13048 pub const fn const_default() -> Self {
13049 Self {
13050 total_object_storage_rebates: None,
13051 non_refundable_balance: None,
13052 }
13053 }
13054 #[doc(hidden)]
13055 pub fn default_instance() -> &'static Self {
13056 static DEFAULT: super::StorageFund = super::StorageFund::const_default();
13057 &DEFAULT
13058 }
13059 pub fn total_object_storage_rebates_opt_mut(&mut self) -> Option<&mut u64> {
13061 self.total_object_storage_rebates.as_mut().map(|field| field as _)
13062 }
13063 pub fn total_object_storage_rebates_mut(&mut self) -> &mut u64 {
13066 self.total_object_storage_rebates.get_or_insert_default()
13067 }
13068 pub fn total_object_storage_rebates_opt(&self) -> Option<u64> {
13070 self.total_object_storage_rebates.as_ref().map(|field| *field)
13071 }
13072 pub fn set_total_object_storage_rebates(&mut self, field: u64) {
13074 self.total_object_storage_rebates = Some(field);
13075 }
13076 pub fn with_total_object_storage_rebates(mut self, field: u64) -> Self {
13078 self.set_total_object_storage_rebates(field);
13079 self
13080 }
13081 pub fn non_refundable_balance_opt_mut(&mut self) -> Option<&mut u64> {
13083 self.non_refundable_balance.as_mut().map(|field| field as _)
13084 }
13085 pub fn non_refundable_balance_mut(&mut self) -> &mut u64 {
13088 self.non_refundable_balance.get_or_insert_default()
13089 }
13090 pub fn non_refundable_balance_opt(&self) -> Option<u64> {
13092 self.non_refundable_balance.as_ref().map(|field| *field)
13093 }
13094 pub fn set_non_refundable_balance(&mut self, field: u64) {
13096 self.non_refundable_balance = Some(field);
13097 }
13098 pub fn with_non_refundable_balance(mut self, field: u64) -> Self {
13100 self.set_non_refundable_balance(field);
13101 self
13102 }
13103 }
13104 impl super::SubscribeCheckpointsRequest {
13105 pub const fn const_default() -> Self {
13106 Self { read_mask: None }
13107 }
13108 #[doc(hidden)]
13109 pub fn default_instance() -> &'static Self {
13110 static DEFAULT: super::SubscribeCheckpointsRequest = super::SubscribeCheckpointsRequest::const_default();
13111 &DEFAULT
13112 }
13113 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
13115 self.read_mask.as_mut().map(|field| field as _)
13116 }
13117 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
13120 self.read_mask.get_or_insert_default()
13121 }
13122 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
13124 self.read_mask.as_ref().map(|field| field as _)
13125 }
13126 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
13128 self.read_mask = Some(field.into().into());
13129 }
13130 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
13132 mut self,
13133 field: T,
13134 ) -> Self {
13135 self.set_read_mask(field.into());
13136 self
13137 }
13138 }
13139 impl super::SubscribeCheckpointsResponse {
13140 pub const fn const_default() -> Self {
13141 Self {
13142 cursor: None,
13143 checkpoint: None,
13144 }
13145 }
13146 #[doc(hidden)]
13147 pub fn default_instance() -> &'static Self {
13148 static DEFAULT: super::SubscribeCheckpointsResponse = super::SubscribeCheckpointsResponse::const_default();
13149 &DEFAULT
13150 }
13151 pub fn cursor_opt_mut(&mut self) -> Option<&mut u64> {
13153 self.cursor.as_mut().map(|field| field as _)
13154 }
13155 pub fn cursor_mut(&mut self) -> &mut u64 {
13158 self.cursor.get_or_insert_default()
13159 }
13160 pub fn cursor_opt(&self) -> Option<u64> {
13162 self.cursor.as_ref().map(|field| *field)
13163 }
13164 pub fn set_cursor(&mut self, field: u64) {
13166 self.cursor = Some(field);
13167 }
13168 pub fn with_cursor(mut self, field: u64) -> Self {
13170 self.set_cursor(field);
13171 self
13172 }
13173 pub fn checkpoint(&self) -> &super::Checkpoint {
13175 self.checkpoint
13176 .as_ref()
13177 .map(|field| field as _)
13178 .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
13179 }
13180 pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
13182 self.checkpoint.as_mut().map(|field| field as _)
13183 }
13184 pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
13187 self.checkpoint.get_or_insert_default()
13188 }
13189 pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
13191 self.checkpoint.as_ref().map(|field| field as _)
13192 }
13193 pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
13195 self.checkpoint = Some(field.into().into());
13196 }
13197 pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
13199 self.set_checkpoint(field.into());
13200 self
13201 }
13202 }
13203 impl super::SystemPackage {
13204 pub const fn const_default() -> Self {
13205 Self {
13206 version: None,
13207 modules: Vec::new(),
13208 dependencies: Vec::new(),
13209 }
13210 }
13211 #[doc(hidden)]
13212 pub fn default_instance() -> &'static Self {
13213 static DEFAULT: super::SystemPackage = super::SystemPackage::const_default();
13214 &DEFAULT
13215 }
13216 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
13218 self.version.as_mut().map(|field| field as _)
13219 }
13220 pub fn version_mut(&mut self) -> &mut u64 {
13223 self.version.get_or_insert_default()
13224 }
13225 pub fn version_opt(&self) -> Option<u64> {
13227 self.version.as_ref().map(|field| *field)
13228 }
13229 pub fn set_version(&mut self, field: u64) {
13231 self.version = Some(field);
13232 }
13233 pub fn with_version(mut self, field: u64) -> Self {
13235 self.set_version(field);
13236 self
13237 }
13238 pub fn modules(&self) -> &[::prost::bytes::Bytes] {
13240 &self.modules
13241 }
13242 pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
13245 &mut self.modules
13246 }
13247 pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
13249 self.modules = field;
13250 }
13251 pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
13253 self.set_modules(field);
13254 self
13255 }
13256 pub fn dependencies(&self) -> &[String] {
13258 &self.dependencies
13259 }
13260 pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
13263 &mut self.dependencies
13264 }
13265 pub fn set_dependencies(&mut self, field: Vec<String>) {
13267 self.dependencies = field;
13268 }
13269 pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
13271 self.set_dependencies(field);
13272 self
13273 }
13274 }
13275 impl super::SystemParameters {
13276 pub const fn const_default() -> Self {
13277 Self {
13278 epoch_duration_ms: None,
13279 stake_subsidy_start_epoch: None,
13280 min_validator_count: None,
13281 max_validator_count: None,
13282 min_validator_joining_stake: None,
13283 validator_low_stake_threshold: None,
13284 validator_very_low_stake_threshold: None,
13285 validator_low_stake_grace_period: None,
13286 extra_fields: None,
13287 }
13288 }
13289 #[doc(hidden)]
13290 pub fn default_instance() -> &'static Self {
13291 static DEFAULT: super::SystemParameters = super::SystemParameters::const_default();
13292 &DEFAULT
13293 }
13294 pub fn epoch_duration_ms_opt_mut(&mut self) -> Option<&mut u64> {
13296 self.epoch_duration_ms.as_mut().map(|field| field as _)
13297 }
13298 pub fn epoch_duration_ms_mut(&mut self) -> &mut u64 {
13301 self.epoch_duration_ms.get_or_insert_default()
13302 }
13303 pub fn epoch_duration_ms_opt(&self) -> Option<u64> {
13305 self.epoch_duration_ms.as_ref().map(|field| *field)
13306 }
13307 pub fn set_epoch_duration_ms(&mut self, field: u64) {
13309 self.epoch_duration_ms = Some(field);
13310 }
13311 pub fn with_epoch_duration_ms(mut self, field: u64) -> Self {
13313 self.set_epoch_duration_ms(field);
13314 self
13315 }
13316 pub fn stake_subsidy_start_epoch_opt_mut(&mut self) -> Option<&mut u64> {
13318 self.stake_subsidy_start_epoch.as_mut().map(|field| field as _)
13319 }
13320 pub fn stake_subsidy_start_epoch_mut(&mut self) -> &mut u64 {
13323 self.stake_subsidy_start_epoch.get_or_insert_default()
13324 }
13325 pub fn stake_subsidy_start_epoch_opt(&self) -> Option<u64> {
13327 self.stake_subsidy_start_epoch.as_ref().map(|field| *field)
13328 }
13329 pub fn set_stake_subsidy_start_epoch(&mut self, field: u64) {
13331 self.stake_subsidy_start_epoch = Some(field);
13332 }
13333 pub fn with_stake_subsidy_start_epoch(mut self, field: u64) -> Self {
13335 self.set_stake_subsidy_start_epoch(field);
13336 self
13337 }
13338 pub fn min_validator_count_opt_mut(&mut self) -> Option<&mut u64> {
13340 self.min_validator_count.as_mut().map(|field| field as _)
13341 }
13342 pub fn min_validator_count_mut(&mut self) -> &mut u64 {
13345 self.min_validator_count.get_or_insert_default()
13346 }
13347 pub fn min_validator_count_opt(&self) -> Option<u64> {
13349 self.min_validator_count.as_ref().map(|field| *field)
13350 }
13351 pub fn set_min_validator_count(&mut self, field: u64) {
13353 self.min_validator_count = Some(field);
13354 }
13355 pub fn with_min_validator_count(mut self, field: u64) -> Self {
13357 self.set_min_validator_count(field);
13358 self
13359 }
13360 pub fn max_validator_count_opt_mut(&mut self) -> Option<&mut u64> {
13362 self.max_validator_count.as_mut().map(|field| field as _)
13363 }
13364 pub fn max_validator_count_mut(&mut self) -> &mut u64 {
13367 self.max_validator_count.get_or_insert_default()
13368 }
13369 pub fn max_validator_count_opt(&self) -> Option<u64> {
13371 self.max_validator_count.as_ref().map(|field| *field)
13372 }
13373 pub fn set_max_validator_count(&mut self, field: u64) {
13375 self.max_validator_count = Some(field);
13376 }
13377 pub fn with_max_validator_count(mut self, field: u64) -> Self {
13379 self.set_max_validator_count(field);
13380 self
13381 }
13382 pub fn min_validator_joining_stake_opt_mut(&mut self) -> Option<&mut u64> {
13384 self.min_validator_joining_stake.as_mut().map(|field| field as _)
13385 }
13386 pub fn min_validator_joining_stake_mut(&mut self) -> &mut u64 {
13389 self.min_validator_joining_stake.get_or_insert_default()
13390 }
13391 pub fn min_validator_joining_stake_opt(&self) -> Option<u64> {
13393 self.min_validator_joining_stake.as_ref().map(|field| *field)
13394 }
13395 pub fn set_min_validator_joining_stake(&mut self, field: u64) {
13397 self.min_validator_joining_stake = Some(field);
13398 }
13399 pub fn with_min_validator_joining_stake(mut self, field: u64) -> Self {
13401 self.set_min_validator_joining_stake(field);
13402 self
13403 }
13404 pub fn validator_low_stake_threshold_opt_mut(&mut self) -> Option<&mut u64> {
13406 self.validator_low_stake_threshold.as_mut().map(|field| field as _)
13407 }
13408 pub fn validator_low_stake_threshold_mut(&mut self) -> &mut u64 {
13411 self.validator_low_stake_threshold.get_or_insert_default()
13412 }
13413 pub fn validator_low_stake_threshold_opt(&self) -> Option<u64> {
13415 self.validator_low_stake_threshold.as_ref().map(|field| *field)
13416 }
13417 pub fn set_validator_low_stake_threshold(&mut self, field: u64) {
13419 self.validator_low_stake_threshold = Some(field);
13420 }
13421 pub fn with_validator_low_stake_threshold(mut self, field: u64) -> Self {
13423 self.set_validator_low_stake_threshold(field);
13424 self
13425 }
13426 pub fn validator_very_low_stake_threshold_opt_mut(
13428 &mut self,
13429 ) -> Option<&mut u64> {
13430 self.validator_very_low_stake_threshold.as_mut().map(|field| field as _)
13431 }
13432 pub fn validator_very_low_stake_threshold_mut(&mut self) -> &mut u64 {
13435 self.validator_very_low_stake_threshold.get_or_insert_default()
13436 }
13437 pub fn validator_very_low_stake_threshold_opt(&self) -> Option<u64> {
13439 self.validator_very_low_stake_threshold.as_ref().map(|field| *field)
13440 }
13441 pub fn set_validator_very_low_stake_threshold(&mut self, field: u64) {
13443 self.validator_very_low_stake_threshold = Some(field);
13444 }
13445 pub fn with_validator_very_low_stake_threshold(mut self, field: u64) -> Self {
13447 self.set_validator_very_low_stake_threshold(field);
13448 self
13449 }
13450 pub fn validator_low_stake_grace_period_opt_mut(&mut self) -> Option<&mut u64> {
13452 self.validator_low_stake_grace_period.as_mut().map(|field| field as _)
13453 }
13454 pub fn validator_low_stake_grace_period_mut(&mut self) -> &mut u64 {
13457 self.validator_low_stake_grace_period.get_or_insert_default()
13458 }
13459 pub fn validator_low_stake_grace_period_opt(&self) -> Option<u64> {
13461 self.validator_low_stake_grace_period.as_ref().map(|field| *field)
13462 }
13463 pub fn set_validator_low_stake_grace_period(&mut self, field: u64) {
13465 self.validator_low_stake_grace_period = Some(field);
13466 }
13467 pub fn with_validator_low_stake_grace_period(mut self, field: u64) -> Self {
13469 self.set_validator_low_stake_grace_period(field);
13470 self
13471 }
13472 pub fn extra_fields(&self) -> &super::MoveTable {
13474 self.extra_fields
13475 .as_ref()
13476 .map(|field| field as _)
13477 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
13478 }
13479 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
13481 self.extra_fields.as_mut().map(|field| field as _)
13482 }
13483 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
13486 self.extra_fields.get_or_insert_default()
13487 }
13488 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
13490 self.extra_fields.as_ref().map(|field| field as _)
13491 }
13492 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
13494 self.extra_fields = Some(field.into().into());
13495 }
13496 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
13498 self.set_extra_fields(field.into());
13499 self
13500 }
13501 }
13502 impl super::SystemState {
13503 pub const fn const_default() -> Self {
13504 Self {
13505 version: None,
13506 epoch: None,
13507 protocol_version: None,
13508 validators: None,
13509 storage_fund: None,
13510 parameters: None,
13511 reference_gas_price: None,
13512 validator_report_records: Vec::new(),
13513 stake_subsidy: None,
13514 safe_mode: None,
13515 safe_mode_storage_rewards: None,
13516 safe_mode_computation_rewards: None,
13517 safe_mode_storage_rebates: None,
13518 safe_mode_non_refundable_storage_fee: None,
13519 epoch_start_timestamp_ms: None,
13520 extra_fields: None,
13521 }
13522 }
13523 #[doc(hidden)]
13524 pub fn default_instance() -> &'static Self {
13525 static DEFAULT: super::SystemState = super::SystemState::const_default();
13526 &DEFAULT
13527 }
13528 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
13530 self.version.as_mut().map(|field| field as _)
13531 }
13532 pub fn version_mut(&mut self) -> &mut u64 {
13535 self.version.get_or_insert_default()
13536 }
13537 pub fn version_opt(&self) -> Option<u64> {
13539 self.version.as_ref().map(|field| *field)
13540 }
13541 pub fn set_version(&mut self, field: u64) {
13543 self.version = Some(field);
13544 }
13545 pub fn with_version(mut self, field: u64) -> Self {
13547 self.set_version(field);
13548 self
13549 }
13550 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
13552 self.epoch.as_mut().map(|field| field as _)
13553 }
13554 pub fn epoch_mut(&mut self) -> &mut u64 {
13557 self.epoch.get_or_insert_default()
13558 }
13559 pub fn epoch_opt(&self) -> Option<u64> {
13561 self.epoch.as_ref().map(|field| *field)
13562 }
13563 pub fn set_epoch(&mut self, field: u64) {
13565 self.epoch = Some(field);
13566 }
13567 pub fn with_epoch(mut self, field: u64) -> Self {
13569 self.set_epoch(field);
13570 self
13571 }
13572 pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
13574 self.protocol_version.as_mut().map(|field| field as _)
13575 }
13576 pub fn protocol_version_mut(&mut self) -> &mut u64 {
13579 self.protocol_version.get_or_insert_default()
13580 }
13581 pub fn protocol_version_opt(&self) -> Option<u64> {
13583 self.protocol_version.as_ref().map(|field| *field)
13584 }
13585 pub fn set_protocol_version(&mut self, field: u64) {
13587 self.protocol_version = Some(field);
13588 }
13589 pub fn with_protocol_version(mut self, field: u64) -> Self {
13591 self.set_protocol_version(field);
13592 self
13593 }
13594 pub fn validators(&self) -> &super::ValidatorSet {
13596 self.validators
13597 .as_ref()
13598 .map(|field| field as _)
13599 .unwrap_or_else(|| super::ValidatorSet::default_instance() as _)
13600 }
13601 pub fn validators_opt_mut(&mut self) -> Option<&mut super::ValidatorSet> {
13603 self.validators.as_mut().map(|field| field as _)
13604 }
13605 pub fn validators_mut(&mut self) -> &mut super::ValidatorSet {
13608 self.validators.get_or_insert_default()
13609 }
13610 pub fn validators_opt(&self) -> Option<&super::ValidatorSet> {
13612 self.validators.as_ref().map(|field| field as _)
13613 }
13614 pub fn set_validators<T: Into<super::ValidatorSet>>(&mut self, field: T) {
13616 self.validators = Some(field.into().into());
13617 }
13618 pub fn with_validators<T: Into<super::ValidatorSet>>(
13620 mut self,
13621 field: T,
13622 ) -> Self {
13623 self.set_validators(field.into());
13624 self
13625 }
13626 pub fn storage_fund(&self) -> &super::StorageFund {
13628 self.storage_fund
13629 .as_ref()
13630 .map(|field| field as _)
13631 .unwrap_or_else(|| super::StorageFund::default_instance() as _)
13632 }
13633 pub fn storage_fund_opt_mut(&mut self) -> Option<&mut super::StorageFund> {
13635 self.storage_fund.as_mut().map(|field| field as _)
13636 }
13637 pub fn storage_fund_mut(&mut self) -> &mut super::StorageFund {
13640 self.storage_fund.get_or_insert_default()
13641 }
13642 pub fn storage_fund_opt(&self) -> Option<&super::StorageFund> {
13644 self.storage_fund.as_ref().map(|field| field as _)
13645 }
13646 pub fn set_storage_fund<T: Into<super::StorageFund>>(&mut self, field: T) {
13648 self.storage_fund = Some(field.into().into());
13649 }
13650 pub fn with_storage_fund<T: Into<super::StorageFund>>(
13652 mut self,
13653 field: T,
13654 ) -> Self {
13655 self.set_storage_fund(field.into());
13656 self
13657 }
13658 pub fn parameters(&self) -> &super::SystemParameters {
13660 self.parameters
13661 .as_ref()
13662 .map(|field| field as _)
13663 .unwrap_or_else(|| super::SystemParameters::default_instance() as _)
13664 }
13665 pub fn parameters_opt_mut(&mut self) -> Option<&mut super::SystemParameters> {
13667 self.parameters.as_mut().map(|field| field as _)
13668 }
13669 pub fn parameters_mut(&mut self) -> &mut super::SystemParameters {
13672 self.parameters.get_or_insert_default()
13673 }
13674 pub fn parameters_opt(&self) -> Option<&super::SystemParameters> {
13676 self.parameters.as_ref().map(|field| field as _)
13677 }
13678 pub fn set_parameters<T: Into<super::SystemParameters>>(&mut self, field: T) {
13680 self.parameters = Some(field.into().into());
13681 }
13682 pub fn with_parameters<T: Into<super::SystemParameters>>(
13684 mut self,
13685 field: T,
13686 ) -> Self {
13687 self.set_parameters(field.into());
13688 self
13689 }
13690 pub fn reference_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
13692 self.reference_gas_price.as_mut().map(|field| field as _)
13693 }
13694 pub fn reference_gas_price_mut(&mut self) -> &mut u64 {
13697 self.reference_gas_price.get_or_insert_default()
13698 }
13699 pub fn reference_gas_price_opt(&self) -> Option<u64> {
13701 self.reference_gas_price.as_ref().map(|field| *field)
13702 }
13703 pub fn set_reference_gas_price(&mut self, field: u64) {
13705 self.reference_gas_price = Some(field);
13706 }
13707 pub fn with_reference_gas_price(mut self, field: u64) -> Self {
13709 self.set_reference_gas_price(field);
13710 self
13711 }
13712 pub fn validator_report_records(&self) -> &[super::ValidatorReportRecord] {
13714 &self.validator_report_records
13715 }
13716 pub fn validator_report_records_mut(
13719 &mut self,
13720 ) -> &mut Vec<super::ValidatorReportRecord> {
13721 &mut self.validator_report_records
13722 }
13723 pub fn set_validator_report_records(
13725 &mut self,
13726 field: Vec<super::ValidatorReportRecord>,
13727 ) {
13728 self.validator_report_records = field;
13729 }
13730 pub fn with_validator_report_records(
13732 mut self,
13733 field: Vec<super::ValidatorReportRecord>,
13734 ) -> Self {
13735 self.set_validator_report_records(field);
13736 self
13737 }
13738 pub fn stake_subsidy(&self) -> &super::StakeSubsidy {
13740 self.stake_subsidy
13741 .as_ref()
13742 .map(|field| field as _)
13743 .unwrap_or_else(|| super::StakeSubsidy::default_instance() as _)
13744 }
13745 pub fn stake_subsidy_opt_mut(&mut self) -> Option<&mut super::StakeSubsidy> {
13747 self.stake_subsidy.as_mut().map(|field| field as _)
13748 }
13749 pub fn stake_subsidy_mut(&mut self) -> &mut super::StakeSubsidy {
13752 self.stake_subsidy.get_or_insert_default()
13753 }
13754 pub fn stake_subsidy_opt(&self) -> Option<&super::StakeSubsidy> {
13756 self.stake_subsidy.as_ref().map(|field| field as _)
13757 }
13758 pub fn set_stake_subsidy<T: Into<super::StakeSubsidy>>(&mut self, field: T) {
13760 self.stake_subsidy = Some(field.into().into());
13761 }
13762 pub fn with_stake_subsidy<T: Into<super::StakeSubsidy>>(
13764 mut self,
13765 field: T,
13766 ) -> Self {
13767 self.set_stake_subsidy(field.into());
13768 self
13769 }
13770 pub fn safe_mode_opt_mut(&mut self) -> Option<&mut bool> {
13772 self.safe_mode.as_mut().map(|field| field as _)
13773 }
13774 pub fn safe_mode_mut(&mut self) -> &mut bool {
13777 self.safe_mode.get_or_insert_default()
13778 }
13779 pub fn safe_mode_opt(&self) -> Option<bool> {
13781 self.safe_mode.as_ref().map(|field| *field)
13782 }
13783 pub fn set_safe_mode(&mut self, field: bool) {
13785 self.safe_mode = Some(field);
13786 }
13787 pub fn with_safe_mode(mut self, field: bool) -> Self {
13789 self.set_safe_mode(field);
13790 self
13791 }
13792 pub fn safe_mode_storage_rewards_opt_mut(&mut self) -> Option<&mut u64> {
13794 self.safe_mode_storage_rewards.as_mut().map(|field| field as _)
13795 }
13796 pub fn safe_mode_storage_rewards_mut(&mut self) -> &mut u64 {
13799 self.safe_mode_storage_rewards.get_or_insert_default()
13800 }
13801 pub fn safe_mode_storage_rewards_opt(&self) -> Option<u64> {
13803 self.safe_mode_storage_rewards.as_ref().map(|field| *field)
13804 }
13805 pub fn set_safe_mode_storage_rewards(&mut self, field: u64) {
13807 self.safe_mode_storage_rewards = Some(field);
13808 }
13809 pub fn with_safe_mode_storage_rewards(mut self, field: u64) -> Self {
13811 self.set_safe_mode_storage_rewards(field);
13812 self
13813 }
13814 pub fn safe_mode_computation_rewards_opt_mut(&mut self) -> Option<&mut u64> {
13816 self.safe_mode_computation_rewards.as_mut().map(|field| field as _)
13817 }
13818 pub fn safe_mode_computation_rewards_mut(&mut self) -> &mut u64 {
13821 self.safe_mode_computation_rewards.get_or_insert_default()
13822 }
13823 pub fn safe_mode_computation_rewards_opt(&self) -> Option<u64> {
13825 self.safe_mode_computation_rewards.as_ref().map(|field| *field)
13826 }
13827 pub fn set_safe_mode_computation_rewards(&mut self, field: u64) {
13829 self.safe_mode_computation_rewards = Some(field);
13830 }
13831 pub fn with_safe_mode_computation_rewards(mut self, field: u64) -> Self {
13833 self.set_safe_mode_computation_rewards(field);
13834 self
13835 }
13836 pub fn safe_mode_storage_rebates_opt_mut(&mut self) -> Option<&mut u64> {
13838 self.safe_mode_storage_rebates.as_mut().map(|field| field as _)
13839 }
13840 pub fn safe_mode_storage_rebates_mut(&mut self) -> &mut u64 {
13843 self.safe_mode_storage_rebates.get_or_insert_default()
13844 }
13845 pub fn safe_mode_storage_rebates_opt(&self) -> Option<u64> {
13847 self.safe_mode_storage_rebates.as_ref().map(|field| *field)
13848 }
13849 pub fn set_safe_mode_storage_rebates(&mut self, field: u64) {
13851 self.safe_mode_storage_rebates = Some(field);
13852 }
13853 pub fn with_safe_mode_storage_rebates(mut self, field: u64) -> Self {
13855 self.set_safe_mode_storage_rebates(field);
13856 self
13857 }
13858 pub fn safe_mode_non_refundable_storage_fee_opt_mut(
13860 &mut self,
13861 ) -> Option<&mut u64> {
13862 self.safe_mode_non_refundable_storage_fee.as_mut().map(|field| field as _)
13863 }
13864 pub fn safe_mode_non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
13867 self.safe_mode_non_refundable_storage_fee.get_or_insert_default()
13868 }
13869 pub fn safe_mode_non_refundable_storage_fee_opt(&self) -> Option<u64> {
13871 self.safe_mode_non_refundable_storage_fee.as_ref().map(|field| *field)
13872 }
13873 pub fn set_safe_mode_non_refundable_storage_fee(&mut self, field: u64) {
13875 self.safe_mode_non_refundable_storage_fee = Some(field);
13876 }
13877 pub fn with_safe_mode_non_refundable_storage_fee(mut self, field: u64) -> Self {
13879 self.set_safe_mode_non_refundable_storage_fee(field);
13880 self
13881 }
13882 pub fn epoch_start_timestamp_ms_opt_mut(&mut self) -> Option<&mut u64> {
13884 self.epoch_start_timestamp_ms.as_mut().map(|field| field as _)
13885 }
13886 pub fn epoch_start_timestamp_ms_mut(&mut self) -> &mut u64 {
13889 self.epoch_start_timestamp_ms.get_or_insert_default()
13890 }
13891 pub fn epoch_start_timestamp_ms_opt(&self) -> Option<u64> {
13893 self.epoch_start_timestamp_ms.as_ref().map(|field| *field)
13894 }
13895 pub fn set_epoch_start_timestamp_ms(&mut self, field: u64) {
13897 self.epoch_start_timestamp_ms = Some(field);
13898 }
13899 pub fn with_epoch_start_timestamp_ms(mut self, field: u64) -> Self {
13901 self.set_epoch_start_timestamp_ms(field);
13902 self
13903 }
13904 pub fn extra_fields(&self) -> &super::MoveTable {
13906 self.extra_fields
13907 .as_ref()
13908 .map(|field| field as _)
13909 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
13910 }
13911 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
13913 self.extra_fields.as_mut().map(|field| field as _)
13914 }
13915 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
13918 self.extra_fields.get_or_insert_default()
13919 }
13920 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
13922 self.extra_fields.as_ref().map(|field| field as _)
13923 }
13924 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
13926 self.extra_fields = Some(field.into().into());
13927 }
13928 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
13930 self.set_extra_fields(field.into());
13931 self
13932 }
13933 }
13934 impl super::Transaction {
13935 pub const fn const_default() -> Self {
13936 Self {
13937 bcs: None,
13938 digest: None,
13939 version: None,
13940 kind: None,
13941 sender: None,
13942 gas_payment: None,
13943 expiration: None,
13944 }
13945 }
13946 #[doc(hidden)]
13947 pub fn default_instance() -> &'static Self {
13948 static DEFAULT: super::Transaction = super::Transaction::const_default();
13949 &DEFAULT
13950 }
13951 pub fn bcs(&self) -> &super::Bcs {
13953 self.bcs
13954 .as_ref()
13955 .map(|field| field as _)
13956 .unwrap_or_else(|| super::Bcs::default_instance() as _)
13957 }
13958 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
13960 self.bcs.as_mut().map(|field| field as _)
13961 }
13962 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
13965 self.bcs.get_or_insert_default()
13966 }
13967 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
13969 self.bcs.as_ref().map(|field| field as _)
13970 }
13971 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
13973 self.bcs = Some(field.into().into());
13974 }
13975 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
13977 self.set_bcs(field.into());
13978 self
13979 }
13980 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
13982 self.digest.as_mut().map(|field| field as _)
13983 }
13984 pub fn digest_mut(&mut self) -> &mut String {
13987 self.digest.get_or_insert_default()
13988 }
13989 pub fn digest_opt(&self) -> Option<&str> {
13991 self.digest.as_ref().map(|field| field as _)
13992 }
13993 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
13995 self.digest = Some(field.into().into());
13996 }
13997 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
13999 self.set_digest(field.into());
14000 self
14001 }
14002 pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
14004 self.version.as_mut().map(|field| field as _)
14005 }
14006 pub fn version_mut(&mut self) -> &mut i32 {
14009 self.version.get_or_insert_default()
14010 }
14011 pub fn version_opt(&self) -> Option<i32> {
14013 self.version.as_ref().map(|field| *field)
14014 }
14015 pub fn set_version(&mut self, field: i32) {
14017 self.version = Some(field);
14018 }
14019 pub fn with_version(mut self, field: i32) -> Self {
14021 self.set_version(field);
14022 self
14023 }
14024 pub fn kind(&self) -> &super::TransactionKind {
14026 self.kind
14027 .as_ref()
14028 .map(|field| field as _)
14029 .unwrap_or_else(|| super::TransactionKind::default_instance() as _)
14030 }
14031 pub fn kind_opt_mut(&mut self) -> Option<&mut super::TransactionKind> {
14033 self.kind.as_mut().map(|field| field as _)
14034 }
14035 pub fn kind_mut(&mut self) -> &mut super::TransactionKind {
14038 self.kind.get_or_insert_default()
14039 }
14040 pub fn kind_opt(&self) -> Option<&super::TransactionKind> {
14042 self.kind.as_ref().map(|field| field as _)
14043 }
14044 pub fn set_kind<T: Into<super::TransactionKind>>(&mut self, field: T) {
14046 self.kind = Some(field.into().into());
14047 }
14048 pub fn with_kind<T: Into<super::TransactionKind>>(mut self, field: T) -> Self {
14050 self.set_kind(field.into());
14051 self
14052 }
14053 pub fn sender_opt_mut(&mut self) -> Option<&mut String> {
14055 self.sender.as_mut().map(|field| field as _)
14056 }
14057 pub fn sender_mut(&mut self) -> &mut String {
14060 self.sender.get_or_insert_default()
14061 }
14062 pub fn sender_opt(&self) -> Option<&str> {
14064 self.sender.as_ref().map(|field| field as _)
14065 }
14066 pub fn set_sender<T: Into<String>>(&mut self, field: T) {
14068 self.sender = Some(field.into().into());
14069 }
14070 pub fn with_sender<T: Into<String>>(mut self, field: T) -> Self {
14072 self.set_sender(field.into());
14073 self
14074 }
14075 pub fn gas_payment(&self) -> &super::GasPayment {
14077 self.gas_payment
14078 .as_ref()
14079 .map(|field| field as _)
14080 .unwrap_or_else(|| super::GasPayment::default_instance() as _)
14081 }
14082 pub fn gas_payment_opt_mut(&mut self) -> Option<&mut super::GasPayment> {
14084 self.gas_payment.as_mut().map(|field| field as _)
14085 }
14086 pub fn gas_payment_mut(&mut self) -> &mut super::GasPayment {
14089 self.gas_payment.get_or_insert_default()
14090 }
14091 pub fn gas_payment_opt(&self) -> Option<&super::GasPayment> {
14093 self.gas_payment.as_ref().map(|field| field as _)
14094 }
14095 pub fn set_gas_payment<T: Into<super::GasPayment>>(&mut self, field: T) {
14097 self.gas_payment = Some(field.into().into());
14098 }
14099 pub fn with_gas_payment<T: Into<super::GasPayment>>(mut self, field: T) -> Self {
14101 self.set_gas_payment(field.into());
14102 self
14103 }
14104 pub fn expiration(&self) -> &super::TransactionExpiration {
14106 self.expiration
14107 .as_ref()
14108 .map(|field| field as _)
14109 .unwrap_or_else(|| super::TransactionExpiration::default_instance() as _)
14110 }
14111 pub fn expiration_opt_mut(
14113 &mut self,
14114 ) -> Option<&mut super::TransactionExpiration> {
14115 self.expiration.as_mut().map(|field| field as _)
14116 }
14117 pub fn expiration_mut(&mut self) -> &mut super::TransactionExpiration {
14120 self.expiration.get_or_insert_default()
14121 }
14122 pub fn expiration_opt(&self) -> Option<&super::TransactionExpiration> {
14124 self.expiration.as_ref().map(|field| field as _)
14125 }
14126 pub fn set_expiration<T: Into<super::TransactionExpiration>>(
14128 &mut self,
14129 field: T,
14130 ) {
14131 self.expiration = Some(field.into().into());
14132 }
14133 pub fn with_expiration<T: Into<super::TransactionExpiration>>(
14135 mut self,
14136 field: T,
14137 ) -> Self {
14138 self.set_expiration(field.into());
14139 self
14140 }
14141 }
14142 impl super::TransactionEffects {
14143 pub const fn const_default() -> Self {
14144 Self {
14145 bcs: None,
14146 digest: None,
14147 version: None,
14148 status: None,
14149 epoch: None,
14150 gas_used: None,
14151 transaction_digest: None,
14152 gas_object: None,
14153 events_digest: None,
14154 dependencies: Vec::new(),
14155 lamport_version: None,
14156 changed_objects: Vec::new(),
14157 unchanged_consensus_objects: Vec::new(),
14158 auxiliary_data_digest: None,
14159 unchanged_loaded_runtime_objects: Vec::new(),
14160 }
14161 }
14162 #[doc(hidden)]
14163 pub fn default_instance() -> &'static Self {
14164 static DEFAULT: super::TransactionEffects = super::TransactionEffects::const_default();
14165 &DEFAULT
14166 }
14167 pub fn bcs(&self) -> &super::Bcs {
14169 self.bcs
14170 .as_ref()
14171 .map(|field| field as _)
14172 .unwrap_or_else(|| super::Bcs::default_instance() as _)
14173 }
14174 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
14176 self.bcs.as_mut().map(|field| field as _)
14177 }
14178 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
14181 self.bcs.get_or_insert_default()
14182 }
14183 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
14185 self.bcs.as_ref().map(|field| field as _)
14186 }
14187 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
14189 self.bcs = Some(field.into().into());
14190 }
14191 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
14193 self.set_bcs(field.into());
14194 self
14195 }
14196 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
14198 self.digest.as_mut().map(|field| field as _)
14199 }
14200 pub fn digest_mut(&mut self) -> &mut String {
14203 self.digest.get_or_insert_default()
14204 }
14205 pub fn digest_opt(&self) -> Option<&str> {
14207 self.digest.as_ref().map(|field| field as _)
14208 }
14209 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
14211 self.digest = Some(field.into().into());
14212 }
14213 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
14215 self.set_digest(field.into());
14216 self
14217 }
14218 pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
14220 self.version.as_mut().map(|field| field as _)
14221 }
14222 pub fn version_mut(&mut self) -> &mut i32 {
14225 self.version.get_or_insert_default()
14226 }
14227 pub fn version_opt(&self) -> Option<i32> {
14229 self.version.as_ref().map(|field| *field)
14230 }
14231 pub fn set_version(&mut self, field: i32) {
14233 self.version = Some(field);
14234 }
14235 pub fn with_version(mut self, field: i32) -> Self {
14237 self.set_version(field);
14238 self
14239 }
14240 pub fn status(&self) -> &super::ExecutionStatus {
14242 self.status
14243 .as_ref()
14244 .map(|field| field as _)
14245 .unwrap_or_else(|| super::ExecutionStatus::default_instance() as _)
14246 }
14247 pub fn status_opt_mut(&mut self) -> Option<&mut super::ExecutionStatus> {
14249 self.status.as_mut().map(|field| field as _)
14250 }
14251 pub fn status_mut(&mut self) -> &mut super::ExecutionStatus {
14254 self.status.get_or_insert_default()
14255 }
14256 pub fn status_opt(&self) -> Option<&super::ExecutionStatus> {
14258 self.status.as_ref().map(|field| field as _)
14259 }
14260 pub fn set_status<T: Into<super::ExecutionStatus>>(&mut self, field: T) {
14262 self.status = Some(field.into().into());
14263 }
14264 pub fn with_status<T: Into<super::ExecutionStatus>>(mut self, field: T) -> Self {
14266 self.set_status(field.into());
14267 self
14268 }
14269 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
14271 self.epoch.as_mut().map(|field| field as _)
14272 }
14273 pub fn epoch_mut(&mut self) -> &mut u64 {
14276 self.epoch.get_or_insert_default()
14277 }
14278 pub fn epoch_opt(&self) -> Option<u64> {
14280 self.epoch.as_ref().map(|field| *field)
14281 }
14282 pub fn set_epoch(&mut self, field: u64) {
14284 self.epoch = Some(field);
14285 }
14286 pub fn with_epoch(mut self, field: u64) -> Self {
14288 self.set_epoch(field);
14289 self
14290 }
14291 pub fn gas_used(&self) -> &super::GasCostSummary {
14293 self.gas_used
14294 .as_ref()
14295 .map(|field| field as _)
14296 .unwrap_or_else(|| super::GasCostSummary::default_instance() as _)
14297 }
14298 pub fn gas_used_opt_mut(&mut self) -> Option<&mut super::GasCostSummary> {
14300 self.gas_used.as_mut().map(|field| field as _)
14301 }
14302 pub fn gas_used_mut(&mut self) -> &mut super::GasCostSummary {
14305 self.gas_used.get_or_insert_default()
14306 }
14307 pub fn gas_used_opt(&self) -> Option<&super::GasCostSummary> {
14309 self.gas_used.as_ref().map(|field| field as _)
14310 }
14311 pub fn set_gas_used<T: Into<super::GasCostSummary>>(&mut self, field: T) {
14313 self.gas_used = Some(field.into().into());
14314 }
14315 pub fn with_gas_used<T: Into<super::GasCostSummary>>(
14317 mut self,
14318 field: T,
14319 ) -> Self {
14320 self.set_gas_used(field.into());
14321 self
14322 }
14323 pub fn transaction_digest_opt_mut(&mut self) -> Option<&mut String> {
14325 self.transaction_digest.as_mut().map(|field| field as _)
14326 }
14327 pub fn transaction_digest_mut(&mut self) -> &mut String {
14330 self.transaction_digest.get_or_insert_default()
14331 }
14332 pub fn transaction_digest_opt(&self) -> Option<&str> {
14334 self.transaction_digest.as_ref().map(|field| field as _)
14335 }
14336 pub fn set_transaction_digest<T: Into<String>>(&mut self, field: T) {
14338 self.transaction_digest = Some(field.into().into());
14339 }
14340 pub fn with_transaction_digest<T: Into<String>>(mut self, field: T) -> Self {
14342 self.set_transaction_digest(field.into());
14343 self
14344 }
14345 pub fn gas_object(&self) -> &super::ChangedObject {
14347 self.gas_object
14348 .as_ref()
14349 .map(|field| field as _)
14350 .unwrap_or_else(|| super::ChangedObject::default_instance() as _)
14351 }
14352 pub fn gas_object_opt_mut(&mut self) -> Option<&mut super::ChangedObject> {
14354 self.gas_object.as_mut().map(|field| field as _)
14355 }
14356 pub fn gas_object_mut(&mut self) -> &mut super::ChangedObject {
14359 self.gas_object.get_or_insert_default()
14360 }
14361 pub fn gas_object_opt(&self) -> Option<&super::ChangedObject> {
14363 self.gas_object.as_ref().map(|field| field as _)
14364 }
14365 pub fn set_gas_object<T: Into<super::ChangedObject>>(&mut self, field: T) {
14367 self.gas_object = Some(field.into().into());
14368 }
14369 pub fn with_gas_object<T: Into<super::ChangedObject>>(
14371 mut self,
14372 field: T,
14373 ) -> Self {
14374 self.set_gas_object(field.into());
14375 self
14376 }
14377 pub fn events_digest_opt_mut(&mut self) -> Option<&mut String> {
14379 self.events_digest.as_mut().map(|field| field as _)
14380 }
14381 pub fn events_digest_mut(&mut self) -> &mut String {
14384 self.events_digest.get_or_insert_default()
14385 }
14386 pub fn events_digest_opt(&self) -> Option<&str> {
14388 self.events_digest.as_ref().map(|field| field as _)
14389 }
14390 pub fn set_events_digest<T: Into<String>>(&mut self, field: T) {
14392 self.events_digest = Some(field.into().into());
14393 }
14394 pub fn with_events_digest<T: Into<String>>(mut self, field: T) -> Self {
14396 self.set_events_digest(field.into());
14397 self
14398 }
14399 pub fn dependencies(&self) -> &[String] {
14401 &self.dependencies
14402 }
14403 pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
14406 &mut self.dependencies
14407 }
14408 pub fn set_dependencies(&mut self, field: Vec<String>) {
14410 self.dependencies = field;
14411 }
14412 pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
14414 self.set_dependencies(field);
14415 self
14416 }
14417 pub fn lamport_version_opt_mut(&mut self) -> Option<&mut u64> {
14419 self.lamport_version.as_mut().map(|field| field as _)
14420 }
14421 pub fn lamport_version_mut(&mut self) -> &mut u64 {
14424 self.lamport_version.get_or_insert_default()
14425 }
14426 pub fn lamport_version_opt(&self) -> Option<u64> {
14428 self.lamport_version.as_ref().map(|field| *field)
14429 }
14430 pub fn set_lamport_version(&mut self, field: u64) {
14432 self.lamport_version = Some(field);
14433 }
14434 pub fn with_lamport_version(mut self, field: u64) -> Self {
14436 self.set_lamport_version(field);
14437 self
14438 }
14439 pub fn changed_objects(&self) -> &[super::ChangedObject] {
14441 &self.changed_objects
14442 }
14443 pub fn changed_objects_mut(&mut self) -> &mut Vec<super::ChangedObject> {
14446 &mut self.changed_objects
14447 }
14448 pub fn set_changed_objects(&mut self, field: Vec<super::ChangedObject>) {
14450 self.changed_objects = field;
14451 }
14452 pub fn with_changed_objects(mut self, field: Vec<super::ChangedObject>) -> Self {
14454 self.set_changed_objects(field);
14455 self
14456 }
14457 pub fn unchanged_consensus_objects(&self) -> &[super::UnchangedConsensusObject] {
14459 &self.unchanged_consensus_objects
14460 }
14461 pub fn unchanged_consensus_objects_mut(
14464 &mut self,
14465 ) -> &mut Vec<super::UnchangedConsensusObject> {
14466 &mut self.unchanged_consensus_objects
14467 }
14468 pub fn set_unchanged_consensus_objects(
14470 &mut self,
14471 field: Vec<super::UnchangedConsensusObject>,
14472 ) {
14473 self.unchanged_consensus_objects = field;
14474 }
14475 pub fn with_unchanged_consensus_objects(
14477 mut self,
14478 field: Vec<super::UnchangedConsensusObject>,
14479 ) -> Self {
14480 self.set_unchanged_consensus_objects(field);
14481 self
14482 }
14483 pub fn auxiliary_data_digest_opt_mut(&mut self) -> Option<&mut String> {
14485 self.auxiliary_data_digest.as_mut().map(|field| field as _)
14486 }
14487 pub fn auxiliary_data_digest_mut(&mut self) -> &mut String {
14490 self.auxiliary_data_digest.get_or_insert_default()
14491 }
14492 pub fn auxiliary_data_digest_opt(&self) -> Option<&str> {
14494 self.auxiliary_data_digest.as_ref().map(|field| field as _)
14495 }
14496 pub fn set_auxiliary_data_digest<T: Into<String>>(&mut self, field: T) {
14498 self.auxiliary_data_digest = Some(field.into().into());
14499 }
14500 pub fn with_auxiliary_data_digest<T: Into<String>>(mut self, field: T) -> Self {
14502 self.set_auxiliary_data_digest(field.into());
14503 self
14504 }
14505 pub fn unchanged_loaded_runtime_objects(&self) -> &[super::ObjectReference] {
14507 &self.unchanged_loaded_runtime_objects
14508 }
14509 pub fn unchanged_loaded_runtime_objects_mut(
14512 &mut self,
14513 ) -> &mut Vec<super::ObjectReference> {
14514 &mut self.unchanged_loaded_runtime_objects
14515 }
14516 pub fn set_unchanged_loaded_runtime_objects(
14518 &mut self,
14519 field: Vec<super::ObjectReference>,
14520 ) {
14521 self.unchanged_loaded_runtime_objects = field;
14522 }
14523 pub fn with_unchanged_loaded_runtime_objects(
14525 mut self,
14526 field: Vec<super::ObjectReference>,
14527 ) -> Self {
14528 self.set_unchanged_loaded_runtime_objects(field);
14529 self
14530 }
14531 }
14532 impl super::TransactionEvents {
14533 pub const fn const_default() -> Self {
14534 Self {
14535 bcs: None,
14536 digest: None,
14537 events: Vec::new(),
14538 }
14539 }
14540 #[doc(hidden)]
14541 pub fn default_instance() -> &'static Self {
14542 static DEFAULT: super::TransactionEvents = super::TransactionEvents::const_default();
14543 &DEFAULT
14544 }
14545 pub fn bcs(&self) -> &super::Bcs {
14547 self.bcs
14548 .as_ref()
14549 .map(|field| field as _)
14550 .unwrap_or_else(|| super::Bcs::default_instance() as _)
14551 }
14552 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
14554 self.bcs.as_mut().map(|field| field as _)
14555 }
14556 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
14559 self.bcs.get_or_insert_default()
14560 }
14561 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
14563 self.bcs.as_ref().map(|field| field as _)
14564 }
14565 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
14567 self.bcs = Some(field.into().into());
14568 }
14569 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
14571 self.set_bcs(field.into());
14572 self
14573 }
14574 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
14576 self.digest.as_mut().map(|field| field as _)
14577 }
14578 pub fn digest_mut(&mut self) -> &mut String {
14581 self.digest.get_or_insert_default()
14582 }
14583 pub fn digest_opt(&self) -> Option<&str> {
14585 self.digest.as_ref().map(|field| field as _)
14586 }
14587 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
14589 self.digest = Some(field.into().into());
14590 }
14591 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
14593 self.set_digest(field.into());
14594 self
14595 }
14596 pub fn events(&self) -> &[super::Event] {
14598 &self.events
14599 }
14600 pub fn events_mut(&mut self) -> &mut Vec<super::Event> {
14603 &mut self.events
14604 }
14605 pub fn set_events(&mut self, field: Vec<super::Event>) {
14607 self.events = field;
14608 }
14609 pub fn with_events(mut self, field: Vec<super::Event>) -> Self {
14611 self.set_events(field);
14612 self
14613 }
14614 }
14615 impl super::TransactionExpiration {
14616 pub const fn const_default() -> Self {
14617 Self {
14618 kind: None,
14619 epoch: None,
14620 min_epoch: None,
14621 min_timestamp: None,
14622 max_timestamp: None,
14623 chain: None,
14624 nonce: None,
14625 }
14626 }
14627 #[doc(hidden)]
14628 pub fn default_instance() -> &'static Self {
14629 static DEFAULT: super::TransactionExpiration = super::TransactionExpiration::const_default();
14630 &DEFAULT
14631 }
14632 pub fn with_kind<
14634 T: Into<super::transaction_expiration::TransactionExpirationKind>,
14635 >(mut self, field: T) -> Self {
14636 self.set_kind(field.into());
14637 self
14638 }
14639 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
14641 self.epoch.as_mut().map(|field| field as _)
14642 }
14643 pub fn epoch_mut(&mut self) -> &mut u64 {
14646 self.epoch.get_or_insert_default()
14647 }
14648 pub fn epoch_opt(&self) -> Option<u64> {
14650 self.epoch.as_ref().map(|field| *field)
14651 }
14652 pub fn set_epoch(&mut self, field: u64) {
14654 self.epoch = Some(field);
14655 }
14656 pub fn with_epoch(mut self, field: u64) -> Self {
14658 self.set_epoch(field);
14659 self
14660 }
14661 pub fn min_epoch_opt_mut(&mut self) -> Option<&mut u64> {
14663 self.min_epoch.as_mut().map(|field| field as _)
14664 }
14665 pub fn min_epoch_mut(&mut self) -> &mut u64 {
14668 self.min_epoch.get_or_insert_default()
14669 }
14670 pub fn min_epoch_opt(&self) -> Option<u64> {
14672 self.min_epoch.as_ref().map(|field| *field)
14673 }
14674 pub fn set_min_epoch(&mut self, field: u64) {
14676 self.min_epoch = Some(field);
14677 }
14678 pub fn with_min_epoch(mut self, field: u64) -> Self {
14680 self.set_min_epoch(field);
14681 self
14682 }
14683 pub fn min_timestamp_opt_mut(
14685 &mut self,
14686 ) -> Option<&mut ::prost_types::Timestamp> {
14687 self.min_timestamp.as_mut().map(|field| field as _)
14688 }
14689 pub fn min_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
14692 self.min_timestamp.get_or_insert_default()
14693 }
14694 pub fn min_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
14696 self.min_timestamp.as_ref().map(|field| field as _)
14697 }
14698 pub fn set_min_timestamp<T: Into<::prost_types::Timestamp>>(
14700 &mut self,
14701 field: T,
14702 ) {
14703 self.min_timestamp = Some(field.into().into());
14704 }
14705 pub fn with_min_timestamp<T: Into<::prost_types::Timestamp>>(
14707 mut self,
14708 field: T,
14709 ) -> Self {
14710 self.set_min_timestamp(field.into());
14711 self
14712 }
14713 pub fn max_timestamp_opt_mut(
14715 &mut self,
14716 ) -> Option<&mut ::prost_types::Timestamp> {
14717 self.max_timestamp.as_mut().map(|field| field as _)
14718 }
14719 pub fn max_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
14722 self.max_timestamp.get_or_insert_default()
14723 }
14724 pub fn max_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
14726 self.max_timestamp.as_ref().map(|field| field as _)
14727 }
14728 pub fn set_max_timestamp<T: Into<::prost_types::Timestamp>>(
14730 &mut self,
14731 field: T,
14732 ) {
14733 self.max_timestamp = Some(field.into().into());
14734 }
14735 pub fn with_max_timestamp<T: Into<::prost_types::Timestamp>>(
14737 mut self,
14738 field: T,
14739 ) -> Self {
14740 self.set_max_timestamp(field.into());
14741 self
14742 }
14743 pub fn chain_opt_mut(&mut self) -> Option<&mut String> {
14745 self.chain.as_mut().map(|field| field as _)
14746 }
14747 pub fn chain_mut(&mut self) -> &mut String {
14750 self.chain.get_or_insert_default()
14751 }
14752 pub fn chain_opt(&self) -> Option<&str> {
14754 self.chain.as_ref().map(|field| field as _)
14755 }
14756 pub fn set_chain<T: Into<String>>(&mut self, field: T) {
14758 self.chain = Some(field.into().into());
14759 }
14760 pub fn with_chain<T: Into<String>>(mut self, field: T) -> Self {
14762 self.set_chain(field.into());
14763 self
14764 }
14765 pub fn nonce_opt_mut(&mut self) -> Option<&mut u32> {
14767 self.nonce.as_mut().map(|field| field as _)
14768 }
14769 pub fn nonce_mut(&mut self) -> &mut u32 {
14772 self.nonce.get_or_insert_default()
14773 }
14774 pub fn nonce_opt(&self) -> Option<u32> {
14776 self.nonce.as_ref().map(|field| *field)
14777 }
14778 pub fn set_nonce(&mut self, field: u32) {
14780 self.nonce = Some(field);
14781 }
14782 pub fn with_nonce(mut self, field: u32) -> Self {
14784 self.set_nonce(field);
14785 self
14786 }
14787 }
14788 impl super::TransactionKind {
14789 pub const fn const_default() -> Self {
14790 Self { kind: None, data: None }
14791 }
14792 #[doc(hidden)]
14793 pub fn default_instance() -> &'static Self {
14794 static DEFAULT: super::TransactionKind = super::TransactionKind::const_default();
14795 &DEFAULT
14796 }
14797 pub fn with_kind<T: Into<super::transaction_kind::Kind>>(
14799 mut self,
14800 field: T,
14801 ) -> Self {
14802 self.set_kind(field.into());
14803 self
14804 }
14805 pub fn programmable_transaction(&self) -> &super::ProgrammableTransaction {
14807 if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &self
14808 .data
14809 {
14810 field as _
14811 } else {
14812 super::ProgrammableTransaction::default_instance() as _
14813 }
14814 }
14815 pub fn programmable_transaction_opt(
14817 &self,
14818 ) -> Option<&super::ProgrammableTransaction> {
14819 if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &self
14820 .data
14821 {
14822 Some(field as _)
14823 } else {
14824 None
14825 }
14826 }
14827 pub fn programmable_transaction_opt_mut(
14829 &mut self,
14830 ) -> Option<&mut super::ProgrammableTransaction> {
14831 if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &mut self
14832 .data
14833 {
14834 Some(field as _)
14835 } else {
14836 None
14837 }
14838 }
14839 pub fn programmable_transaction_mut(
14843 &mut self,
14844 ) -> &mut super::ProgrammableTransaction {
14845 if self.programmable_transaction_opt_mut().is_none() {
14846 self.data = Some(
14847 super::transaction_kind::Data::ProgrammableTransaction(
14848 super::ProgrammableTransaction::default(),
14849 ),
14850 );
14851 }
14852 self.programmable_transaction_opt_mut().unwrap()
14853 }
14854 pub fn set_programmable_transaction<T: Into<super::ProgrammableTransaction>>(
14857 &mut self,
14858 field: T,
14859 ) {
14860 self.data = Some(
14861 super::transaction_kind::Data::ProgrammableTransaction(
14862 field.into().into(),
14863 ),
14864 );
14865 }
14866 pub fn with_programmable_transaction<T: Into<super::ProgrammableTransaction>>(
14869 mut self,
14870 field: T,
14871 ) -> Self {
14872 self.set_programmable_transaction(field.into());
14873 self
14874 }
14875 pub fn change_epoch(&self) -> &super::ChangeEpoch {
14877 if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &self.data {
14878 field as _
14879 } else {
14880 super::ChangeEpoch::default_instance() as _
14881 }
14882 }
14883 pub fn change_epoch_opt(&self) -> Option<&super::ChangeEpoch> {
14885 if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &self.data {
14886 Some(field as _)
14887 } else {
14888 None
14889 }
14890 }
14891 pub fn change_epoch_opt_mut(&mut self) -> Option<&mut super::ChangeEpoch> {
14893 if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &mut self
14894 .data
14895 {
14896 Some(field as _)
14897 } else {
14898 None
14899 }
14900 }
14901 pub fn change_epoch_mut(&mut self) -> &mut super::ChangeEpoch {
14905 if self.change_epoch_opt_mut().is_none() {
14906 self.data = Some(
14907 super::transaction_kind::Data::ChangeEpoch(
14908 super::ChangeEpoch::default(),
14909 ),
14910 );
14911 }
14912 self.change_epoch_opt_mut().unwrap()
14913 }
14914 pub fn set_change_epoch<T: Into<super::ChangeEpoch>>(&mut self, field: T) {
14917 self.data = Some(
14918 super::transaction_kind::Data::ChangeEpoch(field.into().into()),
14919 );
14920 }
14921 pub fn with_change_epoch<T: Into<super::ChangeEpoch>>(
14924 mut self,
14925 field: T,
14926 ) -> Self {
14927 self.set_change_epoch(field.into());
14928 self
14929 }
14930 pub fn genesis(&self) -> &super::GenesisTransaction {
14932 if let Some(super::transaction_kind::Data::Genesis(field)) = &self.data {
14933 field as _
14934 } else {
14935 super::GenesisTransaction::default_instance() as _
14936 }
14937 }
14938 pub fn genesis_opt(&self) -> Option<&super::GenesisTransaction> {
14940 if let Some(super::transaction_kind::Data::Genesis(field)) = &self.data {
14941 Some(field as _)
14942 } else {
14943 None
14944 }
14945 }
14946 pub fn genesis_opt_mut(&mut self) -> Option<&mut super::GenesisTransaction> {
14948 if let Some(super::transaction_kind::Data::Genesis(field)) = &mut self.data {
14949 Some(field as _)
14950 } else {
14951 None
14952 }
14953 }
14954 pub fn genesis_mut(&mut self) -> &mut super::GenesisTransaction {
14958 if self.genesis_opt_mut().is_none() {
14959 self.data = Some(
14960 super::transaction_kind::Data::Genesis(
14961 super::GenesisTransaction::default(),
14962 ),
14963 );
14964 }
14965 self.genesis_opt_mut().unwrap()
14966 }
14967 pub fn set_genesis<T: Into<super::GenesisTransaction>>(&mut self, field: T) {
14970 self.data = Some(
14971 super::transaction_kind::Data::Genesis(field.into().into()),
14972 );
14973 }
14974 pub fn with_genesis<T: Into<super::GenesisTransaction>>(
14977 mut self,
14978 field: T,
14979 ) -> Self {
14980 self.set_genesis(field.into());
14981 self
14982 }
14983 pub fn consensus_commit_prologue(&self) -> &super::ConsensusCommitPrologue {
14985 if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &self
14986 .data
14987 {
14988 field as _
14989 } else {
14990 super::ConsensusCommitPrologue::default_instance() as _
14991 }
14992 }
14993 pub fn consensus_commit_prologue_opt(
14995 &self,
14996 ) -> Option<&super::ConsensusCommitPrologue> {
14997 if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &self
14998 .data
14999 {
15000 Some(field as _)
15001 } else {
15002 None
15003 }
15004 }
15005 pub fn consensus_commit_prologue_opt_mut(
15007 &mut self,
15008 ) -> Option<&mut super::ConsensusCommitPrologue> {
15009 if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &mut self
15010 .data
15011 {
15012 Some(field as _)
15013 } else {
15014 None
15015 }
15016 }
15017 pub fn consensus_commit_prologue_mut(
15021 &mut self,
15022 ) -> &mut super::ConsensusCommitPrologue {
15023 if self.consensus_commit_prologue_opt_mut().is_none() {
15024 self.data = Some(
15025 super::transaction_kind::Data::ConsensusCommitPrologue(
15026 super::ConsensusCommitPrologue::default(),
15027 ),
15028 );
15029 }
15030 self.consensus_commit_prologue_opt_mut().unwrap()
15031 }
15032 pub fn set_consensus_commit_prologue<T: Into<super::ConsensusCommitPrologue>>(
15035 &mut self,
15036 field: T,
15037 ) {
15038 self.data = Some(
15039 super::transaction_kind::Data::ConsensusCommitPrologue(
15040 field.into().into(),
15041 ),
15042 );
15043 }
15044 pub fn with_consensus_commit_prologue<T: Into<super::ConsensusCommitPrologue>>(
15047 mut self,
15048 field: T,
15049 ) -> Self {
15050 self.set_consensus_commit_prologue(field.into());
15051 self
15052 }
15053 pub fn authenticator_state_update(&self) -> &super::AuthenticatorStateUpdate {
15055 if let Some(
15056 super::transaction_kind::Data::AuthenticatorStateUpdate(field),
15057 ) = &self.data
15058 {
15059 field as _
15060 } else {
15061 super::AuthenticatorStateUpdate::default_instance() as _
15062 }
15063 }
15064 pub fn authenticator_state_update_opt(
15066 &self,
15067 ) -> Option<&super::AuthenticatorStateUpdate> {
15068 if let Some(
15069 super::transaction_kind::Data::AuthenticatorStateUpdate(field),
15070 ) = &self.data
15071 {
15072 Some(field as _)
15073 } else {
15074 None
15075 }
15076 }
15077 pub fn authenticator_state_update_opt_mut(
15079 &mut self,
15080 ) -> Option<&mut super::AuthenticatorStateUpdate> {
15081 if let Some(
15082 super::transaction_kind::Data::AuthenticatorStateUpdate(field),
15083 ) = &mut self.data
15084 {
15085 Some(field as _)
15086 } else {
15087 None
15088 }
15089 }
15090 pub fn authenticator_state_update_mut(
15094 &mut self,
15095 ) -> &mut super::AuthenticatorStateUpdate {
15096 if self.authenticator_state_update_opt_mut().is_none() {
15097 self.data = Some(
15098 super::transaction_kind::Data::AuthenticatorStateUpdate(
15099 super::AuthenticatorStateUpdate::default(),
15100 ),
15101 );
15102 }
15103 self.authenticator_state_update_opt_mut().unwrap()
15104 }
15105 pub fn set_authenticator_state_update<T: Into<super::AuthenticatorStateUpdate>>(
15108 &mut self,
15109 field: T,
15110 ) {
15111 self.data = Some(
15112 super::transaction_kind::Data::AuthenticatorStateUpdate(
15113 field.into().into(),
15114 ),
15115 );
15116 }
15117 pub fn with_authenticator_state_update<T: Into<super::AuthenticatorStateUpdate>>(
15120 mut self,
15121 field: T,
15122 ) -> Self {
15123 self.set_authenticator_state_update(field.into());
15124 self
15125 }
15126 pub fn end_of_epoch(&self) -> &super::EndOfEpochTransaction {
15128 if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &self.data {
15129 field as _
15130 } else {
15131 super::EndOfEpochTransaction::default_instance() as _
15132 }
15133 }
15134 pub fn end_of_epoch_opt(&self) -> Option<&super::EndOfEpochTransaction> {
15136 if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &self.data {
15137 Some(field as _)
15138 } else {
15139 None
15140 }
15141 }
15142 pub fn end_of_epoch_opt_mut(
15144 &mut self,
15145 ) -> Option<&mut super::EndOfEpochTransaction> {
15146 if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &mut self
15147 .data
15148 {
15149 Some(field as _)
15150 } else {
15151 None
15152 }
15153 }
15154 pub fn end_of_epoch_mut(&mut self) -> &mut super::EndOfEpochTransaction {
15158 if self.end_of_epoch_opt_mut().is_none() {
15159 self.data = Some(
15160 super::transaction_kind::Data::EndOfEpoch(
15161 super::EndOfEpochTransaction::default(),
15162 ),
15163 );
15164 }
15165 self.end_of_epoch_opt_mut().unwrap()
15166 }
15167 pub fn set_end_of_epoch<T: Into<super::EndOfEpochTransaction>>(
15170 &mut self,
15171 field: T,
15172 ) {
15173 self.data = Some(
15174 super::transaction_kind::Data::EndOfEpoch(field.into().into()),
15175 );
15176 }
15177 pub fn with_end_of_epoch<T: Into<super::EndOfEpochTransaction>>(
15180 mut self,
15181 field: T,
15182 ) -> Self {
15183 self.set_end_of_epoch(field.into());
15184 self
15185 }
15186 pub fn randomness_state_update(&self) -> &super::RandomnessStateUpdate {
15188 if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &self
15189 .data
15190 {
15191 field as _
15192 } else {
15193 super::RandomnessStateUpdate::default_instance() as _
15194 }
15195 }
15196 pub fn randomness_state_update_opt(
15198 &self,
15199 ) -> Option<&super::RandomnessStateUpdate> {
15200 if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &self
15201 .data
15202 {
15203 Some(field as _)
15204 } else {
15205 None
15206 }
15207 }
15208 pub fn randomness_state_update_opt_mut(
15210 &mut self,
15211 ) -> Option<&mut super::RandomnessStateUpdate> {
15212 if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &mut self
15213 .data
15214 {
15215 Some(field as _)
15216 } else {
15217 None
15218 }
15219 }
15220 pub fn randomness_state_update_mut(
15224 &mut self,
15225 ) -> &mut super::RandomnessStateUpdate {
15226 if self.randomness_state_update_opt_mut().is_none() {
15227 self.data = Some(
15228 super::transaction_kind::Data::RandomnessStateUpdate(
15229 super::RandomnessStateUpdate::default(),
15230 ),
15231 );
15232 }
15233 self.randomness_state_update_opt_mut().unwrap()
15234 }
15235 pub fn set_randomness_state_update<T: Into<super::RandomnessStateUpdate>>(
15238 &mut self,
15239 field: T,
15240 ) {
15241 self.data = Some(
15242 super::transaction_kind::Data::RandomnessStateUpdate(field.into().into()),
15243 );
15244 }
15245 pub fn with_randomness_state_update<T: Into<super::RandomnessStateUpdate>>(
15248 mut self,
15249 field: T,
15250 ) -> Self {
15251 self.set_randomness_state_update(field.into());
15252 self
15253 }
15254 }
15255 impl super::TransferObjects {
15256 pub const fn const_default() -> Self {
15257 Self {
15258 objects: Vec::new(),
15259 address: None,
15260 }
15261 }
15262 #[doc(hidden)]
15263 pub fn default_instance() -> &'static Self {
15264 static DEFAULT: super::TransferObjects = super::TransferObjects::const_default();
15265 &DEFAULT
15266 }
15267 pub fn objects(&self) -> &[super::Argument] {
15269 &self.objects
15270 }
15271 pub fn objects_mut(&mut self) -> &mut Vec<super::Argument> {
15274 &mut self.objects
15275 }
15276 pub fn set_objects(&mut self, field: Vec<super::Argument>) {
15278 self.objects = field;
15279 }
15280 pub fn with_objects(mut self, field: Vec<super::Argument>) -> Self {
15282 self.set_objects(field);
15283 self
15284 }
15285 pub fn address(&self) -> &super::Argument {
15287 self.address
15288 .as_ref()
15289 .map(|field| field as _)
15290 .unwrap_or_else(|| super::Argument::default_instance() as _)
15291 }
15292 pub fn address_opt_mut(&mut self) -> Option<&mut super::Argument> {
15294 self.address.as_mut().map(|field| field as _)
15295 }
15296 pub fn address_mut(&mut self) -> &mut super::Argument {
15299 self.address.get_or_insert_default()
15300 }
15301 pub fn address_opt(&self) -> Option<&super::Argument> {
15303 self.address.as_ref().map(|field| field as _)
15304 }
15305 pub fn set_address<T: Into<super::Argument>>(&mut self, field: T) {
15307 self.address = Some(field.into().into());
15308 }
15309 pub fn with_address<T: Into<super::Argument>>(mut self, field: T) -> Self {
15311 self.set_address(field.into());
15312 self
15313 }
15314 }
15315 impl super::TypeArgumentError {
15316 pub const fn const_default() -> Self {
15317 Self {
15318 type_argument: None,
15319 kind: None,
15320 }
15321 }
15322 #[doc(hidden)]
15323 pub fn default_instance() -> &'static Self {
15324 static DEFAULT: super::TypeArgumentError = super::TypeArgumentError::const_default();
15325 &DEFAULT
15326 }
15327 pub fn type_argument_opt_mut(&mut self) -> Option<&mut u32> {
15329 self.type_argument.as_mut().map(|field| field as _)
15330 }
15331 pub fn type_argument_mut(&mut self) -> &mut u32 {
15334 self.type_argument.get_or_insert_default()
15335 }
15336 pub fn type_argument_opt(&self) -> Option<u32> {
15338 self.type_argument.as_ref().map(|field| *field)
15339 }
15340 pub fn set_type_argument(&mut self, field: u32) {
15342 self.type_argument = Some(field);
15343 }
15344 pub fn with_type_argument(mut self, field: u32) -> Self {
15346 self.set_type_argument(field);
15347 self
15348 }
15349 pub fn with_kind<T: Into<super::type_argument_error::TypeArgumentErrorKind>>(
15351 mut self,
15352 field: T,
15353 ) -> Self {
15354 self.set_kind(field.into());
15355 self
15356 }
15357 }
15358 impl super::TypeOrigin {
15359 pub const fn const_default() -> Self {
15360 Self {
15361 module_name: None,
15362 datatype_name: None,
15363 package_id: None,
15364 }
15365 }
15366 #[doc(hidden)]
15367 pub fn default_instance() -> &'static Self {
15368 static DEFAULT: super::TypeOrigin = super::TypeOrigin::const_default();
15369 &DEFAULT
15370 }
15371 pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
15373 self.module_name.as_mut().map(|field| field as _)
15374 }
15375 pub fn module_name_mut(&mut self) -> &mut String {
15378 self.module_name.get_or_insert_default()
15379 }
15380 pub fn module_name_opt(&self) -> Option<&str> {
15382 self.module_name.as_ref().map(|field| field as _)
15383 }
15384 pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
15386 self.module_name = Some(field.into().into());
15387 }
15388 pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
15390 self.set_module_name(field.into());
15391 self
15392 }
15393 pub fn datatype_name_opt_mut(&mut self) -> Option<&mut String> {
15395 self.datatype_name.as_mut().map(|field| field as _)
15396 }
15397 pub fn datatype_name_mut(&mut self) -> &mut String {
15400 self.datatype_name.get_or_insert_default()
15401 }
15402 pub fn datatype_name_opt(&self) -> Option<&str> {
15404 self.datatype_name.as_ref().map(|field| field as _)
15405 }
15406 pub fn set_datatype_name<T: Into<String>>(&mut self, field: T) {
15408 self.datatype_name = Some(field.into().into());
15409 }
15410 pub fn with_datatype_name<T: Into<String>>(mut self, field: T) -> Self {
15412 self.set_datatype_name(field.into());
15413 self
15414 }
15415 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
15417 self.package_id.as_mut().map(|field| field as _)
15418 }
15419 pub fn package_id_mut(&mut self) -> &mut String {
15422 self.package_id.get_or_insert_default()
15423 }
15424 pub fn package_id_opt(&self) -> Option<&str> {
15426 self.package_id.as_ref().map(|field| field as _)
15427 }
15428 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
15430 self.package_id = Some(field.into().into());
15431 }
15432 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
15434 self.set_package_id(field.into());
15435 self
15436 }
15437 }
15438 impl super::TypeParameter {
15439 pub const fn const_default() -> Self {
15440 Self {
15441 constraints: Vec::new(),
15442 is_phantom: None,
15443 }
15444 }
15445 #[doc(hidden)]
15446 pub fn default_instance() -> &'static Self {
15447 static DEFAULT: super::TypeParameter = super::TypeParameter::const_default();
15448 &DEFAULT
15449 }
15450 pub fn is_phantom_opt_mut(&mut self) -> Option<&mut bool> {
15452 self.is_phantom.as_mut().map(|field| field as _)
15453 }
15454 pub fn is_phantom_mut(&mut self) -> &mut bool {
15457 self.is_phantom.get_or_insert_default()
15458 }
15459 pub fn is_phantom_opt(&self) -> Option<bool> {
15461 self.is_phantom.as_ref().map(|field| *field)
15462 }
15463 pub fn set_is_phantom(&mut self, field: bool) {
15465 self.is_phantom = Some(field);
15466 }
15467 pub fn with_is_phantom(mut self, field: bool) -> Self {
15469 self.set_is_phantom(field);
15470 self
15471 }
15472 }
15473 impl super::UnchangedConsensusObject {
15474 pub const fn const_default() -> Self {
15475 Self {
15476 kind: None,
15477 object_id: None,
15478 version: None,
15479 digest: None,
15480 object_type: None,
15481 }
15482 }
15483 #[doc(hidden)]
15484 pub fn default_instance() -> &'static Self {
15485 static DEFAULT: super::UnchangedConsensusObject = super::UnchangedConsensusObject::const_default();
15486 &DEFAULT
15487 }
15488 pub fn with_kind<
15490 T: Into<super::unchanged_consensus_object::UnchangedConsensusObjectKind>,
15491 >(mut self, field: T) -> Self {
15492 self.set_kind(field.into());
15493 self
15494 }
15495 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
15497 self.object_id.as_mut().map(|field| field as _)
15498 }
15499 pub fn object_id_mut(&mut self) -> &mut String {
15502 self.object_id.get_or_insert_default()
15503 }
15504 pub fn object_id_opt(&self) -> Option<&str> {
15506 self.object_id.as_ref().map(|field| field as _)
15507 }
15508 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
15510 self.object_id = Some(field.into().into());
15511 }
15512 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
15514 self.set_object_id(field.into());
15515 self
15516 }
15517 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
15519 self.version.as_mut().map(|field| field as _)
15520 }
15521 pub fn version_mut(&mut self) -> &mut u64 {
15524 self.version.get_or_insert_default()
15525 }
15526 pub fn version_opt(&self) -> Option<u64> {
15528 self.version.as_ref().map(|field| *field)
15529 }
15530 pub fn set_version(&mut self, field: u64) {
15532 self.version = Some(field);
15533 }
15534 pub fn with_version(mut self, field: u64) -> Self {
15536 self.set_version(field);
15537 self
15538 }
15539 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
15541 self.digest.as_mut().map(|field| field as _)
15542 }
15543 pub fn digest_mut(&mut self) -> &mut String {
15546 self.digest.get_or_insert_default()
15547 }
15548 pub fn digest_opt(&self) -> Option<&str> {
15550 self.digest.as_ref().map(|field| field as _)
15551 }
15552 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
15554 self.digest = Some(field.into().into());
15555 }
15556 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
15558 self.set_digest(field.into());
15559 self
15560 }
15561 pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
15563 self.object_type.as_mut().map(|field| field as _)
15564 }
15565 pub fn object_type_mut(&mut self) -> &mut String {
15568 self.object_type.get_or_insert_default()
15569 }
15570 pub fn object_type_opt(&self) -> Option<&str> {
15572 self.object_type.as_ref().map(|field| field as _)
15573 }
15574 pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
15576 self.object_type = Some(field.into().into());
15577 }
15578 pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
15580 self.set_object_type(field.into());
15581 self
15582 }
15583 }
15584 impl super::Upgrade {
15585 pub const fn const_default() -> Self {
15586 Self {
15587 modules: Vec::new(),
15588 dependencies: Vec::new(),
15589 package: None,
15590 ticket: None,
15591 }
15592 }
15593 #[doc(hidden)]
15594 pub fn default_instance() -> &'static Self {
15595 static DEFAULT: super::Upgrade = super::Upgrade::const_default();
15596 &DEFAULT
15597 }
15598 pub fn modules(&self) -> &[::prost::bytes::Bytes] {
15600 &self.modules
15601 }
15602 pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
15605 &mut self.modules
15606 }
15607 pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
15609 self.modules = field;
15610 }
15611 pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
15613 self.set_modules(field);
15614 self
15615 }
15616 pub fn dependencies(&self) -> &[String] {
15618 &self.dependencies
15619 }
15620 pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
15623 &mut self.dependencies
15624 }
15625 pub fn set_dependencies(&mut self, field: Vec<String>) {
15627 self.dependencies = field;
15628 }
15629 pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
15631 self.set_dependencies(field);
15632 self
15633 }
15634 pub fn package_opt_mut(&mut self) -> Option<&mut String> {
15636 self.package.as_mut().map(|field| field as _)
15637 }
15638 pub fn package_mut(&mut self) -> &mut String {
15641 self.package.get_or_insert_default()
15642 }
15643 pub fn package_opt(&self) -> Option<&str> {
15645 self.package.as_ref().map(|field| field as _)
15646 }
15647 pub fn set_package<T: Into<String>>(&mut self, field: T) {
15649 self.package = Some(field.into().into());
15650 }
15651 pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
15653 self.set_package(field.into());
15654 self
15655 }
15656 pub fn ticket(&self) -> &super::Argument {
15658 self.ticket
15659 .as_ref()
15660 .map(|field| field as _)
15661 .unwrap_or_else(|| super::Argument::default_instance() as _)
15662 }
15663 pub fn ticket_opt_mut(&mut self) -> Option<&mut super::Argument> {
15665 self.ticket.as_mut().map(|field| field as _)
15666 }
15667 pub fn ticket_mut(&mut self) -> &mut super::Argument {
15670 self.ticket.get_or_insert_default()
15671 }
15672 pub fn ticket_opt(&self) -> Option<&super::Argument> {
15674 self.ticket.as_ref().map(|field| field as _)
15675 }
15676 pub fn set_ticket<T: Into<super::Argument>>(&mut self, field: T) {
15678 self.ticket = Some(field.into().into());
15679 }
15680 pub fn with_ticket<T: Into<super::Argument>>(mut self, field: T) -> Self {
15682 self.set_ticket(field.into());
15683 self
15684 }
15685 }
15686 impl super::UserSignature {
15687 pub const fn const_default() -> Self {
15688 Self {
15689 bcs: None,
15690 scheme: None,
15691 signature: None,
15692 }
15693 }
15694 #[doc(hidden)]
15695 pub fn default_instance() -> &'static Self {
15696 static DEFAULT: super::UserSignature = super::UserSignature::const_default();
15697 &DEFAULT
15698 }
15699 pub fn bcs(&self) -> &super::Bcs {
15701 self.bcs
15702 .as_ref()
15703 .map(|field| field as _)
15704 .unwrap_or_else(|| super::Bcs::default_instance() as _)
15705 }
15706 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
15708 self.bcs.as_mut().map(|field| field as _)
15709 }
15710 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
15713 self.bcs.get_or_insert_default()
15714 }
15715 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
15717 self.bcs.as_ref().map(|field| field as _)
15718 }
15719 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
15721 self.bcs = Some(field.into().into());
15722 }
15723 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
15725 self.set_bcs(field.into());
15726 self
15727 }
15728 pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
15730 self.set_scheme(field.into());
15731 self
15732 }
15733 pub fn simple(&self) -> &super::SimpleSignature {
15735 if let Some(super::user_signature::Signature::Simple(field)) = &self
15736 .signature
15737 {
15738 field as _
15739 } else {
15740 super::SimpleSignature::default_instance() as _
15741 }
15742 }
15743 pub fn simple_opt(&self) -> Option<&super::SimpleSignature> {
15745 if let Some(super::user_signature::Signature::Simple(field)) = &self
15746 .signature
15747 {
15748 Some(field as _)
15749 } else {
15750 None
15751 }
15752 }
15753 pub fn simple_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
15755 if let Some(super::user_signature::Signature::Simple(field)) = &mut self
15756 .signature
15757 {
15758 Some(field as _)
15759 } else {
15760 None
15761 }
15762 }
15763 pub fn simple_mut(&mut self) -> &mut super::SimpleSignature {
15767 if self.simple_opt_mut().is_none() {
15768 self.signature = Some(
15769 super::user_signature::Signature::Simple(
15770 super::SimpleSignature::default(),
15771 ),
15772 );
15773 }
15774 self.simple_opt_mut().unwrap()
15775 }
15776 pub fn set_simple<T: Into<super::SimpleSignature>>(&mut self, field: T) {
15779 self.signature = Some(
15780 super::user_signature::Signature::Simple(field.into().into()),
15781 );
15782 }
15783 pub fn with_simple<T: Into<super::SimpleSignature>>(mut self, field: T) -> Self {
15786 self.set_simple(field.into());
15787 self
15788 }
15789 pub fn multisig(&self) -> &super::MultisigAggregatedSignature {
15791 if let Some(super::user_signature::Signature::Multisig(field)) = &self
15792 .signature
15793 {
15794 field as _
15795 } else {
15796 super::MultisigAggregatedSignature::default_instance() as _
15797 }
15798 }
15799 pub fn multisig_opt(&self) -> Option<&super::MultisigAggregatedSignature> {
15801 if let Some(super::user_signature::Signature::Multisig(field)) = &self
15802 .signature
15803 {
15804 Some(field as _)
15805 } else {
15806 None
15807 }
15808 }
15809 pub fn multisig_opt_mut(
15811 &mut self,
15812 ) -> Option<&mut super::MultisigAggregatedSignature> {
15813 if let Some(super::user_signature::Signature::Multisig(field)) = &mut self
15814 .signature
15815 {
15816 Some(field as _)
15817 } else {
15818 None
15819 }
15820 }
15821 pub fn multisig_mut(&mut self) -> &mut super::MultisigAggregatedSignature {
15825 if self.multisig_opt_mut().is_none() {
15826 self.signature = Some(
15827 super::user_signature::Signature::Multisig(
15828 super::MultisigAggregatedSignature::default(),
15829 ),
15830 );
15831 }
15832 self.multisig_opt_mut().unwrap()
15833 }
15834 pub fn set_multisig<T: Into<super::MultisigAggregatedSignature>>(
15837 &mut self,
15838 field: T,
15839 ) {
15840 self.signature = Some(
15841 super::user_signature::Signature::Multisig(field.into().into()),
15842 );
15843 }
15844 pub fn with_multisig<T: Into<super::MultisigAggregatedSignature>>(
15847 mut self,
15848 field: T,
15849 ) -> Self {
15850 self.set_multisig(field.into());
15851 self
15852 }
15853 pub fn zklogin(&self) -> &super::ZkLoginAuthenticator {
15855 if let Some(super::user_signature::Signature::Zklogin(field)) = &self
15856 .signature
15857 {
15858 field as _
15859 } else {
15860 super::ZkLoginAuthenticator::default_instance() as _
15861 }
15862 }
15863 pub fn zklogin_opt(&self) -> Option<&super::ZkLoginAuthenticator> {
15865 if let Some(super::user_signature::Signature::Zklogin(field)) = &self
15866 .signature
15867 {
15868 Some(field as _)
15869 } else {
15870 None
15871 }
15872 }
15873 pub fn zklogin_opt_mut(&mut self) -> Option<&mut super::ZkLoginAuthenticator> {
15875 if let Some(super::user_signature::Signature::Zklogin(field)) = &mut self
15876 .signature
15877 {
15878 Some(field as _)
15879 } else {
15880 None
15881 }
15882 }
15883 pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginAuthenticator {
15887 if self.zklogin_opt_mut().is_none() {
15888 self.signature = Some(
15889 super::user_signature::Signature::Zklogin(
15890 super::ZkLoginAuthenticator::default(),
15891 ),
15892 );
15893 }
15894 self.zklogin_opt_mut().unwrap()
15895 }
15896 pub fn set_zklogin<T: Into<super::ZkLoginAuthenticator>>(&mut self, field: T) {
15899 self.signature = Some(
15900 super::user_signature::Signature::Zklogin(field.into().into()),
15901 );
15902 }
15903 pub fn with_zklogin<T: Into<super::ZkLoginAuthenticator>>(
15906 mut self,
15907 field: T,
15908 ) -> Self {
15909 self.set_zklogin(field.into());
15910 self
15911 }
15912 pub fn passkey(&self) -> &super::PasskeyAuthenticator {
15914 if let Some(super::user_signature::Signature::Passkey(field)) = &self
15915 .signature
15916 {
15917 field as _
15918 } else {
15919 super::PasskeyAuthenticator::default_instance() as _
15920 }
15921 }
15922 pub fn passkey_opt(&self) -> Option<&super::PasskeyAuthenticator> {
15924 if let Some(super::user_signature::Signature::Passkey(field)) = &self
15925 .signature
15926 {
15927 Some(field as _)
15928 } else {
15929 None
15930 }
15931 }
15932 pub fn passkey_opt_mut(&mut self) -> Option<&mut super::PasskeyAuthenticator> {
15934 if let Some(super::user_signature::Signature::Passkey(field)) = &mut self
15935 .signature
15936 {
15937 Some(field as _)
15938 } else {
15939 None
15940 }
15941 }
15942 pub fn passkey_mut(&mut self) -> &mut super::PasskeyAuthenticator {
15946 if self.passkey_opt_mut().is_none() {
15947 self.signature = Some(
15948 super::user_signature::Signature::Passkey(
15949 super::PasskeyAuthenticator::default(),
15950 ),
15951 );
15952 }
15953 self.passkey_opt_mut().unwrap()
15954 }
15955 pub fn set_passkey<T: Into<super::PasskeyAuthenticator>>(&mut self, field: T) {
15958 self.signature = Some(
15959 super::user_signature::Signature::Passkey(field.into().into()),
15960 );
15961 }
15962 pub fn with_passkey<T: Into<super::PasskeyAuthenticator>>(
15965 mut self,
15966 field: T,
15967 ) -> Self {
15968 self.set_passkey(field.into());
15969 self
15970 }
15971 }
15972 impl super::Validator {
15973 pub const fn const_default() -> Self {
15974 Self {
15975 name: None,
15976 address: None,
15977 description: None,
15978 image_url: None,
15979 project_url: None,
15980 protocol_public_key: None,
15981 proof_of_possession: None,
15982 network_public_key: None,
15983 worker_public_key: None,
15984 network_address: None,
15985 p2p_address: None,
15986 primary_address: None,
15987 worker_address: None,
15988 next_epoch_protocol_public_key: None,
15989 next_epoch_proof_of_possession: None,
15990 next_epoch_network_public_key: None,
15991 next_epoch_worker_public_key: None,
15992 next_epoch_network_address: None,
15993 next_epoch_p2p_address: None,
15994 next_epoch_primary_address: None,
15995 next_epoch_worker_address: None,
15996 metadata_extra_fields: None,
15997 voting_power: None,
15998 operation_cap_id: None,
15999 gas_price: None,
16000 staking_pool: None,
16001 commission_rate: None,
16002 next_epoch_stake: None,
16003 next_epoch_gas_price: None,
16004 next_epoch_commission_rate: None,
16005 extra_fields: None,
16006 }
16007 }
16008 #[doc(hidden)]
16009 pub fn default_instance() -> &'static Self {
16010 static DEFAULT: super::Validator = super::Validator::const_default();
16011 &DEFAULT
16012 }
16013 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
16015 self.name.as_mut().map(|field| field as _)
16016 }
16017 pub fn name_mut(&mut self) -> &mut String {
16020 self.name.get_or_insert_default()
16021 }
16022 pub fn name_opt(&self) -> Option<&str> {
16024 self.name.as_ref().map(|field| field as _)
16025 }
16026 pub fn set_name<T: Into<String>>(&mut self, field: T) {
16028 self.name = Some(field.into().into());
16029 }
16030 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
16032 self.set_name(field.into());
16033 self
16034 }
16035 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
16037 self.address.as_mut().map(|field| field as _)
16038 }
16039 pub fn address_mut(&mut self) -> &mut String {
16042 self.address.get_or_insert_default()
16043 }
16044 pub fn address_opt(&self) -> Option<&str> {
16046 self.address.as_ref().map(|field| field as _)
16047 }
16048 pub fn set_address<T: Into<String>>(&mut self, field: T) {
16050 self.address = Some(field.into().into());
16051 }
16052 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
16054 self.set_address(field.into());
16055 self
16056 }
16057 pub fn description_opt_mut(&mut self) -> Option<&mut String> {
16059 self.description.as_mut().map(|field| field as _)
16060 }
16061 pub fn description_mut(&mut self) -> &mut String {
16064 self.description.get_or_insert_default()
16065 }
16066 pub fn description_opt(&self) -> Option<&str> {
16068 self.description.as_ref().map(|field| field as _)
16069 }
16070 pub fn set_description<T: Into<String>>(&mut self, field: T) {
16072 self.description = Some(field.into().into());
16073 }
16074 pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
16076 self.set_description(field.into());
16077 self
16078 }
16079 pub fn image_url_opt_mut(&mut self) -> Option<&mut String> {
16081 self.image_url.as_mut().map(|field| field as _)
16082 }
16083 pub fn image_url_mut(&mut self) -> &mut String {
16086 self.image_url.get_or_insert_default()
16087 }
16088 pub fn image_url_opt(&self) -> Option<&str> {
16090 self.image_url.as_ref().map(|field| field as _)
16091 }
16092 pub fn set_image_url<T: Into<String>>(&mut self, field: T) {
16094 self.image_url = Some(field.into().into());
16095 }
16096 pub fn with_image_url<T: Into<String>>(mut self, field: T) -> Self {
16098 self.set_image_url(field.into());
16099 self
16100 }
16101 pub fn project_url_opt_mut(&mut self) -> Option<&mut String> {
16103 self.project_url.as_mut().map(|field| field as _)
16104 }
16105 pub fn project_url_mut(&mut self) -> &mut String {
16108 self.project_url.get_or_insert_default()
16109 }
16110 pub fn project_url_opt(&self) -> Option<&str> {
16112 self.project_url.as_ref().map(|field| field as _)
16113 }
16114 pub fn set_project_url<T: Into<String>>(&mut self, field: T) {
16116 self.project_url = Some(field.into().into());
16117 }
16118 pub fn with_project_url<T: Into<String>>(mut self, field: T) -> Self {
16120 self.set_project_url(field.into());
16121 self
16122 }
16123 pub fn protocol_public_key_opt(&self) -> Option<&[u8]> {
16125 self.protocol_public_key.as_ref().map(|field| field as _)
16126 }
16127 pub fn set_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
16129 &mut self,
16130 field: T,
16131 ) {
16132 self.protocol_public_key = Some(field.into().into());
16133 }
16134 pub fn with_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
16136 mut self,
16137 field: T,
16138 ) -> Self {
16139 self.set_protocol_public_key(field.into());
16140 self
16141 }
16142 pub fn proof_of_possession_opt(&self) -> Option<&[u8]> {
16144 self.proof_of_possession.as_ref().map(|field| field as _)
16145 }
16146 pub fn set_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
16148 &mut self,
16149 field: T,
16150 ) {
16151 self.proof_of_possession = Some(field.into().into());
16152 }
16153 pub fn with_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
16155 mut self,
16156 field: T,
16157 ) -> Self {
16158 self.set_proof_of_possession(field.into());
16159 self
16160 }
16161 pub fn network_public_key_opt(&self) -> Option<&[u8]> {
16163 self.network_public_key.as_ref().map(|field| field as _)
16164 }
16165 pub fn set_network_public_key<T: Into<::prost::bytes::Bytes>>(
16167 &mut self,
16168 field: T,
16169 ) {
16170 self.network_public_key = Some(field.into().into());
16171 }
16172 pub fn with_network_public_key<T: Into<::prost::bytes::Bytes>>(
16174 mut self,
16175 field: T,
16176 ) -> Self {
16177 self.set_network_public_key(field.into());
16178 self
16179 }
16180 pub fn worker_public_key_opt(&self) -> Option<&[u8]> {
16182 self.worker_public_key.as_ref().map(|field| field as _)
16183 }
16184 pub fn set_worker_public_key<T: Into<::prost::bytes::Bytes>>(
16186 &mut self,
16187 field: T,
16188 ) {
16189 self.worker_public_key = Some(field.into().into());
16190 }
16191 pub fn with_worker_public_key<T: Into<::prost::bytes::Bytes>>(
16193 mut self,
16194 field: T,
16195 ) -> Self {
16196 self.set_worker_public_key(field.into());
16197 self
16198 }
16199 pub fn network_address_opt_mut(&mut self) -> Option<&mut String> {
16201 self.network_address.as_mut().map(|field| field as _)
16202 }
16203 pub fn network_address_mut(&mut self) -> &mut String {
16206 self.network_address.get_or_insert_default()
16207 }
16208 pub fn network_address_opt(&self) -> Option<&str> {
16210 self.network_address.as_ref().map(|field| field as _)
16211 }
16212 pub fn set_network_address<T: Into<String>>(&mut self, field: T) {
16214 self.network_address = Some(field.into().into());
16215 }
16216 pub fn with_network_address<T: Into<String>>(mut self, field: T) -> Self {
16218 self.set_network_address(field.into());
16219 self
16220 }
16221 pub fn p2p_address_opt_mut(&mut self) -> Option<&mut String> {
16223 self.p2p_address.as_mut().map(|field| field as _)
16224 }
16225 pub fn p2p_address_mut(&mut self) -> &mut String {
16228 self.p2p_address.get_or_insert_default()
16229 }
16230 pub fn p2p_address_opt(&self) -> Option<&str> {
16232 self.p2p_address.as_ref().map(|field| field as _)
16233 }
16234 pub fn set_p2p_address<T: Into<String>>(&mut self, field: T) {
16236 self.p2p_address = Some(field.into().into());
16237 }
16238 pub fn with_p2p_address<T: Into<String>>(mut self, field: T) -> Self {
16240 self.set_p2p_address(field.into());
16241 self
16242 }
16243 pub fn primary_address_opt_mut(&mut self) -> Option<&mut String> {
16245 self.primary_address.as_mut().map(|field| field as _)
16246 }
16247 pub fn primary_address_mut(&mut self) -> &mut String {
16250 self.primary_address.get_or_insert_default()
16251 }
16252 pub fn primary_address_opt(&self) -> Option<&str> {
16254 self.primary_address.as_ref().map(|field| field as _)
16255 }
16256 pub fn set_primary_address<T: Into<String>>(&mut self, field: T) {
16258 self.primary_address = Some(field.into().into());
16259 }
16260 pub fn with_primary_address<T: Into<String>>(mut self, field: T) -> Self {
16262 self.set_primary_address(field.into());
16263 self
16264 }
16265 pub fn worker_address_opt_mut(&mut self) -> Option<&mut String> {
16267 self.worker_address.as_mut().map(|field| field as _)
16268 }
16269 pub fn worker_address_mut(&mut self) -> &mut String {
16272 self.worker_address.get_or_insert_default()
16273 }
16274 pub fn worker_address_opt(&self) -> Option<&str> {
16276 self.worker_address.as_ref().map(|field| field as _)
16277 }
16278 pub fn set_worker_address<T: Into<String>>(&mut self, field: T) {
16280 self.worker_address = Some(field.into().into());
16281 }
16282 pub fn with_worker_address<T: Into<String>>(mut self, field: T) -> Self {
16284 self.set_worker_address(field.into());
16285 self
16286 }
16287 pub fn next_epoch_protocol_public_key_opt(&self) -> Option<&[u8]> {
16289 self.next_epoch_protocol_public_key.as_ref().map(|field| field as _)
16290 }
16291 pub fn set_next_epoch_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
16293 &mut self,
16294 field: T,
16295 ) {
16296 self.next_epoch_protocol_public_key = Some(field.into().into());
16297 }
16298 pub fn with_next_epoch_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
16300 mut self,
16301 field: T,
16302 ) -> Self {
16303 self.set_next_epoch_protocol_public_key(field.into());
16304 self
16305 }
16306 pub fn next_epoch_proof_of_possession_opt(&self) -> Option<&[u8]> {
16308 self.next_epoch_proof_of_possession.as_ref().map(|field| field as _)
16309 }
16310 pub fn set_next_epoch_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
16312 &mut self,
16313 field: T,
16314 ) {
16315 self.next_epoch_proof_of_possession = Some(field.into().into());
16316 }
16317 pub fn with_next_epoch_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
16319 mut self,
16320 field: T,
16321 ) -> Self {
16322 self.set_next_epoch_proof_of_possession(field.into());
16323 self
16324 }
16325 pub fn next_epoch_network_public_key_opt(&self) -> Option<&[u8]> {
16327 self.next_epoch_network_public_key.as_ref().map(|field| field as _)
16328 }
16329 pub fn set_next_epoch_network_public_key<T: Into<::prost::bytes::Bytes>>(
16331 &mut self,
16332 field: T,
16333 ) {
16334 self.next_epoch_network_public_key = Some(field.into().into());
16335 }
16336 pub fn with_next_epoch_network_public_key<T: Into<::prost::bytes::Bytes>>(
16338 mut self,
16339 field: T,
16340 ) -> Self {
16341 self.set_next_epoch_network_public_key(field.into());
16342 self
16343 }
16344 pub fn next_epoch_worker_public_key_opt(&self) -> Option<&[u8]> {
16346 self.next_epoch_worker_public_key.as_ref().map(|field| field as _)
16347 }
16348 pub fn set_next_epoch_worker_public_key<T: Into<::prost::bytes::Bytes>>(
16350 &mut self,
16351 field: T,
16352 ) {
16353 self.next_epoch_worker_public_key = Some(field.into().into());
16354 }
16355 pub fn with_next_epoch_worker_public_key<T: Into<::prost::bytes::Bytes>>(
16357 mut self,
16358 field: T,
16359 ) -> Self {
16360 self.set_next_epoch_worker_public_key(field.into());
16361 self
16362 }
16363 pub fn next_epoch_network_address_opt_mut(&mut self) -> Option<&mut String> {
16365 self.next_epoch_network_address.as_mut().map(|field| field as _)
16366 }
16367 pub fn next_epoch_network_address_mut(&mut self) -> &mut String {
16370 self.next_epoch_network_address.get_or_insert_default()
16371 }
16372 pub fn next_epoch_network_address_opt(&self) -> Option<&str> {
16374 self.next_epoch_network_address.as_ref().map(|field| field as _)
16375 }
16376 pub fn set_next_epoch_network_address<T: Into<String>>(&mut self, field: T) {
16378 self.next_epoch_network_address = Some(field.into().into());
16379 }
16380 pub fn with_next_epoch_network_address<T: Into<String>>(
16382 mut self,
16383 field: T,
16384 ) -> Self {
16385 self.set_next_epoch_network_address(field.into());
16386 self
16387 }
16388 pub fn next_epoch_p2p_address_opt_mut(&mut self) -> Option<&mut String> {
16390 self.next_epoch_p2p_address.as_mut().map(|field| field as _)
16391 }
16392 pub fn next_epoch_p2p_address_mut(&mut self) -> &mut String {
16395 self.next_epoch_p2p_address.get_or_insert_default()
16396 }
16397 pub fn next_epoch_p2p_address_opt(&self) -> Option<&str> {
16399 self.next_epoch_p2p_address.as_ref().map(|field| field as _)
16400 }
16401 pub fn set_next_epoch_p2p_address<T: Into<String>>(&mut self, field: T) {
16403 self.next_epoch_p2p_address = Some(field.into().into());
16404 }
16405 pub fn with_next_epoch_p2p_address<T: Into<String>>(mut self, field: T) -> Self {
16407 self.set_next_epoch_p2p_address(field.into());
16408 self
16409 }
16410 pub fn next_epoch_primary_address_opt_mut(&mut self) -> Option<&mut String> {
16412 self.next_epoch_primary_address.as_mut().map(|field| field as _)
16413 }
16414 pub fn next_epoch_primary_address_mut(&mut self) -> &mut String {
16417 self.next_epoch_primary_address.get_or_insert_default()
16418 }
16419 pub fn next_epoch_primary_address_opt(&self) -> Option<&str> {
16421 self.next_epoch_primary_address.as_ref().map(|field| field as _)
16422 }
16423 pub fn set_next_epoch_primary_address<T: Into<String>>(&mut self, field: T) {
16425 self.next_epoch_primary_address = Some(field.into().into());
16426 }
16427 pub fn with_next_epoch_primary_address<T: Into<String>>(
16429 mut self,
16430 field: T,
16431 ) -> Self {
16432 self.set_next_epoch_primary_address(field.into());
16433 self
16434 }
16435 pub fn next_epoch_worker_address_opt_mut(&mut self) -> Option<&mut String> {
16437 self.next_epoch_worker_address.as_mut().map(|field| field as _)
16438 }
16439 pub fn next_epoch_worker_address_mut(&mut self) -> &mut String {
16442 self.next_epoch_worker_address.get_or_insert_default()
16443 }
16444 pub fn next_epoch_worker_address_opt(&self) -> Option<&str> {
16446 self.next_epoch_worker_address.as_ref().map(|field| field as _)
16447 }
16448 pub fn set_next_epoch_worker_address<T: Into<String>>(&mut self, field: T) {
16450 self.next_epoch_worker_address = Some(field.into().into());
16451 }
16452 pub fn with_next_epoch_worker_address<T: Into<String>>(
16454 mut self,
16455 field: T,
16456 ) -> Self {
16457 self.set_next_epoch_worker_address(field.into());
16458 self
16459 }
16460 pub fn metadata_extra_fields(&self) -> &super::MoveTable {
16462 self.metadata_extra_fields
16463 .as_ref()
16464 .map(|field| field as _)
16465 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16466 }
16467 pub fn metadata_extra_fields_opt_mut(
16469 &mut self,
16470 ) -> Option<&mut super::MoveTable> {
16471 self.metadata_extra_fields.as_mut().map(|field| field as _)
16472 }
16473 pub fn metadata_extra_fields_mut(&mut self) -> &mut super::MoveTable {
16476 self.metadata_extra_fields.get_or_insert_default()
16477 }
16478 pub fn metadata_extra_fields_opt(&self) -> Option<&super::MoveTable> {
16480 self.metadata_extra_fields.as_ref().map(|field| field as _)
16481 }
16482 pub fn set_metadata_extra_fields<T: Into<super::MoveTable>>(
16484 &mut self,
16485 field: T,
16486 ) {
16487 self.metadata_extra_fields = Some(field.into().into());
16488 }
16489 pub fn with_metadata_extra_fields<T: Into<super::MoveTable>>(
16491 mut self,
16492 field: T,
16493 ) -> Self {
16494 self.set_metadata_extra_fields(field.into());
16495 self
16496 }
16497 pub fn voting_power_opt_mut(&mut self) -> Option<&mut u64> {
16499 self.voting_power.as_mut().map(|field| field as _)
16500 }
16501 pub fn voting_power_mut(&mut self) -> &mut u64 {
16504 self.voting_power.get_or_insert_default()
16505 }
16506 pub fn voting_power_opt(&self) -> Option<u64> {
16508 self.voting_power.as_ref().map(|field| *field)
16509 }
16510 pub fn set_voting_power(&mut self, field: u64) {
16512 self.voting_power = Some(field);
16513 }
16514 pub fn with_voting_power(mut self, field: u64) -> Self {
16516 self.set_voting_power(field);
16517 self
16518 }
16519 pub fn operation_cap_id_opt_mut(&mut self) -> Option<&mut String> {
16521 self.operation_cap_id.as_mut().map(|field| field as _)
16522 }
16523 pub fn operation_cap_id_mut(&mut self) -> &mut String {
16526 self.operation_cap_id.get_or_insert_default()
16527 }
16528 pub fn operation_cap_id_opt(&self) -> Option<&str> {
16530 self.operation_cap_id.as_ref().map(|field| field as _)
16531 }
16532 pub fn set_operation_cap_id<T: Into<String>>(&mut self, field: T) {
16534 self.operation_cap_id = Some(field.into().into());
16535 }
16536 pub fn with_operation_cap_id<T: Into<String>>(mut self, field: T) -> Self {
16538 self.set_operation_cap_id(field.into());
16539 self
16540 }
16541 pub fn gas_price_opt_mut(&mut self) -> Option<&mut u64> {
16543 self.gas_price.as_mut().map(|field| field as _)
16544 }
16545 pub fn gas_price_mut(&mut self) -> &mut u64 {
16548 self.gas_price.get_or_insert_default()
16549 }
16550 pub fn gas_price_opt(&self) -> Option<u64> {
16552 self.gas_price.as_ref().map(|field| *field)
16553 }
16554 pub fn set_gas_price(&mut self, field: u64) {
16556 self.gas_price = Some(field);
16557 }
16558 pub fn with_gas_price(mut self, field: u64) -> Self {
16560 self.set_gas_price(field);
16561 self
16562 }
16563 pub fn staking_pool(&self) -> &super::StakingPool {
16565 self.staking_pool
16566 .as_ref()
16567 .map(|field| field as _)
16568 .unwrap_or_else(|| super::StakingPool::default_instance() as _)
16569 }
16570 pub fn staking_pool_opt_mut(&mut self) -> Option<&mut super::StakingPool> {
16572 self.staking_pool.as_mut().map(|field| field as _)
16573 }
16574 pub fn staking_pool_mut(&mut self) -> &mut super::StakingPool {
16577 self.staking_pool.get_or_insert_default()
16578 }
16579 pub fn staking_pool_opt(&self) -> Option<&super::StakingPool> {
16581 self.staking_pool.as_ref().map(|field| field as _)
16582 }
16583 pub fn set_staking_pool<T: Into<super::StakingPool>>(&mut self, field: T) {
16585 self.staking_pool = Some(field.into().into());
16586 }
16587 pub fn with_staking_pool<T: Into<super::StakingPool>>(
16589 mut self,
16590 field: T,
16591 ) -> Self {
16592 self.set_staking_pool(field.into());
16593 self
16594 }
16595 pub fn commission_rate_opt_mut(&mut self) -> Option<&mut u64> {
16597 self.commission_rate.as_mut().map(|field| field as _)
16598 }
16599 pub fn commission_rate_mut(&mut self) -> &mut u64 {
16602 self.commission_rate.get_or_insert_default()
16603 }
16604 pub fn commission_rate_opt(&self) -> Option<u64> {
16606 self.commission_rate.as_ref().map(|field| *field)
16607 }
16608 pub fn set_commission_rate(&mut self, field: u64) {
16610 self.commission_rate = Some(field);
16611 }
16612 pub fn with_commission_rate(mut self, field: u64) -> Self {
16614 self.set_commission_rate(field);
16615 self
16616 }
16617 pub fn next_epoch_stake_opt_mut(&mut self) -> Option<&mut u64> {
16619 self.next_epoch_stake.as_mut().map(|field| field as _)
16620 }
16621 pub fn next_epoch_stake_mut(&mut self) -> &mut u64 {
16624 self.next_epoch_stake.get_or_insert_default()
16625 }
16626 pub fn next_epoch_stake_opt(&self) -> Option<u64> {
16628 self.next_epoch_stake.as_ref().map(|field| *field)
16629 }
16630 pub fn set_next_epoch_stake(&mut self, field: u64) {
16632 self.next_epoch_stake = Some(field);
16633 }
16634 pub fn with_next_epoch_stake(mut self, field: u64) -> Self {
16636 self.set_next_epoch_stake(field);
16637 self
16638 }
16639 pub fn next_epoch_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
16641 self.next_epoch_gas_price.as_mut().map(|field| field as _)
16642 }
16643 pub fn next_epoch_gas_price_mut(&mut self) -> &mut u64 {
16646 self.next_epoch_gas_price.get_or_insert_default()
16647 }
16648 pub fn next_epoch_gas_price_opt(&self) -> Option<u64> {
16650 self.next_epoch_gas_price.as_ref().map(|field| *field)
16651 }
16652 pub fn set_next_epoch_gas_price(&mut self, field: u64) {
16654 self.next_epoch_gas_price = Some(field);
16655 }
16656 pub fn with_next_epoch_gas_price(mut self, field: u64) -> Self {
16658 self.set_next_epoch_gas_price(field);
16659 self
16660 }
16661 pub fn next_epoch_commission_rate_opt_mut(&mut self) -> Option<&mut u64> {
16663 self.next_epoch_commission_rate.as_mut().map(|field| field as _)
16664 }
16665 pub fn next_epoch_commission_rate_mut(&mut self) -> &mut u64 {
16668 self.next_epoch_commission_rate.get_or_insert_default()
16669 }
16670 pub fn next_epoch_commission_rate_opt(&self) -> Option<u64> {
16672 self.next_epoch_commission_rate.as_ref().map(|field| *field)
16673 }
16674 pub fn set_next_epoch_commission_rate(&mut self, field: u64) {
16676 self.next_epoch_commission_rate = Some(field);
16677 }
16678 pub fn with_next_epoch_commission_rate(mut self, field: u64) -> Self {
16680 self.set_next_epoch_commission_rate(field);
16681 self
16682 }
16683 pub fn extra_fields(&self) -> &super::MoveTable {
16685 self.extra_fields
16686 .as_ref()
16687 .map(|field| field as _)
16688 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16689 }
16690 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
16692 self.extra_fields.as_mut().map(|field| field as _)
16693 }
16694 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
16697 self.extra_fields.get_or_insert_default()
16698 }
16699 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
16701 self.extra_fields.as_ref().map(|field| field as _)
16702 }
16703 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
16705 self.extra_fields = Some(field.into().into());
16706 }
16707 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
16709 self.set_extra_fields(field.into());
16710 self
16711 }
16712 }
16713 impl super::ValidatorAggregatedSignature {
16714 pub const fn const_default() -> Self {
16715 Self {
16716 epoch: None,
16717 signature: None,
16718 bitmap: None,
16719 }
16720 }
16721 #[doc(hidden)]
16722 pub fn default_instance() -> &'static Self {
16723 static DEFAULT: super::ValidatorAggregatedSignature = super::ValidatorAggregatedSignature::const_default();
16724 &DEFAULT
16725 }
16726 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
16728 self.epoch.as_mut().map(|field| field as _)
16729 }
16730 pub fn epoch_mut(&mut self) -> &mut u64 {
16733 self.epoch.get_or_insert_default()
16734 }
16735 pub fn epoch_opt(&self) -> Option<u64> {
16737 self.epoch.as_ref().map(|field| *field)
16738 }
16739 pub fn set_epoch(&mut self, field: u64) {
16741 self.epoch = Some(field);
16742 }
16743 pub fn with_epoch(mut self, field: u64) -> Self {
16745 self.set_epoch(field);
16746 self
16747 }
16748 pub fn signature_opt(&self) -> Option<&[u8]> {
16750 self.signature.as_ref().map(|field| field as _)
16751 }
16752 pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16754 self.signature = Some(field.into().into());
16755 }
16756 pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
16758 mut self,
16759 field: T,
16760 ) -> Self {
16761 self.set_signature(field.into());
16762 self
16763 }
16764 pub fn bitmap_opt(&self) -> Option<&[u8]> {
16766 self.bitmap.as_ref().map(|field| field as _)
16767 }
16768 pub fn set_bitmap<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16770 self.bitmap = Some(field.into().into());
16771 }
16772 pub fn with_bitmap<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
16774 self.set_bitmap(field.into());
16775 self
16776 }
16777 }
16778 impl super::ValidatorCommittee {
16779 pub const fn const_default() -> Self {
16780 Self {
16781 epoch: None,
16782 members: Vec::new(),
16783 }
16784 }
16785 #[doc(hidden)]
16786 pub fn default_instance() -> &'static Self {
16787 static DEFAULT: super::ValidatorCommittee = super::ValidatorCommittee::const_default();
16788 &DEFAULT
16789 }
16790 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
16792 self.epoch.as_mut().map(|field| field as _)
16793 }
16794 pub fn epoch_mut(&mut self) -> &mut u64 {
16797 self.epoch.get_or_insert_default()
16798 }
16799 pub fn epoch_opt(&self) -> Option<u64> {
16801 self.epoch.as_ref().map(|field| *field)
16802 }
16803 pub fn set_epoch(&mut self, field: u64) {
16805 self.epoch = Some(field);
16806 }
16807 pub fn with_epoch(mut self, field: u64) -> Self {
16809 self.set_epoch(field);
16810 self
16811 }
16812 pub fn members(&self) -> &[super::ValidatorCommitteeMember] {
16814 &self.members
16815 }
16816 pub fn members_mut(&mut self) -> &mut Vec<super::ValidatorCommitteeMember> {
16819 &mut self.members
16820 }
16821 pub fn set_members(&mut self, field: Vec<super::ValidatorCommitteeMember>) {
16823 self.members = field;
16824 }
16825 pub fn with_members(
16827 mut self,
16828 field: Vec<super::ValidatorCommitteeMember>,
16829 ) -> Self {
16830 self.set_members(field);
16831 self
16832 }
16833 }
16834 impl super::ValidatorCommitteeMember {
16835 pub const fn const_default() -> Self {
16836 Self {
16837 public_key: None,
16838 weight: None,
16839 }
16840 }
16841 #[doc(hidden)]
16842 pub fn default_instance() -> &'static Self {
16843 static DEFAULT: super::ValidatorCommitteeMember = super::ValidatorCommitteeMember::const_default();
16844 &DEFAULT
16845 }
16846 pub fn public_key_opt(&self) -> Option<&[u8]> {
16848 self.public_key.as_ref().map(|field| field as _)
16849 }
16850 pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16852 self.public_key = Some(field.into().into());
16853 }
16854 pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
16856 mut self,
16857 field: T,
16858 ) -> Self {
16859 self.set_public_key(field.into());
16860 self
16861 }
16862 pub fn weight_opt_mut(&mut self) -> Option<&mut u64> {
16864 self.weight.as_mut().map(|field| field as _)
16865 }
16866 pub fn weight_mut(&mut self) -> &mut u64 {
16869 self.weight.get_or_insert_default()
16870 }
16871 pub fn weight_opt(&self) -> Option<u64> {
16873 self.weight.as_ref().map(|field| *field)
16874 }
16875 pub fn set_weight(&mut self, field: u64) {
16877 self.weight = Some(field);
16878 }
16879 pub fn with_weight(mut self, field: u64) -> Self {
16881 self.set_weight(field);
16882 self
16883 }
16884 }
16885 impl super::ValidatorExecutionTimeObservation {
16886 pub const fn const_default() -> Self {
16887 Self {
16888 validator: None,
16889 duration: None,
16890 }
16891 }
16892 #[doc(hidden)]
16893 pub fn default_instance() -> &'static Self {
16894 static DEFAULT: super::ValidatorExecutionTimeObservation = super::ValidatorExecutionTimeObservation::const_default();
16895 &DEFAULT
16896 }
16897 pub fn validator_opt(&self) -> Option<&[u8]> {
16899 self.validator.as_ref().map(|field| field as _)
16900 }
16901 pub fn set_validator<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16903 self.validator = Some(field.into().into());
16904 }
16905 pub fn with_validator<T: Into<::prost::bytes::Bytes>>(
16907 mut self,
16908 field: T,
16909 ) -> Self {
16910 self.set_validator(field.into());
16911 self
16912 }
16913 pub fn duration_opt_mut(&mut self) -> Option<&mut ::prost_types::Duration> {
16915 self.duration.as_mut().map(|field| field as _)
16916 }
16917 pub fn duration_mut(&mut self) -> &mut ::prost_types::Duration {
16920 self.duration.get_or_insert_default()
16921 }
16922 pub fn duration_opt(&self) -> Option<&::prost_types::Duration> {
16924 self.duration.as_ref().map(|field| field as _)
16925 }
16926 pub fn set_duration<T: Into<::prost_types::Duration>>(&mut self, field: T) {
16928 self.duration = Some(field.into().into());
16929 }
16930 pub fn with_duration<T: Into<::prost_types::Duration>>(
16932 mut self,
16933 field: T,
16934 ) -> Self {
16935 self.set_duration(field.into());
16936 self
16937 }
16938 }
16939 impl super::ValidatorReportRecord {
16940 pub const fn const_default() -> Self {
16941 Self {
16942 reported: None,
16943 reporters: Vec::new(),
16944 }
16945 }
16946 #[doc(hidden)]
16947 pub fn default_instance() -> &'static Self {
16948 static DEFAULT: super::ValidatorReportRecord = super::ValidatorReportRecord::const_default();
16949 &DEFAULT
16950 }
16951 pub fn reported_opt_mut(&mut self) -> Option<&mut String> {
16953 self.reported.as_mut().map(|field| field as _)
16954 }
16955 pub fn reported_mut(&mut self) -> &mut String {
16958 self.reported.get_or_insert_default()
16959 }
16960 pub fn reported_opt(&self) -> Option<&str> {
16962 self.reported.as_ref().map(|field| field as _)
16963 }
16964 pub fn set_reported<T: Into<String>>(&mut self, field: T) {
16966 self.reported = Some(field.into().into());
16967 }
16968 pub fn with_reported<T: Into<String>>(mut self, field: T) -> Self {
16970 self.set_reported(field.into());
16971 self
16972 }
16973 pub fn reporters(&self) -> &[String] {
16975 &self.reporters
16976 }
16977 pub fn reporters_mut(&mut self) -> &mut Vec<String> {
16980 &mut self.reporters
16981 }
16982 pub fn set_reporters(&mut self, field: Vec<String>) {
16984 self.reporters = field;
16985 }
16986 pub fn with_reporters(mut self, field: Vec<String>) -> Self {
16988 self.set_reporters(field);
16989 self
16990 }
16991 }
16992 impl super::ValidatorSet {
16993 pub const fn const_default() -> Self {
16994 Self {
16995 total_stake: None,
16996 active_validators: Vec::new(),
16997 pending_active_validators: None,
16998 pending_removals: Vec::new(),
16999 staking_pool_mappings: None,
17000 inactive_validators: None,
17001 validator_candidates: None,
17002 at_risk_validators: std::collections::BTreeMap::new(),
17003 extra_fields: None,
17004 }
17005 }
17006 #[doc(hidden)]
17007 pub fn default_instance() -> &'static Self {
17008 static DEFAULT: super::ValidatorSet = super::ValidatorSet::const_default();
17009 &DEFAULT
17010 }
17011 pub fn total_stake_opt_mut(&mut self) -> Option<&mut u64> {
17013 self.total_stake.as_mut().map(|field| field as _)
17014 }
17015 pub fn total_stake_mut(&mut self) -> &mut u64 {
17018 self.total_stake.get_or_insert_default()
17019 }
17020 pub fn total_stake_opt(&self) -> Option<u64> {
17022 self.total_stake.as_ref().map(|field| *field)
17023 }
17024 pub fn set_total_stake(&mut self, field: u64) {
17026 self.total_stake = Some(field);
17027 }
17028 pub fn with_total_stake(mut self, field: u64) -> Self {
17030 self.set_total_stake(field);
17031 self
17032 }
17033 pub fn active_validators(&self) -> &[super::Validator] {
17035 &self.active_validators
17036 }
17037 pub fn active_validators_mut(&mut self) -> &mut Vec<super::Validator> {
17040 &mut self.active_validators
17041 }
17042 pub fn set_active_validators(&mut self, field: Vec<super::Validator>) {
17044 self.active_validators = field;
17045 }
17046 pub fn with_active_validators(mut self, field: Vec<super::Validator>) -> Self {
17048 self.set_active_validators(field);
17049 self
17050 }
17051 pub fn pending_active_validators(&self) -> &super::MoveTable {
17053 self.pending_active_validators
17054 .as_ref()
17055 .map(|field| field as _)
17056 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17057 }
17058 pub fn pending_active_validators_opt_mut(
17060 &mut self,
17061 ) -> Option<&mut super::MoveTable> {
17062 self.pending_active_validators.as_mut().map(|field| field as _)
17063 }
17064 pub fn pending_active_validators_mut(&mut self) -> &mut super::MoveTable {
17067 self.pending_active_validators.get_or_insert_default()
17068 }
17069 pub fn pending_active_validators_opt(&self) -> Option<&super::MoveTable> {
17071 self.pending_active_validators.as_ref().map(|field| field as _)
17072 }
17073 pub fn set_pending_active_validators<T: Into<super::MoveTable>>(
17075 &mut self,
17076 field: T,
17077 ) {
17078 self.pending_active_validators = Some(field.into().into());
17079 }
17080 pub fn with_pending_active_validators<T: Into<super::MoveTable>>(
17082 mut self,
17083 field: T,
17084 ) -> Self {
17085 self.set_pending_active_validators(field.into());
17086 self
17087 }
17088 pub fn pending_removals(&self) -> &[u64] {
17090 &self.pending_removals
17091 }
17092 pub fn pending_removals_mut(&mut self) -> &mut Vec<u64> {
17095 &mut self.pending_removals
17096 }
17097 pub fn set_pending_removals(&mut self, field: Vec<u64>) {
17099 self.pending_removals = field;
17100 }
17101 pub fn with_pending_removals(mut self, field: Vec<u64>) -> Self {
17103 self.set_pending_removals(field);
17104 self
17105 }
17106 pub fn staking_pool_mappings(&self) -> &super::MoveTable {
17108 self.staking_pool_mappings
17109 .as_ref()
17110 .map(|field| field as _)
17111 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17112 }
17113 pub fn staking_pool_mappings_opt_mut(
17115 &mut self,
17116 ) -> Option<&mut super::MoveTable> {
17117 self.staking_pool_mappings.as_mut().map(|field| field as _)
17118 }
17119 pub fn staking_pool_mappings_mut(&mut self) -> &mut super::MoveTable {
17122 self.staking_pool_mappings.get_or_insert_default()
17123 }
17124 pub fn staking_pool_mappings_opt(&self) -> Option<&super::MoveTable> {
17126 self.staking_pool_mappings.as_ref().map(|field| field as _)
17127 }
17128 pub fn set_staking_pool_mappings<T: Into<super::MoveTable>>(
17130 &mut self,
17131 field: T,
17132 ) {
17133 self.staking_pool_mappings = Some(field.into().into());
17134 }
17135 pub fn with_staking_pool_mappings<T: Into<super::MoveTable>>(
17137 mut self,
17138 field: T,
17139 ) -> Self {
17140 self.set_staking_pool_mappings(field.into());
17141 self
17142 }
17143 pub fn inactive_validators(&self) -> &super::MoveTable {
17145 self.inactive_validators
17146 .as_ref()
17147 .map(|field| field as _)
17148 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17149 }
17150 pub fn inactive_validators_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
17152 self.inactive_validators.as_mut().map(|field| field as _)
17153 }
17154 pub fn inactive_validators_mut(&mut self) -> &mut super::MoveTable {
17157 self.inactive_validators.get_or_insert_default()
17158 }
17159 pub fn inactive_validators_opt(&self) -> Option<&super::MoveTable> {
17161 self.inactive_validators.as_ref().map(|field| field as _)
17162 }
17163 pub fn set_inactive_validators<T: Into<super::MoveTable>>(&mut self, field: T) {
17165 self.inactive_validators = Some(field.into().into());
17166 }
17167 pub fn with_inactive_validators<T: Into<super::MoveTable>>(
17169 mut self,
17170 field: T,
17171 ) -> Self {
17172 self.set_inactive_validators(field.into());
17173 self
17174 }
17175 pub fn validator_candidates(&self) -> &super::MoveTable {
17177 self.validator_candidates
17178 .as_ref()
17179 .map(|field| field as _)
17180 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17181 }
17182 pub fn validator_candidates_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
17184 self.validator_candidates.as_mut().map(|field| field as _)
17185 }
17186 pub fn validator_candidates_mut(&mut self) -> &mut super::MoveTable {
17189 self.validator_candidates.get_or_insert_default()
17190 }
17191 pub fn validator_candidates_opt(&self) -> Option<&super::MoveTable> {
17193 self.validator_candidates.as_ref().map(|field| field as _)
17194 }
17195 pub fn set_validator_candidates<T: Into<super::MoveTable>>(&mut self, field: T) {
17197 self.validator_candidates = Some(field.into().into());
17198 }
17199 pub fn with_validator_candidates<T: Into<super::MoveTable>>(
17201 mut self,
17202 field: T,
17203 ) -> Self {
17204 self.set_validator_candidates(field.into());
17205 self
17206 }
17207 pub fn at_risk_validators(&self) -> &::std::collections::BTreeMap<String, u64> {
17209 &self.at_risk_validators
17210 }
17211 pub fn at_risk_validators_mut(
17214 &mut self,
17215 ) -> &mut ::std::collections::BTreeMap<String, u64> {
17216 &mut self.at_risk_validators
17217 }
17218 pub fn set_at_risk_validators(
17220 &mut self,
17221 field: ::std::collections::BTreeMap<String, u64>,
17222 ) {
17223 self.at_risk_validators = field;
17224 }
17225 pub fn with_at_risk_validators(
17227 mut self,
17228 field: ::std::collections::BTreeMap<String, u64>,
17229 ) -> Self {
17230 self.set_at_risk_validators(field);
17231 self
17232 }
17233 pub fn extra_fields(&self) -> &super::MoveTable {
17235 self.extra_fields
17236 .as_ref()
17237 .map(|field| field as _)
17238 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17239 }
17240 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
17242 self.extra_fields.as_mut().map(|field| field as _)
17243 }
17244 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
17247 self.extra_fields.get_or_insert_default()
17248 }
17249 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
17251 self.extra_fields.as_ref().map(|field| field as _)
17252 }
17253 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
17255 self.extra_fields = Some(field.into().into());
17256 }
17257 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
17259 self.set_extra_fields(field.into());
17260 self
17261 }
17262 }
17263 impl super::VariantDescriptor {
17264 pub const fn const_default() -> Self {
17265 Self {
17266 name: None,
17267 position: None,
17268 fields: Vec::new(),
17269 }
17270 }
17271 #[doc(hidden)]
17272 pub fn default_instance() -> &'static Self {
17273 static DEFAULT: super::VariantDescriptor = super::VariantDescriptor::const_default();
17274 &DEFAULT
17275 }
17276 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
17278 self.name.as_mut().map(|field| field as _)
17279 }
17280 pub fn name_mut(&mut self) -> &mut String {
17283 self.name.get_or_insert_default()
17284 }
17285 pub fn name_opt(&self) -> Option<&str> {
17287 self.name.as_ref().map(|field| field as _)
17288 }
17289 pub fn set_name<T: Into<String>>(&mut self, field: T) {
17291 self.name = Some(field.into().into());
17292 }
17293 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
17295 self.set_name(field.into());
17296 self
17297 }
17298 pub fn position_opt_mut(&mut self) -> Option<&mut u32> {
17300 self.position.as_mut().map(|field| field as _)
17301 }
17302 pub fn position_mut(&mut self) -> &mut u32 {
17305 self.position.get_or_insert_default()
17306 }
17307 pub fn position_opt(&self) -> Option<u32> {
17309 self.position.as_ref().map(|field| *field)
17310 }
17311 pub fn set_position(&mut self, field: u32) {
17313 self.position = Some(field);
17314 }
17315 pub fn with_position(mut self, field: u32) -> Self {
17317 self.set_position(field);
17318 self
17319 }
17320 pub fn fields(&self) -> &[super::FieldDescriptor] {
17322 &self.fields
17323 }
17324 pub fn fields_mut(&mut self) -> &mut Vec<super::FieldDescriptor> {
17327 &mut self.fields
17328 }
17329 pub fn set_fields(&mut self, field: Vec<super::FieldDescriptor>) {
17331 self.fields = field;
17332 }
17333 pub fn with_fields(mut self, field: Vec<super::FieldDescriptor>) -> Self {
17335 self.set_fields(field);
17336 self
17337 }
17338 }
17339 impl super::VerifySignatureRequest {
17340 pub const fn const_default() -> Self {
17341 Self {
17342 message: None,
17343 signature: None,
17344 address: None,
17345 jwks: Vec::new(),
17346 }
17347 }
17348 #[doc(hidden)]
17349 pub fn default_instance() -> &'static Self {
17350 static DEFAULT: super::VerifySignatureRequest = super::VerifySignatureRequest::const_default();
17351 &DEFAULT
17352 }
17353 pub fn message(&self) -> &super::Bcs {
17355 self.message
17356 .as_ref()
17357 .map(|field| field as _)
17358 .unwrap_or_else(|| super::Bcs::default_instance() as _)
17359 }
17360 pub fn message_opt_mut(&mut self) -> Option<&mut super::Bcs> {
17362 self.message.as_mut().map(|field| field as _)
17363 }
17364 pub fn message_mut(&mut self) -> &mut super::Bcs {
17367 self.message.get_or_insert_default()
17368 }
17369 pub fn message_opt(&self) -> Option<&super::Bcs> {
17371 self.message.as_ref().map(|field| field as _)
17372 }
17373 pub fn set_message<T: Into<super::Bcs>>(&mut self, field: T) {
17375 self.message = Some(field.into().into());
17376 }
17377 pub fn with_message<T: Into<super::Bcs>>(mut self, field: T) -> Self {
17379 self.set_message(field.into());
17380 self
17381 }
17382 pub fn signature(&self) -> &super::UserSignature {
17384 self.signature
17385 .as_ref()
17386 .map(|field| field as _)
17387 .unwrap_or_else(|| super::UserSignature::default_instance() as _)
17388 }
17389 pub fn signature_opt_mut(&mut self) -> Option<&mut super::UserSignature> {
17391 self.signature.as_mut().map(|field| field as _)
17392 }
17393 pub fn signature_mut(&mut self) -> &mut super::UserSignature {
17396 self.signature.get_or_insert_default()
17397 }
17398 pub fn signature_opt(&self) -> Option<&super::UserSignature> {
17400 self.signature.as_ref().map(|field| field as _)
17401 }
17402 pub fn set_signature<T: Into<super::UserSignature>>(&mut self, field: T) {
17404 self.signature = Some(field.into().into());
17405 }
17406 pub fn with_signature<T: Into<super::UserSignature>>(
17408 mut self,
17409 field: T,
17410 ) -> Self {
17411 self.set_signature(field.into());
17412 self
17413 }
17414 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
17416 self.address.as_mut().map(|field| field as _)
17417 }
17418 pub fn address_mut(&mut self) -> &mut String {
17421 self.address.get_or_insert_default()
17422 }
17423 pub fn address_opt(&self) -> Option<&str> {
17425 self.address.as_ref().map(|field| field as _)
17426 }
17427 pub fn set_address<T: Into<String>>(&mut self, field: T) {
17429 self.address = Some(field.into().into());
17430 }
17431 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
17433 self.set_address(field.into());
17434 self
17435 }
17436 pub fn jwks(&self) -> &[super::ActiveJwk] {
17438 &self.jwks
17439 }
17440 pub fn jwks_mut(&mut self) -> &mut Vec<super::ActiveJwk> {
17443 &mut self.jwks
17444 }
17445 pub fn set_jwks(&mut self, field: Vec<super::ActiveJwk>) {
17447 self.jwks = field;
17448 }
17449 pub fn with_jwks(mut self, field: Vec<super::ActiveJwk>) -> Self {
17451 self.set_jwks(field);
17452 self
17453 }
17454 }
17455 impl super::VerifySignatureResponse {
17456 pub const fn const_default() -> Self {
17457 Self {
17458 is_valid: None,
17459 reason: None,
17460 }
17461 }
17462 #[doc(hidden)]
17463 pub fn default_instance() -> &'static Self {
17464 static DEFAULT: super::VerifySignatureResponse = super::VerifySignatureResponse::const_default();
17465 &DEFAULT
17466 }
17467 pub fn is_valid_opt_mut(&mut self) -> Option<&mut bool> {
17469 self.is_valid.as_mut().map(|field| field as _)
17470 }
17471 pub fn is_valid_mut(&mut self) -> &mut bool {
17474 self.is_valid.get_or_insert_default()
17475 }
17476 pub fn is_valid_opt(&self) -> Option<bool> {
17478 self.is_valid.as_ref().map(|field| *field)
17479 }
17480 pub fn set_is_valid(&mut self, field: bool) {
17482 self.is_valid = Some(field);
17483 }
17484 pub fn with_is_valid(mut self, field: bool) -> Self {
17486 self.set_is_valid(field);
17487 self
17488 }
17489 pub fn reason_opt_mut(&mut self) -> Option<&mut String> {
17491 self.reason.as_mut().map(|field| field as _)
17492 }
17493 pub fn reason_mut(&mut self) -> &mut String {
17496 self.reason.get_or_insert_default()
17497 }
17498 pub fn reason_opt(&self) -> Option<&str> {
17500 self.reason.as_ref().map(|field| field as _)
17501 }
17502 pub fn set_reason<T: Into<String>>(&mut self, field: T) {
17504 self.reason = Some(field.into().into());
17505 }
17506 pub fn with_reason<T: Into<String>>(mut self, field: T) -> Self {
17508 self.set_reason(field.into());
17509 self
17510 }
17511 }
17512 impl super::VersionAssignment {
17513 pub const fn const_default() -> Self {
17514 Self {
17515 object_id: None,
17516 start_version: None,
17517 version: None,
17518 }
17519 }
17520 #[doc(hidden)]
17521 pub fn default_instance() -> &'static Self {
17522 static DEFAULT: super::VersionAssignment = super::VersionAssignment::const_default();
17523 &DEFAULT
17524 }
17525 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
17527 self.object_id.as_mut().map(|field| field as _)
17528 }
17529 pub fn object_id_mut(&mut self) -> &mut String {
17532 self.object_id.get_or_insert_default()
17533 }
17534 pub fn object_id_opt(&self) -> Option<&str> {
17536 self.object_id.as_ref().map(|field| field as _)
17537 }
17538 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
17540 self.object_id = Some(field.into().into());
17541 }
17542 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
17544 self.set_object_id(field.into());
17545 self
17546 }
17547 pub fn start_version_opt_mut(&mut self) -> Option<&mut u64> {
17549 self.start_version.as_mut().map(|field| field as _)
17550 }
17551 pub fn start_version_mut(&mut self) -> &mut u64 {
17554 self.start_version.get_or_insert_default()
17555 }
17556 pub fn start_version_opt(&self) -> Option<u64> {
17558 self.start_version.as_ref().map(|field| *field)
17559 }
17560 pub fn set_start_version(&mut self, field: u64) {
17562 self.start_version = Some(field);
17563 }
17564 pub fn with_start_version(mut self, field: u64) -> Self {
17566 self.set_start_version(field);
17567 self
17568 }
17569 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
17571 self.version.as_mut().map(|field| field as _)
17572 }
17573 pub fn version_mut(&mut self) -> &mut u64 {
17576 self.version.get_or_insert_default()
17577 }
17578 pub fn version_opt(&self) -> Option<u64> {
17580 self.version.as_ref().map(|field| *field)
17581 }
17582 pub fn set_version(&mut self, field: u64) {
17584 self.version = Some(field);
17585 }
17586 pub fn with_version(mut self, field: u64) -> Self {
17588 self.set_version(field);
17589 self
17590 }
17591 }
17592 impl super::ZkLoginAuthenticator {
17593 pub const fn const_default() -> Self {
17594 Self {
17595 inputs: None,
17596 max_epoch: None,
17597 signature: None,
17598 public_identifier: None,
17599 jwk_id: None,
17600 }
17601 }
17602 #[doc(hidden)]
17603 pub fn default_instance() -> &'static Self {
17604 static DEFAULT: super::ZkLoginAuthenticator = super::ZkLoginAuthenticator::const_default();
17605 &DEFAULT
17606 }
17607 pub fn inputs(&self) -> &super::ZkLoginInputs {
17609 self.inputs
17610 .as_ref()
17611 .map(|field| field as _)
17612 .unwrap_or_else(|| super::ZkLoginInputs::default_instance() as _)
17613 }
17614 pub fn inputs_opt_mut(&mut self) -> Option<&mut super::ZkLoginInputs> {
17616 self.inputs.as_mut().map(|field| field as _)
17617 }
17618 pub fn inputs_mut(&mut self) -> &mut super::ZkLoginInputs {
17621 self.inputs.get_or_insert_default()
17622 }
17623 pub fn inputs_opt(&self) -> Option<&super::ZkLoginInputs> {
17625 self.inputs.as_ref().map(|field| field as _)
17626 }
17627 pub fn set_inputs<T: Into<super::ZkLoginInputs>>(&mut self, field: T) {
17629 self.inputs = Some(field.into().into());
17630 }
17631 pub fn with_inputs<T: Into<super::ZkLoginInputs>>(mut self, field: T) -> Self {
17633 self.set_inputs(field.into());
17634 self
17635 }
17636 pub fn max_epoch_opt_mut(&mut self) -> Option<&mut u64> {
17638 self.max_epoch.as_mut().map(|field| field as _)
17639 }
17640 pub fn max_epoch_mut(&mut self) -> &mut u64 {
17643 self.max_epoch.get_or_insert_default()
17644 }
17645 pub fn max_epoch_opt(&self) -> Option<u64> {
17647 self.max_epoch.as_ref().map(|field| *field)
17648 }
17649 pub fn set_max_epoch(&mut self, field: u64) {
17651 self.max_epoch = Some(field);
17652 }
17653 pub fn with_max_epoch(mut self, field: u64) -> Self {
17655 self.set_max_epoch(field);
17656 self
17657 }
17658 pub fn signature(&self) -> &super::SimpleSignature {
17660 self.signature
17661 .as_ref()
17662 .map(|field| field as _)
17663 .unwrap_or_else(|| super::SimpleSignature::default_instance() as _)
17664 }
17665 pub fn signature_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
17667 self.signature.as_mut().map(|field| field as _)
17668 }
17669 pub fn signature_mut(&mut self) -> &mut super::SimpleSignature {
17672 self.signature.get_or_insert_default()
17673 }
17674 pub fn signature_opt(&self) -> Option<&super::SimpleSignature> {
17676 self.signature.as_ref().map(|field| field as _)
17677 }
17678 pub fn set_signature<T: Into<super::SimpleSignature>>(&mut self, field: T) {
17680 self.signature = Some(field.into().into());
17681 }
17682 pub fn with_signature<T: Into<super::SimpleSignature>>(
17684 mut self,
17685 field: T,
17686 ) -> Self {
17687 self.set_signature(field.into());
17688 self
17689 }
17690 pub fn public_identifier(&self) -> &super::ZkLoginPublicIdentifier {
17692 self.public_identifier
17693 .as_ref()
17694 .map(|field| field as _)
17695 .unwrap_or_else(|| {
17696 super::ZkLoginPublicIdentifier::default_instance() as _
17697 })
17698 }
17699 pub fn public_identifier_opt_mut(
17701 &mut self,
17702 ) -> Option<&mut super::ZkLoginPublicIdentifier> {
17703 self.public_identifier.as_mut().map(|field| field as _)
17704 }
17705 pub fn public_identifier_mut(&mut self) -> &mut super::ZkLoginPublicIdentifier {
17708 self.public_identifier.get_or_insert_default()
17709 }
17710 pub fn public_identifier_opt(&self) -> Option<&super::ZkLoginPublicIdentifier> {
17712 self.public_identifier.as_ref().map(|field| field as _)
17713 }
17714 pub fn set_public_identifier<T: Into<super::ZkLoginPublicIdentifier>>(
17716 &mut self,
17717 field: T,
17718 ) {
17719 self.public_identifier = Some(field.into().into());
17720 }
17721 pub fn with_public_identifier<T: Into<super::ZkLoginPublicIdentifier>>(
17723 mut self,
17724 field: T,
17725 ) -> Self {
17726 self.set_public_identifier(field.into());
17727 self
17728 }
17729 pub fn jwk_id(&self) -> &super::JwkId {
17731 self.jwk_id
17732 .as_ref()
17733 .map(|field| field as _)
17734 .unwrap_or_else(|| super::JwkId::default_instance() as _)
17735 }
17736 pub fn jwk_id_opt_mut(&mut self) -> Option<&mut super::JwkId> {
17738 self.jwk_id.as_mut().map(|field| field as _)
17739 }
17740 pub fn jwk_id_mut(&mut self) -> &mut super::JwkId {
17743 self.jwk_id.get_or_insert_default()
17744 }
17745 pub fn jwk_id_opt(&self) -> Option<&super::JwkId> {
17747 self.jwk_id.as_ref().map(|field| field as _)
17748 }
17749 pub fn set_jwk_id<T: Into<super::JwkId>>(&mut self, field: T) {
17751 self.jwk_id = Some(field.into().into());
17752 }
17753 pub fn with_jwk_id<T: Into<super::JwkId>>(mut self, field: T) -> Self {
17755 self.set_jwk_id(field.into());
17756 self
17757 }
17758 }
17759 impl super::ZkLoginClaim {
17760 pub const fn const_default() -> Self {
17761 Self {
17762 value: None,
17763 index_mod_4: None,
17764 }
17765 }
17766 #[doc(hidden)]
17767 pub fn default_instance() -> &'static Self {
17768 static DEFAULT: super::ZkLoginClaim = super::ZkLoginClaim::const_default();
17769 &DEFAULT
17770 }
17771 pub fn value_opt_mut(&mut self) -> Option<&mut String> {
17773 self.value.as_mut().map(|field| field as _)
17774 }
17775 pub fn value_mut(&mut self) -> &mut String {
17778 self.value.get_or_insert_default()
17779 }
17780 pub fn value_opt(&self) -> Option<&str> {
17782 self.value.as_ref().map(|field| field as _)
17783 }
17784 pub fn set_value<T: Into<String>>(&mut self, field: T) {
17786 self.value = Some(field.into().into());
17787 }
17788 pub fn with_value<T: Into<String>>(mut self, field: T) -> Self {
17790 self.set_value(field.into());
17791 self
17792 }
17793 pub fn index_mod_4_opt_mut(&mut self) -> Option<&mut u32> {
17795 self.index_mod_4.as_mut().map(|field| field as _)
17796 }
17797 pub fn index_mod_4_mut(&mut self) -> &mut u32 {
17800 self.index_mod_4.get_or_insert_default()
17801 }
17802 pub fn index_mod_4_opt(&self) -> Option<u32> {
17804 self.index_mod_4.as_ref().map(|field| *field)
17805 }
17806 pub fn set_index_mod_4(&mut self, field: u32) {
17808 self.index_mod_4 = Some(field);
17809 }
17810 pub fn with_index_mod_4(mut self, field: u32) -> Self {
17812 self.set_index_mod_4(field);
17813 self
17814 }
17815 }
17816 impl super::ZkLoginInputs {
17817 pub const fn const_default() -> Self {
17818 Self {
17819 proof_points: None,
17820 iss_base64_details: None,
17821 header_base64: None,
17822 address_seed: None,
17823 }
17824 }
17825 #[doc(hidden)]
17826 pub fn default_instance() -> &'static Self {
17827 static DEFAULT: super::ZkLoginInputs = super::ZkLoginInputs::const_default();
17828 &DEFAULT
17829 }
17830 pub fn proof_points(&self) -> &super::ZkLoginProof {
17832 self.proof_points
17833 .as_ref()
17834 .map(|field| field as _)
17835 .unwrap_or_else(|| super::ZkLoginProof::default_instance() as _)
17836 }
17837 pub fn proof_points_opt_mut(&mut self) -> Option<&mut super::ZkLoginProof> {
17839 self.proof_points.as_mut().map(|field| field as _)
17840 }
17841 pub fn proof_points_mut(&mut self) -> &mut super::ZkLoginProof {
17844 self.proof_points.get_or_insert_default()
17845 }
17846 pub fn proof_points_opt(&self) -> Option<&super::ZkLoginProof> {
17848 self.proof_points.as_ref().map(|field| field as _)
17849 }
17850 pub fn set_proof_points<T: Into<super::ZkLoginProof>>(&mut self, field: T) {
17852 self.proof_points = Some(field.into().into());
17853 }
17854 pub fn with_proof_points<T: Into<super::ZkLoginProof>>(
17856 mut self,
17857 field: T,
17858 ) -> Self {
17859 self.set_proof_points(field.into());
17860 self
17861 }
17862 pub fn iss_base64_details(&self) -> &super::ZkLoginClaim {
17864 self.iss_base64_details
17865 .as_ref()
17866 .map(|field| field as _)
17867 .unwrap_or_else(|| super::ZkLoginClaim::default_instance() as _)
17868 }
17869 pub fn iss_base64_details_opt_mut(
17871 &mut self,
17872 ) -> Option<&mut super::ZkLoginClaim> {
17873 self.iss_base64_details.as_mut().map(|field| field as _)
17874 }
17875 pub fn iss_base64_details_mut(&mut self) -> &mut super::ZkLoginClaim {
17878 self.iss_base64_details.get_or_insert_default()
17879 }
17880 pub fn iss_base64_details_opt(&self) -> Option<&super::ZkLoginClaim> {
17882 self.iss_base64_details.as_ref().map(|field| field as _)
17883 }
17884 pub fn set_iss_base64_details<T: Into<super::ZkLoginClaim>>(
17886 &mut self,
17887 field: T,
17888 ) {
17889 self.iss_base64_details = Some(field.into().into());
17890 }
17891 pub fn with_iss_base64_details<T: Into<super::ZkLoginClaim>>(
17893 mut self,
17894 field: T,
17895 ) -> Self {
17896 self.set_iss_base64_details(field.into());
17897 self
17898 }
17899 pub fn header_base64_opt_mut(&mut self) -> Option<&mut String> {
17901 self.header_base64.as_mut().map(|field| field as _)
17902 }
17903 pub fn header_base64_mut(&mut self) -> &mut String {
17906 self.header_base64.get_or_insert_default()
17907 }
17908 pub fn header_base64_opt(&self) -> Option<&str> {
17910 self.header_base64.as_ref().map(|field| field as _)
17911 }
17912 pub fn set_header_base64<T: Into<String>>(&mut self, field: T) {
17914 self.header_base64 = Some(field.into().into());
17915 }
17916 pub fn with_header_base64<T: Into<String>>(mut self, field: T) -> Self {
17918 self.set_header_base64(field.into());
17919 self
17920 }
17921 pub fn address_seed_opt_mut(&mut self) -> Option<&mut String> {
17923 self.address_seed.as_mut().map(|field| field as _)
17924 }
17925 pub fn address_seed_mut(&mut self) -> &mut String {
17928 self.address_seed.get_or_insert_default()
17929 }
17930 pub fn address_seed_opt(&self) -> Option<&str> {
17932 self.address_seed.as_ref().map(|field| field as _)
17933 }
17934 pub fn set_address_seed<T: Into<String>>(&mut self, field: T) {
17936 self.address_seed = Some(field.into().into());
17937 }
17938 pub fn with_address_seed<T: Into<String>>(mut self, field: T) -> Self {
17940 self.set_address_seed(field.into());
17941 self
17942 }
17943 }
17944 impl super::ZkLoginProof {
17945 pub const fn const_default() -> Self {
17946 Self { a: None, b: None, c: None }
17947 }
17948 #[doc(hidden)]
17949 pub fn default_instance() -> &'static Self {
17950 static DEFAULT: super::ZkLoginProof = super::ZkLoginProof::const_default();
17951 &DEFAULT
17952 }
17953 pub fn a(&self) -> &super::CircomG1 {
17955 self.a
17956 .as_ref()
17957 .map(|field| field as _)
17958 .unwrap_or_else(|| super::CircomG1::default_instance() as _)
17959 }
17960 pub fn a_opt_mut(&mut self) -> Option<&mut super::CircomG1> {
17962 self.a.as_mut().map(|field| field as _)
17963 }
17964 pub fn a_mut(&mut self) -> &mut super::CircomG1 {
17967 self.a.get_or_insert_default()
17968 }
17969 pub fn a_opt(&self) -> Option<&super::CircomG1> {
17971 self.a.as_ref().map(|field| field as _)
17972 }
17973 pub fn set_a<T: Into<super::CircomG1>>(&mut self, field: T) {
17975 self.a = Some(field.into().into());
17976 }
17977 pub fn with_a<T: Into<super::CircomG1>>(mut self, field: T) -> Self {
17979 self.set_a(field.into());
17980 self
17981 }
17982 pub fn b(&self) -> &super::CircomG2 {
17984 self.b
17985 .as_ref()
17986 .map(|field| field as _)
17987 .unwrap_or_else(|| super::CircomG2::default_instance() as _)
17988 }
17989 pub fn b_opt_mut(&mut self) -> Option<&mut super::CircomG2> {
17991 self.b.as_mut().map(|field| field as _)
17992 }
17993 pub fn b_mut(&mut self) -> &mut super::CircomG2 {
17996 self.b.get_or_insert_default()
17997 }
17998 pub fn b_opt(&self) -> Option<&super::CircomG2> {
18000 self.b.as_ref().map(|field| field as _)
18001 }
18002 pub fn set_b<T: Into<super::CircomG2>>(&mut self, field: T) {
18004 self.b = Some(field.into().into());
18005 }
18006 pub fn with_b<T: Into<super::CircomG2>>(mut self, field: T) -> Self {
18008 self.set_b(field.into());
18009 self
18010 }
18011 pub fn c(&self) -> &super::CircomG1 {
18013 self.c
18014 .as_ref()
18015 .map(|field| field as _)
18016 .unwrap_or_else(|| super::CircomG1::default_instance() as _)
18017 }
18018 pub fn c_opt_mut(&mut self) -> Option<&mut super::CircomG1> {
18020 self.c.as_mut().map(|field| field as _)
18021 }
18022 pub fn c_mut(&mut self) -> &mut super::CircomG1 {
18025 self.c.get_or_insert_default()
18026 }
18027 pub fn c_opt(&self) -> Option<&super::CircomG1> {
18029 self.c.as_ref().map(|field| field as _)
18030 }
18031 pub fn set_c<T: Into<super::CircomG1>>(&mut self, field: T) {
18033 self.c = Some(field.into().into());
18034 }
18035 pub fn with_c<T: Into<super::CircomG1>>(mut self, field: T) -> Self {
18037 self.set_c(field.into());
18038 self
18039 }
18040 }
18041 impl super::ZkLoginPublicIdentifier {
18042 pub const fn const_default() -> Self {
18043 Self {
18044 iss: None,
18045 address_seed: None,
18046 }
18047 }
18048 #[doc(hidden)]
18049 pub fn default_instance() -> &'static Self {
18050 static DEFAULT: super::ZkLoginPublicIdentifier = super::ZkLoginPublicIdentifier::const_default();
18051 &DEFAULT
18052 }
18053 pub fn iss_opt_mut(&mut self) -> Option<&mut String> {
18055 self.iss.as_mut().map(|field| field as _)
18056 }
18057 pub fn iss_mut(&mut self) -> &mut String {
18060 self.iss.get_or_insert_default()
18061 }
18062 pub fn iss_opt(&self) -> Option<&str> {
18064 self.iss.as_ref().map(|field| field as _)
18065 }
18066 pub fn set_iss<T: Into<String>>(&mut self, field: T) {
18068 self.iss = Some(field.into().into());
18069 }
18070 pub fn with_iss<T: Into<String>>(mut self, field: T) -> Self {
18072 self.set_iss(field.into());
18073 self
18074 }
18075 pub fn address_seed_opt_mut(&mut self) -> Option<&mut String> {
18077 self.address_seed.as_mut().map(|field| field as _)
18078 }
18079 pub fn address_seed_mut(&mut self) -> &mut String {
18082 self.address_seed.get_or_insert_default()
18083 }
18084 pub fn address_seed_opt(&self) -> Option<&str> {
18086 self.address_seed.as_ref().map(|field| field as _)
18087 }
18088 pub fn set_address_seed<T: Into<String>>(&mut self, field: T) {
18090 self.address_seed = Some(field.into().into());
18091 }
18092 pub fn with_address_seed<T: Into<String>>(mut self, field: T) -> Self {
18094 self.set_address_seed(field.into());
18095 self
18096 }
18097 }
18098}