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::Display {
3984 pub const fn const_default() -> Self {
3985 Self { output: None, errors: None }
3986 }
3987 #[doc(hidden)]
3988 pub fn default_instance() -> &'static Self {
3989 static DEFAULT: super::Display = super::Display::const_default();
3990 &DEFAULT
3991 }
3992 pub fn output_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
3994 self.output.as_mut().map(|field| field as _)
3995 }
3996 pub fn output_mut(&mut self) -> &mut ::prost_types::Value {
3999 self.output.get_or_insert_default()
4000 }
4001 pub fn output_opt(&self) -> Option<&::prost_types::Value> {
4003 self.output.as_ref().map(|field| field as _)
4004 }
4005 pub fn set_output<T: Into<::prost_types::Value>>(&mut self, field: T) {
4007 self.output = Some(field.into().into());
4008 }
4009 pub fn with_output<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
4011 self.set_output(field.into());
4012 self
4013 }
4014 pub fn errors_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
4016 self.errors.as_mut().map(|field| field as _)
4017 }
4018 pub fn errors_mut(&mut self) -> &mut ::prost_types::Value {
4021 self.errors.get_or_insert_default()
4022 }
4023 pub fn errors_opt(&self) -> Option<&::prost_types::Value> {
4025 self.errors.as_ref().map(|field| field as _)
4026 }
4027 pub fn set_errors<T: Into<::prost_types::Value>>(&mut self, field: T) {
4029 self.errors = Some(field.into().into());
4030 }
4031 pub fn with_errors<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
4033 self.set_errors(field.into());
4034 self
4035 }
4036 }
4037 impl super::DynamicField {
4038 pub const fn const_default() -> Self {
4039 Self {
4040 kind: None,
4041 parent: None,
4042 field_id: None,
4043 field_object: None,
4044 name: None,
4045 value: None,
4046 value_type: None,
4047 child_id: None,
4048 child_object: None,
4049 }
4050 }
4051 #[doc(hidden)]
4052 pub fn default_instance() -> &'static Self {
4053 static DEFAULT: super::DynamicField = super::DynamicField::const_default();
4054 &DEFAULT
4055 }
4056 pub fn with_kind<T: Into<super::dynamic_field::DynamicFieldKind>>(
4058 mut self,
4059 field: T,
4060 ) -> Self {
4061 self.set_kind(field.into());
4062 self
4063 }
4064 pub fn parent_opt_mut(&mut self) -> Option<&mut String> {
4066 self.parent.as_mut().map(|field| field as _)
4067 }
4068 pub fn parent_mut(&mut self) -> &mut String {
4071 self.parent.get_or_insert_default()
4072 }
4073 pub fn parent_opt(&self) -> Option<&str> {
4075 self.parent.as_ref().map(|field| field as _)
4076 }
4077 pub fn set_parent<T: Into<String>>(&mut self, field: T) {
4079 self.parent = Some(field.into().into());
4080 }
4081 pub fn with_parent<T: Into<String>>(mut self, field: T) -> Self {
4083 self.set_parent(field.into());
4084 self
4085 }
4086 pub fn field_id_opt_mut(&mut self) -> Option<&mut String> {
4088 self.field_id.as_mut().map(|field| field as _)
4089 }
4090 pub fn field_id_mut(&mut self) -> &mut String {
4093 self.field_id.get_or_insert_default()
4094 }
4095 pub fn field_id_opt(&self) -> Option<&str> {
4097 self.field_id.as_ref().map(|field| field as _)
4098 }
4099 pub fn set_field_id<T: Into<String>>(&mut self, field: T) {
4101 self.field_id = Some(field.into().into());
4102 }
4103 pub fn with_field_id<T: Into<String>>(mut self, field: T) -> Self {
4105 self.set_field_id(field.into());
4106 self
4107 }
4108 pub fn field_object(&self) -> &super::Object {
4110 self.field_object
4111 .as_ref()
4112 .map(|field| field as _)
4113 .unwrap_or_else(|| super::Object::default_instance() as _)
4114 }
4115 pub fn field_object_opt_mut(&mut self) -> Option<&mut super::Object> {
4117 self.field_object.as_mut().map(|field| field as _)
4118 }
4119 pub fn field_object_mut(&mut self) -> &mut super::Object {
4122 self.field_object.get_or_insert_default()
4123 }
4124 pub fn field_object_opt(&self) -> Option<&super::Object> {
4126 self.field_object.as_ref().map(|field| field as _)
4127 }
4128 pub fn set_field_object<T: Into<super::Object>>(&mut self, field: T) {
4130 self.field_object = Some(field.into().into());
4131 }
4132 pub fn with_field_object<T: Into<super::Object>>(mut self, field: T) -> Self {
4134 self.set_field_object(field.into());
4135 self
4136 }
4137 pub fn name(&self) -> &super::Bcs {
4139 self.name
4140 .as_ref()
4141 .map(|field| field as _)
4142 .unwrap_or_else(|| super::Bcs::default_instance() as _)
4143 }
4144 pub fn name_opt_mut(&mut self) -> Option<&mut super::Bcs> {
4146 self.name.as_mut().map(|field| field as _)
4147 }
4148 pub fn name_mut(&mut self) -> &mut super::Bcs {
4151 self.name.get_or_insert_default()
4152 }
4153 pub fn name_opt(&self) -> Option<&super::Bcs> {
4155 self.name.as_ref().map(|field| field as _)
4156 }
4157 pub fn set_name<T: Into<super::Bcs>>(&mut self, field: T) {
4159 self.name = Some(field.into().into());
4160 }
4161 pub fn with_name<T: Into<super::Bcs>>(mut self, field: T) -> Self {
4163 self.set_name(field.into());
4164 self
4165 }
4166 pub fn value(&self) -> &super::Bcs {
4168 self.value
4169 .as_ref()
4170 .map(|field| field as _)
4171 .unwrap_or_else(|| super::Bcs::default_instance() as _)
4172 }
4173 pub fn value_opt_mut(&mut self) -> Option<&mut super::Bcs> {
4175 self.value.as_mut().map(|field| field as _)
4176 }
4177 pub fn value_mut(&mut self) -> &mut super::Bcs {
4180 self.value.get_or_insert_default()
4181 }
4182 pub fn value_opt(&self) -> Option<&super::Bcs> {
4184 self.value.as_ref().map(|field| field as _)
4185 }
4186 pub fn set_value<T: Into<super::Bcs>>(&mut self, field: T) {
4188 self.value = Some(field.into().into());
4189 }
4190 pub fn with_value<T: Into<super::Bcs>>(mut self, field: T) -> Self {
4192 self.set_value(field.into());
4193 self
4194 }
4195 pub fn value_type_opt_mut(&mut self) -> Option<&mut String> {
4197 self.value_type.as_mut().map(|field| field as _)
4198 }
4199 pub fn value_type_mut(&mut self) -> &mut String {
4202 self.value_type.get_or_insert_default()
4203 }
4204 pub fn value_type_opt(&self) -> Option<&str> {
4206 self.value_type.as_ref().map(|field| field as _)
4207 }
4208 pub fn set_value_type<T: Into<String>>(&mut self, field: T) {
4210 self.value_type = Some(field.into().into());
4211 }
4212 pub fn with_value_type<T: Into<String>>(mut self, field: T) -> Self {
4214 self.set_value_type(field.into());
4215 self
4216 }
4217 pub fn child_id_opt_mut(&mut self) -> Option<&mut String> {
4219 self.child_id.as_mut().map(|field| field as _)
4220 }
4221 pub fn child_id_mut(&mut self) -> &mut String {
4224 self.child_id.get_or_insert_default()
4225 }
4226 pub fn child_id_opt(&self) -> Option<&str> {
4228 self.child_id.as_ref().map(|field| field as _)
4229 }
4230 pub fn set_child_id<T: Into<String>>(&mut self, field: T) {
4232 self.child_id = Some(field.into().into());
4233 }
4234 pub fn with_child_id<T: Into<String>>(mut self, field: T) -> Self {
4236 self.set_child_id(field.into());
4237 self
4238 }
4239 pub fn child_object(&self) -> &super::Object {
4241 self.child_object
4242 .as_ref()
4243 .map(|field| field as _)
4244 .unwrap_or_else(|| super::Object::default_instance() as _)
4245 }
4246 pub fn child_object_opt_mut(&mut self) -> Option<&mut super::Object> {
4248 self.child_object.as_mut().map(|field| field as _)
4249 }
4250 pub fn child_object_mut(&mut self) -> &mut super::Object {
4253 self.child_object.get_or_insert_default()
4254 }
4255 pub fn child_object_opt(&self) -> Option<&super::Object> {
4257 self.child_object.as_ref().map(|field| field as _)
4258 }
4259 pub fn set_child_object<T: Into<super::Object>>(&mut self, field: T) {
4261 self.child_object = Some(field.into().into());
4262 }
4263 pub fn with_child_object<T: Into<super::Object>>(mut self, field: T) -> Self {
4265 self.set_child_object(field.into());
4266 self
4267 }
4268 }
4269 impl super::EndOfEpochData {
4270 pub const fn const_default() -> Self {
4271 Self {
4272 next_epoch_committee: Vec::new(),
4273 next_epoch_protocol_version: None,
4274 epoch_commitments: Vec::new(),
4275 }
4276 }
4277 #[doc(hidden)]
4278 pub fn default_instance() -> &'static Self {
4279 static DEFAULT: super::EndOfEpochData = super::EndOfEpochData::const_default();
4280 &DEFAULT
4281 }
4282 pub fn next_epoch_committee(&self) -> &[super::ValidatorCommitteeMember] {
4284 &self.next_epoch_committee
4285 }
4286 pub fn next_epoch_committee_mut(
4289 &mut self,
4290 ) -> &mut Vec<super::ValidatorCommitteeMember> {
4291 &mut self.next_epoch_committee
4292 }
4293 pub fn set_next_epoch_committee(
4295 &mut self,
4296 field: Vec<super::ValidatorCommitteeMember>,
4297 ) {
4298 self.next_epoch_committee = field;
4299 }
4300 pub fn with_next_epoch_committee(
4302 mut self,
4303 field: Vec<super::ValidatorCommitteeMember>,
4304 ) -> Self {
4305 self.set_next_epoch_committee(field);
4306 self
4307 }
4308 pub fn next_epoch_protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
4310 self.next_epoch_protocol_version.as_mut().map(|field| field as _)
4311 }
4312 pub fn next_epoch_protocol_version_mut(&mut self) -> &mut u64 {
4315 self.next_epoch_protocol_version.get_or_insert_default()
4316 }
4317 pub fn next_epoch_protocol_version_opt(&self) -> Option<u64> {
4319 self.next_epoch_protocol_version.as_ref().map(|field| *field)
4320 }
4321 pub fn set_next_epoch_protocol_version(&mut self, field: u64) {
4323 self.next_epoch_protocol_version = Some(field);
4324 }
4325 pub fn with_next_epoch_protocol_version(mut self, field: u64) -> Self {
4327 self.set_next_epoch_protocol_version(field);
4328 self
4329 }
4330 pub fn epoch_commitments(&self) -> &[super::CheckpointCommitment] {
4332 &self.epoch_commitments
4333 }
4334 pub fn epoch_commitments_mut(
4337 &mut self,
4338 ) -> &mut Vec<super::CheckpointCommitment> {
4339 &mut self.epoch_commitments
4340 }
4341 pub fn set_epoch_commitments(
4343 &mut self,
4344 field: Vec<super::CheckpointCommitment>,
4345 ) {
4346 self.epoch_commitments = field;
4347 }
4348 pub fn with_epoch_commitments(
4350 mut self,
4351 field: Vec<super::CheckpointCommitment>,
4352 ) -> Self {
4353 self.set_epoch_commitments(field);
4354 self
4355 }
4356 }
4357 impl super::EndOfEpochTransaction {
4358 pub const fn const_default() -> Self {
4359 Self { transactions: Vec::new() }
4360 }
4361 #[doc(hidden)]
4362 pub fn default_instance() -> &'static Self {
4363 static DEFAULT: super::EndOfEpochTransaction = super::EndOfEpochTransaction::const_default();
4364 &DEFAULT
4365 }
4366 pub fn transactions(&self) -> &[super::EndOfEpochTransactionKind] {
4368 &self.transactions
4369 }
4370 pub fn transactions_mut(
4373 &mut self,
4374 ) -> &mut Vec<super::EndOfEpochTransactionKind> {
4375 &mut self.transactions
4376 }
4377 pub fn set_transactions(
4379 &mut self,
4380 field: Vec<super::EndOfEpochTransactionKind>,
4381 ) {
4382 self.transactions = field;
4383 }
4384 pub fn with_transactions(
4386 mut self,
4387 field: Vec<super::EndOfEpochTransactionKind>,
4388 ) -> Self {
4389 self.set_transactions(field);
4390 self
4391 }
4392 }
4393 impl super::EndOfEpochTransactionKind {
4394 pub const fn const_default() -> Self {
4395 Self { kind: None, data: None }
4396 }
4397 #[doc(hidden)]
4398 pub fn default_instance() -> &'static Self {
4399 static DEFAULT: super::EndOfEpochTransactionKind = super::EndOfEpochTransactionKind::const_default();
4400 &DEFAULT
4401 }
4402 pub fn with_kind<T: Into<super::end_of_epoch_transaction_kind::Kind>>(
4404 mut self,
4405 field: T,
4406 ) -> Self {
4407 self.set_kind(field.into());
4408 self
4409 }
4410 pub fn change_epoch(&self) -> &super::ChangeEpoch {
4412 if let Some(
4413 super::end_of_epoch_transaction_kind::Data::ChangeEpoch(field),
4414 ) = &self.data
4415 {
4416 field as _
4417 } else {
4418 super::ChangeEpoch::default_instance() as _
4419 }
4420 }
4421 pub fn change_epoch_opt(&self) -> Option<&super::ChangeEpoch> {
4423 if let Some(
4424 super::end_of_epoch_transaction_kind::Data::ChangeEpoch(field),
4425 ) = &self.data
4426 {
4427 Some(field as _)
4428 } else {
4429 None
4430 }
4431 }
4432 pub fn change_epoch_opt_mut(&mut self) -> Option<&mut super::ChangeEpoch> {
4434 if let Some(
4435 super::end_of_epoch_transaction_kind::Data::ChangeEpoch(field),
4436 ) = &mut self.data
4437 {
4438 Some(field as _)
4439 } else {
4440 None
4441 }
4442 }
4443 pub fn change_epoch_mut(&mut self) -> &mut super::ChangeEpoch {
4447 if self.change_epoch_opt_mut().is_none() {
4448 self.data = Some(
4449 super::end_of_epoch_transaction_kind::Data::ChangeEpoch(
4450 super::ChangeEpoch::default(),
4451 ),
4452 );
4453 }
4454 self.change_epoch_opt_mut().unwrap()
4455 }
4456 pub fn set_change_epoch<T: Into<super::ChangeEpoch>>(&mut self, field: T) {
4459 self.data = Some(
4460 super::end_of_epoch_transaction_kind::Data::ChangeEpoch(
4461 field.into().into(),
4462 ),
4463 );
4464 }
4465 pub fn with_change_epoch<T: Into<super::ChangeEpoch>>(
4468 mut self,
4469 field: T,
4470 ) -> Self {
4471 self.set_change_epoch(field.into());
4472 self
4473 }
4474 pub fn authenticator_state_expire(&self) -> &super::AuthenticatorStateExpire {
4476 if let Some(
4477 super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4478 field,
4479 ),
4480 ) = &self.data
4481 {
4482 field as _
4483 } else {
4484 super::AuthenticatorStateExpire::default_instance() as _
4485 }
4486 }
4487 pub fn authenticator_state_expire_opt(
4489 &self,
4490 ) -> Option<&super::AuthenticatorStateExpire> {
4491 if let Some(
4492 super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4493 field,
4494 ),
4495 ) = &self.data
4496 {
4497 Some(field as _)
4498 } else {
4499 None
4500 }
4501 }
4502 pub fn authenticator_state_expire_opt_mut(
4504 &mut self,
4505 ) -> Option<&mut super::AuthenticatorStateExpire> {
4506 if let Some(
4507 super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4508 field,
4509 ),
4510 ) = &mut self.data
4511 {
4512 Some(field as _)
4513 } else {
4514 None
4515 }
4516 }
4517 pub fn authenticator_state_expire_mut(
4521 &mut self,
4522 ) -> &mut super::AuthenticatorStateExpire {
4523 if self.authenticator_state_expire_opt_mut().is_none() {
4524 self.data = Some(
4525 super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4526 super::AuthenticatorStateExpire::default(),
4527 ),
4528 );
4529 }
4530 self.authenticator_state_expire_opt_mut().unwrap()
4531 }
4532 pub fn set_authenticator_state_expire<T: Into<super::AuthenticatorStateExpire>>(
4535 &mut self,
4536 field: T,
4537 ) {
4538 self.data = Some(
4539 super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4540 field.into().into(),
4541 ),
4542 );
4543 }
4544 pub fn with_authenticator_state_expire<T: Into<super::AuthenticatorStateExpire>>(
4547 mut self,
4548 field: T,
4549 ) -> Self {
4550 self.set_authenticator_state_expire(field.into());
4551 self
4552 }
4553 pub fn execution_time_observations(&self) -> &super::ExecutionTimeObservations {
4555 if let Some(
4556 super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4557 field,
4558 ),
4559 ) = &self.data
4560 {
4561 field as _
4562 } else {
4563 super::ExecutionTimeObservations::default_instance() as _
4564 }
4565 }
4566 pub fn execution_time_observations_opt(
4568 &self,
4569 ) -> Option<&super::ExecutionTimeObservations> {
4570 if let Some(
4571 super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4572 field,
4573 ),
4574 ) = &self.data
4575 {
4576 Some(field as _)
4577 } else {
4578 None
4579 }
4580 }
4581 pub fn execution_time_observations_opt_mut(
4583 &mut self,
4584 ) -> Option<&mut super::ExecutionTimeObservations> {
4585 if let Some(
4586 super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4587 field,
4588 ),
4589 ) = &mut self.data
4590 {
4591 Some(field as _)
4592 } else {
4593 None
4594 }
4595 }
4596 pub fn execution_time_observations_mut(
4600 &mut self,
4601 ) -> &mut super::ExecutionTimeObservations {
4602 if self.execution_time_observations_opt_mut().is_none() {
4603 self.data = Some(
4604 super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4605 super::ExecutionTimeObservations::default(),
4606 ),
4607 );
4608 }
4609 self.execution_time_observations_opt_mut().unwrap()
4610 }
4611 pub fn set_execution_time_observations<
4614 T: Into<super::ExecutionTimeObservations>,
4615 >(&mut self, field: T) {
4616 self.data = Some(
4617 super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4618 field.into().into(),
4619 ),
4620 );
4621 }
4622 pub fn with_execution_time_observations<
4625 T: Into<super::ExecutionTimeObservations>,
4626 >(mut self, field: T) -> Self {
4627 self.set_execution_time_observations(field.into());
4628 self
4629 }
4630 pub fn bridge_chain_id(&self) -> &str {
4632 if let Some(
4633 super::end_of_epoch_transaction_kind::Data::BridgeChainId(field),
4634 ) = &self.data
4635 {
4636 field as _
4637 } else {
4638 ""
4639 }
4640 }
4641 pub fn bridge_chain_id_opt(&self) -> Option<&str> {
4643 if let Some(
4644 super::end_of_epoch_transaction_kind::Data::BridgeChainId(field),
4645 ) = &self.data
4646 {
4647 Some(field as _)
4648 } else {
4649 None
4650 }
4651 }
4652 pub fn bridge_chain_id_opt_mut(&mut self) -> Option<&mut String> {
4654 if let Some(
4655 super::end_of_epoch_transaction_kind::Data::BridgeChainId(field),
4656 ) = &mut self.data
4657 {
4658 Some(field as _)
4659 } else {
4660 None
4661 }
4662 }
4663 pub fn bridge_chain_id_mut(&mut self) -> &mut String {
4667 if self.bridge_chain_id_opt_mut().is_none() {
4668 self.data = Some(
4669 super::end_of_epoch_transaction_kind::Data::BridgeChainId(
4670 String::default(),
4671 ),
4672 );
4673 }
4674 self.bridge_chain_id_opt_mut().unwrap()
4675 }
4676 pub fn set_bridge_chain_id<T: Into<String>>(&mut self, field: T) {
4679 self.data = Some(
4680 super::end_of_epoch_transaction_kind::Data::BridgeChainId(
4681 field.into().into(),
4682 ),
4683 );
4684 }
4685 pub fn with_bridge_chain_id<T: Into<String>>(mut self, field: T) -> Self {
4688 self.set_bridge_chain_id(field.into());
4689 self
4690 }
4691 pub fn bridge_object_version(&self) -> u64 {
4693 if let Some(
4694 super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4695 ) = &self.data
4696 {
4697 *field
4698 } else {
4699 0u64
4700 }
4701 }
4702 pub fn bridge_object_version_opt(&self) -> Option<u64> {
4704 if let Some(
4705 super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4706 ) = &self.data
4707 {
4708 Some(*field)
4709 } else {
4710 None
4711 }
4712 }
4713 pub fn bridge_object_version_opt_mut(&mut self) -> Option<&mut u64> {
4715 if let Some(
4716 super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4717 ) = &mut self.data
4718 {
4719 Some(field as _)
4720 } else {
4721 None
4722 }
4723 }
4724 pub fn bridge_object_version_mut(&mut self) -> &mut u64 {
4728 if self.bridge_object_version_opt_mut().is_none() {
4729 self.data = Some(
4730 super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(
4731 u64::default(),
4732 ),
4733 );
4734 }
4735 self.bridge_object_version_opt_mut().unwrap()
4736 }
4737 pub fn set_bridge_object_version(&mut self, field: u64) {
4740 self.data = Some(
4741 super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4742 );
4743 }
4744 pub fn with_bridge_object_version(mut self, field: u64) -> Self {
4747 self.set_bridge_object_version(field);
4748 self
4749 }
4750 pub fn storage_cost(&self) -> u64 {
4752 if let Some(
4753 super::end_of_epoch_transaction_kind::Data::StorageCost(field),
4754 ) = &self.data
4755 {
4756 *field
4757 } else {
4758 0u64
4759 }
4760 }
4761 pub fn storage_cost_opt(&self) -> Option<u64> {
4763 if let Some(
4764 super::end_of_epoch_transaction_kind::Data::StorageCost(field),
4765 ) = &self.data
4766 {
4767 Some(*field)
4768 } else {
4769 None
4770 }
4771 }
4772 pub fn storage_cost_opt_mut(&mut self) -> Option<&mut u64> {
4774 if let Some(
4775 super::end_of_epoch_transaction_kind::Data::StorageCost(field),
4776 ) = &mut self.data
4777 {
4778 Some(field as _)
4779 } else {
4780 None
4781 }
4782 }
4783 pub fn storage_cost_mut(&mut self) -> &mut u64 {
4787 if self.storage_cost_opt_mut().is_none() {
4788 self.data = Some(
4789 super::end_of_epoch_transaction_kind::Data::StorageCost(
4790 u64::default(),
4791 ),
4792 );
4793 }
4794 self.storage_cost_opt_mut().unwrap()
4795 }
4796 pub fn set_storage_cost(&mut self, field: u64) {
4799 self.data = Some(
4800 super::end_of_epoch_transaction_kind::Data::StorageCost(field),
4801 );
4802 }
4803 pub fn with_storage_cost(mut self, field: u64) -> Self {
4806 self.set_storage_cost(field);
4807 self
4808 }
4809 }
4810 impl super::Epoch {
4811 pub const fn const_default() -> Self {
4812 Self {
4813 epoch: None,
4814 committee: None,
4815 system_state: None,
4816 first_checkpoint: None,
4817 last_checkpoint: None,
4818 start: None,
4819 end: None,
4820 reference_gas_price: None,
4821 protocol_config: None,
4822 }
4823 }
4824 #[doc(hidden)]
4825 pub fn default_instance() -> &'static Self {
4826 static DEFAULT: super::Epoch = super::Epoch::const_default();
4827 &DEFAULT
4828 }
4829 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
4831 self.epoch.as_mut().map(|field| field as _)
4832 }
4833 pub fn epoch_mut(&mut self) -> &mut u64 {
4836 self.epoch.get_or_insert_default()
4837 }
4838 pub fn epoch_opt(&self) -> Option<u64> {
4840 self.epoch.as_ref().map(|field| *field)
4841 }
4842 pub fn set_epoch(&mut self, field: u64) {
4844 self.epoch = Some(field);
4845 }
4846 pub fn with_epoch(mut self, field: u64) -> Self {
4848 self.set_epoch(field);
4849 self
4850 }
4851 pub fn committee(&self) -> &super::ValidatorCommittee {
4853 self.committee
4854 .as_ref()
4855 .map(|field| field as _)
4856 .unwrap_or_else(|| super::ValidatorCommittee::default_instance() as _)
4857 }
4858 pub fn committee_opt_mut(&mut self) -> Option<&mut super::ValidatorCommittee> {
4860 self.committee.as_mut().map(|field| field as _)
4861 }
4862 pub fn committee_mut(&mut self) -> &mut super::ValidatorCommittee {
4865 self.committee.get_or_insert_default()
4866 }
4867 pub fn committee_opt(&self) -> Option<&super::ValidatorCommittee> {
4869 self.committee.as_ref().map(|field| field as _)
4870 }
4871 pub fn set_committee<T: Into<super::ValidatorCommittee>>(&mut self, field: T) {
4873 self.committee = Some(field.into().into());
4874 }
4875 pub fn with_committee<T: Into<super::ValidatorCommittee>>(
4877 mut self,
4878 field: T,
4879 ) -> Self {
4880 self.set_committee(field.into());
4881 self
4882 }
4883 pub fn system_state(&self) -> &super::SystemState {
4885 self.system_state
4886 .as_ref()
4887 .map(|field| field as _)
4888 .unwrap_or_else(|| super::SystemState::default_instance() as _)
4889 }
4890 pub fn system_state_opt_mut(&mut self) -> Option<&mut super::SystemState> {
4892 self.system_state.as_mut().map(|field| field as _)
4893 }
4894 pub fn system_state_mut(&mut self) -> &mut super::SystemState {
4897 self.system_state.get_or_insert_default()
4898 }
4899 pub fn system_state_opt(&self) -> Option<&super::SystemState> {
4901 self.system_state.as_ref().map(|field| field as _)
4902 }
4903 pub fn set_system_state<T: Into<super::SystemState>>(&mut self, field: T) {
4905 self.system_state = Some(field.into().into());
4906 }
4907 pub fn with_system_state<T: Into<super::SystemState>>(
4909 mut self,
4910 field: T,
4911 ) -> Self {
4912 self.set_system_state(field.into());
4913 self
4914 }
4915 pub fn first_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
4917 self.first_checkpoint.as_mut().map(|field| field as _)
4918 }
4919 pub fn first_checkpoint_mut(&mut self) -> &mut u64 {
4922 self.first_checkpoint.get_or_insert_default()
4923 }
4924 pub fn first_checkpoint_opt(&self) -> Option<u64> {
4926 self.first_checkpoint.as_ref().map(|field| *field)
4927 }
4928 pub fn set_first_checkpoint(&mut self, field: u64) {
4930 self.first_checkpoint = Some(field);
4931 }
4932 pub fn with_first_checkpoint(mut self, field: u64) -> Self {
4934 self.set_first_checkpoint(field);
4935 self
4936 }
4937 pub fn last_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
4939 self.last_checkpoint.as_mut().map(|field| field as _)
4940 }
4941 pub fn last_checkpoint_mut(&mut self) -> &mut u64 {
4944 self.last_checkpoint.get_or_insert_default()
4945 }
4946 pub fn last_checkpoint_opt(&self) -> Option<u64> {
4948 self.last_checkpoint.as_ref().map(|field| *field)
4949 }
4950 pub fn set_last_checkpoint(&mut self, field: u64) {
4952 self.last_checkpoint = Some(field);
4953 }
4954 pub fn with_last_checkpoint(mut self, field: u64) -> Self {
4956 self.set_last_checkpoint(field);
4957 self
4958 }
4959 pub fn start_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
4961 self.start.as_mut().map(|field| field as _)
4962 }
4963 pub fn start_mut(&mut self) -> &mut ::prost_types::Timestamp {
4966 self.start.get_or_insert_default()
4967 }
4968 pub fn start_opt(&self) -> Option<&::prost_types::Timestamp> {
4970 self.start.as_ref().map(|field| field as _)
4971 }
4972 pub fn set_start<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
4974 self.start = Some(field.into().into());
4975 }
4976 pub fn with_start<T: Into<::prost_types::Timestamp>>(
4978 mut self,
4979 field: T,
4980 ) -> Self {
4981 self.set_start(field.into());
4982 self
4983 }
4984 pub fn end_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
4986 self.end.as_mut().map(|field| field as _)
4987 }
4988 pub fn end_mut(&mut self) -> &mut ::prost_types::Timestamp {
4991 self.end.get_or_insert_default()
4992 }
4993 pub fn end_opt(&self) -> Option<&::prost_types::Timestamp> {
4995 self.end.as_ref().map(|field| field as _)
4996 }
4997 pub fn set_end<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
4999 self.end = Some(field.into().into());
5000 }
5001 pub fn with_end<T: Into<::prost_types::Timestamp>>(mut self, field: T) -> Self {
5003 self.set_end(field.into());
5004 self
5005 }
5006 pub fn reference_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
5008 self.reference_gas_price.as_mut().map(|field| field as _)
5009 }
5010 pub fn reference_gas_price_mut(&mut self) -> &mut u64 {
5013 self.reference_gas_price.get_or_insert_default()
5014 }
5015 pub fn reference_gas_price_opt(&self) -> Option<u64> {
5017 self.reference_gas_price.as_ref().map(|field| *field)
5018 }
5019 pub fn set_reference_gas_price(&mut self, field: u64) {
5021 self.reference_gas_price = Some(field);
5022 }
5023 pub fn with_reference_gas_price(mut self, field: u64) -> Self {
5025 self.set_reference_gas_price(field);
5026 self
5027 }
5028 pub fn protocol_config(&self) -> &super::ProtocolConfig {
5030 self.protocol_config
5031 .as_ref()
5032 .map(|field| field as _)
5033 .unwrap_or_else(|| super::ProtocolConfig::default_instance() as _)
5034 }
5035 pub fn protocol_config_opt_mut(&mut self) -> Option<&mut super::ProtocolConfig> {
5037 self.protocol_config.as_mut().map(|field| field as _)
5038 }
5039 pub fn protocol_config_mut(&mut self) -> &mut super::ProtocolConfig {
5042 self.protocol_config.get_or_insert_default()
5043 }
5044 pub fn protocol_config_opt(&self) -> Option<&super::ProtocolConfig> {
5046 self.protocol_config.as_ref().map(|field| field as _)
5047 }
5048 pub fn set_protocol_config<T: Into<super::ProtocolConfig>>(&mut self, field: T) {
5050 self.protocol_config = Some(field.into().into());
5051 }
5052 pub fn with_protocol_config<T: Into<super::ProtocolConfig>>(
5054 mut self,
5055 field: T,
5056 ) -> Self {
5057 self.set_protocol_config(field.into());
5058 self
5059 }
5060 }
5061 impl super::Event {
5062 pub const fn const_default() -> Self {
5063 Self {
5064 package_id: None,
5065 module: None,
5066 sender: None,
5067 event_type: None,
5068 contents: None,
5069 json: None,
5070 }
5071 }
5072 #[doc(hidden)]
5073 pub fn default_instance() -> &'static Self {
5074 static DEFAULT: super::Event = super::Event::const_default();
5075 &DEFAULT
5076 }
5077 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
5079 self.package_id.as_mut().map(|field| field as _)
5080 }
5081 pub fn package_id_mut(&mut self) -> &mut String {
5084 self.package_id.get_or_insert_default()
5085 }
5086 pub fn package_id_opt(&self) -> Option<&str> {
5088 self.package_id.as_ref().map(|field| field as _)
5089 }
5090 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
5092 self.package_id = Some(field.into().into());
5093 }
5094 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
5096 self.set_package_id(field.into());
5097 self
5098 }
5099 pub fn module_opt_mut(&mut self) -> Option<&mut String> {
5101 self.module.as_mut().map(|field| field as _)
5102 }
5103 pub fn module_mut(&mut self) -> &mut String {
5106 self.module.get_or_insert_default()
5107 }
5108 pub fn module_opt(&self) -> Option<&str> {
5110 self.module.as_ref().map(|field| field as _)
5111 }
5112 pub fn set_module<T: Into<String>>(&mut self, field: T) {
5114 self.module = Some(field.into().into());
5115 }
5116 pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
5118 self.set_module(field.into());
5119 self
5120 }
5121 pub fn sender_opt_mut(&mut self) -> Option<&mut String> {
5123 self.sender.as_mut().map(|field| field as _)
5124 }
5125 pub fn sender_mut(&mut self) -> &mut String {
5128 self.sender.get_or_insert_default()
5129 }
5130 pub fn sender_opt(&self) -> Option<&str> {
5132 self.sender.as_ref().map(|field| field as _)
5133 }
5134 pub fn set_sender<T: Into<String>>(&mut self, field: T) {
5136 self.sender = Some(field.into().into());
5137 }
5138 pub fn with_sender<T: Into<String>>(mut self, field: T) -> Self {
5140 self.set_sender(field.into());
5141 self
5142 }
5143 pub fn event_type_opt_mut(&mut self) -> Option<&mut String> {
5145 self.event_type.as_mut().map(|field| field as _)
5146 }
5147 pub fn event_type_mut(&mut self) -> &mut String {
5150 self.event_type.get_or_insert_default()
5151 }
5152 pub fn event_type_opt(&self) -> Option<&str> {
5154 self.event_type.as_ref().map(|field| field as _)
5155 }
5156 pub fn set_event_type<T: Into<String>>(&mut self, field: T) {
5158 self.event_type = Some(field.into().into());
5159 }
5160 pub fn with_event_type<T: Into<String>>(mut self, field: T) -> Self {
5162 self.set_event_type(field.into());
5163 self
5164 }
5165 pub fn contents(&self) -> &super::Bcs {
5167 self.contents
5168 .as_ref()
5169 .map(|field| field as _)
5170 .unwrap_or_else(|| super::Bcs::default_instance() as _)
5171 }
5172 pub fn contents_opt_mut(&mut self) -> Option<&mut super::Bcs> {
5174 self.contents.as_mut().map(|field| field as _)
5175 }
5176 pub fn contents_mut(&mut self) -> &mut super::Bcs {
5179 self.contents.get_or_insert_default()
5180 }
5181 pub fn contents_opt(&self) -> Option<&super::Bcs> {
5183 self.contents.as_ref().map(|field| field as _)
5184 }
5185 pub fn set_contents<T: Into<super::Bcs>>(&mut self, field: T) {
5187 self.contents = Some(field.into().into());
5188 }
5189 pub fn with_contents<T: Into<super::Bcs>>(mut self, field: T) -> Self {
5191 self.set_contents(field.into());
5192 self
5193 }
5194 pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
5196 self.json.as_mut().map(|field| field as _)
5197 }
5198 pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
5201 self.json.get_or_insert_default()
5202 }
5203 pub fn json_opt(&self) -> Option<&::prost_types::Value> {
5205 self.json.as_ref().map(|field| field as _)
5206 }
5207 pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
5209 self.json = Some(field.into().into());
5210 }
5211 pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
5213 self.set_json(field.into());
5214 self
5215 }
5216 }
5217 impl super::ExecuteTransactionRequest {
5218 pub const fn const_default() -> Self {
5219 Self {
5220 transaction: None,
5221 signatures: Vec::new(),
5222 read_mask: None,
5223 }
5224 }
5225 #[doc(hidden)]
5226 pub fn default_instance() -> &'static Self {
5227 static DEFAULT: super::ExecuteTransactionRequest = super::ExecuteTransactionRequest::const_default();
5228 &DEFAULT
5229 }
5230 pub fn transaction(&self) -> &super::Transaction {
5232 self.transaction
5233 .as_ref()
5234 .map(|field| field as _)
5235 .unwrap_or_else(|| super::Transaction::default_instance() as _)
5236 }
5237 pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
5239 self.transaction.as_mut().map(|field| field as _)
5240 }
5241 pub fn transaction_mut(&mut self) -> &mut super::Transaction {
5244 self.transaction.get_or_insert_default()
5245 }
5246 pub fn transaction_opt(&self) -> Option<&super::Transaction> {
5248 self.transaction.as_ref().map(|field| field as _)
5249 }
5250 pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
5252 self.transaction = Some(field.into().into());
5253 }
5254 pub fn with_transaction<T: Into<super::Transaction>>(
5256 mut self,
5257 field: T,
5258 ) -> Self {
5259 self.set_transaction(field.into());
5260 self
5261 }
5262 pub fn signatures(&self) -> &[super::UserSignature] {
5264 &self.signatures
5265 }
5266 pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
5269 &mut self.signatures
5270 }
5271 pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
5273 self.signatures = field;
5274 }
5275 pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
5277 self.set_signatures(field);
5278 self
5279 }
5280 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
5282 self.read_mask.as_mut().map(|field| field as _)
5283 }
5284 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
5287 self.read_mask.get_or_insert_default()
5288 }
5289 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
5291 self.read_mask.as_ref().map(|field| field as _)
5292 }
5293 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
5295 self.read_mask = Some(field.into().into());
5296 }
5297 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
5299 mut self,
5300 field: T,
5301 ) -> Self {
5302 self.set_read_mask(field.into());
5303 self
5304 }
5305 }
5306 impl super::ExecuteTransactionResponse {
5307 pub const fn const_default() -> Self {
5308 Self { transaction: None }
5309 }
5310 #[doc(hidden)]
5311 pub fn default_instance() -> &'static Self {
5312 static DEFAULT: super::ExecuteTransactionResponse = super::ExecuteTransactionResponse::const_default();
5313 &DEFAULT
5314 }
5315 pub fn transaction(&self) -> &super::ExecutedTransaction {
5317 self.transaction
5318 .as_ref()
5319 .map(|field| field as _)
5320 .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
5321 }
5322 pub fn transaction_opt_mut(
5324 &mut self,
5325 ) -> Option<&mut super::ExecutedTransaction> {
5326 self.transaction.as_mut().map(|field| field as _)
5327 }
5328 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
5331 self.transaction.get_or_insert_default()
5332 }
5333 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
5335 self.transaction.as_ref().map(|field| field as _)
5336 }
5337 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
5339 &mut self,
5340 field: T,
5341 ) {
5342 self.transaction = Some(field.into().into());
5343 }
5344 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
5346 mut self,
5347 field: T,
5348 ) -> Self {
5349 self.set_transaction(field.into());
5350 self
5351 }
5352 }
5353 impl super::ExecutedTransaction {
5354 pub const fn const_default() -> Self {
5355 Self {
5356 digest: None,
5357 transaction: None,
5358 signatures: Vec::new(),
5359 effects: None,
5360 events: None,
5361 checkpoint: None,
5362 timestamp: None,
5363 balance_changes: Vec::new(),
5364 objects: None,
5365 }
5366 }
5367 #[doc(hidden)]
5368 pub fn default_instance() -> &'static Self {
5369 static DEFAULT: super::ExecutedTransaction = super::ExecutedTransaction::const_default();
5370 &DEFAULT
5371 }
5372 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
5374 self.digest.as_mut().map(|field| field as _)
5375 }
5376 pub fn digest_mut(&mut self) -> &mut String {
5379 self.digest.get_or_insert_default()
5380 }
5381 pub fn digest_opt(&self) -> Option<&str> {
5383 self.digest.as_ref().map(|field| field as _)
5384 }
5385 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
5387 self.digest = Some(field.into().into());
5388 }
5389 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
5391 self.set_digest(field.into());
5392 self
5393 }
5394 pub fn transaction(&self) -> &super::Transaction {
5396 self.transaction
5397 .as_ref()
5398 .map(|field| field as _)
5399 .unwrap_or_else(|| super::Transaction::default_instance() as _)
5400 }
5401 pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
5403 self.transaction.as_mut().map(|field| field as _)
5404 }
5405 pub fn transaction_mut(&mut self) -> &mut super::Transaction {
5408 self.transaction.get_or_insert_default()
5409 }
5410 pub fn transaction_opt(&self) -> Option<&super::Transaction> {
5412 self.transaction.as_ref().map(|field| field as _)
5413 }
5414 pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
5416 self.transaction = Some(field.into().into());
5417 }
5418 pub fn with_transaction<T: Into<super::Transaction>>(
5420 mut self,
5421 field: T,
5422 ) -> Self {
5423 self.set_transaction(field.into());
5424 self
5425 }
5426 pub fn signatures(&self) -> &[super::UserSignature] {
5428 &self.signatures
5429 }
5430 pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
5433 &mut self.signatures
5434 }
5435 pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
5437 self.signatures = field;
5438 }
5439 pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
5441 self.set_signatures(field);
5442 self
5443 }
5444 pub fn effects(&self) -> &super::TransactionEffects {
5446 self.effects
5447 .as_ref()
5448 .map(|field| field as _)
5449 .unwrap_or_else(|| super::TransactionEffects::default_instance() as _)
5450 }
5451 pub fn effects_opt_mut(&mut self) -> Option<&mut super::TransactionEffects> {
5453 self.effects.as_mut().map(|field| field as _)
5454 }
5455 pub fn effects_mut(&mut self) -> &mut super::TransactionEffects {
5458 self.effects.get_or_insert_default()
5459 }
5460 pub fn effects_opt(&self) -> Option<&super::TransactionEffects> {
5462 self.effects.as_ref().map(|field| field as _)
5463 }
5464 pub fn set_effects<T: Into<super::TransactionEffects>>(&mut self, field: T) {
5466 self.effects = Some(field.into().into());
5467 }
5468 pub fn with_effects<T: Into<super::TransactionEffects>>(
5470 mut self,
5471 field: T,
5472 ) -> Self {
5473 self.set_effects(field.into());
5474 self
5475 }
5476 pub fn events(&self) -> &super::TransactionEvents {
5478 self.events
5479 .as_ref()
5480 .map(|field| field as _)
5481 .unwrap_or_else(|| super::TransactionEvents::default_instance() as _)
5482 }
5483 pub fn events_opt_mut(&mut self) -> Option<&mut super::TransactionEvents> {
5485 self.events.as_mut().map(|field| field as _)
5486 }
5487 pub fn events_mut(&mut self) -> &mut super::TransactionEvents {
5490 self.events.get_or_insert_default()
5491 }
5492 pub fn events_opt(&self) -> Option<&super::TransactionEvents> {
5494 self.events.as_ref().map(|field| field as _)
5495 }
5496 pub fn set_events<T: Into<super::TransactionEvents>>(&mut self, field: T) {
5498 self.events = Some(field.into().into());
5499 }
5500 pub fn with_events<T: Into<super::TransactionEvents>>(
5502 mut self,
5503 field: T,
5504 ) -> Self {
5505 self.set_events(field.into());
5506 self
5507 }
5508 pub fn checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
5510 self.checkpoint.as_mut().map(|field| field as _)
5511 }
5512 pub fn checkpoint_mut(&mut self) -> &mut u64 {
5515 self.checkpoint.get_or_insert_default()
5516 }
5517 pub fn checkpoint_opt(&self) -> Option<u64> {
5519 self.checkpoint.as_ref().map(|field| *field)
5520 }
5521 pub fn set_checkpoint(&mut self, field: u64) {
5523 self.checkpoint = Some(field);
5524 }
5525 pub fn with_checkpoint(mut self, field: u64) -> Self {
5527 self.set_checkpoint(field);
5528 self
5529 }
5530 pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
5532 self.timestamp.as_mut().map(|field| field as _)
5533 }
5534 pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
5537 self.timestamp.get_or_insert_default()
5538 }
5539 pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
5541 self.timestamp.as_ref().map(|field| field as _)
5542 }
5543 pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
5545 self.timestamp = Some(field.into().into());
5546 }
5547 pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
5549 mut self,
5550 field: T,
5551 ) -> Self {
5552 self.set_timestamp(field.into());
5553 self
5554 }
5555 pub fn balance_changes(&self) -> &[super::BalanceChange] {
5557 &self.balance_changes
5558 }
5559 pub fn balance_changes_mut(&mut self) -> &mut Vec<super::BalanceChange> {
5562 &mut self.balance_changes
5563 }
5564 pub fn set_balance_changes(&mut self, field: Vec<super::BalanceChange>) {
5566 self.balance_changes = field;
5567 }
5568 pub fn with_balance_changes(mut self, field: Vec<super::BalanceChange>) -> Self {
5570 self.set_balance_changes(field);
5571 self
5572 }
5573 pub fn objects(&self) -> &super::ObjectSet {
5575 self.objects
5576 .as_ref()
5577 .map(|field| field as _)
5578 .unwrap_or_else(|| super::ObjectSet::default_instance() as _)
5579 }
5580 pub fn objects_opt_mut(&mut self) -> Option<&mut super::ObjectSet> {
5582 self.objects.as_mut().map(|field| field as _)
5583 }
5584 pub fn objects_mut(&mut self) -> &mut super::ObjectSet {
5587 self.objects.get_or_insert_default()
5588 }
5589 pub fn objects_opt(&self) -> Option<&super::ObjectSet> {
5591 self.objects.as_ref().map(|field| field as _)
5592 }
5593 pub fn set_objects<T: Into<super::ObjectSet>>(&mut self, field: T) {
5595 self.objects = Some(field.into().into());
5596 }
5597 pub fn with_objects<T: Into<super::ObjectSet>>(mut self, field: T) -> Self {
5599 self.set_objects(field.into());
5600 self
5601 }
5602 }
5603 impl super::ExecutionError {
5604 pub const fn const_default() -> Self {
5605 Self {
5606 description: None,
5607 command: None,
5608 kind: None,
5609 error_details: None,
5610 }
5611 }
5612 #[doc(hidden)]
5613 pub fn default_instance() -> &'static Self {
5614 static DEFAULT: super::ExecutionError = super::ExecutionError::const_default();
5615 &DEFAULT
5616 }
5617 pub fn description_opt_mut(&mut self) -> Option<&mut String> {
5619 self.description.as_mut().map(|field| field as _)
5620 }
5621 pub fn description_mut(&mut self) -> &mut String {
5624 self.description.get_or_insert_default()
5625 }
5626 pub fn description_opt(&self) -> Option<&str> {
5628 self.description.as_ref().map(|field| field as _)
5629 }
5630 pub fn set_description<T: Into<String>>(&mut self, field: T) {
5632 self.description = Some(field.into().into());
5633 }
5634 pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
5636 self.set_description(field.into());
5637 self
5638 }
5639 pub fn command_opt_mut(&mut self) -> Option<&mut u64> {
5641 self.command.as_mut().map(|field| field as _)
5642 }
5643 pub fn command_mut(&mut self) -> &mut u64 {
5646 self.command.get_or_insert_default()
5647 }
5648 pub fn command_opt(&self) -> Option<u64> {
5650 self.command.as_ref().map(|field| *field)
5651 }
5652 pub fn set_command(&mut self, field: u64) {
5654 self.command = Some(field);
5655 }
5656 pub fn with_command(mut self, field: u64) -> Self {
5658 self.set_command(field);
5659 self
5660 }
5661 pub fn with_kind<T: Into<super::execution_error::ExecutionErrorKind>>(
5663 mut self,
5664 field: T,
5665 ) -> Self {
5666 self.set_kind(field.into());
5667 self
5668 }
5669 pub fn abort(&self) -> &super::MoveAbort {
5671 if let Some(super::execution_error::ErrorDetails::Abort(field)) = &self
5672 .error_details
5673 {
5674 field as _
5675 } else {
5676 super::MoveAbort::default_instance() as _
5677 }
5678 }
5679 pub fn abort_opt(&self) -> Option<&super::MoveAbort> {
5681 if let Some(super::execution_error::ErrorDetails::Abort(field)) = &self
5682 .error_details
5683 {
5684 Some(field as _)
5685 } else {
5686 None
5687 }
5688 }
5689 pub fn abort_opt_mut(&mut self) -> Option<&mut super::MoveAbort> {
5691 if let Some(super::execution_error::ErrorDetails::Abort(field)) = &mut self
5692 .error_details
5693 {
5694 Some(field as _)
5695 } else {
5696 None
5697 }
5698 }
5699 pub fn abort_mut(&mut self) -> &mut super::MoveAbort {
5703 if self.abort_opt_mut().is_none() {
5704 self.error_details = Some(
5705 super::execution_error::ErrorDetails::Abort(
5706 super::MoveAbort::default(),
5707 ),
5708 );
5709 }
5710 self.abort_opt_mut().unwrap()
5711 }
5712 pub fn set_abort<T: Into<super::MoveAbort>>(&mut self, field: T) {
5715 self.error_details = Some(
5716 super::execution_error::ErrorDetails::Abort(field.into().into()),
5717 );
5718 }
5719 pub fn with_abort<T: Into<super::MoveAbort>>(mut self, field: T) -> Self {
5722 self.set_abort(field.into());
5723 self
5724 }
5725 pub fn size_error(&self) -> &super::SizeError {
5727 if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &self
5728 .error_details
5729 {
5730 field as _
5731 } else {
5732 super::SizeError::default_instance() as _
5733 }
5734 }
5735 pub fn size_error_opt(&self) -> Option<&super::SizeError> {
5737 if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &self
5738 .error_details
5739 {
5740 Some(field as _)
5741 } else {
5742 None
5743 }
5744 }
5745 pub fn size_error_opt_mut(&mut self) -> Option<&mut super::SizeError> {
5747 if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &mut self
5748 .error_details
5749 {
5750 Some(field as _)
5751 } else {
5752 None
5753 }
5754 }
5755 pub fn size_error_mut(&mut self) -> &mut super::SizeError {
5759 if self.size_error_opt_mut().is_none() {
5760 self.error_details = Some(
5761 super::execution_error::ErrorDetails::SizeError(
5762 super::SizeError::default(),
5763 ),
5764 );
5765 }
5766 self.size_error_opt_mut().unwrap()
5767 }
5768 pub fn set_size_error<T: Into<super::SizeError>>(&mut self, field: T) {
5771 self.error_details = Some(
5772 super::execution_error::ErrorDetails::SizeError(field.into().into()),
5773 );
5774 }
5775 pub fn with_size_error<T: Into<super::SizeError>>(mut self, field: T) -> Self {
5778 self.set_size_error(field.into());
5779 self
5780 }
5781 pub fn command_argument_error(&self) -> &super::CommandArgumentError {
5783 if let Some(
5784 super::execution_error::ErrorDetails::CommandArgumentError(field),
5785 ) = &self.error_details
5786 {
5787 field as _
5788 } else {
5789 super::CommandArgumentError::default_instance() as _
5790 }
5791 }
5792 pub fn command_argument_error_opt(
5794 &self,
5795 ) -> Option<&super::CommandArgumentError> {
5796 if let Some(
5797 super::execution_error::ErrorDetails::CommandArgumentError(field),
5798 ) = &self.error_details
5799 {
5800 Some(field as _)
5801 } else {
5802 None
5803 }
5804 }
5805 pub fn command_argument_error_opt_mut(
5807 &mut self,
5808 ) -> Option<&mut super::CommandArgumentError> {
5809 if let Some(
5810 super::execution_error::ErrorDetails::CommandArgumentError(field),
5811 ) = &mut self.error_details
5812 {
5813 Some(field as _)
5814 } else {
5815 None
5816 }
5817 }
5818 pub fn command_argument_error_mut(
5822 &mut self,
5823 ) -> &mut super::CommandArgumentError {
5824 if self.command_argument_error_opt_mut().is_none() {
5825 self.error_details = Some(
5826 super::execution_error::ErrorDetails::CommandArgumentError(
5827 super::CommandArgumentError::default(),
5828 ),
5829 );
5830 }
5831 self.command_argument_error_opt_mut().unwrap()
5832 }
5833 pub fn set_command_argument_error<T: Into<super::CommandArgumentError>>(
5836 &mut self,
5837 field: T,
5838 ) {
5839 self.error_details = Some(
5840 super::execution_error::ErrorDetails::CommandArgumentError(
5841 field.into().into(),
5842 ),
5843 );
5844 }
5845 pub fn with_command_argument_error<T: Into<super::CommandArgumentError>>(
5848 mut self,
5849 field: T,
5850 ) -> Self {
5851 self.set_command_argument_error(field.into());
5852 self
5853 }
5854 pub fn type_argument_error(&self) -> &super::TypeArgumentError {
5856 if let Some(
5857 super::execution_error::ErrorDetails::TypeArgumentError(field),
5858 ) = &self.error_details
5859 {
5860 field as _
5861 } else {
5862 super::TypeArgumentError::default_instance() as _
5863 }
5864 }
5865 pub fn type_argument_error_opt(&self) -> Option<&super::TypeArgumentError> {
5867 if let Some(
5868 super::execution_error::ErrorDetails::TypeArgumentError(field),
5869 ) = &self.error_details
5870 {
5871 Some(field as _)
5872 } else {
5873 None
5874 }
5875 }
5876 pub fn type_argument_error_opt_mut(
5878 &mut self,
5879 ) -> Option<&mut super::TypeArgumentError> {
5880 if let Some(
5881 super::execution_error::ErrorDetails::TypeArgumentError(field),
5882 ) = &mut self.error_details
5883 {
5884 Some(field as _)
5885 } else {
5886 None
5887 }
5888 }
5889 pub fn type_argument_error_mut(&mut self) -> &mut super::TypeArgumentError {
5893 if self.type_argument_error_opt_mut().is_none() {
5894 self.error_details = Some(
5895 super::execution_error::ErrorDetails::TypeArgumentError(
5896 super::TypeArgumentError::default(),
5897 ),
5898 );
5899 }
5900 self.type_argument_error_opt_mut().unwrap()
5901 }
5902 pub fn set_type_argument_error<T: Into<super::TypeArgumentError>>(
5905 &mut self,
5906 field: T,
5907 ) {
5908 self.error_details = Some(
5909 super::execution_error::ErrorDetails::TypeArgumentError(
5910 field.into().into(),
5911 ),
5912 );
5913 }
5914 pub fn with_type_argument_error<T: Into<super::TypeArgumentError>>(
5917 mut self,
5918 field: T,
5919 ) -> Self {
5920 self.set_type_argument_error(field.into());
5921 self
5922 }
5923 pub fn package_upgrade_error(&self) -> &super::PackageUpgradeError {
5925 if let Some(
5926 super::execution_error::ErrorDetails::PackageUpgradeError(field),
5927 ) = &self.error_details
5928 {
5929 field as _
5930 } else {
5931 super::PackageUpgradeError::default_instance() as _
5932 }
5933 }
5934 pub fn package_upgrade_error_opt(&self) -> Option<&super::PackageUpgradeError> {
5936 if let Some(
5937 super::execution_error::ErrorDetails::PackageUpgradeError(field),
5938 ) = &self.error_details
5939 {
5940 Some(field as _)
5941 } else {
5942 None
5943 }
5944 }
5945 pub fn package_upgrade_error_opt_mut(
5947 &mut self,
5948 ) -> Option<&mut super::PackageUpgradeError> {
5949 if let Some(
5950 super::execution_error::ErrorDetails::PackageUpgradeError(field),
5951 ) = &mut self.error_details
5952 {
5953 Some(field as _)
5954 } else {
5955 None
5956 }
5957 }
5958 pub fn package_upgrade_error_mut(&mut self) -> &mut super::PackageUpgradeError {
5962 if self.package_upgrade_error_opt_mut().is_none() {
5963 self.error_details = Some(
5964 super::execution_error::ErrorDetails::PackageUpgradeError(
5965 super::PackageUpgradeError::default(),
5966 ),
5967 );
5968 }
5969 self.package_upgrade_error_opt_mut().unwrap()
5970 }
5971 pub fn set_package_upgrade_error<T: Into<super::PackageUpgradeError>>(
5974 &mut self,
5975 field: T,
5976 ) {
5977 self.error_details = Some(
5978 super::execution_error::ErrorDetails::PackageUpgradeError(
5979 field.into().into(),
5980 ),
5981 );
5982 }
5983 pub fn with_package_upgrade_error<T: Into<super::PackageUpgradeError>>(
5986 mut self,
5987 field: T,
5988 ) -> Self {
5989 self.set_package_upgrade_error(field.into());
5990 self
5991 }
5992 pub fn index_error(&self) -> &super::IndexError {
5994 if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &self
5995 .error_details
5996 {
5997 field as _
5998 } else {
5999 super::IndexError::default_instance() as _
6000 }
6001 }
6002 pub fn index_error_opt(&self) -> Option<&super::IndexError> {
6004 if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &self
6005 .error_details
6006 {
6007 Some(field as _)
6008 } else {
6009 None
6010 }
6011 }
6012 pub fn index_error_opt_mut(&mut self) -> Option<&mut super::IndexError> {
6014 if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &mut self
6015 .error_details
6016 {
6017 Some(field as _)
6018 } else {
6019 None
6020 }
6021 }
6022 pub fn index_error_mut(&mut self) -> &mut super::IndexError {
6026 if self.index_error_opt_mut().is_none() {
6027 self.error_details = Some(
6028 super::execution_error::ErrorDetails::IndexError(
6029 super::IndexError::default(),
6030 ),
6031 );
6032 }
6033 self.index_error_opt_mut().unwrap()
6034 }
6035 pub fn set_index_error<T: Into<super::IndexError>>(&mut self, field: T) {
6038 self.error_details = Some(
6039 super::execution_error::ErrorDetails::IndexError(field.into().into()),
6040 );
6041 }
6042 pub fn with_index_error<T: Into<super::IndexError>>(mut self, field: T) -> Self {
6045 self.set_index_error(field.into());
6046 self
6047 }
6048 pub fn object_id(&self) -> &str {
6050 if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &self
6051 .error_details
6052 {
6053 field as _
6054 } else {
6055 ""
6056 }
6057 }
6058 pub fn object_id_opt(&self) -> Option<&str> {
6060 if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &self
6061 .error_details
6062 {
6063 Some(field as _)
6064 } else {
6065 None
6066 }
6067 }
6068 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
6070 if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &mut self
6071 .error_details
6072 {
6073 Some(field as _)
6074 } else {
6075 None
6076 }
6077 }
6078 pub fn object_id_mut(&mut self) -> &mut String {
6082 if self.object_id_opt_mut().is_none() {
6083 self.error_details = Some(
6084 super::execution_error::ErrorDetails::ObjectId(String::default()),
6085 );
6086 }
6087 self.object_id_opt_mut().unwrap()
6088 }
6089 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
6092 self.error_details = Some(
6093 super::execution_error::ErrorDetails::ObjectId(field.into().into()),
6094 );
6095 }
6096 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
6099 self.set_object_id(field.into());
6100 self
6101 }
6102 pub fn coin_deny_list_error(&self) -> &super::CoinDenyListError {
6104 if let Some(
6105 super::execution_error::ErrorDetails::CoinDenyListError(field),
6106 ) = &self.error_details
6107 {
6108 field as _
6109 } else {
6110 super::CoinDenyListError::default_instance() as _
6111 }
6112 }
6113 pub fn coin_deny_list_error_opt(&self) -> Option<&super::CoinDenyListError> {
6115 if let Some(
6116 super::execution_error::ErrorDetails::CoinDenyListError(field),
6117 ) = &self.error_details
6118 {
6119 Some(field as _)
6120 } else {
6121 None
6122 }
6123 }
6124 pub fn coin_deny_list_error_opt_mut(
6126 &mut self,
6127 ) -> Option<&mut super::CoinDenyListError> {
6128 if let Some(
6129 super::execution_error::ErrorDetails::CoinDenyListError(field),
6130 ) = &mut self.error_details
6131 {
6132 Some(field as _)
6133 } else {
6134 None
6135 }
6136 }
6137 pub fn coin_deny_list_error_mut(&mut self) -> &mut super::CoinDenyListError {
6141 if self.coin_deny_list_error_opt_mut().is_none() {
6142 self.error_details = Some(
6143 super::execution_error::ErrorDetails::CoinDenyListError(
6144 super::CoinDenyListError::default(),
6145 ),
6146 );
6147 }
6148 self.coin_deny_list_error_opt_mut().unwrap()
6149 }
6150 pub fn set_coin_deny_list_error<T: Into<super::CoinDenyListError>>(
6153 &mut self,
6154 field: T,
6155 ) {
6156 self.error_details = Some(
6157 super::execution_error::ErrorDetails::CoinDenyListError(
6158 field.into().into(),
6159 ),
6160 );
6161 }
6162 pub fn with_coin_deny_list_error<T: Into<super::CoinDenyListError>>(
6165 mut self,
6166 field: T,
6167 ) -> Self {
6168 self.set_coin_deny_list_error(field.into());
6169 self
6170 }
6171 pub fn congested_objects(&self) -> &super::CongestedObjects {
6173 if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &self
6174 .error_details
6175 {
6176 field as _
6177 } else {
6178 super::CongestedObjects::default_instance() as _
6179 }
6180 }
6181 pub fn congested_objects_opt(&self) -> Option<&super::CongestedObjects> {
6183 if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &self
6184 .error_details
6185 {
6186 Some(field as _)
6187 } else {
6188 None
6189 }
6190 }
6191 pub fn congested_objects_opt_mut(
6193 &mut self,
6194 ) -> Option<&mut super::CongestedObjects> {
6195 if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &mut self
6196 .error_details
6197 {
6198 Some(field as _)
6199 } else {
6200 None
6201 }
6202 }
6203 pub fn congested_objects_mut(&mut self) -> &mut super::CongestedObjects {
6207 if self.congested_objects_opt_mut().is_none() {
6208 self.error_details = Some(
6209 super::execution_error::ErrorDetails::CongestedObjects(
6210 super::CongestedObjects::default(),
6211 ),
6212 );
6213 }
6214 self.congested_objects_opt_mut().unwrap()
6215 }
6216 pub fn set_congested_objects<T: Into<super::CongestedObjects>>(
6219 &mut self,
6220 field: T,
6221 ) {
6222 self.error_details = Some(
6223 super::execution_error::ErrorDetails::CongestedObjects(
6224 field.into().into(),
6225 ),
6226 );
6227 }
6228 pub fn with_congested_objects<T: Into<super::CongestedObjects>>(
6231 mut self,
6232 field: T,
6233 ) -> Self {
6234 self.set_congested_objects(field.into());
6235 self
6236 }
6237 }
6238 impl super::ExecutionStatus {
6239 pub const fn const_default() -> Self {
6240 Self { success: None, error: None }
6241 }
6242 #[doc(hidden)]
6243 pub fn default_instance() -> &'static Self {
6244 static DEFAULT: super::ExecutionStatus = super::ExecutionStatus::const_default();
6245 &DEFAULT
6246 }
6247 pub fn success_opt_mut(&mut self) -> Option<&mut bool> {
6249 self.success.as_mut().map(|field| field as _)
6250 }
6251 pub fn success_mut(&mut self) -> &mut bool {
6254 self.success.get_or_insert_default()
6255 }
6256 pub fn success_opt(&self) -> Option<bool> {
6258 self.success.as_ref().map(|field| *field)
6259 }
6260 pub fn set_success(&mut self, field: bool) {
6262 self.success = Some(field);
6263 }
6264 pub fn with_success(mut self, field: bool) -> Self {
6266 self.set_success(field);
6267 self
6268 }
6269 pub fn error(&self) -> &super::ExecutionError {
6271 self.error
6272 .as_ref()
6273 .map(|field| field as _)
6274 .unwrap_or_else(|| super::ExecutionError::default_instance() as _)
6275 }
6276 pub fn error_opt_mut(&mut self) -> Option<&mut super::ExecutionError> {
6278 self.error.as_mut().map(|field| field as _)
6279 }
6280 pub fn error_mut(&mut self) -> &mut super::ExecutionError {
6283 self.error.get_or_insert_default()
6284 }
6285 pub fn error_opt(&self) -> Option<&super::ExecutionError> {
6287 self.error.as_ref().map(|field| field as _)
6288 }
6289 pub fn set_error<T: Into<super::ExecutionError>>(&mut self, field: T) {
6291 self.error = Some(field.into().into());
6292 }
6293 pub fn with_error<T: Into<super::ExecutionError>>(mut self, field: T) -> Self {
6295 self.set_error(field.into());
6296 self
6297 }
6298 }
6299 impl super::ExecutionTimeObservation {
6300 pub const fn const_default() -> Self {
6301 Self {
6302 kind: None,
6303 move_entry_point: None,
6304 validator_observations: Vec::new(),
6305 }
6306 }
6307 #[doc(hidden)]
6308 pub fn default_instance() -> &'static Self {
6309 static DEFAULT: super::ExecutionTimeObservation = super::ExecutionTimeObservation::const_default();
6310 &DEFAULT
6311 }
6312 pub fn with_kind<
6314 T: Into<super::execution_time_observation::ExecutionTimeObservationKind>,
6315 >(mut self, field: T) -> Self {
6316 self.set_kind(field.into());
6317 self
6318 }
6319 pub fn move_entry_point(&self) -> &super::MoveCall {
6321 self.move_entry_point
6322 .as_ref()
6323 .map(|field| field as _)
6324 .unwrap_or_else(|| super::MoveCall::default_instance() as _)
6325 }
6326 pub fn move_entry_point_opt_mut(&mut self) -> Option<&mut super::MoveCall> {
6328 self.move_entry_point.as_mut().map(|field| field as _)
6329 }
6330 pub fn move_entry_point_mut(&mut self) -> &mut super::MoveCall {
6333 self.move_entry_point.get_or_insert_default()
6334 }
6335 pub fn move_entry_point_opt(&self) -> Option<&super::MoveCall> {
6337 self.move_entry_point.as_ref().map(|field| field as _)
6338 }
6339 pub fn set_move_entry_point<T: Into<super::MoveCall>>(&mut self, field: T) {
6341 self.move_entry_point = Some(field.into().into());
6342 }
6343 pub fn with_move_entry_point<T: Into<super::MoveCall>>(
6345 mut self,
6346 field: T,
6347 ) -> Self {
6348 self.set_move_entry_point(field.into());
6349 self
6350 }
6351 pub fn validator_observations(
6353 &self,
6354 ) -> &[super::ValidatorExecutionTimeObservation] {
6355 &self.validator_observations
6356 }
6357 pub fn validator_observations_mut(
6360 &mut self,
6361 ) -> &mut Vec<super::ValidatorExecutionTimeObservation> {
6362 &mut self.validator_observations
6363 }
6364 pub fn set_validator_observations(
6366 &mut self,
6367 field: Vec<super::ValidatorExecutionTimeObservation>,
6368 ) {
6369 self.validator_observations = field;
6370 }
6371 pub fn with_validator_observations(
6373 mut self,
6374 field: Vec<super::ValidatorExecutionTimeObservation>,
6375 ) -> Self {
6376 self.set_validator_observations(field);
6377 self
6378 }
6379 }
6380 impl super::ExecutionTimeObservations {
6381 pub const fn const_default() -> Self {
6382 Self {
6383 version: None,
6384 observations: Vec::new(),
6385 }
6386 }
6387 #[doc(hidden)]
6388 pub fn default_instance() -> &'static Self {
6389 static DEFAULT: super::ExecutionTimeObservations = super::ExecutionTimeObservations::const_default();
6390 &DEFAULT
6391 }
6392 pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
6394 self.version.as_mut().map(|field| field as _)
6395 }
6396 pub fn version_mut(&mut self) -> &mut i32 {
6399 self.version.get_or_insert_default()
6400 }
6401 pub fn version_opt(&self) -> Option<i32> {
6403 self.version.as_ref().map(|field| *field)
6404 }
6405 pub fn set_version(&mut self, field: i32) {
6407 self.version = Some(field);
6408 }
6409 pub fn with_version(mut self, field: i32) -> Self {
6411 self.set_version(field);
6412 self
6413 }
6414 pub fn observations(&self) -> &[super::ExecutionTimeObservation] {
6416 &self.observations
6417 }
6418 pub fn observations_mut(&mut self) -> &mut Vec<super::ExecutionTimeObservation> {
6421 &mut self.observations
6422 }
6423 pub fn set_observations(&mut self, field: Vec<super::ExecutionTimeObservation>) {
6425 self.observations = field;
6426 }
6427 pub fn with_observations(
6429 mut self,
6430 field: Vec<super::ExecutionTimeObservation>,
6431 ) -> Self {
6432 self.set_observations(field);
6433 self
6434 }
6435 }
6436 impl super::FieldDescriptor {
6437 pub const fn const_default() -> Self {
6438 Self {
6439 name: None,
6440 position: None,
6441 r#type: None,
6442 }
6443 }
6444 #[doc(hidden)]
6445 pub fn default_instance() -> &'static Self {
6446 static DEFAULT: super::FieldDescriptor = super::FieldDescriptor::const_default();
6447 &DEFAULT
6448 }
6449 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
6451 self.name.as_mut().map(|field| field as _)
6452 }
6453 pub fn name_mut(&mut self) -> &mut String {
6456 self.name.get_or_insert_default()
6457 }
6458 pub fn name_opt(&self) -> Option<&str> {
6460 self.name.as_ref().map(|field| field as _)
6461 }
6462 pub fn set_name<T: Into<String>>(&mut self, field: T) {
6464 self.name = Some(field.into().into());
6465 }
6466 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
6468 self.set_name(field.into());
6469 self
6470 }
6471 pub fn position_opt_mut(&mut self) -> Option<&mut u32> {
6473 self.position.as_mut().map(|field| field as _)
6474 }
6475 pub fn position_mut(&mut self) -> &mut u32 {
6478 self.position.get_or_insert_default()
6479 }
6480 pub fn position_opt(&self) -> Option<u32> {
6482 self.position.as_ref().map(|field| *field)
6483 }
6484 pub fn set_position(&mut self, field: u32) {
6486 self.position = Some(field);
6487 }
6488 pub fn with_position(mut self, field: u32) -> Self {
6490 self.set_position(field);
6491 self
6492 }
6493 pub fn r#type(&self) -> &super::OpenSignatureBody {
6495 self.r#type
6496 .as_ref()
6497 .map(|field| field as _)
6498 .unwrap_or_else(|| super::OpenSignatureBody::default_instance() as _)
6499 }
6500 pub fn type_opt_mut(&mut self) -> Option<&mut super::OpenSignatureBody> {
6502 self.r#type.as_mut().map(|field| field as _)
6503 }
6504 pub fn type_mut(&mut self) -> &mut super::OpenSignatureBody {
6507 self.r#type.get_or_insert_default()
6508 }
6509 pub fn type_opt(&self) -> Option<&super::OpenSignatureBody> {
6511 self.r#type.as_ref().map(|field| field as _)
6512 }
6513 pub fn set_type<T: Into<super::OpenSignatureBody>>(&mut self, field: T) {
6515 self.r#type = Some(field.into().into());
6516 }
6517 pub fn with_type<T: Into<super::OpenSignatureBody>>(mut self, field: T) -> Self {
6519 self.set_type(field.into());
6520 self
6521 }
6522 }
6523 impl super::FunctionDescriptor {
6524 pub const fn const_default() -> Self {
6525 Self {
6526 name: None,
6527 visibility: None,
6528 is_entry: None,
6529 type_parameters: Vec::new(),
6530 parameters: Vec::new(),
6531 returns: Vec::new(),
6532 }
6533 }
6534 #[doc(hidden)]
6535 pub fn default_instance() -> &'static Self {
6536 static DEFAULT: super::FunctionDescriptor = super::FunctionDescriptor::const_default();
6537 &DEFAULT
6538 }
6539 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
6541 self.name.as_mut().map(|field| field as _)
6542 }
6543 pub fn name_mut(&mut self) -> &mut String {
6546 self.name.get_or_insert_default()
6547 }
6548 pub fn name_opt(&self) -> Option<&str> {
6550 self.name.as_ref().map(|field| field as _)
6551 }
6552 pub fn set_name<T: Into<String>>(&mut self, field: T) {
6554 self.name = Some(field.into().into());
6555 }
6556 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
6558 self.set_name(field.into());
6559 self
6560 }
6561 pub fn with_visibility<T: Into<super::function_descriptor::Visibility>>(
6563 mut self,
6564 field: T,
6565 ) -> Self {
6566 self.set_visibility(field.into());
6567 self
6568 }
6569 pub fn is_entry_opt_mut(&mut self) -> Option<&mut bool> {
6571 self.is_entry.as_mut().map(|field| field as _)
6572 }
6573 pub fn is_entry_mut(&mut self) -> &mut bool {
6576 self.is_entry.get_or_insert_default()
6577 }
6578 pub fn is_entry_opt(&self) -> Option<bool> {
6580 self.is_entry.as_ref().map(|field| *field)
6581 }
6582 pub fn set_is_entry(&mut self, field: bool) {
6584 self.is_entry = Some(field);
6585 }
6586 pub fn with_is_entry(mut self, field: bool) -> Self {
6588 self.set_is_entry(field);
6589 self
6590 }
6591 pub fn type_parameters(&self) -> &[super::TypeParameter] {
6593 &self.type_parameters
6594 }
6595 pub fn type_parameters_mut(&mut self) -> &mut Vec<super::TypeParameter> {
6598 &mut self.type_parameters
6599 }
6600 pub fn set_type_parameters(&mut self, field: Vec<super::TypeParameter>) {
6602 self.type_parameters = field;
6603 }
6604 pub fn with_type_parameters(mut self, field: Vec<super::TypeParameter>) -> Self {
6606 self.set_type_parameters(field);
6607 self
6608 }
6609 pub fn parameters(&self) -> &[super::OpenSignature] {
6611 &self.parameters
6612 }
6613 pub fn parameters_mut(&mut self) -> &mut Vec<super::OpenSignature> {
6616 &mut self.parameters
6617 }
6618 pub fn set_parameters(&mut self, field: Vec<super::OpenSignature>) {
6620 self.parameters = field;
6621 }
6622 pub fn with_parameters(mut self, field: Vec<super::OpenSignature>) -> Self {
6624 self.set_parameters(field);
6625 self
6626 }
6627 pub fn returns(&self) -> &[super::OpenSignature] {
6629 &self.returns
6630 }
6631 pub fn returns_mut(&mut self) -> &mut Vec<super::OpenSignature> {
6634 &mut self.returns
6635 }
6636 pub fn set_returns(&mut self, field: Vec<super::OpenSignature>) {
6638 self.returns = field;
6639 }
6640 pub fn with_returns(mut self, field: Vec<super::OpenSignature>) -> Self {
6642 self.set_returns(field);
6643 self
6644 }
6645 }
6646 impl super::FundsWithdrawal {
6647 pub const fn const_default() -> Self {
6648 Self {
6649 amount: None,
6650 coin_type: None,
6651 source: None,
6652 }
6653 }
6654 #[doc(hidden)]
6655 pub fn default_instance() -> &'static Self {
6656 static DEFAULT: super::FundsWithdrawal = super::FundsWithdrawal::const_default();
6657 &DEFAULT
6658 }
6659 pub fn amount_opt_mut(&mut self) -> Option<&mut u64> {
6661 self.amount.as_mut().map(|field| field as _)
6662 }
6663 pub fn amount_mut(&mut self) -> &mut u64 {
6666 self.amount.get_or_insert_default()
6667 }
6668 pub fn amount_opt(&self) -> Option<u64> {
6670 self.amount.as_ref().map(|field| *field)
6671 }
6672 pub fn set_amount(&mut self, field: u64) {
6674 self.amount = Some(field);
6675 }
6676 pub fn with_amount(mut self, field: u64) -> Self {
6678 self.set_amount(field);
6679 self
6680 }
6681 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
6683 self.coin_type.as_mut().map(|field| field as _)
6684 }
6685 pub fn coin_type_mut(&mut self) -> &mut String {
6688 self.coin_type.get_or_insert_default()
6689 }
6690 pub fn coin_type_opt(&self) -> Option<&str> {
6692 self.coin_type.as_ref().map(|field| field as _)
6693 }
6694 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
6696 self.coin_type = Some(field.into().into());
6697 }
6698 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
6700 self.set_coin_type(field.into());
6701 self
6702 }
6703 pub fn with_source<T: Into<super::funds_withdrawal::Source>>(
6705 mut self,
6706 field: T,
6707 ) -> Self {
6708 self.set_source(field.into());
6709 self
6710 }
6711 }
6712 impl super::GasCostSummary {
6713 pub const fn const_default() -> Self {
6714 Self {
6715 computation_cost: None,
6716 storage_cost: None,
6717 storage_rebate: None,
6718 non_refundable_storage_fee: None,
6719 }
6720 }
6721 #[doc(hidden)]
6722 pub fn default_instance() -> &'static Self {
6723 static DEFAULT: super::GasCostSummary = super::GasCostSummary::const_default();
6724 &DEFAULT
6725 }
6726 pub fn computation_cost_opt_mut(&mut self) -> Option<&mut u64> {
6728 self.computation_cost.as_mut().map(|field| field as _)
6729 }
6730 pub fn computation_cost_mut(&mut self) -> &mut u64 {
6733 self.computation_cost.get_or_insert_default()
6734 }
6735 pub fn computation_cost_opt(&self) -> Option<u64> {
6737 self.computation_cost.as_ref().map(|field| *field)
6738 }
6739 pub fn set_computation_cost(&mut self, field: u64) {
6741 self.computation_cost = Some(field);
6742 }
6743 pub fn with_computation_cost(mut self, field: u64) -> Self {
6745 self.set_computation_cost(field);
6746 self
6747 }
6748 pub fn storage_cost_opt_mut(&mut self) -> Option<&mut u64> {
6750 self.storage_cost.as_mut().map(|field| field as _)
6751 }
6752 pub fn storage_cost_mut(&mut self) -> &mut u64 {
6755 self.storage_cost.get_or_insert_default()
6756 }
6757 pub fn storage_cost_opt(&self) -> Option<u64> {
6759 self.storage_cost.as_ref().map(|field| *field)
6760 }
6761 pub fn set_storage_cost(&mut self, field: u64) {
6763 self.storage_cost = Some(field);
6764 }
6765 pub fn with_storage_cost(mut self, field: u64) -> Self {
6767 self.set_storage_cost(field);
6768 self
6769 }
6770 pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
6772 self.storage_rebate.as_mut().map(|field| field as _)
6773 }
6774 pub fn storage_rebate_mut(&mut self) -> &mut u64 {
6777 self.storage_rebate.get_or_insert_default()
6778 }
6779 pub fn storage_rebate_opt(&self) -> Option<u64> {
6781 self.storage_rebate.as_ref().map(|field| *field)
6782 }
6783 pub fn set_storage_rebate(&mut self, field: u64) {
6785 self.storage_rebate = Some(field);
6786 }
6787 pub fn with_storage_rebate(mut self, field: u64) -> Self {
6789 self.set_storage_rebate(field);
6790 self
6791 }
6792 pub fn non_refundable_storage_fee_opt_mut(&mut self) -> Option<&mut u64> {
6794 self.non_refundable_storage_fee.as_mut().map(|field| field as _)
6795 }
6796 pub fn non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
6799 self.non_refundable_storage_fee.get_or_insert_default()
6800 }
6801 pub fn non_refundable_storage_fee_opt(&self) -> Option<u64> {
6803 self.non_refundable_storage_fee.as_ref().map(|field| *field)
6804 }
6805 pub fn set_non_refundable_storage_fee(&mut self, field: u64) {
6807 self.non_refundable_storage_fee = Some(field);
6808 }
6809 pub fn with_non_refundable_storage_fee(mut self, field: u64) -> Self {
6811 self.set_non_refundable_storage_fee(field);
6812 self
6813 }
6814 }
6815 impl super::GasPayment {
6816 pub const fn const_default() -> Self {
6817 Self {
6818 objects: Vec::new(),
6819 owner: None,
6820 price: None,
6821 budget: None,
6822 }
6823 }
6824 #[doc(hidden)]
6825 pub fn default_instance() -> &'static Self {
6826 static DEFAULT: super::GasPayment = super::GasPayment::const_default();
6827 &DEFAULT
6828 }
6829 pub fn objects(&self) -> &[super::ObjectReference] {
6831 &self.objects
6832 }
6833 pub fn objects_mut(&mut self) -> &mut Vec<super::ObjectReference> {
6836 &mut self.objects
6837 }
6838 pub fn set_objects(&mut self, field: Vec<super::ObjectReference>) {
6840 self.objects = field;
6841 }
6842 pub fn with_objects(mut self, field: Vec<super::ObjectReference>) -> Self {
6844 self.set_objects(field);
6845 self
6846 }
6847 pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
6849 self.owner.as_mut().map(|field| field as _)
6850 }
6851 pub fn owner_mut(&mut self) -> &mut String {
6854 self.owner.get_or_insert_default()
6855 }
6856 pub fn owner_opt(&self) -> Option<&str> {
6858 self.owner.as_ref().map(|field| field as _)
6859 }
6860 pub fn set_owner<T: Into<String>>(&mut self, field: T) {
6862 self.owner = Some(field.into().into());
6863 }
6864 pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
6866 self.set_owner(field.into());
6867 self
6868 }
6869 pub fn price_opt_mut(&mut self) -> Option<&mut u64> {
6871 self.price.as_mut().map(|field| field as _)
6872 }
6873 pub fn price_mut(&mut self) -> &mut u64 {
6876 self.price.get_or_insert_default()
6877 }
6878 pub fn price_opt(&self) -> Option<u64> {
6880 self.price.as_ref().map(|field| *field)
6881 }
6882 pub fn set_price(&mut self, field: u64) {
6884 self.price = Some(field);
6885 }
6886 pub fn with_price(mut self, field: u64) -> Self {
6888 self.set_price(field);
6889 self
6890 }
6891 pub fn budget_opt_mut(&mut self) -> Option<&mut u64> {
6893 self.budget.as_mut().map(|field| field as _)
6894 }
6895 pub fn budget_mut(&mut self) -> &mut u64 {
6898 self.budget.get_or_insert_default()
6899 }
6900 pub fn budget_opt(&self) -> Option<u64> {
6902 self.budget.as_ref().map(|field| *field)
6903 }
6904 pub fn set_budget(&mut self, field: u64) {
6906 self.budget = Some(field);
6907 }
6908 pub fn with_budget(mut self, field: u64) -> Self {
6910 self.set_budget(field);
6911 self
6912 }
6913 }
6914 impl super::GenesisTransaction {
6915 pub const fn const_default() -> Self {
6916 Self { objects: Vec::new() }
6917 }
6918 #[doc(hidden)]
6919 pub fn default_instance() -> &'static Self {
6920 static DEFAULT: super::GenesisTransaction = super::GenesisTransaction::const_default();
6921 &DEFAULT
6922 }
6923 pub fn objects(&self) -> &[super::Object] {
6925 &self.objects
6926 }
6927 pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
6930 &mut self.objects
6931 }
6932 pub fn set_objects(&mut self, field: Vec<super::Object>) {
6934 self.objects = field;
6935 }
6936 pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
6938 self.set_objects(field);
6939 self
6940 }
6941 }
6942 impl super::GetBalanceRequest {
6943 pub const fn const_default() -> Self {
6944 Self {
6945 owner: None,
6946 coin_type: None,
6947 }
6948 }
6949 #[doc(hidden)]
6950 pub fn default_instance() -> &'static Self {
6951 static DEFAULT: super::GetBalanceRequest = super::GetBalanceRequest::const_default();
6952 &DEFAULT
6953 }
6954 pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
6956 self.owner.as_mut().map(|field| field as _)
6957 }
6958 pub fn owner_mut(&mut self) -> &mut String {
6961 self.owner.get_or_insert_default()
6962 }
6963 pub fn owner_opt(&self) -> Option<&str> {
6965 self.owner.as_ref().map(|field| field as _)
6966 }
6967 pub fn set_owner<T: Into<String>>(&mut self, field: T) {
6969 self.owner = Some(field.into().into());
6970 }
6971 pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
6973 self.set_owner(field.into());
6974 self
6975 }
6976 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
6978 self.coin_type.as_mut().map(|field| field as _)
6979 }
6980 pub fn coin_type_mut(&mut self) -> &mut String {
6983 self.coin_type.get_or_insert_default()
6984 }
6985 pub fn coin_type_opt(&self) -> Option<&str> {
6987 self.coin_type.as_ref().map(|field| field as _)
6988 }
6989 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
6991 self.coin_type = Some(field.into().into());
6992 }
6993 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
6995 self.set_coin_type(field.into());
6996 self
6997 }
6998 }
6999 impl super::GetBalanceResponse {
7000 pub const fn const_default() -> Self {
7001 Self { balance: None }
7002 }
7003 #[doc(hidden)]
7004 pub fn default_instance() -> &'static Self {
7005 static DEFAULT: super::GetBalanceResponse = super::GetBalanceResponse::const_default();
7006 &DEFAULT
7007 }
7008 pub fn balance(&self) -> &super::Balance {
7010 self.balance
7011 .as_ref()
7012 .map(|field| field as _)
7013 .unwrap_or_else(|| super::Balance::default_instance() as _)
7014 }
7015 pub fn balance_opt_mut(&mut self) -> Option<&mut super::Balance> {
7017 self.balance.as_mut().map(|field| field as _)
7018 }
7019 pub fn balance_mut(&mut self) -> &mut super::Balance {
7022 self.balance.get_or_insert_default()
7023 }
7024 pub fn balance_opt(&self) -> Option<&super::Balance> {
7026 self.balance.as_ref().map(|field| field as _)
7027 }
7028 pub fn set_balance<T: Into<super::Balance>>(&mut self, field: T) {
7030 self.balance = Some(field.into().into());
7031 }
7032 pub fn with_balance<T: Into<super::Balance>>(mut self, field: T) -> Self {
7034 self.set_balance(field.into());
7035 self
7036 }
7037 }
7038 impl super::GetCheckpointRequest {
7039 pub const fn const_default() -> Self {
7040 Self {
7041 read_mask: None,
7042 checkpoint_id: None,
7043 }
7044 }
7045 #[doc(hidden)]
7046 pub fn default_instance() -> &'static Self {
7047 static DEFAULT: super::GetCheckpointRequest = super::GetCheckpointRequest::const_default();
7048 &DEFAULT
7049 }
7050 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
7052 self.read_mask.as_mut().map(|field| field as _)
7053 }
7054 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
7057 self.read_mask.get_or_insert_default()
7058 }
7059 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
7061 self.read_mask.as_ref().map(|field| field as _)
7062 }
7063 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
7065 self.read_mask = Some(field.into().into());
7066 }
7067 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
7069 mut self,
7070 field: T,
7071 ) -> Self {
7072 self.set_read_mask(field.into());
7073 self
7074 }
7075 pub fn sequence_number(&self) -> u64 {
7077 if let Some(
7078 super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
7079 ) = &self.checkpoint_id
7080 {
7081 *field
7082 } else {
7083 0u64
7084 }
7085 }
7086 pub fn sequence_number_opt(&self) -> Option<u64> {
7088 if let Some(
7089 super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
7090 ) = &self.checkpoint_id
7091 {
7092 Some(*field)
7093 } else {
7094 None
7095 }
7096 }
7097 pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
7099 if let Some(
7100 super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
7101 ) = &mut self.checkpoint_id
7102 {
7103 Some(field as _)
7104 } else {
7105 None
7106 }
7107 }
7108 pub fn sequence_number_mut(&mut self) -> &mut u64 {
7112 if self.sequence_number_opt_mut().is_none() {
7113 self.checkpoint_id = Some(
7114 super::get_checkpoint_request::CheckpointId::SequenceNumber(
7115 u64::default(),
7116 ),
7117 );
7118 }
7119 self.sequence_number_opt_mut().unwrap()
7120 }
7121 pub fn set_sequence_number(&mut self, field: u64) {
7124 self.checkpoint_id = Some(
7125 super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
7126 );
7127 }
7128 pub fn with_sequence_number(mut self, field: u64) -> Self {
7131 self.set_sequence_number(field);
7132 self
7133 }
7134 pub fn digest(&self) -> &str {
7136 if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &self
7137 .checkpoint_id
7138 {
7139 field as _
7140 } else {
7141 ""
7142 }
7143 }
7144 pub fn digest_opt(&self) -> Option<&str> {
7146 if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &self
7147 .checkpoint_id
7148 {
7149 Some(field as _)
7150 } else {
7151 None
7152 }
7153 }
7154 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
7156 if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &mut self
7157 .checkpoint_id
7158 {
7159 Some(field as _)
7160 } else {
7161 None
7162 }
7163 }
7164 pub fn digest_mut(&mut self) -> &mut String {
7168 if self.digest_opt_mut().is_none() {
7169 self.checkpoint_id = Some(
7170 super::get_checkpoint_request::CheckpointId::Digest(
7171 String::default(),
7172 ),
7173 );
7174 }
7175 self.digest_opt_mut().unwrap()
7176 }
7177 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
7180 self.checkpoint_id = Some(
7181 super::get_checkpoint_request::CheckpointId::Digest(field.into().into()),
7182 );
7183 }
7184 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
7187 self.set_digest(field.into());
7188 self
7189 }
7190 }
7191 impl super::GetCheckpointResponse {
7192 pub const fn const_default() -> Self {
7193 Self { checkpoint: None }
7194 }
7195 #[doc(hidden)]
7196 pub fn default_instance() -> &'static Self {
7197 static DEFAULT: super::GetCheckpointResponse = super::GetCheckpointResponse::const_default();
7198 &DEFAULT
7199 }
7200 pub fn checkpoint(&self) -> &super::Checkpoint {
7202 self.checkpoint
7203 .as_ref()
7204 .map(|field| field as _)
7205 .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
7206 }
7207 pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
7209 self.checkpoint.as_mut().map(|field| field as _)
7210 }
7211 pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
7214 self.checkpoint.get_or_insert_default()
7215 }
7216 pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
7218 self.checkpoint.as_ref().map(|field| field as _)
7219 }
7220 pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
7222 self.checkpoint = Some(field.into().into());
7223 }
7224 pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
7226 self.set_checkpoint(field.into());
7227 self
7228 }
7229 }
7230 impl super::GetCoinInfoRequest {
7231 pub const fn const_default() -> Self {
7232 Self { coin_type: None }
7233 }
7234 #[doc(hidden)]
7235 pub fn default_instance() -> &'static Self {
7236 static DEFAULT: super::GetCoinInfoRequest = super::GetCoinInfoRequest::const_default();
7237 &DEFAULT
7238 }
7239 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
7241 self.coin_type.as_mut().map(|field| field as _)
7242 }
7243 pub fn coin_type_mut(&mut self) -> &mut String {
7246 self.coin_type.get_or_insert_default()
7247 }
7248 pub fn coin_type_opt(&self) -> Option<&str> {
7250 self.coin_type.as_ref().map(|field| field as _)
7251 }
7252 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
7254 self.coin_type = Some(field.into().into());
7255 }
7256 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
7258 self.set_coin_type(field.into());
7259 self
7260 }
7261 }
7262 impl super::GetCoinInfoResponse {
7263 pub const fn const_default() -> Self {
7264 Self {
7265 coin_type: None,
7266 metadata: None,
7267 treasury: None,
7268 regulated_metadata: None,
7269 }
7270 }
7271 #[doc(hidden)]
7272 pub fn default_instance() -> &'static Self {
7273 static DEFAULT: super::GetCoinInfoResponse = super::GetCoinInfoResponse::const_default();
7274 &DEFAULT
7275 }
7276 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
7278 self.coin_type.as_mut().map(|field| field as _)
7279 }
7280 pub fn coin_type_mut(&mut self) -> &mut String {
7283 self.coin_type.get_or_insert_default()
7284 }
7285 pub fn coin_type_opt(&self) -> Option<&str> {
7287 self.coin_type.as_ref().map(|field| field as _)
7288 }
7289 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
7291 self.coin_type = Some(field.into().into());
7292 }
7293 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
7295 self.set_coin_type(field.into());
7296 self
7297 }
7298 pub fn metadata(&self) -> &super::CoinMetadata {
7300 self.metadata
7301 .as_ref()
7302 .map(|field| field as _)
7303 .unwrap_or_else(|| super::CoinMetadata::default_instance() as _)
7304 }
7305 pub fn metadata_opt_mut(&mut self) -> Option<&mut super::CoinMetadata> {
7307 self.metadata.as_mut().map(|field| field as _)
7308 }
7309 pub fn metadata_mut(&mut self) -> &mut super::CoinMetadata {
7312 self.metadata.get_or_insert_default()
7313 }
7314 pub fn metadata_opt(&self) -> Option<&super::CoinMetadata> {
7316 self.metadata.as_ref().map(|field| field as _)
7317 }
7318 pub fn set_metadata<T: Into<super::CoinMetadata>>(&mut self, field: T) {
7320 self.metadata = Some(field.into().into());
7321 }
7322 pub fn with_metadata<T: Into<super::CoinMetadata>>(mut self, field: T) -> Self {
7324 self.set_metadata(field.into());
7325 self
7326 }
7327 pub fn treasury(&self) -> &super::CoinTreasury {
7329 self.treasury
7330 .as_ref()
7331 .map(|field| field as _)
7332 .unwrap_or_else(|| super::CoinTreasury::default_instance() as _)
7333 }
7334 pub fn treasury_opt_mut(&mut self) -> Option<&mut super::CoinTreasury> {
7336 self.treasury.as_mut().map(|field| field as _)
7337 }
7338 pub fn treasury_mut(&mut self) -> &mut super::CoinTreasury {
7341 self.treasury.get_or_insert_default()
7342 }
7343 pub fn treasury_opt(&self) -> Option<&super::CoinTreasury> {
7345 self.treasury.as_ref().map(|field| field as _)
7346 }
7347 pub fn set_treasury<T: Into<super::CoinTreasury>>(&mut self, field: T) {
7349 self.treasury = Some(field.into().into());
7350 }
7351 pub fn with_treasury<T: Into<super::CoinTreasury>>(mut self, field: T) -> Self {
7353 self.set_treasury(field.into());
7354 self
7355 }
7356 pub fn regulated_metadata(&self) -> &super::RegulatedCoinMetadata {
7358 self.regulated_metadata
7359 .as_ref()
7360 .map(|field| field as _)
7361 .unwrap_or_else(|| super::RegulatedCoinMetadata::default_instance() as _)
7362 }
7363 pub fn regulated_metadata_opt_mut(
7365 &mut self,
7366 ) -> Option<&mut super::RegulatedCoinMetadata> {
7367 self.regulated_metadata.as_mut().map(|field| field as _)
7368 }
7369 pub fn regulated_metadata_mut(&mut self) -> &mut super::RegulatedCoinMetadata {
7372 self.regulated_metadata.get_or_insert_default()
7373 }
7374 pub fn regulated_metadata_opt(&self) -> Option<&super::RegulatedCoinMetadata> {
7376 self.regulated_metadata.as_ref().map(|field| field as _)
7377 }
7378 pub fn set_regulated_metadata<T: Into<super::RegulatedCoinMetadata>>(
7380 &mut self,
7381 field: T,
7382 ) {
7383 self.regulated_metadata = Some(field.into().into());
7384 }
7385 pub fn with_regulated_metadata<T: Into<super::RegulatedCoinMetadata>>(
7387 mut self,
7388 field: T,
7389 ) -> Self {
7390 self.set_regulated_metadata(field.into());
7391 self
7392 }
7393 }
7394 impl super::GetDatatypeRequest {
7395 pub const fn const_default() -> Self {
7396 Self {
7397 package_id: None,
7398 module_name: None,
7399 name: None,
7400 }
7401 }
7402 #[doc(hidden)]
7403 pub fn default_instance() -> &'static Self {
7404 static DEFAULT: super::GetDatatypeRequest = super::GetDatatypeRequest::const_default();
7405 &DEFAULT
7406 }
7407 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
7409 self.package_id.as_mut().map(|field| field as _)
7410 }
7411 pub fn package_id_mut(&mut self) -> &mut String {
7414 self.package_id.get_or_insert_default()
7415 }
7416 pub fn package_id_opt(&self) -> Option<&str> {
7418 self.package_id.as_ref().map(|field| field as _)
7419 }
7420 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
7422 self.package_id = Some(field.into().into());
7423 }
7424 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
7426 self.set_package_id(field.into());
7427 self
7428 }
7429 pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
7431 self.module_name.as_mut().map(|field| field as _)
7432 }
7433 pub fn module_name_mut(&mut self) -> &mut String {
7436 self.module_name.get_or_insert_default()
7437 }
7438 pub fn module_name_opt(&self) -> Option<&str> {
7440 self.module_name.as_ref().map(|field| field as _)
7441 }
7442 pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
7444 self.module_name = Some(field.into().into());
7445 }
7446 pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
7448 self.set_module_name(field.into());
7449 self
7450 }
7451 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
7453 self.name.as_mut().map(|field| field as _)
7454 }
7455 pub fn name_mut(&mut self) -> &mut String {
7458 self.name.get_or_insert_default()
7459 }
7460 pub fn name_opt(&self) -> Option<&str> {
7462 self.name.as_ref().map(|field| field as _)
7463 }
7464 pub fn set_name<T: Into<String>>(&mut self, field: T) {
7466 self.name = Some(field.into().into());
7467 }
7468 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
7470 self.set_name(field.into());
7471 self
7472 }
7473 }
7474 impl super::GetDatatypeResponse {
7475 pub const fn const_default() -> Self {
7476 Self { datatype: None }
7477 }
7478 #[doc(hidden)]
7479 pub fn default_instance() -> &'static Self {
7480 static DEFAULT: super::GetDatatypeResponse = super::GetDatatypeResponse::const_default();
7481 &DEFAULT
7482 }
7483 pub fn datatype(&self) -> &super::DatatypeDescriptor {
7485 self.datatype
7486 .as_ref()
7487 .map(|field| field as _)
7488 .unwrap_or_else(|| super::DatatypeDescriptor::default_instance() as _)
7489 }
7490 pub fn datatype_opt_mut(&mut self) -> Option<&mut super::DatatypeDescriptor> {
7492 self.datatype.as_mut().map(|field| field as _)
7493 }
7494 pub fn datatype_mut(&mut self) -> &mut super::DatatypeDescriptor {
7497 self.datatype.get_or_insert_default()
7498 }
7499 pub fn datatype_opt(&self) -> Option<&super::DatatypeDescriptor> {
7501 self.datatype.as_ref().map(|field| field as _)
7502 }
7503 pub fn set_datatype<T: Into<super::DatatypeDescriptor>>(&mut self, field: T) {
7505 self.datatype = Some(field.into().into());
7506 }
7507 pub fn with_datatype<T: Into<super::DatatypeDescriptor>>(
7509 mut self,
7510 field: T,
7511 ) -> Self {
7512 self.set_datatype(field.into());
7513 self
7514 }
7515 }
7516 impl super::GetEpochRequest {
7517 pub const fn const_default() -> Self {
7518 Self {
7519 epoch: None,
7520 read_mask: None,
7521 }
7522 }
7523 #[doc(hidden)]
7524 pub fn default_instance() -> &'static Self {
7525 static DEFAULT: super::GetEpochRequest = super::GetEpochRequest::const_default();
7526 &DEFAULT
7527 }
7528 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
7530 self.epoch.as_mut().map(|field| field as _)
7531 }
7532 pub fn epoch_mut(&mut self) -> &mut u64 {
7535 self.epoch.get_or_insert_default()
7536 }
7537 pub fn epoch_opt(&self) -> Option<u64> {
7539 self.epoch.as_ref().map(|field| *field)
7540 }
7541 pub fn set_epoch(&mut self, field: u64) {
7543 self.epoch = Some(field);
7544 }
7545 pub fn with_epoch(mut self, field: u64) -> Self {
7547 self.set_epoch(field);
7548 self
7549 }
7550 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
7552 self.read_mask.as_mut().map(|field| field as _)
7553 }
7554 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
7557 self.read_mask.get_or_insert_default()
7558 }
7559 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
7561 self.read_mask.as_ref().map(|field| field as _)
7562 }
7563 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
7565 self.read_mask = Some(field.into().into());
7566 }
7567 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
7569 mut self,
7570 field: T,
7571 ) -> Self {
7572 self.set_read_mask(field.into());
7573 self
7574 }
7575 }
7576 impl super::GetEpochResponse {
7577 pub const fn const_default() -> Self {
7578 Self { epoch: None }
7579 }
7580 #[doc(hidden)]
7581 pub fn default_instance() -> &'static Self {
7582 static DEFAULT: super::GetEpochResponse = super::GetEpochResponse::const_default();
7583 &DEFAULT
7584 }
7585 pub fn epoch(&self) -> &super::Epoch {
7587 self.epoch
7588 .as_ref()
7589 .map(|field| field as _)
7590 .unwrap_or_else(|| super::Epoch::default_instance() as _)
7591 }
7592 pub fn epoch_opt_mut(&mut self) -> Option<&mut super::Epoch> {
7594 self.epoch.as_mut().map(|field| field as _)
7595 }
7596 pub fn epoch_mut(&mut self) -> &mut super::Epoch {
7599 self.epoch.get_or_insert_default()
7600 }
7601 pub fn epoch_opt(&self) -> Option<&super::Epoch> {
7603 self.epoch.as_ref().map(|field| field as _)
7604 }
7605 pub fn set_epoch<T: Into<super::Epoch>>(&mut self, field: T) {
7607 self.epoch = Some(field.into().into());
7608 }
7609 pub fn with_epoch<T: Into<super::Epoch>>(mut self, field: T) -> Self {
7611 self.set_epoch(field.into());
7612 self
7613 }
7614 }
7615 impl super::GetFunctionRequest {
7616 pub const fn const_default() -> Self {
7617 Self {
7618 package_id: None,
7619 module_name: None,
7620 name: None,
7621 }
7622 }
7623 #[doc(hidden)]
7624 pub fn default_instance() -> &'static Self {
7625 static DEFAULT: super::GetFunctionRequest = super::GetFunctionRequest::const_default();
7626 &DEFAULT
7627 }
7628 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
7630 self.package_id.as_mut().map(|field| field as _)
7631 }
7632 pub fn package_id_mut(&mut self) -> &mut String {
7635 self.package_id.get_or_insert_default()
7636 }
7637 pub fn package_id_opt(&self) -> Option<&str> {
7639 self.package_id.as_ref().map(|field| field as _)
7640 }
7641 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
7643 self.package_id = Some(field.into().into());
7644 }
7645 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
7647 self.set_package_id(field.into());
7648 self
7649 }
7650 pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
7652 self.module_name.as_mut().map(|field| field as _)
7653 }
7654 pub fn module_name_mut(&mut self) -> &mut String {
7657 self.module_name.get_or_insert_default()
7658 }
7659 pub fn module_name_opt(&self) -> Option<&str> {
7661 self.module_name.as_ref().map(|field| field as _)
7662 }
7663 pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
7665 self.module_name = Some(field.into().into());
7666 }
7667 pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
7669 self.set_module_name(field.into());
7670 self
7671 }
7672 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
7674 self.name.as_mut().map(|field| field as _)
7675 }
7676 pub fn name_mut(&mut self) -> &mut String {
7679 self.name.get_or_insert_default()
7680 }
7681 pub fn name_opt(&self) -> Option<&str> {
7683 self.name.as_ref().map(|field| field as _)
7684 }
7685 pub fn set_name<T: Into<String>>(&mut self, field: T) {
7687 self.name = Some(field.into().into());
7688 }
7689 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
7691 self.set_name(field.into());
7692 self
7693 }
7694 }
7695 impl super::GetFunctionResponse {
7696 pub const fn const_default() -> Self {
7697 Self { function: None }
7698 }
7699 #[doc(hidden)]
7700 pub fn default_instance() -> &'static Self {
7701 static DEFAULT: super::GetFunctionResponse = super::GetFunctionResponse::const_default();
7702 &DEFAULT
7703 }
7704 pub fn function(&self) -> &super::FunctionDescriptor {
7706 self.function
7707 .as_ref()
7708 .map(|field| field as _)
7709 .unwrap_or_else(|| super::FunctionDescriptor::default_instance() as _)
7710 }
7711 pub fn function_opt_mut(&mut self) -> Option<&mut super::FunctionDescriptor> {
7713 self.function.as_mut().map(|field| field as _)
7714 }
7715 pub fn function_mut(&mut self) -> &mut super::FunctionDescriptor {
7718 self.function.get_or_insert_default()
7719 }
7720 pub fn function_opt(&self) -> Option<&super::FunctionDescriptor> {
7722 self.function.as_ref().map(|field| field as _)
7723 }
7724 pub fn set_function<T: Into<super::FunctionDescriptor>>(&mut self, field: T) {
7726 self.function = Some(field.into().into());
7727 }
7728 pub fn with_function<T: Into<super::FunctionDescriptor>>(
7730 mut self,
7731 field: T,
7732 ) -> Self {
7733 self.set_function(field.into());
7734 self
7735 }
7736 }
7737 impl super::GetObjectRequest {
7738 pub const fn const_default() -> Self {
7739 Self {
7740 object_id: None,
7741 version: None,
7742 read_mask: None,
7743 }
7744 }
7745 #[doc(hidden)]
7746 pub fn default_instance() -> &'static Self {
7747 static DEFAULT: super::GetObjectRequest = super::GetObjectRequest::const_default();
7748 &DEFAULT
7749 }
7750 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
7752 self.object_id.as_mut().map(|field| field as _)
7753 }
7754 pub fn object_id_mut(&mut self) -> &mut String {
7757 self.object_id.get_or_insert_default()
7758 }
7759 pub fn object_id_opt(&self) -> Option<&str> {
7761 self.object_id.as_ref().map(|field| field as _)
7762 }
7763 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
7765 self.object_id = Some(field.into().into());
7766 }
7767 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
7769 self.set_object_id(field.into());
7770 self
7771 }
7772 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
7774 self.version.as_mut().map(|field| field as _)
7775 }
7776 pub fn version_mut(&mut self) -> &mut u64 {
7779 self.version.get_or_insert_default()
7780 }
7781 pub fn version_opt(&self) -> Option<u64> {
7783 self.version.as_ref().map(|field| *field)
7784 }
7785 pub fn set_version(&mut self, field: u64) {
7787 self.version = Some(field);
7788 }
7789 pub fn with_version(mut self, field: u64) -> Self {
7791 self.set_version(field);
7792 self
7793 }
7794 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
7796 self.read_mask.as_mut().map(|field| field as _)
7797 }
7798 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
7801 self.read_mask.get_or_insert_default()
7802 }
7803 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
7805 self.read_mask.as_ref().map(|field| field as _)
7806 }
7807 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
7809 self.read_mask = Some(field.into().into());
7810 }
7811 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
7813 mut self,
7814 field: T,
7815 ) -> Self {
7816 self.set_read_mask(field.into());
7817 self
7818 }
7819 }
7820 impl super::GetObjectResponse {
7821 pub const fn const_default() -> Self {
7822 Self { object: None }
7823 }
7824 #[doc(hidden)]
7825 pub fn default_instance() -> &'static Self {
7826 static DEFAULT: super::GetObjectResponse = super::GetObjectResponse::const_default();
7827 &DEFAULT
7828 }
7829 pub fn object(&self) -> &super::Object {
7831 self.object
7832 .as_ref()
7833 .map(|field| field as _)
7834 .unwrap_or_else(|| super::Object::default_instance() as _)
7835 }
7836 pub fn object_opt_mut(&mut self) -> Option<&mut super::Object> {
7838 self.object.as_mut().map(|field| field as _)
7839 }
7840 pub fn object_mut(&mut self) -> &mut super::Object {
7843 self.object.get_or_insert_default()
7844 }
7845 pub fn object_opt(&self) -> Option<&super::Object> {
7847 self.object.as_ref().map(|field| field as _)
7848 }
7849 pub fn set_object<T: Into<super::Object>>(&mut self, field: T) {
7851 self.object = Some(field.into().into());
7852 }
7853 pub fn with_object<T: Into<super::Object>>(mut self, field: T) -> Self {
7855 self.set_object(field.into());
7856 self
7857 }
7858 }
7859 impl super::GetObjectResult {
7860 pub const fn const_default() -> Self {
7861 Self { result: None }
7862 }
7863 #[doc(hidden)]
7864 pub fn default_instance() -> &'static Self {
7865 static DEFAULT: super::GetObjectResult = super::GetObjectResult::const_default();
7866 &DEFAULT
7867 }
7868 pub fn object(&self) -> &super::Object {
7870 if let Some(super::get_object_result::Result::Object(field)) = &self.result {
7871 field as _
7872 } else {
7873 super::Object::default_instance() as _
7874 }
7875 }
7876 pub fn object_opt(&self) -> Option<&super::Object> {
7878 if let Some(super::get_object_result::Result::Object(field)) = &self.result {
7879 Some(field as _)
7880 } else {
7881 None
7882 }
7883 }
7884 pub fn object_opt_mut(&mut self) -> Option<&mut super::Object> {
7886 if let Some(super::get_object_result::Result::Object(field)) = &mut self
7887 .result
7888 {
7889 Some(field as _)
7890 } else {
7891 None
7892 }
7893 }
7894 pub fn object_mut(&mut self) -> &mut super::Object {
7898 if self.object_opt_mut().is_none() {
7899 self.result = Some(
7900 super::get_object_result::Result::Object(super::Object::default()),
7901 );
7902 }
7903 self.object_opt_mut().unwrap()
7904 }
7905 pub fn set_object<T: Into<super::Object>>(&mut self, field: T) {
7908 self.result = Some(
7909 super::get_object_result::Result::Object(field.into().into()),
7910 );
7911 }
7912 pub fn with_object<T: Into<super::Object>>(mut self, field: T) -> Self {
7915 self.set_object(field.into());
7916 self
7917 }
7918 pub fn error(&self) -> &super::super::super::super::google::rpc::Status {
7920 if let Some(super::get_object_result::Result::Error(field)) = &self.result {
7921 field as _
7922 } else {
7923 super::super::super::super::google::rpc::Status::default_instance() as _
7924 }
7925 }
7926 pub fn error_opt(
7928 &self,
7929 ) -> Option<&super::super::super::super::google::rpc::Status> {
7930 if let Some(super::get_object_result::Result::Error(field)) = &self.result {
7931 Some(field as _)
7932 } else {
7933 None
7934 }
7935 }
7936 pub fn error_opt_mut(
7938 &mut self,
7939 ) -> Option<&mut super::super::super::super::google::rpc::Status> {
7940 if let Some(super::get_object_result::Result::Error(field)) = &mut self
7941 .result
7942 {
7943 Some(field as _)
7944 } else {
7945 None
7946 }
7947 }
7948 pub fn error_mut(
7952 &mut self,
7953 ) -> &mut super::super::super::super::google::rpc::Status {
7954 if self.error_opt_mut().is_none() {
7955 self.result = Some(
7956 super::get_object_result::Result::Error(
7957 super::super::super::super::google::rpc::Status::default(),
7958 ),
7959 );
7960 }
7961 self.error_opt_mut().unwrap()
7962 }
7963 pub fn set_error<T: Into<super::super::super::super::google::rpc::Status>>(
7966 &mut self,
7967 field: T,
7968 ) {
7969 self.result = Some(
7970 super::get_object_result::Result::Error(field.into().into()),
7971 );
7972 }
7973 pub fn with_error<T: Into<super::super::super::super::google::rpc::Status>>(
7976 mut self,
7977 field: T,
7978 ) -> Self {
7979 self.set_error(field.into());
7980 self
7981 }
7982 }
7983 impl super::GetPackageRequest {
7984 pub const fn const_default() -> Self {
7985 Self { package_id: None }
7986 }
7987 #[doc(hidden)]
7988 pub fn default_instance() -> &'static Self {
7989 static DEFAULT: super::GetPackageRequest = super::GetPackageRequest::const_default();
7990 &DEFAULT
7991 }
7992 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
7994 self.package_id.as_mut().map(|field| field as _)
7995 }
7996 pub fn package_id_mut(&mut self) -> &mut String {
7999 self.package_id.get_or_insert_default()
8000 }
8001 pub fn package_id_opt(&self) -> Option<&str> {
8003 self.package_id.as_ref().map(|field| field as _)
8004 }
8005 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
8007 self.package_id = Some(field.into().into());
8008 }
8009 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
8011 self.set_package_id(field.into());
8012 self
8013 }
8014 }
8015 impl super::GetPackageResponse {
8016 pub const fn const_default() -> Self {
8017 Self { package: None }
8018 }
8019 #[doc(hidden)]
8020 pub fn default_instance() -> &'static Self {
8021 static DEFAULT: super::GetPackageResponse = super::GetPackageResponse::const_default();
8022 &DEFAULT
8023 }
8024 pub fn package(&self) -> &super::Package {
8026 self.package
8027 .as_ref()
8028 .map(|field| field as _)
8029 .unwrap_or_else(|| super::Package::default_instance() as _)
8030 }
8031 pub fn package_opt_mut(&mut self) -> Option<&mut super::Package> {
8033 self.package.as_mut().map(|field| field as _)
8034 }
8035 pub fn package_mut(&mut self) -> &mut super::Package {
8038 self.package.get_or_insert_default()
8039 }
8040 pub fn package_opt(&self) -> Option<&super::Package> {
8042 self.package.as_ref().map(|field| field as _)
8043 }
8044 pub fn set_package<T: Into<super::Package>>(&mut self, field: T) {
8046 self.package = Some(field.into().into());
8047 }
8048 pub fn with_package<T: Into<super::Package>>(mut self, field: T) -> Self {
8050 self.set_package(field.into());
8051 self
8052 }
8053 }
8054 impl super::GetServiceInfoRequest {
8055 pub const fn const_default() -> Self {
8056 Self {}
8057 }
8058 #[doc(hidden)]
8059 pub fn default_instance() -> &'static Self {
8060 static DEFAULT: super::GetServiceInfoRequest = super::GetServiceInfoRequest::const_default();
8061 &DEFAULT
8062 }
8063 }
8064 impl super::GetServiceInfoResponse {
8065 pub const fn const_default() -> Self {
8066 Self {
8067 chain_id: None,
8068 chain: None,
8069 epoch: None,
8070 checkpoint_height: None,
8071 timestamp: None,
8072 lowest_available_checkpoint: None,
8073 lowest_available_checkpoint_objects: None,
8074 server: None,
8075 }
8076 }
8077 #[doc(hidden)]
8078 pub fn default_instance() -> &'static Self {
8079 static DEFAULT: super::GetServiceInfoResponse = super::GetServiceInfoResponse::const_default();
8080 &DEFAULT
8081 }
8082 pub fn chain_id_opt_mut(&mut self) -> Option<&mut String> {
8084 self.chain_id.as_mut().map(|field| field as _)
8085 }
8086 pub fn chain_id_mut(&mut self) -> &mut String {
8089 self.chain_id.get_or_insert_default()
8090 }
8091 pub fn chain_id_opt(&self) -> Option<&str> {
8093 self.chain_id.as_ref().map(|field| field as _)
8094 }
8095 pub fn set_chain_id<T: Into<String>>(&mut self, field: T) {
8097 self.chain_id = Some(field.into().into());
8098 }
8099 pub fn with_chain_id<T: Into<String>>(mut self, field: T) -> Self {
8101 self.set_chain_id(field.into());
8102 self
8103 }
8104 pub fn chain_opt_mut(&mut self) -> Option<&mut String> {
8106 self.chain.as_mut().map(|field| field as _)
8107 }
8108 pub fn chain_mut(&mut self) -> &mut String {
8111 self.chain.get_or_insert_default()
8112 }
8113 pub fn chain_opt(&self) -> Option<&str> {
8115 self.chain.as_ref().map(|field| field as _)
8116 }
8117 pub fn set_chain<T: Into<String>>(&mut self, field: T) {
8119 self.chain = Some(field.into().into());
8120 }
8121 pub fn with_chain<T: Into<String>>(mut self, field: T) -> Self {
8123 self.set_chain(field.into());
8124 self
8125 }
8126 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
8128 self.epoch.as_mut().map(|field| field as _)
8129 }
8130 pub fn epoch_mut(&mut self) -> &mut u64 {
8133 self.epoch.get_or_insert_default()
8134 }
8135 pub fn epoch_opt(&self) -> Option<u64> {
8137 self.epoch.as_ref().map(|field| *field)
8138 }
8139 pub fn set_epoch(&mut self, field: u64) {
8141 self.epoch = Some(field);
8142 }
8143 pub fn with_epoch(mut self, field: u64) -> Self {
8145 self.set_epoch(field);
8146 self
8147 }
8148 pub fn checkpoint_height_opt_mut(&mut self) -> Option<&mut u64> {
8150 self.checkpoint_height.as_mut().map(|field| field as _)
8151 }
8152 pub fn checkpoint_height_mut(&mut self) -> &mut u64 {
8155 self.checkpoint_height.get_or_insert_default()
8156 }
8157 pub fn checkpoint_height_opt(&self) -> Option<u64> {
8159 self.checkpoint_height.as_ref().map(|field| *field)
8160 }
8161 pub fn set_checkpoint_height(&mut self, field: u64) {
8163 self.checkpoint_height = Some(field);
8164 }
8165 pub fn with_checkpoint_height(mut self, field: u64) -> Self {
8167 self.set_checkpoint_height(field);
8168 self
8169 }
8170 pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
8172 self.timestamp.as_mut().map(|field| field as _)
8173 }
8174 pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
8177 self.timestamp.get_or_insert_default()
8178 }
8179 pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
8181 self.timestamp.as_ref().map(|field| field as _)
8182 }
8183 pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
8185 self.timestamp = Some(field.into().into());
8186 }
8187 pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
8189 mut self,
8190 field: T,
8191 ) -> Self {
8192 self.set_timestamp(field.into());
8193 self
8194 }
8195 pub fn lowest_available_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
8197 self.lowest_available_checkpoint.as_mut().map(|field| field as _)
8198 }
8199 pub fn lowest_available_checkpoint_mut(&mut self) -> &mut u64 {
8202 self.lowest_available_checkpoint.get_or_insert_default()
8203 }
8204 pub fn lowest_available_checkpoint_opt(&self) -> Option<u64> {
8206 self.lowest_available_checkpoint.as_ref().map(|field| *field)
8207 }
8208 pub fn set_lowest_available_checkpoint(&mut self, field: u64) {
8210 self.lowest_available_checkpoint = Some(field);
8211 }
8212 pub fn with_lowest_available_checkpoint(mut self, field: u64) -> Self {
8214 self.set_lowest_available_checkpoint(field);
8215 self
8216 }
8217 pub fn lowest_available_checkpoint_objects_opt_mut(
8219 &mut self,
8220 ) -> Option<&mut u64> {
8221 self.lowest_available_checkpoint_objects.as_mut().map(|field| field as _)
8222 }
8223 pub fn lowest_available_checkpoint_objects_mut(&mut self) -> &mut u64 {
8226 self.lowest_available_checkpoint_objects.get_or_insert_default()
8227 }
8228 pub fn lowest_available_checkpoint_objects_opt(&self) -> Option<u64> {
8230 self.lowest_available_checkpoint_objects.as_ref().map(|field| *field)
8231 }
8232 pub fn set_lowest_available_checkpoint_objects(&mut self, field: u64) {
8234 self.lowest_available_checkpoint_objects = Some(field);
8235 }
8236 pub fn with_lowest_available_checkpoint_objects(mut self, field: u64) -> Self {
8238 self.set_lowest_available_checkpoint_objects(field);
8239 self
8240 }
8241 pub fn server_opt_mut(&mut self) -> Option<&mut String> {
8243 self.server.as_mut().map(|field| field as _)
8244 }
8245 pub fn server_mut(&mut self) -> &mut String {
8248 self.server.get_or_insert_default()
8249 }
8250 pub fn server_opt(&self) -> Option<&str> {
8252 self.server.as_ref().map(|field| field as _)
8253 }
8254 pub fn set_server<T: Into<String>>(&mut self, field: T) {
8256 self.server = Some(field.into().into());
8257 }
8258 pub fn with_server<T: Into<String>>(mut self, field: T) -> Self {
8260 self.set_server(field.into());
8261 self
8262 }
8263 }
8264 impl super::GetTransactionRequest {
8265 pub const fn const_default() -> Self {
8266 Self {
8267 digest: None,
8268 read_mask: None,
8269 }
8270 }
8271 #[doc(hidden)]
8272 pub fn default_instance() -> &'static Self {
8273 static DEFAULT: super::GetTransactionRequest = super::GetTransactionRequest::const_default();
8274 &DEFAULT
8275 }
8276 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
8278 self.digest.as_mut().map(|field| field as _)
8279 }
8280 pub fn digest_mut(&mut self) -> &mut String {
8283 self.digest.get_or_insert_default()
8284 }
8285 pub fn digest_opt(&self) -> Option<&str> {
8287 self.digest.as_ref().map(|field| field as _)
8288 }
8289 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
8291 self.digest = Some(field.into().into());
8292 }
8293 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
8295 self.set_digest(field.into());
8296 self
8297 }
8298 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
8300 self.read_mask.as_mut().map(|field| field as _)
8301 }
8302 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
8305 self.read_mask.get_or_insert_default()
8306 }
8307 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
8309 self.read_mask.as_ref().map(|field| field as _)
8310 }
8311 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
8313 self.read_mask = Some(field.into().into());
8314 }
8315 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
8317 mut self,
8318 field: T,
8319 ) -> Self {
8320 self.set_read_mask(field.into());
8321 self
8322 }
8323 }
8324 impl super::GetTransactionResponse {
8325 pub const fn const_default() -> Self {
8326 Self { transaction: None }
8327 }
8328 #[doc(hidden)]
8329 pub fn default_instance() -> &'static Self {
8330 static DEFAULT: super::GetTransactionResponse = super::GetTransactionResponse::const_default();
8331 &DEFAULT
8332 }
8333 pub fn transaction(&self) -> &super::ExecutedTransaction {
8335 self.transaction
8336 .as_ref()
8337 .map(|field| field as _)
8338 .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
8339 }
8340 pub fn transaction_opt_mut(
8342 &mut self,
8343 ) -> Option<&mut super::ExecutedTransaction> {
8344 self.transaction.as_mut().map(|field| field as _)
8345 }
8346 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
8349 self.transaction.get_or_insert_default()
8350 }
8351 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
8353 self.transaction.as_ref().map(|field| field as _)
8354 }
8355 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
8357 &mut self,
8358 field: T,
8359 ) {
8360 self.transaction = Some(field.into().into());
8361 }
8362 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
8364 mut self,
8365 field: T,
8366 ) -> Self {
8367 self.set_transaction(field.into());
8368 self
8369 }
8370 }
8371 impl super::GetTransactionResult {
8372 pub const fn const_default() -> Self {
8373 Self { result: None }
8374 }
8375 #[doc(hidden)]
8376 pub fn default_instance() -> &'static Self {
8377 static DEFAULT: super::GetTransactionResult = super::GetTransactionResult::const_default();
8378 &DEFAULT
8379 }
8380 pub fn transaction(&self) -> &super::ExecutedTransaction {
8382 if let Some(super::get_transaction_result::Result::Transaction(field)) = &self
8383 .result
8384 {
8385 field as _
8386 } else {
8387 super::ExecutedTransaction::default_instance() as _
8388 }
8389 }
8390 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
8392 if let Some(super::get_transaction_result::Result::Transaction(field)) = &self
8393 .result
8394 {
8395 Some(field as _)
8396 } else {
8397 None
8398 }
8399 }
8400 pub fn transaction_opt_mut(
8402 &mut self,
8403 ) -> Option<&mut super::ExecutedTransaction> {
8404 if let Some(super::get_transaction_result::Result::Transaction(field)) = &mut self
8405 .result
8406 {
8407 Some(field as _)
8408 } else {
8409 None
8410 }
8411 }
8412 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
8416 if self.transaction_opt_mut().is_none() {
8417 self.result = Some(
8418 super::get_transaction_result::Result::Transaction(
8419 super::ExecutedTransaction::default(),
8420 ),
8421 );
8422 }
8423 self.transaction_opt_mut().unwrap()
8424 }
8425 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
8428 &mut self,
8429 field: T,
8430 ) {
8431 self.result = Some(
8432 super::get_transaction_result::Result::Transaction(field.into().into()),
8433 );
8434 }
8435 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
8438 mut self,
8439 field: T,
8440 ) -> Self {
8441 self.set_transaction(field.into());
8442 self
8443 }
8444 pub fn error(&self) -> &super::super::super::super::google::rpc::Status {
8446 if let Some(super::get_transaction_result::Result::Error(field)) = &self
8447 .result
8448 {
8449 field as _
8450 } else {
8451 super::super::super::super::google::rpc::Status::default_instance() as _
8452 }
8453 }
8454 pub fn error_opt(
8456 &self,
8457 ) -> Option<&super::super::super::super::google::rpc::Status> {
8458 if let Some(super::get_transaction_result::Result::Error(field)) = &self
8459 .result
8460 {
8461 Some(field as _)
8462 } else {
8463 None
8464 }
8465 }
8466 pub fn error_opt_mut(
8468 &mut self,
8469 ) -> Option<&mut super::super::super::super::google::rpc::Status> {
8470 if let Some(super::get_transaction_result::Result::Error(field)) = &mut self
8471 .result
8472 {
8473 Some(field as _)
8474 } else {
8475 None
8476 }
8477 }
8478 pub fn error_mut(
8482 &mut self,
8483 ) -> &mut super::super::super::super::google::rpc::Status {
8484 if self.error_opt_mut().is_none() {
8485 self.result = Some(
8486 super::get_transaction_result::Result::Error(
8487 super::super::super::super::google::rpc::Status::default(),
8488 ),
8489 );
8490 }
8491 self.error_opt_mut().unwrap()
8492 }
8493 pub fn set_error<T: Into<super::super::super::super::google::rpc::Status>>(
8496 &mut self,
8497 field: T,
8498 ) {
8499 self.result = Some(
8500 super::get_transaction_result::Result::Error(field.into().into()),
8501 );
8502 }
8503 pub fn with_error<T: Into<super::super::super::super::google::rpc::Status>>(
8506 mut self,
8507 field: T,
8508 ) -> Self {
8509 self.set_error(field.into());
8510 self
8511 }
8512 }
8513 impl super::IndexError {
8514 pub const fn const_default() -> Self {
8515 Self {
8516 index: None,
8517 subresult: None,
8518 }
8519 }
8520 #[doc(hidden)]
8521 pub fn default_instance() -> &'static Self {
8522 static DEFAULT: super::IndexError = super::IndexError::const_default();
8523 &DEFAULT
8524 }
8525 pub fn index_opt_mut(&mut self) -> Option<&mut u32> {
8527 self.index.as_mut().map(|field| field as _)
8528 }
8529 pub fn index_mut(&mut self) -> &mut u32 {
8532 self.index.get_or_insert_default()
8533 }
8534 pub fn index_opt(&self) -> Option<u32> {
8536 self.index.as_ref().map(|field| *field)
8537 }
8538 pub fn set_index(&mut self, field: u32) {
8540 self.index = Some(field);
8541 }
8542 pub fn with_index(mut self, field: u32) -> Self {
8544 self.set_index(field);
8545 self
8546 }
8547 pub fn subresult_opt_mut(&mut self) -> Option<&mut u32> {
8549 self.subresult.as_mut().map(|field| field as _)
8550 }
8551 pub fn subresult_mut(&mut self) -> &mut u32 {
8554 self.subresult.get_or_insert_default()
8555 }
8556 pub fn subresult_opt(&self) -> Option<u32> {
8558 self.subresult.as_ref().map(|field| *field)
8559 }
8560 pub fn set_subresult(&mut self, field: u32) {
8562 self.subresult = Some(field);
8563 }
8564 pub fn with_subresult(mut self, field: u32) -> Self {
8566 self.set_subresult(field);
8567 self
8568 }
8569 }
8570 impl super::Input {
8571 pub const fn const_default() -> Self {
8572 Self {
8573 kind: None,
8574 pure: None,
8575 object_id: None,
8576 version: None,
8577 digest: None,
8578 mutable: None,
8579 mutability: None,
8580 funds_withdrawal: None,
8581 literal: None,
8582 }
8583 }
8584 #[doc(hidden)]
8585 pub fn default_instance() -> &'static Self {
8586 static DEFAULT: super::Input = super::Input::const_default();
8587 &DEFAULT
8588 }
8589 pub fn with_kind<T: Into<super::input::InputKind>>(mut self, field: T) -> Self {
8591 self.set_kind(field.into());
8592 self
8593 }
8594 pub fn pure_opt(&self) -> Option<&[u8]> {
8596 self.pure.as_ref().map(|field| field as _)
8597 }
8598 pub fn set_pure<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
8600 self.pure = Some(field.into().into());
8601 }
8602 pub fn with_pure<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
8604 self.set_pure(field.into());
8605 self
8606 }
8607 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
8609 self.object_id.as_mut().map(|field| field as _)
8610 }
8611 pub fn object_id_mut(&mut self) -> &mut String {
8614 self.object_id.get_or_insert_default()
8615 }
8616 pub fn object_id_opt(&self) -> Option<&str> {
8618 self.object_id.as_ref().map(|field| field as _)
8619 }
8620 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
8622 self.object_id = Some(field.into().into());
8623 }
8624 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
8626 self.set_object_id(field.into());
8627 self
8628 }
8629 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
8631 self.version.as_mut().map(|field| field as _)
8632 }
8633 pub fn version_mut(&mut self) -> &mut u64 {
8636 self.version.get_or_insert_default()
8637 }
8638 pub fn version_opt(&self) -> Option<u64> {
8640 self.version.as_ref().map(|field| *field)
8641 }
8642 pub fn set_version(&mut self, field: u64) {
8644 self.version = Some(field);
8645 }
8646 pub fn with_version(mut self, field: u64) -> Self {
8648 self.set_version(field);
8649 self
8650 }
8651 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
8653 self.digest.as_mut().map(|field| field as _)
8654 }
8655 pub fn digest_mut(&mut self) -> &mut String {
8658 self.digest.get_or_insert_default()
8659 }
8660 pub fn digest_opt(&self) -> Option<&str> {
8662 self.digest.as_ref().map(|field| field as _)
8663 }
8664 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
8666 self.digest = Some(field.into().into());
8667 }
8668 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
8670 self.set_digest(field.into());
8671 self
8672 }
8673 pub fn mutable_opt_mut(&mut self) -> Option<&mut bool> {
8675 self.mutable.as_mut().map(|field| field as _)
8676 }
8677 pub fn mutable_mut(&mut self) -> &mut bool {
8680 self.mutable.get_or_insert_default()
8681 }
8682 pub fn mutable_opt(&self) -> Option<bool> {
8684 self.mutable.as_ref().map(|field| *field)
8685 }
8686 pub fn set_mutable(&mut self, field: bool) {
8688 self.mutable = Some(field);
8689 }
8690 pub fn with_mutable(mut self, field: bool) -> Self {
8692 self.set_mutable(field);
8693 self
8694 }
8695 pub fn with_mutability<T: Into<super::input::Mutability>>(
8697 mut self,
8698 field: T,
8699 ) -> Self {
8700 self.set_mutability(field.into());
8701 self
8702 }
8703 pub fn funds_withdrawal(&self) -> &super::FundsWithdrawal {
8705 self.funds_withdrawal
8706 .as_ref()
8707 .map(|field| field as _)
8708 .unwrap_or_else(|| super::FundsWithdrawal::default_instance() as _)
8709 }
8710 pub fn funds_withdrawal_opt_mut(
8712 &mut self,
8713 ) -> Option<&mut super::FundsWithdrawal> {
8714 self.funds_withdrawal.as_mut().map(|field| field as _)
8715 }
8716 pub fn funds_withdrawal_mut(&mut self) -> &mut super::FundsWithdrawal {
8719 self.funds_withdrawal.get_or_insert_default()
8720 }
8721 pub fn funds_withdrawal_opt(&self) -> Option<&super::FundsWithdrawal> {
8723 self.funds_withdrawal.as_ref().map(|field| field as _)
8724 }
8725 pub fn set_funds_withdrawal<T: Into<super::FundsWithdrawal>>(
8727 &mut self,
8728 field: T,
8729 ) {
8730 self.funds_withdrawal = Some(field.into().into());
8731 }
8732 pub fn with_funds_withdrawal<T: Into<super::FundsWithdrawal>>(
8734 mut self,
8735 field: T,
8736 ) -> Self {
8737 self.set_funds_withdrawal(field.into());
8738 self
8739 }
8740 pub fn literal_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
8742 self.literal.as_mut().map(|field| field as _)
8743 }
8744 pub fn literal_mut(&mut self) -> &mut ::prost_types::Value {
8747 self.literal.get_or_insert_default()
8748 }
8749 pub fn literal_opt(&self) -> Option<&::prost_types::Value> {
8751 self.literal.as_ref().map(|field| field as _)
8752 }
8753 pub fn set_literal<T: Into<::prost_types::Value>>(&mut self, field: T) {
8755 self.literal = Some(field.into().into());
8756 }
8757 pub fn with_literal<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
8759 self.set_literal(field.into());
8760 self
8761 }
8762 }
8763 impl super::Jwk {
8764 pub const fn const_default() -> Self {
8765 Self {
8766 kty: None,
8767 e: None,
8768 n: None,
8769 alg: None,
8770 }
8771 }
8772 #[doc(hidden)]
8773 pub fn default_instance() -> &'static Self {
8774 static DEFAULT: super::Jwk = super::Jwk::const_default();
8775 &DEFAULT
8776 }
8777 pub fn kty_opt_mut(&mut self) -> Option<&mut String> {
8779 self.kty.as_mut().map(|field| field as _)
8780 }
8781 pub fn kty_mut(&mut self) -> &mut String {
8784 self.kty.get_or_insert_default()
8785 }
8786 pub fn kty_opt(&self) -> Option<&str> {
8788 self.kty.as_ref().map(|field| field as _)
8789 }
8790 pub fn set_kty<T: Into<String>>(&mut self, field: T) {
8792 self.kty = Some(field.into().into());
8793 }
8794 pub fn with_kty<T: Into<String>>(mut self, field: T) -> Self {
8796 self.set_kty(field.into());
8797 self
8798 }
8799 pub fn e_opt_mut(&mut self) -> Option<&mut String> {
8801 self.e.as_mut().map(|field| field as _)
8802 }
8803 pub fn e_mut(&mut self) -> &mut String {
8806 self.e.get_or_insert_default()
8807 }
8808 pub fn e_opt(&self) -> Option<&str> {
8810 self.e.as_ref().map(|field| field as _)
8811 }
8812 pub fn set_e<T: Into<String>>(&mut self, field: T) {
8814 self.e = Some(field.into().into());
8815 }
8816 pub fn with_e<T: Into<String>>(mut self, field: T) -> Self {
8818 self.set_e(field.into());
8819 self
8820 }
8821 pub fn n_opt_mut(&mut self) -> Option<&mut String> {
8823 self.n.as_mut().map(|field| field as _)
8824 }
8825 pub fn n_mut(&mut self) -> &mut String {
8828 self.n.get_or_insert_default()
8829 }
8830 pub fn n_opt(&self) -> Option<&str> {
8832 self.n.as_ref().map(|field| field as _)
8833 }
8834 pub fn set_n<T: Into<String>>(&mut self, field: T) {
8836 self.n = Some(field.into().into());
8837 }
8838 pub fn with_n<T: Into<String>>(mut self, field: T) -> Self {
8840 self.set_n(field.into());
8841 self
8842 }
8843 pub fn alg_opt_mut(&mut self) -> Option<&mut String> {
8845 self.alg.as_mut().map(|field| field as _)
8846 }
8847 pub fn alg_mut(&mut self) -> &mut String {
8850 self.alg.get_or_insert_default()
8851 }
8852 pub fn alg_opt(&self) -> Option<&str> {
8854 self.alg.as_ref().map(|field| field as _)
8855 }
8856 pub fn set_alg<T: Into<String>>(&mut self, field: T) {
8858 self.alg = Some(field.into().into());
8859 }
8860 pub fn with_alg<T: Into<String>>(mut self, field: T) -> Self {
8862 self.set_alg(field.into());
8863 self
8864 }
8865 }
8866 impl super::JwkId {
8867 pub const fn const_default() -> Self {
8868 Self { iss: None, kid: None }
8869 }
8870 #[doc(hidden)]
8871 pub fn default_instance() -> &'static Self {
8872 static DEFAULT: super::JwkId = super::JwkId::const_default();
8873 &DEFAULT
8874 }
8875 pub fn iss_opt_mut(&mut self) -> Option<&mut String> {
8877 self.iss.as_mut().map(|field| field as _)
8878 }
8879 pub fn iss_mut(&mut self) -> &mut String {
8882 self.iss.get_or_insert_default()
8883 }
8884 pub fn iss_opt(&self) -> Option<&str> {
8886 self.iss.as_ref().map(|field| field as _)
8887 }
8888 pub fn set_iss<T: Into<String>>(&mut self, field: T) {
8890 self.iss = Some(field.into().into());
8891 }
8892 pub fn with_iss<T: Into<String>>(mut self, field: T) -> Self {
8894 self.set_iss(field.into());
8895 self
8896 }
8897 pub fn kid_opt_mut(&mut self) -> Option<&mut String> {
8899 self.kid.as_mut().map(|field| field as _)
8900 }
8901 pub fn kid_mut(&mut self) -> &mut String {
8904 self.kid.get_or_insert_default()
8905 }
8906 pub fn kid_opt(&self) -> Option<&str> {
8908 self.kid.as_ref().map(|field| field as _)
8909 }
8910 pub fn set_kid<T: Into<String>>(&mut self, field: T) {
8912 self.kid = Some(field.into().into());
8913 }
8914 pub fn with_kid<T: Into<String>>(mut self, field: T) -> Self {
8916 self.set_kid(field.into());
8917 self
8918 }
8919 }
8920 impl super::Linkage {
8921 pub const fn const_default() -> Self {
8922 Self {
8923 original_id: None,
8924 upgraded_id: None,
8925 upgraded_version: None,
8926 }
8927 }
8928 #[doc(hidden)]
8929 pub fn default_instance() -> &'static Self {
8930 static DEFAULT: super::Linkage = super::Linkage::const_default();
8931 &DEFAULT
8932 }
8933 pub fn original_id_opt_mut(&mut self) -> Option<&mut String> {
8935 self.original_id.as_mut().map(|field| field as _)
8936 }
8937 pub fn original_id_mut(&mut self) -> &mut String {
8940 self.original_id.get_or_insert_default()
8941 }
8942 pub fn original_id_opt(&self) -> Option<&str> {
8944 self.original_id.as_ref().map(|field| field as _)
8945 }
8946 pub fn set_original_id<T: Into<String>>(&mut self, field: T) {
8948 self.original_id = Some(field.into().into());
8949 }
8950 pub fn with_original_id<T: Into<String>>(mut self, field: T) -> Self {
8952 self.set_original_id(field.into());
8953 self
8954 }
8955 pub fn upgraded_id_opt_mut(&mut self) -> Option<&mut String> {
8957 self.upgraded_id.as_mut().map(|field| field as _)
8958 }
8959 pub fn upgraded_id_mut(&mut self) -> &mut String {
8962 self.upgraded_id.get_or_insert_default()
8963 }
8964 pub fn upgraded_id_opt(&self) -> Option<&str> {
8966 self.upgraded_id.as_ref().map(|field| field as _)
8967 }
8968 pub fn set_upgraded_id<T: Into<String>>(&mut self, field: T) {
8970 self.upgraded_id = Some(field.into().into());
8971 }
8972 pub fn with_upgraded_id<T: Into<String>>(mut self, field: T) -> Self {
8974 self.set_upgraded_id(field.into());
8975 self
8976 }
8977 pub fn upgraded_version_opt_mut(&mut self) -> Option<&mut u64> {
8979 self.upgraded_version.as_mut().map(|field| field as _)
8980 }
8981 pub fn upgraded_version_mut(&mut self) -> &mut u64 {
8984 self.upgraded_version.get_or_insert_default()
8985 }
8986 pub fn upgraded_version_opt(&self) -> Option<u64> {
8988 self.upgraded_version.as_ref().map(|field| *field)
8989 }
8990 pub fn set_upgraded_version(&mut self, field: u64) {
8992 self.upgraded_version = Some(field);
8993 }
8994 pub fn with_upgraded_version(mut self, field: u64) -> Self {
8996 self.set_upgraded_version(field);
8997 self
8998 }
8999 }
9000 impl super::ListBalancesRequest {
9001 pub const fn const_default() -> Self {
9002 Self {
9003 owner: None,
9004 page_size: None,
9005 page_token: None,
9006 }
9007 }
9008 #[doc(hidden)]
9009 pub fn default_instance() -> &'static Self {
9010 static DEFAULT: super::ListBalancesRequest = super::ListBalancesRequest::const_default();
9011 &DEFAULT
9012 }
9013 pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
9015 self.owner.as_mut().map(|field| field as _)
9016 }
9017 pub fn owner_mut(&mut self) -> &mut String {
9020 self.owner.get_or_insert_default()
9021 }
9022 pub fn owner_opt(&self) -> Option<&str> {
9024 self.owner.as_ref().map(|field| field as _)
9025 }
9026 pub fn set_owner<T: Into<String>>(&mut self, field: T) {
9028 self.owner = Some(field.into().into());
9029 }
9030 pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
9032 self.set_owner(field.into());
9033 self
9034 }
9035 pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
9037 self.page_size.as_mut().map(|field| field as _)
9038 }
9039 pub fn page_size_mut(&mut self) -> &mut u32 {
9042 self.page_size.get_or_insert_default()
9043 }
9044 pub fn page_size_opt(&self) -> Option<u32> {
9046 self.page_size.as_ref().map(|field| *field)
9047 }
9048 pub fn set_page_size(&mut self, field: u32) {
9050 self.page_size = Some(field);
9051 }
9052 pub fn with_page_size(mut self, field: u32) -> Self {
9054 self.set_page_size(field);
9055 self
9056 }
9057 pub fn page_token_opt(&self) -> Option<&[u8]> {
9059 self.page_token.as_ref().map(|field| field as _)
9060 }
9061 pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9063 self.page_token = Some(field.into().into());
9064 }
9065 pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
9067 mut self,
9068 field: T,
9069 ) -> Self {
9070 self.set_page_token(field.into());
9071 self
9072 }
9073 }
9074 impl super::ListBalancesResponse {
9075 pub const fn const_default() -> Self {
9076 Self {
9077 balances: Vec::new(),
9078 next_page_token: None,
9079 }
9080 }
9081 #[doc(hidden)]
9082 pub fn default_instance() -> &'static Self {
9083 static DEFAULT: super::ListBalancesResponse = super::ListBalancesResponse::const_default();
9084 &DEFAULT
9085 }
9086 pub fn balances(&self) -> &[super::Balance] {
9088 &self.balances
9089 }
9090 pub fn balances_mut(&mut self) -> &mut Vec<super::Balance> {
9093 &mut self.balances
9094 }
9095 pub fn set_balances(&mut self, field: Vec<super::Balance>) {
9097 self.balances = field;
9098 }
9099 pub fn with_balances(mut self, field: Vec<super::Balance>) -> Self {
9101 self.set_balances(field);
9102 self
9103 }
9104 pub fn next_page_token_opt(&self) -> Option<&[u8]> {
9106 self.next_page_token.as_ref().map(|field| field as _)
9107 }
9108 pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9110 self.next_page_token = Some(field.into().into());
9111 }
9112 pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
9114 mut self,
9115 field: T,
9116 ) -> Self {
9117 self.set_next_page_token(field.into());
9118 self
9119 }
9120 }
9121 impl super::ListDynamicFieldsRequest {
9122 pub const fn const_default() -> Self {
9123 Self {
9124 parent: None,
9125 page_size: None,
9126 page_token: None,
9127 read_mask: None,
9128 }
9129 }
9130 #[doc(hidden)]
9131 pub fn default_instance() -> &'static Self {
9132 static DEFAULT: super::ListDynamicFieldsRequest = super::ListDynamicFieldsRequest::const_default();
9133 &DEFAULT
9134 }
9135 pub fn parent_opt_mut(&mut self) -> Option<&mut String> {
9137 self.parent.as_mut().map(|field| field as _)
9138 }
9139 pub fn parent_mut(&mut self) -> &mut String {
9142 self.parent.get_or_insert_default()
9143 }
9144 pub fn parent_opt(&self) -> Option<&str> {
9146 self.parent.as_ref().map(|field| field as _)
9147 }
9148 pub fn set_parent<T: Into<String>>(&mut self, field: T) {
9150 self.parent = Some(field.into().into());
9151 }
9152 pub fn with_parent<T: Into<String>>(mut self, field: T) -> Self {
9154 self.set_parent(field.into());
9155 self
9156 }
9157 pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
9159 self.page_size.as_mut().map(|field| field as _)
9160 }
9161 pub fn page_size_mut(&mut self) -> &mut u32 {
9164 self.page_size.get_or_insert_default()
9165 }
9166 pub fn page_size_opt(&self) -> Option<u32> {
9168 self.page_size.as_ref().map(|field| *field)
9169 }
9170 pub fn set_page_size(&mut self, field: u32) {
9172 self.page_size = Some(field);
9173 }
9174 pub fn with_page_size(mut self, field: u32) -> Self {
9176 self.set_page_size(field);
9177 self
9178 }
9179 pub fn page_token_opt(&self) -> Option<&[u8]> {
9181 self.page_token.as_ref().map(|field| field as _)
9182 }
9183 pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9185 self.page_token = Some(field.into().into());
9186 }
9187 pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
9189 mut self,
9190 field: T,
9191 ) -> Self {
9192 self.set_page_token(field.into());
9193 self
9194 }
9195 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
9197 self.read_mask.as_mut().map(|field| field as _)
9198 }
9199 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
9202 self.read_mask.get_or_insert_default()
9203 }
9204 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
9206 self.read_mask.as_ref().map(|field| field as _)
9207 }
9208 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
9210 self.read_mask = Some(field.into().into());
9211 }
9212 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
9214 mut self,
9215 field: T,
9216 ) -> Self {
9217 self.set_read_mask(field.into());
9218 self
9219 }
9220 }
9221 impl super::ListDynamicFieldsResponse {
9222 pub const fn const_default() -> Self {
9223 Self {
9224 dynamic_fields: Vec::new(),
9225 next_page_token: None,
9226 }
9227 }
9228 #[doc(hidden)]
9229 pub fn default_instance() -> &'static Self {
9230 static DEFAULT: super::ListDynamicFieldsResponse = super::ListDynamicFieldsResponse::const_default();
9231 &DEFAULT
9232 }
9233 pub fn dynamic_fields(&self) -> &[super::DynamicField] {
9235 &self.dynamic_fields
9236 }
9237 pub fn dynamic_fields_mut(&mut self) -> &mut Vec<super::DynamicField> {
9240 &mut self.dynamic_fields
9241 }
9242 pub fn set_dynamic_fields(&mut self, field: Vec<super::DynamicField>) {
9244 self.dynamic_fields = field;
9245 }
9246 pub fn with_dynamic_fields(mut self, field: Vec<super::DynamicField>) -> Self {
9248 self.set_dynamic_fields(field);
9249 self
9250 }
9251 pub fn next_page_token_opt(&self) -> Option<&[u8]> {
9253 self.next_page_token.as_ref().map(|field| field as _)
9254 }
9255 pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9257 self.next_page_token = Some(field.into().into());
9258 }
9259 pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
9261 mut self,
9262 field: T,
9263 ) -> Self {
9264 self.set_next_page_token(field.into());
9265 self
9266 }
9267 }
9268 impl super::ListOwnedObjectsRequest {
9269 pub const fn const_default() -> Self {
9270 Self {
9271 owner: None,
9272 page_size: None,
9273 page_token: None,
9274 read_mask: None,
9275 object_type: None,
9276 }
9277 }
9278 #[doc(hidden)]
9279 pub fn default_instance() -> &'static Self {
9280 static DEFAULT: super::ListOwnedObjectsRequest = super::ListOwnedObjectsRequest::const_default();
9281 &DEFAULT
9282 }
9283 pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
9285 self.owner.as_mut().map(|field| field as _)
9286 }
9287 pub fn owner_mut(&mut self) -> &mut String {
9290 self.owner.get_or_insert_default()
9291 }
9292 pub fn owner_opt(&self) -> Option<&str> {
9294 self.owner.as_ref().map(|field| field as _)
9295 }
9296 pub fn set_owner<T: Into<String>>(&mut self, field: T) {
9298 self.owner = Some(field.into().into());
9299 }
9300 pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
9302 self.set_owner(field.into());
9303 self
9304 }
9305 pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
9307 self.page_size.as_mut().map(|field| field as _)
9308 }
9309 pub fn page_size_mut(&mut self) -> &mut u32 {
9312 self.page_size.get_or_insert_default()
9313 }
9314 pub fn page_size_opt(&self) -> Option<u32> {
9316 self.page_size.as_ref().map(|field| *field)
9317 }
9318 pub fn set_page_size(&mut self, field: u32) {
9320 self.page_size = Some(field);
9321 }
9322 pub fn with_page_size(mut self, field: u32) -> Self {
9324 self.set_page_size(field);
9325 self
9326 }
9327 pub fn page_token_opt(&self) -> Option<&[u8]> {
9329 self.page_token.as_ref().map(|field| field as _)
9330 }
9331 pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9333 self.page_token = Some(field.into().into());
9334 }
9335 pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
9337 mut self,
9338 field: T,
9339 ) -> Self {
9340 self.set_page_token(field.into());
9341 self
9342 }
9343 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
9345 self.read_mask.as_mut().map(|field| field as _)
9346 }
9347 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
9350 self.read_mask.get_or_insert_default()
9351 }
9352 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
9354 self.read_mask.as_ref().map(|field| field as _)
9355 }
9356 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
9358 self.read_mask = Some(field.into().into());
9359 }
9360 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
9362 mut self,
9363 field: T,
9364 ) -> Self {
9365 self.set_read_mask(field.into());
9366 self
9367 }
9368 pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
9370 self.object_type.as_mut().map(|field| field as _)
9371 }
9372 pub fn object_type_mut(&mut self) -> &mut String {
9375 self.object_type.get_or_insert_default()
9376 }
9377 pub fn object_type_opt(&self) -> Option<&str> {
9379 self.object_type.as_ref().map(|field| field as _)
9380 }
9381 pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
9383 self.object_type = Some(field.into().into());
9384 }
9385 pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
9387 self.set_object_type(field.into());
9388 self
9389 }
9390 }
9391 impl super::ListOwnedObjectsResponse {
9392 pub const fn const_default() -> Self {
9393 Self {
9394 objects: Vec::new(),
9395 next_page_token: None,
9396 }
9397 }
9398 #[doc(hidden)]
9399 pub fn default_instance() -> &'static Self {
9400 static DEFAULT: super::ListOwnedObjectsResponse = super::ListOwnedObjectsResponse::const_default();
9401 &DEFAULT
9402 }
9403 pub fn objects(&self) -> &[super::Object] {
9405 &self.objects
9406 }
9407 pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
9410 &mut self.objects
9411 }
9412 pub fn set_objects(&mut self, field: Vec<super::Object>) {
9414 self.objects = field;
9415 }
9416 pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
9418 self.set_objects(field);
9419 self
9420 }
9421 pub fn next_page_token_opt(&self) -> Option<&[u8]> {
9423 self.next_page_token.as_ref().map(|field| field as _)
9424 }
9425 pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9427 self.next_page_token = Some(field.into().into());
9428 }
9429 pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
9431 mut self,
9432 field: T,
9433 ) -> Self {
9434 self.set_next_page_token(field.into());
9435 self
9436 }
9437 }
9438 impl super::ListPackageVersionsRequest {
9439 pub const fn const_default() -> Self {
9440 Self {
9441 package_id: None,
9442 page_size: None,
9443 page_token: None,
9444 }
9445 }
9446 #[doc(hidden)]
9447 pub fn default_instance() -> &'static Self {
9448 static DEFAULT: super::ListPackageVersionsRequest = super::ListPackageVersionsRequest::const_default();
9449 &DEFAULT
9450 }
9451 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
9453 self.package_id.as_mut().map(|field| field as _)
9454 }
9455 pub fn package_id_mut(&mut self) -> &mut String {
9458 self.package_id.get_or_insert_default()
9459 }
9460 pub fn package_id_opt(&self) -> Option<&str> {
9462 self.package_id.as_ref().map(|field| field as _)
9463 }
9464 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
9466 self.package_id = Some(field.into().into());
9467 }
9468 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
9470 self.set_package_id(field.into());
9471 self
9472 }
9473 pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
9475 self.page_size.as_mut().map(|field| field as _)
9476 }
9477 pub fn page_size_mut(&mut self) -> &mut u32 {
9480 self.page_size.get_or_insert_default()
9481 }
9482 pub fn page_size_opt(&self) -> Option<u32> {
9484 self.page_size.as_ref().map(|field| *field)
9485 }
9486 pub fn set_page_size(&mut self, field: u32) {
9488 self.page_size = Some(field);
9489 }
9490 pub fn with_page_size(mut self, field: u32) -> Self {
9492 self.set_page_size(field);
9493 self
9494 }
9495 pub fn page_token_opt(&self) -> Option<&[u8]> {
9497 self.page_token.as_ref().map(|field| field as _)
9498 }
9499 pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9501 self.page_token = Some(field.into().into());
9502 }
9503 pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
9505 mut self,
9506 field: T,
9507 ) -> Self {
9508 self.set_page_token(field.into());
9509 self
9510 }
9511 }
9512 impl super::ListPackageVersionsResponse {
9513 pub const fn const_default() -> Self {
9514 Self {
9515 versions: Vec::new(),
9516 next_page_token: None,
9517 }
9518 }
9519 #[doc(hidden)]
9520 pub fn default_instance() -> &'static Self {
9521 static DEFAULT: super::ListPackageVersionsResponse = super::ListPackageVersionsResponse::const_default();
9522 &DEFAULT
9523 }
9524 pub fn versions(&self) -> &[super::PackageVersion] {
9526 &self.versions
9527 }
9528 pub fn versions_mut(&mut self) -> &mut Vec<super::PackageVersion> {
9531 &mut self.versions
9532 }
9533 pub fn set_versions(&mut self, field: Vec<super::PackageVersion>) {
9535 self.versions = field;
9536 }
9537 pub fn with_versions(mut self, field: Vec<super::PackageVersion>) -> Self {
9539 self.set_versions(field);
9540 self
9541 }
9542 pub fn next_page_token_opt(&self) -> Option<&[u8]> {
9544 self.next_page_token.as_ref().map(|field| field as _)
9545 }
9546 pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9548 self.next_page_token = Some(field.into().into());
9549 }
9550 pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
9552 mut self,
9553 field: T,
9554 ) -> Self {
9555 self.set_next_page_token(field.into());
9556 self
9557 }
9558 }
9559 impl super::LookupNameRequest {
9560 pub const fn const_default() -> Self {
9561 Self { name: None }
9562 }
9563 #[doc(hidden)]
9564 pub fn default_instance() -> &'static Self {
9565 static DEFAULT: super::LookupNameRequest = super::LookupNameRequest::const_default();
9566 &DEFAULT
9567 }
9568 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
9570 self.name.as_mut().map(|field| field as _)
9571 }
9572 pub fn name_mut(&mut self) -> &mut String {
9575 self.name.get_or_insert_default()
9576 }
9577 pub fn name_opt(&self) -> Option<&str> {
9579 self.name.as_ref().map(|field| field as _)
9580 }
9581 pub fn set_name<T: Into<String>>(&mut self, field: T) {
9583 self.name = Some(field.into().into());
9584 }
9585 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
9587 self.set_name(field.into());
9588 self
9589 }
9590 }
9591 impl super::LookupNameResponse {
9592 pub const fn const_default() -> Self {
9593 Self { record: None }
9594 }
9595 #[doc(hidden)]
9596 pub fn default_instance() -> &'static Self {
9597 static DEFAULT: super::LookupNameResponse = super::LookupNameResponse::const_default();
9598 &DEFAULT
9599 }
9600 pub fn record(&self) -> &super::NameRecord {
9602 self.record
9603 .as_ref()
9604 .map(|field| field as _)
9605 .unwrap_or_else(|| super::NameRecord::default_instance() as _)
9606 }
9607 pub fn record_opt_mut(&mut self) -> Option<&mut super::NameRecord> {
9609 self.record.as_mut().map(|field| field as _)
9610 }
9611 pub fn record_mut(&mut self) -> &mut super::NameRecord {
9614 self.record.get_or_insert_default()
9615 }
9616 pub fn record_opt(&self) -> Option<&super::NameRecord> {
9618 self.record.as_ref().map(|field| field as _)
9619 }
9620 pub fn set_record<T: Into<super::NameRecord>>(&mut self, field: T) {
9622 self.record = Some(field.into().into());
9623 }
9624 pub fn with_record<T: Into<super::NameRecord>>(mut self, field: T) -> Self {
9626 self.set_record(field.into());
9627 self
9628 }
9629 }
9630 impl super::MakeMoveVector {
9631 pub const fn const_default() -> Self {
9632 Self {
9633 element_type: None,
9634 elements: Vec::new(),
9635 }
9636 }
9637 #[doc(hidden)]
9638 pub fn default_instance() -> &'static Self {
9639 static DEFAULT: super::MakeMoveVector = super::MakeMoveVector::const_default();
9640 &DEFAULT
9641 }
9642 pub fn element_type_opt_mut(&mut self) -> Option<&mut String> {
9644 self.element_type.as_mut().map(|field| field as _)
9645 }
9646 pub fn element_type_mut(&mut self) -> &mut String {
9649 self.element_type.get_or_insert_default()
9650 }
9651 pub fn element_type_opt(&self) -> Option<&str> {
9653 self.element_type.as_ref().map(|field| field as _)
9654 }
9655 pub fn set_element_type<T: Into<String>>(&mut self, field: T) {
9657 self.element_type = Some(field.into().into());
9658 }
9659 pub fn with_element_type<T: Into<String>>(mut self, field: T) -> Self {
9661 self.set_element_type(field.into());
9662 self
9663 }
9664 pub fn elements(&self) -> &[super::Argument] {
9666 &self.elements
9667 }
9668 pub fn elements_mut(&mut self) -> &mut Vec<super::Argument> {
9671 &mut self.elements
9672 }
9673 pub fn set_elements(&mut self, field: Vec<super::Argument>) {
9675 self.elements = field;
9676 }
9677 pub fn with_elements(mut self, field: Vec<super::Argument>) -> Self {
9679 self.set_elements(field);
9680 self
9681 }
9682 }
9683 impl super::MergeCoins {
9684 pub const fn const_default() -> Self {
9685 Self {
9686 coin: None,
9687 coins_to_merge: Vec::new(),
9688 }
9689 }
9690 #[doc(hidden)]
9691 pub fn default_instance() -> &'static Self {
9692 static DEFAULT: super::MergeCoins = super::MergeCoins::const_default();
9693 &DEFAULT
9694 }
9695 pub fn coin(&self) -> &super::Argument {
9697 self.coin
9698 .as_ref()
9699 .map(|field| field as _)
9700 .unwrap_or_else(|| super::Argument::default_instance() as _)
9701 }
9702 pub fn coin_opt_mut(&mut self) -> Option<&mut super::Argument> {
9704 self.coin.as_mut().map(|field| field as _)
9705 }
9706 pub fn coin_mut(&mut self) -> &mut super::Argument {
9709 self.coin.get_or_insert_default()
9710 }
9711 pub fn coin_opt(&self) -> Option<&super::Argument> {
9713 self.coin.as_ref().map(|field| field as _)
9714 }
9715 pub fn set_coin<T: Into<super::Argument>>(&mut self, field: T) {
9717 self.coin = Some(field.into().into());
9718 }
9719 pub fn with_coin<T: Into<super::Argument>>(mut self, field: T) -> Self {
9721 self.set_coin(field.into());
9722 self
9723 }
9724 pub fn coins_to_merge(&self) -> &[super::Argument] {
9726 &self.coins_to_merge
9727 }
9728 pub fn coins_to_merge_mut(&mut self) -> &mut Vec<super::Argument> {
9731 &mut self.coins_to_merge
9732 }
9733 pub fn set_coins_to_merge(&mut self, field: Vec<super::Argument>) {
9735 self.coins_to_merge = field;
9736 }
9737 pub fn with_coins_to_merge(mut self, field: Vec<super::Argument>) -> Self {
9739 self.set_coins_to_merge(field);
9740 self
9741 }
9742 }
9743 impl super::Module {
9744 pub const fn const_default() -> Self {
9745 Self {
9746 name: None,
9747 contents: None,
9748 datatypes: Vec::new(),
9749 functions: Vec::new(),
9750 }
9751 }
9752 #[doc(hidden)]
9753 pub fn default_instance() -> &'static Self {
9754 static DEFAULT: super::Module = super::Module::const_default();
9755 &DEFAULT
9756 }
9757 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
9759 self.name.as_mut().map(|field| field as _)
9760 }
9761 pub fn name_mut(&mut self) -> &mut String {
9764 self.name.get_or_insert_default()
9765 }
9766 pub fn name_opt(&self) -> Option<&str> {
9768 self.name.as_ref().map(|field| field as _)
9769 }
9770 pub fn set_name<T: Into<String>>(&mut self, field: T) {
9772 self.name = Some(field.into().into());
9773 }
9774 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
9776 self.set_name(field.into());
9777 self
9778 }
9779 pub fn contents_opt(&self) -> Option<&[u8]> {
9781 self.contents.as_ref().map(|field| field as _)
9782 }
9783 pub fn set_contents<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9785 self.contents = Some(field.into().into());
9786 }
9787 pub fn with_contents<T: Into<::prost::bytes::Bytes>>(
9789 mut self,
9790 field: T,
9791 ) -> Self {
9792 self.set_contents(field.into());
9793 self
9794 }
9795 pub fn datatypes(&self) -> &[super::DatatypeDescriptor] {
9797 &self.datatypes
9798 }
9799 pub fn datatypes_mut(&mut self) -> &mut Vec<super::DatatypeDescriptor> {
9802 &mut self.datatypes
9803 }
9804 pub fn set_datatypes(&mut self, field: Vec<super::DatatypeDescriptor>) {
9806 self.datatypes = field;
9807 }
9808 pub fn with_datatypes(mut self, field: Vec<super::DatatypeDescriptor>) -> Self {
9810 self.set_datatypes(field);
9811 self
9812 }
9813 pub fn functions(&self) -> &[super::FunctionDescriptor] {
9815 &self.functions
9816 }
9817 pub fn functions_mut(&mut self) -> &mut Vec<super::FunctionDescriptor> {
9820 &mut self.functions
9821 }
9822 pub fn set_functions(&mut self, field: Vec<super::FunctionDescriptor>) {
9824 self.functions = field;
9825 }
9826 pub fn with_functions(mut self, field: Vec<super::FunctionDescriptor>) -> Self {
9828 self.set_functions(field);
9829 self
9830 }
9831 }
9832 impl super::MoveAbort {
9833 pub const fn const_default() -> Self {
9834 Self {
9835 abort_code: None,
9836 location: None,
9837 clever_error: None,
9838 }
9839 }
9840 #[doc(hidden)]
9841 pub fn default_instance() -> &'static Self {
9842 static DEFAULT: super::MoveAbort = super::MoveAbort::const_default();
9843 &DEFAULT
9844 }
9845 pub fn abort_code_opt_mut(&mut self) -> Option<&mut u64> {
9847 self.abort_code.as_mut().map(|field| field as _)
9848 }
9849 pub fn abort_code_mut(&mut self) -> &mut u64 {
9852 self.abort_code.get_or_insert_default()
9853 }
9854 pub fn abort_code_opt(&self) -> Option<u64> {
9856 self.abort_code.as_ref().map(|field| *field)
9857 }
9858 pub fn set_abort_code(&mut self, field: u64) {
9860 self.abort_code = Some(field);
9861 }
9862 pub fn with_abort_code(mut self, field: u64) -> Self {
9864 self.set_abort_code(field);
9865 self
9866 }
9867 pub fn location(&self) -> &super::MoveLocation {
9869 self.location
9870 .as_ref()
9871 .map(|field| field as _)
9872 .unwrap_or_else(|| super::MoveLocation::default_instance() as _)
9873 }
9874 pub fn location_opt_mut(&mut self) -> Option<&mut super::MoveLocation> {
9876 self.location.as_mut().map(|field| field as _)
9877 }
9878 pub fn location_mut(&mut self) -> &mut super::MoveLocation {
9881 self.location.get_or_insert_default()
9882 }
9883 pub fn location_opt(&self) -> Option<&super::MoveLocation> {
9885 self.location.as_ref().map(|field| field as _)
9886 }
9887 pub fn set_location<T: Into<super::MoveLocation>>(&mut self, field: T) {
9889 self.location = Some(field.into().into());
9890 }
9891 pub fn with_location<T: Into<super::MoveLocation>>(mut self, field: T) -> Self {
9893 self.set_location(field.into());
9894 self
9895 }
9896 pub fn clever_error(&self) -> &super::CleverError {
9898 self.clever_error
9899 .as_ref()
9900 .map(|field| field as _)
9901 .unwrap_or_else(|| super::CleverError::default_instance() as _)
9902 }
9903 pub fn clever_error_opt_mut(&mut self) -> Option<&mut super::CleverError> {
9905 self.clever_error.as_mut().map(|field| field as _)
9906 }
9907 pub fn clever_error_mut(&mut self) -> &mut super::CleverError {
9910 self.clever_error.get_or_insert_default()
9911 }
9912 pub fn clever_error_opt(&self) -> Option<&super::CleverError> {
9914 self.clever_error.as_ref().map(|field| field as _)
9915 }
9916 pub fn set_clever_error<T: Into<super::CleverError>>(&mut self, field: T) {
9918 self.clever_error = Some(field.into().into());
9919 }
9920 pub fn with_clever_error<T: Into<super::CleverError>>(
9922 mut self,
9923 field: T,
9924 ) -> Self {
9925 self.set_clever_error(field.into());
9926 self
9927 }
9928 }
9929 impl super::MoveCall {
9930 pub const fn const_default() -> Self {
9931 Self {
9932 package: None,
9933 module: None,
9934 function: None,
9935 type_arguments: Vec::new(),
9936 arguments: Vec::new(),
9937 }
9938 }
9939 #[doc(hidden)]
9940 pub fn default_instance() -> &'static Self {
9941 static DEFAULT: super::MoveCall = super::MoveCall::const_default();
9942 &DEFAULT
9943 }
9944 pub fn package_opt_mut(&mut self) -> Option<&mut String> {
9946 self.package.as_mut().map(|field| field as _)
9947 }
9948 pub fn package_mut(&mut self) -> &mut String {
9951 self.package.get_or_insert_default()
9952 }
9953 pub fn package_opt(&self) -> Option<&str> {
9955 self.package.as_ref().map(|field| field as _)
9956 }
9957 pub fn set_package<T: Into<String>>(&mut self, field: T) {
9959 self.package = Some(field.into().into());
9960 }
9961 pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
9963 self.set_package(field.into());
9964 self
9965 }
9966 pub fn module_opt_mut(&mut self) -> Option<&mut String> {
9968 self.module.as_mut().map(|field| field as _)
9969 }
9970 pub fn module_mut(&mut self) -> &mut String {
9973 self.module.get_or_insert_default()
9974 }
9975 pub fn module_opt(&self) -> Option<&str> {
9977 self.module.as_ref().map(|field| field as _)
9978 }
9979 pub fn set_module<T: Into<String>>(&mut self, field: T) {
9981 self.module = Some(field.into().into());
9982 }
9983 pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
9985 self.set_module(field.into());
9986 self
9987 }
9988 pub fn function_opt_mut(&mut self) -> Option<&mut String> {
9990 self.function.as_mut().map(|field| field as _)
9991 }
9992 pub fn function_mut(&mut self) -> &mut String {
9995 self.function.get_or_insert_default()
9996 }
9997 pub fn function_opt(&self) -> Option<&str> {
9999 self.function.as_ref().map(|field| field as _)
10000 }
10001 pub fn set_function<T: Into<String>>(&mut self, field: T) {
10003 self.function = Some(field.into().into());
10004 }
10005 pub fn with_function<T: Into<String>>(mut self, field: T) -> Self {
10007 self.set_function(field.into());
10008 self
10009 }
10010 pub fn type_arguments(&self) -> &[String] {
10012 &self.type_arguments
10013 }
10014 pub fn type_arguments_mut(&mut self) -> &mut Vec<String> {
10017 &mut self.type_arguments
10018 }
10019 pub fn set_type_arguments(&mut self, field: Vec<String>) {
10021 self.type_arguments = field;
10022 }
10023 pub fn with_type_arguments(mut self, field: Vec<String>) -> Self {
10025 self.set_type_arguments(field);
10026 self
10027 }
10028 pub fn arguments(&self) -> &[super::Argument] {
10030 &self.arguments
10031 }
10032 pub fn arguments_mut(&mut self) -> &mut Vec<super::Argument> {
10035 &mut self.arguments
10036 }
10037 pub fn set_arguments(&mut self, field: Vec<super::Argument>) {
10039 self.arguments = field;
10040 }
10041 pub fn with_arguments(mut self, field: Vec<super::Argument>) -> Self {
10043 self.set_arguments(field);
10044 self
10045 }
10046 }
10047 impl super::MoveLocation {
10048 pub const fn const_default() -> Self {
10049 Self {
10050 package: None,
10051 module: None,
10052 function: None,
10053 instruction: None,
10054 function_name: None,
10055 }
10056 }
10057 #[doc(hidden)]
10058 pub fn default_instance() -> &'static Self {
10059 static DEFAULT: super::MoveLocation = super::MoveLocation::const_default();
10060 &DEFAULT
10061 }
10062 pub fn package_opt_mut(&mut self) -> Option<&mut String> {
10064 self.package.as_mut().map(|field| field as _)
10065 }
10066 pub fn package_mut(&mut self) -> &mut String {
10069 self.package.get_or_insert_default()
10070 }
10071 pub fn package_opt(&self) -> Option<&str> {
10073 self.package.as_ref().map(|field| field as _)
10074 }
10075 pub fn set_package<T: Into<String>>(&mut self, field: T) {
10077 self.package = Some(field.into().into());
10078 }
10079 pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
10081 self.set_package(field.into());
10082 self
10083 }
10084 pub fn module_opt_mut(&mut self) -> Option<&mut String> {
10086 self.module.as_mut().map(|field| field as _)
10087 }
10088 pub fn module_mut(&mut self) -> &mut String {
10091 self.module.get_or_insert_default()
10092 }
10093 pub fn module_opt(&self) -> Option<&str> {
10095 self.module.as_ref().map(|field| field as _)
10096 }
10097 pub fn set_module<T: Into<String>>(&mut self, field: T) {
10099 self.module = Some(field.into().into());
10100 }
10101 pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
10103 self.set_module(field.into());
10104 self
10105 }
10106 pub fn function_opt_mut(&mut self) -> Option<&mut u32> {
10108 self.function.as_mut().map(|field| field as _)
10109 }
10110 pub fn function_mut(&mut self) -> &mut u32 {
10113 self.function.get_or_insert_default()
10114 }
10115 pub fn function_opt(&self) -> Option<u32> {
10117 self.function.as_ref().map(|field| *field)
10118 }
10119 pub fn set_function(&mut self, field: u32) {
10121 self.function = Some(field);
10122 }
10123 pub fn with_function(mut self, field: u32) -> Self {
10125 self.set_function(field);
10126 self
10127 }
10128 pub fn instruction_opt_mut(&mut self) -> Option<&mut u32> {
10130 self.instruction.as_mut().map(|field| field as _)
10131 }
10132 pub fn instruction_mut(&mut self) -> &mut u32 {
10135 self.instruction.get_or_insert_default()
10136 }
10137 pub fn instruction_opt(&self) -> Option<u32> {
10139 self.instruction.as_ref().map(|field| *field)
10140 }
10141 pub fn set_instruction(&mut self, field: u32) {
10143 self.instruction = Some(field);
10144 }
10145 pub fn with_instruction(mut self, field: u32) -> Self {
10147 self.set_instruction(field);
10148 self
10149 }
10150 pub fn function_name_opt_mut(&mut self) -> Option<&mut String> {
10152 self.function_name.as_mut().map(|field| field as _)
10153 }
10154 pub fn function_name_mut(&mut self) -> &mut String {
10157 self.function_name.get_or_insert_default()
10158 }
10159 pub fn function_name_opt(&self) -> Option<&str> {
10161 self.function_name.as_ref().map(|field| field as _)
10162 }
10163 pub fn set_function_name<T: Into<String>>(&mut self, field: T) {
10165 self.function_name = Some(field.into().into());
10166 }
10167 pub fn with_function_name<T: Into<String>>(mut self, field: T) -> Self {
10169 self.set_function_name(field.into());
10170 self
10171 }
10172 }
10173 impl super::MoveTable {
10174 pub const fn const_default() -> Self {
10175 Self { id: None, size: None }
10176 }
10177 #[doc(hidden)]
10178 pub fn default_instance() -> &'static Self {
10179 static DEFAULT: super::MoveTable = super::MoveTable::const_default();
10180 &DEFAULT
10181 }
10182 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
10184 self.id.as_mut().map(|field| field as _)
10185 }
10186 pub fn id_mut(&mut self) -> &mut String {
10189 self.id.get_or_insert_default()
10190 }
10191 pub fn id_opt(&self) -> Option<&str> {
10193 self.id.as_ref().map(|field| field as _)
10194 }
10195 pub fn set_id<T: Into<String>>(&mut self, field: T) {
10197 self.id = Some(field.into().into());
10198 }
10199 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
10201 self.set_id(field.into());
10202 self
10203 }
10204 pub fn size_opt_mut(&mut self) -> Option<&mut u64> {
10206 self.size.as_mut().map(|field| field as _)
10207 }
10208 pub fn size_mut(&mut self) -> &mut u64 {
10211 self.size.get_or_insert_default()
10212 }
10213 pub fn size_opt(&self) -> Option<u64> {
10215 self.size.as_ref().map(|field| *field)
10216 }
10217 pub fn set_size(&mut self, field: u64) {
10219 self.size = Some(field);
10220 }
10221 pub fn with_size(mut self, field: u64) -> Self {
10223 self.set_size(field);
10224 self
10225 }
10226 }
10227 impl super::MultisigAggregatedSignature {
10228 pub const fn const_default() -> Self {
10229 Self {
10230 signatures: Vec::new(),
10231 bitmap: None,
10232 legacy_bitmap: None,
10233 committee: None,
10234 }
10235 }
10236 #[doc(hidden)]
10237 pub fn default_instance() -> &'static Self {
10238 static DEFAULT: super::MultisigAggregatedSignature = super::MultisigAggregatedSignature::const_default();
10239 &DEFAULT
10240 }
10241 pub fn signatures(&self) -> &[super::MultisigMemberSignature] {
10243 &self.signatures
10244 }
10245 pub fn signatures_mut(&mut self) -> &mut Vec<super::MultisigMemberSignature> {
10248 &mut self.signatures
10249 }
10250 pub fn set_signatures(&mut self, field: Vec<super::MultisigMemberSignature>) {
10252 self.signatures = field;
10253 }
10254 pub fn with_signatures(
10256 mut self,
10257 field: Vec<super::MultisigMemberSignature>,
10258 ) -> Self {
10259 self.set_signatures(field);
10260 self
10261 }
10262 pub fn bitmap_opt_mut(&mut self) -> Option<&mut u32> {
10264 self.bitmap.as_mut().map(|field| field as _)
10265 }
10266 pub fn bitmap_mut(&mut self) -> &mut u32 {
10269 self.bitmap.get_or_insert_default()
10270 }
10271 pub fn bitmap_opt(&self) -> Option<u32> {
10273 self.bitmap.as_ref().map(|field| *field)
10274 }
10275 pub fn set_bitmap(&mut self, field: u32) {
10277 self.bitmap = Some(field);
10278 }
10279 pub fn with_bitmap(mut self, field: u32) -> Self {
10281 self.set_bitmap(field);
10282 self
10283 }
10284 pub fn legacy_bitmap_opt(&self) -> Option<&[u8]> {
10286 self.legacy_bitmap.as_ref().map(|field| field as _)
10287 }
10288 pub fn set_legacy_bitmap<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10290 self.legacy_bitmap = Some(field.into().into());
10291 }
10292 pub fn with_legacy_bitmap<T: Into<::prost::bytes::Bytes>>(
10294 mut self,
10295 field: T,
10296 ) -> Self {
10297 self.set_legacy_bitmap(field.into());
10298 self
10299 }
10300 pub fn committee(&self) -> &super::MultisigCommittee {
10302 self.committee
10303 .as_ref()
10304 .map(|field| field as _)
10305 .unwrap_or_else(|| super::MultisigCommittee::default_instance() as _)
10306 }
10307 pub fn committee_opt_mut(&mut self) -> Option<&mut super::MultisigCommittee> {
10309 self.committee.as_mut().map(|field| field as _)
10310 }
10311 pub fn committee_mut(&mut self) -> &mut super::MultisigCommittee {
10314 self.committee.get_or_insert_default()
10315 }
10316 pub fn committee_opt(&self) -> Option<&super::MultisigCommittee> {
10318 self.committee.as_ref().map(|field| field as _)
10319 }
10320 pub fn set_committee<T: Into<super::MultisigCommittee>>(&mut self, field: T) {
10322 self.committee = Some(field.into().into());
10323 }
10324 pub fn with_committee<T: Into<super::MultisigCommittee>>(
10326 mut self,
10327 field: T,
10328 ) -> Self {
10329 self.set_committee(field.into());
10330 self
10331 }
10332 }
10333 impl super::MultisigCommittee {
10334 pub const fn const_default() -> Self {
10335 Self {
10336 members: Vec::new(),
10337 threshold: None,
10338 }
10339 }
10340 #[doc(hidden)]
10341 pub fn default_instance() -> &'static Self {
10342 static DEFAULT: super::MultisigCommittee = super::MultisigCommittee::const_default();
10343 &DEFAULT
10344 }
10345 pub fn members(&self) -> &[super::MultisigMember] {
10347 &self.members
10348 }
10349 pub fn members_mut(&mut self) -> &mut Vec<super::MultisigMember> {
10352 &mut self.members
10353 }
10354 pub fn set_members(&mut self, field: Vec<super::MultisigMember>) {
10356 self.members = field;
10357 }
10358 pub fn with_members(mut self, field: Vec<super::MultisigMember>) -> Self {
10360 self.set_members(field);
10361 self
10362 }
10363 pub fn threshold_opt_mut(&mut self) -> Option<&mut u32> {
10365 self.threshold.as_mut().map(|field| field as _)
10366 }
10367 pub fn threshold_mut(&mut self) -> &mut u32 {
10370 self.threshold.get_or_insert_default()
10371 }
10372 pub fn threshold_opt(&self) -> Option<u32> {
10374 self.threshold.as_ref().map(|field| *field)
10375 }
10376 pub fn set_threshold(&mut self, field: u32) {
10378 self.threshold = Some(field);
10379 }
10380 pub fn with_threshold(mut self, field: u32) -> Self {
10382 self.set_threshold(field);
10383 self
10384 }
10385 }
10386 impl super::MultisigMember {
10387 pub const fn const_default() -> Self {
10388 Self {
10389 public_key: None,
10390 weight: None,
10391 }
10392 }
10393 #[doc(hidden)]
10394 pub fn default_instance() -> &'static Self {
10395 static DEFAULT: super::MultisigMember = super::MultisigMember::const_default();
10396 &DEFAULT
10397 }
10398 pub fn public_key(&self) -> &super::MultisigMemberPublicKey {
10400 self.public_key
10401 .as_ref()
10402 .map(|field| field as _)
10403 .unwrap_or_else(|| {
10404 super::MultisigMemberPublicKey::default_instance() as _
10405 })
10406 }
10407 pub fn public_key_opt_mut(
10409 &mut self,
10410 ) -> Option<&mut super::MultisigMemberPublicKey> {
10411 self.public_key.as_mut().map(|field| field as _)
10412 }
10413 pub fn public_key_mut(&mut self) -> &mut super::MultisigMemberPublicKey {
10416 self.public_key.get_or_insert_default()
10417 }
10418 pub fn public_key_opt(&self) -> Option<&super::MultisigMemberPublicKey> {
10420 self.public_key.as_ref().map(|field| field as _)
10421 }
10422 pub fn set_public_key<T: Into<super::MultisigMemberPublicKey>>(
10424 &mut self,
10425 field: T,
10426 ) {
10427 self.public_key = Some(field.into().into());
10428 }
10429 pub fn with_public_key<T: Into<super::MultisigMemberPublicKey>>(
10431 mut self,
10432 field: T,
10433 ) -> Self {
10434 self.set_public_key(field.into());
10435 self
10436 }
10437 pub fn weight_opt_mut(&mut self) -> Option<&mut u32> {
10439 self.weight.as_mut().map(|field| field as _)
10440 }
10441 pub fn weight_mut(&mut self) -> &mut u32 {
10444 self.weight.get_or_insert_default()
10445 }
10446 pub fn weight_opt(&self) -> Option<u32> {
10448 self.weight.as_ref().map(|field| *field)
10449 }
10450 pub fn set_weight(&mut self, field: u32) {
10452 self.weight = Some(field);
10453 }
10454 pub fn with_weight(mut self, field: u32) -> Self {
10456 self.set_weight(field);
10457 self
10458 }
10459 }
10460 impl super::MultisigMemberPublicKey {
10461 pub const fn const_default() -> Self {
10462 Self {
10463 scheme: None,
10464 public_key: None,
10465 zklogin: None,
10466 }
10467 }
10468 #[doc(hidden)]
10469 pub fn default_instance() -> &'static Self {
10470 static DEFAULT: super::MultisigMemberPublicKey = super::MultisigMemberPublicKey::const_default();
10471 &DEFAULT
10472 }
10473 pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
10475 self.set_scheme(field.into());
10476 self
10477 }
10478 pub fn public_key_opt(&self) -> Option<&[u8]> {
10480 self.public_key.as_ref().map(|field| field as _)
10481 }
10482 pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10484 self.public_key = Some(field.into().into());
10485 }
10486 pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
10488 mut self,
10489 field: T,
10490 ) -> Self {
10491 self.set_public_key(field.into());
10492 self
10493 }
10494 pub fn zklogin(&self) -> &super::ZkLoginPublicIdentifier {
10496 self.zklogin
10497 .as_ref()
10498 .map(|field| field as _)
10499 .unwrap_or_else(|| {
10500 super::ZkLoginPublicIdentifier::default_instance() as _
10501 })
10502 }
10503 pub fn zklogin_opt_mut(
10505 &mut self,
10506 ) -> Option<&mut super::ZkLoginPublicIdentifier> {
10507 self.zklogin.as_mut().map(|field| field as _)
10508 }
10509 pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginPublicIdentifier {
10512 self.zklogin.get_or_insert_default()
10513 }
10514 pub fn zklogin_opt(&self) -> Option<&super::ZkLoginPublicIdentifier> {
10516 self.zklogin.as_ref().map(|field| field as _)
10517 }
10518 pub fn set_zklogin<T: Into<super::ZkLoginPublicIdentifier>>(
10520 &mut self,
10521 field: T,
10522 ) {
10523 self.zklogin = Some(field.into().into());
10524 }
10525 pub fn with_zklogin<T: Into<super::ZkLoginPublicIdentifier>>(
10527 mut self,
10528 field: T,
10529 ) -> Self {
10530 self.set_zklogin(field.into());
10531 self
10532 }
10533 }
10534 impl super::MultisigMemberSignature {
10535 pub const fn const_default() -> Self {
10536 Self {
10537 scheme: None,
10538 signature: None,
10539 zklogin: None,
10540 passkey: None,
10541 }
10542 }
10543 #[doc(hidden)]
10544 pub fn default_instance() -> &'static Self {
10545 static DEFAULT: super::MultisigMemberSignature = super::MultisigMemberSignature::const_default();
10546 &DEFAULT
10547 }
10548 pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
10550 self.set_scheme(field.into());
10551 self
10552 }
10553 pub fn signature_opt(&self) -> Option<&[u8]> {
10555 self.signature.as_ref().map(|field| field as _)
10556 }
10557 pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10559 self.signature = Some(field.into().into());
10560 }
10561 pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
10563 mut self,
10564 field: T,
10565 ) -> Self {
10566 self.set_signature(field.into());
10567 self
10568 }
10569 pub fn zklogin(&self) -> &super::ZkLoginAuthenticator {
10571 self.zklogin
10572 .as_ref()
10573 .map(|field| field as _)
10574 .unwrap_or_else(|| super::ZkLoginAuthenticator::default_instance() as _)
10575 }
10576 pub fn zklogin_opt_mut(&mut self) -> Option<&mut super::ZkLoginAuthenticator> {
10578 self.zklogin.as_mut().map(|field| field as _)
10579 }
10580 pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginAuthenticator {
10583 self.zklogin.get_or_insert_default()
10584 }
10585 pub fn zklogin_opt(&self) -> Option<&super::ZkLoginAuthenticator> {
10587 self.zklogin.as_ref().map(|field| field as _)
10588 }
10589 pub fn set_zklogin<T: Into<super::ZkLoginAuthenticator>>(&mut self, field: T) {
10591 self.zklogin = Some(field.into().into());
10592 }
10593 pub fn with_zklogin<T: Into<super::ZkLoginAuthenticator>>(
10595 mut self,
10596 field: T,
10597 ) -> Self {
10598 self.set_zklogin(field.into());
10599 self
10600 }
10601 pub fn passkey(&self) -> &super::PasskeyAuthenticator {
10603 self.passkey
10604 .as_ref()
10605 .map(|field| field as _)
10606 .unwrap_or_else(|| super::PasskeyAuthenticator::default_instance() as _)
10607 }
10608 pub fn passkey_opt_mut(&mut self) -> Option<&mut super::PasskeyAuthenticator> {
10610 self.passkey.as_mut().map(|field| field as _)
10611 }
10612 pub fn passkey_mut(&mut self) -> &mut super::PasskeyAuthenticator {
10615 self.passkey.get_or_insert_default()
10616 }
10617 pub fn passkey_opt(&self) -> Option<&super::PasskeyAuthenticator> {
10619 self.passkey.as_ref().map(|field| field as _)
10620 }
10621 pub fn set_passkey<T: Into<super::PasskeyAuthenticator>>(&mut self, field: T) {
10623 self.passkey = Some(field.into().into());
10624 }
10625 pub fn with_passkey<T: Into<super::PasskeyAuthenticator>>(
10627 mut self,
10628 field: T,
10629 ) -> Self {
10630 self.set_passkey(field.into());
10631 self
10632 }
10633 }
10634 impl super::NameRecord {
10635 pub const fn const_default() -> Self {
10636 Self {
10637 id: None,
10638 name: None,
10639 registration_nft_id: None,
10640 expiration_timestamp: None,
10641 target_address: None,
10642 data: std::collections::BTreeMap::new(),
10643 }
10644 }
10645 #[doc(hidden)]
10646 pub fn default_instance() -> &'static Self {
10647 static DEFAULT: super::NameRecord = super::NameRecord::const_default();
10648 &DEFAULT
10649 }
10650 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
10652 self.id.as_mut().map(|field| field as _)
10653 }
10654 pub fn id_mut(&mut self) -> &mut String {
10657 self.id.get_or_insert_default()
10658 }
10659 pub fn id_opt(&self) -> Option<&str> {
10661 self.id.as_ref().map(|field| field as _)
10662 }
10663 pub fn set_id<T: Into<String>>(&mut self, field: T) {
10665 self.id = Some(field.into().into());
10666 }
10667 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
10669 self.set_id(field.into());
10670 self
10671 }
10672 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
10674 self.name.as_mut().map(|field| field as _)
10675 }
10676 pub fn name_mut(&mut self) -> &mut String {
10679 self.name.get_or_insert_default()
10680 }
10681 pub fn name_opt(&self) -> Option<&str> {
10683 self.name.as_ref().map(|field| field as _)
10684 }
10685 pub fn set_name<T: Into<String>>(&mut self, field: T) {
10687 self.name = Some(field.into().into());
10688 }
10689 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
10691 self.set_name(field.into());
10692 self
10693 }
10694 pub fn registration_nft_id_opt_mut(&mut self) -> Option<&mut String> {
10696 self.registration_nft_id.as_mut().map(|field| field as _)
10697 }
10698 pub fn registration_nft_id_mut(&mut self) -> &mut String {
10701 self.registration_nft_id.get_or_insert_default()
10702 }
10703 pub fn registration_nft_id_opt(&self) -> Option<&str> {
10705 self.registration_nft_id.as_ref().map(|field| field as _)
10706 }
10707 pub fn set_registration_nft_id<T: Into<String>>(&mut self, field: T) {
10709 self.registration_nft_id = Some(field.into().into());
10710 }
10711 pub fn with_registration_nft_id<T: Into<String>>(mut self, field: T) -> Self {
10713 self.set_registration_nft_id(field.into());
10714 self
10715 }
10716 pub fn expiration_timestamp_opt_mut(
10718 &mut self,
10719 ) -> Option<&mut ::prost_types::Timestamp> {
10720 self.expiration_timestamp.as_mut().map(|field| field as _)
10721 }
10722 pub fn expiration_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
10725 self.expiration_timestamp.get_or_insert_default()
10726 }
10727 pub fn expiration_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
10729 self.expiration_timestamp.as_ref().map(|field| field as _)
10730 }
10731 pub fn set_expiration_timestamp<T: Into<::prost_types::Timestamp>>(
10733 &mut self,
10734 field: T,
10735 ) {
10736 self.expiration_timestamp = Some(field.into().into());
10737 }
10738 pub fn with_expiration_timestamp<T: Into<::prost_types::Timestamp>>(
10740 mut self,
10741 field: T,
10742 ) -> Self {
10743 self.set_expiration_timestamp(field.into());
10744 self
10745 }
10746 pub fn target_address_opt_mut(&mut self) -> Option<&mut String> {
10748 self.target_address.as_mut().map(|field| field as _)
10749 }
10750 pub fn target_address_mut(&mut self) -> &mut String {
10753 self.target_address.get_or_insert_default()
10754 }
10755 pub fn target_address_opt(&self) -> Option<&str> {
10757 self.target_address.as_ref().map(|field| field as _)
10758 }
10759 pub fn set_target_address<T: Into<String>>(&mut self, field: T) {
10761 self.target_address = Some(field.into().into());
10762 }
10763 pub fn with_target_address<T: Into<String>>(mut self, field: T) -> Self {
10765 self.set_target_address(field.into());
10766 self
10767 }
10768 pub fn data(&self) -> &::std::collections::BTreeMap<String, String> {
10770 &self.data
10771 }
10772 pub fn data_mut(&mut self) -> &mut ::std::collections::BTreeMap<String, String> {
10775 &mut self.data
10776 }
10777 pub fn set_data(&mut self, field: ::std::collections::BTreeMap<String, String>) {
10779 self.data = field;
10780 }
10781 pub fn with_data(
10783 mut self,
10784 field: ::std::collections::BTreeMap<String, String>,
10785 ) -> Self {
10786 self.set_data(field);
10787 self
10788 }
10789 }
10790 impl super::Object {
10791 pub const fn const_default() -> Self {
10792 Self {
10793 bcs: None,
10794 object_id: None,
10795 version: None,
10796 digest: None,
10797 owner: None,
10798 object_type: None,
10799 has_public_transfer: None,
10800 contents: None,
10801 package: None,
10802 previous_transaction: None,
10803 storage_rebate: None,
10804 json: None,
10805 balance: None,
10806 display: None,
10807 }
10808 }
10809 #[doc(hidden)]
10810 pub fn default_instance() -> &'static Self {
10811 static DEFAULT: super::Object = super::Object::const_default();
10812 &DEFAULT
10813 }
10814 pub fn bcs(&self) -> &super::Bcs {
10816 self.bcs
10817 .as_ref()
10818 .map(|field| field as _)
10819 .unwrap_or_else(|| super::Bcs::default_instance() as _)
10820 }
10821 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
10823 self.bcs.as_mut().map(|field| field as _)
10824 }
10825 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
10828 self.bcs.get_or_insert_default()
10829 }
10830 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
10832 self.bcs.as_ref().map(|field| field as _)
10833 }
10834 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
10836 self.bcs = Some(field.into().into());
10837 }
10838 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
10840 self.set_bcs(field.into());
10841 self
10842 }
10843 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
10845 self.object_id.as_mut().map(|field| field as _)
10846 }
10847 pub fn object_id_mut(&mut self) -> &mut String {
10850 self.object_id.get_or_insert_default()
10851 }
10852 pub fn object_id_opt(&self) -> Option<&str> {
10854 self.object_id.as_ref().map(|field| field as _)
10855 }
10856 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
10858 self.object_id = Some(field.into().into());
10859 }
10860 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
10862 self.set_object_id(field.into());
10863 self
10864 }
10865 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
10867 self.version.as_mut().map(|field| field as _)
10868 }
10869 pub fn version_mut(&mut self) -> &mut u64 {
10872 self.version.get_or_insert_default()
10873 }
10874 pub fn version_opt(&self) -> Option<u64> {
10876 self.version.as_ref().map(|field| *field)
10877 }
10878 pub fn set_version(&mut self, field: u64) {
10880 self.version = Some(field);
10881 }
10882 pub fn with_version(mut self, field: u64) -> Self {
10884 self.set_version(field);
10885 self
10886 }
10887 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
10889 self.digest.as_mut().map(|field| field as _)
10890 }
10891 pub fn digest_mut(&mut self) -> &mut String {
10894 self.digest.get_or_insert_default()
10895 }
10896 pub fn digest_opt(&self) -> Option<&str> {
10898 self.digest.as_ref().map(|field| field as _)
10899 }
10900 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
10902 self.digest = Some(field.into().into());
10903 }
10904 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
10906 self.set_digest(field.into());
10907 self
10908 }
10909 pub fn owner(&self) -> &super::Owner {
10911 self.owner
10912 .as_ref()
10913 .map(|field| field as _)
10914 .unwrap_or_else(|| super::Owner::default_instance() as _)
10915 }
10916 pub fn owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
10918 self.owner.as_mut().map(|field| field as _)
10919 }
10920 pub fn owner_mut(&mut self) -> &mut super::Owner {
10923 self.owner.get_or_insert_default()
10924 }
10925 pub fn owner_opt(&self) -> Option<&super::Owner> {
10927 self.owner.as_ref().map(|field| field as _)
10928 }
10929 pub fn set_owner<T: Into<super::Owner>>(&mut self, field: T) {
10931 self.owner = Some(field.into().into());
10932 }
10933 pub fn with_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
10935 self.set_owner(field.into());
10936 self
10937 }
10938 pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
10940 self.object_type.as_mut().map(|field| field as _)
10941 }
10942 pub fn object_type_mut(&mut self) -> &mut String {
10945 self.object_type.get_or_insert_default()
10946 }
10947 pub fn object_type_opt(&self) -> Option<&str> {
10949 self.object_type.as_ref().map(|field| field as _)
10950 }
10951 pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
10953 self.object_type = Some(field.into().into());
10954 }
10955 pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
10957 self.set_object_type(field.into());
10958 self
10959 }
10960 pub fn has_public_transfer_opt_mut(&mut self) -> Option<&mut bool> {
10962 self.has_public_transfer.as_mut().map(|field| field as _)
10963 }
10964 pub fn has_public_transfer_mut(&mut self) -> &mut bool {
10967 self.has_public_transfer.get_or_insert_default()
10968 }
10969 pub fn has_public_transfer_opt(&self) -> Option<bool> {
10971 self.has_public_transfer.as_ref().map(|field| *field)
10972 }
10973 pub fn set_has_public_transfer(&mut self, field: bool) {
10975 self.has_public_transfer = Some(field);
10976 }
10977 pub fn with_has_public_transfer(mut self, field: bool) -> Self {
10979 self.set_has_public_transfer(field);
10980 self
10981 }
10982 pub fn contents(&self) -> &super::Bcs {
10984 self.contents
10985 .as_ref()
10986 .map(|field| field as _)
10987 .unwrap_or_else(|| super::Bcs::default_instance() as _)
10988 }
10989 pub fn contents_opt_mut(&mut self) -> Option<&mut super::Bcs> {
10991 self.contents.as_mut().map(|field| field as _)
10992 }
10993 pub fn contents_mut(&mut self) -> &mut super::Bcs {
10996 self.contents.get_or_insert_default()
10997 }
10998 pub fn contents_opt(&self) -> Option<&super::Bcs> {
11000 self.contents.as_ref().map(|field| field as _)
11001 }
11002 pub fn set_contents<T: Into<super::Bcs>>(&mut self, field: T) {
11004 self.contents = Some(field.into().into());
11005 }
11006 pub fn with_contents<T: Into<super::Bcs>>(mut self, field: T) -> Self {
11008 self.set_contents(field.into());
11009 self
11010 }
11011 pub fn package(&self) -> &super::Package {
11013 self.package
11014 .as_ref()
11015 .map(|field| field as _)
11016 .unwrap_or_else(|| super::Package::default_instance() as _)
11017 }
11018 pub fn package_opt_mut(&mut self) -> Option<&mut super::Package> {
11020 self.package.as_mut().map(|field| field as _)
11021 }
11022 pub fn package_mut(&mut self) -> &mut super::Package {
11025 self.package.get_or_insert_default()
11026 }
11027 pub fn package_opt(&self) -> Option<&super::Package> {
11029 self.package.as_ref().map(|field| field as _)
11030 }
11031 pub fn set_package<T: Into<super::Package>>(&mut self, field: T) {
11033 self.package = Some(field.into().into());
11034 }
11035 pub fn with_package<T: Into<super::Package>>(mut self, field: T) -> Self {
11037 self.set_package(field.into());
11038 self
11039 }
11040 pub fn previous_transaction_opt_mut(&mut self) -> Option<&mut String> {
11042 self.previous_transaction.as_mut().map(|field| field as _)
11043 }
11044 pub fn previous_transaction_mut(&mut self) -> &mut String {
11047 self.previous_transaction.get_or_insert_default()
11048 }
11049 pub fn previous_transaction_opt(&self) -> Option<&str> {
11051 self.previous_transaction.as_ref().map(|field| field as _)
11052 }
11053 pub fn set_previous_transaction<T: Into<String>>(&mut self, field: T) {
11055 self.previous_transaction = Some(field.into().into());
11056 }
11057 pub fn with_previous_transaction<T: Into<String>>(mut self, field: T) -> Self {
11059 self.set_previous_transaction(field.into());
11060 self
11061 }
11062 pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
11064 self.storage_rebate.as_mut().map(|field| field as _)
11065 }
11066 pub fn storage_rebate_mut(&mut self) -> &mut u64 {
11069 self.storage_rebate.get_or_insert_default()
11070 }
11071 pub fn storage_rebate_opt(&self) -> Option<u64> {
11073 self.storage_rebate.as_ref().map(|field| *field)
11074 }
11075 pub fn set_storage_rebate(&mut self, field: u64) {
11077 self.storage_rebate = Some(field);
11078 }
11079 pub fn with_storage_rebate(mut self, field: u64) -> Self {
11081 self.set_storage_rebate(field);
11082 self
11083 }
11084 pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
11086 self.json.as_mut().map(|field| field as _)
11087 }
11088 pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
11091 self.json.get_or_insert_default()
11092 }
11093 pub fn json_opt(&self) -> Option<&::prost_types::Value> {
11095 self.json.as_ref().map(|field| field as _)
11096 }
11097 pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
11099 self.json = Some(field.into().into());
11100 }
11101 pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
11103 self.set_json(field.into());
11104 self
11105 }
11106 pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
11108 self.balance.as_mut().map(|field| field as _)
11109 }
11110 pub fn balance_mut(&mut self) -> &mut u64 {
11113 self.balance.get_or_insert_default()
11114 }
11115 pub fn balance_opt(&self) -> Option<u64> {
11117 self.balance.as_ref().map(|field| *field)
11118 }
11119 pub fn set_balance(&mut self, field: u64) {
11121 self.balance = Some(field);
11122 }
11123 pub fn with_balance(mut self, field: u64) -> Self {
11125 self.set_balance(field);
11126 self
11127 }
11128 pub fn display(&self) -> &super::Display {
11130 self.display
11131 .as_ref()
11132 .map(|field| field as _)
11133 .unwrap_or_else(|| super::Display::default_instance() as _)
11134 }
11135 pub fn display_opt_mut(&mut self) -> Option<&mut super::Display> {
11137 self.display.as_mut().map(|field| field as _)
11138 }
11139 pub fn display_mut(&mut self) -> &mut super::Display {
11142 self.display.get_or_insert_default()
11143 }
11144 pub fn display_opt(&self) -> Option<&super::Display> {
11146 self.display.as_ref().map(|field| field as _)
11147 }
11148 pub fn set_display<T: Into<super::Display>>(&mut self, field: T) {
11150 self.display = Some(field.into().into());
11151 }
11152 pub fn with_display<T: Into<super::Display>>(mut self, field: T) -> Self {
11154 self.set_display(field.into());
11155 self
11156 }
11157 }
11158 impl super::ObjectReference {
11159 pub const fn const_default() -> Self {
11160 Self {
11161 object_id: None,
11162 version: None,
11163 digest: None,
11164 }
11165 }
11166 #[doc(hidden)]
11167 pub fn default_instance() -> &'static Self {
11168 static DEFAULT: super::ObjectReference = super::ObjectReference::const_default();
11169 &DEFAULT
11170 }
11171 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
11173 self.object_id.as_mut().map(|field| field as _)
11174 }
11175 pub fn object_id_mut(&mut self) -> &mut String {
11178 self.object_id.get_or_insert_default()
11179 }
11180 pub fn object_id_opt(&self) -> Option<&str> {
11182 self.object_id.as_ref().map(|field| field as _)
11183 }
11184 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
11186 self.object_id = Some(field.into().into());
11187 }
11188 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
11190 self.set_object_id(field.into());
11191 self
11192 }
11193 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
11195 self.version.as_mut().map(|field| field as _)
11196 }
11197 pub fn version_mut(&mut self) -> &mut u64 {
11200 self.version.get_or_insert_default()
11201 }
11202 pub fn version_opt(&self) -> Option<u64> {
11204 self.version.as_ref().map(|field| *field)
11205 }
11206 pub fn set_version(&mut self, field: u64) {
11208 self.version = Some(field);
11209 }
11210 pub fn with_version(mut self, field: u64) -> Self {
11212 self.set_version(field);
11213 self
11214 }
11215 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
11217 self.digest.as_mut().map(|field| field as _)
11218 }
11219 pub fn digest_mut(&mut self) -> &mut String {
11222 self.digest.get_or_insert_default()
11223 }
11224 pub fn digest_opt(&self) -> Option<&str> {
11226 self.digest.as_ref().map(|field| field as _)
11227 }
11228 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
11230 self.digest = Some(field.into().into());
11231 }
11232 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
11234 self.set_digest(field.into());
11235 self
11236 }
11237 }
11238 impl super::ObjectSet {
11239 pub const fn const_default() -> Self {
11240 Self { objects: Vec::new() }
11241 }
11242 #[doc(hidden)]
11243 pub fn default_instance() -> &'static Self {
11244 static DEFAULT: super::ObjectSet = super::ObjectSet::const_default();
11245 &DEFAULT
11246 }
11247 pub fn objects(&self) -> &[super::Object] {
11249 &self.objects
11250 }
11251 pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
11254 &mut self.objects
11255 }
11256 pub fn set_objects(&mut self, field: Vec<super::Object>) {
11258 self.objects = field;
11259 }
11260 pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
11262 self.set_objects(field);
11263 self
11264 }
11265 }
11266 impl super::OpenSignature {
11267 pub const fn const_default() -> Self {
11268 Self {
11269 reference: None,
11270 body: None,
11271 }
11272 }
11273 #[doc(hidden)]
11274 pub fn default_instance() -> &'static Self {
11275 static DEFAULT: super::OpenSignature = super::OpenSignature::const_default();
11276 &DEFAULT
11277 }
11278 pub fn with_reference<T: Into<super::open_signature::Reference>>(
11280 mut self,
11281 field: T,
11282 ) -> Self {
11283 self.set_reference(field.into());
11284 self
11285 }
11286 pub fn body(&self) -> &super::OpenSignatureBody {
11288 self.body
11289 .as_ref()
11290 .map(|field| field as _)
11291 .unwrap_or_else(|| super::OpenSignatureBody::default_instance() as _)
11292 }
11293 pub fn body_opt_mut(&mut self) -> Option<&mut super::OpenSignatureBody> {
11295 self.body.as_mut().map(|field| field as _)
11296 }
11297 pub fn body_mut(&mut self) -> &mut super::OpenSignatureBody {
11300 self.body.get_or_insert_default()
11301 }
11302 pub fn body_opt(&self) -> Option<&super::OpenSignatureBody> {
11304 self.body.as_ref().map(|field| field as _)
11305 }
11306 pub fn set_body<T: Into<super::OpenSignatureBody>>(&mut self, field: T) {
11308 self.body = Some(field.into().into());
11309 }
11310 pub fn with_body<T: Into<super::OpenSignatureBody>>(mut self, field: T) -> Self {
11312 self.set_body(field.into());
11313 self
11314 }
11315 }
11316 impl super::OpenSignatureBody {
11317 pub const fn const_default() -> Self {
11318 Self {
11319 r#type: None,
11320 type_name: None,
11321 type_parameter_instantiation: Vec::new(),
11322 type_parameter: None,
11323 }
11324 }
11325 #[doc(hidden)]
11326 pub fn default_instance() -> &'static Self {
11327 static DEFAULT: super::OpenSignatureBody = super::OpenSignatureBody::const_default();
11328 &DEFAULT
11329 }
11330 pub fn with_type<T: Into<super::open_signature_body::Type>>(
11332 mut self,
11333 field: T,
11334 ) -> Self {
11335 self.set_type(field.into());
11336 self
11337 }
11338 pub fn type_name_opt_mut(&mut self) -> Option<&mut String> {
11340 self.type_name.as_mut().map(|field| field as _)
11341 }
11342 pub fn type_name_mut(&mut self) -> &mut String {
11345 self.type_name.get_or_insert_default()
11346 }
11347 pub fn type_name_opt(&self) -> Option<&str> {
11349 self.type_name.as_ref().map(|field| field as _)
11350 }
11351 pub fn set_type_name<T: Into<String>>(&mut self, field: T) {
11353 self.type_name = Some(field.into().into());
11354 }
11355 pub fn with_type_name<T: Into<String>>(mut self, field: T) -> Self {
11357 self.set_type_name(field.into());
11358 self
11359 }
11360 pub fn type_parameter_instantiation(&self) -> &[super::OpenSignatureBody] {
11362 &self.type_parameter_instantiation
11363 }
11364 pub fn type_parameter_instantiation_mut(
11367 &mut self,
11368 ) -> &mut Vec<super::OpenSignatureBody> {
11369 &mut self.type_parameter_instantiation
11370 }
11371 pub fn set_type_parameter_instantiation(
11373 &mut self,
11374 field: Vec<super::OpenSignatureBody>,
11375 ) {
11376 self.type_parameter_instantiation = field;
11377 }
11378 pub fn with_type_parameter_instantiation(
11380 mut self,
11381 field: Vec<super::OpenSignatureBody>,
11382 ) -> Self {
11383 self.set_type_parameter_instantiation(field);
11384 self
11385 }
11386 pub fn type_parameter_opt_mut(&mut self) -> Option<&mut u32> {
11388 self.type_parameter.as_mut().map(|field| field as _)
11389 }
11390 pub fn type_parameter_mut(&mut self) -> &mut u32 {
11393 self.type_parameter.get_or_insert_default()
11394 }
11395 pub fn type_parameter_opt(&self) -> Option<u32> {
11397 self.type_parameter.as_ref().map(|field| *field)
11398 }
11399 pub fn set_type_parameter(&mut self, field: u32) {
11401 self.type_parameter = Some(field);
11402 }
11403 pub fn with_type_parameter(mut self, field: u32) -> Self {
11405 self.set_type_parameter(field);
11406 self
11407 }
11408 }
11409 impl super::Owner {
11410 pub const fn const_default() -> Self {
11411 Self {
11412 kind: None,
11413 address: None,
11414 version: None,
11415 }
11416 }
11417 #[doc(hidden)]
11418 pub fn default_instance() -> &'static Self {
11419 static DEFAULT: super::Owner = super::Owner::const_default();
11420 &DEFAULT
11421 }
11422 pub fn with_kind<T: Into<super::owner::OwnerKind>>(mut self, field: T) -> Self {
11424 self.set_kind(field.into());
11425 self
11426 }
11427 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
11429 self.address.as_mut().map(|field| field as _)
11430 }
11431 pub fn address_mut(&mut self) -> &mut String {
11434 self.address.get_or_insert_default()
11435 }
11436 pub fn address_opt(&self) -> Option<&str> {
11438 self.address.as_ref().map(|field| field as _)
11439 }
11440 pub fn set_address<T: Into<String>>(&mut self, field: T) {
11442 self.address = Some(field.into().into());
11443 }
11444 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
11446 self.set_address(field.into());
11447 self
11448 }
11449 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
11451 self.version.as_mut().map(|field| field as _)
11452 }
11453 pub fn version_mut(&mut self) -> &mut u64 {
11456 self.version.get_or_insert_default()
11457 }
11458 pub fn version_opt(&self) -> Option<u64> {
11460 self.version.as_ref().map(|field| *field)
11461 }
11462 pub fn set_version(&mut self, field: u64) {
11464 self.version = Some(field);
11465 }
11466 pub fn with_version(mut self, field: u64) -> Self {
11468 self.set_version(field);
11469 self
11470 }
11471 }
11472 impl super::Package {
11473 pub const fn const_default() -> Self {
11474 Self {
11475 storage_id: None,
11476 original_id: None,
11477 version: None,
11478 modules: Vec::new(),
11479 type_origins: Vec::new(),
11480 linkage: Vec::new(),
11481 }
11482 }
11483 #[doc(hidden)]
11484 pub fn default_instance() -> &'static Self {
11485 static DEFAULT: super::Package = super::Package::const_default();
11486 &DEFAULT
11487 }
11488 pub fn storage_id_opt_mut(&mut self) -> Option<&mut String> {
11490 self.storage_id.as_mut().map(|field| field as _)
11491 }
11492 pub fn storage_id_mut(&mut self) -> &mut String {
11495 self.storage_id.get_or_insert_default()
11496 }
11497 pub fn storage_id_opt(&self) -> Option<&str> {
11499 self.storage_id.as_ref().map(|field| field as _)
11500 }
11501 pub fn set_storage_id<T: Into<String>>(&mut self, field: T) {
11503 self.storage_id = Some(field.into().into());
11504 }
11505 pub fn with_storage_id<T: Into<String>>(mut self, field: T) -> Self {
11507 self.set_storage_id(field.into());
11508 self
11509 }
11510 pub fn original_id_opt_mut(&mut self) -> Option<&mut String> {
11512 self.original_id.as_mut().map(|field| field as _)
11513 }
11514 pub fn original_id_mut(&mut self) -> &mut String {
11517 self.original_id.get_or_insert_default()
11518 }
11519 pub fn original_id_opt(&self) -> Option<&str> {
11521 self.original_id.as_ref().map(|field| field as _)
11522 }
11523 pub fn set_original_id<T: Into<String>>(&mut self, field: T) {
11525 self.original_id = Some(field.into().into());
11526 }
11527 pub fn with_original_id<T: Into<String>>(mut self, field: T) -> Self {
11529 self.set_original_id(field.into());
11530 self
11531 }
11532 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
11534 self.version.as_mut().map(|field| field as _)
11535 }
11536 pub fn version_mut(&mut self) -> &mut u64 {
11539 self.version.get_or_insert_default()
11540 }
11541 pub fn version_opt(&self) -> Option<u64> {
11543 self.version.as_ref().map(|field| *field)
11544 }
11545 pub fn set_version(&mut self, field: u64) {
11547 self.version = Some(field);
11548 }
11549 pub fn with_version(mut self, field: u64) -> Self {
11551 self.set_version(field);
11552 self
11553 }
11554 pub fn modules(&self) -> &[super::Module] {
11556 &self.modules
11557 }
11558 pub fn modules_mut(&mut self) -> &mut Vec<super::Module> {
11561 &mut self.modules
11562 }
11563 pub fn set_modules(&mut self, field: Vec<super::Module>) {
11565 self.modules = field;
11566 }
11567 pub fn with_modules(mut self, field: Vec<super::Module>) -> Self {
11569 self.set_modules(field);
11570 self
11571 }
11572 pub fn type_origins(&self) -> &[super::TypeOrigin] {
11574 &self.type_origins
11575 }
11576 pub fn type_origins_mut(&mut self) -> &mut Vec<super::TypeOrigin> {
11579 &mut self.type_origins
11580 }
11581 pub fn set_type_origins(&mut self, field: Vec<super::TypeOrigin>) {
11583 self.type_origins = field;
11584 }
11585 pub fn with_type_origins(mut self, field: Vec<super::TypeOrigin>) -> Self {
11587 self.set_type_origins(field);
11588 self
11589 }
11590 pub fn linkage(&self) -> &[super::Linkage] {
11592 &self.linkage
11593 }
11594 pub fn linkage_mut(&mut self) -> &mut Vec<super::Linkage> {
11597 &mut self.linkage
11598 }
11599 pub fn set_linkage(&mut self, field: Vec<super::Linkage>) {
11601 self.linkage = field;
11602 }
11603 pub fn with_linkage(mut self, field: Vec<super::Linkage>) -> Self {
11605 self.set_linkage(field);
11606 self
11607 }
11608 }
11609 impl super::PackageUpgradeError {
11610 pub const fn const_default() -> Self {
11611 Self {
11612 kind: None,
11613 package_id: None,
11614 digest: None,
11615 policy: None,
11616 ticket_id: None,
11617 }
11618 }
11619 #[doc(hidden)]
11620 pub fn default_instance() -> &'static Self {
11621 static DEFAULT: super::PackageUpgradeError = super::PackageUpgradeError::const_default();
11622 &DEFAULT
11623 }
11624 pub fn with_kind<T: Into<super::package_upgrade_error::PackageUpgradeErrorKind>>(
11626 mut self,
11627 field: T,
11628 ) -> Self {
11629 self.set_kind(field.into());
11630 self
11631 }
11632 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
11634 self.package_id.as_mut().map(|field| field as _)
11635 }
11636 pub fn package_id_mut(&mut self) -> &mut String {
11639 self.package_id.get_or_insert_default()
11640 }
11641 pub fn package_id_opt(&self) -> Option<&str> {
11643 self.package_id.as_ref().map(|field| field as _)
11644 }
11645 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
11647 self.package_id = Some(field.into().into());
11648 }
11649 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
11651 self.set_package_id(field.into());
11652 self
11653 }
11654 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
11656 self.digest.as_mut().map(|field| field as _)
11657 }
11658 pub fn digest_mut(&mut self) -> &mut String {
11661 self.digest.get_or_insert_default()
11662 }
11663 pub fn digest_opt(&self) -> Option<&str> {
11665 self.digest.as_ref().map(|field| field as _)
11666 }
11667 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
11669 self.digest = Some(field.into().into());
11670 }
11671 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
11673 self.set_digest(field.into());
11674 self
11675 }
11676 pub fn policy_opt_mut(&mut self) -> Option<&mut u32> {
11678 self.policy.as_mut().map(|field| field as _)
11679 }
11680 pub fn policy_mut(&mut self) -> &mut u32 {
11683 self.policy.get_or_insert_default()
11684 }
11685 pub fn policy_opt(&self) -> Option<u32> {
11687 self.policy.as_ref().map(|field| *field)
11688 }
11689 pub fn set_policy(&mut self, field: u32) {
11691 self.policy = Some(field);
11692 }
11693 pub fn with_policy(mut self, field: u32) -> Self {
11695 self.set_policy(field);
11696 self
11697 }
11698 pub fn ticket_id_opt_mut(&mut self) -> Option<&mut String> {
11700 self.ticket_id.as_mut().map(|field| field as _)
11701 }
11702 pub fn ticket_id_mut(&mut self) -> &mut String {
11705 self.ticket_id.get_or_insert_default()
11706 }
11707 pub fn ticket_id_opt(&self) -> Option<&str> {
11709 self.ticket_id.as_ref().map(|field| field as _)
11710 }
11711 pub fn set_ticket_id<T: Into<String>>(&mut self, field: T) {
11713 self.ticket_id = Some(field.into().into());
11714 }
11715 pub fn with_ticket_id<T: Into<String>>(mut self, field: T) -> Self {
11717 self.set_ticket_id(field.into());
11718 self
11719 }
11720 }
11721 impl super::PackageVersion {
11722 pub const fn const_default() -> Self {
11723 Self {
11724 package_id: None,
11725 version: None,
11726 }
11727 }
11728 #[doc(hidden)]
11729 pub fn default_instance() -> &'static Self {
11730 static DEFAULT: super::PackageVersion = super::PackageVersion::const_default();
11731 &DEFAULT
11732 }
11733 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
11735 self.package_id.as_mut().map(|field| field as _)
11736 }
11737 pub fn package_id_mut(&mut self) -> &mut String {
11740 self.package_id.get_or_insert_default()
11741 }
11742 pub fn package_id_opt(&self) -> Option<&str> {
11744 self.package_id.as_ref().map(|field| field as _)
11745 }
11746 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
11748 self.package_id = Some(field.into().into());
11749 }
11750 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
11752 self.set_package_id(field.into());
11753 self
11754 }
11755 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
11757 self.version.as_mut().map(|field| field as _)
11758 }
11759 pub fn version_mut(&mut self) -> &mut u64 {
11762 self.version.get_or_insert_default()
11763 }
11764 pub fn version_opt(&self) -> Option<u64> {
11766 self.version.as_ref().map(|field| *field)
11767 }
11768 pub fn set_version(&mut self, field: u64) {
11770 self.version = Some(field);
11771 }
11772 pub fn with_version(mut self, field: u64) -> Self {
11774 self.set_version(field);
11775 self
11776 }
11777 }
11778 impl super::PasskeyAuthenticator {
11779 pub const fn const_default() -> Self {
11780 Self {
11781 authenticator_data: None,
11782 client_data_json: None,
11783 signature: None,
11784 }
11785 }
11786 #[doc(hidden)]
11787 pub fn default_instance() -> &'static Self {
11788 static DEFAULT: super::PasskeyAuthenticator = super::PasskeyAuthenticator::const_default();
11789 &DEFAULT
11790 }
11791 pub fn authenticator_data_opt(&self) -> Option<&[u8]> {
11793 self.authenticator_data.as_ref().map(|field| field as _)
11794 }
11795 pub fn set_authenticator_data<T: Into<::prost::bytes::Bytes>>(
11797 &mut self,
11798 field: T,
11799 ) {
11800 self.authenticator_data = Some(field.into().into());
11801 }
11802 pub fn with_authenticator_data<T: Into<::prost::bytes::Bytes>>(
11804 mut self,
11805 field: T,
11806 ) -> Self {
11807 self.set_authenticator_data(field.into());
11808 self
11809 }
11810 pub fn client_data_json_opt_mut(&mut self) -> Option<&mut String> {
11812 self.client_data_json.as_mut().map(|field| field as _)
11813 }
11814 pub fn client_data_json_mut(&mut self) -> &mut String {
11817 self.client_data_json.get_or_insert_default()
11818 }
11819 pub fn client_data_json_opt(&self) -> Option<&str> {
11821 self.client_data_json.as_ref().map(|field| field as _)
11822 }
11823 pub fn set_client_data_json<T: Into<String>>(&mut self, field: T) {
11825 self.client_data_json = Some(field.into().into());
11826 }
11827 pub fn with_client_data_json<T: Into<String>>(mut self, field: T) -> Self {
11829 self.set_client_data_json(field.into());
11830 self
11831 }
11832 pub fn signature(&self) -> &super::SimpleSignature {
11834 self.signature
11835 .as_ref()
11836 .map(|field| field as _)
11837 .unwrap_or_else(|| super::SimpleSignature::default_instance() as _)
11838 }
11839 pub fn signature_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
11841 self.signature.as_mut().map(|field| field as _)
11842 }
11843 pub fn signature_mut(&mut self) -> &mut super::SimpleSignature {
11846 self.signature.get_or_insert_default()
11847 }
11848 pub fn signature_opt(&self) -> Option<&super::SimpleSignature> {
11850 self.signature.as_ref().map(|field| field as _)
11851 }
11852 pub fn set_signature<T: Into<super::SimpleSignature>>(&mut self, field: T) {
11854 self.signature = Some(field.into().into());
11855 }
11856 pub fn with_signature<T: Into<super::SimpleSignature>>(
11858 mut self,
11859 field: T,
11860 ) -> Self {
11861 self.set_signature(field.into());
11862 self
11863 }
11864 }
11865 impl super::ProgrammableTransaction {
11866 pub const fn const_default() -> Self {
11867 Self {
11868 inputs: Vec::new(),
11869 commands: Vec::new(),
11870 }
11871 }
11872 #[doc(hidden)]
11873 pub fn default_instance() -> &'static Self {
11874 static DEFAULT: super::ProgrammableTransaction = super::ProgrammableTransaction::const_default();
11875 &DEFAULT
11876 }
11877 pub fn inputs(&self) -> &[super::Input] {
11879 &self.inputs
11880 }
11881 pub fn inputs_mut(&mut self) -> &mut Vec<super::Input> {
11884 &mut self.inputs
11885 }
11886 pub fn set_inputs(&mut self, field: Vec<super::Input>) {
11888 self.inputs = field;
11889 }
11890 pub fn with_inputs(mut self, field: Vec<super::Input>) -> Self {
11892 self.set_inputs(field);
11893 self
11894 }
11895 pub fn commands(&self) -> &[super::Command] {
11897 &self.commands
11898 }
11899 pub fn commands_mut(&mut self) -> &mut Vec<super::Command> {
11902 &mut self.commands
11903 }
11904 pub fn set_commands(&mut self, field: Vec<super::Command>) {
11906 self.commands = field;
11907 }
11908 pub fn with_commands(mut self, field: Vec<super::Command>) -> Self {
11910 self.set_commands(field);
11911 self
11912 }
11913 }
11914 impl super::ProtocolConfig {
11915 pub const fn const_default() -> Self {
11916 Self {
11917 protocol_version: None,
11918 feature_flags: std::collections::BTreeMap::new(),
11919 attributes: std::collections::BTreeMap::new(),
11920 }
11921 }
11922 #[doc(hidden)]
11923 pub fn default_instance() -> &'static Self {
11924 static DEFAULT: super::ProtocolConfig = super::ProtocolConfig::const_default();
11925 &DEFAULT
11926 }
11927 pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
11929 self.protocol_version.as_mut().map(|field| field as _)
11930 }
11931 pub fn protocol_version_mut(&mut self) -> &mut u64 {
11934 self.protocol_version.get_or_insert_default()
11935 }
11936 pub fn protocol_version_opt(&self) -> Option<u64> {
11938 self.protocol_version.as_ref().map(|field| *field)
11939 }
11940 pub fn set_protocol_version(&mut self, field: u64) {
11942 self.protocol_version = Some(field);
11943 }
11944 pub fn with_protocol_version(mut self, field: u64) -> Self {
11946 self.set_protocol_version(field);
11947 self
11948 }
11949 pub fn feature_flags(&self) -> &::std::collections::BTreeMap<String, bool> {
11951 &self.feature_flags
11952 }
11953 pub fn feature_flags_mut(
11956 &mut self,
11957 ) -> &mut ::std::collections::BTreeMap<String, bool> {
11958 &mut self.feature_flags
11959 }
11960 pub fn set_feature_flags(
11962 &mut self,
11963 field: ::std::collections::BTreeMap<String, bool>,
11964 ) {
11965 self.feature_flags = field;
11966 }
11967 pub fn with_feature_flags(
11969 mut self,
11970 field: ::std::collections::BTreeMap<String, bool>,
11971 ) -> Self {
11972 self.set_feature_flags(field);
11973 self
11974 }
11975 pub fn attributes(&self) -> &::std::collections::BTreeMap<String, String> {
11977 &self.attributes
11978 }
11979 pub fn attributes_mut(
11982 &mut self,
11983 ) -> &mut ::std::collections::BTreeMap<String, String> {
11984 &mut self.attributes
11985 }
11986 pub fn set_attributes(
11988 &mut self,
11989 field: ::std::collections::BTreeMap<String, String>,
11990 ) {
11991 self.attributes = field;
11992 }
11993 pub fn with_attributes(
11995 mut self,
11996 field: ::std::collections::BTreeMap<String, String>,
11997 ) -> Self {
11998 self.set_attributes(field);
11999 self
12000 }
12001 }
12002 impl super::Publish {
12003 pub const fn const_default() -> Self {
12004 Self {
12005 modules: Vec::new(),
12006 dependencies: Vec::new(),
12007 }
12008 }
12009 #[doc(hidden)]
12010 pub fn default_instance() -> &'static Self {
12011 static DEFAULT: super::Publish = super::Publish::const_default();
12012 &DEFAULT
12013 }
12014 pub fn modules(&self) -> &[::prost::bytes::Bytes] {
12016 &self.modules
12017 }
12018 pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
12021 &mut self.modules
12022 }
12023 pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
12025 self.modules = field;
12026 }
12027 pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
12029 self.set_modules(field);
12030 self
12031 }
12032 pub fn dependencies(&self) -> &[String] {
12034 &self.dependencies
12035 }
12036 pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
12039 &mut self.dependencies
12040 }
12041 pub fn set_dependencies(&mut self, field: Vec<String>) {
12043 self.dependencies = field;
12044 }
12045 pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
12047 self.set_dependencies(field);
12048 self
12049 }
12050 }
12051 impl super::RandomnessStateUpdate {
12052 pub const fn const_default() -> Self {
12053 Self {
12054 epoch: None,
12055 randomness_round: None,
12056 random_bytes: None,
12057 randomness_object_initial_shared_version: None,
12058 }
12059 }
12060 #[doc(hidden)]
12061 pub fn default_instance() -> &'static Self {
12062 static DEFAULT: super::RandomnessStateUpdate = super::RandomnessStateUpdate::const_default();
12063 &DEFAULT
12064 }
12065 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
12067 self.epoch.as_mut().map(|field| field as _)
12068 }
12069 pub fn epoch_mut(&mut self) -> &mut u64 {
12072 self.epoch.get_or_insert_default()
12073 }
12074 pub fn epoch_opt(&self) -> Option<u64> {
12076 self.epoch.as_ref().map(|field| *field)
12077 }
12078 pub fn set_epoch(&mut self, field: u64) {
12080 self.epoch = Some(field);
12081 }
12082 pub fn with_epoch(mut self, field: u64) -> Self {
12084 self.set_epoch(field);
12085 self
12086 }
12087 pub fn randomness_round_opt_mut(&mut self) -> Option<&mut u64> {
12089 self.randomness_round.as_mut().map(|field| field as _)
12090 }
12091 pub fn randomness_round_mut(&mut self) -> &mut u64 {
12094 self.randomness_round.get_or_insert_default()
12095 }
12096 pub fn randomness_round_opt(&self) -> Option<u64> {
12098 self.randomness_round.as_ref().map(|field| *field)
12099 }
12100 pub fn set_randomness_round(&mut self, field: u64) {
12102 self.randomness_round = Some(field);
12103 }
12104 pub fn with_randomness_round(mut self, field: u64) -> Self {
12106 self.set_randomness_round(field);
12107 self
12108 }
12109 pub fn random_bytes_opt(&self) -> Option<&[u8]> {
12111 self.random_bytes.as_ref().map(|field| field as _)
12112 }
12113 pub fn set_random_bytes<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
12115 self.random_bytes = Some(field.into().into());
12116 }
12117 pub fn with_random_bytes<T: Into<::prost::bytes::Bytes>>(
12119 mut self,
12120 field: T,
12121 ) -> Self {
12122 self.set_random_bytes(field.into());
12123 self
12124 }
12125 pub fn randomness_object_initial_shared_version_opt_mut(
12127 &mut self,
12128 ) -> Option<&mut u64> {
12129 self.randomness_object_initial_shared_version
12130 .as_mut()
12131 .map(|field| field as _)
12132 }
12133 pub fn randomness_object_initial_shared_version_mut(&mut self) -> &mut u64 {
12136 self.randomness_object_initial_shared_version.get_or_insert_default()
12137 }
12138 pub fn randomness_object_initial_shared_version_opt(&self) -> Option<u64> {
12140 self.randomness_object_initial_shared_version.as_ref().map(|field| *field)
12141 }
12142 pub fn set_randomness_object_initial_shared_version(&mut self, field: u64) {
12144 self.randomness_object_initial_shared_version = Some(field);
12145 }
12146 pub fn with_randomness_object_initial_shared_version(
12148 mut self,
12149 field: u64,
12150 ) -> Self {
12151 self.set_randomness_object_initial_shared_version(field);
12152 self
12153 }
12154 }
12155 impl super::RegulatedCoinMetadata {
12156 pub const fn const_default() -> Self {
12157 Self {
12158 id: None,
12159 coin_metadata_object: None,
12160 deny_cap_object: None,
12161 allow_global_pause: None,
12162 variant: None,
12163 coin_regulated_state: None,
12164 }
12165 }
12166 #[doc(hidden)]
12167 pub fn default_instance() -> &'static Self {
12168 static DEFAULT: super::RegulatedCoinMetadata = super::RegulatedCoinMetadata::const_default();
12169 &DEFAULT
12170 }
12171 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
12173 self.id.as_mut().map(|field| field as _)
12174 }
12175 pub fn id_mut(&mut self) -> &mut String {
12178 self.id.get_or_insert_default()
12179 }
12180 pub fn id_opt(&self) -> Option<&str> {
12182 self.id.as_ref().map(|field| field as _)
12183 }
12184 pub fn set_id<T: Into<String>>(&mut self, field: T) {
12186 self.id = Some(field.into().into());
12187 }
12188 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
12190 self.set_id(field.into());
12191 self
12192 }
12193 pub fn coin_metadata_object_opt_mut(&mut self) -> Option<&mut String> {
12195 self.coin_metadata_object.as_mut().map(|field| field as _)
12196 }
12197 pub fn coin_metadata_object_mut(&mut self) -> &mut String {
12200 self.coin_metadata_object.get_or_insert_default()
12201 }
12202 pub fn coin_metadata_object_opt(&self) -> Option<&str> {
12204 self.coin_metadata_object.as_ref().map(|field| field as _)
12205 }
12206 pub fn set_coin_metadata_object<T: Into<String>>(&mut self, field: T) {
12208 self.coin_metadata_object = Some(field.into().into());
12209 }
12210 pub fn with_coin_metadata_object<T: Into<String>>(mut self, field: T) -> Self {
12212 self.set_coin_metadata_object(field.into());
12213 self
12214 }
12215 pub fn deny_cap_object_opt_mut(&mut self) -> Option<&mut String> {
12217 self.deny_cap_object.as_mut().map(|field| field as _)
12218 }
12219 pub fn deny_cap_object_mut(&mut self) -> &mut String {
12222 self.deny_cap_object.get_or_insert_default()
12223 }
12224 pub fn deny_cap_object_opt(&self) -> Option<&str> {
12226 self.deny_cap_object.as_ref().map(|field| field as _)
12227 }
12228 pub fn set_deny_cap_object<T: Into<String>>(&mut self, field: T) {
12230 self.deny_cap_object = Some(field.into().into());
12231 }
12232 pub fn with_deny_cap_object<T: Into<String>>(mut self, field: T) -> Self {
12234 self.set_deny_cap_object(field.into());
12235 self
12236 }
12237 pub fn allow_global_pause_opt_mut(&mut self) -> Option<&mut bool> {
12239 self.allow_global_pause.as_mut().map(|field| field as _)
12240 }
12241 pub fn allow_global_pause_mut(&mut self) -> &mut bool {
12244 self.allow_global_pause.get_or_insert_default()
12245 }
12246 pub fn allow_global_pause_opt(&self) -> Option<bool> {
12248 self.allow_global_pause.as_ref().map(|field| *field)
12249 }
12250 pub fn set_allow_global_pause(&mut self, field: bool) {
12252 self.allow_global_pause = Some(field);
12253 }
12254 pub fn with_allow_global_pause(mut self, field: bool) -> Self {
12256 self.set_allow_global_pause(field);
12257 self
12258 }
12259 pub fn variant_opt_mut(&mut self) -> Option<&mut u32> {
12261 self.variant.as_mut().map(|field| field as _)
12262 }
12263 pub fn variant_mut(&mut self) -> &mut u32 {
12266 self.variant.get_or_insert_default()
12267 }
12268 pub fn variant_opt(&self) -> Option<u32> {
12270 self.variant.as_ref().map(|field| *field)
12271 }
12272 pub fn set_variant(&mut self, field: u32) {
12274 self.variant = Some(field);
12275 }
12276 pub fn with_variant(mut self, field: u32) -> Self {
12278 self.set_variant(field);
12279 self
12280 }
12281 pub fn with_coin_regulated_state<
12283 T: Into<super::regulated_coin_metadata::CoinRegulatedState>,
12284 >(mut self, field: T) -> Self {
12285 self.set_coin_regulated_state(field.into());
12286 self
12287 }
12288 }
12289 impl super::ReverseLookupNameRequest {
12290 pub const fn const_default() -> Self {
12291 Self { address: None }
12292 }
12293 #[doc(hidden)]
12294 pub fn default_instance() -> &'static Self {
12295 static DEFAULT: super::ReverseLookupNameRequest = super::ReverseLookupNameRequest::const_default();
12296 &DEFAULT
12297 }
12298 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
12300 self.address.as_mut().map(|field| field as _)
12301 }
12302 pub fn address_mut(&mut self) -> &mut String {
12305 self.address.get_or_insert_default()
12306 }
12307 pub fn address_opt(&self) -> Option<&str> {
12309 self.address.as_ref().map(|field| field as _)
12310 }
12311 pub fn set_address<T: Into<String>>(&mut self, field: T) {
12313 self.address = Some(field.into().into());
12314 }
12315 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
12317 self.set_address(field.into());
12318 self
12319 }
12320 }
12321 impl super::ReverseLookupNameResponse {
12322 pub const fn const_default() -> Self {
12323 Self { record: None }
12324 }
12325 #[doc(hidden)]
12326 pub fn default_instance() -> &'static Self {
12327 static DEFAULT: super::ReverseLookupNameResponse = super::ReverseLookupNameResponse::const_default();
12328 &DEFAULT
12329 }
12330 pub fn record(&self) -> &super::NameRecord {
12332 self.record
12333 .as_ref()
12334 .map(|field| field as _)
12335 .unwrap_or_else(|| super::NameRecord::default_instance() as _)
12336 }
12337 pub fn record_opt_mut(&mut self) -> Option<&mut super::NameRecord> {
12339 self.record.as_mut().map(|field| field as _)
12340 }
12341 pub fn record_mut(&mut self) -> &mut super::NameRecord {
12344 self.record.get_or_insert_default()
12345 }
12346 pub fn record_opt(&self) -> Option<&super::NameRecord> {
12348 self.record.as_ref().map(|field| field as _)
12349 }
12350 pub fn set_record<T: Into<super::NameRecord>>(&mut self, field: T) {
12352 self.record = Some(field.into().into());
12353 }
12354 pub fn with_record<T: Into<super::NameRecord>>(mut self, field: T) -> Self {
12356 self.set_record(field.into());
12357 self
12358 }
12359 }
12360 impl super::SimpleSignature {
12361 pub const fn const_default() -> Self {
12362 Self {
12363 scheme: None,
12364 signature: None,
12365 public_key: None,
12366 }
12367 }
12368 #[doc(hidden)]
12369 pub fn default_instance() -> &'static Self {
12370 static DEFAULT: super::SimpleSignature = super::SimpleSignature::const_default();
12371 &DEFAULT
12372 }
12373 pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
12375 self.set_scheme(field.into());
12376 self
12377 }
12378 pub fn signature_opt(&self) -> Option<&[u8]> {
12380 self.signature.as_ref().map(|field| field as _)
12381 }
12382 pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
12384 self.signature = Some(field.into().into());
12385 }
12386 pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
12388 mut self,
12389 field: T,
12390 ) -> Self {
12391 self.set_signature(field.into());
12392 self
12393 }
12394 pub fn public_key_opt(&self) -> Option<&[u8]> {
12396 self.public_key.as_ref().map(|field| field as _)
12397 }
12398 pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
12400 self.public_key = Some(field.into().into());
12401 }
12402 pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
12404 mut self,
12405 field: T,
12406 ) -> Self {
12407 self.set_public_key(field.into());
12408 self
12409 }
12410 }
12411 impl super::SimulateTransactionRequest {
12412 pub const fn const_default() -> Self {
12413 Self {
12414 transaction: None,
12415 read_mask: None,
12416 checks: None,
12417 do_gas_selection: None,
12418 }
12419 }
12420 #[doc(hidden)]
12421 pub fn default_instance() -> &'static Self {
12422 static DEFAULT: super::SimulateTransactionRequest = super::SimulateTransactionRequest::const_default();
12423 &DEFAULT
12424 }
12425 pub fn transaction(&self) -> &super::Transaction {
12427 self.transaction
12428 .as_ref()
12429 .map(|field| field as _)
12430 .unwrap_or_else(|| super::Transaction::default_instance() as _)
12431 }
12432 pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
12434 self.transaction.as_mut().map(|field| field as _)
12435 }
12436 pub fn transaction_mut(&mut self) -> &mut super::Transaction {
12439 self.transaction.get_or_insert_default()
12440 }
12441 pub fn transaction_opt(&self) -> Option<&super::Transaction> {
12443 self.transaction.as_ref().map(|field| field as _)
12444 }
12445 pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
12447 self.transaction = Some(field.into().into());
12448 }
12449 pub fn with_transaction<T: Into<super::Transaction>>(
12451 mut self,
12452 field: T,
12453 ) -> Self {
12454 self.set_transaction(field.into());
12455 self
12456 }
12457 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
12459 self.read_mask.as_mut().map(|field| field as _)
12460 }
12461 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
12464 self.read_mask.get_or_insert_default()
12465 }
12466 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
12468 self.read_mask.as_ref().map(|field| field as _)
12469 }
12470 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
12472 self.read_mask = Some(field.into().into());
12473 }
12474 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
12476 mut self,
12477 field: T,
12478 ) -> Self {
12479 self.set_read_mask(field.into());
12480 self
12481 }
12482 pub fn with_checks<
12484 T: Into<super::simulate_transaction_request::TransactionChecks>,
12485 >(mut self, field: T) -> Self {
12486 self.set_checks(field.into());
12487 self
12488 }
12489 pub fn do_gas_selection_opt_mut(&mut self) -> Option<&mut bool> {
12491 self.do_gas_selection.as_mut().map(|field| field as _)
12492 }
12493 pub fn do_gas_selection_mut(&mut self) -> &mut bool {
12496 self.do_gas_selection.get_or_insert_default()
12497 }
12498 pub fn do_gas_selection_opt(&self) -> Option<bool> {
12500 self.do_gas_selection.as_ref().map(|field| *field)
12501 }
12502 pub fn set_do_gas_selection(&mut self, field: bool) {
12504 self.do_gas_selection = Some(field);
12505 }
12506 pub fn with_do_gas_selection(mut self, field: bool) -> Self {
12508 self.set_do_gas_selection(field);
12509 self
12510 }
12511 }
12512 impl super::SimulateTransactionResponse {
12513 pub const fn const_default() -> Self {
12514 Self {
12515 transaction: None,
12516 command_outputs: Vec::new(),
12517 suggested_gas_price: None,
12518 }
12519 }
12520 #[doc(hidden)]
12521 pub fn default_instance() -> &'static Self {
12522 static DEFAULT: super::SimulateTransactionResponse = super::SimulateTransactionResponse::const_default();
12523 &DEFAULT
12524 }
12525 pub fn transaction(&self) -> &super::ExecutedTransaction {
12527 self.transaction
12528 .as_ref()
12529 .map(|field| field as _)
12530 .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
12531 }
12532 pub fn transaction_opt_mut(
12534 &mut self,
12535 ) -> Option<&mut super::ExecutedTransaction> {
12536 self.transaction.as_mut().map(|field| field as _)
12537 }
12538 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
12541 self.transaction.get_or_insert_default()
12542 }
12543 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
12545 self.transaction.as_ref().map(|field| field as _)
12546 }
12547 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
12549 &mut self,
12550 field: T,
12551 ) {
12552 self.transaction = Some(field.into().into());
12553 }
12554 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
12556 mut self,
12557 field: T,
12558 ) -> Self {
12559 self.set_transaction(field.into());
12560 self
12561 }
12562 pub fn command_outputs(&self) -> &[super::CommandResult] {
12564 &self.command_outputs
12565 }
12566 pub fn command_outputs_mut(&mut self) -> &mut Vec<super::CommandResult> {
12569 &mut self.command_outputs
12570 }
12571 pub fn set_command_outputs(&mut self, field: Vec<super::CommandResult>) {
12573 self.command_outputs = field;
12574 }
12575 pub fn with_command_outputs(mut self, field: Vec<super::CommandResult>) -> Self {
12577 self.set_command_outputs(field);
12578 self
12579 }
12580 pub fn suggested_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
12582 self.suggested_gas_price.as_mut().map(|field| field as _)
12583 }
12584 pub fn suggested_gas_price_mut(&mut self) -> &mut u64 {
12587 self.suggested_gas_price.get_or_insert_default()
12588 }
12589 pub fn suggested_gas_price_opt(&self) -> Option<u64> {
12591 self.suggested_gas_price.as_ref().map(|field| *field)
12592 }
12593 pub fn set_suggested_gas_price(&mut self, field: u64) {
12595 self.suggested_gas_price = Some(field);
12596 }
12597 pub fn with_suggested_gas_price(mut self, field: u64) -> Self {
12599 self.set_suggested_gas_price(field);
12600 self
12601 }
12602 }
12603 impl super::SizeError {
12604 pub const fn const_default() -> Self {
12605 Self { size: None, max_size: None }
12606 }
12607 #[doc(hidden)]
12608 pub fn default_instance() -> &'static Self {
12609 static DEFAULT: super::SizeError = super::SizeError::const_default();
12610 &DEFAULT
12611 }
12612 pub fn size_opt_mut(&mut self) -> Option<&mut u64> {
12614 self.size.as_mut().map(|field| field as _)
12615 }
12616 pub fn size_mut(&mut self) -> &mut u64 {
12619 self.size.get_or_insert_default()
12620 }
12621 pub fn size_opt(&self) -> Option<u64> {
12623 self.size.as_ref().map(|field| *field)
12624 }
12625 pub fn set_size(&mut self, field: u64) {
12627 self.size = Some(field);
12628 }
12629 pub fn with_size(mut self, field: u64) -> Self {
12631 self.set_size(field);
12632 self
12633 }
12634 pub fn max_size_opt_mut(&mut self) -> Option<&mut u64> {
12636 self.max_size.as_mut().map(|field| field as _)
12637 }
12638 pub fn max_size_mut(&mut self) -> &mut u64 {
12641 self.max_size.get_or_insert_default()
12642 }
12643 pub fn max_size_opt(&self) -> Option<u64> {
12645 self.max_size.as_ref().map(|field| *field)
12646 }
12647 pub fn set_max_size(&mut self, field: u64) {
12649 self.max_size = Some(field);
12650 }
12651 pub fn with_max_size(mut self, field: u64) -> Self {
12653 self.set_max_size(field);
12654 self
12655 }
12656 }
12657 impl super::SplitCoins {
12658 pub const fn const_default() -> Self {
12659 Self {
12660 coin: None,
12661 amounts: Vec::new(),
12662 }
12663 }
12664 #[doc(hidden)]
12665 pub fn default_instance() -> &'static Self {
12666 static DEFAULT: super::SplitCoins = super::SplitCoins::const_default();
12667 &DEFAULT
12668 }
12669 pub fn coin(&self) -> &super::Argument {
12671 self.coin
12672 .as_ref()
12673 .map(|field| field as _)
12674 .unwrap_or_else(|| super::Argument::default_instance() as _)
12675 }
12676 pub fn coin_opt_mut(&mut self) -> Option<&mut super::Argument> {
12678 self.coin.as_mut().map(|field| field as _)
12679 }
12680 pub fn coin_mut(&mut self) -> &mut super::Argument {
12683 self.coin.get_or_insert_default()
12684 }
12685 pub fn coin_opt(&self) -> Option<&super::Argument> {
12687 self.coin.as_ref().map(|field| field as _)
12688 }
12689 pub fn set_coin<T: Into<super::Argument>>(&mut self, field: T) {
12691 self.coin = Some(field.into().into());
12692 }
12693 pub fn with_coin<T: Into<super::Argument>>(mut self, field: T) -> Self {
12695 self.set_coin(field.into());
12696 self
12697 }
12698 pub fn amounts(&self) -> &[super::Argument] {
12700 &self.amounts
12701 }
12702 pub fn amounts_mut(&mut self) -> &mut Vec<super::Argument> {
12705 &mut self.amounts
12706 }
12707 pub fn set_amounts(&mut self, field: Vec<super::Argument>) {
12709 self.amounts = field;
12710 }
12711 pub fn with_amounts(mut self, field: Vec<super::Argument>) -> Self {
12713 self.set_amounts(field);
12714 self
12715 }
12716 }
12717 impl super::StakeSubsidy {
12718 pub const fn const_default() -> Self {
12719 Self {
12720 balance: None,
12721 distribution_counter: None,
12722 current_distribution_amount: None,
12723 stake_subsidy_period_length: None,
12724 stake_subsidy_decrease_rate: None,
12725 extra_fields: None,
12726 }
12727 }
12728 #[doc(hidden)]
12729 pub fn default_instance() -> &'static Self {
12730 static DEFAULT: super::StakeSubsidy = super::StakeSubsidy::const_default();
12731 &DEFAULT
12732 }
12733 pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
12735 self.balance.as_mut().map(|field| field as _)
12736 }
12737 pub fn balance_mut(&mut self) -> &mut u64 {
12740 self.balance.get_or_insert_default()
12741 }
12742 pub fn balance_opt(&self) -> Option<u64> {
12744 self.balance.as_ref().map(|field| *field)
12745 }
12746 pub fn set_balance(&mut self, field: u64) {
12748 self.balance = Some(field);
12749 }
12750 pub fn with_balance(mut self, field: u64) -> Self {
12752 self.set_balance(field);
12753 self
12754 }
12755 pub fn distribution_counter_opt_mut(&mut self) -> Option<&mut u64> {
12757 self.distribution_counter.as_mut().map(|field| field as _)
12758 }
12759 pub fn distribution_counter_mut(&mut self) -> &mut u64 {
12762 self.distribution_counter.get_or_insert_default()
12763 }
12764 pub fn distribution_counter_opt(&self) -> Option<u64> {
12766 self.distribution_counter.as_ref().map(|field| *field)
12767 }
12768 pub fn set_distribution_counter(&mut self, field: u64) {
12770 self.distribution_counter = Some(field);
12771 }
12772 pub fn with_distribution_counter(mut self, field: u64) -> Self {
12774 self.set_distribution_counter(field);
12775 self
12776 }
12777 pub fn current_distribution_amount_opt_mut(&mut self) -> Option<&mut u64> {
12779 self.current_distribution_amount.as_mut().map(|field| field as _)
12780 }
12781 pub fn current_distribution_amount_mut(&mut self) -> &mut u64 {
12784 self.current_distribution_amount.get_or_insert_default()
12785 }
12786 pub fn current_distribution_amount_opt(&self) -> Option<u64> {
12788 self.current_distribution_amount.as_ref().map(|field| *field)
12789 }
12790 pub fn set_current_distribution_amount(&mut self, field: u64) {
12792 self.current_distribution_amount = Some(field);
12793 }
12794 pub fn with_current_distribution_amount(mut self, field: u64) -> Self {
12796 self.set_current_distribution_amount(field);
12797 self
12798 }
12799 pub fn stake_subsidy_period_length_opt_mut(&mut self) -> Option<&mut u64> {
12801 self.stake_subsidy_period_length.as_mut().map(|field| field as _)
12802 }
12803 pub fn stake_subsidy_period_length_mut(&mut self) -> &mut u64 {
12806 self.stake_subsidy_period_length.get_or_insert_default()
12807 }
12808 pub fn stake_subsidy_period_length_opt(&self) -> Option<u64> {
12810 self.stake_subsidy_period_length.as_ref().map(|field| *field)
12811 }
12812 pub fn set_stake_subsidy_period_length(&mut self, field: u64) {
12814 self.stake_subsidy_period_length = Some(field);
12815 }
12816 pub fn with_stake_subsidy_period_length(mut self, field: u64) -> Self {
12818 self.set_stake_subsidy_period_length(field);
12819 self
12820 }
12821 pub fn stake_subsidy_decrease_rate_opt_mut(&mut self) -> Option<&mut u32> {
12823 self.stake_subsidy_decrease_rate.as_mut().map(|field| field as _)
12824 }
12825 pub fn stake_subsidy_decrease_rate_mut(&mut self) -> &mut u32 {
12828 self.stake_subsidy_decrease_rate.get_or_insert_default()
12829 }
12830 pub fn stake_subsidy_decrease_rate_opt(&self) -> Option<u32> {
12832 self.stake_subsidy_decrease_rate.as_ref().map(|field| *field)
12833 }
12834 pub fn set_stake_subsidy_decrease_rate(&mut self, field: u32) {
12836 self.stake_subsidy_decrease_rate = Some(field);
12837 }
12838 pub fn with_stake_subsidy_decrease_rate(mut self, field: u32) -> Self {
12840 self.set_stake_subsidy_decrease_rate(field);
12841 self
12842 }
12843 pub fn extra_fields(&self) -> &super::MoveTable {
12845 self.extra_fields
12846 .as_ref()
12847 .map(|field| field as _)
12848 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
12849 }
12850 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
12852 self.extra_fields.as_mut().map(|field| field as _)
12853 }
12854 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
12857 self.extra_fields.get_or_insert_default()
12858 }
12859 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
12861 self.extra_fields.as_ref().map(|field| field as _)
12862 }
12863 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
12865 self.extra_fields = Some(field.into().into());
12866 }
12867 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
12869 self.set_extra_fields(field.into());
12870 self
12871 }
12872 }
12873 impl super::StakingPool {
12874 pub const fn const_default() -> Self {
12875 Self {
12876 id: None,
12877 activation_epoch: None,
12878 deactivation_epoch: None,
12879 sui_balance: None,
12880 rewards_pool: None,
12881 pool_token_balance: None,
12882 exchange_rates: None,
12883 pending_stake: None,
12884 pending_total_sui_withdraw: None,
12885 pending_pool_token_withdraw: None,
12886 extra_fields: None,
12887 }
12888 }
12889 #[doc(hidden)]
12890 pub fn default_instance() -> &'static Self {
12891 static DEFAULT: super::StakingPool = super::StakingPool::const_default();
12892 &DEFAULT
12893 }
12894 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
12896 self.id.as_mut().map(|field| field as _)
12897 }
12898 pub fn id_mut(&mut self) -> &mut String {
12901 self.id.get_or_insert_default()
12902 }
12903 pub fn id_opt(&self) -> Option<&str> {
12905 self.id.as_ref().map(|field| field as _)
12906 }
12907 pub fn set_id<T: Into<String>>(&mut self, field: T) {
12909 self.id = Some(field.into().into());
12910 }
12911 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
12913 self.set_id(field.into());
12914 self
12915 }
12916 pub fn activation_epoch_opt_mut(&mut self) -> Option<&mut u64> {
12918 self.activation_epoch.as_mut().map(|field| field as _)
12919 }
12920 pub fn activation_epoch_mut(&mut self) -> &mut u64 {
12923 self.activation_epoch.get_or_insert_default()
12924 }
12925 pub fn activation_epoch_opt(&self) -> Option<u64> {
12927 self.activation_epoch.as_ref().map(|field| *field)
12928 }
12929 pub fn set_activation_epoch(&mut self, field: u64) {
12931 self.activation_epoch = Some(field);
12932 }
12933 pub fn with_activation_epoch(mut self, field: u64) -> Self {
12935 self.set_activation_epoch(field);
12936 self
12937 }
12938 pub fn deactivation_epoch_opt_mut(&mut self) -> Option<&mut u64> {
12940 self.deactivation_epoch.as_mut().map(|field| field as _)
12941 }
12942 pub fn deactivation_epoch_mut(&mut self) -> &mut u64 {
12945 self.deactivation_epoch.get_or_insert_default()
12946 }
12947 pub fn deactivation_epoch_opt(&self) -> Option<u64> {
12949 self.deactivation_epoch.as_ref().map(|field| *field)
12950 }
12951 pub fn set_deactivation_epoch(&mut self, field: u64) {
12953 self.deactivation_epoch = Some(field);
12954 }
12955 pub fn with_deactivation_epoch(mut self, field: u64) -> Self {
12957 self.set_deactivation_epoch(field);
12958 self
12959 }
12960 pub fn sui_balance_opt_mut(&mut self) -> Option<&mut u64> {
12962 self.sui_balance.as_mut().map(|field| field as _)
12963 }
12964 pub fn sui_balance_mut(&mut self) -> &mut u64 {
12967 self.sui_balance.get_or_insert_default()
12968 }
12969 pub fn sui_balance_opt(&self) -> Option<u64> {
12971 self.sui_balance.as_ref().map(|field| *field)
12972 }
12973 pub fn set_sui_balance(&mut self, field: u64) {
12975 self.sui_balance = Some(field);
12976 }
12977 pub fn with_sui_balance(mut self, field: u64) -> Self {
12979 self.set_sui_balance(field);
12980 self
12981 }
12982 pub fn rewards_pool_opt_mut(&mut self) -> Option<&mut u64> {
12984 self.rewards_pool.as_mut().map(|field| field as _)
12985 }
12986 pub fn rewards_pool_mut(&mut self) -> &mut u64 {
12989 self.rewards_pool.get_or_insert_default()
12990 }
12991 pub fn rewards_pool_opt(&self) -> Option<u64> {
12993 self.rewards_pool.as_ref().map(|field| *field)
12994 }
12995 pub fn set_rewards_pool(&mut self, field: u64) {
12997 self.rewards_pool = Some(field);
12998 }
12999 pub fn with_rewards_pool(mut self, field: u64) -> Self {
13001 self.set_rewards_pool(field);
13002 self
13003 }
13004 pub fn pool_token_balance_opt_mut(&mut self) -> Option<&mut u64> {
13006 self.pool_token_balance.as_mut().map(|field| field as _)
13007 }
13008 pub fn pool_token_balance_mut(&mut self) -> &mut u64 {
13011 self.pool_token_balance.get_or_insert_default()
13012 }
13013 pub fn pool_token_balance_opt(&self) -> Option<u64> {
13015 self.pool_token_balance.as_ref().map(|field| *field)
13016 }
13017 pub fn set_pool_token_balance(&mut self, field: u64) {
13019 self.pool_token_balance = Some(field);
13020 }
13021 pub fn with_pool_token_balance(mut self, field: u64) -> Self {
13023 self.set_pool_token_balance(field);
13024 self
13025 }
13026 pub fn exchange_rates(&self) -> &super::MoveTable {
13028 self.exchange_rates
13029 .as_ref()
13030 .map(|field| field as _)
13031 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
13032 }
13033 pub fn exchange_rates_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
13035 self.exchange_rates.as_mut().map(|field| field as _)
13036 }
13037 pub fn exchange_rates_mut(&mut self) -> &mut super::MoveTable {
13040 self.exchange_rates.get_or_insert_default()
13041 }
13042 pub fn exchange_rates_opt(&self) -> Option<&super::MoveTable> {
13044 self.exchange_rates.as_ref().map(|field| field as _)
13045 }
13046 pub fn set_exchange_rates<T: Into<super::MoveTable>>(&mut self, field: T) {
13048 self.exchange_rates = Some(field.into().into());
13049 }
13050 pub fn with_exchange_rates<T: Into<super::MoveTable>>(
13052 mut self,
13053 field: T,
13054 ) -> Self {
13055 self.set_exchange_rates(field.into());
13056 self
13057 }
13058 pub fn pending_stake_opt_mut(&mut self) -> Option<&mut u64> {
13060 self.pending_stake.as_mut().map(|field| field as _)
13061 }
13062 pub fn pending_stake_mut(&mut self) -> &mut u64 {
13065 self.pending_stake.get_or_insert_default()
13066 }
13067 pub fn pending_stake_opt(&self) -> Option<u64> {
13069 self.pending_stake.as_ref().map(|field| *field)
13070 }
13071 pub fn set_pending_stake(&mut self, field: u64) {
13073 self.pending_stake = Some(field);
13074 }
13075 pub fn with_pending_stake(mut self, field: u64) -> Self {
13077 self.set_pending_stake(field);
13078 self
13079 }
13080 pub fn pending_total_sui_withdraw_opt_mut(&mut self) -> Option<&mut u64> {
13082 self.pending_total_sui_withdraw.as_mut().map(|field| field as _)
13083 }
13084 pub fn pending_total_sui_withdraw_mut(&mut self) -> &mut u64 {
13087 self.pending_total_sui_withdraw.get_or_insert_default()
13088 }
13089 pub fn pending_total_sui_withdraw_opt(&self) -> Option<u64> {
13091 self.pending_total_sui_withdraw.as_ref().map(|field| *field)
13092 }
13093 pub fn set_pending_total_sui_withdraw(&mut self, field: u64) {
13095 self.pending_total_sui_withdraw = Some(field);
13096 }
13097 pub fn with_pending_total_sui_withdraw(mut self, field: u64) -> Self {
13099 self.set_pending_total_sui_withdraw(field);
13100 self
13101 }
13102 pub fn pending_pool_token_withdraw_opt_mut(&mut self) -> Option<&mut u64> {
13104 self.pending_pool_token_withdraw.as_mut().map(|field| field as _)
13105 }
13106 pub fn pending_pool_token_withdraw_mut(&mut self) -> &mut u64 {
13109 self.pending_pool_token_withdraw.get_or_insert_default()
13110 }
13111 pub fn pending_pool_token_withdraw_opt(&self) -> Option<u64> {
13113 self.pending_pool_token_withdraw.as_ref().map(|field| *field)
13114 }
13115 pub fn set_pending_pool_token_withdraw(&mut self, field: u64) {
13117 self.pending_pool_token_withdraw = Some(field);
13118 }
13119 pub fn with_pending_pool_token_withdraw(mut self, field: u64) -> Self {
13121 self.set_pending_pool_token_withdraw(field);
13122 self
13123 }
13124 pub fn extra_fields(&self) -> &super::MoveTable {
13126 self.extra_fields
13127 .as_ref()
13128 .map(|field| field as _)
13129 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
13130 }
13131 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
13133 self.extra_fields.as_mut().map(|field| field as _)
13134 }
13135 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
13138 self.extra_fields.get_or_insert_default()
13139 }
13140 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
13142 self.extra_fields.as_ref().map(|field| field as _)
13143 }
13144 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
13146 self.extra_fields = Some(field.into().into());
13147 }
13148 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
13150 self.set_extra_fields(field.into());
13151 self
13152 }
13153 }
13154 impl super::StorageFund {
13155 pub const fn const_default() -> Self {
13156 Self {
13157 total_object_storage_rebates: None,
13158 non_refundable_balance: None,
13159 }
13160 }
13161 #[doc(hidden)]
13162 pub fn default_instance() -> &'static Self {
13163 static DEFAULT: super::StorageFund = super::StorageFund::const_default();
13164 &DEFAULT
13165 }
13166 pub fn total_object_storage_rebates_opt_mut(&mut self) -> Option<&mut u64> {
13168 self.total_object_storage_rebates.as_mut().map(|field| field as _)
13169 }
13170 pub fn total_object_storage_rebates_mut(&mut self) -> &mut u64 {
13173 self.total_object_storage_rebates.get_or_insert_default()
13174 }
13175 pub fn total_object_storage_rebates_opt(&self) -> Option<u64> {
13177 self.total_object_storage_rebates.as_ref().map(|field| *field)
13178 }
13179 pub fn set_total_object_storage_rebates(&mut self, field: u64) {
13181 self.total_object_storage_rebates = Some(field);
13182 }
13183 pub fn with_total_object_storage_rebates(mut self, field: u64) -> Self {
13185 self.set_total_object_storage_rebates(field);
13186 self
13187 }
13188 pub fn non_refundable_balance_opt_mut(&mut self) -> Option<&mut u64> {
13190 self.non_refundable_balance.as_mut().map(|field| field as _)
13191 }
13192 pub fn non_refundable_balance_mut(&mut self) -> &mut u64 {
13195 self.non_refundable_balance.get_or_insert_default()
13196 }
13197 pub fn non_refundable_balance_opt(&self) -> Option<u64> {
13199 self.non_refundable_balance.as_ref().map(|field| *field)
13200 }
13201 pub fn set_non_refundable_balance(&mut self, field: u64) {
13203 self.non_refundable_balance = Some(field);
13204 }
13205 pub fn with_non_refundable_balance(mut self, field: u64) -> Self {
13207 self.set_non_refundable_balance(field);
13208 self
13209 }
13210 }
13211 impl super::SubscribeCheckpointsRequest {
13212 pub const fn const_default() -> Self {
13213 Self { read_mask: None }
13214 }
13215 #[doc(hidden)]
13216 pub fn default_instance() -> &'static Self {
13217 static DEFAULT: super::SubscribeCheckpointsRequest = super::SubscribeCheckpointsRequest::const_default();
13218 &DEFAULT
13219 }
13220 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
13222 self.read_mask.as_mut().map(|field| field as _)
13223 }
13224 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
13227 self.read_mask.get_or_insert_default()
13228 }
13229 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
13231 self.read_mask.as_ref().map(|field| field as _)
13232 }
13233 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
13235 self.read_mask = Some(field.into().into());
13236 }
13237 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
13239 mut self,
13240 field: T,
13241 ) -> Self {
13242 self.set_read_mask(field.into());
13243 self
13244 }
13245 }
13246 impl super::SubscribeCheckpointsResponse {
13247 pub const fn const_default() -> Self {
13248 Self {
13249 cursor: None,
13250 checkpoint: None,
13251 }
13252 }
13253 #[doc(hidden)]
13254 pub fn default_instance() -> &'static Self {
13255 static DEFAULT: super::SubscribeCheckpointsResponse = super::SubscribeCheckpointsResponse::const_default();
13256 &DEFAULT
13257 }
13258 pub fn cursor_opt_mut(&mut self) -> Option<&mut u64> {
13260 self.cursor.as_mut().map(|field| field as _)
13261 }
13262 pub fn cursor_mut(&mut self) -> &mut u64 {
13265 self.cursor.get_or_insert_default()
13266 }
13267 pub fn cursor_opt(&self) -> Option<u64> {
13269 self.cursor.as_ref().map(|field| *field)
13270 }
13271 pub fn set_cursor(&mut self, field: u64) {
13273 self.cursor = Some(field);
13274 }
13275 pub fn with_cursor(mut self, field: u64) -> Self {
13277 self.set_cursor(field);
13278 self
13279 }
13280 pub fn checkpoint(&self) -> &super::Checkpoint {
13282 self.checkpoint
13283 .as_ref()
13284 .map(|field| field as _)
13285 .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
13286 }
13287 pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
13289 self.checkpoint.as_mut().map(|field| field as _)
13290 }
13291 pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
13294 self.checkpoint.get_or_insert_default()
13295 }
13296 pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
13298 self.checkpoint.as_ref().map(|field| field as _)
13299 }
13300 pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
13302 self.checkpoint = Some(field.into().into());
13303 }
13304 pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
13306 self.set_checkpoint(field.into());
13307 self
13308 }
13309 }
13310 impl super::SystemPackage {
13311 pub const fn const_default() -> Self {
13312 Self {
13313 version: None,
13314 modules: Vec::new(),
13315 dependencies: Vec::new(),
13316 }
13317 }
13318 #[doc(hidden)]
13319 pub fn default_instance() -> &'static Self {
13320 static DEFAULT: super::SystemPackage = super::SystemPackage::const_default();
13321 &DEFAULT
13322 }
13323 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
13325 self.version.as_mut().map(|field| field as _)
13326 }
13327 pub fn version_mut(&mut self) -> &mut u64 {
13330 self.version.get_or_insert_default()
13331 }
13332 pub fn version_opt(&self) -> Option<u64> {
13334 self.version.as_ref().map(|field| *field)
13335 }
13336 pub fn set_version(&mut self, field: u64) {
13338 self.version = Some(field);
13339 }
13340 pub fn with_version(mut self, field: u64) -> Self {
13342 self.set_version(field);
13343 self
13344 }
13345 pub fn modules(&self) -> &[::prost::bytes::Bytes] {
13347 &self.modules
13348 }
13349 pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
13352 &mut self.modules
13353 }
13354 pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
13356 self.modules = field;
13357 }
13358 pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
13360 self.set_modules(field);
13361 self
13362 }
13363 pub fn dependencies(&self) -> &[String] {
13365 &self.dependencies
13366 }
13367 pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
13370 &mut self.dependencies
13371 }
13372 pub fn set_dependencies(&mut self, field: Vec<String>) {
13374 self.dependencies = field;
13375 }
13376 pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
13378 self.set_dependencies(field);
13379 self
13380 }
13381 }
13382 impl super::SystemParameters {
13383 pub const fn const_default() -> Self {
13384 Self {
13385 epoch_duration_ms: None,
13386 stake_subsidy_start_epoch: None,
13387 min_validator_count: None,
13388 max_validator_count: None,
13389 min_validator_joining_stake: None,
13390 validator_low_stake_threshold: None,
13391 validator_very_low_stake_threshold: None,
13392 validator_low_stake_grace_period: None,
13393 extra_fields: None,
13394 }
13395 }
13396 #[doc(hidden)]
13397 pub fn default_instance() -> &'static Self {
13398 static DEFAULT: super::SystemParameters = super::SystemParameters::const_default();
13399 &DEFAULT
13400 }
13401 pub fn epoch_duration_ms_opt_mut(&mut self) -> Option<&mut u64> {
13403 self.epoch_duration_ms.as_mut().map(|field| field as _)
13404 }
13405 pub fn epoch_duration_ms_mut(&mut self) -> &mut u64 {
13408 self.epoch_duration_ms.get_or_insert_default()
13409 }
13410 pub fn epoch_duration_ms_opt(&self) -> Option<u64> {
13412 self.epoch_duration_ms.as_ref().map(|field| *field)
13413 }
13414 pub fn set_epoch_duration_ms(&mut self, field: u64) {
13416 self.epoch_duration_ms = Some(field);
13417 }
13418 pub fn with_epoch_duration_ms(mut self, field: u64) -> Self {
13420 self.set_epoch_duration_ms(field);
13421 self
13422 }
13423 pub fn stake_subsidy_start_epoch_opt_mut(&mut self) -> Option<&mut u64> {
13425 self.stake_subsidy_start_epoch.as_mut().map(|field| field as _)
13426 }
13427 pub fn stake_subsidy_start_epoch_mut(&mut self) -> &mut u64 {
13430 self.stake_subsidy_start_epoch.get_or_insert_default()
13431 }
13432 pub fn stake_subsidy_start_epoch_opt(&self) -> Option<u64> {
13434 self.stake_subsidy_start_epoch.as_ref().map(|field| *field)
13435 }
13436 pub fn set_stake_subsidy_start_epoch(&mut self, field: u64) {
13438 self.stake_subsidy_start_epoch = Some(field);
13439 }
13440 pub fn with_stake_subsidy_start_epoch(mut self, field: u64) -> Self {
13442 self.set_stake_subsidy_start_epoch(field);
13443 self
13444 }
13445 pub fn min_validator_count_opt_mut(&mut self) -> Option<&mut u64> {
13447 self.min_validator_count.as_mut().map(|field| field as _)
13448 }
13449 pub fn min_validator_count_mut(&mut self) -> &mut u64 {
13452 self.min_validator_count.get_or_insert_default()
13453 }
13454 pub fn min_validator_count_opt(&self) -> Option<u64> {
13456 self.min_validator_count.as_ref().map(|field| *field)
13457 }
13458 pub fn set_min_validator_count(&mut self, field: u64) {
13460 self.min_validator_count = Some(field);
13461 }
13462 pub fn with_min_validator_count(mut self, field: u64) -> Self {
13464 self.set_min_validator_count(field);
13465 self
13466 }
13467 pub fn max_validator_count_opt_mut(&mut self) -> Option<&mut u64> {
13469 self.max_validator_count.as_mut().map(|field| field as _)
13470 }
13471 pub fn max_validator_count_mut(&mut self) -> &mut u64 {
13474 self.max_validator_count.get_or_insert_default()
13475 }
13476 pub fn max_validator_count_opt(&self) -> Option<u64> {
13478 self.max_validator_count.as_ref().map(|field| *field)
13479 }
13480 pub fn set_max_validator_count(&mut self, field: u64) {
13482 self.max_validator_count = Some(field);
13483 }
13484 pub fn with_max_validator_count(mut self, field: u64) -> Self {
13486 self.set_max_validator_count(field);
13487 self
13488 }
13489 pub fn min_validator_joining_stake_opt_mut(&mut self) -> Option<&mut u64> {
13491 self.min_validator_joining_stake.as_mut().map(|field| field as _)
13492 }
13493 pub fn min_validator_joining_stake_mut(&mut self) -> &mut u64 {
13496 self.min_validator_joining_stake.get_or_insert_default()
13497 }
13498 pub fn min_validator_joining_stake_opt(&self) -> Option<u64> {
13500 self.min_validator_joining_stake.as_ref().map(|field| *field)
13501 }
13502 pub fn set_min_validator_joining_stake(&mut self, field: u64) {
13504 self.min_validator_joining_stake = Some(field);
13505 }
13506 pub fn with_min_validator_joining_stake(mut self, field: u64) -> Self {
13508 self.set_min_validator_joining_stake(field);
13509 self
13510 }
13511 pub fn validator_low_stake_threshold_opt_mut(&mut self) -> Option<&mut u64> {
13513 self.validator_low_stake_threshold.as_mut().map(|field| field as _)
13514 }
13515 pub fn validator_low_stake_threshold_mut(&mut self) -> &mut u64 {
13518 self.validator_low_stake_threshold.get_or_insert_default()
13519 }
13520 pub fn validator_low_stake_threshold_opt(&self) -> Option<u64> {
13522 self.validator_low_stake_threshold.as_ref().map(|field| *field)
13523 }
13524 pub fn set_validator_low_stake_threshold(&mut self, field: u64) {
13526 self.validator_low_stake_threshold = Some(field);
13527 }
13528 pub fn with_validator_low_stake_threshold(mut self, field: u64) -> Self {
13530 self.set_validator_low_stake_threshold(field);
13531 self
13532 }
13533 pub fn validator_very_low_stake_threshold_opt_mut(
13535 &mut self,
13536 ) -> Option<&mut u64> {
13537 self.validator_very_low_stake_threshold.as_mut().map(|field| field as _)
13538 }
13539 pub fn validator_very_low_stake_threshold_mut(&mut self) -> &mut u64 {
13542 self.validator_very_low_stake_threshold.get_or_insert_default()
13543 }
13544 pub fn validator_very_low_stake_threshold_opt(&self) -> Option<u64> {
13546 self.validator_very_low_stake_threshold.as_ref().map(|field| *field)
13547 }
13548 pub fn set_validator_very_low_stake_threshold(&mut self, field: u64) {
13550 self.validator_very_low_stake_threshold = Some(field);
13551 }
13552 pub fn with_validator_very_low_stake_threshold(mut self, field: u64) -> Self {
13554 self.set_validator_very_low_stake_threshold(field);
13555 self
13556 }
13557 pub fn validator_low_stake_grace_period_opt_mut(&mut self) -> Option<&mut u64> {
13559 self.validator_low_stake_grace_period.as_mut().map(|field| field as _)
13560 }
13561 pub fn validator_low_stake_grace_period_mut(&mut self) -> &mut u64 {
13564 self.validator_low_stake_grace_period.get_or_insert_default()
13565 }
13566 pub fn validator_low_stake_grace_period_opt(&self) -> Option<u64> {
13568 self.validator_low_stake_grace_period.as_ref().map(|field| *field)
13569 }
13570 pub fn set_validator_low_stake_grace_period(&mut self, field: u64) {
13572 self.validator_low_stake_grace_period = Some(field);
13573 }
13574 pub fn with_validator_low_stake_grace_period(mut self, field: u64) -> Self {
13576 self.set_validator_low_stake_grace_period(field);
13577 self
13578 }
13579 pub fn extra_fields(&self) -> &super::MoveTable {
13581 self.extra_fields
13582 .as_ref()
13583 .map(|field| field as _)
13584 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
13585 }
13586 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
13588 self.extra_fields.as_mut().map(|field| field as _)
13589 }
13590 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
13593 self.extra_fields.get_or_insert_default()
13594 }
13595 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
13597 self.extra_fields.as_ref().map(|field| field as _)
13598 }
13599 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
13601 self.extra_fields = Some(field.into().into());
13602 }
13603 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
13605 self.set_extra_fields(field.into());
13606 self
13607 }
13608 }
13609 impl super::SystemState {
13610 pub const fn const_default() -> Self {
13611 Self {
13612 version: None,
13613 epoch: None,
13614 protocol_version: None,
13615 validators: None,
13616 storage_fund: None,
13617 parameters: None,
13618 reference_gas_price: None,
13619 validator_report_records: Vec::new(),
13620 stake_subsidy: None,
13621 safe_mode: None,
13622 safe_mode_storage_rewards: None,
13623 safe_mode_computation_rewards: None,
13624 safe_mode_storage_rebates: None,
13625 safe_mode_non_refundable_storage_fee: None,
13626 epoch_start_timestamp_ms: None,
13627 extra_fields: None,
13628 }
13629 }
13630 #[doc(hidden)]
13631 pub fn default_instance() -> &'static Self {
13632 static DEFAULT: super::SystemState = super::SystemState::const_default();
13633 &DEFAULT
13634 }
13635 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
13637 self.version.as_mut().map(|field| field as _)
13638 }
13639 pub fn version_mut(&mut self) -> &mut u64 {
13642 self.version.get_or_insert_default()
13643 }
13644 pub fn version_opt(&self) -> Option<u64> {
13646 self.version.as_ref().map(|field| *field)
13647 }
13648 pub fn set_version(&mut self, field: u64) {
13650 self.version = Some(field);
13651 }
13652 pub fn with_version(mut self, field: u64) -> Self {
13654 self.set_version(field);
13655 self
13656 }
13657 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
13659 self.epoch.as_mut().map(|field| field as _)
13660 }
13661 pub fn epoch_mut(&mut self) -> &mut u64 {
13664 self.epoch.get_or_insert_default()
13665 }
13666 pub fn epoch_opt(&self) -> Option<u64> {
13668 self.epoch.as_ref().map(|field| *field)
13669 }
13670 pub fn set_epoch(&mut self, field: u64) {
13672 self.epoch = Some(field);
13673 }
13674 pub fn with_epoch(mut self, field: u64) -> Self {
13676 self.set_epoch(field);
13677 self
13678 }
13679 pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
13681 self.protocol_version.as_mut().map(|field| field as _)
13682 }
13683 pub fn protocol_version_mut(&mut self) -> &mut u64 {
13686 self.protocol_version.get_or_insert_default()
13687 }
13688 pub fn protocol_version_opt(&self) -> Option<u64> {
13690 self.protocol_version.as_ref().map(|field| *field)
13691 }
13692 pub fn set_protocol_version(&mut self, field: u64) {
13694 self.protocol_version = Some(field);
13695 }
13696 pub fn with_protocol_version(mut self, field: u64) -> Self {
13698 self.set_protocol_version(field);
13699 self
13700 }
13701 pub fn validators(&self) -> &super::ValidatorSet {
13703 self.validators
13704 .as_ref()
13705 .map(|field| field as _)
13706 .unwrap_or_else(|| super::ValidatorSet::default_instance() as _)
13707 }
13708 pub fn validators_opt_mut(&mut self) -> Option<&mut super::ValidatorSet> {
13710 self.validators.as_mut().map(|field| field as _)
13711 }
13712 pub fn validators_mut(&mut self) -> &mut super::ValidatorSet {
13715 self.validators.get_or_insert_default()
13716 }
13717 pub fn validators_opt(&self) -> Option<&super::ValidatorSet> {
13719 self.validators.as_ref().map(|field| field as _)
13720 }
13721 pub fn set_validators<T: Into<super::ValidatorSet>>(&mut self, field: T) {
13723 self.validators = Some(field.into().into());
13724 }
13725 pub fn with_validators<T: Into<super::ValidatorSet>>(
13727 mut self,
13728 field: T,
13729 ) -> Self {
13730 self.set_validators(field.into());
13731 self
13732 }
13733 pub fn storage_fund(&self) -> &super::StorageFund {
13735 self.storage_fund
13736 .as_ref()
13737 .map(|field| field as _)
13738 .unwrap_or_else(|| super::StorageFund::default_instance() as _)
13739 }
13740 pub fn storage_fund_opt_mut(&mut self) -> Option<&mut super::StorageFund> {
13742 self.storage_fund.as_mut().map(|field| field as _)
13743 }
13744 pub fn storage_fund_mut(&mut self) -> &mut super::StorageFund {
13747 self.storage_fund.get_or_insert_default()
13748 }
13749 pub fn storage_fund_opt(&self) -> Option<&super::StorageFund> {
13751 self.storage_fund.as_ref().map(|field| field as _)
13752 }
13753 pub fn set_storage_fund<T: Into<super::StorageFund>>(&mut self, field: T) {
13755 self.storage_fund = Some(field.into().into());
13756 }
13757 pub fn with_storage_fund<T: Into<super::StorageFund>>(
13759 mut self,
13760 field: T,
13761 ) -> Self {
13762 self.set_storage_fund(field.into());
13763 self
13764 }
13765 pub fn parameters(&self) -> &super::SystemParameters {
13767 self.parameters
13768 .as_ref()
13769 .map(|field| field as _)
13770 .unwrap_or_else(|| super::SystemParameters::default_instance() as _)
13771 }
13772 pub fn parameters_opt_mut(&mut self) -> Option<&mut super::SystemParameters> {
13774 self.parameters.as_mut().map(|field| field as _)
13775 }
13776 pub fn parameters_mut(&mut self) -> &mut super::SystemParameters {
13779 self.parameters.get_or_insert_default()
13780 }
13781 pub fn parameters_opt(&self) -> Option<&super::SystemParameters> {
13783 self.parameters.as_ref().map(|field| field as _)
13784 }
13785 pub fn set_parameters<T: Into<super::SystemParameters>>(&mut self, field: T) {
13787 self.parameters = Some(field.into().into());
13788 }
13789 pub fn with_parameters<T: Into<super::SystemParameters>>(
13791 mut self,
13792 field: T,
13793 ) -> Self {
13794 self.set_parameters(field.into());
13795 self
13796 }
13797 pub fn reference_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
13799 self.reference_gas_price.as_mut().map(|field| field as _)
13800 }
13801 pub fn reference_gas_price_mut(&mut self) -> &mut u64 {
13804 self.reference_gas_price.get_or_insert_default()
13805 }
13806 pub fn reference_gas_price_opt(&self) -> Option<u64> {
13808 self.reference_gas_price.as_ref().map(|field| *field)
13809 }
13810 pub fn set_reference_gas_price(&mut self, field: u64) {
13812 self.reference_gas_price = Some(field);
13813 }
13814 pub fn with_reference_gas_price(mut self, field: u64) -> Self {
13816 self.set_reference_gas_price(field);
13817 self
13818 }
13819 pub fn validator_report_records(&self) -> &[super::ValidatorReportRecord] {
13821 &self.validator_report_records
13822 }
13823 pub fn validator_report_records_mut(
13826 &mut self,
13827 ) -> &mut Vec<super::ValidatorReportRecord> {
13828 &mut self.validator_report_records
13829 }
13830 pub fn set_validator_report_records(
13832 &mut self,
13833 field: Vec<super::ValidatorReportRecord>,
13834 ) {
13835 self.validator_report_records = field;
13836 }
13837 pub fn with_validator_report_records(
13839 mut self,
13840 field: Vec<super::ValidatorReportRecord>,
13841 ) -> Self {
13842 self.set_validator_report_records(field);
13843 self
13844 }
13845 pub fn stake_subsidy(&self) -> &super::StakeSubsidy {
13847 self.stake_subsidy
13848 .as_ref()
13849 .map(|field| field as _)
13850 .unwrap_or_else(|| super::StakeSubsidy::default_instance() as _)
13851 }
13852 pub fn stake_subsidy_opt_mut(&mut self) -> Option<&mut super::StakeSubsidy> {
13854 self.stake_subsidy.as_mut().map(|field| field as _)
13855 }
13856 pub fn stake_subsidy_mut(&mut self) -> &mut super::StakeSubsidy {
13859 self.stake_subsidy.get_or_insert_default()
13860 }
13861 pub fn stake_subsidy_opt(&self) -> Option<&super::StakeSubsidy> {
13863 self.stake_subsidy.as_ref().map(|field| field as _)
13864 }
13865 pub fn set_stake_subsidy<T: Into<super::StakeSubsidy>>(&mut self, field: T) {
13867 self.stake_subsidy = Some(field.into().into());
13868 }
13869 pub fn with_stake_subsidy<T: Into<super::StakeSubsidy>>(
13871 mut self,
13872 field: T,
13873 ) -> Self {
13874 self.set_stake_subsidy(field.into());
13875 self
13876 }
13877 pub fn safe_mode_opt_mut(&mut self) -> Option<&mut bool> {
13879 self.safe_mode.as_mut().map(|field| field as _)
13880 }
13881 pub fn safe_mode_mut(&mut self) -> &mut bool {
13884 self.safe_mode.get_or_insert_default()
13885 }
13886 pub fn safe_mode_opt(&self) -> Option<bool> {
13888 self.safe_mode.as_ref().map(|field| *field)
13889 }
13890 pub fn set_safe_mode(&mut self, field: bool) {
13892 self.safe_mode = Some(field);
13893 }
13894 pub fn with_safe_mode(mut self, field: bool) -> Self {
13896 self.set_safe_mode(field);
13897 self
13898 }
13899 pub fn safe_mode_storage_rewards_opt_mut(&mut self) -> Option<&mut u64> {
13901 self.safe_mode_storage_rewards.as_mut().map(|field| field as _)
13902 }
13903 pub fn safe_mode_storage_rewards_mut(&mut self) -> &mut u64 {
13906 self.safe_mode_storage_rewards.get_or_insert_default()
13907 }
13908 pub fn safe_mode_storage_rewards_opt(&self) -> Option<u64> {
13910 self.safe_mode_storage_rewards.as_ref().map(|field| *field)
13911 }
13912 pub fn set_safe_mode_storage_rewards(&mut self, field: u64) {
13914 self.safe_mode_storage_rewards = Some(field);
13915 }
13916 pub fn with_safe_mode_storage_rewards(mut self, field: u64) -> Self {
13918 self.set_safe_mode_storage_rewards(field);
13919 self
13920 }
13921 pub fn safe_mode_computation_rewards_opt_mut(&mut self) -> Option<&mut u64> {
13923 self.safe_mode_computation_rewards.as_mut().map(|field| field as _)
13924 }
13925 pub fn safe_mode_computation_rewards_mut(&mut self) -> &mut u64 {
13928 self.safe_mode_computation_rewards.get_or_insert_default()
13929 }
13930 pub fn safe_mode_computation_rewards_opt(&self) -> Option<u64> {
13932 self.safe_mode_computation_rewards.as_ref().map(|field| *field)
13933 }
13934 pub fn set_safe_mode_computation_rewards(&mut self, field: u64) {
13936 self.safe_mode_computation_rewards = Some(field);
13937 }
13938 pub fn with_safe_mode_computation_rewards(mut self, field: u64) -> Self {
13940 self.set_safe_mode_computation_rewards(field);
13941 self
13942 }
13943 pub fn safe_mode_storage_rebates_opt_mut(&mut self) -> Option<&mut u64> {
13945 self.safe_mode_storage_rebates.as_mut().map(|field| field as _)
13946 }
13947 pub fn safe_mode_storage_rebates_mut(&mut self) -> &mut u64 {
13950 self.safe_mode_storage_rebates.get_or_insert_default()
13951 }
13952 pub fn safe_mode_storage_rebates_opt(&self) -> Option<u64> {
13954 self.safe_mode_storage_rebates.as_ref().map(|field| *field)
13955 }
13956 pub fn set_safe_mode_storage_rebates(&mut self, field: u64) {
13958 self.safe_mode_storage_rebates = Some(field);
13959 }
13960 pub fn with_safe_mode_storage_rebates(mut self, field: u64) -> Self {
13962 self.set_safe_mode_storage_rebates(field);
13963 self
13964 }
13965 pub fn safe_mode_non_refundable_storage_fee_opt_mut(
13967 &mut self,
13968 ) -> Option<&mut u64> {
13969 self.safe_mode_non_refundable_storage_fee.as_mut().map(|field| field as _)
13970 }
13971 pub fn safe_mode_non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
13974 self.safe_mode_non_refundable_storage_fee.get_or_insert_default()
13975 }
13976 pub fn safe_mode_non_refundable_storage_fee_opt(&self) -> Option<u64> {
13978 self.safe_mode_non_refundable_storage_fee.as_ref().map(|field| *field)
13979 }
13980 pub fn set_safe_mode_non_refundable_storage_fee(&mut self, field: u64) {
13982 self.safe_mode_non_refundable_storage_fee = Some(field);
13983 }
13984 pub fn with_safe_mode_non_refundable_storage_fee(mut self, field: u64) -> Self {
13986 self.set_safe_mode_non_refundable_storage_fee(field);
13987 self
13988 }
13989 pub fn epoch_start_timestamp_ms_opt_mut(&mut self) -> Option<&mut u64> {
13991 self.epoch_start_timestamp_ms.as_mut().map(|field| field as _)
13992 }
13993 pub fn epoch_start_timestamp_ms_mut(&mut self) -> &mut u64 {
13996 self.epoch_start_timestamp_ms.get_or_insert_default()
13997 }
13998 pub fn epoch_start_timestamp_ms_opt(&self) -> Option<u64> {
14000 self.epoch_start_timestamp_ms.as_ref().map(|field| *field)
14001 }
14002 pub fn set_epoch_start_timestamp_ms(&mut self, field: u64) {
14004 self.epoch_start_timestamp_ms = Some(field);
14005 }
14006 pub fn with_epoch_start_timestamp_ms(mut self, field: u64) -> Self {
14008 self.set_epoch_start_timestamp_ms(field);
14009 self
14010 }
14011 pub fn extra_fields(&self) -> &super::MoveTable {
14013 self.extra_fields
14014 .as_ref()
14015 .map(|field| field as _)
14016 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
14017 }
14018 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
14020 self.extra_fields.as_mut().map(|field| field as _)
14021 }
14022 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
14025 self.extra_fields.get_or_insert_default()
14026 }
14027 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
14029 self.extra_fields.as_ref().map(|field| field as _)
14030 }
14031 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
14033 self.extra_fields = Some(field.into().into());
14034 }
14035 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
14037 self.set_extra_fields(field.into());
14038 self
14039 }
14040 }
14041 impl super::Transaction {
14042 pub const fn const_default() -> Self {
14043 Self {
14044 bcs: None,
14045 digest: None,
14046 version: None,
14047 kind: None,
14048 sender: None,
14049 gas_payment: None,
14050 expiration: None,
14051 }
14052 }
14053 #[doc(hidden)]
14054 pub fn default_instance() -> &'static Self {
14055 static DEFAULT: super::Transaction = super::Transaction::const_default();
14056 &DEFAULT
14057 }
14058 pub fn bcs(&self) -> &super::Bcs {
14060 self.bcs
14061 .as_ref()
14062 .map(|field| field as _)
14063 .unwrap_or_else(|| super::Bcs::default_instance() as _)
14064 }
14065 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
14067 self.bcs.as_mut().map(|field| field as _)
14068 }
14069 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
14072 self.bcs.get_or_insert_default()
14073 }
14074 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
14076 self.bcs.as_ref().map(|field| field as _)
14077 }
14078 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
14080 self.bcs = Some(field.into().into());
14081 }
14082 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
14084 self.set_bcs(field.into());
14085 self
14086 }
14087 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
14089 self.digest.as_mut().map(|field| field as _)
14090 }
14091 pub fn digest_mut(&mut self) -> &mut String {
14094 self.digest.get_or_insert_default()
14095 }
14096 pub fn digest_opt(&self) -> Option<&str> {
14098 self.digest.as_ref().map(|field| field as _)
14099 }
14100 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
14102 self.digest = Some(field.into().into());
14103 }
14104 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
14106 self.set_digest(field.into());
14107 self
14108 }
14109 pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
14111 self.version.as_mut().map(|field| field as _)
14112 }
14113 pub fn version_mut(&mut self) -> &mut i32 {
14116 self.version.get_or_insert_default()
14117 }
14118 pub fn version_opt(&self) -> Option<i32> {
14120 self.version.as_ref().map(|field| *field)
14121 }
14122 pub fn set_version(&mut self, field: i32) {
14124 self.version = Some(field);
14125 }
14126 pub fn with_version(mut self, field: i32) -> Self {
14128 self.set_version(field);
14129 self
14130 }
14131 pub fn kind(&self) -> &super::TransactionKind {
14133 self.kind
14134 .as_ref()
14135 .map(|field| field as _)
14136 .unwrap_or_else(|| super::TransactionKind::default_instance() as _)
14137 }
14138 pub fn kind_opt_mut(&mut self) -> Option<&mut super::TransactionKind> {
14140 self.kind.as_mut().map(|field| field as _)
14141 }
14142 pub fn kind_mut(&mut self) -> &mut super::TransactionKind {
14145 self.kind.get_or_insert_default()
14146 }
14147 pub fn kind_opt(&self) -> Option<&super::TransactionKind> {
14149 self.kind.as_ref().map(|field| field as _)
14150 }
14151 pub fn set_kind<T: Into<super::TransactionKind>>(&mut self, field: T) {
14153 self.kind = Some(field.into().into());
14154 }
14155 pub fn with_kind<T: Into<super::TransactionKind>>(mut self, field: T) -> Self {
14157 self.set_kind(field.into());
14158 self
14159 }
14160 pub fn sender_opt_mut(&mut self) -> Option<&mut String> {
14162 self.sender.as_mut().map(|field| field as _)
14163 }
14164 pub fn sender_mut(&mut self) -> &mut String {
14167 self.sender.get_or_insert_default()
14168 }
14169 pub fn sender_opt(&self) -> Option<&str> {
14171 self.sender.as_ref().map(|field| field as _)
14172 }
14173 pub fn set_sender<T: Into<String>>(&mut self, field: T) {
14175 self.sender = Some(field.into().into());
14176 }
14177 pub fn with_sender<T: Into<String>>(mut self, field: T) -> Self {
14179 self.set_sender(field.into());
14180 self
14181 }
14182 pub fn gas_payment(&self) -> &super::GasPayment {
14184 self.gas_payment
14185 .as_ref()
14186 .map(|field| field as _)
14187 .unwrap_or_else(|| super::GasPayment::default_instance() as _)
14188 }
14189 pub fn gas_payment_opt_mut(&mut self) -> Option<&mut super::GasPayment> {
14191 self.gas_payment.as_mut().map(|field| field as _)
14192 }
14193 pub fn gas_payment_mut(&mut self) -> &mut super::GasPayment {
14196 self.gas_payment.get_or_insert_default()
14197 }
14198 pub fn gas_payment_opt(&self) -> Option<&super::GasPayment> {
14200 self.gas_payment.as_ref().map(|field| field as _)
14201 }
14202 pub fn set_gas_payment<T: Into<super::GasPayment>>(&mut self, field: T) {
14204 self.gas_payment = Some(field.into().into());
14205 }
14206 pub fn with_gas_payment<T: Into<super::GasPayment>>(mut self, field: T) -> Self {
14208 self.set_gas_payment(field.into());
14209 self
14210 }
14211 pub fn expiration(&self) -> &super::TransactionExpiration {
14213 self.expiration
14214 .as_ref()
14215 .map(|field| field as _)
14216 .unwrap_or_else(|| super::TransactionExpiration::default_instance() as _)
14217 }
14218 pub fn expiration_opt_mut(
14220 &mut self,
14221 ) -> Option<&mut super::TransactionExpiration> {
14222 self.expiration.as_mut().map(|field| field as _)
14223 }
14224 pub fn expiration_mut(&mut self) -> &mut super::TransactionExpiration {
14227 self.expiration.get_or_insert_default()
14228 }
14229 pub fn expiration_opt(&self) -> Option<&super::TransactionExpiration> {
14231 self.expiration.as_ref().map(|field| field as _)
14232 }
14233 pub fn set_expiration<T: Into<super::TransactionExpiration>>(
14235 &mut self,
14236 field: T,
14237 ) {
14238 self.expiration = Some(field.into().into());
14239 }
14240 pub fn with_expiration<T: Into<super::TransactionExpiration>>(
14242 mut self,
14243 field: T,
14244 ) -> Self {
14245 self.set_expiration(field.into());
14246 self
14247 }
14248 }
14249 impl super::TransactionEffects {
14250 pub const fn const_default() -> Self {
14251 Self {
14252 bcs: None,
14253 digest: None,
14254 version: None,
14255 status: None,
14256 epoch: None,
14257 gas_used: None,
14258 transaction_digest: None,
14259 gas_object: None,
14260 events_digest: None,
14261 dependencies: Vec::new(),
14262 lamport_version: None,
14263 changed_objects: Vec::new(),
14264 unchanged_consensus_objects: Vec::new(),
14265 auxiliary_data_digest: None,
14266 unchanged_loaded_runtime_objects: Vec::new(),
14267 }
14268 }
14269 #[doc(hidden)]
14270 pub fn default_instance() -> &'static Self {
14271 static DEFAULT: super::TransactionEffects = super::TransactionEffects::const_default();
14272 &DEFAULT
14273 }
14274 pub fn bcs(&self) -> &super::Bcs {
14276 self.bcs
14277 .as_ref()
14278 .map(|field| field as _)
14279 .unwrap_or_else(|| super::Bcs::default_instance() as _)
14280 }
14281 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
14283 self.bcs.as_mut().map(|field| field as _)
14284 }
14285 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
14288 self.bcs.get_or_insert_default()
14289 }
14290 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
14292 self.bcs.as_ref().map(|field| field as _)
14293 }
14294 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
14296 self.bcs = Some(field.into().into());
14297 }
14298 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
14300 self.set_bcs(field.into());
14301 self
14302 }
14303 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
14305 self.digest.as_mut().map(|field| field as _)
14306 }
14307 pub fn digest_mut(&mut self) -> &mut String {
14310 self.digest.get_or_insert_default()
14311 }
14312 pub fn digest_opt(&self) -> Option<&str> {
14314 self.digest.as_ref().map(|field| field as _)
14315 }
14316 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
14318 self.digest = Some(field.into().into());
14319 }
14320 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
14322 self.set_digest(field.into());
14323 self
14324 }
14325 pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
14327 self.version.as_mut().map(|field| field as _)
14328 }
14329 pub fn version_mut(&mut self) -> &mut i32 {
14332 self.version.get_or_insert_default()
14333 }
14334 pub fn version_opt(&self) -> Option<i32> {
14336 self.version.as_ref().map(|field| *field)
14337 }
14338 pub fn set_version(&mut self, field: i32) {
14340 self.version = Some(field);
14341 }
14342 pub fn with_version(mut self, field: i32) -> Self {
14344 self.set_version(field);
14345 self
14346 }
14347 pub fn status(&self) -> &super::ExecutionStatus {
14349 self.status
14350 .as_ref()
14351 .map(|field| field as _)
14352 .unwrap_or_else(|| super::ExecutionStatus::default_instance() as _)
14353 }
14354 pub fn status_opt_mut(&mut self) -> Option<&mut super::ExecutionStatus> {
14356 self.status.as_mut().map(|field| field as _)
14357 }
14358 pub fn status_mut(&mut self) -> &mut super::ExecutionStatus {
14361 self.status.get_or_insert_default()
14362 }
14363 pub fn status_opt(&self) -> Option<&super::ExecutionStatus> {
14365 self.status.as_ref().map(|field| field as _)
14366 }
14367 pub fn set_status<T: Into<super::ExecutionStatus>>(&mut self, field: T) {
14369 self.status = Some(field.into().into());
14370 }
14371 pub fn with_status<T: Into<super::ExecutionStatus>>(mut self, field: T) -> Self {
14373 self.set_status(field.into());
14374 self
14375 }
14376 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
14378 self.epoch.as_mut().map(|field| field as _)
14379 }
14380 pub fn epoch_mut(&mut self) -> &mut u64 {
14383 self.epoch.get_or_insert_default()
14384 }
14385 pub fn epoch_opt(&self) -> Option<u64> {
14387 self.epoch.as_ref().map(|field| *field)
14388 }
14389 pub fn set_epoch(&mut self, field: u64) {
14391 self.epoch = Some(field);
14392 }
14393 pub fn with_epoch(mut self, field: u64) -> Self {
14395 self.set_epoch(field);
14396 self
14397 }
14398 pub fn gas_used(&self) -> &super::GasCostSummary {
14400 self.gas_used
14401 .as_ref()
14402 .map(|field| field as _)
14403 .unwrap_or_else(|| super::GasCostSummary::default_instance() as _)
14404 }
14405 pub fn gas_used_opt_mut(&mut self) -> Option<&mut super::GasCostSummary> {
14407 self.gas_used.as_mut().map(|field| field as _)
14408 }
14409 pub fn gas_used_mut(&mut self) -> &mut super::GasCostSummary {
14412 self.gas_used.get_or_insert_default()
14413 }
14414 pub fn gas_used_opt(&self) -> Option<&super::GasCostSummary> {
14416 self.gas_used.as_ref().map(|field| field as _)
14417 }
14418 pub fn set_gas_used<T: Into<super::GasCostSummary>>(&mut self, field: T) {
14420 self.gas_used = Some(field.into().into());
14421 }
14422 pub fn with_gas_used<T: Into<super::GasCostSummary>>(
14424 mut self,
14425 field: T,
14426 ) -> Self {
14427 self.set_gas_used(field.into());
14428 self
14429 }
14430 pub fn transaction_digest_opt_mut(&mut self) -> Option<&mut String> {
14432 self.transaction_digest.as_mut().map(|field| field as _)
14433 }
14434 pub fn transaction_digest_mut(&mut self) -> &mut String {
14437 self.transaction_digest.get_or_insert_default()
14438 }
14439 pub fn transaction_digest_opt(&self) -> Option<&str> {
14441 self.transaction_digest.as_ref().map(|field| field as _)
14442 }
14443 pub fn set_transaction_digest<T: Into<String>>(&mut self, field: T) {
14445 self.transaction_digest = Some(field.into().into());
14446 }
14447 pub fn with_transaction_digest<T: Into<String>>(mut self, field: T) -> Self {
14449 self.set_transaction_digest(field.into());
14450 self
14451 }
14452 pub fn gas_object(&self) -> &super::ChangedObject {
14454 self.gas_object
14455 .as_ref()
14456 .map(|field| field as _)
14457 .unwrap_or_else(|| super::ChangedObject::default_instance() as _)
14458 }
14459 pub fn gas_object_opt_mut(&mut self) -> Option<&mut super::ChangedObject> {
14461 self.gas_object.as_mut().map(|field| field as _)
14462 }
14463 pub fn gas_object_mut(&mut self) -> &mut super::ChangedObject {
14466 self.gas_object.get_or_insert_default()
14467 }
14468 pub fn gas_object_opt(&self) -> Option<&super::ChangedObject> {
14470 self.gas_object.as_ref().map(|field| field as _)
14471 }
14472 pub fn set_gas_object<T: Into<super::ChangedObject>>(&mut self, field: T) {
14474 self.gas_object = Some(field.into().into());
14475 }
14476 pub fn with_gas_object<T: Into<super::ChangedObject>>(
14478 mut self,
14479 field: T,
14480 ) -> Self {
14481 self.set_gas_object(field.into());
14482 self
14483 }
14484 pub fn events_digest_opt_mut(&mut self) -> Option<&mut String> {
14486 self.events_digest.as_mut().map(|field| field as _)
14487 }
14488 pub fn events_digest_mut(&mut self) -> &mut String {
14491 self.events_digest.get_or_insert_default()
14492 }
14493 pub fn events_digest_opt(&self) -> Option<&str> {
14495 self.events_digest.as_ref().map(|field| field as _)
14496 }
14497 pub fn set_events_digest<T: Into<String>>(&mut self, field: T) {
14499 self.events_digest = Some(field.into().into());
14500 }
14501 pub fn with_events_digest<T: Into<String>>(mut self, field: T) -> Self {
14503 self.set_events_digest(field.into());
14504 self
14505 }
14506 pub fn dependencies(&self) -> &[String] {
14508 &self.dependencies
14509 }
14510 pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
14513 &mut self.dependencies
14514 }
14515 pub fn set_dependencies(&mut self, field: Vec<String>) {
14517 self.dependencies = field;
14518 }
14519 pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
14521 self.set_dependencies(field);
14522 self
14523 }
14524 pub fn lamport_version_opt_mut(&mut self) -> Option<&mut u64> {
14526 self.lamport_version.as_mut().map(|field| field as _)
14527 }
14528 pub fn lamport_version_mut(&mut self) -> &mut u64 {
14531 self.lamport_version.get_or_insert_default()
14532 }
14533 pub fn lamport_version_opt(&self) -> Option<u64> {
14535 self.lamport_version.as_ref().map(|field| *field)
14536 }
14537 pub fn set_lamport_version(&mut self, field: u64) {
14539 self.lamport_version = Some(field);
14540 }
14541 pub fn with_lamport_version(mut self, field: u64) -> Self {
14543 self.set_lamport_version(field);
14544 self
14545 }
14546 pub fn changed_objects(&self) -> &[super::ChangedObject] {
14548 &self.changed_objects
14549 }
14550 pub fn changed_objects_mut(&mut self) -> &mut Vec<super::ChangedObject> {
14553 &mut self.changed_objects
14554 }
14555 pub fn set_changed_objects(&mut self, field: Vec<super::ChangedObject>) {
14557 self.changed_objects = field;
14558 }
14559 pub fn with_changed_objects(mut self, field: Vec<super::ChangedObject>) -> Self {
14561 self.set_changed_objects(field);
14562 self
14563 }
14564 pub fn unchanged_consensus_objects(&self) -> &[super::UnchangedConsensusObject] {
14566 &self.unchanged_consensus_objects
14567 }
14568 pub fn unchanged_consensus_objects_mut(
14571 &mut self,
14572 ) -> &mut Vec<super::UnchangedConsensusObject> {
14573 &mut self.unchanged_consensus_objects
14574 }
14575 pub fn set_unchanged_consensus_objects(
14577 &mut self,
14578 field: Vec<super::UnchangedConsensusObject>,
14579 ) {
14580 self.unchanged_consensus_objects = field;
14581 }
14582 pub fn with_unchanged_consensus_objects(
14584 mut self,
14585 field: Vec<super::UnchangedConsensusObject>,
14586 ) -> Self {
14587 self.set_unchanged_consensus_objects(field);
14588 self
14589 }
14590 pub fn auxiliary_data_digest_opt_mut(&mut self) -> Option<&mut String> {
14592 self.auxiliary_data_digest.as_mut().map(|field| field as _)
14593 }
14594 pub fn auxiliary_data_digest_mut(&mut self) -> &mut String {
14597 self.auxiliary_data_digest.get_or_insert_default()
14598 }
14599 pub fn auxiliary_data_digest_opt(&self) -> Option<&str> {
14601 self.auxiliary_data_digest.as_ref().map(|field| field as _)
14602 }
14603 pub fn set_auxiliary_data_digest<T: Into<String>>(&mut self, field: T) {
14605 self.auxiliary_data_digest = Some(field.into().into());
14606 }
14607 pub fn with_auxiliary_data_digest<T: Into<String>>(mut self, field: T) -> Self {
14609 self.set_auxiliary_data_digest(field.into());
14610 self
14611 }
14612 pub fn unchanged_loaded_runtime_objects(&self) -> &[super::ObjectReference] {
14614 &self.unchanged_loaded_runtime_objects
14615 }
14616 pub fn unchanged_loaded_runtime_objects_mut(
14619 &mut self,
14620 ) -> &mut Vec<super::ObjectReference> {
14621 &mut self.unchanged_loaded_runtime_objects
14622 }
14623 pub fn set_unchanged_loaded_runtime_objects(
14625 &mut self,
14626 field: Vec<super::ObjectReference>,
14627 ) {
14628 self.unchanged_loaded_runtime_objects = field;
14629 }
14630 pub fn with_unchanged_loaded_runtime_objects(
14632 mut self,
14633 field: Vec<super::ObjectReference>,
14634 ) -> Self {
14635 self.set_unchanged_loaded_runtime_objects(field);
14636 self
14637 }
14638 }
14639 impl super::TransactionEvents {
14640 pub const fn const_default() -> Self {
14641 Self {
14642 bcs: None,
14643 digest: None,
14644 events: Vec::new(),
14645 }
14646 }
14647 #[doc(hidden)]
14648 pub fn default_instance() -> &'static Self {
14649 static DEFAULT: super::TransactionEvents = super::TransactionEvents::const_default();
14650 &DEFAULT
14651 }
14652 pub fn bcs(&self) -> &super::Bcs {
14654 self.bcs
14655 .as_ref()
14656 .map(|field| field as _)
14657 .unwrap_or_else(|| super::Bcs::default_instance() as _)
14658 }
14659 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
14661 self.bcs.as_mut().map(|field| field as _)
14662 }
14663 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
14666 self.bcs.get_or_insert_default()
14667 }
14668 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
14670 self.bcs.as_ref().map(|field| field as _)
14671 }
14672 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
14674 self.bcs = Some(field.into().into());
14675 }
14676 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
14678 self.set_bcs(field.into());
14679 self
14680 }
14681 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
14683 self.digest.as_mut().map(|field| field as _)
14684 }
14685 pub fn digest_mut(&mut self) -> &mut String {
14688 self.digest.get_or_insert_default()
14689 }
14690 pub fn digest_opt(&self) -> Option<&str> {
14692 self.digest.as_ref().map(|field| field as _)
14693 }
14694 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
14696 self.digest = Some(field.into().into());
14697 }
14698 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
14700 self.set_digest(field.into());
14701 self
14702 }
14703 pub fn events(&self) -> &[super::Event] {
14705 &self.events
14706 }
14707 pub fn events_mut(&mut self) -> &mut Vec<super::Event> {
14710 &mut self.events
14711 }
14712 pub fn set_events(&mut self, field: Vec<super::Event>) {
14714 self.events = field;
14715 }
14716 pub fn with_events(mut self, field: Vec<super::Event>) -> Self {
14718 self.set_events(field);
14719 self
14720 }
14721 }
14722 impl super::TransactionExpiration {
14723 pub const fn const_default() -> Self {
14724 Self {
14725 kind: None,
14726 epoch: None,
14727 min_epoch: None,
14728 min_timestamp: None,
14729 max_timestamp: None,
14730 chain: None,
14731 nonce: None,
14732 }
14733 }
14734 #[doc(hidden)]
14735 pub fn default_instance() -> &'static Self {
14736 static DEFAULT: super::TransactionExpiration = super::TransactionExpiration::const_default();
14737 &DEFAULT
14738 }
14739 pub fn with_kind<
14741 T: Into<super::transaction_expiration::TransactionExpirationKind>,
14742 >(mut self, field: T) -> Self {
14743 self.set_kind(field.into());
14744 self
14745 }
14746 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
14748 self.epoch.as_mut().map(|field| field as _)
14749 }
14750 pub fn epoch_mut(&mut self) -> &mut u64 {
14753 self.epoch.get_or_insert_default()
14754 }
14755 pub fn epoch_opt(&self) -> Option<u64> {
14757 self.epoch.as_ref().map(|field| *field)
14758 }
14759 pub fn set_epoch(&mut self, field: u64) {
14761 self.epoch = Some(field);
14762 }
14763 pub fn with_epoch(mut self, field: u64) -> Self {
14765 self.set_epoch(field);
14766 self
14767 }
14768 pub fn min_epoch_opt_mut(&mut self) -> Option<&mut u64> {
14770 self.min_epoch.as_mut().map(|field| field as _)
14771 }
14772 pub fn min_epoch_mut(&mut self) -> &mut u64 {
14775 self.min_epoch.get_or_insert_default()
14776 }
14777 pub fn min_epoch_opt(&self) -> Option<u64> {
14779 self.min_epoch.as_ref().map(|field| *field)
14780 }
14781 pub fn set_min_epoch(&mut self, field: u64) {
14783 self.min_epoch = Some(field);
14784 }
14785 pub fn with_min_epoch(mut self, field: u64) -> Self {
14787 self.set_min_epoch(field);
14788 self
14789 }
14790 pub fn min_timestamp_opt_mut(
14792 &mut self,
14793 ) -> Option<&mut ::prost_types::Timestamp> {
14794 self.min_timestamp.as_mut().map(|field| field as _)
14795 }
14796 pub fn min_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
14799 self.min_timestamp.get_or_insert_default()
14800 }
14801 pub fn min_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
14803 self.min_timestamp.as_ref().map(|field| field as _)
14804 }
14805 pub fn set_min_timestamp<T: Into<::prost_types::Timestamp>>(
14807 &mut self,
14808 field: T,
14809 ) {
14810 self.min_timestamp = Some(field.into().into());
14811 }
14812 pub fn with_min_timestamp<T: Into<::prost_types::Timestamp>>(
14814 mut self,
14815 field: T,
14816 ) -> Self {
14817 self.set_min_timestamp(field.into());
14818 self
14819 }
14820 pub fn max_timestamp_opt_mut(
14822 &mut self,
14823 ) -> Option<&mut ::prost_types::Timestamp> {
14824 self.max_timestamp.as_mut().map(|field| field as _)
14825 }
14826 pub fn max_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
14829 self.max_timestamp.get_or_insert_default()
14830 }
14831 pub fn max_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
14833 self.max_timestamp.as_ref().map(|field| field as _)
14834 }
14835 pub fn set_max_timestamp<T: Into<::prost_types::Timestamp>>(
14837 &mut self,
14838 field: T,
14839 ) {
14840 self.max_timestamp = Some(field.into().into());
14841 }
14842 pub fn with_max_timestamp<T: Into<::prost_types::Timestamp>>(
14844 mut self,
14845 field: T,
14846 ) -> Self {
14847 self.set_max_timestamp(field.into());
14848 self
14849 }
14850 pub fn chain_opt_mut(&mut self) -> Option<&mut String> {
14852 self.chain.as_mut().map(|field| field as _)
14853 }
14854 pub fn chain_mut(&mut self) -> &mut String {
14857 self.chain.get_or_insert_default()
14858 }
14859 pub fn chain_opt(&self) -> Option<&str> {
14861 self.chain.as_ref().map(|field| field as _)
14862 }
14863 pub fn set_chain<T: Into<String>>(&mut self, field: T) {
14865 self.chain = Some(field.into().into());
14866 }
14867 pub fn with_chain<T: Into<String>>(mut self, field: T) -> Self {
14869 self.set_chain(field.into());
14870 self
14871 }
14872 pub fn nonce_opt_mut(&mut self) -> Option<&mut u32> {
14874 self.nonce.as_mut().map(|field| field as _)
14875 }
14876 pub fn nonce_mut(&mut self) -> &mut u32 {
14879 self.nonce.get_or_insert_default()
14880 }
14881 pub fn nonce_opt(&self) -> Option<u32> {
14883 self.nonce.as_ref().map(|field| *field)
14884 }
14885 pub fn set_nonce(&mut self, field: u32) {
14887 self.nonce = Some(field);
14888 }
14889 pub fn with_nonce(mut self, field: u32) -> Self {
14891 self.set_nonce(field);
14892 self
14893 }
14894 }
14895 impl super::TransactionKind {
14896 pub const fn const_default() -> Self {
14897 Self { kind: None, data: None }
14898 }
14899 #[doc(hidden)]
14900 pub fn default_instance() -> &'static Self {
14901 static DEFAULT: super::TransactionKind = super::TransactionKind::const_default();
14902 &DEFAULT
14903 }
14904 pub fn with_kind<T: Into<super::transaction_kind::Kind>>(
14906 mut self,
14907 field: T,
14908 ) -> Self {
14909 self.set_kind(field.into());
14910 self
14911 }
14912 pub fn programmable_transaction(&self) -> &super::ProgrammableTransaction {
14914 if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &self
14915 .data
14916 {
14917 field as _
14918 } else {
14919 super::ProgrammableTransaction::default_instance() as _
14920 }
14921 }
14922 pub fn programmable_transaction_opt(
14924 &self,
14925 ) -> Option<&super::ProgrammableTransaction> {
14926 if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &self
14927 .data
14928 {
14929 Some(field as _)
14930 } else {
14931 None
14932 }
14933 }
14934 pub fn programmable_transaction_opt_mut(
14936 &mut self,
14937 ) -> Option<&mut super::ProgrammableTransaction> {
14938 if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &mut self
14939 .data
14940 {
14941 Some(field as _)
14942 } else {
14943 None
14944 }
14945 }
14946 pub fn programmable_transaction_mut(
14950 &mut self,
14951 ) -> &mut super::ProgrammableTransaction {
14952 if self.programmable_transaction_opt_mut().is_none() {
14953 self.data = Some(
14954 super::transaction_kind::Data::ProgrammableTransaction(
14955 super::ProgrammableTransaction::default(),
14956 ),
14957 );
14958 }
14959 self.programmable_transaction_opt_mut().unwrap()
14960 }
14961 pub fn set_programmable_transaction<T: Into<super::ProgrammableTransaction>>(
14964 &mut self,
14965 field: T,
14966 ) {
14967 self.data = Some(
14968 super::transaction_kind::Data::ProgrammableTransaction(
14969 field.into().into(),
14970 ),
14971 );
14972 }
14973 pub fn with_programmable_transaction<T: Into<super::ProgrammableTransaction>>(
14976 mut self,
14977 field: T,
14978 ) -> Self {
14979 self.set_programmable_transaction(field.into());
14980 self
14981 }
14982 pub fn change_epoch(&self) -> &super::ChangeEpoch {
14984 if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &self.data {
14985 field as _
14986 } else {
14987 super::ChangeEpoch::default_instance() as _
14988 }
14989 }
14990 pub fn change_epoch_opt(&self) -> Option<&super::ChangeEpoch> {
14992 if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &self.data {
14993 Some(field as _)
14994 } else {
14995 None
14996 }
14997 }
14998 pub fn change_epoch_opt_mut(&mut self) -> Option<&mut super::ChangeEpoch> {
15000 if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &mut self
15001 .data
15002 {
15003 Some(field as _)
15004 } else {
15005 None
15006 }
15007 }
15008 pub fn change_epoch_mut(&mut self) -> &mut super::ChangeEpoch {
15012 if self.change_epoch_opt_mut().is_none() {
15013 self.data = Some(
15014 super::transaction_kind::Data::ChangeEpoch(
15015 super::ChangeEpoch::default(),
15016 ),
15017 );
15018 }
15019 self.change_epoch_opt_mut().unwrap()
15020 }
15021 pub fn set_change_epoch<T: Into<super::ChangeEpoch>>(&mut self, field: T) {
15024 self.data = Some(
15025 super::transaction_kind::Data::ChangeEpoch(field.into().into()),
15026 );
15027 }
15028 pub fn with_change_epoch<T: Into<super::ChangeEpoch>>(
15031 mut self,
15032 field: T,
15033 ) -> Self {
15034 self.set_change_epoch(field.into());
15035 self
15036 }
15037 pub fn genesis(&self) -> &super::GenesisTransaction {
15039 if let Some(super::transaction_kind::Data::Genesis(field)) = &self.data {
15040 field as _
15041 } else {
15042 super::GenesisTransaction::default_instance() as _
15043 }
15044 }
15045 pub fn genesis_opt(&self) -> Option<&super::GenesisTransaction> {
15047 if let Some(super::transaction_kind::Data::Genesis(field)) = &self.data {
15048 Some(field as _)
15049 } else {
15050 None
15051 }
15052 }
15053 pub fn genesis_opt_mut(&mut self) -> Option<&mut super::GenesisTransaction> {
15055 if let Some(super::transaction_kind::Data::Genesis(field)) = &mut self.data {
15056 Some(field as _)
15057 } else {
15058 None
15059 }
15060 }
15061 pub fn genesis_mut(&mut self) -> &mut super::GenesisTransaction {
15065 if self.genesis_opt_mut().is_none() {
15066 self.data = Some(
15067 super::transaction_kind::Data::Genesis(
15068 super::GenesisTransaction::default(),
15069 ),
15070 );
15071 }
15072 self.genesis_opt_mut().unwrap()
15073 }
15074 pub fn set_genesis<T: Into<super::GenesisTransaction>>(&mut self, field: T) {
15077 self.data = Some(
15078 super::transaction_kind::Data::Genesis(field.into().into()),
15079 );
15080 }
15081 pub fn with_genesis<T: Into<super::GenesisTransaction>>(
15084 mut self,
15085 field: T,
15086 ) -> Self {
15087 self.set_genesis(field.into());
15088 self
15089 }
15090 pub fn consensus_commit_prologue(&self) -> &super::ConsensusCommitPrologue {
15092 if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &self
15093 .data
15094 {
15095 field as _
15096 } else {
15097 super::ConsensusCommitPrologue::default_instance() as _
15098 }
15099 }
15100 pub fn consensus_commit_prologue_opt(
15102 &self,
15103 ) -> Option<&super::ConsensusCommitPrologue> {
15104 if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &self
15105 .data
15106 {
15107 Some(field as _)
15108 } else {
15109 None
15110 }
15111 }
15112 pub fn consensus_commit_prologue_opt_mut(
15114 &mut self,
15115 ) -> Option<&mut super::ConsensusCommitPrologue> {
15116 if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &mut self
15117 .data
15118 {
15119 Some(field as _)
15120 } else {
15121 None
15122 }
15123 }
15124 pub fn consensus_commit_prologue_mut(
15128 &mut self,
15129 ) -> &mut super::ConsensusCommitPrologue {
15130 if self.consensus_commit_prologue_opt_mut().is_none() {
15131 self.data = Some(
15132 super::transaction_kind::Data::ConsensusCommitPrologue(
15133 super::ConsensusCommitPrologue::default(),
15134 ),
15135 );
15136 }
15137 self.consensus_commit_prologue_opt_mut().unwrap()
15138 }
15139 pub fn set_consensus_commit_prologue<T: Into<super::ConsensusCommitPrologue>>(
15142 &mut self,
15143 field: T,
15144 ) {
15145 self.data = Some(
15146 super::transaction_kind::Data::ConsensusCommitPrologue(
15147 field.into().into(),
15148 ),
15149 );
15150 }
15151 pub fn with_consensus_commit_prologue<T: Into<super::ConsensusCommitPrologue>>(
15154 mut self,
15155 field: T,
15156 ) -> Self {
15157 self.set_consensus_commit_prologue(field.into());
15158 self
15159 }
15160 pub fn authenticator_state_update(&self) -> &super::AuthenticatorStateUpdate {
15162 if let Some(
15163 super::transaction_kind::Data::AuthenticatorStateUpdate(field),
15164 ) = &self.data
15165 {
15166 field as _
15167 } else {
15168 super::AuthenticatorStateUpdate::default_instance() as _
15169 }
15170 }
15171 pub fn authenticator_state_update_opt(
15173 &self,
15174 ) -> Option<&super::AuthenticatorStateUpdate> {
15175 if let Some(
15176 super::transaction_kind::Data::AuthenticatorStateUpdate(field),
15177 ) = &self.data
15178 {
15179 Some(field as _)
15180 } else {
15181 None
15182 }
15183 }
15184 pub fn authenticator_state_update_opt_mut(
15186 &mut self,
15187 ) -> Option<&mut super::AuthenticatorStateUpdate> {
15188 if let Some(
15189 super::transaction_kind::Data::AuthenticatorStateUpdate(field),
15190 ) = &mut self.data
15191 {
15192 Some(field as _)
15193 } else {
15194 None
15195 }
15196 }
15197 pub fn authenticator_state_update_mut(
15201 &mut self,
15202 ) -> &mut super::AuthenticatorStateUpdate {
15203 if self.authenticator_state_update_opt_mut().is_none() {
15204 self.data = Some(
15205 super::transaction_kind::Data::AuthenticatorStateUpdate(
15206 super::AuthenticatorStateUpdate::default(),
15207 ),
15208 );
15209 }
15210 self.authenticator_state_update_opt_mut().unwrap()
15211 }
15212 pub fn set_authenticator_state_update<T: Into<super::AuthenticatorStateUpdate>>(
15215 &mut self,
15216 field: T,
15217 ) {
15218 self.data = Some(
15219 super::transaction_kind::Data::AuthenticatorStateUpdate(
15220 field.into().into(),
15221 ),
15222 );
15223 }
15224 pub fn with_authenticator_state_update<T: Into<super::AuthenticatorStateUpdate>>(
15227 mut self,
15228 field: T,
15229 ) -> Self {
15230 self.set_authenticator_state_update(field.into());
15231 self
15232 }
15233 pub fn end_of_epoch(&self) -> &super::EndOfEpochTransaction {
15235 if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &self.data {
15236 field as _
15237 } else {
15238 super::EndOfEpochTransaction::default_instance() as _
15239 }
15240 }
15241 pub fn end_of_epoch_opt(&self) -> Option<&super::EndOfEpochTransaction> {
15243 if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &self.data {
15244 Some(field as _)
15245 } else {
15246 None
15247 }
15248 }
15249 pub fn end_of_epoch_opt_mut(
15251 &mut self,
15252 ) -> Option<&mut super::EndOfEpochTransaction> {
15253 if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &mut self
15254 .data
15255 {
15256 Some(field as _)
15257 } else {
15258 None
15259 }
15260 }
15261 pub fn end_of_epoch_mut(&mut self) -> &mut super::EndOfEpochTransaction {
15265 if self.end_of_epoch_opt_mut().is_none() {
15266 self.data = Some(
15267 super::transaction_kind::Data::EndOfEpoch(
15268 super::EndOfEpochTransaction::default(),
15269 ),
15270 );
15271 }
15272 self.end_of_epoch_opt_mut().unwrap()
15273 }
15274 pub fn set_end_of_epoch<T: Into<super::EndOfEpochTransaction>>(
15277 &mut self,
15278 field: T,
15279 ) {
15280 self.data = Some(
15281 super::transaction_kind::Data::EndOfEpoch(field.into().into()),
15282 );
15283 }
15284 pub fn with_end_of_epoch<T: Into<super::EndOfEpochTransaction>>(
15287 mut self,
15288 field: T,
15289 ) -> Self {
15290 self.set_end_of_epoch(field.into());
15291 self
15292 }
15293 pub fn randomness_state_update(&self) -> &super::RandomnessStateUpdate {
15295 if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &self
15296 .data
15297 {
15298 field as _
15299 } else {
15300 super::RandomnessStateUpdate::default_instance() as _
15301 }
15302 }
15303 pub fn randomness_state_update_opt(
15305 &self,
15306 ) -> Option<&super::RandomnessStateUpdate> {
15307 if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &self
15308 .data
15309 {
15310 Some(field as _)
15311 } else {
15312 None
15313 }
15314 }
15315 pub fn randomness_state_update_opt_mut(
15317 &mut self,
15318 ) -> Option<&mut super::RandomnessStateUpdate> {
15319 if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &mut self
15320 .data
15321 {
15322 Some(field as _)
15323 } else {
15324 None
15325 }
15326 }
15327 pub fn randomness_state_update_mut(
15331 &mut self,
15332 ) -> &mut super::RandomnessStateUpdate {
15333 if self.randomness_state_update_opt_mut().is_none() {
15334 self.data = Some(
15335 super::transaction_kind::Data::RandomnessStateUpdate(
15336 super::RandomnessStateUpdate::default(),
15337 ),
15338 );
15339 }
15340 self.randomness_state_update_opt_mut().unwrap()
15341 }
15342 pub fn set_randomness_state_update<T: Into<super::RandomnessStateUpdate>>(
15345 &mut self,
15346 field: T,
15347 ) {
15348 self.data = Some(
15349 super::transaction_kind::Data::RandomnessStateUpdate(field.into().into()),
15350 );
15351 }
15352 pub fn with_randomness_state_update<T: Into<super::RandomnessStateUpdate>>(
15355 mut self,
15356 field: T,
15357 ) -> Self {
15358 self.set_randomness_state_update(field.into());
15359 self
15360 }
15361 }
15362 impl super::TransferObjects {
15363 pub const fn const_default() -> Self {
15364 Self {
15365 objects: Vec::new(),
15366 address: None,
15367 }
15368 }
15369 #[doc(hidden)]
15370 pub fn default_instance() -> &'static Self {
15371 static DEFAULT: super::TransferObjects = super::TransferObjects::const_default();
15372 &DEFAULT
15373 }
15374 pub fn objects(&self) -> &[super::Argument] {
15376 &self.objects
15377 }
15378 pub fn objects_mut(&mut self) -> &mut Vec<super::Argument> {
15381 &mut self.objects
15382 }
15383 pub fn set_objects(&mut self, field: Vec<super::Argument>) {
15385 self.objects = field;
15386 }
15387 pub fn with_objects(mut self, field: Vec<super::Argument>) -> Self {
15389 self.set_objects(field);
15390 self
15391 }
15392 pub fn address(&self) -> &super::Argument {
15394 self.address
15395 .as_ref()
15396 .map(|field| field as _)
15397 .unwrap_or_else(|| super::Argument::default_instance() as _)
15398 }
15399 pub fn address_opt_mut(&mut self) -> Option<&mut super::Argument> {
15401 self.address.as_mut().map(|field| field as _)
15402 }
15403 pub fn address_mut(&mut self) -> &mut super::Argument {
15406 self.address.get_or_insert_default()
15407 }
15408 pub fn address_opt(&self) -> Option<&super::Argument> {
15410 self.address.as_ref().map(|field| field as _)
15411 }
15412 pub fn set_address<T: Into<super::Argument>>(&mut self, field: T) {
15414 self.address = Some(field.into().into());
15415 }
15416 pub fn with_address<T: Into<super::Argument>>(mut self, field: T) -> Self {
15418 self.set_address(field.into());
15419 self
15420 }
15421 }
15422 impl super::TypeArgumentError {
15423 pub const fn const_default() -> Self {
15424 Self {
15425 type_argument: None,
15426 kind: None,
15427 }
15428 }
15429 #[doc(hidden)]
15430 pub fn default_instance() -> &'static Self {
15431 static DEFAULT: super::TypeArgumentError = super::TypeArgumentError::const_default();
15432 &DEFAULT
15433 }
15434 pub fn type_argument_opt_mut(&mut self) -> Option<&mut u32> {
15436 self.type_argument.as_mut().map(|field| field as _)
15437 }
15438 pub fn type_argument_mut(&mut self) -> &mut u32 {
15441 self.type_argument.get_or_insert_default()
15442 }
15443 pub fn type_argument_opt(&self) -> Option<u32> {
15445 self.type_argument.as_ref().map(|field| *field)
15446 }
15447 pub fn set_type_argument(&mut self, field: u32) {
15449 self.type_argument = Some(field);
15450 }
15451 pub fn with_type_argument(mut self, field: u32) -> Self {
15453 self.set_type_argument(field);
15454 self
15455 }
15456 pub fn with_kind<T: Into<super::type_argument_error::TypeArgumentErrorKind>>(
15458 mut self,
15459 field: T,
15460 ) -> Self {
15461 self.set_kind(field.into());
15462 self
15463 }
15464 }
15465 impl super::TypeOrigin {
15466 pub const fn const_default() -> Self {
15467 Self {
15468 module_name: None,
15469 datatype_name: None,
15470 package_id: None,
15471 }
15472 }
15473 #[doc(hidden)]
15474 pub fn default_instance() -> &'static Self {
15475 static DEFAULT: super::TypeOrigin = super::TypeOrigin::const_default();
15476 &DEFAULT
15477 }
15478 pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
15480 self.module_name.as_mut().map(|field| field as _)
15481 }
15482 pub fn module_name_mut(&mut self) -> &mut String {
15485 self.module_name.get_or_insert_default()
15486 }
15487 pub fn module_name_opt(&self) -> Option<&str> {
15489 self.module_name.as_ref().map(|field| field as _)
15490 }
15491 pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
15493 self.module_name = Some(field.into().into());
15494 }
15495 pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
15497 self.set_module_name(field.into());
15498 self
15499 }
15500 pub fn datatype_name_opt_mut(&mut self) -> Option<&mut String> {
15502 self.datatype_name.as_mut().map(|field| field as _)
15503 }
15504 pub fn datatype_name_mut(&mut self) -> &mut String {
15507 self.datatype_name.get_or_insert_default()
15508 }
15509 pub fn datatype_name_opt(&self) -> Option<&str> {
15511 self.datatype_name.as_ref().map(|field| field as _)
15512 }
15513 pub fn set_datatype_name<T: Into<String>>(&mut self, field: T) {
15515 self.datatype_name = Some(field.into().into());
15516 }
15517 pub fn with_datatype_name<T: Into<String>>(mut self, field: T) -> Self {
15519 self.set_datatype_name(field.into());
15520 self
15521 }
15522 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
15524 self.package_id.as_mut().map(|field| field as _)
15525 }
15526 pub fn package_id_mut(&mut self) -> &mut String {
15529 self.package_id.get_or_insert_default()
15530 }
15531 pub fn package_id_opt(&self) -> Option<&str> {
15533 self.package_id.as_ref().map(|field| field as _)
15534 }
15535 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
15537 self.package_id = Some(field.into().into());
15538 }
15539 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
15541 self.set_package_id(field.into());
15542 self
15543 }
15544 }
15545 impl super::TypeParameter {
15546 pub const fn const_default() -> Self {
15547 Self {
15548 constraints: Vec::new(),
15549 is_phantom: None,
15550 }
15551 }
15552 #[doc(hidden)]
15553 pub fn default_instance() -> &'static Self {
15554 static DEFAULT: super::TypeParameter = super::TypeParameter::const_default();
15555 &DEFAULT
15556 }
15557 pub fn is_phantom_opt_mut(&mut self) -> Option<&mut bool> {
15559 self.is_phantom.as_mut().map(|field| field as _)
15560 }
15561 pub fn is_phantom_mut(&mut self) -> &mut bool {
15564 self.is_phantom.get_or_insert_default()
15565 }
15566 pub fn is_phantom_opt(&self) -> Option<bool> {
15568 self.is_phantom.as_ref().map(|field| *field)
15569 }
15570 pub fn set_is_phantom(&mut self, field: bool) {
15572 self.is_phantom = Some(field);
15573 }
15574 pub fn with_is_phantom(mut self, field: bool) -> Self {
15576 self.set_is_phantom(field);
15577 self
15578 }
15579 }
15580 impl super::UnchangedConsensusObject {
15581 pub const fn const_default() -> Self {
15582 Self {
15583 kind: None,
15584 object_id: None,
15585 version: None,
15586 digest: None,
15587 object_type: None,
15588 }
15589 }
15590 #[doc(hidden)]
15591 pub fn default_instance() -> &'static Self {
15592 static DEFAULT: super::UnchangedConsensusObject = super::UnchangedConsensusObject::const_default();
15593 &DEFAULT
15594 }
15595 pub fn with_kind<
15597 T: Into<super::unchanged_consensus_object::UnchangedConsensusObjectKind>,
15598 >(mut self, field: T) -> Self {
15599 self.set_kind(field.into());
15600 self
15601 }
15602 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
15604 self.object_id.as_mut().map(|field| field as _)
15605 }
15606 pub fn object_id_mut(&mut self) -> &mut String {
15609 self.object_id.get_or_insert_default()
15610 }
15611 pub fn object_id_opt(&self) -> Option<&str> {
15613 self.object_id.as_ref().map(|field| field as _)
15614 }
15615 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
15617 self.object_id = Some(field.into().into());
15618 }
15619 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
15621 self.set_object_id(field.into());
15622 self
15623 }
15624 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
15626 self.version.as_mut().map(|field| field as _)
15627 }
15628 pub fn version_mut(&mut self) -> &mut u64 {
15631 self.version.get_or_insert_default()
15632 }
15633 pub fn version_opt(&self) -> Option<u64> {
15635 self.version.as_ref().map(|field| *field)
15636 }
15637 pub fn set_version(&mut self, field: u64) {
15639 self.version = Some(field);
15640 }
15641 pub fn with_version(mut self, field: u64) -> Self {
15643 self.set_version(field);
15644 self
15645 }
15646 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
15648 self.digest.as_mut().map(|field| field as _)
15649 }
15650 pub fn digest_mut(&mut self) -> &mut String {
15653 self.digest.get_or_insert_default()
15654 }
15655 pub fn digest_opt(&self) -> Option<&str> {
15657 self.digest.as_ref().map(|field| field as _)
15658 }
15659 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
15661 self.digest = Some(field.into().into());
15662 }
15663 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
15665 self.set_digest(field.into());
15666 self
15667 }
15668 pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
15670 self.object_type.as_mut().map(|field| field as _)
15671 }
15672 pub fn object_type_mut(&mut self) -> &mut String {
15675 self.object_type.get_or_insert_default()
15676 }
15677 pub fn object_type_opt(&self) -> Option<&str> {
15679 self.object_type.as_ref().map(|field| field as _)
15680 }
15681 pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
15683 self.object_type = Some(field.into().into());
15684 }
15685 pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
15687 self.set_object_type(field.into());
15688 self
15689 }
15690 }
15691 impl super::Upgrade {
15692 pub const fn const_default() -> Self {
15693 Self {
15694 modules: Vec::new(),
15695 dependencies: Vec::new(),
15696 package: None,
15697 ticket: None,
15698 }
15699 }
15700 #[doc(hidden)]
15701 pub fn default_instance() -> &'static Self {
15702 static DEFAULT: super::Upgrade = super::Upgrade::const_default();
15703 &DEFAULT
15704 }
15705 pub fn modules(&self) -> &[::prost::bytes::Bytes] {
15707 &self.modules
15708 }
15709 pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
15712 &mut self.modules
15713 }
15714 pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
15716 self.modules = field;
15717 }
15718 pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
15720 self.set_modules(field);
15721 self
15722 }
15723 pub fn dependencies(&self) -> &[String] {
15725 &self.dependencies
15726 }
15727 pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
15730 &mut self.dependencies
15731 }
15732 pub fn set_dependencies(&mut self, field: Vec<String>) {
15734 self.dependencies = field;
15735 }
15736 pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
15738 self.set_dependencies(field);
15739 self
15740 }
15741 pub fn package_opt_mut(&mut self) -> Option<&mut String> {
15743 self.package.as_mut().map(|field| field as _)
15744 }
15745 pub fn package_mut(&mut self) -> &mut String {
15748 self.package.get_or_insert_default()
15749 }
15750 pub fn package_opt(&self) -> Option<&str> {
15752 self.package.as_ref().map(|field| field as _)
15753 }
15754 pub fn set_package<T: Into<String>>(&mut self, field: T) {
15756 self.package = Some(field.into().into());
15757 }
15758 pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
15760 self.set_package(field.into());
15761 self
15762 }
15763 pub fn ticket(&self) -> &super::Argument {
15765 self.ticket
15766 .as_ref()
15767 .map(|field| field as _)
15768 .unwrap_or_else(|| super::Argument::default_instance() as _)
15769 }
15770 pub fn ticket_opt_mut(&mut self) -> Option<&mut super::Argument> {
15772 self.ticket.as_mut().map(|field| field as _)
15773 }
15774 pub fn ticket_mut(&mut self) -> &mut super::Argument {
15777 self.ticket.get_or_insert_default()
15778 }
15779 pub fn ticket_opt(&self) -> Option<&super::Argument> {
15781 self.ticket.as_ref().map(|field| field as _)
15782 }
15783 pub fn set_ticket<T: Into<super::Argument>>(&mut self, field: T) {
15785 self.ticket = Some(field.into().into());
15786 }
15787 pub fn with_ticket<T: Into<super::Argument>>(mut self, field: T) -> Self {
15789 self.set_ticket(field.into());
15790 self
15791 }
15792 }
15793 impl super::UserSignature {
15794 pub const fn const_default() -> Self {
15795 Self {
15796 bcs: None,
15797 scheme: None,
15798 signature: None,
15799 }
15800 }
15801 #[doc(hidden)]
15802 pub fn default_instance() -> &'static Self {
15803 static DEFAULT: super::UserSignature = super::UserSignature::const_default();
15804 &DEFAULT
15805 }
15806 pub fn bcs(&self) -> &super::Bcs {
15808 self.bcs
15809 .as_ref()
15810 .map(|field| field as _)
15811 .unwrap_or_else(|| super::Bcs::default_instance() as _)
15812 }
15813 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
15815 self.bcs.as_mut().map(|field| field as _)
15816 }
15817 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
15820 self.bcs.get_or_insert_default()
15821 }
15822 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
15824 self.bcs.as_ref().map(|field| field as _)
15825 }
15826 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
15828 self.bcs = Some(field.into().into());
15829 }
15830 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
15832 self.set_bcs(field.into());
15833 self
15834 }
15835 pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
15837 self.set_scheme(field.into());
15838 self
15839 }
15840 pub fn simple(&self) -> &super::SimpleSignature {
15842 if let Some(super::user_signature::Signature::Simple(field)) = &self
15843 .signature
15844 {
15845 field as _
15846 } else {
15847 super::SimpleSignature::default_instance() as _
15848 }
15849 }
15850 pub fn simple_opt(&self) -> Option<&super::SimpleSignature> {
15852 if let Some(super::user_signature::Signature::Simple(field)) = &self
15853 .signature
15854 {
15855 Some(field as _)
15856 } else {
15857 None
15858 }
15859 }
15860 pub fn simple_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
15862 if let Some(super::user_signature::Signature::Simple(field)) = &mut self
15863 .signature
15864 {
15865 Some(field as _)
15866 } else {
15867 None
15868 }
15869 }
15870 pub fn simple_mut(&mut self) -> &mut super::SimpleSignature {
15874 if self.simple_opt_mut().is_none() {
15875 self.signature = Some(
15876 super::user_signature::Signature::Simple(
15877 super::SimpleSignature::default(),
15878 ),
15879 );
15880 }
15881 self.simple_opt_mut().unwrap()
15882 }
15883 pub fn set_simple<T: Into<super::SimpleSignature>>(&mut self, field: T) {
15886 self.signature = Some(
15887 super::user_signature::Signature::Simple(field.into().into()),
15888 );
15889 }
15890 pub fn with_simple<T: Into<super::SimpleSignature>>(mut self, field: T) -> Self {
15893 self.set_simple(field.into());
15894 self
15895 }
15896 pub fn multisig(&self) -> &super::MultisigAggregatedSignature {
15898 if let Some(super::user_signature::Signature::Multisig(field)) = &self
15899 .signature
15900 {
15901 field as _
15902 } else {
15903 super::MultisigAggregatedSignature::default_instance() as _
15904 }
15905 }
15906 pub fn multisig_opt(&self) -> Option<&super::MultisigAggregatedSignature> {
15908 if let Some(super::user_signature::Signature::Multisig(field)) = &self
15909 .signature
15910 {
15911 Some(field as _)
15912 } else {
15913 None
15914 }
15915 }
15916 pub fn multisig_opt_mut(
15918 &mut self,
15919 ) -> Option<&mut super::MultisigAggregatedSignature> {
15920 if let Some(super::user_signature::Signature::Multisig(field)) = &mut self
15921 .signature
15922 {
15923 Some(field as _)
15924 } else {
15925 None
15926 }
15927 }
15928 pub fn multisig_mut(&mut self) -> &mut super::MultisigAggregatedSignature {
15932 if self.multisig_opt_mut().is_none() {
15933 self.signature = Some(
15934 super::user_signature::Signature::Multisig(
15935 super::MultisigAggregatedSignature::default(),
15936 ),
15937 );
15938 }
15939 self.multisig_opt_mut().unwrap()
15940 }
15941 pub fn set_multisig<T: Into<super::MultisigAggregatedSignature>>(
15944 &mut self,
15945 field: T,
15946 ) {
15947 self.signature = Some(
15948 super::user_signature::Signature::Multisig(field.into().into()),
15949 );
15950 }
15951 pub fn with_multisig<T: Into<super::MultisigAggregatedSignature>>(
15954 mut self,
15955 field: T,
15956 ) -> Self {
15957 self.set_multisig(field.into());
15958 self
15959 }
15960 pub fn zklogin(&self) -> &super::ZkLoginAuthenticator {
15962 if let Some(super::user_signature::Signature::Zklogin(field)) = &self
15963 .signature
15964 {
15965 field as _
15966 } else {
15967 super::ZkLoginAuthenticator::default_instance() as _
15968 }
15969 }
15970 pub fn zklogin_opt(&self) -> Option<&super::ZkLoginAuthenticator> {
15972 if let Some(super::user_signature::Signature::Zklogin(field)) = &self
15973 .signature
15974 {
15975 Some(field as _)
15976 } else {
15977 None
15978 }
15979 }
15980 pub fn zklogin_opt_mut(&mut self) -> Option<&mut super::ZkLoginAuthenticator> {
15982 if let Some(super::user_signature::Signature::Zklogin(field)) = &mut self
15983 .signature
15984 {
15985 Some(field as _)
15986 } else {
15987 None
15988 }
15989 }
15990 pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginAuthenticator {
15994 if self.zklogin_opt_mut().is_none() {
15995 self.signature = Some(
15996 super::user_signature::Signature::Zklogin(
15997 super::ZkLoginAuthenticator::default(),
15998 ),
15999 );
16000 }
16001 self.zklogin_opt_mut().unwrap()
16002 }
16003 pub fn set_zklogin<T: Into<super::ZkLoginAuthenticator>>(&mut self, field: T) {
16006 self.signature = Some(
16007 super::user_signature::Signature::Zklogin(field.into().into()),
16008 );
16009 }
16010 pub fn with_zklogin<T: Into<super::ZkLoginAuthenticator>>(
16013 mut self,
16014 field: T,
16015 ) -> Self {
16016 self.set_zklogin(field.into());
16017 self
16018 }
16019 pub fn passkey(&self) -> &super::PasskeyAuthenticator {
16021 if let Some(super::user_signature::Signature::Passkey(field)) = &self
16022 .signature
16023 {
16024 field as _
16025 } else {
16026 super::PasskeyAuthenticator::default_instance() as _
16027 }
16028 }
16029 pub fn passkey_opt(&self) -> Option<&super::PasskeyAuthenticator> {
16031 if let Some(super::user_signature::Signature::Passkey(field)) = &self
16032 .signature
16033 {
16034 Some(field as _)
16035 } else {
16036 None
16037 }
16038 }
16039 pub fn passkey_opt_mut(&mut self) -> Option<&mut super::PasskeyAuthenticator> {
16041 if let Some(super::user_signature::Signature::Passkey(field)) = &mut self
16042 .signature
16043 {
16044 Some(field as _)
16045 } else {
16046 None
16047 }
16048 }
16049 pub fn passkey_mut(&mut self) -> &mut super::PasskeyAuthenticator {
16053 if self.passkey_opt_mut().is_none() {
16054 self.signature = Some(
16055 super::user_signature::Signature::Passkey(
16056 super::PasskeyAuthenticator::default(),
16057 ),
16058 );
16059 }
16060 self.passkey_opt_mut().unwrap()
16061 }
16062 pub fn set_passkey<T: Into<super::PasskeyAuthenticator>>(&mut self, field: T) {
16065 self.signature = Some(
16066 super::user_signature::Signature::Passkey(field.into().into()),
16067 );
16068 }
16069 pub fn with_passkey<T: Into<super::PasskeyAuthenticator>>(
16072 mut self,
16073 field: T,
16074 ) -> Self {
16075 self.set_passkey(field.into());
16076 self
16077 }
16078 }
16079 impl super::Validator {
16080 pub const fn const_default() -> Self {
16081 Self {
16082 name: None,
16083 address: None,
16084 description: None,
16085 image_url: None,
16086 project_url: None,
16087 protocol_public_key: None,
16088 proof_of_possession: None,
16089 network_public_key: None,
16090 worker_public_key: None,
16091 network_address: None,
16092 p2p_address: None,
16093 primary_address: None,
16094 worker_address: None,
16095 next_epoch_protocol_public_key: None,
16096 next_epoch_proof_of_possession: None,
16097 next_epoch_network_public_key: None,
16098 next_epoch_worker_public_key: None,
16099 next_epoch_network_address: None,
16100 next_epoch_p2p_address: None,
16101 next_epoch_primary_address: None,
16102 next_epoch_worker_address: None,
16103 metadata_extra_fields: None,
16104 voting_power: None,
16105 operation_cap_id: None,
16106 gas_price: None,
16107 staking_pool: None,
16108 commission_rate: None,
16109 next_epoch_stake: None,
16110 next_epoch_gas_price: None,
16111 next_epoch_commission_rate: None,
16112 extra_fields: None,
16113 }
16114 }
16115 #[doc(hidden)]
16116 pub fn default_instance() -> &'static Self {
16117 static DEFAULT: super::Validator = super::Validator::const_default();
16118 &DEFAULT
16119 }
16120 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
16122 self.name.as_mut().map(|field| field as _)
16123 }
16124 pub fn name_mut(&mut self) -> &mut String {
16127 self.name.get_or_insert_default()
16128 }
16129 pub fn name_opt(&self) -> Option<&str> {
16131 self.name.as_ref().map(|field| field as _)
16132 }
16133 pub fn set_name<T: Into<String>>(&mut self, field: T) {
16135 self.name = Some(field.into().into());
16136 }
16137 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
16139 self.set_name(field.into());
16140 self
16141 }
16142 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
16144 self.address.as_mut().map(|field| field as _)
16145 }
16146 pub fn address_mut(&mut self) -> &mut String {
16149 self.address.get_or_insert_default()
16150 }
16151 pub fn address_opt(&self) -> Option<&str> {
16153 self.address.as_ref().map(|field| field as _)
16154 }
16155 pub fn set_address<T: Into<String>>(&mut self, field: T) {
16157 self.address = Some(field.into().into());
16158 }
16159 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
16161 self.set_address(field.into());
16162 self
16163 }
16164 pub fn description_opt_mut(&mut self) -> Option<&mut String> {
16166 self.description.as_mut().map(|field| field as _)
16167 }
16168 pub fn description_mut(&mut self) -> &mut String {
16171 self.description.get_or_insert_default()
16172 }
16173 pub fn description_opt(&self) -> Option<&str> {
16175 self.description.as_ref().map(|field| field as _)
16176 }
16177 pub fn set_description<T: Into<String>>(&mut self, field: T) {
16179 self.description = Some(field.into().into());
16180 }
16181 pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
16183 self.set_description(field.into());
16184 self
16185 }
16186 pub fn image_url_opt_mut(&mut self) -> Option<&mut String> {
16188 self.image_url.as_mut().map(|field| field as _)
16189 }
16190 pub fn image_url_mut(&mut self) -> &mut String {
16193 self.image_url.get_or_insert_default()
16194 }
16195 pub fn image_url_opt(&self) -> Option<&str> {
16197 self.image_url.as_ref().map(|field| field as _)
16198 }
16199 pub fn set_image_url<T: Into<String>>(&mut self, field: T) {
16201 self.image_url = Some(field.into().into());
16202 }
16203 pub fn with_image_url<T: Into<String>>(mut self, field: T) -> Self {
16205 self.set_image_url(field.into());
16206 self
16207 }
16208 pub fn project_url_opt_mut(&mut self) -> Option<&mut String> {
16210 self.project_url.as_mut().map(|field| field as _)
16211 }
16212 pub fn project_url_mut(&mut self) -> &mut String {
16215 self.project_url.get_or_insert_default()
16216 }
16217 pub fn project_url_opt(&self) -> Option<&str> {
16219 self.project_url.as_ref().map(|field| field as _)
16220 }
16221 pub fn set_project_url<T: Into<String>>(&mut self, field: T) {
16223 self.project_url = Some(field.into().into());
16224 }
16225 pub fn with_project_url<T: Into<String>>(mut self, field: T) -> Self {
16227 self.set_project_url(field.into());
16228 self
16229 }
16230 pub fn protocol_public_key_opt(&self) -> Option<&[u8]> {
16232 self.protocol_public_key.as_ref().map(|field| field as _)
16233 }
16234 pub fn set_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
16236 &mut self,
16237 field: T,
16238 ) {
16239 self.protocol_public_key = Some(field.into().into());
16240 }
16241 pub fn with_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
16243 mut self,
16244 field: T,
16245 ) -> Self {
16246 self.set_protocol_public_key(field.into());
16247 self
16248 }
16249 pub fn proof_of_possession_opt(&self) -> Option<&[u8]> {
16251 self.proof_of_possession.as_ref().map(|field| field as _)
16252 }
16253 pub fn set_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
16255 &mut self,
16256 field: T,
16257 ) {
16258 self.proof_of_possession = Some(field.into().into());
16259 }
16260 pub fn with_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
16262 mut self,
16263 field: T,
16264 ) -> Self {
16265 self.set_proof_of_possession(field.into());
16266 self
16267 }
16268 pub fn network_public_key_opt(&self) -> Option<&[u8]> {
16270 self.network_public_key.as_ref().map(|field| field as _)
16271 }
16272 pub fn set_network_public_key<T: Into<::prost::bytes::Bytes>>(
16274 &mut self,
16275 field: T,
16276 ) {
16277 self.network_public_key = Some(field.into().into());
16278 }
16279 pub fn with_network_public_key<T: Into<::prost::bytes::Bytes>>(
16281 mut self,
16282 field: T,
16283 ) -> Self {
16284 self.set_network_public_key(field.into());
16285 self
16286 }
16287 pub fn worker_public_key_opt(&self) -> Option<&[u8]> {
16289 self.worker_public_key.as_ref().map(|field| field as _)
16290 }
16291 pub fn set_worker_public_key<T: Into<::prost::bytes::Bytes>>(
16293 &mut self,
16294 field: T,
16295 ) {
16296 self.worker_public_key = Some(field.into().into());
16297 }
16298 pub fn with_worker_public_key<T: Into<::prost::bytes::Bytes>>(
16300 mut self,
16301 field: T,
16302 ) -> Self {
16303 self.set_worker_public_key(field.into());
16304 self
16305 }
16306 pub fn network_address_opt_mut(&mut self) -> Option<&mut String> {
16308 self.network_address.as_mut().map(|field| field as _)
16309 }
16310 pub fn network_address_mut(&mut self) -> &mut String {
16313 self.network_address.get_or_insert_default()
16314 }
16315 pub fn network_address_opt(&self) -> Option<&str> {
16317 self.network_address.as_ref().map(|field| field as _)
16318 }
16319 pub fn set_network_address<T: Into<String>>(&mut self, field: T) {
16321 self.network_address = Some(field.into().into());
16322 }
16323 pub fn with_network_address<T: Into<String>>(mut self, field: T) -> Self {
16325 self.set_network_address(field.into());
16326 self
16327 }
16328 pub fn p2p_address_opt_mut(&mut self) -> Option<&mut String> {
16330 self.p2p_address.as_mut().map(|field| field as _)
16331 }
16332 pub fn p2p_address_mut(&mut self) -> &mut String {
16335 self.p2p_address.get_or_insert_default()
16336 }
16337 pub fn p2p_address_opt(&self) -> Option<&str> {
16339 self.p2p_address.as_ref().map(|field| field as _)
16340 }
16341 pub fn set_p2p_address<T: Into<String>>(&mut self, field: T) {
16343 self.p2p_address = Some(field.into().into());
16344 }
16345 pub fn with_p2p_address<T: Into<String>>(mut self, field: T) -> Self {
16347 self.set_p2p_address(field.into());
16348 self
16349 }
16350 pub fn primary_address_opt_mut(&mut self) -> Option<&mut String> {
16352 self.primary_address.as_mut().map(|field| field as _)
16353 }
16354 pub fn primary_address_mut(&mut self) -> &mut String {
16357 self.primary_address.get_or_insert_default()
16358 }
16359 pub fn primary_address_opt(&self) -> Option<&str> {
16361 self.primary_address.as_ref().map(|field| field as _)
16362 }
16363 pub fn set_primary_address<T: Into<String>>(&mut self, field: T) {
16365 self.primary_address = Some(field.into().into());
16366 }
16367 pub fn with_primary_address<T: Into<String>>(mut self, field: T) -> Self {
16369 self.set_primary_address(field.into());
16370 self
16371 }
16372 pub fn worker_address_opt_mut(&mut self) -> Option<&mut String> {
16374 self.worker_address.as_mut().map(|field| field as _)
16375 }
16376 pub fn worker_address_mut(&mut self) -> &mut String {
16379 self.worker_address.get_or_insert_default()
16380 }
16381 pub fn worker_address_opt(&self) -> Option<&str> {
16383 self.worker_address.as_ref().map(|field| field as _)
16384 }
16385 pub fn set_worker_address<T: Into<String>>(&mut self, field: T) {
16387 self.worker_address = Some(field.into().into());
16388 }
16389 pub fn with_worker_address<T: Into<String>>(mut self, field: T) -> Self {
16391 self.set_worker_address(field.into());
16392 self
16393 }
16394 pub fn next_epoch_protocol_public_key_opt(&self) -> Option<&[u8]> {
16396 self.next_epoch_protocol_public_key.as_ref().map(|field| field as _)
16397 }
16398 pub fn set_next_epoch_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
16400 &mut self,
16401 field: T,
16402 ) {
16403 self.next_epoch_protocol_public_key = Some(field.into().into());
16404 }
16405 pub fn with_next_epoch_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
16407 mut self,
16408 field: T,
16409 ) -> Self {
16410 self.set_next_epoch_protocol_public_key(field.into());
16411 self
16412 }
16413 pub fn next_epoch_proof_of_possession_opt(&self) -> Option<&[u8]> {
16415 self.next_epoch_proof_of_possession.as_ref().map(|field| field as _)
16416 }
16417 pub fn set_next_epoch_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
16419 &mut self,
16420 field: T,
16421 ) {
16422 self.next_epoch_proof_of_possession = Some(field.into().into());
16423 }
16424 pub fn with_next_epoch_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
16426 mut self,
16427 field: T,
16428 ) -> Self {
16429 self.set_next_epoch_proof_of_possession(field.into());
16430 self
16431 }
16432 pub fn next_epoch_network_public_key_opt(&self) -> Option<&[u8]> {
16434 self.next_epoch_network_public_key.as_ref().map(|field| field as _)
16435 }
16436 pub fn set_next_epoch_network_public_key<T: Into<::prost::bytes::Bytes>>(
16438 &mut self,
16439 field: T,
16440 ) {
16441 self.next_epoch_network_public_key = Some(field.into().into());
16442 }
16443 pub fn with_next_epoch_network_public_key<T: Into<::prost::bytes::Bytes>>(
16445 mut self,
16446 field: T,
16447 ) -> Self {
16448 self.set_next_epoch_network_public_key(field.into());
16449 self
16450 }
16451 pub fn next_epoch_worker_public_key_opt(&self) -> Option<&[u8]> {
16453 self.next_epoch_worker_public_key.as_ref().map(|field| field as _)
16454 }
16455 pub fn set_next_epoch_worker_public_key<T: Into<::prost::bytes::Bytes>>(
16457 &mut self,
16458 field: T,
16459 ) {
16460 self.next_epoch_worker_public_key = Some(field.into().into());
16461 }
16462 pub fn with_next_epoch_worker_public_key<T: Into<::prost::bytes::Bytes>>(
16464 mut self,
16465 field: T,
16466 ) -> Self {
16467 self.set_next_epoch_worker_public_key(field.into());
16468 self
16469 }
16470 pub fn next_epoch_network_address_opt_mut(&mut self) -> Option<&mut String> {
16472 self.next_epoch_network_address.as_mut().map(|field| field as _)
16473 }
16474 pub fn next_epoch_network_address_mut(&mut self) -> &mut String {
16477 self.next_epoch_network_address.get_or_insert_default()
16478 }
16479 pub fn next_epoch_network_address_opt(&self) -> Option<&str> {
16481 self.next_epoch_network_address.as_ref().map(|field| field as _)
16482 }
16483 pub fn set_next_epoch_network_address<T: Into<String>>(&mut self, field: T) {
16485 self.next_epoch_network_address = Some(field.into().into());
16486 }
16487 pub fn with_next_epoch_network_address<T: Into<String>>(
16489 mut self,
16490 field: T,
16491 ) -> Self {
16492 self.set_next_epoch_network_address(field.into());
16493 self
16494 }
16495 pub fn next_epoch_p2p_address_opt_mut(&mut self) -> Option<&mut String> {
16497 self.next_epoch_p2p_address.as_mut().map(|field| field as _)
16498 }
16499 pub fn next_epoch_p2p_address_mut(&mut self) -> &mut String {
16502 self.next_epoch_p2p_address.get_or_insert_default()
16503 }
16504 pub fn next_epoch_p2p_address_opt(&self) -> Option<&str> {
16506 self.next_epoch_p2p_address.as_ref().map(|field| field as _)
16507 }
16508 pub fn set_next_epoch_p2p_address<T: Into<String>>(&mut self, field: T) {
16510 self.next_epoch_p2p_address = Some(field.into().into());
16511 }
16512 pub fn with_next_epoch_p2p_address<T: Into<String>>(mut self, field: T) -> Self {
16514 self.set_next_epoch_p2p_address(field.into());
16515 self
16516 }
16517 pub fn next_epoch_primary_address_opt_mut(&mut self) -> Option<&mut String> {
16519 self.next_epoch_primary_address.as_mut().map(|field| field as _)
16520 }
16521 pub fn next_epoch_primary_address_mut(&mut self) -> &mut String {
16524 self.next_epoch_primary_address.get_or_insert_default()
16525 }
16526 pub fn next_epoch_primary_address_opt(&self) -> Option<&str> {
16528 self.next_epoch_primary_address.as_ref().map(|field| field as _)
16529 }
16530 pub fn set_next_epoch_primary_address<T: Into<String>>(&mut self, field: T) {
16532 self.next_epoch_primary_address = Some(field.into().into());
16533 }
16534 pub fn with_next_epoch_primary_address<T: Into<String>>(
16536 mut self,
16537 field: T,
16538 ) -> Self {
16539 self.set_next_epoch_primary_address(field.into());
16540 self
16541 }
16542 pub fn next_epoch_worker_address_opt_mut(&mut self) -> Option<&mut String> {
16544 self.next_epoch_worker_address.as_mut().map(|field| field as _)
16545 }
16546 pub fn next_epoch_worker_address_mut(&mut self) -> &mut String {
16549 self.next_epoch_worker_address.get_or_insert_default()
16550 }
16551 pub fn next_epoch_worker_address_opt(&self) -> Option<&str> {
16553 self.next_epoch_worker_address.as_ref().map(|field| field as _)
16554 }
16555 pub fn set_next_epoch_worker_address<T: Into<String>>(&mut self, field: T) {
16557 self.next_epoch_worker_address = Some(field.into().into());
16558 }
16559 pub fn with_next_epoch_worker_address<T: Into<String>>(
16561 mut self,
16562 field: T,
16563 ) -> Self {
16564 self.set_next_epoch_worker_address(field.into());
16565 self
16566 }
16567 pub fn metadata_extra_fields(&self) -> &super::MoveTable {
16569 self.metadata_extra_fields
16570 .as_ref()
16571 .map(|field| field as _)
16572 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16573 }
16574 pub fn metadata_extra_fields_opt_mut(
16576 &mut self,
16577 ) -> Option<&mut super::MoveTable> {
16578 self.metadata_extra_fields.as_mut().map(|field| field as _)
16579 }
16580 pub fn metadata_extra_fields_mut(&mut self) -> &mut super::MoveTable {
16583 self.metadata_extra_fields.get_or_insert_default()
16584 }
16585 pub fn metadata_extra_fields_opt(&self) -> Option<&super::MoveTable> {
16587 self.metadata_extra_fields.as_ref().map(|field| field as _)
16588 }
16589 pub fn set_metadata_extra_fields<T: Into<super::MoveTable>>(
16591 &mut self,
16592 field: T,
16593 ) {
16594 self.metadata_extra_fields = Some(field.into().into());
16595 }
16596 pub fn with_metadata_extra_fields<T: Into<super::MoveTable>>(
16598 mut self,
16599 field: T,
16600 ) -> Self {
16601 self.set_metadata_extra_fields(field.into());
16602 self
16603 }
16604 pub fn voting_power_opt_mut(&mut self) -> Option<&mut u64> {
16606 self.voting_power.as_mut().map(|field| field as _)
16607 }
16608 pub fn voting_power_mut(&mut self) -> &mut u64 {
16611 self.voting_power.get_or_insert_default()
16612 }
16613 pub fn voting_power_opt(&self) -> Option<u64> {
16615 self.voting_power.as_ref().map(|field| *field)
16616 }
16617 pub fn set_voting_power(&mut self, field: u64) {
16619 self.voting_power = Some(field);
16620 }
16621 pub fn with_voting_power(mut self, field: u64) -> Self {
16623 self.set_voting_power(field);
16624 self
16625 }
16626 pub fn operation_cap_id_opt_mut(&mut self) -> Option<&mut String> {
16628 self.operation_cap_id.as_mut().map(|field| field as _)
16629 }
16630 pub fn operation_cap_id_mut(&mut self) -> &mut String {
16633 self.operation_cap_id.get_or_insert_default()
16634 }
16635 pub fn operation_cap_id_opt(&self) -> Option<&str> {
16637 self.operation_cap_id.as_ref().map(|field| field as _)
16638 }
16639 pub fn set_operation_cap_id<T: Into<String>>(&mut self, field: T) {
16641 self.operation_cap_id = Some(field.into().into());
16642 }
16643 pub fn with_operation_cap_id<T: Into<String>>(mut self, field: T) -> Self {
16645 self.set_operation_cap_id(field.into());
16646 self
16647 }
16648 pub fn gas_price_opt_mut(&mut self) -> Option<&mut u64> {
16650 self.gas_price.as_mut().map(|field| field as _)
16651 }
16652 pub fn gas_price_mut(&mut self) -> &mut u64 {
16655 self.gas_price.get_or_insert_default()
16656 }
16657 pub fn gas_price_opt(&self) -> Option<u64> {
16659 self.gas_price.as_ref().map(|field| *field)
16660 }
16661 pub fn set_gas_price(&mut self, field: u64) {
16663 self.gas_price = Some(field);
16664 }
16665 pub fn with_gas_price(mut self, field: u64) -> Self {
16667 self.set_gas_price(field);
16668 self
16669 }
16670 pub fn staking_pool(&self) -> &super::StakingPool {
16672 self.staking_pool
16673 .as_ref()
16674 .map(|field| field as _)
16675 .unwrap_or_else(|| super::StakingPool::default_instance() as _)
16676 }
16677 pub fn staking_pool_opt_mut(&mut self) -> Option<&mut super::StakingPool> {
16679 self.staking_pool.as_mut().map(|field| field as _)
16680 }
16681 pub fn staking_pool_mut(&mut self) -> &mut super::StakingPool {
16684 self.staking_pool.get_or_insert_default()
16685 }
16686 pub fn staking_pool_opt(&self) -> Option<&super::StakingPool> {
16688 self.staking_pool.as_ref().map(|field| field as _)
16689 }
16690 pub fn set_staking_pool<T: Into<super::StakingPool>>(&mut self, field: T) {
16692 self.staking_pool = Some(field.into().into());
16693 }
16694 pub fn with_staking_pool<T: Into<super::StakingPool>>(
16696 mut self,
16697 field: T,
16698 ) -> Self {
16699 self.set_staking_pool(field.into());
16700 self
16701 }
16702 pub fn commission_rate_opt_mut(&mut self) -> Option<&mut u64> {
16704 self.commission_rate.as_mut().map(|field| field as _)
16705 }
16706 pub fn commission_rate_mut(&mut self) -> &mut u64 {
16709 self.commission_rate.get_or_insert_default()
16710 }
16711 pub fn commission_rate_opt(&self) -> Option<u64> {
16713 self.commission_rate.as_ref().map(|field| *field)
16714 }
16715 pub fn set_commission_rate(&mut self, field: u64) {
16717 self.commission_rate = Some(field);
16718 }
16719 pub fn with_commission_rate(mut self, field: u64) -> Self {
16721 self.set_commission_rate(field);
16722 self
16723 }
16724 pub fn next_epoch_stake_opt_mut(&mut self) -> Option<&mut u64> {
16726 self.next_epoch_stake.as_mut().map(|field| field as _)
16727 }
16728 pub fn next_epoch_stake_mut(&mut self) -> &mut u64 {
16731 self.next_epoch_stake.get_or_insert_default()
16732 }
16733 pub fn next_epoch_stake_opt(&self) -> Option<u64> {
16735 self.next_epoch_stake.as_ref().map(|field| *field)
16736 }
16737 pub fn set_next_epoch_stake(&mut self, field: u64) {
16739 self.next_epoch_stake = Some(field);
16740 }
16741 pub fn with_next_epoch_stake(mut self, field: u64) -> Self {
16743 self.set_next_epoch_stake(field);
16744 self
16745 }
16746 pub fn next_epoch_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
16748 self.next_epoch_gas_price.as_mut().map(|field| field as _)
16749 }
16750 pub fn next_epoch_gas_price_mut(&mut self) -> &mut u64 {
16753 self.next_epoch_gas_price.get_or_insert_default()
16754 }
16755 pub fn next_epoch_gas_price_opt(&self) -> Option<u64> {
16757 self.next_epoch_gas_price.as_ref().map(|field| *field)
16758 }
16759 pub fn set_next_epoch_gas_price(&mut self, field: u64) {
16761 self.next_epoch_gas_price = Some(field);
16762 }
16763 pub fn with_next_epoch_gas_price(mut self, field: u64) -> Self {
16765 self.set_next_epoch_gas_price(field);
16766 self
16767 }
16768 pub fn next_epoch_commission_rate_opt_mut(&mut self) -> Option<&mut u64> {
16770 self.next_epoch_commission_rate.as_mut().map(|field| field as _)
16771 }
16772 pub fn next_epoch_commission_rate_mut(&mut self) -> &mut u64 {
16775 self.next_epoch_commission_rate.get_or_insert_default()
16776 }
16777 pub fn next_epoch_commission_rate_opt(&self) -> Option<u64> {
16779 self.next_epoch_commission_rate.as_ref().map(|field| *field)
16780 }
16781 pub fn set_next_epoch_commission_rate(&mut self, field: u64) {
16783 self.next_epoch_commission_rate = Some(field);
16784 }
16785 pub fn with_next_epoch_commission_rate(mut self, field: u64) -> Self {
16787 self.set_next_epoch_commission_rate(field);
16788 self
16789 }
16790 pub fn extra_fields(&self) -> &super::MoveTable {
16792 self.extra_fields
16793 .as_ref()
16794 .map(|field| field as _)
16795 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16796 }
16797 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
16799 self.extra_fields.as_mut().map(|field| field as _)
16800 }
16801 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
16804 self.extra_fields.get_or_insert_default()
16805 }
16806 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
16808 self.extra_fields.as_ref().map(|field| field as _)
16809 }
16810 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
16812 self.extra_fields = Some(field.into().into());
16813 }
16814 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
16816 self.set_extra_fields(field.into());
16817 self
16818 }
16819 }
16820 impl super::ValidatorAggregatedSignature {
16821 pub const fn const_default() -> Self {
16822 Self {
16823 epoch: None,
16824 signature: None,
16825 bitmap: None,
16826 }
16827 }
16828 #[doc(hidden)]
16829 pub fn default_instance() -> &'static Self {
16830 static DEFAULT: super::ValidatorAggregatedSignature = super::ValidatorAggregatedSignature::const_default();
16831 &DEFAULT
16832 }
16833 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
16835 self.epoch.as_mut().map(|field| field as _)
16836 }
16837 pub fn epoch_mut(&mut self) -> &mut u64 {
16840 self.epoch.get_or_insert_default()
16841 }
16842 pub fn epoch_opt(&self) -> Option<u64> {
16844 self.epoch.as_ref().map(|field| *field)
16845 }
16846 pub fn set_epoch(&mut self, field: u64) {
16848 self.epoch = Some(field);
16849 }
16850 pub fn with_epoch(mut self, field: u64) -> Self {
16852 self.set_epoch(field);
16853 self
16854 }
16855 pub fn signature_opt(&self) -> Option<&[u8]> {
16857 self.signature.as_ref().map(|field| field as _)
16858 }
16859 pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16861 self.signature = Some(field.into().into());
16862 }
16863 pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
16865 mut self,
16866 field: T,
16867 ) -> Self {
16868 self.set_signature(field.into());
16869 self
16870 }
16871 pub fn bitmap_opt(&self) -> Option<&[u8]> {
16873 self.bitmap.as_ref().map(|field| field as _)
16874 }
16875 pub fn set_bitmap<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16877 self.bitmap = Some(field.into().into());
16878 }
16879 pub fn with_bitmap<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
16881 self.set_bitmap(field.into());
16882 self
16883 }
16884 }
16885 impl super::ValidatorCommittee {
16886 pub const fn const_default() -> Self {
16887 Self {
16888 epoch: None,
16889 members: Vec::new(),
16890 }
16891 }
16892 #[doc(hidden)]
16893 pub fn default_instance() -> &'static Self {
16894 static DEFAULT: super::ValidatorCommittee = super::ValidatorCommittee::const_default();
16895 &DEFAULT
16896 }
16897 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
16899 self.epoch.as_mut().map(|field| field as _)
16900 }
16901 pub fn epoch_mut(&mut self) -> &mut u64 {
16904 self.epoch.get_or_insert_default()
16905 }
16906 pub fn epoch_opt(&self) -> Option<u64> {
16908 self.epoch.as_ref().map(|field| *field)
16909 }
16910 pub fn set_epoch(&mut self, field: u64) {
16912 self.epoch = Some(field);
16913 }
16914 pub fn with_epoch(mut self, field: u64) -> Self {
16916 self.set_epoch(field);
16917 self
16918 }
16919 pub fn members(&self) -> &[super::ValidatorCommitteeMember] {
16921 &self.members
16922 }
16923 pub fn members_mut(&mut self) -> &mut Vec<super::ValidatorCommitteeMember> {
16926 &mut self.members
16927 }
16928 pub fn set_members(&mut self, field: Vec<super::ValidatorCommitteeMember>) {
16930 self.members = field;
16931 }
16932 pub fn with_members(
16934 mut self,
16935 field: Vec<super::ValidatorCommitteeMember>,
16936 ) -> Self {
16937 self.set_members(field);
16938 self
16939 }
16940 }
16941 impl super::ValidatorCommitteeMember {
16942 pub const fn const_default() -> Self {
16943 Self {
16944 public_key: None,
16945 weight: None,
16946 }
16947 }
16948 #[doc(hidden)]
16949 pub fn default_instance() -> &'static Self {
16950 static DEFAULT: super::ValidatorCommitteeMember = super::ValidatorCommitteeMember::const_default();
16951 &DEFAULT
16952 }
16953 pub fn public_key_opt(&self) -> Option<&[u8]> {
16955 self.public_key.as_ref().map(|field| field as _)
16956 }
16957 pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16959 self.public_key = Some(field.into().into());
16960 }
16961 pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
16963 mut self,
16964 field: T,
16965 ) -> Self {
16966 self.set_public_key(field.into());
16967 self
16968 }
16969 pub fn weight_opt_mut(&mut self) -> Option<&mut u64> {
16971 self.weight.as_mut().map(|field| field as _)
16972 }
16973 pub fn weight_mut(&mut self) -> &mut u64 {
16976 self.weight.get_or_insert_default()
16977 }
16978 pub fn weight_opt(&self) -> Option<u64> {
16980 self.weight.as_ref().map(|field| *field)
16981 }
16982 pub fn set_weight(&mut self, field: u64) {
16984 self.weight = Some(field);
16985 }
16986 pub fn with_weight(mut self, field: u64) -> Self {
16988 self.set_weight(field);
16989 self
16990 }
16991 }
16992 impl super::ValidatorExecutionTimeObservation {
16993 pub const fn const_default() -> Self {
16994 Self {
16995 validator: None,
16996 duration: None,
16997 }
16998 }
16999 #[doc(hidden)]
17000 pub fn default_instance() -> &'static Self {
17001 static DEFAULT: super::ValidatorExecutionTimeObservation = super::ValidatorExecutionTimeObservation::const_default();
17002 &DEFAULT
17003 }
17004 pub fn validator_opt(&self) -> Option<&[u8]> {
17006 self.validator.as_ref().map(|field| field as _)
17007 }
17008 pub fn set_validator<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
17010 self.validator = Some(field.into().into());
17011 }
17012 pub fn with_validator<T: Into<::prost::bytes::Bytes>>(
17014 mut self,
17015 field: T,
17016 ) -> Self {
17017 self.set_validator(field.into());
17018 self
17019 }
17020 pub fn duration_opt_mut(&mut self) -> Option<&mut ::prost_types::Duration> {
17022 self.duration.as_mut().map(|field| field as _)
17023 }
17024 pub fn duration_mut(&mut self) -> &mut ::prost_types::Duration {
17027 self.duration.get_or_insert_default()
17028 }
17029 pub fn duration_opt(&self) -> Option<&::prost_types::Duration> {
17031 self.duration.as_ref().map(|field| field as _)
17032 }
17033 pub fn set_duration<T: Into<::prost_types::Duration>>(&mut self, field: T) {
17035 self.duration = Some(field.into().into());
17036 }
17037 pub fn with_duration<T: Into<::prost_types::Duration>>(
17039 mut self,
17040 field: T,
17041 ) -> Self {
17042 self.set_duration(field.into());
17043 self
17044 }
17045 }
17046 impl super::ValidatorReportRecord {
17047 pub const fn const_default() -> Self {
17048 Self {
17049 reported: None,
17050 reporters: Vec::new(),
17051 }
17052 }
17053 #[doc(hidden)]
17054 pub fn default_instance() -> &'static Self {
17055 static DEFAULT: super::ValidatorReportRecord = super::ValidatorReportRecord::const_default();
17056 &DEFAULT
17057 }
17058 pub fn reported_opt_mut(&mut self) -> Option<&mut String> {
17060 self.reported.as_mut().map(|field| field as _)
17061 }
17062 pub fn reported_mut(&mut self) -> &mut String {
17065 self.reported.get_or_insert_default()
17066 }
17067 pub fn reported_opt(&self) -> Option<&str> {
17069 self.reported.as_ref().map(|field| field as _)
17070 }
17071 pub fn set_reported<T: Into<String>>(&mut self, field: T) {
17073 self.reported = Some(field.into().into());
17074 }
17075 pub fn with_reported<T: Into<String>>(mut self, field: T) -> Self {
17077 self.set_reported(field.into());
17078 self
17079 }
17080 pub fn reporters(&self) -> &[String] {
17082 &self.reporters
17083 }
17084 pub fn reporters_mut(&mut self) -> &mut Vec<String> {
17087 &mut self.reporters
17088 }
17089 pub fn set_reporters(&mut self, field: Vec<String>) {
17091 self.reporters = field;
17092 }
17093 pub fn with_reporters(mut self, field: Vec<String>) -> Self {
17095 self.set_reporters(field);
17096 self
17097 }
17098 }
17099 impl super::ValidatorSet {
17100 pub const fn const_default() -> Self {
17101 Self {
17102 total_stake: None,
17103 active_validators: Vec::new(),
17104 pending_active_validators: None,
17105 pending_removals: Vec::new(),
17106 staking_pool_mappings: None,
17107 inactive_validators: None,
17108 validator_candidates: None,
17109 at_risk_validators: std::collections::BTreeMap::new(),
17110 extra_fields: None,
17111 }
17112 }
17113 #[doc(hidden)]
17114 pub fn default_instance() -> &'static Self {
17115 static DEFAULT: super::ValidatorSet = super::ValidatorSet::const_default();
17116 &DEFAULT
17117 }
17118 pub fn total_stake_opt_mut(&mut self) -> Option<&mut u64> {
17120 self.total_stake.as_mut().map(|field| field as _)
17121 }
17122 pub fn total_stake_mut(&mut self) -> &mut u64 {
17125 self.total_stake.get_or_insert_default()
17126 }
17127 pub fn total_stake_opt(&self) -> Option<u64> {
17129 self.total_stake.as_ref().map(|field| *field)
17130 }
17131 pub fn set_total_stake(&mut self, field: u64) {
17133 self.total_stake = Some(field);
17134 }
17135 pub fn with_total_stake(mut self, field: u64) -> Self {
17137 self.set_total_stake(field);
17138 self
17139 }
17140 pub fn active_validators(&self) -> &[super::Validator] {
17142 &self.active_validators
17143 }
17144 pub fn active_validators_mut(&mut self) -> &mut Vec<super::Validator> {
17147 &mut self.active_validators
17148 }
17149 pub fn set_active_validators(&mut self, field: Vec<super::Validator>) {
17151 self.active_validators = field;
17152 }
17153 pub fn with_active_validators(mut self, field: Vec<super::Validator>) -> Self {
17155 self.set_active_validators(field);
17156 self
17157 }
17158 pub fn pending_active_validators(&self) -> &super::MoveTable {
17160 self.pending_active_validators
17161 .as_ref()
17162 .map(|field| field as _)
17163 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17164 }
17165 pub fn pending_active_validators_opt_mut(
17167 &mut self,
17168 ) -> Option<&mut super::MoveTable> {
17169 self.pending_active_validators.as_mut().map(|field| field as _)
17170 }
17171 pub fn pending_active_validators_mut(&mut self) -> &mut super::MoveTable {
17174 self.pending_active_validators.get_or_insert_default()
17175 }
17176 pub fn pending_active_validators_opt(&self) -> Option<&super::MoveTable> {
17178 self.pending_active_validators.as_ref().map(|field| field as _)
17179 }
17180 pub fn set_pending_active_validators<T: Into<super::MoveTable>>(
17182 &mut self,
17183 field: T,
17184 ) {
17185 self.pending_active_validators = Some(field.into().into());
17186 }
17187 pub fn with_pending_active_validators<T: Into<super::MoveTable>>(
17189 mut self,
17190 field: T,
17191 ) -> Self {
17192 self.set_pending_active_validators(field.into());
17193 self
17194 }
17195 pub fn pending_removals(&self) -> &[u64] {
17197 &self.pending_removals
17198 }
17199 pub fn pending_removals_mut(&mut self) -> &mut Vec<u64> {
17202 &mut self.pending_removals
17203 }
17204 pub fn set_pending_removals(&mut self, field: Vec<u64>) {
17206 self.pending_removals = field;
17207 }
17208 pub fn with_pending_removals(mut self, field: Vec<u64>) -> Self {
17210 self.set_pending_removals(field);
17211 self
17212 }
17213 pub fn staking_pool_mappings(&self) -> &super::MoveTable {
17215 self.staking_pool_mappings
17216 .as_ref()
17217 .map(|field| field as _)
17218 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17219 }
17220 pub fn staking_pool_mappings_opt_mut(
17222 &mut self,
17223 ) -> Option<&mut super::MoveTable> {
17224 self.staking_pool_mappings.as_mut().map(|field| field as _)
17225 }
17226 pub fn staking_pool_mappings_mut(&mut self) -> &mut super::MoveTable {
17229 self.staking_pool_mappings.get_or_insert_default()
17230 }
17231 pub fn staking_pool_mappings_opt(&self) -> Option<&super::MoveTable> {
17233 self.staking_pool_mappings.as_ref().map(|field| field as _)
17234 }
17235 pub fn set_staking_pool_mappings<T: Into<super::MoveTable>>(
17237 &mut self,
17238 field: T,
17239 ) {
17240 self.staking_pool_mappings = Some(field.into().into());
17241 }
17242 pub fn with_staking_pool_mappings<T: Into<super::MoveTable>>(
17244 mut self,
17245 field: T,
17246 ) -> Self {
17247 self.set_staking_pool_mappings(field.into());
17248 self
17249 }
17250 pub fn inactive_validators(&self) -> &super::MoveTable {
17252 self.inactive_validators
17253 .as_ref()
17254 .map(|field| field as _)
17255 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17256 }
17257 pub fn inactive_validators_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
17259 self.inactive_validators.as_mut().map(|field| field as _)
17260 }
17261 pub fn inactive_validators_mut(&mut self) -> &mut super::MoveTable {
17264 self.inactive_validators.get_or_insert_default()
17265 }
17266 pub fn inactive_validators_opt(&self) -> Option<&super::MoveTable> {
17268 self.inactive_validators.as_ref().map(|field| field as _)
17269 }
17270 pub fn set_inactive_validators<T: Into<super::MoveTable>>(&mut self, field: T) {
17272 self.inactive_validators = Some(field.into().into());
17273 }
17274 pub fn with_inactive_validators<T: Into<super::MoveTable>>(
17276 mut self,
17277 field: T,
17278 ) -> Self {
17279 self.set_inactive_validators(field.into());
17280 self
17281 }
17282 pub fn validator_candidates(&self) -> &super::MoveTable {
17284 self.validator_candidates
17285 .as_ref()
17286 .map(|field| field as _)
17287 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17288 }
17289 pub fn validator_candidates_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
17291 self.validator_candidates.as_mut().map(|field| field as _)
17292 }
17293 pub fn validator_candidates_mut(&mut self) -> &mut super::MoveTable {
17296 self.validator_candidates.get_or_insert_default()
17297 }
17298 pub fn validator_candidates_opt(&self) -> Option<&super::MoveTable> {
17300 self.validator_candidates.as_ref().map(|field| field as _)
17301 }
17302 pub fn set_validator_candidates<T: Into<super::MoveTable>>(&mut self, field: T) {
17304 self.validator_candidates = Some(field.into().into());
17305 }
17306 pub fn with_validator_candidates<T: Into<super::MoveTable>>(
17308 mut self,
17309 field: T,
17310 ) -> Self {
17311 self.set_validator_candidates(field.into());
17312 self
17313 }
17314 pub fn at_risk_validators(&self) -> &::std::collections::BTreeMap<String, u64> {
17316 &self.at_risk_validators
17317 }
17318 pub fn at_risk_validators_mut(
17321 &mut self,
17322 ) -> &mut ::std::collections::BTreeMap<String, u64> {
17323 &mut self.at_risk_validators
17324 }
17325 pub fn set_at_risk_validators(
17327 &mut self,
17328 field: ::std::collections::BTreeMap<String, u64>,
17329 ) {
17330 self.at_risk_validators = field;
17331 }
17332 pub fn with_at_risk_validators(
17334 mut self,
17335 field: ::std::collections::BTreeMap<String, u64>,
17336 ) -> Self {
17337 self.set_at_risk_validators(field);
17338 self
17339 }
17340 pub fn extra_fields(&self) -> &super::MoveTable {
17342 self.extra_fields
17343 .as_ref()
17344 .map(|field| field as _)
17345 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17346 }
17347 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
17349 self.extra_fields.as_mut().map(|field| field as _)
17350 }
17351 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
17354 self.extra_fields.get_or_insert_default()
17355 }
17356 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
17358 self.extra_fields.as_ref().map(|field| field as _)
17359 }
17360 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
17362 self.extra_fields = Some(field.into().into());
17363 }
17364 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
17366 self.set_extra_fields(field.into());
17367 self
17368 }
17369 }
17370 impl super::VariantDescriptor {
17371 pub const fn const_default() -> Self {
17372 Self {
17373 name: None,
17374 position: None,
17375 fields: Vec::new(),
17376 }
17377 }
17378 #[doc(hidden)]
17379 pub fn default_instance() -> &'static Self {
17380 static DEFAULT: super::VariantDescriptor = super::VariantDescriptor::const_default();
17381 &DEFAULT
17382 }
17383 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
17385 self.name.as_mut().map(|field| field as _)
17386 }
17387 pub fn name_mut(&mut self) -> &mut String {
17390 self.name.get_or_insert_default()
17391 }
17392 pub fn name_opt(&self) -> Option<&str> {
17394 self.name.as_ref().map(|field| field as _)
17395 }
17396 pub fn set_name<T: Into<String>>(&mut self, field: T) {
17398 self.name = Some(field.into().into());
17399 }
17400 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
17402 self.set_name(field.into());
17403 self
17404 }
17405 pub fn position_opt_mut(&mut self) -> Option<&mut u32> {
17407 self.position.as_mut().map(|field| field as _)
17408 }
17409 pub fn position_mut(&mut self) -> &mut u32 {
17412 self.position.get_or_insert_default()
17413 }
17414 pub fn position_opt(&self) -> Option<u32> {
17416 self.position.as_ref().map(|field| *field)
17417 }
17418 pub fn set_position(&mut self, field: u32) {
17420 self.position = Some(field);
17421 }
17422 pub fn with_position(mut self, field: u32) -> Self {
17424 self.set_position(field);
17425 self
17426 }
17427 pub fn fields(&self) -> &[super::FieldDescriptor] {
17429 &self.fields
17430 }
17431 pub fn fields_mut(&mut self) -> &mut Vec<super::FieldDescriptor> {
17434 &mut self.fields
17435 }
17436 pub fn set_fields(&mut self, field: Vec<super::FieldDescriptor>) {
17438 self.fields = field;
17439 }
17440 pub fn with_fields(mut self, field: Vec<super::FieldDescriptor>) -> Self {
17442 self.set_fields(field);
17443 self
17444 }
17445 }
17446 impl super::VerifySignatureRequest {
17447 pub const fn const_default() -> Self {
17448 Self {
17449 message: None,
17450 signature: None,
17451 address: None,
17452 jwks: Vec::new(),
17453 }
17454 }
17455 #[doc(hidden)]
17456 pub fn default_instance() -> &'static Self {
17457 static DEFAULT: super::VerifySignatureRequest = super::VerifySignatureRequest::const_default();
17458 &DEFAULT
17459 }
17460 pub fn message(&self) -> &super::Bcs {
17462 self.message
17463 .as_ref()
17464 .map(|field| field as _)
17465 .unwrap_or_else(|| super::Bcs::default_instance() as _)
17466 }
17467 pub fn message_opt_mut(&mut self) -> Option<&mut super::Bcs> {
17469 self.message.as_mut().map(|field| field as _)
17470 }
17471 pub fn message_mut(&mut self) -> &mut super::Bcs {
17474 self.message.get_or_insert_default()
17475 }
17476 pub fn message_opt(&self) -> Option<&super::Bcs> {
17478 self.message.as_ref().map(|field| field as _)
17479 }
17480 pub fn set_message<T: Into<super::Bcs>>(&mut self, field: T) {
17482 self.message = Some(field.into().into());
17483 }
17484 pub fn with_message<T: Into<super::Bcs>>(mut self, field: T) -> Self {
17486 self.set_message(field.into());
17487 self
17488 }
17489 pub fn signature(&self) -> &super::UserSignature {
17491 self.signature
17492 .as_ref()
17493 .map(|field| field as _)
17494 .unwrap_or_else(|| super::UserSignature::default_instance() as _)
17495 }
17496 pub fn signature_opt_mut(&mut self) -> Option<&mut super::UserSignature> {
17498 self.signature.as_mut().map(|field| field as _)
17499 }
17500 pub fn signature_mut(&mut self) -> &mut super::UserSignature {
17503 self.signature.get_or_insert_default()
17504 }
17505 pub fn signature_opt(&self) -> Option<&super::UserSignature> {
17507 self.signature.as_ref().map(|field| field as _)
17508 }
17509 pub fn set_signature<T: Into<super::UserSignature>>(&mut self, field: T) {
17511 self.signature = Some(field.into().into());
17512 }
17513 pub fn with_signature<T: Into<super::UserSignature>>(
17515 mut self,
17516 field: T,
17517 ) -> Self {
17518 self.set_signature(field.into());
17519 self
17520 }
17521 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
17523 self.address.as_mut().map(|field| field as _)
17524 }
17525 pub fn address_mut(&mut self) -> &mut String {
17528 self.address.get_or_insert_default()
17529 }
17530 pub fn address_opt(&self) -> Option<&str> {
17532 self.address.as_ref().map(|field| field as _)
17533 }
17534 pub fn set_address<T: Into<String>>(&mut self, field: T) {
17536 self.address = Some(field.into().into());
17537 }
17538 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
17540 self.set_address(field.into());
17541 self
17542 }
17543 pub fn jwks(&self) -> &[super::ActiveJwk] {
17545 &self.jwks
17546 }
17547 pub fn jwks_mut(&mut self) -> &mut Vec<super::ActiveJwk> {
17550 &mut self.jwks
17551 }
17552 pub fn set_jwks(&mut self, field: Vec<super::ActiveJwk>) {
17554 self.jwks = field;
17555 }
17556 pub fn with_jwks(mut self, field: Vec<super::ActiveJwk>) -> Self {
17558 self.set_jwks(field);
17559 self
17560 }
17561 }
17562 impl super::VerifySignatureResponse {
17563 pub const fn const_default() -> Self {
17564 Self {
17565 is_valid: None,
17566 reason: None,
17567 }
17568 }
17569 #[doc(hidden)]
17570 pub fn default_instance() -> &'static Self {
17571 static DEFAULT: super::VerifySignatureResponse = super::VerifySignatureResponse::const_default();
17572 &DEFAULT
17573 }
17574 pub fn is_valid_opt_mut(&mut self) -> Option<&mut bool> {
17576 self.is_valid.as_mut().map(|field| field as _)
17577 }
17578 pub fn is_valid_mut(&mut self) -> &mut bool {
17581 self.is_valid.get_or_insert_default()
17582 }
17583 pub fn is_valid_opt(&self) -> Option<bool> {
17585 self.is_valid.as_ref().map(|field| *field)
17586 }
17587 pub fn set_is_valid(&mut self, field: bool) {
17589 self.is_valid = Some(field);
17590 }
17591 pub fn with_is_valid(mut self, field: bool) -> Self {
17593 self.set_is_valid(field);
17594 self
17595 }
17596 pub fn reason_opt_mut(&mut self) -> Option<&mut String> {
17598 self.reason.as_mut().map(|field| field as _)
17599 }
17600 pub fn reason_mut(&mut self) -> &mut String {
17603 self.reason.get_or_insert_default()
17604 }
17605 pub fn reason_opt(&self) -> Option<&str> {
17607 self.reason.as_ref().map(|field| field as _)
17608 }
17609 pub fn set_reason<T: Into<String>>(&mut self, field: T) {
17611 self.reason = Some(field.into().into());
17612 }
17613 pub fn with_reason<T: Into<String>>(mut self, field: T) -> Self {
17615 self.set_reason(field.into());
17616 self
17617 }
17618 }
17619 impl super::VersionAssignment {
17620 pub const fn const_default() -> Self {
17621 Self {
17622 object_id: None,
17623 start_version: None,
17624 version: None,
17625 }
17626 }
17627 #[doc(hidden)]
17628 pub fn default_instance() -> &'static Self {
17629 static DEFAULT: super::VersionAssignment = super::VersionAssignment::const_default();
17630 &DEFAULT
17631 }
17632 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
17634 self.object_id.as_mut().map(|field| field as _)
17635 }
17636 pub fn object_id_mut(&mut self) -> &mut String {
17639 self.object_id.get_or_insert_default()
17640 }
17641 pub fn object_id_opt(&self) -> Option<&str> {
17643 self.object_id.as_ref().map(|field| field as _)
17644 }
17645 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
17647 self.object_id = Some(field.into().into());
17648 }
17649 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
17651 self.set_object_id(field.into());
17652 self
17653 }
17654 pub fn start_version_opt_mut(&mut self) -> Option<&mut u64> {
17656 self.start_version.as_mut().map(|field| field as _)
17657 }
17658 pub fn start_version_mut(&mut self) -> &mut u64 {
17661 self.start_version.get_or_insert_default()
17662 }
17663 pub fn start_version_opt(&self) -> Option<u64> {
17665 self.start_version.as_ref().map(|field| *field)
17666 }
17667 pub fn set_start_version(&mut self, field: u64) {
17669 self.start_version = Some(field);
17670 }
17671 pub fn with_start_version(mut self, field: u64) -> Self {
17673 self.set_start_version(field);
17674 self
17675 }
17676 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
17678 self.version.as_mut().map(|field| field as _)
17679 }
17680 pub fn version_mut(&mut self) -> &mut u64 {
17683 self.version.get_or_insert_default()
17684 }
17685 pub fn version_opt(&self) -> Option<u64> {
17687 self.version.as_ref().map(|field| *field)
17688 }
17689 pub fn set_version(&mut self, field: u64) {
17691 self.version = Some(field);
17692 }
17693 pub fn with_version(mut self, field: u64) -> Self {
17695 self.set_version(field);
17696 self
17697 }
17698 }
17699 impl super::ZkLoginAuthenticator {
17700 pub const fn const_default() -> Self {
17701 Self {
17702 inputs: None,
17703 max_epoch: None,
17704 signature: None,
17705 public_identifier: None,
17706 jwk_id: None,
17707 }
17708 }
17709 #[doc(hidden)]
17710 pub fn default_instance() -> &'static Self {
17711 static DEFAULT: super::ZkLoginAuthenticator = super::ZkLoginAuthenticator::const_default();
17712 &DEFAULT
17713 }
17714 pub fn inputs(&self) -> &super::ZkLoginInputs {
17716 self.inputs
17717 .as_ref()
17718 .map(|field| field as _)
17719 .unwrap_or_else(|| super::ZkLoginInputs::default_instance() as _)
17720 }
17721 pub fn inputs_opt_mut(&mut self) -> Option<&mut super::ZkLoginInputs> {
17723 self.inputs.as_mut().map(|field| field as _)
17724 }
17725 pub fn inputs_mut(&mut self) -> &mut super::ZkLoginInputs {
17728 self.inputs.get_or_insert_default()
17729 }
17730 pub fn inputs_opt(&self) -> Option<&super::ZkLoginInputs> {
17732 self.inputs.as_ref().map(|field| field as _)
17733 }
17734 pub fn set_inputs<T: Into<super::ZkLoginInputs>>(&mut self, field: T) {
17736 self.inputs = Some(field.into().into());
17737 }
17738 pub fn with_inputs<T: Into<super::ZkLoginInputs>>(mut self, field: T) -> Self {
17740 self.set_inputs(field.into());
17741 self
17742 }
17743 pub fn max_epoch_opt_mut(&mut self) -> Option<&mut u64> {
17745 self.max_epoch.as_mut().map(|field| field as _)
17746 }
17747 pub fn max_epoch_mut(&mut self) -> &mut u64 {
17750 self.max_epoch.get_or_insert_default()
17751 }
17752 pub fn max_epoch_opt(&self) -> Option<u64> {
17754 self.max_epoch.as_ref().map(|field| *field)
17755 }
17756 pub fn set_max_epoch(&mut self, field: u64) {
17758 self.max_epoch = Some(field);
17759 }
17760 pub fn with_max_epoch(mut self, field: u64) -> Self {
17762 self.set_max_epoch(field);
17763 self
17764 }
17765 pub fn signature(&self) -> &super::SimpleSignature {
17767 self.signature
17768 .as_ref()
17769 .map(|field| field as _)
17770 .unwrap_or_else(|| super::SimpleSignature::default_instance() as _)
17771 }
17772 pub fn signature_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
17774 self.signature.as_mut().map(|field| field as _)
17775 }
17776 pub fn signature_mut(&mut self) -> &mut super::SimpleSignature {
17779 self.signature.get_or_insert_default()
17780 }
17781 pub fn signature_opt(&self) -> Option<&super::SimpleSignature> {
17783 self.signature.as_ref().map(|field| field as _)
17784 }
17785 pub fn set_signature<T: Into<super::SimpleSignature>>(&mut self, field: T) {
17787 self.signature = Some(field.into().into());
17788 }
17789 pub fn with_signature<T: Into<super::SimpleSignature>>(
17791 mut self,
17792 field: T,
17793 ) -> Self {
17794 self.set_signature(field.into());
17795 self
17796 }
17797 pub fn public_identifier(&self) -> &super::ZkLoginPublicIdentifier {
17799 self.public_identifier
17800 .as_ref()
17801 .map(|field| field as _)
17802 .unwrap_or_else(|| {
17803 super::ZkLoginPublicIdentifier::default_instance() as _
17804 })
17805 }
17806 pub fn public_identifier_opt_mut(
17808 &mut self,
17809 ) -> Option<&mut super::ZkLoginPublicIdentifier> {
17810 self.public_identifier.as_mut().map(|field| field as _)
17811 }
17812 pub fn public_identifier_mut(&mut self) -> &mut super::ZkLoginPublicIdentifier {
17815 self.public_identifier.get_or_insert_default()
17816 }
17817 pub fn public_identifier_opt(&self) -> Option<&super::ZkLoginPublicIdentifier> {
17819 self.public_identifier.as_ref().map(|field| field as _)
17820 }
17821 pub fn set_public_identifier<T: Into<super::ZkLoginPublicIdentifier>>(
17823 &mut self,
17824 field: T,
17825 ) {
17826 self.public_identifier = Some(field.into().into());
17827 }
17828 pub fn with_public_identifier<T: Into<super::ZkLoginPublicIdentifier>>(
17830 mut self,
17831 field: T,
17832 ) -> Self {
17833 self.set_public_identifier(field.into());
17834 self
17835 }
17836 pub fn jwk_id(&self) -> &super::JwkId {
17838 self.jwk_id
17839 .as_ref()
17840 .map(|field| field as _)
17841 .unwrap_or_else(|| super::JwkId::default_instance() as _)
17842 }
17843 pub fn jwk_id_opt_mut(&mut self) -> Option<&mut super::JwkId> {
17845 self.jwk_id.as_mut().map(|field| field as _)
17846 }
17847 pub fn jwk_id_mut(&mut self) -> &mut super::JwkId {
17850 self.jwk_id.get_or_insert_default()
17851 }
17852 pub fn jwk_id_opt(&self) -> Option<&super::JwkId> {
17854 self.jwk_id.as_ref().map(|field| field as _)
17855 }
17856 pub fn set_jwk_id<T: Into<super::JwkId>>(&mut self, field: T) {
17858 self.jwk_id = Some(field.into().into());
17859 }
17860 pub fn with_jwk_id<T: Into<super::JwkId>>(mut self, field: T) -> Self {
17862 self.set_jwk_id(field.into());
17863 self
17864 }
17865 }
17866 impl super::ZkLoginClaim {
17867 pub const fn const_default() -> Self {
17868 Self {
17869 value: None,
17870 index_mod_4: None,
17871 }
17872 }
17873 #[doc(hidden)]
17874 pub fn default_instance() -> &'static Self {
17875 static DEFAULT: super::ZkLoginClaim = super::ZkLoginClaim::const_default();
17876 &DEFAULT
17877 }
17878 pub fn value_opt_mut(&mut self) -> Option<&mut String> {
17880 self.value.as_mut().map(|field| field as _)
17881 }
17882 pub fn value_mut(&mut self) -> &mut String {
17885 self.value.get_or_insert_default()
17886 }
17887 pub fn value_opt(&self) -> Option<&str> {
17889 self.value.as_ref().map(|field| field as _)
17890 }
17891 pub fn set_value<T: Into<String>>(&mut self, field: T) {
17893 self.value = Some(field.into().into());
17894 }
17895 pub fn with_value<T: Into<String>>(mut self, field: T) -> Self {
17897 self.set_value(field.into());
17898 self
17899 }
17900 pub fn index_mod_4_opt_mut(&mut self) -> Option<&mut u32> {
17902 self.index_mod_4.as_mut().map(|field| field as _)
17903 }
17904 pub fn index_mod_4_mut(&mut self) -> &mut u32 {
17907 self.index_mod_4.get_or_insert_default()
17908 }
17909 pub fn index_mod_4_opt(&self) -> Option<u32> {
17911 self.index_mod_4.as_ref().map(|field| *field)
17912 }
17913 pub fn set_index_mod_4(&mut self, field: u32) {
17915 self.index_mod_4 = Some(field);
17916 }
17917 pub fn with_index_mod_4(mut self, field: u32) -> Self {
17919 self.set_index_mod_4(field);
17920 self
17921 }
17922 }
17923 impl super::ZkLoginInputs {
17924 pub const fn const_default() -> Self {
17925 Self {
17926 proof_points: None,
17927 iss_base64_details: None,
17928 header_base64: None,
17929 address_seed: None,
17930 }
17931 }
17932 #[doc(hidden)]
17933 pub fn default_instance() -> &'static Self {
17934 static DEFAULT: super::ZkLoginInputs = super::ZkLoginInputs::const_default();
17935 &DEFAULT
17936 }
17937 pub fn proof_points(&self) -> &super::ZkLoginProof {
17939 self.proof_points
17940 .as_ref()
17941 .map(|field| field as _)
17942 .unwrap_or_else(|| super::ZkLoginProof::default_instance() as _)
17943 }
17944 pub fn proof_points_opt_mut(&mut self) -> Option<&mut super::ZkLoginProof> {
17946 self.proof_points.as_mut().map(|field| field as _)
17947 }
17948 pub fn proof_points_mut(&mut self) -> &mut super::ZkLoginProof {
17951 self.proof_points.get_or_insert_default()
17952 }
17953 pub fn proof_points_opt(&self) -> Option<&super::ZkLoginProof> {
17955 self.proof_points.as_ref().map(|field| field as _)
17956 }
17957 pub fn set_proof_points<T: Into<super::ZkLoginProof>>(&mut self, field: T) {
17959 self.proof_points = Some(field.into().into());
17960 }
17961 pub fn with_proof_points<T: Into<super::ZkLoginProof>>(
17963 mut self,
17964 field: T,
17965 ) -> Self {
17966 self.set_proof_points(field.into());
17967 self
17968 }
17969 pub fn iss_base64_details(&self) -> &super::ZkLoginClaim {
17971 self.iss_base64_details
17972 .as_ref()
17973 .map(|field| field as _)
17974 .unwrap_or_else(|| super::ZkLoginClaim::default_instance() as _)
17975 }
17976 pub fn iss_base64_details_opt_mut(
17978 &mut self,
17979 ) -> Option<&mut super::ZkLoginClaim> {
17980 self.iss_base64_details.as_mut().map(|field| field as _)
17981 }
17982 pub fn iss_base64_details_mut(&mut self) -> &mut super::ZkLoginClaim {
17985 self.iss_base64_details.get_or_insert_default()
17986 }
17987 pub fn iss_base64_details_opt(&self) -> Option<&super::ZkLoginClaim> {
17989 self.iss_base64_details.as_ref().map(|field| field as _)
17990 }
17991 pub fn set_iss_base64_details<T: Into<super::ZkLoginClaim>>(
17993 &mut self,
17994 field: T,
17995 ) {
17996 self.iss_base64_details = Some(field.into().into());
17997 }
17998 pub fn with_iss_base64_details<T: Into<super::ZkLoginClaim>>(
18000 mut self,
18001 field: T,
18002 ) -> Self {
18003 self.set_iss_base64_details(field.into());
18004 self
18005 }
18006 pub fn header_base64_opt_mut(&mut self) -> Option<&mut String> {
18008 self.header_base64.as_mut().map(|field| field as _)
18009 }
18010 pub fn header_base64_mut(&mut self) -> &mut String {
18013 self.header_base64.get_or_insert_default()
18014 }
18015 pub fn header_base64_opt(&self) -> Option<&str> {
18017 self.header_base64.as_ref().map(|field| field as _)
18018 }
18019 pub fn set_header_base64<T: Into<String>>(&mut self, field: T) {
18021 self.header_base64 = Some(field.into().into());
18022 }
18023 pub fn with_header_base64<T: Into<String>>(mut self, field: T) -> Self {
18025 self.set_header_base64(field.into());
18026 self
18027 }
18028 pub fn address_seed_opt_mut(&mut self) -> Option<&mut String> {
18030 self.address_seed.as_mut().map(|field| field as _)
18031 }
18032 pub fn address_seed_mut(&mut self) -> &mut String {
18035 self.address_seed.get_or_insert_default()
18036 }
18037 pub fn address_seed_opt(&self) -> Option<&str> {
18039 self.address_seed.as_ref().map(|field| field as _)
18040 }
18041 pub fn set_address_seed<T: Into<String>>(&mut self, field: T) {
18043 self.address_seed = Some(field.into().into());
18044 }
18045 pub fn with_address_seed<T: Into<String>>(mut self, field: T) -> Self {
18047 self.set_address_seed(field.into());
18048 self
18049 }
18050 }
18051 impl super::ZkLoginProof {
18052 pub const fn const_default() -> Self {
18053 Self { a: None, b: None, c: None }
18054 }
18055 #[doc(hidden)]
18056 pub fn default_instance() -> &'static Self {
18057 static DEFAULT: super::ZkLoginProof = super::ZkLoginProof::const_default();
18058 &DEFAULT
18059 }
18060 pub fn a(&self) -> &super::CircomG1 {
18062 self.a
18063 .as_ref()
18064 .map(|field| field as _)
18065 .unwrap_or_else(|| super::CircomG1::default_instance() as _)
18066 }
18067 pub fn a_opt_mut(&mut self) -> Option<&mut super::CircomG1> {
18069 self.a.as_mut().map(|field| field as _)
18070 }
18071 pub fn a_mut(&mut self) -> &mut super::CircomG1 {
18074 self.a.get_or_insert_default()
18075 }
18076 pub fn a_opt(&self) -> Option<&super::CircomG1> {
18078 self.a.as_ref().map(|field| field as _)
18079 }
18080 pub fn set_a<T: Into<super::CircomG1>>(&mut self, field: T) {
18082 self.a = Some(field.into().into());
18083 }
18084 pub fn with_a<T: Into<super::CircomG1>>(mut self, field: T) -> Self {
18086 self.set_a(field.into());
18087 self
18088 }
18089 pub fn b(&self) -> &super::CircomG2 {
18091 self.b
18092 .as_ref()
18093 .map(|field| field as _)
18094 .unwrap_or_else(|| super::CircomG2::default_instance() as _)
18095 }
18096 pub fn b_opt_mut(&mut self) -> Option<&mut super::CircomG2> {
18098 self.b.as_mut().map(|field| field as _)
18099 }
18100 pub fn b_mut(&mut self) -> &mut super::CircomG2 {
18103 self.b.get_or_insert_default()
18104 }
18105 pub fn b_opt(&self) -> Option<&super::CircomG2> {
18107 self.b.as_ref().map(|field| field as _)
18108 }
18109 pub fn set_b<T: Into<super::CircomG2>>(&mut self, field: T) {
18111 self.b = Some(field.into().into());
18112 }
18113 pub fn with_b<T: Into<super::CircomG2>>(mut self, field: T) -> Self {
18115 self.set_b(field.into());
18116 self
18117 }
18118 pub fn c(&self) -> &super::CircomG1 {
18120 self.c
18121 .as_ref()
18122 .map(|field| field as _)
18123 .unwrap_or_else(|| super::CircomG1::default_instance() as _)
18124 }
18125 pub fn c_opt_mut(&mut self) -> Option<&mut super::CircomG1> {
18127 self.c.as_mut().map(|field| field as _)
18128 }
18129 pub fn c_mut(&mut self) -> &mut super::CircomG1 {
18132 self.c.get_or_insert_default()
18133 }
18134 pub fn c_opt(&self) -> Option<&super::CircomG1> {
18136 self.c.as_ref().map(|field| field as _)
18137 }
18138 pub fn set_c<T: Into<super::CircomG1>>(&mut self, field: T) {
18140 self.c = Some(field.into().into());
18141 }
18142 pub fn with_c<T: Into<super::CircomG1>>(mut self, field: T) -> Self {
18144 self.set_c(field.into());
18145 self
18146 }
18147 }
18148 impl super::ZkLoginPublicIdentifier {
18149 pub const fn const_default() -> Self {
18150 Self {
18151 iss: None,
18152 address_seed: None,
18153 }
18154 }
18155 #[doc(hidden)]
18156 pub fn default_instance() -> &'static Self {
18157 static DEFAULT: super::ZkLoginPublicIdentifier = super::ZkLoginPublicIdentifier::const_default();
18158 &DEFAULT
18159 }
18160 pub fn iss_opt_mut(&mut self) -> Option<&mut String> {
18162 self.iss.as_mut().map(|field| field as _)
18163 }
18164 pub fn iss_mut(&mut self) -> &mut String {
18167 self.iss.get_or_insert_default()
18168 }
18169 pub fn iss_opt(&self) -> Option<&str> {
18171 self.iss.as_ref().map(|field| field as _)
18172 }
18173 pub fn set_iss<T: Into<String>>(&mut self, field: T) {
18175 self.iss = Some(field.into().into());
18176 }
18177 pub fn with_iss<T: Into<String>>(mut self, field: T) -> Self {
18179 self.set_iss(field.into());
18180 self
18181 }
18182 pub fn address_seed_opt_mut(&mut self) -> Option<&mut String> {
18184 self.address_seed.as_mut().map(|field| field as _)
18185 }
18186 pub fn address_seed_mut(&mut self) -> &mut String {
18189 self.address_seed.get_or_insert_default()
18190 }
18191 pub fn address_seed_opt(&self) -> Option<&str> {
18193 self.address_seed.as_ref().map(|field| field as _)
18194 }
18195 pub fn set_address_seed<T: Into<String>>(&mut self, field: T) {
18197 self.address_seed = Some(field.into().into());
18198 }
18199 pub fn with_address_seed<T: Into<String>>(mut self, field: T) -> Self {
18201 self.set_address_seed(field.into());
18202 self
18203 }
18204 }
18205}