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 }
483 }
484 #[doc(hidden)]
485 pub fn default_instance() -> &'static Self {
486 static DEFAULT: super::Balance = super::Balance::const_default();
487 &DEFAULT
488 }
489 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
491 self.coin_type.as_mut().map(|field| field as _)
492 }
493 pub fn coin_type_mut(&mut self) -> &mut String {
496 self.coin_type.get_or_insert_default()
497 }
498 pub fn coin_type_opt(&self) -> Option<&str> {
500 self.coin_type.as_ref().map(|field| field as _)
501 }
502 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
504 self.coin_type = Some(field.into().into());
505 }
506 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
508 self.set_coin_type(field.into());
509 self
510 }
511 pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
513 self.balance.as_mut().map(|field| field as _)
514 }
515 pub fn balance_mut(&mut self) -> &mut u64 {
518 self.balance.get_or_insert_default()
519 }
520 pub fn balance_opt(&self) -> Option<u64> {
522 self.balance.as_ref().map(|field| *field)
523 }
524 pub fn set_balance(&mut self, field: u64) {
526 self.balance = Some(field);
527 }
528 pub fn with_balance(mut self, field: u64) -> Self {
530 self.set_balance(field);
531 self
532 }
533 }
534 impl super::BalanceChange {
535 pub const fn const_default() -> Self {
536 Self {
537 address: None,
538 coin_type: None,
539 amount: None,
540 }
541 }
542 #[doc(hidden)]
543 pub fn default_instance() -> &'static Self {
544 static DEFAULT: super::BalanceChange = super::BalanceChange::const_default();
545 &DEFAULT
546 }
547 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
549 self.address.as_mut().map(|field| field as _)
550 }
551 pub fn address_mut(&mut self) -> &mut String {
554 self.address.get_or_insert_default()
555 }
556 pub fn address_opt(&self) -> Option<&str> {
558 self.address.as_ref().map(|field| field as _)
559 }
560 pub fn set_address<T: Into<String>>(&mut self, field: T) {
562 self.address = Some(field.into().into());
563 }
564 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
566 self.set_address(field.into());
567 self
568 }
569 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
571 self.coin_type.as_mut().map(|field| field as _)
572 }
573 pub fn coin_type_mut(&mut self) -> &mut String {
576 self.coin_type.get_or_insert_default()
577 }
578 pub fn coin_type_opt(&self) -> Option<&str> {
580 self.coin_type.as_ref().map(|field| field as _)
581 }
582 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
584 self.coin_type = Some(field.into().into());
585 }
586 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
588 self.set_coin_type(field.into());
589 self
590 }
591 pub fn amount_opt_mut(&mut self) -> Option<&mut String> {
593 self.amount.as_mut().map(|field| field as _)
594 }
595 pub fn amount_mut(&mut self) -> &mut String {
598 self.amount.get_or_insert_default()
599 }
600 pub fn amount_opt(&self) -> Option<&str> {
602 self.amount.as_ref().map(|field| field as _)
603 }
604 pub fn set_amount<T: Into<String>>(&mut self, field: T) {
606 self.amount = Some(field.into().into());
607 }
608 pub fn with_amount<T: Into<String>>(mut self, field: T) -> Self {
610 self.set_amount(field.into());
611 self
612 }
613 }
614 impl super::BatchGetObjectsRequest {
615 pub const fn const_default() -> Self {
616 Self {
617 requests: Vec::new(),
618 read_mask: None,
619 }
620 }
621 #[doc(hidden)]
622 pub fn default_instance() -> &'static Self {
623 static DEFAULT: super::BatchGetObjectsRequest = super::BatchGetObjectsRequest::const_default();
624 &DEFAULT
625 }
626 pub fn requests(&self) -> &[super::GetObjectRequest] {
628 &self.requests
629 }
630 pub fn requests_mut(&mut self) -> &mut Vec<super::GetObjectRequest> {
633 &mut self.requests
634 }
635 pub fn set_requests(&mut self, field: Vec<super::GetObjectRequest>) {
637 self.requests = field;
638 }
639 pub fn with_requests(mut self, field: Vec<super::GetObjectRequest>) -> Self {
641 self.set_requests(field);
642 self
643 }
644 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
646 self.read_mask.as_mut().map(|field| field as _)
647 }
648 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
651 self.read_mask.get_or_insert_default()
652 }
653 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
655 self.read_mask.as_ref().map(|field| field as _)
656 }
657 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
659 self.read_mask = Some(field.into().into());
660 }
661 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
663 mut self,
664 field: T,
665 ) -> Self {
666 self.set_read_mask(field.into());
667 self
668 }
669 }
670 impl super::BatchGetObjectsResponse {
671 pub const fn const_default() -> Self {
672 Self { objects: Vec::new() }
673 }
674 #[doc(hidden)]
675 pub fn default_instance() -> &'static Self {
676 static DEFAULT: super::BatchGetObjectsResponse = super::BatchGetObjectsResponse::const_default();
677 &DEFAULT
678 }
679 pub fn objects(&self) -> &[super::GetObjectResult] {
681 &self.objects
682 }
683 pub fn objects_mut(&mut self) -> &mut Vec<super::GetObjectResult> {
686 &mut self.objects
687 }
688 pub fn set_objects(&mut self, field: Vec<super::GetObjectResult>) {
690 self.objects = field;
691 }
692 pub fn with_objects(mut self, field: Vec<super::GetObjectResult>) -> Self {
694 self.set_objects(field);
695 self
696 }
697 }
698 impl super::BatchGetTransactionsRequest {
699 pub const fn const_default() -> Self {
700 Self {
701 digests: Vec::new(),
702 read_mask: None,
703 }
704 }
705 #[doc(hidden)]
706 pub fn default_instance() -> &'static Self {
707 static DEFAULT: super::BatchGetTransactionsRequest = super::BatchGetTransactionsRequest::const_default();
708 &DEFAULT
709 }
710 pub fn digests(&self) -> &[String] {
712 &self.digests
713 }
714 pub fn digests_mut(&mut self) -> &mut Vec<String> {
717 &mut self.digests
718 }
719 pub fn set_digests(&mut self, field: Vec<String>) {
721 self.digests = field;
722 }
723 pub fn with_digests(mut self, field: Vec<String>) -> Self {
725 self.set_digests(field);
726 self
727 }
728 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
730 self.read_mask.as_mut().map(|field| field as _)
731 }
732 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
735 self.read_mask.get_or_insert_default()
736 }
737 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
739 self.read_mask.as_ref().map(|field| field as _)
740 }
741 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
743 self.read_mask = Some(field.into().into());
744 }
745 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
747 mut self,
748 field: T,
749 ) -> Self {
750 self.set_read_mask(field.into());
751 self
752 }
753 }
754 impl super::BatchGetTransactionsResponse {
755 pub const fn const_default() -> Self {
756 Self { transactions: Vec::new() }
757 }
758 #[doc(hidden)]
759 pub fn default_instance() -> &'static Self {
760 static DEFAULT: super::BatchGetTransactionsResponse = super::BatchGetTransactionsResponse::const_default();
761 &DEFAULT
762 }
763 pub fn transactions(&self) -> &[super::GetTransactionResult] {
765 &self.transactions
766 }
767 pub fn transactions_mut(&mut self) -> &mut Vec<super::GetTransactionResult> {
770 &mut self.transactions
771 }
772 pub fn set_transactions(&mut self, field: Vec<super::GetTransactionResult>) {
774 self.transactions = field;
775 }
776 pub fn with_transactions(
778 mut self,
779 field: Vec<super::GetTransactionResult>,
780 ) -> Self {
781 self.set_transactions(field);
782 self
783 }
784 }
785 impl super::Bcs {
786 pub const fn const_default() -> Self {
787 Self { name: None, value: None }
788 }
789 #[doc(hidden)]
790 pub fn default_instance() -> &'static Self {
791 static DEFAULT: super::Bcs = super::Bcs::const_default();
792 &DEFAULT
793 }
794 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
796 self.name.as_mut().map(|field| field as _)
797 }
798 pub fn name_mut(&mut self) -> &mut String {
801 self.name.get_or_insert_default()
802 }
803 pub fn name_opt(&self) -> Option<&str> {
805 self.name.as_ref().map(|field| field as _)
806 }
807 pub fn set_name<T: Into<String>>(&mut self, field: T) {
809 self.name = Some(field.into().into());
810 }
811 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
813 self.set_name(field.into());
814 self
815 }
816 pub fn value_opt(&self) -> Option<&[u8]> {
818 self.value.as_ref().map(|field| field as _)
819 }
820 pub fn set_value<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
822 self.value = Some(field.into().into());
823 }
824 pub fn with_value<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
826 self.set_value(field.into());
827 self
828 }
829 }
830 impl super::CanceledTransaction {
831 pub const fn const_default() -> Self {
832 Self {
833 digest: None,
834 version_assignments: Vec::new(),
835 }
836 }
837 #[doc(hidden)]
838 pub fn default_instance() -> &'static Self {
839 static DEFAULT: super::CanceledTransaction = super::CanceledTransaction::const_default();
840 &DEFAULT
841 }
842 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
844 self.digest.as_mut().map(|field| field as _)
845 }
846 pub fn digest_mut(&mut self) -> &mut String {
849 self.digest.get_or_insert_default()
850 }
851 pub fn digest_opt(&self) -> Option<&str> {
853 self.digest.as_ref().map(|field| field as _)
854 }
855 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
857 self.digest = Some(field.into().into());
858 }
859 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
861 self.set_digest(field.into());
862 self
863 }
864 pub fn version_assignments(&self) -> &[super::VersionAssignment] {
866 &self.version_assignments
867 }
868 pub fn version_assignments_mut(&mut self) -> &mut Vec<super::VersionAssignment> {
871 &mut self.version_assignments
872 }
873 pub fn set_version_assignments(&mut self, field: Vec<super::VersionAssignment>) {
875 self.version_assignments = field;
876 }
877 pub fn with_version_assignments(
879 mut self,
880 field: Vec<super::VersionAssignment>,
881 ) -> Self {
882 self.set_version_assignments(field);
883 self
884 }
885 }
886 impl super::ChangeEpoch {
887 pub const fn const_default() -> Self {
888 Self {
889 epoch: None,
890 protocol_version: None,
891 storage_charge: None,
892 computation_charge: None,
893 storage_rebate: None,
894 non_refundable_storage_fee: None,
895 epoch_start_timestamp: None,
896 system_packages: Vec::new(),
897 }
898 }
899 #[doc(hidden)]
900 pub fn default_instance() -> &'static Self {
901 static DEFAULT: super::ChangeEpoch = super::ChangeEpoch::const_default();
902 &DEFAULT
903 }
904 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
906 self.epoch.as_mut().map(|field| field as _)
907 }
908 pub fn epoch_mut(&mut self) -> &mut u64 {
911 self.epoch.get_or_insert_default()
912 }
913 pub fn epoch_opt(&self) -> Option<u64> {
915 self.epoch.as_ref().map(|field| *field)
916 }
917 pub fn set_epoch(&mut self, field: u64) {
919 self.epoch = Some(field);
920 }
921 pub fn with_epoch(mut self, field: u64) -> Self {
923 self.set_epoch(field);
924 self
925 }
926 pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
928 self.protocol_version.as_mut().map(|field| field as _)
929 }
930 pub fn protocol_version_mut(&mut self) -> &mut u64 {
933 self.protocol_version.get_or_insert_default()
934 }
935 pub fn protocol_version_opt(&self) -> Option<u64> {
937 self.protocol_version.as_ref().map(|field| *field)
938 }
939 pub fn set_protocol_version(&mut self, field: u64) {
941 self.protocol_version = Some(field);
942 }
943 pub fn with_protocol_version(mut self, field: u64) -> Self {
945 self.set_protocol_version(field);
946 self
947 }
948 pub fn storage_charge_opt_mut(&mut self) -> Option<&mut u64> {
950 self.storage_charge.as_mut().map(|field| field as _)
951 }
952 pub fn storage_charge_mut(&mut self) -> &mut u64 {
955 self.storage_charge.get_or_insert_default()
956 }
957 pub fn storage_charge_opt(&self) -> Option<u64> {
959 self.storage_charge.as_ref().map(|field| *field)
960 }
961 pub fn set_storage_charge(&mut self, field: u64) {
963 self.storage_charge = Some(field);
964 }
965 pub fn with_storage_charge(mut self, field: u64) -> Self {
967 self.set_storage_charge(field);
968 self
969 }
970 pub fn computation_charge_opt_mut(&mut self) -> Option<&mut u64> {
972 self.computation_charge.as_mut().map(|field| field as _)
973 }
974 pub fn computation_charge_mut(&mut self) -> &mut u64 {
977 self.computation_charge.get_or_insert_default()
978 }
979 pub fn computation_charge_opt(&self) -> Option<u64> {
981 self.computation_charge.as_ref().map(|field| *field)
982 }
983 pub fn set_computation_charge(&mut self, field: u64) {
985 self.computation_charge = Some(field);
986 }
987 pub fn with_computation_charge(mut self, field: u64) -> Self {
989 self.set_computation_charge(field);
990 self
991 }
992 pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
994 self.storage_rebate.as_mut().map(|field| field as _)
995 }
996 pub fn storage_rebate_mut(&mut self) -> &mut u64 {
999 self.storage_rebate.get_or_insert_default()
1000 }
1001 pub fn storage_rebate_opt(&self) -> Option<u64> {
1003 self.storage_rebate.as_ref().map(|field| *field)
1004 }
1005 pub fn set_storage_rebate(&mut self, field: u64) {
1007 self.storage_rebate = Some(field);
1008 }
1009 pub fn with_storage_rebate(mut self, field: u64) -> Self {
1011 self.set_storage_rebate(field);
1012 self
1013 }
1014 pub fn non_refundable_storage_fee_opt_mut(&mut self) -> Option<&mut u64> {
1016 self.non_refundable_storage_fee.as_mut().map(|field| field as _)
1017 }
1018 pub fn non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
1021 self.non_refundable_storage_fee.get_or_insert_default()
1022 }
1023 pub fn non_refundable_storage_fee_opt(&self) -> Option<u64> {
1025 self.non_refundable_storage_fee.as_ref().map(|field| *field)
1026 }
1027 pub fn set_non_refundable_storage_fee(&mut self, field: u64) {
1029 self.non_refundable_storage_fee = Some(field);
1030 }
1031 pub fn with_non_refundable_storage_fee(mut self, field: u64) -> Self {
1033 self.set_non_refundable_storage_fee(field);
1034 self
1035 }
1036 pub fn epoch_start_timestamp_opt_mut(
1038 &mut self,
1039 ) -> Option<&mut ::prost_types::Timestamp> {
1040 self.epoch_start_timestamp.as_mut().map(|field| field as _)
1041 }
1042 pub fn epoch_start_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
1045 self.epoch_start_timestamp.get_or_insert_default()
1046 }
1047 pub fn epoch_start_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
1049 self.epoch_start_timestamp.as_ref().map(|field| field as _)
1050 }
1051 pub fn set_epoch_start_timestamp<T: Into<::prost_types::Timestamp>>(
1053 &mut self,
1054 field: T,
1055 ) {
1056 self.epoch_start_timestamp = Some(field.into().into());
1057 }
1058 pub fn with_epoch_start_timestamp<T: Into<::prost_types::Timestamp>>(
1060 mut self,
1061 field: T,
1062 ) -> Self {
1063 self.set_epoch_start_timestamp(field.into());
1064 self
1065 }
1066 pub fn system_packages(&self) -> &[super::SystemPackage] {
1068 &self.system_packages
1069 }
1070 pub fn system_packages_mut(&mut self) -> &mut Vec<super::SystemPackage> {
1073 &mut self.system_packages
1074 }
1075 pub fn set_system_packages(&mut self, field: Vec<super::SystemPackage>) {
1077 self.system_packages = field;
1078 }
1079 pub fn with_system_packages(mut self, field: Vec<super::SystemPackage>) -> Self {
1081 self.set_system_packages(field);
1082 self
1083 }
1084 }
1085 impl super::ChangedObject {
1086 pub const fn const_default() -> Self {
1087 Self {
1088 object_id: None,
1089 input_state: None,
1090 input_version: None,
1091 input_digest: None,
1092 input_owner: None,
1093 output_state: None,
1094 output_version: None,
1095 output_digest: None,
1096 output_owner: None,
1097 accumulator_write: None,
1098 id_operation: None,
1099 object_type: None,
1100 }
1101 }
1102 #[doc(hidden)]
1103 pub fn default_instance() -> &'static Self {
1104 static DEFAULT: super::ChangedObject = super::ChangedObject::const_default();
1105 &DEFAULT
1106 }
1107 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
1109 self.object_id.as_mut().map(|field| field as _)
1110 }
1111 pub fn object_id_mut(&mut self) -> &mut String {
1114 self.object_id.get_or_insert_default()
1115 }
1116 pub fn object_id_opt(&self) -> Option<&str> {
1118 self.object_id.as_ref().map(|field| field as _)
1119 }
1120 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
1122 self.object_id = Some(field.into().into());
1123 }
1124 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
1126 self.set_object_id(field.into());
1127 self
1128 }
1129 pub fn with_input_state<T: Into<super::changed_object::InputObjectState>>(
1131 mut self,
1132 field: T,
1133 ) -> Self {
1134 self.set_input_state(field.into());
1135 self
1136 }
1137 pub fn input_version_opt_mut(&mut self) -> Option<&mut u64> {
1139 self.input_version.as_mut().map(|field| field as _)
1140 }
1141 pub fn input_version_mut(&mut self) -> &mut u64 {
1144 self.input_version.get_or_insert_default()
1145 }
1146 pub fn input_version_opt(&self) -> Option<u64> {
1148 self.input_version.as_ref().map(|field| *field)
1149 }
1150 pub fn set_input_version(&mut self, field: u64) {
1152 self.input_version = Some(field);
1153 }
1154 pub fn with_input_version(mut self, field: u64) -> Self {
1156 self.set_input_version(field);
1157 self
1158 }
1159 pub fn input_digest_opt_mut(&mut self) -> Option<&mut String> {
1161 self.input_digest.as_mut().map(|field| field as _)
1162 }
1163 pub fn input_digest_mut(&mut self) -> &mut String {
1166 self.input_digest.get_or_insert_default()
1167 }
1168 pub fn input_digest_opt(&self) -> Option<&str> {
1170 self.input_digest.as_ref().map(|field| field as _)
1171 }
1172 pub fn set_input_digest<T: Into<String>>(&mut self, field: T) {
1174 self.input_digest = Some(field.into().into());
1175 }
1176 pub fn with_input_digest<T: Into<String>>(mut self, field: T) -> Self {
1178 self.set_input_digest(field.into());
1179 self
1180 }
1181 pub fn input_owner(&self) -> &super::Owner {
1183 self.input_owner
1184 .as_ref()
1185 .map(|field| field as _)
1186 .unwrap_or_else(|| super::Owner::default_instance() as _)
1187 }
1188 pub fn input_owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
1190 self.input_owner.as_mut().map(|field| field as _)
1191 }
1192 pub fn input_owner_mut(&mut self) -> &mut super::Owner {
1195 self.input_owner.get_or_insert_default()
1196 }
1197 pub fn input_owner_opt(&self) -> Option<&super::Owner> {
1199 self.input_owner.as_ref().map(|field| field as _)
1200 }
1201 pub fn set_input_owner<T: Into<super::Owner>>(&mut self, field: T) {
1203 self.input_owner = Some(field.into().into());
1204 }
1205 pub fn with_input_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
1207 self.set_input_owner(field.into());
1208 self
1209 }
1210 pub fn with_output_state<T: Into<super::changed_object::OutputObjectState>>(
1212 mut self,
1213 field: T,
1214 ) -> Self {
1215 self.set_output_state(field.into());
1216 self
1217 }
1218 pub fn output_version_opt_mut(&mut self) -> Option<&mut u64> {
1220 self.output_version.as_mut().map(|field| field as _)
1221 }
1222 pub fn output_version_mut(&mut self) -> &mut u64 {
1225 self.output_version.get_or_insert_default()
1226 }
1227 pub fn output_version_opt(&self) -> Option<u64> {
1229 self.output_version.as_ref().map(|field| *field)
1230 }
1231 pub fn set_output_version(&mut self, field: u64) {
1233 self.output_version = Some(field);
1234 }
1235 pub fn with_output_version(mut self, field: u64) -> Self {
1237 self.set_output_version(field);
1238 self
1239 }
1240 pub fn output_digest_opt_mut(&mut self) -> Option<&mut String> {
1242 self.output_digest.as_mut().map(|field| field as _)
1243 }
1244 pub fn output_digest_mut(&mut self) -> &mut String {
1247 self.output_digest.get_or_insert_default()
1248 }
1249 pub fn output_digest_opt(&self) -> Option<&str> {
1251 self.output_digest.as_ref().map(|field| field as _)
1252 }
1253 pub fn set_output_digest<T: Into<String>>(&mut self, field: T) {
1255 self.output_digest = Some(field.into().into());
1256 }
1257 pub fn with_output_digest<T: Into<String>>(mut self, field: T) -> Self {
1259 self.set_output_digest(field.into());
1260 self
1261 }
1262 pub fn output_owner(&self) -> &super::Owner {
1264 self.output_owner
1265 .as_ref()
1266 .map(|field| field as _)
1267 .unwrap_or_else(|| super::Owner::default_instance() as _)
1268 }
1269 pub fn output_owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
1271 self.output_owner.as_mut().map(|field| field as _)
1272 }
1273 pub fn output_owner_mut(&mut self) -> &mut super::Owner {
1276 self.output_owner.get_or_insert_default()
1277 }
1278 pub fn output_owner_opt(&self) -> Option<&super::Owner> {
1280 self.output_owner.as_ref().map(|field| field as _)
1281 }
1282 pub fn set_output_owner<T: Into<super::Owner>>(&mut self, field: T) {
1284 self.output_owner = Some(field.into().into());
1285 }
1286 pub fn with_output_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
1288 self.set_output_owner(field.into());
1289 self
1290 }
1291 pub fn accumulator_write(&self) -> &super::AccumulatorWrite {
1293 self.accumulator_write
1294 .as_ref()
1295 .map(|field| field as _)
1296 .unwrap_or_else(|| super::AccumulatorWrite::default_instance() as _)
1297 }
1298 pub fn accumulator_write_opt_mut(
1300 &mut self,
1301 ) -> Option<&mut super::AccumulatorWrite> {
1302 self.accumulator_write.as_mut().map(|field| field as _)
1303 }
1304 pub fn accumulator_write_mut(&mut self) -> &mut super::AccumulatorWrite {
1307 self.accumulator_write.get_or_insert_default()
1308 }
1309 pub fn accumulator_write_opt(&self) -> Option<&super::AccumulatorWrite> {
1311 self.accumulator_write.as_ref().map(|field| field as _)
1312 }
1313 pub fn set_accumulator_write<T: Into<super::AccumulatorWrite>>(
1315 &mut self,
1316 field: T,
1317 ) {
1318 self.accumulator_write = Some(field.into().into());
1319 }
1320 pub fn with_accumulator_write<T: Into<super::AccumulatorWrite>>(
1322 mut self,
1323 field: T,
1324 ) -> Self {
1325 self.set_accumulator_write(field.into());
1326 self
1327 }
1328 pub fn with_id_operation<T: Into<super::changed_object::IdOperation>>(
1330 mut self,
1331 field: T,
1332 ) -> Self {
1333 self.set_id_operation(field.into());
1334 self
1335 }
1336 pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
1338 self.object_type.as_mut().map(|field| field as _)
1339 }
1340 pub fn object_type_mut(&mut self) -> &mut String {
1343 self.object_type.get_or_insert_default()
1344 }
1345 pub fn object_type_opt(&self) -> Option<&str> {
1347 self.object_type.as_ref().map(|field| field as _)
1348 }
1349 pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
1351 self.object_type = Some(field.into().into());
1352 }
1353 pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
1355 self.set_object_type(field.into());
1356 self
1357 }
1358 }
1359 impl super::Checkpoint {
1360 pub const fn const_default() -> Self {
1361 Self {
1362 sequence_number: None,
1363 digest: None,
1364 summary: None,
1365 signature: None,
1366 contents: None,
1367 transactions: Vec::new(),
1368 objects: None,
1369 }
1370 }
1371 #[doc(hidden)]
1372 pub fn default_instance() -> &'static Self {
1373 static DEFAULT: super::Checkpoint = super::Checkpoint::const_default();
1374 &DEFAULT
1375 }
1376 pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
1378 self.sequence_number.as_mut().map(|field| field as _)
1379 }
1380 pub fn sequence_number_mut(&mut self) -> &mut u64 {
1383 self.sequence_number.get_or_insert_default()
1384 }
1385 pub fn sequence_number_opt(&self) -> Option<u64> {
1387 self.sequence_number.as_ref().map(|field| *field)
1388 }
1389 pub fn set_sequence_number(&mut self, field: u64) {
1391 self.sequence_number = Some(field);
1392 }
1393 pub fn with_sequence_number(mut self, field: u64) -> Self {
1395 self.set_sequence_number(field);
1396 self
1397 }
1398 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1400 self.digest.as_mut().map(|field| field as _)
1401 }
1402 pub fn digest_mut(&mut self) -> &mut String {
1405 self.digest.get_or_insert_default()
1406 }
1407 pub fn digest_opt(&self) -> Option<&str> {
1409 self.digest.as_ref().map(|field| field as _)
1410 }
1411 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1413 self.digest = Some(field.into().into());
1414 }
1415 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1417 self.set_digest(field.into());
1418 self
1419 }
1420 pub fn summary(&self) -> &super::CheckpointSummary {
1422 self.summary
1423 .as_ref()
1424 .map(|field| field as _)
1425 .unwrap_or_else(|| super::CheckpointSummary::default_instance() as _)
1426 }
1427 pub fn summary_opt_mut(&mut self) -> Option<&mut super::CheckpointSummary> {
1429 self.summary.as_mut().map(|field| field as _)
1430 }
1431 pub fn summary_mut(&mut self) -> &mut super::CheckpointSummary {
1434 self.summary.get_or_insert_default()
1435 }
1436 pub fn summary_opt(&self) -> Option<&super::CheckpointSummary> {
1438 self.summary.as_ref().map(|field| field as _)
1439 }
1440 pub fn set_summary<T: Into<super::CheckpointSummary>>(&mut self, field: T) {
1442 self.summary = Some(field.into().into());
1443 }
1444 pub fn with_summary<T: Into<super::CheckpointSummary>>(
1446 mut self,
1447 field: T,
1448 ) -> Self {
1449 self.set_summary(field.into());
1450 self
1451 }
1452 pub fn signature(&self) -> &super::ValidatorAggregatedSignature {
1454 self.signature
1455 .as_ref()
1456 .map(|field| field as _)
1457 .unwrap_or_else(|| {
1458 super::ValidatorAggregatedSignature::default_instance() as _
1459 })
1460 }
1461 pub fn signature_opt_mut(
1463 &mut self,
1464 ) -> Option<&mut super::ValidatorAggregatedSignature> {
1465 self.signature.as_mut().map(|field| field as _)
1466 }
1467 pub fn signature_mut(&mut self) -> &mut super::ValidatorAggregatedSignature {
1470 self.signature.get_or_insert_default()
1471 }
1472 pub fn signature_opt(&self) -> Option<&super::ValidatorAggregatedSignature> {
1474 self.signature.as_ref().map(|field| field as _)
1475 }
1476 pub fn set_signature<T: Into<super::ValidatorAggregatedSignature>>(
1478 &mut self,
1479 field: T,
1480 ) {
1481 self.signature = Some(field.into().into());
1482 }
1483 pub fn with_signature<T: Into<super::ValidatorAggregatedSignature>>(
1485 mut self,
1486 field: T,
1487 ) -> Self {
1488 self.set_signature(field.into());
1489 self
1490 }
1491 pub fn contents(&self) -> &super::CheckpointContents {
1493 self.contents
1494 .as_ref()
1495 .map(|field| field as _)
1496 .unwrap_or_else(|| super::CheckpointContents::default_instance() as _)
1497 }
1498 pub fn contents_opt_mut(&mut self) -> Option<&mut super::CheckpointContents> {
1500 self.contents.as_mut().map(|field| field as _)
1501 }
1502 pub fn contents_mut(&mut self) -> &mut super::CheckpointContents {
1505 self.contents.get_or_insert_default()
1506 }
1507 pub fn contents_opt(&self) -> Option<&super::CheckpointContents> {
1509 self.contents.as_ref().map(|field| field as _)
1510 }
1511 pub fn set_contents<T: Into<super::CheckpointContents>>(&mut self, field: T) {
1513 self.contents = Some(field.into().into());
1514 }
1515 pub fn with_contents<T: Into<super::CheckpointContents>>(
1517 mut self,
1518 field: T,
1519 ) -> Self {
1520 self.set_contents(field.into());
1521 self
1522 }
1523 pub fn transactions(&self) -> &[super::ExecutedTransaction] {
1525 &self.transactions
1526 }
1527 pub fn transactions_mut(&mut self) -> &mut Vec<super::ExecutedTransaction> {
1530 &mut self.transactions
1531 }
1532 pub fn set_transactions(&mut self, field: Vec<super::ExecutedTransaction>) {
1534 self.transactions = field;
1535 }
1536 pub fn with_transactions(
1538 mut self,
1539 field: Vec<super::ExecutedTransaction>,
1540 ) -> Self {
1541 self.set_transactions(field);
1542 self
1543 }
1544 pub fn objects(&self) -> &super::ObjectSet {
1546 self.objects
1547 .as_ref()
1548 .map(|field| field as _)
1549 .unwrap_or_else(|| super::ObjectSet::default_instance() as _)
1550 }
1551 pub fn objects_opt_mut(&mut self) -> Option<&mut super::ObjectSet> {
1553 self.objects.as_mut().map(|field| field as _)
1554 }
1555 pub fn objects_mut(&mut self) -> &mut super::ObjectSet {
1558 self.objects.get_or_insert_default()
1559 }
1560 pub fn objects_opt(&self) -> Option<&super::ObjectSet> {
1562 self.objects.as_ref().map(|field| field as _)
1563 }
1564 pub fn set_objects<T: Into<super::ObjectSet>>(&mut self, field: T) {
1566 self.objects = Some(field.into().into());
1567 }
1568 pub fn with_objects<T: Into<super::ObjectSet>>(mut self, field: T) -> Self {
1570 self.set_objects(field.into());
1571 self
1572 }
1573 }
1574 impl super::CheckpointCommitment {
1575 pub const fn const_default() -> Self {
1576 Self { kind: None, digest: None }
1577 }
1578 #[doc(hidden)]
1579 pub fn default_instance() -> &'static Self {
1580 static DEFAULT: super::CheckpointCommitment = super::CheckpointCommitment::const_default();
1581 &DEFAULT
1582 }
1583 pub fn with_kind<
1585 T: Into<super::checkpoint_commitment::CheckpointCommitmentKind>,
1586 >(mut self, field: T) -> Self {
1587 self.set_kind(field.into());
1588 self
1589 }
1590 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1592 self.digest.as_mut().map(|field| field as _)
1593 }
1594 pub fn digest_mut(&mut self) -> &mut String {
1597 self.digest.get_or_insert_default()
1598 }
1599 pub fn digest_opt(&self) -> Option<&str> {
1601 self.digest.as_ref().map(|field| field as _)
1602 }
1603 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1605 self.digest = Some(field.into().into());
1606 }
1607 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1609 self.set_digest(field.into());
1610 self
1611 }
1612 }
1613 impl super::CheckpointContents {
1614 pub const fn const_default() -> Self {
1615 Self {
1616 bcs: None,
1617 digest: None,
1618 version: None,
1619 transactions: Vec::new(),
1620 }
1621 }
1622 #[doc(hidden)]
1623 pub fn default_instance() -> &'static Self {
1624 static DEFAULT: super::CheckpointContents = super::CheckpointContents::const_default();
1625 &DEFAULT
1626 }
1627 pub fn bcs(&self) -> &super::Bcs {
1629 self.bcs
1630 .as_ref()
1631 .map(|field| field as _)
1632 .unwrap_or_else(|| super::Bcs::default_instance() as _)
1633 }
1634 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
1636 self.bcs.as_mut().map(|field| field as _)
1637 }
1638 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
1641 self.bcs.get_or_insert_default()
1642 }
1643 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
1645 self.bcs.as_ref().map(|field| field as _)
1646 }
1647 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
1649 self.bcs = Some(field.into().into());
1650 }
1651 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
1653 self.set_bcs(field.into());
1654 self
1655 }
1656 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1658 self.digest.as_mut().map(|field| field as _)
1659 }
1660 pub fn digest_mut(&mut self) -> &mut String {
1663 self.digest.get_or_insert_default()
1664 }
1665 pub fn digest_opt(&self) -> Option<&str> {
1667 self.digest.as_ref().map(|field| field as _)
1668 }
1669 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1671 self.digest = Some(field.into().into());
1672 }
1673 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1675 self.set_digest(field.into());
1676 self
1677 }
1678 pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
1680 self.version.as_mut().map(|field| field as _)
1681 }
1682 pub fn version_mut(&mut self) -> &mut i32 {
1685 self.version.get_or_insert_default()
1686 }
1687 pub fn version_opt(&self) -> Option<i32> {
1689 self.version.as_ref().map(|field| *field)
1690 }
1691 pub fn set_version(&mut self, field: i32) {
1693 self.version = Some(field);
1694 }
1695 pub fn with_version(mut self, field: i32) -> Self {
1697 self.set_version(field);
1698 self
1699 }
1700 pub fn transactions(&self) -> &[super::CheckpointedTransactionInfo] {
1702 &self.transactions
1703 }
1704 pub fn transactions_mut(
1707 &mut self,
1708 ) -> &mut Vec<super::CheckpointedTransactionInfo> {
1709 &mut self.transactions
1710 }
1711 pub fn set_transactions(
1713 &mut self,
1714 field: Vec<super::CheckpointedTransactionInfo>,
1715 ) {
1716 self.transactions = field;
1717 }
1718 pub fn with_transactions(
1720 mut self,
1721 field: Vec<super::CheckpointedTransactionInfo>,
1722 ) -> Self {
1723 self.set_transactions(field);
1724 self
1725 }
1726 }
1727 impl super::CheckpointSummary {
1728 pub const fn const_default() -> Self {
1729 Self {
1730 bcs: None,
1731 digest: None,
1732 epoch: None,
1733 sequence_number: None,
1734 total_network_transactions: None,
1735 content_digest: None,
1736 previous_digest: None,
1737 epoch_rolling_gas_cost_summary: None,
1738 timestamp: None,
1739 commitments: Vec::new(),
1740 end_of_epoch_data: None,
1741 version_specific_data: None,
1742 }
1743 }
1744 #[doc(hidden)]
1745 pub fn default_instance() -> &'static Self {
1746 static DEFAULT: super::CheckpointSummary = super::CheckpointSummary::const_default();
1747 &DEFAULT
1748 }
1749 pub fn bcs(&self) -> &super::Bcs {
1751 self.bcs
1752 .as_ref()
1753 .map(|field| field as _)
1754 .unwrap_or_else(|| super::Bcs::default_instance() as _)
1755 }
1756 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
1758 self.bcs.as_mut().map(|field| field as _)
1759 }
1760 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
1763 self.bcs.get_or_insert_default()
1764 }
1765 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
1767 self.bcs.as_ref().map(|field| field as _)
1768 }
1769 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
1771 self.bcs = Some(field.into().into());
1772 }
1773 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
1775 self.set_bcs(field.into());
1776 self
1777 }
1778 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1780 self.digest.as_mut().map(|field| field as _)
1781 }
1782 pub fn digest_mut(&mut self) -> &mut String {
1785 self.digest.get_or_insert_default()
1786 }
1787 pub fn digest_opt(&self) -> Option<&str> {
1789 self.digest.as_ref().map(|field| field as _)
1790 }
1791 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1793 self.digest = Some(field.into().into());
1794 }
1795 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1797 self.set_digest(field.into());
1798 self
1799 }
1800 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
1802 self.epoch.as_mut().map(|field| field as _)
1803 }
1804 pub fn epoch_mut(&mut self) -> &mut u64 {
1807 self.epoch.get_or_insert_default()
1808 }
1809 pub fn epoch_opt(&self) -> Option<u64> {
1811 self.epoch.as_ref().map(|field| *field)
1812 }
1813 pub fn set_epoch(&mut self, field: u64) {
1815 self.epoch = Some(field);
1816 }
1817 pub fn with_epoch(mut self, field: u64) -> Self {
1819 self.set_epoch(field);
1820 self
1821 }
1822 pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
1824 self.sequence_number.as_mut().map(|field| field as _)
1825 }
1826 pub fn sequence_number_mut(&mut self) -> &mut u64 {
1829 self.sequence_number.get_or_insert_default()
1830 }
1831 pub fn sequence_number_opt(&self) -> Option<u64> {
1833 self.sequence_number.as_ref().map(|field| *field)
1834 }
1835 pub fn set_sequence_number(&mut self, field: u64) {
1837 self.sequence_number = Some(field);
1838 }
1839 pub fn with_sequence_number(mut self, field: u64) -> Self {
1841 self.set_sequence_number(field);
1842 self
1843 }
1844 pub fn total_network_transactions_opt_mut(&mut self) -> Option<&mut u64> {
1846 self.total_network_transactions.as_mut().map(|field| field as _)
1847 }
1848 pub fn total_network_transactions_mut(&mut self) -> &mut u64 {
1851 self.total_network_transactions.get_or_insert_default()
1852 }
1853 pub fn total_network_transactions_opt(&self) -> Option<u64> {
1855 self.total_network_transactions.as_ref().map(|field| *field)
1856 }
1857 pub fn set_total_network_transactions(&mut self, field: u64) {
1859 self.total_network_transactions = Some(field);
1860 }
1861 pub fn with_total_network_transactions(mut self, field: u64) -> Self {
1863 self.set_total_network_transactions(field);
1864 self
1865 }
1866 pub fn content_digest_opt_mut(&mut self) -> Option<&mut String> {
1868 self.content_digest.as_mut().map(|field| field as _)
1869 }
1870 pub fn content_digest_mut(&mut self) -> &mut String {
1873 self.content_digest.get_or_insert_default()
1874 }
1875 pub fn content_digest_opt(&self) -> Option<&str> {
1877 self.content_digest.as_ref().map(|field| field as _)
1878 }
1879 pub fn set_content_digest<T: Into<String>>(&mut self, field: T) {
1881 self.content_digest = Some(field.into().into());
1882 }
1883 pub fn with_content_digest<T: Into<String>>(mut self, field: T) -> Self {
1885 self.set_content_digest(field.into());
1886 self
1887 }
1888 pub fn previous_digest_opt_mut(&mut self) -> Option<&mut String> {
1890 self.previous_digest.as_mut().map(|field| field as _)
1891 }
1892 pub fn previous_digest_mut(&mut self) -> &mut String {
1895 self.previous_digest.get_or_insert_default()
1896 }
1897 pub fn previous_digest_opt(&self) -> Option<&str> {
1899 self.previous_digest.as_ref().map(|field| field as _)
1900 }
1901 pub fn set_previous_digest<T: Into<String>>(&mut self, field: T) {
1903 self.previous_digest = Some(field.into().into());
1904 }
1905 pub fn with_previous_digest<T: Into<String>>(mut self, field: T) -> Self {
1907 self.set_previous_digest(field.into());
1908 self
1909 }
1910 pub fn epoch_rolling_gas_cost_summary(&self) -> &super::GasCostSummary {
1912 self.epoch_rolling_gas_cost_summary
1913 .as_ref()
1914 .map(|field| field as _)
1915 .unwrap_or_else(|| super::GasCostSummary::default_instance() as _)
1916 }
1917 pub fn epoch_rolling_gas_cost_summary_opt_mut(
1919 &mut self,
1920 ) -> Option<&mut super::GasCostSummary> {
1921 self.epoch_rolling_gas_cost_summary.as_mut().map(|field| field as _)
1922 }
1923 pub fn epoch_rolling_gas_cost_summary_mut(
1926 &mut self,
1927 ) -> &mut super::GasCostSummary {
1928 self.epoch_rolling_gas_cost_summary.get_or_insert_default()
1929 }
1930 pub fn epoch_rolling_gas_cost_summary_opt(
1932 &self,
1933 ) -> Option<&super::GasCostSummary> {
1934 self.epoch_rolling_gas_cost_summary.as_ref().map(|field| field as _)
1935 }
1936 pub fn set_epoch_rolling_gas_cost_summary<T: Into<super::GasCostSummary>>(
1938 &mut self,
1939 field: T,
1940 ) {
1941 self.epoch_rolling_gas_cost_summary = Some(field.into().into());
1942 }
1943 pub fn with_epoch_rolling_gas_cost_summary<T: Into<super::GasCostSummary>>(
1945 mut self,
1946 field: T,
1947 ) -> Self {
1948 self.set_epoch_rolling_gas_cost_summary(field.into());
1949 self
1950 }
1951 pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
1953 self.timestamp.as_mut().map(|field| field as _)
1954 }
1955 pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
1958 self.timestamp.get_or_insert_default()
1959 }
1960 pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
1962 self.timestamp.as_ref().map(|field| field as _)
1963 }
1964 pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
1966 self.timestamp = Some(field.into().into());
1967 }
1968 pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
1970 mut self,
1971 field: T,
1972 ) -> Self {
1973 self.set_timestamp(field.into());
1974 self
1975 }
1976 pub fn commitments(&self) -> &[super::CheckpointCommitment] {
1978 &self.commitments
1979 }
1980 pub fn commitments_mut(&mut self) -> &mut Vec<super::CheckpointCommitment> {
1983 &mut self.commitments
1984 }
1985 pub fn set_commitments(&mut self, field: Vec<super::CheckpointCommitment>) {
1987 self.commitments = field;
1988 }
1989 pub fn with_commitments(
1991 mut self,
1992 field: Vec<super::CheckpointCommitment>,
1993 ) -> Self {
1994 self.set_commitments(field);
1995 self
1996 }
1997 pub fn end_of_epoch_data(&self) -> &super::EndOfEpochData {
1999 self.end_of_epoch_data
2000 .as_ref()
2001 .map(|field| field as _)
2002 .unwrap_or_else(|| super::EndOfEpochData::default_instance() as _)
2003 }
2004 pub fn end_of_epoch_data_opt_mut(
2006 &mut self,
2007 ) -> Option<&mut super::EndOfEpochData> {
2008 self.end_of_epoch_data.as_mut().map(|field| field as _)
2009 }
2010 pub fn end_of_epoch_data_mut(&mut self) -> &mut super::EndOfEpochData {
2013 self.end_of_epoch_data.get_or_insert_default()
2014 }
2015 pub fn end_of_epoch_data_opt(&self) -> Option<&super::EndOfEpochData> {
2017 self.end_of_epoch_data.as_ref().map(|field| field as _)
2018 }
2019 pub fn set_end_of_epoch_data<T: Into<super::EndOfEpochData>>(
2021 &mut self,
2022 field: T,
2023 ) {
2024 self.end_of_epoch_data = Some(field.into().into());
2025 }
2026 pub fn with_end_of_epoch_data<T: Into<super::EndOfEpochData>>(
2028 mut self,
2029 field: T,
2030 ) -> Self {
2031 self.set_end_of_epoch_data(field.into());
2032 self
2033 }
2034 pub fn version_specific_data_opt(&self) -> Option<&[u8]> {
2036 self.version_specific_data.as_ref().map(|field| field as _)
2037 }
2038 pub fn set_version_specific_data<T: Into<::prost::bytes::Bytes>>(
2040 &mut self,
2041 field: T,
2042 ) {
2043 self.version_specific_data = Some(field.into().into());
2044 }
2045 pub fn with_version_specific_data<T: Into<::prost::bytes::Bytes>>(
2047 mut self,
2048 field: T,
2049 ) -> Self {
2050 self.set_version_specific_data(field.into());
2051 self
2052 }
2053 }
2054 impl super::CheckpointedTransactionInfo {
2055 pub const fn const_default() -> Self {
2056 Self {
2057 transaction: None,
2058 effects: None,
2059 signatures: Vec::new(),
2060 address_aliases_versions: Vec::new(),
2061 }
2062 }
2063 #[doc(hidden)]
2064 pub fn default_instance() -> &'static Self {
2065 static DEFAULT: super::CheckpointedTransactionInfo = super::CheckpointedTransactionInfo::const_default();
2066 &DEFAULT
2067 }
2068 pub fn transaction_opt_mut(&mut self) -> Option<&mut String> {
2070 self.transaction.as_mut().map(|field| field as _)
2071 }
2072 pub fn transaction_mut(&mut self) -> &mut String {
2075 self.transaction.get_or_insert_default()
2076 }
2077 pub fn transaction_opt(&self) -> Option<&str> {
2079 self.transaction.as_ref().map(|field| field as _)
2080 }
2081 pub fn set_transaction<T: Into<String>>(&mut self, field: T) {
2083 self.transaction = Some(field.into().into());
2084 }
2085 pub fn with_transaction<T: Into<String>>(mut self, field: T) -> Self {
2087 self.set_transaction(field.into());
2088 self
2089 }
2090 pub fn effects_opt_mut(&mut self) -> Option<&mut String> {
2092 self.effects.as_mut().map(|field| field as _)
2093 }
2094 pub fn effects_mut(&mut self) -> &mut String {
2097 self.effects.get_or_insert_default()
2098 }
2099 pub fn effects_opt(&self) -> Option<&str> {
2101 self.effects.as_ref().map(|field| field as _)
2102 }
2103 pub fn set_effects<T: Into<String>>(&mut self, field: T) {
2105 self.effects = Some(field.into().into());
2106 }
2107 pub fn with_effects<T: Into<String>>(mut self, field: T) -> Self {
2109 self.set_effects(field.into());
2110 self
2111 }
2112 pub fn signatures(&self) -> &[super::UserSignature] {
2114 &self.signatures
2115 }
2116 pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
2119 &mut self.signatures
2120 }
2121 pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
2123 self.signatures = field;
2124 }
2125 pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
2127 self.set_signatures(field);
2128 self
2129 }
2130 pub fn address_aliases_versions(&self) -> &[super::AddressAliasesVersion] {
2132 &self.address_aliases_versions
2133 }
2134 pub fn address_aliases_versions_mut(
2137 &mut self,
2138 ) -> &mut Vec<super::AddressAliasesVersion> {
2139 &mut self.address_aliases_versions
2140 }
2141 pub fn set_address_aliases_versions(
2143 &mut self,
2144 field: Vec<super::AddressAliasesVersion>,
2145 ) {
2146 self.address_aliases_versions = field;
2147 }
2148 pub fn with_address_aliases_versions(
2150 mut self,
2151 field: Vec<super::AddressAliasesVersion>,
2152 ) -> Self {
2153 self.set_address_aliases_versions(field);
2154 self
2155 }
2156 }
2157 impl super::CircomG1 {
2158 pub const fn const_default() -> Self {
2159 Self {
2160 e0: None,
2161 e1: None,
2162 e2: None,
2163 }
2164 }
2165 #[doc(hidden)]
2166 pub fn default_instance() -> &'static Self {
2167 static DEFAULT: super::CircomG1 = super::CircomG1::const_default();
2168 &DEFAULT
2169 }
2170 pub fn e0_opt_mut(&mut self) -> Option<&mut String> {
2172 self.e0.as_mut().map(|field| field as _)
2173 }
2174 pub fn e0_mut(&mut self) -> &mut String {
2177 self.e0.get_or_insert_default()
2178 }
2179 pub fn e0_opt(&self) -> Option<&str> {
2181 self.e0.as_ref().map(|field| field as _)
2182 }
2183 pub fn set_e0<T: Into<String>>(&mut self, field: T) {
2185 self.e0 = Some(field.into().into());
2186 }
2187 pub fn with_e0<T: Into<String>>(mut self, field: T) -> Self {
2189 self.set_e0(field.into());
2190 self
2191 }
2192 pub fn e1_opt_mut(&mut self) -> Option<&mut String> {
2194 self.e1.as_mut().map(|field| field as _)
2195 }
2196 pub fn e1_mut(&mut self) -> &mut String {
2199 self.e1.get_or_insert_default()
2200 }
2201 pub fn e1_opt(&self) -> Option<&str> {
2203 self.e1.as_ref().map(|field| field as _)
2204 }
2205 pub fn set_e1<T: Into<String>>(&mut self, field: T) {
2207 self.e1 = Some(field.into().into());
2208 }
2209 pub fn with_e1<T: Into<String>>(mut self, field: T) -> Self {
2211 self.set_e1(field.into());
2212 self
2213 }
2214 pub fn e2_opt_mut(&mut self) -> Option<&mut String> {
2216 self.e2.as_mut().map(|field| field as _)
2217 }
2218 pub fn e2_mut(&mut self) -> &mut String {
2221 self.e2.get_or_insert_default()
2222 }
2223 pub fn e2_opt(&self) -> Option<&str> {
2225 self.e2.as_ref().map(|field| field as _)
2226 }
2227 pub fn set_e2<T: Into<String>>(&mut self, field: T) {
2229 self.e2 = Some(field.into().into());
2230 }
2231 pub fn with_e2<T: Into<String>>(mut self, field: T) -> Self {
2233 self.set_e2(field.into());
2234 self
2235 }
2236 }
2237 impl super::CircomG2 {
2238 pub const fn const_default() -> Self {
2239 Self {
2240 e00: None,
2241 e01: None,
2242 e10: None,
2243 e11: None,
2244 e20: None,
2245 e21: None,
2246 }
2247 }
2248 #[doc(hidden)]
2249 pub fn default_instance() -> &'static Self {
2250 static DEFAULT: super::CircomG2 = super::CircomG2::const_default();
2251 &DEFAULT
2252 }
2253 pub fn e00_opt_mut(&mut self) -> Option<&mut String> {
2255 self.e00.as_mut().map(|field| field as _)
2256 }
2257 pub fn e00_mut(&mut self) -> &mut String {
2260 self.e00.get_or_insert_default()
2261 }
2262 pub fn e00_opt(&self) -> Option<&str> {
2264 self.e00.as_ref().map(|field| field as _)
2265 }
2266 pub fn set_e00<T: Into<String>>(&mut self, field: T) {
2268 self.e00 = Some(field.into().into());
2269 }
2270 pub fn with_e00<T: Into<String>>(mut self, field: T) -> Self {
2272 self.set_e00(field.into());
2273 self
2274 }
2275 pub fn e01_opt_mut(&mut self) -> Option<&mut String> {
2277 self.e01.as_mut().map(|field| field as _)
2278 }
2279 pub fn e01_mut(&mut self) -> &mut String {
2282 self.e01.get_or_insert_default()
2283 }
2284 pub fn e01_opt(&self) -> Option<&str> {
2286 self.e01.as_ref().map(|field| field as _)
2287 }
2288 pub fn set_e01<T: Into<String>>(&mut self, field: T) {
2290 self.e01 = Some(field.into().into());
2291 }
2292 pub fn with_e01<T: Into<String>>(mut self, field: T) -> Self {
2294 self.set_e01(field.into());
2295 self
2296 }
2297 pub fn e10_opt_mut(&mut self) -> Option<&mut String> {
2299 self.e10.as_mut().map(|field| field as _)
2300 }
2301 pub fn e10_mut(&mut self) -> &mut String {
2304 self.e10.get_or_insert_default()
2305 }
2306 pub fn e10_opt(&self) -> Option<&str> {
2308 self.e10.as_ref().map(|field| field as _)
2309 }
2310 pub fn set_e10<T: Into<String>>(&mut self, field: T) {
2312 self.e10 = Some(field.into().into());
2313 }
2314 pub fn with_e10<T: Into<String>>(mut self, field: T) -> Self {
2316 self.set_e10(field.into());
2317 self
2318 }
2319 pub fn e11_opt_mut(&mut self) -> Option<&mut String> {
2321 self.e11.as_mut().map(|field| field as _)
2322 }
2323 pub fn e11_mut(&mut self) -> &mut String {
2326 self.e11.get_or_insert_default()
2327 }
2328 pub fn e11_opt(&self) -> Option<&str> {
2330 self.e11.as_ref().map(|field| field as _)
2331 }
2332 pub fn set_e11<T: Into<String>>(&mut self, field: T) {
2334 self.e11 = Some(field.into().into());
2335 }
2336 pub fn with_e11<T: Into<String>>(mut self, field: T) -> Self {
2338 self.set_e11(field.into());
2339 self
2340 }
2341 pub fn e20_opt_mut(&mut self) -> Option<&mut String> {
2343 self.e20.as_mut().map(|field| field as _)
2344 }
2345 pub fn e20_mut(&mut self) -> &mut String {
2348 self.e20.get_or_insert_default()
2349 }
2350 pub fn e20_opt(&self) -> Option<&str> {
2352 self.e20.as_ref().map(|field| field as _)
2353 }
2354 pub fn set_e20<T: Into<String>>(&mut self, field: T) {
2356 self.e20 = Some(field.into().into());
2357 }
2358 pub fn with_e20<T: Into<String>>(mut self, field: T) -> Self {
2360 self.set_e20(field.into());
2361 self
2362 }
2363 pub fn e21_opt_mut(&mut self) -> Option<&mut String> {
2365 self.e21.as_mut().map(|field| field as _)
2366 }
2367 pub fn e21_mut(&mut self) -> &mut String {
2370 self.e21.get_or_insert_default()
2371 }
2372 pub fn e21_opt(&self) -> Option<&str> {
2374 self.e21.as_ref().map(|field| field as _)
2375 }
2376 pub fn set_e21<T: Into<String>>(&mut self, field: T) {
2378 self.e21 = Some(field.into().into());
2379 }
2380 pub fn with_e21<T: Into<String>>(mut self, field: T) -> Self {
2382 self.set_e21(field.into());
2383 self
2384 }
2385 }
2386 impl super::CleverError {
2387 pub const fn const_default() -> Self {
2388 Self {
2389 error_code: None,
2390 line_number: None,
2391 constant_name: None,
2392 constant_type: None,
2393 value: None,
2394 }
2395 }
2396 #[doc(hidden)]
2397 pub fn default_instance() -> &'static Self {
2398 static DEFAULT: super::CleverError = super::CleverError::const_default();
2399 &DEFAULT
2400 }
2401 pub fn error_code_opt_mut(&mut self) -> Option<&mut u64> {
2403 self.error_code.as_mut().map(|field| field as _)
2404 }
2405 pub fn error_code_mut(&mut self) -> &mut u64 {
2408 self.error_code.get_or_insert_default()
2409 }
2410 pub fn error_code_opt(&self) -> Option<u64> {
2412 self.error_code.as_ref().map(|field| *field)
2413 }
2414 pub fn set_error_code(&mut self, field: u64) {
2416 self.error_code = Some(field);
2417 }
2418 pub fn with_error_code(mut self, field: u64) -> Self {
2420 self.set_error_code(field);
2421 self
2422 }
2423 pub fn line_number_opt_mut(&mut self) -> Option<&mut u64> {
2425 self.line_number.as_mut().map(|field| field as _)
2426 }
2427 pub fn line_number_mut(&mut self) -> &mut u64 {
2430 self.line_number.get_or_insert_default()
2431 }
2432 pub fn line_number_opt(&self) -> Option<u64> {
2434 self.line_number.as_ref().map(|field| *field)
2435 }
2436 pub fn set_line_number(&mut self, field: u64) {
2438 self.line_number = Some(field);
2439 }
2440 pub fn with_line_number(mut self, field: u64) -> Self {
2442 self.set_line_number(field);
2443 self
2444 }
2445 pub fn constant_name_opt_mut(&mut self) -> Option<&mut String> {
2447 self.constant_name.as_mut().map(|field| field as _)
2448 }
2449 pub fn constant_name_mut(&mut self) -> &mut String {
2452 self.constant_name.get_or_insert_default()
2453 }
2454 pub fn constant_name_opt(&self) -> Option<&str> {
2456 self.constant_name.as_ref().map(|field| field as _)
2457 }
2458 pub fn set_constant_name<T: Into<String>>(&mut self, field: T) {
2460 self.constant_name = Some(field.into().into());
2461 }
2462 pub fn with_constant_name<T: Into<String>>(mut self, field: T) -> Self {
2464 self.set_constant_name(field.into());
2465 self
2466 }
2467 pub fn constant_type_opt_mut(&mut self) -> Option<&mut String> {
2469 self.constant_type.as_mut().map(|field| field as _)
2470 }
2471 pub fn constant_type_mut(&mut self) -> &mut String {
2474 self.constant_type.get_or_insert_default()
2475 }
2476 pub fn constant_type_opt(&self) -> Option<&str> {
2478 self.constant_type.as_ref().map(|field| field as _)
2479 }
2480 pub fn set_constant_type<T: Into<String>>(&mut self, field: T) {
2482 self.constant_type = Some(field.into().into());
2483 }
2484 pub fn with_constant_type<T: Into<String>>(mut self, field: T) -> Self {
2486 self.set_constant_type(field.into());
2487 self
2488 }
2489 pub fn rendered(&self) -> &str {
2491 if let Some(super::clever_error::Value::Rendered(field)) = &self.value {
2492 field as _
2493 } else {
2494 ""
2495 }
2496 }
2497 pub fn rendered_opt(&self) -> Option<&str> {
2499 if let Some(super::clever_error::Value::Rendered(field)) = &self.value {
2500 Some(field as _)
2501 } else {
2502 None
2503 }
2504 }
2505 pub fn rendered_opt_mut(&mut self) -> Option<&mut String> {
2507 if let Some(super::clever_error::Value::Rendered(field)) = &mut self.value {
2508 Some(field as _)
2509 } else {
2510 None
2511 }
2512 }
2513 pub fn rendered_mut(&mut self) -> &mut String {
2517 if self.rendered_opt_mut().is_none() {
2518 self.value = Some(
2519 super::clever_error::Value::Rendered(String::default()),
2520 );
2521 }
2522 self.rendered_opt_mut().unwrap()
2523 }
2524 pub fn set_rendered<T: Into<String>>(&mut self, field: T) {
2527 self.value = Some(super::clever_error::Value::Rendered(field.into().into()));
2528 }
2529 pub fn with_rendered<T: Into<String>>(mut self, field: T) -> Self {
2532 self.set_rendered(field.into());
2533 self
2534 }
2535 pub fn raw(&self) -> &[u8] {
2537 if let Some(super::clever_error::Value::Raw(field)) = &self.value {
2538 field as _
2539 } else {
2540 &[]
2541 }
2542 }
2543 pub fn raw_opt(&self) -> Option<&[u8]> {
2545 if let Some(super::clever_error::Value::Raw(field)) = &self.value {
2546 Some(field as _)
2547 } else {
2548 None
2549 }
2550 }
2551 pub fn raw_opt_mut(&mut self) -> Option<&mut ::prost::bytes::Bytes> {
2553 if let Some(super::clever_error::Value::Raw(field)) = &mut self.value {
2554 Some(field as _)
2555 } else {
2556 None
2557 }
2558 }
2559 pub fn raw_mut(&mut self) -> &mut ::prost::bytes::Bytes {
2563 if self.raw_opt_mut().is_none() {
2564 self.value = Some(
2565 super::clever_error::Value::Raw(::prost::bytes::Bytes::default()),
2566 );
2567 }
2568 self.raw_opt_mut().unwrap()
2569 }
2570 pub fn set_raw<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
2573 self.value = Some(super::clever_error::Value::Raw(field.into().into()));
2574 }
2575 pub fn with_raw<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
2578 self.set_raw(field.into());
2579 self
2580 }
2581 }
2582 impl super::CoinDenyListError {
2583 pub const fn const_default() -> Self {
2584 Self {
2585 address: None,
2586 coin_type: None,
2587 }
2588 }
2589 #[doc(hidden)]
2590 pub fn default_instance() -> &'static Self {
2591 static DEFAULT: super::CoinDenyListError = super::CoinDenyListError::const_default();
2592 &DEFAULT
2593 }
2594 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
2596 self.address.as_mut().map(|field| field as _)
2597 }
2598 pub fn address_mut(&mut self) -> &mut String {
2601 self.address.get_or_insert_default()
2602 }
2603 pub fn address_opt(&self) -> Option<&str> {
2605 self.address.as_ref().map(|field| field as _)
2606 }
2607 pub fn set_address<T: Into<String>>(&mut self, field: T) {
2609 self.address = Some(field.into().into());
2610 }
2611 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
2613 self.set_address(field.into());
2614 self
2615 }
2616 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
2618 self.coin_type.as_mut().map(|field| field as _)
2619 }
2620 pub fn coin_type_mut(&mut self) -> &mut String {
2623 self.coin_type.get_or_insert_default()
2624 }
2625 pub fn coin_type_opt(&self) -> Option<&str> {
2627 self.coin_type.as_ref().map(|field| field as _)
2628 }
2629 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
2631 self.coin_type = Some(field.into().into());
2632 }
2633 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
2635 self.set_coin_type(field.into());
2636 self
2637 }
2638 }
2639 impl super::CoinMetadata {
2640 pub const fn const_default() -> Self {
2641 Self {
2642 id: None,
2643 decimals: None,
2644 name: None,
2645 symbol: None,
2646 description: None,
2647 icon_url: None,
2648 metadata_cap_id: None,
2649 metadata_cap_state: None,
2650 }
2651 }
2652 #[doc(hidden)]
2653 pub fn default_instance() -> &'static Self {
2654 static DEFAULT: super::CoinMetadata = super::CoinMetadata::const_default();
2655 &DEFAULT
2656 }
2657 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
2659 self.id.as_mut().map(|field| field as _)
2660 }
2661 pub fn id_mut(&mut self) -> &mut String {
2664 self.id.get_or_insert_default()
2665 }
2666 pub fn id_opt(&self) -> Option<&str> {
2668 self.id.as_ref().map(|field| field as _)
2669 }
2670 pub fn set_id<T: Into<String>>(&mut self, field: T) {
2672 self.id = Some(field.into().into());
2673 }
2674 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
2676 self.set_id(field.into());
2677 self
2678 }
2679 pub fn decimals_opt_mut(&mut self) -> Option<&mut u32> {
2681 self.decimals.as_mut().map(|field| field as _)
2682 }
2683 pub fn decimals_mut(&mut self) -> &mut u32 {
2686 self.decimals.get_or_insert_default()
2687 }
2688 pub fn decimals_opt(&self) -> Option<u32> {
2690 self.decimals.as_ref().map(|field| *field)
2691 }
2692 pub fn set_decimals(&mut self, field: u32) {
2694 self.decimals = Some(field);
2695 }
2696 pub fn with_decimals(mut self, field: u32) -> Self {
2698 self.set_decimals(field);
2699 self
2700 }
2701 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
2703 self.name.as_mut().map(|field| field as _)
2704 }
2705 pub fn name_mut(&mut self) -> &mut String {
2708 self.name.get_or_insert_default()
2709 }
2710 pub fn name_opt(&self) -> Option<&str> {
2712 self.name.as_ref().map(|field| field as _)
2713 }
2714 pub fn set_name<T: Into<String>>(&mut self, field: T) {
2716 self.name = Some(field.into().into());
2717 }
2718 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
2720 self.set_name(field.into());
2721 self
2722 }
2723 pub fn symbol_opt_mut(&mut self) -> Option<&mut String> {
2725 self.symbol.as_mut().map(|field| field as _)
2726 }
2727 pub fn symbol_mut(&mut self) -> &mut String {
2730 self.symbol.get_or_insert_default()
2731 }
2732 pub fn symbol_opt(&self) -> Option<&str> {
2734 self.symbol.as_ref().map(|field| field as _)
2735 }
2736 pub fn set_symbol<T: Into<String>>(&mut self, field: T) {
2738 self.symbol = Some(field.into().into());
2739 }
2740 pub fn with_symbol<T: Into<String>>(mut self, field: T) -> Self {
2742 self.set_symbol(field.into());
2743 self
2744 }
2745 pub fn description_opt_mut(&mut self) -> Option<&mut String> {
2747 self.description.as_mut().map(|field| field as _)
2748 }
2749 pub fn description_mut(&mut self) -> &mut String {
2752 self.description.get_or_insert_default()
2753 }
2754 pub fn description_opt(&self) -> Option<&str> {
2756 self.description.as_ref().map(|field| field as _)
2757 }
2758 pub fn set_description<T: Into<String>>(&mut self, field: T) {
2760 self.description = Some(field.into().into());
2761 }
2762 pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
2764 self.set_description(field.into());
2765 self
2766 }
2767 pub fn icon_url_opt_mut(&mut self) -> Option<&mut String> {
2769 self.icon_url.as_mut().map(|field| field as _)
2770 }
2771 pub fn icon_url_mut(&mut self) -> &mut String {
2774 self.icon_url.get_or_insert_default()
2775 }
2776 pub fn icon_url_opt(&self) -> Option<&str> {
2778 self.icon_url.as_ref().map(|field| field as _)
2779 }
2780 pub fn set_icon_url<T: Into<String>>(&mut self, field: T) {
2782 self.icon_url = Some(field.into().into());
2783 }
2784 pub fn with_icon_url<T: Into<String>>(mut self, field: T) -> Self {
2786 self.set_icon_url(field.into());
2787 self
2788 }
2789 pub fn metadata_cap_id_opt_mut(&mut self) -> Option<&mut String> {
2791 self.metadata_cap_id.as_mut().map(|field| field as _)
2792 }
2793 pub fn metadata_cap_id_mut(&mut self) -> &mut String {
2796 self.metadata_cap_id.get_or_insert_default()
2797 }
2798 pub fn metadata_cap_id_opt(&self) -> Option<&str> {
2800 self.metadata_cap_id.as_ref().map(|field| field as _)
2801 }
2802 pub fn set_metadata_cap_id<T: Into<String>>(&mut self, field: T) {
2804 self.metadata_cap_id = Some(field.into().into());
2805 }
2806 pub fn with_metadata_cap_id<T: Into<String>>(mut self, field: T) -> Self {
2808 self.set_metadata_cap_id(field.into());
2809 self
2810 }
2811 pub fn with_metadata_cap_state<T: Into<super::coin_metadata::MetadataCapState>>(
2813 mut self,
2814 field: T,
2815 ) -> Self {
2816 self.set_metadata_cap_state(field.into());
2817 self
2818 }
2819 }
2820 impl super::CoinTreasury {
2821 pub const fn const_default() -> Self {
2822 Self {
2823 id: None,
2824 total_supply: None,
2825 supply_state: None,
2826 }
2827 }
2828 #[doc(hidden)]
2829 pub fn default_instance() -> &'static Self {
2830 static DEFAULT: super::CoinTreasury = super::CoinTreasury::const_default();
2831 &DEFAULT
2832 }
2833 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
2835 self.id.as_mut().map(|field| field as _)
2836 }
2837 pub fn id_mut(&mut self) -> &mut String {
2840 self.id.get_or_insert_default()
2841 }
2842 pub fn id_opt(&self) -> Option<&str> {
2844 self.id.as_ref().map(|field| field as _)
2845 }
2846 pub fn set_id<T: Into<String>>(&mut self, field: T) {
2848 self.id = Some(field.into().into());
2849 }
2850 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
2852 self.set_id(field.into());
2853 self
2854 }
2855 pub fn total_supply_opt_mut(&mut self) -> Option<&mut u64> {
2857 self.total_supply.as_mut().map(|field| field as _)
2858 }
2859 pub fn total_supply_mut(&mut self) -> &mut u64 {
2862 self.total_supply.get_or_insert_default()
2863 }
2864 pub fn total_supply_opt(&self) -> Option<u64> {
2866 self.total_supply.as_ref().map(|field| *field)
2867 }
2868 pub fn set_total_supply(&mut self, field: u64) {
2870 self.total_supply = Some(field);
2871 }
2872 pub fn with_total_supply(mut self, field: u64) -> Self {
2874 self.set_total_supply(field);
2875 self
2876 }
2877 pub fn with_supply_state<T: Into<super::coin_treasury::SupplyState>>(
2879 mut self,
2880 field: T,
2881 ) -> Self {
2882 self.set_supply_state(field.into());
2883 self
2884 }
2885 }
2886 impl super::Command {
2887 pub const fn const_default() -> Self {
2888 Self { command: None }
2889 }
2890 #[doc(hidden)]
2891 pub fn default_instance() -> &'static Self {
2892 static DEFAULT: super::Command = super::Command::const_default();
2893 &DEFAULT
2894 }
2895 pub fn move_call(&self) -> &super::MoveCall {
2897 if let Some(super::command::Command::MoveCall(field)) = &self.command {
2898 field as _
2899 } else {
2900 super::MoveCall::default_instance() as _
2901 }
2902 }
2903 pub fn move_call_opt(&self) -> Option<&super::MoveCall> {
2905 if let Some(super::command::Command::MoveCall(field)) = &self.command {
2906 Some(field as _)
2907 } else {
2908 None
2909 }
2910 }
2911 pub fn move_call_opt_mut(&mut self) -> Option<&mut super::MoveCall> {
2913 if let Some(super::command::Command::MoveCall(field)) = &mut self.command {
2914 Some(field as _)
2915 } else {
2916 None
2917 }
2918 }
2919 pub fn move_call_mut(&mut self) -> &mut super::MoveCall {
2923 if self.move_call_opt_mut().is_none() {
2924 self.command = Some(
2925 super::command::Command::MoveCall(super::MoveCall::default()),
2926 );
2927 }
2928 self.move_call_opt_mut().unwrap()
2929 }
2930 pub fn set_move_call<T: Into<super::MoveCall>>(&mut self, field: T) {
2933 self.command = Some(super::command::Command::MoveCall(field.into().into()));
2934 }
2935 pub fn with_move_call<T: Into<super::MoveCall>>(mut self, field: T) -> Self {
2938 self.set_move_call(field.into());
2939 self
2940 }
2941 pub fn transfer_objects(&self) -> &super::TransferObjects {
2943 if let Some(super::command::Command::TransferObjects(field)) = &self.command
2944 {
2945 field as _
2946 } else {
2947 super::TransferObjects::default_instance() as _
2948 }
2949 }
2950 pub fn transfer_objects_opt(&self) -> Option<&super::TransferObjects> {
2952 if let Some(super::command::Command::TransferObjects(field)) = &self.command
2953 {
2954 Some(field as _)
2955 } else {
2956 None
2957 }
2958 }
2959 pub fn transfer_objects_opt_mut(
2961 &mut self,
2962 ) -> Option<&mut super::TransferObjects> {
2963 if let Some(super::command::Command::TransferObjects(field)) = &mut self
2964 .command
2965 {
2966 Some(field as _)
2967 } else {
2968 None
2969 }
2970 }
2971 pub fn transfer_objects_mut(&mut self) -> &mut super::TransferObjects {
2975 if self.transfer_objects_opt_mut().is_none() {
2976 self.command = Some(
2977 super::command::Command::TransferObjects(
2978 super::TransferObjects::default(),
2979 ),
2980 );
2981 }
2982 self.transfer_objects_opt_mut().unwrap()
2983 }
2984 pub fn set_transfer_objects<T: Into<super::TransferObjects>>(
2987 &mut self,
2988 field: T,
2989 ) {
2990 self.command = Some(
2991 super::command::Command::TransferObjects(field.into().into()),
2992 );
2993 }
2994 pub fn with_transfer_objects<T: Into<super::TransferObjects>>(
2997 mut self,
2998 field: T,
2999 ) -> Self {
3000 self.set_transfer_objects(field.into());
3001 self
3002 }
3003 pub fn split_coins(&self) -> &super::SplitCoins {
3005 if let Some(super::command::Command::SplitCoins(field)) = &self.command {
3006 field as _
3007 } else {
3008 super::SplitCoins::default_instance() as _
3009 }
3010 }
3011 pub fn split_coins_opt(&self) -> Option<&super::SplitCoins> {
3013 if let Some(super::command::Command::SplitCoins(field)) = &self.command {
3014 Some(field as _)
3015 } else {
3016 None
3017 }
3018 }
3019 pub fn split_coins_opt_mut(&mut self) -> Option<&mut super::SplitCoins> {
3021 if let Some(super::command::Command::SplitCoins(field)) = &mut self.command {
3022 Some(field as _)
3023 } else {
3024 None
3025 }
3026 }
3027 pub fn split_coins_mut(&mut self) -> &mut super::SplitCoins {
3031 if self.split_coins_opt_mut().is_none() {
3032 self.command = Some(
3033 super::command::Command::SplitCoins(super::SplitCoins::default()),
3034 );
3035 }
3036 self.split_coins_opt_mut().unwrap()
3037 }
3038 pub fn set_split_coins<T: Into<super::SplitCoins>>(&mut self, field: T) {
3041 self.command = Some(
3042 super::command::Command::SplitCoins(field.into().into()),
3043 );
3044 }
3045 pub fn with_split_coins<T: Into<super::SplitCoins>>(mut self, field: T) -> Self {
3048 self.set_split_coins(field.into());
3049 self
3050 }
3051 pub fn merge_coins(&self) -> &super::MergeCoins {
3053 if let Some(super::command::Command::MergeCoins(field)) = &self.command {
3054 field as _
3055 } else {
3056 super::MergeCoins::default_instance() as _
3057 }
3058 }
3059 pub fn merge_coins_opt(&self) -> Option<&super::MergeCoins> {
3061 if let Some(super::command::Command::MergeCoins(field)) = &self.command {
3062 Some(field as _)
3063 } else {
3064 None
3065 }
3066 }
3067 pub fn merge_coins_opt_mut(&mut self) -> Option<&mut super::MergeCoins> {
3069 if let Some(super::command::Command::MergeCoins(field)) = &mut self.command {
3070 Some(field as _)
3071 } else {
3072 None
3073 }
3074 }
3075 pub fn merge_coins_mut(&mut self) -> &mut super::MergeCoins {
3079 if self.merge_coins_opt_mut().is_none() {
3080 self.command = Some(
3081 super::command::Command::MergeCoins(super::MergeCoins::default()),
3082 );
3083 }
3084 self.merge_coins_opt_mut().unwrap()
3085 }
3086 pub fn set_merge_coins<T: Into<super::MergeCoins>>(&mut self, field: T) {
3089 self.command = Some(
3090 super::command::Command::MergeCoins(field.into().into()),
3091 );
3092 }
3093 pub fn with_merge_coins<T: Into<super::MergeCoins>>(mut self, field: T) -> Self {
3096 self.set_merge_coins(field.into());
3097 self
3098 }
3099 pub fn publish(&self) -> &super::Publish {
3101 if let Some(super::command::Command::Publish(field)) = &self.command {
3102 field as _
3103 } else {
3104 super::Publish::default_instance() as _
3105 }
3106 }
3107 pub fn publish_opt(&self) -> Option<&super::Publish> {
3109 if let Some(super::command::Command::Publish(field)) = &self.command {
3110 Some(field as _)
3111 } else {
3112 None
3113 }
3114 }
3115 pub fn publish_opt_mut(&mut self) -> Option<&mut super::Publish> {
3117 if let Some(super::command::Command::Publish(field)) = &mut self.command {
3118 Some(field as _)
3119 } else {
3120 None
3121 }
3122 }
3123 pub fn publish_mut(&mut self) -> &mut super::Publish {
3127 if self.publish_opt_mut().is_none() {
3128 self.command = Some(
3129 super::command::Command::Publish(super::Publish::default()),
3130 );
3131 }
3132 self.publish_opt_mut().unwrap()
3133 }
3134 pub fn set_publish<T: Into<super::Publish>>(&mut self, field: T) {
3137 self.command = Some(super::command::Command::Publish(field.into().into()));
3138 }
3139 pub fn with_publish<T: Into<super::Publish>>(mut self, field: T) -> Self {
3142 self.set_publish(field.into());
3143 self
3144 }
3145 pub fn make_move_vector(&self) -> &super::MakeMoveVector {
3147 if let Some(super::command::Command::MakeMoveVector(field)) = &self.command {
3148 field as _
3149 } else {
3150 super::MakeMoveVector::default_instance() as _
3151 }
3152 }
3153 pub fn make_move_vector_opt(&self) -> Option<&super::MakeMoveVector> {
3155 if let Some(super::command::Command::MakeMoveVector(field)) = &self.command {
3156 Some(field as _)
3157 } else {
3158 None
3159 }
3160 }
3161 pub fn make_move_vector_opt_mut(
3163 &mut self,
3164 ) -> Option<&mut super::MakeMoveVector> {
3165 if let Some(super::command::Command::MakeMoveVector(field)) = &mut self
3166 .command
3167 {
3168 Some(field as _)
3169 } else {
3170 None
3171 }
3172 }
3173 pub fn make_move_vector_mut(&mut self) -> &mut super::MakeMoveVector {
3177 if self.make_move_vector_opt_mut().is_none() {
3178 self.command = Some(
3179 super::command::Command::MakeMoveVector(
3180 super::MakeMoveVector::default(),
3181 ),
3182 );
3183 }
3184 self.make_move_vector_opt_mut().unwrap()
3185 }
3186 pub fn set_make_move_vector<T: Into<super::MakeMoveVector>>(
3189 &mut self,
3190 field: T,
3191 ) {
3192 self.command = Some(
3193 super::command::Command::MakeMoveVector(field.into().into()),
3194 );
3195 }
3196 pub fn with_make_move_vector<T: Into<super::MakeMoveVector>>(
3199 mut self,
3200 field: T,
3201 ) -> Self {
3202 self.set_make_move_vector(field.into());
3203 self
3204 }
3205 pub fn upgrade(&self) -> &super::Upgrade {
3207 if let Some(super::command::Command::Upgrade(field)) = &self.command {
3208 field as _
3209 } else {
3210 super::Upgrade::default_instance() as _
3211 }
3212 }
3213 pub fn upgrade_opt(&self) -> Option<&super::Upgrade> {
3215 if let Some(super::command::Command::Upgrade(field)) = &self.command {
3216 Some(field as _)
3217 } else {
3218 None
3219 }
3220 }
3221 pub fn upgrade_opt_mut(&mut self) -> Option<&mut super::Upgrade> {
3223 if let Some(super::command::Command::Upgrade(field)) = &mut self.command {
3224 Some(field as _)
3225 } else {
3226 None
3227 }
3228 }
3229 pub fn upgrade_mut(&mut self) -> &mut super::Upgrade {
3233 if self.upgrade_opt_mut().is_none() {
3234 self.command = Some(
3235 super::command::Command::Upgrade(super::Upgrade::default()),
3236 );
3237 }
3238 self.upgrade_opt_mut().unwrap()
3239 }
3240 pub fn set_upgrade<T: Into<super::Upgrade>>(&mut self, field: T) {
3243 self.command = Some(super::command::Command::Upgrade(field.into().into()));
3244 }
3245 pub fn with_upgrade<T: Into<super::Upgrade>>(mut self, field: T) -> Self {
3248 self.set_upgrade(field.into());
3249 self
3250 }
3251 }
3252 impl super::CommandArgumentError {
3253 pub const fn const_default() -> Self {
3254 Self {
3255 argument: None,
3256 kind: None,
3257 index_error: None,
3258 }
3259 }
3260 #[doc(hidden)]
3261 pub fn default_instance() -> &'static Self {
3262 static DEFAULT: super::CommandArgumentError = super::CommandArgumentError::const_default();
3263 &DEFAULT
3264 }
3265 pub fn argument_opt_mut(&mut self) -> Option<&mut u32> {
3267 self.argument.as_mut().map(|field| field as _)
3268 }
3269 pub fn argument_mut(&mut self) -> &mut u32 {
3272 self.argument.get_or_insert_default()
3273 }
3274 pub fn argument_opt(&self) -> Option<u32> {
3276 self.argument.as_ref().map(|field| *field)
3277 }
3278 pub fn set_argument(&mut self, field: u32) {
3280 self.argument = Some(field);
3281 }
3282 pub fn with_argument(mut self, field: u32) -> Self {
3284 self.set_argument(field);
3285 self
3286 }
3287 pub fn with_kind<
3289 T: Into<super::command_argument_error::CommandArgumentErrorKind>,
3290 >(mut self, field: T) -> Self {
3291 self.set_kind(field.into());
3292 self
3293 }
3294 pub fn index_error(&self) -> &super::IndexError {
3296 self.index_error
3297 .as_ref()
3298 .map(|field| field as _)
3299 .unwrap_or_else(|| super::IndexError::default_instance() as _)
3300 }
3301 pub fn index_error_opt_mut(&mut self) -> Option<&mut super::IndexError> {
3303 self.index_error.as_mut().map(|field| field as _)
3304 }
3305 pub fn index_error_mut(&mut self) -> &mut super::IndexError {
3308 self.index_error.get_or_insert_default()
3309 }
3310 pub fn index_error_opt(&self) -> Option<&super::IndexError> {
3312 self.index_error.as_ref().map(|field| field as _)
3313 }
3314 pub fn set_index_error<T: Into<super::IndexError>>(&mut self, field: T) {
3316 self.index_error = Some(field.into().into());
3317 }
3318 pub fn with_index_error<T: Into<super::IndexError>>(mut self, field: T) -> Self {
3320 self.set_index_error(field.into());
3321 self
3322 }
3323 }
3324 impl super::CommandOutput {
3325 pub const fn const_default() -> Self {
3326 Self {
3327 argument: None,
3328 value: None,
3329 json: None,
3330 }
3331 }
3332 #[doc(hidden)]
3333 pub fn default_instance() -> &'static Self {
3334 static DEFAULT: super::CommandOutput = super::CommandOutput::const_default();
3335 &DEFAULT
3336 }
3337 pub fn argument(&self) -> &super::Argument {
3339 self.argument
3340 .as_ref()
3341 .map(|field| field as _)
3342 .unwrap_or_else(|| super::Argument::default_instance() as _)
3343 }
3344 pub fn argument_opt_mut(&mut self) -> Option<&mut super::Argument> {
3346 self.argument.as_mut().map(|field| field as _)
3347 }
3348 pub fn argument_mut(&mut self) -> &mut super::Argument {
3351 self.argument.get_or_insert_default()
3352 }
3353 pub fn argument_opt(&self) -> Option<&super::Argument> {
3355 self.argument.as_ref().map(|field| field as _)
3356 }
3357 pub fn set_argument<T: Into<super::Argument>>(&mut self, field: T) {
3359 self.argument = Some(field.into().into());
3360 }
3361 pub fn with_argument<T: Into<super::Argument>>(mut self, field: T) -> Self {
3363 self.set_argument(field.into());
3364 self
3365 }
3366 pub fn value(&self) -> &super::Bcs {
3368 self.value
3369 .as_ref()
3370 .map(|field| field as _)
3371 .unwrap_or_else(|| super::Bcs::default_instance() as _)
3372 }
3373 pub fn value_opt_mut(&mut self) -> Option<&mut super::Bcs> {
3375 self.value.as_mut().map(|field| field as _)
3376 }
3377 pub fn value_mut(&mut self) -> &mut super::Bcs {
3380 self.value.get_or_insert_default()
3381 }
3382 pub fn value_opt(&self) -> Option<&super::Bcs> {
3384 self.value.as_ref().map(|field| field as _)
3385 }
3386 pub fn set_value<T: Into<super::Bcs>>(&mut self, field: T) {
3388 self.value = Some(field.into().into());
3389 }
3390 pub fn with_value<T: Into<super::Bcs>>(mut self, field: T) -> Self {
3392 self.set_value(field.into());
3393 self
3394 }
3395 pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
3397 self.json.as_mut().map(|field| field as _)
3398 }
3399 pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
3402 self.json.get_or_insert_default()
3403 }
3404 pub fn json_opt(&self) -> Option<&::prost_types::Value> {
3406 self.json.as_ref().map(|field| field as _)
3407 }
3408 pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
3410 self.json = Some(field.into().into());
3411 }
3412 pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
3414 self.set_json(field.into());
3415 self
3416 }
3417 }
3418 impl super::CommandResult {
3419 pub const fn const_default() -> Self {
3420 Self {
3421 return_values: Vec::new(),
3422 mutated_by_ref: Vec::new(),
3423 }
3424 }
3425 #[doc(hidden)]
3426 pub fn default_instance() -> &'static Self {
3427 static DEFAULT: super::CommandResult = super::CommandResult::const_default();
3428 &DEFAULT
3429 }
3430 pub fn return_values(&self) -> &[super::CommandOutput] {
3432 &self.return_values
3433 }
3434 pub fn return_values_mut(&mut self) -> &mut Vec<super::CommandOutput> {
3437 &mut self.return_values
3438 }
3439 pub fn set_return_values(&mut self, field: Vec<super::CommandOutput>) {
3441 self.return_values = field;
3442 }
3443 pub fn with_return_values(mut self, field: Vec<super::CommandOutput>) -> Self {
3445 self.set_return_values(field);
3446 self
3447 }
3448 pub fn mutated_by_ref(&self) -> &[super::CommandOutput] {
3450 &self.mutated_by_ref
3451 }
3452 pub fn mutated_by_ref_mut(&mut self) -> &mut Vec<super::CommandOutput> {
3455 &mut self.mutated_by_ref
3456 }
3457 pub fn set_mutated_by_ref(&mut self, field: Vec<super::CommandOutput>) {
3459 self.mutated_by_ref = field;
3460 }
3461 pub fn with_mutated_by_ref(mut self, field: Vec<super::CommandOutput>) -> Self {
3463 self.set_mutated_by_ref(field);
3464 self
3465 }
3466 }
3467 impl super::CongestedObjects {
3468 pub const fn const_default() -> Self {
3469 Self { objects: Vec::new() }
3470 }
3471 #[doc(hidden)]
3472 pub fn default_instance() -> &'static Self {
3473 static DEFAULT: super::CongestedObjects = super::CongestedObjects::const_default();
3474 &DEFAULT
3475 }
3476 pub fn objects(&self) -> &[String] {
3478 &self.objects
3479 }
3480 pub fn objects_mut(&mut self) -> &mut Vec<String> {
3483 &mut self.objects
3484 }
3485 pub fn set_objects(&mut self, field: Vec<String>) {
3487 self.objects = field;
3488 }
3489 pub fn with_objects(mut self, field: Vec<String>) -> Self {
3491 self.set_objects(field);
3492 self
3493 }
3494 }
3495 impl super::ConsensusCommitPrologue {
3496 pub const fn const_default() -> Self {
3497 Self {
3498 epoch: None,
3499 round: None,
3500 commit_timestamp: None,
3501 consensus_commit_digest: None,
3502 sub_dag_index: None,
3503 consensus_determined_version_assignments: None,
3504 additional_state_digest: None,
3505 }
3506 }
3507 #[doc(hidden)]
3508 pub fn default_instance() -> &'static Self {
3509 static DEFAULT: super::ConsensusCommitPrologue = super::ConsensusCommitPrologue::const_default();
3510 &DEFAULT
3511 }
3512 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
3514 self.epoch.as_mut().map(|field| field as _)
3515 }
3516 pub fn epoch_mut(&mut self) -> &mut u64 {
3519 self.epoch.get_or_insert_default()
3520 }
3521 pub fn epoch_opt(&self) -> Option<u64> {
3523 self.epoch.as_ref().map(|field| *field)
3524 }
3525 pub fn set_epoch(&mut self, field: u64) {
3527 self.epoch = Some(field);
3528 }
3529 pub fn with_epoch(mut self, field: u64) -> Self {
3531 self.set_epoch(field);
3532 self
3533 }
3534 pub fn round_opt_mut(&mut self) -> Option<&mut u64> {
3536 self.round.as_mut().map(|field| field as _)
3537 }
3538 pub fn round_mut(&mut self) -> &mut u64 {
3541 self.round.get_or_insert_default()
3542 }
3543 pub fn round_opt(&self) -> Option<u64> {
3545 self.round.as_ref().map(|field| *field)
3546 }
3547 pub fn set_round(&mut self, field: u64) {
3549 self.round = Some(field);
3550 }
3551 pub fn with_round(mut self, field: u64) -> Self {
3553 self.set_round(field);
3554 self
3555 }
3556 pub fn commit_timestamp_opt_mut(
3558 &mut self,
3559 ) -> Option<&mut ::prost_types::Timestamp> {
3560 self.commit_timestamp.as_mut().map(|field| field as _)
3561 }
3562 pub fn commit_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
3565 self.commit_timestamp.get_or_insert_default()
3566 }
3567 pub fn commit_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
3569 self.commit_timestamp.as_ref().map(|field| field as _)
3570 }
3571 pub fn set_commit_timestamp<T: Into<::prost_types::Timestamp>>(
3573 &mut self,
3574 field: T,
3575 ) {
3576 self.commit_timestamp = Some(field.into().into());
3577 }
3578 pub fn with_commit_timestamp<T: Into<::prost_types::Timestamp>>(
3580 mut self,
3581 field: T,
3582 ) -> Self {
3583 self.set_commit_timestamp(field.into());
3584 self
3585 }
3586 pub fn consensus_commit_digest_opt_mut(&mut self) -> Option<&mut String> {
3588 self.consensus_commit_digest.as_mut().map(|field| field as _)
3589 }
3590 pub fn consensus_commit_digest_mut(&mut self) -> &mut String {
3593 self.consensus_commit_digest.get_or_insert_default()
3594 }
3595 pub fn consensus_commit_digest_opt(&self) -> Option<&str> {
3597 self.consensus_commit_digest.as_ref().map(|field| field as _)
3598 }
3599 pub fn set_consensus_commit_digest<T: Into<String>>(&mut self, field: T) {
3601 self.consensus_commit_digest = Some(field.into().into());
3602 }
3603 pub fn with_consensus_commit_digest<T: Into<String>>(
3605 mut self,
3606 field: T,
3607 ) -> Self {
3608 self.set_consensus_commit_digest(field.into());
3609 self
3610 }
3611 pub fn sub_dag_index_opt_mut(&mut self) -> Option<&mut u64> {
3613 self.sub_dag_index.as_mut().map(|field| field as _)
3614 }
3615 pub fn sub_dag_index_mut(&mut self) -> &mut u64 {
3618 self.sub_dag_index.get_or_insert_default()
3619 }
3620 pub fn sub_dag_index_opt(&self) -> Option<u64> {
3622 self.sub_dag_index.as_ref().map(|field| *field)
3623 }
3624 pub fn set_sub_dag_index(&mut self, field: u64) {
3626 self.sub_dag_index = Some(field);
3627 }
3628 pub fn with_sub_dag_index(mut self, field: u64) -> Self {
3630 self.set_sub_dag_index(field);
3631 self
3632 }
3633 pub fn consensus_determined_version_assignments(
3635 &self,
3636 ) -> &super::ConsensusDeterminedVersionAssignments {
3637 self.consensus_determined_version_assignments
3638 .as_ref()
3639 .map(|field| field as _)
3640 .unwrap_or_else(|| {
3641 super::ConsensusDeterminedVersionAssignments::default_instance() as _
3642 })
3643 }
3644 pub fn consensus_determined_version_assignments_opt_mut(
3646 &mut self,
3647 ) -> Option<&mut super::ConsensusDeterminedVersionAssignments> {
3648 self.consensus_determined_version_assignments
3649 .as_mut()
3650 .map(|field| field as _)
3651 }
3652 pub fn consensus_determined_version_assignments_mut(
3655 &mut self,
3656 ) -> &mut super::ConsensusDeterminedVersionAssignments {
3657 self.consensus_determined_version_assignments.get_or_insert_default()
3658 }
3659 pub fn consensus_determined_version_assignments_opt(
3661 &self,
3662 ) -> Option<&super::ConsensusDeterminedVersionAssignments> {
3663 self.consensus_determined_version_assignments
3664 .as_ref()
3665 .map(|field| field as _)
3666 }
3667 pub fn set_consensus_determined_version_assignments<
3669 T: Into<super::ConsensusDeterminedVersionAssignments>,
3670 >(&mut self, field: T) {
3671 self.consensus_determined_version_assignments = Some(field.into().into());
3672 }
3673 pub fn with_consensus_determined_version_assignments<
3675 T: Into<super::ConsensusDeterminedVersionAssignments>,
3676 >(mut self, field: T) -> Self {
3677 self.set_consensus_determined_version_assignments(field.into());
3678 self
3679 }
3680 pub fn additional_state_digest_opt_mut(&mut self) -> Option<&mut String> {
3682 self.additional_state_digest.as_mut().map(|field| field as _)
3683 }
3684 pub fn additional_state_digest_mut(&mut self) -> &mut String {
3687 self.additional_state_digest.get_or_insert_default()
3688 }
3689 pub fn additional_state_digest_opt(&self) -> Option<&str> {
3691 self.additional_state_digest.as_ref().map(|field| field as _)
3692 }
3693 pub fn set_additional_state_digest<T: Into<String>>(&mut self, field: T) {
3695 self.additional_state_digest = Some(field.into().into());
3696 }
3697 pub fn with_additional_state_digest<T: Into<String>>(
3699 mut self,
3700 field: T,
3701 ) -> Self {
3702 self.set_additional_state_digest(field.into());
3703 self
3704 }
3705 }
3706 impl super::ConsensusDeterminedVersionAssignments {
3707 pub const fn const_default() -> Self {
3708 Self {
3709 version: None,
3710 canceled_transactions: Vec::new(),
3711 }
3712 }
3713 #[doc(hidden)]
3714 pub fn default_instance() -> &'static Self {
3715 static DEFAULT: super::ConsensusDeterminedVersionAssignments = super::ConsensusDeterminedVersionAssignments::const_default();
3716 &DEFAULT
3717 }
3718 pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
3720 self.version.as_mut().map(|field| field as _)
3721 }
3722 pub fn version_mut(&mut self) -> &mut i32 {
3725 self.version.get_or_insert_default()
3726 }
3727 pub fn version_opt(&self) -> Option<i32> {
3729 self.version.as_ref().map(|field| *field)
3730 }
3731 pub fn set_version(&mut self, field: i32) {
3733 self.version = Some(field);
3734 }
3735 pub fn with_version(mut self, field: i32) -> Self {
3737 self.set_version(field);
3738 self
3739 }
3740 pub fn canceled_transactions(&self) -> &[super::CanceledTransaction] {
3742 &self.canceled_transactions
3743 }
3744 pub fn canceled_transactions_mut(
3747 &mut self,
3748 ) -> &mut Vec<super::CanceledTransaction> {
3749 &mut self.canceled_transactions
3750 }
3751 pub fn set_canceled_transactions(
3753 &mut self,
3754 field: Vec<super::CanceledTransaction>,
3755 ) {
3756 self.canceled_transactions = field;
3757 }
3758 pub fn with_canceled_transactions(
3760 mut self,
3761 field: Vec<super::CanceledTransaction>,
3762 ) -> Self {
3763 self.set_canceled_transactions(field);
3764 self
3765 }
3766 }
3767 impl super::DatatypeDescriptor {
3768 pub const fn const_default() -> Self {
3769 Self {
3770 type_name: None,
3771 defining_id: None,
3772 module: None,
3773 name: None,
3774 abilities: Vec::new(),
3775 type_parameters: Vec::new(),
3776 kind: None,
3777 fields: Vec::new(),
3778 variants: Vec::new(),
3779 }
3780 }
3781 #[doc(hidden)]
3782 pub fn default_instance() -> &'static Self {
3783 static DEFAULT: super::DatatypeDescriptor = super::DatatypeDescriptor::const_default();
3784 &DEFAULT
3785 }
3786 pub fn type_name_opt_mut(&mut self) -> Option<&mut String> {
3788 self.type_name.as_mut().map(|field| field as _)
3789 }
3790 pub fn type_name_mut(&mut self) -> &mut String {
3793 self.type_name.get_or_insert_default()
3794 }
3795 pub fn type_name_opt(&self) -> Option<&str> {
3797 self.type_name.as_ref().map(|field| field as _)
3798 }
3799 pub fn set_type_name<T: Into<String>>(&mut self, field: T) {
3801 self.type_name = Some(field.into().into());
3802 }
3803 pub fn with_type_name<T: Into<String>>(mut self, field: T) -> Self {
3805 self.set_type_name(field.into());
3806 self
3807 }
3808 pub fn defining_id_opt_mut(&mut self) -> Option<&mut String> {
3810 self.defining_id.as_mut().map(|field| field as _)
3811 }
3812 pub fn defining_id_mut(&mut self) -> &mut String {
3815 self.defining_id.get_or_insert_default()
3816 }
3817 pub fn defining_id_opt(&self) -> Option<&str> {
3819 self.defining_id.as_ref().map(|field| field as _)
3820 }
3821 pub fn set_defining_id<T: Into<String>>(&mut self, field: T) {
3823 self.defining_id = Some(field.into().into());
3824 }
3825 pub fn with_defining_id<T: Into<String>>(mut self, field: T) -> Self {
3827 self.set_defining_id(field.into());
3828 self
3829 }
3830 pub fn module_opt_mut(&mut self) -> Option<&mut String> {
3832 self.module.as_mut().map(|field| field as _)
3833 }
3834 pub fn module_mut(&mut self) -> &mut String {
3837 self.module.get_or_insert_default()
3838 }
3839 pub fn module_opt(&self) -> Option<&str> {
3841 self.module.as_ref().map(|field| field as _)
3842 }
3843 pub fn set_module<T: Into<String>>(&mut self, field: T) {
3845 self.module = Some(field.into().into());
3846 }
3847 pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
3849 self.set_module(field.into());
3850 self
3851 }
3852 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
3854 self.name.as_mut().map(|field| field as _)
3855 }
3856 pub fn name_mut(&mut self) -> &mut String {
3859 self.name.get_or_insert_default()
3860 }
3861 pub fn name_opt(&self) -> Option<&str> {
3863 self.name.as_ref().map(|field| field as _)
3864 }
3865 pub fn set_name<T: Into<String>>(&mut self, field: T) {
3867 self.name = Some(field.into().into());
3868 }
3869 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
3871 self.set_name(field.into());
3872 self
3873 }
3874 pub fn type_parameters(&self) -> &[super::TypeParameter] {
3876 &self.type_parameters
3877 }
3878 pub fn type_parameters_mut(&mut self) -> &mut Vec<super::TypeParameter> {
3881 &mut self.type_parameters
3882 }
3883 pub fn set_type_parameters(&mut self, field: Vec<super::TypeParameter>) {
3885 self.type_parameters = field;
3886 }
3887 pub fn with_type_parameters(mut self, field: Vec<super::TypeParameter>) -> Self {
3889 self.set_type_parameters(field);
3890 self
3891 }
3892 pub fn with_kind<T: Into<super::datatype_descriptor::DatatypeKind>>(
3894 mut self,
3895 field: T,
3896 ) -> Self {
3897 self.set_kind(field.into());
3898 self
3899 }
3900 pub fn fields(&self) -> &[super::FieldDescriptor] {
3902 &self.fields
3903 }
3904 pub fn fields_mut(&mut self) -> &mut Vec<super::FieldDescriptor> {
3907 &mut self.fields
3908 }
3909 pub fn set_fields(&mut self, field: Vec<super::FieldDescriptor>) {
3911 self.fields = field;
3912 }
3913 pub fn with_fields(mut self, field: Vec<super::FieldDescriptor>) -> Self {
3915 self.set_fields(field);
3916 self
3917 }
3918 pub fn variants(&self) -> &[super::VariantDescriptor] {
3920 &self.variants
3921 }
3922 pub fn variants_mut(&mut self) -> &mut Vec<super::VariantDescriptor> {
3925 &mut self.variants
3926 }
3927 pub fn set_variants(&mut self, field: Vec<super::VariantDescriptor>) {
3929 self.variants = field;
3930 }
3931 pub fn with_variants(mut self, field: Vec<super::VariantDescriptor>) -> Self {
3933 self.set_variants(field);
3934 self
3935 }
3936 }
3937 impl super::DynamicField {
3938 pub const fn const_default() -> Self {
3939 Self {
3940 kind: None,
3941 parent: None,
3942 field_id: None,
3943 field_object: None,
3944 name: None,
3945 value: None,
3946 value_type: None,
3947 child_id: None,
3948 child_object: None,
3949 }
3950 }
3951 #[doc(hidden)]
3952 pub fn default_instance() -> &'static Self {
3953 static DEFAULT: super::DynamicField = super::DynamicField::const_default();
3954 &DEFAULT
3955 }
3956 pub fn with_kind<T: Into<super::dynamic_field::DynamicFieldKind>>(
3958 mut self,
3959 field: T,
3960 ) -> Self {
3961 self.set_kind(field.into());
3962 self
3963 }
3964 pub fn parent_opt_mut(&mut self) -> Option<&mut String> {
3966 self.parent.as_mut().map(|field| field as _)
3967 }
3968 pub fn parent_mut(&mut self) -> &mut String {
3971 self.parent.get_or_insert_default()
3972 }
3973 pub fn parent_opt(&self) -> Option<&str> {
3975 self.parent.as_ref().map(|field| field as _)
3976 }
3977 pub fn set_parent<T: Into<String>>(&mut self, field: T) {
3979 self.parent = Some(field.into().into());
3980 }
3981 pub fn with_parent<T: Into<String>>(mut self, field: T) -> Self {
3983 self.set_parent(field.into());
3984 self
3985 }
3986 pub fn field_id_opt_mut(&mut self) -> Option<&mut String> {
3988 self.field_id.as_mut().map(|field| field as _)
3989 }
3990 pub fn field_id_mut(&mut self) -> &mut String {
3993 self.field_id.get_or_insert_default()
3994 }
3995 pub fn field_id_opt(&self) -> Option<&str> {
3997 self.field_id.as_ref().map(|field| field as _)
3998 }
3999 pub fn set_field_id<T: Into<String>>(&mut self, field: T) {
4001 self.field_id = Some(field.into().into());
4002 }
4003 pub fn with_field_id<T: Into<String>>(mut self, field: T) -> Self {
4005 self.set_field_id(field.into());
4006 self
4007 }
4008 pub fn field_object(&self) -> &super::Object {
4010 self.field_object
4011 .as_ref()
4012 .map(|field| field as _)
4013 .unwrap_or_else(|| super::Object::default_instance() as _)
4014 }
4015 pub fn field_object_opt_mut(&mut self) -> Option<&mut super::Object> {
4017 self.field_object.as_mut().map(|field| field as _)
4018 }
4019 pub fn field_object_mut(&mut self) -> &mut super::Object {
4022 self.field_object.get_or_insert_default()
4023 }
4024 pub fn field_object_opt(&self) -> Option<&super::Object> {
4026 self.field_object.as_ref().map(|field| field as _)
4027 }
4028 pub fn set_field_object<T: Into<super::Object>>(&mut self, field: T) {
4030 self.field_object = Some(field.into().into());
4031 }
4032 pub fn with_field_object<T: Into<super::Object>>(mut self, field: T) -> Self {
4034 self.set_field_object(field.into());
4035 self
4036 }
4037 pub fn name(&self) -> &super::Bcs {
4039 self.name
4040 .as_ref()
4041 .map(|field| field as _)
4042 .unwrap_or_else(|| super::Bcs::default_instance() as _)
4043 }
4044 pub fn name_opt_mut(&mut self) -> Option<&mut super::Bcs> {
4046 self.name.as_mut().map(|field| field as _)
4047 }
4048 pub fn name_mut(&mut self) -> &mut super::Bcs {
4051 self.name.get_or_insert_default()
4052 }
4053 pub fn name_opt(&self) -> Option<&super::Bcs> {
4055 self.name.as_ref().map(|field| field as _)
4056 }
4057 pub fn set_name<T: Into<super::Bcs>>(&mut self, field: T) {
4059 self.name = Some(field.into().into());
4060 }
4061 pub fn with_name<T: Into<super::Bcs>>(mut self, field: T) -> Self {
4063 self.set_name(field.into());
4064 self
4065 }
4066 pub fn value(&self) -> &super::Bcs {
4068 self.value
4069 .as_ref()
4070 .map(|field| field as _)
4071 .unwrap_or_else(|| super::Bcs::default_instance() as _)
4072 }
4073 pub fn value_opt_mut(&mut self) -> Option<&mut super::Bcs> {
4075 self.value.as_mut().map(|field| field as _)
4076 }
4077 pub fn value_mut(&mut self) -> &mut super::Bcs {
4080 self.value.get_or_insert_default()
4081 }
4082 pub fn value_opt(&self) -> Option<&super::Bcs> {
4084 self.value.as_ref().map(|field| field as _)
4085 }
4086 pub fn set_value<T: Into<super::Bcs>>(&mut self, field: T) {
4088 self.value = Some(field.into().into());
4089 }
4090 pub fn with_value<T: Into<super::Bcs>>(mut self, field: T) -> Self {
4092 self.set_value(field.into());
4093 self
4094 }
4095 pub fn value_type_opt_mut(&mut self) -> Option<&mut String> {
4097 self.value_type.as_mut().map(|field| field as _)
4098 }
4099 pub fn value_type_mut(&mut self) -> &mut String {
4102 self.value_type.get_or_insert_default()
4103 }
4104 pub fn value_type_opt(&self) -> Option<&str> {
4106 self.value_type.as_ref().map(|field| field as _)
4107 }
4108 pub fn set_value_type<T: Into<String>>(&mut self, field: T) {
4110 self.value_type = Some(field.into().into());
4111 }
4112 pub fn with_value_type<T: Into<String>>(mut self, field: T) -> Self {
4114 self.set_value_type(field.into());
4115 self
4116 }
4117 pub fn child_id_opt_mut(&mut self) -> Option<&mut String> {
4119 self.child_id.as_mut().map(|field| field as _)
4120 }
4121 pub fn child_id_mut(&mut self) -> &mut String {
4124 self.child_id.get_or_insert_default()
4125 }
4126 pub fn child_id_opt(&self) -> Option<&str> {
4128 self.child_id.as_ref().map(|field| field as _)
4129 }
4130 pub fn set_child_id<T: Into<String>>(&mut self, field: T) {
4132 self.child_id = Some(field.into().into());
4133 }
4134 pub fn with_child_id<T: Into<String>>(mut self, field: T) -> Self {
4136 self.set_child_id(field.into());
4137 self
4138 }
4139 pub fn child_object(&self) -> &super::Object {
4141 self.child_object
4142 .as_ref()
4143 .map(|field| field as _)
4144 .unwrap_or_else(|| super::Object::default_instance() as _)
4145 }
4146 pub fn child_object_opt_mut(&mut self) -> Option<&mut super::Object> {
4148 self.child_object.as_mut().map(|field| field as _)
4149 }
4150 pub fn child_object_mut(&mut self) -> &mut super::Object {
4153 self.child_object.get_or_insert_default()
4154 }
4155 pub fn child_object_opt(&self) -> Option<&super::Object> {
4157 self.child_object.as_ref().map(|field| field as _)
4158 }
4159 pub fn set_child_object<T: Into<super::Object>>(&mut self, field: T) {
4161 self.child_object = Some(field.into().into());
4162 }
4163 pub fn with_child_object<T: Into<super::Object>>(mut self, field: T) -> Self {
4165 self.set_child_object(field.into());
4166 self
4167 }
4168 }
4169 impl super::EndOfEpochData {
4170 pub const fn const_default() -> Self {
4171 Self {
4172 next_epoch_committee: Vec::new(),
4173 next_epoch_protocol_version: None,
4174 epoch_commitments: Vec::new(),
4175 }
4176 }
4177 #[doc(hidden)]
4178 pub fn default_instance() -> &'static Self {
4179 static DEFAULT: super::EndOfEpochData = super::EndOfEpochData::const_default();
4180 &DEFAULT
4181 }
4182 pub fn next_epoch_committee(&self) -> &[super::ValidatorCommitteeMember] {
4184 &self.next_epoch_committee
4185 }
4186 pub fn next_epoch_committee_mut(
4189 &mut self,
4190 ) -> &mut Vec<super::ValidatorCommitteeMember> {
4191 &mut self.next_epoch_committee
4192 }
4193 pub fn set_next_epoch_committee(
4195 &mut self,
4196 field: Vec<super::ValidatorCommitteeMember>,
4197 ) {
4198 self.next_epoch_committee = field;
4199 }
4200 pub fn with_next_epoch_committee(
4202 mut self,
4203 field: Vec<super::ValidatorCommitteeMember>,
4204 ) -> Self {
4205 self.set_next_epoch_committee(field);
4206 self
4207 }
4208 pub fn next_epoch_protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
4210 self.next_epoch_protocol_version.as_mut().map(|field| field as _)
4211 }
4212 pub fn next_epoch_protocol_version_mut(&mut self) -> &mut u64 {
4215 self.next_epoch_protocol_version.get_or_insert_default()
4216 }
4217 pub fn next_epoch_protocol_version_opt(&self) -> Option<u64> {
4219 self.next_epoch_protocol_version.as_ref().map(|field| *field)
4220 }
4221 pub fn set_next_epoch_protocol_version(&mut self, field: u64) {
4223 self.next_epoch_protocol_version = Some(field);
4224 }
4225 pub fn with_next_epoch_protocol_version(mut self, field: u64) -> Self {
4227 self.set_next_epoch_protocol_version(field);
4228 self
4229 }
4230 pub fn epoch_commitments(&self) -> &[super::CheckpointCommitment] {
4232 &self.epoch_commitments
4233 }
4234 pub fn epoch_commitments_mut(
4237 &mut self,
4238 ) -> &mut Vec<super::CheckpointCommitment> {
4239 &mut self.epoch_commitments
4240 }
4241 pub fn set_epoch_commitments(
4243 &mut self,
4244 field: Vec<super::CheckpointCommitment>,
4245 ) {
4246 self.epoch_commitments = field;
4247 }
4248 pub fn with_epoch_commitments(
4250 mut self,
4251 field: Vec<super::CheckpointCommitment>,
4252 ) -> Self {
4253 self.set_epoch_commitments(field);
4254 self
4255 }
4256 }
4257 impl super::EndOfEpochTransaction {
4258 pub const fn const_default() -> Self {
4259 Self { transactions: Vec::new() }
4260 }
4261 #[doc(hidden)]
4262 pub fn default_instance() -> &'static Self {
4263 static DEFAULT: super::EndOfEpochTransaction = super::EndOfEpochTransaction::const_default();
4264 &DEFAULT
4265 }
4266 pub fn transactions(&self) -> &[super::EndOfEpochTransactionKind] {
4268 &self.transactions
4269 }
4270 pub fn transactions_mut(
4273 &mut self,
4274 ) -> &mut Vec<super::EndOfEpochTransactionKind> {
4275 &mut self.transactions
4276 }
4277 pub fn set_transactions(
4279 &mut self,
4280 field: Vec<super::EndOfEpochTransactionKind>,
4281 ) {
4282 self.transactions = field;
4283 }
4284 pub fn with_transactions(
4286 mut self,
4287 field: Vec<super::EndOfEpochTransactionKind>,
4288 ) -> Self {
4289 self.set_transactions(field);
4290 self
4291 }
4292 }
4293 impl super::EndOfEpochTransactionKind {
4294 pub const fn const_default() -> Self {
4295 Self { kind: None, data: None }
4296 }
4297 #[doc(hidden)]
4298 pub fn default_instance() -> &'static Self {
4299 static DEFAULT: super::EndOfEpochTransactionKind = super::EndOfEpochTransactionKind::const_default();
4300 &DEFAULT
4301 }
4302 pub fn with_kind<T: Into<super::end_of_epoch_transaction_kind::Kind>>(
4304 mut self,
4305 field: T,
4306 ) -> Self {
4307 self.set_kind(field.into());
4308 self
4309 }
4310 pub fn change_epoch(&self) -> &super::ChangeEpoch {
4312 if let Some(
4313 super::end_of_epoch_transaction_kind::Data::ChangeEpoch(field),
4314 ) = &self.data
4315 {
4316 field as _
4317 } else {
4318 super::ChangeEpoch::default_instance() as _
4319 }
4320 }
4321 pub fn change_epoch_opt(&self) -> Option<&super::ChangeEpoch> {
4323 if let Some(
4324 super::end_of_epoch_transaction_kind::Data::ChangeEpoch(field),
4325 ) = &self.data
4326 {
4327 Some(field as _)
4328 } else {
4329 None
4330 }
4331 }
4332 pub fn change_epoch_opt_mut(&mut self) -> Option<&mut super::ChangeEpoch> {
4334 if let Some(
4335 super::end_of_epoch_transaction_kind::Data::ChangeEpoch(field),
4336 ) = &mut self.data
4337 {
4338 Some(field as _)
4339 } else {
4340 None
4341 }
4342 }
4343 pub fn change_epoch_mut(&mut self) -> &mut super::ChangeEpoch {
4347 if self.change_epoch_opt_mut().is_none() {
4348 self.data = Some(
4349 super::end_of_epoch_transaction_kind::Data::ChangeEpoch(
4350 super::ChangeEpoch::default(),
4351 ),
4352 );
4353 }
4354 self.change_epoch_opt_mut().unwrap()
4355 }
4356 pub fn set_change_epoch<T: Into<super::ChangeEpoch>>(&mut self, field: T) {
4359 self.data = Some(
4360 super::end_of_epoch_transaction_kind::Data::ChangeEpoch(
4361 field.into().into(),
4362 ),
4363 );
4364 }
4365 pub fn with_change_epoch<T: Into<super::ChangeEpoch>>(
4368 mut self,
4369 field: T,
4370 ) -> Self {
4371 self.set_change_epoch(field.into());
4372 self
4373 }
4374 pub fn authenticator_state_expire(&self) -> &super::AuthenticatorStateExpire {
4376 if let Some(
4377 super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4378 field,
4379 ),
4380 ) = &self.data
4381 {
4382 field as _
4383 } else {
4384 super::AuthenticatorStateExpire::default_instance() as _
4385 }
4386 }
4387 pub fn authenticator_state_expire_opt(
4389 &self,
4390 ) -> Option<&super::AuthenticatorStateExpire> {
4391 if let Some(
4392 super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4393 field,
4394 ),
4395 ) = &self.data
4396 {
4397 Some(field as _)
4398 } else {
4399 None
4400 }
4401 }
4402 pub fn authenticator_state_expire_opt_mut(
4404 &mut self,
4405 ) -> Option<&mut super::AuthenticatorStateExpire> {
4406 if let Some(
4407 super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4408 field,
4409 ),
4410 ) = &mut self.data
4411 {
4412 Some(field as _)
4413 } else {
4414 None
4415 }
4416 }
4417 pub fn authenticator_state_expire_mut(
4421 &mut self,
4422 ) -> &mut super::AuthenticatorStateExpire {
4423 if self.authenticator_state_expire_opt_mut().is_none() {
4424 self.data = Some(
4425 super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4426 super::AuthenticatorStateExpire::default(),
4427 ),
4428 );
4429 }
4430 self.authenticator_state_expire_opt_mut().unwrap()
4431 }
4432 pub fn set_authenticator_state_expire<T: Into<super::AuthenticatorStateExpire>>(
4435 &mut self,
4436 field: T,
4437 ) {
4438 self.data = Some(
4439 super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4440 field.into().into(),
4441 ),
4442 );
4443 }
4444 pub fn with_authenticator_state_expire<T: Into<super::AuthenticatorStateExpire>>(
4447 mut self,
4448 field: T,
4449 ) -> Self {
4450 self.set_authenticator_state_expire(field.into());
4451 self
4452 }
4453 pub fn execution_time_observations(&self) -> &super::ExecutionTimeObservations {
4455 if let Some(
4456 super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4457 field,
4458 ),
4459 ) = &self.data
4460 {
4461 field as _
4462 } else {
4463 super::ExecutionTimeObservations::default_instance() as _
4464 }
4465 }
4466 pub fn execution_time_observations_opt(
4468 &self,
4469 ) -> Option<&super::ExecutionTimeObservations> {
4470 if let Some(
4471 super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4472 field,
4473 ),
4474 ) = &self.data
4475 {
4476 Some(field as _)
4477 } else {
4478 None
4479 }
4480 }
4481 pub fn execution_time_observations_opt_mut(
4483 &mut self,
4484 ) -> Option<&mut super::ExecutionTimeObservations> {
4485 if let Some(
4486 super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4487 field,
4488 ),
4489 ) = &mut self.data
4490 {
4491 Some(field as _)
4492 } else {
4493 None
4494 }
4495 }
4496 pub fn execution_time_observations_mut(
4500 &mut self,
4501 ) -> &mut super::ExecutionTimeObservations {
4502 if self.execution_time_observations_opt_mut().is_none() {
4503 self.data = Some(
4504 super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4505 super::ExecutionTimeObservations::default(),
4506 ),
4507 );
4508 }
4509 self.execution_time_observations_opt_mut().unwrap()
4510 }
4511 pub fn set_execution_time_observations<
4514 T: Into<super::ExecutionTimeObservations>,
4515 >(&mut self, field: T) {
4516 self.data = Some(
4517 super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4518 field.into().into(),
4519 ),
4520 );
4521 }
4522 pub fn with_execution_time_observations<
4525 T: Into<super::ExecutionTimeObservations>,
4526 >(mut self, field: T) -> Self {
4527 self.set_execution_time_observations(field.into());
4528 self
4529 }
4530 pub fn bridge_chain_id(&self) -> &str {
4532 if let Some(
4533 super::end_of_epoch_transaction_kind::Data::BridgeChainId(field),
4534 ) = &self.data
4535 {
4536 field as _
4537 } else {
4538 ""
4539 }
4540 }
4541 pub fn bridge_chain_id_opt(&self) -> Option<&str> {
4543 if let Some(
4544 super::end_of_epoch_transaction_kind::Data::BridgeChainId(field),
4545 ) = &self.data
4546 {
4547 Some(field as _)
4548 } else {
4549 None
4550 }
4551 }
4552 pub fn bridge_chain_id_opt_mut(&mut self) -> Option<&mut String> {
4554 if let Some(
4555 super::end_of_epoch_transaction_kind::Data::BridgeChainId(field),
4556 ) = &mut self.data
4557 {
4558 Some(field as _)
4559 } else {
4560 None
4561 }
4562 }
4563 pub fn bridge_chain_id_mut(&mut self) -> &mut String {
4567 if self.bridge_chain_id_opt_mut().is_none() {
4568 self.data = Some(
4569 super::end_of_epoch_transaction_kind::Data::BridgeChainId(
4570 String::default(),
4571 ),
4572 );
4573 }
4574 self.bridge_chain_id_opt_mut().unwrap()
4575 }
4576 pub fn set_bridge_chain_id<T: Into<String>>(&mut self, field: T) {
4579 self.data = Some(
4580 super::end_of_epoch_transaction_kind::Data::BridgeChainId(
4581 field.into().into(),
4582 ),
4583 );
4584 }
4585 pub fn with_bridge_chain_id<T: Into<String>>(mut self, field: T) -> Self {
4588 self.set_bridge_chain_id(field.into());
4589 self
4590 }
4591 pub fn bridge_object_version(&self) -> u64 {
4593 if let Some(
4594 super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4595 ) = &self.data
4596 {
4597 *field
4598 } else {
4599 0u64
4600 }
4601 }
4602 pub fn bridge_object_version_opt(&self) -> Option<u64> {
4604 if let Some(
4605 super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4606 ) = &self.data
4607 {
4608 Some(*field)
4609 } else {
4610 None
4611 }
4612 }
4613 pub fn bridge_object_version_opt_mut(&mut self) -> Option<&mut u64> {
4615 if let Some(
4616 super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4617 ) = &mut self.data
4618 {
4619 Some(field as _)
4620 } else {
4621 None
4622 }
4623 }
4624 pub fn bridge_object_version_mut(&mut self) -> &mut u64 {
4628 if self.bridge_object_version_opt_mut().is_none() {
4629 self.data = Some(
4630 super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(
4631 u64::default(),
4632 ),
4633 );
4634 }
4635 self.bridge_object_version_opt_mut().unwrap()
4636 }
4637 pub fn set_bridge_object_version(&mut self, field: u64) {
4640 self.data = Some(
4641 super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4642 );
4643 }
4644 pub fn with_bridge_object_version(mut self, field: u64) -> Self {
4647 self.set_bridge_object_version(field);
4648 self
4649 }
4650 }
4651 impl super::Epoch {
4652 pub const fn const_default() -> Self {
4653 Self {
4654 epoch: None,
4655 committee: None,
4656 system_state: None,
4657 first_checkpoint: None,
4658 last_checkpoint: None,
4659 start: None,
4660 end: None,
4661 reference_gas_price: None,
4662 protocol_config: None,
4663 }
4664 }
4665 #[doc(hidden)]
4666 pub fn default_instance() -> &'static Self {
4667 static DEFAULT: super::Epoch = super::Epoch::const_default();
4668 &DEFAULT
4669 }
4670 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
4672 self.epoch.as_mut().map(|field| field as _)
4673 }
4674 pub fn epoch_mut(&mut self) -> &mut u64 {
4677 self.epoch.get_or_insert_default()
4678 }
4679 pub fn epoch_opt(&self) -> Option<u64> {
4681 self.epoch.as_ref().map(|field| *field)
4682 }
4683 pub fn set_epoch(&mut self, field: u64) {
4685 self.epoch = Some(field);
4686 }
4687 pub fn with_epoch(mut self, field: u64) -> Self {
4689 self.set_epoch(field);
4690 self
4691 }
4692 pub fn committee(&self) -> &super::ValidatorCommittee {
4694 self.committee
4695 .as_ref()
4696 .map(|field| field as _)
4697 .unwrap_or_else(|| super::ValidatorCommittee::default_instance() as _)
4698 }
4699 pub fn committee_opt_mut(&mut self) -> Option<&mut super::ValidatorCommittee> {
4701 self.committee.as_mut().map(|field| field as _)
4702 }
4703 pub fn committee_mut(&mut self) -> &mut super::ValidatorCommittee {
4706 self.committee.get_or_insert_default()
4707 }
4708 pub fn committee_opt(&self) -> Option<&super::ValidatorCommittee> {
4710 self.committee.as_ref().map(|field| field as _)
4711 }
4712 pub fn set_committee<T: Into<super::ValidatorCommittee>>(&mut self, field: T) {
4714 self.committee = Some(field.into().into());
4715 }
4716 pub fn with_committee<T: Into<super::ValidatorCommittee>>(
4718 mut self,
4719 field: T,
4720 ) -> Self {
4721 self.set_committee(field.into());
4722 self
4723 }
4724 pub fn system_state(&self) -> &super::SystemState {
4726 self.system_state
4727 .as_ref()
4728 .map(|field| field as _)
4729 .unwrap_or_else(|| super::SystemState::default_instance() as _)
4730 }
4731 pub fn system_state_opt_mut(&mut self) -> Option<&mut super::SystemState> {
4733 self.system_state.as_mut().map(|field| field as _)
4734 }
4735 pub fn system_state_mut(&mut self) -> &mut super::SystemState {
4738 self.system_state.get_or_insert_default()
4739 }
4740 pub fn system_state_opt(&self) -> Option<&super::SystemState> {
4742 self.system_state.as_ref().map(|field| field as _)
4743 }
4744 pub fn set_system_state<T: Into<super::SystemState>>(&mut self, field: T) {
4746 self.system_state = Some(field.into().into());
4747 }
4748 pub fn with_system_state<T: Into<super::SystemState>>(
4750 mut self,
4751 field: T,
4752 ) -> Self {
4753 self.set_system_state(field.into());
4754 self
4755 }
4756 pub fn first_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
4758 self.first_checkpoint.as_mut().map(|field| field as _)
4759 }
4760 pub fn first_checkpoint_mut(&mut self) -> &mut u64 {
4763 self.first_checkpoint.get_or_insert_default()
4764 }
4765 pub fn first_checkpoint_opt(&self) -> Option<u64> {
4767 self.first_checkpoint.as_ref().map(|field| *field)
4768 }
4769 pub fn set_first_checkpoint(&mut self, field: u64) {
4771 self.first_checkpoint = Some(field);
4772 }
4773 pub fn with_first_checkpoint(mut self, field: u64) -> Self {
4775 self.set_first_checkpoint(field);
4776 self
4777 }
4778 pub fn last_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
4780 self.last_checkpoint.as_mut().map(|field| field as _)
4781 }
4782 pub fn last_checkpoint_mut(&mut self) -> &mut u64 {
4785 self.last_checkpoint.get_or_insert_default()
4786 }
4787 pub fn last_checkpoint_opt(&self) -> Option<u64> {
4789 self.last_checkpoint.as_ref().map(|field| *field)
4790 }
4791 pub fn set_last_checkpoint(&mut self, field: u64) {
4793 self.last_checkpoint = Some(field);
4794 }
4795 pub fn with_last_checkpoint(mut self, field: u64) -> Self {
4797 self.set_last_checkpoint(field);
4798 self
4799 }
4800 pub fn start_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
4802 self.start.as_mut().map(|field| field as _)
4803 }
4804 pub fn start_mut(&mut self) -> &mut ::prost_types::Timestamp {
4807 self.start.get_or_insert_default()
4808 }
4809 pub fn start_opt(&self) -> Option<&::prost_types::Timestamp> {
4811 self.start.as_ref().map(|field| field as _)
4812 }
4813 pub fn set_start<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
4815 self.start = Some(field.into().into());
4816 }
4817 pub fn with_start<T: Into<::prost_types::Timestamp>>(
4819 mut self,
4820 field: T,
4821 ) -> Self {
4822 self.set_start(field.into());
4823 self
4824 }
4825 pub fn end_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
4827 self.end.as_mut().map(|field| field as _)
4828 }
4829 pub fn end_mut(&mut self) -> &mut ::prost_types::Timestamp {
4832 self.end.get_or_insert_default()
4833 }
4834 pub fn end_opt(&self) -> Option<&::prost_types::Timestamp> {
4836 self.end.as_ref().map(|field| field as _)
4837 }
4838 pub fn set_end<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
4840 self.end = Some(field.into().into());
4841 }
4842 pub fn with_end<T: Into<::prost_types::Timestamp>>(mut self, field: T) -> Self {
4844 self.set_end(field.into());
4845 self
4846 }
4847 pub fn reference_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
4849 self.reference_gas_price.as_mut().map(|field| field as _)
4850 }
4851 pub fn reference_gas_price_mut(&mut self) -> &mut u64 {
4854 self.reference_gas_price.get_or_insert_default()
4855 }
4856 pub fn reference_gas_price_opt(&self) -> Option<u64> {
4858 self.reference_gas_price.as_ref().map(|field| *field)
4859 }
4860 pub fn set_reference_gas_price(&mut self, field: u64) {
4862 self.reference_gas_price = Some(field);
4863 }
4864 pub fn with_reference_gas_price(mut self, field: u64) -> Self {
4866 self.set_reference_gas_price(field);
4867 self
4868 }
4869 pub fn protocol_config(&self) -> &super::ProtocolConfig {
4871 self.protocol_config
4872 .as_ref()
4873 .map(|field| field as _)
4874 .unwrap_or_else(|| super::ProtocolConfig::default_instance() as _)
4875 }
4876 pub fn protocol_config_opt_mut(&mut self) -> Option<&mut super::ProtocolConfig> {
4878 self.protocol_config.as_mut().map(|field| field as _)
4879 }
4880 pub fn protocol_config_mut(&mut self) -> &mut super::ProtocolConfig {
4883 self.protocol_config.get_or_insert_default()
4884 }
4885 pub fn protocol_config_opt(&self) -> Option<&super::ProtocolConfig> {
4887 self.protocol_config.as_ref().map(|field| field as _)
4888 }
4889 pub fn set_protocol_config<T: Into<super::ProtocolConfig>>(&mut self, field: T) {
4891 self.protocol_config = Some(field.into().into());
4892 }
4893 pub fn with_protocol_config<T: Into<super::ProtocolConfig>>(
4895 mut self,
4896 field: T,
4897 ) -> Self {
4898 self.set_protocol_config(field.into());
4899 self
4900 }
4901 }
4902 impl super::Event {
4903 pub const fn const_default() -> Self {
4904 Self {
4905 package_id: None,
4906 module: None,
4907 sender: None,
4908 event_type: None,
4909 contents: None,
4910 json: None,
4911 }
4912 }
4913 #[doc(hidden)]
4914 pub fn default_instance() -> &'static Self {
4915 static DEFAULT: super::Event = super::Event::const_default();
4916 &DEFAULT
4917 }
4918 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
4920 self.package_id.as_mut().map(|field| field as _)
4921 }
4922 pub fn package_id_mut(&mut self) -> &mut String {
4925 self.package_id.get_or_insert_default()
4926 }
4927 pub fn package_id_opt(&self) -> Option<&str> {
4929 self.package_id.as_ref().map(|field| field as _)
4930 }
4931 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
4933 self.package_id = Some(field.into().into());
4934 }
4935 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
4937 self.set_package_id(field.into());
4938 self
4939 }
4940 pub fn module_opt_mut(&mut self) -> Option<&mut String> {
4942 self.module.as_mut().map(|field| field as _)
4943 }
4944 pub fn module_mut(&mut self) -> &mut String {
4947 self.module.get_or_insert_default()
4948 }
4949 pub fn module_opt(&self) -> Option<&str> {
4951 self.module.as_ref().map(|field| field as _)
4952 }
4953 pub fn set_module<T: Into<String>>(&mut self, field: T) {
4955 self.module = Some(field.into().into());
4956 }
4957 pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
4959 self.set_module(field.into());
4960 self
4961 }
4962 pub fn sender_opt_mut(&mut self) -> Option<&mut String> {
4964 self.sender.as_mut().map(|field| field as _)
4965 }
4966 pub fn sender_mut(&mut self) -> &mut String {
4969 self.sender.get_or_insert_default()
4970 }
4971 pub fn sender_opt(&self) -> Option<&str> {
4973 self.sender.as_ref().map(|field| field as _)
4974 }
4975 pub fn set_sender<T: Into<String>>(&mut self, field: T) {
4977 self.sender = Some(field.into().into());
4978 }
4979 pub fn with_sender<T: Into<String>>(mut self, field: T) -> Self {
4981 self.set_sender(field.into());
4982 self
4983 }
4984 pub fn event_type_opt_mut(&mut self) -> Option<&mut String> {
4986 self.event_type.as_mut().map(|field| field as _)
4987 }
4988 pub fn event_type_mut(&mut self) -> &mut String {
4991 self.event_type.get_or_insert_default()
4992 }
4993 pub fn event_type_opt(&self) -> Option<&str> {
4995 self.event_type.as_ref().map(|field| field as _)
4996 }
4997 pub fn set_event_type<T: Into<String>>(&mut self, field: T) {
4999 self.event_type = Some(field.into().into());
5000 }
5001 pub fn with_event_type<T: Into<String>>(mut self, field: T) -> Self {
5003 self.set_event_type(field.into());
5004 self
5005 }
5006 pub fn contents(&self) -> &super::Bcs {
5008 self.contents
5009 .as_ref()
5010 .map(|field| field as _)
5011 .unwrap_or_else(|| super::Bcs::default_instance() as _)
5012 }
5013 pub fn contents_opt_mut(&mut self) -> Option<&mut super::Bcs> {
5015 self.contents.as_mut().map(|field| field as _)
5016 }
5017 pub fn contents_mut(&mut self) -> &mut super::Bcs {
5020 self.contents.get_or_insert_default()
5021 }
5022 pub fn contents_opt(&self) -> Option<&super::Bcs> {
5024 self.contents.as_ref().map(|field| field as _)
5025 }
5026 pub fn set_contents<T: Into<super::Bcs>>(&mut self, field: T) {
5028 self.contents = Some(field.into().into());
5029 }
5030 pub fn with_contents<T: Into<super::Bcs>>(mut self, field: T) -> Self {
5032 self.set_contents(field.into());
5033 self
5034 }
5035 pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
5037 self.json.as_mut().map(|field| field as _)
5038 }
5039 pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
5042 self.json.get_or_insert_default()
5043 }
5044 pub fn json_opt(&self) -> Option<&::prost_types::Value> {
5046 self.json.as_ref().map(|field| field as _)
5047 }
5048 pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
5050 self.json = Some(field.into().into());
5051 }
5052 pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
5054 self.set_json(field.into());
5055 self
5056 }
5057 }
5058 impl super::ExecuteTransactionRequest {
5059 pub const fn const_default() -> Self {
5060 Self {
5061 transaction: None,
5062 signatures: Vec::new(),
5063 read_mask: None,
5064 }
5065 }
5066 #[doc(hidden)]
5067 pub fn default_instance() -> &'static Self {
5068 static DEFAULT: super::ExecuteTransactionRequest = super::ExecuteTransactionRequest::const_default();
5069 &DEFAULT
5070 }
5071 pub fn transaction(&self) -> &super::Transaction {
5073 self.transaction
5074 .as_ref()
5075 .map(|field| field as _)
5076 .unwrap_or_else(|| super::Transaction::default_instance() as _)
5077 }
5078 pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
5080 self.transaction.as_mut().map(|field| field as _)
5081 }
5082 pub fn transaction_mut(&mut self) -> &mut super::Transaction {
5085 self.transaction.get_or_insert_default()
5086 }
5087 pub fn transaction_opt(&self) -> Option<&super::Transaction> {
5089 self.transaction.as_ref().map(|field| field as _)
5090 }
5091 pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
5093 self.transaction = Some(field.into().into());
5094 }
5095 pub fn with_transaction<T: Into<super::Transaction>>(
5097 mut self,
5098 field: T,
5099 ) -> Self {
5100 self.set_transaction(field.into());
5101 self
5102 }
5103 pub fn signatures(&self) -> &[super::UserSignature] {
5105 &self.signatures
5106 }
5107 pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
5110 &mut self.signatures
5111 }
5112 pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
5114 self.signatures = field;
5115 }
5116 pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
5118 self.set_signatures(field);
5119 self
5120 }
5121 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
5123 self.read_mask.as_mut().map(|field| field as _)
5124 }
5125 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
5128 self.read_mask.get_or_insert_default()
5129 }
5130 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
5132 self.read_mask.as_ref().map(|field| field as _)
5133 }
5134 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
5136 self.read_mask = Some(field.into().into());
5137 }
5138 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
5140 mut self,
5141 field: T,
5142 ) -> Self {
5143 self.set_read_mask(field.into());
5144 self
5145 }
5146 }
5147 impl super::ExecuteTransactionResponse {
5148 pub const fn const_default() -> Self {
5149 Self { transaction: None }
5150 }
5151 #[doc(hidden)]
5152 pub fn default_instance() -> &'static Self {
5153 static DEFAULT: super::ExecuteTransactionResponse = super::ExecuteTransactionResponse::const_default();
5154 &DEFAULT
5155 }
5156 pub fn transaction(&self) -> &super::ExecutedTransaction {
5158 self.transaction
5159 .as_ref()
5160 .map(|field| field as _)
5161 .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
5162 }
5163 pub fn transaction_opt_mut(
5165 &mut self,
5166 ) -> Option<&mut super::ExecutedTransaction> {
5167 self.transaction.as_mut().map(|field| field as _)
5168 }
5169 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
5172 self.transaction.get_or_insert_default()
5173 }
5174 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
5176 self.transaction.as_ref().map(|field| field as _)
5177 }
5178 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
5180 &mut self,
5181 field: T,
5182 ) {
5183 self.transaction = Some(field.into().into());
5184 }
5185 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
5187 mut self,
5188 field: T,
5189 ) -> Self {
5190 self.set_transaction(field.into());
5191 self
5192 }
5193 }
5194 impl super::ExecutedTransaction {
5195 pub const fn const_default() -> Self {
5196 Self {
5197 digest: None,
5198 transaction: None,
5199 signatures: Vec::new(),
5200 effects: None,
5201 events: None,
5202 checkpoint: None,
5203 timestamp: None,
5204 balance_changes: Vec::new(),
5205 objects: None,
5206 }
5207 }
5208 #[doc(hidden)]
5209 pub fn default_instance() -> &'static Self {
5210 static DEFAULT: super::ExecutedTransaction = super::ExecutedTransaction::const_default();
5211 &DEFAULT
5212 }
5213 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
5215 self.digest.as_mut().map(|field| field as _)
5216 }
5217 pub fn digest_mut(&mut self) -> &mut String {
5220 self.digest.get_or_insert_default()
5221 }
5222 pub fn digest_opt(&self) -> Option<&str> {
5224 self.digest.as_ref().map(|field| field as _)
5225 }
5226 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
5228 self.digest = Some(field.into().into());
5229 }
5230 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
5232 self.set_digest(field.into());
5233 self
5234 }
5235 pub fn transaction(&self) -> &super::Transaction {
5237 self.transaction
5238 .as_ref()
5239 .map(|field| field as _)
5240 .unwrap_or_else(|| super::Transaction::default_instance() as _)
5241 }
5242 pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
5244 self.transaction.as_mut().map(|field| field as _)
5245 }
5246 pub fn transaction_mut(&mut self) -> &mut super::Transaction {
5249 self.transaction.get_or_insert_default()
5250 }
5251 pub fn transaction_opt(&self) -> Option<&super::Transaction> {
5253 self.transaction.as_ref().map(|field| field as _)
5254 }
5255 pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
5257 self.transaction = Some(field.into().into());
5258 }
5259 pub fn with_transaction<T: Into<super::Transaction>>(
5261 mut self,
5262 field: T,
5263 ) -> Self {
5264 self.set_transaction(field.into());
5265 self
5266 }
5267 pub fn signatures(&self) -> &[super::UserSignature] {
5269 &self.signatures
5270 }
5271 pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
5274 &mut self.signatures
5275 }
5276 pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
5278 self.signatures = field;
5279 }
5280 pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
5282 self.set_signatures(field);
5283 self
5284 }
5285 pub fn effects(&self) -> &super::TransactionEffects {
5287 self.effects
5288 .as_ref()
5289 .map(|field| field as _)
5290 .unwrap_or_else(|| super::TransactionEffects::default_instance() as _)
5291 }
5292 pub fn effects_opt_mut(&mut self) -> Option<&mut super::TransactionEffects> {
5294 self.effects.as_mut().map(|field| field as _)
5295 }
5296 pub fn effects_mut(&mut self) -> &mut super::TransactionEffects {
5299 self.effects.get_or_insert_default()
5300 }
5301 pub fn effects_opt(&self) -> Option<&super::TransactionEffects> {
5303 self.effects.as_ref().map(|field| field as _)
5304 }
5305 pub fn set_effects<T: Into<super::TransactionEffects>>(&mut self, field: T) {
5307 self.effects = Some(field.into().into());
5308 }
5309 pub fn with_effects<T: Into<super::TransactionEffects>>(
5311 mut self,
5312 field: T,
5313 ) -> Self {
5314 self.set_effects(field.into());
5315 self
5316 }
5317 pub fn events(&self) -> &super::TransactionEvents {
5319 self.events
5320 .as_ref()
5321 .map(|field| field as _)
5322 .unwrap_or_else(|| super::TransactionEvents::default_instance() as _)
5323 }
5324 pub fn events_opt_mut(&mut self) -> Option<&mut super::TransactionEvents> {
5326 self.events.as_mut().map(|field| field as _)
5327 }
5328 pub fn events_mut(&mut self) -> &mut super::TransactionEvents {
5331 self.events.get_or_insert_default()
5332 }
5333 pub fn events_opt(&self) -> Option<&super::TransactionEvents> {
5335 self.events.as_ref().map(|field| field as _)
5336 }
5337 pub fn set_events<T: Into<super::TransactionEvents>>(&mut self, field: T) {
5339 self.events = Some(field.into().into());
5340 }
5341 pub fn with_events<T: Into<super::TransactionEvents>>(
5343 mut self,
5344 field: T,
5345 ) -> Self {
5346 self.set_events(field.into());
5347 self
5348 }
5349 pub fn checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
5351 self.checkpoint.as_mut().map(|field| field as _)
5352 }
5353 pub fn checkpoint_mut(&mut self) -> &mut u64 {
5356 self.checkpoint.get_or_insert_default()
5357 }
5358 pub fn checkpoint_opt(&self) -> Option<u64> {
5360 self.checkpoint.as_ref().map(|field| *field)
5361 }
5362 pub fn set_checkpoint(&mut self, field: u64) {
5364 self.checkpoint = Some(field);
5365 }
5366 pub fn with_checkpoint(mut self, field: u64) -> Self {
5368 self.set_checkpoint(field);
5369 self
5370 }
5371 pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
5373 self.timestamp.as_mut().map(|field| field as _)
5374 }
5375 pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
5378 self.timestamp.get_or_insert_default()
5379 }
5380 pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
5382 self.timestamp.as_ref().map(|field| field as _)
5383 }
5384 pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
5386 self.timestamp = Some(field.into().into());
5387 }
5388 pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
5390 mut self,
5391 field: T,
5392 ) -> Self {
5393 self.set_timestamp(field.into());
5394 self
5395 }
5396 pub fn balance_changes(&self) -> &[super::BalanceChange] {
5398 &self.balance_changes
5399 }
5400 pub fn balance_changes_mut(&mut self) -> &mut Vec<super::BalanceChange> {
5403 &mut self.balance_changes
5404 }
5405 pub fn set_balance_changes(&mut self, field: Vec<super::BalanceChange>) {
5407 self.balance_changes = field;
5408 }
5409 pub fn with_balance_changes(mut self, field: Vec<super::BalanceChange>) -> Self {
5411 self.set_balance_changes(field);
5412 self
5413 }
5414 pub fn objects(&self) -> &super::ObjectSet {
5416 self.objects
5417 .as_ref()
5418 .map(|field| field as _)
5419 .unwrap_or_else(|| super::ObjectSet::default_instance() as _)
5420 }
5421 pub fn objects_opt_mut(&mut self) -> Option<&mut super::ObjectSet> {
5423 self.objects.as_mut().map(|field| field as _)
5424 }
5425 pub fn objects_mut(&mut self) -> &mut super::ObjectSet {
5428 self.objects.get_or_insert_default()
5429 }
5430 pub fn objects_opt(&self) -> Option<&super::ObjectSet> {
5432 self.objects.as_ref().map(|field| field as _)
5433 }
5434 pub fn set_objects<T: Into<super::ObjectSet>>(&mut self, field: T) {
5436 self.objects = Some(field.into().into());
5437 }
5438 pub fn with_objects<T: Into<super::ObjectSet>>(mut self, field: T) -> Self {
5440 self.set_objects(field.into());
5441 self
5442 }
5443 }
5444 impl super::ExecutionError {
5445 pub const fn const_default() -> Self {
5446 Self {
5447 description: None,
5448 command: None,
5449 kind: None,
5450 error_details: None,
5451 }
5452 }
5453 #[doc(hidden)]
5454 pub fn default_instance() -> &'static Self {
5455 static DEFAULT: super::ExecutionError = super::ExecutionError::const_default();
5456 &DEFAULT
5457 }
5458 pub fn description_opt_mut(&mut self) -> Option<&mut String> {
5460 self.description.as_mut().map(|field| field as _)
5461 }
5462 pub fn description_mut(&mut self) -> &mut String {
5465 self.description.get_or_insert_default()
5466 }
5467 pub fn description_opt(&self) -> Option<&str> {
5469 self.description.as_ref().map(|field| field as _)
5470 }
5471 pub fn set_description<T: Into<String>>(&mut self, field: T) {
5473 self.description = Some(field.into().into());
5474 }
5475 pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
5477 self.set_description(field.into());
5478 self
5479 }
5480 pub fn command_opt_mut(&mut self) -> Option<&mut u64> {
5482 self.command.as_mut().map(|field| field as _)
5483 }
5484 pub fn command_mut(&mut self) -> &mut u64 {
5487 self.command.get_or_insert_default()
5488 }
5489 pub fn command_opt(&self) -> Option<u64> {
5491 self.command.as_ref().map(|field| *field)
5492 }
5493 pub fn set_command(&mut self, field: u64) {
5495 self.command = Some(field);
5496 }
5497 pub fn with_command(mut self, field: u64) -> Self {
5499 self.set_command(field);
5500 self
5501 }
5502 pub fn with_kind<T: Into<super::execution_error::ExecutionErrorKind>>(
5504 mut self,
5505 field: T,
5506 ) -> Self {
5507 self.set_kind(field.into());
5508 self
5509 }
5510 pub fn abort(&self) -> &super::MoveAbort {
5512 if let Some(super::execution_error::ErrorDetails::Abort(field)) = &self
5513 .error_details
5514 {
5515 field as _
5516 } else {
5517 super::MoveAbort::default_instance() as _
5518 }
5519 }
5520 pub fn abort_opt(&self) -> Option<&super::MoveAbort> {
5522 if let Some(super::execution_error::ErrorDetails::Abort(field)) = &self
5523 .error_details
5524 {
5525 Some(field as _)
5526 } else {
5527 None
5528 }
5529 }
5530 pub fn abort_opt_mut(&mut self) -> Option<&mut super::MoveAbort> {
5532 if let Some(super::execution_error::ErrorDetails::Abort(field)) = &mut self
5533 .error_details
5534 {
5535 Some(field as _)
5536 } else {
5537 None
5538 }
5539 }
5540 pub fn abort_mut(&mut self) -> &mut super::MoveAbort {
5544 if self.abort_opt_mut().is_none() {
5545 self.error_details = Some(
5546 super::execution_error::ErrorDetails::Abort(
5547 super::MoveAbort::default(),
5548 ),
5549 );
5550 }
5551 self.abort_opt_mut().unwrap()
5552 }
5553 pub fn set_abort<T: Into<super::MoveAbort>>(&mut self, field: T) {
5556 self.error_details = Some(
5557 super::execution_error::ErrorDetails::Abort(field.into().into()),
5558 );
5559 }
5560 pub fn with_abort<T: Into<super::MoveAbort>>(mut self, field: T) -> Self {
5563 self.set_abort(field.into());
5564 self
5565 }
5566 pub fn size_error(&self) -> &super::SizeError {
5568 if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &self
5569 .error_details
5570 {
5571 field as _
5572 } else {
5573 super::SizeError::default_instance() as _
5574 }
5575 }
5576 pub fn size_error_opt(&self) -> Option<&super::SizeError> {
5578 if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &self
5579 .error_details
5580 {
5581 Some(field as _)
5582 } else {
5583 None
5584 }
5585 }
5586 pub fn size_error_opt_mut(&mut self) -> Option<&mut super::SizeError> {
5588 if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &mut self
5589 .error_details
5590 {
5591 Some(field as _)
5592 } else {
5593 None
5594 }
5595 }
5596 pub fn size_error_mut(&mut self) -> &mut super::SizeError {
5600 if self.size_error_opt_mut().is_none() {
5601 self.error_details = Some(
5602 super::execution_error::ErrorDetails::SizeError(
5603 super::SizeError::default(),
5604 ),
5605 );
5606 }
5607 self.size_error_opt_mut().unwrap()
5608 }
5609 pub fn set_size_error<T: Into<super::SizeError>>(&mut self, field: T) {
5612 self.error_details = Some(
5613 super::execution_error::ErrorDetails::SizeError(field.into().into()),
5614 );
5615 }
5616 pub fn with_size_error<T: Into<super::SizeError>>(mut self, field: T) -> Self {
5619 self.set_size_error(field.into());
5620 self
5621 }
5622 pub fn command_argument_error(&self) -> &super::CommandArgumentError {
5624 if let Some(
5625 super::execution_error::ErrorDetails::CommandArgumentError(field),
5626 ) = &self.error_details
5627 {
5628 field as _
5629 } else {
5630 super::CommandArgumentError::default_instance() as _
5631 }
5632 }
5633 pub fn command_argument_error_opt(
5635 &self,
5636 ) -> Option<&super::CommandArgumentError> {
5637 if let Some(
5638 super::execution_error::ErrorDetails::CommandArgumentError(field),
5639 ) = &self.error_details
5640 {
5641 Some(field as _)
5642 } else {
5643 None
5644 }
5645 }
5646 pub fn command_argument_error_opt_mut(
5648 &mut self,
5649 ) -> Option<&mut super::CommandArgumentError> {
5650 if let Some(
5651 super::execution_error::ErrorDetails::CommandArgumentError(field),
5652 ) = &mut self.error_details
5653 {
5654 Some(field as _)
5655 } else {
5656 None
5657 }
5658 }
5659 pub fn command_argument_error_mut(
5663 &mut self,
5664 ) -> &mut super::CommandArgumentError {
5665 if self.command_argument_error_opt_mut().is_none() {
5666 self.error_details = Some(
5667 super::execution_error::ErrorDetails::CommandArgumentError(
5668 super::CommandArgumentError::default(),
5669 ),
5670 );
5671 }
5672 self.command_argument_error_opt_mut().unwrap()
5673 }
5674 pub fn set_command_argument_error<T: Into<super::CommandArgumentError>>(
5677 &mut self,
5678 field: T,
5679 ) {
5680 self.error_details = Some(
5681 super::execution_error::ErrorDetails::CommandArgumentError(
5682 field.into().into(),
5683 ),
5684 );
5685 }
5686 pub fn with_command_argument_error<T: Into<super::CommandArgumentError>>(
5689 mut self,
5690 field: T,
5691 ) -> Self {
5692 self.set_command_argument_error(field.into());
5693 self
5694 }
5695 pub fn type_argument_error(&self) -> &super::TypeArgumentError {
5697 if let Some(
5698 super::execution_error::ErrorDetails::TypeArgumentError(field),
5699 ) = &self.error_details
5700 {
5701 field as _
5702 } else {
5703 super::TypeArgumentError::default_instance() as _
5704 }
5705 }
5706 pub fn type_argument_error_opt(&self) -> Option<&super::TypeArgumentError> {
5708 if let Some(
5709 super::execution_error::ErrorDetails::TypeArgumentError(field),
5710 ) = &self.error_details
5711 {
5712 Some(field as _)
5713 } else {
5714 None
5715 }
5716 }
5717 pub fn type_argument_error_opt_mut(
5719 &mut self,
5720 ) -> Option<&mut super::TypeArgumentError> {
5721 if let Some(
5722 super::execution_error::ErrorDetails::TypeArgumentError(field),
5723 ) = &mut self.error_details
5724 {
5725 Some(field as _)
5726 } else {
5727 None
5728 }
5729 }
5730 pub fn type_argument_error_mut(&mut self) -> &mut super::TypeArgumentError {
5734 if self.type_argument_error_opt_mut().is_none() {
5735 self.error_details = Some(
5736 super::execution_error::ErrorDetails::TypeArgumentError(
5737 super::TypeArgumentError::default(),
5738 ),
5739 );
5740 }
5741 self.type_argument_error_opt_mut().unwrap()
5742 }
5743 pub fn set_type_argument_error<T: Into<super::TypeArgumentError>>(
5746 &mut self,
5747 field: T,
5748 ) {
5749 self.error_details = Some(
5750 super::execution_error::ErrorDetails::TypeArgumentError(
5751 field.into().into(),
5752 ),
5753 );
5754 }
5755 pub fn with_type_argument_error<T: Into<super::TypeArgumentError>>(
5758 mut self,
5759 field: T,
5760 ) -> Self {
5761 self.set_type_argument_error(field.into());
5762 self
5763 }
5764 pub fn package_upgrade_error(&self) -> &super::PackageUpgradeError {
5766 if let Some(
5767 super::execution_error::ErrorDetails::PackageUpgradeError(field),
5768 ) = &self.error_details
5769 {
5770 field as _
5771 } else {
5772 super::PackageUpgradeError::default_instance() as _
5773 }
5774 }
5775 pub fn package_upgrade_error_opt(&self) -> Option<&super::PackageUpgradeError> {
5777 if let Some(
5778 super::execution_error::ErrorDetails::PackageUpgradeError(field),
5779 ) = &self.error_details
5780 {
5781 Some(field as _)
5782 } else {
5783 None
5784 }
5785 }
5786 pub fn package_upgrade_error_opt_mut(
5788 &mut self,
5789 ) -> Option<&mut super::PackageUpgradeError> {
5790 if let Some(
5791 super::execution_error::ErrorDetails::PackageUpgradeError(field),
5792 ) = &mut self.error_details
5793 {
5794 Some(field as _)
5795 } else {
5796 None
5797 }
5798 }
5799 pub fn package_upgrade_error_mut(&mut self) -> &mut super::PackageUpgradeError {
5803 if self.package_upgrade_error_opt_mut().is_none() {
5804 self.error_details = Some(
5805 super::execution_error::ErrorDetails::PackageUpgradeError(
5806 super::PackageUpgradeError::default(),
5807 ),
5808 );
5809 }
5810 self.package_upgrade_error_opt_mut().unwrap()
5811 }
5812 pub fn set_package_upgrade_error<T: Into<super::PackageUpgradeError>>(
5815 &mut self,
5816 field: T,
5817 ) {
5818 self.error_details = Some(
5819 super::execution_error::ErrorDetails::PackageUpgradeError(
5820 field.into().into(),
5821 ),
5822 );
5823 }
5824 pub fn with_package_upgrade_error<T: Into<super::PackageUpgradeError>>(
5827 mut self,
5828 field: T,
5829 ) -> Self {
5830 self.set_package_upgrade_error(field.into());
5831 self
5832 }
5833 pub fn index_error(&self) -> &super::IndexError {
5835 if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &self
5836 .error_details
5837 {
5838 field as _
5839 } else {
5840 super::IndexError::default_instance() as _
5841 }
5842 }
5843 pub fn index_error_opt(&self) -> Option<&super::IndexError> {
5845 if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &self
5846 .error_details
5847 {
5848 Some(field as _)
5849 } else {
5850 None
5851 }
5852 }
5853 pub fn index_error_opt_mut(&mut self) -> Option<&mut super::IndexError> {
5855 if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &mut self
5856 .error_details
5857 {
5858 Some(field as _)
5859 } else {
5860 None
5861 }
5862 }
5863 pub fn index_error_mut(&mut self) -> &mut super::IndexError {
5867 if self.index_error_opt_mut().is_none() {
5868 self.error_details = Some(
5869 super::execution_error::ErrorDetails::IndexError(
5870 super::IndexError::default(),
5871 ),
5872 );
5873 }
5874 self.index_error_opt_mut().unwrap()
5875 }
5876 pub fn set_index_error<T: Into<super::IndexError>>(&mut self, field: T) {
5879 self.error_details = Some(
5880 super::execution_error::ErrorDetails::IndexError(field.into().into()),
5881 );
5882 }
5883 pub fn with_index_error<T: Into<super::IndexError>>(mut self, field: T) -> Self {
5886 self.set_index_error(field.into());
5887 self
5888 }
5889 pub fn object_id(&self) -> &str {
5891 if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &self
5892 .error_details
5893 {
5894 field as _
5895 } else {
5896 ""
5897 }
5898 }
5899 pub fn object_id_opt(&self) -> Option<&str> {
5901 if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &self
5902 .error_details
5903 {
5904 Some(field as _)
5905 } else {
5906 None
5907 }
5908 }
5909 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
5911 if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &mut self
5912 .error_details
5913 {
5914 Some(field as _)
5915 } else {
5916 None
5917 }
5918 }
5919 pub fn object_id_mut(&mut self) -> &mut String {
5923 if self.object_id_opt_mut().is_none() {
5924 self.error_details = Some(
5925 super::execution_error::ErrorDetails::ObjectId(String::default()),
5926 );
5927 }
5928 self.object_id_opt_mut().unwrap()
5929 }
5930 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
5933 self.error_details = Some(
5934 super::execution_error::ErrorDetails::ObjectId(field.into().into()),
5935 );
5936 }
5937 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
5940 self.set_object_id(field.into());
5941 self
5942 }
5943 pub fn coin_deny_list_error(&self) -> &super::CoinDenyListError {
5945 if let Some(
5946 super::execution_error::ErrorDetails::CoinDenyListError(field),
5947 ) = &self.error_details
5948 {
5949 field as _
5950 } else {
5951 super::CoinDenyListError::default_instance() as _
5952 }
5953 }
5954 pub fn coin_deny_list_error_opt(&self) -> Option<&super::CoinDenyListError> {
5956 if let Some(
5957 super::execution_error::ErrorDetails::CoinDenyListError(field),
5958 ) = &self.error_details
5959 {
5960 Some(field as _)
5961 } else {
5962 None
5963 }
5964 }
5965 pub fn coin_deny_list_error_opt_mut(
5967 &mut self,
5968 ) -> Option<&mut super::CoinDenyListError> {
5969 if let Some(
5970 super::execution_error::ErrorDetails::CoinDenyListError(field),
5971 ) = &mut self.error_details
5972 {
5973 Some(field as _)
5974 } else {
5975 None
5976 }
5977 }
5978 pub fn coin_deny_list_error_mut(&mut self) -> &mut super::CoinDenyListError {
5982 if self.coin_deny_list_error_opt_mut().is_none() {
5983 self.error_details = Some(
5984 super::execution_error::ErrorDetails::CoinDenyListError(
5985 super::CoinDenyListError::default(),
5986 ),
5987 );
5988 }
5989 self.coin_deny_list_error_opt_mut().unwrap()
5990 }
5991 pub fn set_coin_deny_list_error<T: Into<super::CoinDenyListError>>(
5994 &mut self,
5995 field: T,
5996 ) {
5997 self.error_details = Some(
5998 super::execution_error::ErrorDetails::CoinDenyListError(
5999 field.into().into(),
6000 ),
6001 );
6002 }
6003 pub fn with_coin_deny_list_error<T: Into<super::CoinDenyListError>>(
6006 mut self,
6007 field: T,
6008 ) -> Self {
6009 self.set_coin_deny_list_error(field.into());
6010 self
6011 }
6012 pub fn congested_objects(&self) -> &super::CongestedObjects {
6014 if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &self
6015 .error_details
6016 {
6017 field as _
6018 } else {
6019 super::CongestedObjects::default_instance() as _
6020 }
6021 }
6022 pub fn congested_objects_opt(&self) -> Option<&super::CongestedObjects> {
6024 if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &self
6025 .error_details
6026 {
6027 Some(field as _)
6028 } else {
6029 None
6030 }
6031 }
6032 pub fn congested_objects_opt_mut(
6034 &mut self,
6035 ) -> Option<&mut super::CongestedObjects> {
6036 if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &mut self
6037 .error_details
6038 {
6039 Some(field as _)
6040 } else {
6041 None
6042 }
6043 }
6044 pub fn congested_objects_mut(&mut self) -> &mut super::CongestedObjects {
6048 if self.congested_objects_opt_mut().is_none() {
6049 self.error_details = Some(
6050 super::execution_error::ErrorDetails::CongestedObjects(
6051 super::CongestedObjects::default(),
6052 ),
6053 );
6054 }
6055 self.congested_objects_opt_mut().unwrap()
6056 }
6057 pub fn set_congested_objects<T: Into<super::CongestedObjects>>(
6060 &mut self,
6061 field: T,
6062 ) {
6063 self.error_details = Some(
6064 super::execution_error::ErrorDetails::CongestedObjects(
6065 field.into().into(),
6066 ),
6067 );
6068 }
6069 pub fn with_congested_objects<T: Into<super::CongestedObjects>>(
6072 mut self,
6073 field: T,
6074 ) -> Self {
6075 self.set_congested_objects(field.into());
6076 self
6077 }
6078 }
6079 impl super::ExecutionStatus {
6080 pub const fn const_default() -> Self {
6081 Self { success: None, error: None }
6082 }
6083 #[doc(hidden)]
6084 pub fn default_instance() -> &'static Self {
6085 static DEFAULT: super::ExecutionStatus = super::ExecutionStatus::const_default();
6086 &DEFAULT
6087 }
6088 pub fn success_opt_mut(&mut self) -> Option<&mut bool> {
6090 self.success.as_mut().map(|field| field as _)
6091 }
6092 pub fn success_mut(&mut self) -> &mut bool {
6095 self.success.get_or_insert_default()
6096 }
6097 pub fn success_opt(&self) -> Option<bool> {
6099 self.success.as_ref().map(|field| *field)
6100 }
6101 pub fn set_success(&mut self, field: bool) {
6103 self.success = Some(field);
6104 }
6105 pub fn with_success(mut self, field: bool) -> Self {
6107 self.set_success(field);
6108 self
6109 }
6110 pub fn error(&self) -> &super::ExecutionError {
6112 self.error
6113 .as_ref()
6114 .map(|field| field as _)
6115 .unwrap_or_else(|| super::ExecutionError::default_instance() as _)
6116 }
6117 pub fn error_opt_mut(&mut self) -> Option<&mut super::ExecutionError> {
6119 self.error.as_mut().map(|field| field as _)
6120 }
6121 pub fn error_mut(&mut self) -> &mut super::ExecutionError {
6124 self.error.get_or_insert_default()
6125 }
6126 pub fn error_opt(&self) -> Option<&super::ExecutionError> {
6128 self.error.as_ref().map(|field| field as _)
6129 }
6130 pub fn set_error<T: Into<super::ExecutionError>>(&mut self, field: T) {
6132 self.error = Some(field.into().into());
6133 }
6134 pub fn with_error<T: Into<super::ExecutionError>>(mut self, field: T) -> Self {
6136 self.set_error(field.into());
6137 self
6138 }
6139 }
6140 impl super::ExecutionTimeObservation {
6141 pub const fn const_default() -> Self {
6142 Self {
6143 kind: None,
6144 move_entry_point: None,
6145 validator_observations: Vec::new(),
6146 }
6147 }
6148 #[doc(hidden)]
6149 pub fn default_instance() -> &'static Self {
6150 static DEFAULT: super::ExecutionTimeObservation = super::ExecutionTimeObservation::const_default();
6151 &DEFAULT
6152 }
6153 pub fn with_kind<
6155 T: Into<super::execution_time_observation::ExecutionTimeObservationKind>,
6156 >(mut self, field: T) -> Self {
6157 self.set_kind(field.into());
6158 self
6159 }
6160 pub fn move_entry_point(&self) -> &super::MoveCall {
6162 self.move_entry_point
6163 .as_ref()
6164 .map(|field| field as _)
6165 .unwrap_or_else(|| super::MoveCall::default_instance() as _)
6166 }
6167 pub fn move_entry_point_opt_mut(&mut self) -> Option<&mut super::MoveCall> {
6169 self.move_entry_point.as_mut().map(|field| field as _)
6170 }
6171 pub fn move_entry_point_mut(&mut self) -> &mut super::MoveCall {
6174 self.move_entry_point.get_or_insert_default()
6175 }
6176 pub fn move_entry_point_opt(&self) -> Option<&super::MoveCall> {
6178 self.move_entry_point.as_ref().map(|field| field as _)
6179 }
6180 pub fn set_move_entry_point<T: Into<super::MoveCall>>(&mut self, field: T) {
6182 self.move_entry_point = Some(field.into().into());
6183 }
6184 pub fn with_move_entry_point<T: Into<super::MoveCall>>(
6186 mut self,
6187 field: T,
6188 ) -> Self {
6189 self.set_move_entry_point(field.into());
6190 self
6191 }
6192 pub fn validator_observations(
6194 &self,
6195 ) -> &[super::ValidatorExecutionTimeObservation] {
6196 &self.validator_observations
6197 }
6198 pub fn validator_observations_mut(
6201 &mut self,
6202 ) -> &mut Vec<super::ValidatorExecutionTimeObservation> {
6203 &mut self.validator_observations
6204 }
6205 pub fn set_validator_observations(
6207 &mut self,
6208 field: Vec<super::ValidatorExecutionTimeObservation>,
6209 ) {
6210 self.validator_observations = field;
6211 }
6212 pub fn with_validator_observations(
6214 mut self,
6215 field: Vec<super::ValidatorExecutionTimeObservation>,
6216 ) -> Self {
6217 self.set_validator_observations(field);
6218 self
6219 }
6220 }
6221 impl super::ExecutionTimeObservations {
6222 pub const fn const_default() -> Self {
6223 Self {
6224 version: None,
6225 observations: Vec::new(),
6226 }
6227 }
6228 #[doc(hidden)]
6229 pub fn default_instance() -> &'static Self {
6230 static DEFAULT: super::ExecutionTimeObservations = super::ExecutionTimeObservations::const_default();
6231 &DEFAULT
6232 }
6233 pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
6235 self.version.as_mut().map(|field| field as _)
6236 }
6237 pub fn version_mut(&mut self) -> &mut i32 {
6240 self.version.get_or_insert_default()
6241 }
6242 pub fn version_opt(&self) -> Option<i32> {
6244 self.version.as_ref().map(|field| *field)
6245 }
6246 pub fn set_version(&mut self, field: i32) {
6248 self.version = Some(field);
6249 }
6250 pub fn with_version(mut self, field: i32) -> Self {
6252 self.set_version(field);
6253 self
6254 }
6255 pub fn observations(&self) -> &[super::ExecutionTimeObservation] {
6257 &self.observations
6258 }
6259 pub fn observations_mut(&mut self) -> &mut Vec<super::ExecutionTimeObservation> {
6262 &mut self.observations
6263 }
6264 pub fn set_observations(&mut self, field: Vec<super::ExecutionTimeObservation>) {
6266 self.observations = field;
6267 }
6268 pub fn with_observations(
6270 mut self,
6271 field: Vec<super::ExecutionTimeObservation>,
6272 ) -> Self {
6273 self.set_observations(field);
6274 self
6275 }
6276 }
6277 impl super::FieldDescriptor {
6278 pub const fn const_default() -> Self {
6279 Self {
6280 name: None,
6281 position: None,
6282 r#type: None,
6283 }
6284 }
6285 #[doc(hidden)]
6286 pub fn default_instance() -> &'static Self {
6287 static DEFAULT: super::FieldDescriptor = super::FieldDescriptor::const_default();
6288 &DEFAULT
6289 }
6290 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
6292 self.name.as_mut().map(|field| field as _)
6293 }
6294 pub fn name_mut(&mut self) -> &mut String {
6297 self.name.get_or_insert_default()
6298 }
6299 pub fn name_opt(&self) -> Option<&str> {
6301 self.name.as_ref().map(|field| field as _)
6302 }
6303 pub fn set_name<T: Into<String>>(&mut self, field: T) {
6305 self.name = Some(field.into().into());
6306 }
6307 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
6309 self.set_name(field.into());
6310 self
6311 }
6312 pub fn position_opt_mut(&mut self) -> Option<&mut u32> {
6314 self.position.as_mut().map(|field| field as _)
6315 }
6316 pub fn position_mut(&mut self) -> &mut u32 {
6319 self.position.get_or_insert_default()
6320 }
6321 pub fn position_opt(&self) -> Option<u32> {
6323 self.position.as_ref().map(|field| *field)
6324 }
6325 pub fn set_position(&mut self, field: u32) {
6327 self.position = Some(field);
6328 }
6329 pub fn with_position(mut self, field: u32) -> Self {
6331 self.set_position(field);
6332 self
6333 }
6334 pub fn r#type(&self) -> &super::OpenSignatureBody {
6336 self.r#type
6337 .as_ref()
6338 .map(|field| field as _)
6339 .unwrap_or_else(|| super::OpenSignatureBody::default_instance() as _)
6340 }
6341 pub fn type_opt_mut(&mut self) -> Option<&mut super::OpenSignatureBody> {
6343 self.r#type.as_mut().map(|field| field as _)
6344 }
6345 pub fn type_mut(&mut self) -> &mut super::OpenSignatureBody {
6348 self.r#type.get_or_insert_default()
6349 }
6350 pub fn type_opt(&self) -> Option<&super::OpenSignatureBody> {
6352 self.r#type.as_ref().map(|field| field as _)
6353 }
6354 pub fn set_type<T: Into<super::OpenSignatureBody>>(&mut self, field: T) {
6356 self.r#type = Some(field.into().into());
6357 }
6358 pub fn with_type<T: Into<super::OpenSignatureBody>>(mut self, field: T) -> Self {
6360 self.set_type(field.into());
6361 self
6362 }
6363 }
6364 impl super::FunctionDescriptor {
6365 pub const fn const_default() -> Self {
6366 Self {
6367 name: None,
6368 visibility: None,
6369 is_entry: None,
6370 type_parameters: Vec::new(),
6371 parameters: Vec::new(),
6372 returns: Vec::new(),
6373 }
6374 }
6375 #[doc(hidden)]
6376 pub fn default_instance() -> &'static Self {
6377 static DEFAULT: super::FunctionDescriptor = super::FunctionDescriptor::const_default();
6378 &DEFAULT
6379 }
6380 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
6382 self.name.as_mut().map(|field| field as _)
6383 }
6384 pub fn name_mut(&mut self) -> &mut String {
6387 self.name.get_or_insert_default()
6388 }
6389 pub fn name_opt(&self) -> Option<&str> {
6391 self.name.as_ref().map(|field| field as _)
6392 }
6393 pub fn set_name<T: Into<String>>(&mut self, field: T) {
6395 self.name = Some(field.into().into());
6396 }
6397 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
6399 self.set_name(field.into());
6400 self
6401 }
6402 pub fn with_visibility<T: Into<super::function_descriptor::Visibility>>(
6404 mut self,
6405 field: T,
6406 ) -> Self {
6407 self.set_visibility(field.into());
6408 self
6409 }
6410 pub fn is_entry_opt_mut(&mut self) -> Option<&mut bool> {
6412 self.is_entry.as_mut().map(|field| field as _)
6413 }
6414 pub fn is_entry_mut(&mut self) -> &mut bool {
6417 self.is_entry.get_or_insert_default()
6418 }
6419 pub fn is_entry_opt(&self) -> Option<bool> {
6421 self.is_entry.as_ref().map(|field| *field)
6422 }
6423 pub fn set_is_entry(&mut self, field: bool) {
6425 self.is_entry = Some(field);
6426 }
6427 pub fn with_is_entry(mut self, field: bool) -> Self {
6429 self.set_is_entry(field);
6430 self
6431 }
6432 pub fn type_parameters(&self) -> &[super::TypeParameter] {
6434 &self.type_parameters
6435 }
6436 pub fn type_parameters_mut(&mut self) -> &mut Vec<super::TypeParameter> {
6439 &mut self.type_parameters
6440 }
6441 pub fn set_type_parameters(&mut self, field: Vec<super::TypeParameter>) {
6443 self.type_parameters = field;
6444 }
6445 pub fn with_type_parameters(mut self, field: Vec<super::TypeParameter>) -> Self {
6447 self.set_type_parameters(field);
6448 self
6449 }
6450 pub fn parameters(&self) -> &[super::OpenSignature] {
6452 &self.parameters
6453 }
6454 pub fn parameters_mut(&mut self) -> &mut Vec<super::OpenSignature> {
6457 &mut self.parameters
6458 }
6459 pub fn set_parameters(&mut self, field: Vec<super::OpenSignature>) {
6461 self.parameters = field;
6462 }
6463 pub fn with_parameters(mut self, field: Vec<super::OpenSignature>) -> Self {
6465 self.set_parameters(field);
6466 self
6467 }
6468 pub fn returns(&self) -> &[super::OpenSignature] {
6470 &self.returns
6471 }
6472 pub fn returns_mut(&mut self) -> &mut Vec<super::OpenSignature> {
6475 &mut self.returns
6476 }
6477 pub fn set_returns(&mut self, field: Vec<super::OpenSignature>) {
6479 self.returns = field;
6480 }
6481 pub fn with_returns(mut self, field: Vec<super::OpenSignature>) -> Self {
6483 self.set_returns(field);
6484 self
6485 }
6486 }
6487 impl super::FundsWithdrawal {
6488 pub const fn const_default() -> Self {
6489 Self {
6490 amount: None,
6491 coin_type: None,
6492 source: None,
6493 }
6494 }
6495 #[doc(hidden)]
6496 pub fn default_instance() -> &'static Self {
6497 static DEFAULT: super::FundsWithdrawal = super::FundsWithdrawal::const_default();
6498 &DEFAULT
6499 }
6500 pub fn amount_opt_mut(&mut self) -> Option<&mut u64> {
6502 self.amount.as_mut().map(|field| field as _)
6503 }
6504 pub fn amount_mut(&mut self) -> &mut u64 {
6507 self.amount.get_or_insert_default()
6508 }
6509 pub fn amount_opt(&self) -> Option<u64> {
6511 self.amount.as_ref().map(|field| *field)
6512 }
6513 pub fn set_amount(&mut self, field: u64) {
6515 self.amount = Some(field);
6516 }
6517 pub fn with_amount(mut self, field: u64) -> Self {
6519 self.set_amount(field);
6520 self
6521 }
6522 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
6524 self.coin_type.as_mut().map(|field| field as _)
6525 }
6526 pub fn coin_type_mut(&mut self) -> &mut String {
6529 self.coin_type.get_or_insert_default()
6530 }
6531 pub fn coin_type_opt(&self) -> Option<&str> {
6533 self.coin_type.as_ref().map(|field| field as _)
6534 }
6535 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
6537 self.coin_type = Some(field.into().into());
6538 }
6539 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
6541 self.set_coin_type(field.into());
6542 self
6543 }
6544 pub fn with_source<T: Into<super::funds_withdrawal::Source>>(
6546 mut self,
6547 field: T,
6548 ) -> Self {
6549 self.set_source(field.into());
6550 self
6551 }
6552 }
6553 impl super::GasCostSummary {
6554 pub const fn const_default() -> Self {
6555 Self {
6556 computation_cost: None,
6557 storage_cost: None,
6558 storage_rebate: None,
6559 non_refundable_storage_fee: None,
6560 }
6561 }
6562 #[doc(hidden)]
6563 pub fn default_instance() -> &'static Self {
6564 static DEFAULT: super::GasCostSummary = super::GasCostSummary::const_default();
6565 &DEFAULT
6566 }
6567 pub fn computation_cost_opt_mut(&mut self) -> Option<&mut u64> {
6569 self.computation_cost.as_mut().map(|field| field as _)
6570 }
6571 pub fn computation_cost_mut(&mut self) -> &mut u64 {
6574 self.computation_cost.get_or_insert_default()
6575 }
6576 pub fn computation_cost_opt(&self) -> Option<u64> {
6578 self.computation_cost.as_ref().map(|field| *field)
6579 }
6580 pub fn set_computation_cost(&mut self, field: u64) {
6582 self.computation_cost = Some(field);
6583 }
6584 pub fn with_computation_cost(mut self, field: u64) -> Self {
6586 self.set_computation_cost(field);
6587 self
6588 }
6589 pub fn storage_cost_opt_mut(&mut self) -> Option<&mut u64> {
6591 self.storage_cost.as_mut().map(|field| field as _)
6592 }
6593 pub fn storage_cost_mut(&mut self) -> &mut u64 {
6596 self.storage_cost.get_or_insert_default()
6597 }
6598 pub fn storage_cost_opt(&self) -> Option<u64> {
6600 self.storage_cost.as_ref().map(|field| *field)
6601 }
6602 pub fn set_storage_cost(&mut self, field: u64) {
6604 self.storage_cost = Some(field);
6605 }
6606 pub fn with_storage_cost(mut self, field: u64) -> Self {
6608 self.set_storage_cost(field);
6609 self
6610 }
6611 pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
6613 self.storage_rebate.as_mut().map(|field| field as _)
6614 }
6615 pub fn storage_rebate_mut(&mut self) -> &mut u64 {
6618 self.storage_rebate.get_or_insert_default()
6619 }
6620 pub fn storage_rebate_opt(&self) -> Option<u64> {
6622 self.storage_rebate.as_ref().map(|field| *field)
6623 }
6624 pub fn set_storage_rebate(&mut self, field: u64) {
6626 self.storage_rebate = Some(field);
6627 }
6628 pub fn with_storage_rebate(mut self, field: u64) -> Self {
6630 self.set_storage_rebate(field);
6631 self
6632 }
6633 pub fn non_refundable_storage_fee_opt_mut(&mut self) -> Option<&mut u64> {
6635 self.non_refundable_storage_fee.as_mut().map(|field| field as _)
6636 }
6637 pub fn non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
6640 self.non_refundable_storage_fee.get_or_insert_default()
6641 }
6642 pub fn non_refundable_storage_fee_opt(&self) -> Option<u64> {
6644 self.non_refundable_storage_fee.as_ref().map(|field| *field)
6645 }
6646 pub fn set_non_refundable_storage_fee(&mut self, field: u64) {
6648 self.non_refundable_storage_fee = Some(field);
6649 }
6650 pub fn with_non_refundable_storage_fee(mut self, field: u64) -> Self {
6652 self.set_non_refundable_storage_fee(field);
6653 self
6654 }
6655 }
6656 impl super::GasPayment {
6657 pub const fn const_default() -> Self {
6658 Self {
6659 objects: Vec::new(),
6660 owner: None,
6661 price: None,
6662 budget: None,
6663 }
6664 }
6665 #[doc(hidden)]
6666 pub fn default_instance() -> &'static Self {
6667 static DEFAULT: super::GasPayment = super::GasPayment::const_default();
6668 &DEFAULT
6669 }
6670 pub fn objects(&self) -> &[super::ObjectReference] {
6672 &self.objects
6673 }
6674 pub fn objects_mut(&mut self) -> &mut Vec<super::ObjectReference> {
6677 &mut self.objects
6678 }
6679 pub fn set_objects(&mut self, field: Vec<super::ObjectReference>) {
6681 self.objects = field;
6682 }
6683 pub fn with_objects(mut self, field: Vec<super::ObjectReference>) -> Self {
6685 self.set_objects(field);
6686 self
6687 }
6688 pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
6690 self.owner.as_mut().map(|field| field as _)
6691 }
6692 pub fn owner_mut(&mut self) -> &mut String {
6695 self.owner.get_or_insert_default()
6696 }
6697 pub fn owner_opt(&self) -> Option<&str> {
6699 self.owner.as_ref().map(|field| field as _)
6700 }
6701 pub fn set_owner<T: Into<String>>(&mut self, field: T) {
6703 self.owner = Some(field.into().into());
6704 }
6705 pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
6707 self.set_owner(field.into());
6708 self
6709 }
6710 pub fn price_opt_mut(&mut self) -> Option<&mut u64> {
6712 self.price.as_mut().map(|field| field as _)
6713 }
6714 pub fn price_mut(&mut self) -> &mut u64 {
6717 self.price.get_or_insert_default()
6718 }
6719 pub fn price_opt(&self) -> Option<u64> {
6721 self.price.as_ref().map(|field| *field)
6722 }
6723 pub fn set_price(&mut self, field: u64) {
6725 self.price = Some(field);
6726 }
6727 pub fn with_price(mut self, field: u64) -> Self {
6729 self.set_price(field);
6730 self
6731 }
6732 pub fn budget_opt_mut(&mut self) -> Option<&mut u64> {
6734 self.budget.as_mut().map(|field| field as _)
6735 }
6736 pub fn budget_mut(&mut self) -> &mut u64 {
6739 self.budget.get_or_insert_default()
6740 }
6741 pub fn budget_opt(&self) -> Option<u64> {
6743 self.budget.as_ref().map(|field| *field)
6744 }
6745 pub fn set_budget(&mut self, field: u64) {
6747 self.budget = Some(field);
6748 }
6749 pub fn with_budget(mut self, field: u64) -> Self {
6751 self.set_budget(field);
6752 self
6753 }
6754 }
6755 impl super::GenesisTransaction {
6756 pub const fn const_default() -> Self {
6757 Self { objects: Vec::new() }
6758 }
6759 #[doc(hidden)]
6760 pub fn default_instance() -> &'static Self {
6761 static DEFAULT: super::GenesisTransaction = super::GenesisTransaction::const_default();
6762 &DEFAULT
6763 }
6764 pub fn objects(&self) -> &[super::Object] {
6766 &self.objects
6767 }
6768 pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
6771 &mut self.objects
6772 }
6773 pub fn set_objects(&mut self, field: Vec<super::Object>) {
6775 self.objects = field;
6776 }
6777 pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
6779 self.set_objects(field);
6780 self
6781 }
6782 }
6783 impl super::GetBalanceRequest {
6784 pub const fn const_default() -> Self {
6785 Self {
6786 owner: None,
6787 coin_type: None,
6788 }
6789 }
6790 #[doc(hidden)]
6791 pub fn default_instance() -> &'static Self {
6792 static DEFAULT: super::GetBalanceRequest = super::GetBalanceRequest::const_default();
6793 &DEFAULT
6794 }
6795 pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
6797 self.owner.as_mut().map(|field| field as _)
6798 }
6799 pub fn owner_mut(&mut self) -> &mut String {
6802 self.owner.get_or_insert_default()
6803 }
6804 pub fn owner_opt(&self) -> Option<&str> {
6806 self.owner.as_ref().map(|field| field as _)
6807 }
6808 pub fn set_owner<T: Into<String>>(&mut self, field: T) {
6810 self.owner = Some(field.into().into());
6811 }
6812 pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
6814 self.set_owner(field.into());
6815 self
6816 }
6817 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
6819 self.coin_type.as_mut().map(|field| field as _)
6820 }
6821 pub fn coin_type_mut(&mut self) -> &mut String {
6824 self.coin_type.get_or_insert_default()
6825 }
6826 pub fn coin_type_opt(&self) -> Option<&str> {
6828 self.coin_type.as_ref().map(|field| field as _)
6829 }
6830 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
6832 self.coin_type = Some(field.into().into());
6833 }
6834 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
6836 self.set_coin_type(field.into());
6837 self
6838 }
6839 }
6840 impl super::GetBalanceResponse {
6841 pub const fn const_default() -> Self {
6842 Self { balance: None }
6843 }
6844 #[doc(hidden)]
6845 pub fn default_instance() -> &'static Self {
6846 static DEFAULT: super::GetBalanceResponse = super::GetBalanceResponse::const_default();
6847 &DEFAULT
6848 }
6849 pub fn balance(&self) -> &super::Balance {
6851 self.balance
6852 .as_ref()
6853 .map(|field| field as _)
6854 .unwrap_or_else(|| super::Balance::default_instance() as _)
6855 }
6856 pub fn balance_opt_mut(&mut self) -> Option<&mut super::Balance> {
6858 self.balance.as_mut().map(|field| field as _)
6859 }
6860 pub fn balance_mut(&mut self) -> &mut super::Balance {
6863 self.balance.get_or_insert_default()
6864 }
6865 pub fn balance_opt(&self) -> Option<&super::Balance> {
6867 self.balance.as_ref().map(|field| field as _)
6868 }
6869 pub fn set_balance<T: Into<super::Balance>>(&mut self, field: T) {
6871 self.balance = Some(field.into().into());
6872 }
6873 pub fn with_balance<T: Into<super::Balance>>(mut self, field: T) -> Self {
6875 self.set_balance(field.into());
6876 self
6877 }
6878 }
6879 impl super::GetCheckpointRequest {
6880 pub const fn const_default() -> Self {
6881 Self {
6882 read_mask: None,
6883 checkpoint_id: None,
6884 }
6885 }
6886 #[doc(hidden)]
6887 pub fn default_instance() -> &'static Self {
6888 static DEFAULT: super::GetCheckpointRequest = super::GetCheckpointRequest::const_default();
6889 &DEFAULT
6890 }
6891 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
6893 self.read_mask.as_mut().map(|field| field as _)
6894 }
6895 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
6898 self.read_mask.get_or_insert_default()
6899 }
6900 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
6902 self.read_mask.as_ref().map(|field| field as _)
6903 }
6904 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
6906 self.read_mask = Some(field.into().into());
6907 }
6908 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
6910 mut self,
6911 field: T,
6912 ) -> Self {
6913 self.set_read_mask(field.into());
6914 self
6915 }
6916 pub fn sequence_number(&self) -> u64 {
6918 if let Some(
6919 super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
6920 ) = &self.checkpoint_id
6921 {
6922 *field
6923 } else {
6924 0u64
6925 }
6926 }
6927 pub fn sequence_number_opt(&self) -> Option<u64> {
6929 if let Some(
6930 super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
6931 ) = &self.checkpoint_id
6932 {
6933 Some(*field)
6934 } else {
6935 None
6936 }
6937 }
6938 pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
6940 if let Some(
6941 super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
6942 ) = &mut self.checkpoint_id
6943 {
6944 Some(field as _)
6945 } else {
6946 None
6947 }
6948 }
6949 pub fn sequence_number_mut(&mut self) -> &mut u64 {
6953 if self.sequence_number_opt_mut().is_none() {
6954 self.checkpoint_id = Some(
6955 super::get_checkpoint_request::CheckpointId::SequenceNumber(
6956 u64::default(),
6957 ),
6958 );
6959 }
6960 self.sequence_number_opt_mut().unwrap()
6961 }
6962 pub fn set_sequence_number(&mut self, field: u64) {
6965 self.checkpoint_id = Some(
6966 super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
6967 );
6968 }
6969 pub fn with_sequence_number(mut self, field: u64) -> Self {
6972 self.set_sequence_number(field);
6973 self
6974 }
6975 pub fn digest(&self) -> &str {
6977 if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &self
6978 .checkpoint_id
6979 {
6980 field as _
6981 } else {
6982 ""
6983 }
6984 }
6985 pub fn digest_opt(&self) -> Option<&str> {
6987 if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &self
6988 .checkpoint_id
6989 {
6990 Some(field as _)
6991 } else {
6992 None
6993 }
6994 }
6995 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
6997 if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &mut self
6998 .checkpoint_id
6999 {
7000 Some(field as _)
7001 } else {
7002 None
7003 }
7004 }
7005 pub fn digest_mut(&mut self) -> &mut String {
7009 if self.digest_opt_mut().is_none() {
7010 self.checkpoint_id = Some(
7011 super::get_checkpoint_request::CheckpointId::Digest(
7012 String::default(),
7013 ),
7014 );
7015 }
7016 self.digest_opt_mut().unwrap()
7017 }
7018 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
7021 self.checkpoint_id = Some(
7022 super::get_checkpoint_request::CheckpointId::Digest(field.into().into()),
7023 );
7024 }
7025 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
7028 self.set_digest(field.into());
7029 self
7030 }
7031 }
7032 impl super::GetCheckpointResponse {
7033 pub const fn const_default() -> Self {
7034 Self { checkpoint: None }
7035 }
7036 #[doc(hidden)]
7037 pub fn default_instance() -> &'static Self {
7038 static DEFAULT: super::GetCheckpointResponse = super::GetCheckpointResponse::const_default();
7039 &DEFAULT
7040 }
7041 pub fn checkpoint(&self) -> &super::Checkpoint {
7043 self.checkpoint
7044 .as_ref()
7045 .map(|field| field as _)
7046 .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
7047 }
7048 pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
7050 self.checkpoint.as_mut().map(|field| field as _)
7051 }
7052 pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
7055 self.checkpoint.get_or_insert_default()
7056 }
7057 pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
7059 self.checkpoint.as_ref().map(|field| field as _)
7060 }
7061 pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
7063 self.checkpoint = Some(field.into().into());
7064 }
7065 pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
7067 self.set_checkpoint(field.into());
7068 self
7069 }
7070 }
7071 impl super::GetCoinInfoRequest {
7072 pub const fn const_default() -> Self {
7073 Self { coin_type: None }
7074 }
7075 #[doc(hidden)]
7076 pub fn default_instance() -> &'static Self {
7077 static DEFAULT: super::GetCoinInfoRequest = super::GetCoinInfoRequest::const_default();
7078 &DEFAULT
7079 }
7080 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
7082 self.coin_type.as_mut().map(|field| field as _)
7083 }
7084 pub fn coin_type_mut(&mut self) -> &mut String {
7087 self.coin_type.get_or_insert_default()
7088 }
7089 pub fn coin_type_opt(&self) -> Option<&str> {
7091 self.coin_type.as_ref().map(|field| field as _)
7092 }
7093 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
7095 self.coin_type = Some(field.into().into());
7096 }
7097 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
7099 self.set_coin_type(field.into());
7100 self
7101 }
7102 }
7103 impl super::GetCoinInfoResponse {
7104 pub const fn const_default() -> Self {
7105 Self {
7106 coin_type: None,
7107 metadata: None,
7108 treasury: None,
7109 regulated_metadata: None,
7110 }
7111 }
7112 #[doc(hidden)]
7113 pub fn default_instance() -> &'static Self {
7114 static DEFAULT: super::GetCoinInfoResponse = super::GetCoinInfoResponse::const_default();
7115 &DEFAULT
7116 }
7117 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
7119 self.coin_type.as_mut().map(|field| field as _)
7120 }
7121 pub fn coin_type_mut(&mut self) -> &mut String {
7124 self.coin_type.get_or_insert_default()
7125 }
7126 pub fn coin_type_opt(&self) -> Option<&str> {
7128 self.coin_type.as_ref().map(|field| field as _)
7129 }
7130 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
7132 self.coin_type = Some(field.into().into());
7133 }
7134 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
7136 self.set_coin_type(field.into());
7137 self
7138 }
7139 pub fn metadata(&self) -> &super::CoinMetadata {
7141 self.metadata
7142 .as_ref()
7143 .map(|field| field as _)
7144 .unwrap_or_else(|| super::CoinMetadata::default_instance() as _)
7145 }
7146 pub fn metadata_opt_mut(&mut self) -> Option<&mut super::CoinMetadata> {
7148 self.metadata.as_mut().map(|field| field as _)
7149 }
7150 pub fn metadata_mut(&mut self) -> &mut super::CoinMetadata {
7153 self.metadata.get_or_insert_default()
7154 }
7155 pub fn metadata_opt(&self) -> Option<&super::CoinMetadata> {
7157 self.metadata.as_ref().map(|field| field as _)
7158 }
7159 pub fn set_metadata<T: Into<super::CoinMetadata>>(&mut self, field: T) {
7161 self.metadata = Some(field.into().into());
7162 }
7163 pub fn with_metadata<T: Into<super::CoinMetadata>>(mut self, field: T) -> Self {
7165 self.set_metadata(field.into());
7166 self
7167 }
7168 pub fn treasury(&self) -> &super::CoinTreasury {
7170 self.treasury
7171 .as_ref()
7172 .map(|field| field as _)
7173 .unwrap_or_else(|| super::CoinTreasury::default_instance() as _)
7174 }
7175 pub fn treasury_opt_mut(&mut self) -> Option<&mut super::CoinTreasury> {
7177 self.treasury.as_mut().map(|field| field as _)
7178 }
7179 pub fn treasury_mut(&mut self) -> &mut super::CoinTreasury {
7182 self.treasury.get_or_insert_default()
7183 }
7184 pub fn treasury_opt(&self) -> Option<&super::CoinTreasury> {
7186 self.treasury.as_ref().map(|field| field as _)
7187 }
7188 pub fn set_treasury<T: Into<super::CoinTreasury>>(&mut self, field: T) {
7190 self.treasury = Some(field.into().into());
7191 }
7192 pub fn with_treasury<T: Into<super::CoinTreasury>>(mut self, field: T) -> Self {
7194 self.set_treasury(field.into());
7195 self
7196 }
7197 pub fn regulated_metadata(&self) -> &super::RegulatedCoinMetadata {
7199 self.regulated_metadata
7200 .as_ref()
7201 .map(|field| field as _)
7202 .unwrap_or_else(|| super::RegulatedCoinMetadata::default_instance() as _)
7203 }
7204 pub fn regulated_metadata_opt_mut(
7206 &mut self,
7207 ) -> Option<&mut super::RegulatedCoinMetadata> {
7208 self.regulated_metadata.as_mut().map(|field| field as _)
7209 }
7210 pub fn regulated_metadata_mut(&mut self) -> &mut super::RegulatedCoinMetadata {
7213 self.regulated_metadata.get_or_insert_default()
7214 }
7215 pub fn regulated_metadata_opt(&self) -> Option<&super::RegulatedCoinMetadata> {
7217 self.regulated_metadata.as_ref().map(|field| field as _)
7218 }
7219 pub fn set_regulated_metadata<T: Into<super::RegulatedCoinMetadata>>(
7221 &mut self,
7222 field: T,
7223 ) {
7224 self.regulated_metadata = Some(field.into().into());
7225 }
7226 pub fn with_regulated_metadata<T: Into<super::RegulatedCoinMetadata>>(
7228 mut self,
7229 field: T,
7230 ) -> Self {
7231 self.set_regulated_metadata(field.into());
7232 self
7233 }
7234 }
7235 impl super::GetDatatypeRequest {
7236 pub const fn const_default() -> Self {
7237 Self {
7238 package_id: None,
7239 module_name: None,
7240 name: None,
7241 }
7242 }
7243 #[doc(hidden)]
7244 pub fn default_instance() -> &'static Self {
7245 static DEFAULT: super::GetDatatypeRequest = super::GetDatatypeRequest::const_default();
7246 &DEFAULT
7247 }
7248 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
7250 self.package_id.as_mut().map(|field| field as _)
7251 }
7252 pub fn package_id_mut(&mut self) -> &mut String {
7255 self.package_id.get_or_insert_default()
7256 }
7257 pub fn package_id_opt(&self) -> Option<&str> {
7259 self.package_id.as_ref().map(|field| field as _)
7260 }
7261 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
7263 self.package_id = Some(field.into().into());
7264 }
7265 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
7267 self.set_package_id(field.into());
7268 self
7269 }
7270 pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
7272 self.module_name.as_mut().map(|field| field as _)
7273 }
7274 pub fn module_name_mut(&mut self) -> &mut String {
7277 self.module_name.get_or_insert_default()
7278 }
7279 pub fn module_name_opt(&self) -> Option<&str> {
7281 self.module_name.as_ref().map(|field| field as _)
7282 }
7283 pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
7285 self.module_name = Some(field.into().into());
7286 }
7287 pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
7289 self.set_module_name(field.into());
7290 self
7291 }
7292 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
7294 self.name.as_mut().map(|field| field as _)
7295 }
7296 pub fn name_mut(&mut self) -> &mut String {
7299 self.name.get_or_insert_default()
7300 }
7301 pub fn name_opt(&self) -> Option<&str> {
7303 self.name.as_ref().map(|field| field as _)
7304 }
7305 pub fn set_name<T: Into<String>>(&mut self, field: T) {
7307 self.name = Some(field.into().into());
7308 }
7309 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
7311 self.set_name(field.into());
7312 self
7313 }
7314 }
7315 impl super::GetDatatypeResponse {
7316 pub const fn const_default() -> Self {
7317 Self { datatype: None }
7318 }
7319 #[doc(hidden)]
7320 pub fn default_instance() -> &'static Self {
7321 static DEFAULT: super::GetDatatypeResponse = super::GetDatatypeResponse::const_default();
7322 &DEFAULT
7323 }
7324 pub fn datatype(&self) -> &super::DatatypeDescriptor {
7326 self.datatype
7327 .as_ref()
7328 .map(|field| field as _)
7329 .unwrap_or_else(|| super::DatatypeDescriptor::default_instance() as _)
7330 }
7331 pub fn datatype_opt_mut(&mut self) -> Option<&mut super::DatatypeDescriptor> {
7333 self.datatype.as_mut().map(|field| field as _)
7334 }
7335 pub fn datatype_mut(&mut self) -> &mut super::DatatypeDescriptor {
7338 self.datatype.get_or_insert_default()
7339 }
7340 pub fn datatype_opt(&self) -> Option<&super::DatatypeDescriptor> {
7342 self.datatype.as_ref().map(|field| field as _)
7343 }
7344 pub fn set_datatype<T: Into<super::DatatypeDescriptor>>(&mut self, field: T) {
7346 self.datatype = Some(field.into().into());
7347 }
7348 pub fn with_datatype<T: Into<super::DatatypeDescriptor>>(
7350 mut self,
7351 field: T,
7352 ) -> Self {
7353 self.set_datatype(field.into());
7354 self
7355 }
7356 }
7357 impl super::GetEpochRequest {
7358 pub const fn const_default() -> Self {
7359 Self {
7360 epoch: None,
7361 read_mask: None,
7362 }
7363 }
7364 #[doc(hidden)]
7365 pub fn default_instance() -> &'static Self {
7366 static DEFAULT: super::GetEpochRequest = super::GetEpochRequest::const_default();
7367 &DEFAULT
7368 }
7369 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
7371 self.epoch.as_mut().map(|field| field as _)
7372 }
7373 pub fn epoch_mut(&mut self) -> &mut u64 {
7376 self.epoch.get_or_insert_default()
7377 }
7378 pub fn epoch_opt(&self) -> Option<u64> {
7380 self.epoch.as_ref().map(|field| *field)
7381 }
7382 pub fn set_epoch(&mut self, field: u64) {
7384 self.epoch = Some(field);
7385 }
7386 pub fn with_epoch(mut self, field: u64) -> Self {
7388 self.set_epoch(field);
7389 self
7390 }
7391 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
7393 self.read_mask.as_mut().map(|field| field as _)
7394 }
7395 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
7398 self.read_mask.get_or_insert_default()
7399 }
7400 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
7402 self.read_mask.as_ref().map(|field| field as _)
7403 }
7404 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
7406 self.read_mask = Some(field.into().into());
7407 }
7408 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
7410 mut self,
7411 field: T,
7412 ) -> Self {
7413 self.set_read_mask(field.into());
7414 self
7415 }
7416 }
7417 impl super::GetEpochResponse {
7418 pub const fn const_default() -> Self {
7419 Self { epoch: None }
7420 }
7421 #[doc(hidden)]
7422 pub fn default_instance() -> &'static Self {
7423 static DEFAULT: super::GetEpochResponse = super::GetEpochResponse::const_default();
7424 &DEFAULT
7425 }
7426 pub fn epoch(&self) -> &super::Epoch {
7428 self.epoch
7429 .as_ref()
7430 .map(|field| field as _)
7431 .unwrap_or_else(|| super::Epoch::default_instance() as _)
7432 }
7433 pub fn epoch_opt_mut(&mut self) -> Option<&mut super::Epoch> {
7435 self.epoch.as_mut().map(|field| field as _)
7436 }
7437 pub fn epoch_mut(&mut self) -> &mut super::Epoch {
7440 self.epoch.get_or_insert_default()
7441 }
7442 pub fn epoch_opt(&self) -> Option<&super::Epoch> {
7444 self.epoch.as_ref().map(|field| field as _)
7445 }
7446 pub fn set_epoch<T: Into<super::Epoch>>(&mut self, field: T) {
7448 self.epoch = Some(field.into().into());
7449 }
7450 pub fn with_epoch<T: Into<super::Epoch>>(mut self, field: T) -> Self {
7452 self.set_epoch(field.into());
7453 self
7454 }
7455 }
7456 impl super::GetFunctionRequest {
7457 pub const fn const_default() -> Self {
7458 Self {
7459 package_id: None,
7460 module_name: None,
7461 name: None,
7462 }
7463 }
7464 #[doc(hidden)]
7465 pub fn default_instance() -> &'static Self {
7466 static DEFAULT: super::GetFunctionRequest = super::GetFunctionRequest::const_default();
7467 &DEFAULT
7468 }
7469 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
7471 self.package_id.as_mut().map(|field| field as _)
7472 }
7473 pub fn package_id_mut(&mut self) -> &mut String {
7476 self.package_id.get_or_insert_default()
7477 }
7478 pub fn package_id_opt(&self) -> Option<&str> {
7480 self.package_id.as_ref().map(|field| field as _)
7481 }
7482 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
7484 self.package_id = Some(field.into().into());
7485 }
7486 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
7488 self.set_package_id(field.into());
7489 self
7490 }
7491 pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
7493 self.module_name.as_mut().map(|field| field as _)
7494 }
7495 pub fn module_name_mut(&mut self) -> &mut String {
7498 self.module_name.get_or_insert_default()
7499 }
7500 pub fn module_name_opt(&self) -> Option<&str> {
7502 self.module_name.as_ref().map(|field| field as _)
7503 }
7504 pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
7506 self.module_name = Some(field.into().into());
7507 }
7508 pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
7510 self.set_module_name(field.into());
7511 self
7512 }
7513 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
7515 self.name.as_mut().map(|field| field as _)
7516 }
7517 pub fn name_mut(&mut self) -> &mut String {
7520 self.name.get_or_insert_default()
7521 }
7522 pub fn name_opt(&self) -> Option<&str> {
7524 self.name.as_ref().map(|field| field as _)
7525 }
7526 pub fn set_name<T: Into<String>>(&mut self, field: T) {
7528 self.name = Some(field.into().into());
7529 }
7530 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
7532 self.set_name(field.into());
7533 self
7534 }
7535 }
7536 impl super::GetFunctionResponse {
7537 pub const fn const_default() -> Self {
7538 Self { function: None }
7539 }
7540 #[doc(hidden)]
7541 pub fn default_instance() -> &'static Self {
7542 static DEFAULT: super::GetFunctionResponse = super::GetFunctionResponse::const_default();
7543 &DEFAULT
7544 }
7545 pub fn function(&self) -> &super::FunctionDescriptor {
7547 self.function
7548 .as_ref()
7549 .map(|field| field as _)
7550 .unwrap_or_else(|| super::FunctionDescriptor::default_instance() as _)
7551 }
7552 pub fn function_opt_mut(&mut self) -> Option<&mut super::FunctionDescriptor> {
7554 self.function.as_mut().map(|field| field as _)
7555 }
7556 pub fn function_mut(&mut self) -> &mut super::FunctionDescriptor {
7559 self.function.get_or_insert_default()
7560 }
7561 pub fn function_opt(&self) -> Option<&super::FunctionDescriptor> {
7563 self.function.as_ref().map(|field| field as _)
7564 }
7565 pub fn set_function<T: Into<super::FunctionDescriptor>>(&mut self, field: T) {
7567 self.function = Some(field.into().into());
7568 }
7569 pub fn with_function<T: Into<super::FunctionDescriptor>>(
7571 mut self,
7572 field: T,
7573 ) -> Self {
7574 self.set_function(field.into());
7575 self
7576 }
7577 }
7578 impl super::GetObjectRequest {
7579 pub const fn const_default() -> Self {
7580 Self {
7581 object_id: None,
7582 version: None,
7583 read_mask: None,
7584 }
7585 }
7586 #[doc(hidden)]
7587 pub fn default_instance() -> &'static Self {
7588 static DEFAULT: super::GetObjectRequest = super::GetObjectRequest::const_default();
7589 &DEFAULT
7590 }
7591 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
7593 self.object_id.as_mut().map(|field| field as _)
7594 }
7595 pub fn object_id_mut(&mut self) -> &mut String {
7598 self.object_id.get_or_insert_default()
7599 }
7600 pub fn object_id_opt(&self) -> Option<&str> {
7602 self.object_id.as_ref().map(|field| field as _)
7603 }
7604 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
7606 self.object_id = Some(field.into().into());
7607 }
7608 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
7610 self.set_object_id(field.into());
7611 self
7612 }
7613 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
7615 self.version.as_mut().map(|field| field as _)
7616 }
7617 pub fn version_mut(&mut self) -> &mut u64 {
7620 self.version.get_or_insert_default()
7621 }
7622 pub fn version_opt(&self) -> Option<u64> {
7624 self.version.as_ref().map(|field| *field)
7625 }
7626 pub fn set_version(&mut self, field: u64) {
7628 self.version = Some(field);
7629 }
7630 pub fn with_version(mut self, field: u64) -> Self {
7632 self.set_version(field);
7633 self
7634 }
7635 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
7637 self.read_mask.as_mut().map(|field| field as _)
7638 }
7639 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
7642 self.read_mask.get_or_insert_default()
7643 }
7644 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
7646 self.read_mask.as_ref().map(|field| field as _)
7647 }
7648 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
7650 self.read_mask = Some(field.into().into());
7651 }
7652 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
7654 mut self,
7655 field: T,
7656 ) -> Self {
7657 self.set_read_mask(field.into());
7658 self
7659 }
7660 }
7661 impl super::GetObjectResponse {
7662 pub const fn const_default() -> Self {
7663 Self { object: None }
7664 }
7665 #[doc(hidden)]
7666 pub fn default_instance() -> &'static Self {
7667 static DEFAULT: super::GetObjectResponse = super::GetObjectResponse::const_default();
7668 &DEFAULT
7669 }
7670 pub fn object(&self) -> &super::Object {
7672 self.object
7673 .as_ref()
7674 .map(|field| field as _)
7675 .unwrap_or_else(|| super::Object::default_instance() as _)
7676 }
7677 pub fn object_opt_mut(&mut self) -> Option<&mut super::Object> {
7679 self.object.as_mut().map(|field| field as _)
7680 }
7681 pub fn object_mut(&mut self) -> &mut super::Object {
7684 self.object.get_or_insert_default()
7685 }
7686 pub fn object_opt(&self) -> Option<&super::Object> {
7688 self.object.as_ref().map(|field| field as _)
7689 }
7690 pub fn set_object<T: Into<super::Object>>(&mut self, field: T) {
7692 self.object = Some(field.into().into());
7693 }
7694 pub fn with_object<T: Into<super::Object>>(mut self, field: T) -> Self {
7696 self.set_object(field.into());
7697 self
7698 }
7699 }
7700 impl super::GetObjectResult {
7701 pub const fn const_default() -> Self {
7702 Self { result: None }
7703 }
7704 #[doc(hidden)]
7705 pub fn default_instance() -> &'static Self {
7706 static DEFAULT: super::GetObjectResult = super::GetObjectResult::const_default();
7707 &DEFAULT
7708 }
7709 pub fn object(&self) -> &super::Object {
7711 if let Some(super::get_object_result::Result::Object(field)) = &self.result {
7712 field as _
7713 } else {
7714 super::Object::default_instance() as _
7715 }
7716 }
7717 pub fn object_opt(&self) -> Option<&super::Object> {
7719 if let Some(super::get_object_result::Result::Object(field)) = &self.result {
7720 Some(field as _)
7721 } else {
7722 None
7723 }
7724 }
7725 pub fn object_opt_mut(&mut self) -> Option<&mut super::Object> {
7727 if let Some(super::get_object_result::Result::Object(field)) = &mut self
7728 .result
7729 {
7730 Some(field as _)
7731 } else {
7732 None
7733 }
7734 }
7735 pub fn object_mut(&mut self) -> &mut super::Object {
7739 if self.object_opt_mut().is_none() {
7740 self.result = Some(
7741 super::get_object_result::Result::Object(super::Object::default()),
7742 );
7743 }
7744 self.object_opt_mut().unwrap()
7745 }
7746 pub fn set_object<T: Into<super::Object>>(&mut self, field: T) {
7749 self.result = Some(
7750 super::get_object_result::Result::Object(field.into().into()),
7751 );
7752 }
7753 pub fn with_object<T: Into<super::Object>>(mut self, field: T) -> Self {
7756 self.set_object(field.into());
7757 self
7758 }
7759 pub fn error(&self) -> &super::super::super::super::google::rpc::Status {
7761 if let Some(super::get_object_result::Result::Error(field)) = &self.result {
7762 field as _
7763 } else {
7764 super::super::super::super::google::rpc::Status::default_instance() as _
7765 }
7766 }
7767 pub fn error_opt(
7769 &self,
7770 ) -> Option<&super::super::super::super::google::rpc::Status> {
7771 if let Some(super::get_object_result::Result::Error(field)) = &self.result {
7772 Some(field as _)
7773 } else {
7774 None
7775 }
7776 }
7777 pub fn error_opt_mut(
7779 &mut self,
7780 ) -> Option<&mut super::super::super::super::google::rpc::Status> {
7781 if let Some(super::get_object_result::Result::Error(field)) = &mut self
7782 .result
7783 {
7784 Some(field as _)
7785 } else {
7786 None
7787 }
7788 }
7789 pub fn error_mut(
7793 &mut self,
7794 ) -> &mut super::super::super::super::google::rpc::Status {
7795 if self.error_opt_mut().is_none() {
7796 self.result = Some(
7797 super::get_object_result::Result::Error(
7798 super::super::super::super::google::rpc::Status::default(),
7799 ),
7800 );
7801 }
7802 self.error_opt_mut().unwrap()
7803 }
7804 pub fn set_error<T: Into<super::super::super::super::google::rpc::Status>>(
7807 &mut self,
7808 field: T,
7809 ) {
7810 self.result = Some(
7811 super::get_object_result::Result::Error(field.into().into()),
7812 );
7813 }
7814 pub fn with_error<T: Into<super::super::super::super::google::rpc::Status>>(
7817 mut self,
7818 field: T,
7819 ) -> Self {
7820 self.set_error(field.into());
7821 self
7822 }
7823 }
7824 impl super::GetPackageRequest {
7825 pub const fn const_default() -> Self {
7826 Self { package_id: None }
7827 }
7828 #[doc(hidden)]
7829 pub fn default_instance() -> &'static Self {
7830 static DEFAULT: super::GetPackageRequest = super::GetPackageRequest::const_default();
7831 &DEFAULT
7832 }
7833 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
7835 self.package_id.as_mut().map(|field| field as _)
7836 }
7837 pub fn package_id_mut(&mut self) -> &mut String {
7840 self.package_id.get_or_insert_default()
7841 }
7842 pub fn package_id_opt(&self) -> Option<&str> {
7844 self.package_id.as_ref().map(|field| field as _)
7845 }
7846 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
7848 self.package_id = Some(field.into().into());
7849 }
7850 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
7852 self.set_package_id(field.into());
7853 self
7854 }
7855 }
7856 impl super::GetPackageResponse {
7857 pub const fn const_default() -> Self {
7858 Self { package: None }
7859 }
7860 #[doc(hidden)]
7861 pub fn default_instance() -> &'static Self {
7862 static DEFAULT: super::GetPackageResponse = super::GetPackageResponse::const_default();
7863 &DEFAULT
7864 }
7865 pub fn package(&self) -> &super::Package {
7867 self.package
7868 .as_ref()
7869 .map(|field| field as _)
7870 .unwrap_or_else(|| super::Package::default_instance() as _)
7871 }
7872 pub fn package_opt_mut(&mut self) -> Option<&mut super::Package> {
7874 self.package.as_mut().map(|field| field as _)
7875 }
7876 pub fn package_mut(&mut self) -> &mut super::Package {
7879 self.package.get_or_insert_default()
7880 }
7881 pub fn package_opt(&self) -> Option<&super::Package> {
7883 self.package.as_ref().map(|field| field as _)
7884 }
7885 pub fn set_package<T: Into<super::Package>>(&mut self, field: T) {
7887 self.package = Some(field.into().into());
7888 }
7889 pub fn with_package<T: Into<super::Package>>(mut self, field: T) -> Self {
7891 self.set_package(field.into());
7892 self
7893 }
7894 }
7895 impl super::GetServiceInfoRequest {
7896 pub const fn const_default() -> Self {
7897 Self {}
7898 }
7899 #[doc(hidden)]
7900 pub fn default_instance() -> &'static Self {
7901 static DEFAULT: super::GetServiceInfoRequest = super::GetServiceInfoRequest::const_default();
7902 &DEFAULT
7903 }
7904 }
7905 impl super::GetServiceInfoResponse {
7906 pub const fn const_default() -> Self {
7907 Self {
7908 chain_id: None,
7909 chain: None,
7910 epoch: None,
7911 checkpoint_height: None,
7912 timestamp: None,
7913 lowest_available_checkpoint: None,
7914 lowest_available_checkpoint_objects: None,
7915 server: None,
7916 }
7917 }
7918 #[doc(hidden)]
7919 pub fn default_instance() -> &'static Self {
7920 static DEFAULT: super::GetServiceInfoResponse = super::GetServiceInfoResponse::const_default();
7921 &DEFAULT
7922 }
7923 pub fn chain_id_opt_mut(&mut self) -> Option<&mut String> {
7925 self.chain_id.as_mut().map(|field| field as _)
7926 }
7927 pub fn chain_id_mut(&mut self) -> &mut String {
7930 self.chain_id.get_or_insert_default()
7931 }
7932 pub fn chain_id_opt(&self) -> Option<&str> {
7934 self.chain_id.as_ref().map(|field| field as _)
7935 }
7936 pub fn set_chain_id<T: Into<String>>(&mut self, field: T) {
7938 self.chain_id = Some(field.into().into());
7939 }
7940 pub fn with_chain_id<T: Into<String>>(mut self, field: T) -> Self {
7942 self.set_chain_id(field.into());
7943 self
7944 }
7945 pub fn chain_opt_mut(&mut self) -> Option<&mut String> {
7947 self.chain.as_mut().map(|field| field as _)
7948 }
7949 pub fn chain_mut(&mut self) -> &mut String {
7952 self.chain.get_or_insert_default()
7953 }
7954 pub fn chain_opt(&self) -> Option<&str> {
7956 self.chain.as_ref().map(|field| field as _)
7957 }
7958 pub fn set_chain<T: Into<String>>(&mut self, field: T) {
7960 self.chain = Some(field.into().into());
7961 }
7962 pub fn with_chain<T: Into<String>>(mut self, field: T) -> Self {
7964 self.set_chain(field.into());
7965 self
7966 }
7967 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
7969 self.epoch.as_mut().map(|field| field as _)
7970 }
7971 pub fn epoch_mut(&mut self) -> &mut u64 {
7974 self.epoch.get_or_insert_default()
7975 }
7976 pub fn epoch_opt(&self) -> Option<u64> {
7978 self.epoch.as_ref().map(|field| *field)
7979 }
7980 pub fn set_epoch(&mut self, field: u64) {
7982 self.epoch = Some(field);
7983 }
7984 pub fn with_epoch(mut self, field: u64) -> Self {
7986 self.set_epoch(field);
7987 self
7988 }
7989 pub fn checkpoint_height_opt_mut(&mut self) -> Option<&mut u64> {
7991 self.checkpoint_height.as_mut().map(|field| field as _)
7992 }
7993 pub fn checkpoint_height_mut(&mut self) -> &mut u64 {
7996 self.checkpoint_height.get_or_insert_default()
7997 }
7998 pub fn checkpoint_height_opt(&self) -> Option<u64> {
8000 self.checkpoint_height.as_ref().map(|field| *field)
8001 }
8002 pub fn set_checkpoint_height(&mut self, field: u64) {
8004 self.checkpoint_height = Some(field);
8005 }
8006 pub fn with_checkpoint_height(mut self, field: u64) -> Self {
8008 self.set_checkpoint_height(field);
8009 self
8010 }
8011 pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
8013 self.timestamp.as_mut().map(|field| field as _)
8014 }
8015 pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
8018 self.timestamp.get_or_insert_default()
8019 }
8020 pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
8022 self.timestamp.as_ref().map(|field| field as _)
8023 }
8024 pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
8026 self.timestamp = Some(field.into().into());
8027 }
8028 pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
8030 mut self,
8031 field: T,
8032 ) -> Self {
8033 self.set_timestamp(field.into());
8034 self
8035 }
8036 pub fn lowest_available_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
8038 self.lowest_available_checkpoint.as_mut().map(|field| field as _)
8039 }
8040 pub fn lowest_available_checkpoint_mut(&mut self) -> &mut u64 {
8043 self.lowest_available_checkpoint.get_or_insert_default()
8044 }
8045 pub fn lowest_available_checkpoint_opt(&self) -> Option<u64> {
8047 self.lowest_available_checkpoint.as_ref().map(|field| *field)
8048 }
8049 pub fn set_lowest_available_checkpoint(&mut self, field: u64) {
8051 self.lowest_available_checkpoint = Some(field);
8052 }
8053 pub fn with_lowest_available_checkpoint(mut self, field: u64) -> Self {
8055 self.set_lowest_available_checkpoint(field);
8056 self
8057 }
8058 pub fn lowest_available_checkpoint_objects_opt_mut(
8060 &mut self,
8061 ) -> Option<&mut u64> {
8062 self.lowest_available_checkpoint_objects.as_mut().map(|field| field as _)
8063 }
8064 pub fn lowest_available_checkpoint_objects_mut(&mut self) -> &mut u64 {
8067 self.lowest_available_checkpoint_objects.get_or_insert_default()
8068 }
8069 pub fn lowest_available_checkpoint_objects_opt(&self) -> Option<u64> {
8071 self.lowest_available_checkpoint_objects.as_ref().map(|field| *field)
8072 }
8073 pub fn set_lowest_available_checkpoint_objects(&mut self, field: u64) {
8075 self.lowest_available_checkpoint_objects = Some(field);
8076 }
8077 pub fn with_lowest_available_checkpoint_objects(mut self, field: u64) -> Self {
8079 self.set_lowest_available_checkpoint_objects(field);
8080 self
8081 }
8082 pub fn server_opt_mut(&mut self) -> Option<&mut String> {
8084 self.server.as_mut().map(|field| field as _)
8085 }
8086 pub fn server_mut(&mut self) -> &mut String {
8089 self.server.get_or_insert_default()
8090 }
8091 pub fn server_opt(&self) -> Option<&str> {
8093 self.server.as_ref().map(|field| field as _)
8094 }
8095 pub fn set_server<T: Into<String>>(&mut self, field: T) {
8097 self.server = Some(field.into().into());
8098 }
8099 pub fn with_server<T: Into<String>>(mut self, field: T) -> Self {
8101 self.set_server(field.into());
8102 self
8103 }
8104 }
8105 impl super::GetTransactionRequest {
8106 pub const fn const_default() -> Self {
8107 Self {
8108 digest: None,
8109 read_mask: None,
8110 }
8111 }
8112 #[doc(hidden)]
8113 pub fn default_instance() -> &'static Self {
8114 static DEFAULT: super::GetTransactionRequest = super::GetTransactionRequest::const_default();
8115 &DEFAULT
8116 }
8117 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
8119 self.digest.as_mut().map(|field| field as _)
8120 }
8121 pub fn digest_mut(&mut self) -> &mut String {
8124 self.digest.get_or_insert_default()
8125 }
8126 pub fn digest_opt(&self) -> Option<&str> {
8128 self.digest.as_ref().map(|field| field as _)
8129 }
8130 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
8132 self.digest = Some(field.into().into());
8133 }
8134 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
8136 self.set_digest(field.into());
8137 self
8138 }
8139 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
8141 self.read_mask.as_mut().map(|field| field as _)
8142 }
8143 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
8146 self.read_mask.get_or_insert_default()
8147 }
8148 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
8150 self.read_mask.as_ref().map(|field| field as _)
8151 }
8152 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
8154 self.read_mask = Some(field.into().into());
8155 }
8156 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
8158 mut self,
8159 field: T,
8160 ) -> Self {
8161 self.set_read_mask(field.into());
8162 self
8163 }
8164 }
8165 impl super::GetTransactionResponse {
8166 pub const fn const_default() -> Self {
8167 Self { transaction: None }
8168 }
8169 #[doc(hidden)]
8170 pub fn default_instance() -> &'static Self {
8171 static DEFAULT: super::GetTransactionResponse = super::GetTransactionResponse::const_default();
8172 &DEFAULT
8173 }
8174 pub fn transaction(&self) -> &super::ExecutedTransaction {
8176 self.transaction
8177 .as_ref()
8178 .map(|field| field as _)
8179 .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
8180 }
8181 pub fn transaction_opt_mut(
8183 &mut self,
8184 ) -> Option<&mut super::ExecutedTransaction> {
8185 self.transaction.as_mut().map(|field| field as _)
8186 }
8187 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
8190 self.transaction.get_or_insert_default()
8191 }
8192 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
8194 self.transaction.as_ref().map(|field| field as _)
8195 }
8196 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
8198 &mut self,
8199 field: T,
8200 ) {
8201 self.transaction = Some(field.into().into());
8202 }
8203 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
8205 mut self,
8206 field: T,
8207 ) -> Self {
8208 self.set_transaction(field.into());
8209 self
8210 }
8211 }
8212 impl super::GetTransactionResult {
8213 pub const fn const_default() -> Self {
8214 Self { result: None }
8215 }
8216 #[doc(hidden)]
8217 pub fn default_instance() -> &'static Self {
8218 static DEFAULT: super::GetTransactionResult = super::GetTransactionResult::const_default();
8219 &DEFAULT
8220 }
8221 pub fn transaction(&self) -> &super::ExecutedTransaction {
8223 if let Some(super::get_transaction_result::Result::Transaction(field)) = &self
8224 .result
8225 {
8226 field as _
8227 } else {
8228 super::ExecutedTransaction::default_instance() as _
8229 }
8230 }
8231 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
8233 if let Some(super::get_transaction_result::Result::Transaction(field)) = &self
8234 .result
8235 {
8236 Some(field as _)
8237 } else {
8238 None
8239 }
8240 }
8241 pub fn transaction_opt_mut(
8243 &mut self,
8244 ) -> Option<&mut super::ExecutedTransaction> {
8245 if let Some(super::get_transaction_result::Result::Transaction(field)) = &mut self
8246 .result
8247 {
8248 Some(field as _)
8249 } else {
8250 None
8251 }
8252 }
8253 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
8257 if self.transaction_opt_mut().is_none() {
8258 self.result = Some(
8259 super::get_transaction_result::Result::Transaction(
8260 super::ExecutedTransaction::default(),
8261 ),
8262 );
8263 }
8264 self.transaction_opt_mut().unwrap()
8265 }
8266 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
8269 &mut self,
8270 field: T,
8271 ) {
8272 self.result = Some(
8273 super::get_transaction_result::Result::Transaction(field.into().into()),
8274 );
8275 }
8276 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
8279 mut self,
8280 field: T,
8281 ) -> Self {
8282 self.set_transaction(field.into());
8283 self
8284 }
8285 pub fn error(&self) -> &super::super::super::super::google::rpc::Status {
8287 if let Some(super::get_transaction_result::Result::Error(field)) = &self
8288 .result
8289 {
8290 field as _
8291 } else {
8292 super::super::super::super::google::rpc::Status::default_instance() as _
8293 }
8294 }
8295 pub fn error_opt(
8297 &self,
8298 ) -> Option<&super::super::super::super::google::rpc::Status> {
8299 if let Some(super::get_transaction_result::Result::Error(field)) = &self
8300 .result
8301 {
8302 Some(field as _)
8303 } else {
8304 None
8305 }
8306 }
8307 pub fn error_opt_mut(
8309 &mut self,
8310 ) -> Option<&mut super::super::super::super::google::rpc::Status> {
8311 if let Some(super::get_transaction_result::Result::Error(field)) = &mut self
8312 .result
8313 {
8314 Some(field as _)
8315 } else {
8316 None
8317 }
8318 }
8319 pub fn error_mut(
8323 &mut self,
8324 ) -> &mut super::super::super::super::google::rpc::Status {
8325 if self.error_opt_mut().is_none() {
8326 self.result = Some(
8327 super::get_transaction_result::Result::Error(
8328 super::super::super::super::google::rpc::Status::default(),
8329 ),
8330 );
8331 }
8332 self.error_opt_mut().unwrap()
8333 }
8334 pub fn set_error<T: Into<super::super::super::super::google::rpc::Status>>(
8337 &mut self,
8338 field: T,
8339 ) {
8340 self.result = Some(
8341 super::get_transaction_result::Result::Error(field.into().into()),
8342 );
8343 }
8344 pub fn with_error<T: Into<super::super::super::super::google::rpc::Status>>(
8347 mut self,
8348 field: T,
8349 ) -> Self {
8350 self.set_error(field.into());
8351 self
8352 }
8353 }
8354 impl super::IndexError {
8355 pub const fn const_default() -> Self {
8356 Self {
8357 index: None,
8358 subresult: None,
8359 }
8360 }
8361 #[doc(hidden)]
8362 pub fn default_instance() -> &'static Self {
8363 static DEFAULT: super::IndexError = super::IndexError::const_default();
8364 &DEFAULT
8365 }
8366 pub fn index_opt_mut(&mut self) -> Option<&mut u32> {
8368 self.index.as_mut().map(|field| field as _)
8369 }
8370 pub fn index_mut(&mut self) -> &mut u32 {
8373 self.index.get_or_insert_default()
8374 }
8375 pub fn index_opt(&self) -> Option<u32> {
8377 self.index.as_ref().map(|field| *field)
8378 }
8379 pub fn set_index(&mut self, field: u32) {
8381 self.index = Some(field);
8382 }
8383 pub fn with_index(mut self, field: u32) -> Self {
8385 self.set_index(field);
8386 self
8387 }
8388 pub fn subresult_opt_mut(&mut self) -> Option<&mut u32> {
8390 self.subresult.as_mut().map(|field| field as _)
8391 }
8392 pub fn subresult_mut(&mut self) -> &mut u32 {
8395 self.subresult.get_or_insert_default()
8396 }
8397 pub fn subresult_opt(&self) -> Option<u32> {
8399 self.subresult.as_ref().map(|field| *field)
8400 }
8401 pub fn set_subresult(&mut self, field: u32) {
8403 self.subresult = Some(field);
8404 }
8405 pub fn with_subresult(mut self, field: u32) -> Self {
8407 self.set_subresult(field);
8408 self
8409 }
8410 }
8411 impl super::Input {
8412 pub const fn const_default() -> Self {
8413 Self {
8414 kind: None,
8415 pure: None,
8416 object_id: None,
8417 version: None,
8418 digest: None,
8419 mutable: None,
8420 mutability: None,
8421 funds_withdrawal: None,
8422 literal: None,
8423 }
8424 }
8425 #[doc(hidden)]
8426 pub fn default_instance() -> &'static Self {
8427 static DEFAULT: super::Input = super::Input::const_default();
8428 &DEFAULT
8429 }
8430 pub fn with_kind<T: Into<super::input::InputKind>>(mut self, field: T) -> Self {
8432 self.set_kind(field.into());
8433 self
8434 }
8435 pub fn pure_opt(&self) -> Option<&[u8]> {
8437 self.pure.as_ref().map(|field| field as _)
8438 }
8439 pub fn set_pure<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
8441 self.pure = Some(field.into().into());
8442 }
8443 pub fn with_pure<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
8445 self.set_pure(field.into());
8446 self
8447 }
8448 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
8450 self.object_id.as_mut().map(|field| field as _)
8451 }
8452 pub fn object_id_mut(&mut self) -> &mut String {
8455 self.object_id.get_or_insert_default()
8456 }
8457 pub fn object_id_opt(&self) -> Option<&str> {
8459 self.object_id.as_ref().map(|field| field as _)
8460 }
8461 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
8463 self.object_id = Some(field.into().into());
8464 }
8465 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
8467 self.set_object_id(field.into());
8468 self
8469 }
8470 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
8472 self.version.as_mut().map(|field| field as _)
8473 }
8474 pub fn version_mut(&mut self) -> &mut u64 {
8477 self.version.get_or_insert_default()
8478 }
8479 pub fn version_opt(&self) -> Option<u64> {
8481 self.version.as_ref().map(|field| *field)
8482 }
8483 pub fn set_version(&mut self, field: u64) {
8485 self.version = Some(field);
8486 }
8487 pub fn with_version(mut self, field: u64) -> Self {
8489 self.set_version(field);
8490 self
8491 }
8492 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
8494 self.digest.as_mut().map(|field| field as _)
8495 }
8496 pub fn digest_mut(&mut self) -> &mut String {
8499 self.digest.get_or_insert_default()
8500 }
8501 pub fn digest_opt(&self) -> Option<&str> {
8503 self.digest.as_ref().map(|field| field as _)
8504 }
8505 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
8507 self.digest = Some(field.into().into());
8508 }
8509 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
8511 self.set_digest(field.into());
8512 self
8513 }
8514 pub fn mutable_opt_mut(&mut self) -> Option<&mut bool> {
8516 self.mutable.as_mut().map(|field| field as _)
8517 }
8518 pub fn mutable_mut(&mut self) -> &mut bool {
8521 self.mutable.get_or_insert_default()
8522 }
8523 pub fn mutable_opt(&self) -> Option<bool> {
8525 self.mutable.as_ref().map(|field| *field)
8526 }
8527 pub fn set_mutable(&mut self, field: bool) {
8529 self.mutable = Some(field);
8530 }
8531 pub fn with_mutable(mut self, field: bool) -> Self {
8533 self.set_mutable(field);
8534 self
8535 }
8536 pub fn with_mutability<T: Into<super::input::Mutability>>(
8538 mut self,
8539 field: T,
8540 ) -> Self {
8541 self.set_mutability(field.into());
8542 self
8543 }
8544 pub fn funds_withdrawal(&self) -> &super::FundsWithdrawal {
8546 self.funds_withdrawal
8547 .as_ref()
8548 .map(|field| field as _)
8549 .unwrap_or_else(|| super::FundsWithdrawal::default_instance() as _)
8550 }
8551 pub fn funds_withdrawal_opt_mut(
8553 &mut self,
8554 ) -> Option<&mut super::FundsWithdrawal> {
8555 self.funds_withdrawal.as_mut().map(|field| field as _)
8556 }
8557 pub fn funds_withdrawal_mut(&mut self) -> &mut super::FundsWithdrawal {
8560 self.funds_withdrawal.get_or_insert_default()
8561 }
8562 pub fn funds_withdrawal_opt(&self) -> Option<&super::FundsWithdrawal> {
8564 self.funds_withdrawal.as_ref().map(|field| field as _)
8565 }
8566 pub fn set_funds_withdrawal<T: Into<super::FundsWithdrawal>>(
8568 &mut self,
8569 field: T,
8570 ) {
8571 self.funds_withdrawal = Some(field.into().into());
8572 }
8573 pub fn with_funds_withdrawal<T: Into<super::FundsWithdrawal>>(
8575 mut self,
8576 field: T,
8577 ) -> Self {
8578 self.set_funds_withdrawal(field.into());
8579 self
8580 }
8581 pub fn literal_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
8583 self.literal.as_mut().map(|field| field as _)
8584 }
8585 pub fn literal_mut(&mut self) -> &mut ::prost_types::Value {
8588 self.literal.get_or_insert_default()
8589 }
8590 pub fn literal_opt(&self) -> Option<&::prost_types::Value> {
8592 self.literal.as_ref().map(|field| field as _)
8593 }
8594 pub fn set_literal<T: Into<::prost_types::Value>>(&mut self, field: T) {
8596 self.literal = Some(field.into().into());
8597 }
8598 pub fn with_literal<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
8600 self.set_literal(field.into());
8601 self
8602 }
8603 }
8604 impl super::Jwk {
8605 pub const fn const_default() -> Self {
8606 Self {
8607 kty: None,
8608 e: None,
8609 n: None,
8610 alg: None,
8611 }
8612 }
8613 #[doc(hidden)]
8614 pub fn default_instance() -> &'static Self {
8615 static DEFAULT: super::Jwk = super::Jwk::const_default();
8616 &DEFAULT
8617 }
8618 pub fn kty_opt_mut(&mut self) -> Option<&mut String> {
8620 self.kty.as_mut().map(|field| field as _)
8621 }
8622 pub fn kty_mut(&mut self) -> &mut String {
8625 self.kty.get_or_insert_default()
8626 }
8627 pub fn kty_opt(&self) -> Option<&str> {
8629 self.kty.as_ref().map(|field| field as _)
8630 }
8631 pub fn set_kty<T: Into<String>>(&mut self, field: T) {
8633 self.kty = Some(field.into().into());
8634 }
8635 pub fn with_kty<T: Into<String>>(mut self, field: T) -> Self {
8637 self.set_kty(field.into());
8638 self
8639 }
8640 pub fn e_opt_mut(&mut self) -> Option<&mut String> {
8642 self.e.as_mut().map(|field| field as _)
8643 }
8644 pub fn e_mut(&mut self) -> &mut String {
8647 self.e.get_or_insert_default()
8648 }
8649 pub fn e_opt(&self) -> Option<&str> {
8651 self.e.as_ref().map(|field| field as _)
8652 }
8653 pub fn set_e<T: Into<String>>(&mut self, field: T) {
8655 self.e = Some(field.into().into());
8656 }
8657 pub fn with_e<T: Into<String>>(mut self, field: T) -> Self {
8659 self.set_e(field.into());
8660 self
8661 }
8662 pub fn n_opt_mut(&mut self) -> Option<&mut String> {
8664 self.n.as_mut().map(|field| field as _)
8665 }
8666 pub fn n_mut(&mut self) -> &mut String {
8669 self.n.get_or_insert_default()
8670 }
8671 pub fn n_opt(&self) -> Option<&str> {
8673 self.n.as_ref().map(|field| field as _)
8674 }
8675 pub fn set_n<T: Into<String>>(&mut self, field: T) {
8677 self.n = Some(field.into().into());
8678 }
8679 pub fn with_n<T: Into<String>>(mut self, field: T) -> Self {
8681 self.set_n(field.into());
8682 self
8683 }
8684 pub fn alg_opt_mut(&mut self) -> Option<&mut String> {
8686 self.alg.as_mut().map(|field| field as _)
8687 }
8688 pub fn alg_mut(&mut self) -> &mut String {
8691 self.alg.get_or_insert_default()
8692 }
8693 pub fn alg_opt(&self) -> Option<&str> {
8695 self.alg.as_ref().map(|field| field as _)
8696 }
8697 pub fn set_alg<T: Into<String>>(&mut self, field: T) {
8699 self.alg = Some(field.into().into());
8700 }
8701 pub fn with_alg<T: Into<String>>(mut self, field: T) -> Self {
8703 self.set_alg(field.into());
8704 self
8705 }
8706 }
8707 impl super::JwkId {
8708 pub const fn const_default() -> Self {
8709 Self { iss: None, kid: None }
8710 }
8711 #[doc(hidden)]
8712 pub fn default_instance() -> &'static Self {
8713 static DEFAULT: super::JwkId = super::JwkId::const_default();
8714 &DEFAULT
8715 }
8716 pub fn iss_opt_mut(&mut self) -> Option<&mut String> {
8718 self.iss.as_mut().map(|field| field as _)
8719 }
8720 pub fn iss_mut(&mut self) -> &mut String {
8723 self.iss.get_or_insert_default()
8724 }
8725 pub fn iss_opt(&self) -> Option<&str> {
8727 self.iss.as_ref().map(|field| field as _)
8728 }
8729 pub fn set_iss<T: Into<String>>(&mut self, field: T) {
8731 self.iss = Some(field.into().into());
8732 }
8733 pub fn with_iss<T: Into<String>>(mut self, field: T) -> Self {
8735 self.set_iss(field.into());
8736 self
8737 }
8738 pub fn kid_opt_mut(&mut self) -> Option<&mut String> {
8740 self.kid.as_mut().map(|field| field as _)
8741 }
8742 pub fn kid_mut(&mut self) -> &mut String {
8745 self.kid.get_or_insert_default()
8746 }
8747 pub fn kid_opt(&self) -> Option<&str> {
8749 self.kid.as_ref().map(|field| field as _)
8750 }
8751 pub fn set_kid<T: Into<String>>(&mut self, field: T) {
8753 self.kid = Some(field.into().into());
8754 }
8755 pub fn with_kid<T: Into<String>>(mut self, field: T) -> Self {
8757 self.set_kid(field.into());
8758 self
8759 }
8760 }
8761 impl super::Linkage {
8762 pub const fn const_default() -> Self {
8763 Self {
8764 original_id: None,
8765 upgraded_id: None,
8766 upgraded_version: None,
8767 }
8768 }
8769 #[doc(hidden)]
8770 pub fn default_instance() -> &'static Self {
8771 static DEFAULT: super::Linkage = super::Linkage::const_default();
8772 &DEFAULT
8773 }
8774 pub fn original_id_opt_mut(&mut self) -> Option<&mut String> {
8776 self.original_id.as_mut().map(|field| field as _)
8777 }
8778 pub fn original_id_mut(&mut self) -> &mut String {
8781 self.original_id.get_or_insert_default()
8782 }
8783 pub fn original_id_opt(&self) -> Option<&str> {
8785 self.original_id.as_ref().map(|field| field as _)
8786 }
8787 pub fn set_original_id<T: Into<String>>(&mut self, field: T) {
8789 self.original_id = Some(field.into().into());
8790 }
8791 pub fn with_original_id<T: Into<String>>(mut self, field: T) -> Self {
8793 self.set_original_id(field.into());
8794 self
8795 }
8796 pub fn upgraded_id_opt_mut(&mut self) -> Option<&mut String> {
8798 self.upgraded_id.as_mut().map(|field| field as _)
8799 }
8800 pub fn upgraded_id_mut(&mut self) -> &mut String {
8803 self.upgraded_id.get_or_insert_default()
8804 }
8805 pub fn upgraded_id_opt(&self) -> Option<&str> {
8807 self.upgraded_id.as_ref().map(|field| field as _)
8808 }
8809 pub fn set_upgraded_id<T: Into<String>>(&mut self, field: T) {
8811 self.upgraded_id = Some(field.into().into());
8812 }
8813 pub fn with_upgraded_id<T: Into<String>>(mut self, field: T) -> Self {
8815 self.set_upgraded_id(field.into());
8816 self
8817 }
8818 pub fn upgraded_version_opt_mut(&mut self) -> Option<&mut u64> {
8820 self.upgraded_version.as_mut().map(|field| field as _)
8821 }
8822 pub fn upgraded_version_mut(&mut self) -> &mut u64 {
8825 self.upgraded_version.get_or_insert_default()
8826 }
8827 pub fn upgraded_version_opt(&self) -> Option<u64> {
8829 self.upgraded_version.as_ref().map(|field| *field)
8830 }
8831 pub fn set_upgraded_version(&mut self, field: u64) {
8833 self.upgraded_version = Some(field);
8834 }
8835 pub fn with_upgraded_version(mut self, field: u64) -> Self {
8837 self.set_upgraded_version(field);
8838 self
8839 }
8840 }
8841 impl super::ListBalancesRequest {
8842 pub const fn const_default() -> Self {
8843 Self {
8844 owner: None,
8845 page_size: None,
8846 page_token: None,
8847 }
8848 }
8849 #[doc(hidden)]
8850 pub fn default_instance() -> &'static Self {
8851 static DEFAULT: super::ListBalancesRequest = super::ListBalancesRequest::const_default();
8852 &DEFAULT
8853 }
8854 pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
8856 self.owner.as_mut().map(|field| field as _)
8857 }
8858 pub fn owner_mut(&mut self) -> &mut String {
8861 self.owner.get_or_insert_default()
8862 }
8863 pub fn owner_opt(&self) -> Option<&str> {
8865 self.owner.as_ref().map(|field| field as _)
8866 }
8867 pub fn set_owner<T: Into<String>>(&mut self, field: T) {
8869 self.owner = Some(field.into().into());
8870 }
8871 pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
8873 self.set_owner(field.into());
8874 self
8875 }
8876 pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
8878 self.page_size.as_mut().map(|field| field as _)
8879 }
8880 pub fn page_size_mut(&mut self) -> &mut u32 {
8883 self.page_size.get_or_insert_default()
8884 }
8885 pub fn page_size_opt(&self) -> Option<u32> {
8887 self.page_size.as_ref().map(|field| *field)
8888 }
8889 pub fn set_page_size(&mut self, field: u32) {
8891 self.page_size = Some(field);
8892 }
8893 pub fn with_page_size(mut self, field: u32) -> Self {
8895 self.set_page_size(field);
8896 self
8897 }
8898 pub fn page_token_opt(&self) -> Option<&[u8]> {
8900 self.page_token.as_ref().map(|field| field as _)
8901 }
8902 pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
8904 self.page_token = Some(field.into().into());
8905 }
8906 pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
8908 mut self,
8909 field: T,
8910 ) -> Self {
8911 self.set_page_token(field.into());
8912 self
8913 }
8914 }
8915 impl super::ListBalancesResponse {
8916 pub const fn const_default() -> Self {
8917 Self {
8918 balances: Vec::new(),
8919 next_page_token: None,
8920 }
8921 }
8922 #[doc(hidden)]
8923 pub fn default_instance() -> &'static Self {
8924 static DEFAULT: super::ListBalancesResponse = super::ListBalancesResponse::const_default();
8925 &DEFAULT
8926 }
8927 pub fn balances(&self) -> &[super::Balance] {
8929 &self.balances
8930 }
8931 pub fn balances_mut(&mut self) -> &mut Vec<super::Balance> {
8934 &mut self.balances
8935 }
8936 pub fn set_balances(&mut self, field: Vec<super::Balance>) {
8938 self.balances = field;
8939 }
8940 pub fn with_balances(mut self, field: Vec<super::Balance>) -> Self {
8942 self.set_balances(field);
8943 self
8944 }
8945 pub fn next_page_token_opt(&self) -> Option<&[u8]> {
8947 self.next_page_token.as_ref().map(|field| field as _)
8948 }
8949 pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
8951 self.next_page_token = Some(field.into().into());
8952 }
8953 pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
8955 mut self,
8956 field: T,
8957 ) -> Self {
8958 self.set_next_page_token(field.into());
8959 self
8960 }
8961 }
8962 impl super::ListDynamicFieldsRequest {
8963 pub const fn const_default() -> Self {
8964 Self {
8965 parent: None,
8966 page_size: None,
8967 page_token: None,
8968 read_mask: None,
8969 }
8970 }
8971 #[doc(hidden)]
8972 pub fn default_instance() -> &'static Self {
8973 static DEFAULT: super::ListDynamicFieldsRequest = super::ListDynamicFieldsRequest::const_default();
8974 &DEFAULT
8975 }
8976 pub fn parent_opt_mut(&mut self) -> Option<&mut String> {
8978 self.parent.as_mut().map(|field| field as _)
8979 }
8980 pub fn parent_mut(&mut self) -> &mut String {
8983 self.parent.get_or_insert_default()
8984 }
8985 pub fn parent_opt(&self) -> Option<&str> {
8987 self.parent.as_ref().map(|field| field as _)
8988 }
8989 pub fn set_parent<T: Into<String>>(&mut self, field: T) {
8991 self.parent = Some(field.into().into());
8992 }
8993 pub fn with_parent<T: Into<String>>(mut self, field: T) -> Self {
8995 self.set_parent(field.into());
8996 self
8997 }
8998 pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
9000 self.page_size.as_mut().map(|field| field as _)
9001 }
9002 pub fn page_size_mut(&mut self) -> &mut u32 {
9005 self.page_size.get_or_insert_default()
9006 }
9007 pub fn page_size_opt(&self) -> Option<u32> {
9009 self.page_size.as_ref().map(|field| *field)
9010 }
9011 pub fn set_page_size(&mut self, field: u32) {
9013 self.page_size = Some(field);
9014 }
9015 pub fn with_page_size(mut self, field: u32) -> Self {
9017 self.set_page_size(field);
9018 self
9019 }
9020 pub fn page_token_opt(&self) -> Option<&[u8]> {
9022 self.page_token.as_ref().map(|field| field as _)
9023 }
9024 pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9026 self.page_token = Some(field.into().into());
9027 }
9028 pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
9030 mut self,
9031 field: T,
9032 ) -> Self {
9033 self.set_page_token(field.into());
9034 self
9035 }
9036 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
9038 self.read_mask.as_mut().map(|field| field as _)
9039 }
9040 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
9043 self.read_mask.get_or_insert_default()
9044 }
9045 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
9047 self.read_mask.as_ref().map(|field| field as _)
9048 }
9049 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
9051 self.read_mask = Some(field.into().into());
9052 }
9053 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
9055 mut self,
9056 field: T,
9057 ) -> Self {
9058 self.set_read_mask(field.into());
9059 self
9060 }
9061 }
9062 impl super::ListDynamicFieldsResponse {
9063 pub const fn const_default() -> Self {
9064 Self {
9065 dynamic_fields: Vec::new(),
9066 next_page_token: None,
9067 }
9068 }
9069 #[doc(hidden)]
9070 pub fn default_instance() -> &'static Self {
9071 static DEFAULT: super::ListDynamicFieldsResponse = super::ListDynamicFieldsResponse::const_default();
9072 &DEFAULT
9073 }
9074 pub fn dynamic_fields(&self) -> &[super::DynamicField] {
9076 &self.dynamic_fields
9077 }
9078 pub fn dynamic_fields_mut(&mut self) -> &mut Vec<super::DynamicField> {
9081 &mut self.dynamic_fields
9082 }
9083 pub fn set_dynamic_fields(&mut self, field: Vec<super::DynamicField>) {
9085 self.dynamic_fields = field;
9086 }
9087 pub fn with_dynamic_fields(mut self, field: Vec<super::DynamicField>) -> Self {
9089 self.set_dynamic_fields(field);
9090 self
9091 }
9092 pub fn next_page_token_opt(&self) -> Option<&[u8]> {
9094 self.next_page_token.as_ref().map(|field| field as _)
9095 }
9096 pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9098 self.next_page_token = Some(field.into().into());
9099 }
9100 pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
9102 mut self,
9103 field: T,
9104 ) -> Self {
9105 self.set_next_page_token(field.into());
9106 self
9107 }
9108 }
9109 impl super::ListOwnedObjectsRequest {
9110 pub const fn const_default() -> Self {
9111 Self {
9112 owner: None,
9113 page_size: None,
9114 page_token: None,
9115 read_mask: None,
9116 object_type: None,
9117 }
9118 }
9119 #[doc(hidden)]
9120 pub fn default_instance() -> &'static Self {
9121 static DEFAULT: super::ListOwnedObjectsRequest = super::ListOwnedObjectsRequest::const_default();
9122 &DEFAULT
9123 }
9124 pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
9126 self.owner.as_mut().map(|field| field as _)
9127 }
9128 pub fn owner_mut(&mut self) -> &mut String {
9131 self.owner.get_or_insert_default()
9132 }
9133 pub fn owner_opt(&self) -> Option<&str> {
9135 self.owner.as_ref().map(|field| field as _)
9136 }
9137 pub fn set_owner<T: Into<String>>(&mut self, field: T) {
9139 self.owner = Some(field.into().into());
9140 }
9141 pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
9143 self.set_owner(field.into());
9144 self
9145 }
9146 pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
9148 self.page_size.as_mut().map(|field| field as _)
9149 }
9150 pub fn page_size_mut(&mut self) -> &mut u32 {
9153 self.page_size.get_or_insert_default()
9154 }
9155 pub fn page_size_opt(&self) -> Option<u32> {
9157 self.page_size.as_ref().map(|field| *field)
9158 }
9159 pub fn set_page_size(&mut self, field: u32) {
9161 self.page_size = Some(field);
9162 }
9163 pub fn with_page_size(mut self, field: u32) -> Self {
9165 self.set_page_size(field);
9166 self
9167 }
9168 pub fn page_token_opt(&self) -> Option<&[u8]> {
9170 self.page_token.as_ref().map(|field| field as _)
9171 }
9172 pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9174 self.page_token = Some(field.into().into());
9175 }
9176 pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
9178 mut self,
9179 field: T,
9180 ) -> Self {
9181 self.set_page_token(field.into());
9182 self
9183 }
9184 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
9186 self.read_mask.as_mut().map(|field| field as _)
9187 }
9188 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
9191 self.read_mask.get_or_insert_default()
9192 }
9193 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
9195 self.read_mask.as_ref().map(|field| field as _)
9196 }
9197 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
9199 self.read_mask = Some(field.into().into());
9200 }
9201 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
9203 mut self,
9204 field: T,
9205 ) -> Self {
9206 self.set_read_mask(field.into());
9207 self
9208 }
9209 pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
9211 self.object_type.as_mut().map(|field| field as _)
9212 }
9213 pub fn object_type_mut(&mut self) -> &mut String {
9216 self.object_type.get_or_insert_default()
9217 }
9218 pub fn object_type_opt(&self) -> Option<&str> {
9220 self.object_type.as_ref().map(|field| field as _)
9221 }
9222 pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
9224 self.object_type = Some(field.into().into());
9225 }
9226 pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
9228 self.set_object_type(field.into());
9229 self
9230 }
9231 }
9232 impl super::ListOwnedObjectsResponse {
9233 pub const fn const_default() -> Self {
9234 Self {
9235 objects: Vec::new(),
9236 next_page_token: None,
9237 }
9238 }
9239 #[doc(hidden)]
9240 pub fn default_instance() -> &'static Self {
9241 static DEFAULT: super::ListOwnedObjectsResponse = super::ListOwnedObjectsResponse::const_default();
9242 &DEFAULT
9243 }
9244 pub fn objects(&self) -> &[super::Object] {
9246 &self.objects
9247 }
9248 pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
9251 &mut self.objects
9252 }
9253 pub fn set_objects(&mut self, field: Vec<super::Object>) {
9255 self.objects = field;
9256 }
9257 pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
9259 self.set_objects(field);
9260 self
9261 }
9262 pub fn next_page_token_opt(&self) -> Option<&[u8]> {
9264 self.next_page_token.as_ref().map(|field| field as _)
9265 }
9266 pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9268 self.next_page_token = Some(field.into().into());
9269 }
9270 pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
9272 mut self,
9273 field: T,
9274 ) -> Self {
9275 self.set_next_page_token(field.into());
9276 self
9277 }
9278 }
9279 impl super::ListPackageVersionsRequest {
9280 pub const fn const_default() -> Self {
9281 Self {
9282 package_id: None,
9283 page_size: None,
9284 page_token: None,
9285 }
9286 }
9287 #[doc(hidden)]
9288 pub fn default_instance() -> &'static Self {
9289 static DEFAULT: super::ListPackageVersionsRequest = super::ListPackageVersionsRequest::const_default();
9290 &DEFAULT
9291 }
9292 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
9294 self.package_id.as_mut().map(|field| field as _)
9295 }
9296 pub fn package_id_mut(&mut self) -> &mut String {
9299 self.package_id.get_or_insert_default()
9300 }
9301 pub fn package_id_opt(&self) -> Option<&str> {
9303 self.package_id.as_ref().map(|field| field as _)
9304 }
9305 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
9307 self.package_id = Some(field.into().into());
9308 }
9309 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
9311 self.set_package_id(field.into());
9312 self
9313 }
9314 pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
9316 self.page_size.as_mut().map(|field| field as _)
9317 }
9318 pub fn page_size_mut(&mut self) -> &mut u32 {
9321 self.page_size.get_or_insert_default()
9322 }
9323 pub fn page_size_opt(&self) -> Option<u32> {
9325 self.page_size.as_ref().map(|field| *field)
9326 }
9327 pub fn set_page_size(&mut self, field: u32) {
9329 self.page_size = Some(field);
9330 }
9331 pub fn with_page_size(mut self, field: u32) -> Self {
9333 self.set_page_size(field);
9334 self
9335 }
9336 pub fn page_token_opt(&self) -> Option<&[u8]> {
9338 self.page_token.as_ref().map(|field| field as _)
9339 }
9340 pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9342 self.page_token = Some(field.into().into());
9343 }
9344 pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
9346 mut self,
9347 field: T,
9348 ) -> Self {
9349 self.set_page_token(field.into());
9350 self
9351 }
9352 }
9353 impl super::ListPackageVersionsResponse {
9354 pub const fn const_default() -> Self {
9355 Self {
9356 versions: Vec::new(),
9357 next_page_token: None,
9358 }
9359 }
9360 #[doc(hidden)]
9361 pub fn default_instance() -> &'static Self {
9362 static DEFAULT: super::ListPackageVersionsResponse = super::ListPackageVersionsResponse::const_default();
9363 &DEFAULT
9364 }
9365 pub fn versions(&self) -> &[super::PackageVersion] {
9367 &self.versions
9368 }
9369 pub fn versions_mut(&mut self) -> &mut Vec<super::PackageVersion> {
9372 &mut self.versions
9373 }
9374 pub fn set_versions(&mut self, field: Vec<super::PackageVersion>) {
9376 self.versions = field;
9377 }
9378 pub fn with_versions(mut self, field: Vec<super::PackageVersion>) -> Self {
9380 self.set_versions(field);
9381 self
9382 }
9383 pub fn next_page_token_opt(&self) -> Option<&[u8]> {
9385 self.next_page_token.as_ref().map(|field| field as _)
9386 }
9387 pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9389 self.next_page_token = Some(field.into().into());
9390 }
9391 pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
9393 mut self,
9394 field: T,
9395 ) -> Self {
9396 self.set_next_page_token(field.into());
9397 self
9398 }
9399 }
9400 impl super::LookupNameRequest {
9401 pub const fn const_default() -> Self {
9402 Self { name: None }
9403 }
9404 #[doc(hidden)]
9405 pub fn default_instance() -> &'static Self {
9406 static DEFAULT: super::LookupNameRequest = super::LookupNameRequest::const_default();
9407 &DEFAULT
9408 }
9409 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
9411 self.name.as_mut().map(|field| field as _)
9412 }
9413 pub fn name_mut(&mut self) -> &mut String {
9416 self.name.get_or_insert_default()
9417 }
9418 pub fn name_opt(&self) -> Option<&str> {
9420 self.name.as_ref().map(|field| field as _)
9421 }
9422 pub fn set_name<T: Into<String>>(&mut self, field: T) {
9424 self.name = Some(field.into().into());
9425 }
9426 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
9428 self.set_name(field.into());
9429 self
9430 }
9431 }
9432 impl super::LookupNameResponse {
9433 pub const fn const_default() -> Self {
9434 Self { record: None }
9435 }
9436 #[doc(hidden)]
9437 pub fn default_instance() -> &'static Self {
9438 static DEFAULT: super::LookupNameResponse = super::LookupNameResponse::const_default();
9439 &DEFAULT
9440 }
9441 pub fn record(&self) -> &super::NameRecord {
9443 self.record
9444 .as_ref()
9445 .map(|field| field as _)
9446 .unwrap_or_else(|| super::NameRecord::default_instance() as _)
9447 }
9448 pub fn record_opt_mut(&mut self) -> Option<&mut super::NameRecord> {
9450 self.record.as_mut().map(|field| field as _)
9451 }
9452 pub fn record_mut(&mut self) -> &mut super::NameRecord {
9455 self.record.get_or_insert_default()
9456 }
9457 pub fn record_opt(&self) -> Option<&super::NameRecord> {
9459 self.record.as_ref().map(|field| field as _)
9460 }
9461 pub fn set_record<T: Into<super::NameRecord>>(&mut self, field: T) {
9463 self.record = Some(field.into().into());
9464 }
9465 pub fn with_record<T: Into<super::NameRecord>>(mut self, field: T) -> Self {
9467 self.set_record(field.into());
9468 self
9469 }
9470 }
9471 impl super::MakeMoveVector {
9472 pub const fn const_default() -> Self {
9473 Self {
9474 element_type: None,
9475 elements: Vec::new(),
9476 }
9477 }
9478 #[doc(hidden)]
9479 pub fn default_instance() -> &'static Self {
9480 static DEFAULT: super::MakeMoveVector = super::MakeMoveVector::const_default();
9481 &DEFAULT
9482 }
9483 pub fn element_type_opt_mut(&mut self) -> Option<&mut String> {
9485 self.element_type.as_mut().map(|field| field as _)
9486 }
9487 pub fn element_type_mut(&mut self) -> &mut String {
9490 self.element_type.get_or_insert_default()
9491 }
9492 pub fn element_type_opt(&self) -> Option<&str> {
9494 self.element_type.as_ref().map(|field| field as _)
9495 }
9496 pub fn set_element_type<T: Into<String>>(&mut self, field: T) {
9498 self.element_type = Some(field.into().into());
9499 }
9500 pub fn with_element_type<T: Into<String>>(mut self, field: T) -> Self {
9502 self.set_element_type(field.into());
9503 self
9504 }
9505 pub fn elements(&self) -> &[super::Argument] {
9507 &self.elements
9508 }
9509 pub fn elements_mut(&mut self) -> &mut Vec<super::Argument> {
9512 &mut self.elements
9513 }
9514 pub fn set_elements(&mut self, field: Vec<super::Argument>) {
9516 self.elements = field;
9517 }
9518 pub fn with_elements(mut self, field: Vec<super::Argument>) -> Self {
9520 self.set_elements(field);
9521 self
9522 }
9523 }
9524 impl super::MergeCoins {
9525 pub const fn const_default() -> Self {
9526 Self {
9527 coin: None,
9528 coins_to_merge: Vec::new(),
9529 }
9530 }
9531 #[doc(hidden)]
9532 pub fn default_instance() -> &'static Self {
9533 static DEFAULT: super::MergeCoins = super::MergeCoins::const_default();
9534 &DEFAULT
9535 }
9536 pub fn coin(&self) -> &super::Argument {
9538 self.coin
9539 .as_ref()
9540 .map(|field| field as _)
9541 .unwrap_or_else(|| super::Argument::default_instance() as _)
9542 }
9543 pub fn coin_opt_mut(&mut self) -> Option<&mut super::Argument> {
9545 self.coin.as_mut().map(|field| field as _)
9546 }
9547 pub fn coin_mut(&mut self) -> &mut super::Argument {
9550 self.coin.get_or_insert_default()
9551 }
9552 pub fn coin_opt(&self) -> Option<&super::Argument> {
9554 self.coin.as_ref().map(|field| field as _)
9555 }
9556 pub fn set_coin<T: Into<super::Argument>>(&mut self, field: T) {
9558 self.coin = Some(field.into().into());
9559 }
9560 pub fn with_coin<T: Into<super::Argument>>(mut self, field: T) -> Self {
9562 self.set_coin(field.into());
9563 self
9564 }
9565 pub fn coins_to_merge(&self) -> &[super::Argument] {
9567 &self.coins_to_merge
9568 }
9569 pub fn coins_to_merge_mut(&mut self) -> &mut Vec<super::Argument> {
9572 &mut self.coins_to_merge
9573 }
9574 pub fn set_coins_to_merge(&mut self, field: Vec<super::Argument>) {
9576 self.coins_to_merge = field;
9577 }
9578 pub fn with_coins_to_merge(mut self, field: Vec<super::Argument>) -> Self {
9580 self.set_coins_to_merge(field);
9581 self
9582 }
9583 }
9584 impl super::Module {
9585 pub const fn const_default() -> Self {
9586 Self {
9587 name: None,
9588 contents: None,
9589 datatypes: Vec::new(),
9590 functions: Vec::new(),
9591 }
9592 }
9593 #[doc(hidden)]
9594 pub fn default_instance() -> &'static Self {
9595 static DEFAULT: super::Module = super::Module::const_default();
9596 &DEFAULT
9597 }
9598 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
9600 self.name.as_mut().map(|field| field as _)
9601 }
9602 pub fn name_mut(&mut self) -> &mut String {
9605 self.name.get_or_insert_default()
9606 }
9607 pub fn name_opt(&self) -> Option<&str> {
9609 self.name.as_ref().map(|field| field as _)
9610 }
9611 pub fn set_name<T: Into<String>>(&mut self, field: T) {
9613 self.name = Some(field.into().into());
9614 }
9615 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
9617 self.set_name(field.into());
9618 self
9619 }
9620 pub fn contents_opt(&self) -> Option<&[u8]> {
9622 self.contents.as_ref().map(|field| field as _)
9623 }
9624 pub fn set_contents<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9626 self.contents = Some(field.into().into());
9627 }
9628 pub fn with_contents<T: Into<::prost::bytes::Bytes>>(
9630 mut self,
9631 field: T,
9632 ) -> Self {
9633 self.set_contents(field.into());
9634 self
9635 }
9636 pub fn datatypes(&self) -> &[super::DatatypeDescriptor] {
9638 &self.datatypes
9639 }
9640 pub fn datatypes_mut(&mut self) -> &mut Vec<super::DatatypeDescriptor> {
9643 &mut self.datatypes
9644 }
9645 pub fn set_datatypes(&mut self, field: Vec<super::DatatypeDescriptor>) {
9647 self.datatypes = field;
9648 }
9649 pub fn with_datatypes(mut self, field: Vec<super::DatatypeDescriptor>) -> Self {
9651 self.set_datatypes(field);
9652 self
9653 }
9654 pub fn functions(&self) -> &[super::FunctionDescriptor] {
9656 &self.functions
9657 }
9658 pub fn functions_mut(&mut self) -> &mut Vec<super::FunctionDescriptor> {
9661 &mut self.functions
9662 }
9663 pub fn set_functions(&mut self, field: Vec<super::FunctionDescriptor>) {
9665 self.functions = field;
9666 }
9667 pub fn with_functions(mut self, field: Vec<super::FunctionDescriptor>) -> Self {
9669 self.set_functions(field);
9670 self
9671 }
9672 }
9673 impl super::MoveAbort {
9674 pub const fn const_default() -> Self {
9675 Self {
9676 abort_code: None,
9677 location: None,
9678 clever_error: None,
9679 }
9680 }
9681 #[doc(hidden)]
9682 pub fn default_instance() -> &'static Self {
9683 static DEFAULT: super::MoveAbort = super::MoveAbort::const_default();
9684 &DEFAULT
9685 }
9686 pub fn abort_code_opt_mut(&mut self) -> Option<&mut u64> {
9688 self.abort_code.as_mut().map(|field| field as _)
9689 }
9690 pub fn abort_code_mut(&mut self) -> &mut u64 {
9693 self.abort_code.get_or_insert_default()
9694 }
9695 pub fn abort_code_opt(&self) -> Option<u64> {
9697 self.abort_code.as_ref().map(|field| *field)
9698 }
9699 pub fn set_abort_code(&mut self, field: u64) {
9701 self.abort_code = Some(field);
9702 }
9703 pub fn with_abort_code(mut self, field: u64) -> Self {
9705 self.set_abort_code(field);
9706 self
9707 }
9708 pub fn location(&self) -> &super::MoveLocation {
9710 self.location
9711 .as_ref()
9712 .map(|field| field as _)
9713 .unwrap_or_else(|| super::MoveLocation::default_instance() as _)
9714 }
9715 pub fn location_opt_mut(&mut self) -> Option<&mut super::MoveLocation> {
9717 self.location.as_mut().map(|field| field as _)
9718 }
9719 pub fn location_mut(&mut self) -> &mut super::MoveLocation {
9722 self.location.get_or_insert_default()
9723 }
9724 pub fn location_opt(&self) -> Option<&super::MoveLocation> {
9726 self.location.as_ref().map(|field| field as _)
9727 }
9728 pub fn set_location<T: Into<super::MoveLocation>>(&mut self, field: T) {
9730 self.location = Some(field.into().into());
9731 }
9732 pub fn with_location<T: Into<super::MoveLocation>>(mut self, field: T) -> Self {
9734 self.set_location(field.into());
9735 self
9736 }
9737 pub fn clever_error(&self) -> &super::CleverError {
9739 self.clever_error
9740 .as_ref()
9741 .map(|field| field as _)
9742 .unwrap_or_else(|| super::CleverError::default_instance() as _)
9743 }
9744 pub fn clever_error_opt_mut(&mut self) -> Option<&mut super::CleverError> {
9746 self.clever_error.as_mut().map(|field| field as _)
9747 }
9748 pub fn clever_error_mut(&mut self) -> &mut super::CleverError {
9751 self.clever_error.get_or_insert_default()
9752 }
9753 pub fn clever_error_opt(&self) -> Option<&super::CleverError> {
9755 self.clever_error.as_ref().map(|field| field as _)
9756 }
9757 pub fn set_clever_error<T: Into<super::CleverError>>(&mut self, field: T) {
9759 self.clever_error = Some(field.into().into());
9760 }
9761 pub fn with_clever_error<T: Into<super::CleverError>>(
9763 mut self,
9764 field: T,
9765 ) -> Self {
9766 self.set_clever_error(field.into());
9767 self
9768 }
9769 }
9770 impl super::MoveCall {
9771 pub const fn const_default() -> Self {
9772 Self {
9773 package: None,
9774 module: None,
9775 function: None,
9776 type_arguments: Vec::new(),
9777 arguments: Vec::new(),
9778 }
9779 }
9780 #[doc(hidden)]
9781 pub fn default_instance() -> &'static Self {
9782 static DEFAULT: super::MoveCall = super::MoveCall::const_default();
9783 &DEFAULT
9784 }
9785 pub fn package_opt_mut(&mut self) -> Option<&mut String> {
9787 self.package.as_mut().map(|field| field as _)
9788 }
9789 pub fn package_mut(&mut self) -> &mut String {
9792 self.package.get_or_insert_default()
9793 }
9794 pub fn package_opt(&self) -> Option<&str> {
9796 self.package.as_ref().map(|field| field as _)
9797 }
9798 pub fn set_package<T: Into<String>>(&mut self, field: T) {
9800 self.package = Some(field.into().into());
9801 }
9802 pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
9804 self.set_package(field.into());
9805 self
9806 }
9807 pub fn module_opt_mut(&mut self) -> Option<&mut String> {
9809 self.module.as_mut().map(|field| field as _)
9810 }
9811 pub fn module_mut(&mut self) -> &mut String {
9814 self.module.get_or_insert_default()
9815 }
9816 pub fn module_opt(&self) -> Option<&str> {
9818 self.module.as_ref().map(|field| field as _)
9819 }
9820 pub fn set_module<T: Into<String>>(&mut self, field: T) {
9822 self.module = Some(field.into().into());
9823 }
9824 pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
9826 self.set_module(field.into());
9827 self
9828 }
9829 pub fn function_opt_mut(&mut self) -> Option<&mut String> {
9831 self.function.as_mut().map(|field| field as _)
9832 }
9833 pub fn function_mut(&mut self) -> &mut String {
9836 self.function.get_or_insert_default()
9837 }
9838 pub fn function_opt(&self) -> Option<&str> {
9840 self.function.as_ref().map(|field| field as _)
9841 }
9842 pub fn set_function<T: Into<String>>(&mut self, field: T) {
9844 self.function = Some(field.into().into());
9845 }
9846 pub fn with_function<T: Into<String>>(mut self, field: T) -> Self {
9848 self.set_function(field.into());
9849 self
9850 }
9851 pub fn type_arguments(&self) -> &[String] {
9853 &self.type_arguments
9854 }
9855 pub fn type_arguments_mut(&mut self) -> &mut Vec<String> {
9858 &mut self.type_arguments
9859 }
9860 pub fn set_type_arguments(&mut self, field: Vec<String>) {
9862 self.type_arguments = field;
9863 }
9864 pub fn with_type_arguments(mut self, field: Vec<String>) -> Self {
9866 self.set_type_arguments(field);
9867 self
9868 }
9869 pub fn arguments(&self) -> &[super::Argument] {
9871 &self.arguments
9872 }
9873 pub fn arguments_mut(&mut self) -> &mut Vec<super::Argument> {
9876 &mut self.arguments
9877 }
9878 pub fn set_arguments(&mut self, field: Vec<super::Argument>) {
9880 self.arguments = field;
9881 }
9882 pub fn with_arguments(mut self, field: Vec<super::Argument>) -> Self {
9884 self.set_arguments(field);
9885 self
9886 }
9887 }
9888 impl super::MoveLocation {
9889 pub const fn const_default() -> Self {
9890 Self {
9891 package: None,
9892 module: None,
9893 function: None,
9894 instruction: None,
9895 function_name: None,
9896 }
9897 }
9898 #[doc(hidden)]
9899 pub fn default_instance() -> &'static Self {
9900 static DEFAULT: super::MoveLocation = super::MoveLocation::const_default();
9901 &DEFAULT
9902 }
9903 pub fn package_opt_mut(&mut self) -> Option<&mut String> {
9905 self.package.as_mut().map(|field| field as _)
9906 }
9907 pub fn package_mut(&mut self) -> &mut String {
9910 self.package.get_or_insert_default()
9911 }
9912 pub fn package_opt(&self) -> Option<&str> {
9914 self.package.as_ref().map(|field| field as _)
9915 }
9916 pub fn set_package<T: Into<String>>(&mut self, field: T) {
9918 self.package = Some(field.into().into());
9919 }
9920 pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
9922 self.set_package(field.into());
9923 self
9924 }
9925 pub fn module_opt_mut(&mut self) -> Option<&mut String> {
9927 self.module.as_mut().map(|field| field as _)
9928 }
9929 pub fn module_mut(&mut self) -> &mut String {
9932 self.module.get_or_insert_default()
9933 }
9934 pub fn module_opt(&self) -> Option<&str> {
9936 self.module.as_ref().map(|field| field as _)
9937 }
9938 pub fn set_module<T: Into<String>>(&mut self, field: T) {
9940 self.module = Some(field.into().into());
9941 }
9942 pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
9944 self.set_module(field.into());
9945 self
9946 }
9947 pub fn function_opt_mut(&mut self) -> Option<&mut u32> {
9949 self.function.as_mut().map(|field| field as _)
9950 }
9951 pub fn function_mut(&mut self) -> &mut u32 {
9954 self.function.get_or_insert_default()
9955 }
9956 pub fn function_opt(&self) -> Option<u32> {
9958 self.function.as_ref().map(|field| *field)
9959 }
9960 pub fn set_function(&mut self, field: u32) {
9962 self.function = Some(field);
9963 }
9964 pub fn with_function(mut self, field: u32) -> Self {
9966 self.set_function(field);
9967 self
9968 }
9969 pub fn instruction_opt_mut(&mut self) -> Option<&mut u32> {
9971 self.instruction.as_mut().map(|field| field as _)
9972 }
9973 pub fn instruction_mut(&mut self) -> &mut u32 {
9976 self.instruction.get_or_insert_default()
9977 }
9978 pub fn instruction_opt(&self) -> Option<u32> {
9980 self.instruction.as_ref().map(|field| *field)
9981 }
9982 pub fn set_instruction(&mut self, field: u32) {
9984 self.instruction = Some(field);
9985 }
9986 pub fn with_instruction(mut self, field: u32) -> Self {
9988 self.set_instruction(field);
9989 self
9990 }
9991 pub fn function_name_opt_mut(&mut self) -> Option<&mut String> {
9993 self.function_name.as_mut().map(|field| field as _)
9994 }
9995 pub fn function_name_mut(&mut self) -> &mut String {
9998 self.function_name.get_or_insert_default()
9999 }
10000 pub fn function_name_opt(&self) -> Option<&str> {
10002 self.function_name.as_ref().map(|field| field as _)
10003 }
10004 pub fn set_function_name<T: Into<String>>(&mut self, field: T) {
10006 self.function_name = Some(field.into().into());
10007 }
10008 pub fn with_function_name<T: Into<String>>(mut self, field: T) -> Self {
10010 self.set_function_name(field.into());
10011 self
10012 }
10013 }
10014 impl super::MoveTable {
10015 pub const fn const_default() -> Self {
10016 Self { id: None, size: None }
10017 }
10018 #[doc(hidden)]
10019 pub fn default_instance() -> &'static Self {
10020 static DEFAULT: super::MoveTable = super::MoveTable::const_default();
10021 &DEFAULT
10022 }
10023 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
10025 self.id.as_mut().map(|field| field as _)
10026 }
10027 pub fn id_mut(&mut self) -> &mut String {
10030 self.id.get_or_insert_default()
10031 }
10032 pub fn id_opt(&self) -> Option<&str> {
10034 self.id.as_ref().map(|field| field as _)
10035 }
10036 pub fn set_id<T: Into<String>>(&mut self, field: T) {
10038 self.id = Some(field.into().into());
10039 }
10040 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
10042 self.set_id(field.into());
10043 self
10044 }
10045 pub fn size_opt_mut(&mut self) -> Option<&mut u64> {
10047 self.size.as_mut().map(|field| field as _)
10048 }
10049 pub fn size_mut(&mut self) -> &mut u64 {
10052 self.size.get_or_insert_default()
10053 }
10054 pub fn size_opt(&self) -> Option<u64> {
10056 self.size.as_ref().map(|field| *field)
10057 }
10058 pub fn set_size(&mut self, field: u64) {
10060 self.size = Some(field);
10061 }
10062 pub fn with_size(mut self, field: u64) -> Self {
10064 self.set_size(field);
10065 self
10066 }
10067 }
10068 impl super::MultisigAggregatedSignature {
10069 pub const fn const_default() -> Self {
10070 Self {
10071 signatures: Vec::new(),
10072 bitmap: None,
10073 legacy_bitmap: None,
10074 committee: None,
10075 }
10076 }
10077 #[doc(hidden)]
10078 pub fn default_instance() -> &'static Self {
10079 static DEFAULT: super::MultisigAggregatedSignature = super::MultisigAggregatedSignature::const_default();
10080 &DEFAULT
10081 }
10082 pub fn signatures(&self) -> &[super::MultisigMemberSignature] {
10084 &self.signatures
10085 }
10086 pub fn signatures_mut(&mut self) -> &mut Vec<super::MultisigMemberSignature> {
10089 &mut self.signatures
10090 }
10091 pub fn set_signatures(&mut self, field: Vec<super::MultisigMemberSignature>) {
10093 self.signatures = field;
10094 }
10095 pub fn with_signatures(
10097 mut self,
10098 field: Vec<super::MultisigMemberSignature>,
10099 ) -> Self {
10100 self.set_signatures(field);
10101 self
10102 }
10103 pub fn bitmap_opt_mut(&mut self) -> Option<&mut u32> {
10105 self.bitmap.as_mut().map(|field| field as _)
10106 }
10107 pub fn bitmap_mut(&mut self) -> &mut u32 {
10110 self.bitmap.get_or_insert_default()
10111 }
10112 pub fn bitmap_opt(&self) -> Option<u32> {
10114 self.bitmap.as_ref().map(|field| *field)
10115 }
10116 pub fn set_bitmap(&mut self, field: u32) {
10118 self.bitmap = Some(field);
10119 }
10120 pub fn with_bitmap(mut self, field: u32) -> Self {
10122 self.set_bitmap(field);
10123 self
10124 }
10125 pub fn legacy_bitmap_opt(&self) -> Option<&[u8]> {
10127 self.legacy_bitmap.as_ref().map(|field| field as _)
10128 }
10129 pub fn set_legacy_bitmap<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10131 self.legacy_bitmap = Some(field.into().into());
10132 }
10133 pub fn with_legacy_bitmap<T: Into<::prost::bytes::Bytes>>(
10135 mut self,
10136 field: T,
10137 ) -> Self {
10138 self.set_legacy_bitmap(field.into());
10139 self
10140 }
10141 pub fn committee(&self) -> &super::MultisigCommittee {
10143 self.committee
10144 .as_ref()
10145 .map(|field| field as _)
10146 .unwrap_or_else(|| super::MultisigCommittee::default_instance() as _)
10147 }
10148 pub fn committee_opt_mut(&mut self) -> Option<&mut super::MultisigCommittee> {
10150 self.committee.as_mut().map(|field| field as _)
10151 }
10152 pub fn committee_mut(&mut self) -> &mut super::MultisigCommittee {
10155 self.committee.get_or_insert_default()
10156 }
10157 pub fn committee_opt(&self) -> Option<&super::MultisigCommittee> {
10159 self.committee.as_ref().map(|field| field as _)
10160 }
10161 pub fn set_committee<T: Into<super::MultisigCommittee>>(&mut self, field: T) {
10163 self.committee = Some(field.into().into());
10164 }
10165 pub fn with_committee<T: Into<super::MultisigCommittee>>(
10167 mut self,
10168 field: T,
10169 ) -> Self {
10170 self.set_committee(field.into());
10171 self
10172 }
10173 }
10174 impl super::MultisigCommittee {
10175 pub const fn const_default() -> Self {
10176 Self {
10177 members: Vec::new(),
10178 threshold: None,
10179 }
10180 }
10181 #[doc(hidden)]
10182 pub fn default_instance() -> &'static Self {
10183 static DEFAULT: super::MultisigCommittee = super::MultisigCommittee::const_default();
10184 &DEFAULT
10185 }
10186 pub fn members(&self) -> &[super::MultisigMember] {
10188 &self.members
10189 }
10190 pub fn members_mut(&mut self) -> &mut Vec<super::MultisigMember> {
10193 &mut self.members
10194 }
10195 pub fn set_members(&mut self, field: Vec<super::MultisigMember>) {
10197 self.members = field;
10198 }
10199 pub fn with_members(mut self, field: Vec<super::MultisigMember>) -> Self {
10201 self.set_members(field);
10202 self
10203 }
10204 pub fn threshold_opt_mut(&mut self) -> Option<&mut u32> {
10206 self.threshold.as_mut().map(|field| field as _)
10207 }
10208 pub fn threshold_mut(&mut self) -> &mut u32 {
10211 self.threshold.get_or_insert_default()
10212 }
10213 pub fn threshold_opt(&self) -> Option<u32> {
10215 self.threshold.as_ref().map(|field| *field)
10216 }
10217 pub fn set_threshold(&mut self, field: u32) {
10219 self.threshold = Some(field);
10220 }
10221 pub fn with_threshold(mut self, field: u32) -> Self {
10223 self.set_threshold(field);
10224 self
10225 }
10226 }
10227 impl super::MultisigMember {
10228 pub const fn const_default() -> Self {
10229 Self {
10230 public_key: None,
10231 weight: None,
10232 }
10233 }
10234 #[doc(hidden)]
10235 pub fn default_instance() -> &'static Self {
10236 static DEFAULT: super::MultisigMember = super::MultisigMember::const_default();
10237 &DEFAULT
10238 }
10239 pub fn public_key(&self) -> &super::MultisigMemberPublicKey {
10241 self.public_key
10242 .as_ref()
10243 .map(|field| field as _)
10244 .unwrap_or_else(|| {
10245 super::MultisigMemberPublicKey::default_instance() as _
10246 })
10247 }
10248 pub fn public_key_opt_mut(
10250 &mut self,
10251 ) -> Option<&mut super::MultisigMemberPublicKey> {
10252 self.public_key.as_mut().map(|field| field as _)
10253 }
10254 pub fn public_key_mut(&mut self) -> &mut super::MultisigMemberPublicKey {
10257 self.public_key.get_or_insert_default()
10258 }
10259 pub fn public_key_opt(&self) -> Option<&super::MultisigMemberPublicKey> {
10261 self.public_key.as_ref().map(|field| field as _)
10262 }
10263 pub fn set_public_key<T: Into<super::MultisigMemberPublicKey>>(
10265 &mut self,
10266 field: T,
10267 ) {
10268 self.public_key = Some(field.into().into());
10269 }
10270 pub fn with_public_key<T: Into<super::MultisigMemberPublicKey>>(
10272 mut self,
10273 field: T,
10274 ) -> Self {
10275 self.set_public_key(field.into());
10276 self
10277 }
10278 pub fn weight_opt_mut(&mut self) -> Option<&mut u32> {
10280 self.weight.as_mut().map(|field| field as _)
10281 }
10282 pub fn weight_mut(&mut self) -> &mut u32 {
10285 self.weight.get_or_insert_default()
10286 }
10287 pub fn weight_opt(&self) -> Option<u32> {
10289 self.weight.as_ref().map(|field| *field)
10290 }
10291 pub fn set_weight(&mut self, field: u32) {
10293 self.weight = Some(field);
10294 }
10295 pub fn with_weight(mut self, field: u32) -> Self {
10297 self.set_weight(field);
10298 self
10299 }
10300 }
10301 impl super::MultisigMemberPublicKey {
10302 pub const fn const_default() -> Self {
10303 Self {
10304 scheme: None,
10305 public_key: None,
10306 zklogin: None,
10307 }
10308 }
10309 #[doc(hidden)]
10310 pub fn default_instance() -> &'static Self {
10311 static DEFAULT: super::MultisigMemberPublicKey = super::MultisigMemberPublicKey::const_default();
10312 &DEFAULT
10313 }
10314 pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
10316 self.set_scheme(field.into());
10317 self
10318 }
10319 pub fn public_key_opt(&self) -> Option<&[u8]> {
10321 self.public_key.as_ref().map(|field| field as _)
10322 }
10323 pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10325 self.public_key = Some(field.into().into());
10326 }
10327 pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
10329 mut self,
10330 field: T,
10331 ) -> Self {
10332 self.set_public_key(field.into());
10333 self
10334 }
10335 pub fn zklogin(&self) -> &super::ZkLoginPublicIdentifier {
10337 self.zklogin
10338 .as_ref()
10339 .map(|field| field as _)
10340 .unwrap_or_else(|| {
10341 super::ZkLoginPublicIdentifier::default_instance() as _
10342 })
10343 }
10344 pub fn zklogin_opt_mut(
10346 &mut self,
10347 ) -> Option<&mut super::ZkLoginPublicIdentifier> {
10348 self.zklogin.as_mut().map(|field| field as _)
10349 }
10350 pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginPublicIdentifier {
10353 self.zklogin.get_or_insert_default()
10354 }
10355 pub fn zklogin_opt(&self) -> Option<&super::ZkLoginPublicIdentifier> {
10357 self.zklogin.as_ref().map(|field| field as _)
10358 }
10359 pub fn set_zklogin<T: Into<super::ZkLoginPublicIdentifier>>(
10361 &mut self,
10362 field: T,
10363 ) {
10364 self.zklogin = Some(field.into().into());
10365 }
10366 pub fn with_zklogin<T: Into<super::ZkLoginPublicIdentifier>>(
10368 mut self,
10369 field: T,
10370 ) -> Self {
10371 self.set_zklogin(field.into());
10372 self
10373 }
10374 }
10375 impl super::MultisigMemberSignature {
10376 pub const fn const_default() -> Self {
10377 Self {
10378 scheme: None,
10379 signature: None,
10380 zklogin: None,
10381 passkey: None,
10382 }
10383 }
10384 #[doc(hidden)]
10385 pub fn default_instance() -> &'static Self {
10386 static DEFAULT: super::MultisigMemberSignature = super::MultisigMemberSignature::const_default();
10387 &DEFAULT
10388 }
10389 pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
10391 self.set_scheme(field.into());
10392 self
10393 }
10394 pub fn signature_opt(&self) -> Option<&[u8]> {
10396 self.signature.as_ref().map(|field| field as _)
10397 }
10398 pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10400 self.signature = Some(field.into().into());
10401 }
10402 pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
10404 mut self,
10405 field: T,
10406 ) -> Self {
10407 self.set_signature(field.into());
10408 self
10409 }
10410 pub fn zklogin(&self) -> &super::ZkLoginAuthenticator {
10412 self.zklogin
10413 .as_ref()
10414 .map(|field| field as _)
10415 .unwrap_or_else(|| super::ZkLoginAuthenticator::default_instance() as _)
10416 }
10417 pub fn zklogin_opt_mut(&mut self) -> Option<&mut super::ZkLoginAuthenticator> {
10419 self.zklogin.as_mut().map(|field| field as _)
10420 }
10421 pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginAuthenticator {
10424 self.zklogin.get_or_insert_default()
10425 }
10426 pub fn zklogin_opt(&self) -> Option<&super::ZkLoginAuthenticator> {
10428 self.zklogin.as_ref().map(|field| field as _)
10429 }
10430 pub fn set_zklogin<T: Into<super::ZkLoginAuthenticator>>(&mut self, field: T) {
10432 self.zklogin = Some(field.into().into());
10433 }
10434 pub fn with_zklogin<T: Into<super::ZkLoginAuthenticator>>(
10436 mut self,
10437 field: T,
10438 ) -> Self {
10439 self.set_zklogin(field.into());
10440 self
10441 }
10442 pub fn passkey(&self) -> &super::PasskeyAuthenticator {
10444 self.passkey
10445 .as_ref()
10446 .map(|field| field as _)
10447 .unwrap_or_else(|| super::PasskeyAuthenticator::default_instance() as _)
10448 }
10449 pub fn passkey_opt_mut(&mut self) -> Option<&mut super::PasskeyAuthenticator> {
10451 self.passkey.as_mut().map(|field| field as _)
10452 }
10453 pub fn passkey_mut(&mut self) -> &mut super::PasskeyAuthenticator {
10456 self.passkey.get_or_insert_default()
10457 }
10458 pub fn passkey_opt(&self) -> Option<&super::PasskeyAuthenticator> {
10460 self.passkey.as_ref().map(|field| field as _)
10461 }
10462 pub fn set_passkey<T: Into<super::PasskeyAuthenticator>>(&mut self, field: T) {
10464 self.passkey = Some(field.into().into());
10465 }
10466 pub fn with_passkey<T: Into<super::PasskeyAuthenticator>>(
10468 mut self,
10469 field: T,
10470 ) -> Self {
10471 self.set_passkey(field.into());
10472 self
10473 }
10474 }
10475 impl super::NameRecord {
10476 pub const fn const_default() -> Self {
10477 Self {
10478 id: None,
10479 name: None,
10480 registration_nft_id: None,
10481 expiration_timestamp: None,
10482 target_address: None,
10483 data: std::collections::BTreeMap::new(),
10484 }
10485 }
10486 #[doc(hidden)]
10487 pub fn default_instance() -> &'static Self {
10488 static DEFAULT: super::NameRecord = super::NameRecord::const_default();
10489 &DEFAULT
10490 }
10491 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
10493 self.id.as_mut().map(|field| field as _)
10494 }
10495 pub fn id_mut(&mut self) -> &mut String {
10498 self.id.get_or_insert_default()
10499 }
10500 pub fn id_opt(&self) -> Option<&str> {
10502 self.id.as_ref().map(|field| field as _)
10503 }
10504 pub fn set_id<T: Into<String>>(&mut self, field: T) {
10506 self.id = Some(field.into().into());
10507 }
10508 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
10510 self.set_id(field.into());
10511 self
10512 }
10513 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
10515 self.name.as_mut().map(|field| field as _)
10516 }
10517 pub fn name_mut(&mut self) -> &mut String {
10520 self.name.get_or_insert_default()
10521 }
10522 pub fn name_opt(&self) -> Option<&str> {
10524 self.name.as_ref().map(|field| field as _)
10525 }
10526 pub fn set_name<T: Into<String>>(&mut self, field: T) {
10528 self.name = Some(field.into().into());
10529 }
10530 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
10532 self.set_name(field.into());
10533 self
10534 }
10535 pub fn registration_nft_id_opt_mut(&mut self) -> Option<&mut String> {
10537 self.registration_nft_id.as_mut().map(|field| field as _)
10538 }
10539 pub fn registration_nft_id_mut(&mut self) -> &mut String {
10542 self.registration_nft_id.get_or_insert_default()
10543 }
10544 pub fn registration_nft_id_opt(&self) -> Option<&str> {
10546 self.registration_nft_id.as_ref().map(|field| field as _)
10547 }
10548 pub fn set_registration_nft_id<T: Into<String>>(&mut self, field: T) {
10550 self.registration_nft_id = Some(field.into().into());
10551 }
10552 pub fn with_registration_nft_id<T: Into<String>>(mut self, field: T) -> Self {
10554 self.set_registration_nft_id(field.into());
10555 self
10556 }
10557 pub fn expiration_timestamp_opt_mut(
10559 &mut self,
10560 ) -> Option<&mut ::prost_types::Timestamp> {
10561 self.expiration_timestamp.as_mut().map(|field| field as _)
10562 }
10563 pub fn expiration_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
10566 self.expiration_timestamp.get_or_insert_default()
10567 }
10568 pub fn expiration_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
10570 self.expiration_timestamp.as_ref().map(|field| field as _)
10571 }
10572 pub fn set_expiration_timestamp<T: Into<::prost_types::Timestamp>>(
10574 &mut self,
10575 field: T,
10576 ) {
10577 self.expiration_timestamp = Some(field.into().into());
10578 }
10579 pub fn with_expiration_timestamp<T: Into<::prost_types::Timestamp>>(
10581 mut self,
10582 field: T,
10583 ) -> Self {
10584 self.set_expiration_timestamp(field.into());
10585 self
10586 }
10587 pub fn target_address_opt_mut(&mut self) -> Option<&mut String> {
10589 self.target_address.as_mut().map(|field| field as _)
10590 }
10591 pub fn target_address_mut(&mut self) -> &mut String {
10594 self.target_address.get_or_insert_default()
10595 }
10596 pub fn target_address_opt(&self) -> Option<&str> {
10598 self.target_address.as_ref().map(|field| field as _)
10599 }
10600 pub fn set_target_address<T: Into<String>>(&mut self, field: T) {
10602 self.target_address = Some(field.into().into());
10603 }
10604 pub fn with_target_address<T: Into<String>>(mut self, field: T) -> Self {
10606 self.set_target_address(field.into());
10607 self
10608 }
10609 pub fn data(&self) -> &::std::collections::BTreeMap<String, String> {
10611 &self.data
10612 }
10613 pub fn data_mut(&mut self) -> &mut ::std::collections::BTreeMap<String, String> {
10616 &mut self.data
10617 }
10618 pub fn set_data(&mut self, field: ::std::collections::BTreeMap<String, String>) {
10620 self.data = field;
10621 }
10622 pub fn with_data(
10624 mut self,
10625 field: ::std::collections::BTreeMap<String, String>,
10626 ) -> Self {
10627 self.set_data(field);
10628 self
10629 }
10630 }
10631 impl super::Object {
10632 pub const fn const_default() -> Self {
10633 Self {
10634 bcs: None,
10635 object_id: None,
10636 version: None,
10637 digest: None,
10638 owner: None,
10639 object_type: None,
10640 has_public_transfer: None,
10641 contents: None,
10642 package: None,
10643 previous_transaction: None,
10644 storage_rebate: None,
10645 json: None,
10646 balance: None,
10647 }
10648 }
10649 #[doc(hidden)]
10650 pub fn default_instance() -> &'static Self {
10651 static DEFAULT: super::Object = super::Object::const_default();
10652 &DEFAULT
10653 }
10654 pub fn bcs(&self) -> &super::Bcs {
10656 self.bcs
10657 .as_ref()
10658 .map(|field| field as _)
10659 .unwrap_or_else(|| super::Bcs::default_instance() as _)
10660 }
10661 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
10663 self.bcs.as_mut().map(|field| field as _)
10664 }
10665 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
10668 self.bcs.get_or_insert_default()
10669 }
10670 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
10672 self.bcs.as_ref().map(|field| field as _)
10673 }
10674 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
10676 self.bcs = Some(field.into().into());
10677 }
10678 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
10680 self.set_bcs(field.into());
10681 self
10682 }
10683 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
10685 self.object_id.as_mut().map(|field| field as _)
10686 }
10687 pub fn object_id_mut(&mut self) -> &mut String {
10690 self.object_id.get_or_insert_default()
10691 }
10692 pub fn object_id_opt(&self) -> Option<&str> {
10694 self.object_id.as_ref().map(|field| field as _)
10695 }
10696 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
10698 self.object_id = Some(field.into().into());
10699 }
10700 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
10702 self.set_object_id(field.into());
10703 self
10704 }
10705 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
10707 self.version.as_mut().map(|field| field as _)
10708 }
10709 pub fn version_mut(&mut self) -> &mut u64 {
10712 self.version.get_or_insert_default()
10713 }
10714 pub fn version_opt(&self) -> Option<u64> {
10716 self.version.as_ref().map(|field| *field)
10717 }
10718 pub fn set_version(&mut self, field: u64) {
10720 self.version = Some(field);
10721 }
10722 pub fn with_version(mut self, field: u64) -> Self {
10724 self.set_version(field);
10725 self
10726 }
10727 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
10729 self.digest.as_mut().map(|field| field as _)
10730 }
10731 pub fn digest_mut(&mut self) -> &mut String {
10734 self.digest.get_or_insert_default()
10735 }
10736 pub fn digest_opt(&self) -> Option<&str> {
10738 self.digest.as_ref().map(|field| field as _)
10739 }
10740 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
10742 self.digest = Some(field.into().into());
10743 }
10744 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
10746 self.set_digest(field.into());
10747 self
10748 }
10749 pub fn owner(&self) -> &super::Owner {
10751 self.owner
10752 .as_ref()
10753 .map(|field| field as _)
10754 .unwrap_or_else(|| super::Owner::default_instance() as _)
10755 }
10756 pub fn owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
10758 self.owner.as_mut().map(|field| field as _)
10759 }
10760 pub fn owner_mut(&mut self) -> &mut super::Owner {
10763 self.owner.get_or_insert_default()
10764 }
10765 pub fn owner_opt(&self) -> Option<&super::Owner> {
10767 self.owner.as_ref().map(|field| field as _)
10768 }
10769 pub fn set_owner<T: Into<super::Owner>>(&mut self, field: T) {
10771 self.owner = Some(field.into().into());
10772 }
10773 pub fn with_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
10775 self.set_owner(field.into());
10776 self
10777 }
10778 pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
10780 self.object_type.as_mut().map(|field| field as _)
10781 }
10782 pub fn object_type_mut(&mut self) -> &mut String {
10785 self.object_type.get_or_insert_default()
10786 }
10787 pub fn object_type_opt(&self) -> Option<&str> {
10789 self.object_type.as_ref().map(|field| field as _)
10790 }
10791 pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
10793 self.object_type = Some(field.into().into());
10794 }
10795 pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
10797 self.set_object_type(field.into());
10798 self
10799 }
10800 pub fn has_public_transfer_opt_mut(&mut self) -> Option<&mut bool> {
10802 self.has_public_transfer.as_mut().map(|field| field as _)
10803 }
10804 pub fn has_public_transfer_mut(&mut self) -> &mut bool {
10807 self.has_public_transfer.get_or_insert_default()
10808 }
10809 pub fn has_public_transfer_opt(&self) -> Option<bool> {
10811 self.has_public_transfer.as_ref().map(|field| *field)
10812 }
10813 pub fn set_has_public_transfer(&mut self, field: bool) {
10815 self.has_public_transfer = Some(field);
10816 }
10817 pub fn with_has_public_transfer(mut self, field: bool) -> Self {
10819 self.set_has_public_transfer(field);
10820 self
10821 }
10822 pub fn contents(&self) -> &super::Bcs {
10824 self.contents
10825 .as_ref()
10826 .map(|field| field as _)
10827 .unwrap_or_else(|| super::Bcs::default_instance() as _)
10828 }
10829 pub fn contents_opt_mut(&mut self) -> Option<&mut super::Bcs> {
10831 self.contents.as_mut().map(|field| field as _)
10832 }
10833 pub fn contents_mut(&mut self) -> &mut super::Bcs {
10836 self.contents.get_or_insert_default()
10837 }
10838 pub fn contents_opt(&self) -> Option<&super::Bcs> {
10840 self.contents.as_ref().map(|field| field as _)
10841 }
10842 pub fn set_contents<T: Into<super::Bcs>>(&mut self, field: T) {
10844 self.contents = Some(field.into().into());
10845 }
10846 pub fn with_contents<T: Into<super::Bcs>>(mut self, field: T) -> Self {
10848 self.set_contents(field.into());
10849 self
10850 }
10851 pub fn package(&self) -> &super::Package {
10853 self.package
10854 .as_ref()
10855 .map(|field| field as _)
10856 .unwrap_or_else(|| super::Package::default_instance() as _)
10857 }
10858 pub fn package_opt_mut(&mut self) -> Option<&mut super::Package> {
10860 self.package.as_mut().map(|field| field as _)
10861 }
10862 pub fn package_mut(&mut self) -> &mut super::Package {
10865 self.package.get_or_insert_default()
10866 }
10867 pub fn package_opt(&self) -> Option<&super::Package> {
10869 self.package.as_ref().map(|field| field as _)
10870 }
10871 pub fn set_package<T: Into<super::Package>>(&mut self, field: T) {
10873 self.package = Some(field.into().into());
10874 }
10875 pub fn with_package<T: Into<super::Package>>(mut self, field: T) -> Self {
10877 self.set_package(field.into());
10878 self
10879 }
10880 pub fn previous_transaction_opt_mut(&mut self) -> Option<&mut String> {
10882 self.previous_transaction.as_mut().map(|field| field as _)
10883 }
10884 pub fn previous_transaction_mut(&mut self) -> &mut String {
10887 self.previous_transaction.get_or_insert_default()
10888 }
10889 pub fn previous_transaction_opt(&self) -> Option<&str> {
10891 self.previous_transaction.as_ref().map(|field| field as _)
10892 }
10893 pub fn set_previous_transaction<T: Into<String>>(&mut self, field: T) {
10895 self.previous_transaction = Some(field.into().into());
10896 }
10897 pub fn with_previous_transaction<T: Into<String>>(mut self, field: T) -> Self {
10899 self.set_previous_transaction(field.into());
10900 self
10901 }
10902 pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
10904 self.storage_rebate.as_mut().map(|field| field as _)
10905 }
10906 pub fn storage_rebate_mut(&mut self) -> &mut u64 {
10909 self.storage_rebate.get_or_insert_default()
10910 }
10911 pub fn storage_rebate_opt(&self) -> Option<u64> {
10913 self.storage_rebate.as_ref().map(|field| *field)
10914 }
10915 pub fn set_storage_rebate(&mut self, field: u64) {
10917 self.storage_rebate = Some(field);
10918 }
10919 pub fn with_storage_rebate(mut self, field: u64) -> Self {
10921 self.set_storage_rebate(field);
10922 self
10923 }
10924 pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
10926 self.json.as_mut().map(|field| field as _)
10927 }
10928 pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
10931 self.json.get_or_insert_default()
10932 }
10933 pub fn json_opt(&self) -> Option<&::prost_types::Value> {
10935 self.json.as_ref().map(|field| field as _)
10936 }
10937 pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
10939 self.json = Some(field.into().into());
10940 }
10941 pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
10943 self.set_json(field.into());
10944 self
10945 }
10946 pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
10948 self.balance.as_mut().map(|field| field as _)
10949 }
10950 pub fn balance_mut(&mut self) -> &mut u64 {
10953 self.balance.get_or_insert_default()
10954 }
10955 pub fn balance_opt(&self) -> Option<u64> {
10957 self.balance.as_ref().map(|field| *field)
10958 }
10959 pub fn set_balance(&mut self, field: u64) {
10961 self.balance = Some(field);
10962 }
10963 pub fn with_balance(mut self, field: u64) -> Self {
10965 self.set_balance(field);
10966 self
10967 }
10968 }
10969 impl super::ObjectReference {
10970 pub const fn const_default() -> Self {
10971 Self {
10972 object_id: None,
10973 version: None,
10974 digest: None,
10975 }
10976 }
10977 #[doc(hidden)]
10978 pub fn default_instance() -> &'static Self {
10979 static DEFAULT: super::ObjectReference = super::ObjectReference::const_default();
10980 &DEFAULT
10981 }
10982 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
10984 self.object_id.as_mut().map(|field| field as _)
10985 }
10986 pub fn object_id_mut(&mut self) -> &mut String {
10989 self.object_id.get_or_insert_default()
10990 }
10991 pub fn object_id_opt(&self) -> Option<&str> {
10993 self.object_id.as_ref().map(|field| field as _)
10994 }
10995 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
10997 self.object_id = Some(field.into().into());
10998 }
10999 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
11001 self.set_object_id(field.into());
11002 self
11003 }
11004 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
11006 self.version.as_mut().map(|field| field as _)
11007 }
11008 pub fn version_mut(&mut self) -> &mut u64 {
11011 self.version.get_or_insert_default()
11012 }
11013 pub fn version_opt(&self) -> Option<u64> {
11015 self.version.as_ref().map(|field| *field)
11016 }
11017 pub fn set_version(&mut self, field: u64) {
11019 self.version = Some(field);
11020 }
11021 pub fn with_version(mut self, field: u64) -> Self {
11023 self.set_version(field);
11024 self
11025 }
11026 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
11028 self.digest.as_mut().map(|field| field as _)
11029 }
11030 pub fn digest_mut(&mut self) -> &mut String {
11033 self.digest.get_or_insert_default()
11034 }
11035 pub fn digest_opt(&self) -> Option<&str> {
11037 self.digest.as_ref().map(|field| field as _)
11038 }
11039 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
11041 self.digest = Some(field.into().into());
11042 }
11043 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
11045 self.set_digest(field.into());
11046 self
11047 }
11048 }
11049 impl super::ObjectSet {
11050 pub const fn const_default() -> Self {
11051 Self { objects: Vec::new() }
11052 }
11053 #[doc(hidden)]
11054 pub fn default_instance() -> &'static Self {
11055 static DEFAULT: super::ObjectSet = super::ObjectSet::const_default();
11056 &DEFAULT
11057 }
11058 pub fn objects(&self) -> &[super::Object] {
11060 &self.objects
11061 }
11062 pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
11065 &mut self.objects
11066 }
11067 pub fn set_objects(&mut self, field: Vec<super::Object>) {
11069 self.objects = field;
11070 }
11071 pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
11073 self.set_objects(field);
11074 self
11075 }
11076 }
11077 impl super::OpenSignature {
11078 pub const fn const_default() -> Self {
11079 Self {
11080 reference: None,
11081 body: None,
11082 }
11083 }
11084 #[doc(hidden)]
11085 pub fn default_instance() -> &'static Self {
11086 static DEFAULT: super::OpenSignature = super::OpenSignature::const_default();
11087 &DEFAULT
11088 }
11089 pub fn with_reference<T: Into<super::open_signature::Reference>>(
11091 mut self,
11092 field: T,
11093 ) -> Self {
11094 self.set_reference(field.into());
11095 self
11096 }
11097 pub fn body(&self) -> &super::OpenSignatureBody {
11099 self.body
11100 .as_ref()
11101 .map(|field| field as _)
11102 .unwrap_or_else(|| super::OpenSignatureBody::default_instance() as _)
11103 }
11104 pub fn body_opt_mut(&mut self) -> Option<&mut super::OpenSignatureBody> {
11106 self.body.as_mut().map(|field| field as _)
11107 }
11108 pub fn body_mut(&mut self) -> &mut super::OpenSignatureBody {
11111 self.body.get_or_insert_default()
11112 }
11113 pub fn body_opt(&self) -> Option<&super::OpenSignatureBody> {
11115 self.body.as_ref().map(|field| field as _)
11116 }
11117 pub fn set_body<T: Into<super::OpenSignatureBody>>(&mut self, field: T) {
11119 self.body = Some(field.into().into());
11120 }
11121 pub fn with_body<T: Into<super::OpenSignatureBody>>(mut self, field: T) -> Self {
11123 self.set_body(field.into());
11124 self
11125 }
11126 }
11127 impl super::OpenSignatureBody {
11128 pub const fn const_default() -> Self {
11129 Self {
11130 r#type: None,
11131 type_name: None,
11132 type_parameter_instantiation: Vec::new(),
11133 type_parameter: None,
11134 }
11135 }
11136 #[doc(hidden)]
11137 pub fn default_instance() -> &'static Self {
11138 static DEFAULT: super::OpenSignatureBody = super::OpenSignatureBody::const_default();
11139 &DEFAULT
11140 }
11141 pub fn with_type<T: Into<super::open_signature_body::Type>>(
11143 mut self,
11144 field: T,
11145 ) -> Self {
11146 self.set_type(field.into());
11147 self
11148 }
11149 pub fn type_name_opt_mut(&mut self) -> Option<&mut String> {
11151 self.type_name.as_mut().map(|field| field as _)
11152 }
11153 pub fn type_name_mut(&mut self) -> &mut String {
11156 self.type_name.get_or_insert_default()
11157 }
11158 pub fn type_name_opt(&self) -> Option<&str> {
11160 self.type_name.as_ref().map(|field| field as _)
11161 }
11162 pub fn set_type_name<T: Into<String>>(&mut self, field: T) {
11164 self.type_name = Some(field.into().into());
11165 }
11166 pub fn with_type_name<T: Into<String>>(mut self, field: T) -> Self {
11168 self.set_type_name(field.into());
11169 self
11170 }
11171 pub fn type_parameter_instantiation(&self) -> &[super::OpenSignatureBody] {
11173 &self.type_parameter_instantiation
11174 }
11175 pub fn type_parameter_instantiation_mut(
11178 &mut self,
11179 ) -> &mut Vec<super::OpenSignatureBody> {
11180 &mut self.type_parameter_instantiation
11181 }
11182 pub fn set_type_parameter_instantiation(
11184 &mut self,
11185 field: Vec<super::OpenSignatureBody>,
11186 ) {
11187 self.type_parameter_instantiation = field;
11188 }
11189 pub fn with_type_parameter_instantiation(
11191 mut self,
11192 field: Vec<super::OpenSignatureBody>,
11193 ) -> Self {
11194 self.set_type_parameter_instantiation(field);
11195 self
11196 }
11197 pub fn type_parameter_opt_mut(&mut self) -> Option<&mut u32> {
11199 self.type_parameter.as_mut().map(|field| field as _)
11200 }
11201 pub fn type_parameter_mut(&mut self) -> &mut u32 {
11204 self.type_parameter.get_or_insert_default()
11205 }
11206 pub fn type_parameter_opt(&self) -> Option<u32> {
11208 self.type_parameter.as_ref().map(|field| *field)
11209 }
11210 pub fn set_type_parameter(&mut self, field: u32) {
11212 self.type_parameter = Some(field);
11213 }
11214 pub fn with_type_parameter(mut self, field: u32) -> Self {
11216 self.set_type_parameter(field);
11217 self
11218 }
11219 }
11220 impl super::Owner {
11221 pub const fn const_default() -> Self {
11222 Self {
11223 kind: None,
11224 address: None,
11225 version: None,
11226 }
11227 }
11228 #[doc(hidden)]
11229 pub fn default_instance() -> &'static Self {
11230 static DEFAULT: super::Owner = super::Owner::const_default();
11231 &DEFAULT
11232 }
11233 pub fn with_kind<T: Into<super::owner::OwnerKind>>(mut self, field: T) -> Self {
11235 self.set_kind(field.into());
11236 self
11237 }
11238 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
11240 self.address.as_mut().map(|field| field as _)
11241 }
11242 pub fn address_mut(&mut self) -> &mut String {
11245 self.address.get_or_insert_default()
11246 }
11247 pub fn address_opt(&self) -> Option<&str> {
11249 self.address.as_ref().map(|field| field as _)
11250 }
11251 pub fn set_address<T: Into<String>>(&mut self, field: T) {
11253 self.address = Some(field.into().into());
11254 }
11255 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
11257 self.set_address(field.into());
11258 self
11259 }
11260 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
11262 self.version.as_mut().map(|field| field as _)
11263 }
11264 pub fn version_mut(&mut self) -> &mut u64 {
11267 self.version.get_or_insert_default()
11268 }
11269 pub fn version_opt(&self) -> Option<u64> {
11271 self.version.as_ref().map(|field| *field)
11272 }
11273 pub fn set_version(&mut self, field: u64) {
11275 self.version = Some(field);
11276 }
11277 pub fn with_version(mut self, field: u64) -> Self {
11279 self.set_version(field);
11280 self
11281 }
11282 }
11283 impl super::Package {
11284 pub const fn const_default() -> Self {
11285 Self {
11286 storage_id: None,
11287 original_id: None,
11288 version: None,
11289 modules: Vec::new(),
11290 type_origins: Vec::new(),
11291 linkage: Vec::new(),
11292 }
11293 }
11294 #[doc(hidden)]
11295 pub fn default_instance() -> &'static Self {
11296 static DEFAULT: super::Package = super::Package::const_default();
11297 &DEFAULT
11298 }
11299 pub fn storage_id_opt_mut(&mut self) -> Option<&mut String> {
11301 self.storage_id.as_mut().map(|field| field as _)
11302 }
11303 pub fn storage_id_mut(&mut self) -> &mut String {
11306 self.storage_id.get_or_insert_default()
11307 }
11308 pub fn storage_id_opt(&self) -> Option<&str> {
11310 self.storage_id.as_ref().map(|field| field as _)
11311 }
11312 pub fn set_storage_id<T: Into<String>>(&mut self, field: T) {
11314 self.storage_id = Some(field.into().into());
11315 }
11316 pub fn with_storage_id<T: Into<String>>(mut self, field: T) -> Self {
11318 self.set_storage_id(field.into());
11319 self
11320 }
11321 pub fn original_id_opt_mut(&mut self) -> Option<&mut String> {
11323 self.original_id.as_mut().map(|field| field as _)
11324 }
11325 pub fn original_id_mut(&mut self) -> &mut String {
11328 self.original_id.get_or_insert_default()
11329 }
11330 pub fn original_id_opt(&self) -> Option<&str> {
11332 self.original_id.as_ref().map(|field| field as _)
11333 }
11334 pub fn set_original_id<T: Into<String>>(&mut self, field: T) {
11336 self.original_id = Some(field.into().into());
11337 }
11338 pub fn with_original_id<T: Into<String>>(mut self, field: T) -> Self {
11340 self.set_original_id(field.into());
11341 self
11342 }
11343 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
11345 self.version.as_mut().map(|field| field as _)
11346 }
11347 pub fn version_mut(&mut self) -> &mut u64 {
11350 self.version.get_or_insert_default()
11351 }
11352 pub fn version_opt(&self) -> Option<u64> {
11354 self.version.as_ref().map(|field| *field)
11355 }
11356 pub fn set_version(&mut self, field: u64) {
11358 self.version = Some(field);
11359 }
11360 pub fn with_version(mut self, field: u64) -> Self {
11362 self.set_version(field);
11363 self
11364 }
11365 pub fn modules(&self) -> &[super::Module] {
11367 &self.modules
11368 }
11369 pub fn modules_mut(&mut self) -> &mut Vec<super::Module> {
11372 &mut self.modules
11373 }
11374 pub fn set_modules(&mut self, field: Vec<super::Module>) {
11376 self.modules = field;
11377 }
11378 pub fn with_modules(mut self, field: Vec<super::Module>) -> Self {
11380 self.set_modules(field);
11381 self
11382 }
11383 pub fn type_origins(&self) -> &[super::TypeOrigin] {
11385 &self.type_origins
11386 }
11387 pub fn type_origins_mut(&mut self) -> &mut Vec<super::TypeOrigin> {
11390 &mut self.type_origins
11391 }
11392 pub fn set_type_origins(&mut self, field: Vec<super::TypeOrigin>) {
11394 self.type_origins = field;
11395 }
11396 pub fn with_type_origins(mut self, field: Vec<super::TypeOrigin>) -> Self {
11398 self.set_type_origins(field);
11399 self
11400 }
11401 pub fn linkage(&self) -> &[super::Linkage] {
11403 &self.linkage
11404 }
11405 pub fn linkage_mut(&mut self) -> &mut Vec<super::Linkage> {
11408 &mut self.linkage
11409 }
11410 pub fn set_linkage(&mut self, field: Vec<super::Linkage>) {
11412 self.linkage = field;
11413 }
11414 pub fn with_linkage(mut self, field: Vec<super::Linkage>) -> Self {
11416 self.set_linkage(field);
11417 self
11418 }
11419 }
11420 impl super::PackageUpgradeError {
11421 pub const fn const_default() -> Self {
11422 Self {
11423 kind: None,
11424 package_id: None,
11425 digest: None,
11426 policy: None,
11427 ticket_id: None,
11428 }
11429 }
11430 #[doc(hidden)]
11431 pub fn default_instance() -> &'static Self {
11432 static DEFAULT: super::PackageUpgradeError = super::PackageUpgradeError::const_default();
11433 &DEFAULT
11434 }
11435 pub fn with_kind<T: Into<super::package_upgrade_error::PackageUpgradeErrorKind>>(
11437 mut self,
11438 field: T,
11439 ) -> Self {
11440 self.set_kind(field.into());
11441 self
11442 }
11443 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
11445 self.package_id.as_mut().map(|field| field as _)
11446 }
11447 pub fn package_id_mut(&mut self) -> &mut String {
11450 self.package_id.get_or_insert_default()
11451 }
11452 pub fn package_id_opt(&self) -> Option<&str> {
11454 self.package_id.as_ref().map(|field| field as _)
11455 }
11456 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
11458 self.package_id = Some(field.into().into());
11459 }
11460 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
11462 self.set_package_id(field.into());
11463 self
11464 }
11465 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
11467 self.digest.as_mut().map(|field| field as _)
11468 }
11469 pub fn digest_mut(&mut self) -> &mut String {
11472 self.digest.get_or_insert_default()
11473 }
11474 pub fn digest_opt(&self) -> Option<&str> {
11476 self.digest.as_ref().map(|field| field as _)
11477 }
11478 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
11480 self.digest = Some(field.into().into());
11481 }
11482 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
11484 self.set_digest(field.into());
11485 self
11486 }
11487 pub fn policy_opt_mut(&mut self) -> Option<&mut u32> {
11489 self.policy.as_mut().map(|field| field as _)
11490 }
11491 pub fn policy_mut(&mut self) -> &mut u32 {
11494 self.policy.get_or_insert_default()
11495 }
11496 pub fn policy_opt(&self) -> Option<u32> {
11498 self.policy.as_ref().map(|field| *field)
11499 }
11500 pub fn set_policy(&mut self, field: u32) {
11502 self.policy = Some(field);
11503 }
11504 pub fn with_policy(mut self, field: u32) -> Self {
11506 self.set_policy(field);
11507 self
11508 }
11509 pub fn ticket_id_opt_mut(&mut self) -> Option<&mut String> {
11511 self.ticket_id.as_mut().map(|field| field as _)
11512 }
11513 pub fn ticket_id_mut(&mut self) -> &mut String {
11516 self.ticket_id.get_or_insert_default()
11517 }
11518 pub fn ticket_id_opt(&self) -> Option<&str> {
11520 self.ticket_id.as_ref().map(|field| field as _)
11521 }
11522 pub fn set_ticket_id<T: Into<String>>(&mut self, field: T) {
11524 self.ticket_id = Some(field.into().into());
11525 }
11526 pub fn with_ticket_id<T: Into<String>>(mut self, field: T) -> Self {
11528 self.set_ticket_id(field.into());
11529 self
11530 }
11531 }
11532 impl super::PackageVersion {
11533 pub const fn const_default() -> Self {
11534 Self {
11535 package_id: None,
11536 version: None,
11537 }
11538 }
11539 #[doc(hidden)]
11540 pub fn default_instance() -> &'static Self {
11541 static DEFAULT: super::PackageVersion = super::PackageVersion::const_default();
11542 &DEFAULT
11543 }
11544 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
11546 self.package_id.as_mut().map(|field| field as _)
11547 }
11548 pub fn package_id_mut(&mut self) -> &mut String {
11551 self.package_id.get_or_insert_default()
11552 }
11553 pub fn package_id_opt(&self) -> Option<&str> {
11555 self.package_id.as_ref().map(|field| field as _)
11556 }
11557 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
11559 self.package_id = Some(field.into().into());
11560 }
11561 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
11563 self.set_package_id(field.into());
11564 self
11565 }
11566 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
11568 self.version.as_mut().map(|field| field as _)
11569 }
11570 pub fn version_mut(&mut self) -> &mut u64 {
11573 self.version.get_or_insert_default()
11574 }
11575 pub fn version_opt(&self) -> Option<u64> {
11577 self.version.as_ref().map(|field| *field)
11578 }
11579 pub fn set_version(&mut self, field: u64) {
11581 self.version = Some(field);
11582 }
11583 pub fn with_version(mut self, field: u64) -> Self {
11585 self.set_version(field);
11586 self
11587 }
11588 }
11589 impl super::PasskeyAuthenticator {
11590 pub const fn const_default() -> Self {
11591 Self {
11592 authenticator_data: None,
11593 client_data_json: None,
11594 signature: None,
11595 }
11596 }
11597 #[doc(hidden)]
11598 pub fn default_instance() -> &'static Self {
11599 static DEFAULT: super::PasskeyAuthenticator = super::PasskeyAuthenticator::const_default();
11600 &DEFAULT
11601 }
11602 pub fn authenticator_data_opt(&self) -> Option<&[u8]> {
11604 self.authenticator_data.as_ref().map(|field| field as _)
11605 }
11606 pub fn set_authenticator_data<T: Into<::prost::bytes::Bytes>>(
11608 &mut self,
11609 field: T,
11610 ) {
11611 self.authenticator_data = Some(field.into().into());
11612 }
11613 pub fn with_authenticator_data<T: Into<::prost::bytes::Bytes>>(
11615 mut self,
11616 field: T,
11617 ) -> Self {
11618 self.set_authenticator_data(field.into());
11619 self
11620 }
11621 pub fn client_data_json_opt_mut(&mut self) -> Option<&mut String> {
11623 self.client_data_json.as_mut().map(|field| field as _)
11624 }
11625 pub fn client_data_json_mut(&mut self) -> &mut String {
11628 self.client_data_json.get_or_insert_default()
11629 }
11630 pub fn client_data_json_opt(&self) -> Option<&str> {
11632 self.client_data_json.as_ref().map(|field| field as _)
11633 }
11634 pub fn set_client_data_json<T: Into<String>>(&mut self, field: T) {
11636 self.client_data_json = Some(field.into().into());
11637 }
11638 pub fn with_client_data_json<T: Into<String>>(mut self, field: T) -> Self {
11640 self.set_client_data_json(field.into());
11641 self
11642 }
11643 pub fn signature(&self) -> &super::SimpleSignature {
11645 self.signature
11646 .as_ref()
11647 .map(|field| field as _)
11648 .unwrap_or_else(|| super::SimpleSignature::default_instance() as _)
11649 }
11650 pub fn signature_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
11652 self.signature.as_mut().map(|field| field as _)
11653 }
11654 pub fn signature_mut(&mut self) -> &mut super::SimpleSignature {
11657 self.signature.get_or_insert_default()
11658 }
11659 pub fn signature_opt(&self) -> Option<&super::SimpleSignature> {
11661 self.signature.as_ref().map(|field| field as _)
11662 }
11663 pub fn set_signature<T: Into<super::SimpleSignature>>(&mut self, field: T) {
11665 self.signature = Some(field.into().into());
11666 }
11667 pub fn with_signature<T: Into<super::SimpleSignature>>(
11669 mut self,
11670 field: T,
11671 ) -> Self {
11672 self.set_signature(field.into());
11673 self
11674 }
11675 }
11676 impl super::ProgrammableTransaction {
11677 pub const fn const_default() -> Self {
11678 Self {
11679 inputs: Vec::new(),
11680 commands: Vec::new(),
11681 }
11682 }
11683 #[doc(hidden)]
11684 pub fn default_instance() -> &'static Self {
11685 static DEFAULT: super::ProgrammableTransaction = super::ProgrammableTransaction::const_default();
11686 &DEFAULT
11687 }
11688 pub fn inputs(&self) -> &[super::Input] {
11690 &self.inputs
11691 }
11692 pub fn inputs_mut(&mut self) -> &mut Vec<super::Input> {
11695 &mut self.inputs
11696 }
11697 pub fn set_inputs(&mut self, field: Vec<super::Input>) {
11699 self.inputs = field;
11700 }
11701 pub fn with_inputs(mut self, field: Vec<super::Input>) -> Self {
11703 self.set_inputs(field);
11704 self
11705 }
11706 pub fn commands(&self) -> &[super::Command] {
11708 &self.commands
11709 }
11710 pub fn commands_mut(&mut self) -> &mut Vec<super::Command> {
11713 &mut self.commands
11714 }
11715 pub fn set_commands(&mut self, field: Vec<super::Command>) {
11717 self.commands = field;
11718 }
11719 pub fn with_commands(mut self, field: Vec<super::Command>) -> Self {
11721 self.set_commands(field);
11722 self
11723 }
11724 }
11725 impl super::ProtocolConfig {
11726 pub const fn const_default() -> Self {
11727 Self {
11728 protocol_version: None,
11729 feature_flags: std::collections::BTreeMap::new(),
11730 attributes: std::collections::BTreeMap::new(),
11731 }
11732 }
11733 #[doc(hidden)]
11734 pub fn default_instance() -> &'static Self {
11735 static DEFAULT: super::ProtocolConfig = super::ProtocolConfig::const_default();
11736 &DEFAULT
11737 }
11738 pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
11740 self.protocol_version.as_mut().map(|field| field as _)
11741 }
11742 pub fn protocol_version_mut(&mut self) -> &mut u64 {
11745 self.protocol_version.get_or_insert_default()
11746 }
11747 pub fn protocol_version_opt(&self) -> Option<u64> {
11749 self.protocol_version.as_ref().map(|field| *field)
11750 }
11751 pub fn set_protocol_version(&mut self, field: u64) {
11753 self.protocol_version = Some(field);
11754 }
11755 pub fn with_protocol_version(mut self, field: u64) -> Self {
11757 self.set_protocol_version(field);
11758 self
11759 }
11760 pub fn feature_flags(&self) -> &::std::collections::BTreeMap<String, bool> {
11762 &self.feature_flags
11763 }
11764 pub fn feature_flags_mut(
11767 &mut self,
11768 ) -> &mut ::std::collections::BTreeMap<String, bool> {
11769 &mut self.feature_flags
11770 }
11771 pub fn set_feature_flags(
11773 &mut self,
11774 field: ::std::collections::BTreeMap<String, bool>,
11775 ) {
11776 self.feature_flags = field;
11777 }
11778 pub fn with_feature_flags(
11780 mut self,
11781 field: ::std::collections::BTreeMap<String, bool>,
11782 ) -> Self {
11783 self.set_feature_flags(field);
11784 self
11785 }
11786 pub fn attributes(&self) -> &::std::collections::BTreeMap<String, String> {
11788 &self.attributes
11789 }
11790 pub fn attributes_mut(
11793 &mut self,
11794 ) -> &mut ::std::collections::BTreeMap<String, String> {
11795 &mut self.attributes
11796 }
11797 pub fn set_attributes(
11799 &mut self,
11800 field: ::std::collections::BTreeMap<String, String>,
11801 ) {
11802 self.attributes = field;
11803 }
11804 pub fn with_attributes(
11806 mut self,
11807 field: ::std::collections::BTreeMap<String, String>,
11808 ) -> Self {
11809 self.set_attributes(field);
11810 self
11811 }
11812 }
11813 impl super::Publish {
11814 pub const fn const_default() -> Self {
11815 Self {
11816 modules: Vec::new(),
11817 dependencies: Vec::new(),
11818 }
11819 }
11820 #[doc(hidden)]
11821 pub fn default_instance() -> &'static Self {
11822 static DEFAULT: super::Publish = super::Publish::const_default();
11823 &DEFAULT
11824 }
11825 pub fn modules(&self) -> &[::prost::bytes::Bytes] {
11827 &self.modules
11828 }
11829 pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
11832 &mut self.modules
11833 }
11834 pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
11836 self.modules = field;
11837 }
11838 pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
11840 self.set_modules(field);
11841 self
11842 }
11843 pub fn dependencies(&self) -> &[String] {
11845 &self.dependencies
11846 }
11847 pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
11850 &mut self.dependencies
11851 }
11852 pub fn set_dependencies(&mut self, field: Vec<String>) {
11854 self.dependencies = field;
11855 }
11856 pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
11858 self.set_dependencies(field);
11859 self
11860 }
11861 }
11862 impl super::RandomnessStateUpdate {
11863 pub const fn const_default() -> Self {
11864 Self {
11865 epoch: None,
11866 randomness_round: None,
11867 random_bytes: None,
11868 randomness_object_initial_shared_version: None,
11869 }
11870 }
11871 #[doc(hidden)]
11872 pub fn default_instance() -> &'static Self {
11873 static DEFAULT: super::RandomnessStateUpdate = super::RandomnessStateUpdate::const_default();
11874 &DEFAULT
11875 }
11876 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
11878 self.epoch.as_mut().map(|field| field as _)
11879 }
11880 pub fn epoch_mut(&mut self) -> &mut u64 {
11883 self.epoch.get_or_insert_default()
11884 }
11885 pub fn epoch_opt(&self) -> Option<u64> {
11887 self.epoch.as_ref().map(|field| *field)
11888 }
11889 pub fn set_epoch(&mut self, field: u64) {
11891 self.epoch = Some(field);
11892 }
11893 pub fn with_epoch(mut self, field: u64) -> Self {
11895 self.set_epoch(field);
11896 self
11897 }
11898 pub fn randomness_round_opt_mut(&mut self) -> Option<&mut u64> {
11900 self.randomness_round.as_mut().map(|field| field as _)
11901 }
11902 pub fn randomness_round_mut(&mut self) -> &mut u64 {
11905 self.randomness_round.get_or_insert_default()
11906 }
11907 pub fn randomness_round_opt(&self) -> Option<u64> {
11909 self.randomness_round.as_ref().map(|field| *field)
11910 }
11911 pub fn set_randomness_round(&mut self, field: u64) {
11913 self.randomness_round = Some(field);
11914 }
11915 pub fn with_randomness_round(mut self, field: u64) -> Self {
11917 self.set_randomness_round(field);
11918 self
11919 }
11920 pub fn random_bytes_opt(&self) -> Option<&[u8]> {
11922 self.random_bytes.as_ref().map(|field| field as _)
11923 }
11924 pub fn set_random_bytes<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
11926 self.random_bytes = Some(field.into().into());
11927 }
11928 pub fn with_random_bytes<T: Into<::prost::bytes::Bytes>>(
11930 mut self,
11931 field: T,
11932 ) -> Self {
11933 self.set_random_bytes(field.into());
11934 self
11935 }
11936 pub fn randomness_object_initial_shared_version_opt_mut(
11938 &mut self,
11939 ) -> Option<&mut u64> {
11940 self.randomness_object_initial_shared_version
11941 .as_mut()
11942 .map(|field| field as _)
11943 }
11944 pub fn randomness_object_initial_shared_version_mut(&mut self) -> &mut u64 {
11947 self.randomness_object_initial_shared_version.get_or_insert_default()
11948 }
11949 pub fn randomness_object_initial_shared_version_opt(&self) -> Option<u64> {
11951 self.randomness_object_initial_shared_version.as_ref().map(|field| *field)
11952 }
11953 pub fn set_randomness_object_initial_shared_version(&mut self, field: u64) {
11955 self.randomness_object_initial_shared_version = Some(field);
11956 }
11957 pub fn with_randomness_object_initial_shared_version(
11959 mut self,
11960 field: u64,
11961 ) -> Self {
11962 self.set_randomness_object_initial_shared_version(field);
11963 self
11964 }
11965 }
11966 impl super::RegulatedCoinMetadata {
11967 pub const fn const_default() -> Self {
11968 Self {
11969 id: None,
11970 coin_metadata_object: None,
11971 deny_cap_object: None,
11972 allow_global_pause: None,
11973 variant: None,
11974 coin_regulated_state: None,
11975 }
11976 }
11977 #[doc(hidden)]
11978 pub fn default_instance() -> &'static Self {
11979 static DEFAULT: super::RegulatedCoinMetadata = super::RegulatedCoinMetadata::const_default();
11980 &DEFAULT
11981 }
11982 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
11984 self.id.as_mut().map(|field| field as _)
11985 }
11986 pub fn id_mut(&mut self) -> &mut String {
11989 self.id.get_or_insert_default()
11990 }
11991 pub fn id_opt(&self) -> Option<&str> {
11993 self.id.as_ref().map(|field| field as _)
11994 }
11995 pub fn set_id<T: Into<String>>(&mut self, field: T) {
11997 self.id = Some(field.into().into());
11998 }
11999 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
12001 self.set_id(field.into());
12002 self
12003 }
12004 pub fn coin_metadata_object_opt_mut(&mut self) -> Option<&mut String> {
12006 self.coin_metadata_object.as_mut().map(|field| field as _)
12007 }
12008 pub fn coin_metadata_object_mut(&mut self) -> &mut String {
12011 self.coin_metadata_object.get_or_insert_default()
12012 }
12013 pub fn coin_metadata_object_opt(&self) -> Option<&str> {
12015 self.coin_metadata_object.as_ref().map(|field| field as _)
12016 }
12017 pub fn set_coin_metadata_object<T: Into<String>>(&mut self, field: T) {
12019 self.coin_metadata_object = Some(field.into().into());
12020 }
12021 pub fn with_coin_metadata_object<T: Into<String>>(mut self, field: T) -> Self {
12023 self.set_coin_metadata_object(field.into());
12024 self
12025 }
12026 pub fn deny_cap_object_opt_mut(&mut self) -> Option<&mut String> {
12028 self.deny_cap_object.as_mut().map(|field| field as _)
12029 }
12030 pub fn deny_cap_object_mut(&mut self) -> &mut String {
12033 self.deny_cap_object.get_or_insert_default()
12034 }
12035 pub fn deny_cap_object_opt(&self) -> Option<&str> {
12037 self.deny_cap_object.as_ref().map(|field| field as _)
12038 }
12039 pub fn set_deny_cap_object<T: Into<String>>(&mut self, field: T) {
12041 self.deny_cap_object = Some(field.into().into());
12042 }
12043 pub fn with_deny_cap_object<T: Into<String>>(mut self, field: T) -> Self {
12045 self.set_deny_cap_object(field.into());
12046 self
12047 }
12048 pub fn allow_global_pause_opt_mut(&mut self) -> Option<&mut bool> {
12050 self.allow_global_pause.as_mut().map(|field| field as _)
12051 }
12052 pub fn allow_global_pause_mut(&mut self) -> &mut bool {
12055 self.allow_global_pause.get_or_insert_default()
12056 }
12057 pub fn allow_global_pause_opt(&self) -> Option<bool> {
12059 self.allow_global_pause.as_ref().map(|field| *field)
12060 }
12061 pub fn set_allow_global_pause(&mut self, field: bool) {
12063 self.allow_global_pause = Some(field);
12064 }
12065 pub fn with_allow_global_pause(mut self, field: bool) -> Self {
12067 self.set_allow_global_pause(field);
12068 self
12069 }
12070 pub fn variant_opt_mut(&mut self) -> Option<&mut u32> {
12072 self.variant.as_mut().map(|field| field as _)
12073 }
12074 pub fn variant_mut(&mut self) -> &mut u32 {
12077 self.variant.get_or_insert_default()
12078 }
12079 pub fn variant_opt(&self) -> Option<u32> {
12081 self.variant.as_ref().map(|field| *field)
12082 }
12083 pub fn set_variant(&mut self, field: u32) {
12085 self.variant = Some(field);
12086 }
12087 pub fn with_variant(mut self, field: u32) -> Self {
12089 self.set_variant(field);
12090 self
12091 }
12092 pub fn with_coin_regulated_state<
12094 T: Into<super::regulated_coin_metadata::CoinRegulatedState>,
12095 >(mut self, field: T) -> Self {
12096 self.set_coin_regulated_state(field.into());
12097 self
12098 }
12099 }
12100 impl super::ReverseLookupNameRequest {
12101 pub const fn const_default() -> Self {
12102 Self { address: None }
12103 }
12104 #[doc(hidden)]
12105 pub fn default_instance() -> &'static Self {
12106 static DEFAULT: super::ReverseLookupNameRequest = super::ReverseLookupNameRequest::const_default();
12107 &DEFAULT
12108 }
12109 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
12111 self.address.as_mut().map(|field| field as _)
12112 }
12113 pub fn address_mut(&mut self) -> &mut String {
12116 self.address.get_or_insert_default()
12117 }
12118 pub fn address_opt(&self) -> Option<&str> {
12120 self.address.as_ref().map(|field| field as _)
12121 }
12122 pub fn set_address<T: Into<String>>(&mut self, field: T) {
12124 self.address = Some(field.into().into());
12125 }
12126 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
12128 self.set_address(field.into());
12129 self
12130 }
12131 }
12132 impl super::ReverseLookupNameResponse {
12133 pub const fn const_default() -> Self {
12134 Self { record: None }
12135 }
12136 #[doc(hidden)]
12137 pub fn default_instance() -> &'static Self {
12138 static DEFAULT: super::ReverseLookupNameResponse = super::ReverseLookupNameResponse::const_default();
12139 &DEFAULT
12140 }
12141 pub fn record(&self) -> &super::NameRecord {
12143 self.record
12144 .as_ref()
12145 .map(|field| field as _)
12146 .unwrap_or_else(|| super::NameRecord::default_instance() as _)
12147 }
12148 pub fn record_opt_mut(&mut self) -> Option<&mut super::NameRecord> {
12150 self.record.as_mut().map(|field| field as _)
12151 }
12152 pub fn record_mut(&mut self) -> &mut super::NameRecord {
12155 self.record.get_or_insert_default()
12156 }
12157 pub fn record_opt(&self) -> Option<&super::NameRecord> {
12159 self.record.as_ref().map(|field| field as _)
12160 }
12161 pub fn set_record<T: Into<super::NameRecord>>(&mut self, field: T) {
12163 self.record = Some(field.into().into());
12164 }
12165 pub fn with_record<T: Into<super::NameRecord>>(mut self, field: T) -> Self {
12167 self.set_record(field.into());
12168 self
12169 }
12170 }
12171 impl super::SimpleSignature {
12172 pub const fn const_default() -> Self {
12173 Self {
12174 scheme: None,
12175 signature: None,
12176 public_key: None,
12177 }
12178 }
12179 #[doc(hidden)]
12180 pub fn default_instance() -> &'static Self {
12181 static DEFAULT: super::SimpleSignature = super::SimpleSignature::const_default();
12182 &DEFAULT
12183 }
12184 pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
12186 self.set_scheme(field.into());
12187 self
12188 }
12189 pub fn signature_opt(&self) -> Option<&[u8]> {
12191 self.signature.as_ref().map(|field| field as _)
12192 }
12193 pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
12195 self.signature = Some(field.into().into());
12196 }
12197 pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
12199 mut self,
12200 field: T,
12201 ) -> Self {
12202 self.set_signature(field.into());
12203 self
12204 }
12205 pub fn public_key_opt(&self) -> Option<&[u8]> {
12207 self.public_key.as_ref().map(|field| field as _)
12208 }
12209 pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
12211 self.public_key = Some(field.into().into());
12212 }
12213 pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
12215 mut self,
12216 field: T,
12217 ) -> Self {
12218 self.set_public_key(field.into());
12219 self
12220 }
12221 }
12222 impl super::SimulateTransactionRequest {
12223 pub const fn const_default() -> Self {
12224 Self {
12225 transaction: None,
12226 read_mask: None,
12227 checks: None,
12228 do_gas_selection: None,
12229 }
12230 }
12231 #[doc(hidden)]
12232 pub fn default_instance() -> &'static Self {
12233 static DEFAULT: super::SimulateTransactionRequest = super::SimulateTransactionRequest::const_default();
12234 &DEFAULT
12235 }
12236 pub fn transaction(&self) -> &super::Transaction {
12238 self.transaction
12239 .as_ref()
12240 .map(|field| field as _)
12241 .unwrap_or_else(|| super::Transaction::default_instance() as _)
12242 }
12243 pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
12245 self.transaction.as_mut().map(|field| field as _)
12246 }
12247 pub fn transaction_mut(&mut self) -> &mut super::Transaction {
12250 self.transaction.get_or_insert_default()
12251 }
12252 pub fn transaction_opt(&self) -> Option<&super::Transaction> {
12254 self.transaction.as_ref().map(|field| field as _)
12255 }
12256 pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
12258 self.transaction = Some(field.into().into());
12259 }
12260 pub fn with_transaction<T: Into<super::Transaction>>(
12262 mut self,
12263 field: T,
12264 ) -> Self {
12265 self.set_transaction(field.into());
12266 self
12267 }
12268 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
12270 self.read_mask.as_mut().map(|field| field as _)
12271 }
12272 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
12275 self.read_mask.get_or_insert_default()
12276 }
12277 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
12279 self.read_mask.as_ref().map(|field| field as _)
12280 }
12281 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
12283 self.read_mask = Some(field.into().into());
12284 }
12285 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
12287 mut self,
12288 field: T,
12289 ) -> Self {
12290 self.set_read_mask(field.into());
12291 self
12292 }
12293 pub fn with_checks<
12295 T: Into<super::simulate_transaction_request::TransactionChecks>,
12296 >(mut self, field: T) -> Self {
12297 self.set_checks(field.into());
12298 self
12299 }
12300 pub fn do_gas_selection_opt_mut(&mut self) -> Option<&mut bool> {
12302 self.do_gas_selection.as_mut().map(|field| field as _)
12303 }
12304 pub fn do_gas_selection_mut(&mut self) -> &mut bool {
12307 self.do_gas_selection.get_or_insert_default()
12308 }
12309 pub fn do_gas_selection_opt(&self) -> Option<bool> {
12311 self.do_gas_selection.as_ref().map(|field| *field)
12312 }
12313 pub fn set_do_gas_selection(&mut self, field: bool) {
12315 self.do_gas_selection = Some(field);
12316 }
12317 pub fn with_do_gas_selection(mut self, field: bool) -> Self {
12319 self.set_do_gas_selection(field);
12320 self
12321 }
12322 }
12323 impl super::SimulateTransactionResponse {
12324 pub const fn const_default() -> Self {
12325 Self {
12326 transaction: None,
12327 command_outputs: Vec::new(),
12328 }
12329 }
12330 #[doc(hidden)]
12331 pub fn default_instance() -> &'static Self {
12332 static DEFAULT: super::SimulateTransactionResponse = super::SimulateTransactionResponse::const_default();
12333 &DEFAULT
12334 }
12335 pub fn transaction(&self) -> &super::ExecutedTransaction {
12337 self.transaction
12338 .as_ref()
12339 .map(|field| field as _)
12340 .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
12341 }
12342 pub fn transaction_opt_mut(
12344 &mut self,
12345 ) -> Option<&mut super::ExecutedTransaction> {
12346 self.transaction.as_mut().map(|field| field as _)
12347 }
12348 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
12351 self.transaction.get_or_insert_default()
12352 }
12353 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
12355 self.transaction.as_ref().map(|field| field as _)
12356 }
12357 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
12359 &mut self,
12360 field: T,
12361 ) {
12362 self.transaction = Some(field.into().into());
12363 }
12364 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
12366 mut self,
12367 field: T,
12368 ) -> Self {
12369 self.set_transaction(field.into());
12370 self
12371 }
12372 pub fn command_outputs(&self) -> &[super::CommandResult] {
12374 &self.command_outputs
12375 }
12376 pub fn command_outputs_mut(&mut self) -> &mut Vec<super::CommandResult> {
12379 &mut self.command_outputs
12380 }
12381 pub fn set_command_outputs(&mut self, field: Vec<super::CommandResult>) {
12383 self.command_outputs = field;
12384 }
12385 pub fn with_command_outputs(mut self, field: Vec<super::CommandResult>) -> Self {
12387 self.set_command_outputs(field);
12388 self
12389 }
12390 }
12391 impl super::SizeError {
12392 pub const fn const_default() -> Self {
12393 Self { size: None, max_size: None }
12394 }
12395 #[doc(hidden)]
12396 pub fn default_instance() -> &'static Self {
12397 static DEFAULT: super::SizeError = super::SizeError::const_default();
12398 &DEFAULT
12399 }
12400 pub fn size_opt_mut(&mut self) -> Option<&mut u64> {
12402 self.size.as_mut().map(|field| field as _)
12403 }
12404 pub fn size_mut(&mut self) -> &mut u64 {
12407 self.size.get_or_insert_default()
12408 }
12409 pub fn size_opt(&self) -> Option<u64> {
12411 self.size.as_ref().map(|field| *field)
12412 }
12413 pub fn set_size(&mut self, field: u64) {
12415 self.size = Some(field);
12416 }
12417 pub fn with_size(mut self, field: u64) -> Self {
12419 self.set_size(field);
12420 self
12421 }
12422 pub fn max_size_opt_mut(&mut self) -> Option<&mut u64> {
12424 self.max_size.as_mut().map(|field| field as _)
12425 }
12426 pub fn max_size_mut(&mut self) -> &mut u64 {
12429 self.max_size.get_or_insert_default()
12430 }
12431 pub fn max_size_opt(&self) -> Option<u64> {
12433 self.max_size.as_ref().map(|field| *field)
12434 }
12435 pub fn set_max_size(&mut self, field: u64) {
12437 self.max_size = Some(field);
12438 }
12439 pub fn with_max_size(mut self, field: u64) -> Self {
12441 self.set_max_size(field);
12442 self
12443 }
12444 }
12445 impl super::SplitCoins {
12446 pub const fn const_default() -> Self {
12447 Self {
12448 coin: None,
12449 amounts: Vec::new(),
12450 }
12451 }
12452 #[doc(hidden)]
12453 pub fn default_instance() -> &'static Self {
12454 static DEFAULT: super::SplitCoins = super::SplitCoins::const_default();
12455 &DEFAULT
12456 }
12457 pub fn coin(&self) -> &super::Argument {
12459 self.coin
12460 .as_ref()
12461 .map(|field| field as _)
12462 .unwrap_or_else(|| super::Argument::default_instance() as _)
12463 }
12464 pub fn coin_opt_mut(&mut self) -> Option<&mut super::Argument> {
12466 self.coin.as_mut().map(|field| field as _)
12467 }
12468 pub fn coin_mut(&mut self) -> &mut super::Argument {
12471 self.coin.get_or_insert_default()
12472 }
12473 pub fn coin_opt(&self) -> Option<&super::Argument> {
12475 self.coin.as_ref().map(|field| field as _)
12476 }
12477 pub fn set_coin<T: Into<super::Argument>>(&mut self, field: T) {
12479 self.coin = Some(field.into().into());
12480 }
12481 pub fn with_coin<T: Into<super::Argument>>(mut self, field: T) -> Self {
12483 self.set_coin(field.into());
12484 self
12485 }
12486 pub fn amounts(&self) -> &[super::Argument] {
12488 &self.amounts
12489 }
12490 pub fn amounts_mut(&mut self) -> &mut Vec<super::Argument> {
12493 &mut self.amounts
12494 }
12495 pub fn set_amounts(&mut self, field: Vec<super::Argument>) {
12497 self.amounts = field;
12498 }
12499 pub fn with_amounts(mut self, field: Vec<super::Argument>) -> Self {
12501 self.set_amounts(field);
12502 self
12503 }
12504 }
12505 impl super::StakeSubsidy {
12506 pub const fn const_default() -> Self {
12507 Self {
12508 balance: None,
12509 distribution_counter: None,
12510 current_distribution_amount: None,
12511 stake_subsidy_period_length: None,
12512 stake_subsidy_decrease_rate: None,
12513 extra_fields: None,
12514 }
12515 }
12516 #[doc(hidden)]
12517 pub fn default_instance() -> &'static Self {
12518 static DEFAULT: super::StakeSubsidy = super::StakeSubsidy::const_default();
12519 &DEFAULT
12520 }
12521 pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
12523 self.balance.as_mut().map(|field| field as _)
12524 }
12525 pub fn balance_mut(&mut self) -> &mut u64 {
12528 self.balance.get_or_insert_default()
12529 }
12530 pub fn balance_opt(&self) -> Option<u64> {
12532 self.balance.as_ref().map(|field| *field)
12533 }
12534 pub fn set_balance(&mut self, field: u64) {
12536 self.balance = Some(field);
12537 }
12538 pub fn with_balance(mut self, field: u64) -> Self {
12540 self.set_balance(field);
12541 self
12542 }
12543 pub fn distribution_counter_opt_mut(&mut self) -> Option<&mut u64> {
12545 self.distribution_counter.as_mut().map(|field| field as _)
12546 }
12547 pub fn distribution_counter_mut(&mut self) -> &mut u64 {
12550 self.distribution_counter.get_or_insert_default()
12551 }
12552 pub fn distribution_counter_opt(&self) -> Option<u64> {
12554 self.distribution_counter.as_ref().map(|field| *field)
12555 }
12556 pub fn set_distribution_counter(&mut self, field: u64) {
12558 self.distribution_counter = Some(field);
12559 }
12560 pub fn with_distribution_counter(mut self, field: u64) -> Self {
12562 self.set_distribution_counter(field);
12563 self
12564 }
12565 pub fn current_distribution_amount_opt_mut(&mut self) -> Option<&mut u64> {
12567 self.current_distribution_amount.as_mut().map(|field| field as _)
12568 }
12569 pub fn current_distribution_amount_mut(&mut self) -> &mut u64 {
12572 self.current_distribution_amount.get_or_insert_default()
12573 }
12574 pub fn current_distribution_amount_opt(&self) -> Option<u64> {
12576 self.current_distribution_amount.as_ref().map(|field| *field)
12577 }
12578 pub fn set_current_distribution_amount(&mut self, field: u64) {
12580 self.current_distribution_amount = Some(field);
12581 }
12582 pub fn with_current_distribution_amount(mut self, field: u64) -> Self {
12584 self.set_current_distribution_amount(field);
12585 self
12586 }
12587 pub fn stake_subsidy_period_length_opt_mut(&mut self) -> Option<&mut u64> {
12589 self.stake_subsidy_period_length.as_mut().map(|field| field as _)
12590 }
12591 pub fn stake_subsidy_period_length_mut(&mut self) -> &mut u64 {
12594 self.stake_subsidy_period_length.get_or_insert_default()
12595 }
12596 pub fn stake_subsidy_period_length_opt(&self) -> Option<u64> {
12598 self.stake_subsidy_period_length.as_ref().map(|field| *field)
12599 }
12600 pub fn set_stake_subsidy_period_length(&mut self, field: u64) {
12602 self.stake_subsidy_period_length = Some(field);
12603 }
12604 pub fn with_stake_subsidy_period_length(mut self, field: u64) -> Self {
12606 self.set_stake_subsidy_period_length(field);
12607 self
12608 }
12609 pub fn stake_subsidy_decrease_rate_opt_mut(&mut self) -> Option<&mut u32> {
12611 self.stake_subsidy_decrease_rate.as_mut().map(|field| field as _)
12612 }
12613 pub fn stake_subsidy_decrease_rate_mut(&mut self) -> &mut u32 {
12616 self.stake_subsidy_decrease_rate.get_or_insert_default()
12617 }
12618 pub fn stake_subsidy_decrease_rate_opt(&self) -> Option<u32> {
12620 self.stake_subsidy_decrease_rate.as_ref().map(|field| *field)
12621 }
12622 pub fn set_stake_subsidy_decrease_rate(&mut self, field: u32) {
12624 self.stake_subsidy_decrease_rate = Some(field);
12625 }
12626 pub fn with_stake_subsidy_decrease_rate(mut self, field: u32) -> Self {
12628 self.set_stake_subsidy_decrease_rate(field);
12629 self
12630 }
12631 pub fn extra_fields(&self) -> &super::MoveTable {
12633 self.extra_fields
12634 .as_ref()
12635 .map(|field| field as _)
12636 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
12637 }
12638 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
12640 self.extra_fields.as_mut().map(|field| field as _)
12641 }
12642 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
12645 self.extra_fields.get_or_insert_default()
12646 }
12647 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
12649 self.extra_fields.as_ref().map(|field| field as _)
12650 }
12651 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
12653 self.extra_fields = Some(field.into().into());
12654 }
12655 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
12657 self.set_extra_fields(field.into());
12658 self
12659 }
12660 }
12661 impl super::StakingPool {
12662 pub const fn const_default() -> Self {
12663 Self {
12664 id: None,
12665 activation_epoch: None,
12666 deactivation_epoch: None,
12667 sui_balance: None,
12668 rewards_pool: None,
12669 pool_token_balance: None,
12670 exchange_rates: None,
12671 pending_stake: None,
12672 pending_total_sui_withdraw: None,
12673 pending_pool_token_withdraw: None,
12674 extra_fields: None,
12675 }
12676 }
12677 #[doc(hidden)]
12678 pub fn default_instance() -> &'static Self {
12679 static DEFAULT: super::StakingPool = super::StakingPool::const_default();
12680 &DEFAULT
12681 }
12682 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
12684 self.id.as_mut().map(|field| field as _)
12685 }
12686 pub fn id_mut(&mut self) -> &mut String {
12689 self.id.get_or_insert_default()
12690 }
12691 pub fn id_opt(&self) -> Option<&str> {
12693 self.id.as_ref().map(|field| field as _)
12694 }
12695 pub fn set_id<T: Into<String>>(&mut self, field: T) {
12697 self.id = Some(field.into().into());
12698 }
12699 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
12701 self.set_id(field.into());
12702 self
12703 }
12704 pub fn activation_epoch_opt_mut(&mut self) -> Option<&mut u64> {
12706 self.activation_epoch.as_mut().map(|field| field as _)
12707 }
12708 pub fn activation_epoch_mut(&mut self) -> &mut u64 {
12711 self.activation_epoch.get_or_insert_default()
12712 }
12713 pub fn activation_epoch_opt(&self) -> Option<u64> {
12715 self.activation_epoch.as_ref().map(|field| *field)
12716 }
12717 pub fn set_activation_epoch(&mut self, field: u64) {
12719 self.activation_epoch = Some(field);
12720 }
12721 pub fn with_activation_epoch(mut self, field: u64) -> Self {
12723 self.set_activation_epoch(field);
12724 self
12725 }
12726 pub fn deactivation_epoch_opt_mut(&mut self) -> Option<&mut u64> {
12728 self.deactivation_epoch.as_mut().map(|field| field as _)
12729 }
12730 pub fn deactivation_epoch_mut(&mut self) -> &mut u64 {
12733 self.deactivation_epoch.get_or_insert_default()
12734 }
12735 pub fn deactivation_epoch_opt(&self) -> Option<u64> {
12737 self.deactivation_epoch.as_ref().map(|field| *field)
12738 }
12739 pub fn set_deactivation_epoch(&mut self, field: u64) {
12741 self.deactivation_epoch = Some(field);
12742 }
12743 pub fn with_deactivation_epoch(mut self, field: u64) -> Self {
12745 self.set_deactivation_epoch(field);
12746 self
12747 }
12748 pub fn sui_balance_opt_mut(&mut self) -> Option<&mut u64> {
12750 self.sui_balance.as_mut().map(|field| field as _)
12751 }
12752 pub fn sui_balance_mut(&mut self) -> &mut u64 {
12755 self.sui_balance.get_or_insert_default()
12756 }
12757 pub fn sui_balance_opt(&self) -> Option<u64> {
12759 self.sui_balance.as_ref().map(|field| *field)
12760 }
12761 pub fn set_sui_balance(&mut self, field: u64) {
12763 self.sui_balance = Some(field);
12764 }
12765 pub fn with_sui_balance(mut self, field: u64) -> Self {
12767 self.set_sui_balance(field);
12768 self
12769 }
12770 pub fn rewards_pool_opt_mut(&mut self) -> Option<&mut u64> {
12772 self.rewards_pool.as_mut().map(|field| field as _)
12773 }
12774 pub fn rewards_pool_mut(&mut self) -> &mut u64 {
12777 self.rewards_pool.get_or_insert_default()
12778 }
12779 pub fn rewards_pool_opt(&self) -> Option<u64> {
12781 self.rewards_pool.as_ref().map(|field| *field)
12782 }
12783 pub fn set_rewards_pool(&mut self, field: u64) {
12785 self.rewards_pool = Some(field);
12786 }
12787 pub fn with_rewards_pool(mut self, field: u64) -> Self {
12789 self.set_rewards_pool(field);
12790 self
12791 }
12792 pub fn pool_token_balance_opt_mut(&mut self) -> Option<&mut u64> {
12794 self.pool_token_balance.as_mut().map(|field| field as _)
12795 }
12796 pub fn pool_token_balance_mut(&mut self) -> &mut u64 {
12799 self.pool_token_balance.get_or_insert_default()
12800 }
12801 pub fn pool_token_balance_opt(&self) -> Option<u64> {
12803 self.pool_token_balance.as_ref().map(|field| *field)
12804 }
12805 pub fn set_pool_token_balance(&mut self, field: u64) {
12807 self.pool_token_balance = Some(field);
12808 }
12809 pub fn with_pool_token_balance(mut self, field: u64) -> Self {
12811 self.set_pool_token_balance(field);
12812 self
12813 }
12814 pub fn exchange_rates(&self) -> &super::MoveTable {
12816 self.exchange_rates
12817 .as_ref()
12818 .map(|field| field as _)
12819 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
12820 }
12821 pub fn exchange_rates_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
12823 self.exchange_rates.as_mut().map(|field| field as _)
12824 }
12825 pub fn exchange_rates_mut(&mut self) -> &mut super::MoveTable {
12828 self.exchange_rates.get_or_insert_default()
12829 }
12830 pub fn exchange_rates_opt(&self) -> Option<&super::MoveTable> {
12832 self.exchange_rates.as_ref().map(|field| field as _)
12833 }
12834 pub fn set_exchange_rates<T: Into<super::MoveTable>>(&mut self, field: T) {
12836 self.exchange_rates = Some(field.into().into());
12837 }
12838 pub fn with_exchange_rates<T: Into<super::MoveTable>>(
12840 mut self,
12841 field: T,
12842 ) -> Self {
12843 self.set_exchange_rates(field.into());
12844 self
12845 }
12846 pub fn pending_stake_opt_mut(&mut self) -> Option<&mut u64> {
12848 self.pending_stake.as_mut().map(|field| field as _)
12849 }
12850 pub fn pending_stake_mut(&mut self) -> &mut u64 {
12853 self.pending_stake.get_or_insert_default()
12854 }
12855 pub fn pending_stake_opt(&self) -> Option<u64> {
12857 self.pending_stake.as_ref().map(|field| *field)
12858 }
12859 pub fn set_pending_stake(&mut self, field: u64) {
12861 self.pending_stake = Some(field);
12862 }
12863 pub fn with_pending_stake(mut self, field: u64) -> Self {
12865 self.set_pending_stake(field);
12866 self
12867 }
12868 pub fn pending_total_sui_withdraw_opt_mut(&mut self) -> Option<&mut u64> {
12870 self.pending_total_sui_withdraw.as_mut().map(|field| field as _)
12871 }
12872 pub fn pending_total_sui_withdraw_mut(&mut self) -> &mut u64 {
12875 self.pending_total_sui_withdraw.get_or_insert_default()
12876 }
12877 pub fn pending_total_sui_withdraw_opt(&self) -> Option<u64> {
12879 self.pending_total_sui_withdraw.as_ref().map(|field| *field)
12880 }
12881 pub fn set_pending_total_sui_withdraw(&mut self, field: u64) {
12883 self.pending_total_sui_withdraw = Some(field);
12884 }
12885 pub fn with_pending_total_sui_withdraw(mut self, field: u64) -> Self {
12887 self.set_pending_total_sui_withdraw(field);
12888 self
12889 }
12890 pub fn pending_pool_token_withdraw_opt_mut(&mut self) -> Option<&mut u64> {
12892 self.pending_pool_token_withdraw.as_mut().map(|field| field as _)
12893 }
12894 pub fn pending_pool_token_withdraw_mut(&mut self) -> &mut u64 {
12897 self.pending_pool_token_withdraw.get_or_insert_default()
12898 }
12899 pub fn pending_pool_token_withdraw_opt(&self) -> Option<u64> {
12901 self.pending_pool_token_withdraw.as_ref().map(|field| *field)
12902 }
12903 pub fn set_pending_pool_token_withdraw(&mut self, field: u64) {
12905 self.pending_pool_token_withdraw = Some(field);
12906 }
12907 pub fn with_pending_pool_token_withdraw(mut self, field: u64) -> Self {
12909 self.set_pending_pool_token_withdraw(field);
12910 self
12911 }
12912 pub fn extra_fields(&self) -> &super::MoveTable {
12914 self.extra_fields
12915 .as_ref()
12916 .map(|field| field as _)
12917 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
12918 }
12919 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
12921 self.extra_fields.as_mut().map(|field| field as _)
12922 }
12923 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
12926 self.extra_fields.get_or_insert_default()
12927 }
12928 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
12930 self.extra_fields.as_ref().map(|field| field as _)
12931 }
12932 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
12934 self.extra_fields = Some(field.into().into());
12935 }
12936 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
12938 self.set_extra_fields(field.into());
12939 self
12940 }
12941 }
12942 impl super::StorageFund {
12943 pub const fn const_default() -> Self {
12944 Self {
12945 total_object_storage_rebates: None,
12946 non_refundable_balance: None,
12947 }
12948 }
12949 #[doc(hidden)]
12950 pub fn default_instance() -> &'static Self {
12951 static DEFAULT: super::StorageFund = super::StorageFund::const_default();
12952 &DEFAULT
12953 }
12954 pub fn total_object_storage_rebates_opt_mut(&mut self) -> Option<&mut u64> {
12956 self.total_object_storage_rebates.as_mut().map(|field| field as _)
12957 }
12958 pub fn total_object_storage_rebates_mut(&mut self) -> &mut u64 {
12961 self.total_object_storage_rebates.get_or_insert_default()
12962 }
12963 pub fn total_object_storage_rebates_opt(&self) -> Option<u64> {
12965 self.total_object_storage_rebates.as_ref().map(|field| *field)
12966 }
12967 pub fn set_total_object_storage_rebates(&mut self, field: u64) {
12969 self.total_object_storage_rebates = Some(field);
12970 }
12971 pub fn with_total_object_storage_rebates(mut self, field: u64) -> Self {
12973 self.set_total_object_storage_rebates(field);
12974 self
12975 }
12976 pub fn non_refundable_balance_opt_mut(&mut self) -> Option<&mut u64> {
12978 self.non_refundable_balance.as_mut().map(|field| field as _)
12979 }
12980 pub fn non_refundable_balance_mut(&mut self) -> &mut u64 {
12983 self.non_refundable_balance.get_or_insert_default()
12984 }
12985 pub fn non_refundable_balance_opt(&self) -> Option<u64> {
12987 self.non_refundable_balance.as_ref().map(|field| *field)
12988 }
12989 pub fn set_non_refundable_balance(&mut self, field: u64) {
12991 self.non_refundable_balance = Some(field);
12992 }
12993 pub fn with_non_refundable_balance(mut self, field: u64) -> Self {
12995 self.set_non_refundable_balance(field);
12996 self
12997 }
12998 }
12999 impl super::SubscribeCheckpointsRequest {
13000 pub const fn const_default() -> Self {
13001 Self { read_mask: None }
13002 }
13003 #[doc(hidden)]
13004 pub fn default_instance() -> &'static Self {
13005 static DEFAULT: super::SubscribeCheckpointsRequest = super::SubscribeCheckpointsRequest::const_default();
13006 &DEFAULT
13007 }
13008 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
13010 self.read_mask.as_mut().map(|field| field as _)
13011 }
13012 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
13015 self.read_mask.get_or_insert_default()
13016 }
13017 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
13019 self.read_mask.as_ref().map(|field| field as _)
13020 }
13021 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
13023 self.read_mask = Some(field.into().into());
13024 }
13025 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
13027 mut self,
13028 field: T,
13029 ) -> Self {
13030 self.set_read_mask(field.into());
13031 self
13032 }
13033 }
13034 impl super::SubscribeCheckpointsResponse {
13035 pub const fn const_default() -> Self {
13036 Self {
13037 cursor: None,
13038 checkpoint: None,
13039 }
13040 }
13041 #[doc(hidden)]
13042 pub fn default_instance() -> &'static Self {
13043 static DEFAULT: super::SubscribeCheckpointsResponse = super::SubscribeCheckpointsResponse::const_default();
13044 &DEFAULT
13045 }
13046 pub fn cursor_opt_mut(&mut self) -> Option<&mut u64> {
13048 self.cursor.as_mut().map(|field| field as _)
13049 }
13050 pub fn cursor_mut(&mut self) -> &mut u64 {
13053 self.cursor.get_or_insert_default()
13054 }
13055 pub fn cursor_opt(&self) -> Option<u64> {
13057 self.cursor.as_ref().map(|field| *field)
13058 }
13059 pub fn set_cursor(&mut self, field: u64) {
13061 self.cursor = Some(field);
13062 }
13063 pub fn with_cursor(mut self, field: u64) -> Self {
13065 self.set_cursor(field);
13066 self
13067 }
13068 pub fn checkpoint(&self) -> &super::Checkpoint {
13070 self.checkpoint
13071 .as_ref()
13072 .map(|field| field as _)
13073 .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
13074 }
13075 pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
13077 self.checkpoint.as_mut().map(|field| field as _)
13078 }
13079 pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
13082 self.checkpoint.get_or_insert_default()
13083 }
13084 pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
13086 self.checkpoint.as_ref().map(|field| field as _)
13087 }
13088 pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
13090 self.checkpoint = Some(field.into().into());
13091 }
13092 pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
13094 self.set_checkpoint(field.into());
13095 self
13096 }
13097 }
13098 impl super::SystemPackage {
13099 pub const fn const_default() -> Self {
13100 Self {
13101 version: None,
13102 modules: Vec::new(),
13103 dependencies: Vec::new(),
13104 }
13105 }
13106 #[doc(hidden)]
13107 pub fn default_instance() -> &'static Self {
13108 static DEFAULT: super::SystemPackage = super::SystemPackage::const_default();
13109 &DEFAULT
13110 }
13111 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
13113 self.version.as_mut().map(|field| field as _)
13114 }
13115 pub fn version_mut(&mut self) -> &mut u64 {
13118 self.version.get_or_insert_default()
13119 }
13120 pub fn version_opt(&self) -> Option<u64> {
13122 self.version.as_ref().map(|field| *field)
13123 }
13124 pub fn set_version(&mut self, field: u64) {
13126 self.version = Some(field);
13127 }
13128 pub fn with_version(mut self, field: u64) -> Self {
13130 self.set_version(field);
13131 self
13132 }
13133 pub fn modules(&self) -> &[::prost::bytes::Bytes] {
13135 &self.modules
13136 }
13137 pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
13140 &mut self.modules
13141 }
13142 pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
13144 self.modules = field;
13145 }
13146 pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
13148 self.set_modules(field);
13149 self
13150 }
13151 pub fn dependencies(&self) -> &[String] {
13153 &self.dependencies
13154 }
13155 pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
13158 &mut self.dependencies
13159 }
13160 pub fn set_dependencies(&mut self, field: Vec<String>) {
13162 self.dependencies = field;
13163 }
13164 pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
13166 self.set_dependencies(field);
13167 self
13168 }
13169 }
13170 impl super::SystemParameters {
13171 pub const fn const_default() -> Self {
13172 Self {
13173 epoch_duration_ms: None,
13174 stake_subsidy_start_epoch: None,
13175 min_validator_count: None,
13176 max_validator_count: None,
13177 min_validator_joining_stake: None,
13178 validator_low_stake_threshold: None,
13179 validator_very_low_stake_threshold: None,
13180 validator_low_stake_grace_period: None,
13181 extra_fields: None,
13182 }
13183 }
13184 #[doc(hidden)]
13185 pub fn default_instance() -> &'static Self {
13186 static DEFAULT: super::SystemParameters = super::SystemParameters::const_default();
13187 &DEFAULT
13188 }
13189 pub fn epoch_duration_ms_opt_mut(&mut self) -> Option<&mut u64> {
13191 self.epoch_duration_ms.as_mut().map(|field| field as _)
13192 }
13193 pub fn epoch_duration_ms_mut(&mut self) -> &mut u64 {
13196 self.epoch_duration_ms.get_or_insert_default()
13197 }
13198 pub fn epoch_duration_ms_opt(&self) -> Option<u64> {
13200 self.epoch_duration_ms.as_ref().map(|field| *field)
13201 }
13202 pub fn set_epoch_duration_ms(&mut self, field: u64) {
13204 self.epoch_duration_ms = Some(field);
13205 }
13206 pub fn with_epoch_duration_ms(mut self, field: u64) -> Self {
13208 self.set_epoch_duration_ms(field);
13209 self
13210 }
13211 pub fn stake_subsidy_start_epoch_opt_mut(&mut self) -> Option<&mut u64> {
13213 self.stake_subsidy_start_epoch.as_mut().map(|field| field as _)
13214 }
13215 pub fn stake_subsidy_start_epoch_mut(&mut self) -> &mut u64 {
13218 self.stake_subsidy_start_epoch.get_or_insert_default()
13219 }
13220 pub fn stake_subsidy_start_epoch_opt(&self) -> Option<u64> {
13222 self.stake_subsidy_start_epoch.as_ref().map(|field| *field)
13223 }
13224 pub fn set_stake_subsidy_start_epoch(&mut self, field: u64) {
13226 self.stake_subsidy_start_epoch = Some(field);
13227 }
13228 pub fn with_stake_subsidy_start_epoch(mut self, field: u64) -> Self {
13230 self.set_stake_subsidy_start_epoch(field);
13231 self
13232 }
13233 pub fn min_validator_count_opt_mut(&mut self) -> Option<&mut u64> {
13235 self.min_validator_count.as_mut().map(|field| field as _)
13236 }
13237 pub fn min_validator_count_mut(&mut self) -> &mut u64 {
13240 self.min_validator_count.get_or_insert_default()
13241 }
13242 pub fn min_validator_count_opt(&self) -> Option<u64> {
13244 self.min_validator_count.as_ref().map(|field| *field)
13245 }
13246 pub fn set_min_validator_count(&mut self, field: u64) {
13248 self.min_validator_count = Some(field);
13249 }
13250 pub fn with_min_validator_count(mut self, field: u64) -> Self {
13252 self.set_min_validator_count(field);
13253 self
13254 }
13255 pub fn max_validator_count_opt_mut(&mut self) -> Option<&mut u64> {
13257 self.max_validator_count.as_mut().map(|field| field as _)
13258 }
13259 pub fn max_validator_count_mut(&mut self) -> &mut u64 {
13262 self.max_validator_count.get_or_insert_default()
13263 }
13264 pub fn max_validator_count_opt(&self) -> Option<u64> {
13266 self.max_validator_count.as_ref().map(|field| *field)
13267 }
13268 pub fn set_max_validator_count(&mut self, field: u64) {
13270 self.max_validator_count = Some(field);
13271 }
13272 pub fn with_max_validator_count(mut self, field: u64) -> Self {
13274 self.set_max_validator_count(field);
13275 self
13276 }
13277 pub fn min_validator_joining_stake_opt_mut(&mut self) -> Option<&mut u64> {
13279 self.min_validator_joining_stake.as_mut().map(|field| field as _)
13280 }
13281 pub fn min_validator_joining_stake_mut(&mut self) -> &mut u64 {
13284 self.min_validator_joining_stake.get_or_insert_default()
13285 }
13286 pub fn min_validator_joining_stake_opt(&self) -> Option<u64> {
13288 self.min_validator_joining_stake.as_ref().map(|field| *field)
13289 }
13290 pub fn set_min_validator_joining_stake(&mut self, field: u64) {
13292 self.min_validator_joining_stake = Some(field);
13293 }
13294 pub fn with_min_validator_joining_stake(mut self, field: u64) -> Self {
13296 self.set_min_validator_joining_stake(field);
13297 self
13298 }
13299 pub fn validator_low_stake_threshold_opt_mut(&mut self) -> Option<&mut u64> {
13301 self.validator_low_stake_threshold.as_mut().map(|field| field as _)
13302 }
13303 pub fn validator_low_stake_threshold_mut(&mut self) -> &mut u64 {
13306 self.validator_low_stake_threshold.get_or_insert_default()
13307 }
13308 pub fn validator_low_stake_threshold_opt(&self) -> Option<u64> {
13310 self.validator_low_stake_threshold.as_ref().map(|field| *field)
13311 }
13312 pub fn set_validator_low_stake_threshold(&mut self, field: u64) {
13314 self.validator_low_stake_threshold = Some(field);
13315 }
13316 pub fn with_validator_low_stake_threshold(mut self, field: u64) -> Self {
13318 self.set_validator_low_stake_threshold(field);
13319 self
13320 }
13321 pub fn validator_very_low_stake_threshold_opt_mut(
13323 &mut self,
13324 ) -> Option<&mut u64> {
13325 self.validator_very_low_stake_threshold.as_mut().map(|field| field as _)
13326 }
13327 pub fn validator_very_low_stake_threshold_mut(&mut self) -> &mut u64 {
13330 self.validator_very_low_stake_threshold.get_or_insert_default()
13331 }
13332 pub fn validator_very_low_stake_threshold_opt(&self) -> Option<u64> {
13334 self.validator_very_low_stake_threshold.as_ref().map(|field| *field)
13335 }
13336 pub fn set_validator_very_low_stake_threshold(&mut self, field: u64) {
13338 self.validator_very_low_stake_threshold = Some(field);
13339 }
13340 pub fn with_validator_very_low_stake_threshold(mut self, field: u64) -> Self {
13342 self.set_validator_very_low_stake_threshold(field);
13343 self
13344 }
13345 pub fn validator_low_stake_grace_period_opt_mut(&mut self) -> Option<&mut u64> {
13347 self.validator_low_stake_grace_period.as_mut().map(|field| field as _)
13348 }
13349 pub fn validator_low_stake_grace_period_mut(&mut self) -> &mut u64 {
13352 self.validator_low_stake_grace_period.get_or_insert_default()
13353 }
13354 pub fn validator_low_stake_grace_period_opt(&self) -> Option<u64> {
13356 self.validator_low_stake_grace_period.as_ref().map(|field| *field)
13357 }
13358 pub fn set_validator_low_stake_grace_period(&mut self, field: u64) {
13360 self.validator_low_stake_grace_period = Some(field);
13361 }
13362 pub fn with_validator_low_stake_grace_period(mut self, field: u64) -> Self {
13364 self.set_validator_low_stake_grace_period(field);
13365 self
13366 }
13367 pub fn extra_fields(&self) -> &super::MoveTable {
13369 self.extra_fields
13370 .as_ref()
13371 .map(|field| field as _)
13372 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
13373 }
13374 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
13376 self.extra_fields.as_mut().map(|field| field as _)
13377 }
13378 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
13381 self.extra_fields.get_or_insert_default()
13382 }
13383 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
13385 self.extra_fields.as_ref().map(|field| field as _)
13386 }
13387 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
13389 self.extra_fields = Some(field.into().into());
13390 }
13391 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
13393 self.set_extra_fields(field.into());
13394 self
13395 }
13396 }
13397 impl super::SystemState {
13398 pub const fn const_default() -> Self {
13399 Self {
13400 version: None,
13401 epoch: None,
13402 protocol_version: None,
13403 validators: None,
13404 storage_fund: None,
13405 parameters: None,
13406 reference_gas_price: None,
13407 validator_report_records: Vec::new(),
13408 stake_subsidy: None,
13409 safe_mode: None,
13410 safe_mode_storage_rewards: None,
13411 safe_mode_computation_rewards: None,
13412 safe_mode_storage_rebates: None,
13413 safe_mode_non_refundable_storage_fee: None,
13414 epoch_start_timestamp_ms: None,
13415 extra_fields: None,
13416 }
13417 }
13418 #[doc(hidden)]
13419 pub fn default_instance() -> &'static Self {
13420 static DEFAULT: super::SystemState = super::SystemState::const_default();
13421 &DEFAULT
13422 }
13423 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
13425 self.version.as_mut().map(|field| field as _)
13426 }
13427 pub fn version_mut(&mut self) -> &mut u64 {
13430 self.version.get_or_insert_default()
13431 }
13432 pub fn version_opt(&self) -> Option<u64> {
13434 self.version.as_ref().map(|field| *field)
13435 }
13436 pub fn set_version(&mut self, field: u64) {
13438 self.version = Some(field);
13439 }
13440 pub fn with_version(mut self, field: u64) -> Self {
13442 self.set_version(field);
13443 self
13444 }
13445 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
13447 self.epoch.as_mut().map(|field| field as _)
13448 }
13449 pub fn epoch_mut(&mut self) -> &mut u64 {
13452 self.epoch.get_or_insert_default()
13453 }
13454 pub fn epoch_opt(&self) -> Option<u64> {
13456 self.epoch.as_ref().map(|field| *field)
13457 }
13458 pub fn set_epoch(&mut self, field: u64) {
13460 self.epoch = Some(field);
13461 }
13462 pub fn with_epoch(mut self, field: u64) -> Self {
13464 self.set_epoch(field);
13465 self
13466 }
13467 pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
13469 self.protocol_version.as_mut().map(|field| field as _)
13470 }
13471 pub fn protocol_version_mut(&mut self) -> &mut u64 {
13474 self.protocol_version.get_or_insert_default()
13475 }
13476 pub fn protocol_version_opt(&self) -> Option<u64> {
13478 self.protocol_version.as_ref().map(|field| *field)
13479 }
13480 pub fn set_protocol_version(&mut self, field: u64) {
13482 self.protocol_version = Some(field);
13483 }
13484 pub fn with_protocol_version(mut self, field: u64) -> Self {
13486 self.set_protocol_version(field);
13487 self
13488 }
13489 pub fn validators(&self) -> &super::ValidatorSet {
13491 self.validators
13492 .as_ref()
13493 .map(|field| field as _)
13494 .unwrap_or_else(|| super::ValidatorSet::default_instance() as _)
13495 }
13496 pub fn validators_opt_mut(&mut self) -> Option<&mut super::ValidatorSet> {
13498 self.validators.as_mut().map(|field| field as _)
13499 }
13500 pub fn validators_mut(&mut self) -> &mut super::ValidatorSet {
13503 self.validators.get_or_insert_default()
13504 }
13505 pub fn validators_opt(&self) -> Option<&super::ValidatorSet> {
13507 self.validators.as_ref().map(|field| field as _)
13508 }
13509 pub fn set_validators<T: Into<super::ValidatorSet>>(&mut self, field: T) {
13511 self.validators = Some(field.into().into());
13512 }
13513 pub fn with_validators<T: Into<super::ValidatorSet>>(
13515 mut self,
13516 field: T,
13517 ) -> Self {
13518 self.set_validators(field.into());
13519 self
13520 }
13521 pub fn storage_fund(&self) -> &super::StorageFund {
13523 self.storage_fund
13524 .as_ref()
13525 .map(|field| field as _)
13526 .unwrap_or_else(|| super::StorageFund::default_instance() as _)
13527 }
13528 pub fn storage_fund_opt_mut(&mut self) -> Option<&mut super::StorageFund> {
13530 self.storage_fund.as_mut().map(|field| field as _)
13531 }
13532 pub fn storage_fund_mut(&mut self) -> &mut super::StorageFund {
13535 self.storage_fund.get_or_insert_default()
13536 }
13537 pub fn storage_fund_opt(&self) -> Option<&super::StorageFund> {
13539 self.storage_fund.as_ref().map(|field| field as _)
13540 }
13541 pub fn set_storage_fund<T: Into<super::StorageFund>>(&mut self, field: T) {
13543 self.storage_fund = Some(field.into().into());
13544 }
13545 pub fn with_storage_fund<T: Into<super::StorageFund>>(
13547 mut self,
13548 field: T,
13549 ) -> Self {
13550 self.set_storage_fund(field.into());
13551 self
13552 }
13553 pub fn parameters(&self) -> &super::SystemParameters {
13555 self.parameters
13556 .as_ref()
13557 .map(|field| field as _)
13558 .unwrap_or_else(|| super::SystemParameters::default_instance() as _)
13559 }
13560 pub fn parameters_opt_mut(&mut self) -> Option<&mut super::SystemParameters> {
13562 self.parameters.as_mut().map(|field| field as _)
13563 }
13564 pub fn parameters_mut(&mut self) -> &mut super::SystemParameters {
13567 self.parameters.get_or_insert_default()
13568 }
13569 pub fn parameters_opt(&self) -> Option<&super::SystemParameters> {
13571 self.parameters.as_ref().map(|field| field as _)
13572 }
13573 pub fn set_parameters<T: Into<super::SystemParameters>>(&mut self, field: T) {
13575 self.parameters = Some(field.into().into());
13576 }
13577 pub fn with_parameters<T: Into<super::SystemParameters>>(
13579 mut self,
13580 field: T,
13581 ) -> Self {
13582 self.set_parameters(field.into());
13583 self
13584 }
13585 pub fn reference_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
13587 self.reference_gas_price.as_mut().map(|field| field as _)
13588 }
13589 pub fn reference_gas_price_mut(&mut self) -> &mut u64 {
13592 self.reference_gas_price.get_or_insert_default()
13593 }
13594 pub fn reference_gas_price_opt(&self) -> Option<u64> {
13596 self.reference_gas_price.as_ref().map(|field| *field)
13597 }
13598 pub fn set_reference_gas_price(&mut self, field: u64) {
13600 self.reference_gas_price = Some(field);
13601 }
13602 pub fn with_reference_gas_price(mut self, field: u64) -> Self {
13604 self.set_reference_gas_price(field);
13605 self
13606 }
13607 pub fn validator_report_records(&self) -> &[super::ValidatorReportRecord] {
13609 &self.validator_report_records
13610 }
13611 pub fn validator_report_records_mut(
13614 &mut self,
13615 ) -> &mut Vec<super::ValidatorReportRecord> {
13616 &mut self.validator_report_records
13617 }
13618 pub fn set_validator_report_records(
13620 &mut self,
13621 field: Vec<super::ValidatorReportRecord>,
13622 ) {
13623 self.validator_report_records = field;
13624 }
13625 pub fn with_validator_report_records(
13627 mut self,
13628 field: Vec<super::ValidatorReportRecord>,
13629 ) -> Self {
13630 self.set_validator_report_records(field);
13631 self
13632 }
13633 pub fn stake_subsidy(&self) -> &super::StakeSubsidy {
13635 self.stake_subsidy
13636 .as_ref()
13637 .map(|field| field as _)
13638 .unwrap_or_else(|| super::StakeSubsidy::default_instance() as _)
13639 }
13640 pub fn stake_subsidy_opt_mut(&mut self) -> Option<&mut super::StakeSubsidy> {
13642 self.stake_subsidy.as_mut().map(|field| field as _)
13643 }
13644 pub fn stake_subsidy_mut(&mut self) -> &mut super::StakeSubsidy {
13647 self.stake_subsidy.get_or_insert_default()
13648 }
13649 pub fn stake_subsidy_opt(&self) -> Option<&super::StakeSubsidy> {
13651 self.stake_subsidy.as_ref().map(|field| field as _)
13652 }
13653 pub fn set_stake_subsidy<T: Into<super::StakeSubsidy>>(&mut self, field: T) {
13655 self.stake_subsidy = Some(field.into().into());
13656 }
13657 pub fn with_stake_subsidy<T: Into<super::StakeSubsidy>>(
13659 mut self,
13660 field: T,
13661 ) -> Self {
13662 self.set_stake_subsidy(field.into());
13663 self
13664 }
13665 pub fn safe_mode_opt_mut(&mut self) -> Option<&mut bool> {
13667 self.safe_mode.as_mut().map(|field| field as _)
13668 }
13669 pub fn safe_mode_mut(&mut self) -> &mut bool {
13672 self.safe_mode.get_or_insert_default()
13673 }
13674 pub fn safe_mode_opt(&self) -> Option<bool> {
13676 self.safe_mode.as_ref().map(|field| *field)
13677 }
13678 pub fn set_safe_mode(&mut self, field: bool) {
13680 self.safe_mode = Some(field);
13681 }
13682 pub fn with_safe_mode(mut self, field: bool) -> Self {
13684 self.set_safe_mode(field);
13685 self
13686 }
13687 pub fn safe_mode_storage_rewards_opt_mut(&mut self) -> Option<&mut u64> {
13689 self.safe_mode_storage_rewards.as_mut().map(|field| field as _)
13690 }
13691 pub fn safe_mode_storage_rewards_mut(&mut self) -> &mut u64 {
13694 self.safe_mode_storage_rewards.get_or_insert_default()
13695 }
13696 pub fn safe_mode_storage_rewards_opt(&self) -> Option<u64> {
13698 self.safe_mode_storage_rewards.as_ref().map(|field| *field)
13699 }
13700 pub fn set_safe_mode_storage_rewards(&mut self, field: u64) {
13702 self.safe_mode_storage_rewards = Some(field);
13703 }
13704 pub fn with_safe_mode_storage_rewards(mut self, field: u64) -> Self {
13706 self.set_safe_mode_storage_rewards(field);
13707 self
13708 }
13709 pub fn safe_mode_computation_rewards_opt_mut(&mut self) -> Option<&mut u64> {
13711 self.safe_mode_computation_rewards.as_mut().map(|field| field as _)
13712 }
13713 pub fn safe_mode_computation_rewards_mut(&mut self) -> &mut u64 {
13716 self.safe_mode_computation_rewards.get_or_insert_default()
13717 }
13718 pub fn safe_mode_computation_rewards_opt(&self) -> Option<u64> {
13720 self.safe_mode_computation_rewards.as_ref().map(|field| *field)
13721 }
13722 pub fn set_safe_mode_computation_rewards(&mut self, field: u64) {
13724 self.safe_mode_computation_rewards = Some(field);
13725 }
13726 pub fn with_safe_mode_computation_rewards(mut self, field: u64) -> Self {
13728 self.set_safe_mode_computation_rewards(field);
13729 self
13730 }
13731 pub fn safe_mode_storage_rebates_opt_mut(&mut self) -> Option<&mut u64> {
13733 self.safe_mode_storage_rebates.as_mut().map(|field| field as _)
13734 }
13735 pub fn safe_mode_storage_rebates_mut(&mut self) -> &mut u64 {
13738 self.safe_mode_storage_rebates.get_or_insert_default()
13739 }
13740 pub fn safe_mode_storage_rebates_opt(&self) -> Option<u64> {
13742 self.safe_mode_storage_rebates.as_ref().map(|field| *field)
13743 }
13744 pub fn set_safe_mode_storage_rebates(&mut self, field: u64) {
13746 self.safe_mode_storage_rebates = Some(field);
13747 }
13748 pub fn with_safe_mode_storage_rebates(mut self, field: u64) -> Self {
13750 self.set_safe_mode_storage_rebates(field);
13751 self
13752 }
13753 pub fn safe_mode_non_refundable_storage_fee_opt_mut(
13755 &mut self,
13756 ) -> Option<&mut u64> {
13757 self.safe_mode_non_refundable_storage_fee.as_mut().map(|field| field as _)
13758 }
13759 pub fn safe_mode_non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
13762 self.safe_mode_non_refundable_storage_fee.get_or_insert_default()
13763 }
13764 pub fn safe_mode_non_refundable_storage_fee_opt(&self) -> Option<u64> {
13766 self.safe_mode_non_refundable_storage_fee.as_ref().map(|field| *field)
13767 }
13768 pub fn set_safe_mode_non_refundable_storage_fee(&mut self, field: u64) {
13770 self.safe_mode_non_refundable_storage_fee = Some(field);
13771 }
13772 pub fn with_safe_mode_non_refundable_storage_fee(mut self, field: u64) -> Self {
13774 self.set_safe_mode_non_refundable_storage_fee(field);
13775 self
13776 }
13777 pub fn epoch_start_timestamp_ms_opt_mut(&mut self) -> Option<&mut u64> {
13779 self.epoch_start_timestamp_ms.as_mut().map(|field| field as _)
13780 }
13781 pub fn epoch_start_timestamp_ms_mut(&mut self) -> &mut u64 {
13784 self.epoch_start_timestamp_ms.get_or_insert_default()
13785 }
13786 pub fn epoch_start_timestamp_ms_opt(&self) -> Option<u64> {
13788 self.epoch_start_timestamp_ms.as_ref().map(|field| *field)
13789 }
13790 pub fn set_epoch_start_timestamp_ms(&mut self, field: u64) {
13792 self.epoch_start_timestamp_ms = Some(field);
13793 }
13794 pub fn with_epoch_start_timestamp_ms(mut self, field: u64) -> Self {
13796 self.set_epoch_start_timestamp_ms(field);
13797 self
13798 }
13799 pub fn extra_fields(&self) -> &super::MoveTable {
13801 self.extra_fields
13802 .as_ref()
13803 .map(|field| field as _)
13804 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
13805 }
13806 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
13808 self.extra_fields.as_mut().map(|field| field as _)
13809 }
13810 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
13813 self.extra_fields.get_or_insert_default()
13814 }
13815 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
13817 self.extra_fields.as_ref().map(|field| field as _)
13818 }
13819 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
13821 self.extra_fields = Some(field.into().into());
13822 }
13823 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
13825 self.set_extra_fields(field.into());
13826 self
13827 }
13828 }
13829 impl super::Transaction {
13830 pub const fn const_default() -> Self {
13831 Self {
13832 bcs: None,
13833 digest: None,
13834 version: None,
13835 kind: None,
13836 sender: None,
13837 gas_payment: None,
13838 expiration: None,
13839 }
13840 }
13841 #[doc(hidden)]
13842 pub fn default_instance() -> &'static Self {
13843 static DEFAULT: super::Transaction = super::Transaction::const_default();
13844 &DEFAULT
13845 }
13846 pub fn bcs(&self) -> &super::Bcs {
13848 self.bcs
13849 .as_ref()
13850 .map(|field| field as _)
13851 .unwrap_or_else(|| super::Bcs::default_instance() as _)
13852 }
13853 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
13855 self.bcs.as_mut().map(|field| field as _)
13856 }
13857 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
13860 self.bcs.get_or_insert_default()
13861 }
13862 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
13864 self.bcs.as_ref().map(|field| field as _)
13865 }
13866 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
13868 self.bcs = Some(field.into().into());
13869 }
13870 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
13872 self.set_bcs(field.into());
13873 self
13874 }
13875 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
13877 self.digest.as_mut().map(|field| field as _)
13878 }
13879 pub fn digest_mut(&mut self) -> &mut String {
13882 self.digest.get_or_insert_default()
13883 }
13884 pub fn digest_opt(&self) -> Option<&str> {
13886 self.digest.as_ref().map(|field| field as _)
13887 }
13888 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
13890 self.digest = Some(field.into().into());
13891 }
13892 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
13894 self.set_digest(field.into());
13895 self
13896 }
13897 pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
13899 self.version.as_mut().map(|field| field as _)
13900 }
13901 pub fn version_mut(&mut self) -> &mut i32 {
13904 self.version.get_or_insert_default()
13905 }
13906 pub fn version_opt(&self) -> Option<i32> {
13908 self.version.as_ref().map(|field| *field)
13909 }
13910 pub fn set_version(&mut self, field: i32) {
13912 self.version = Some(field);
13913 }
13914 pub fn with_version(mut self, field: i32) -> Self {
13916 self.set_version(field);
13917 self
13918 }
13919 pub fn kind(&self) -> &super::TransactionKind {
13921 self.kind
13922 .as_ref()
13923 .map(|field| field as _)
13924 .unwrap_or_else(|| super::TransactionKind::default_instance() as _)
13925 }
13926 pub fn kind_opt_mut(&mut self) -> Option<&mut super::TransactionKind> {
13928 self.kind.as_mut().map(|field| field as _)
13929 }
13930 pub fn kind_mut(&mut self) -> &mut super::TransactionKind {
13933 self.kind.get_or_insert_default()
13934 }
13935 pub fn kind_opt(&self) -> Option<&super::TransactionKind> {
13937 self.kind.as_ref().map(|field| field as _)
13938 }
13939 pub fn set_kind<T: Into<super::TransactionKind>>(&mut self, field: T) {
13941 self.kind = Some(field.into().into());
13942 }
13943 pub fn with_kind<T: Into<super::TransactionKind>>(mut self, field: T) -> Self {
13945 self.set_kind(field.into());
13946 self
13947 }
13948 pub fn sender_opt_mut(&mut self) -> Option<&mut String> {
13950 self.sender.as_mut().map(|field| field as _)
13951 }
13952 pub fn sender_mut(&mut self) -> &mut String {
13955 self.sender.get_or_insert_default()
13956 }
13957 pub fn sender_opt(&self) -> Option<&str> {
13959 self.sender.as_ref().map(|field| field as _)
13960 }
13961 pub fn set_sender<T: Into<String>>(&mut self, field: T) {
13963 self.sender = Some(field.into().into());
13964 }
13965 pub fn with_sender<T: Into<String>>(mut self, field: T) -> Self {
13967 self.set_sender(field.into());
13968 self
13969 }
13970 pub fn gas_payment(&self) -> &super::GasPayment {
13972 self.gas_payment
13973 .as_ref()
13974 .map(|field| field as _)
13975 .unwrap_or_else(|| super::GasPayment::default_instance() as _)
13976 }
13977 pub fn gas_payment_opt_mut(&mut self) -> Option<&mut super::GasPayment> {
13979 self.gas_payment.as_mut().map(|field| field as _)
13980 }
13981 pub fn gas_payment_mut(&mut self) -> &mut super::GasPayment {
13984 self.gas_payment.get_or_insert_default()
13985 }
13986 pub fn gas_payment_opt(&self) -> Option<&super::GasPayment> {
13988 self.gas_payment.as_ref().map(|field| field as _)
13989 }
13990 pub fn set_gas_payment<T: Into<super::GasPayment>>(&mut self, field: T) {
13992 self.gas_payment = Some(field.into().into());
13993 }
13994 pub fn with_gas_payment<T: Into<super::GasPayment>>(mut self, field: T) -> Self {
13996 self.set_gas_payment(field.into());
13997 self
13998 }
13999 pub fn expiration(&self) -> &super::TransactionExpiration {
14001 self.expiration
14002 .as_ref()
14003 .map(|field| field as _)
14004 .unwrap_or_else(|| super::TransactionExpiration::default_instance() as _)
14005 }
14006 pub fn expiration_opt_mut(
14008 &mut self,
14009 ) -> Option<&mut super::TransactionExpiration> {
14010 self.expiration.as_mut().map(|field| field as _)
14011 }
14012 pub fn expiration_mut(&mut self) -> &mut super::TransactionExpiration {
14015 self.expiration.get_or_insert_default()
14016 }
14017 pub fn expiration_opt(&self) -> Option<&super::TransactionExpiration> {
14019 self.expiration.as_ref().map(|field| field as _)
14020 }
14021 pub fn set_expiration<T: Into<super::TransactionExpiration>>(
14023 &mut self,
14024 field: T,
14025 ) {
14026 self.expiration = Some(field.into().into());
14027 }
14028 pub fn with_expiration<T: Into<super::TransactionExpiration>>(
14030 mut self,
14031 field: T,
14032 ) -> Self {
14033 self.set_expiration(field.into());
14034 self
14035 }
14036 }
14037 impl super::TransactionEffects {
14038 pub const fn const_default() -> Self {
14039 Self {
14040 bcs: None,
14041 digest: None,
14042 version: None,
14043 status: None,
14044 epoch: None,
14045 gas_used: None,
14046 transaction_digest: None,
14047 gas_object: None,
14048 events_digest: None,
14049 dependencies: Vec::new(),
14050 lamport_version: None,
14051 changed_objects: Vec::new(),
14052 unchanged_consensus_objects: Vec::new(),
14053 auxiliary_data_digest: None,
14054 unchanged_loaded_runtime_objects: Vec::new(),
14055 }
14056 }
14057 #[doc(hidden)]
14058 pub fn default_instance() -> &'static Self {
14059 static DEFAULT: super::TransactionEffects = super::TransactionEffects::const_default();
14060 &DEFAULT
14061 }
14062 pub fn bcs(&self) -> &super::Bcs {
14064 self.bcs
14065 .as_ref()
14066 .map(|field| field as _)
14067 .unwrap_or_else(|| super::Bcs::default_instance() as _)
14068 }
14069 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
14071 self.bcs.as_mut().map(|field| field as _)
14072 }
14073 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
14076 self.bcs.get_or_insert_default()
14077 }
14078 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
14080 self.bcs.as_ref().map(|field| field as _)
14081 }
14082 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
14084 self.bcs = Some(field.into().into());
14085 }
14086 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
14088 self.set_bcs(field.into());
14089 self
14090 }
14091 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
14093 self.digest.as_mut().map(|field| field as _)
14094 }
14095 pub fn digest_mut(&mut self) -> &mut String {
14098 self.digest.get_or_insert_default()
14099 }
14100 pub fn digest_opt(&self) -> Option<&str> {
14102 self.digest.as_ref().map(|field| field as _)
14103 }
14104 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
14106 self.digest = Some(field.into().into());
14107 }
14108 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
14110 self.set_digest(field.into());
14111 self
14112 }
14113 pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
14115 self.version.as_mut().map(|field| field as _)
14116 }
14117 pub fn version_mut(&mut self) -> &mut i32 {
14120 self.version.get_or_insert_default()
14121 }
14122 pub fn version_opt(&self) -> Option<i32> {
14124 self.version.as_ref().map(|field| *field)
14125 }
14126 pub fn set_version(&mut self, field: i32) {
14128 self.version = Some(field);
14129 }
14130 pub fn with_version(mut self, field: i32) -> Self {
14132 self.set_version(field);
14133 self
14134 }
14135 pub fn status(&self) -> &super::ExecutionStatus {
14137 self.status
14138 .as_ref()
14139 .map(|field| field as _)
14140 .unwrap_or_else(|| super::ExecutionStatus::default_instance() as _)
14141 }
14142 pub fn status_opt_mut(&mut self) -> Option<&mut super::ExecutionStatus> {
14144 self.status.as_mut().map(|field| field as _)
14145 }
14146 pub fn status_mut(&mut self) -> &mut super::ExecutionStatus {
14149 self.status.get_or_insert_default()
14150 }
14151 pub fn status_opt(&self) -> Option<&super::ExecutionStatus> {
14153 self.status.as_ref().map(|field| field as _)
14154 }
14155 pub fn set_status<T: Into<super::ExecutionStatus>>(&mut self, field: T) {
14157 self.status = Some(field.into().into());
14158 }
14159 pub fn with_status<T: Into<super::ExecutionStatus>>(mut self, field: T) -> Self {
14161 self.set_status(field.into());
14162 self
14163 }
14164 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
14166 self.epoch.as_mut().map(|field| field as _)
14167 }
14168 pub fn epoch_mut(&mut self) -> &mut u64 {
14171 self.epoch.get_or_insert_default()
14172 }
14173 pub fn epoch_opt(&self) -> Option<u64> {
14175 self.epoch.as_ref().map(|field| *field)
14176 }
14177 pub fn set_epoch(&mut self, field: u64) {
14179 self.epoch = Some(field);
14180 }
14181 pub fn with_epoch(mut self, field: u64) -> Self {
14183 self.set_epoch(field);
14184 self
14185 }
14186 pub fn gas_used(&self) -> &super::GasCostSummary {
14188 self.gas_used
14189 .as_ref()
14190 .map(|field| field as _)
14191 .unwrap_or_else(|| super::GasCostSummary::default_instance() as _)
14192 }
14193 pub fn gas_used_opt_mut(&mut self) -> Option<&mut super::GasCostSummary> {
14195 self.gas_used.as_mut().map(|field| field as _)
14196 }
14197 pub fn gas_used_mut(&mut self) -> &mut super::GasCostSummary {
14200 self.gas_used.get_or_insert_default()
14201 }
14202 pub fn gas_used_opt(&self) -> Option<&super::GasCostSummary> {
14204 self.gas_used.as_ref().map(|field| field as _)
14205 }
14206 pub fn set_gas_used<T: Into<super::GasCostSummary>>(&mut self, field: T) {
14208 self.gas_used = Some(field.into().into());
14209 }
14210 pub fn with_gas_used<T: Into<super::GasCostSummary>>(
14212 mut self,
14213 field: T,
14214 ) -> Self {
14215 self.set_gas_used(field.into());
14216 self
14217 }
14218 pub fn transaction_digest_opt_mut(&mut self) -> Option<&mut String> {
14220 self.transaction_digest.as_mut().map(|field| field as _)
14221 }
14222 pub fn transaction_digest_mut(&mut self) -> &mut String {
14225 self.transaction_digest.get_or_insert_default()
14226 }
14227 pub fn transaction_digest_opt(&self) -> Option<&str> {
14229 self.transaction_digest.as_ref().map(|field| field as _)
14230 }
14231 pub fn set_transaction_digest<T: Into<String>>(&mut self, field: T) {
14233 self.transaction_digest = Some(field.into().into());
14234 }
14235 pub fn with_transaction_digest<T: Into<String>>(mut self, field: T) -> Self {
14237 self.set_transaction_digest(field.into());
14238 self
14239 }
14240 pub fn gas_object(&self) -> &super::ChangedObject {
14242 self.gas_object
14243 .as_ref()
14244 .map(|field| field as _)
14245 .unwrap_or_else(|| super::ChangedObject::default_instance() as _)
14246 }
14247 pub fn gas_object_opt_mut(&mut self) -> Option<&mut super::ChangedObject> {
14249 self.gas_object.as_mut().map(|field| field as _)
14250 }
14251 pub fn gas_object_mut(&mut self) -> &mut super::ChangedObject {
14254 self.gas_object.get_or_insert_default()
14255 }
14256 pub fn gas_object_opt(&self) -> Option<&super::ChangedObject> {
14258 self.gas_object.as_ref().map(|field| field as _)
14259 }
14260 pub fn set_gas_object<T: Into<super::ChangedObject>>(&mut self, field: T) {
14262 self.gas_object = Some(field.into().into());
14263 }
14264 pub fn with_gas_object<T: Into<super::ChangedObject>>(
14266 mut self,
14267 field: T,
14268 ) -> Self {
14269 self.set_gas_object(field.into());
14270 self
14271 }
14272 pub fn events_digest_opt_mut(&mut self) -> Option<&mut String> {
14274 self.events_digest.as_mut().map(|field| field as _)
14275 }
14276 pub fn events_digest_mut(&mut self) -> &mut String {
14279 self.events_digest.get_or_insert_default()
14280 }
14281 pub fn events_digest_opt(&self) -> Option<&str> {
14283 self.events_digest.as_ref().map(|field| field as _)
14284 }
14285 pub fn set_events_digest<T: Into<String>>(&mut self, field: T) {
14287 self.events_digest = Some(field.into().into());
14288 }
14289 pub fn with_events_digest<T: Into<String>>(mut self, field: T) -> Self {
14291 self.set_events_digest(field.into());
14292 self
14293 }
14294 pub fn dependencies(&self) -> &[String] {
14296 &self.dependencies
14297 }
14298 pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
14301 &mut self.dependencies
14302 }
14303 pub fn set_dependencies(&mut self, field: Vec<String>) {
14305 self.dependencies = field;
14306 }
14307 pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
14309 self.set_dependencies(field);
14310 self
14311 }
14312 pub fn lamport_version_opt_mut(&mut self) -> Option<&mut u64> {
14314 self.lamport_version.as_mut().map(|field| field as _)
14315 }
14316 pub fn lamport_version_mut(&mut self) -> &mut u64 {
14319 self.lamport_version.get_or_insert_default()
14320 }
14321 pub fn lamport_version_opt(&self) -> Option<u64> {
14323 self.lamport_version.as_ref().map(|field| *field)
14324 }
14325 pub fn set_lamport_version(&mut self, field: u64) {
14327 self.lamport_version = Some(field);
14328 }
14329 pub fn with_lamport_version(mut self, field: u64) -> Self {
14331 self.set_lamport_version(field);
14332 self
14333 }
14334 pub fn changed_objects(&self) -> &[super::ChangedObject] {
14336 &self.changed_objects
14337 }
14338 pub fn changed_objects_mut(&mut self) -> &mut Vec<super::ChangedObject> {
14341 &mut self.changed_objects
14342 }
14343 pub fn set_changed_objects(&mut self, field: Vec<super::ChangedObject>) {
14345 self.changed_objects = field;
14346 }
14347 pub fn with_changed_objects(mut self, field: Vec<super::ChangedObject>) -> Self {
14349 self.set_changed_objects(field);
14350 self
14351 }
14352 pub fn unchanged_consensus_objects(&self) -> &[super::UnchangedConsensusObject] {
14354 &self.unchanged_consensus_objects
14355 }
14356 pub fn unchanged_consensus_objects_mut(
14359 &mut self,
14360 ) -> &mut Vec<super::UnchangedConsensusObject> {
14361 &mut self.unchanged_consensus_objects
14362 }
14363 pub fn set_unchanged_consensus_objects(
14365 &mut self,
14366 field: Vec<super::UnchangedConsensusObject>,
14367 ) {
14368 self.unchanged_consensus_objects = field;
14369 }
14370 pub fn with_unchanged_consensus_objects(
14372 mut self,
14373 field: Vec<super::UnchangedConsensusObject>,
14374 ) -> Self {
14375 self.set_unchanged_consensus_objects(field);
14376 self
14377 }
14378 pub fn auxiliary_data_digest_opt_mut(&mut self) -> Option<&mut String> {
14380 self.auxiliary_data_digest.as_mut().map(|field| field as _)
14381 }
14382 pub fn auxiliary_data_digest_mut(&mut self) -> &mut String {
14385 self.auxiliary_data_digest.get_or_insert_default()
14386 }
14387 pub fn auxiliary_data_digest_opt(&self) -> Option<&str> {
14389 self.auxiliary_data_digest.as_ref().map(|field| field as _)
14390 }
14391 pub fn set_auxiliary_data_digest<T: Into<String>>(&mut self, field: T) {
14393 self.auxiliary_data_digest = Some(field.into().into());
14394 }
14395 pub fn with_auxiliary_data_digest<T: Into<String>>(mut self, field: T) -> Self {
14397 self.set_auxiliary_data_digest(field.into());
14398 self
14399 }
14400 pub fn unchanged_loaded_runtime_objects(&self) -> &[super::ObjectReference] {
14402 &self.unchanged_loaded_runtime_objects
14403 }
14404 pub fn unchanged_loaded_runtime_objects_mut(
14407 &mut self,
14408 ) -> &mut Vec<super::ObjectReference> {
14409 &mut self.unchanged_loaded_runtime_objects
14410 }
14411 pub fn set_unchanged_loaded_runtime_objects(
14413 &mut self,
14414 field: Vec<super::ObjectReference>,
14415 ) {
14416 self.unchanged_loaded_runtime_objects = field;
14417 }
14418 pub fn with_unchanged_loaded_runtime_objects(
14420 mut self,
14421 field: Vec<super::ObjectReference>,
14422 ) -> Self {
14423 self.set_unchanged_loaded_runtime_objects(field);
14424 self
14425 }
14426 }
14427 impl super::TransactionEvents {
14428 pub const fn const_default() -> Self {
14429 Self {
14430 bcs: None,
14431 digest: None,
14432 events: Vec::new(),
14433 }
14434 }
14435 #[doc(hidden)]
14436 pub fn default_instance() -> &'static Self {
14437 static DEFAULT: super::TransactionEvents = super::TransactionEvents::const_default();
14438 &DEFAULT
14439 }
14440 pub fn bcs(&self) -> &super::Bcs {
14442 self.bcs
14443 .as_ref()
14444 .map(|field| field as _)
14445 .unwrap_or_else(|| super::Bcs::default_instance() as _)
14446 }
14447 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
14449 self.bcs.as_mut().map(|field| field as _)
14450 }
14451 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
14454 self.bcs.get_or_insert_default()
14455 }
14456 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
14458 self.bcs.as_ref().map(|field| field as _)
14459 }
14460 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
14462 self.bcs = Some(field.into().into());
14463 }
14464 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
14466 self.set_bcs(field.into());
14467 self
14468 }
14469 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
14471 self.digest.as_mut().map(|field| field as _)
14472 }
14473 pub fn digest_mut(&mut self) -> &mut String {
14476 self.digest.get_or_insert_default()
14477 }
14478 pub fn digest_opt(&self) -> Option<&str> {
14480 self.digest.as_ref().map(|field| field as _)
14481 }
14482 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
14484 self.digest = Some(field.into().into());
14485 }
14486 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
14488 self.set_digest(field.into());
14489 self
14490 }
14491 pub fn events(&self) -> &[super::Event] {
14493 &self.events
14494 }
14495 pub fn events_mut(&mut self) -> &mut Vec<super::Event> {
14498 &mut self.events
14499 }
14500 pub fn set_events(&mut self, field: Vec<super::Event>) {
14502 self.events = field;
14503 }
14504 pub fn with_events(mut self, field: Vec<super::Event>) -> Self {
14506 self.set_events(field);
14507 self
14508 }
14509 }
14510 impl super::TransactionExpiration {
14511 pub const fn const_default() -> Self {
14512 Self {
14513 kind: None,
14514 epoch: None,
14515 min_epoch: None,
14516 min_timestamp: None,
14517 max_timestamp: None,
14518 chain: None,
14519 nonce: None,
14520 }
14521 }
14522 #[doc(hidden)]
14523 pub fn default_instance() -> &'static Self {
14524 static DEFAULT: super::TransactionExpiration = super::TransactionExpiration::const_default();
14525 &DEFAULT
14526 }
14527 pub fn with_kind<
14529 T: Into<super::transaction_expiration::TransactionExpirationKind>,
14530 >(mut self, field: T) -> Self {
14531 self.set_kind(field.into());
14532 self
14533 }
14534 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
14536 self.epoch.as_mut().map(|field| field as _)
14537 }
14538 pub fn epoch_mut(&mut self) -> &mut u64 {
14541 self.epoch.get_or_insert_default()
14542 }
14543 pub fn epoch_opt(&self) -> Option<u64> {
14545 self.epoch.as_ref().map(|field| *field)
14546 }
14547 pub fn set_epoch(&mut self, field: u64) {
14549 self.epoch = Some(field);
14550 }
14551 pub fn with_epoch(mut self, field: u64) -> Self {
14553 self.set_epoch(field);
14554 self
14555 }
14556 pub fn min_epoch_opt_mut(&mut self) -> Option<&mut u64> {
14558 self.min_epoch.as_mut().map(|field| field as _)
14559 }
14560 pub fn min_epoch_mut(&mut self) -> &mut u64 {
14563 self.min_epoch.get_or_insert_default()
14564 }
14565 pub fn min_epoch_opt(&self) -> Option<u64> {
14567 self.min_epoch.as_ref().map(|field| *field)
14568 }
14569 pub fn set_min_epoch(&mut self, field: u64) {
14571 self.min_epoch = Some(field);
14572 }
14573 pub fn with_min_epoch(mut self, field: u64) -> Self {
14575 self.set_min_epoch(field);
14576 self
14577 }
14578 pub fn min_timestamp_opt_mut(
14580 &mut self,
14581 ) -> Option<&mut ::prost_types::Timestamp> {
14582 self.min_timestamp.as_mut().map(|field| field as _)
14583 }
14584 pub fn min_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
14587 self.min_timestamp.get_or_insert_default()
14588 }
14589 pub fn min_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
14591 self.min_timestamp.as_ref().map(|field| field as _)
14592 }
14593 pub fn set_min_timestamp<T: Into<::prost_types::Timestamp>>(
14595 &mut self,
14596 field: T,
14597 ) {
14598 self.min_timestamp = Some(field.into().into());
14599 }
14600 pub fn with_min_timestamp<T: Into<::prost_types::Timestamp>>(
14602 mut self,
14603 field: T,
14604 ) -> Self {
14605 self.set_min_timestamp(field.into());
14606 self
14607 }
14608 pub fn max_timestamp_opt_mut(
14610 &mut self,
14611 ) -> Option<&mut ::prost_types::Timestamp> {
14612 self.max_timestamp.as_mut().map(|field| field as _)
14613 }
14614 pub fn max_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
14617 self.max_timestamp.get_or_insert_default()
14618 }
14619 pub fn max_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
14621 self.max_timestamp.as_ref().map(|field| field as _)
14622 }
14623 pub fn set_max_timestamp<T: Into<::prost_types::Timestamp>>(
14625 &mut self,
14626 field: T,
14627 ) {
14628 self.max_timestamp = Some(field.into().into());
14629 }
14630 pub fn with_max_timestamp<T: Into<::prost_types::Timestamp>>(
14632 mut self,
14633 field: T,
14634 ) -> Self {
14635 self.set_max_timestamp(field.into());
14636 self
14637 }
14638 pub fn chain_opt_mut(&mut self) -> Option<&mut String> {
14640 self.chain.as_mut().map(|field| field as _)
14641 }
14642 pub fn chain_mut(&mut self) -> &mut String {
14645 self.chain.get_or_insert_default()
14646 }
14647 pub fn chain_opt(&self) -> Option<&str> {
14649 self.chain.as_ref().map(|field| field as _)
14650 }
14651 pub fn set_chain<T: Into<String>>(&mut self, field: T) {
14653 self.chain = Some(field.into().into());
14654 }
14655 pub fn with_chain<T: Into<String>>(mut self, field: T) -> Self {
14657 self.set_chain(field.into());
14658 self
14659 }
14660 pub fn nonce_opt_mut(&mut self) -> Option<&mut u32> {
14662 self.nonce.as_mut().map(|field| field as _)
14663 }
14664 pub fn nonce_mut(&mut self) -> &mut u32 {
14667 self.nonce.get_or_insert_default()
14668 }
14669 pub fn nonce_opt(&self) -> Option<u32> {
14671 self.nonce.as_ref().map(|field| *field)
14672 }
14673 pub fn set_nonce(&mut self, field: u32) {
14675 self.nonce = Some(field);
14676 }
14677 pub fn with_nonce(mut self, field: u32) -> Self {
14679 self.set_nonce(field);
14680 self
14681 }
14682 }
14683 impl super::TransactionKind {
14684 pub const fn const_default() -> Self {
14685 Self { kind: None, data: None }
14686 }
14687 #[doc(hidden)]
14688 pub fn default_instance() -> &'static Self {
14689 static DEFAULT: super::TransactionKind = super::TransactionKind::const_default();
14690 &DEFAULT
14691 }
14692 pub fn with_kind<T: Into<super::transaction_kind::Kind>>(
14694 mut self,
14695 field: T,
14696 ) -> Self {
14697 self.set_kind(field.into());
14698 self
14699 }
14700 pub fn programmable_transaction(&self) -> &super::ProgrammableTransaction {
14702 if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &self
14703 .data
14704 {
14705 field as _
14706 } else {
14707 super::ProgrammableTransaction::default_instance() as _
14708 }
14709 }
14710 pub fn programmable_transaction_opt(
14712 &self,
14713 ) -> Option<&super::ProgrammableTransaction> {
14714 if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &self
14715 .data
14716 {
14717 Some(field as _)
14718 } else {
14719 None
14720 }
14721 }
14722 pub fn programmable_transaction_opt_mut(
14724 &mut self,
14725 ) -> Option<&mut super::ProgrammableTransaction> {
14726 if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &mut self
14727 .data
14728 {
14729 Some(field as _)
14730 } else {
14731 None
14732 }
14733 }
14734 pub fn programmable_transaction_mut(
14738 &mut self,
14739 ) -> &mut super::ProgrammableTransaction {
14740 if self.programmable_transaction_opt_mut().is_none() {
14741 self.data = Some(
14742 super::transaction_kind::Data::ProgrammableTransaction(
14743 super::ProgrammableTransaction::default(),
14744 ),
14745 );
14746 }
14747 self.programmable_transaction_opt_mut().unwrap()
14748 }
14749 pub fn set_programmable_transaction<T: Into<super::ProgrammableTransaction>>(
14752 &mut self,
14753 field: T,
14754 ) {
14755 self.data = Some(
14756 super::transaction_kind::Data::ProgrammableTransaction(
14757 field.into().into(),
14758 ),
14759 );
14760 }
14761 pub fn with_programmable_transaction<T: Into<super::ProgrammableTransaction>>(
14764 mut self,
14765 field: T,
14766 ) -> Self {
14767 self.set_programmable_transaction(field.into());
14768 self
14769 }
14770 pub fn change_epoch(&self) -> &super::ChangeEpoch {
14772 if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &self.data {
14773 field as _
14774 } else {
14775 super::ChangeEpoch::default_instance() as _
14776 }
14777 }
14778 pub fn change_epoch_opt(&self) -> Option<&super::ChangeEpoch> {
14780 if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &self.data {
14781 Some(field as _)
14782 } else {
14783 None
14784 }
14785 }
14786 pub fn change_epoch_opt_mut(&mut self) -> Option<&mut super::ChangeEpoch> {
14788 if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &mut self
14789 .data
14790 {
14791 Some(field as _)
14792 } else {
14793 None
14794 }
14795 }
14796 pub fn change_epoch_mut(&mut self) -> &mut super::ChangeEpoch {
14800 if self.change_epoch_opt_mut().is_none() {
14801 self.data = Some(
14802 super::transaction_kind::Data::ChangeEpoch(
14803 super::ChangeEpoch::default(),
14804 ),
14805 );
14806 }
14807 self.change_epoch_opt_mut().unwrap()
14808 }
14809 pub fn set_change_epoch<T: Into<super::ChangeEpoch>>(&mut self, field: T) {
14812 self.data = Some(
14813 super::transaction_kind::Data::ChangeEpoch(field.into().into()),
14814 );
14815 }
14816 pub fn with_change_epoch<T: Into<super::ChangeEpoch>>(
14819 mut self,
14820 field: T,
14821 ) -> Self {
14822 self.set_change_epoch(field.into());
14823 self
14824 }
14825 pub fn genesis(&self) -> &super::GenesisTransaction {
14827 if let Some(super::transaction_kind::Data::Genesis(field)) = &self.data {
14828 field as _
14829 } else {
14830 super::GenesisTransaction::default_instance() as _
14831 }
14832 }
14833 pub fn genesis_opt(&self) -> Option<&super::GenesisTransaction> {
14835 if let Some(super::transaction_kind::Data::Genesis(field)) = &self.data {
14836 Some(field as _)
14837 } else {
14838 None
14839 }
14840 }
14841 pub fn genesis_opt_mut(&mut self) -> Option<&mut super::GenesisTransaction> {
14843 if let Some(super::transaction_kind::Data::Genesis(field)) = &mut self.data {
14844 Some(field as _)
14845 } else {
14846 None
14847 }
14848 }
14849 pub fn genesis_mut(&mut self) -> &mut super::GenesisTransaction {
14853 if self.genesis_opt_mut().is_none() {
14854 self.data = Some(
14855 super::transaction_kind::Data::Genesis(
14856 super::GenesisTransaction::default(),
14857 ),
14858 );
14859 }
14860 self.genesis_opt_mut().unwrap()
14861 }
14862 pub fn set_genesis<T: Into<super::GenesisTransaction>>(&mut self, field: T) {
14865 self.data = Some(
14866 super::transaction_kind::Data::Genesis(field.into().into()),
14867 );
14868 }
14869 pub fn with_genesis<T: Into<super::GenesisTransaction>>(
14872 mut self,
14873 field: T,
14874 ) -> Self {
14875 self.set_genesis(field.into());
14876 self
14877 }
14878 pub fn consensus_commit_prologue(&self) -> &super::ConsensusCommitPrologue {
14880 if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &self
14881 .data
14882 {
14883 field as _
14884 } else {
14885 super::ConsensusCommitPrologue::default_instance() as _
14886 }
14887 }
14888 pub fn consensus_commit_prologue_opt(
14890 &self,
14891 ) -> Option<&super::ConsensusCommitPrologue> {
14892 if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &self
14893 .data
14894 {
14895 Some(field as _)
14896 } else {
14897 None
14898 }
14899 }
14900 pub fn consensus_commit_prologue_opt_mut(
14902 &mut self,
14903 ) -> Option<&mut super::ConsensusCommitPrologue> {
14904 if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &mut self
14905 .data
14906 {
14907 Some(field as _)
14908 } else {
14909 None
14910 }
14911 }
14912 pub fn consensus_commit_prologue_mut(
14916 &mut self,
14917 ) -> &mut super::ConsensusCommitPrologue {
14918 if self.consensus_commit_prologue_opt_mut().is_none() {
14919 self.data = Some(
14920 super::transaction_kind::Data::ConsensusCommitPrologue(
14921 super::ConsensusCommitPrologue::default(),
14922 ),
14923 );
14924 }
14925 self.consensus_commit_prologue_opt_mut().unwrap()
14926 }
14927 pub fn set_consensus_commit_prologue<T: Into<super::ConsensusCommitPrologue>>(
14930 &mut self,
14931 field: T,
14932 ) {
14933 self.data = Some(
14934 super::transaction_kind::Data::ConsensusCommitPrologue(
14935 field.into().into(),
14936 ),
14937 );
14938 }
14939 pub fn with_consensus_commit_prologue<T: Into<super::ConsensusCommitPrologue>>(
14942 mut self,
14943 field: T,
14944 ) -> Self {
14945 self.set_consensus_commit_prologue(field.into());
14946 self
14947 }
14948 pub fn authenticator_state_update(&self) -> &super::AuthenticatorStateUpdate {
14950 if let Some(
14951 super::transaction_kind::Data::AuthenticatorStateUpdate(field),
14952 ) = &self.data
14953 {
14954 field as _
14955 } else {
14956 super::AuthenticatorStateUpdate::default_instance() as _
14957 }
14958 }
14959 pub fn authenticator_state_update_opt(
14961 &self,
14962 ) -> Option<&super::AuthenticatorStateUpdate> {
14963 if let Some(
14964 super::transaction_kind::Data::AuthenticatorStateUpdate(field),
14965 ) = &self.data
14966 {
14967 Some(field as _)
14968 } else {
14969 None
14970 }
14971 }
14972 pub fn authenticator_state_update_opt_mut(
14974 &mut self,
14975 ) -> Option<&mut super::AuthenticatorStateUpdate> {
14976 if let Some(
14977 super::transaction_kind::Data::AuthenticatorStateUpdate(field),
14978 ) = &mut self.data
14979 {
14980 Some(field as _)
14981 } else {
14982 None
14983 }
14984 }
14985 pub fn authenticator_state_update_mut(
14989 &mut self,
14990 ) -> &mut super::AuthenticatorStateUpdate {
14991 if self.authenticator_state_update_opt_mut().is_none() {
14992 self.data = Some(
14993 super::transaction_kind::Data::AuthenticatorStateUpdate(
14994 super::AuthenticatorStateUpdate::default(),
14995 ),
14996 );
14997 }
14998 self.authenticator_state_update_opt_mut().unwrap()
14999 }
15000 pub fn set_authenticator_state_update<T: Into<super::AuthenticatorStateUpdate>>(
15003 &mut self,
15004 field: T,
15005 ) {
15006 self.data = Some(
15007 super::transaction_kind::Data::AuthenticatorStateUpdate(
15008 field.into().into(),
15009 ),
15010 );
15011 }
15012 pub fn with_authenticator_state_update<T: Into<super::AuthenticatorStateUpdate>>(
15015 mut self,
15016 field: T,
15017 ) -> Self {
15018 self.set_authenticator_state_update(field.into());
15019 self
15020 }
15021 pub fn end_of_epoch(&self) -> &super::EndOfEpochTransaction {
15023 if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &self.data {
15024 field as _
15025 } else {
15026 super::EndOfEpochTransaction::default_instance() as _
15027 }
15028 }
15029 pub fn end_of_epoch_opt(&self) -> Option<&super::EndOfEpochTransaction> {
15031 if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &self.data {
15032 Some(field as _)
15033 } else {
15034 None
15035 }
15036 }
15037 pub fn end_of_epoch_opt_mut(
15039 &mut self,
15040 ) -> Option<&mut super::EndOfEpochTransaction> {
15041 if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &mut self
15042 .data
15043 {
15044 Some(field as _)
15045 } else {
15046 None
15047 }
15048 }
15049 pub fn end_of_epoch_mut(&mut self) -> &mut super::EndOfEpochTransaction {
15053 if self.end_of_epoch_opt_mut().is_none() {
15054 self.data = Some(
15055 super::transaction_kind::Data::EndOfEpoch(
15056 super::EndOfEpochTransaction::default(),
15057 ),
15058 );
15059 }
15060 self.end_of_epoch_opt_mut().unwrap()
15061 }
15062 pub fn set_end_of_epoch<T: Into<super::EndOfEpochTransaction>>(
15065 &mut self,
15066 field: T,
15067 ) {
15068 self.data = Some(
15069 super::transaction_kind::Data::EndOfEpoch(field.into().into()),
15070 );
15071 }
15072 pub fn with_end_of_epoch<T: Into<super::EndOfEpochTransaction>>(
15075 mut self,
15076 field: T,
15077 ) -> Self {
15078 self.set_end_of_epoch(field.into());
15079 self
15080 }
15081 pub fn randomness_state_update(&self) -> &super::RandomnessStateUpdate {
15083 if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &self
15084 .data
15085 {
15086 field as _
15087 } else {
15088 super::RandomnessStateUpdate::default_instance() as _
15089 }
15090 }
15091 pub fn randomness_state_update_opt(
15093 &self,
15094 ) -> Option<&super::RandomnessStateUpdate> {
15095 if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &self
15096 .data
15097 {
15098 Some(field as _)
15099 } else {
15100 None
15101 }
15102 }
15103 pub fn randomness_state_update_opt_mut(
15105 &mut self,
15106 ) -> Option<&mut super::RandomnessStateUpdate> {
15107 if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &mut self
15108 .data
15109 {
15110 Some(field as _)
15111 } else {
15112 None
15113 }
15114 }
15115 pub fn randomness_state_update_mut(
15119 &mut self,
15120 ) -> &mut super::RandomnessStateUpdate {
15121 if self.randomness_state_update_opt_mut().is_none() {
15122 self.data = Some(
15123 super::transaction_kind::Data::RandomnessStateUpdate(
15124 super::RandomnessStateUpdate::default(),
15125 ),
15126 );
15127 }
15128 self.randomness_state_update_opt_mut().unwrap()
15129 }
15130 pub fn set_randomness_state_update<T: Into<super::RandomnessStateUpdate>>(
15133 &mut self,
15134 field: T,
15135 ) {
15136 self.data = Some(
15137 super::transaction_kind::Data::RandomnessStateUpdate(field.into().into()),
15138 );
15139 }
15140 pub fn with_randomness_state_update<T: Into<super::RandomnessStateUpdate>>(
15143 mut self,
15144 field: T,
15145 ) -> Self {
15146 self.set_randomness_state_update(field.into());
15147 self
15148 }
15149 }
15150 impl super::TransferObjects {
15151 pub const fn const_default() -> Self {
15152 Self {
15153 objects: Vec::new(),
15154 address: None,
15155 }
15156 }
15157 #[doc(hidden)]
15158 pub fn default_instance() -> &'static Self {
15159 static DEFAULT: super::TransferObjects = super::TransferObjects::const_default();
15160 &DEFAULT
15161 }
15162 pub fn objects(&self) -> &[super::Argument] {
15164 &self.objects
15165 }
15166 pub fn objects_mut(&mut self) -> &mut Vec<super::Argument> {
15169 &mut self.objects
15170 }
15171 pub fn set_objects(&mut self, field: Vec<super::Argument>) {
15173 self.objects = field;
15174 }
15175 pub fn with_objects(mut self, field: Vec<super::Argument>) -> Self {
15177 self.set_objects(field);
15178 self
15179 }
15180 pub fn address(&self) -> &super::Argument {
15182 self.address
15183 .as_ref()
15184 .map(|field| field as _)
15185 .unwrap_or_else(|| super::Argument::default_instance() as _)
15186 }
15187 pub fn address_opt_mut(&mut self) -> Option<&mut super::Argument> {
15189 self.address.as_mut().map(|field| field as _)
15190 }
15191 pub fn address_mut(&mut self) -> &mut super::Argument {
15194 self.address.get_or_insert_default()
15195 }
15196 pub fn address_opt(&self) -> Option<&super::Argument> {
15198 self.address.as_ref().map(|field| field as _)
15199 }
15200 pub fn set_address<T: Into<super::Argument>>(&mut self, field: T) {
15202 self.address = Some(field.into().into());
15203 }
15204 pub fn with_address<T: Into<super::Argument>>(mut self, field: T) -> Self {
15206 self.set_address(field.into());
15207 self
15208 }
15209 }
15210 impl super::TypeArgumentError {
15211 pub const fn const_default() -> Self {
15212 Self {
15213 type_argument: None,
15214 kind: None,
15215 }
15216 }
15217 #[doc(hidden)]
15218 pub fn default_instance() -> &'static Self {
15219 static DEFAULT: super::TypeArgumentError = super::TypeArgumentError::const_default();
15220 &DEFAULT
15221 }
15222 pub fn type_argument_opt_mut(&mut self) -> Option<&mut u32> {
15224 self.type_argument.as_mut().map(|field| field as _)
15225 }
15226 pub fn type_argument_mut(&mut self) -> &mut u32 {
15229 self.type_argument.get_or_insert_default()
15230 }
15231 pub fn type_argument_opt(&self) -> Option<u32> {
15233 self.type_argument.as_ref().map(|field| *field)
15234 }
15235 pub fn set_type_argument(&mut self, field: u32) {
15237 self.type_argument = Some(field);
15238 }
15239 pub fn with_type_argument(mut self, field: u32) -> Self {
15241 self.set_type_argument(field);
15242 self
15243 }
15244 pub fn with_kind<T: Into<super::type_argument_error::TypeArgumentErrorKind>>(
15246 mut self,
15247 field: T,
15248 ) -> Self {
15249 self.set_kind(field.into());
15250 self
15251 }
15252 }
15253 impl super::TypeOrigin {
15254 pub const fn const_default() -> Self {
15255 Self {
15256 module_name: None,
15257 datatype_name: None,
15258 package_id: None,
15259 }
15260 }
15261 #[doc(hidden)]
15262 pub fn default_instance() -> &'static Self {
15263 static DEFAULT: super::TypeOrigin = super::TypeOrigin::const_default();
15264 &DEFAULT
15265 }
15266 pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
15268 self.module_name.as_mut().map(|field| field as _)
15269 }
15270 pub fn module_name_mut(&mut self) -> &mut String {
15273 self.module_name.get_or_insert_default()
15274 }
15275 pub fn module_name_opt(&self) -> Option<&str> {
15277 self.module_name.as_ref().map(|field| field as _)
15278 }
15279 pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
15281 self.module_name = Some(field.into().into());
15282 }
15283 pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
15285 self.set_module_name(field.into());
15286 self
15287 }
15288 pub fn datatype_name_opt_mut(&mut self) -> Option<&mut String> {
15290 self.datatype_name.as_mut().map(|field| field as _)
15291 }
15292 pub fn datatype_name_mut(&mut self) -> &mut String {
15295 self.datatype_name.get_or_insert_default()
15296 }
15297 pub fn datatype_name_opt(&self) -> Option<&str> {
15299 self.datatype_name.as_ref().map(|field| field as _)
15300 }
15301 pub fn set_datatype_name<T: Into<String>>(&mut self, field: T) {
15303 self.datatype_name = Some(field.into().into());
15304 }
15305 pub fn with_datatype_name<T: Into<String>>(mut self, field: T) -> Self {
15307 self.set_datatype_name(field.into());
15308 self
15309 }
15310 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
15312 self.package_id.as_mut().map(|field| field as _)
15313 }
15314 pub fn package_id_mut(&mut self) -> &mut String {
15317 self.package_id.get_or_insert_default()
15318 }
15319 pub fn package_id_opt(&self) -> Option<&str> {
15321 self.package_id.as_ref().map(|field| field as _)
15322 }
15323 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
15325 self.package_id = Some(field.into().into());
15326 }
15327 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
15329 self.set_package_id(field.into());
15330 self
15331 }
15332 }
15333 impl super::TypeParameter {
15334 pub const fn const_default() -> Self {
15335 Self {
15336 constraints: Vec::new(),
15337 is_phantom: None,
15338 }
15339 }
15340 #[doc(hidden)]
15341 pub fn default_instance() -> &'static Self {
15342 static DEFAULT: super::TypeParameter = super::TypeParameter::const_default();
15343 &DEFAULT
15344 }
15345 pub fn is_phantom_opt_mut(&mut self) -> Option<&mut bool> {
15347 self.is_phantom.as_mut().map(|field| field as _)
15348 }
15349 pub fn is_phantom_mut(&mut self) -> &mut bool {
15352 self.is_phantom.get_or_insert_default()
15353 }
15354 pub fn is_phantom_opt(&self) -> Option<bool> {
15356 self.is_phantom.as_ref().map(|field| *field)
15357 }
15358 pub fn set_is_phantom(&mut self, field: bool) {
15360 self.is_phantom = Some(field);
15361 }
15362 pub fn with_is_phantom(mut self, field: bool) -> Self {
15364 self.set_is_phantom(field);
15365 self
15366 }
15367 }
15368 impl super::UnchangedConsensusObject {
15369 pub const fn const_default() -> Self {
15370 Self {
15371 kind: None,
15372 object_id: None,
15373 version: None,
15374 digest: None,
15375 object_type: None,
15376 }
15377 }
15378 #[doc(hidden)]
15379 pub fn default_instance() -> &'static Self {
15380 static DEFAULT: super::UnchangedConsensusObject = super::UnchangedConsensusObject::const_default();
15381 &DEFAULT
15382 }
15383 pub fn with_kind<
15385 T: Into<super::unchanged_consensus_object::UnchangedConsensusObjectKind>,
15386 >(mut self, field: T) -> Self {
15387 self.set_kind(field.into());
15388 self
15389 }
15390 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
15392 self.object_id.as_mut().map(|field| field as _)
15393 }
15394 pub fn object_id_mut(&mut self) -> &mut String {
15397 self.object_id.get_or_insert_default()
15398 }
15399 pub fn object_id_opt(&self) -> Option<&str> {
15401 self.object_id.as_ref().map(|field| field as _)
15402 }
15403 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
15405 self.object_id = Some(field.into().into());
15406 }
15407 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
15409 self.set_object_id(field.into());
15410 self
15411 }
15412 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
15414 self.version.as_mut().map(|field| field as _)
15415 }
15416 pub fn version_mut(&mut self) -> &mut u64 {
15419 self.version.get_or_insert_default()
15420 }
15421 pub fn version_opt(&self) -> Option<u64> {
15423 self.version.as_ref().map(|field| *field)
15424 }
15425 pub fn set_version(&mut self, field: u64) {
15427 self.version = Some(field);
15428 }
15429 pub fn with_version(mut self, field: u64) -> Self {
15431 self.set_version(field);
15432 self
15433 }
15434 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
15436 self.digest.as_mut().map(|field| field as _)
15437 }
15438 pub fn digest_mut(&mut self) -> &mut String {
15441 self.digest.get_or_insert_default()
15442 }
15443 pub fn digest_opt(&self) -> Option<&str> {
15445 self.digest.as_ref().map(|field| field as _)
15446 }
15447 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
15449 self.digest = Some(field.into().into());
15450 }
15451 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
15453 self.set_digest(field.into());
15454 self
15455 }
15456 pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
15458 self.object_type.as_mut().map(|field| field as _)
15459 }
15460 pub fn object_type_mut(&mut self) -> &mut String {
15463 self.object_type.get_or_insert_default()
15464 }
15465 pub fn object_type_opt(&self) -> Option<&str> {
15467 self.object_type.as_ref().map(|field| field as _)
15468 }
15469 pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
15471 self.object_type = Some(field.into().into());
15472 }
15473 pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
15475 self.set_object_type(field.into());
15476 self
15477 }
15478 }
15479 impl super::Upgrade {
15480 pub const fn const_default() -> Self {
15481 Self {
15482 modules: Vec::new(),
15483 dependencies: Vec::new(),
15484 package: None,
15485 ticket: None,
15486 }
15487 }
15488 #[doc(hidden)]
15489 pub fn default_instance() -> &'static Self {
15490 static DEFAULT: super::Upgrade = super::Upgrade::const_default();
15491 &DEFAULT
15492 }
15493 pub fn modules(&self) -> &[::prost::bytes::Bytes] {
15495 &self.modules
15496 }
15497 pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
15500 &mut self.modules
15501 }
15502 pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
15504 self.modules = field;
15505 }
15506 pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
15508 self.set_modules(field);
15509 self
15510 }
15511 pub fn dependencies(&self) -> &[String] {
15513 &self.dependencies
15514 }
15515 pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
15518 &mut self.dependencies
15519 }
15520 pub fn set_dependencies(&mut self, field: Vec<String>) {
15522 self.dependencies = field;
15523 }
15524 pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
15526 self.set_dependencies(field);
15527 self
15528 }
15529 pub fn package_opt_mut(&mut self) -> Option<&mut String> {
15531 self.package.as_mut().map(|field| field as _)
15532 }
15533 pub fn package_mut(&mut self) -> &mut String {
15536 self.package.get_or_insert_default()
15537 }
15538 pub fn package_opt(&self) -> Option<&str> {
15540 self.package.as_ref().map(|field| field as _)
15541 }
15542 pub fn set_package<T: Into<String>>(&mut self, field: T) {
15544 self.package = Some(field.into().into());
15545 }
15546 pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
15548 self.set_package(field.into());
15549 self
15550 }
15551 pub fn ticket(&self) -> &super::Argument {
15553 self.ticket
15554 .as_ref()
15555 .map(|field| field as _)
15556 .unwrap_or_else(|| super::Argument::default_instance() as _)
15557 }
15558 pub fn ticket_opt_mut(&mut self) -> Option<&mut super::Argument> {
15560 self.ticket.as_mut().map(|field| field as _)
15561 }
15562 pub fn ticket_mut(&mut self) -> &mut super::Argument {
15565 self.ticket.get_or_insert_default()
15566 }
15567 pub fn ticket_opt(&self) -> Option<&super::Argument> {
15569 self.ticket.as_ref().map(|field| field as _)
15570 }
15571 pub fn set_ticket<T: Into<super::Argument>>(&mut self, field: T) {
15573 self.ticket = Some(field.into().into());
15574 }
15575 pub fn with_ticket<T: Into<super::Argument>>(mut self, field: T) -> Self {
15577 self.set_ticket(field.into());
15578 self
15579 }
15580 }
15581 impl super::UserSignature {
15582 pub const fn const_default() -> Self {
15583 Self {
15584 bcs: None,
15585 scheme: None,
15586 signature: None,
15587 }
15588 }
15589 #[doc(hidden)]
15590 pub fn default_instance() -> &'static Self {
15591 static DEFAULT: super::UserSignature = super::UserSignature::const_default();
15592 &DEFAULT
15593 }
15594 pub fn bcs(&self) -> &super::Bcs {
15596 self.bcs
15597 .as_ref()
15598 .map(|field| field as _)
15599 .unwrap_or_else(|| super::Bcs::default_instance() as _)
15600 }
15601 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
15603 self.bcs.as_mut().map(|field| field as _)
15604 }
15605 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
15608 self.bcs.get_or_insert_default()
15609 }
15610 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
15612 self.bcs.as_ref().map(|field| field as _)
15613 }
15614 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
15616 self.bcs = Some(field.into().into());
15617 }
15618 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
15620 self.set_bcs(field.into());
15621 self
15622 }
15623 pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
15625 self.set_scheme(field.into());
15626 self
15627 }
15628 pub fn simple(&self) -> &super::SimpleSignature {
15630 if let Some(super::user_signature::Signature::Simple(field)) = &self
15631 .signature
15632 {
15633 field as _
15634 } else {
15635 super::SimpleSignature::default_instance() as _
15636 }
15637 }
15638 pub fn simple_opt(&self) -> Option<&super::SimpleSignature> {
15640 if let Some(super::user_signature::Signature::Simple(field)) = &self
15641 .signature
15642 {
15643 Some(field as _)
15644 } else {
15645 None
15646 }
15647 }
15648 pub fn simple_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
15650 if let Some(super::user_signature::Signature::Simple(field)) = &mut self
15651 .signature
15652 {
15653 Some(field as _)
15654 } else {
15655 None
15656 }
15657 }
15658 pub fn simple_mut(&mut self) -> &mut super::SimpleSignature {
15662 if self.simple_opt_mut().is_none() {
15663 self.signature = Some(
15664 super::user_signature::Signature::Simple(
15665 super::SimpleSignature::default(),
15666 ),
15667 );
15668 }
15669 self.simple_opt_mut().unwrap()
15670 }
15671 pub fn set_simple<T: Into<super::SimpleSignature>>(&mut self, field: T) {
15674 self.signature = Some(
15675 super::user_signature::Signature::Simple(field.into().into()),
15676 );
15677 }
15678 pub fn with_simple<T: Into<super::SimpleSignature>>(mut self, field: T) -> Self {
15681 self.set_simple(field.into());
15682 self
15683 }
15684 pub fn multisig(&self) -> &super::MultisigAggregatedSignature {
15686 if let Some(super::user_signature::Signature::Multisig(field)) = &self
15687 .signature
15688 {
15689 field as _
15690 } else {
15691 super::MultisigAggregatedSignature::default_instance() as _
15692 }
15693 }
15694 pub fn multisig_opt(&self) -> Option<&super::MultisigAggregatedSignature> {
15696 if let Some(super::user_signature::Signature::Multisig(field)) = &self
15697 .signature
15698 {
15699 Some(field as _)
15700 } else {
15701 None
15702 }
15703 }
15704 pub fn multisig_opt_mut(
15706 &mut self,
15707 ) -> Option<&mut super::MultisigAggregatedSignature> {
15708 if let Some(super::user_signature::Signature::Multisig(field)) = &mut self
15709 .signature
15710 {
15711 Some(field as _)
15712 } else {
15713 None
15714 }
15715 }
15716 pub fn multisig_mut(&mut self) -> &mut super::MultisigAggregatedSignature {
15720 if self.multisig_opt_mut().is_none() {
15721 self.signature = Some(
15722 super::user_signature::Signature::Multisig(
15723 super::MultisigAggregatedSignature::default(),
15724 ),
15725 );
15726 }
15727 self.multisig_opt_mut().unwrap()
15728 }
15729 pub fn set_multisig<T: Into<super::MultisigAggregatedSignature>>(
15732 &mut self,
15733 field: T,
15734 ) {
15735 self.signature = Some(
15736 super::user_signature::Signature::Multisig(field.into().into()),
15737 );
15738 }
15739 pub fn with_multisig<T: Into<super::MultisigAggregatedSignature>>(
15742 mut self,
15743 field: T,
15744 ) -> Self {
15745 self.set_multisig(field.into());
15746 self
15747 }
15748 pub fn zklogin(&self) -> &super::ZkLoginAuthenticator {
15750 if let Some(super::user_signature::Signature::Zklogin(field)) = &self
15751 .signature
15752 {
15753 field as _
15754 } else {
15755 super::ZkLoginAuthenticator::default_instance() as _
15756 }
15757 }
15758 pub fn zklogin_opt(&self) -> Option<&super::ZkLoginAuthenticator> {
15760 if let Some(super::user_signature::Signature::Zklogin(field)) = &self
15761 .signature
15762 {
15763 Some(field as _)
15764 } else {
15765 None
15766 }
15767 }
15768 pub fn zklogin_opt_mut(&mut self) -> Option<&mut super::ZkLoginAuthenticator> {
15770 if let Some(super::user_signature::Signature::Zklogin(field)) = &mut self
15771 .signature
15772 {
15773 Some(field as _)
15774 } else {
15775 None
15776 }
15777 }
15778 pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginAuthenticator {
15782 if self.zklogin_opt_mut().is_none() {
15783 self.signature = Some(
15784 super::user_signature::Signature::Zklogin(
15785 super::ZkLoginAuthenticator::default(),
15786 ),
15787 );
15788 }
15789 self.zklogin_opt_mut().unwrap()
15790 }
15791 pub fn set_zklogin<T: Into<super::ZkLoginAuthenticator>>(&mut self, field: T) {
15794 self.signature = Some(
15795 super::user_signature::Signature::Zklogin(field.into().into()),
15796 );
15797 }
15798 pub fn with_zklogin<T: Into<super::ZkLoginAuthenticator>>(
15801 mut self,
15802 field: T,
15803 ) -> Self {
15804 self.set_zklogin(field.into());
15805 self
15806 }
15807 pub fn passkey(&self) -> &super::PasskeyAuthenticator {
15809 if let Some(super::user_signature::Signature::Passkey(field)) = &self
15810 .signature
15811 {
15812 field as _
15813 } else {
15814 super::PasskeyAuthenticator::default_instance() as _
15815 }
15816 }
15817 pub fn passkey_opt(&self) -> Option<&super::PasskeyAuthenticator> {
15819 if let Some(super::user_signature::Signature::Passkey(field)) = &self
15820 .signature
15821 {
15822 Some(field as _)
15823 } else {
15824 None
15825 }
15826 }
15827 pub fn passkey_opt_mut(&mut self) -> Option<&mut super::PasskeyAuthenticator> {
15829 if let Some(super::user_signature::Signature::Passkey(field)) = &mut self
15830 .signature
15831 {
15832 Some(field as _)
15833 } else {
15834 None
15835 }
15836 }
15837 pub fn passkey_mut(&mut self) -> &mut super::PasskeyAuthenticator {
15841 if self.passkey_opt_mut().is_none() {
15842 self.signature = Some(
15843 super::user_signature::Signature::Passkey(
15844 super::PasskeyAuthenticator::default(),
15845 ),
15846 );
15847 }
15848 self.passkey_opt_mut().unwrap()
15849 }
15850 pub fn set_passkey<T: Into<super::PasskeyAuthenticator>>(&mut self, field: T) {
15853 self.signature = Some(
15854 super::user_signature::Signature::Passkey(field.into().into()),
15855 );
15856 }
15857 pub fn with_passkey<T: Into<super::PasskeyAuthenticator>>(
15860 mut self,
15861 field: T,
15862 ) -> Self {
15863 self.set_passkey(field.into());
15864 self
15865 }
15866 }
15867 impl super::Validator {
15868 pub const fn const_default() -> Self {
15869 Self {
15870 name: None,
15871 address: None,
15872 description: None,
15873 image_url: None,
15874 project_url: None,
15875 protocol_public_key: None,
15876 proof_of_possession: None,
15877 network_public_key: None,
15878 worker_public_key: None,
15879 network_address: None,
15880 p2p_address: None,
15881 primary_address: None,
15882 worker_address: None,
15883 next_epoch_protocol_public_key: None,
15884 next_epoch_proof_of_possession: None,
15885 next_epoch_network_public_key: None,
15886 next_epoch_worker_public_key: None,
15887 next_epoch_network_address: None,
15888 next_epoch_p2p_address: None,
15889 next_epoch_primary_address: None,
15890 next_epoch_worker_address: None,
15891 metadata_extra_fields: None,
15892 voting_power: None,
15893 operation_cap_id: None,
15894 gas_price: None,
15895 staking_pool: None,
15896 commission_rate: None,
15897 next_epoch_stake: None,
15898 next_epoch_gas_price: None,
15899 next_epoch_commission_rate: None,
15900 extra_fields: None,
15901 }
15902 }
15903 #[doc(hidden)]
15904 pub fn default_instance() -> &'static Self {
15905 static DEFAULT: super::Validator = super::Validator::const_default();
15906 &DEFAULT
15907 }
15908 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
15910 self.name.as_mut().map(|field| field as _)
15911 }
15912 pub fn name_mut(&mut self) -> &mut String {
15915 self.name.get_or_insert_default()
15916 }
15917 pub fn name_opt(&self) -> Option<&str> {
15919 self.name.as_ref().map(|field| field as _)
15920 }
15921 pub fn set_name<T: Into<String>>(&mut self, field: T) {
15923 self.name = Some(field.into().into());
15924 }
15925 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
15927 self.set_name(field.into());
15928 self
15929 }
15930 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
15932 self.address.as_mut().map(|field| field as _)
15933 }
15934 pub fn address_mut(&mut self) -> &mut String {
15937 self.address.get_or_insert_default()
15938 }
15939 pub fn address_opt(&self) -> Option<&str> {
15941 self.address.as_ref().map(|field| field as _)
15942 }
15943 pub fn set_address<T: Into<String>>(&mut self, field: T) {
15945 self.address = Some(field.into().into());
15946 }
15947 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
15949 self.set_address(field.into());
15950 self
15951 }
15952 pub fn description_opt_mut(&mut self) -> Option<&mut String> {
15954 self.description.as_mut().map(|field| field as _)
15955 }
15956 pub fn description_mut(&mut self) -> &mut String {
15959 self.description.get_or_insert_default()
15960 }
15961 pub fn description_opt(&self) -> Option<&str> {
15963 self.description.as_ref().map(|field| field as _)
15964 }
15965 pub fn set_description<T: Into<String>>(&mut self, field: T) {
15967 self.description = Some(field.into().into());
15968 }
15969 pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
15971 self.set_description(field.into());
15972 self
15973 }
15974 pub fn image_url_opt_mut(&mut self) -> Option<&mut String> {
15976 self.image_url.as_mut().map(|field| field as _)
15977 }
15978 pub fn image_url_mut(&mut self) -> &mut String {
15981 self.image_url.get_or_insert_default()
15982 }
15983 pub fn image_url_opt(&self) -> Option<&str> {
15985 self.image_url.as_ref().map(|field| field as _)
15986 }
15987 pub fn set_image_url<T: Into<String>>(&mut self, field: T) {
15989 self.image_url = Some(field.into().into());
15990 }
15991 pub fn with_image_url<T: Into<String>>(mut self, field: T) -> Self {
15993 self.set_image_url(field.into());
15994 self
15995 }
15996 pub fn project_url_opt_mut(&mut self) -> Option<&mut String> {
15998 self.project_url.as_mut().map(|field| field as _)
15999 }
16000 pub fn project_url_mut(&mut self) -> &mut String {
16003 self.project_url.get_or_insert_default()
16004 }
16005 pub fn project_url_opt(&self) -> Option<&str> {
16007 self.project_url.as_ref().map(|field| field as _)
16008 }
16009 pub fn set_project_url<T: Into<String>>(&mut self, field: T) {
16011 self.project_url = Some(field.into().into());
16012 }
16013 pub fn with_project_url<T: Into<String>>(mut self, field: T) -> Self {
16015 self.set_project_url(field.into());
16016 self
16017 }
16018 pub fn protocol_public_key_opt(&self) -> Option<&[u8]> {
16020 self.protocol_public_key.as_ref().map(|field| field as _)
16021 }
16022 pub fn set_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
16024 &mut self,
16025 field: T,
16026 ) {
16027 self.protocol_public_key = Some(field.into().into());
16028 }
16029 pub fn with_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
16031 mut self,
16032 field: T,
16033 ) -> Self {
16034 self.set_protocol_public_key(field.into());
16035 self
16036 }
16037 pub fn proof_of_possession_opt(&self) -> Option<&[u8]> {
16039 self.proof_of_possession.as_ref().map(|field| field as _)
16040 }
16041 pub fn set_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
16043 &mut self,
16044 field: T,
16045 ) {
16046 self.proof_of_possession = Some(field.into().into());
16047 }
16048 pub fn with_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
16050 mut self,
16051 field: T,
16052 ) -> Self {
16053 self.set_proof_of_possession(field.into());
16054 self
16055 }
16056 pub fn network_public_key_opt(&self) -> Option<&[u8]> {
16058 self.network_public_key.as_ref().map(|field| field as _)
16059 }
16060 pub fn set_network_public_key<T: Into<::prost::bytes::Bytes>>(
16062 &mut self,
16063 field: T,
16064 ) {
16065 self.network_public_key = Some(field.into().into());
16066 }
16067 pub fn with_network_public_key<T: Into<::prost::bytes::Bytes>>(
16069 mut self,
16070 field: T,
16071 ) -> Self {
16072 self.set_network_public_key(field.into());
16073 self
16074 }
16075 pub fn worker_public_key_opt(&self) -> Option<&[u8]> {
16077 self.worker_public_key.as_ref().map(|field| field as _)
16078 }
16079 pub fn set_worker_public_key<T: Into<::prost::bytes::Bytes>>(
16081 &mut self,
16082 field: T,
16083 ) {
16084 self.worker_public_key = Some(field.into().into());
16085 }
16086 pub fn with_worker_public_key<T: Into<::prost::bytes::Bytes>>(
16088 mut self,
16089 field: T,
16090 ) -> Self {
16091 self.set_worker_public_key(field.into());
16092 self
16093 }
16094 pub fn network_address_opt_mut(&mut self) -> Option<&mut String> {
16096 self.network_address.as_mut().map(|field| field as _)
16097 }
16098 pub fn network_address_mut(&mut self) -> &mut String {
16101 self.network_address.get_or_insert_default()
16102 }
16103 pub fn network_address_opt(&self) -> Option<&str> {
16105 self.network_address.as_ref().map(|field| field as _)
16106 }
16107 pub fn set_network_address<T: Into<String>>(&mut self, field: T) {
16109 self.network_address = Some(field.into().into());
16110 }
16111 pub fn with_network_address<T: Into<String>>(mut self, field: T) -> Self {
16113 self.set_network_address(field.into());
16114 self
16115 }
16116 pub fn p2p_address_opt_mut(&mut self) -> Option<&mut String> {
16118 self.p2p_address.as_mut().map(|field| field as _)
16119 }
16120 pub fn p2p_address_mut(&mut self) -> &mut String {
16123 self.p2p_address.get_or_insert_default()
16124 }
16125 pub fn p2p_address_opt(&self) -> Option<&str> {
16127 self.p2p_address.as_ref().map(|field| field as _)
16128 }
16129 pub fn set_p2p_address<T: Into<String>>(&mut self, field: T) {
16131 self.p2p_address = Some(field.into().into());
16132 }
16133 pub fn with_p2p_address<T: Into<String>>(mut self, field: T) -> Self {
16135 self.set_p2p_address(field.into());
16136 self
16137 }
16138 pub fn primary_address_opt_mut(&mut self) -> Option<&mut String> {
16140 self.primary_address.as_mut().map(|field| field as _)
16141 }
16142 pub fn primary_address_mut(&mut self) -> &mut String {
16145 self.primary_address.get_or_insert_default()
16146 }
16147 pub fn primary_address_opt(&self) -> Option<&str> {
16149 self.primary_address.as_ref().map(|field| field as _)
16150 }
16151 pub fn set_primary_address<T: Into<String>>(&mut self, field: T) {
16153 self.primary_address = Some(field.into().into());
16154 }
16155 pub fn with_primary_address<T: Into<String>>(mut self, field: T) -> Self {
16157 self.set_primary_address(field.into());
16158 self
16159 }
16160 pub fn worker_address_opt_mut(&mut self) -> Option<&mut String> {
16162 self.worker_address.as_mut().map(|field| field as _)
16163 }
16164 pub fn worker_address_mut(&mut self) -> &mut String {
16167 self.worker_address.get_or_insert_default()
16168 }
16169 pub fn worker_address_opt(&self) -> Option<&str> {
16171 self.worker_address.as_ref().map(|field| field as _)
16172 }
16173 pub fn set_worker_address<T: Into<String>>(&mut self, field: T) {
16175 self.worker_address = Some(field.into().into());
16176 }
16177 pub fn with_worker_address<T: Into<String>>(mut self, field: T) -> Self {
16179 self.set_worker_address(field.into());
16180 self
16181 }
16182 pub fn next_epoch_protocol_public_key_opt(&self) -> Option<&[u8]> {
16184 self.next_epoch_protocol_public_key.as_ref().map(|field| field as _)
16185 }
16186 pub fn set_next_epoch_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
16188 &mut self,
16189 field: T,
16190 ) {
16191 self.next_epoch_protocol_public_key = Some(field.into().into());
16192 }
16193 pub fn with_next_epoch_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
16195 mut self,
16196 field: T,
16197 ) -> Self {
16198 self.set_next_epoch_protocol_public_key(field.into());
16199 self
16200 }
16201 pub fn next_epoch_proof_of_possession_opt(&self) -> Option<&[u8]> {
16203 self.next_epoch_proof_of_possession.as_ref().map(|field| field as _)
16204 }
16205 pub fn set_next_epoch_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
16207 &mut self,
16208 field: T,
16209 ) {
16210 self.next_epoch_proof_of_possession = Some(field.into().into());
16211 }
16212 pub fn with_next_epoch_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
16214 mut self,
16215 field: T,
16216 ) -> Self {
16217 self.set_next_epoch_proof_of_possession(field.into());
16218 self
16219 }
16220 pub fn next_epoch_network_public_key_opt(&self) -> Option<&[u8]> {
16222 self.next_epoch_network_public_key.as_ref().map(|field| field as _)
16223 }
16224 pub fn set_next_epoch_network_public_key<T: Into<::prost::bytes::Bytes>>(
16226 &mut self,
16227 field: T,
16228 ) {
16229 self.next_epoch_network_public_key = Some(field.into().into());
16230 }
16231 pub fn with_next_epoch_network_public_key<T: Into<::prost::bytes::Bytes>>(
16233 mut self,
16234 field: T,
16235 ) -> Self {
16236 self.set_next_epoch_network_public_key(field.into());
16237 self
16238 }
16239 pub fn next_epoch_worker_public_key_opt(&self) -> Option<&[u8]> {
16241 self.next_epoch_worker_public_key.as_ref().map(|field| field as _)
16242 }
16243 pub fn set_next_epoch_worker_public_key<T: Into<::prost::bytes::Bytes>>(
16245 &mut self,
16246 field: T,
16247 ) {
16248 self.next_epoch_worker_public_key = Some(field.into().into());
16249 }
16250 pub fn with_next_epoch_worker_public_key<T: Into<::prost::bytes::Bytes>>(
16252 mut self,
16253 field: T,
16254 ) -> Self {
16255 self.set_next_epoch_worker_public_key(field.into());
16256 self
16257 }
16258 pub fn next_epoch_network_address_opt_mut(&mut self) -> Option<&mut String> {
16260 self.next_epoch_network_address.as_mut().map(|field| field as _)
16261 }
16262 pub fn next_epoch_network_address_mut(&mut self) -> &mut String {
16265 self.next_epoch_network_address.get_or_insert_default()
16266 }
16267 pub fn next_epoch_network_address_opt(&self) -> Option<&str> {
16269 self.next_epoch_network_address.as_ref().map(|field| field as _)
16270 }
16271 pub fn set_next_epoch_network_address<T: Into<String>>(&mut self, field: T) {
16273 self.next_epoch_network_address = Some(field.into().into());
16274 }
16275 pub fn with_next_epoch_network_address<T: Into<String>>(
16277 mut self,
16278 field: T,
16279 ) -> Self {
16280 self.set_next_epoch_network_address(field.into());
16281 self
16282 }
16283 pub fn next_epoch_p2p_address_opt_mut(&mut self) -> Option<&mut String> {
16285 self.next_epoch_p2p_address.as_mut().map(|field| field as _)
16286 }
16287 pub fn next_epoch_p2p_address_mut(&mut self) -> &mut String {
16290 self.next_epoch_p2p_address.get_or_insert_default()
16291 }
16292 pub fn next_epoch_p2p_address_opt(&self) -> Option<&str> {
16294 self.next_epoch_p2p_address.as_ref().map(|field| field as _)
16295 }
16296 pub fn set_next_epoch_p2p_address<T: Into<String>>(&mut self, field: T) {
16298 self.next_epoch_p2p_address = Some(field.into().into());
16299 }
16300 pub fn with_next_epoch_p2p_address<T: Into<String>>(mut self, field: T) -> Self {
16302 self.set_next_epoch_p2p_address(field.into());
16303 self
16304 }
16305 pub fn next_epoch_primary_address_opt_mut(&mut self) -> Option<&mut String> {
16307 self.next_epoch_primary_address.as_mut().map(|field| field as _)
16308 }
16309 pub fn next_epoch_primary_address_mut(&mut self) -> &mut String {
16312 self.next_epoch_primary_address.get_or_insert_default()
16313 }
16314 pub fn next_epoch_primary_address_opt(&self) -> Option<&str> {
16316 self.next_epoch_primary_address.as_ref().map(|field| field as _)
16317 }
16318 pub fn set_next_epoch_primary_address<T: Into<String>>(&mut self, field: T) {
16320 self.next_epoch_primary_address = Some(field.into().into());
16321 }
16322 pub fn with_next_epoch_primary_address<T: Into<String>>(
16324 mut self,
16325 field: T,
16326 ) -> Self {
16327 self.set_next_epoch_primary_address(field.into());
16328 self
16329 }
16330 pub fn next_epoch_worker_address_opt_mut(&mut self) -> Option<&mut String> {
16332 self.next_epoch_worker_address.as_mut().map(|field| field as _)
16333 }
16334 pub fn next_epoch_worker_address_mut(&mut self) -> &mut String {
16337 self.next_epoch_worker_address.get_or_insert_default()
16338 }
16339 pub fn next_epoch_worker_address_opt(&self) -> Option<&str> {
16341 self.next_epoch_worker_address.as_ref().map(|field| field as _)
16342 }
16343 pub fn set_next_epoch_worker_address<T: Into<String>>(&mut self, field: T) {
16345 self.next_epoch_worker_address = Some(field.into().into());
16346 }
16347 pub fn with_next_epoch_worker_address<T: Into<String>>(
16349 mut self,
16350 field: T,
16351 ) -> Self {
16352 self.set_next_epoch_worker_address(field.into());
16353 self
16354 }
16355 pub fn metadata_extra_fields(&self) -> &super::MoveTable {
16357 self.metadata_extra_fields
16358 .as_ref()
16359 .map(|field| field as _)
16360 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16361 }
16362 pub fn metadata_extra_fields_opt_mut(
16364 &mut self,
16365 ) -> Option<&mut super::MoveTable> {
16366 self.metadata_extra_fields.as_mut().map(|field| field as _)
16367 }
16368 pub fn metadata_extra_fields_mut(&mut self) -> &mut super::MoveTable {
16371 self.metadata_extra_fields.get_or_insert_default()
16372 }
16373 pub fn metadata_extra_fields_opt(&self) -> Option<&super::MoveTable> {
16375 self.metadata_extra_fields.as_ref().map(|field| field as _)
16376 }
16377 pub fn set_metadata_extra_fields<T: Into<super::MoveTable>>(
16379 &mut self,
16380 field: T,
16381 ) {
16382 self.metadata_extra_fields = Some(field.into().into());
16383 }
16384 pub fn with_metadata_extra_fields<T: Into<super::MoveTable>>(
16386 mut self,
16387 field: T,
16388 ) -> Self {
16389 self.set_metadata_extra_fields(field.into());
16390 self
16391 }
16392 pub fn voting_power_opt_mut(&mut self) -> Option<&mut u64> {
16394 self.voting_power.as_mut().map(|field| field as _)
16395 }
16396 pub fn voting_power_mut(&mut self) -> &mut u64 {
16399 self.voting_power.get_or_insert_default()
16400 }
16401 pub fn voting_power_opt(&self) -> Option<u64> {
16403 self.voting_power.as_ref().map(|field| *field)
16404 }
16405 pub fn set_voting_power(&mut self, field: u64) {
16407 self.voting_power = Some(field);
16408 }
16409 pub fn with_voting_power(mut self, field: u64) -> Self {
16411 self.set_voting_power(field);
16412 self
16413 }
16414 pub fn operation_cap_id_opt_mut(&mut self) -> Option<&mut String> {
16416 self.operation_cap_id.as_mut().map(|field| field as _)
16417 }
16418 pub fn operation_cap_id_mut(&mut self) -> &mut String {
16421 self.operation_cap_id.get_or_insert_default()
16422 }
16423 pub fn operation_cap_id_opt(&self) -> Option<&str> {
16425 self.operation_cap_id.as_ref().map(|field| field as _)
16426 }
16427 pub fn set_operation_cap_id<T: Into<String>>(&mut self, field: T) {
16429 self.operation_cap_id = Some(field.into().into());
16430 }
16431 pub fn with_operation_cap_id<T: Into<String>>(mut self, field: T) -> Self {
16433 self.set_operation_cap_id(field.into());
16434 self
16435 }
16436 pub fn gas_price_opt_mut(&mut self) -> Option<&mut u64> {
16438 self.gas_price.as_mut().map(|field| field as _)
16439 }
16440 pub fn gas_price_mut(&mut self) -> &mut u64 {
16443 self.gas_price.get_or_insert_default()
16444 }
16445 pub fn gas_price_opt(&self) -> Option<u64> {
16447 self.gas_price.as_ref().map(|field| *field)
16448 }
16449 pub fn set_gas_price(&mut self, field: u64) {
16451 self.gas_price = Some(field);
16452 }
16453 pub fn with_gas_price(mut self, field: u64) -> Self {
16455 self.set_gas_price(field);
16456 self
16457 }
16458 pub fn staking_pool(&self) -> &super::StakingPool {
16460 self.staking_pool
16461 .as_ref()
16462 .map(|field| field as _)
16463 .unwrap_or_else(|| super::StakingPool::default_instance() as _)
16464 }
16465 pub fn staking_pool_opt_mut(&mut self) -> Option<&mut super::StakingPool> {
16467 self.staking_pool.as_mut().map(|field| field as _)
16468 }
16469 pub fn staking_pool_mut(&mut self) -> &mut super::StakingPool {
16472 self.staking_pool.get_or_insert_default()
16473 }
16474 pub fn staking_pool_opt(&self) -> Option<&super::StakingPool> {
16476 self.staking_pool.as_ref().map(|field| field as _)
16477 }
16478 pub fn set_staking_pool<T: Into<super::StakingPool>>(&mut self, field: T) {
16480 self.staking_pool = Some(field.into().into());
16481 }
16482 pub fn with_staking_pool<T: Into<super::StakingPool>>(
16484 mut self,
16485 field: T,
16486 ) -> Self {
16487 self.set_staking_pool(field.into());
16488 self
16489 }
16490 pub fn commission_rate_opt_mut(&mut self) -> Option<&mut u64> {
16492 self.commission_rate.as_mut().map(|field| field as _)
16493 }
16494 pub fn commission_rate_mut(&mut self) -> &mut u64 {
16497 self.commission_rate.get_or_insert_default()
16498 }
16499 pub fn commission_rate_opt(&self) -> Option<u64> {
16501 self.commission_rate.as_ref().map(|field| *field)
16502 }
16503 pub fn set_commission_rate(&mut self, field: u64) {
16505 self.commission_rate = Some(field);
16506 }
16507 pub fn with_commission_rate(mut self, field: u64) -> Self {
16509 self.set_commission_rate(field);
16510 self
16511 }
16512 pub fn next_epoch_stake_opt_mut(&mut self) -> Option<&mut u64> {
16514 self.next_epoch_stake.as_mut().map(|field| field as _)
16515 }
16516 pub fn next_epoch_stake_mut(&mut self) -> &mut u64 {
16519 self.next_epoch_stake.get_or_insert_default()
16520 }
16521 pub fn next_epoch_stake_opt(&self) -> Option<u64> {
16523 self.next_epoch_stake.as_ref().map(|field| *field)
16524 }
16525 pub fn set_next_epoch_stake(&mut self, field: u64) {
16527 self.next_epoch_stake = Some(field);
16528 }
16529 pub fn with_next_epoch_stake(mut self, field: u64) -> Self {
16531 self.set_next_epoch_stake(field);
16532 self
16533 }
16534 pub fn next_epoch_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
16536 self.next_epoch_gas_price.as_mut().map(|field| field as _)
16537 }
16538 pub fn next_epoch_gas_price_mut(&mut self) -> &mut u64 {
16541 self.next_epoch_gas_price.get_or_insert_default()
16542 }
16543 pub fn next_epoch_gas_price_opt(&self) -> Option<u64> {
16545 self.next_epoch_gas_price.as_ref().map(|field| *field)
16546 }
16547 pub fn set_next_epoch_gas_price(&mut self, field: u64) {
16549 self.next_epoch_gas_price = Some(field);
16550 }
16551 pub fn with_next_epoch_gas_price(mut self, field: u64) -> Self {
16553 self.set_next_epoch_gas_price(field);
16554 self
16555 }
16556 pub fn next_epoch_commission_rate_opt_mut(&mut self) -> Option<&mut u64> {
16558 self.next_epoch_commission_rate.as_mut().map(|field| field as _)
16559 }
16560 pub fn next_epoch_commission_rate_mut(&mut self) -> &mut u64 {
16563 self.next_epoch_commission_rate.get_or_insert_default()
16564 }
16565 pub fn next_epoch_commission_rate_opt(&self) -> Option<u64> {
16567 self.next_epoch_commission_rate.as_ref().map(|field| *field)
16568 }
16569 pub fn set_next_epoch_commission_rate(&mut self, field: u64) {
16571 self.next_epoch_commission_rate = Some(field);
16572 }
16573 pub fn with_next_epoch_commission_rate(mut self, field: u64) -> Self {
16575 self.set_next_epoch_commission_rate(field);
16576 self
16577 }
16578 pub fn extra_fields(&self) -> &super::MoveTable {
16580 self.extra_fields
16581 .as_ref()
16582 .map(|field| field as _)
16583 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16584 }
16585 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
16587 self.extra_fields.as_mut().map(|field| field as _)
16588 }
16589 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
16592 self.extra_fields.get_or_insert_default()
16593 }
16594 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
16596 self.extra_fields.as_ref().map(|field| field as _)
16597 }
16598 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
16600 self.extra_fields = Some(field.into().into());
16601 }
16602 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
16604 self.set_extra_fields(field.into());
16605 self
16606 }
16607 }
16608 impl super::ValidatorAggregatedSignature {
16609 pub const fn const_default() -> Self {
16610 Self {
16611 epoch: None,
16612 signature: None,
16613 bitmap: None,
16614 }
16615 }
16616 #[doc(hidden)]
16617 pub fn default_instance() -> &'static Self {
16618 static DEFAULT: super::ValidatorAggregatedSignature = super::ValidatorAggregatedSignature::const_default();
16619 &DEFAULT
16620 }
16621 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
16623 self.epoch.as_mut().map(|field| field as _)
16624 }
16625 pub fn epoch_mut(&mut self) -> &mut u64 {
16628 self.epoch.get_or_insert_default()
16629 }
16630 pub fn epoch_opt(&self) -> Option<u64> {
16632 self.epoch.as_ref().map(|field| *field)
16633 }
16634 pub fn set_epoch(&mut self, field: u64) {
16636 self.epoch = Some(field);
16637 }
16638 pub fn with_epoch(mut self, field: u64) -> Self {
16640 self.set_epoch(field);
16641 self
16642 }
16643 pub fn signature_opt(&self) -> Option<&[u8]> {
16645 self.signature.as_ref().map(|field| field as _)
16646 }
16647 pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16649 self.signature = Some(field.into().into());
16650 }
16651 pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
16653 mut self,
16654 field: T,
16655 ) -> Self {
16656 self.set_signature(field.into());
16657 self
16658 }
16659 pub fn bitmap_opt(&self) -> Option<&[u8]> {
16661 self.bitmap.as_ref().map(|field| field as _)
16662 }
16663 pub fn set_bitmap<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16665 self.bitmap = Some(field.into().into());
16666 }
16667 pub fn with_bitmap<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
16669 self.set_bitmap(field.into());
16670 self
16671 }
16672 }
16673 impl super::ValidatorCommittee {
16674 pub const fn const_default() -> Self {
16675 Self {
16676 epoch: None,
16677 members: Vec::new(),
16678 }
16679 }
16680 #[doc(hidden)]
16681 pub fn default_instance() -> &'static Self {
16682 static DEFAULT: super::ValidatorCommittee = super::ValidatorCommittee::const_default();
16683 &DEFAULT
16684 }
16685 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
16687 self.epoch.as_mut().map(|field| field as _)
16688 }
16689 pub fn epoch_mut(&mut self) -> &mut u64 {
16692 self.epoch.get_or_insert_default()
16693 }
16694 pub fn epoch_opt(&self) -> Option<u64> {
16696 self.epoch.as_ref().map(|field| *field)
16697 }
16698 pub fn set_epoch(&mut self, field: u64) {
16700 self.epoch = Some(field);
16701 }
16702 pub fn with_epoch(mut self, field: u64) -> Self {
16704 self.set_epoch(field);
16705 self
16706 }
16707 pub fn members(&self) -> &[super::ValidatorCommitteeMember] {
16709 &self.members
16710 }
16711 pub fn members_mut(&mut self) -> &mut Vec<super::ValidatorCommitteeMember> {
16714 &mut self.members
16715 }
16716 pub fn set_members(&mut self, field: Vec<super::ValidatorCommitteeMember>) {
16718 self.members = field;
16719 }
16720 pub fn with_members(
16722 mut self,
16723 field: Vec<super::ValidatorCommitteeMember>,
16724 ) -> Self {
16725 self.set_members(field);
16726 self
16727 }
16728 }
16729 impl super::ValidatorCommitteeMember {
16730 pub const fn const_default() -> Self {
16731 Self {
16732 public_key: None,
16733 weight: None,
16734 }
16735 }
16736 #[doc(hidden)]
16737 pub fn default_instance() -> &'static Self {
16738 static DEFAULT: super::ValidatorCommitteeMember = super::ValidatorCommitteeMember::const_default();
16739 &DEFAULT
16740 }
16741 pub fn public_key_opt(&self) -> Option<&[u8]> {
16743 self.public_key.as_ref().map(|field| field as _)
16744 }
16745 pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16747 self.public_key = Some(field.into().into());
16748 }
16749 pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
16751 mut self,
16752 field: T,
16753 ) -> Self {
16754 self.set_public_key(field.into());
16755 self
16756 }
16757 pub fn weight_opt_mut(&mut self) -> Option<&mut u64> {
16759 self.weight.as_mut().map(|field| field as _)
16760 }
16761 pub fn weight_mut(&mut self) -> &mut u64 {
16764 self.weight.get_or_insert_default()
16765 }
16766 pub fn weight_opt(&self) -> Option<u64> {
16768 self.weight.as_ref().map(|field| *field)
16769 }
16770 pub fn set_weight(&mut self, field: u64) {
16772 self.weight = Some(field);
16773 }
16774 pub fn with_weight(mut self, field: u64) -> Self {
16776 self.set_weight(field);
16777 self
16778 }
16779 }
16780 impl super::ValidatorExecutionTimeObservation {
16781 pub const fn const_default() -> Self {
16782 Self {
16783 validator: None,
16784 duration: None,
16785 }
16786 }
16787 #[doc(hidden)]
16788 pub fn default_instance() -> &'static Self {
16789 static DEFAULT: super::ValidatorExecutionTimeObservation = super::ValidatorExecutionTimeObservation::const_default();
16790 &DEFAULT
16791 }
16792 pub fn validator_opt(&self) -> Option<&[u8]> {
16794 self.validator.as_ref().map(|field| field as _)
16795 }
16796 pub fn set_validator<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16798 self.validator = Some(field.into().into());
16799 }
16800 pub fn with_validator<T: Into<::prost::bytes::Bytes>>(
16802 mut self,
16803 field: T,
16804 ) -> Self {
16805 self.set_validator(field.into());
16806 self
16807 }
16808 pub fn duration_opt_mut(&mut self) -> Option<&mut ::prost_types::Duration> {
16810 self.duration.as_mut().map(|field| field as _)
16811 }
16812 pub fn duration_mut(&mut self) -> &mut ::prost_types::Duration {
16815 self.duration.get_or_insert_default()
16816 }
16817 pub fn duration_opt(&self) -> Option<&::prost_types::Duration> {
16819 self.duration.as_ref().map(|field| field as _)
16820 }
16821 pub fn set_duration<T: Into<::prost_types::Duration>>(&mut self, field: T) {
16823 self.duration = Some(field.into().into());
16824 }
16825 pub fn with_duration<T: Into<::prost_types::Duration>>(
16827 mut self,
16828 field: T,
16829 ) -> Self {
16830 self.set_duration(field.into());
16831 self
16832 }
16833 }
16834 impl super::ValidatorReportRecord {
16835 pub const fn const_default() -> Self {
16836 Self {
16837 reported: None,
16838 reporters: Vec::new(),
16839 }
16840 }
16841 #[doc(hidden)]
16842 pub fn default_instance() -> &'static Self {
16843 static DEFAULT: super::ValidatorReportRecord = super::ValidatorReportRecord::const_default();
16844 &DEFAULT
16845 }
16846 pub fn reported_opt_mut(&mut self) -> Option<&mut String> {
16848 self.reported.as_mut().map(|field| field as _)
16849 }
16850 pub fn reported_mut(&mut self) -> &mut String {
16853 self.reported.get_or_insert_default()
16854 }
16855 pub fn reported_opt(&self) -> Option<&str> {
16857 self.reported.as_ref().map(|field| field as _)
16858 }
16859 pub fn set_reported<T: Into<String>>(&mut self, field: T) {
16861 self.reported = Some(field.into().into());
16862 }
16863 pub fn with_reported<T: Into<String>>(mut self, field: T) -> Self {
16865 self.set_reported(field.into());
16866 self
16867 }
16868 pub fn reporters(&self) -> &[String] {
16870 &self.reporters
16871 }
16872 pub fn reporters_mut(&mut self) -> &mut Vec<String> {
16875 &mut self.reporters
16876 }
16877 pub fn set_reporters(&mut self, field: Vec<String>) {
16879 self.reporters = field;
16880 }
16881 pub fn with_reporters(mut self, field: Vec<String>) -> Self {
16883 self.set_reporters(field);
16884 self
16885 }
16886 }
16887 impl super::ValidatorSet {
16888 pub const fn const_default() -> Self {
16889 Self {
16890 total_stake: None,
16891 active_validators: Vec::new(),
16892 pending_active_validators: None,
16893 pending_removals: Vec::new(),
16894 staking_pool_mappings: None,
16895 inactive_validators: None,
16896 validator_candidates: None,
16897 at_risk_validators: std::collections::BTreeMap::new(),
16898 extra_fields: None,
16899 }
16900 }
16901 #[doc(hidden)]
16902 pub fn default_instance() -> &'static Self {
16903 static DEFAULT: super::ValidatorSet = super::ValidatorSet::const_default();
16904 &DEFAULT
16905 }
16906 pub fn total_stake_opt_mut(&mut self) -> Option<&mut u64> {
16908 self.total_stake.as_mut().map(|field| field as _)
16909 }
16910 pub fn total_stake_mut(&mut self) -> &mut u64 {
16913 self.total_stake.get_or_insert_default()
16914 }
16915 pub fn total_stake_opt(&self) -> Option<u64> {
16917 self.total_stake.as_ref().map(|field| *field)
16918 }
16919 pub fn set_total_stake(&mut self, field: u64) {
16921 self.total_stake = Some(field);
16922 }
16923 pub fn with_total_stake(mut self, field: u64) -> Self {
16925 self.set_total_stake(field);
16926 self
16927 }
16928 pub fn active_validators(&self) -> &[super::Validator] {
16930 &self.active_validators
16931 }
16932 pub fn active_validators_mut(&mut self) -> &mut Vec<super::Validator> {
16935 &mut self.active_validators
16936 }
16937 pub fn set_active_validators(&mut self, field: Vec<super::Validator>) {
16939 self.active_validators = field;
16940 }
16941 pub fn with_active_validators(mut self, field: Vec<super::Validator>) -> Self {
16943 self.set_active_validators(field);
16944 self
16945 }
16946 pub fn pending_active_validators(&self) -> &super::MoveTable {
16948 self.pending_active_validators
16949 .as_ref()
16950 .map(|field| field as _)
16951 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16952 }
16953 pub fn pending_active_validators_opt_mut(
16955 &mut self,
16956 ) -> Option<&mut super::MoveTable> {
16957 self.pending_active_validators.as_mut().map(|field| field as _)
16958 }
16959 pub fn pending_active_validators_mut(&mut self) -> &mut super::MoveTable {
16962 self.pending_active_validators.get_or_insert_default()
16963 }
16964 pub fn pending_active_validators_opt(&self) -> Option<&super::MoveTable> {
16966 self.pending_active_validators.as_ref().map(|field| field as _)
16967 }
16968 pub fn set_pending_active_validators<T: Into<super::MoveTable>>(
16970 &mut self,
16971 field: T,
16972 ) {
16973 self.pending_active_validators = Some(field.into().into());
16974 }
16975 pub fn with_pending_active_validators<T: Into<super::MoveTable>>(
16977 mut self,
16978 field: T,
16979 ) -> Self {
16980 self.set_pending_active_validators(field.into());
16981 self
16982 }
16983 pub fn pending_removals(&self) -> &[u64] {
16985 &self.pending_removals
16986 }
16987 pub fn pending_removals_mut(&mut self) -> &mut Vec<u64> {
16990 &mut self.pending_removals
16991 }
16992 pub fn set_pending_removals(&mut self, field: Vec<u64>) {
16994 self.pending_removals = field;
16995 }
16996 pub fn with_pending_removals(mut self, field: Vec<u64>) -> Self {
16998 self.set_pending_removals(field);
16999 self
17000 }
17001 pub fn staking_pool_mappings(&self) -> &super::MoveTable {
17003 self.staking_pool_mappings
17004 .as_ref()
17005 .map(|field| field as _)
17006 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17007 }
17008 pub fn staking_pool_mappings_opt_mut(
17010 &mut self,
17011 ) -> Option<&mut super::MoveTable> {
17012 self.staking_pool_mappings.as_mut().map(|field| field as _)
17013 }
17014 pub fn staking_pool_mappings_mut(&mut self) -> &mut super::MoveTable {
17017 self.staking_pool_mappings.get_or_insert_default()
17018 }
17019 pub fn staking_pool_mappings_opt(&self) -> Option<&super::MoveTable> {
17021 self.staking_pool_mappings.as_ref().map(|field| field as _)
17022 }
17023 pub fn set_staking_pool_mappings<T: Into<super::MoveTable>>(
17025 &mut self,
17026 field: T,
17027 ) {
17028 self.staking_pool_mappings = Some(field.into().into());
17029 }
17030 pub fn with_staking_pool_mappings<T: Into<super::MoveTable>>(
17032 mut self,
17033 field: T,
17034 ) -> Self {
17035 self.set_staking_pool_mappings(field.into());
17036 self
17037 }
17038 pub fn inactive_validators(&self) -> &super::MoveTable {
17040 self.inactive_validators
17041 .as_ref()
17042 .map(|field| field as _)
17043 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17044 }
17045 pub fn inactive_validators_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
17047 self.inactive_validators.as_mut().map(|field| field as _)
17048 }
17049 pub fn inactive_validators_mut(&mut self) -> &mut super::MoveTable {
17052 self.inactive_validators.get_or_insert_default()
17053 }
17054 pub fn inactive_validators_opt(&self) -> Option<&super::MoveTable> {
17056 self.inactive_validators.as_ref().map(|field| field as _)
17057 }
17058 pub fn set_inactive_validators<T: Into<super::MoveTable>>(&mut self, field: T) {
17060 self.inactive_validators = Some(field.into().into());
17061 }
17062 pub fn with_inactive_validators<T: Into<super::MoveTable>>(
17064 mut self,
17065 field: T,
17066 ) -> Self {
17067 self.set_inactive_validators(field.into());
17068 self
17069 }
17070 pub fn validator_candidates(&self) -> &super::MoveTable {
17072 self.validator_candidates
17073 .as_ref()
17074 .map(|field| field as _)
17075 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17076 }
17077 pub fn validator_candidates_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
17079 self.validator_candidates.as_mut().map(|field| field as _)
17080 }
17081 pub fn validator_candidates_mut(&mut self) -> &mut super::MoveTable {
17084 self.validator_candidates.get_or_insert_default()
17085 }
17086 pub fn validator_candidates_opt(&self) -> Option<&super::MoveTable> {
17088 self.validator_candidates.as_ref().map(|field| field as _)
17089 }
17090 pub fn set_validator_candidates<T: Into<super::MoveTable>>(&mut self, field: T) {
17092 self.validator_candidates = Some(field.into().into());
17093 }
17094 pub fn with_validator_candidates<T: Into<super::MoveTable>>(
17096 mut self,
17097 field: T,
17098 ) -> Self {
17099 self.set_validator_candidates(field.into());
17100 self
17101 }
17102 pub fn at_risk_validators(&self) -> &::std::collections::BTreeMap<String, u64> {
17104 &self.at_risk_validators
17105 }
17106 pub fn at_risk_validators_mut(
17109 &mut self,
17110 ) -> &mut ::std::collections::BTreeMap<String, u64> {
17111 &mut self.at_risk_validators
17112 }
17113 pub fn set_at_risk_validators(
17115 &mut self,
17116 field: ::std::collections::BTreeMap<String, u64>,
17117 ) {
17118 self.at_risk_validators = field;
17119 }
17120 pub fn with_at_risk_validators(
17122 mut self,
17123 field: ::std::collections::BTreeMap<String, u64>,
17124 ) -> Self {
17125 self.set_at_risk_validators(field);
17126 self
17127 }
17128 pub fn extra_fields(&self) -> &super::MoveTable {
17130 self.extra_fields
17131 .as_ref()
17132 .map(|field| field as _)
17133 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17134 }
17135 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
17137 self.extra_fields.as_mut().map(|field| field as _)
17138 }
17139 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
17142 self.extra_fields.get_or_insert_default()
17143 }
17144 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
17146 self.extra_fields.as_ref().map(|field| field as _)
17147 }
17148 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
17150 self.extra_fields = Some(field.into().into());
17151 }
17152 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
17154 self.set_extra_fields(field.into());
17155 self
17156 }
17157 }
17158 impl super::VariantDescriptor {
17159 pub const fn const_default() -> Self {
17160 Self {
17161 name: None,
17162 position: None,
17163 fields: Vec::new(),
17164 }
17165 }
17166 #[doc(hidden)]
17167 pub fn default_instance() -> &'static Self {
17168 static DEFAULT: super::VariantDescriptor = super::VariantDescriptor::const_default();
17169 &DEFAULT
17170 }
17171 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
17173 self.name.as_mut().map(|field| field as _)
17174 }
17175 pub fn name_mut(&mut self) -> &mut String {
17178 self.name.get_or_insert_default()
17179 }
17180 pub fn name_opt(&self) -> Option<&str> {
17182 self.name.as_ref().map(|field| field as _)
17183 }
17184 pub fn set_name<T: Into<String>>(&mut self, field: T) {
17186 self.name = Some(field.into().into());
17187 }
17188 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
17190 self.set_name(field.into());
17191 self
17192 }
17193 pub fn position_opt_mut(&mut self) -> Option<&mut u32> {
17195 self.position.as_mut().map(|field| field as _)
17196 }
17197 pub fn position_mut(&mut self) -> &mut u32 {
17200 self.position.get_or_insert_default()
17201 }
17202 pub fn position_opt(&self) -> Option<u32> {
17204 self.position.as_ref().map(|field| *field)
17205 }
17206 pub fn set_position(&mut self, field: u32) {
17208 self.position = Some(field);
17209 }
17210 pub fn with_position(mut self, field: u32) -> Self {
17212 self.set_position(field);
17213 self
17214 }
17215 pub fn fields(&self) -> &[super::FieldDescriptor] {
17217 &self.fields
17218 }
17219 pub fn fields_mut(&mut self) -> &mut Vec<super::FieldDescriptor> {
17222 &mut self.fields
17223 }
17224 pub fn set_fields(&mut self, field: Vec<super::FieldDescriptor>) {
17226 self.fields = field;
17227 }
17228 pub fn with_fields(mut self, field: Vec<super::FieldDescriptor>) -> Self {
17230 self.set_fields(field);
17231 self
17232 }
17233 }
17234 impl super::VerifySignatureRequest {
17235 pub const fn const_default() -> Self {
17236 Self {
17237 message: None,
17238 signature: None,
17239 address: None,
17240 jwks: Vec::new(),
17241 }
17242 }
17243 #[doc(hidden)]
17244 pub fn default_instance() -> &'static Self {
17245 static DEFAULT: super::VerifySignatureRequest = super::VerifySignatureRequest::const_default();
17246 &DEFAULT
17247 }
17248 pub fn message(&self) -> &super::Bcs {
17250 self.message
17251 .as_ref()
17252 .map(|field| field as _)
17253 .unwrap_or_else(|| super::Bcs::default_instance() as _)
17254 }
17255 pub fn message_opt_mut(&mut self) -> Option<&mut super::Bcs> {
17257 self.message.as_mut().map(|field| field as _)
17258 }
17259 pub fn message_mut(&mut self) -> &mut super::Bcs {
17262 self.message.get_or_insert_default()
17263 }
17264 pub fn message_opt(&self) -> Option<&super::Bcs> {
17266 self.message.as_ref().map(|field| field as _)
17267 }
17268 pub fn set_message<T: Into<super::Bcs>>(&mut self, field: T) {
17270 self.message = Some(field.into().into());
17271 }
17272 pub fn with_message<T: Into<super::Bcs>>(mut self, field: T) -> Self {
17274 self.set_message(field.into());
17275 self
17276 }
17277 pub fn signature(&self) -> &super::UserSignature {
17279 self.signature
17280 .as_ref()
17281 .map(|field| field as _)
17282 .unwrap_or_else(|| super::UserSignature::default_instance() as _)
17283 }
17284 pub fn signature_opt_mut(&mut self) -> Option<&mut super::UserSignature> {
17286 self.signature.as_mut().map(|field| field as _)
17287 }
17288 pub fn signature_mut(&mut self) -> &mut super::UserSignature {
17291 self.signature.get_or_insert_default()
17292 }
17293 pub fn signature_opt(&self) -> Option<&super::UserSignature> {
17295 self.signature.as_ref().map(|field| field as _)
17296 }
17297 pub fn set_signature<T: Into<super::UserSignature>>(&mut self, field: T) {
17299 self.signature = Some(field.into().into());
17300 }
17301 pub fn with_signature<T: Into<super::UserSignature>>(
17303 mut self,
17304 field: T,
17305 ) -> Self {
17306 self.set_signature(field.into());
17307 self
17308 }
17309 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
17311 self.address.as_mut().map(|field| field as _)
17312 }
17313 pub fn address_mut(&mut self) -> &mut String {
17316 self.address.get_or_insert_default()
17317 }
17318 pub fn address_opt(&self) -> Option<&str> {
17320 self.address.as_ref().map(|field| field as _)
17321 }
17322 pub fn set_address<T: Into<String>>(&mut self, field: T) {
17324 self.address = Some(field.into().into());
17325 }
17326 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
17328 self.set_address(field.into());
17329 self
17330 }
17331 pub fn jwks(&self) -> &[super::ActiveJwk] {
17333 &self.jwks
17334 }
17335 pub fn jwks_mut(&mut self) -> &mut Vec<super::ActiveJwk> {
17338 &mut self.jwks
17339 }
17340 pub fn set_jwks(&mut self, field: Vec<super::ActiveJwk>) {
17342 self.jwks = field;
17343 }
17344 pub fn with_jwks(mut self, field: Vec<super::ActiveJwk>) -> Self {
17346 self.set_jwks(field);
17347 self
17348 }
17349 }
17350 impl super::VerifySignatureResponse {
17351 pub const fn const_default() -> Self {
17352 Self {
17353 is_valid: None,
17354 reason: None,
17355 }
17356 }
17357 #[doc(hidden)]
17358 pub fn default_instance() -> &'static Self {
17359 static DEFAULT: super::VerifySignatureResponse = super::VerifySignatureResponse::const_default();
17360 &DEFAULT
17361 }
17362 pub fn is_valid_opt_mut(&mut self) -> Option<&mut bool> {
17364 self.is_valid.as_mut().map(|field| field as _)
17365 }
17366 pub fn is_valid_mut(&mut self) -> &mut bool {
17369 self.is_valid.get_or_insert_default()
17370 }
17371 pub fn is_valid_opt(&self) -> Option<bool> {
17373 self.is_valid.as_ref().map(|field| *field)
17374 }
17375 pub fn set_is_valid(&mut self, field: bool) {
17377 self.is_valid = Some(field);
17378 }
17379 pub fn with_is_valid(mut self, field: bool) -> Self {
17381 self.set_is_valid(field);
17382 self
17383 }
17384 pub fn reason_opt_mut(&mut self) -> Option<&mut String> {
17386 self.reason.as_mut().map(|field| field as _)
17387 }
17388 pub fn reason_mut(&mut self) -> &mut String {
17391 self.reason.get_or_insert_default()
17392 }
17393 pub fn reason_opt(&self) -> Option<&str> {
17395 self.reason.as_ref().map(|field| field as _)
17396 }
17397 pub fn set_reason<T: Into<String>>(&mut self, field: T) {
17399 self.reason = Some(field.into().into());
17400 }
17401 pub fn with_reason<T: Into<String>>(mut self, field: T) -> Self {
17403 self.set_reason(field.into());
17404 self
17405 }
17406 }
17407 impl super::VersionAssignment {
17408 pub const fn const_default() -> Self {
17409 Self {
17410 object_id: None,
17411 start_version: None,
17412 version: None,
17413 }
17414 }
17415 #[doc(hidden)]
17416 pub fn default_instance() -> &'static Self {
17417 static DEFAULT: super::VersionAssignment = super::VersionAssignment::const_default();
17418 &DEFAULT
17419 }
17420 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
17422 self.object_id.as_mut().map(|field| field as _)
17423 }
17424 pub fn object_id_mut(&mut self) -> &mut String {
17427 self.object_id.get_or_insert_default()
17428 }
17429 pub fn object_id_opt(&self) -> Option<&str> {
17431 self.object_id.as_ref().map(|field| field as _)
17432 }
17433 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
17435 self.object_id = Some(field.into().into());
17436 }
17437 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
17439 self.set_object_id(field.into());
17440 self
17441 }
17442 pub fn start_version_opt_mut(&mut self) -> Option<&mut u64> {
17444 self.start_version.as_mut().map(|field| field as _)
17445 }
17446 pub fn start_version_mut(&mut self) -> &mut u64 {
17449 self.start_version.get_or_insert_default()
17450 }
17451 pub fn start_version_opt(&self) -> Option<u64> {
17453 self.start_version.as_ref().map(|field| *field)
17454 }
17455 pub fn set_start_version(&mut self, field: u64) {
17457 self.start_version = Some(field);
17458 }
17459 pub fn with_start_version(mut self, field: u64) -> Self {
17461 self.set_start_version(field);
17462 self
17463 }
17464 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
17466 self.version.as_mut().map(|field| field as _)
17467 }
17468 pub fn version_mut(&mut self) -> &mut u64 {
17471 self.version.get_or_insert_default()
17472 }
17473 pub fn version_opt(&self) -> Option<u64> {
17475 self.version.as_ref().map(|field| *field)
17476 }
17477 pub fn set_version(&mut self, field: u64) {
17479 self.version = Some(field);
17480 }
17481 pub fn with_version(mut self, field: u64) -> Self {
17483 self.set_version(field);
17484 self
17485 }
17486 }
17487 impl super::ZkLoginAuthenticator {
17488 pub const fn const_default() -> Self {
17489 Self {
17490 inputs: None,
17491 max_epoch: None,
17492 signature: None,
17493 public_identifier: None,
17494 jwk_id: None,
17495 }
17496 }
17497 #[doc(hidden)]
17498 pub fn default_instance() -> &'static Self {
17499 static DEFAULT: super::ZkLoginAuthenticator = super::ZkLoginAuthenticator::const_default();
17500 &DEFAULT
17501 }
17502 pub fn inputs(&self) -> &super::ZkLoginInputs {
17504 self.inputs
17505 .as_ref()
17506 .map(|field| field as _)
17507 .unwrap_or_else(|| super::ZkLoginInputs::default_instance() as _)
17508 }
17509 pub fn inputs_opt_mut(&mut self) -> Option<&mut super::ZkLoginInputs> {
17511 self.inputs.as_mut().map(|field| field as _)
17512 }
17513 pub fn inputs_mut(&mut self) -> &mut super::ZkLoginInputs {
17516 self.inputs.get_or_insert_default()
17517 }
17518 pub fn inputs_opt(&self) -> Option<&super::ZkLoginInputs> {
17520 self.inputs.as_ref().map(|field| field as _)
17521 }
17522 pub fn set_inputs<T: Into<super::ZkLoginInputs>>(&mut self, field: T) {
17524 self.inputs = Some(field.into().into());
17525 }
17526 pub fn with_inputs<T: Into<super::ZkLoginInputs>>(mut self, field: T) -> Self {
17528 self.set_inputs(field.into());
17529 self
17530 }
17531 pub fn max_epoch_opt_mut(&mut self) -> Option<&mut u64> {
17533 self.max_epoch.as_mut().map(|field| field as _)
17534 }
17535 pub fn max_epoch_mut(&mut self) -> &mut u64 {
17538 self.max_epoch.get_or_insert_default()
17539 }
17540 pub fn max_epoch_opt(&self) -> Option<u64> {
17542 self.max_epoch.as_ref().map(|field| *field)
17543 }
17544 pub fn set_max_epoch(&mut self, field: u64) {
17546 self.max_epoch = Some(field);
17547 }
17548 pub fn with_max_epoch(mut self, field: u64) -> Self {
17550 self.set_max_epoch(field);
17551 self
17552 }
17553 pub fn signature(&self) -> &super::SimpleSignature {
17555 self.signature
17556 .as_ref()
17557 .map(|field| field as _)
17558 .unwrap_or_else(|| super::SimpleSignature::default_instance() as _)
17559 }
17560 pub fn signature_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
17562 self.signature.as_mut().map(|field| field as _)
17563 }
17564 pub fn signature_mut(&mut self) -> &mut super::SimpleSignature {
17567 self.signature.get_or_insert_default()
17568 }
17569 pub fn signature_opt(&self) -> Option<&super::SimpleSignature> {
17571 self.signature.as_ref().map(|field| field as _)
17572 }
17573 pub fn set_signature<T: Into<super::SimpleSignature>>(&mut self, field: T) {
17575 self.signature = Some(field.into().into());
17576 }
17577 pub fn with_signature<T: Into<super::SimpleSignature>>(
17579 mut self,
17580 field: T,
17581 ) -> Self {
17582 self.set_signature(field.into());
17583 self
17584 }
17585 pub fn public_identifier(&self) -> &super::ZkLoginPublicIdentifier {
17587 self.public_identifier
17588 .as_ref()
17589 .map(|field| field as _)
17590 .unwrap_or_else(|| {
17591 super::ZkLoginPublicIdentifier::default_instance() as _
17592 })
17593 }
17594 pub fn public_identifier_opt_mut(
17596 &mut self,
17597 ) -> Option<&mut super::ZkLoginPublicIdentifier> {
17598 self.public_identifier.as_mut().map(|field| field as _)
17599 }
17600 pub fn public_identifier_mut(&mut self) -> &mut super::ZkLoginPublicIdentifier {
17603 self.public_identifier.get_or_insert_default()
17604 }
17605 pub fn public_identifier_opt(&self) -> Option<&super::ZkLoginPublicIdentifier> {
17607 self.public_identifier.as_ref().map(|field| field as _)
17608 }
17609 pub fn set_public_identifier<T: Into<super::ZkLoginPublicIdentifier>>(
17611 &mut self,
17612 field: T,
17613 ) {
17614 self.public_identifier = Some(field.into().into());
17615 }
17616 pub fn with_public_identifier<T: Into<super::ZkLoginPublicIdentifier>>(
17618 mut self,
17619 field: T,
17620 ) -> Self {
17621 self.set_public_identifier(field.into());
17622 self
17623 }
17624 pub fn jwk_id(&self) -> &super::JwkId {
17626 self.jwk_id
17627 .as_ref()
17628 .map(|field| field as _)
17629 .unwrap_or_else(|| super::JwkId::default_instance() as _)
17630 }
17631 pub fn jwk_id_opt_mut(&mut self) -> Option<&mut super::JwkId> {
17633 self.jwk_id.as_mut().map(|field| field as _)
17634 }
17635 pub fn jwk_id_mut(&mut self) -> &mut super::JwkId {
17638 self.jwk_id.get_or_insert_default()
17639 }
17640 pub fn jwk_id_opt(&self) -> Option<&super::JwkId> {
17642 self.jwk_id.as_ref().map(|field| field as _)
17643 }
17644 pub fn set_jwk_id<T: Into<super::JwkId>>(&mut self, field: T) {
17646 self.jwk_id = Some(field.into().into());
17647 }
17648 pub fn with_jwk_id<T: Into<super::JwkId>>(mut self, field: T) -> Self {
17650 self.set_jwk_id(field.into());
17651 self
17652 }
17653 }
17654 impl super::ZkLoginClaim {
17655 pub const fn const_default() -> Self {
17656 Self {
17657 value: None,
17658 index_mod_4: None,
17659 }
17660 }
17661 #[doc(hidden)]
17662 pub fn default_instance() -> &'static Self {
17663 static DEFAULT: super::ZkLoginClaim = super::ZkLoginClaim::const_default();
17664 &DEFAULT
17665 }
17666 pub fn value_opt_mut(&mut self) -> Option<&mut String> {
17668 self.value.as_mut().map(|field| field as _)
17669 }
17670 pub fn value_mut(&mut self) -> &mut String {
17673 self.value.get_or_insert_default()
17674 }
17675 pub fn value_opt(&self) -> Option<&str> {
17677 self.value.as_ref().map(|field| field as _)
17678 }
17679 pub fn set_value<T: Into<String>>(&mut self, field: T) {
17681 self.value = Some(field.into().into());
17682 }
17683 pub fn with_value<T: Into<String>>(mut self, field: T) -> Self {
17685 self.set_value(field.into());
17686 self
17687 }
17688 pub fn index_mod_4_opt_mut(&mut self) -> Option<&mut u32> {
17690 self.index_mod_4.as_mut().map(|field| field as _)
17691 }
17692 pub fn index_mod_4_mut(&mut self) -> &mut u32 {
17695 self.index_mod_4.get_or_insert_default()
17696 }
17697 pub fn index_mod_4_opt(&self) -> Option<u32> {
17699 self.index_mod_4.as_ref().map(|field| *field)
17700 }
17701 pub fn set_index_mod_4(&mut self, field: u32) {
17703 self.index_mod_4 = Some(field);
17704 }
17705 pub fn with_index_mod_4(mut self, field: u32) -> Self {
17707 self.set_index_mod_4(field);
17708 self
17709 }
17710 }
17711 impl super::ZkLoginInputs {
17712 pub const fn const_default() -> Self {
17713 Self {
17714 proof_points: None,
17715 iss_base64_details: None,
17716 header_base64: None,
17717 address_seed: None,
17718 }
17719 }
17720 #[doc(hidden)]
17721 pub fn default_instance() -> &'static Self {
17722 static DEFAULT: super::ZkLoginInputs = super::ZkLoginInputs::const_default();
17723 &DEFAULT
17724 }
17725 pub fn proof_points(&self) -> &super::ZkLoginProof {
17727 self.proof_points
17728 .as_ref()
17729 .map(|field| field as _)
17730 .unwrap_or_else(|| super::ZkLoginProof::default_instance() as _)
17731 }
17732 pub fn proof_points_opt_mut(&mut self) -> Option<&mut super::ZkLoginProof> {
17734 self.proof_points.as_mut().map(|field| field as _)
17735 }
17736 pub fn proof_points_mut(&mut self) -> &mut super::ZkLoginProof {
17739 self.proof_points.get_or_insert_default()
17740 }
17741 pub fn proof_points_opt(&self) -> Option<&super::ZkLoginProof> {
17743 self.proof_points.as_ref().map(|field| field as _)
17744 }
17745 pub fn set_proof_points<T: Into<super::ZkLoginProof>>(&mut self, field: T) {
17747 self.proof_points = Some(field.into().into());
17748 }
17749 pub fn with_proof_points<T: Into<super::ZkLoginProof>>(
17751 mut self,
17752 field: T,
17753 ) -> Self {
17754 self.set_proof_points(field.into());
17755 self
17756 }
17757 pub fn iss_base64_details(&self) -> &super::ZkLoginClaim {
17759 self.iss_base64_details
17760 .as_ref()
17761 .map(|field| field as _)
17762 .unwrap_or_else(|| super::ZkLoginClaim::default_instance() as _)
17763 }
17764 pub fn iss_base64_details_opt_mut(
17766 &mut self,
17767 ) -> Option<&mut super::ZkLoginClaim> {
17768 self.iss_base64_details.as_mut().map(|field| field as _)
17769 }
17770 pub fn iss_base64_details_mut(&mut self) -> &mut super::ZkLoginClaim {
17773 self.iss_base64_details.get_or_insert_default()
17774 }
17775 pub fn iss_base64_details_opt(&self) -> Option<&super::ZkLoginClaim> {
17777 self.iss_base64_details.as_ref().map(|field| field as _)
17778 }
17779 pub fn set_iss_base64_details<T: Into<super::ZkLoginClaim>>(
17781 &mut self,
17782 field: T,
17783 ) {
17784 self.iss_base64_details = Some(field.into().into());
17785 }
17786 pub fn with_iss_base64_details<T: Into<super::ZkLoginClaim>>(
17788 mut self,
17789 field: T,
17790 ) -> Self {
17791 self.set_iss_base64_details(field.into());
17792 self
17793 }
17794 pub fn header_base64_opt_mut(&mut self) -> Option<&mut String> {
17796 self.header_base64.as_mut().map(|field| field as _)
17797 }
17798 pub fn header_base64_mut(&mut self) -> &mut String {
17801 self.header_base64.get_or_insert_default()
17802 }
17803 pub fn header_base64_opt(&self) -> Option<&str> {
17805 self.header_base64.as_ref().map(|field| field as _)
17806 }
17807 pub fn set_header_base64<T: Into<String>>(&mut self, field: T) {
17809 self.header_base64 = Some(field.into().into());
17810 }
17811 pub fn with_header_base64<T: Into<String>>(mut self, field: T) -> Self {
17813 self.set_header_base64(field.into());
17814 self
17815 }
17816 pub fn address_seed_opt_mut(&mut self) -> Option<&mut String> {
17818 self.address_seed.as_mut().map(|field| field as _)
17819 }
17820 pub fn address_seed_mut(&mut self) -> &mut String {
17823 self.address_seed.get_or_insert_default()
17824 }
17825 pub fn address_seed_opt(&self) -> Option<&str> {
17827 self.address_seed.as_ref().map(|field| field as _)
17828 }
17829 pub fn set_address_seed<T: Into<String>>(&mut self, field: T) {
17831 self.address_seed = Some(field.into().into());
17832 }
17833 pub fn with_address_seed<T: Into<String>>(mut self, field: T) -> Self {
17835 self.set_address_seed(field.into());
17836 self
17837 }
17838 }
17839 impl super::ZkLoginProof {
17840 pub const fn const_default() -> Self {
17841 Self { a: None, b: None, c: None }
17842 }
17843 #[doc(hidden)]
17844 pub fn default_instance() -> &'static Self {
17845 static DEFAULT: super::ZkLoginProof = super::ZkLoginProof::const_default();
17846 &DEFAULT
17847 }
17848 pub fn a(&self) -> &super::CircomG1 {
17850 self.a
17851 .as_ref()
17852 .map(|field| field as _)
17853 .unwrap_or_else(|| super::CircomG1::default_instance() as _)
17854 }
17855 pub fn a_opt_mut(&mut self) -> Option<&mut super::CircomG1> {
17857 self.a.as_mut().map(|field| field as _)
17858 }
17859 pub fn a_mut(&mut self) -> &mut super::CircomG1 {
17862 self.a.get_or_insert_default()
17863 }
17864 pub fn a_opt(&self) -> Option<&super::CircomG1> {
17866 self.a.as_ref().map(|field| field as _)
17867 }
17868 pub fn set_a<T: Into<super::CircomG1>>(&mut self, field: T) {
17870 self.a = Some(field.into().into());
17871 }
17872 pub fn with_a<T: Into<super::CircomG1>>(mut self, field: T) -> Self {
17874 self.set_a(field.into());
17875 self
17876 }
17877 pub fn b(&self) -> &super::CircomG2 {
17879 self.b
17880 .as_ref()
17881 .map(|field| field as _)
17882 .unwrap_or_else(|| super::CircomG2::default_instance() as _)
17883 }
17884 pub fn b_opt_mut(&mut self) -> Option<&mut super::CircomG2> {
17886 self.b.as_mut().map(|field| field as _)
17887 }
17888 pub fn b_mut(&mut self) -> &mut super::CircomG2 {
17891 self.b.get_or_insert_default()
17892 }
17893 pub fn b_opt(&self) -> Option<&super::CircomG2> {
17895 self.b.as_ref().map(|field| field as _)
17896 }
17897 pub fn set_b<T: Into<super::CircomG2>>(&mut self, field: T) {
17899 self.b = Some(field.into().into());
17900 }
17901 pub fn with_b<T: Into<super::CircomG2>>(mut self, field: T) -> Self {
17903 self.set_b(field.into());
17904 self
17905 }
17906 pub fn c(&self) -> &super::CircomG1 {
17908 self.c
17909 .as_ref()
17910 .map(|field| field as _)
17911 .unwrap_or_else(|| super::CircomG1::default_instance() as _)
17912 }
17913 pub fn c_opt_mut(&mut self) -> Option<&mut super::CircomG1> {
17915 self.c.as_mut().map(|field| field as _)
17916 }
17917 pub fn c_mut(&mut self) -> &mut super::CircomG1 {
17920 self.c.get_or_insert_default()
17921 }
17922 pub fn c_opt(&self) -> Option<&super::CircomG1> {
17924 self.c.as_ref().map(|field| field as _)
17925 }
17926 pub fn set_c<T: Into<super::CircomG1>>(&mut self, field: T) {
17928 self.c = Some(field.into().into());
17929 }
17930 pub fn with_c<T: Into<super::CircomG1>>(mut self, field: T) -> Self {
17932 self.set_c(field.into());
17933 self
17934 }
17935 }
17936 impl super::ZkLoginPublicIdentifier {
17937 pub const fn const_default() -> Self {
17938 Self {
17939 iss: None,
17940 address_seed: None,
17941 }
17942 }
17943 #[doc(hidden)]
17944 pub fn default_instance() -> &'static Self {
17945 static DEFAULT: super::ZkLoginPublicIdentifier = super::ZkLoginPublicIdentifier::const_default();
17946 &DEFAULT
17947 }
17948 pub fn iss_opt_mut(&mut self) -> Option<&mut String> {
17950 self.iss.as_mut().map(|field| field as _)
17951 }
17952 pub fn iss_mut(&mut self) -> &mut String {
17955 self.iss.get_or_insert_default()
17956 }
17957 pub fn iss_opt(&self) -> Option<&str> {
17959 self.iss.as_ref().map(|field| field as _)
17960 }
17961 pub fn set_iss<T: Into<String>>(&mut self, field: T) {
17963 self.iss = Some(field.into().into());
17964 }
17965 pub fn with_iss<T: Into<String>>(mut self, field: T) -> Self {
17967 self.set_iss(field.into());
17968 self
17969 }
17970 pub fn address_seed_opt_mut(&mut self) -> Option<&mut String> {
17972 self.address_seed.as_mut().map(|field| field as _)
17973 }
17974 pub fn address_seed_mut(&mut self) -> &mut String {
17977 self.address_seed.get_or_insert_default()
17978 }
17979 pub fn address_seed_opt(&self) -> Option<&str> {
17981 self.address_seed.as_ref().map(|field| field as _)
17982 }
17983 pub fn set_address_seed<T: Into<String>>(&mut self, field: T) {
17985 self.address_seed = Some(field.into().into());
17986 }
17987 pub fn with_address_seed<T: Into<String>>(mut self, field: T) -> Self {
17989 self.set_address_seed(field.into());
17990 self
17991 }
17992 }
17993}