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 }
4697 impl super::Epoch {
4698 pub const fn const_default() -> Self {
4699 Self {
4700 epoch: None,
4701 committee: None,
4702 system_state: None,
4703 first_checkpoint: None,
4704 last_checkpoint: None,
4705 start: None,
4706 end: None,
4707 reference_gas_price: None,
4708 protocol_config: None,
4709 }
4710 }
4711 #[doc(hidden)]
4712 pub fn default_instance() -> &'static Self {
4713 static DEFAULT: super::Epoch = super::Epoch::const_default();
4714 &DEFAULT
4715 }
4716 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
4718 self.epoch.as_mut().map(|field| field as _)
4719 }
4720 pub fn epoch_mut(&mut self) -> &mut u64 {
4723 self.epoch.get_or_insert_default()
4724 }
4725 pub fn epoch_opt(&self) -> Option<u64> {
4727 self.epoch.as_ref().map(|field| *field)
4728 }
4729 pub fn set_epoch(&mut self, field: u64) {
4731 self.epoch = Some(field);
4732 }
4733 pub fn with_epoch(mut self, field: u64) -> Self {
4735 self.set_epoch(field);
4736 self
4737 }
4738 pub fn committee(&self) -> &super::ValidatorCommittee {
4740 self.committee
4741 .as_ref()
4742 .map(|field| field as _)
4743 .unwrap_or_else(|| super::ValidatorCommittee::default_instance() as _)
4744 }
4745 pub fn committee_opt_mut(&mut self) -> Option<&mut super::ValidatorCommittee> {
4747 self.committee.as_mut().map(|field| field as _)
4748 }
4749 pub fn committee_mut(&mut self) -> &mut super::ValidatorCommittee {
4752 self.committee.get_or_insert_default()
4753 }
4754 pub fn committee_opt(&self) -> Option<&super::ValidatorCommittee> {
4756 self.committee.as_ref().map(|field| field as _)
4757 }
4758 pub fn set_committee<T: Into<super::ValidatorCommittee>>(&mut self, field: T) {
4760 self.committee = Some(field.into().into());
4761 }
4762 pub fn with_committee<T: Into<super::ValidatorCommittee>>(
4764 mut self,
4765 field: T,
4766 ) -> Self {
4767 self.set_committee(field.into());
4768 self
4769 }
4770 pub fn system_state(&self) -> &super::SystemState {
4772 self.system_state
4773 .as_ref()
4774 .map(|field| field as _)
4775 .unwrap_or_else(|| super::SystemState::default_instance() as _)
4776 }
4777 pub fn system_state_opt_mut(&mut self) -> Option<&mut super::SystemState> {
4779 self.system_state.as_mut().map(|field| field as _)
4780 }
4781 pub fn system_state_mut(&mut self) -> &mut super::SystemState {
4784 self.system_state.get_or_insert_default()
4785 }
4786 pub fn system_state_opt(&self) -> Option<&super::SystemState> {
4788 self.system_state.as_ref().map(|field| field as _)
4789 }
4790 pub fn set_system_state<T: Into<super::SystemState>>(&mut self, field: T) {
4792 self.system_state = Some(field.into().into());
4793 }
4794 pub fn with_system_state<T: Into<super::SystemState>>(
4796 mut self,
4797 field: T,
4798 ) -> Self {
4799 self.set_system_state(field.into());
4800 self
4801 }
4802 pub fn first_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
4804 self.first_checkpoint.as_mut().map(|field| field as _)
4805 }
4806 pub fn first_checkpoint_mut(&mut self) -> &mut u64 {
4809 self.first_checkpoint.get_or_insert_default()
4810 }
4811 pub fn first_checkpoint_opt(&self) -> Option<u64> {
4813 self.first_checkpoint.as_ref().map(|field| *field)
4814 }
4815 pub fn set_first_checkpoint(&mut self, field: u64) {
4817 self.first_checkpoint = Some(field);
4818 }
4819 pub fn with_first_checkpoint(mut self, field: u64) -> Self {
4821 self.set_first_checkpoint(field);
4822 self
4823 }
4824 pub fn last_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
4826 self.last_checkpoint.as_mut().map(|field| field as _)
4827 }
4828 pub fn last_checkpoint_mut(&mut self) -> &mut u64 {
4831 self.last_checkpoint.get_or_insert_default()
4832 }
4833 pub fn last_checkpoint_opt(&self) -> Option<u64> {
4835 self.last_checkpoint.as_ref().map(|field| *field)
4836 }
4837 pub fn set_last_checkpoint(&mut self, field: u64) {
4839 self.last_checkpoint = Some(field);
4840 }
4841 pub fn with_last_checkpoint(mut self, field: u64) -> Self {
4843 self.set_last_checkpoint(field);
4844 self
4845 }
4846 pub fn start_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
4848 self.start.as_mut().map(|field| field as _)
4849 }
4850 pub fn start_mut(&mut self) -> &mut ::prost_types::Timestamp {
4853 self.start.get_or_insert_default()
4854 }
4855 pub fn start_opt(&self) -> Option<&::prost_types::Timestamp> {
4857 self.start.as_ref().map(|field| field as _)
4858 }
4859 pub fn set_start<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
4861 self.start = Some(field.into().into());
4862 }
4863 pub fn with_start<T: Into<::prost_types::Timestamp>>(
4865 mut self,
4866 field: T,
4867 ) -> Self {
4868 self.set_start(field.into());
4869 self
4870 }
4871 pub fn end_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
4873 self.end.as_mut().map(|field| field as _)
4874 }
4875 pub fn end_mut(&mut self) -> &mut ::prost_types::Timestamp {
4878 self.end.get_or_insert_default()
4879 }
4880 pub fn end_opt(&self) -> Option<&::prost_types::Timestamp> {
4882 self.end.as_ref().map(|field| field as _)
4883 }
4884 pub fn set_end<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
4886 self.end = Some(field.into().into());
4887 }
4888 pub fn with_end<T: Into<::prost_types::Timestamp>>(mut self, field: T) -> Self {
4890 self.set_end(field.into());
4891 self
4892 }
4893 pub fn reference_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
4895 self.reference_gas_price.as_mut().map(|field| field as _)
4896 }
4897 pub fn reference_gas_price_mut(&mut self) -> &mut u64 {
4900 self.reference_gas_price.get_or_insert_default()
4901 }
4902 pub fn reference_gas_price_opt(&self) -> Option<u64> {
4904 self.reference_gas_price.as_ref().map(|field| *field)
4905 }
4906 pub fn set_reference_gas_price(&mut self, field: u64) {
4908 self.reference_gas_price = Some(field);
4909 }
4910 pub fn with_reference_gas_price(mut self, field: u64) -> Self {
4912 self.set_reference_gas_price(field);
4913 self
4914 }
4915 pub fn protocol_config(&self) -> &super::ProtocolConfig {
4917 self.protocol_config
4918 .as_ref()
4919 .map(|field| field as _)
4920 .unwrap_or_else(|| super::ProtocolConfig::default_instance() as _)
4921 }
4922 pub fn protocol_config_opt_mut(&mut self) -> Option<&mut super::ProtocolConfig> {
4924 self.protocol_config.as_mut().map(|field| field as _)
4925 }
4926 pub fn protocol_config_mut(&mut self) -> &mut super::ProtocolConfig {
4929 self.protocol_config.get_or_insert_default()
4930 }
4931 pub fn protocol_config_opt(&self) -> Option<&super::ProtocolConfig> {
4933 self.protocol_config.as_ref().map(|field| field as _)
4934 }
4935 pub fn set_protocol_config<T: Into<super::ProtocolConfig>>(&mut self, field: T) {
4937 self.protocol_config = Some(field.into().into());
4938 }
4939 pub fn with_protocol_config<T: Into<super::ProtocolConfig>>(
4941 mut self,
4942 field: T,
4943 ) -> Self {
4944 self.set_protocol_config(field.into());
4945 self
4946 }
4947 }
4948 impl super::Event {
4949 pub const fn const_default() -> Self {
4950 Self {
4951 package_id: None,
4952 module: None,
4953 sender: None,
4954 event_type: None,
4955 contents: None,
4956 json: None,
4957 }
4958 }
4959 #[doc(hidden)]
4960 pub fn default_instance() -> &'static Self {
4961 static DEFAULT: super::Event = super::Event::const_default();
4962 &DEFAULT
4963 }
4964 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
4966 self.package_id.as_mut().map(|field| field as _)
4967 }
4968 pub fn package_id_mut(&mut self) -> &mut String {
4971 self.package_id.get_or_insert_default()
4972 }
4973 pub fn package_id_opt(&self) -> Option<&str> {
4975 self.package_id.as_ref().map(|field| field as _)
4976 }
4977 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
4979 self.package_id = Some(field.into().into());
4980 }
4981 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
4983 self.set_package_id(field.into());
4984 self
4985 }
4986 pub fn module_opt_mut(&mut self) -> Option<&mut String> {
4988 self.module.as_mut().map(|field| field as _)
4989 }
4990 pub fn module_mut(&mut self) -> &mut String {
4993 self.module.get_or_insert_default()
4994 }
4995 pub fn module_opt(&self) -> Option<&str> {
4997 self.module.as_ref().map(|field| field as _)
4998 }
4999 pub fn set_module<T: Into<String>>(&mut self, field: T) {
5001 self.module = Some(field.into().into());
5002 }
5003 pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
5005 self.set_module(field.into());
5006 self
5007 }
5008 pub fn sender_opt_mut(&mut self) -> Option<&mut String> {
5010 self.sender.as_mut().map(|field| field as _)
5011 }
5012 pub fn sender_mut(&mut self) -> &mut String {
5015 self.sender.get_or_insert_default()
5016 }
5017 pub fn sender_opt(&self) -> Option<&str> {
5019 self.sender.as_ref().map(|field| field as _)
5020 }
5021 pub fn set_sender<T: Into<String>>(&mut self, field: T) {
5023 self.sender = Some(field.into().into());
5024 }
5025 pub fn with_sender<T: Into<String>>(mut self, field: T) -> Self {
5027 self.set_sender(field.into());
5028 self
5029 }
5030 pub fn event_type_opt_mut(&mut self) -> Option<&mut String> {
5032 self.event_type.as_mut().map(|field| field as _)
5033 }
5034 pub fn event_type_mut(&mut self) -> &mut String {
5037 self.event_type.get_or_insert_default()
5038 }
5039 pub fn event_type_opt(&self) -> Option<&str> {
5041 self.event_type.as_ref().map(|field| field as _)
5042 }
5043 pub fn set_event_type<T: Into<String>>(&mut self, field: T) {
5045 self.event_type = Some(field.into().into());
5046 }
5047 pub fn with_event_type<T: Into<String>>(mut self, field: T) -> Self {
5049 self.set_event_type(field.into());
5050 self
5051 }
5052 pub fn contents(&self) -> &super::Bcs {
5054 self.contents
5055 .as_ref()
5056 .map(|field| field as _)
5057 .unwrap_or_else(|| super::Bcs::default_instance() as _)
5058 }
5059 pub fn contents_opt_mut(&mut self) -> Option<&mut super::Bcs> {
5061 self.contents.as_mut().map(|field| field as _)
5062 }
5063 pub fn contents_mut(&mut self) -> &mut super::Bcs {
5066 self.contents.get_or_insert_default()
5067 }
5068 pub fn contents_opt(&self) -> Option<&super::Bcs> {
5070 self.contents.as_ref().map(|field| field as _)
5071 }
5072 pub fn set_contents<T: Into<super::Bcs>>(&mut self, field: T) {
5074 self.contents = Some(field.into().into());
5075 }
5076 pub fn with_contents<T: Into<super::Bcs>>(mut self, field: T) -> Self {
5078 self.set_contents(field.into());
5079 self
5080 }
5081 pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
5083 self.json.as_mut().map(|field| field as _)
5084 }
5085 pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
5088 self.json.get_or_insert_default()
5089 }
5090 pub fn json_opt(&self) -> Option<&::prost_types::Value> {
5092 self.json.as_ref().map(|field| field as _)
5093 }
5094 pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
5096 self.json = Some(field.into().into());
5097 }
5098 pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
5100 self.set_json(field.into());
5101 self
5102 }
5103 }
5104 impl super::ExecuteTransactionRequest {
5105 pub const fn const_default() -> Self {
5106 Self {
5107 transaction: None,
5108 signatures: Vec::new(),
5109 read_mask: None,
5110 }
5111 }
5112 #[doc(hidden)]
5113 pub fn default_instance() -> &'static Self {
5114 static DEFAULT: super::ExecuteTransactionRequest = super::ExecuteTransactionRequest::const_default();
5115 &DEFAULT
5116 }
5117 pub fn transaction(&self) -> &super::Transaction {
5119 self.transaction
5120 .as_ref()
5121 .map(|field| field as _)
5122 .unwrap_or_else(|| super::Transaction::default_instance() as _)
5123 }
5124 pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
5126 self.transaction.as_mut().map(|field| field as _)
5127 }
5128 pub fn transaction_mut(&mut self) -> &mut super::Transaction {
5131 self.transaction.get_or_insert_default()
5132 }
5133 pub fn transaction_opt(&self) -> Option<&super::Transaction> {
5135 self.transaction.as_ref().map(|field| field as _)
5136 }
5137 pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
5139 self.transaction = Some(field.into().into());
5140 }
5141 pub fn with_transaction<T: Into<super::Transaction>>(
5143 mut self,
5144 field: T,
5145 ) -> Self {
5146 self.set_transaction(field.into());
5147 self
5148 }
5149 pub fn signatures(&self) -> &[super::UserSignature] {
5151 &self.signatures
5152 }
5153 pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
5156 &mut self.signatures
5157 }
5158 pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
5160 self.signatures = field;
5161 }
5162 pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
5164 self.set_signatures(field);
5165 self
5166 }
5167 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
5169 self.read_mask.as_mut().map(|field| field as _)
5170 }
5171 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
5174 self.read_mask.get_or_insert_default()
5175 }
5176 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
5178 self.read_mask.as_ref().map(|field| field as _)
5179 }
5180 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
5182 self.read_mask = Some(field.into().into());
5183 }
5184 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
5186 mut self,
5187 field: T,
5188 ) -> Self {
5189 self.set_read_mask(field.into());
5190 self
5191 }
5192 }
5193 impl super::ExecuteTransactionResponse {
5194 pub const fn const_default() -> Self {
5195 Self { transaction: None }
5196 }
5197 #[doc(hidden)]
5198 pub fn default_instance() -> &'static Self {
5199 static DEFAULT: super::ExecuteTransactionResponse = super::ExecuteTransactionResponse::const_default();
5200 &DEFAULT
5201 }
5202 pub fn transaction(&self) -> &super::ExecutedTransaction {
5204 self.transaction
5205 .as_ref()
5206 .map(|field| field as _)
5207 .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
5208 }
5209 pub fn transaction_opt_mut(
5211 &mut self,
5212 ) -> Option<&mut super::ExecutedTransaction> {
5213 self.transaction.as_mut().map(|field| field as _)
5214 }
5215 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
5218 self.transaction.get_or_insert_default()
5219 }
5220 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
5222 self.transaction.as_ref().map(|field| field as _)
5223 }
5224 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
5226 &mut self,
5227 field: T,
5228 ) {
5229 self.transaction = Some(field.into().into());
5230 }
5231 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
5233 mut self,
5234 field: T,
5235 ) -> Self {
5236 self.set_transaction(field.into());
5237 self
5238 }
5239 }
5240 impl super::ExecutedTransaction {
5241 pub const fn const_default() -> Self {
5242 Self {
5243 digest: None,
5244 transaction: None,
5245 signatures: Vec::new(),
5246 effects: None,
5247 events: None,
5248 checkpoint: None,
5249 timestamp: None,
5250 balance_changes: Vec::new(),
5251 objects: None,
5252 }
5253 }
5254 #[doc(hidden)]
5255 pub fn default_instance() -> &'static Self {
5256 static DEFAULT: super::ExecutedTransaction = super::ExecutedTransaction::const_default();
5257 &DEFAULT
5258 }
5259 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
5261 self.digest.as_mut().map(|field| field as _)
5262 }
5263 pub fn digest_mut(&mut self) -> &mut String {
5266 self.digest.get_or_insert_default()
5267 }
5268 pub fn digest_opt(&self) -> Option<&str> {
5270 self.digest.as_ref().map(|field| field as _)
5271 }
5272 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
5274 self.digest = Some(field.into().into());
5275 }
5276 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
5278 self.set_digest(field.into());
5279 self
5280 }
5281 pub fn transaction(&self) -> &super::Transaction {
5283 self.transaction
5284 .as_ref()
5285 .map(|field| field as _)
5286 .unwrap_or_else(|| super::Transaction::default_instance() as _)
5287 }
5288 pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
5290 self.transaction.as_mut().map(|field| field as _)
5291 }
5292 pub fn transaction_mut(&mut self) -> &mut super::Transaction {
5295 self.transaction.get_or_insert_default()
5296 }
5297 pub fn transaction_opt(&self) -> Option<&super::Transaction> {
5299 self.transaction.as_ref().map(|field| field as _)
5300 }
5301 pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
5303 self.transaction = Some(field.into().into());
5304 }
5305 pub fn with_transaction<T: Into<super::Transaction>>(
5307 mut self,
5308 field: T,
5309 ) -> Self {
5310 self.set_transaction(field.into());
5311 self
5312 }
5313 pub fn signatures(&self) -> &[super::UserSignature] {
5315 &self.signatures
5316 }
5317 pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
5320 &mut self.signatures
5321 }
5322 pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
5324 self.signatures = field;
5325 }
5326 pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
5328 self.set_signatures(field);
5329 self
5330 }
5331 pub fn effects(&self) -> &super::TransactionEffects {
5333 self.effects
5334 .as_ref()
5335 .map(|field| field as _)
5336 .unwrap_or_else(|| super::TransactionEffects::default_instance() as _)
5337 }
5338 pub fn effects_opt_mut(&mut self) -> Option<&mut super::TransactionEffects> {
5340 self.effects.as_mut().map(|field| field as _)
5341 }
5342 pub fn effects_mut(&mut self) -> &mut super::TransactionEffects {
5345 self.effects.get_or_insert_default()
5346 }
5347 pub fn effects_opt(&self) -> Option<&super::TransactionEffects> {
5349 self.effects.as_ref().map(|field| field as _)
5350 }
5351 pub fn set_effects<T: Into<super::TransactionEffects>>(&mut self, field: T) {
5353 self.effects = Some(field.into().into());
5354 }
5355 pub fn with_effects<T: Into<super::TransactionEffects>>(
5357 mut self,
5358 field: T,
5359 ) -> Self {
5360 self.set_effects(field.into());
5361 self
5362 }
5363 pub fn events(&self) -> &super::TransactionEvents {
5365 self.events
5366 .as_ref()
5367 .map(|field| field as _)
5368 .unwrap_or_else(|| super::TransactionEvents::default_instance() as _)
5369 }
5370 pub fn events_opt_mut(&mut self) -> Option<&mut super::TransactionEvents> {
5372 self.events.as_mut().map(|field| field as _)
5373 }
5374 pub fn events_mut(&mut self) -> &mut super::TransactionEvents {
5377 self.events.get_or_insert_default()
5378 }
5379 pub fn events_opt(&self) -> Option<&super::TransactionEvents> {
5381 self.events.as_ref().map(|field| field as _)
5382 }
5383 pub fn set_events<T: Into<super::TransactionEvents>>(&mut self, field: T) {
5385 self.events = Some(field.into().into());
5386 }
5387 pub fn with_events<T: Into<super::TransactionEvents>>(
5389 mut self,
5390 field: T,
5391 ) -> Self {
5392 self.set_events(field.into());
5393 self
5394 }
5395 pub fn checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
5397 self.checkpoint.as_mut().map(|field| field as _)
5398 }
5399 pub fn checkpoint_mut(&mut self) -> &mut u64 {
5402 self.checkpoint.get_or_insert_default()
5403 }
5404 pub fn checkpoint_opt(&self) -> Option<u64> {
5406 self.checkpoint.as_ref().map(|field| *field)
5407 }
5408 pub fn set_checkpoint(&mut self, field: u64) {
5410 self.checkpoint = Some(field);
5411 }
5412 pub fn with_checkpoint(mut self, field: u64) -> Self {
5414 self.set_checkpoint(field);
5415 self
5416 }
5417 pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
5419 self.timestamp.as_mut().map(|field| field as _)
5420 }
5421 pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
5424 self.timestamp.get_or_insert_default()
5425 }
5426 pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
5428 self.timestamp.as_ref().map(|field| field as _)
5429 }
5430 pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
5432 self.timestamp = Some(field.into().into());
5433 }
5434 pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
5436 mut self,
5437 field: T,
5438 ) -> Self {
5439 self.set_timestamp(field.into());
5440 self
5441 }
5442 pub fn balance_changes(&self) -> &[super::BalanceChange] {
5444 &self.balance_changes
5445 }
5446 pub fn balance_changes_mut(&mut self) -> &mut Vec<super::BalanceChange> {
5449 &mut self.balance_changes
5450 }
5451 pub fn set_balance_changes(&mut self, field: Vec<super::BalanceChange>) {
5453 self.balance_changes = field;
5454 }
5455 pub fn with_balance_changes(mut self, field: Vec<super::BalanceChange>) -> Self {
5457 self.set_balance_changes(field);
5458 self
5459 }
5460 pub fn objects(&self) -> &super::ObjectSet {
5462 self.objects
5463 .as_ref()
5464 .map(|field| field as _)
5465 .unwrap_or_else(|| super::ObjectSet::default_instance() as _)
5466 }
5467 pub fn objects_opt_mut(&mut self) -> Option<&mut super::ObjectSet> {
5469 self.objects.as_mut().map(|field| field as _)
5470 }
5471 pub fn objects_mut(&mut self) -> &mut super::ObjectSet {
5474 self.objects.get_or_insert_default()
5475 }
5476 pub fn objects_opt(&self) -> Option<&super::ObjectSet> {
5478 self.objects.as_ref().map(|field| field as _)
5479 }
5480 pub fn set_objects<T: Into<super::ObjectSet>>(&mut self, field: T) {
5482 self.objects = Some(field.into().into());
5483 }
5484 pub fn with_objects<T: Into<super::ObjectSet>>(mut self, field: T) -> Self {
5486 self.set_objects(field.into());
5487 self
5488 }
5489 }
5490 impl super::ExecutionError {
5491 pub const fn const_default() -> Self {
5492 Self {
5493 description: None,
5494 command: None,
5495 kind: None,
5496 error_details: None,
5497 }
5498 }
5499 #[doc(hidden)]
5500 pub fn default_instance() -> &'static Self {
5501 static DEFAULT: super::ExecutionError = super::ExecutionError::const_default();
5502 &DEFAULT
5503 }
5504 pub fn description_opt_mut(&mut self) -> Option<&mut String> {
5506 self.description.as_mut().map(|field| field as _)
5507 }
5508 pub fn description_mut(&mut self) -> &mut String {
5511 self.description.get_or_insert_default()
5512 }
5513 pub fn description_opt(&self) -> Option<&str> {
5515 self.description.as_ref().map(|field| field as _)
5516 }
5517 pub fn set_description<T: Into<String>>(&mut self, field: T) {
5519 self.description = Some(field.into().into());
5520 }
5521 pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
5523 self.set_description(field.into());
5524 self
5525 }
5526 pub fn command_opt_mut(&mut self) -> Option<&mut u64> {
5528 self.command.as_mut().map(|field| field as _)
5529 }
5530 pub fn command_mut(&mut self) -> &mut u64 {
5533 self.command.get_or_insert_default()
5534 }
5535 pub fn command_opt(&self) -> Option<u64> {
5537 self.command.as_ref().map(|field| *field)
5538 }
5539 pub fn set_command(&mut self, field: u64) {
5541 self.command = Some(field);
5542 }
5543 pub fn with_command(mut self, field: u64) -> Self {
5545 self.set_command(field);
5546 self
5547 }
5548 pub fn with_kind<T: Into<super::execution_error::ExecutionErrorKind>>(
5550 mut self,
5551 field: T,
5552 ) -> Self {
5553 self.set_kind(field.into());
5554 self
5555 }
5556 pub fn abort(&self) -> &super::MoveAbort {
5558 if let Some(super::execution_error::ErrorDetails::Abort(field)) = &self
5559 .error_details
5560 {
5561 field as _
5562 } else {
5563 super::MoveAbort::default_instance() as _
5564 }
5565 }
5566 pub fn abort_opt(&self) -> Option<&super::MoveAbort> {
5568 if let Some(super::execution_error::ErrorDetails::Abort(field)) = &self
5569 .error_details
5570 {
5571 Some(field as _)
5572 } else {
5573 None
5574 }
5575 }
5576 pub fn abort_opt_mut(&mut self) -> Option<&mut super::MoveAbort> {
5578 if let Some(super::execution_error::ErrorDetails::Abort(field)) = &mut self
5579 .error_details
5580 {
5581 Some(field as _)
5582 } else {
5583 None
5584 }
5585 }
5586 pub fn abort_mut(&mut self) -> &mut super::MoveAbort {
5590 if self.abort_opt_mut().is_none() {
5591 self.error_details = Some(
5592 super::execution_error::ErrorDetails::Abort(
5593 super::MoveAbort::default(),
5594 ),
5595 );
5596 }
5597 self.abort_opt_mut().unwrap()
5598 }
5599 pub fn set_abort<T: Into<super::MoveAbort>>(&mut self, field: T) {
5602 self.error_details = Some(
5603 super::execution_error::ErrorDetails::Abort(field.into().into()),
5604 );
5605 }
5606 pub fn with_abort<T: Into<super::MoveAbort>>(mut self, field: T) -> Self {
5609 self.set_abort(field.into());
5610 self
5611 }
5612 pub fn size_error(&self) -> &super::SizeError {
5614 if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &self
5615 .error_details
5616 {
5617 field as _
5618 } else {
5619 super::SizeError::default_instance() as _
5620 }
5621 }
5622 pub fn size_error_opt(&self) -> Option<&super::SizeError> {
5624 if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &self
5625 .error_details
5626 {
5627 Some(field as _)
5628 } else {
5629 None
5630 }
5631 }
5632 pub fn size_error_opt_mut(&mut self) -> Option<&mut super::SizeError> {
5634 if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &mut self
5635 .error_details
5636 {
5637 Some(field as _)
5638 } else {
5639 None
5640 }
5641 }
5642 pub fn size_error_mut(&mut self) -> &mut super::SizeError {
5646 if self.size_error_opt_mut().is_none() {
5647 self.error_details = Some(
5648 super::execution_error::ErrorDetails::SizeError(
5649 super::SizeError::default(),
5650 ),
5651 );
5652 }
5653 self.size_error_opt_mut().unwrap()
5654 }
5655 pub fn set_size_error<T: Into<super::SizeError>>(&mut self, field: T) {
5658 self.error_details = Some(
5659 super::execution_error::ErrorDetails::SizeError(field.into().into()),
5660 );
5661 }
5662 pub fn with_size_error<T: Into<super::SizeError>>(mut self, field: T) -> Self {
5665 self.set_size_error(field.into());
5666 self
5667 }
5668 pub fn command_argument_error(&self) -> &super::CommandArgumentError {
5670 if let Some(
5671 super::execution_error::ErrorDetails::CommandArgumentError(field),
5672 ) = &self.error_details
5673 {
5674 field as _
5675 } else {
5676 super::CommandArgumentError::default_instance() as _
5677 }
5678 }
5679 pub fn command_argument_error_opt(
5681 &self,
5682 ) -> Option<&super::CommandArgumentError> {
5683 if let Some(
5684 super::execution_error::ErrorDetails::CommandArgumentError(field),
5685 ) = &self.error_details
5686 {
5687 Some(field as _)
5688 } else {
5689 None
5690 }
5691 }
5692 pub fn command_argument_error_opt_mut(
5694 &mut self,
5695 ) -> Option<&mut super::CommandArgumentError> {
5696 if let Some(
5697 super::execution_error::ErrorDetails::CommandArgumentError(field),
5698 ) = &mut self.error_details
5699 {
5700 Some(field as _)
5701 } else {
5702 None
5703 }
5704 }
5705 pub fn command_argument_error_mut(
5709 &mut self,
5710 ) -> &mut super::CommandArgumentError {
5711 if self.command_argument_error_opt_mut().is_none() {
5712 self.error_details = Some(
5713 super::execution_error::ErrorDetails::CommandArgumentError(
5714 super::CommandArgumentError::default(),
5715 ),
5716 );
5717 }
5718 self.command_argument_error_opt_mut().unwrap()
5719 }
5720 pub fn set_command_argument_error<T: Into<super::CommandArgumentError>>(
5723 &mut self,
5724 field: T,
5725 ) {
5726 self.error_details = Some(
5727 super::execution_error::ErrorDetails::CommandArgumentError(
5728 field.into().into(),
5729 ),
5730 );
5731 }
5732 pub fn with_command_argument_error<T: Into<super::CommandArgumentError>>(
5735 mut self,
5736 field: T,
5737 ) -> Self {
5738 self.set_command_argument_error(field.into());
5739 self
5740 }
5741 pub fn type_argument_error(&self) -> &super::TypeArgumentError {
5743 if let Some(
5744 super::execution_error::ErrorDetails::TypeArgumentError(field),
5745 ) = &self.error_details
5746 {
5747 field as _
5748 } else {
5749 super::TypeArgumentError::default_instance() as _
5750 }
5751 }
5752 pub fn type_argument_error_opt(&self) -> Option<&super::TypeArgumentError> {
5754 if let Some(
5755 super::execution_error::ErrorDetails::TypeArgumentError(field),
5756 ) = &self.error_details
5757 {
5758 Some(field as _)
5759 } else {
5760 None
5761 }
5762 }
5763 pub fn type_argument_error_opt_mut(
5765 &mut self,
5766 ) -> Option<&mut super::TypeArgumentError> {
5767 if let Some(
5768 super::execution_error::ErrorDetails::TypeArgumentError(field),
5769 ) = &mut self.error_details
5770 {
5771 Some(field as _)
5772 } else {
5773 None
5774 }
5775 }
5776 pub fn type_argument_error_mut(&mut self) -> &mut super::TypeArgumentError {
5780 if self.type_argument_error_opt_mut().is_none() {
5781 self.error_details = Some(
5782 super::execution_error::ErrorDetails::TypeArgumentError(
5783 super::TypeArgumentError::default(),
5784 ),
5785 );
5786 }
5787 self.type_argument_error_opt_mut().unwrap()
5788 }
5789 pub fn set_type_argument_error<T: Into<super::TypeArgumentError>>(
5792 &mut self,
5793 field: T,
5794 ) {
5795 self.error_details = Some(
5796 super::execution_error::ErrorDetails::TypeArgumentError(
5797 field.into().into(),
5798 ),
5799 );
5800 }
5801 pub fn with_type_argument_error<T: Into<super::TypeArgumentError>>(
5804 mut self,
5805 field: T,
5806 ) -> Self {
5807 self.set_type_argument_error(field.into());
5808 self
5809 }
5810 pub fn package_upgrade_error(&self) -> &super::PackageUpgradeError {
5812 if let Some(
5813 super::execution_error::ErrorDetails::PackageUpgradeError(field),
5814 ) = &self.error_details
5815 {
5816 field as _
5817 } else {
5818 super::PackageUpgradeError::default_instance() as _
5819 }
5820 }
5821 pub fn package_upgrade_error_opt(&self) -> Option<&super::PackageUpgradeError> {
5823 if let Some(
5824 super::execution_error::ErrorDetails::PackageUpgradeError(field),
5825 ) = &self.error_details
5826 {
5827 Some(field as _)
5828 } else {
5829 None
5830 }
5831 }
5832 pub fn package_upgrade_error_opt_mut(
5834 &mut self,
5835 ) -> Option<&mut super::PackageUpgradeError> {
5836 if let Some(
5837 super::execution_error::ErrorDetails::PackageUpgradeError(field),
5838 ) = &mut self.error_details
5839 {
5840 Some(field as _)
5841 } else {
5842 None
5843 }
5844 }
5845 pub fn package_upgrade_error_mut(&mut self) -> &mut super::PackageUpgradeError {
5849 if self.package_upgrade_error_opt_mut().is_none() {
5850 self.error_details = Some(
5851 super::execution_error::ErrorDetails::PackageUpgradeError(
5852 super::PackageUpgradeError::default(),
5853 ),
5854 );
5855 }
5856 self.package_upgrade_error_opt_mut().unwrap()
5857 }
5858 pub fn set_package_upgrade_error<T: Into<super::PackageUpgradeError>>(
5861 &mut self,
5862 field: T,
5863 ) {
5864 self.error_details = Some(
5865 super::execution_error::ErrorDetails::PackageUpgradeError(
5866 field.into().into(),
5867 ),
5868 );
5869 }
5870 pub fn with_package_upgrade_error<T: Into<super::PackageUpgradeError>>(
5873 mut self,
5874 field: T,
5875 ) -> Self {
5876 self.set_package_upgrade_error(field.into());
5877 self
5878 }
5879 pub fn index_error(&self) -> &super::IndexError {
5881 if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &self
5882 .error_details
5883 {
5884 field as _
5885 } else {
5886 super::IndexError::default_instance() as _
5887 }
5888 }
5889 pub fn index_error_opt(&self) -> Option<&super::IndexError> {
5891 if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &self
5892 .error_details
5893 {
5894 Some(field as _)
5895 } else {
5896 None
5897 }
5898 }
5899 pub fn index_error_opt_mut(&mut self) -> Option<&mut super::IndexError> {
5901 if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &mut self
5902 .error_details
5903 {
5904 Some(field as _)
5905 } else {
5906 None
5907 }
5908 }
5909 pub fn index_error_mut(&mut self) -> &mut super::IndexError {
5913 if self.index_error_opt_mut().is_none() {
5914 self.error_details = Some(
5915 super::execution_error::ErrorDetails::IndexError(
5916 super::IndexError::default(),
5917 ),
5918 );
5919 }
5920 self.index_error_opt_mut().unwrap()
5921 }
5922 pub fn set_index_error<T: Into<super::IndexError>>(&mut self, field: T) {
5925 self.error_details = Some(
5926 super::execution_error::ErrorDetails::IndexError(field.into().into()),
5927 );
5928 }
5929 pub fn with_index_error<T: Into<super::IndexError>>(mut self, field: T) -> Self {
5932 self.set_index_error(field.into());
5933 self
5934 }
5935 pub fn object_id(&self) -> &str {
5937 if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &self
5938 .error_details
5939 {
5940 field as _
5941 } else {
5942 ""
5943 }
5944 }
5945 pub fn object_id_opt(&self) -> Option<&str> {
5947 if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &self
5948 .error_details
5949 {
5950 Some(field as _)
5951 } else {
5952 None
5953 }
5954 }
5955 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
5957 if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &mut self
5958 .error_details
5959 {
5960 Some(field as _)
5961 } else {
5962 None
5963 }
5964 }
5965 pub fn object_id_mut(&mut self) -> &mut String {
5969 if self.object_id_opt_mut().is_none() {
5970 self.error_details = Some(
5971 super::execution_error::ErrorDetails::ObjectId(String::default()),
5972 );
5973 }
5974 self.object_id_opt_mut().unwrap()
5975 }
5976 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
5979 self.error_details = Some(
5980 super::execution_error::ErrorDetails::ObjectId(field.into().into()),
5981 );
5982 }
5983 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
5986 self.set_object_id(field.into());
5987 self
5988 }
5989 pub fn coin_deny_list_error(&self) -> &super::CoinDenyListError {
5991 if let Some(
5992 super::execution_error::ErrorDetails::CoinDenyListError(field),
5993 ) = &self.error_details
5994 {
5995 field as _
5996 } else {
5997 super::CoinDenyListError::default_instance() as _
5998 }
5999 }
6000 pub fn coin_deny_list_error_opt(&self) -> Option<&super::CoinDenyListError> {
6002 if let Some(
6003 super::execution_error::ErrorDetails::CoinDenyListError(field),
6004 ) = &self.error_details
6005 {
6006 Some(field as _)
6007 } else {
6008 None
6009 }
6010 }
6011 pub fn coin_deny_list_error_opt_mut(
6013 &mut self,
6014 ) -> Option<&mut super::CoinDenyListError> {
6015 if let Some(
6016 super::execution_error::ErrorDetails::CoinDenyListError(field),
6017 ) = &mut self.error_details
6018 {
6019 Some(field as _)
6020 } else {
6021 None
6022 }
6023 }
6024 pub fn coin_deny_list_error_mut(&mut self) -> &mut super::CoinDenyListError {
6028 if self.coin_deny_list_error_opt_mut().is_none() {
6029 self.error_details = Some(
6030 super::execution_error::ErrorDetails::CoinDenyListError(
6031 super::CoinDenyListError::default(),
6032 ),
6033 );
6034 }
6035 self.coin_deny_list_error_opt_mut().unwrap()
6036 }
6037 pub fn set_coin_deny_list_error<T: Into<super::CoinDenyListError>>(
6040 &mut self,
6041 field: T,
6042 ) {
6043 self.error_details = Some(
6044 super::execution_error::ErrorDetails::CoinDenyListError(
6045 field.into().into(),
6046 ),
6047 );
6048 }
6049 pub fn with_coin_deny_list_error<T: Into<super::CoinDenyListError>>(
6052 mut self,
6053 field: T,
6054 ) -> Self {
6055 self.set_coin_deny_list_error(field.into());
6056 self
6057 }
6058 pub fn congested_objects(&self) -> &super::CongestedObjects {
6060 if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &self
6061 .error_details
6062 {
6063 field as _
6064 } else {
6065 super::CongestedObjects::default_instance() as _
6066 }
6067 }
6068 pub fn congested_objects_opt(&self) -> Option<&super::CongestedObjects> {
6070 if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &self
6071 .error_details
6072 {
6073 Some(field as _)
6074 } else {
6075 None
6076 }
6077 }
6078 pub fn congested_objects_opt_mut(
6080 &mut self,
6081 ) -> Option<&mut super::CongestedObjects> {
6082 if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &mut self
6083 .error_details
6084 {
6085 Some(field as _)
6086 } else {
6087 None
6088 }
6089 }
6090 pub fn congested_objects_mut(&mut self) -> &mut super::CongestedObjects {
6094 if self.congested_objects_opt_mut().is_none() {
6095 self.error_details = Some(
6096 super::execution_error::ErrorDetails::CongestedObjects(
6097 super::CongestedObjects::default(),
6098 ),
6099 );
6100 }
6101 self.congested_objects_opt_mut().unwrap()
6102 }
6103 pub fn set_congested_objects<T: Into<super::CongestedObjects>>(
6106 &mut self,
6107 field: T,
6108 ) {
6109 self.error_details = Some(
6110 super::execution_error::ErrorDetails::CongestedObjects(
6111 field.into().into(),
6112 ),
6113 );
6114 }
6115 pub fn with_congested_objects<T: Into<super::CongestedObjects>>(
6118 mut self,
6119 field: T,
6120 ) -> Self {
6121 self.set_congested_objects(field.into());
6122 self
6123 }
6124 }
6125 impl super::ExecutionStatus {
6126 pub const fn const_default() -> Self {
6127 Self { success: None, error: None }
6128 }
6129 #[doc(hidden)]
6130 pub fn default_instance() -> &'static Self {
6131 static DEFAULT: super::ExecutionStatus = super::ExecutionStatus::const_default();
6132 &DEFAULT
6133 }
6134 pub fn success_opt_mut(&mut self) -> Option<&mut bool> {
6136 self.success.as_mut().map(|field| field as _)
6137 }
6138 pub fn success_mut(&mut self) -> &mut bool {
6141 self.success.get_or_insert_default()
6142 }
6143 pub fn success_opt(&self) -> Option<bool> {
6145 self.success.as_ref().map(|field| *field)
6146 }
6147 pub fn set_success(&mut self, field: bool) {
6149 self.success = Some(field);
6150 }
6151 pub fn with_success(mut self, field: bool) -> Self {
6153 self.set_success(field);
6154 self
6155 }
6156 pub fn error(&self) -> &super::ExecutionError {
6158 self.error
6159 .as_ref()
6160 .map(|field| field as _)
6161 .unwrap_or_else(|| super::ExecutionError::default_instance() as _)
6162 }
6163 pub fn error_opt_mut(&mut self) -> Option<&mut super::ExecutionError> {
6165 self.error.as_mut().map(|field| field as _)
6166 }
6167 pub fn error_mut(&mut self) -> &mut super::ExecutionError {
6170 self.error.get_or_insert_default()
6171 }
6172 pub fn error_opt(&self) -> Option<&super::ExecutionError> {
6174 self.error.as_ref().map(|field| field as _)
6175 }
6176 pub fn set_error<T: Into<super::ExecutionError>>(&mut self, field: T) {
6178 self.error = Some(field.into().into());
6179 }
6180 pub fn with_error<T: Into<super::ExecutionError>>(mut self, field: T) -> Self {
6182 self.set_error(field.into());
6183 self
6184 }
6185 }
6186 impl super::ExecutionTimeObservation {
6187 pub const fn const_default() -> Self {
6188 Self {
6189 kind: None,
6190 move_entry_point: None,
6191 validator_observations: Vec::new(),
6192 }
6193 }
6194 #[doc(hidden)]
6195 pub fn default_instance() -> &'static Self {
6196 static DEFAULT: super::ExecutionTimeObservation = super::ExecutionTimeObservation::const_default();
6197 &DEFAULT
6198 }
6199 pub fn with_kind<
6201 T: Into<super::execution_time_observation::ExecutionTimeObservationKind>,
6202 >(mut self, field: T) -> Self {
6203 self.set_kind(field.into());
6204 self
6205 }
6206 pub fn move_entry_point(&self) -> &super::MoveCall {
6208 self.move_entry_point
6209 .as_ref()
6210 .map(|field| field as _)
6211 .unwrap_or_else(|| super::MoveCall::default_instance() as _)
6212 }
6213 pub fn move_entry_point_opt_mut(&mut self) -> Option<&mut super::MoveCall> {
6215 self.move_entry_point.as_mut().map(|field| field as _)
6216 }
6217 pub fn move_entry_point_mut(&mut self) -> &mut super::MoveCall {
6220 self.move_entry_point.get_or_insert_default()
6221 }
6222 pub fn move_entry_point_opt(&self) -> Option<&super::MoveCall> {
6224 self.move_entry_point.as_ref().map(|field| field as _)
6225 }
6226 pub fn set_move_entry_point<T: Into<super::MoveCall>>(&mut self, field: T) {
6228 self.move_entry_point = Some(field.into().into());
6229 }
6230 pub fn with_move_entry_point<T: Into<super::MoveCall>>(
6232 mut self,
6233 field: T,
6234 ) -> Self {
6235 self.set_move_entry_point(field.into());
6236 self
6237 }
6238 pub fn validator_observations(
6240 &self,
6241 ) -> &[super::ValidatorExecutionTimeObservation] {
6242 &self.validator_observations
6243 }
6244 pub fn validator_observations_mut(
6247 &mut self,
6248 ) -> &mut Vec<super::ValidatorExecutionTimeObservation> {
6249 &mut self.validator_observations
6250 }
6251 pub fn set_validator_observations(
6253 &mut self,
6254 field: Vec<super::ValidatorExecutionTimeObservation>,
6255 ) {
6256 self.validator_observations = field;
6257 }
6258 pub fn with_validator_observations(
6260 mut self,
6261 field: Vec<super::ValidatorExecutionTimeObservation>,
6262 ) -> Self {
6263 self.set_validator_observations(field);
6264 self
6265 }
6266 }
6267 impl super::ExecutionTimeObservations {
6268 pub const fn const_default() -> Self {
6269 Self {
6270 version: None,
6271 observations: Vec::new(),
6272 }
6273 }
6274 #[doc(hidden)]
6275 pub fn default_instance() -> &'static Self {
6276 static DEFAULT: super::ExecutionTimeObservations = super::ExecutionTimeObservations::const_default();
6277 &DEFAULT
6278 }
6279 pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
6281 self.version.as_mut().map(|field| field as _)
6282 }
6283 pub fn version_mut(&mut self) -> &mut i32 {
6286 self.version.get_or_insert_default()
6287 }
6288 pub fn version_opt(&self) -> Option<i32> {
6290 self.version.as_ref().map(|field| *field)
6291 }
6292 pub fn set_version(&mut self, field: i32) {
6294 self.version = Some(field);
6295 }
6296 pub fn with_version(mut self, field: i32) -> Self {
6298 self.set_version(field);
6299 self
6300 }
6301 pub fn observations(&self) -> &[super::ExecutionTimeObservation] {
6303 &self.observations
6304 }
6305 pub fn observations_mut(&mut self) -> &mut Vec<super::ExecutionTimeObservation> {
6308 &mut self.observations
6309 }
6310 pub fn set_observations(&mut self, field: Vec<super::ExecutionTimeObservation>) {
6312 self.observations = field;
6313 }
6314 pub fn with_observations(
6316 mut self,
6317 field: Vec<super::ExecutionTimeObservation>,
6318 ) -> Self {
6319 self.set_observations(field);
6320 self
6321 }
6322 }
6323 impl super::FieldDescriptor {
6324 pub const fn const_default() -> Self {
6325 Self {
6326 name: None,
6327 position: None,
6328 r#type: None,
6329 }
6330 }
6331 #[doc(hidden)]
6332 pub fn default_instance() -> &'static Self {
6333 static DEFAULT: super::FieldDescriptor = super::FieldDescriptor::const_default();
6334 &DEFAULT
6335 }
6336 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
6338 self.name.as_mut().map(|field| field as _)
6339 }
6340 pub fn name_mut(&mut self) -> &mut String {
6343 self.name.get_or_insert_default()
6344 }
6345 pub fn name_opt(&self) -> Option<&str> {
6347 self.name.as_ref().map(|field| field as _)
6348 }
6349 pub fn set_name<T: Into<String>>(&mut self, field: T) {
6351 self.name = Some(field.into().into());
6352 }
6353 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
6355 self.set_name(field.into());
6356 self
6357 }
6358 pub fn position_opt_mut(&mut self) -> Option<&mut u32> {
6360 self.position.as_mut().map(|field| field as _)
6361 }
6362 pub fn position_mut(&mut self) -> &mut u32 {
6365 self.position.get_or_insert_default()
6366 }
6367 pub fn position_opt(&self) -> Option<u32> {
6369 self.position.as_ref().map(|field| *field)
6370 }
6371 pub fn set_position(&mut self, field: u32) {
6373 self.position = Some(field);
6374 }
6375 pub fn with_position(mut self, field: u32) -> Self {
6377 self.set_position(field);
6378 self
6379 }
6380 pub fn r#type(&self) -> &super::OpenSignatureBody {
6382 self.r#type
6383 .as_ref()
6384 .map(|field| field as _)
6385 .unwrap_or_else(|| super::OpenSignatureBody::default_instance() as _)
6386 }
6387 pub fn type_opt_mut(&mut self) -> Option<&mut super::OpenSignatureBody> {
6389 self.r#type.as_mut().map(|field| field as _)
6390 }
6391 pub fn type_mut(&mut self) -> &mut super::OpenSignatureBody {
6394 self.r#type.get_or_insert_default()
6395 }
6396 pub fn type_opt(&self) -> Option<&super::OpenSignatureBody> {
6398 self.r#type.as_ref().map(|field| field as _)
6399 }
6400 pub fn set_type<T: Into<super::OpenSignatureBody>>(&mut self, field: T) {
6402 self.r#type = Some(field.into().into());
6403 }
6404 pub fn with_type<T: Into<super::OpenSignatureBody>>(mut self, field: T) -> Self {
6406 self.set_type(field.into());
6407 self
6408 }
6409 }
6410 impl super::FunctionDescriptor {
6411 pub const fn const_default() -> Self {
6412 Self {
6413 name: None,
6414 visibility: None,
6415 is_entry: None,
6416 type_parameters: Vec::new(),
6417 parameters: Vec::new(),
6418 returns: Vec::new(),
6419 }
6420 }
6421 #[doc(hidden)]
6422 pub fn default_instance() -> &'static Self {
6423 static DEFAULT: super::FunctionDescriptor = super::FunctionDescriptor::const_default();
6424 &DEFAULT
6425 }
6426 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
6428 self.name.as_mut().map(|field| field as _)
6429 }
6430 pub fn name_mut(&mut self) -> &mut String {
6433 self.name.get_or_insert_default()
6434 }
6435 pub fn name_opt(&self) -> Option<&str> {
6437 self.name.as_ref().map(|field| field as _)
6438 }
6439 pub fn set_name<T: Into<String>>(&mut self, field: T) {
6441 self.name = Some(field.into().into());
6442 }
6443 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
6445 self.set_name(field.into());
6446 self
6447 }
6448 pub fn with_visibility<T: Into<super::function_descriptor::Visibility>>(
6450 mut self,
6451 field: T,
6452 ) -> Self {
6453 self.set_visibility(field.into());
6454 self
6455 }
6456 pub fn is_entry_opt_mut(&mut self) -> Option<&mut bool> {
6458 self.is_entry.as_mut().map(|field| field as _)
6459 }
6460 pub fn is_entry_mut(&mut self) -> &mut bool {
6463 self.is_entry.get_or_insert_default()
6464 }
6465 pub fn is_entry_opt(&self) -> Option<bool> {
6467 self.is_entry.as_ref().map(|field| *field)
6468 }
6469 pub fn set_is_entry(&mut self, field: bool) {
6471 self.is_entry = Some(field);
6472 }
6473 pub fn with_is_entry(mut self, field: bool) -> Self {
6475 self.set_is_entry(field);
6476 self
6477 }
6478 pub fn type_parameters(&self) -> &[super::TypeParameter] {
6480 &self.type_parameters
6481 }
6482 pub fn type_parameters_mut(&mut self) -> &mut Vec<super::TypeParameter> {
6485 &mut self.type_parameters
6486 }
6487 pub fn set_type_parameters(&mut self, field: Vec<super::TypeParameter>) {
6489 self.type_parameters = field;
6490 }
6491 pub fn with_type_parameters(mut self, field: Vec<super::TypeParameter>) -> Self {
6493 self.set_type_parameters(field);
6494 self
6495 }
6496 pub fn parameters(&self) -> &[super::OpenSignature] {
6498 &self.parameters
6499 }
6500 pub fn parameters_mut(&mut self) -> &mut Vec<super::OpenSignature> {
6503 &mut self.parameters
6504 }
6505 pub fn set_parameters(&mut self, field: Vec<super::OpenSignature>) {
6507 self.parameters = field;
6508 }
6509 pub fn with_parameters(mut self, field: Vec<super::OpenSignature>) -> Self {
6511 self.set_parameters(field);
6512 self
6513 }
6514 pub fn returns(&self) -> &[super::OpenSignature] {
6516 &self.returns
6517 }
6518 pub fn returns_mut(&mut self) -> &mut Vec<super::OpenSignature> {
6521 &mut self.returns
6522 }
6523 pub fn set_returns(&mut self, field: Vec<super::OpenSignature>) {
6525 self.returns = field;
6526 }
6527 pub fn with_returns(mut self, field: Vec<super::OpenSignature>) -> Self {
6529 self.set_returns(field);
6530 self
6531 }
6532 }
6533 impl super::FundsWithdrawal {
6534 pub const fn const_default() -> Self {
6535 Self {
6536 amount: None,
6537 coin_type: None,
6538 source: None,
6539 }
6540 }
6541 #[doc(hidden)]
6542 pub fn default_instance() -> &'static Self {
6543 static DEFAULT: super::FundsWithdrawal = super::FundsWithdrawal::const_default();
6544 &DEFAULT
6545 }
6546 pub fn amount_opt_mut(&mut self) -> Option<&mut u64> {
6548 self.amount.as_mut().map(|field| field as _)
6549 }
6550 pub fn amount_mut(&mut self) -> &mut u64 {
6553 self.amount.get_or_insert_default()
6554 }
6555 pub fn amount_opt(&self) -> Option<u64> {
6557 self.amount.as_ref().map(|field| *field)
6558 }
6559 pub fn set_amount(&mut self, field: u64) {
6561 self.amount = Some(field);
6562 }
6563 pub fn with_amount(mut self, field: u64) -> Self {
6565 self.set_amount(field);
6566 self
6567 }
6568 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
6570 self.coin_type.as_mut().map(|field| field as _)
6571 }
6572 pub fn coin_type_mut(&mut self) -> &mut String {
6575 self.coin_type.get_or_insert_default()
6576 }
6577 pub fn coin_type_opt(&self) -> Option<&str> {
6579 self.coin_type.as_ref().map(|field| field as _)
6580 }
6581 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
6583 self.coin_type = Some(field.into().into());
6584 }
6585 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
6587 self.set_coin_type(field.into());
6588 self
6589 }
6590 pub fn with_source<T: Into<super::funds_withdrawal::Source>>(
6592 mut self,
6593 field: T,
6594 ) -> Self {
6595 self.set_source(field.into());
6596 self
6597 }
6598 }
6599 impl super::GasCostSummary {
6600 pub const fn const_default() -> Self {
6601 Self {
6602 computation_cost: None,
6603 storage_cost: None,
6604 storage_rebate: None,
6605 non_refundable_storage_fee: None,
6606 }
6607 }
6608 #[doc(hidden)]
6609 pub fn default_instance() -> &'static Self {
6610 static DEFAULT: super::GasCostSummary = super::GasCostSummary::const_default();
6611 &DEFAULT
6612 }
6613 pub fn computation_cost_opt_mut(&mut self) -> Option<&mut u64> {
6615 self.computation_cost.as_mut().map(|field| field as _)
6616 }
6617 pub fn computation_cost_mut(&mut self) -> &mut u64 {
6620 self.computation_cost.get_or_insert_default()
6621 }
6622 pub fn computation_cost_opt(&self) -> Option<u64> {
6624 self.computation_cost.as_ref().map(|field| *field)
6625 }
6626 pub fn set_computation_cost(&mut self, field: u64) {
6628 self.computation_cost = Some(field);
6629 }
6630 pub fn with_computation_cost(mut self, field: u64) -> Self {
6632 self.set_computation_cost(field);
6633 self
6634 }
6635 pub fn storage_cost_opt_mut(&mut self) -> Option<&mut u64> {
6637 self.storage_cost.as_mut().map(|field| field as _)
6638 }
6639 pub fn storage_cost_mut(&mut self) -> &mut u64 {
6642 self.storage_cost.get_or_insert_default()
6643 }
6644 pub fn storage_cost_opt(&self) -> Option<u64> {
6646 self.storage_cost.as_ref().map(|field| *field)
6647 }
6648 pub fn set_storage_cost(&mut self, field: u64) {
6650 self.storage_cost = Some(field);
6651 }
6652 pub fn with_storage_cost(mut self, field: u64) -> Self {
6654 self.set_storage_cost(field);
6655 self
6656 }
6657 pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
6659 self.storage_rebate.as_mut().map(|field| field as _)
6660 }
6661 pub fn storage_rebate_mut(&mut self) -> &mut u64 {
6664 self.storage_rebate.get_or_insert_default()
6665 }
6666 pub fn storage_rebate_opt(&self) -> Option<u64> {
6668 self.storage_rebate.as_ref().map(|field| *field)
6669 }
6670 pub fn set_storage_rebate(&mut self, field: u64) {
6672 self.storage_rebate = Some(field);
6673 }
6674 pub fn with_storage_rebate(mut self, field: u64) -> Self {
6676 self.set_storage_rebate(field);
6677 self
6678 }
6679 pub fn non_refundable_storage_fee_opt_mut(&mut self) -> Option<&mut u64> {
6681 self.non_refundable_storage_fee.as_mut().map(|field| field as _)
6682 }
6683 pub fn non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
6686 self.non_refundable_storage_fee.get_or_insert_default()
6687 }
6688 pub fn non_refundable_storage_fee_opt(&self) -> Option<u64> {
6690 self.non_refundable_storage_fee.as_ref().map(|field| *field)
6691 }
6692 pub fn set_non_refundable_storage_fee(&mut self, field: u64) {
6694 self.non_refundable_storage_fee = Some(field);
6695 }
6696 pub fn with_non_refundable_storage_fee(mut self, field: u64) -> Self {
6698 self.set_non_refundable_storage_fee(field);
6699 self
6700 }
6701 }
6702 impl super::GasPayment {
6703 pub const fn const_default() -> Self {
6704 Self {
6705 objects: Vec::new(),
6706 owner: None,
6707 price: None,
6708 budget: None,
6709 }
6710 }
6711 #[doc(hidden)]
6712 pub fn default_instance() -> &'static Self {
6713 static DEFAULT: super::GasPayment = super::GasPayment::const_default();
6714 &DEFAULT
6715 }
6716 pub fn objects(&self) -> &[super::ObjectReference] {
6718 &self.objects
6719 }
6720 pub fn objects_mut(&mut self) -> &mut Vec<super::ObjectReference> {
6723 &mut self.objects
6724 }
6725 pub fn set_objects(&mut self, field: Vec<super::ObjectReference>) {
6727 self.objects = field;
6728 }
6729 pub fn with_objects(mut self, field: Vec<super::ObjectReference>) -> Self {
6731 self.set_objects(field);
6732 self
6733 }
6734 pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
6736 self.owner.as_mut().map(|field| field as _)
6737 }
6738 pub fn owner_mut(&mut self) -> &mut String {
6741 self.owner.get_or_insert_default()
6742 }
6743 pub fn owner_opt(&self) -> Option<&str> {
6745 self.owner.as_ref().map(|field| field as _)
6746 }
6747 pub fn set_owner<T: Into<String>>(&mut self, field: T) {
6749 self.owner = Some(field.into().into());
6750 }
6751 pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
6753 self.set_owner(field.into());
6754 self
6755 }
6756 pub fn price_opt_mut(&mut self) -> Option<&mut u64> {
6758 self.price.as_mut().map(|field| field as _)
6759 }
6760 pub fn price_mut(&mut self) -> &mut u64 {
6763 self.price.get_or_insert_default()
6764 }
6765 pub fn price_opt(&self) -> Option<u64> {
6767 self.price.as_ref().map(|field| *field)
6768 }
6769 pub fn set_price(&mut self, field: u64) {
6771 self.price = Some(field);
6772 }
6773 pub fn with_price(mut self, field: u64) -> Self {
6775 self.set_price(field);
6776 self
6777 }
6778 pub fn budget_opt_mut(&mut self) -> Option<&mut u64> {
6780 self.budget.as_mut().map(|field| field as _)
6781 }
6782 pub fn budget_mut(&mut self) -> &mut u64 {
6785 self.budget.get_or_insert_default()
6786 }
6787 pub fn budget_opt(&self) -> Option<u64> {
6789 self.budget.as_ref().map(|field| *field)
6790 }
6791 pub fn set_budget(&mut self, field: u64) {
6793 self.budget = Some(field);
6794 }
6795 pub fn with_budget(mut self, field: u64) -> Self {
6797 self.set_budget(field);
6798 self
6799 }
6800 }
6801 impl super::GenesisTransaction {
6802 pub const fn const_default() -> Self {
6803 Self { objects: Vec::new() }
6804 }
6805 #[doc(hidden)]
6806 pub fn default_instance() -> &'static Self {
6807 static DEFAULT: super::GenesisTransaction = super::GenesisTransaction::const_default();
6808 &DEFAULT
6809 }
6810 pub fn objects(&self) -> &[super::Object] {
6812 &self.objects
6813 }
6814 pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
6817 &mut self.objects
6818 }
6819 pub fn set_objects(&mut self, field: Vec<super::Object>) {
6821 self.objects = field;
6822 }
6823 pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
6825 self.set_objects(field);
6826 self
6827 }
6828 }
6829 impl super::GetBalanceRequest {
6830 pub const fn const_default() -> Self {
6831 Self {
6832 owner: None,
6833 coin_type: None,
6834 }
6835 }
6836 #[doc(hidden)]
6837 pub fn default_instance() -> &'static Self {
6838 static DEFAULT: super::GetBalanceRequest = super::GetBalanceRequest::const_default();
6839 &DEFAULT
6840 }
6841 pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
6843 self.owner.as_mut().map(|field| field as _)
6844 }
6845 pub fn owner_mut(&mut self) -> &mut String {
6848 self.owner.get_or_insert_default()
6849 }
6850 pub fn owner_opt(&self) -> Option<&str> {
6852 self.owner.as_ref().map(|field| field as _)
6853 }
6854 pub fn set_owner<T: Into<String>>(&mut self, field: T) {
6856 self.owner = Some(field.into().into());
6857 }
6858 pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
6860 self.set_owner(field.into());
6861 self
6862 }
6863 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
6865 self.coin_type.as_mut().map(|field| field as _)
6866 }
6867 pub fn coin_type_mut(&mut self) -> &mut String {
6870 self.coin_type.get_or_insert_default()
6871 }
6872 pub fn coin_type_opt(&self) -> Option<&str> {
6874 self.coin_type.as_ref().map(|field| field as _)
6875 }
6876 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
6878 self.coin_type = Some(field.into().into());
6879 }
6880 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
6882 self.set_coin_type(field.into());
6883 self
6884 }
6885 }
6886 impl super::GetBalanceResponse {
6887 pub const fn const_default() -> Self {
6888 Self { balance: None }
6889 }
6890 #[doc(hidden)]
6891 pub fn default_instance() -> &'static Self {
6892 static DEFAULT: super::GetBalanceResponse = super::GetBalanceResponse::const_default();
6893 &DEFAULT
6894 }
6895 pub fn balance(&self) -> &super::Balance {
6897 self.balance
6898 .as_ref()
6899 .map(|field| field as _)
6900 .unwrap_or_else(|| super::Balance::default_instance() as _)
6901 }
6902 pub fn balance_opt_mut(&mut self) -> Option<&mut super::Balance> {
6904 self.balance.as_mut().map(|field| field as _)
6905 }
6906 pub fn balance_mut(&mut self) -> &mut super::Balance {
6909 self.balance.get_or_insert_default()
6910 }
6911 pub fn balance_opt(&self) -> Option<&super::Balance> {
6913 self.balance.as_ref().map(|field| field as _)
6914 }
6915 pub fn set_balance<T: Into<super::Balance>>(&mut self, field: T) {
6917 self.balance = Some(field.into().into());
6918 }
6919 pub fn with_balance<T: Into<super::Balance>>(mut self, field: T) -> Self {
6921 self.set_balance(field.into());
6922 self
6923 }
6924 }
6925 impl super::GetCheckpointRequest {
6926 pub const fn const_default() -> Self {
6927 Self {
6928 read_mask: None,
6929 checkpoint_id: None,
6930 }
6931 }
6932 #[doc(hidden)]
6933 pub fn default_instance() -> &'static Self {
6934 static DEFAULT: super::GetCheckpointRequest = super::GetCheckpointRequest::const_default();
6935 &DEFAULT
6936 }
6937 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
6939 self.read_mask.as_mut().map(|field| field as _)
6940 }
6941 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
6944 self.read_mask.get_or_insert_default()
6945 }
6946 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
6948 self.read_mask.as_ref().map(|field| field as _)
6949 }
6950 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
6952 self.read_mask = Some(field.into().into());
6953 }
6954 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
6956 mut self,
6957 field: T,
6958 ) -> Self {
6959 self.set_read_mask(field.into());
6960 self
6961 }
6962 pub fn sequence_number(&self) -> u64 {
6964 if let Some(
6965 super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
6966 ) = &self.checkpoint_id
6967 {
6968 *field
6969 } else {
6970 0u64
6971 }
6972 }
6973 pub fn sequence_number_opt(&self) -> Option<u64> {
6975 if let Some(
6976 super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
6977 ) = &self.checkpoint_id
6978 {
6979 Some(*field)
6980 } else {
6981 None
6982 }
6983 }
6984 pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
6986 if let Some(
6987 super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
6988 ) = &mut self.checkpoint_id
6989 {
6990 Some(field as _)
6991 } else {
6992 None
6993 }
6994 }
6995 pub fn sequence_number_mut(&mut self) -> &mut u64 {
6999 if self.sequence_number_opt_mut().is_none() {
7000 self.checkpoint_id = Some(
7001 super::get_checkpoint_request::CheckpointId::SequenceNumber(
7002 u64::default(),
7003 ),
7004 );
7005 }
7006 self.sequence_number_opt_mut().unwrap()
7007 }
7008 pub fn set_sequence_number(&mut self, field: u64) {
7011 self.checkpoint_id = Some(
7012 super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
7013 );
7014 }
7015 pub fn with_sequence_number(mut self, field: u64) -> Self {
7018 self.set_sequence_number(field);
7019 self
7020 }
7021 pub fn digest(&self) -> &str {
7023 if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &self
7024 .checkpoint_id
7025 {
7026 field as _
7027 } else {
7028 ""
7029 }
7030 }
7031 pub fn digest_opt(&self) -> Option<&str> {
7033 if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &self
7034 .checkpoint_id
7035 {
7036 Some(field as _)
7037 } else {
7038 None
7039 }
7040 }
7041 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
7043 if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &mut self
7044 .checkpoint_id
7045 {
7046 Some(field as _)
7047 } else {
7048 None
7049 }
7050 }
7051 pub fn digest_mut(&mut self) -> &mut String {
7055 if self.digest_opt_mut().is_none() {
7056 self.checkpoint_id = Some(
7057 super::get_checkpoint_request::CheckpointId::Digest(
7058 String::default(),
7059 ),
7060 );
7061 }
7062 self.digest_opt_mut().unwrap()
7063 }
7064 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
7067 self.checkpoint_id = Some(
7068 super::get_checkpoint_request::CheckpointId::Digest(field.into().into()),
7069 );
7070 }
7071 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
7074 self.set_digest(field.into());
7075 self
7076 }
7077 }
7078 impl super::GetCheckpointResponse {
7079 pub const fn const_default() -> Self {
7080 Self { checkpoint: None }
7081 }
7082 #[doc(hidden)]
7083 pub fn default_instance() -> &'static Self {
7084 static DEFAULT: super::GetCheckpointResponse = super::GetCheckpointResponse::const_default();
7085 &DEFAULT
7086 }
7087 pub fn checkpoint(&self) -> &super::Checkpoint {
7089 self.checkpoint
7090 .as_ref()
7091 .map(|field| field as _)
7092 .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
7093 }
7094 pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
7096 self.checkpoint.as_mut().map(|field| field as _)
7097 }
7098 pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
7101 self.checkpoint.get_or_insert_default()
7102 }
7103 pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
7105 self.checkpoint.as_ref().map(|field| field as _)
7106 }
7107 pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
7109 self.checkpoint = Some(field.into().into());
7110 }
7111 pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
7113 self.set_checkpoint(field.into());
7114 self
7115 }
7116 }
7117 impl super::GetCoinInfoRequest {
7118 pub const fn const_default() -> Self {
7119 Self { coin_type: None }
7120 }
7121 #[doc(hidden)]
7122 pub fn default_instance() -> &'static Self {
7123 static DEFAULT: super::GetCoinInfoRequest = super::GetCoinInfoRequest::const_default();
7124 &DEFAULT
7125 }
7126 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
7128 self.coin_type.as_mut().map(|field| field as _)
7129 }
7130 pub fn coin_type_mut(&mut self) -> &mut String {
7133 self.coin_type.get_or_insert_default()
7134 }
7135 pub fn coin_type_opt(&self) -> Option<&str> {
7137 self.coin_type.as_ref().map(|field| field as _)
7138 }
7139 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
7141 self.coin_type = Some(field.into().into());
7142 }
7143 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
7145 self.set_coin_type(field.into());
7146 self
7147 }
7148 }
7149 impl super::GetCoinInfoResponse {
7150 pub const fn const_default() -> Self {
7151 Self {
7152 coin_type: None,
7153 metadata: None,
7154 treasury: None,
7155 regulated_metadata: None,
7156 }
7157 }
7158 #[doc(hidden)]
7159 pub fn default_instance() -> &'static Self {
7160 static DEFAULT: super::GetCoinInfoResponse = super::GetCoinInfoResponse::const_default();
7161 &DEFAULT
7162 }
7163 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
7165 self.coin_type.as_mut().map(|field| field as _)
7166 }
7167 pub fn coin_type_mut(&mut self) -> &mut String {
7170 self.coin_type.get_or_insert_default()
7171 }
7172 pub fn coin_type_opt(&self) -> Option<&str> {
7174 self.coin_type.as_ref().map(|field| field as _)
7175 }
7176 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
7178 self.coin_type = Some(field.into().into());
7179 }
7180 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
7182 self.set_coin_type(field.into());
7183 self
7184 }
7185 pub fn metadata(&self) -> &super::CoinMetadata {
7187 self.metadata
7188 .as_ref()
7189 .map(|field| field as _)
7190 .unwrap_or_else(|| super::CoinMetadata::default_instance() as _)
7191 }
7192 pub fn metadata_opt_mut(&mut self) -> Option<&mut super::CoinMetadata> {
7194 self.metadata.as_mut().map(|field| field as _)
7195 }
7196 pub fn metadata_mut(&mut self) -> &mut super::CoinMetadata {
7199 self.metadata.get_or_insert_default()
7200 }
7201 pub fn metadata_opt(&self) -> Option<&super::CoinMetadata> {
7203 self.metadata.as_ref().map(|field| field as _)
7204 }
7205 pub fn set_metadata<T: Into<super::CoinMetadata>>(&mut self, field: T) {
7207 self.metadata = Some(field.into().into());
7208 }
7209 pub fn with_metadata<T: Into<super::CoinMetadata>>(mut self, field: T) -> Self {
7211 self.set_metadata(field.into());
7212 self
7213 }
7214 pub fn treasury(&self) -> &super::CoinTreasury {
7216 self.treasury
7217 .as_ref()
7218 .map(|field| field as _)
7219 .unwrap_or_else(|| super::CoinTreasury::default_instance() as _)
7220 }
7221 pub fn treasury_opt_mut(&mut self) -> Option<&mut super::CoinTreasury> {
7223 self.treasury.as_mut().map(|field| field as _)
7224 }
7225 pub fn treasury_mut(&mut self) -> &mut super::CoinTreasury {
7228 self.treasury.get_or_insert_default()
7229 }
7230 pub fn treasury_opt(&self) -> Option<&super::CoinTreasury> {
7232 self.treasury.as_ref().map(|field| field as _)
7233 }
7234 pub fn set_treasury<T: Into<super::CoinTreasury>>(&mut self, field: T) {
7236 self.treasury = Some(field.into().into());
7237 }
7238 pub fn with_treasury<T: Into<super::CoinTreasury>>(mut self, field: T) -> Self {
7240 self.set_treasury(field.into());
7241 self
7242 }
7243 pub fn regulated_metadata(&self) -> &super::RegulatedCoinMetadata {
7245 self.regulated_metadata
7246 .as_ref()
7247 .map(|field| field as _)
7248 .unwrap_or_else(|| super::RegulatedCoinMetadata::default_instance() as _)
7249 }
7250 pub fn regulated_metadata_opt_mut(
7252 &mut self,
7253 ) -> Option<&mut super::RegulatedCoinMetadata> {
7254 self.regulated_metadata.as_mut().map(|field| field as _)
7255 }
7256 pub fn regulated_metadata_mut(&mut self) -> &mut super::RegulatedCoinMetadata {
7259 self.regulated_metadata.get_or_insert_default()
7260 }
7261 pub fn regulated_metadata_opt(&self) -> Option<&super::RegulatedCoinMetadata> {
7263 self.regulated_metadata.as_ref().map(|field| field as _)
7264 }
7265 pub fn set_regulated_metadata<T: Into<super::RegulatedCoinMetadata>>(
7267 &mut self,
7268 field: T,
7269 ) {
7270 self.regulated_metadata = Some(field.into().into());
7271 }
7272 pub fn with_regulated_metadata<T: Into<super::RegulatedCoinMetadata>>(
7274 mut self,
7275 field: T,
7276 ) -> Self {
7277 self.set_regulated_metadata(field.into());
7278 self
7279 }
7280 }
7281 impl super::GetDatatypeRequest {
7282 pub const fn const_default() -> Self {
7283 Self {
7284 package_id: None,
7285 module_name: None,
7286 name: None,
7287 }
7288 }
7289 #[doc(hidden)]
7290 pub fn default_instance() -> &'static Self {
7291 static DEFAULT: super::GetDatatypeRequest = super::GetDatatypeRequest::const_default();
7292 &DEFAULT
7293 }
7294 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
7296 self.package_id.as_mut().map(|field| field as _)
7297 }
7298 pub fn package_id_mut(&mut self) -> &mut String {
7301 self.package_id.get_or_insert_default()
7302 }
7303 pub fn package_id_opt(&self) -> Option<&str> {
7305 self.package_id.as_ref().map(|field| field as _)
7306 }
7307 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
7309 self.package_id = Some(field.into().into());
7310 }
7311 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
7313 self.set_package_id(field.into());
7314 self
7315 }
7316 pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
7318 self.module_name.as_mut().map(|field| field as _)
7319 }
7320 pub fn module_name_mut(&mut self) -> &mut String {
7323 self.module_name.get_or_insert_default()
7324 }
7325 pub fn module_name_opt(&self) -> Option<&str> {
7327 self.module_name.as_ref().map(|field| field as _)
7328 }
7329 pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
7331 self.module_name = Some(field.into().into());
7332 }
7333 pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
7335 self.set_module_name(field.into());
7336 self
7337 }
7338 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
7340 self.name.as_mut().map(|field| field as _)
7341 }
7342 pub fn name_mut(&mut self) -> &mut String {
7345 self.name.get_or_insert_default()
7346 }
7347 pub fn name_opt(&self) -> Option<&str> {
7349 self.name.as_ref().map(|field| field as _)
7350 }
7351 pub fn set_name<T: Into<String>>(&mut self, field: T) {
7353 self.name = Some(field.into().into());
7354 }
7355 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
7357 self.set_name(field.into());
7358 self
7359 }
7360 }
7361 impl super::GetDatatypeResponse {
7362 pub const fn const_default() -> Self {
7363 Self { datatype: None }
7364 }
7365 #[doc(hidden)]
7366 pub fn default_instance() -> &'static Self {
7367 static DEFAULT: super::GetDatatypeResponse = super::GetDatatypeResponse::const_default();
7368 &DEFAULT
7369 }
7370 pub fn datatype(&self) -> &super::DatatypeDescriptor {
7372 self.datatype
7373 .as_ref()
7374 .map(|field| field as _)
7375 .unwrap_or_else(|| super::DatatypeDescriptor::default_instance() as _)
7376 }
7377 pub fn datatype_opt_mut(&mut self) -> Option<&mut super::DatatypeDescriptor> {
7379 self.datatype.as_mut().map(|field| field as _)
7380 }
7381 pub fn datatype_mut(&mut self) -> &mut super::DatatypeDescriptor {
7384 self.datatype.get_or_insert_default()
7385 }
7386 pub fn datatype_opt(&self) -> Option<&super::DatatypeDescriptor> {
7388 self.datatype.as_ref().map(|field| field as _)
7389 }
7390 pub fn set_datatype<T: Into<super::DatatypeDescriptor>>(&mut self, field: T) {
7392 self.datatype = Some(field.into().into());
7393 }
7394 pub fn with_datatype<T: Into<super::DatatypeDescriptor>>(
7396 mut self,
7397 field: T,
7398 ) -> Self {
7399 self.set_datatype(field.into());
7400 self
7401 }
7402 }
7403 impl super::GetEpochRequest {
7404 pub const fn const_default() -> Self {
7405 Self {
7406 epoch: None,
7407 read_mask: None,
7408 }
7409 }
7410 #[doc(hidden)]
7411 pub fn default_instance() -> &'static Self {
7412 static DEFAULT: super::GetEpochRequest = super::GetEpochRequest::const_default();
7413 &DEFAULT
7414 }
7415 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
7417 self.epoch.as_mut().map(|field| field as _)
7418 }
7419 pub fn epoch_mut(&mut self) -> &mut u64 {
7422 self.epoch.get_or_insert_default()
7423 }
7424 pub fn epoch_opt(&self) -> Option<u64> {
7426 self.epoch.as_ref().map(|field| *field)
7427 }
7428 pub fn set_epoch(&mut self, field: u64) {
7430 self.epoch = Some(field);
7431 }
7432 pub fn with_epoch(mut self, field: u64) -> Self {
7434 self.set_epoch(field);
7435 self
7436 }
7437 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
7439 self.read_mask.as_mut().map(|field| field as _)
7440 }
7441 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
7444 self.read_mask.get_or_insert_default()
7445 }
7446 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
7448 self.read_mask.as_ref().map(|field| field as _)
7449 }
7450 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
7452 self.read_mask = Some(field.into().into());
7453 }
7454 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
7456 mut self,
7457 field: T,
7458 ) -> Self {
7459 self.set_read_mask(field.into());
7460 self
7461 }
7462 }
7463 impl super::GetEpochResponse {
7464 pub const fn const_default() -> Self {
7465 Self { epoch: None }
7466 }
7467 #[doc(hidden)]
7468 pub fn default_instance() -> &'static Self {
7469 static DEFAULT: super::GetEpochResponse = super::GetEpochResponse::const_default();
7470 &DEFAULT
7471 }
7472 pub fn epoch(&self) -> &super::Epoch {
7474 self.epoch
7475 .as_ref()
7476 .map(|field| field as _)
7477 .unwrap_or_else(|| super::Epoch::default_instance() as _)
7478 }
7479 pub fn epoch_opt_mut(&mut self) -> Option<&mut super::Epoch> {
7481 self.epoch.as_mut().map(|field| field as _)
7482 }
7483 pub fn epoch_mut(&mut self) -> &mut super::Epoch {
7486 self.epoch.get_or_insert_default()
7487 }
7488 pub fn epoch_opt(&self) -> Option<&super::Epoch> {
7490 self.epoch.as_ref().map(|field| field as _)
7491 }
7492 pub fn set_epoch<T: Into<super::Epoch>>(&mut self, field: T) {
7494 self.epoch = Some(field.into().into());
7495 }
7496 pub fn with_epoch<T: Into<super::Epoch>>(mut self, field: T) -> Self {
7498 self.set_epoch(field.into());
7499 self
7500 }
7501 }
7502 impl super::GetFunctionRequest {
7503 pub const fn const_default() -> Self {
7504 Self {
7505 package_id: None,
7506 module_name: None,
7507 name: None,
7508 }
7509 }
7510 #[doc(hidden)]
7511 pub fn default_instance() -> &'static Self {
7512 static DEFAULT: super::GetFunctionRequest = super::GetFunctionRequest::const_default();
7513 &DEFAULT
7514 }
7515 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
7517 self.package_id.as_mut().map(|field| field as _)
7518 }
7519 pub fn package_id_mut(&mut self) -> &mut String {
7522 self.package_id.get_or_insert_default()
7523 }
7524 pub fn package_id_opt(&self) -> Option<&str> {
7526 self.package_id.as_ref().map(|field| field as _)
7527 }
7528 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
7530 self.package_id = Some(field.into().into());
7531 }
7532 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
7534 self.set_package_id(field.into());
7535 self
7536 }
7537 pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
7539 self.module_name.as_mut().map(|field| field as _)
7540 }
7541 pub fn module_name_mut(&mut self) -> &mut String {
7544 self.module_name.get_or_insert_default()
7545 }
7546 pub fn module_name_opt(&self) -> Option<&str> {
7548 self.module_name.as_ref().map(|field| field as _)
7549 }
7550 pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
7552 self.module_name = Some(field.into().into());
7553 }
7554 pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
7556 self.set_module_name(field.into());
7557 self
7558 }
7559 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
7561 self.name.as_mut().map(|field| field as _)
7562 }
7563 pub fn name_mut(&mut self) -> &mut String {
7566 self.name.get_or_insert_default()
7567 }
7568 pub fn name_opt(&self) -> Option<&str> {
7570 self.name.as_ref().map(|field| field as _)
7571 }
7572 pub fn set_name<T: Into<String>>(&mut self, field: T) {
7574 self.name = Some(field.into().into());
7575 }
7576 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
7578 self.set_name(field.into());
7579 self
7580 }
7581 }
7582 impl super::GetFunctionResponse {
7583 pub const fn const_default() -> Self {
7584 Self { function: None }
7585 }
7586 #[doc(hidden)]
7587 pub fn default_instance() -> &'static Self {
7588 static DEFAULT: super::GetFunctionResponse = super::GetFunctionResponse::const_default();
7589 &DEFAULT
7590 }
7591 pub fn function(&self) -> &super::FunctionDescriptor {
7593 self.function
7594 .as_ref()
7595 .map(|field| field as _)
7596 .unwrap_or_else(|| super::FunctionDescriptor::default_instance() as _)
7597 }
7598 pub fn function_opt_mut(&mut self) -> Option<&mut super::FunctionDescriptor> {
7600 self.function.as_mut().map(|field| field as _)
7601 }
7602 pub fn function_mut(&mut self) -> &mut super::FunctionDescriptor {
7605 self.function.get_or_insert_default()
7606 }
7607 pub fn function_opt(&self) -> Option<&super::FunctionDescriptor> {
7609 self.function.as_ref().map(|field| field as _)
7610 }
7611 pub fn set_function<T: Into<super::FunctionDescriptor>>(&mut self, field: T) {
7613 self.function = Some(field.into().into());
7614 }
7615 pub fn with_function<T: Into<super::FunctionDescriptor>>(
7617 mut self,
7618 field: T,
7619 ) -> Self {
7620 self.set_function(field.into());
7621 self
7622 }
7623 }
7624 impl super::GetObjectRequest {
7625 pub const fn const_default() -> Self {
7626 Self {
7627 object_id: None,
7628 version: None,
7629 read_mask: None,
7630 }
7631 }
7632 #[doc(hidden)]
7633 pub fn default_instance() -> &'static Self {
7634 static DEFAULT: super::GetObjectRequest = super::GetObjectRequest::const_default();
7635 &DEFAULT
7636 }
7637 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
7639 self.object_id.as_mut().map(|field| field as _)
7640 }
7641 pub fn object_id_mut(&mut self) -> &mut String {
7644 self.object_id.get_or_insert_default()
7645 }
7646 pub fn object_id_opt(&self) -> Option<&str> {
7648 self.object_id.as_ref().map(|field| field as _)
7649 }
7650 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
7652 self.object_id = Some(field.into().into());
7653 }
7654 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
7656 self.set_object_id(field.into());
7657 self
7658 }
7659 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
7661 self.version.as_mut().map(|field| field as _)
7662 }
7663 pub fn version_mut(&mut self) -> &mut u64 {
7666 self.version.get_or_insert_default()
7667 }
7668 pub fn version_opt(&self) -> Option<u64> {
7670 self.version.as_ref().map(|field| *field)
7671 }
7672 pub fn set_version(&mut self, field: u64) {
7674 self.version = Some(field);
7675 }
7676 pub fn with_version(mut self, field: u64) -> Self {
7678 self.set_version(field);
7679 self
7680 }
7681 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
7683 self.read_mask.as_mut().map(|field| field as _)
7684 }
7685 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
7688 self.read_mask.get_or_insert_default()
7689 }
7690 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
7692 self.read_mask.as_ref().map(|field| field as _)
7693 }
7694 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
7696 self.read_mask = Some(field.into().into());
7697 }
7698 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
7700 mut self,
7701 field: T,
7702 ) -> Self {
7703 self.set_read_mask(field.into());
7704 self
7705 }
7706 }
7707 impl super::GetObjectResponse {
7708 pub const fn const_default() -> Self {
7709 Self { object: None }
7710 }
7711 #[doc(hidden)]
7712 pub fn default_instance() -> &'static Self {
7713 static DEFAULT: super::GetObjectResponse = super::GetObjectResponse::const_default();
7714 &DEFAULT
7715 }
7716 pub fn object(&self) -> &super::Object {
7718 self.object
7719 .as_ref()
7720 .map(|field| field as _)
7721 .unwrap_or_else(|| super::Object::default_instance() as _)
7722 }
7723 pub fn object_opt_mut(&mut self) -> Option<&mut super::Object> {
7725 self.object.as_mut().map(|field| field as _)
7726 }
7727 pub fn object_mut(&mut self) -> &mut super::Object {
7730 self.object.get_or_insert_default()
7731 }
7732 pub fn object_opt(&self) -> Option<&super::Object> {
7734 self.object.as_ref().map(|field| field as _)
7735 }
7736 pub fn set_object<T: Into<super::Object>>(&mut self, field: T) {
7738 self.object = Some(field.into().into());
7739 }
7740 pub fn with_object<T: Into<super::Object>>(mut self, field: T) -> Self {
7742 self.set_object(field.into());
7743 self
7744 }
7745 }
7746 impl super::GetObjectResult {
7747 pub const fn const_default() -> Self {
7748 Self { result: None }
7749 }
7750 #[doc(hidden)]
7751 pub fn default_instance() -> &'static Self {
7752 static DEFAULT: super::GetObjectResult = super::GetObjectResult::const_default();
7753 &DEFAULT
7754 }
7755 pub fn object(&self) -> &super::Object {
7757 if let Some(super::get_object_result::Result::Object(field)) = &self.result {
7758 field as _
7759 } else {
7760 super::Object::default_instance() as _
7761 }
7762 }
7763 pub fn object_opt(&self) -> Option<&super::Object> {
7765 if let Some(super::get_object_result::Result::Object(field)) = &self.result {
7766 Some(field as _)
7767 } else {
7768 None
7769 }
7770 }
7771 pub fn object_opt_mut(&mut self) -> Option<&mut super::Object> {
7773 if let Some(super::get_object_result::Result::Object(field)) = &mut self
7774 .result
7775 {
7776 Some(field as _)
7777 } else {
7778 None
7779 }
7780 }
7781 pub fn object_mut(&mut self) -> &mut super::Object {
7785 if self.object_opt_mut().is_none() {
7786 self.result = Some(
7787 super::get_object_result::Result::Object(super::Object::default()),
7788 );
7789 }
7790 self.object_opt_mut().unwrap()
7791 }
7792 pub fn set_object<T: Into<super::Object>>(&mut self, field: T) {
7795 self.result = Some(
7796 super::get_object_result::Result::Object(field.into().into()),
7797 );
7798 }
7799 pub fn with_object<T: Into<super::Object>>(mut self, field: T) -> Self {
7802 self.set_object(field.into());
7803 self
7804 }
7805 pub fn error(&self) -> &super::super::super::super::google::rpc::Status {
7807 if let Some(super::get_object_result::Result::Error(field)) = &self.result {
7808 field as _
7809 } else {
7810 super::super::super::super::google::rpc::Status::default_instance() as _
7811 }
7812 }
7813 pub fn error_opt(
7815 &self,
7816 ) -> Option<&super::super::super::super::google::rpc::Status> {
7817 if let Some(super::get_object_result::Result::Error(field)) = &self.result {
7818 Some(field as _)
7819 } else {
7820 None
7821 }
7822 }
7823 pub fn error_opt_mut(
7825 &mut self,
7826 ) -> Option<&mut super::super::super::super::google::rpc::Status> {
7827 if let Some(super::get_object_result::Result::Error(field)) = &mut self
7828 .result
7829 {
7830 Some(field as _)
7831 } else {
7832 None
7833 }
7834 }
7835 pub fn error_mut(
7839 &mut self,
7840 ) -> &mut super::super::super::super::google::rpc::Status {
7841 if self.error_opt_mut().is_none() {
7842 self.result = Some(
7843 super::get_object_result::Result::Error(
7844 super::super::super::super::google::rpc::Status::default(),
7845 ),
7846 );
7847 }
7848 self.error_opt_mut().unwrap()
7849 }
7850 pub fn set_error<T: Into<super::super::super::super::google::rpc::Status>>(
7853 &mut self,
7854 field: T,
7855 ) {
7856 self.result = Some(
7857 super::get_object_result::Result::Error(field.into().into()),
7858 );
7859 }
7860 pub fn with_error<T: Into<super::super::super::super::google::rpc::Status>>(
7863 mut self,
7864 field: T,
7865 ) -> Self {
7866 self.set_error(field.into());
7867 self
7868 }
7869 }
7870 impl super::GetPackageRequest {
7871 pub const fn const_default() -> Self {
7872 Self { package_id: None }
7873 }
7874 #[doc(hidden)]
7875 pub fn default_instance() -> &'static Self {
7876 static DEFAULT: super::GetPackageRequest = super::GetPackageRequest::const_default();
7877 &DEFAULT
7878 }
7879 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
7881 self.package_id.as_mut().map(|field| field as _)
7882 }
7883 pub fn package_id_mut(&mut self) -> &mut String {
7886 self.package_id.get_or_insert_default()
7887 }
7888 pub fn package_id_opt(&self) -> Option<&str> {
7890 self.package_id.as_ref().map(|field| field as _)
7891 }
7892 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
7894 self.package_id = Some(field.into().into());
7895 }
7896 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
7898 self.set_package_id(field.into());
7899 self
7900 }
7901 }
7902 impl super::GetPackageResponse {
7903 pub const fn const_default() -> Self {
7904 Self { package: None }
7905 }
7906 #[doc(hidden)]
7907 pub fn default_instance() -> &'static Self {
7908 static DEFAULT: super::GetPackageResponse = super::GetPackageResponse::const_default();
7909 &DEFAULT
7910 }
7911 pub fn package(&self) -> &super::Package {
7913 self.package
7914 .as_ref()
7915 .map(|field| field as _)
7916 .unwrap_or_else(|| super::Package::default_instance() as _)
7917 }
7918 pub fn package_opt_mut(&mut self) -> Option<&mut super::Package> {
7920 self.package.as_mut().map(|field| field as _)
7921 }
7922 pub fn package_mut(&mut self) -> &mut super::Package {
7925 self.package.get_or_insert_default()
7926 }
7927 pub fn package_opt(&self) -> Option<&super::Package> {
7929 self.package.as_ref().map(|field| field as _)
7930 }
7931 pub fn set_package<T: Into<super::Package>>(&mut self, field: T) {
7933 self.package = Some(field.into().into());
7934 }
7935 pub fn with_package<T: Into<super::Package>>(mut self, field: T) -> Self {
7937 self.set_package(field.into());
7938 self
7939 }
7940 }
7941 impl super::GetServiceInfoRequest {
7942 pub const fn const_default() -> Self {
7943 Self {}
7944 }
7945 #[doc(hidden)]
7946 pub fn default_instance() -> &'static Self {
7947 static DEFAULT: super::GetServiceInfoRequest = super::GetServiceInfoRequest::const_default();
7948 &DEFAULT
7949 }
7950 }
7951 impl super::GetServiceInfoResponse {
7952 pub const fn const_default() -> Self {
7953 Self {
7954 chain_id: None,
7955 chain: None,
7956 epoch: None,
7957 checkpoint_height: None,
7958 timestamp: None,
7959 lowest_available_checkpoint: None,
7960 lowest_available_checkpoint_objects: None,
7961 server: None,
7962 }
7963 }
7964 #[doc(hidden)]
7965 pub fn default_instance() -> &'static Self {
7966 static DEFAULT: super::GetServiceInfoResponse = super::GetServiceInfoResponse::const_default();
7967 &DEFAULT
7968 }
7969 pub fn chain_id_opt_mut(&mut self) -> Option<&mut String> {
7971 self.chain_id.as_mut().map(|field| field as _)
7972 }
7973 pub fn chain_id_mut(&mut self) -> &mut String {
7976 self.chain_id.get_or_insert_default()
7977 }
7978 pub fn chain_id_opt(&self) -> Option<&str> {
7980 self.chain_id.as_ref().map(|field| field as _)
7981 }
7982 pub fn set_chain_id<T: Into<String>>(&mut self, field: T) {
7984 self.chain_id = Some(field.into().into());
7985 }
7986 pub fn with_chain_id<T: Into<String>>(mut self, field: T) -> Self {
7988 self.set_chain_id(field.into());
7989 self
7990 }
7991 pub fn chain_opt_mut(&mut self) -> Option<&mut String> {
7993 self.chain.as_mut().map(|field| field as _)
7994 }
7995 pub fn chain_mut(&mut self) -> &mut String {
7998 self.chain.get_or_insert_default()
7999 }
8000 pub fn chain_opt(&self) -> Option<&str> {
8002 self.chain.as_ref().map(|field| field as _)
8003 }
8004 pub fn set_chain<T: Into<String>>(&mut self, field: T) {
8006 self.chain = Some(field.into().into());
8007 }
8008 pub fn with_chain<T: Into<String>>(mut self, field: T) -> Self {
8010 self.set_chain(field.into());
8011 self
8012 }
8013 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
8015 self.epoch.as_mut().map(|field| field as _)
8016 }
8017 pub fn epoch_mut(&mut self) -> &mut u64 {
8020 self.epoch.get_or_insert_default()
8021 }
8022 pub fn epoch_opt(&self) -> Option<u64> {
8024 self.epoch.as_ref().map(|field| *field)
8025 }
8026 pub fn set_epoch(&mut self, field: u64) {
8028 self.epoch = Some(field);
8029 }
8030 pub fn with_epoch(mut self, field: u64) -> Self {
8032 self.set_epoch(field);
8033 self
8034 }
8035 pub fn checkpoint_height_opt_mut(&mut self) -> Option<&mut u64> {
8037 self.checkpoint_height.as_mut().map(|field| field as _)
8038 }
8039 pub fn checkpoint_height_mut(&mut self) -> &mut u64 {
8042 self.checkpoint_height.get_or_insert_default()
8043 }
8044 pub fn checkpoint_height_opt(&self) -> Option<u64> {
8046 self.checkpoint_height.as_ref().map(|field| *field)
8047 }
8048 pub fn set_checkpoint_height(&mut self, field: u64) {
8050 self.checkpoint_height = Some(field);
8051 }
8052 pub fn with_checkpoint_height(mut self, field: u64) -> Self {
8054 self.set_checkpoint_height(field);
8055 self
8056 }
8057 pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
8059 self.timestamp.as_mut().map(|field| field as _)
8060 }
8061 pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
8064 self.timestamp.get_or_insert_default()
8065 }
8066 pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
8068 self.timestamp.as_ref().map(|field| field as _)
8069 }
8070 pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
8072 self.timestamp = Some(field.into().into());
8073 }
8074 pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
8076 mut self,
8077 field: T,
8078 ) -> Self {
8079 self.set_timestamp(field.into());
8080 self
8081 }
8082 pub fn lowest_available_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
8084 self.lowest_available_checkpoint.as_mut().map(|field| field as _)
8085 }
8086 pub fn lowest_available_checkpoint_mut(&mut self) -> &mut u64 {
8089 self.lowest_available_checkpoint.get_or_insert_default()
8090 }
8091 pub fn lowest_available_checkpoint_opt(&self) -> Option<u64> {
8093 self.lowest_available_checkpoint.as_ref().map(|field| *field)
8094 }
8095 pub fn set_lowest_available_checkpoint(&mut self, field: u64) {
8097 self.lowest_available_checkpoint = Some(field);
8098 }
8099 pub fn with_lowest_available_checkpoint(mut self, field: u64) -> Self {
8101 self.set_lowest_available_checkpoint(field);
8102 self
8103 }
8104 pub fn lowest_available_checkpoint_objects_opt_mut(
8106 &mut self,
8107 ) -> Option<&mut u64> {
8108 self.lowest_available_checkpoint_objects.as_mut().map(|field| field as _)
8109 }
8110 pub fn lowest_available_checkpoint_objects_mut(&mut self) -> &mut u64 {
8113 self.lowest_available_checkpoint_objects.get_or_insert_default()
8114 }
8115 pub fn lowest_available_checkpoint_objects_opt(&self) -> Option<u64> {
8117 self.lowest_available_checkpoint_objects.as_ref().map(|field| *field)
8118 }
8119 pub fn set_lowest_available_checkpoint_objects(&mut self, field: u64) {
8121 self.lowest_available_checkpoint_objects = Some(field);
8122 }
8123 pub fn with_lowest_available_checkpoint_objects(mut self, field: u64) -> Self {
8125 self.set_lowest_available_checkpoint_objects(field);
8126 self
8127 }
8128 pub fn server_opt_mut(&mut self) -> Option<&mut String> {
8130 self.server.as_mut().map(|field| field as _)
8131 }
8132 pub fn server_mut(&mut self) -> &mut String {
8135 self.server.get_or_insert_default()
8136 }
8137 pub fn server_opt(&self) -> Option<&str> {
8139 self.server.as_ref().map(|field| field as _)
8140 }
8141 pub fn set_server<T: Into<String>>(&mut self, field: T) {
8143 self.server = Some(field.into().into());
8144 }
8145 pub fn with_server<T: Into<String>>(mut self, field: T) -> Self {
8147 self.set_server(field.into());
8148 self
8149 }
8150 }
8151 impl super::GetTransactionRequest {
8152 pub const fn const_default() -> Self {
8153 Self {
8154 digest: None,
8155 read_mask: None,
8156 }
8157 }
8158 #[doc(hidden)]
8159 pub fn default_instance() -> &'static Self {
8160 static DEFAULT: super::GetTransactionRequest = super::GetTransactionRequest::const_default();
8161 &DEFAULT
8162 }
8163 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
8165 self.digest.as_mut().map(|field| field as _)
8166 }
8167 pub fn digest_mut(&mut self) -> &mut String {
8170 self.digest.get_or_insert_default()
8171 }
8172 pub fn digest_opt(&self) -> Option<&str> {
8174 self.digest.as_ref().map(|field| field as _)
8175 }
8176 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
8178 self.digest = Some(field.into().into());
8179 }
8180 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
8182 self.set_digest(field.into());
8183 self
8184 }
8185 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
8187 self.read_mask.as_mut().map(|field| field as _)
8188 }
8189 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
8192 self.read_mask.get_or_insert_default()
8193 }
8194 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
8196 self.read_mask.as_ref().map(|field| field as _)
8197 }
8198 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
8200 self.read_mask = Some(field.into().into());
8201 }
8202 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
8204 mut self,
8205 field: T,
8206 ) -> Self {
8207 self.set_read_mask(field.into());
8208 self
8209 }
8210 }
8211 impl super::GetTransactionResponse {
8212 pub const fn const_default() -> Self {
8213 Self { transaction: None }
8214 }
8215 #[doc(hidden)]
8216 pub fn default_instance() -> &'static Self {
8217 static DEFAULT: super::GetTransactionResponse = super::GetTransactionResponse::const_default();
8218 &DEFAULT
8219 }
8220 pub fn transaction(&self) -> &super::ExecutedTransaction {
8222 self.transaction
8223 .as_ref()
8224 .map(|field| field as _)
8225 .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
8226 }
8227 pub fn transaction_opt_mut(
8229 &mut self,
8230 ) -> Option<&mut super::ExecutedTransaction> {
8231 self.transaction.as_mut().map(|field| field as _)
8232 }
8233 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
8236 self.transaction.get_or_insert_default()
8237 }
8238 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
8240 self.transaction.as_ref().map(|field| field as _)
8241 }
8242 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
8244 &mut self,
8245 field: T,
8246 ) {
8247 self.transaction = Some(field.into().into());
8248 }
8249 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
8251 mut self,
8252 field: T,
8253 ) -> Self {
8254 self.set_transaction(field.into());
8255 self
8256 }
8257 }
8258 impl super::GetTransactionResult {
8259 pub const fn const_default() -> Self {
8260 Self { result: None }
8261 }
8262 #[doc(hidden)]
8263 pub fn default_instance() -> &'static Self {
8264 static DEFAULT: super::GetTransactionResult = super::GetTransactionResult::const_default();
8265 &DEFAULT
8266 }
8267 pub fn transaction(&self) -> &super::ExecutedTransaction {
8269 if let Some(super::get_transaction_result::Result::Transaction(field)) = &self
8270 .result
8271 {
8272 field as _
8273 } else {
8274 super::ExecutedTransaction::default_instance() as _
8275 }
8276 }
8277 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
8279 if let Some(super::get_transaction_result::Result::Transaction(field)) = &self
8280 .result
8281 {
8282 Some(field as _)
8283 } else {
8284 None
8285 }
8286 }
8287 pub fn transaction_opt_mut(
8289 &mut self,
8290 ) -> Option<&mut super::ExecutedTransaction> {
8291 if let Some(super::get_transaction_result::Result::Transaction(field)) = &mut self
8292 .result
8293 {
8294 Some(field as _)
8295 } else {
8296 None
8297 }
8298 }
8299 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
8303 if self.transaction_opt_mut().is_none() {
8304 self.result = Some(
8305 super::get_transaction_result::Result::Transaction(
8306 super::ExecutedTransaction::default(),
8307 ),
8308 );
8309 }
8310 self.transaction_opt_mut().unwrap()
8311 }
8312 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
8315 &mut self,
8316 field: T,
8317 ) {
8318 self.result = Some(
8319 super::get_transaction_result::Result::Transaction(field.into().into()),
8320 );
8321 }
8322 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
8325 mut self,
8326 field: T,
8327 ) -> Self {
8328 self.set_transaction(field.into());
8329 self
8330 }
8331 pub fn error(&self) -> &super::super::super::super::google::rpc::Status {
8333 if let Some(super::get_transaction_result::Result::Error(field)) = &self
8334 .result
8335 {
8336 field as _
8337 } else {
8338 super::super::super::super::google::rpc::Status::default_instance() as _
8339 }
8340 }
8341 pub fn error_opt(
8343 &self,
8344 ) -> Option<&super::super::super::super::google::rpc::Status> {
8345 if let Some(super::get_transaction_result::Result::Error(field)) = &self
8346 .result
8347 {
8348 Some(field as _)
8349 } else {
8350 None
8351 }
8352 }
8353 pub fn error_opt_mut(
8355 &mut self,
8356 ) -> Option<&mut super::super::super::super::google::rpc::Status> {
8357 if let Some(super::get_transaction_result::Result::Error(field)) = &mut self
8358 .result
8359 {
8360 Some(field as _)
8361 } else {
8362 None
8363 }
8364 }
8365 pub fn error_mut(
8369 &mut self,
8370 ) -> &mut super::super::super::super::google::rpc::Status {
8371 if self.error_opt_mut().is_none() {
8372 self.result = Some(
8373 super::get_transaction_result::Result::Error(
8374 super::super::super::super::google::rpc::Status::default(),
8375 ),
8376 );
8377 }
8378 self.error_opt_mut().unwrap()
8379 }
8380 pub fn set_error<T: Into<super::super::super::super::google::rpc::Status>>(
8383 &mut self,
8384 field: T,
8385 ) {
8386 self.result = Some(
8387 super::get_transaction_result::Result::Error(field.into().into()),
8388 );
8389 }
8390 pub fn with_error<T: Into<super::super::super::super::google::rpc::Status>>(
8393 mut self,
8394 field: T,
8395 ) -> Self {
8396 self.set_error(field.into());
8397 self
8398 }
8399 }
8400 impl super::IndexError {
8401 pub const fn const_default() -> Self {
8402 Self {
8403 index: None,
8404 subresult: None,
8405 }
8406 }
8407 #[doc(hidden)]
8408 pub fn default_instance() -> &'static Self {
8409 static DEFAULT: super::IndexError = super::IndexError::const_default();
8410 &DEFAULT
8411 }
8412 pub fn index_opt_mut(&mut self) -> Option<&mut u32> {
8414 self.index.as_mut().map(|field| field as _)
8415 }
8416 pub fn index_mut(&mut self) -> &mut u32 {
8419 self.index.get_or_insert_default()
8420 }
8421 pub fn index_opt(&self) -> Option<u32> {
8423 self.index.as_ref().map(|field| *field)
8424 }
8425 pub fn set_index(&mut self, field: u32) {
8427 self.index = Some(field);
8428 }
8429 pub fn with_index(mut self, field: u32) -> Self {
8431 self.set_index(field);
8432 self
8433 }
8434 pub fn subresult_opt_mut(&mut self) -> Option<&mut u32> {
8436 self.subresult.as_mut().map(|field| field as _)
8437 }
8438 pub fn subresult_mut(&mut self) -> &mut u32 {
8441 self.subresult.get_or_insert_default()
8442 }
8443 pub fn subresult_opt(&self) -> Option<u32> {
8445 self.subresult.as_ref().map(|field| *field)
8446 }
8447 pub fn set_subresult(&mut self, field: u32) {
8449 self.subresult = Some(field);
8450 }
8451 pub fn with_subresult(mut self, field: u32) -> Self {
8453 self.set_subresult(field);
8454 self
8455 }
8456 }
8457 impl super::Input {
8458 pub const fn const_default() -> Self {
8459 Self {
8460 kind: None,
8461 pure: None,
8462 object_id: None,
8463 version: None,
8464 digest: None,
8465 mutable: None,
8466 mutability: None,
8467 funds_withdrawal: None,
8468 literal: None,
8469 }
8470 }
8471 #[doc(hidden)]
8472 pub fn default_instance() -> &'static Self {
8473 static DEFAULT: super::Input = super::Input::const_default();
8474 &DEFAULT
8475 }
8476 pub fn with_kind<T: Into<super::input::InputKind>>(mut self, field: T) -> Self {
8478 self.set_kind(field.into());
8479 self
8480 }
8481 pub fn pure_opt(&self) -> Option<&[u8]> {
8483 self.pure.as_ref().map(|field| field as _)
8484 }
8485 pub fn set_pure<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
8487 self.pure = Some(field.into().into());
8488 }
8489 pub fn with_pure<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
8491 self.set_pure(field.into());
8492 self
8493 }
8494 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
8496 self.object_id.as_mut().map(|field| field as _)
8497 }
8498 pub fn object_id_mut(&mut self) -> &mut String {
8501 self.object_id.get_or_insert_default()
8502 }
8503 pub fn object_id_opt(&self) -> Option<&str> {
8505 self.object_id.as_ref().map(|field| field as _)
8506 }
8507 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
8509 self.object_id = Some(field.into().into());
8510 }
8511 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
8513 self.set_object_id(field.into());
8514 self
8515 }
8516 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
8518 self.version.as_mut().map(|field| field as _)
8519 }
8520 pub fn version_mut(&mut self) -> &mut u64 {
8523 self.version.get_or_insert_default()
8524 }
8525 pub fn version_opt(&self) -> Option<u64> {
8527 self.version.as_ref().map(|field| *field)
8528 }
8529 pub fn set_version(&mut self, field: u64) {
8531 self.version = Some(field);
8532 }
8533 pub fn with_version(mut self, field: u64) -> Self {
8535 self.set_version(field);
8536 self
8537 }
8538 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
8540 self.digest.as_mut().map(|field| field as _)
8541 }
8542 pub fn digest_mut(&mut self) -> &mut String {
8545 self.digest.get_or_insert_default()
8546 }
8547 pub fn digest_opt(&self) -> Option<&str> {
8549 self.digest.as_ref().map(|field| field as _)
8550 }
8551 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
8553 self.digest = Some(field.into().into());
8554 }
8555 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
8557 self.set_digest(field.into());
8558 self
8559 }
8560 pub fn mutable_opt_mut(&mut self) -> Option<&mut bool> {
8562 self.mutable.as_mut().map(|field| field as _)
8563 }
8564 pub fn mutable_mut(&mut self) -> &mut bool {
8567 self.mutable.get_or_insert_default()
8568 }
8569 pub fn mutable_opt(&self) -> Option<bool> {
8571 self.mutable.as_ref().map(|field| *field)
8572 }
8573 pub fn set_mutable(&mut self, field: bool) {
8575 self.mutable = Some(field);
8576 }
8577 pub fn with_mutable(mut self, field: bool) -> Self {
8579 self.set_mutable(field);
8580 self
8581 }
8582 pub fn with_mutability<T: Into<super::input::Mutability>>(
8584 mut self,
8585 field: T,
8586 ) -> Self {
8587 self.set_mutability(field.into());
8588 self
8589 }
8590 pub fn funds_withdrawal(&self) -> &super::FundsWithdrawal {
8592 self.funds_withdrawal
8593 .as_ref()
8594 .map(|field| field as _)
8595 .unwrap_or_else(|| super::FundsWithdrawal::default_instance() as _)
8596 }
8597 pub fn funds_withdrawal_opt_mut(
8599 &mut self,
8600 ) -> Option<&mut super::FundsWithdrawal> {
8601 self.funds_withdrawal.as_mut().map(|field| field as _)
8602 }
8603 pub fn funds_withdrawal_mut(&mut self) -> &mut super::FundsWithdrawal {
8606 self.funds_withdrawal.get_or_insert_default()
8607 }
8608 pub fn funds_withdrawal_opt(&self) -> Option<&super::FundsWithdrawal> {
8610 self.funds_withdrawal.as_ref().map(|field| field as _)
8611 }
8612 pub fn set_funds_withdrawal<T: Into<super::FundsWithdrawal>>(
8614 &mut self,
8615 field: T,
8616 ) {
8617 self.funds_withdrawal = Some(field.into().into());
8618 }
8619 pub fn with_funds_withdrawal<T: Into<super::FundsWithdrawal>>(
8621 mut self,
8622 field: T,
8623 ) -> Self {
8624 self.set_funds_withdrawal(field.into());
8625 self
8626 }
8627 pub fn literal_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
8629 self.literal.as_mut().map(|field| field as _)
8630 }
8631 pub fn literal_mut(&mut self) -> &mut ::prost_types::Value {
8634 self.literal.get_or_insert_default()
8635 }
8636 pub fn literal_opt(&self) -> Option<&::prost_types::Value> {
8638 self.literal.as_ref().map(|field| field as _)
8639 }
8640 pub fn set_literal<T: Into<::prost_types::Value>>(&mut self, field: T) {
8642 self.literal = Some(field.into().into());
8643 }
8644 pub fn with_literal<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
8646 self.set_literal(field.into());
8647 self
8648 }
8649 }
8650 impl super::Jwk {
8651 pub const fn const_default() -> Self {
8652 Self {
8653 kty: None,
8654 e: None,
8655 n: None,
8656 alg: None,
8657 }
8658 }
8659 #[doc(hidden)]
8660 pub fn default_instance() -> &'static Self {
8661 static DEFAULT: super::Jwk = super::Jwk::const_default();
8662 &DEFAULT
8663 }
8664 pub fn kty_opt_mut(&mut self) -> Option<&mut String> {
8666 self.kty.as_mut().map(|field| field as _)
8667 }
8668 pub fn kty_mut(&mut self) -> &mut String {
8671 self.kty.get_or_insert_default()
8672 }
8673 pub fn kty_opt(&self) -> Option<&str> {
8675 self.kty.as_ref().map(|field| field as _)
8676 }
8677 pub fn set_kty<T: Into<String>>(&mut self, field: T) {
8679 self.kty = Some(field.into().into());
8680 }
8681 pub fn with_kty<T: Into<String>>(mut self, field: T) -> Self {
8683 self.set_kty(field.into());
8684 self
8685 }
8686 pub fn e_opt_mut(&mut self) -> Option<&mut String> {
8688 self.e.as_mut().map(|field| field as _)
8689 }
8690 pub fn e_mut(&mut self) -> &mut String {
8693 self.e.get_or_insert_default()
8694 }
8695 pub fn e_opt(&self) -> Option<&str> {
8697 self.e.as_ref().map(|field| field as _)
8698 }
8699 pub fn set_e<T: Into<String>>(&mut self, field: T) {
8701 self.e = Some(field.into().into());
8702 }
8703 pub fn with_e<T: Into<String>>(mut self, field: T) -> Self {
8705 self.set_e(field.into());
8706 self
8707 }
8708 pub fn n_opt_mut(&mut self) -> Option<&mut String> {
8710 self.n.as_mut().map(|field| field as _)
8711 }
8712 pub fn n_mut(&mut self) -> &mut String {
8715 self.n.get_or_insert_default()
8716 }
8717 pub fn n_opt(&self) -> Option<&str> {
8719 self.n.as_ref().map(|field| field as _)
8720 }
8721 pub fn set_n<T: Into<String>>(&mut self, field: T) {
8723 self.n = Some(field.into().into());
8724 }
8725 pub fn with_n<T: Into<String>>(mut self, field: T) -> Self {
8727 self.set_n(field.into());
8728 self
8729 }
8730 pub fn alg_opt_mut(&mut self) -> Option<&mut String> {
8732 self.alg.as_mut().map(|field| field as _)
8733 }
8734 pub fn alg_mut(&mut self) -> &mut String {
8737 self.alg.get_or_insert_default()
8738 }
8739 pub fn alg_opt(&self) -> Option<&str> {
8741 self.alg.as_ref().map(|field| field as _)
8742 }
8743 pub fn set_alg<T: Into<String>>(&mut self, field: T) {
8745 self.alg = Some(field.into().into());
8746 }
8747 pub fn with_alg<T: Into<String>>(mut self, field: T) -> Self {
8749 self.set_alg(field.into());
8750 self
8751 }
8752 }
8753 impl super::JwkId {
8754 pub const fn const_default() -> Self {
8755 Self { iss: None, kid: None }
8756 }
8757 #[doc(hidden)]
8758 pub fn default_instance() -> &'static Self {
8759 static DEFAULT: super::JwkId = super::JwkId::const_default();
8760 &DEFAULT
8761 }
8762 pub fn iss_opt_mut(&mut self) -> Option<&mut String> {
8764 self.iss.as_mut().map(|field| field as _)
8765 }
8766 pub fn iss_mut(&mut self) -> &mut String {
8769 self.iss.get_or_insert_default()
8770 }
8771 pub fn iss_opt(&self) -> Option<&str> {
8773 self.iss.as_ref().map(|field| field as _)
8774 }
8775 pub fn set_iss<T: Into<String>>(&mut self, field: T) {
8777 self.iss = Some(field.into().into());
8778 }
8779 pub fn with_iss<T: Into<String>>(mut self, field: T) -> Self {
8781 self.set_iss(field.into());
8782 self
8783 }
8784 pub fn kid_opt_mut(&mut self) -> Option<&mut String> {
8786 self.kid.as_mut().map(|field| field as _)
8787 }
8788 pub fn kid_mut(&mut self) -> &mut String {
8791 self.kid.get_or_insert_default()
8792 }
8793 pub fn kid_opt(&self) -> Option<&str> {
8795 self.kid.as_ref().map(|field| field as _)
8796 }
8797 pub fn set_kid<T: Into<String>>(&mut self, field: T) {
8799 self.kid = Some(field.into().into());
8800 }
8801 pub fn with_kid<T: Into<String>>(mut self, field: T) -> Self {
8803 self.set_kid(field.into());
8804 self
8805 }
8806 }
8807 impl super::Linkage {
8808 pub const fn const_default() -> Self {
8809 Self {
8810 original_id: None,
8811 upgraded_id: None,
8812 upgraded_version: None,
8813 }
8814 }
8815 #[doc(hidden)]
8816 pub fn default_instance() -> &'static Self {
8817 static DEFAULT: super::Linkage = super::Linkage::const_default();
8818 &DEFAULT
8819 }
8820 pub fn original_id_opt_mut(&mut self) -> Option<&mut String> {
8822 self.original_id.as_mut().map(|field| field as _)
8823 }
8824 pub fn original_id_mut(&mut self) -> &mut String {
8827 self.original_id.get_or_insert_default()
8828 }
8829 pub fn original_id_opt(&self) -> Option<&str> {
8831 self.original_id.as_ref().map(|field| field as _)
8832 }
8833 pub fn set_original_id<T: Into<String>>(&mut self, field: T) {
8835 self.original_id = Some(field.into().into());
8836 }
8837 pub fn with_original_id<T: Into<String>>(mut self, field: T) -> Self {
8839 self.set_original_id(field.into());
8840 self
8841 }
8842 pub fn upgraded_id_opt_mut(&mut self) -> Option<&mut String> {
8844 self.upgraded_id.as_mut().map(|field| field as _)
8845 }
8846 pub fn upgraded_id_mut(&mut self) -> &mut String {
8849 self.upgraded_id.get_or_insert_default()
8850 }
8851 pub fn upgraded_id_opt(&self) -> Option<&str> {
8853 self.upgraded_id.as_ref().map(|field| field as _)
8854 }
8855 pub fn set_upgraded_id<T: Into<String>>(&mut self, field: T) {
8857 self.upgraded_id = Some(field.into().into());
8858 }
8859 pub fn with_upgraded_id<T: Into<String>>(mut self, field: T) -> Self {
8861 self.set_upgraded_id(field.into());
8862 self
8863 }
8864 pub fn upgraded_version_opt_mut(&mut self) -> Option<&mut u64> {
8866 self.upgraded_version.as_mut().map(|field| field as _)
8867 }
8868 pub fn upgraded_version_mut(&mut self) -> &mut u64 {
8871 self.upgraded_version.get_or_insert_default()
8872 }
8873 pub fn upgraded_version_opt(&self) -> Option<u64> {
8875 self.upgraded_version.as_ref().map(|field| *field)
8876 }
8877 pub fn set_upgraded_version(&mut self, field: u64) {
8879 self.upgraded_version = Some(field);
8880 }
8881 pub fn with_upgraded_version(mut self, field: u64) -> Self {
8883 self.set_upgraded_version(field);
8884 self
8885 }
8886 }
8887 impl super::ListBalancesRequest {
8888 pub const fn const_default() -> Self {
8889 Self {
8890 owner: None,
8891 page_size: None,
8892 page_token: None,
8893 }
8894 }
8895 #[doc(hidden)]
8896 pub fn default_instance() -> &'static Self {
8897 static DEFAULT: super::ListBalancesRequest = super::ListBalancesRequest::const_default();
8898 &DEFAULT
8899 }
8900 pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
8902 self.owner.as_mut().map(|field| field as _)
8903 }
8904 pub fn owner_mut(&mut self) -> &mut String {
8907 self.owner.get_or_insert_default()
8908 }
8909 pub fn owner_opt(&self) -> Option<&str> {
8911 self.owner.as_ref().map(|field| field as _)
8912 }
8913 pub fn set_owner<T: Into<String>>(&mut self, field: T) {
8915 self.owner = Some(field.into().into());
8916 }
8917 pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
8919 self.set_owner(field.into());
8920 self
8921 }
8922 pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
8924 self.page_size.as_mut().map(|field| field as _)
8925 }
8926 pub fn page_size_mut(&mut self) -> &mut u32 {
8929 self.page_size.get_or_insert_default()
8930 }
8931 pub fn page_size_opt(&self) -> Option<u32> {
8933 self.page_size.as_ref().map(|field| *field)
8934 }
8935 pub fn set_page_size(&mut self, field: u32) {
8937 self.page_size = Some(field);
8938 }
8939 pub fn with_page_size(mut self, field: u32) -> Self {
8941 self.set_page_size(field);
8942 self
8943 }
8944 pub fn page_token_opt(&self) -> Option<&[u8]> {
8946 self.page_token.as_ref().map(|field| field as _)
8947 }
8948 pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
8950 self.page_token = Some(field.into().into());
8951 }
8952 pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
8954 mut self,
8955 field: T,
8956 ) -> Self {
8957 self.set_page_token(field.into());
8958 self
8959 }
8960 }
8961 impl super::ListBalancesResponse {
8962 pub const fn const_default() -> Self {
8963 Self {
8964 balances: Vec::new(),
8965 next_page_token: None,
8966 }
8967 }
8968 #[doc(hidden)]
8969 pub fn default_instance() -> &'static Self {
8970 static DEFAULT: super::ListBalancesResponse = super::ListBalancesResponse::const_default();
8971 &DEFAULT
8972 }
8973 pub fn balances(&self) -> &[super::Balance] {
8975 &self.balances
8976 }
8977 pub fn balances_mut(&mut self) -> &mut Vec<super::Balance> {
8980 &mut self.balances
8981 }
8982 pub fn set_balances(&mut self, field: Vec<super::Balance>) {
8984 self.balances = field;
8985 }
8986 pub fn with_balances(mut self, field: Vec<super::Balance>) -> Self {
8988 self.set_balances(field);
8989 self
8990 }
8991 pub fn next_page_token_opt(&self) -> Option<&[u8]> {
8993 self.next_page_token.as_ref().map(|field| field as _)
8994 }
8995 pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
8997 self.next_page_token = Some(field.into().into());
8998 }
8999 pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
9001 mut self,
9002 field: T,
9003 ) -> Self {
9004 self.set_next_page_token(field.into());
9005 self
9006 }
9007 }
9008 impl super::ListDynamicFieldsRequest {
9009 pub const fn const_default() -> Self {
9010 Self {
9011 parent: None,
9012 page_size: None,
9013 page_token: None,
9014 read_mask: None,
9015 }
9016 }
9017 #[doc(hidden)]
9018 pub fn default_instance() -> &'static Self {
9019 static DEFAULT: super::ListDynamicFieldsRequest = super::ListDynamicFieldsRequest::const_default();
9020 &DEFAULT
9021 }
9022 pub fn parent_opt_mut(&mut self) -> Option<&mut String> {
9024 self.parent.as_mut().map(|field| field as _)
9025 }
9026 pub fn parent_mut(&mut self) -> &mut String {
9029 self.parent.get_or_insert_default()
9030 }
9031 pub fn parent_opt(&self) -> Option<&str> {
9033 self.parent.as_ref().map(|field| field as _)
9034 }
9035 pub fn set_parent<T: Into<String>>(&mut self, field: T) {
9037 self.parent = Some(field.into().into());
9038 }
9039 pub fn with_parent<T: Into<String>>(mut self, field: T) -> Self {
9041 self.set_parent(field.into());
9042 self
9043 }
9044 pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
9046 self.page_size.as_mut().map(|field| field as _)
9047 }
9048 pub fn page_size_mut(&mut self) -> &mut u32 {
9051 self.page_size.get_or_insert_default()
9052 }
9053 pub fn page_size_opt(&self) -> Option<u32> {
9055 self.page_size.as_ref().map(|field| *field)
9056 }
9057 pub fn set_page_size(&mut self, field: u32) {
9059 self.page_size = Some(field);
9060 }
9061 pub fn with_page_size(mut self, field: u32) -> Self {
9063 self.set_page_size(field);
9064 self
9065 }
9066 pub fn page_token_opt(&self) -> Option<&[u8]> {
9068 self.page_token.as_ref().map(|field| field as _)
9069 }
9070 pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9072 self.page_token = Some(field.into().into());
9073 }
9074 pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
9076 mut self,
9077 field: T,
9078 ) -> Self {
9079 self.set_page_token(field.into());
9080 self
9081 }
9082 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
9084 self.read_mask.as_mut().map(|field| field as _)
9085 }
9086 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
9089 self.read_mask.get_or_insert_default()
9090 }
9091 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
9093 self.read_mask.as_ref().map(|field| field as _)
9094 }
9095 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
9097 self.read_mask = Some(field.into().into());
9098 }
9099 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
9101 mut self,
9102 field: T,
9103 ) -> Self {
9104 self.set_read_mask(field.into());
9105 self
9106 }
9107 }
9108 impl super::ListDynamicFieldsResponse {
9109 pub const fn const_default() -> Self {
9110 Self {
9111 dynamic_fields: Vec::new(),
9112 next_page_token: None,
9113 }
9114 }
9115 #[doc(hidden)]
9116 pub fn default_instance() -> &'static Self {
9117 static DEFAULT: super::ListDynamicFieldsResponse = super::ListDynamicFieldsResponse::const_default();
9118 &DEFAULT
9119 }
9120 pub fn dynamic_fields(&self) -> &[super::DynamicField] {
9122 &self.dynamic_fields
9123 }
9124 pub fn dynamic_fields_mut(&mut self) -> &mut Vec<super::DynamicField> {
9127 &mut self.dynamic_fields
9128 }
9129 pub fn set_dynamic_fields(&mut self, field: Vec<super::DynamicField>) {
9131 self.dynamic_fields = field;
9132 }
9133 pub fn with_dynamic_fields(mut self, field: Vec<super::DynamicField>) -> Self {
9135 self.set_dynamic_fields(field);
9136 self
9137 }
9138 pub fn next_page_token_opt(&self) -> Option<&[u8]> {
9140 self.next_page_token.as_ref().map(|field| field as _)
9141 }
9142 pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9144 self.next_page_token = Some(field.into().into());
9145 }
9146 pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
9148 mut self,
9149 field: T,
9150 ) -> Self {
9151 self.set_next_page_token(field.into());
9152 self
9153 }
9154 }
9155 impl super::ListOwnedObjectsRequest {
9156 pub const fn const_default() -> Self {
9157 Self {
9158 owner: None,
9159 page_size: None,
9160 page_token: None,
9161 read_mask: None,
9162 object_type: None,
9163 }
9164 }
9165 #[doc(hidden)]
9166 pub fn default_instance() -> &'static Self {
9167 static DEFAULT: super::ListOwnedObjectsRequest = super::ListOwnedObjectsRequest::const_default();
9168 &DEFAULT
9169 }
9170 pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
9172 self.owner.as_mut().map(|field| field as _)
9173 }
9174 pub fn owner_mut(&mut self) -> &mut String {
9177 self.owner.get_or_insert_default()
9178 }
9179 pub fn owner_opt(&self) -> Option<&str> {
9181 self.owner.as_ref().map(|field| field as _)
9182 }
9183 pub fn set_owner<T: Into<String>>(&mut self, field: T) {
9185 self.owner = Some(field.into().into());
9186 }
9187 pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
9189 self.set_owner(field.into());
9190 self
9191 }
9192 pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
9194 self.page_size.as_mut().map(|field| field as _)
9195 }
9196 pub fn page_size_mut(&mut self) -> &mut u32 {
9199 self.page_size.get_or_insert_default()
9200 }
9201 pub fn page_size_opt(&self) -> Option<u32> {
9203 self.page_size.as_ref().map(|field| *field)
9204 }
9205 pub fn set_page_size(&mut self, field: u32) {
9207 self.page_size = Some(field);
9208 }
9209 pub fn with_page_size(mut self, field: u32) -> Self {
9211 self.set_page_size(field);
9212 self
9213 }
9214 pub fn page_token_opt(&self) -> Option<&[u8]> {
9216 self.page_token.as_ref().map(|field| field as _)
9217 }
9218 pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9220 self.page_token = Some(field.into().into());
9221 }
9222 pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
9224 mut self,
9225 field: T,
9226 ) -> Self {
9227 self.set_page_token(field.into());
9228 self
9229 }
9230 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
9232 self.read_mask.as_mut().map(|field| field as _)
9233 }
9234 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
9237 self.read_mask.get_or_insert_default()
9238 }
9239 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
9241 self.read_mask.as_ref().map(|field| field as _)
9242 }
9243 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
9245 self.read_mask = Some(field.into().into());
9246 }
9247 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
9249 mut self,
9250 field: T,
9251 ) -> Self {
9252 self.set_read_mask(field.into());
9253 self
9254 }
9255 pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
9257 self.object_type.as_mut().map(|field| field as _)
9258 }
9259 pub fn object_type_mut(&mut self) -> &mut String {
9262 self.object_type.get_or_insert_default()
9263 }
9264 pub fn object_type_opt(&self) -> Option<&str> {
9266 self.object_type.as_ref().map(|field| field as _)
9267 }
9268 pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
9270 self.object_type = Some(field.into().into());
9271 }
9272 pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
9274 self.set_object_type(field.into());
9275 self
9276 }
9277 }
9278 impl super::ListOwnedObjectsResponse {
9279 pub const fn const_default() -> Self {
9280 Self {
9281 objects: Vec::new(),
9282 next_page_token: None,
9283 }
9284 }
9285 #[doc(hidden)]
9286 pub fn default_instance() -> &'static Self {
9287 static DEFAULT: super::ListOwnedObjectsResponse = super::ListOwnedObjectsResponse::const_default();
9288 &DEFAULT
9289 }
9290 pub fn objects(&self) -> &[super::Object] {
9292 &self.objects
9293 }
9294 pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
9297 &mut self.objects
9298 }
9299 pub fn set_objects(&mut self, field: Vec<super::Object>) {
9301 self.objects = field;
9302 }
9303 pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
9305 self.set_objects(field);
9306 self
9307 }
9308 pub fn next_page_token_opt(&self) -> Option<&[u8]> {
9310 self.next_page_token.as_ref().map(|field| field as _)
9311 }
9312 pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9314 self.next_page_token = Some(field.into().into());
9315 }
9316 pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
9318 mut self,
9319 field: T,
9320 ) -> Self {
9321 self.set_next_page_token(field.into());
9322 self
9323 }
9324 }
9325 impl super::ListPackageVersionsRequest {
9326 pub const fn const_default() -> Self {
9327 Self {
9328 package_id: None,
9329 page_size: None,
9330 page_token: None,
9331 }
9332 }
9333 #[doc(hidden)]
9334 pub fn default_instance() -> &'static Self {
9335 static DEFAULT: super::ListPackageVersionsRequest = super::ListPackageVersionsRequest::const_default();
9336 &DEFAULT
9337 }
9338 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
9340 self.package_id.as_mut().map(|field| field as _)
9341 }
9342 pub fn package_id_mut(&mut self) -> &mut String {
9345 self.package_id.get_or_insert_default()
9346 }
9347 pub fn package_id_opt(&self) -> Option<&str> {
9349 self.package_id.as_ref().map(|field| field as _)
9350 }
9351 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
9353 self.package_id = Some(field.into().into());
9354 }
9355 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
9357 self.set_package_id(field.into());
9358 self
9359 }
9360 pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
9362 self.page_size.as_mut().map(|field| field as _)
9363 }
9364 pub fn page_size_mut(&mut self) -> &mut u32 {
9367 self.page_size.get_or_insert_default()
9368 }
9369 pub fn page_size_opt(&self) -> Option<u32> {
9371 self.page_size.as_ref().map(|field| *field)
9372 }
9373 pub fn set_page_size(&mut self, field: u32) {
9375 self.page_size = Some(field);
9376 }
9377 pub fn with_page_size(mut self, field: u32) -> Self {
9379 self.set_page_size(field);
9380 self
9381 }
9382 pub fn page_token_opt(&self) -> Option<&[u8]> {
9384 self.page_token.as_ref().map(|field| field as _)
9385 }
9386 pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9388 self.page_token = Some(field.into().into());
9389 }
9390 pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
9392 mut self,
9393 field: T,
9394 ) -> Self {
9395 self.set_page_token(field.into());
9396 self
9397 }
9398 }
9399 impl super::ListPackageVersionsResponse {
9400 pub const fn const_default() -> Self {
9401 Self {
9402 versions: Vec::new(),
9403 next_page_token: None,
9404 }
9405 }
9406 #[doc(hidden)]
9407 pub fn default_instance() -> &'static Self {
9408 static DEFAULT: super::ListPackageVersionsResponse = super::ListPackageVersionsResponse::const_default();
9409 &DEFAULT
9410 }
9411 pub fn versions(&self) -> &[super::PackageVersion] {
9413 &self.versions
9414 }
9415 pub fn versions_mut(&mut self) -> &mut Vec<super::PackageVersion> {
9418 &mut self.versions
9419 }
9420 pub fn set_versions(&mut self, field: Vec<super::PackageVersion>) {
9422 self.versions = field;
9423 }
9424 pub fn with_versions(mut self, field: Vec<super::PackageVersion>) -> Self {
9426 self.set_versions(field);
9427 self
9428 }
9429 pub fn next_page_token_opt(&self) -> Option<&[u8]> {
9431 self.next_page_token.as_ref().map(|field| field as _)
9432 }
9433 pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9435 self.next_page_token = Some(field.into().into());
9436 }
9437 pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
9439 mut self,
9440 field: T,
9441 ) -> Self {
9442 self.set_next_page_token(field.into());
9443 self
9444 }
9445 }
9446 impl super::LookupNameRequest {
9447 pub const fn const_default() -> Self {
9448 Self { name: None }
9449 }
9450 #[doc(hidden)]
9451 pub fn default_instance() -> &'static Self {
9452 static DEFAULT: super::LookupNameRequest = super::LookupNameRequest::const_default();
9453 &DEFAULT
9454 }
9455 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
9457 self.name.as_mut().map(|field| field as _)
9458 }
9459 pub fn name_mut(&mut self) -> &mut String {
9462 self.name.get_or_insert_default()
9463 }
9464 pub fn name_opt(&self) -> Option<&str> {
9466 self.name.as_ref().map(|field| field as _)
9467 }
9468 pub fn set_name<T: Into<String>>(&mut self, field: T) {
9470 self.name = Some(field.into().into());
9471 }
9472 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
9474 self.set_name(field.into());
9475 self
9476 }
9477 }
9478 impl super::LookupNameResponse {
9479 pub const fn const_default() -> Self {
9480 Self { record: None }
9481 }
9482 #[doc(hidden)]
9483 pub fn default_instance() -> &'static Self {
9484 static DEFAULT: super::LookupNameResponse = super::LookupNameResponse::const_default();
9485 &DEFAULT
9486 }
9487 pub fn record(&self) -> &super::NameRecord {
9489 self.record
9490 .as_ref()
9491 .map(|field| field as _)
9492 .unwrap_or_else(|| super::NameRecord::default_instance() as _)
9493 }
9494 pub fn record_opt_mut(&mut self) -> Option<&mut super::NameRecord> {
9496 self.record.as_mut().map(|field| field as _)
9497 }
9498 pub fn record_mut(&mut self) -> &mut super::NameRecord {
9501 self.record.get_or_insert_default()
9502 }
9503 pub fn record_opt(&self) -> Option<&super::NameRecord> {
9505 self.record.as_ref().map(|field| field as _)
9506 }
9507 pub fn set_record<T: Into<super::NameRecord>>(&mut self, field: T) {
9509 self.record = Some(field.into().into());
9510 }
9511 pub fn with_record<T: Into<super::NameRecord>>(mut self, field: T) -> Self {
9513 self.set_record(field.into());
9514 self
9515 }
9516 }
9517 impl super::MakeMoveVector {
9518 pub const fn const_default() -> Self {
9519 Self {
9520 element_type: None,
9521 elements: Vec::new(),
9522 }
9523 }
9524 #[doc(hidden)]
9525 pub fn default_instance() -> &'static Self {
9526 static DEFAULT: super::MakeMoveVector = super::MakeMoveVector::const_default();
9527 &DEFAULT
9528 }
9529 pub fn element_type_opt_mut(&mut self) -> Option<&mut String> {
9531 self.element_type.as_mut().map(|field| field as _)
9532 }
9533 pub fn element_type_mut(&mut self) -> &mut String {
9536 self.element_type.get_or_insert_default()
9537 }
9538 pub fn element_type_opt(&self) -> Option<&str> {
9540 self.element_type.as_ref().map(|field| field as _)
9541 }
9542 pub fn set_element_type<T: Into<String>>(&mut self, field: T) {
9544 self.element_type = Some(field.into().into());
9545 }
9546 pub fn with_element_type<T: Into<String>>(mut self, field: T) -> Self {
9548 self.set_element_type(field.into());
9549 self
9550 }
9551 pub fn elements(&self) -> &[super::Argument] {
9553 &self.elements
9554 }
9555 pub fn elements_mut(&mut self) -> &mut Vec<super::Argument> {
9558 &mut self.elements
9559 }
9560 pub fn set_elements(&mut self, field: Vec<super::Argument>) {
9562 self.elements = field;
9563 }
9564 pub fn with_elements(mut self, field: Vec<super::Argument>) -> Self {
9566 self.set_elements(field);
9567 self
9568 }
9569 }
9570 impl super::MergeCoins {
9571 pub const fn const_default() -> Self {
9572 Self {
9573 coin: None,
9574 coins_to_merge: Vec::new(),
9575 }
9576 }
9577 #[doc(hidden)]
9578 pub fn default_instance() -> &'static Self {
9579 static DEFAULT: super::MergeCoins = super::MergeCoins::const_default();
9580 &DEFAULT
9581 }
9582 pub fn coin(&self) -> &super::Argument {
9584 self.coin
9585 .as_ref()
9586 .map(|field| field as _)
9587 .unwrap_or_else(|| super::Argument::default_instance() as _)
9588 }
9589 pub fn coin_opt_mut(&mut self) -> Option<&mut super::Argument> {
9591 self.coin.as_mut().map(|field| field as _)
9592 }
9593 pub fn coin_mut(&mut self) -> &mut super::Argument {
9596 self.coin.get_or_insert_default()
9597 }
9598 pub fn coin_opt(&self) -> Option<&super::Argument> {
9600 self.coin.as_ref().map(|field| field as _)
9601 }
9602 pub fn set_coin<T: Into<super::Argument>>(&mut self, field: T) {
9604 self.coin = Some(field.into().into());
9605 }
9606 pub fn with_coin<T: Into<super::Argument>>(mut self, field: T) -> Self {
9608 self.set_coin(field.into());
9609 self
9610 }
9611 pub fn coins_to_merge(&self) -> &[super::Argument] {
9613 &self.coins_to_merge
9614 }
9615 pub fn coins_to_merge_mut(&mut self) -> &mut Vec<super::Argument> {
9618 &mut self.coins_to_merge
9619 }
9620 pub fn set_coins_to_merge(&mut self, field: Vec<super::Argument>) {
9622 self.coins_to_merge = field;
9623 }
9624 pub fn with_coins_to_merge(mut self, field: Vec<super::Argument>) -> Self {
9626 self.set_coins_to_merge(field);
9627 self
9628 }
9629 }
9630 impl super::Module {
9631 pub const fn const_default() -> Self {
9632 Self {
9633 name: None,
9634 contents: None,
9635 datatypes: Vec::new(),
9636 functions: Vec::new(),
9637 }
9638 }
9639 #[doc(hidden)]
9640 pub fn default_instance() -> &'static Self {
9641 static DEFAULT: super::Module = super::Module::const_default();
9642 &DEFAULT
9643 }
9644 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
9646 self.name.as_mut().map(|field| field as _)
9647 }
9648 pub fn name_mut(&mut self) -> &mut String {
9651 self.name.get_or_insert_default()
9652 }
9653 pub fn name_opt(&self) -> Option<&str> {
9655 self.name.as_ref().map(|field| field as _)
9656 }
9657 pub fn set_name<T: Into<String>>(&mut self, field: T) {
9659 self.name = Some(field.into().into());
9660 }
9661 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
9663 self.set_name(field.into());
9664 self
9665 }
9666 pub fn contents_opt(&self) -> Option<&[u8]> {
9668 self.contents.as_ref().map(|field| field as _)
9669 }
9670 pub fn set_contents<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9672 self.contents = Some(field.into().into());
9673 }
9674 pub fn with_contents<T: Into<::prost::bytes::Bytes>>(
9676 mut self,
9677 field: T,
9678 ) -> Self {
9679 self.set_contents(field.into());
9680 self
9681 }
9682 pub fn datatypes(&self) -> &[super::DatatypeDescriptor] {
9684 &self.datatypes
9685 }
9686 pub fn datatypes_mut(&mut self) -> &mut Vec<super::DatatypeDescriptor> {
9689 &mut self.datatypes
9690 }
9691 pub fn set_datatypes(&mut self, field: Vec<super::DatatypeDescriptor>) {
9693 self.datatypes = field;
9694 }
9695 pub fn with_datatypes(mut self, field: Vec<super::DatatypeDescriptor>) -> Self {
9697 self.set_datatypes(field);
9698 self
9699 }
9700 pub fn functions(&self) -> &[super::FunctionDescriptor] {
9702 &self.functions
9703 }
9704 pub fn functions_mut(&mut self) -> &mut Vec<super::FunctionDescriptor> {
9707 &mut self.functions
9708 }
9709 pub fn set_functions(&mut self, field: Vec<super::FunctionDescriptor>) {
9711 self.functions = field;
9712 }
9713 pub fn with_functions(mut self, field: Vec<super::FunctionDescriptor>) -> Self {
9715 self.set_functions(field);
9716 self
9717 }
9718 }
9719 impl super::MoveAbort {
9720 pub const fn const_default() -> Self {
9721 Self {
9722 abort_code: None,
9723 location: None,
9724 clever_error: None,
9725 }
9726 }
9727 #[doc(hidden)]
9728 pub fn default_instance() -> &'static Self {
9729 static DEFAULT: super::MoveAbort = super::MoveAbort::const_default();
9730 &DEFAULT
9731 }
9732 pub fn abort_code_opt_mut(&mut self) -> Option<&mut u64> {
9734 self.abort_code.as_mut().map(|field| field as _)
9735 }
9736 pub fn abort_code_mut(&mut self) -> &mut u64 {
9739 self.abort_code.get_or_insert_default()
9740 }
9741 pub fn abort_code_opt(&self) -> Option<u64> {
9743 self.abort_code.as_ref().map(|field| *field)
9744 }
9745 pub fn set_abort_code(&mut self, field: u64) {
9747 self.abort_code = Some(field);
9748 }
9749 pub fn with_abort_code(mut self, field: u64) -> Self {
9751 self.set_abort_code(field);
9752 self
9753 }
9754 pub fn location(&self) -> &super::MoveLocation {
9756 self.location
9757 .as_ref()
9758 .map(|field| field as _)
9759 .unwrap_or_else(|| super::MoveLocation::default_instance() as _)
9760 }
9761 pub fn location_opt_mut(&mut self) -> Option<&mut super::MoveLocation> {
9763 self.location.as_mut().map(|field| field as _)
9764 }
9765 pub fn location_mut(&mut self) -> &mut super::MoveLocation {
9768 self.location.get_or_insert_default()
9769 }
9770 pub fn location_opt(&self) -> Option<&super::MoveLocation> {
9772 self.location.as_ref().map(|field| field as _)
9773 }
9774 pub fn set_location<T: Into<super::MoveLocation>>(&mut self, field: T) {
9776 self.location = Some(field.into().into());
9777 }
9778 pub fn with_location<T: Into<super::MoveLocation>>(mut self, field: T) -> Self {
9780 self.set_location(field.into());
9781 self
9782 }
9783 pub fn clever_error(&self) -> &super::CleverError {
9785 self.clever_error
9786 .as_ref()
9787 .map(|field| field as _)
9788 .unwrap_or_else(|| super::CleverError::default_instance() as _)
9789 }
9790 pub fn clever_error_opt_mut(&mut self) -> Option<&mut super::CleverError> {
9792 self.clever_error.as_mut().map(|field| field as _)
9793 }
9794 pub fn clever_error_mut(&mut self) -> &mut super::CleverError {
9797 self.clever_error.get_or_insert_default()
9798 }
9799 pub fn clever_error_opt(&self) -> Option<&super::CleverError> {
9801 self.clever_error.as_ref().map(|field| field as _)
9802 }
9803 pub fn set_clever_error<T: Into<super::CleverError>>(&mut self, field: T) {
9805 self.clever_error = Some(field.into().into());
9806 }
9807 pub fn with_clever_error<T: Into<super::CleverError>>(
9809 mut self,
9810 field: T,
9811 ) -> Self {
9812 self.set_clever_error(field.into());
9813 self
9814 }
9815 }
9816 impl super::MoveCall {
9817 pub const fn const_default() -> Self {
9818 Self {
9819 package: None,
9820 module: None,
9821 function: None,
9822 type_arguments: Vec::new(),
9823 arguments: Vec::new(),
9824 }
9825 }
9826 #[doc(hidden)]
9827 pub fn default_instance() -> &'static Self {
9828 static DEFAULT: super::MoveCall = super::MoveCall::const_default();
9829 &DEFAULT
9830 }
9831 pub fn package_opt_mut(&mut self) -> Option<&mut String> {
9833 self.package.as_mut().map(|field| field as _)
9834 }
9835 pub fn package_mut(&mut self) -> &mut String {
9838 self.package.get_or_insert_default()
9839 }
9840 pub fn package_opt(&self) -> Option<&str> {
9842 self.package.as_ref().map(|field| field as _)
9843 }
9844 pub fn set_package<T: Into<String>>(&mut self, field: T) {
9846 self.package = Some(field.into().into());
9847 }
9848 pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
9850 self.set_package(field.into());
9851 self
9852 }
9853 pub fn module_opt_mut(&mut self) -> Option<&mut String> {
9855 self.module.as_mut().map(|field| field as _)
9856 }
9857 pub fn module_mut(&mut self) -> &mut String {
9860 self.module.get_or_insert_default()
9861 }
9862 pub fn module_opt(&self) -> Option<&str> {
9864 self.module.as_ref().map(|field| field as _)
9865 }
9866 pub fn set_module<T: Into<String>>(&mut self, field: T) {
9868 self.module = Some(field.into().into());
9869 }
9870 pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
9872 self.set_module(field.into());
9873 self
9874 }
9875 pub fn function_opt_mut(&mut self) -> Option<&mut String> {
9877 self.function.as_mut().map(|field| field as _)
9878 }
9879 pub fn function_mut(&mut self) -> &mut String {
9882 self.function.get_or_insert_default()
9883 }
9884 pub fn function_opt(&self) -> Option<&str> {
9886 self.function.as_ref().map(|field| field as _)
9887 }
9888 pub fn set_function<T: Into<String>>(&mut self, field: T) {
9890 self.function = Some(field.into().into());
9891 }
9892 pub fn with_function<T: Into<String>>(mut self, field: T) -> Self {
9894 self.set_function(field.into());
9895 self
9896 }
9897 pub fn type_arguments(&self) -> &[String] {
9899 &self.type_arguments
9900 }
9901 pub fn type_arguments_mut(&mut self) -> &mut Vec<String> {
9904 &mut self.type_arguments
9905 }
9906 pub fn set_type_arguments(&mut self, field: Vec<String>) {
9908 self.type_arguments = field;
9909 }
9910 pub fn with_type_arguments(mut self, field: Vec<String>) -> Self {
9912 self.set_type_arguments(field);
9913 self
9914 }
9915 pub fn arguments(&self) -> &[super::Argument] {
9917 &self.arguments
9918 }
9919 pub fn arguments_mut(&mut self) -> &mut Vec<super::Argument> {
9922 &mut self.arguments
9923 }
9924 pub fn set_arguments(&mut self, field: Vec<super::Argument>) {
9926 self.arguments = field;
9927 }
9928 pub fn with_arguments(mut self, field: Vec<super::Argument>) -> Self {
9930 self.set_arguments(field);
9931 self
9932 }
9933 }
9934 impl super::MoveLocation {
9935 pub const fn const_default() -> Self {
9936 Self {
9937 package: None,
9938 module: None,
9939 function: None,
9940 instruction: None,
9941 function_name: None,
9942 }
9943 }
9944 #[doc(hidden)]
9945 pub fn default_instance() -> &'static Self {
9946 static DEFAULT: super::MoveLocation = super::MoveLocation::const_default();
9947 &DEFAULT
9948 }
9949 pub fn package_opt_mut(&mut self) -> Option<&mut String> {
9951 self.package.as_mut().map(|field| field as _)
9952 }
9953 pub fn package_mut(&mut self) -> &mut String {
9956 self.package.get_or_insert_default()
9957 }
9958 pub fn package_opt(&self) -> Option<&str> {
9960 self.package.as_ref().map(|field| field as _)
9961 }
9962 pub fn set_package<T: Into<String>>(&mut self, field: T) {
9964 self.package = Some(field.into().into());
9965 }
9966 pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
9968 self.set_package(field.into());
9969 self
9970 }
9971 pub fn module_opt_mut(&mut self) -> Option<&mut String> {
9973 self.module.as_mut().map(|field| field as _)
9974 }
9975 pub fn module_mut(&mut self) -> &mut String {
9978 self.module.get_or_insert_default()
9979 }
9980 pub fn module_opt(&self) -> Option<&str> {
9982 self.module.as_ref().map(|field| field as _)
9983 }
9984 pub fn set_module<T: Into<String>>(&mut self, field: T) {
9986 self.module = Some(field.into().into());
9987 }
9988 pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
9990 self.set_module(field.into());
9991 self
9992 }
9993 pub fn function_opt_mut(&mut self) -> Option<&mut u32> {
9995 self.function.as_mut().map(|field| field as _)
9996 }
9997 pub fn function_mut(&mut self) -> &mut u32 {
10000 self.function.get_or_insert_default()
10001 }
10002 pub fn function_opt(&self) -> Option<u32> {
10004 self.function.as_ref().map(|field| *field)
10005 }
10006 pub fn set_function(&mut self, field: u32) {
10008 self.function = Some(field);
10009 }
10010 pub fn with_function(mut self, field: u32) -> Self {
10012 self.set_function(field);
10013 self
10014 }
10015 pub fn instruction_opt_mut(&mut self) -> Option<&mut u32> {
10017 self.instruction.as_mut().map(|field| field as _)
10018 }
10019 pub fn instruction_mut(&mut self) -> &mut u32 {
10022 self.instruction.get_or_insert_default()
10023 }
10024 pub fn instruction_opt(&self) -> Option<u32> {
10026 self.instruction.as_ref().map(|field| *field)
10027 }
10028 pub fn set_instruction(&mut self, field: u32) {
10030 self.instruction = Some(field);
10031 }
10032 pub fn with_instruction(mut self, field: u32) -> Self {
10034 self.set_instruction(field);
10035 self
10036 }
10037 pub fn function_name_opt_mut(&mut self) -> Option<&mut String> {
10039 self.function_name.as_mut().map(|field| field as _)
10040 }
10041 pub fn function_name_mut(&mut self) -> &mut String {
10044 self.function_name.get_or_insert_default()
10045 }
10046 pub fn function_name_opt(&self) -> Option<&str> {
10048 self.function_name.as_ref().map(|field| field as _)
10049 }
10050 pub fn set_function_name<T: Into<String>>(&mut self, field: T) {
10052 self.function_name = Some(field.into().into());
10053 }
10054 pub fn with_function_name<T: Into<String>>(mut self, field: T) -> Self {
10056 self.set_function_name(field.into());
10057 self
10058 }
10059 }
10060 impl super::MoveTable {
10061 pub const fn const_default() -> Self {
10062 Self { id: None, size: None }
10063 }
10064 #[doc(hidden)]
10065 pub fn default_instance() -> &'static Self {
10066 static DEFAULT: super::MoveTable = super::MoveTable::const_default();
10067 &DEFAULT
10068 }
10069 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
10071 self.id.as_mut().map(|field| field as _)
10072 }
10073 pub fn id_mut(&mut self) -> &mut String {
10076 self.id.get_or_insert_default()
10077 }
10078 pub fn id_opt(&self) -> Option<&str> {
10080 self.id.as_ref().map(|field| field as _)
10081 }
10082 pub fn set_id<T: Into<String>>(&mut self, field: T) {
10084 self.id = Some(field.into().into());
10085 }
10086 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
10088 self.set_id(field.into());
10089 self
10090 }
10091 pub fn size_opt_mut(&mut self) -> Option<&mut u64> {
10093 self.size.as_mut().map(|field| field as _)
10094 }
10095 pub fn size_mut(&mut self) -> &mut u64 {
10098 self.size.get_or_insert_default()
10099 }
10100 pub fn size_opt(&self) -> Option<u64> {
10102 self.size.as_ref().map(|field| *field)
10103 }
10104 pub fn set_size(&mut self, field: u64) {
10106 self.size = Some(field);
10107 }
10108 pub fn with_size(mut self, field: u64) -> Self {
10110 self.set_size(field);
10111 self
10112 }
10113 }
10114 impl super::MultisigAggregatedSignature {
10115 pub const fn const_default() -> Self {
10116 Self {
10117 signatures: Vec::new(),
10118 bitmap: None,
10119 legacy_bitmap: None,
10120 committee: None,
10121 }
10122 }
10123 #[doc(hidden)]
10124 pub fn default_instance() -> &'static Self {
10125 static DEFAULT: super::MultisigAggregatedSignature = super::MultisigAggregatedSignature::const_default();
10126 &DEFAULT
10127 }
10128 pub fn signatures(&self) -> &[super::MultisigMemberSignature] {
10130 &self.signatures
10131 }
10132 pub fn signatures_mut(&mut self) -> &mut Vec<super::MultisigMemberSignature> {
10135 &mut self.signatures
10136 }
10137 pub fn set_signatures(&mut self, field: Vec<super::MultisigMemberSignature>) {
10139 self.signatures = field;
10140 }
10141 pub fn with_signatures(
10143 mut self,
10144 field: Vec<super::MultisigMemberSignature>,
10145 ) -> Self {
10146 self.set_signatures(field);
10147 self
10148 }
10149 pub fn bitmap_opt_mut(&mut self) -> Option<&mut u32> {
10151 self.bitmap.as_mut().map(|field| field as _)
10152 }
10153 pub fn bitmap_mut(&mut self) -> &mut u32 {
10156 self.bitmap.get_or_insert_default()
10157 }
10158 pub fn bitmap_opt(&self) -> Option<u32> {
10160 self.bitmap.as_ref().map(|field| *field)
10161 }
10162 pub fn set_bitmap(&mut self, field: u32) {
10164 self.bitmap = Some(field);
10165 }
10166 pub fn with_bitmap(mut self, field: u32) -> Self {
10168 self.set_bitmap(field);
10169 self
10170 }
10171 pub fn legacy_bitmap_opt(&self) -> Option<&[u8]> {
10173 self.legacy_bitmap.as_ref().map(|field| field as _)
10174 }
10175 pub fn set_legacy_bitmap<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10177 self.legacy_bitmap = Some(field.into().into());
10178 }
10179 pub fn with_legacy_bitmap<T: Into<::prost::bytes::Bytes>>(
10181 mut self,
10182 field: T,
10183 ) -> Self {
10184 self.set_legacy_bitmap(field.into());
10185 self
10186 }
10187 pub fn committee(&self) -> &super::MultisigCommittee {
10189 self.committee
10190 .as_ref()
10191 .map(|field| field as _)
10192 .unwrap_or_else(|| super::MultisigCommittee::default_instance() as _)
10193 }
10194 pub fn committee_opt_mut(&mut self) -> Option<&mut super::MultisigCommittee> {
10196 self.committee.as_mut().map(|field| field as _)
10197 }
10198 pub fn committee_mut(&mut self) -> &mut super::MultisigCommittee {
10201 self.committee.get_or_insert_default()
10202 }
10203 pub fn committee_opt(&self) -> Option<&super::MultisigCommittee> {
10205 self.committee.as_ref().map(|field| field as _)
10206 }
10207 pub fn set_committee<T: Into<super::MultisigCommittee>>(&mut self, field: T) {
10209 self.committee = Some(field.into().into());
10210 }
10211 pub fn with_committee<T: Into<super::MultisigCommittee>>(
10213 mut self,
10214 field: T,
10215 ) -> Self {
10216 self.set_committee(field.into());
10217 self
10218 }
10219 }
10220 impl super::MultisigCommittee {
10221 pub const fn const_default() -> Self {
10222 Self {
10223 members: Vec::new(),
10224 threshold: None,
10225 }
10226 }
10227 #[doc(hidden)]
10228 pub fn default_instance() -> &'static Self {
10229 static DEFAULT: super::MultisigCommittee = super::MultisigCommittee::const_default();
10230 &DEFAULT
10231 }
10232 pub fn members(&self) -> &[super::MultisigMember] {
10234 &self.members
10235 }
10236 pub fn members_mut(&mut self) -> &mut Vec<super::MultisigMember> {
10239 &mut self.members
10240 }
10241 pub fn set_members(&mut self, field: Vec<super::MultisigMember>) {
10243 self.members = field;
10244 }
10245 pub fn with_members(mut self, field: Vec<super::MultisigMember>) -> Self {
10247 self.set_members(field);
10248 self
10249 }
10250 pub fn threshold_opt_mut(&mut self) -> Option<&mut u32> {
10252 self.threshold.as_mut().map(|field| field as _)
10253 }
10254 pub fn threshold_mut(&mut self) -> &mut u32 {
10257 self.threshold.get_or_insert_default()
10258 }
10259 pub fn threshold_opt(&self) -> Option<u32> {
10261 self.threshold.as_ref().map(|field| *field)
10262 }
10263 pub fn set_threshold(&mut self, field: u32) {
10265 self.threshold = Some(field);
10266 }
10267 pub fn with_threshold(mut self, field: u32) -> Self {
10269 self.set_threshold(field);
10270 self
10271 }
10272 }
10273 impl super::MultisigMember {
10274 pub const fn const_default() -> Self {
10275 Self {
10276 public_key: None,
10277 weight: None,
10278 }
10279 }
10280 #[doc(hidden)]
10281 pub fn default_instance() -> &'static Self {
10282 static DEFAULT: super::MultisigMember = super::MultisigMember::const_default();
10283 &DEFAULT
10284 }
10285 pub fn public_key(&self) -> &super::MultisigMemberPublicKey {
10287 self.public_key
10288 .as_ref()
10289 .map(|field| field as _)
10290 .unwrap_or_else(|| {
10291 super::MultisigMemberPublicKey::default_instance() as _
10292 })
10293 }
10294 pub fn public_key_opt_mut(
10296 &mut self,
10297 ) -> Option<&mut super::MultisigMemberPublicKey> {
10298 self.public_key.as_mut().map(|field| field as _)
10299 }
10300 pub fn public_key_mut(&mut self) -> &mut super::MultisigMemberPublicKey {
10303 self.public_key.get_or_insert_default()
10304 }
10305 pub fn public_key_opt(&self) -> Option<&super::MultisigMemberPublicKey> {
10307 self.public_key.as_ref().map(|field| field as _)
10308 }
10309 pub fn set_public_key<T: Into<super::MultisigMemberPublicKey>>(
10311 &mut self,
10312 field: T,
10313 ) {
10314 self.public_key = Some(field.into().into());
10315 }
10316 pub fn with_public_key<T: Into<super::MultisigMemberPublicKey>>(
10318 mut self,
10319 field: T,
10320 ) -> Self {
10321 self.set_public_key(field.into());
10322 self
10323 }
10324 pub fn weight_opt_mut(&mut self) -> Option<&mut u32> {
10326 self.weight.as_mut().map(|field| field as _)
10327 }
10328 pub fn weight_mut(&mut self) -> &mut u32 {
10331 self.weight.get_or_insert_default()
10332 }
10333 pub fn weight_opt(&self) -> Option<u32> {
10335 self.weight.as_ref().map(|field| *field)
10336 }
10337 pub fn set_weight(&mut self, field: u32) {
10339 self.weight = Some(field);
10340 }
10341 pub fn with_weight(mut self, field: u32) -> Self {
10343 self.set_weight(field);
10344 self
10345 }
10346 }
10347 impl super::MultisigMemberPublicKey {
10348 pub const fn const_default() -> Self {
10349 Self {
10350 scheme: None,
10351 public_key: None,
10352 zklogin: None,
10353 }
10354 }
10355 #[doc(hidden)]
10356 pub fn default_instance() -> &'static Self {
10357 static DEFAULT: super::MultisigMemberPublicKey = super::MultisigMemberPublicKey::const_default();
10358 &DEFAULT
10359 }
10360 pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
10362 self.set_scheme(field.into());
10363 self
10364 }
10365 pub fn public_key_opt(&self) -> Option<&[u8]> {
10367 self.public_key.as_ref().map(|field| field as _)
10368 }
10369 pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10371 self.public_key = Some(field.into().into());
10372 }
10373 pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
10375 mut self,
10376 field: T,
10377 ) -> Self {
10378 self.set_public_key(field.into());
10379 self
10380 }
10381 pub fn zklogin(&self) -> &super::ZkLoginPublicIdentifier {
10383 self.zklogin
10384 .as_ref()
10385 .map(|field| field as _)
10386 .unwrap_or_else(|| {
10387 super::ZkLoginPublicIdentifier::default_instance() as _
10388 })
10389 }
10390 pub fn zklogin_opt_mut(
10392 &mut self,
10393 ) -> Option<&mut super::ZkLoginPublicIdentifier> {
10394 self.zklogin.as_mut().map(|field| field as _)
10395 }
10396 pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginPublicIdentifier {
10399 self.zklogin.get_or_insert_default()
10400 }
10401 pub fn zklogin_opt(&self) -> Option<&super::ZkLoginPublicIdentifier> {
10403 self.zklogin.as_ref().map(|field| field as _)
10404 }
10405 pub fn set_zklogin<T: Into<super::ZkLoginPublicIdentifier>>(
10407 &mut self,
10408 field: T,
10409 ) {
10410 self.zklogin = Some(field.into().into());
10411 }
10412 pub fn with_zklogin<T: Into<super::ZkLoginPublicIdentifier>>(
10414 mut self,
10415 field: T,
10416 ) -> Self {
10417 self.set_zklogin(field.into());
10418 self
10419 }
10420 }
10421 impl super::MultisigMemberSignature {
10422 pub const fn const_default() -> Self {
10423 Self {
10424 scheme: None,
10425 signature: None,
10426 zklogin: None,
10427 passkey: None,
10428 }
10429 }
10430 #[doc(hidden)]
10431 pub fn default_instance() -> &'static Self {
10432 static DEFAULT: super::MultisigMemberSignature = super::MultisigMemberSignature::const_default();
10433 &DEFAULT
10434 }
10435 pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
10437 self.set_scheme(field.into());
10438 self
10439 }
10440 pub fn signature_opt(&self) -> Option<&[u8]> {
10442 self.signature.as_ref().map(|field| field as _)
10443 }
10444 pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10446 self.signature = Some(field.into().into());
10447 }
10448 pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
10450 mut self,
10451 field: T,
10452 ) -> Self {
10453 self.set_signature(field.into());
10454 self
10455 }
10456 pub fn zklogin(&self) -> &super::ZkLoginAuthenticator {
10458 self.zklogin
10459 .as_ref()
10460 .map(|field| field as _)
10461 .unwrap_or_else(|| super::ZkLoginAuthenticator::default_instance() as _)
10462 }
10463 pub fn zklogin_opt_mut(&mut self) -> Option<&mut super::ZkLoginAuthenticator> {
10465 self.zklogin.as_mut().map(|field| field as _)
10466 }
10467 pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginAuthenticator {
10470 self.zklogin.get_or_insert_default()
10471 }
10472 pub fn zklogin_opt(&self) -> Option<&super::ZkLoginAuthenticator> {
10474 self.zklogin.as_ref().map(|field| field as _)
10475 }
10476 pub fn set_zklogin<T: Into<super::ZkLoginAuthenticator>>(&mut self, field: T) {
10478 self.zklogin = Some(field.into().into());
10479 }
10480 pub fn with_zklogin<T: Into<super::ZkLoginAuthenticator>>(
10482 mut self,
10483 field: T,
10484 ) -> Self {
10485 self.set_zklogin(field.into());
10486 self
10487 }
10488 pub fn passkey(&self) -> &super::PasskeyAuthenticator {
10490 self.passkey
10491 .as_ref()
10492 .map(|field| field as _)
10493 .unwrap_or_else(|| super::PasskeyAuthenticator::default_instance() as _)
10494 }
10495 pub fn passkey_opt_mut(&mut self) -> Option<&mut super::PasskeyAuthenticator> {
10497 self.passkey.as_mut().map(|field| field as _)
10498 }
10499 pub fn passkey_mut(&mut self) -> &mut super::PasskeyAuthenticator {
10502 self.passkey.get_or_insert_default()
10503 }
10504 pub fn passkey_opt(&self) -> Option<&super::PasskeyAuthenticator> {
10506 self.passkey.as_ref().map(|field| field as _)
10507 }
10508 pub fn set_passkey<T: Into<super::PasskeyAuthenticator>>(&mut self, field: T) {
10510 self.passkey = Some(field.into().into());
10511 }
10512 pub fn with_passkey<T: Into<super::PasskeyAuthenticator>>(
10514 mut self,
10515 field: T,
10516 ) -> Self {
10517 self.set_passkey(field.into());
10518 self
10519 }
10520 }
10521 impl super::NameRecord {
10522 pub const fn const_default() -> Self {
10523 Self {
10524 id: None,
10525 name: None,
10526 registration_nft_id: None,
10527 expiration_timestamp: None,
10528 target_address: None,
10529 data: std::collections::BTreeMap::new(),
10530 }
10531 }
10532 #[doc(hidden)]
10533 pub fn default_instance() -> &'static Self {
10534 static DEFAULT: super::NameRecord = super::NameRecord::const_default();
10535 &DEFAULT
10536 }
10537 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
10539 self.id.as_mut().map(|field| field as _)
10540 }
10541 pub fn id_mut(&mut self) -> &mut String {
10544 self.id.get_or_insert_default()
10545 }
10546 pub fn id_opt(&self) -> Option<&str> {
10548 self.id.as_ref().map(|field| field as _)
10549 }
10550 pub fn set_id<T: Into<String>>(&mut self, field: T) {
10552 self.id = Some(field.into().into());
10553 }
10554 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
10556 self.set_id(field.into());
10557 self
10558 }
10559 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
10561 self.name.as_mut().map(|field| field as _)
10562 }
10563 pub fn name_mut(&mut self) -> &mut String {
10566 self.name.get_or_insert_default()
10567 }
10568 pub fn name_opt(&self) -> Option<&str> {
10570 self.name.as_ref().map(|field| field as _)
10571 }
10572 pub fn set_name<T: Into<String>>(&mut self, field: T) {
10574 self.name = Some(field.into().into());
10575 }
10576 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
10578 self.set_name(field.into());
10579 self
10580 }
10581 pub fn registration_nft_id_opt_mut(&mut self) -> Option<&mut String> {
10583 self.registration_nft_id.as_mut().map(|field| field as _)
10584 }
10585 pub fn registration_nft_id_mut(&mut self) -> &mut String {
10588 self.registration_nft_id.get_or_insert_default()
10589 }
10590 pub fn registration_nft_id_opt(&self) -> Option<&str> {
10592 self.registration_nft_id.as_ref().map(|field| field as _)
10593 }
10594 pub fn set_registration_nft_id<T: Into<String>>(&mut self, field: T) {
10596 self.registration_nft_id = Some(field.into().into());
10597 }
10598 pub fn with_registration_nft_id<T: Into<String>>(mut self, field: T) -> Self {
10600 self.set_registration_nft_id(field.into());
10601 self
10602 }
10603 pub fn expiration_timestamp_opt_mut(
10605 &mut self,
10606 ) -> Option<&mut ::prost_types::Timestamp> {
10607 self.expiration_timestamp.as_mut().map(|field| field as _)
10608 }
10609 pub fn expiration_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
10612 self.expiration_timestamp.get_or_insert_default()
10613 }
10614 pub fn expiration_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
10616 self.expiration_timestamp.as_ref().map(|field| field as _)
10617 }
10618 pub fn set_expiration_timestamp<T: Into<::prost_types::Timestamp>>(
10620 &mut self,
10621 field: T,
10622 ) {
10623 self.expiration_timestamp = Some(field.into().into());
10624 }
10625 pub fn with_expiration_timestamp<T: Into<::prost_types::Timestamp>>(
10627 mut self,
10628 field: T,
10629 ) -> Self {
10630 self.set_expiration_timestamp(field.into());
10631 self
10632 }
10633 pub fn target_address_opt_mut(&mut self) -> Option<&mut String> {
10635 self.target_address.as_mut().map(|field| field as _)
10636 }
10637 pub fn target_address_mut(&mut self) -> &mut String {
10640 self.target_address.get_or_insert_default()
10641 }
10642 pub fn target_address_opt(&self) -> Option<&str> {
10644 self.target_address.as_ref().map(|field| field as _)
10645 }
10646 pub fn set_target_address<T: Into<String>>(&mut self, field: T) {
10648 self.target_address = Some(field.into().into());
10649 }
10650 pub fn with_target_address<T: Into<String>>(mut self, field: T) -> Self {
10652 self.set_target_address(field.into());
10653 self
10654 }
10655 pub fn data(&self) -> &::std::collections::BTreeMap<String, String> {
10657 &self.data
10658 }
10659 pub fn data_mut(&mut self) -> &mut ::std::collections::BTreeMap<String, String> {
10662 &mut self.data
10663 }
10664 pub fn set_data(&mut self, field: ::std::collections::BTreeMap<String, String>) {
10666 self.data = field;
10667 }
10668 pub fn with_data(
10670 mut self,
10671 field: ::std::collections::BTreeMap<String, String>,
10672 ) -> Self {
10673 self.set_data(field);
10674 self
10675 }
10676 }
10677 impl super::Object {
10678 pub const fn const_default() -> Self {
10679 Self {
10680 bcs: None,
10681 object_id: None,
10682 version: None,
10683 digest: None,
10684 owner: None,
10685 object_type: None,
10686 has_public_transfer: None,
10687 contents: None,
10688 package: None,
10689 previous_transaction: None,
10690 storage_rebate: None,
10691 json: None,
10692 balance: None,
10693 }
10694 }
10695 #[doc(hidden)]
10696 pub fn default_instance() -> &'static Self {
10697 static DEFAULT: super::Object = super::Object::const_default();
10698 &DEFAULT
10699 }
10700 pub fn bcs(&self) -> &super::Bcs {
10702 self.bcs
10703 .as_ref()
10704 .map(|field| field as _)
10705 .unwrap_or_else(|| super::Bcs::default_instance() as _)
10706 }
10707 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
10709 self.bcs.as_mut().map(|field| field as _)
10710 }
10711 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
10714 self.bcs.get_or_insert_default()
10715 }
10716 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
10718 self.bcs.as_ref().map(|field| field as _)
10719 }
10720 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
10722 self.bcs = Some(field.into().into());
10723 }
10724 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
10726 self.set_bcs(field.into());
10727 self
10728 }
10729 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
10731 self.object_id.as_mut().map(|field| field as _)
10732 }
10733 pub fn object_id_mut(&mut self) -> &mut String {
10736 self.object_id.get_or_insert_default()
10737 }
10738 pub fn object_id_opt(&self) -> Option<&str> {
10740 self.object_id.as_ref().map(|field| field as _)
10741 }
10742 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
10744 self.object_id = Some(field.into().into());
10745 }
10746 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
10748 self.set_object_id(field.into());
10749 self
10750 }
10751 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
10753 self.version.as_mut().map(|field| field as _)
10754 }
10755 pub fn version_mut(&mut self) -> &mut u64 {
10758 self.version.get_or_insert_default()
10759 }
10760 pub fn version_opt(&self) -> Option<u64> {
10762 self.version.as_ref().map(|field| *field)
10763 }
10764 pub fn set_version(&mut self, field: u64) {
10766 self.version = Some(field);
10767 }
10768 pub fn with_version(mut self, field: u64) -> Self {
10770 self.set_version(field);
10771 self
10772 }
10773 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
10775 self.digest.as_mut().map(|field| field as _)
10776 }
10777 pub fn digest_mut(&mut self) -> &mut String {
10780 self.digest.get_or_insert_default()
10781 }
10782 pub fn digest_opt(&self) -> Option<&str> {
10784 self.digest.as_ref().map(|field| field as _)
10785 }
10786 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
10788 self.digest = Some(field.into().into());
10789 }
10790 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
10792 self.set_digest(field.into());
10793 self
10794 }
10795 pub fn owner(&self) -> &super::Owner {
10797 self.owner
10798 .as_ref()
10799 .map(|field| field as _)
10800 .unwrap_or_else(|| super::Owner::default_instance() as _)
10801 }
10802 pub fn owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
10804 self.owner.as_mut().map(|field| field as _)
10805 }
10806 pub fn owner_mut(&mut self) -> &mut super::Owner {
10809 self.owner.get_or_insert_default()
10810 }
10811 pub fn owner_opt(&self) -> Option<&super::Owner> {
10813 self.owner.as_ref().map(|field| field as _)
10814 }
10815 pub fn set_owner<T: Into<super::Owner>>(&mut self, field: T) {
10817 self.owner = Some(field.into().into());
10818 }
10819 pub fn with_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
10821 self.set_owner(field.into());
10822 self
10823 }
10824 pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
10826 self.object_type.as_mut().map(|field| field as _)
10827 }
10828 pub fn object_type_mut(&mut self) -> &mut String {
10831 self.object_type.get_or_insert_default()
10832 }
10833 pub fn object_type_opt(&self) -> Option<&str> {
10835 self.object_type.as_ref().map(|field| field as _)
10836 }
10837 pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
10839 self.object_type = Some(field.into().into());
10840 }
10841 pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
10843 self.set_object_type(field.into());
10844 self
10845 }
10846 pub fn has_public_transfer_opt_mut(&mut self) -> Option<&mut bool> {
10848 self.has_public_transfer.as_mut().map(|field| field as _)
10849 }
10850 pub fn has_public_transfer_mut(&mut self) -> &mut bool {
10853 self.has_public_transfer.get_or_insert_default()
10854 }
10855 pub fn has_public_transfer_opt(&self) -> Option<bool> {
10857 self.has_public_transfer.as_ref().map(|field| *field)
10858 }
10859 pub fn set_has_public_transfer(&mut self, field: bool) {
10861 self.has_public_transfer = Some(field);
10862 }
10863 pub fn with_has_public_transfer(mut self, field: bool) -> Self {
10865 self.set_has_public_transfer(field);
10866 self
10867 }
10868 pub fn contents(&self) -> &super::Bcs {
10870 self.contents
10871 .as_ref()
10872 .map(|field| field as _)
10873 .unwrap_or_else(|| super::Bcs::default_instance() as _)
10874 }
10875 pub fn contents_opt_mut(&mut self) -> Option<&mut super::Bcs> {
10877 self.contents.as_mut().map(|field| field as _)
10878 }
10879 pub fn contents_mut(&mut self) -> &mut super::Bcs {
10882 self.contents.get_or_insert_default()
10883 }
10884 pub fn contents_opt(&self) -> Option<&super::Bcs> {
10886 self.contents.as_ref().map(|field| field as _)
10887 }
10888 pub fn set_contents<T: Into<super::Bcs>>(&mut self, field: T) {
10890 self.contents = Some(field.into().into());
10891 }
10892 pub fn with_contents<T: Into<super::Bcs>>(mut self, field: T) -> Self {
10894 self.set_contents(field.into());
10895 self
10896 }
10897 pub fn package(&self) -> &super::Package {
10899 self.package
10900 .as_ref()
10901 .map(|field| field as _)
10902 .unwrap_or_else(|| super::Package::default_instance() as _)
10903 }
10904 pub fn package_opt_mut(&mut self) -> Option<&mut super::Package> {
10906 self.package.as_mut().map(|field| field as _)
10907 }
10908 pub fn package_mut(&mut self) -> &mut super::Package {
10911 self.package.get_or_insert_default()
10912 }
10913 pub fn package_opt(&self) -> Option<&super::Package> {
10915 self.package.as_ref().map(|field| field as _)
10916 }
10917 pub fn set_package<T: Into<super::Package>>(&mut self, field: T) {
10919 self.package = Some(field.into().into());
10920 }
10921 pub fn with_package<T: Into<super::Package>>(mut self, field: T) -> Self {
10923 self.set_package(field.into());
10924 self
10925 }
10926 pub fn previous_transaction_opt_mut(&mut self) -> Option<&mut String> {
10928 self.previous_transaction.as_mut().map(|field| field as _)
10929 }
10930 pub fn previous_transaction_mut(&mut self) -> &mut String {
10933 self.previous_transaction.get_or_insert_default()
10934 }
10935 pub fn previous_transaction_opt(&self) -> Option<&str> {
10937 self.previous_transaction.as_ref().map(|field| field as _)
10938 }
10939 pub fn set_previous_transaction<T: Into<String>>(&mut self, field: T) {
10941 self.previous_transaction = Some(field.into().into());
10942 }
10943 pub fn with_previous_transaction<T: Into<String>>(mut self, field: T) -> Self {
10945 self.set_previous_transaction(field.into());
10946 self
10947 }
10948 pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
10950 self.storage_rebate.as_mut().map(|field| field as _)
10951 }
10952 pub fn storage_rebate_mut(&mut self) -> &mut u64 {
10955 self.storage_rebate.get_or_insert_default()
10956 }
10957 pub fn storage_rebate_opt(&self) -> Option<u64> {
10959 self.storage_rebate.as_ref().map(|field| *field)
10960 }
10961 pub fn set_storage_rebate(&mut self, field: u64) {
10963 self.storage_rebate = Some(field);
10964 }
10965 pub fn with_storage_rebate(mut self, field: u64) -> Self {
10967 self.set_storage_rebate(field);
10968 self
10969 }
10970 pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
10972 self.json.as_mut().map(|field| field as _)
10973 }
10974 pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
10977 self.json.get_or_insert_default()
10978 }
10979 pub fn json_opt(&self) -> Option<&::prost_types::Value> {
10981 self.json.as_ref().map(|field| field as _)
10982 }
10983 pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
10985 self.json = Some(field.into().into());
10986 }
10987 pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
10989 self.set_json(field.into());
10990 self
10991 }
10992 pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
10994 self.balance.as_mut().map(|field| field as _)
10995 }
10996 pub fn balance_mut(&mut self) -> &mut u64 {
10999 self.balance.get_or_insert_default()
11000 }
11001 pub fn balance_opt(&self) -> Option<u64> {
11003 self.balance.as_ref().map(|field| *field)
11004 }
11005 pub fn set_balance(&mut self, field: u64) {
11007 self.balance = Some(field);
11008 }
11009 pub fn with_balance(mut self, field: u64) -> Self {
11011 self.set_balance(field);
11012 self
11013 }
11014 }
11015 impl super::ObjectReference {
11016 pub const fn const_default() -> Self {
11017 Self {
11018 object_id: None,
11019 version: None,
11020 digest: None,
11021 }
11022 }
11023 #[doc(hidden)]
11024 pub fn default_instance() -> &'static Self {
11025 static DEFAULT: super::ObjectReference = super::ObjectReference::const_default();
11026 &DEFAULT
11027 }
11028 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
11030 self.object_id.as_mut().map(|field| field as _)
11031 }
11032 pub fn object_id_mut(&mut self) -> &mut String {
11035 self.object_id.get_or_insert_default()
11036 }
11037 pub fn object_id_opt(&self) -> Option<&str> {
11039 self.object_id.as_ref().map(|field| field as _)
11040 }
11041 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
11043 self.object_id = Some(field.into().into());
11044 }
11045 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
11047 self.set_object_id(field.into());
11048 self
11049 }
11050 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
11052 self.version.as_mut().map(|field| field as _)
11053 }
11054 pub fn version_mut(&mut self) -> &mut u64 {
11057 self.version.get_or_insert_default()
11058 }
11059 pub fn version_opt(&self) -> Option<u64> {
11061 self.version.as_ref().map(|field| *field)
11062 }
11063 pub fn set_version(&mut self, field: u64) {
11065 self.version = Some(field);
11066 }
11067 pub fn with_version(mut self, field: u64) -> Self {
11069 self.set_version(field);
11070 self
11071 }
11072 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
11074 self.digest.as_mut().map(|field| field as _)
11075 }
11076 pub fn digest_mut(&mut self) -> &mut String {
11079 self.digest.get_or_insert_default()
11080 }
11081 pub fn digest_opt(&self) -> Option<&str> {
11083 self.digest.as_ref().map(|field| field as _)
11084 }
11085 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
11087 self.digest = Some(field.into().into());
11088 }
11089 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
11091 self.set_digest(field.into());
11092 self
11093 }
11094 }
11095 impl super::ObjectSet {
11096 pub const fn const_default() -> Self {
11097 Self { objects: Vec::new() }
11098 }
11099 #[doc(hidden)]
11100 pub fn default_instance() -> &'static Self {
11101 static DEFAULT: super::ObjectSet = super::ObjectSet::const_default();
11102 &DEFAULT
11103 }
11104 pub fn objects(&self) -> &[super::Object] {
11106 &self.objects
11107 }
11108 pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
11111 &mut self.objects
11112 }
11113 pub fn set_objects(&mut self, field: Vec<super::Object>) {
11115 self.objects = field;
11116 }
11117 pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
11119 self.set_objects(field);
11120 self
11121 }
11122 }
11123 impl super::OpenSignature {
11124 pub const fn const_default() -> Self {
11125 Self {
11126 reference: None,
11127 body: None,
11128 }
11129 }
11130 #[doc(hidden)]
11131 pub fn default_instance() -> &'static Self {
11132 static DEFAULT: super::OpenSignature = super::OpenSignature::const_default();
11133 &DEFAULT
11134 }
11135 pub fn with_reference<T: Into<super::open_signature::Reference>>(
11137 mut self,
11138 field: T,
11139 ) -> Self {
11140 self.set_reference(field.into());
11141 self
11142 }
11143 pub fn body(&self) -> &super::OpenSignatureBody {
11145 self.body
11146 .as_ref()
11147 .map(|field| field as _)
11148 .unwrap_or_else(|| super::OpenSignatureBody::default_instance() as _)
11149 }
11150 pub fn body_opt_mut(&mut self) -> Option<&mut super::OpenSignatureBody> {
11152 self.body.as_mut().map(|field| field as _)
11153 }
11154 pub fn body_mut(&mut self) -> &mut super::OpenSignatureBody {
11157 self.body.get_or_insert_default()
11158 }
11159 pub fn body_opt(&self) -> Option<&super::OpenSignatureBody> {
11161 self.body.as_ref().map(|field| field as _)
11162 }
11163 pub fn set_body<T: Into<super::OpenSignatureBody>>(&mut self, field: T) {
11165 self.body = Some(field.into().into());
11166 }
11167 pub fn with_body<T: Into<super::OpenSignatureBody>>(mut self, field: T) -> Self {
11169 self.set_body(field.into());
11170 self
11171 }
11172 }
11173 impl super::OpenSignatureBody {
11174 pub const fn const_default() -> Self {
11175 Self {
11176 r#type: None,
11177 type_name: None,
11178 type_parameter_instantiation: Vec::new(),
11179 type_parameter: None,
11180 }
11181 }
11182 #[doc(hidden)]
11183 pub fn default_instance() -> &'static Self {
11184 static DEFAULT: super::OpenSignatureBody = super::OpenSignatureBody::const_default();
11185 &DEFAULT
11186 }
11187 pub fn with_type<T: Into<super::open_signature_body::Type>>(
11189 mut self,
11190 field: T,
11191 ) -> Self {
11192 self.set_type(field.into());
11193 self
11194 }
11195 pub fn type_name_opt_mut(&mut self) -> Option<&mut String> {
11197 self.type_name.as_mut().map(|field| field as _)
11198 }
11199 pub fn type_name_mut(&mut self) -> &mut String {
11202 self.type_name.get_or_insert_default()
11203 }
11204 pub fn type_name_opt(&self) -> Option<&str> {
11206 self.type_name.as_ref().map(|field| field as _)
11207 }
11208 pub fn set_type_name<T: Into<String>>(&mut self, field: T) {
11210 self.type_name = Some(field.into().into());
11211 }
11212 pub fn with_type_name<T: Into<String>>(mut self, field: T) -> Self {
11214 self.set_type_name(field.into());
11215 self
11216 }
11217 pub fn type_parameter_instantiation(&self) -> &[super::OpenSignatureBody] {
11219 &self.type_parameter_instantiation
11220 }
11221 pub fn type_parameter_instantiation_mut(
11224 &mut self,
11225 ) -> &mut Vec<super::OpenSignatureBody> {
11226 &mut self.type_parameter_instantiation
11227 }
11228 pub fn set_type_parameter_instantiation(
11230 &mut self,
11231 field: Vec<super::OpenSignatureBody>,
11232 ) {
11233 self.type_parameter_instantiation = field;
11234 }
11235 pub fn with_type_parameter_instantiation(
11237 mut self,
11238 field: Vec<super::OpenSignatureBody>,
11239 ) -> Self {
11240 self.set_type_parameter_instantiation(field);
11241 self
11242 }
11243 pub fn type_parameter_opt_mut(&mut self) -> Option<&mut u32> {
11245 self.type_parameter.as_mut().map(|field| field as _)
11246 }
11247 pub fn type_parameter_mut(&mut self) -> &mut u32 {
11250 self.type_parameter.get_or_insert_default()
11251 }
11252 pub fn type_parameter_opt(&self) -> Option<u32> {
11254 self.type_parameter.as_ref().map(|field| *field)
11255 }
11256 pub fn set_type_parameter(&mut self, field: u32) {
11258 self.type_parameter = Some(field);
11259 }
11260 pub fn with_type_parameter(mut self, field: u32) -> Self {
11262 self.set_type_parameter(field);
11263 self
11264 }
11265 }
11266 impl super::Owner {
11267 pub const fn const_default() -> Self {
11268 Self {
11269 kind: None,
11270 address: None,
11271 version: None,
11272 }
11273 }
11274 #[doc(hidden)]
11275 pub fn default_instance() -> &'static Self {
11276 static DEFAULT: super::Owner = super::Owner::const_default();
11277 &DEFAULT
11278 }
11279 pub fn with_kind<T: Into<super::owner::OwnerKind>>(mut self, field: T) -> Self {
11281 self.set_kind(field.into());
11282 self
11283 }
11284 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
11286 self.address.as_mut().map(|field| field as _)
11287 }
11288 pub fn address_mut(&mut self) -> &mut String {
11291 self.address.get_or_insert_default()
11292 }
11293 pub fn address_opt(&self) -> Option<&str> {
11295 self.address.as_ref().map(|field| field as _)
11296 }
11297 pub fn set_address<T: Into<String>>(&mut self, field: T) {
11299 self.address = Some(field.into().into());
11300 }
11301 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
11303 self.set_address(field.into());
11304 self
11305 }
11306 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
11308 self.version.as_mut().map(|field| field as _)
11309 }
11310 pub fn version_mut(&mut self) -> &mut u64 {
11313 self.version.get_or_insert_default()
11314 }
11315 pub fn version_opt(&self) -> Option<u64> {
11317 self.version.as_ref().map(|field| *field)
11318 }
11319 pub fn set_version(&mut self, field: u64) {
11321 self.version = Some(field);
11322 }
11323 pub fn with_version(mut self, field: u64) -> Self {
11325 self.set_version(field);
11326 self
11327 }
11328 }
11329 impl super::Package {
11330 pub const fn const_default() -> Self {
11331 Self {
11332 storage_id: None,
11333 original_id: None,
11334 version: None,
11335 modules: Vec::new(),
11336 type_origins: Vec::new(),
11337 linkage: Vec::new(),
11338 }
11339 }
11340 #[doc(hidden)]
11341 pub fn default_instance() -> &'static Self {
11342 static DEFAULT: super::Package = super::Package::const_default();
11343 &DEFAULT
11344 }
11345 pub fn storage_id_opt_mut(&mut self) -> Option<&mut String> {
11347 self.storage_id.as_mut().map(|field| field as _)
11348 }
11349 pub fn storage_id_mut(&mut self) -> &mut String {
11352 self.storage_id.get_or_insert_default()
11353 }
11354 pub fn storage_id_opt(&self) -> Option<&str> {
11356 self.storage_id.as_ref().map(|field| field as _)
11357 }
11358 pub fn set_storage_id<T: Into<String>>(&mut self, field: T) {
11360 self.storage_id = Some(field.into().into());
11361 }
11362 pub fn with_storage_id<T: Into<String>>(mut self, field: T) -> Self {
11364 self.set_storage_id(field.into());
11365 self
11366 }
11367 pub fn original_id_opt_mut(&mut self) -> Option<&mut String> {
11369 self.original_id.as_mut().map(|field| field as _)
11370 }
11371 pub fn original_id_mut(&mut self) -> &mut String {
11374 self.original_id.get_or_insert_default()
11375 }
11376 pub fn original_id_opt(&self) -> Option<&str> {
11378 self.original_id.as_ref().map(|field| field as _)
11379 }
11380 pub fn set_original_id<T: Into<String>>(&mut self, field: T) {
11382 self.original_id = Some(field.into().into());
11383 }
11384 pub fn with_original_id<T: Into<String>>(mut self, field: T) -> Self {
11386 self.set_original_id(field.into());
11387 self
11388 }
11389 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
11391 self.version.as_mut().map(|field| field as _)
11392 }
11393 pub fn version_mut(&mut self) -> &mut u64 {
11396 self.version.get_or_insert_default()
11397 }
11398 pub fn version_opt(&self) -> Option<u64> {
11400 self.version.as_ref().map(|field| *field)
11401 }
11402 pub fn set_version(&mut self, field: u64) {
11404 self.version = Some(field);
11405 }
11406 pub fn with_version(mut self, field: u64) -> Self {
11408 self.set_version(field);
11409 self
11410 }
11411 pub fn modules(&self) -> &[super::Module] {
11413 &self.modules
11414 }
11415 pub fn modules_mut(&mut self) -> &mut Vec<super::Module> {
11418 &mut self.modules
11419 }
11420 pub fn set_modules(&mut self, field: Vec<super::Module>) {
11422 self.modules = field;
11423 }
11424 pub fn with_modules(mut self, field: Vec<super::Module>) -> Self {
11426 self.set_modules(field);
11427 self
11428 }
11429 pub fn type_origins(&self) -> &[super::TypeOrigin] {
11431 &self.type_origins
11432 }
11433 pub fn type_origins_mut(&mut self) -> &mut Vec<super::TypeOrigin> {
11436 &mut self.type_origins
11437 }
11438 pub fn set_type_origins(&mut self, field: Vec<super::TypeOrigin>) {
11440 self.type_origins = field;
11441 }
11442 pub fn with_type_origins(mut self, field: Vec<super::TypeOrigin>) -> Self {
11444 self.set_type_origins(field);
11445 self
11446 }
11447 pub fn linkage(&self) -> &[super::Linkage] {
11449 &self.linkage
11450 }
11451 pub fn linkage_mut(&mut self) -> &mut Vec<super::Linkage> {
11454 &mut self.linkage
11455 }
11456 pub fn set_linkage(&mut self, field: Vec<super::Linkage>) {
11458 self.linkage = field;
11459 }
11460 pub fn with_linkage(mut self, field: Vec<super::Linkage>) -> Self {
11462 self.set_linkage(field);
11463 self
11464 }
11465 }
11466 impl super::PackageUpgradeError {
11467 pub const fn const_default() -> Self {
11468 Self {
11469 kind: None,
11470 package_id: None,
11471 digest: None,
11472 policy: None,
11473 ticket_id: None,
11474 }
11475 }
11476 #[doc(hidden)]
11477 pub fn default_instance() -> &'static Self {
11478 static DEFAULT: super::PackageUpgradeError = super::PackageUpgradeError::const_default();
11479 &DEFAULT
11480 }
11481 pub fn with_kind<T: Into<super::package_upgrade_error::PackageUpgradeErrorKind>>(
11483 mut self,
11484 field: T,
11485 ) -> Self {
11486 self.set_kind(field.into());
11487 self
11488 }
11489 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
11491 self.package_id.as_mut().map(|field| field as _)
11492 }
11493 pub fn package_id_mut(&mut self) -> &mut String {
11496 self.package_id.get_or_insert_default()
11497 }
11498 pub fn package_id_opt(&self) -> Option<&str> {
11500 self.package_id.as_ref().map(|field| field as _)
11501 }
11502 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
11504 self.package_id = Some(field.into().into());
11505 }
11506 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
11508 self.set_package_id(field.into());
11509 self
11510 }
11511 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
11513 self.digest.as_mut().map(|field| field as _)
11514 }
11515 pub fn digest_mut(&mut self) -> &mut String {
11518 self.digest.get_or_insert_default()
11519 }
11520 pub fn digest_opt(&self) -> Option<&str> {
11522 self.digest.as_ref().map(|field| field as _)
11523 }
11524 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
11526 self.digest = Some(field.into().into());
11527 }
11528 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
11530 self.set_digest(field.into());
11531 self
11532 }
11533 pub fn policy_opt_mut(&mut self) -> Option<&mut u32> {
11535 self.policy.as_mut().map(|field| field as _)
11536 }
11537 pub fn policy_mut(&mut self) -> &mut u32 {
11540 self.policy.get_or_insert_default()
11541 }
11542 pub fn policy_opt(&self) -> Option<u32> {
11544 self.policy.as_ref().map(|field| *field)
11545 }
11546 pub fn set_policy(&mut self, field: u32) {
11548 self.policy = Some(field);
11549 }
11550 pub fn with_policy(mut self, field: u32) -> Self {
11552 self.set_policy(field);
11553 self
11554 }
11555 pub fn ticket_id_opt_mut(&mut self) -> Option<&mut String> {
11557 self.ticket_id.as_mut().map(|field| field as _)
11558 }
11559 pub fn ticket_id_mut(&mut self) -> &mut String {
11562 self.ticket_id.get_or_insert_default()
11563 }
11564 pub fn ticket_id_opt(&self) -> Option<&str> {
11566 self.ticket_id.as_ref().map(|field| field as _)
11567 }
11568 pub fn set_ticket_id<T: Into<String>>(&mut self, field: T) {
11570 self.ticket_id = Some(field.into().into());
11571 }
11572 pub fn with_ticket_id<T: Into<String>>(mut self, field: T) -> Self {
11574 self.set_ticket_id(field.into());
11575 self
11576 }
11577 }
11578 impl super::PackageVersion {
11579 pub const fn const_default() -> Self {
11580 Self {
11581 package_id: None,
11582 version: None,
11583 }
11584 }
11585 #[doc(hidden)]
11586 pub fn default_instance() -> &'static Self {
11587 static DEFAULT: super::PackageVersion = super::PackageVersion::const_default();
11588 &DEFAULT
11589 }
11590 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
11592 self.package_id.as_mut().map(|field| field as _)
11593 }
11594 pub fn package_id_mut(&mut self) -> &mut String {
11597 self.package_id.get_or_insert_default()
11598 }
11599 pub fn package_id_opt(&self) -> Option<&str> {
11601 self.package_id.as_ref().map(|field| field as _)
11602 }
11603 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
11605 self.package_id = Some(field.into().into());
11606 }
11607 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
11609 self.set_package_id(field.into());
11610 self
11611 }
11612 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
11614 self.version.as_mut().map(|field| field as _)
11615 }
11616 pub fn version_mut(&mut self) -> &mut u64 {
11619 self.version.get_or_insert_default()
11620 }
11621 pub fn version_opt(&self) -> Option<u64> {
11623 self.version.as_ref().map(|field| *field)
11624 }
11625 pub fn set_version(&mut self, field: u64) {
11627 self.version = Some(field);
11628 }
11629 pub fn with_version(mut self, field: u64) -> Self {
11631 self.set_version(field);
11632 self
11633 }
11634 }
11635 impl super::PasskeyAuthenticator {
11636 pub const fn const_default() -> Self {
11637 Self {
11638 authenticator_data: None,
11639 client_data_json: None,
11640 signature: None,
11641 }
11642 }
11643 #[doc(hidden)]
11644 pub fn default_instance() -> &'static Self {
11645 static DEFAULT: super::PasskeyAuthenticator = super::PasskeyAuthenticator::const_default();
11646 &DEFAULT
11647 }
11648 pub fn authenticator_data_opt(&self) -> Option<&[u8]> {
11650 self.authenticator_data.as_ref().map(|field| field as _)
11651 }
11652 pub fn set_authenticator_data<T: Into<::prost::bytes::Bytes>>(
11654 &mut self,
11655 field: T,
11656 ) {
11657 self.authenticator_data = Some(field.into().into());
11658 }
11659 pub fn with_authenticator_data<T: Into<::prost::bytes::Bytes>>(
11661 mut self,
11662 field: T,
11663 ) -> Self {
11664 self.set_authenticator_data(field.into());
11665 self
11666 }
11667 pub fn client_data_json_opt_mut(&mut self) -> Option<&mut String> {
11669 self.client_data_json.as_mut().map(|field| field as _)
11670 }
11671 pub fn client_data_json_mut(&mut self) -> &mut String {
11674 self.client_data_json.get_or_insert_default()
11675 }
11676 pub fn client_data_json_opt(&self) -> Option<&str> {
11678 self.client_data_json.as_ref().map(|field| field as _)
11679 }
11680 pub fn set_client_data_json<T: Into<String>>(&mut self, field: T) {
11682 self.client_data_json = Some(field.into().into());
11683 }
11684 pub fn with_client_data_json<T: Into<String>>(mut self, field: T) -> Self {
11686 self.set_client_data_json(field.into());
11687 self
11688 }
11689 pub fn signature(&self) -> &super::SimpleSignature {
11691 self.signature
11692 .as_ref()
11693 .map(|field| field as _)
11694 .unwrap_or_else(|| super::SimpleSignature::default_instance() as _)
11695 }
11696 pub fn signature_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
11698 self.signature.as_mut().map(|field| field as _)
11699 }
11700 pub fn signature_mut(&mut self) -> &mut super::SimpleSignature {
11703 self.signature.get_or_insert_default()
11704 }
11705 pub fn signature_opt(&self) -> Option<&super::SimpleSignature> {
11707 self.signature.as_ref().map(|field| field as _)
11708 }
11709 pub fn set_signature<T: Into<super::SimpleSignature>>(&mut self, field: T) {
11711 self.signature = Some(field.into().into());
11712 }
11713 pub fn with_signature<T: Into<super::SimpleSignature>>(
11715 mut self,
11716 field: T,
11717 ) -> Self {
11718 self.set_signature(field.into());
11719 self
11720 }
11721 }
11722 impl super::ProgrammableTransaction {
11723 pub const fn const_default() -> Self {
11724 Self {
11725 inputs: Vec::new(),
11726 commands: Vec::new(),
11727 }
11728 }
11729 #[doc(hidden)]
11730 pub fn default_instance() -> &'static Self {
11731 static DEFAULT: super::ProgrammableTransaction = super::ProgrammableTransaction::const_default();
11732 &DEFAULT
11733 }
11734 pub fn inputs(&self) -> &[super::Input] {
11736 &self.inputs
11737 }
11738 pub fn inputs_mut(&mut self) -> &mut Vec<super::Input> {
11741 &mut self.inputs
11742 }
11743 pub fn set_inputs(&mut self, field: Vec<super::Input>) {
11745 self.inputs = field;
11746 }
11747 pub fn with_inputs(mut self, field: Vec<super::Input>) -> Self {
11749 self.set_inputs(field);
11750 self
11751 }
11752 pub fn commands(&self) -> &[super::Command] {
11754 &self.commands
11755 }
11756 pub fn commands_mut(&mut self) -> &mut Vec<super::Command> {
11759 &mut self.commands
11760 }
11761 pub fn set_commands(&mut self, field: Vec<super::Command>) {
11763 self.commands = field;
11764 }
11765 pub fn with_commands(mut self, field: Vec<super::Command>) -> Self {
11767 self.set_commands(field);
11768 self
11769 }
11770 }
11771 impl super::ProtocolConfig {
11772 pub const fn const_default() -> Self {
11773 Self {
11774 protocol_version: None,
11775 feature_flags: std::collections::BTreeMap::new(),
11776 attributes: std::collections::BTreeMap::new(),
11777 }
11778 }
11779 #[doc(hidden)]
11780 pub fn default_instance() -> &'static Self {
11781 static DEFAULT: super::ProtocolConfig = super::ProtocolConfig::const_default();
11782 &DEFAULT
11783 }
11784 pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
11786 self.protocol_version.as_mut().map(|field| field as _)
11787 }
11788 pub fn protocol_version_mut(&mut self) -> &mut u64 {
11791 self.protocol_version.get_or_insert_default()
11792 }
11793 pub fn protocol_version_opt(&self) -> Option<u64> {
11795 self.protocol_version.as_ref().map(|field| *field)
11796 }
11797 pub fn set_protocol_version(&mut self, field: u64) {
11799 self.protocol_version = Some(field);
11800 }
11801 pub fn with_protocol_version(mut self, field: u64) -> Self {
11803 self.set_protocol_version(field);
11804 self
11805 }
11806 pub fn feature_flags(&self) -> &::std::collections::BTreeMap<String, bool> {
11808 &self.feature_flags
11809 }
11810 pub fn feature_flags_mut(
11813 &mut self,
11814 ) -> &mut ::std::collections::BTreeMap<String, bool> {
11815 &mut self.feature_flags
11816 }
11817 pub fn set_feature_flags(
11819 &mut self,
11820 field: ::std::collections::BTreeMap<String, bool>,
11821 ) {
11822 self.feature_flags = field;
11823 }
11824 pub fn with_feature_flags(
11826 mut self,
11827 field: ::std::collections::BTreeMap<String, bool>,
11828 ) -> Self {
11829 self.set_feature_flags(field);
11830 self
11831 }
11832 pub fn attributes(&self) -> &::std::collections::BTreeMap<String, String> {
11834 &self.attributes
11835 }
11836 pub fn attributes_mut(
11839 &mut self,
11840 ) -> &mut ::std::collections::BTreeMap<String, String> {
11841 &mut self.attributes
11842 }
11843 pub fn set_attributes(
11845 &mut self,
11846 field: ::std::collections::BTreeMap<String, String>,
11847 ) {
11848 self.attributes = field;
11849 }
11850 pub fn with_attributes(
11852 mut self,
11853 field: ::std::collections::BTreeMap<String, String>,
11854 ) -> Self {
11855 self.set_attributes(field);
11856 self
11857 }
11858 }
11859 impl super::Publish {
11860 pub const fn const_default() -> Self {
11861 Self {
11862 modules: Vec::new(),
11863 dependencies: Vec::new(),
11864 }
11865 }
11866 #[doc(hidden)]
11867 pub fn default_instance() -> &'static Self {
11868 static DEFAULT: super::Publish = super::Publish::const_default();
11869 &DEFAULT
11870 }
11871 pub fn modules(&self) -> &[::prost::bytes::Bytes] {
11873 &self.modules
11874 }
11875 pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
11878 &mut self.modules
11879 }
11880 pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
11882 self.modules = field;
11883 }
11884 pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
11886 self.set_modules(field);
11887 self
11888 }
11889 pub fn dependencies(&self) -> &[String] {
11891 &self.dependencies
11892 }
11893 pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
11896 &mut self.dependencies
11897 }
11898 pub fn set_dependencies(&mut self, field: Vec<String>) {
11900 self.dependencies = field;
11901 }
11902 pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
11904 self.set_dependencies(field);
11905 self
11906 }
11907 }
11908 impl super::RandomnessStateUpdate {
11909 pub const fn const_default() -> Self {
11910 Self {
11911 epoch: None,
11912 randomness_round: None,
11913 random_bytes: None,
11914 randomness_object_initial_shared_version: None,
11915 }
11916 }
11917 #[doc(hidden)]
11918 pub fn default_instance() -> &'static Self {
11919 static DEFAULT: super::RandomnessStateUpdate = super::RandomnessStateUpdate::const_default();
11920 &DEFAULT
11921 }
11922 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
11924 self.epoch.as_mut().map(|field| field as _)
11925 }
11926 pub fn epoch_mut(&mut self) -> &mut u64 {
11929 self.epoch.get_or_insert_default()
11930 }
11931 pub fn epoch_opt(&self) -> Option<u64> {
11933 self.epoch.as_ref().map(|field| *field)
11934 }
11935 pub fn set_epoch(&mut self, field: u64) {
11937 self.epoch = Some(field);
11938 }
11939 pub fn with_epoch(mut self, field: u64) -> Self {
11941 self.set_epoch(field);
11942 self
11943 }
11944 pub fn randomness_round_opt_mut(&mut self) -> Option<&mut u64> {
11946 self.randomness_round.as_mut().map(|field| field as _)
11947 }
11948 pub fn randomness_round_mut(&mut self) -> &mut u64 {
11951 self.randomness_round.get_or_insert_default()
11952 }
11953 pub fn randomness_round_opt(&self) -> Option<u64> {
11955 self.randomness_round.as_ref().map(|field| *field)
11956 }
11957 pub fn set_randomness_round(&mut self, field: u64) {
11959 self.randomness_round = Some(field);
11960 }
11961 pub fn with_randomness_round(mut self, field: u64) -> Self {
11963 self.set_randomness_round(field);
11964 self
11965 }
11966 pub fn random_bytes_opt(&self) -> Option<&[u8]> {
11968 self.random_bytes.as_ref().map(|field| field as _)
11969 }
11970 pub fn set_random_bytes<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
11972 self.random_bytes = Some(field.into().into());
11973 }
11974 pub fn with_random_bytes<T: Into<::prost::bytes::Bytes>>(
11976 mut self,
11977 field: T,
11978 ) -> Self {
11979 self.set_random_bytes(field.into());
11980 self
11981 }
11982 pub fn randomness_object_initial_shared_version_opt_mut(
11984 &mut self,
11985 ) -> Option<&mut u64> {
11986 self.randomness_object_initial_shared_version
11987 .as_mut()
11988 .map(|field| field as _)
11989 }
11990 pub fn randomness_object_initial_shared_version_mut(&mut self) -> &mut u64 {
11993 self.randomness_object_initial_shared_version.get_or_insert_default()
11994 }
11995 pub fn randomness_object_initial_shared_version_opt(&self) -> Option<u64> {
11997 self.randomness_object_initial_shared_version.as_ref().map(|field| *field)
11998 }
11999 pub fn set_randomness_object_initial_shared_version(&mut self, field: u64) {
12001 self.randomness_object_initial_shared_version = Some(field);
12002 }
12003 pub fn with_randomness_object_initial_shared_version(
12005 mut self,
12006 field: u64,
12007 ) -> Self {
12008 self.set_randomness_object_initial_shared_version(field);
12009 self
12010 }
12011 }
12012 impl super::RegulatedCoinMetadata {
12013 pub const fn const_default() -> Self {
12014 Self {
12015 id: None,
12016 coin_metadata_object: None,
12017 deny_cap_object: None,
12018 allow_global_pause: None,
12019 variant: None,
12020 coin_regulated_state: None,
12021 }
12022 }
12023 #[doc(hidden)]
12024 pub fn default_instance() -> &'static Self {
12025 static DEFAULT: super::RegulatedCoinMetadata = super::RegulatedCoinMetadata::const_default();
12026 &DEFAULT
12027 }
12028 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
12030 self.id.as_mut().map(|field| field as _)
12031 }
12032 pub fn id_mut(&mut self) -> &mut String {
12035 self.id.get_or_insert_default()
12036 }
12037 pub fn id_opt(&self) -> Option<&str> {
12039 self.id.as_ref().map(|field| field as _)
12040 }
12041 pub fn set_id<T: Into<String>>(&mut self, field: T) {
12043 self.id = Some(field.into().into());
12044 }
12045 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
12047 self.set_id(field.into());
12048 self
12049 }
12050 pub fn coin_metadata_object_opt_mut(&mut self) -> Option<&mut String> {
12052 self.coin_metadata_object.as_mut().map(|field| field as _)
12053 }
12054 pub fn coin_metadata_object_mut(&mut self) -> &mut String {
12057 self.coin_metadata_object.get_or_insert_default()
12058 }
12059 pub fn coin_metadata_object_opt(&self) -> Option<&str> {
12061 self.coin_metadata_object.as_ref().map(|field| field as _)
12062 }
12063 pub fn set_coin_metadata_object<T: Into<String>>(&mut self, field: T) {
12065 self.coin_metadata_object = Some(field.into().into());
12066 }
12067 pub fn with_coin_metadata_object<T: Into<String>>(mut self, field: T) -> Self {
12069 self.set_coin_metadata_object(field.into());
12070 self
12071 }
12072 pub fn deny_cap_object_opt_mut(&mut self) -> Option<&mut String> {
12074 self.deny_cap_object.as_mut().map(|field| field as _)
12075 }
12076 pub fn deny_cap_object_mut(&mut self) -> &mut String {
12079 self.deny_cap_object.get_or_insert_default()
12080 }
12081 pub fn deny_cap_object_opt(&self) -> Option<&str> {
12083 self.deny_cap_object.as_ref().map(|field| field as _)
12084 }
12085 pub fn set_deny_cap_object<T: Into<String>>(&mut self, field: T) {
12087 self.deny_cap_object = Some(field.into().into());
12088 }
12089 pub fn with_deny_cap_object<T: Into<String>>(mut self, field: T) -> Self {
12091 self.set_deny_cap_object(field.into());
12092 self
12093 }
12094 pub fn allow_global_pause_opt_mut(&mut self) -> Option<&mut bool> {
12096 self.allow_global_pause.as_mut().map(|field| field as _)
12097 }
12098 pub fn allow_global_pause_mut(&mut self) -> &mut bool {
12101 self.allow_global_pause.get_or_insert_default()
12102 }
12103 pub fn allow_global_pause_opt(&self) -> Option<bool> {
12105 self.allow_global_pause.as_ref().map(|field| *field)
12106 }
12107 pub fn set_allow_global_pause(&mut self, field: bool) {
12109 self.allow_global_pause = Some(field);
12110 }
12111 pub fn with_allow_global_pause(mut self, field: bool) -> Self {
12113 self.set_allow_global_pause(field);
12114 self
12115 }
12116 pub fn variant_opt_mut(&mut self) -> Option<&mut u32> {
12118 self.variant.as_mut().map(|field| field as _)
12119 }
12120 pub fn variant_mut(&mut self) -> &mut u32 {
12123 self.variant.get_or_insert_default()
12124 }
12125 pub fn variant_opt(&self) -> Option<u32> {
12127 self.variant.as_ref().map(|field| *field)
12128 }
12129 pub fn set_variant(&mut self, field: u32) {
12131 self.variant = Some(field);
12132 }
12133 pub fn with_variant(mut self, field: u32) -> Self {
12135 self.set_variant(field);
12136 self
12137 }
12138 pub fn with_coin_regulated_state<
12140 T: Into<super::regulated_coin_metadata::CoinRegulatedState>,
12141 >(mut self, field: T) -> Self {
12142 self.set_coin_regulated_state(field.into());
12143 self
12144 }
12145 }
12146 impl super::ReverseLookupNameRequest {
12147 pub const fn const_default() -> Self {
12148 Self { address: None }
12149 }
12150 #[doc(hidden)]
12151 pub fn default_instance() -> &'static Self {
12152 static DEFAULT: super::ReverseLookupNameRequest = super::ReverseLookupNameRequest::const_default();
12153 &DEFAULT
12154 }
12155 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
12157 self.address.as_mut().map(|field| field as _)
12158 }
12159 pub fn address_mut(&mut self) -> &mut String {
12162 self.address.get_or_insert_default()
12163 }
12164 pub fn address_opt(&self) -> Option<&str> {
12166 self.address.as_ref().map(|field| field as _)
12167 }
12168 pub fn set_address<T: Into<String>>(&mut self, field: T) {
12170 self.address = Some(field.into().into());
12171 }
12172 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
12174 self.set_address(field.into());
12175 self
12176 }
12177 }
12178 impl super::ReverseLookupNameResponse {
12179 pub const fn const_default() -> Self {
12180 Self { record: None }
12181 }
12182 #[doc(hidden)]
12183 pub fn default_instance() -> &'static Self {
12184 static DEFAULT: super::ReverseLookupNameResponse = super::ReverseLookupNameResponse::const_default();
12185 &DEFAULT
12186 }
12187 pub fn record(&self) -> &super::NameRecord {
12189 self.record
12190 .as_ref()
12191 .map(|field| field as _)
12192 .unwrap_or_else(|| super::NameRecord::default_instance() as _)
12193 }
12194 pub fn record_opt_mut(&mut self) -> Option<&mut super::NameRecord> {
12196 self.record.as_mut().map(|field| field as _)
12197 }
12198 pub fn record_mut(&mut self) -> &mut super::NameRecord {
12201 self.record.get_or_insert_default()
12202 }
12203 pub fn record_opt(&self) -> Option<&super::NameRecord> {
12205 self.record.as_ref().map(|field| field as _)
12206 }
12207 pub fn set_record<T: Into<super::NameRecord>>(&mut self, field: T) {
12209 self.record = Some(field.into().into());
12210 }
12211 pub fn with_record<T: Into<super::NameRecord>>(mut self, field: T) -> Self {
12213 self.set_record(field.into());
12214 self
12215 }
12216 }
12217 impl super::SimpleSignature {
12218 pub const fn const_default() -> Self {
12219 Self {
12220 scheme: None,
12221 signature: None,
12222 public_key: None,
12223 }
12224 }
12225 #[doc(hidden)]
12226 pub fn default_instance() -> &'static Self {
12227 static DEFAULT: super::SimpleSignature = super::SimpleSignature::const_default();
12228 &DEFAULT
12229 }
12230 pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
12232 self.set_scheme(field.into());
12233 self
12234 }
12235 pub fn signature_opt(&self) -> Option<&[u8]> {
12237 self.signature.as_ref().map(|field| field as _)
12238 }
12239 pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
12241 self.signature = Some(field.into().into());
12242 }
12243 pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
12245 mut self,
12246 field: T,
12247 ) -> Self {
12248 self.set_signature(field.into());
12249 self
12250 }
12251 pub fn public_key_opt(&self) -> Option<&[u8]> {
12253 self.public_key.as_ref().map(|field| field as _)
12254 }
12255 pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
12257 self.public_key = Some(field.into().into());
12258 }
12259 pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
12261 mut self,
12262 field: T,
12263 ) -> Self {
12264 self.set_public_key(field.into());
12265 self
12266 }
12267 }
12268 impl super::SimulateTransactionRequest {
12269 pub const fn const_default() -> Self {
12270 Self {
12271 transaction: None,
12272 read_mask: None,
12273 checks: None,
12274 do_gas_selection: None,
12275 }
12276 }
12277 #[doc(hidden)]
12278 pub fn default_instance() -> &'static Self {
12279 static DEFAULT: super::SimulateTransactionRequest = super::SimulateTransactionRequest::const_default();
12280 &DEFAULT
12281 }
12282 pub fn transaction(&self) -> &super::Transaction {
12284 self.transaction
12285 .as_ref()
12286 .map(|field| field as _)
12287 .unwrap_or_else(|| super::Transaction::default_instance() as _)
12288 }
12289 pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
12291 self.transaction.as_mut().map(|field| field as _)
12292 }
12293 pub fn transaction_mut(&mut self) -> &mut super::Transaction {
12296 self.transaction.get_or_insert_default()
12297 }
12298 pub fn transaction_opt(&self) -> Option<&super::Transaction> {
12300 self.transaction.as_ref().map(|field| field as _)
12301 }
12302 pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
12304 self.transaction = Some(field.into().into());
12305 }
12306 pub fn with_transaction<T: Into<super::Transaction>>(
12308 mut self,
12309 field: T,
12310 ) -> Self {
12311 self.set_transaction(field.into());
12312 self
12313 }
12314 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
12316 self.read_mask.as_mut().map(|field| field as _)
12317 }
12318 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
12321 self.read_mask.get_or_insert_default()
12322 }
12323 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
12325 self.read_mask.as_ref().map(|field| field as _)
12326 }
12327 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
12329 self.read_mask = Some(field.into().into());
12330 }
12331 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
12333 mut self,
12334 field: T,
12335 ) -> Self {
12336 self.set_read_mask(field.into());
12337 self
12338 }
12339 pub fn with_checks<
12341 T: Into<super::simulate_transaction_request::TransactionChecks>,
12342 >(mut self, field: T) -> Self {
12343 self.set_checks(field.into());
12344 self
12345 }
12346 pub fn do_gas_selection_opt_mut(&mut self) -> Option<&mut bool> {
12348 self.do_gas_selection.as_mut().map(|field| field as _)
12349 }
12350 pub fn do_gas_selection_mut(&mut self) -> &mut bool {
12353 self.do_gas_selection.get_or_insert_default()
12354 }
12355 pub fn do_gas_selection_opt(&self) -> Option<bool> {
12357 self.do_gas_selection.as_ref().map(|field| *field)
12358 }
12359 pub fn set_do_gas_selection(&mut self, field: bool) {
12361 self.do_gas_selection = Some(field);
12362 }
12363 pub fn with_do_gas_selection(mut self, field: bool) -> Self {
12365 self.set_do_gas_selection(field);
12366 self
12367 }
12368 }
12369 impl super::SimulateTransactionResponse {
12370 pub const fn const_default() -> Self {
12371 Self {
12372 transaction: None,
12373 command_outputs: Vec::new(),
12374 }
12375 }
12376 #[doc(hidden)]
12377 pub fn default_instance() -> &'static Self {
12378 static DEFAULT: super::SimulateTransactionResponse = super::SimulateTransactionResponse::const_default();
12379 &DEFAULT
12380 }
12381 pub fn transaction(&self) -> &super::ExecutedTransaction {
12383 self.transaction
12384 .as_ref()
12385 .map(|field| field as _)
12386 .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
12387 }
12388 pub fn transaction_opt_mut(
12390 &mut self,
12391 ) -> Option<&mut super::ExecutedTransaction> {
12392 self.transaction.as_mut().map(|field| field as _)
12393 }
12394 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
12397 self.transaction.get_or_insert_default()
12398 }
12399 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
12401 self.transaction.as_ref().map(|field| field as _)
12402 }
12403 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
12405 &mut self,
12406 field: T,
12407 ) {
12408 self.transaction = Some(field.into().into());
12409 }
12410 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
12412 mut self,
12413 field: T,
12414 ) -> Self {
12415 self.set_transaction(field.into());
12416 self
12417 }
12418 pub fn command_outputs(&self) -> &[super::CommandResult] {
12420 &self.command_outputs
12421 }
12422 pub fn command_outputs_mut(&mut self) -> &mut Vec<super::CommandResult> {
12425 &mut self.command_outputs
12426 }
12427 pub fn set_command_outputs(&mut self, field: Vec<super::CommandResult>) {
12429 self.command_outputs = field;
12430 }
12431 pub fn with_command_outputs(mut self, field: Vec<super::CommandResult>) -> Self {
12433 self.set_command_outputs(field);
12434 self
12435 }
12436 }
12437 impl super::SizeError {
12438 pub const fn const_default() -> Self {
12439 Self { size: None, max_size: None }
12440 }
12441 #[doc(hidden)]
12442 pub fn default_instance() -> &'static Self {
12443 static DEFAULT: super::SizeError = super::SizeError::const_default();
12444 &DEFAULT
12445 }
12446 pub fn size_opt_mut(&mut self) -> Option<&mut u64> {
12448 self.size.as_mut().map(|field| field as _)
12449 }
12450 pub fn size_mut(&mut self) -> &mut u64 {
12453 self.size.get_or_insert_default()
12454 }
12455 pub fn size_opt(&self) -> Option<u64> {
12457 self.size.as_ref().map(|field| *field)
12458 }
12459 pub fn set_size(&mut self, field: u64) {
12461 self.size = Some(field);
12462 }
12463 pub fn with_size(mut self, field: u64) -> Self {
12465 self.set_size(field);
12466 self
12467 }
12468 pub fn max_size_opt_mut(&mut self) -> Option<&mut u64> {
12470 self.max_size.as_mut().map(|field| field as _)
12471 }
12472 pub fn max_size_mut(&mut self) -> &mut u64 {
12475 self.max_size.get_or_insert_default()
12476 }
12477 pub fn max_size_opt(&self) -> Option<u64> {
12479 self.max_size.as_ref().map(|field| *field)
12480 }
12481 pub fn set_max_size(&mut self, field: u64) {
12483 self.max_size = Some(field);
12484 }
12485 pub fn with_max_size(mut self, field: u64) -> Self {
12487 self.set_max_size(field);
12488 self
12489 }
12490 }
12491 impl super::SplitCoins {
12492 pub const fn const_default() -> Self {
12493 Self {
12494 coin: None,
12495 amounts: Vec::new(),
12496 }
12497 }
12498 #[doc(hidden)]
12499 pub fn default_instance() -> &'static Self {
12500 static DEFAULT: super::SplitCoins = super::SplitCoins::const_default();
12501 &DEFAULT
12502 }
12503 pub fn coin(&self) -> &super::Argument {
12505 self.coin
12506 .as_ref()
12507 .map(|field| field as _)
12508 .unwrap_or_else(|| super::Argument::default_instance() as _)
12509 }
12510 pub fn coin_opt_mut(&mut self) -> Option<&mut super::Argument> {
12512 self.coin.as_mut().map(|field| field as _)
12513 }
12514 pub fn coin_mut(&mut self) -> &mut super::Argument {
12517 self.coin.get_or_insert_default()
12518 }
12519 pub fn coin_opt(&self) -> Option<&super::Argument> {
12521 self.coin.as_ref().map(|field| field as _)
12522 }
12523 pub fn set_coin<T: Into<super::Argument>>(&mut self, field: T) {
12525 self.coin = Some(field.into().into());
12526 }
12527 pub fn with_coin<T: Into<super::Argument>>(mut self, field: T) -> Self {
12529 self.set_coin(field.into());
12530 self
12531 }
12532 pub fn amounts(&self) -> &[super::Argument] {
12534 &self.amounts
12535 }
12536 pub fn amounts_mut(&mut self) -> &mut Vec<super::Argument> {
12539 &mut self.amounts
12540 }
12541 pub fn set_amounts(&mut self, field: Vec<super::Argument>) {
12543 self.amounts = field;
12544 }
12545 pub fn with_amounts(mut self, field: Vec<super::Argument>) -> Self {
12547 self.set_amounts(field);
12548 self
12549 }
12550 }
12551 impl super::StakeSubsidy {
12552 pub const fn const_default() -> Self {
12553 Self {
12554 balance: None,
12555 distribution_counter: None,
12556 current_distribution_amount: None,
12557 stake_subsidy_period_length: None,
12558 stake_subsidy_decrease_rate: None,
12559 extra_fields: None,
12560 }
12561 }
12562 #[doc(hidden)]
12563 pub fn default_instance() -> &'static Self {
12564 static DEFAULT: super::StakeSubsidy = super::StakeSubsidy::const_default();
12565 &DEFAULT
12566 }
12567 pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
12569 self.balance.as_mut().map(|field| field as _)
12570 }
12571 pub fn balance_mut(&mut self) -> &mut u64 {
12574 self.balance.get_or_insert_default()
12575 }
12576 pub fn balance_opt(&self) -> Option<u64> {
12578 self.balance.as_ref().map(|field| *field)
12579 }
12580 pub fn set_balance(&mut self, field: u64) {
12582 self.balance = Some(field);
12583 }
12584 pub fn with_balance(mut self, field: u64) -> Self {
12586 self.set_balance(field);
12587 self
12588 }
12589 pub fn distribution_counter_opt_mut(&mut self) -> Option<&mut u64> {
12591 self.distribution_counter.as_mut().map(|field| field as _)
12592 }
12593 pub fn distribution_counter_mut(&mut self) -> &mut u64 {
12596 self.distribution_counter.get_or_insert_default()
12597 }
12598 pub fn distribution_counter_opt(&self) -> Option<u64> {
12600 self.distribution_counter.as_ref().map(|field| *field)
12601 }
12602 pub fn set_distribution_counter(&mut self, field: u64) {
12604 self.distribution_counter = Some(field);
12605 }
12606 pub fn with_distribution_counter(mut self, field: u64) -> Self {
12608 self.set_distribution_counter(field);
12609 self
12610 }
12611 pub fn current_distribution_amount_opt_mut(&mut self) -> Option<&mut u64> {
12613 self.current_distribution_amount.as_mut().map(|field| field as _)
12614 }
12615 pub fn current_distribution_amount_mut(&mut self) -> &mut u64 {
12618 self.current_distribution_amount.get_or_insert_default()
12619 }
12620 pub fn current_distribution_amount_opt(&self) -> Option<u64> {
12622 self.current_distribution_amount.as_ref().map(|field| *field)
12623 }
12624 pub fn set_current_distribution_amount(&mut self, field: u64) {
12626 self.current_distribution_amount = Some(field);
12627 }
12628 pub fn with_current_distribution_amount(mut self, field: u64) -> Self {
12630 self.set_current_distribution_amount(field);
12631 self
12632 }
12633 pub fn stake_subsidy_period_length_opt_mut(&mut self) -> Option<&mut u64> {
12635 self.stake_subsidy_period_length.as_mut().map(|field| field as _)
12636 }
12637 pub fn stake_subsidy_period_length_mut(&mut self) -> &mut u64 {
12640 self.stake_subsidy_period_length.get_or_insert_default()
12641 }
12642 pub fn stake_subsidy_period_length_opt(&self) -> Option<u64> {
12644 self.stake_subsidy_period_length.as_ref().map(|field| *field)
12645 }
12646 pub fn set_stake_subsidy_period_length(&mut self, field: u64) {
12648 self.stake_subsidy_period_length = Some(field);
12649 }
12650 pub fn with_stake_subsidy_period_length(mut self, field: u64) -> Self {
12652 self.set_stake_subsidy_period_length(field);
12653 self
12654 }
12655 pub fn stake_subsidy_decrease_rate_opt_mut(&mut self) -> Option<&mut u32> {
12657 self.stake_subsidy_decrease_rate.as_mut().map(|field| field as _)
12658 }
12659 pub fn stake_subsidy_decrease_rate_mut(&mut self) -> &mut u32 {
12662 self.stake_subsidy_decrease_rate.get_or_insert_default()
12663 }
12664 pub fn stake_subsidy_decrease_rate_opt(&self) -> Option<u32> {
12666 self.stake_subsidy_decrease_rate.as_ref().map(|field| *field)
12667 }
12668 pub fn set_stake_subsidy_decrease_rate(&mut self, field: u32) {
12670 self.stake_subsidy_decrease_rate = Some(field);
12671 }
12672 pub fn with_stake_subsidy_decrease_rate(mut self, field: u32) -> Self {
12674 self.set_stake_subsidy_decrease_rate(field);
12675 self
12676 }
12677 pub fn extra_fields(&self) -> &super::MoveTable {
12679 self.extra_fields
12680 .as_ref()
12681 .map(|field| field as _)
12682 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
12683 }
12684 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
12686 self.extra_fields.as_mut().map(|field| field as _)
12687 }
12688 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
12691 self.extra_fields.get_or_insert_default()
12692 }
12693 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
12695 self.extra_fields.as_ref().map(|field| field as _)
12696 }
12697 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
12699 self.extra_fields = Some(field.into().into());
12700 }
12701 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
12703 self.set_extra_fields(field.into());
12704 self
12705 }
12706 }
12707 impl super::StakingPool {
12708 pub const fn const_default() -> Self {
12709 Self {
12710 id: None,
12711 activation_epoch: None,
12712 deactivation_epoch: None,
12713 sui_balance: None,
12714 rewards_pool: None,
12715 pool_token_balance: None,
12716 exchange_rates: None,
12717 pending_stake: None,
12718 pending_total_sui_withdraw: None,
12719 pending_pool_token_withdraw: None,
12720 extra_fields: None,
12721 }
12722 }
12723 #[doc(hidden)]
12724 pub fn default_instance() -> &'static Self {
12725 static DEFAULT: super::StakingPool = super::StakingPool::const_default();
12726 &DEFAULT
12727 }
12728 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
12730 self.id.as_mut().map(|field| field as _)
12731 }
12732 pub fn id_mut(&mut self) -> &mut String {
12735 self.id.get_or_insert_default()
12736 }
12737 pub fn id_opt(&self) -> Option<&str> {
12739 self.id.as_ref().map(|field| field as _)
12740 }
12741 pub fn set_id<T: Into<String>>(&mut self, field: T) {
12743 self.id = Some(field.into().into());
12744 }
12745 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
12747 self.set_id(field.into());
12748 self
12749 }
12750 pub fn activation_epoch_opt_mut(&mut self) -> Option<&mut u64> {
12752 self.activation_epoch.as_mut().map(|field| field as _)
12753 }
12754 pub fn activation_epoch_mut(&mut self) -> &mut u64 {
12757 self.activation_epoch.get_or_insert_default()
12758 }
12759 pub fn activation_epoch_opt(&self) -> Option<u64> {
12761 self.activation_epoch.as_ref().map(|field| *field)
12762 }
12763 pub fn set_activation_epoch(&mut self, field: u64) {
12765 self.activation_epoch = Some(field);
12766 }
12767 pub fn with_activation_epoch(mut self, field: u64) -> Self {
12769 self.set_activation_epoch(field);
12770 self
12771 }
12772 pub fn deactivation_epoch_opt_mut(&mut self) -> Option<&mut u64> {
12774 self.deactivation_epoch.as_mut().map(|field| field as _)
12775 }
12776 pub fn deactivation_epoch_mut(&mut self) -> &mut u64 {
12779 self.deactivation_epoch.get_or_insert_default()
12780 }
12781 pub fn deactivation_epoch_opt(&self) -> Option<u64> {
12783 self.deactivation_epoch.as_ref().map(|field| *field)
12784 }
12785 pub fn set_deactivation_epoch(&mut self, field: u64) {
12787 self.deactivation_epoch = Some(field);
12788 }
12789 pub fn with_deactivation_epoch(mut self, field: u64) -> Self {
12791 self.set_deactivation_epoch(field);
12792 self
12793 }
12794 pub fn sui_balance_opt_mut(&mut self) -> Option<&mut u64> {
12796 self.sui_balance.as_mut().map(|field| field as _)
12797 }
12798 pub fn sui_balance_mut(&mut self) -> &mut u64 {
12801 self.sui_balance.get_or_insert_default()
12802 }
12803 pub fn sui_balance_opt(&self) -> Option<u64> {
12805 self.sui_balance.as_ref().map(|field| *field)
12806 }
12807 pub fn set_sui_balance(&mut self, field: u64) {
12809 self.sui_balance = Some(field);
12810 }
12811 pub fn with_sui_balance(mut self, field: u64) -> Self {
12813 self.set_sui_balance(field);
12814 self
12815 }
12816 pub fn rewards_pool_opt_mut(&mut self) -> Option<&mut u64> {
12818 self.rewards_pool.as_mut().map(|field| field as _)
12819 }
12820 pub fn rewards_pool_mut(&mut self) -> &mut u64 {
12823 self.rewards_pool.get_or_insert_default()
12824 }
12825 pub fn rewards_pool_opt(&self) -> Option<u64> {
12827 self.rewards_pool.as_ref().map(|field| *field)
12828 }
12829 pub fn set_rewards_pool(&mut self, field: u64) {
12831 self.rewards_pool = Some(field);
12832 }
12833 pub fn with_rewards_pool(mut self, field: u64) -> Self {
12835 self.set_rewards_pool(field);
12836 self
12837 }
12838 pub fn pool_token_balance_opt_mut(&mut self) -> Option<&mut u64> {
12840 self.pool_token_balance.as_mut().map(|field| field as _)
12841 }
12842 pub fn pool_token_balance_mut(&mut self) -> &mut u64 {
12845 self.pool_token_balance.get_or_insert_default()
12846 }
12847 pub fn pool_token_balance_opt(&self) -> Option<u64> {
12849 self.pool_token_balance.as_ref().map(|field| *field)
12850 }
12851 pub fn set_pool_token_balance(&mut self, field: u64) {
12853 self.pool_token_balance = Some(field);
12854 }
12855 pub fn with_pool_token_balance(mut self, field: u64) -> Self {
12857 self.set_pool_token_balance(field);
12858 self
12859 }
12860 pub fn exchange_rates(&self) -> &super::MoveTable {
12862 self.exchange_rates
12863 .as_ref()
12864 .map(|field| field as _)
12865 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
12866 }
12867 pub fn exchange_rates_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
12869 self.exchange_rates.as_mut().map(|field| field as _)
12870 }
12871 pub fn exchange_rates_mut(&mut self) -> &mut super::MoveTable {
12874 self.exchange_rates.get_or_insert_default()
12875 }
12876 pub fn exchange_rates_opt(&self) -> Option<&super::MoveTable> {
12878 self.exchange_rates.as_ref().map(|field| field as _)
12879 }
12880 pub fn set_exchange_rates<T: Into<super::MoveTable>>(&mut self, field: T) {
12882 self.exchange_rates = Some(field.into().into());
12883 }
12884 pub fn with_exchange_rates<T: Into<super::MoveTable>>(
12886 mut self,
12887 field: T,
12888 ) -> Self {
12889 self.set_exchange_rates(field.into());
12890 self
12891 }
12892 pub fn pending_stake_opt_mut(&mut self) -> Option<&mut u64> {
12894 self.pending_stake.as_mut().map(|field| field as _)
12895 }
12896 pub fn pending_stake_mut(&mut self) -> &mut u64 {
12899 self.pending_stake.get_or_insert_default()
12900 }
12901 pub fn pending_stake_opt(&self) -> Option<u64> {
12903 self.pending_stake.as_ref().map(|field| *field)
12904 }
12905 pub fn set_pending_stake(&mut self, field: u64) {
12907 self.pending_stake = Some(field);
12908 }
12909 pub fn with_pending_stake(mut self, field: u64) -> Self {
12911 self.set_pending_stake(field);
12912 self
12913 }
12914 pub fn pending_total_sui_withdraw_opt_mut(&mut self) -> Option<&mut u64> {
12916 self.pending_total_sui_withdraw.as_mut().map(|field| field as _)
12917 }
12918 pub fn pending_total_sui_withdraw_mut(&mut self) -> &mut u64 {
12921 self.pending_total_sui_withdraw.get_or_insert_default()
12922 }
12923 pub fn pending_total_sui_withdraw_opt(&self) -> Option<u64> {
12925 self.pending_total_sui_withdraw.as_ref().map(|field| *field)
12926 }
12927 pub fn set_pending_total_sui_withdraw(&mut self, field: u64) {
12929 self.pending_total_sui_withdraw = Some(field);
12930 }
12931 pub fn with_pending_total_sui_withdraw(mut self, field: u64) -> Self {
12933 self.set_pending_total_sui_withdraw(field);
12934 self
12935 }
12936 pub fn pending_pool_token_withdraw_opt_mut(&mut self) -> Option<&mut u64> {
12938 self.pending_pool_token_withdraw.as_mut().map(|field| field as _)
12939 }
12940 pub fn pending_pool_token_withdraw_mut(&mut self) -> &mut u64 {
12943 self.pending_pool_token_withdraw.get_or_insert_default()
12944 }
12945 pub fn pending_pool_token_withdraw_opt(&self) -> Option<u64> {
12947 self.pending_pool_token_withdraw.as_ref().map(|field| *field)
12948 }
12949 pub fn set_pending_pool_token_withdraw(&mut self, field: u64) {
12951 self.pending_pool_token_withdraw = Some(field);
12952 }
12953 pub fn with_pending_pool_token_withdraw(mut self, field: u64) -> Self {
12955 self.set_pending_pool_token_withdraw(field);
12956 self
12957 }
12958 pub fn extra_fields(&self) -> &super::MoveTable {
12960 self.extra_fields
12961 .as_ref()
12962 .map(|field| field as _)
12963 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
12964 }
12965 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
12967 self.extra_fields.as_mut().map(|field| field as _)
12968 }
12969 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
12972 self.extra_fields.get_or_insert_default()
12973 }
12974 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
12976 self.extra_fields.as_ref().map(|field| field as _)
12977 }
12978 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
12980 self.extra_fields = Some(field.into().into());
12981 }
12982 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
12984 self.set_extra_fields(field.into());
12985 self
12986 }
12987 }
12988 impl super::StorageFund {
12989 pub const fn const_default() -> Self {
12990 Self {
12991 total_object_storage_rebates: None,
12992 non_refundable_balance: None,
12993 }
12994 }
12995 #[doc(hidden)]
12996 pub fn default_instance() -> &'static Self {
12997 static DEFAULT: super::StorageFund = super::StorageFund::const_default();
12998 &DEFAULT
12999 }
13000 pub fn total_object_storage_rebates_opt_mut(&mut self) -> Option<&mut u64> {
13002 self.total_object_storage_rebates.as_mut().map(|field| field as _)
13003 }
13004 pub fn total_object_storage_rebates_mut(&mut self) -> &mut u64 {
13007 self.total_object_storage_rebates.get_or_insert_default()
13008 }
13009 pub fn total_object_storage_rebates_opt(&self) -> Option<u64> {
13011 self.total_object_storage_rebates.as_ref().map(|field| *field)
13012 }
13013 pub fn set_total_object_storage_rebates(&mut self, field: u64) {
13015 self.total_object_storage_rebates = Some(field);
13016 }
13017 pub fn with_total_object_storage_rebates(mut self, field: u64) -> Self {
13019 self.set_total_object_storage_rebates(field);
13020 self
13021 }
13022 pub fn non_refundable_balance_opt_mut(&mut self) -> Option<&mut u64> {
13024 self.non_refundable_balance.as_mut().map(|field| field as _)
13025 }
13026 pub fn non_refundable_balance_mut(&mut self) -> &mut u64 {
13029 self.non_refundable_balance.get_or_insert_default()
13030 }
13031 pub fn non_refundable_balance_opt(&self) -> Option<u64> {
13033 self.non_refundable_balance.as_ref().map(|field| *field)
13034 }
13035 pub fn set_non_refundable_balance(&mut self, field: u64) {
13037 self.non_refundable_balance = Some(field);
13038 }
13039 pub fn with_non_refundable_balance(mut self, field: u64) -> Self {
13041 self.set_non_refundable_balance(field);
13042 self
13043 }
13044 }
13045 impl super::SubscribeCheckpointsRequest {
13046 pub const fn const_default() -> Self {
13047 Self { read_mask: None }
13048 }
13049 #[doc(hidden)]
13050 pub fn default_instance() -> &'static Self {
13051 static DEFAULT: super::SubscribeCheckpointsRequest = super::SubscribeCheckpointsRequest::const_default();
13052 &DEFAULT
13053 }
13054 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
13056 self.read_mask.as_mut().map(|field| field as _)
13057 }
13058 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
13061 self.read_mask.get_or_insert_default()
13062 }
13063 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
13065 self.read_mask.as_ref().map(|field| field as _)
13066 }
13067 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
13069 self.read_mask = Some(field.into().into());
13070 }
13071 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
13073 mut self,
13074 field: T,
13075 ) -> Self {
13076 self.set_read_mask(field.into());
13077 self
13078 }
13079 }
13080 impl super::SubscribeCheckpointsResponse {
13081 pub const fn const_default() -> Self {
13082 Self {
13083 cursor: None,
13084 checkpoint: None,
13085 }
13086 }
13087 #[doc(hidden)]
13088 pub fn default_instance() -> &'static Self {
13089 static DEFAULT: super::SubscribeCheckpointsResponse = super::SubscribeCheckpointsResponse::const_default();
13090 &DEFAULT
13091 }
13092 pub fn cursor_opt_mut(&mut self) -> Option<&mut u64> {
13094 self.cursor.as_mut().map(|field| field as _)
13095 }
13096 pub fn cursor_mut(&mut self) -> &mut u64 {
13099 self.cursor.get_or_insert_default()
13100 }
13101 pub fn cursor_opt(&self) -> Option<u64> {
13103 self.cursor.as_ref().map(|field| *field)
13104 }
13105 pub fn set_cursor(&mut self, field: u64) {
13107 self.cursor = Some(field);
13108 }
13109 pub fn with_cursor(mut self, field: u64) -> Self {
13111 self.set_cursor(field);
13112 self
13113 }
13114 pub fn checkpoint(&self) -> &super::Checkpoint {
13116 self.checkpoint
13117 .as_ref()
13118 .map(|field| field as _)
13119 .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
13120 }
13121 pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
13123 self.checkpoint.as_mut().map(|field| field as _)
13124 }
13125 pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
13128 self.checkpoint.get_or_insert_default()
13129 }
13130 pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
13132 self.checkpoint.as_ref().map(|field| field as _)
13133 }
13134 pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
13136 self.checkpoint = Some(field.into().into());
13137 }
13138 pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
13140 self.set_checkpoint(field.into());
13141 self
13142 }
13143 }
13144 impl super::SystemPackage {
13145 pub const fn const_default() -> Self {
13146 Self {
13147 version: None,
13148 modules: Vec::new(),
13149 dependencies: Vec::new(),
13150 }
13151 }
13152 #[doc(hidden)]
13153 pub fn default_instance() -> &'static Self {
13154 static DEFAULT: super::SystemPackage = super::SystemPackage::const_default();
13155 &DEFAULT
13156 }
13157 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
13159 self.version.as_mut().map(|field| field as _)
13160 }
13161 pub fn version_mut(&mut self) -> &mut u64 {
13164 self.version.get_or_insert_default()
13165 }
13166 pub fn version_opt(&self) -> Option<u64> {
13168 self.version.as_ref().map(|field| *field)
13169 }
13170 pub fn set_version(&mut self, field: u64) {
13172 self.version = Some(field);
13173 }
13174 pub fn with_version(mut self, field: u64) -> Self {
13176 self.set_version(field);
13177 self
13178 }
13179 pub fn modules(&self) -> &[::prost::bytes::Bytes] {
13181 &self.modules
13182 }
13183 pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
13186 &mut self.modules
13187 }
13188 pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
13190 self.modules = field;
13191 }
13192 pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
13194 self.set_modules(field);
13195 self
13196 }
13197 pub fn dependencies(&self) -> &[String] {
13199 &self.dependencies
13200 }
13201 pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
13204 &mut self.dependencies
13205 }
13206 pub fn set_dependencies(&mut self, field: Vec<String>) {
13208 self.dependencies = field;
13209 }
13210 pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
13212 self.set_dependencies(field);
13213 self
13214 }
13215 }
13216 impl super::SystemParameters {
13217 pub const fn const_default() -> Self {
13218 Self {
13219 epoch_duration_ms: None,
13220 stake_subsidy_start_epoch: None,
13221 min_validator_count: None,
13222 max_validator_count: None,
13223 min_validator_joining_stake: None,
13224 validator_low_stake_threshold: None,
13225 validator_very_low_stake_threshold: None,
13226 validator_low_stake_grace_period: None,
13227 extra_fields: None,
13228 }
13229 }
13230 #[doc(hidden)]
13231 pub fn default_instance() -> &'static Self {
13232 static DEFAULT: super::SystemParameters = super::SystemParameters::const_default();
13233 &DEFAULT
13234 }
13235 pub fn epoch_duration_ms_opt_mut(&mut self) -> Option<&mut u64> {
13237 self.epoch_duration_ms.as_mut().map(|field| field as _)
13238 }
13239 pub fn epoch_duration_ms_mut(&mut self) -> &mut u64 {
13242 self.epoch_duration_ms.get_or_insert_default()
13243 }
13244 pub fn epoch_duration_ms_opt(&self) -> Option<u64> {
13246 self.epoch_duration_ms.as_ref().map(|field| *field)
13247 }
13248 pub fn set_epoch_duration_ms(&mut self, field: u64) {
13250 self.epoch_duration_ms = Some(field);
13251 }
13252 pub fn with_epoch_duration_ms(mut self, field: u64) -> Self {
13254 self.set_epoch_duration_ms(field);
13255 self
13256 }
13257 pub fn stake_subsidy_start_epoch_opt_mut(&mut self) -> Option<&mut u64> {
13259 self.stake_subsidy_start_epoch.as_mut().map(|field| field as _)
13260 }
13261 pub fn stake_subsidy_start_epoch_mut(&mut self) -> &mut u64 {
13264 self.stake_subsidy_start_epoch.get_or_insert_default()
13265 }
13266 pub fn stake_subsidy_start_epoch_opt(&self) -> Option<u64> {
13268 self.stake_subsidy_start_epoch.as_ref().map(|field| *field)
13269 }
13270 pub fn set_stake_subsidy_start_epoch(&mut self, field: u64) {
13272 self.stake_subsidy_start_epoch = Some(field);
13273 }
13274 pub fn with_stake_subsidy_start_epoch(mut self, field: u64) -> Self {
13276 self.set_stake_subsidy_start_epoch(field);
13277 self
13278 }
13279 pub fn min_validator_count_opt_mut(&mut self) -> Option<&mut u64> {
13281 self.min_validator_count.as_mut().map(|field| field as _)
13282 }
13283 pub fn min_validator_count_mut(&mut self) -> &mut u64 {
13286 self.min_validator_count.get_or_insert_default()
13287 }
13288 pub fn min_validator_count_opt(&self) -> Option<u64> {
13290 self.min_validator_count.as_ref().map(|field| *field)
13291 }
13292 pub fn set_min_validator_count(&mut self, field: u64) {
13294 self.min_validator_count = Some(field);
13295 }
13296 pub fn with_min_validator_count(mut self, field: u64) -> Self {
13298 self.set_min_validator_count(field);
13299 self
13300 }
13301 pub fn max_validator_count_opt_mut(&mut self) -> Option<&mut u64> {
13303 self.max_validator_count.as_mut().map(|field| field as _)
13304 }
13305 pub fn max_validator_count_mut(&mut self) -> &mut u64 {
13308 self.max_validator_count.get_or_insert_default()
13309 }
13310 pub fn max_validator_count_opt(&self) -> Option<u64> {
13312 self.max_validator_count.as_ref().map(|field| *field)
13313 }
13314 pub fn set_max_validator_count(&mut self, field: u64) {
13316 self.max_validator_count = Some(field);
13317 }
13318 pub fn with_max_validator_count(mut self, field: u64) -> Self {
13320 self.set_max_validator_count(field);
13321 self
13322 }
13323 pub fn min_validator_joining_stake_opt_mut(&mut self) -> Option<&mut u64> {
13325 self.min_validator_joining_stake.as_mut().map(|field| field as _)
13326 }
13327 pub fn min_validator_joining_stake_mut(&mut self) -> &mut u64 {
13330 self.min_validator_joining_stake.get_or_insert_default()
13331 }
13332 pub fn min_validator_joining_stake_opt(&self) -> Option<u64> {
13334 self.min_validator_joining_stake.as_ref().map(|field| *field)
13335 }
13336 pub fn set_min_validator_joining_stake(&mut self, field: u64) {
13338 self.min_validator_joining_stake = Some(field);
13339 }
13340 pub fn with_min_validator_joining_stake(mut self, field: u64) -> Self {
13342 self.set_min_validator_joining_stake(field);
13343 self
13344 }
13345 pub fn validator_low_stake_threshold_opt_mut(&mut self) -> Option<&mut u64> {
13347 self.validator_low_stake_threshold.as_mut().map(|field| field as _)
13348 }
13349 pub fn validator_low_stake_threshold_mut(&mut self) -> &mut u64 {
13352 self.validator_low_stake_threshold.get_or_insert_default()
13353 }
13354 pub fn validator_low_stake_threshold_opt(&self) -> Option<u64> {
13356 self.validator_low_stake_threshold.as_ref().map(|field| *field)
13357 }
13358 pub fn set_validator_low_stake_threshold(&mut self, field: u64) {
13360 self.validator_low_stake_threshold = Some(field);
13361 }
13362 pub fn with_validator_low_stake_threshold(mut self, field: u64) -> Self {
13364 self.set_validator_low_stake_threshold(field);
13365 self
13366 }
13367 pub fn validator_very_low_stake_threshold_opt_mut(
13369 &mut self,
13370 ) -> Option<&mut u64> {
13371 self.validator_very_low_stake_threshold.as_mut().map(|field| field as _)
13372 }
13373 pub fn validator_very_low_stake_threshold_mut(&mut self) -> &mut u64 {
13376 self.validator_very_low_stake_threshold.get_or_insert_default()
13377 }
13378 pub fn validator_very_low_stake_threshold_opt(&self) -> Option<u64> {
13380 self.validator_very_low_stake_threshold.as_ref().map(|field| *field)
13381 }
13382 pub fn set_validator_very_low_stake_threshold(&mut self, field: u64) {
13384 self.validator_very_low_stake_threshold = Some(field);
13385 }
13386 pub fn with_validator_very_low_stake_threshold(mut self, field: u64) -> Self {
13388 self.set_validator_very_low_stake_threshold(field);
13389 self
13390 }
13391 pub fn validator_low_stake_grace_period_opt_mut(&mut self) -> Option<&mut u64> {
13393 self.validator_low_stake_grace_period.as_mut().map(|field| field as _)
13394 }
13395 pub fn validator_low_stake_grace_period_mut(&mut self) -> &mut u64 {
13398 self.validator_low_stake_grace_period.get_or_insert_default()
13399 }
13400 pub fn validator_low_stake_grace_period_opt(&self) -> Option<u64> {
13402 self.validator_low_stake_grace_period.as_ref().map(|field| *field)
13403 }
13404 pub fn set_validator_low_stake_grace_period(&mut self, field: u64) {
13406 self.validator_low_stake_grace_period = Some(field);
13407 }
13408 pub fn with_validator_low_stake_grace_period(mut self, field: u64) -> Self {
13410 self.set_validator_low_stake_grace_period(field);
13411 self
13412 }
13413 pub fn extra_fields(&self) -> &super::MoveTable {
13415 self.extra_fields
13416 .as_ref()
13417 .map(|field| field as _)
13418 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
13419 }
13420 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
13422 self.extra_fields.as_mut().map(|field| field as _)
13423 }
13424 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
13427 self.extra_fields.get_or_insert_default()
13428 }
13429 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
13431 self.extra_fields.as_ref().map(|field| field as _)
13432 }
13433 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
13435 self.extra_fields = Some(field.into().into());
13436 }
13437 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
13439 self.set_extra_fields(field.into());
13440 self
13441 }
13442 }
13443 impl super::SystemState {
13444 pub const fn const_default() -> Self {
13445 Self {
13446 version: None,
13447 epoch: None,
13448 protocol_version: None,
13449 validators: None,
13450 storage_fund: None,
13451 parameters: None,
13452 reference_gas_price: None,
13453 validator_report_records: Vec::new(),
13454 stake_subsidy: None,
13455 safe_mode: None,
13456 safe_mode_storage_rewards: None,
13457 safe_mode_computation_rewards: None,
13458 safe_mode_storage_rebates: None,
13459 safe_mode_non_refundable_storage_fee: None,
13460 epoch_start_timestamp_ms: None,
13461 extra_fields: None,
13462 }
13463 }
13464 #[doc(hidden)]
13465 pub fn default_instance() -> &'static Self {
13466 static DEFAULT: super::SystemState = super::SystemState::const_default();
13467 &DEFAULT
13468 }
13469 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
13471 self.version.as_mut().map(|field| field as _)
13472 }
13473 pub fn version_mut(&mut self) -> &mut u64 {
13476 self.version.get_or_insert_default()
13477 }
13478 pub fn version_opt(&self) -> Option<u64> {
13480 self.version.as_ref().map(|field| *field)
13481 }
13482 pub fn set_version(&mut self, field: u64) {
13484 self.version = Some(field);
13485 }
13486 pub fn with_version(mut self, field: u64) -> Self {
13488 self.set_version(field);
13489 self
13490 }
13491 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
13493 self.epoch.as_mut().map(|field| field as _)
13494 }
13495 pub fn epoch_mut(&mut self) -> &mut u64 {
13498 self.epoch.get_or_insert_default()
13499 }
13500 pub fn epoch_opt(&self) -> Option<u64> {
13502 self.epoch.as_ref().map(|field| *field)
13503 }
13504 pub fn set_epoch(&mut self, field: u64) {
13506 self.epoch = Some(field);
13507 }
13508 pub fn with_epoch(mut self, field: u64) -> Self {
13510 self.set_epoch(field);
13511 self
13512 }
13513 pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
13515 self.protocol_version.as_mut().map(|field| field as _)
13516 }
13517 pub fn protocol_version_mut(&mut self) -> &mut u64 {
13520 self.protocol_version.get_or_insert_default()
13521 }
13522 pub fn protocol_version_opt(&self) -> Option<u64> {
13524 self.protocol_version.as_ref().map(|field| *field)
13525 }
13526 pub fn set_protocol_version(&mut self, field: u64) {
13528 self.protocol_version = Some(field);
13529 }
13530 pub fn with_protocol_version(mut self, field: u64) -> Self {
13532 self.set_protocol_version(field);
13533 self
13534 }
13535 pub fn validators(&self) -> &super::ValidatorSet {
13537 self.validators
13538 .as_ref()
13539 .map(|field| field as _)
13540 .unwrap_or_else(|| super::ValidatorSet::default_instance() as _)
13541 }
13542 pub fn validators_opt_mut(&mut self) -> Option<&mut super::ValidatorSet> {
13544 self.validators.as_mut().map(|field| field as _)
13545 }
13546 pub fn validators_mut(&mut self) -> &mut super::ValidatorSet {
13549 self.validators.get_or_insert_default()
13550 }
13551 pub fn validators_opt(&self) -> Option<&super::ValidatorSet> {
13553 self.validators.as_ref().map(|field| field as _)
13554 }
13555 pub fn set_validators<T: Into<super::ValidatorSet>>(&mut self, field: T) {
13557 self.validators = Some(field.into().into());
13558 }
13559 pub fn with_validators<T: Into<super::ValidatorSet>>(
13561 mut self,
13562 field: T,
13563 ) -> Self {
13564 self.set_validators(field.into());
13565 self
13566 }
13567 pub fn storage_fund(&self) -> &super::StorageFund {
13569 self.storage_fund
13570 .as_ref()
13571 .map(|field| field as _)
13572 .unwrap_or_else(|| super::StorageFund::default_instance() as _)
13573 }
13574 pub fn storage_fund_opt_mut(&mut self) -> Option<&mut super::StorageFund> {
13576 self.storage_fund.as_mut().map(|field| field as _)
13577 }
13578 pub fn storage_fund_mut(&mut self) -> &mut super::StorageFund {
13581 self.storage_fund.get_or_insert_default()
13582 }
13583 pub fn storage_fund_opt(&self) -> Option<&super::StorageFund> {
13585 self.storage_fund.as_ref().map(|field| field as _)
13586 }
13587 pub fn set_storage_fund<T: Into<super::StorageFund>>(&mut self, field: T) {
13589 self.storage_fund = Some(field.into().into());
13590 }
13591 pub fn with_storage_fund<T: Into<super::StorageFund>>(
13593 mut self,
13594 field: T,
13595 ) -> Self {
13596 self.set_storage_fund(field.into());
13597 self
13598 }
13599 pub fn parameters(&self) -> &super::SystemParameters {
13601 self.parameters
13602 .as_ref()
13603 .map(|field| field as _)
13604 .unwrap_or_else(|| super::SystemParameters::default_instance() as _)
13605 }
13606 pub fn parameters_opt_mut(&mut self) -> Option<&mut super::SystemParameters> {
13608 self.parameters.as_mut().map(|field| field as _)
13609 }
13610 pub fn parameters_mut(&mut self) -> &mut super::SystemParameters {
13613 self.parameters.get_or_insert_default()
13614 }
13615 pub fn parameters_opt(&self) -> Option<&super::SystemParameters> {
13617 self.parameters.as_ref().map(|field| field as _)
13618 }
13619 pub fn set_parameters<T: Into<super::SystemParameters>>(&mut self, field: T) {
13621 self.parameters = Some(field.into().into());
13622 }
13623 pub fn with_parameters<T: Into<super::SystemParameters>>(
13625 mut self,
13626 field: T,
13627 ) -> Self {
13628 self.set_parameters(field.into());
13629 self
13630 }
13631 pub fn reference_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
13633 self.reference_gas_price.as_mut().map(|field| field as _)
13634 }
13635 pub fn reference_gas_price_mut(&mut self) -> &mut u64 {
13638 self.reference_gas_price.get_or_insert_default()
13639 }
13640 pub fn reference_gas_price_opt(&self) -> Option<u64> {
13642 self.reference_gas_price.as_ref().map(|field| *field)
13643 }
13644 pub fn set_reference_gas_price(&mut self, field: u64) {
13646 self.reference_gas_price = Some(field);
13647 }
13648 pub fn with_reference_gas_price(mut self, field: u64) -> Self {
13650 self.set_reference_gas_price(field);
13651 self
13652 }
13653 pub fn validator_report_records(&self) -> &[super::ValidatorReportRecord] {
13655 &self.validator_report_records
13656 }
13657 pub fn validator_report_records_mut(
13660 &mut self,
13661 ) -> &mut Vec<super::ValidatorReportRecord> {
13662 &mut self.validator_report_records
13663 }
13664 pub fn set_validator_report_records(
13666 &mut self,
13667 field: Vec<super::ValidatorReportRecord>,
13668 ) {
13669 self.validator_report_records = field;
13670 }
13671 pub fn with_validator_report_records(
13673 mut self,
13674 field: Vec<super::ValidatorReportRecord>,
13675 ) -> Self {
13676 self.set_validator_report_records(field);
13677 self
13678 }
13679 pub fn stake_subsidy(&self) -> &super::StakeSubsidy {
13681 self.stake_subsidy
13682 .as_ref()
13683 .map(|field| field as _)
13684 .unwrap_or_else(|| super::StakeSubsidy::default_instance() as _)
13685 }
13686 pub fn stake_subsidy_opt_mut(&mut self) -> Option<&mut super::StakeSubsidy> {
13688 self.stake_subsidy.as_mut().map(|field| field as _)
13689 }
13690 pub fn stake_subsidy_mut(&mut self) -> &mut super::StakeSubsidy {
13693 self.stake_subsidy.get_or_insert_default()
13694 }
13695 pub fn stake_subsidy_opt(&self) -> Option<&super::StakeSubsidy> {
13697 self.stake_subsidy.as_ref().map(|field| field as _)
13698 }
13699 pub fn set_stake_subsidy<T: Into<super::StakeSubsidy>>(&mut self, field: T) {
13701 self.stake_subsidy = Some(field.into().into());
13702 }
13703 pub fn with_stake_subsidy<T: Into<super::StakeSubsidy>>(
13705 mut self,
13706 field: T,
13707 ) -> Self {
13708 self.set_stake_subsidy(field.into());
13709 self
13710 }
13711 pub fn safe_mode_opt_mut(&mut self) -> Option<&mut bool> {
13713 self.safe_mode.as_mut().map(|field| field as _)
13714 }
13715 pub fn safe_mode_mut(&mut self) -> &mut bool {
13718 self.safe_mode.get_or_insert_default()
13719 }
13720 pub fn safe_mode_opt(&self) -> Option<bool> {
13722 self.safe_mode.as_ref().map(|field| *field)
13723 }
13724 pub fn set_safe_mode(&mut self, field: bool) {
13726 self.safe_mode = Some(field);
13727 }
13728 pub fn with_safe_mode(mut self, field: bool) -> Self {
13730 self.set_safe_mode(field);
13731 self
13732 }
13733 pub fn safe_mode_storage_rewards_opt_mut(&mut self) -> Option<&mut u64> {
13735 self.safe_mode_storage_rewards.as_mut().map(|field| field as _)
13736 }
13737 pub fn safe_mode_storage_rewards_mut(&mut self) -> &mut u64 {
13740 self.safe_mode_storage_rewards.get_or_insert_default()
13741 }
13742 pub fn safe_mode_storage_rewards_opt(&self) -> Option<u64> {
13744 self.safe_mode_storage_rewards.as_ref().map(|field| *field)
13745 }
13746 pub fn set_safe_mode_storage_rewards(&mut self, field: u64) {
13748 self.safe_mode_storage_rewards = Some(field);
13749 }
13750 pub fn with_safe_mode_storage_rewards(mut self, field: u64) -> Self {
13752 self.set_safe_mode_storage_rewards(field);
13753 self
13754 }
13755 pub fn safe_mode_computation_rewards_opt_mut(&mut self) -> Option<&mut u64> {
13757 self.safe_mode_computation_rewards.as_mut().map(|field| field as _)
13758 }
13759 pub fn safe_mode_computation_rewards_mut(&mut self) -> &mut u64 {
13762 self.safe_mode_computation_rewards.get_or_insert_default()
13763 }
13764 pub fn safe_mode_computation_rewards_opt(&self) -> Option<u64> {
13766 self.safe_mode_computation_rewards.as_ref().map(|field| *field)
13767 }
13768 pub fn set_safe_mode_computation_rewards(&mut self, field: u64) {
13770 self.safe_mode_computation_rewards = Some(field);
13771 }
13772 pub fn with_safe_mode_computation_rewards(mut self, field: u64) -> Self {
13774 self.set_safe_mode_computation_rewards(field);
13775 self
13776 }
13777 pub fn safe_mode_storage_rebates_opt_mut(&mut self) -> Option<&mut u64> {
13779 self.safe_mode_storage_rebates.as_mut().map(|field| field as _)
13780 }
13781 pub fn safe_mode_storage_rebates_mut(&mut self) -> &mut u64 {
13784 self.safe_mode_storage_rebates.get_or_insert_default()
13785 }
13786 pub fn safe_mode_storage_rebates_opt(&self) -> Option<u64> {
13788 self.safe_mode_storage_rebates.as_ref().map(|field| *field)
13789 }
13790 pub fn set_safe_mode_storage_rebates(&mut self, field: u64) {
13792 self.safe_mode_storage_rebates = Some(field);
13793 }
13794 pub fn with_safe_mode_storage_rebates(mut self, field: u64) -> Self {
13796 self.set_safe_mode_storage_rebates(field);
13797 self
13798 }
13799 pub fn safe_mode_non_refundable_storage_fee_opt_mut(
13801 &mut self,
13802 ) -> Option<&mut u64> {
13803 self.safe_mode_non_refundable_storage_fee.as_mut().map(|field| field as _)
13804 }
13805 pub fn safe_mode_non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
13808 self.safe_mode_non_refundable_storage_fee.get_or_insert_default()
13809 }
13810 pub fn safe_mode_non_refundable_storage_fee_opt(&self) -> Option<u64> {
13812 self.safe_mode_non_refundable_storage_fee.as_ref().map(|field| *field)
13813 }
13814 pub fn set_safe_mode_non_refundable_storage_fee(&mut self, field: u64) {
13816 self.safe_mode_non_refundable_storage_fee = Some(field);
13817 }
13818 pub fn with_safe_mode_non_refundable_storage_fee(mut self, field: u64) -> Self {
13820 self.set_safe_mode_non_refundable_storage_fee(field);
13821 self
13822 }
13823 pub fn epoch_start_timestamp_ms_opt_mut(&mut self) -> Option<&mut u64> {
13825 self.epoch_start_timestamp_ms.as_mut().map(|field| field as _)
13826 }
13827 pub fn epoch_start_timestamp_ms_mut(&mut self) -> &mut u64 {
13830 self.epoch_start_timestamp_ms.get_or_insert_default()
13831 }
13832 pub fn epoch_start_timestamp_ms_opt(&self) -> Option<u64> {
13834 self.epoch_start_timestamp_ms.as_ref().map(|field| *field)
13835 }
13836 pub fn set_epoch_start_timestamp_ms(&mut self, field: u64) {
13838 self.epoch_start_timestamp_ms = Some(field);
13839 }
13840 pub fn with_epoch_start_timestamp_ms(mut self, field: u64) -> Self {
13842 self.set_epoch_start_timestamp_ms(field);
13843 self
13844 }
13845 pub fn extra_fields(&self) -> &super::MoveTable {
13847 self.extra_fields
13848 .as_ref()
13849 .map(|field| field as _)
13850 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
13851 }
13852 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
13854 self.extra_fields.as_mut().map(|field| field as _)
13855 }
13856 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
13859 self.extra_fields.get_or_insert_default()
13860 }
13861 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
13863 self.extra_fields.as_ref().map(|field| field as _)
13864 }
13865 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
13867 self.extra_fields = Some(field.into().into());
13868 }
13869 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
13871 self.set_extra_fields(field.into());
13872 self
13873 }
13874 }
13875 impl super::Transaction {
13876 pub const fn const_default() -> Self {
13877 Self {
13878 bcs: None,
13879 digest: None,
13880 version: None,
13881 kind: None,
13882 sender: None,
13883 gas_payment: None,
13884 expiration: None,
13885 }
13886 }
13887 #[doc(hidden)]
13888 pub fn default_instance() -> &'static Self {
13889 static DEFAULT: super::Transaction = super::Transaction::const_default();
13890 &DEFAULT
13891 }
13892 pub fn bcs(&self) -> &super::Bcs {
13894 self.bcs
13895 .as_ref()
13896 .map(|field| field as _)
13897 .unwrap_or_else(|| super::Bcs::default_instance() as _)
13898 }
13899 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
13901 self.bcs.as_mut().map(|field| field as _)
13902 }
13903 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
13906 self.bcs.get_or_insert_default()
13907 }
13908 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
13910 self.bcs.as_ref().map(|field| field as _)
13911 }
13912 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
13914 self.bcs = Some(field.into().into());
13915 }
13916 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
13918 self.set_bcs(field.into());
13919 self
13920 }
13921 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
13923 self.digest.as_mut().map(|field| field as _)
13924 }
13925 pub fn digest_mut(&mut self) -> &mut String {
13928 self.digest.get_or_insert_default()
13929 }
13930 pub fn digest_opt(&self) -> Option<&str> {
13932 self.digest.as_ref().map(|field| field as _)
13933 }
13934 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
13936 self.digest = Some(field.into().into());
13937 }
13938 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
13940 self.set_digest(field.into());
13941 self
13942 }
13943 pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
13945 self.version.as_mut().map(|field| field as _)
13946 }
13947 pub fn version_mut(&mut self) -> &mut i32 {
13950 self.version.get_or_insert_default()
13951 }
13952 pub fn version_opt(&self) -> Option<i32> {
13954 self.version.as_ref().map(|field| *field)
13955 }
13956 pub fn set_version(&mut self, field: i32) {
13958 self.version = Some(field);
13959 }
13960 pub fn with_version(mut self, field: i32) -> Self {
13962 self.set_version(field);
13963 self
13964 }
13965 pub fn kind(&self) -> &super::TransactionKind {
13967 self.kind
13968 .as_ref()
13969 .map(|field| field as _)
13970 .unwrap_or_else(|| super::TransactionKind::default_instance() as _)
13971 }
13972 pub fn kind_opt_mut(&mut self) -> Option<&mut super::TransactionKind> {
13974 self.kind.as_mut().map(|field| field as _)
13975 }
13976 pub fn kind_mut(&mut self) -> &mut super::TransactionKind {
13979 self.kind.get_or_insert_default()
13980 }
13981 pub fn kind_opt(&self) -> Option<&super::TransactionKind> {
13983 self.kind.as_ref().map(|field| field as _)
13984 }
13985 pub fn set_kind<T: Into<super::TransactionKind>>(&mut self, field: T) {
13987 self.kind = Some(field.into().into());
13988 }
13989 pub fn with_kind<T: Into<super::TransactionKind>>(mut self, field: T) -> Self {
13991 self.set_kind(field.into());
13992 self
13993 }
13994 pub fn sender_opt_mut(&mut self) -> Option<&mut String> {
13996 self.sender.as_mut().map(|field| field as _)
13997 }
13998 pub fn sender_mut(&mut self) -> &mut String {
14001 self.sender.get_or_insert_default()
14002 }
14003 pub fn sender_opt(&self) -> Option<&str> {
14005 self.sender.as_ref().map(|field| field as _)
14006 }
14007 pub fn set_sender<T: Into<String>>(&mut self, field: T) {
14009 self.sender = Some(field.into().into());
14010 }
14011 pub fn with_sender<T: Into<String>>(mut self, field: T) -> Self {
14013 self.set_sender(field.into());
14014 self
14015 }
14016 pub fn gas_payment(&self) -> &super::GasPayment {
14018 self.gas_payment
14019 .as_ref()
14020 .map(|field| field as _)
14021 .unwrap_or_else(|| super::GasPayment::default_instance() as _)
14022 }
14023 pub fn gas_payment_opt_mut(&mut self) -> Option<&mut super::GasPayment> {
14025 self.gas_payment.as_mut().map(|field| field as _)
14026 }
14027 pub fn gas_payment_mut(&mut self) -> &mut super::GasPayment {
14030 self.gas_payment.get_or_insert_default()
14031 }
14032 pub fn gas_payment_opt(&self) -> Option<&super::GasPayment> {
14034 self.gas_payment.as_ref().map(|field| field as _)
14035 }
14036 pub fn set_gas_payment<T: Into<super::GasPayment>>(&mut self, field: T) {
14038 self.gas_payment = Some(field.into().into());
14039 }
14040 pub fn with_gas_payment<T: Into<super::GasPayment>>(mut self, field: T) -> Self {
14042 self.set_gas_payment(field.into());
14043 self
14044 }
14045 pub fn expiration(&self) -> &super::TransactionExpiration {
14047 self.expiration
14048 .as_ref()
14049 .map(|field| field as _)
14050 .unwrap_or_else(|| super::TransactionExpiration::default_instance() as _)
14051 }
14052 pub fn expiration_opt_mut(
14054 &mut self,
14055 ) -> Option<&mut super::TransactionExpiration> {
14056 self.expiration.as_mut().map(|field| field as _)
14057 }
14058 pub fn expiration_mut(&mut self) -> &mut super::TransactionExpiration {
14061 self.expiration.get_or_insert_default()
14062 }
14063 pub fn expiration_opt(&self) -> Option<&super::TransactionExpiration> {
14065 self.expiration.as_ref().map(|field| field as _)
14066 }
14067 pub fn set_expiration<T: Into<super::TransactionExpiration>>(
14069 &mut self,
14070 field: T,
14071 ) {
14072 self.expiration = Some(field.into().into());
14073 }
14074 pub fn with_expiration<T: Into<super::TransactionExpiration>>(
14076 mut self,
14077 field: T,
14078 ) -> Self {
14079 self.set_expiration(field.into());
14080 self
14081 }
14082 }
14083 impl super::TransactionEffects {
14084 pub const fn const_default() -> Self {
14085 Self {
14086 bcs: None,
14087 digest: None,
14088 version: None,
14089 status: None,
14090 epoch: None,
14091 gas_used: None,
14092 transaction_digest: None,
14093 gas_object: None,
14094 events_digest: None,
14095 dependencies: Vec::new(),
14096 lamport_version: None,
14097 changed_objects: Vec::new(),
14098 unchanged_consensus_objects: Vec::new(),
14099 auxiliary_data_digest: None,
14100 unchanged_loaded_runtime_objects: Vec::new(),
14101 }
14102 }
14103 #[doc(hidden)]
14104 pub fn default_instance() -> &'static Self {
14105 static DEFAULT: super::TransactionEffects = super::TransactionEffects::const_default();
14106 &DEFAULT
14107 }
14108 pub fn bcs(&self) -> &super::Bcs {
14110 self.bcs
14111 .as_ref()
14112 .map(|field| field as _)
14113 .unwrap_or_else(|| super::Bcs::default_instance() as _)
14114 }
14115 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
14117 self.bcs.as_mut().map(|field| field as _)
14118 }
14119 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
14122 self.bcs.get_or_insert_default()
14123 }
14124 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
14126 self.bcs.as_ref().map(|field| field as _)
14127 }
14128 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
14130 self.bcs = Some(field.into().into());
14131 }
14132 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
14134 self.set_bcs(field.into());
14135 self
14136 }
14137 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
14139 self.digest.as_mut().map(|field| field as _)
14140 }
14141 pub fn digest_mut(&mut self) -> &mut String {
14144 self.digest.get_or_insert_default()
14145 }
14146 pub fn digest_opt(&self) -> Option<&str> {
14148 self.digest.as_ref().map(|field| field as _)
14149 }
14150 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
14152 self.digest = Some(field.into().into());
14153 }
14154 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
14156 self.set_digest(field.into());
14157 self
14158 }
14159 pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
14161 self.version.as_mut().map(|field| field as _)
14162 }
14163 pub fn version_mut(&mut self) -> &mut i32 {
14166 self.version.get_or_insert_default()
14167 }
14168 pub fn version_opt(&self) -> Option<i32> {
14170 self.version.as_ref().map(|field| *field)
14171 }
14172 pub fn set_version(&mut self, field: i32) {
14174 self.version = Some(field);
14175 }
14176 pub fn with_version(mut self, field: i32) -> Self {
14178 self.set_version(field);
14179 self
14180 }
14181 pub fn status(&self) -> &super::ExecutionStatus {
14183 self.status
14184 .as_ref()
14185 .map(|field| field as _)
14186 .unwrap_or_else(|| super::ExecutionStatus::default_instance() as _)
14187 }
14188 pub fn status_opt_mut(&mut self) -> Option<&mut super::ExecutionStatus> {
14190 self.status.as_mut().map(|field| field as _)
14191 }
14192 pub fn status_mut(&mut self) -> &mut super::ExecutionStatus {
14195 self.status.get_or_insert_default()
14196 }
14197 pub fn status_opt(&self) -> Option<&super::ExecutionStatus> {
14199 self.status.as_ref().map(|field| field as _)
14200 }
14201 pub fn set_status<T: Into<super::ExecutionStatus>>(&mut self, field: T) {
14203 self.status = Some(field.into().into());
14204 }
14205 pub fn with_status<T: Into<super::ExecutionStatus>>(mut self, field: T) -> Self {
14207 self.set_status(field.into());
14208 self
14209 }
14210 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
14212 self.epoch.as_mut().map(|field| field as _)
14213 }
14214 pub fn epoch_mut(&mut self) -> &mut u64 {
14217 self.epoch.get_or_insert_default()
14218 }
14219 pub fn epoch_opt(&self) -> Option<u64> {
14221 self.epoch.as_ref().map(|field| *field)
14222 }
14223 pub fn set_epoch(&mut self, field: u64) {
14225 self.epoch = Some(field);
14226 }
14227 pub fn with_epoch(mut self, field: u64) -> Self {
14229 self.set_epoch(field);
14230 self
14231 }
14232 pub fn gas_used(&self) -> &super::GasCostSummary {
14234 self.gas_used
14235 .as_ref()
14236 .map(|field| field as _)
14237 .unwrap_or_else(|| super::GasCostSummary::default_instance() as _)
14238 }
14239 pub fn gas_used_opt_mut(&mut self) -> Option<&mut super::GasCostSummary> {
14241 self.gas_used.as_mut().map(|field| field as _)
14242 }
14243 pub fn gas_used_mut(&mut self) -> &mut super::GasCostSummary {
14246 self.gas_used.get_or_insert_default()
14247 }
14248 pub fn gas_used_opt(&self) -> Option<&super::GasCostSummary> {
14250 self.gas_used.as_ref().map(|field| field as _)
14251 }
14252 pub fn set_gas_used<T: Into<super::GasCostSummary>>(&mut self, field: T) {
14254 self.gas_used = Some(field.into().into());
14255 }
14256 pub fn with_gas_used<T: Into<super::GasCostSummary>>(
14258 mut self,
14259 field: T,
14260 ) -> Self {
14261 self.set_gas_used(field.into());
14262 self
14263 }
14264 pub fn transaction_digest_opt_mut(&mut self) -> Option<&mut String> {
14266 self.transaction_digest.as_mut().map(|field| field as _)
14267 }
14268 pub fn transaction_digest_mut(&mut self) -> &mut String {
14271 self.transaction_digest.get_or_insert_default()
14272 }
14273 pub fn transaction_digest_opt(&self) -> Option<&str> {
14275 self.transaction_digest.as_ref().map(|field| field as _)
14276 }
14277 pub fn set_transaction_digest<T: Into<String>>(&mut self, field: T) {
14279 self.transaction_digest = Some(field.into().into());
14280 }
14281 pub fn with_transaction_digest<T: Into<String>>(mut self, field: T) -> Self {
14283 self.set_transaction_digest(field.into());
14284 self
14285 }
14286 pub fn gas_object(&self) -> &super::ChangedObject {
14288 self.gas_object
14289 .as_ref()
14290 .map(|field| field as _)
14291 .unwrap_or_else(|| super::ChangedObject::default_instance() as _)
14292 }
14293 pub fn gas_object_opt_mut(&mut self) -> Option<&mut super::ChangedObject> {
14295 self.gas_object.as_mut().map(|field| field as _)
14296 }
14297 pub fn gas_object_mut(&mut self) -> &mut super::ChangedObject {
14300 self.gas_object.get_or_insert_default()
14301 }
14302 pub fn gas_object_opt(&self) -> Option<&super::ChangedObject> {
14304 self.gas_object.as_ref().map(|field| field as _)
14305 }
14306 pub fn set_gas_object<T: Into<super::ChangedObject>>(&mut self, field: T) {
14308 self.gas_object = Some(field.into().into());
14309 }
14310 pub fn with_gas_object<T: Into<super::ChangedObject>>(
14312 mut self,
14313 field: T,
14314 ) -> Self {
14315 self.set_gas_object(field.into());
14316 self
14317 }
14318 pub fn events_digest_opt_mut(&mut self) -> Option<&mut String> {
14320 self.events_digest.as_mut().map(|field| field as _)
14321 }
14322 pub fn events_digest_mut(&mut self) -> &mut String {
14325 self.events_digest.get_or_insert_default()
14326 }
14327 pub fn events_digest_opt(&self) -> Option<&str> {
14329 self.events_digest.as_ref().map(|field| field as _)
14330 }
14331 pub fn set_events_digest<T: Into<String>>(&mut self, field: T) {
14333 self.events_digest = Some(field.into().into());
14334 }
14335 pub fn with_events_digest<T: Into<String>>(mut self, field: T) -> Self {
14337 self.set_events_digest(field.into());
14338 self
14339 }
14340 pub fn dependencies(&self) -> &[String] {
14342 &self.dependencies
14343 }
14344 pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
14347 &mut self.dependencies
14348 }
14349 pub fn set_dependencies(&mut self, field: Vec<String>) {
14351 self.dependencies = field;
14352 }
14353 pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
14355 self.set_dependencies(field);
14356 self
14357 }
14358 pub fn lamport_version_opt_mut(&mut self) -> Option<&mut u64> {
14360 self.lamport_version.as_mut().map(|field| field as _)
14361 }
14362 pub fn lamport_version_mut(&mut self) -> &mut u64 {
14365 self.lamport_version.get_or_insert_default()
14366 }
14367 pub fn lamport_version_opt(&self) -> Option<u64> {
14369 self.lamport_version.as_ref().map(|field| *field)
14370 }
14371 pub fn set_lamport_version(&mut self, field: u64) {
14373 self.lamport_version = Some(field);
14374 }
14375 pub fn with_lamport_version(mut self, field: u64) -> Self {
14377 self.set_lamport_version(field);
14378 self
14379 }
14380 pub fn changed_objects(&self) -> &[super::ChangedObject] {
14382 &self.changed_objects
14383 }
14384 pub fn changed_objects_mut(&mut self) -> &mut Vec<super::ChangedObject> {
14387 &mut self.changed_objects
14388 }
14389 pub fn set_changed_objects(&mut self, field: Vec<super::ChangedObject>) {
14391 self.changed_objects = field;
14392 }
14393 pub fn with_changed_objects(mut self, field: Vec<super::ChangedObject>) -> Self {
14395 self.set_changed_objects(field);
14396 self
14397 }
14398 pub fn unchanged_consensus_objects(&self) -> &[super::UnchangedConsensusObject] {
14400 &self.unchanged_consensus_objects
14401 }
14402 pub fn unchanged_consensus_objects_mut(
14405 &mut self,
14406 ) -> &mut Vec<super::UnchangedConsensusObject> {
14407 &mut self.unchanged_consensus_objects
14408 }
14409 pub fn set_unchanged_consensus_objects(
14411 &mut self,
14412 field: Vec<super::UnchangedConsensusObject>,
14413 ) {
14414 self.unchanged_consensus_objects = field;
14415 }
14416 pub fn with_unchanged_consensus_objects(
14418 mut self,
14419 field: Vec<super::UnchangedConsensusObject>,
14420 ) -> Self {
14421 self.set_unchanged_consensus_objects(field);
14422 self
14423 }
14424 pub fn auxiliary_data_digest_opt_mut(&mut self) -> Option<&mut String> {
14426 self.auxiliary_data_digest.as_mut().map(|field| field as _)
14427 }
14428 pub fn auxiliary_data_digest_mut(&mut self) -> &mut String {
14431 self.auxiliary_data_digest.get_or_insert_default()
14432 }
14433 pub fn auxiliary_data_digest_opt(&self) -> Option<&str> {
14435 self.auxiliary_data_digest.as_ref().map(|field| field as _)
14436 }
14437 pub fn set_auxiliary_data_digest<T: Into<String>>(&mut self, field: T) {
14439 self.auxiliary_data_digest = Some(field.into().into());
14440 }
14441 pub fn with_auxiliary_data_digest<T: Into<String>>(mut self, field: T) -> Self {
14443 self.set_auxiliary_data_digest(field.into());
14444 self
14445 }
14446 pub fn unchanged_loaded_runtime_objects(&self) -> &[super::ObjectReference] {
14448 &self.unchanged_loaded_runtime_objects
14449 }
14450 pub fn unchanged_loaded_runtime_objects_mut(
14453 &mut self,
14454 ) -> &mut Vec<super::ObjectReference> {
14455 &mut self.unchanged_loaded_runtime_objects
14456 }
14457 pub fn set_unchanged_loaded_runtime_objects(
14459 &mut self,
14460 field: Vec<super::ObjectReference>,
14461 ) {
14462 self.unchanged_loaded_runtime_objects = field;
14463 }
14464 pub fn with_unchanged_loaded_runtime_objects(
14466 mut self,
14467 field: Vec<super::ObjectReference>,
14468 ) -> Self {
14469 self.set_unchanged_loaded_runtime_objects(field);
14470 self
14471 }
14472 }
14473 impl super::TransactionEvents {
14474 pub const fn const_default() -> Self {
14475 Self {
14476 bcs: None,
14477 digest: None,
14478 events: Vec::new(),
14479 }
14480 }
14481 #[doc(hidden)]
14482 pub fn default_instance() -> &'static Self {
14483 static DEFAULT: super::TransactionEvents = super::TransactionEvents::const_default();
14484 &DEFAULT
14485 }
14486 pub fn bcs(&self) -> &super::Bcs {
14488 self.bcs
14489 .as_ref()
14490 .map(|field| field as _)
14491 .unwrap_or_else(|| super::Bcs::default_instance() as _)
14492 }
14493 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
14495 self.bcs.as_mut().map(|field| field as _)
14496 }
14497 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
14500 self.bcs.get_or_insert_default()
14501 }
14502 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
14504 self.bcs.as_ref().map(|field| field as _)
14505 }
14506 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
14508 self.bcs = Some(field.into().into());
14509 }
14510 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
14512 self.set_bcs(field.into());
14513 self
14514 }
14515 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
14517 self.digest.as_mut().map(|field| field as _)
14518 }
14519 pub fn digest_mut(&mut self) -> &mut String {
14522 self.digest.get_or_insert_default()
14523 }
14524 pub fn digest_opt(&self) -> Option<&str> {
14526 self.digest.as_ref().map(|field| field as _)
14527 }
14528 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
14530 self.digest = Some(field.into().into());
14531 }
14532 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
14534 self.set_digest(field.into());
14535 self
14536 }
14537 pub fn events(&self) -> &[super::Event] {
14539 &self.events
14540 }
14541 pub fn events_mut(&mut self) -> &mut Vec<super::Event> {
14544 &mut self.events
14545 }
14546 pub fn set_events(&mut self, field: Vec<super::Event>) {
14548 self.events = field;
14549 }
14550 pub fn with_events(mut self, field: Vec<super::Event>) -> Self {
14552 self.set_events(field);
14553 self
14554 }
14555 }
14556 impl super::TransactionExpiration {
14557 pub const fn const_default() -> Self {
14558 Self {
14559 kind: None,
14560 epoch: None,
14561 min_epoch: None,
14562 min_timestamp: None,
14563 max_timestamp: None,
14564 chain: None,
14565 nonce: None,
14566 }
14567 }
14568 #[doc(hidden)]
14569 pub fn default_instance() -> &'static Self {
14570 static DEFAULT: super::TransactionExpiration = super::TransactionExpiration::const_default();
14571 &DEFAULT
14572 }
14573 pub fn with_kind<
14575 T: Into<super::transaction_expiration::TransactionExpirationKind>,
14576 >(mut self, field: T) -> Self {
14577 self.set_kind(field.into());
14578 self
14579 }
14580 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
14582 self.epoch.as_mut().map(|field| field as _)
14583 }
14584 pub fn epoch_mut(&mut self) -> &mut u64 {
14587 self.epoch.get_or_insert_default()
14588 }
14589 pub fn epoch_opt(&self) -> Option<u64> {
14591 self.epoch.as_ref().map(|field| *field)
14592 }
14593 pub fn set_epoch(&mut self, field: u64) {
14595 self.epoch = Some(field);
14596 }
14597 pub fn with_epoch(mut self, field: u64) -> Self {
14599 self.set_epoch(field);
14600 self
14601 }
14602 pub fn min_epoch_opt_mut(&mut self) -> Option<&mut u64> {
14604 self.min_epoch.as_mut().map(|field| field as _)
14605 }
14606 pub fn min_epoch_mut(&mut self) -> &mut u64 {
14609 self.min_epoch.get_or_insert_default()
14610 }
14611 pub fn min_epoch_opt(&self) -> Option<u64> {
14613 self.min_epoch.as_ref().map(|field| *field)
14614 }
14615 pub fn set_min_epoch(&mut self, field: u64) {
14617 self.min_epoch = Some(field);
14618 }
14619 pub fn with_min_epoch(mut self, field: u64) -> Self {
14621 self.set_min_epoch(field);
14622 self
14623 }
14624 pub fn min_timestamp_opt_mut(
14626 &mut self,
14627 ) -> Option<&mut ::prost_types::Timestamp> {
14628 self.min_timestamp.as_mut().map(|field| field as _)
14629 }
14630 pub fn min_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
14633 self.min_timestamp.get_or_insert_default()
14634 }
14635 pub fn min_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
14637 self.min_timestamp.as_ref().map(|field| field as _)
14638 }
14639 pub fn set_min_timestamp<T: Into<::prost_types::Timestamp>>(
14641 &mut self,
14642 field: T,
14643 ) {
14644 self.min_timestamp = Some(field.into().into());
14645 }
14646 pub fn with_min_timestamp<T: Into<::prost_types::Timestamp>>(
14648 mut self,
14649 field: T,
14650 ) -> Self {
14651 self.set_min_timestamp(field.into());
14652 self
14653 }
14654 pub fn max_timestamp_opt_mut(
14656 &mut self,
14657 ) -> Option<&mut ::prost_types::Timestamp> {
14658 self.max_timestamp.as_mut().map(|field| field as _)
14659 }
14660 pub fn max_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
14663 self.max_timestamp.get_or_insert_default()
14664 }
14665 pub fn max_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
14667 self.max_timestamp.as_ref().map(|field| field as _)
14668 }
14669 pub fn set_max_timestamp<T: Into<::prost_types::Timestamp>>(
14671 &mut self,
14672 field: T,
14673 ) {
14674 self.max_timestamp = Some(field.into().into());
14675 }
14676 pub fn with_max_timestamp<T: Into<::prost_types::Timestamp>>(
14678 mut self,
14679 field: T,
14680 ) -> Self {
14681 self.set_max_timestamp(field.into());
14682 self
14683 }
14684 pub fn chain_opt_mut(&mut self) -> Option<&mut String> {
14686 self.chain.as_mut().map(|field| field as _)
14687 }
14688 pub fn chain_mut(&mut self) -> &mut String {
14691 self.chain.get_or_insert_default()
14692 }
14693 pub fn chain_opt(&self) -> Option<&str> {
14695 self.chain.as_ref().map(|field| field as _)
14696 }
14697 pub fn set_chain<T: Into<String>>(&mut self, field: T) {
14699 self.chain = Some(field.into().into());
14700 }
14701 pub fn with_chain<T: Into<String>>(mut self, field: T) -> Self {
14703 self.set_chain(field.into());
14704 self
14705 }
14706 pub fn nonce_opt_mut(&mut self) -> Option<&mut u32> {
14708 self.nonce.as_mut().map(|field| field as _)
14709 }
14710 pub fn nonce_mut(&mut self) -> &mut u32 {
14713 self.nonce.get_or_insert_default()
14714 }
14715 pub fn nonce_opt(&self) -> Option<u32> {
14717 self.nonce.as_ref().map(|field| *field)
14718 }
14719 pub fn set_nonce(&mut self, field: u32) {
14721 self.nonce = Some(field);
14722 }
14723 pub fn with_nonce(mut self, field: u32) -> Self {
14725 self.set_nonce(field);
14726 self
14727 }
14728 }
14729 impl super::TransactionKind {
14730 pub const fn const_default() -> Self {
14731 Self { kind: None, data: None }
14732 }
14733 #[doc(hidden)]
14734 pub fn default_instance() -> &'static Self {
14735 static DEFAULT: super::TransactionKind = super::TransactionKind::const_default();
14736 &DEFAULT
14737 }
14738 pub fn with_kind<T: Into<super::transaction_kind::Kind>>(
14740 mut self,
14741 field: T,
14742 ) -> Self {
14743 self.set_kind(field.into());
14744 self
14745 }
14746 pub fn programmable_transaction(&self) -> &super::ProgrammableTransaction {
14748 if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &self
14749 .data
14750 {
14751 field as _
14752 } else {
14753 super::ProgrammableTransaction::default_instance() as _
14754 }
14755 }
14756 pub fn programmable_transaction_opt(
14758 &self,
14759 ) -> Option<&super::ProgrammableTransaction> {
14760 if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &self
14761 .data
14762 {
14763 Some(field as _)
14764 } else {
14765 None
14766 }
14767 }
14768 pub fn programmable_transaction_opt_mut(
14770 &mut self,
14771 ) -> Option<&mut super::ProgrammableTransaction> {
14772 if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &mut self
14773 .data
14774 {
14775 Some(field as _)
14776 } else {
14777 None
14778 }
14779 }
14780 pub fn programmable_transaction_mut(
14784 &mut self,
14785 ) -> &mut super::ProgrammableTransaction {
14786 if self.programmable_transaction_opt_mut().is_none() {
14787 self.data = Some(
14788 super::transaction_kind::Data::ProgrammableTransaction(
14789 super::ProgrammableTransaction::default(),
14790 ),
14791 );
14792 }
14793 self.programmable_transaction_opt_mut().unwrap()
14794 }
14795 pub fn set_programmable_transaction<T: Into<super::ProgrammableTransaction>>(
14798 &mut self,
14799 field: T,
14800 ) {
14801 self.data = Some(
14802 super::transaction_kind::Data::ProgrammableTransaction(
14803 field.into().into(),
14804 ),
14805 );
14806 }
14807 pub fn with_programmable_transaction<T: Into<super::ProgrammableTransaction>>(
14810 mut self,
14811 field: T,
14812 ) -> Self {
14813 self.set_programmable_transaction(field.into());
14814 self
14815 }
14816 pub fn change_epoch(&self) -> &super::ChangeEpoch {
14818 if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &self.data {
14819 field as _
14820 } else {
14821 super::ChangeEpoch::default_instance() as _
14822 }
14823 }
14824 pub fn change_epoch_opt(&self) -> Option<&super::ChangeEpoch> {
14826 if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &self.data {
14827 Some(field as _)
14828 } else {
14829 None
14830 }
14831 }
14832 pub fn change_epoch_opt_mut(&mut self) -> Option<&mut super::ChangeEpoch> {
14834 if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &mut self
14835 .data
14836 {
14837 Some(field as _)
14838 } else {
14839 None
14840 }
14841 }
14842 pub fn change_epoch_mut(&mut self) -> &mut super::ChangeEpoch {
14846 if self.change_epoch_opt_mut().is_none() {
14847 self.data = Some(
14848 super::transaction_kind::Data::ChangeEpoch(
14849 super::ChangeEpoch::default(),
14850 ),
14851 );
14852 }
14853 self.change_epoch_opt_mut().unwrap()
14854 }
14855 pub fn set_change_epoch<T: Into<super::ChangeEpoch>>(&mut self, field: T) {
14858 self.data = Some(
14859 super::transaction_kind::Data::ChangeEpoch(field.into().into()),
14860 );
14861 }
14862 pub fn with_change_epoch<T: Into<super::ChangeEpoch>>(
14865 mut self,
14866 field: T,
14867 ) -> Self {
14868 self.set_change_epoch(field.into());
14869 self
14870 }
14871 pub fn genesis(&self) -> &super::GenesisTransaction {
14873 if let Some(super::transaction_kind::Data::Genesis(field)) = &self.data {
14874 field as _
14875 } else {
14876 super::GenesisTransaction::default_instance() as _
14877 }
14878 }
14879 pub fn genesis_opt(&self) -> Option<&super::GenesisTransaction> {
14881 if let Some(super::transaction_kind::Data::Genesis(field)) = &self.data {
14882 Some(field as _)
14883 } else {
14884 None
14885 }
14886 }
14887 pub fn genesis_opt_mut(&mut self) -> Option<&mut super::GenesisTransaction> {
14889 if let Some(super::transaction_kind::Data::Genesis(field)) = &mut self.data {
14890 Some(field as _)
14891 } else {
14892 None
14893 }
14894 }
14895 pub fn genesis_mut(&mut self) -> &mut super::GenesisTransaction {
14899 if self.genesis_opt_mut().is_none() {
14900 self.data = Some(
14901 super::transaction_kind::Data::Genesis(
14902 super::GenesisTransaction::default(),
14903 ),
14904 );
14905 }
14906 self.genesis_opt_mut().unwrap()
14907 }
14908 pub fn set_genesis<T: Into<super::GenesisTransaction>>(&mut self, field: T) {
14911 self.data = Some(
14912 super::transaction_kind::Data::Genesis(field.into().into()),
14913 );
14914 }
14915 pub fn with_genesis<T: Into<super::GenesisTransaction>>(
14918 mut self,
14919 field: T,
14920 ) -> Self {
14921 self.set_genesis(field.into());
14922 self
14923 }
14924 pub fn consensus_commit_prologue(&self) -> &super::ConsensusCommitPrologue {
14926 if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &self
14927 .data
14928 {
14929 field as _
14930 } else {
14931 super::ConsensusCommitPrologue::default_instance() as _
14932 }
14933 }
14934 pub fn consensus_commit_prologue_opt(
14936 &self,
14937 ) -> Option<&super::ConsensusCommitPrologue> {
14938 if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &self
14939 .data
14940 {
14941 Some(field as _)
14942 } else {
14943 None
14944 }
14945 }
14946 pub fn consensus_commit_prologue_opt_mut(
14948 &mut self,
14949 ) -> Option<&mut super::ConsensusCommitPrologue> {
14950 if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &mut self
14951 .data
14952 {
14953 Some(field as _)
14954 } else {
14955 None
14956 }
14957 }
14958 pub fn consensus_commit_prologue_mut(
14962 &mut self,
14963 ) -> &mut super::ConsensusCommitPrologue {
14964 if self.consensus_commit_prologue_opt_mut().is_none() {
14965 self.data = Some(
14966 super::transaction_kind::Data::ConsensusCommitPrologue(
14967 super::ConsensusCommitPrologue::default(),
14968 ),
14969 );
14970 }
14971 self.consensus_commit_prologue_opt_mut().unwrap()
14972 }
14973 pub fn set_consensus_commit_prologue<T: Into<super::ConsensusCommitPrologue>>(
14976 &mut self,
14977 field: T,
14978 ) {
14979 self.data = Some(
14980 super::transaction_kind::Data::ConsensusCommitPrologue(
14981 field.into().into(),
14982 ),
14983 );
14984 }
14985 pub fn with_consensus_commit_prologue<T: Into<super::ConsensusCommitPrologue>>(
14988 mut self,
14989 field: T,
14990 ) -> Self {
14991 self.set_consensus_commit_prologue(field.into());
14992 self
14993 }
14994 pub fn authenticator_state_update(&self) -> &super::AuthenticatorStateUpdate {
14996 if let Some(
14997 super::transaction_kind::Data::AuthenticatorStateUpdate(field),
14998 ) = &self.data
14999 {
15000 field as _
15001 } else {
15002 super::AuthenticatorStateUpdate::default_instance() as _
15003 }
15004 }
15005 pub fn authenticator_state_update_opt(
15007 &self,
15008 ) -> Option<&super::AuthenticatorStateUpdate> {
15009 if let Some(
15010 super::transaction_kind::Data::AuthenticatorStateUpdate(field),
15011 ) = &self.data
15012 {
15013 Some(field as _)
15014 } else {
15015 None
15016 }
15017 }
15018 pub fn authenticator_state_update_opt_mut(
15020 &mut self,
15021 ) -> Option<&mut super::AuthenticatorStateUpdate> {
15022 if let Some(
15023 super::transaction_kind::Data::AuthenticatorStateUpdate(field),
15024 ) = &mut self.data
15025 {
15026 Some(field as _)
15027 } else {
15028 None
15029 }
15030 }
15031 pub fn authenticator_state_update_mut(
15035 &mut self,
15036 ) -> &mut super::AuthenticatorStateUpdate {
15037 if self.authenticator_state_update_opt_mut().is_none() {
15038 self.data = Some(
15039 super::transaction_kind::Data::AuthenticatorStateUpdate(
15040 super::AuthenticatorStateUpdate::default(),
15041 ),
15042 );
15043 }
15044 self.authenticator_state_update_opt_mut().unwrap()
15045 }
15046 pub fn set_authenticator_state_update<T: Into<super::AuthenticatorStateUpdate>>(
15049 &mut self,
15050 field: T,
15051 ) {
15052 self.data = Some(
15053 super::transaction_kind::Data::AuthenticatorStateUpdate(
15054 field.into().into(),
15055 ),
15056 );
15057 }
15058 pub fn with_authenticator_state_update<T: Into<super::AuthenticatorStateUpdate>>(
15061 mut self,
15062 field: T,
15063 ) -> Self {
15064 self.set_authenticator_state_update(field.into());
15065 self
15066 }
15067 pub fn end_of_epoch(&self) -> &super::EndOfEpochTransaction {
15069 if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &self.data {
15070 field as _
15071 } else {
15072 super::EndOfEpochTransaction::default_instance() as _
15073 }
15074 }
15075 pub fn end_of_epoch_opt(&self) -> Option<&super::EndOfEpochTransaction> {
15077 if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &self.data {
15078 Some(field as _)
15079 } else {
15080 None
15081 }
15082 }
15083 pub fn end_of_epoch_opt_mut(
15085 &mut self,
15086 ) -> Option<&mut super::EndOfEpochTransaction> {
15087 if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &mut self
15088 .data
15089 {
15090 Some(field as _)
15091 } else {
15092 None
15093 }
15094 }
15095 pub fn end_of_epoch_mut(&mut self) -> &mut super::EndOfEpochTransaction {
15099 if self.end_of_epoch_opt_mut().is_none() {
15100 self.data = Some(
15101 super::transaction_kind::Data::EndOfEpoch(
15102 super::EndOfEpochTransaction::default(),
15103 ),
15104 );
15105 }
15106 self.end_of_epoch_opt_mut().unwrap()
15107 }
15108 pub fn set_end_of_epoch<T: Into<super::EndOfEpochTransaction>>(
15111 &mut self,
15112 field: T,
15113 ) {
15114 self.data = Some(
15115 super::transaction_kind::Data::EndOfEpoch(field.into().into()),
15116 );
15117 }
15118 pub fn with_end_of_epoch<T: Into<super::EndOfEpochTransaction>>(
15121 mut self,
15122 field: T,
15123 ) -> Self {
15124 self.set_end_of_epoch(field.into());
15125 self
15126 }
15127 pub fn randomness_state_update(&self) -> &super::RandomnessStateUpdate {
15129 if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &self
15130 .data
15131 {
15132 field as _
15133 } else {
15134 super::RandomnessStateUpdate::default_instance() as _
15135 }
15136 }
15137 pub fn randomness_state_update_opt(
15139 &self,
15140 ) -> Option<&super::RandomnessStateUpdate> {
15141 if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &self
15142 .data
15143 {
15144 Some(field as _)
15145 } else {
15146 None
15147 }
15148 }
15149 pub fn randomness_state_update_opt_mut(
15151 &mut self,
15152 ) -> Option<&mut super::RandomnessStateUpdate> {
15153 if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &mut self
15154 .data
15155 {
15156 Some(field as _)
15157 } else {
15158 None
15159 }
15160 }
15161 pub fn randomness_state_update_mut(
15165 &mut self,
15166 ) -> &mut super::RandomnessStateUpdate {
15167 if self.randomness_state_update_opt_mut().is_none() {
15168 self.data = Some(
15169 super::transaction_kind::Data::RandomnessStateUpdate(
15170 super::RandomnessStateUpdate::default(),
15171 ),
15172 );
15173 }
15174 self.randomness_state_update_opt_mut().unwrap()
15175 }
15176 pub fn set_randomness_state_update<T: Into<super::RandomnessStateUpdate>>(
15179 &mut self,
15180 field: T,
15181 ) {
15182 self.data = Some(
15183 super::transaction_kind::Data::RandomnessStateUpdate(field.into().into()),
15184 );
15185 }
15186 pub fn with_randomness_state_update<T: Into<super::RandomnessStateUpdate>>(
15189 mut self,
15190 field: T,
15191 ) -> Self {
15192 self.set_randomness_state_update(field.into());
15193 self
15194 }
15195 }
15196 impl super::TransferObjects {
15197 pub const fn const_default() -> Self {
15198 Self {
15199 objects: Vec::new(),
15200 address: None,
15201 }
15202 }
15203 #[doc(hidden)]
15204 pub fn default_instance() -> &'static Self {
15205 static DEFAULT: super::TransferObjects = super::TransferObjects::const_default();
15206 &DEFAULT
15207 }
15208 pub fn objects(&self) -> &[super::Argument] {
15210 &self.objects
15211 }
15212 pub fn objects_mut(&mut self) -> &mut Vec<super::Argument> {
15215 &mut self.objects
15216 }
15217 pub fn set_objects(&mut self, field: Vec<super::Argument>) {
15219 self.objects = field;
15220 }
15221 pub fn with_objects(mut self, field: Vec<super::Argument>) -> Self {
15223 self.set_objects(field);
15224 self
15225 }
15226 pub fn address(&self) -> &super::Argument {
15228 self.address
15229 .as_ref()
15230 .map(|field| field as _)
15231 .unwrap_or_else(|| super::Argument::default_instance() as _)
15232 }
15233 pub fn address_opt_mut(&mut self) -> Option<&mut super::Argument> {
15235 self.address.as_mut().map(|field| field as _)
15236 }
15237 pub fn address_mut(&mut self) -> &mut super::Argument {
15240 self.address.get_or_insert_default()
15241 }
15242 pub fn address_opt(&self) -> Option<&super::Argument> {
15244 self.address.as_ref().map(|field| field as _)
15245 }
15246 pub fn set_address<T: Into<super::Argument>>(&mut self, field: T) {
15248 self.address = Some(field.into().into());
15249 }
15250 pub fn with_address<T: Into<super::Argument>>(mut self, field: T) -> Self {
15252 self.set_address(field.into());
15253 self
15254 }
15255 }
15256 impl super::TypeArgumentError {
15257 pub const fn const_default() -> Self {
15258 Self {
15259 type_argument: None,
15260 kind: None,
15261 }
15262 }
15263 #[doc(hidden)]
15264 pub fn default_instance() -> &'static Self {
15265 static DEFAULT: super::TypeArgumentError = super::TypeArgumentError::const_default();
15266 &DEFAULT
15267 }
15268 pub fn type_argument_opt_mut(&mut self) -> Option<&mut u32> {
15270 self.type_argument.as_mut().map(|field| field as _)
15271 }
15272 pub fn type_argument_mut(&mut self) -> &mut u32 {
15275 self.type_argument.get_or_insert_default()
15276 }
15277 pub fn type_argument_opt(&self) -> Option<u32> {
15279 self.type_argument.as_ref().map(|field| *field)
15280 }
15281 pub fn set_type_argument(&mut self, field: u32) {
15283 self.type_argument = Some(field);
15284 }
15285 pub fn with_type_argument(mut self, field: u32) -> Self {
15287 self.set_type_argument(field);
15288 self
15289 }
15290 pub fn with_kind<T: Into<super::type_argument_error::TypeArgumentErrorKind>>(
15292 mut self,
15293 field: T,
15294 ) -> Self {
15295 self.set_kind(field.into());
15296 self
15297 }
15298 }
15299 impl super::TypeOrigin {
15300 pub const fn const_default() -> Self {
15301 Self {
15302 module_name: None,
15303 datatype_name: None,
15304 package_id: None,
15305 }
15306 }
15307 #[doc(hidden)]
15308 pub fn default_instance() -> &'static Self {
15309 static DEFAULT: super::TypeOrigin = super::TypeOrigin::const_default();
15310 &DEFAULT
15311 }
15312 pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
15314 self.module_name.as_mut().map(|field| field as _)
15315 }
15316 pub fn module_name_mut(&mut self) -> &mut String {
15319 self.module_name.get_or_insert_default()
15320 }
15321 pub fn module_name_opt(&self) -> Option<&str> {
15323 self.module_name.as_ref().map(|field| field as _)
15324 }
15325 pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
15327 self.module_name = Some(field.into().into());
15328 }
15329 pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
15331 self.set_module_name(field.into());
15332 self
15333 }
15334 pub fn datatype_name_opt_mut(&mut self) -> Option<&mut String> {
15336 self.datatype_name.as_mut().map(|field| field as _)
15337 }
15338 pub fn datatype_name_mut(&mut self) -> &mut String {
15341 self.datatype_name.get_or_insert_default()
15342 }
15343 pub fn datatype_name_opt(&self) -> Option<&str> {
15345 self.datatype_name.as_ref().map(|field| field as _)
15346 }
15347 pub fn set_datatype_name<T: Into<String>>(&mut self, field: T) {
15349 self.datatype_name = Some(field.into().into());
15350 }
15351 pub fn with_datatype_name<T: Into<String>>(mut self, field: T) -> Self {
15353 self.set_datatype_name(field.into());
15354 self
15355 }
15356 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
15358 self.package_id.as_mut().map(|field| field as _)
15359 }
15360 pub fn package_id_mut(&mut self) -> &mut String {
15363 self.package_id.get_or_insert_default()
15364 }
15365 pub fn package_id_opt(&self) -> Option<&str> {
15367 self.package_id.as_ref().map(|field| field as _)
15368 }
15369 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
15371 self.package_id = Some(field.into().into());
15372 }
15373 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
15375 self.set_package_id(field.into());
15376 self
15377 }
15378 }
15379 impl super::TypeParameter {
15380 pub const fn const_default() -> Self {
15381 Self {
15382 constraints: Vec::new(),
15383 is_phantom: None,
15384 }
15385 }
15386 #[doc(hidden)]
15387 pub fn default_instance() -> &'static Self {
15388 static DEFAULT: super::TypeParameter = super::TypeParameter::const_default();
15389 &DEFAULT
15390 }
15391 pub fn is_phantom_opt_mut(&mut self) -> Option<&mut bool> {
15393 self.is_phantom.as_mut().map(|field| field as _)
15394 }
15395 pub fn is_phantom_mut(&mut self) -> &mut bool {
15398 self.is_phantom.get_or_insert_default()
15399 }
15400 pub fn is_phantom_opt(&self) -> Option<bool> {
15402 self.is_phantom.as_ref().map(|field| *field)
15403 }
15404 pub fn set_is_phantom(&mut self, field: bool) {
15406 self.is_phantom = Some(field);
15407 }
15408 pub fn with_is_phantom(mut self, field: bool) -> Self {
15410 self.set_is_phantom(field);
15411 self
15412 }
15413 }
15414 impl super::UnchangedConsensusObject {
15415 pub const fn const_default() -> Self {
15416 Self {
15417 kind: None,
15418 object_id: None,
15419 version: None,
15420 digest: None,
15421 object_type: None,
15422 }
15423 }
15424 #[doc(hidden)]
15425 pub fn default_instance() -> &'static Self {
15426 static DEFAULT: super::UnchangedConsensusObject = super::UnchangedConsensusObject::const_default();
15427 &DEFAULT
15428 }
15429 pub fn with_kind<
15431 T: Into<super::unchanged_consensus_object::UnchangedConsensusObjectKind>,
15432 >(mut self, field: T) -> Self {
15433 self.set_kind(field.into());
15434 self
15435 }
15436 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
15438 self.object_id.as_mut().map(|field| field as _)
15439 }
15440 pub fn object_id_mut(&mut self) -> &mut String {
15443 self.object_id.get_or_insert_default()
15444 }
15445 pub fn object_id_opt(&self) -> Option<&str> {
15447 self.object_id.as_ref().map(|field| field as _)
15448 }
15449 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
15451 self.object_id = Some(field.into().into());
15452 }
15453 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
15455 self.set_object_id(field.into());
15456 self
15457 }
15458 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
15460 self.version.as_mut().map(|field| field as _)
15461 }
15462 pub fn version_mut(&mut self) -> &mut u64 {
15465 self.version.get_or_insert_default()
15466 }
15467 pub fn version_opt(&self) -> Option<u64> {
15469 self.version.as_ref().map(|field| *field)
15470 }
15471 pub fn set_version(&mut self, field: u64) {
15473 self.version = Some(field);
15474 }
15475 pub fn with_version(mut self, field: u64) -> Self {
15477 self.set_version(field);
15478 self
15479 }
15480 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
15482 self.digest.as_mut().map(|field| field as _)
15483 }
15484 pub fn digest_mut(&mut self) -> &mut String {
15487 self.digest.get_or_insert_default()
15488 }
15489 pub fn digest_opt(&self) -> Option<&str> {
15491 self.digest.as_ref().map(|field| field as _)
15492 }
15493 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
15495 self.digest = Some(field.into().into());
15496 }
15497 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
15499 self.set_digest(field.into());
15500 self
15501 }
15502 pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
15504 self.object_type.as_mut().map(|field| field as _)
15505 }
15506 pub fn object_type_mut(&mut self) -> &mut String {
15509 self.object_type.get_or_insert_default()
15510 }
15511 pub fn object_type_opt(&self) -> Option<&str> {
15513 self.object_type.as_ref().map(|field| field as _)
15514 }
15515 pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
15517 self.object_type = Some(field.into().into());
15518 }
15519 pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
15521 self.set_object_type(field.into());
15522 self
15523 }
15524 }
15525 impl super::Upgrade {
15526 pub const fn const_default() -> Self {
15527 Self {
15528 modules: Vec::new(),
15529 dependencies: Vec::new(),
15530 package: None,
15531 ticket: None,
15532 }
15533 }
15534 #[doc(hidden)]
15535 pub fn default_instance() -> &'static Self {
15536 static DEFAULT: super::Upgrade = super::Upgrade::const_default();
15537 &DEFAULT
15538 }
15539 pub fn modules(&self) -> &[::prost::bytes::Bytes] {
15541 &self.modules
15542 }
15543 pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
15546 &mut self.modules
15547 }
15548 pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
15550 self.modules = field;
15551 }
15552 pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
15554 self.set_modules(field);
15555 self
15556 }
15557 pub fn dependencies(&self) -> &[String] {
15559 &self.dependencies
15560 }
15561 pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
15564 &mut self.dependencies
15565 }
15566 pub fn set_dependencies(&mut self, field: Vec<String>) {
15568 self.dependencies = field;
15569 }
15570 pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
15572 self.set_dependencies(field);
15573 self
15574 }
15575 pub fn package_opt_mut(&mut self) -> Option<&mut String> {
15577 self.package.as_mut().map(|field| field as _)
15578 }
15579 pub fn package_mut(&mut self) -> &mut String {
15582 self.package.get_or_insert_default()
15583 }
15584 pub fn package_opt(&self) -> Option<&str> {
15586 self.package.as_ref().map(|field| field as _)
15587 }
15588 pub fn set_package<T: Into<String>>(&mut self, field: T) {
15590 self.package = Some(field.into().into());
15591 }
15592 pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
15594 self.set_package(field.into());
15595 self
15596 }
15597 pub fn ticket(&self) -> &super::Argument {
15599 self.ticket
15600 .as_ref()
15601 .map(|field| field as _)
15602 .unwrap_or_else(|| super::Argument::default_instance() as _)
15603 }
15604 pub fn ticket_opt_mut(&mut self) -> Option<&mut super::Argument> {
15606 self.ticket.as_mut().map(|field| field as _)
15607 }
15608 pub fn ticket_mut(&mut self) -> &mut super::Argument {
15611 self.ticket.get_or_insert_default()
15612 }
15613 pub fn ticket_opt(&self) -> Option<&super::Argument> {
15615 self.ticket.as_ref().map(|field| field as _)
15616 }
15617 pub fn set_ticket<T: Into<super::Argument>>(&mut self, field: T) {
15619 self.ticket = Some(field.into().into());
15620 }
15621 pub fn with_ticket<T: Into<super::Argument>>(mut self, field: T) -> Self {
15623 self.set_ticket(field.into());
15624 self
15625 }
15626 }
15627 impl super::UserSignature {
15628 pub const fn const_default() -> Self {
15629 Self {
15630 bcs: None,
15631 scheme: None,
15632 signature: None,
15633 }
15634 }
15635 #[doc(hidden)]
15636 pub fn default_instance() -> &'static Self {
15637 static DEFAULT: super::UserSignature = super::UserSignature::const_default();
15638 &DEFAULT
15639 }
15640 pub fn bcs(&self) -> &super::Bcs {
15642 self.bcs
15643 .as_ref()
15644 .map(|field| field as _)
15645 .unwrap_or_else(|| super::Bcs::default_instance() as _)
15646 }
15647 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
15649 self.bcs.as_mut().map(|field| field as _)
15650 }
15651 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
15654 self.bcs.get_or_insert_default()
15655 }
15656 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
15658 self.bcs.as_ref().map(|field| field as _)
15659 }
15660 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
15662 self.bcs = Some(field.into().into());
15663 }
15664 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
15666 self.set_bcs(field.into());
15667 self
15668 }
15669 pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
15671 self.set_scheme(field.into());
15672 self
15673 }
15674 pub fn simple(&self) -> &super::SimpleSignature {
15676 if let Some(super::user_signature::Signature::Simple(field)) = &self
15677 .signature
15678 {
15679 field as _
15680 } else {
15681 super::SimpleSignature::default_instance() as _
15682 }
15683 }
15684 pub fn simple_opt(&self) -> Option<&super::SimpleSignature> {
15686 if let Some(super::user_signature::Signature::Simple(field)) = &self
15687 .signature
15688 {
15689 Some(field as _)
15690 } else {
15691 None
15692 }
15693 }
15694 pub fn simple_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
15696 if let Some(super::user_signature::Signature::Simple(field)) = &mut self
15697 .signature
15698 {
15699 Some(field as _)
15700 } else {
15701 None
15702 }
15703 }
15704 pub fn simple_mut(&mut self) -> &mut super::SimpleSignature {
15708 if self.simple_opt_mut().is_none() {
15709 self.signature = Some(
15710 super::user_signature::Signature::Simple(
15711 super::SimpleSignature::default(),
15712 ),
15713 );
15714 }
15715 self.simple_opt_mut().unwrap()
15716 }
15717 pub fn set_simple<T: Into<super::SimpleSignature>>(&mut self, field: T) {
15720 self.signature = Some(
15721 super::user_signature::Signature::Simple(field.into().into()),
15722 );
15723 }
15724 pub fn with_simple<T: Into<super::SimpleSignature>>(mut self, field: T) -> Self {
15727 self.set_simple(field.into());
15728 self
15729 }
15730 pub fn multisig(&self) -> &super::MultisigAggregatedSignature {
15732 if let Some(super::user_signature::Signature::Multisig(field)) = &self
15733 .signature
15734 {
15735 field as _
15736 } else {
15737 super::MultisigAggregatedSignature::default_instance() as _
15738 }
15739 }
15740 pub fn multisig_opt(&self) -> Option<&super::MultisigAggregatedSignature> {
15742 if let Some(super::user_signature::Signature::Multisig(field)) = &self
15743 .signature
15744 {
15745 Some(field as _)
15746 } else {
15747 None
15748 }
15749 }
15750 pub fn multisig_opt_mut(
15752 &mut self,
15753 ) -> Option<&mut super::MultisigAggregatedSignature> {
15754 if let Some(super::user_signature::Signature::Multisig(field)) = &mut self
15755 .signature
15756 {
15757 Some(field as _)
15758 } else {
15759 None
15760 }
15761 }
15762 pub fn multisig_mut(&mut self) -> &mut super::MultisigAggregatedSignature {
15766 if self.multisig_opt_mut().is_none() {
15767 self.signature = Some(
15768 super::user_signature::Signature::Multisig(
15769 super::MultisigAggregatedSignature::default(),
15770 ),
15771 );
15772 }
15773 self.multisig_opt_mut().unwrap()
15774 }
15775 pub fn set_multisig<T: Into<super::MultisigAggregatedSignature>>(
15778 &mut self,
15779 field: T,
15780 ) {
15781 self.signature = Some(
15782 super::user_signature::Signature::Multisig(field.into().into()),
15783 );
15784 }
15785 pub fn with_multisig<T: Into<super::MultisigAggregatedSignature>>(
15788 mut self,
15789 field: T,
15790 ) -> Self {
15791 self.set_multisig(field.into());
15792 self
15793 }
15794 pub fn zklogin(&self) -> &super::ZkLoginAuthenticator {
15796 if let Some(super::user_signature::Signature::Zklogin(field)) = &self
15797 .signature
15798 {
15799 field as _
15800 } else {
15801 super::ZkLoginAuthenticator::default_instance() as _
15802 }
15803 }
15804 pub fn zklogin_opt(&self) -> Option<&super::ZkLoginAuthenticator> {
15806 if let Some(super::user_signature::Signature::Zklogin(field)) = &self
15807 .signature
15808 {
15809 Some(field as _)
15810 } else {
15811 None
15812 }
15813 }
15814 pub fn zklogin_opt_mut(&mut self) -> Option<&mut super::ZkLoginAuthenticator> {
15816 if let Some(super::user_signature::Signature::Zklogin(field)) = &mut self
15817 .signature
15818 {
15819 Some(field as _)
15820 } else {
15821 None
15822 }
15823 }
15824 pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginAuthenticator {
15828 if self.zklogin_opt_mut().is_none() {
15829 self.signature = Some(
15830 super::user_signature::Signature::Zklogin(
15831 super::ZkLoginAuthenticator::default(),
15832 ),
15833 );
15834 }
15835 self.zklogin_opt_mut().unwrap()
15836 }
15837 pub fn set_zklogin<T: Into<super::ZkLoginAuthenticator>>(&mut self, field: T) {
15840 self.signature = Some(
15841 super::user_signature::Signature::Zklogin(field.into().into()),
15842 );
15843 }
15844 pub fn with_zklogin<T: Into<super::ZkLoginAuthenticator>>(
15847 mut self,
15848 field: T,
15849 ) -> Self {
15850 self.set_zklogin(field.into());
15851 self
15852 }
15853 pub fn passkey(&self) -> &super::PasskeyAuthenticator {
15855 if let Some(super::user_signature::Signature::Passkey(field)) = &self
15856 .signature
15857 {
15858 field as _
15859 } else {
15860 super::PasskeyAuthenticator::default_instance() as _
15861 }
15862 }
15863 pub fn passkey_opt(&self) -> Option<&super::PasskeyAuthenticator> {
15865 if let Some(super::user_signature::Signature::Passkey(field)) = &self
15866 .signature
15867 {
15868 Some(field as _)
15869 } else {
15870 None
15871 }
15872 }
15873 pub fn passkey_opt_mut(&mut self) -> Option<&mut super::PasskeyAuthenticator> {
15875 if let Some(super::user_signature::Signature::Passkey(field)) = &mut self
15876 .signature
15877 {
15878 Some(field as _)
15879 } else {
15880 None
15881 }
15882 }
15883 pub fn passkey_mut(&mut self) -> &mut super::PasskeyAuthenticator {
15887 if self.passkey_opt_mut().is_none() {
15888 self.signature = Some(
15889 super::user_signature::Signature::Passkey(
15890 super::PasskeyAuthenticator::default(),
15891 ),
15892 );
15893 }
15894 self.passkey_opt_mut().unwrap()
15895 }
15896 pub fn set_passkey<T: Into<super::PasskeyAuthenticator>>(&mut self, field: T) {
15899 self.signature = Some(
15900 super::user_signature::Signature::Passkey(field.into().into()),
15901 );
15902 }
15903 pub fn with_passkey<T: Into<super::PasskeyAuthenticator>>(
15906 mut self,
15907 field: T,
15908 ) -> Self {
15909 self.set_passkey(field.into());
15910 self
15911 }
15912 }
15913 impl super::Validator {
15914 pub const fn const_default() -> Self {
15915 Self {
15916 name: None,
15917 address: None,
15918 description: None,
15919 image_url: None,
15920 project_url: None,
15921 protocol_public_key: None,
15922 proof_of_possession: None,
15923 network_public_key: None,
15924 worker_public_key: None,
15925 network_address: None,
15926 p2p_address: None,
15927 primary_address: None,
15928 worker_address: None,
15929 next_epoch_protocol_public_key: None,
15930 next_epoch_proof_of_possession: None,
15931 next_epoch_network_public_key: None,
15932 next_epoch_worker_public_key: None,
15933 next_epoch_network_address: None,
15934 next_epoch_p2p_address: None,
15935 next_epoch_primary_address: None,
15936 next_epoch_worker_address: None,
15937 metadata_extra_fields: None,
15938 voting_power: None,
15939 operation_cap_id: None,
15940 gas_price: None,
15941 staking_pool: None,
15942 commission_rate: None,
15943 next_epoch_stake: None,
15944 next_epoch_gas_price: None,
15945 next_epoch_commission_rate: None,
15946 extra_fields: None,
15947 }
15948 }
15949 #[doc(hidden)]
15950 pub fn default_instance() -> &'static Self {
15951 static DEFAULT: super::Validator = super::Validator::const_default();
15952 &DEFAULT
15953 }
15954 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
15956 self.name.as_mut().map(|field| field as _)
15957 }
15958 pub fn name_mut(&mut self) -> &mut String {
15961 self.name.get_or_insert_default()
15962 }
15963 pub fn name_opt(&self) -> Option<&str> {
15965 self.name.as_ref().map(|field| field as _)
15966 }
15967 pub fn set_name<T: Into<String>>(&mut self, field: T) {
15969 self.name = Some(field.into().into());
15970 }
15971 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
15973 self.set_name(field.into());
15974 self
15975 }
15976 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
15978 self.address.as_mut().map(|field| field as _)
15979 }
15980 pub fn address_mut(&mut self) -> &mut String {
15983 self.address.get_or_insert_default()
15984 }
15985 pub fn address_opt(&self) -> Option<&str> {
15987 self.address.as_ref().map(|field| field as _)
15988 }
15989 pub fn set_address<T: Into<String>>(&mut self, field: T) {
15991 self.address = Some(field.into().into());
15992 }
15993 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
15995 self.set_address(field.into());
15996 self
15997 }
15998 pub fn description_opt_mut(&mut self) -> Option<&mut String> {
16000 self.description.as_mut().map(|field| field as _)
16001 }
16002 pub fn description_mut(&mut self) -> &mut String {
16005 self.description.get_or_insert_default()
16006 }
16007 pub fn description_opt(&self) -> Option<&str> {
16009 self.description.as_ref().map(|field| field as _)
16010 }
16011 pub fn set_description<T: Into<String>>(&mut self, field: T) {
16013 self.description = Some(field.into().into());
16014 }
16015 pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
16017 self.set_description(field.into());
16018 self
16019 }
16020 pub fn image_url_opt_mut(&mut self) -> Option<&mut String> {
16022 self.image_url.as_mut().map(|field| field as _)
16023 }
16024 pub fn image_url_mut(&mut self) -> &mut String {
16027 self.image_url.get_or_insert_default()
16028 }
16029 pub fn image_url_opt(&self) -> Option<&str> {
16031 self.image_url.as_ref().map(|field| field as _)
16032 }
16033 pub fn set_image_url<T: Into<String>>(&mut self, field: T) {
16035 self.image_url = Some(field.into().into());
16036 }
16037 pub fn with_image_url<T: Into<String>>(mut self, field: T) -> Self {
16039 self.set_image_url(field.into());
16040 self
16041 }
16042 pub fn project_url_opt_mut(&mut self) -> Option<&mut String> {
16044 self.project_url.as_mut().map(|field| field as _)
16045 }
16046 pub fn project_url_mut(&mut self) -> &mut String {
16049 self.project_url.get_or_insert_default()
16050 }
16051 pub fn project_url_opt(&self) -> Option<&str> {
16053 self.project_url.as_ref().map(|field| field as _)
16054 }
16055 pub fn set_project_url<T: Into<String>>(&mut self, field: T) {
16057 self.project_url = Some(field.into().into());
16058 }
16059 pub fn with_project_url<T: Into<String>>(mut self, field: T) -> Self {
16061 self.set_project_url(field.into());
16062 self
16063 }
16064 pub fn protocol_public_key_opt(&self) -> Option<&[u8]> {
16066 self.protocol_public_key.as_ref().map(|field| field as _)
16067 }
16068 pub fn set_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
16070 &mut self,
16071 field: T,
16072 ) {
16073 self.protocol_public_key = Some(field.into().into());
16074 }
16075 pub fn with_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
16077 mut self,
16078 field: T,
16079 ) -> Self {
16080 self.set_protocol_public_key(field.into());
16081 self
16082 }
16083 pub fn proof_of_possession_opt(&self) -> Option<&[u8]> {
16085 self.proof_of_possession.as_ref().map(|field| field as _)
16086 }
16087 pub fn set_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
16089 &mut self,
16090 field: T,
16091 ) {
16092 self.proof_of_possession = Some(field.into().into());
16093 }
16094 pub fn with_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
16096 mut self,
16097 field: T,
16098 ) -> Self {
16099 self.set_proof_of_possession(field.into());
16100 self
16101 }
16102 pub fn network_public_key_opt(&self) -> Option<&[u8]> {
16104 self.network_public_key.as_ref().map(|field| field as _)
16105 }
16106 pub fn set_network_public_key<T: Into<::prost::bytes::Bytes>>(
16108 &mut self,
16109 field: T,
16110 ) {
16111 self.network_public_key = Some(field.into().into());
16112 }
16113 pub fn with_network_public_key<T: Into<::prost::bytes::Bytes>>(
16115 mut self,
16116 field: T,
16117 ) -> Self {
16118 self.set_network_public_key(field.into());
16119 self
16120 }
16121 pub fn worker_public_key_opt(&self) -> Option<&[u8]> {
16123 self.worker_public_key.as_ref().map(|field| field as _)
16124 }
16125 pub fn set_worker_public_key<T: Into<::prost::bytes::Bytes>>(
16127 &mut self,
16128 field: T,
16129 ) {
16130 self.worker_public_key = Some(field.into().into());
16131 }
16132 pub fn with_worker_public_key<T: Into<::prost::bytes::Bytes>>(
16134 mut self,
16135 field: T,
16136 ) -> Self {
16137 self.set_worker_public_key(field.into());
16138 self
16139 }
16140 pub fn network_address_opt_mut(&mut self) -> Option<&mut String> {
16142 self.network_address.as_mut().map(|field| field as _)
16143 }
16144 pub fn network_address_mut(&mut self) -> &mut String {
16147 self.network_address.get_or_insert_default()
16148 }
16149 pub fn network_address_opt(&self) -> Option<&str> {
16151 self.network_address.as_ref().map(|field| field as _)
16152 }
16153 pub fn set_network_address<T: Into<String>>(&mut self, field: T) {
16155 self.network_address = Some(field.into().into());
16156 }
16157 pub fn with_network_address<T: Into<String>>(mut self, field: T) -> Self {
16159 self.set_network_address(field.into());
16160 self
16161 }
16162 pub fn p2p_address_opt_mut(&mut self) -> Option<&mut String> {
16164 self.p2p_address.as_mut().map(|field| field as _)
16165 }
16166 pub fn p2p_address_mut(&mut self) -> &mut String {
16169 self.p2p_address.get_or_insert_default()
16170 }
16171 pub fn p2p_address_opt(&self) -> Option<&str> {
16173 self.p2p_address.as_ref().map(|field| field as _)
16174 }
16175 pub fn set_p2p_address<T: Into<String>>(&mut self, field: T) {
16177 self.p2p_address = Some(field.into().into());
16178 }
16179 pub fn with_p2p_address<T: Into<String>>(mut self, field: T) -> Self {
16181 self.set_p2p_address(field.into());
16182 self
16183 }
16184 pub fn primary_address_opt_mut(&mut self) -> Option<&mut String> {
16186 self.primary_address.as_mut().map(|field| field as _)
16187 }
16188 pub fn primary_address_mut(&mut self) -> &mut String {
16191 self.primary_address.get_or_insert_default()
16192 }
16193 pub fn primary_address_opt(&self) -> Option<&str> {
16195 self.primary_address.as_ref().map(|field| field as _)
16196 }
16197 pub fn set_primary_address<T: Into<String>>(&mut self, field: T) {
16199 self.primary_address = Some(field.into().into());
16200 }
16201 pub fn with_primary_address<T: Into<String>>(mut self, field: T) -> Self {
16203 self.set_primary_address(field.into());
16204 self
16205 }
16206 pub fn worker_address_opt_mut(&mut self) -> Option<&mut String> {
16208 self.worker_address.as_mut().map(|field| field as _)
16209 }
16210 pub fn worker_address_mut(&mut self) -> &mut String {
16213 self.worker_address.get_or_insert_default()
16214 }
16215 pub fn worker_address_opt(&self) -> Option<&str> {
16217 self.worker_address.as_ref().map(|field| field as _)
16218 }
16219 pub fn set_worker_address<T: Into<String>>(&mut self, field: T) {
16221 self.worker_address = Some(field.into().into());
16222 }
16223 pub fn with_worker_address<T: Into<String>>(mut self, field: T) -> Self {
16225 self.set_worker_address(field.into());
16226 self
16227 }
16228 pub fn next_epoch_protocol_public_key_opt(&self) -> Option<&[u8]> {
16230 self.next_epoch_protocol_public_key.as_ref().map(|field| field as _)
16231 }
16232 pub fn set_next_epoch_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
16234 &mut self,
16235 field: T,
16236 ) {
16237 self.next_epoch_protocol_public_key = Some(field.into().into());
16238 }
16239 pub fn with_next_epoch_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
16241 mut self,
16242 field: T,
16243 ) -> Self {
16244 self.set_next_epoch_protocol_public_key(field.into());
16245 self
16246 }
16247 pub fn next_epoch_proof_of_possession_opt(&self) -> Option<&[u8]> {
16249 self.next_epoch_proof_of_possession.as_ref().map(|field| field as _)
16250 }
16251 pub fn set_next_epoch_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
16253 &mut self,
16254 field: T,
16255 ) {
16256 self.next_epoch_proof_of_possession = Some(field.into().into());
16257 }
16258 pub fn with_next_epoch_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
16260 mut self,
16261 field: T,
16262 ) -> Self {
16263 self.set_next_epoch_proof_of_possession(field.into());
16264 self
16265 }
16266 pub fn next_epoch_network_public_key_opt(&self) -> Option<&[u8]> {
16268 self.next_epoch_network_public_key.as_ref().map(|field| field as _)
16269 }
16270 pub fn set_next_epoch_network_public_key<T: Into<::prost::bytes::Bytes>>(
16272 &mut self,
16273 field: T,
16274 ) {
16275 self.next_epoch_network_public_key = Some(field.into().into());
16276 }
16277 pub fn with_next_epoch_network_public_key<T: Into<::prost::bytes::Bytes>>(
16279 mut self,
16280 field: T,
16281 ) -> Self {
16282 self.set_next_epoch_network_public_key(field.into());
16283 self
16284 }
16285 pub fn next_epoch_worker_public_key_opt(&self) -> Option<&[u8]> {
16287 self.next_epoch_worker_public_key.as_ref().map(|field| field as _)
16288 }
16289 pub fn set_next_epoch_worker_public_key<T: Into<::prost::bytes::Bytes>>(
16291 &mut self,
16292 field: T,
16293 ) {
16294 self.next_epoch_worker_public_key = Some(field.into().into());
16295 }
16296 pub fn with_next_epoch_worker_public_key<T: Into<::prost::bytes::Bytes>>(
16298 mut self,
16299 field: T,
16300 ) -> Self {
16301 self.set_next_epoch_worker_public_key(field.into());
16302 self
16303 }
16304 pub fn next_epoch_network_address_opt_mut(&mut self) -> Option<&mut String> {
16306 self.next_epoch_network_address.as_mut().map(|field| field as _)
16307 }
16308 pub fn next_epoch_network_address_mut(&mut self) -> &mut String {
16311 self.next_epoch_network_address.get_or_insert_default()
16312 }
16313 pub fn next_epoch_network_address_opt(&self) -> Option<&str> {
16315 self.next_epoch_network_address.as_ref().map(|field| field as _)
16316 }
16317 pub fn set_next_epoch_network_address<T: Into<String>>(&mut self, field: T) {
16319 self.next_epoch_network_address = Some(field.into().into());
16320 }
16321 pub fn with_next_epoch_network_address<T: Into<String>>(
16323 mut self,
16324 field: T,
16325 ) -> Self {
16326 self.set_next_epoch_network_address(field.into());
16327 self
16328 }
16329 pub fn next_epoch_p2p_address_opt_mut(&mut self) -> Option<&mut String> {
16331 self.next_epoch_p2p_address.as_mut().map(|field| field as _)
16332 }
16333 pub fn next_epoch_p2p_address_mut(&mut self) -> &mut String {
16336 self.next_epoch_p2p_address.get_or_insert_default()
16337 }
16338 pub fn next_epoch_p2p_address_opt(&self) -> Option<&str> {
16340 self.next_epoch_p2p_address.as_ref().map(|field| field as _)
16341 }
16342 pub fn set_next_epoch_p2p_address<T: Into<String>>(&mut self, field: T) {
16344 self.next_epoch_p2p_address = Some(field.into().into());
16345 }
16346 pub fn with_next_epoch_p2p_address<T: Into<String>>(mut self, field: T) -> Self {
16348 self.set_next_epoch_p2p_address(field.into());
16349 self
16350 }
16351 pub fn next_epoch_primary_address_opt_mut(&mut self) -> Option<&mut String> {
16353 self.next_epoch_primary_address.as_mut().map(|field| field as _)
16354 }
16355 pub fn next_epoch_primary_address_mut(&mut self) -> &mut String {
16358 self.next_epoch_primary_address.get_or_insert_default()
16359 }
16360 pub fn next_epoch_primary_address_opt(&self) -> Option<&str> {
16362 self.next_epoch_primary_address.as_ref().map(|field| field as _)
16363 }
16364 pub fn set_next_epoch_primary_address<T: Into<String>>(&mut self, field: T) {
16366 self.next_epoch_primary_address = Some(field.into().into());
16367 }
16368 pub fn with_next_epoch_primary_address<T: Into<String>>(
16370 mut self,
16371 field: T,
16372 ) -> Self {
16373 self.set_next_epoch_primary_address(field.into());
16374 self
16375 }
16376 pub fn next_epoch_worker_address_opt_mut(&mut self) -> Option<&mut String> {
16378 self.next_epoch_worker_address.as_mut().map(|field| field as _)
16379 }
16380 pub fn next_epoch_worker_address_mut(&mut self) -> &mut String {
16383 self.next_epoch_worker_address.get_or_insert_default()
16384 }
16385 pub fn next_epoch_worker_address_opt(&self) -> Option<&str> {
16387 self.next_epoch_worker_address.as_ref().map(|field| field as _)
16388 }
16389 pub fn set_next_epoch_worker_address<T: Into<String>>(&mut self, field: T) {
16391 self.next_epoch_worker_address = Some(field.into().into());
16392 }
16393 pub fn with_next_epoch_worker_address<T: Into<String>>(
16395 mut self,
16396 field: T,
16397 ) -> Self {
16398 self.set_next_epoch_worker_address(field.into());
16399 self
16400 }
16401 pub fn metadata_extra_fields(&self) -> &super::MoveTable {
16403 self.metadata_extra_fields
16404 .as_ref()
16405 .map(|field| field as _)
16406 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16407 }
16408 pub fn metadata_extra_fields_opt_mut(
16410 &mut self,
16411 ) -> Option<&mut super::MoveTable> {
16412 self.metadata_extra_fields.as_mut().map(|field| field as _)
16413 }
16414 pub fn metadata_extra_fields_mut(&mut self) -> &mut super::MoveTable {
16417 self.metadata_extra_fields.get_or_insert_default()
16418 }
16419 pub fn metadata_extra_fields_opt(&self) -> Option<&super::MoveTable> {
16421 self.metadata_extra_fields.as_ref().map(|field| field as _)
16422 }
16423 pub fn set_metadata_extra_fields<T: Into<super::MoveTable>>(
16425 &mut self,
16426 field: T,
16427 ) {
16428 self.metadata_extra_fields = Some(field.into().into());
16429 }
16430 pub fn with_metadata_extra_fields<T: Into<super::MoveTable>>(
16432 mut self,
16433 field: T,
16434 ) -> Self {
16435 self.set_metadata_extra_fields(field.into());
16436 self
16437 }
16438 pub fn voting_power_opt_mut(&mut self) -> Option<&mut u64> {
16440 self.voting_power.as_mut().map(|field| field as _)
16441 }
16442 pub fn voting_power_mut(&mut self) -> &mut u64 {
16445 self.voting_power.get_or_insert_default()
16446 }
16447 pub fn voting_power_opt(&self) -> Option<u64> {
16449 self.voting_power.as_ref().map(|field| *field)
16450 }
16451 pub fn set_voting_power(&mut self, field: u64) {
16453 self.voting_power = Some(field);
16454 }
16455 pub fn with_voting_power(mut self, field: u64) -> Self {
16457 self.set_voting_power(field);
16458 self
16459 }
16460 pub fn operation_cap_id_opt_mut(&mut self) -> Option<&mut String> {
16462 self.operation_cap_id.as_mut().map(|field| field as _)
16463 }
16464 pub fn operation_cap_id_mut(&mut self) -> &mut String {
16467 self.operation_cap_id.get_or_insert_default()
16468 }
16469 pub fn operation_cap_id_opt(&self) -> Option<&str> {
16471 self.operation_cap_id.as_ref().map(|field| field as _)
16472 }
16473 pub fn set_operation_cap_id<T: Into<String>>(&mut self, field: T) {
16475 self.operation_cap_id = Some(field.into().into());
16476 }
16477 pub fn with_operation_cap_id<T: Into<String>>(mut self, field: T) -> Self {
16479 self.set_operation_cap_id(field.into());
16480 self
16481 }
16482 pub fn gas_price_opt_mut(&mut self) -> Option<&mut u64> {
16484 self.gas_price.as_mut().map(|field| field as _)
16485 }
16486 pub fn gas_price_mut(&mut self) -> &mut u64 {
16489 self.gas_price.get_or_insert_default()
16490 }
16491 pub fn gas_price_opt(&self) -> Option<u64> {
16493 self.gas_price.as_ref().map(|field| *field)
16494 }
16495 pub fn set_gas_price(&mut self, field: u64) {
16497 self.gas_price = Some(field);
16498 }
16499 pub fn with_gas_price(mut self, field: u64) -> Self {
16501 self.set_gas_price(field);
16502 self
16503 }
16504 pub fn staking_pool(&self) -> &super::StakingPool {
16506 self.staking_pool
16507 .as_ref()
16508 .map(|field| field as _)
16509 .unwrap_or_else(|| super::StakingPool::default_instance() as _)
16510 }
16511 pub fn staking_pool_opt_mut(&mut self) -> Option<&mut super::StakingPool> {
16513 self.staking_pool.as_mut().map(|field| field as _)
16514 }
16515 pub fn staking_pool_mut(&mut self) -> &mut super::StakingPool {
16518 self.staking_pool.get_or_insert_default()
16519 }
16520 pub fn staking_pool_opt(&self) -> Option<&super::StakingPool> {
16522 self.staking_pool.as_ref().map(|field| field as _)
16523 }
16524 pub fn set_staking_pool<T: Into<super::StakingPool>>(&mut self, field: T) {
16526 self.staking_pool = Some(field.into().into());
16527 }
16528 pub fn with_staking_pool<T: Into<super::StakingPool>>(
16530 mut self,
16531 field: T,
16532 ) -> Self {
16533 self.set_staking_pool(field.into());
16534 self
16535 }
16536 pub fn commission_rate_opt_mut(&mut self) -> Option<&mut u64> {
16538 self.commission_rate.as_mut().map(|field| field as _)
16539 }
16540 pub fn commission_rate_mut(&mut self) -> &mut u64 {
16543 self.commission_rate.get_or_insert_default()
16544 }
16545 pub fn commission_rate_opt(&self) -> Option<u64> {
16547 self.commission_rate.as_ref().map(|field| *field)
16548 }
16549 pub fn set_commission_rate(&mut self, field: u64) {
16551 self.commission_rate = Some(field);
16552 }
16553 pub fn with_commission_rate(mut self, field: u64) -> Self {
16555 self.set_commission_rate(field);
16556 self
16557 }
16558 pub fn next_epoch_stake_opt_mut(&mut self) -> Option<&mut u64> {
16560 self.next_epoch_stake.as_mut().map(|field| field as _)
16561 }
16562 pub fn next_epoch_stake_mut(&mut self) -> &mut u64 {
16565 self.next_epoch_stake.get_or_insert_default()
16566 }
16567 pub fn next_epoch_stake_opt(&self) -> Option<u64> {
16569 self.next_epoch_stake.as_ref().map(|field| *field)
16570 }
16571 pub fn set_next_epoch_stake(&mut self, field: u64) {
16573 self.next_epoch_stake = Some(field);
16574 }
16575 pub fn with_next_epoch_stake(mut self, field: u64) -> Self {
16577 self.set_next_epoch_stake(field);
16578 self
16579 }
16580 pub fn next_epoch_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
16582 self.next_epoch_gas_price.as_mut().map(|field| field as _)
16583 }
16584 pub fn next_epoch_gas_price_mut(&mut self) -> &mut u64 {
16587 self.next_epoch_gas_price.get_or_insert_default()
16588 }
16589 pub fn next_epoch_gas_price_opt(&self) -> Option<u64> {
16591 self.next_epoch_gas_price.as_ref().map(|field| *field)
16592 }
16593 pub fn set_next_epoch_gas_price(&mut self, field: u64) {
16595 self.next_epoch_gas_price = Some(field);
16596 }
16597 pub fn with_next_epoch_gas_price(mut self, field: u64) -> Self {
16599 self.set_next_epoch_gas_price(field);
16600 self
16601 }
16602 pub fn next_epoch_commission_rate_opt_mut(&mut self) -> Option<&mut u64> {
16604 self.next_epoch_commission_rate.as_mut().map(|field| field as _)
16605 }
16606 pub fn next_epoch_commission_rate_mut(&mut self) -> &mut u64 {
16609 self.next_epoch_commission_rate.get_or_insert_default()
16610 }
16611 pub fn next_epoch_commission_rate_opt(&self) -> Option<u64> {
16613 self.next_epoch_commission_rate.as_ref().map(|field| *field)
16614 }
16615 pub fn set_next_epoch_commission_rate(&mut self, field: u64) {
16617 self.next_epoch_commission_rate = Some(field);
16618 }
16619 pub fn with_next_epoch_commission_rate(mut self, field: u64) -> Self {
16621 self.set_next_epoch_commission_rate(field);
16622 self
16623 }
16624 pub fn extra_fields(&self) -> &super::MoveTable {
16626 self.extra_fields
16627 .as_ref()
16628 .map(|field| field as _)
16629 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16630 }
16631 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
16633 self.extra_fields.as_mut().map(|field| field as _)
16634 }
16635 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
16638 self.extra_fields.get_or_insert_default()
16639 }
16640 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
16642 self.extra_fields.as_ref().map(|field| field as _)
16643 }
16644 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
16646 self.extra_fields = Some(field.into().into());
16647 }
16648 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
16650 self.set_extra_fields(field.into());
16651 self
16652 }
16653 }
16654 impl super::ValidatorAggregatedSignature {
16655 pub const fn const_default() -> Self {
16656 Self {
16657 epoch: None,
16658 signature: None,
16659 bitmap: None,
16660 }
16661 }
16662 #[doc(hidden)]
16663 pub fn default_instance() -> &'static Self {
16664 static DEFAULT: super::ValidatorAggregatedSignature = super::ValidatorAggregatedSignature::const_default();
16665 &DEFAULT
16666 }
16667 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
16669 self.epoch.as_mut().map(|field| field as _)
16670 }
16671 pub fn epoch_mut(&mut self) -> &mut u64 {
16674 self.epoch.get_or_insert_default()
16675 }
16676 pub fn epoch_opt(&self) -> Option<u64> {
16678 self.epoch.as_ref().map(|field| *field)
16679 }
16680 pub fn set_epoch(&mut self, field: u64) {
16682 self.epoch = Some(field);
16683 }
16684 pub fn with_epoch(mut self, field: u64) -> Self {
16686 self.set_epoch(field);
16687 self
16688 }
16689 pub fn signature_opt(&self) -> Option<&[u8]> {
16691 self.signature.as_ref().map(|field| field as _)
16692 }
16693 pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16695 self.signature = Some(field.into().into());
16696 }
16697 pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
16699 mut self,
16700 field: T,
16701 ) -> Self {
16702 self.set_signature(field.into());
16703 self
16704 }
16705 pub fn bitmap_opt(&self) -> Option<&[u8]> {
16707 self.bitmap.as_ref().map(|field| field as _)
16708 }
16709 pub fn set_bitmap<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16711 self.bitmap = Some(field.into().into());
16712 }
16713 pub fn with_bitmap<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
16715 self.set_bitmap(field.into());
16716 self
16717 }
16718 }
16719 impl super::ValidatorCommittee {
16720 pub const fn const_default() -> Self {
16721 Self {
16722 epoch: None,
16723 members: Vec::new(),
16724 }
16725 }
16726 #[doc(hidden)]
16727 pub fn default_instance() -> &'static Self {
16728 static DEFAULT: super::ValidatorCommittee = super::ValidatorCommittee::const_default();
16729 &DEFAULT
16730 }
16731 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
16733 self.epoch.as_mut().map(|field| field as _)
16734 }
16735 pub fn epoch_mut(&mut self) -> &mut u64 {
16738 self.epoch.get_or_insert_default()
16739 }
16740 pub fn epoch_opt(&self) -> Option<u64> {
16742 self.epoch.as_ref().map(|field| *field)
16743 }
16744 pub fn set_epoch(&mut self, field: u64) {
16746 self.epoch = Some(field);
16747 }
16748 pub fn with_epoch(mut self, field: u64) -> Self {
16750 self.set_epoch(field);
16751 self
16752 }
16753 pub fn members(&self) -> &[super::ValidatorCommitteeMember] {
16755 &self.members
16756 }
16757 pub fn members_mut(&mut self) -> &mut Vec<super::ValidatorCommitteeMember> {
16760 &mut self.members
16761 }
16762 pub fn set_members(&mut self, field: Vec<super::ValidatorCommitteeMember>) {
16764 self.members = field;
16765 }
16766 pub fn with_members(
16768 mut self,
16769 field: Vec<super::ValidatorCommitteeMember>,
16770 ) -> Self {
16771 self.set_members(field);
16772 self
16773 }
16774 }
16775 impl super::ValidatorCommitteeMember {
16776 pub const fn const_default() -> Self {
16777 Self {
16778 public_key: None,
16779 weight: None,
16780 }
16781 }
16782 #[doc(hidden)]
16783 pub fn default_instance() -> &'static Self {
16784 static DEFAULT: super::ValidatorCommitteeMember = super::ValidatorCommitteeMember::const_default();
16785 &DEFAULT
16786 }
16787 pub fn public_key_opt(&self) -> Option<&[u8]> {
16789 self.public_key.as_ref().map(|field| field as _)
16790 }
16791 pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16793 self.public_key = Some(field.into().into());
16794 }
16795 pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
16797 mut self,
16798 field: T,
16799 ) -> Self {
16800 self.set_public_key(field.into());
16801 self
16802 }
16803 pub fn weight_opt_mut(&mut self) -> Option<&mut u64> {
16805 self.weight.as_mut().map(|field| field as _)
16806 }
16807 pub fn weight_mut(&mut self) -> &mut u64 {
16810 self.weight.get_or_insert_default()
16811 }
16812 pub fn weight_opt(&self) -> Option<u64> {
16814 self.weight.as_ref().map(|field| *field)
16815 }
16816 pub fn set_weight(&mut self, field: u64) {
16818 self.weight = Some(field);
16819 }
16820 pub fn with_weight(mut self, field: u64) -> Self {
16822 self.set_weight(field);
16823 self
16824 }
16825 }
16826 impl super::ValidatorExecutionTimeObservation {
16827 pub const fn const_default() -> Self {
16828 Self {
16829 validator: None,
16830 duration: None,
16831 }
16832 }
16833 #[doc(hidden)]
16834 pub fn default_instance() -> &'static Self {
16835 static DEFAULT: super::ValidatorExecutionTimeObservation = super::ValidatorExecutionTimeObservation::const_default();
16836 &DEFAULT
16837 }
16838 pub fn validator_opt(&self) -> Option<&[u8]> {
16840 self.validator.as_ref().map(|field| field as _)
16841 }
16842 pub fn set_validator<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16844 self.validator = Some(field.into().into());
16845 }
16846 pub fn with_validator<T: Into<::prost::bytes::Bytes>>(
16848 mut self,
16849 field: T,
16850 ) -> Self {
16851 self.set_validator(field.into());
16852 self
16853 }
16854 pub fn duration_opt_mut(&mut self) -> Option<&mut ::prost_types::Duration> {
16856 self.duration.as_mut().map(|field| field as _)
16857 }
16858 pub fn duration_mut(&mut self) -> &mut ::prost_types::Duration {
16861 self.duration.get_or_insert_default()
16862 }
16863 pub fn duration_opt(&self) -> Option<&::prost_types::Duration> {
16865 self.duration.as_ref().map(|field| field as _)
16866 }
16867 pub fn set_duration<T: Into<::prost_types::Duration>>(&mut self, field: T) {
16869 self.duration = Some(field.into().into());
16870 }
16871 pub fn with_duration<T: Into<::prost_types::Duration>>(
16873 mut self,
16874 field: T,
16875 ) -> Self {
16876 self.set_duration(field.into());
16877 self
16878 }
16879 }
16880 impl super::ValidatorReportRecord {
16881 pub const fn const_default() -> Self {
16882 Self {
16883 reported: None,
16884 reporters: Vec::new(),
16885 }
16886 }
16887 #[doc(hidden)]
16888 pub fn default_instance() -> &'static Self {
16889 static DEFAULT: super::ValidatorReportRecord = super::ValidatorReportRecord::const_default();
16890 &DEFAULT
16891 }
16892 pub fn reported_opt_mut(&mut self) -> Option<&mut String> {
16894 self.reported.as_mut().map(|field| field as _)
16895 }
16896 pub fn reported_mut(&mut self) -> &mut String {
16899 self.reported.get_or_insert_default()
16900 }
16901 pub fn reported_opt(&self) -> Option<&str> {
16903 self.reported.as_ref().map(|field| field as _)
16904 }
16905 pub fn set_reported<T: Into<String>>(&mut self, field: T) {
16907 self.reported = Some(field.into().into());
16908 }
16909 pub fn with_reported<T: Into<String>>(mut self, field: T) -> Self {
16911 self.set_reported(field.into());
16912 self
16913 }
16914 pub fn reporters(&self) -> &[String] {
16916 &self.reporters
16917 }
16918 pub fn reporters_mut(&mut self) -> &mut Vec<String> {
16921 &mut self.reporters
16922 }
16923 pub fn set_reporters(&mut self, field: Vec<String>) {
16925 self.reporters = field;
16926 }
16927 pub fn with_reporters(mut self, field: Vec<String>) -> Self {
16929 self.set_reporters(field);
16930 self
16931 }
16932 }
16933 impl super::ValidatorSet {
16934 pub const fn const_default() -> Self {
16935 Self {
16936 total_stake: None,
16937 active_validators: Vec::new(),
16938 pending_active_validators: None,
16939 pending_removals: Vec::new(),
16940 staking_pool_mappings: None,
16941 inactive_validators: None,
16942 validator_candidates: None,
16943 at_risk_validators: std::collections::BTreeMap::new(),
16944 extra_fields: None,
16945 }
16946 }
16947 #[doc(hidden)]
16948 pub fn default_instance() -> &'static Self {
16949 static DEFAULT: super::ValidatorSet = super::ValidatorSet::const_default();
16950 &DEFAULT
16951 }
16952 pub fn total_stake_opt_mut(&mut self) -> Option<&mut u64> {
16954 self.total_stake.as_mut().map(|field| field as _)
16955 }
16956 pub fn total_stake_mut(&mut self) -> &mut u64 {
16959 self.total_stake.get_or_insert_default()
16960 }
16961 pub fn total_stake_opt(&self) -> Option<u64> {
16963 self.total_stake.as_ref().map(|field| *field)
16964 }
16965 pub fn set_total_stake(&mut self, field: u64) {
16967 self.total_stake = Some(field);
16968 }
16969 pub fn with_total_stake(mut self, field: u64) -> Self {
16971 self.set_total_stake(field);
16972 self
16973 }
16974 pub fn active_validators(&self) -> &[super::Validator] {
16976 &self.active_validators
16977 }
16978 pub fn active_validators_mut(&mut self) -> &mut Vec<super::Validator> {
16981 &mut self.active_validators
16982 }
16983 pub fn set_active_validators(&mut self, field: Vec<super::Validator>) {
16985 self.active_validators = field;
16986 }
16987 pub fn with_active_validators(mut self, field: Vec<super::Validator>) -> Self {
16989 self.set_active_validators(field);
16990 self
16991 }
16992 pub fn pending_active_validators(&self) -> &super::MoveTable {
16994 self.pending_active_validators
16995 .as_ref()
16996 .map(|field| field as _)
16997 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16998 }
16999 pub fn pending_active_validators_opt_mut(
17001 &mut self,
17002 ) -> Option<&mut super::MoveTable> {
17003 self.pending_active_validators.as_mut().map(|field| field as _)
17004 }
17005 pub fn pending_active_validators_mut(&mut self) -> &mut super::MoveTable {
17008 self.pending_active_validators.get_or_insert_default()
17009 }
17010 pub fn pending_active_validators_opt(&self) -> Option<&super::MoveTable> {
17012 self.pending_active_validators.as_ref().map(|field| field as _)
17013 }
17014 pub fn set_pending_active_validators<T: Into<super::MoveTable>>(
17016 &mut self,
17017 field: T,
17018 ) {
17019 self.pending_active_validators = Some(field.into().into());
17020 }
17021 pub fn with_pending_active_validators<T: Into<super::MoveTable>>(
17023 mut self,
17024 field: T,
17025 ) -> Self {
17026 self.set_pending_active_validators(field.into());
17027 self
17028 }
17029 pub fn pending_removals(&self) -> &[u64] {
17031 &self.pending_removals
17032 }
17033 pub fn pending_removals_mut(&mut self) -> &mut Vec<u64> {
17036 &mut self.pending_removals
17037 }
17038 pub fn set_pending_removals(&mut self, field: Vec<u64>) {
17040 self.pending_removals = field;
17041 }
17042 pub fn with_pending_removals(mut self, field: Vec<u64>) -> Self {
17044 self.set_pending_removals(field);
17045 self
17046 }
17047 pub fn staking_pool_mappings(&self) -> &super::MoveTable {
17049 self.staking_pool_mappings
17050 .as_ref()
17051 .map(|field| field as _)
17052 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17053 }
17054 pub fn staking_pool_mappings_opt_mut(
17056 &mut self,
17057 ) -> Option<&mut super::MoveTable> {
17058 self.staking_pool_mappings.as_mut().map(|field| field as _)
17059 }
17060 pub fn staking_pool_mappings_mut(&mut self) -> &mut super::MoveTable {
17063 self.staking_pool_mappings.get_or_insert_default()
17064 }
17065 pub fn staking_pool_mappings_opt(&self) -> Option<&super::MoveTable> {
17067 self.staking_pool_mappings.as_ref().map(|field| field as _)
17068 }
17069 pub fn set_staking_pool_mappings<T: Into<super::MoveTable>>(
17071 &mut self,
17072 field: T,
17073 ) {
17074 self.staking_pool_mappings = Some(field.into().into());
17075 }
17076 pub fn with_staking_pool_mappings<T: Into<super::MoveTable>>(
17078 mut self,
17079 field: T,
17080 ) -> Self {
17081 self.set_staking_pool_mappings(field.into());
17082 self
17083 }
17084 pub fn inactive_validators(&self) -> &super::MoveTable {
17086 self.inactive_validators
17087 .as_ref()
17088 .map(|field| field as _)
17089 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17090 }
17091 pub fn inactive_validators_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
17093 self.inactive_validators.as_mut().map(|field| field as _)
17094 }
17095 pub fn inactive_validators_mut(&mut self) -> &mut super::MoveTable {
17098 self.inactive_validators.get_or_insert_default()
17099 }
17100 pub fn inactive_validators_opt(&self) -> Option<&super::MoveTable> {
17102 self.inactive_validators.as_ref().map(|field| field as _)
17103 }
17104 pub fn set_inactive_validators<T: Into<super::MoveTable>>(&mut self, field: T) {
17106 self.inactive_validators = Some(field.into().into());
17107 }
17108 pub fn with_inactive_validators<T: Into<super::MoveTable>>(
17110 mut self,
17111 field: T,
17112 ) -> Self {
17113 self.set_inactive_validators(field.into());
17114 self
17115 }
17116 pub fn validator_candidates(&self) -> &super::MoveTable {
17118 self.validator_candidates
17119 .as_ref()
17120 .map(|field| field as _)
17121 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17122 }
17123 pub fn validator_candidates_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
17125 self.validator_candidates.as_mut().map(|field| field as _)
17126 }
17127 pub fn validator_candidates_mut(&mut self) -> &mut super::MoveTable {
17130 self.validator_candidates.get_or_insert_default()
17131 }
17132 pub fn validator_candidates_opt(&self) -> Option<&super::MoveTable> {
17134 self.validator_candidates.as_ref().map(|field| field as _)
17135 }
17136 pub fn set_validator_candidates<T: Into<super::MoveTable>>(&mut self, field: T) {
17138 self.validator_candidates = Some(field.into().into());
17139 }
17140 pub fn with_validator_candidates<T: Into<super::MoveTable>>(
17142 mut self,
17143 field: T,
17144 ) -> Self {
17145 self.set_validator_candidates(field.into());
17146 self
17147 }
17148 pub fn at_risk_validators(&self) -> &::std::collections::BTreeMap<String, u64> {
17150 &self.at_risk_validators
17151 }
17152 pub fn at_risk_validators_mut(
17155 &mut self,
17156 ) -> &mut ::std::collections::BTreeMap<String, u64> {
17157 &mut self.at_risk_validators
17158 }
17159 pub fn set_at_risk_validators(
17161 &mut self,
17162 field: ::std::collections::BTreeMap<String, u64>,
17163 ) {
17164 self.at_risk_validators = field;
17165 }
17166 pub fn with_at_risk_validators(
17168 mut self,
17169 field: ::std::collections::BTreeMap<String, u64>,
17170 ) -> Self {
17171 self.set_at_risk_validators(field);
17172 self
17173 }
17174 pub fn extra_fields(&self) -> &super::MoveTable {
17176 self.extra_fields
17177 .as_ref()
17178 .map(|field| field as _)
17179 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17180 }
17181 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
17183 self.extra_fields.as_mut().map(|field| field as _)
17184 }
17185 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
17188 self.extra_fields.get_or_insert_default()
17189 }
17190 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
17192 self.extra_fields.as_ref().map(|field| field as _)
17193 }
17194 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
17196 self.extra_fields = Some(field.into().into());
17197 }
17198 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
17200 self.set_extra_fields(field.into());
17201 self
17202 }
17203 }
17204 impl super::VariantDescriptor {
17205 pub const fn const_default() -> Self {
17206 Self {
17207 name: None,
17208 position: None,
17209 fields: Vec::new(),
17210 }
17211 }
17212 #[doc(hidden)]
17213 pub fn default_instance() -> &'static Self {
17214 static DEFAULT: super::VariantDescriptor = super::VariantDescriptor::const_default();
17215 &DEFAULT
17216 }
17217 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
17219 self.name.as_mut().map(|field| field as _)
17220 }
17221 pub fn name_mut(&mut self) -> &mut String {
17224 self.name.get_or_insert_default()
17225 }
17226 pub fn name_opt(&self) -> Option<&str> {
17228 self.name.as_ref().map(|field| field as _)
17229 }
17230 pub fn set_name<T: Into<String>>(&mut self, field: T) {
17232 self.name = Some(field.into().into());
17233 }
17234 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
17236 self.set_name(field.into());
17237 self
17238 }
17239 pub fn position_opt_mut(&mut self) -> Option<&mut u32> {
17241 self.position.as_mut().map(|field| field as _)
17242 }
17243 pub fn position_mut(&mut self) -> &mut u32 {
17246 self.position.get_or_insert_default()
17247 }
17248 pub fn position_opt(&self) -> Option<u32> {
17250 self.position.as_ref().map(|field| *field)
17251 }
17252 pub fn set_position(&mut self, field: u32) {
17254 self.position = Some(field);
17255 }
17256 pub fn with_position(mut self, field: u32) -> Self {
17258 self.set_position(field);
17259 self
17260 }
17261 pub fn fields(&self) -> &[super::FieldDescriptor] {
17263 &self.fields
17264 }
17265 pub fn fields_mut(&mut self) -> &mut Vec<super::FieldDescriptor> {
17268 &mut self.fields
17269 }
17270 pub fn set_fields(&mut self, field: Vec<super::FieldDescriptor>) {
17272 self.fields = field;
17273 }
17274 pub fn with_fields(mut self, field: Vec<super::FieldDescriptor>) -> Self {
17276 self.set_fields(field);
17277 self
17278 }
17279 }
17280 impl super::VerifySignatureRequest {
17281 pub const fn const_default() -> Self {
17282 Self {
17283 message: None,
17284 signature: None,
17285 address: None,
17286 jwks: Vec::new(),
17287 }
17288 }
17289 #[doc(hidden)]
17290 pub fn default_instance() -> &'static Self {
17291 static DEFAULT: super::VerifySignatureRequest = super::VerifySignatureRequest::const_default();
17292 &DEFAULT
17293 }
17294 pub fn message(&self) -> &super::Bcs {
17296 self.message
17297 .as_ref()
17298 .map(|field| field as _)
17299 .unwrap_or_else(|| super::Bcs::default_instance() as _)
17300 }
17301 pub fn message_opt_mut(&mut self) -> Option<&mut super::Bcs> {
17303 self.message.as_mut().map(|field| field as _)
17304 }
17305 pub fn message_mut(&mut self) -> &mut super::Bcs {
17308 self.message.get_or_insert_default()
17309 }
17310 pub fn message_opt(&self) -> Option<&super::Bcs> {
17312 self.message.as_ref().map(|field| field as _)
17313 }
17314 pub fn set_message<T: Into<super::Bcs>>(&mut self, field: T) {
17316 self.message = Some(field.into().into());
17317 }
17318 pub fn with_message<T: Into<super::Bcs>>(mut self, field: T) -> Self {
17320 self.set_message(field.into());
17321 self
17322 }
17323 pub fn signature(&self) -> &super::UserSignature {
17325 self.signature
17326 .as_ref()
17327 .map(|field| field as _)
17328 .unwrap_or_else(|| super::UserSignature::default_instance() as _)
17329 }
17330 pub fn signature_opt_mut(&mut self) -> Option<&mut super::UserSignature> {
17332 self.signature.as_mut().map(|field| field as _)
17333 }
17334 pub fn signature_mut(&mut self) -> &mut super::UserSignature {
17337 self.signature.get_or_insert_default()
17338 }
17339 pub fn signature_opt(&self) -> Option<&super::UserSignature> {
17341 self.signature.as_ref().map(|field| field as _)
17342 }
17343 pub fn set_signature<T: Into<super::UserSignature>>(&mut self, field: T) {
17345 self.signature = Some(field.into().into());
17346 }
17347 pub fn with_signature<T: Into<super::UserSignature>>(
17349 mut self,
17350 field: T,
17351 ) -> Self {
17352 self.set_signature(field.into());
17353 self
17354 }
17355 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
17357 self.address.as_mut().map(|field| field as _)
17358 }
17359 pub fn address_mut(&mut self) -> &mut String {
17362 self.address.get_or_insert_default()
17363 }
17364 pub fn address_opt(&self) -> Option<&str> {
17366 self.address.as_ref().map(|field| field as _)
17367 }
17368 pub fn set_address<T: Into<String>>(&mut self, field: T) {
17370 self.address = Some(field.into().into());
17371 }
17372 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
17374 self.set_address(field.into());
17375 self
17376 }
17377 pub fn jwks(&self) -> &[super::ActiveJwk] {
17379 &self.jwks
17380 }
17381 pub fn jwks_mut(&mut self) -> &mut Vec<super::ActiveJwk> {
17384 &mut self.jwks
17385 }
17386 pub fn set_jwks(&mut self, field: Vec<super::ActiveJwk>) {
17388 self.jwks = field;
17389 }
17390 pub fn with_jwks(mut self, field: Vec<super::ActiveJwk>) -> Self {
17392 self.set_jwks(field);
17393 self
17394 }
17395 }
17396 impl super::VerifySignatureResponse {
17397 pub const fn const_default() -> Self {
17398 Self {
17399 is_valid: None,
17400 reason: None,
17401 }
17402 }
17403 #[doc(hidden)]
17404 pub fn default_instance() -> &'static Self {
17405 static DEFAULT: super::VerifySignatureResponse = super::VerifySignatureResponse::const_default();
17406 &DEFAULT
17407 }
17408 pub fn is_valid_opt_mut(&mut self) -> Option<&mut bool> {
17410 self.is_valid.as_mut().map(|field| field as _)
17411 }
17412 pub fn is_valid_mut(&mut self) -> &mut bool {
17415 self.is_valid.get_or_insert_default()
17416 }
17417 pub fn is_valid_opt(&self) -> Option<bool> {
17419 self.is_valid.as_ref().map(|field| *field)
17420 }
17421 pub fn set_is_valid(&mut self, field: bool) {
17423 self.is_valid = Some(field);
17424 }
17425 pub fn with_is_valid(mut self, field: bool) -> Self {
17427 self.set_is_valid(field);
17428 self
17429 }
17430 pub fn reason_opt_mut(&mut self) -> Option<&mut String> {
17432 self.reason.as_mut().map(|field| field as _)
17433 }
17434 pub fn reason_mut(&mut self) -> &mut String {
17437 self.reason.get_or_insert_default()
17438 }
17439 pub fn reason_opt(&self) -> Option<&str> {
17441 self.reason.as_ref().map(|field| field as _)
17442 }
17443 pub fn set_reason<T: Into<String>>(&mut self, field: T) {
17445 self.reason = Some(field.into().into());
17446 }
17447 pub fn with_reason<T: Into<String>>(mut self, field: T) -> Self {
17449 self.set_reason(field.into());
17450 self
17451 }
17452 }
17453 impl super::VersionAssignment {
17454 pub const fn const_default() -> Self {
17455 Self {
17456 object_id: None,
17457 start_version: None,
17458 version: None,
17459 }
17460 }
17461 #[doc(hidden)]
17462 pub fn default_instance() -> &'static Self {
17463 static DEFAULT: super::VersionAssignment = super::VersionAssignment::const_default();
17464 &DEFAULT
17465 }
17466 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
17468 self.object_id.as_mut().map(|field| field as _)
17469 }
17470 pub fn object_id_mut(&mut self) -> &mut String {
17473 self.object_id.get_or_insert_default()
17474 }
17475 pub fn object_id_opt(&self) -> Option<&str> {
17477 self.object_id.as_ref().map(|field| field as _)
17478 }
17479 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
17481 self.object_id = Some(field.into().into());
17482 }
17483 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
17485 self.set_object_id(field.into());
17486 self
17487 }
17488 pub fn start_version_opt_mut(&mut self) -> Option<&mut u64> {
17490 self.start_version.as_mut().map(|field| field as _)
17491 }
17492 pub fn start_version_mut(&mut self) -> &mut u64 {
17495 self.start_version.get_or_insert_default()
17496 }
17497 pub fn start_version_opt(&self) -> Option<u64> {
17499 self.start_version.as_ref().map(|field| *field)
17500 }
17501 pub fn set_start_version(&mut self, field: u64) {
17503 self.start_version = Some(field);
17504 }
17505 pub fn with_start_version(mut self, field: u64) -> Self {
17507 self.set_start_version(field);
17508 self
17509 }
17510 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
17512 self.version.as_mut().map(|field| field as _)
17513 }
17514 pub fn version_mut(&mut self) -> &mut u64 {
17517 self.version.get_or_insert_default()
17518 }
17519 pub fn version_opt(&self) -> Option<u64> {
17521 self.version.as_ref().map(|field| *field)
17522 }
17523 pub fn set_version(&mut self, field: u64) {
17525 self.version = Some(field);
17526 }
17527 pub fn with_version(mut self, field: u64) -> Self {
17529 self.set_version(field);
17530 self
17531 }
17532 }
17533 impl super::ZkLoginAuthenticator {
17534 pub const fn const_default() -> Self {
17535 Self {
17536 inputs: None,
17537 max_epoch: None,
17538 signature: None,
17539 public_identifier: None,
17540 jwk_id: None,
17541 }
17542 }
17543 #[doc(hidden)]
17544 pub fn default_instance() -> &'static Self {
17545 static DEFAULT: super::ZkLoginAuthenticator = super::ZkLoginAuthenticator::const_default();
17546 &DEFAULT
17547 }
17548 pub fn inputs(&self) -> &super::ZkLoginInputs {
17550 self.inputs
17551 .as_ref()
17552 .map(|field| field as _)
17553 .unwrap_or_else(|| super::ZkLoginInputs::default_instance() as _)
17554 }
17555 pub fn inputs_opt_mut(&mut self) -> Option<&mut super::ZkLoginInputs> {
17557 self.inputs.as_mut().map(|field| field as _)
17558 }
17559 pub fn inputs_mut(&mut self) -> &mut super::ZkLoginInputs {
17562 self.inputs.get_or_insert_default()
17563 }
17564 pub fn inputs_opt(&self) -> Option<&super::ZkLoginInputs> {
17566 self.inputs.as_ref().map(|field| field as _)
17567 }
17568 pub fn set_inputs<T: Into<super::ZkLoginInputs>>(&mut self, field: T) {
17570 self.inputs = Some(field.into().into());
17571 }
17572 pub fn with_inputs<T: Into<super::ZkLoginInputs>>(mut self, field: T) -> Self {
17574 self.set_inputs(field.into());
17575 self
17576 }
17577 pub fn max_epoch_opt_mut(&mut self) -> Option<&mut u64> {
17579 self.max_epoch.as_mut().map(|field| field as _)
17580 }
17581 pub fn max_epoch_mut(&mut self) -> &mut u64 {
17584 self.max_epoch.get_or_insert_default()
17585 }
17586 pub fn max_epoch_opt(&self) -> Option<u64> {
17588 self.max_epoch.as_ref().map(|field| *field)
17589 }
17590 pub fn set_max_epoch(&mut self, field: u64) {
17592 self.max_epoch = Some(field);
17593 }
17594 pub fn with_max_epoch(mut self, field: u64) -> Self {
17596 self.set_max_epoch(field);
17597 self
17598 }
17599 pub fn signature(&self) -> &super::SimpleSignature {
17601 self.signature
17602 .as_ref()
17603 .map(|field| field as _)
17604 .unwrap_or_else(|| super::SimpleSignature::default_instance() as _)
17605 }
17606 pub fn signature_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
17608 self.signature.as_mut().map(|field| field as _)
17609 }
17610 pub fn signature_mut(&mut self) -> &mut super::SimpleSignature {
17613 self.signature.get_or_insert_default()
17614 }
17615 pub fn signature_opt(&self) -> Option<&super::SimpleSignature> {
17617 self.signature.as_ref().map(|field| field as _)
17618 }
17619 pub fn set_signature<T: Into<super::SimpleSignature>>(&mut self, field: T) {
17621 self.signature = Some(field.into().into());
17622 }
17623 pub fn with_signature<T: Into<super::SimpleSignature>>(
17625 mut self,
17626 field: T,
17627 ) -> Self {
17628 self.set_signature(field.into());
17629 self
17630 }
17631 pub fn public_identifier(&self) -> &super::ZkLoginPublicIdentifier {
17633 self.public_identifier
17634 .as_ref()
17635 .map(|field| field as _)
17636 .unwrap_or_else(|| {
17637 super::ZkLoginPublicIdentifier::default_instance() as _
17638 })
17639 }
17640 pub fn public_identifier_opt_mut(
17642 &mut self,
17643 ) -> Option<&mut super::ZkLoginPublicIdentifier> {
17644 self.public_identifier.as_mut().map(|field| field as _)
17645 }
17646 pub fn public_identifier_mut(&mut self) -> &mut super::ZkLoginPublicIdentifier {
17649 self.public_identifier.get_or_insert_default()
17650 }
17651 pub fn public_identifier_opt(&self) -> Option<&super::ZkLoginPublicIdentifier> {
17653 self.public_identifier.as_ref().map(|field| field as _)
17654 }
17655 pub fn set_public_identifier<T: Into<super::ZkLoginPublicIdentifier>>(
17657 &mut self,
17658 field: T,
17659 ) {
17660 self.public_identifier = Some(field.into().into());
17661 }
17662 pub fn with_public_identifier<T: Into<super::ZkLoginPublicIdentifier>>(
17664 mut self,
17665 field: T,
17666 ) -> Self {
17667 self.set_public_identifier(field.into());
17668 self
17669 }
17670 pub fn jwk_id(&self) -> &super::JwkId {
17672 self.jwk_id
17673 .as_ref()
17674 .map(|field| field as _)
17675 .unwrap_or_else(|| super::JwkId::default_instance() as _)
17676 }
17677 pub fn jwk_id_opt_mut(&mut self) -> Option<&mut super::JwkId> {
17679 self.jwk_id.as_mut().map(|field| field as _)
17680 }
17681 pub fn jwk_id_mut(&mut self) -> &mut super::JwkId {
17684 self.jwk_id.get_or_insert_default()
17685 }
17686 pub fn jwk_id_opt(&self) -> Option<&super::JwkId> {
17688 self.jwk_id.as_ref().map(|field| field as _)
17689 }
17690 pub fn set_jwk_id<T: Into<super::JwkId>>(&mut self, field: T) {
17692 self.jwk_id = Some(field.into().into());
17693 }
17694 pub fn with_jwk_id<T: Into<super::JwkId>>(mut self, field: T) -> Self {
17696 self.set_jwk_id(field.into());
17697 self
17698 }
17699 }
17700 impl super::ZkLoginClaim {
17701 pub const fn const_default() -> Self {
17702 Self {
17703 value: None,
17704 index_mod_4: None,
17705 }
17706 }
17707 #[doc(hidden)]
17708 pub fn default_instance() -> &'static Self {
17709 static DEFAULT: super::ZkLoginClaim = super::ZkLoginClaim::const_default();
17710 &DEFAULT
17711 }
17712 pub fn value_opt_mut(&mut self) -> Option<&mut String> {
17714 self.value.as_mut().map(|field| field as _)
17715 }
17716 pub fn value_mut(&mut self) -> &mut String {
17719 self.value.get_or_insert_default()
17720 }
17721 pub fn value_opt(&self) -> Option<&str> {
17723 self.value.as_ref().map(|field| field as _)
17724 }
17725 pub fn set_value<T: Into<String>>(&mut self, field: T) {
17727 self.value = Some(field.into().into());
17728 }
17729 pub fn with_value<T: Into<String>>(mut self, field: T) -> Self {
17731 self.set_value(field.into());
17732 self
17733 }
17734 pub fn index_mod_4_opt_mut(&mut self) -> Option<&mut u32> {
17736 self.index_mod_4.as_mut().map(|field| field as _)
17737 }
17738 pub fn index_mod_4_mut(&mut self) -> &mut u32 {
17741 self.index_mod_4.get_or_insert_default()
17742 }
17743 pub fn index_mod_4_opt(&self) -> Option<u32> {
17745 self.index_mod_4.as_ref().map(|field| *field)
17746 }
17747 pub fn set_index_mod_4(&mut self, field: u32) {
17749 self.index_mod_4 = Some(field);
17750 }
17751 pub fn with_index_mod_4(mut self, field: u32) -> Self {
17753 self.set_index_mod_4(field);
17754 self
17755 }
17756 }
17757 impl super::ZkLoginInputs {
17758 pub const fn const_default() -> Self {
17759 Self {
17760 proof_points: None,
17761 iss_base64_details: None,
17762 header_base64: None,
17763 address_seed: None,
17764 }
17765 }
17766 #[doc(hidden)]
17767 pub fn default_instance() -> &'static Self {
17768 static DEFAULT: super::ZkLoginInputs = super::ZkLoginInputs::const_default();
17769 &DEFAULT
17770 }
17771 pub fn proof_points(&self) -> &super::ZkLoginProof {
17773 self.proof_points
17774 .as_ref()
17775 .map(|field| field as _)
17776 .unwrap_or_else(|| super::ZkLoginProof::default_instance() as _)
17777 }
17778 pub fn proof_points_opt_mut(&mut self) -> Option<&mut super::ZkLoginProof> {
17780 self.proof_points.as_mut().map(|field| field as _)
17781 }
17782 pub fn proof_points_mut(&mut self) -> &mut super::ZkLoginProof {
17785 self.proof_points.get_or_insert_default()
17786 }
17787 pub fn proof_points_opt(&self) -> Option<&super::ZkLoginProof> {
17789 self.proof_points.as_ref().map(|field| field as _)
17790 }
17791 pub fn set_proof_points<T: Into<super::ZkLoginProof>>(&mut self, field: T) {
17793 self.proof_points = Some(field.into().into());
17794 }
17795 pub fn with_proof_points<T: Into<super::ZkLoginProof>>(
17797 mut self,
17798 field: T,
17799 ) -> Self {
17800 self.set_proof_points(field.into());
17801 self
17802 }
17803 pub fn iss_base64_details(&self) -> &super::ZkLoginClaim {
17805 self.iss_base64_details
17806 .as_ref()
17807 .map(|field| field as _)
17808 .unwrap_or_else(|| super::ZkLoginClaim::default_instance() as _)
17809 }
17810 pub fn iss_base64_details_opt_mut(
17812 &mut self,
17813 ) -> Option<&mut super::ZkLoginClaim> {
17814 self.iss_base64_details.as_mut().map(|field| field as _)
17815 }
17816 pub fn iss_base64_details_mut(&mut self) -> &mut super::ZkLoginClaim {
17819 self.iss_base64_details.get_or_insert_default()
17820 }
17821 pub fn iss_base64_details_opt(&self) -> Option<&super::ZkLoginClaim> {
17823 self.iss_base64_details.as_ref().map(|field| field as _)
17824 }
17825 pub fn set_iss_base64_details<T: Into<super::ZkLoginClaim>>(
17827 &mut self,
17828 field: T,
17829 ) {
17830 self.iss_base64_details = Some(field.into().into());
17831 }
17832 pub fn with_iss_base64_details<T: Into<super::ZkLoginClaim>>(
17834 mut self,
17835 field: T,
17836 ) -> Self {
17837 self.set_iss_base64_details(field.into());
17838 self
17839 }
17840 pub fn header_base64_opt_mut(&mut self) -> Option<&mut String> {
17842 self.header_base64.as_mut().map(|field| field as _)
17843 }
17844 pub fn header_base64_mut(&mut self) -> &mut String {
17847 self.header_base64.get_or_insert_default()
17848 }
17849 pub fn header_base64_opt(&self) -> Option<&str> {
17851 self.header_base64.as_ref().map(|field| field as _)
17852 }
17853 pub fn set_header_base64<T: Into<String>>(&mut self, field: T) {
17855 self.header_base64 = Some(field.into().into());
17856 }
17857 pub fn with_header_base64<T: Into<String>>(mut self, field: T) -> Self {
17859 self.set_header_base64(field.into());
17860 self
17861 }
17862 pub fn address_seed_opt_mut(&mut self) -> Option<&mut String> {
17864 self.address_seed.as_mut().map(|field| field as _)
17865 }
17866 pub fn address_seed_mut(&mut self) -> &mut String {
17869 self.address_seed.get_or_insert_default()
17870 }
17871 pub fn address_seed_opt(&self) -> Option<&str> {
17873 self.address_seed.as_ref().map(|field| field as _)
17874 }
17875 pub fn set_address_seed<T: Into<String>>(&mut self, field: T) {
17877 self.address_seed = Some(field.into().into());
17878 }
17879 pub fn with_address_seed<T: Into<String>>(mut self, field: T) -> Self {
17881 self.set_address_seed(field.into());
17882 self
17883 }
17884 }
17885 impl super::ZkLoginProof {
17886 pub const fn const_default() -> Self {
17887 Self { a: None, b: None, c: None }
17888 }
17889 #[doc(hidden)]
17890 pub fn default_instance() -> &'static Self {
17891 static DEFAULT: super::ZkLoginProof = super::ZkLoginProof::const_default();
17892 &DEFAULT
17893 }
17894 pub fn a(&self) -> &super::CircomG1 {
17896 self.a
17897 .as_ref()
17898 .map(|field| field as _)
17899 .unwrap_or_else(|| super::CircomG1::default_instance() as _)
17900 }
17901 pub fn a_opt_mut(&mut self) -> Option<&mut super::CircomG1> {
17903 self.a.as_mut().map(|field| field as _)
17904 }
17905 pub fn a_mut(&mut self) -> &mut super::CircomG1 {
17908 self.a.get_or_insert_default()
17909 }
17910 pub fn a_opt(&self) -> Option<&super::CircomG1> {
17912 self.a.as_ref().map(|field| field as _)
17913 }
17914 pub fn set_a<T: Into<super::CircomG1>>(&mut self, field: T) {
17916 self.a = Some(field.into().into());
17917 }
17918 pub fn with_a<T: Into<super::CircomG1>>(mut self, field: T) -> Self {
17920 self.set_a(field.into());
17921 self
17922 }
17923 pub fn b(&self) -> &super::CircomG2 {
17925 self.b
17926 .as_ref()
17927 .map(|field| field as _)
17928 .unwrap_or_else(|| super::CircomG2::default_instance() as _)
17929 }
17930 pub fn b_opt_mut(&mut self) -> Option<&mut super::CircomG2> {
17932 self.b.as_mut().map(|field| field as _)
17933 }
17934 pub fn b_mut(&mut self) -> &mut super::CircomG2 {
17937 self.b.get_or_insert_default()
17938 }
17939 pub fn b_opt(&self) -> Option<&super::CircomG2> {
17941 self.b.as_ref().map(|field| field as _)
17942 }
17943 pub fn set_b<T: Into<super::CircomG2>>(&mut self, field: T) {
17945 self.b = Some(field.into().into());
17946 }
17947 pub fn with_b<T: Into<super::CircomG2>>(mut self, field: T) -> Self {
17949 self.set_b(field.into());
17950 self
17951 }
17952 pub fn c(&self) -> &super::CircomG1 {
17954 self.c
17955 .as_ref()
17956 .map(|field| field as _)
17957 .unwrap_or_else(|| super::CircomG1::default_instance() as _)
17958 }
17959 pub fn c_opt_mut(&mut self) -> Option<&mut super::CircomG1> {
17961 self.c.as_mut().map(|field| field as _)
17962 }
17963 pub fn c_mut(&mut self) -> &mut super::CircomG1 {
17966 self.c.get_or_insert_default()
17967 }
17968 pub fn c_opt(&self) -> Option<&super::CircomG1> {
17970 self.c.as_ref().map(|field| field as _)
17971 }
17972 pub fn set_c<T: Into<super::CircomG1>>(&mut self, field: T) {
17974 self.c = Some(field.into().into());
17975 }
17976 pub fn with_c<T: Into<super::CircomG1>>(mut self, field: T) -> Self {
17978 self.set_c(field.into());
17979 self
17980 }
17981 }
17982 impl super::ZkLoginPublicIdentifier {
17983 pub const fn const_default() -> Self {
17984 Self {
17985 iss: None,
17986 address_seed: None,
17987 }
17988 }
17989 #[doc(hidden)]
17990 pub fn default_instance() -> &'static Self {
17991 static DEFAULT: super::ZkLoginPublicIdentifier = super::ZkLoginPublicIdentifier::const_default();
17992 &DEFAULT
17993 }
17994 pub fn iss_opt_mut(&mut self) -> Option<&mut String> {
17996 self.iss.as_mut().map(|field| field as _)
17997 }
17998 pub fn iss_mut(&mut self) -> &mut String {
18001 self.iss.get_or_insert_default()
18002 }
18003 pub fn iss_opt(&self) -> Option<&str> {
18005 self.iss.as_ref().map(|field| field as _)
18006 }
18007 pub fn set_iss<T: Into<String>>(&mut self, field: T) {
18009 self.iss = Some(field.into().into());
18010 }
18011 pub fn with_iss<T: Into<String>>(mut self, field: T) -> Self {
18013 self.set_iss(field.into());
18014 self
18015 }
18016 pub fn address_seed_opt_mut(&mut self) -> Option<&mut String> {
18018 self.address_seed.as_mut().map(|field| field as _)
18019 }
18020 pub fn address_seed_mut(&mut self) -> &mut String {
18023 self.address_seed.get_or_insert_default()
18024 }
18025 pub fn address_seed_opt(&self) -> Option<&str> {
18027 self.address_seed.as_ref().map(|field| field as _)
18028 }
18029 pub fn set_address_seed<T: Into<String>>(&mut self, field: T) {
18031 self.address_seed = Some(field.into().into());
18032 }
18033 pub fn with_address_seed<T: Into<String>>(mut self, field: T) -> Self {
18035 self.set_address_seed(field.into());
18036 self
18037 }
18038 }
18039}