1mod _accessor_impls {
2 #![allow(clippy::useless_conversion)]
3 impl super::ActiveJwk {
4 pub const fn const_default() -> Self {
5 Self {
6 id: None,
7 jwk: None,
8 epoch: None,
9 }
10 }
11 #[doc(hidden)]
12 pub fn default_instance() -> &'static Self {
13 static DEFAULT: super::ActiveJwk = super::ActiveJwk::const_default();
14 &DEFAULT
15 }
16 pub fn id(&self) -> &super::JwkId {
18 self.id
19 .as_ref()
20 .map(|field| field as _)
21 .unwrap_or_else(|| super::JwkId::default_instance() as _)
22 }
23 pub fn id_opt_mut(&mut self) -> Option<&mut super::JwkId> {
25 self.id.as_mut().map(|field| field as _)
26 }
27 pub fn id_mut(&mut self) -> &mut super::JwkId {
30 self.id.get_or_insert_default()
31 }
32 pub fn id_opt(&self) -> Option<&super::JwkId> {
34 self.id.as_ref().map(|field| field as _)
35 }
36 pub fn set_id<T: Into<super::JwkId>>(&mut self, field: T) {
38 self.id = Some(field.into().into());
39 }
40 pub fn with_id<T: Into<super::JwkId>>(mut self, field: T) -> Self {
42 self.set_id(field.into());
43 self
44 }
45 pub fn jwk(&self) -> &super::Jwk {
47 self.jwk
48 .as_ref()
49 .map(|field| field as _)
50 .unwrap_or_else(|| super::Jwk::default_instance() as _)
51 }
52 pub fn jwk_opt_mut(&mut self) -> Option<&mut super::Jwk> {
54 self.jwk.as_mut().map(|field| field as _)
55 }
56 pub fn jwk_mut(&mut self) -> &mut super::Jwk {
59 self.jwk.get_or_insert_default()
60 }
61 pub fn jwk_opt(&self) -> Option<&super::Jwk> {
63 self.jwk.as_ref().map(|field| field as _)
64 }
65 pub fn set_jwk<T: Into<super::Jwk>>(&mut self, field: T) {
67 self.jwk = Some(field.into().into());
68 }
69 pub fn with_jwk<T: Into<super::Jwk>>(mut self, field: T) -> Self {
71 self.set_jwk(field.into());
72 self
73 }
74 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
76 self.epoch.as_mut().map(|field| field as _)
77 }
78 pub fn epoch_mut(&mut self) -> &mut u64 {
81 self.epoch.get_or_insert_default()
82 }
83 pub fn epoch_opt(&self) -> Option<u64> {
85 self.epoch.as_ref().map(|field| *field)
86 }
87 pub fn set_epoch(&mut self, field: u64) {
89 self.epoch = Some(field);
90 }
91 pub fn with_epoch(mut self, field: u64) -> Self {
93 self.set_epoch(field);
94 self
95 }
96 }
97 impl super::Argument {
98 pub const fn const_default() -> Self {
99 Self {
100 kind: None,
101 input: None,
102 result: None,
103 subresult: None,
104 }
105 }
106 #[doc(hidden)]
107 pub fn default_instance() -> &'static Self {
108 static DEFAULT: super::Argument = super::Argument::const_default();
109 &DEFAULT
110 }
111 pub fn with_kind<T: Into<super::argument::ArgumentKind>>(
113 mut self,
114 field: T,
115 ) -> Self {
116 self.set_kind(field.into());
117 self
118 }
119 pub fn input_opt_mut(&mut self) -> Option<&mut u32> {
121 self.input.as_mut().map(|field| field as _)
122 }
123 pub fn input_mut(&mut self) -> &mut u32 {
126 self.input.get_or_insert_default()
127 }
128 pub fn input_opt(&self) -> Option<u32> {
130 self.input.as_ref().map(|field| *field)
131 }
132 pub fn set_input(&mut self, field: u32) {
134 self.input = Some(field);
135 }
136 pub fn with_input(mut self, field: u32) -> Self {
138 self.set_input(field);
139 self
140 }
141 pub fn result_opt_mut(&mut self) -> Option<&mut u32> {
143 self.result.as_mut().map(|field| field as _)
144 }
145 pub fn result_mut(&mut self) -> &mut u32 {
148 self.result.get_or_insert_default()
149 }
150 pub fn result_opt(&self) -> Option<u32> {
152 self.result.as_ref().map(|field| *field)
153 }
154 pub fn set_result(&mut self, field: u32) {
156 self.result = Some(field);
157 }
158 pub fn with_result(mut self, field: u32) -> Self {
160 self.set_result(field);
161 self
162 }
163 pub fn subresult_opt_mut(&mut self) -> Option<&mut u32> {
165 self.subresult.as_mut().map(|field| field as _)
166 }
167 pub fn subresult_mut(&mut self) -> &mut u32 {
170 self.subresult.get_or_insert_default()
171 }
172 pub fn subresult_opt(&self) -> Option<u32> {
174 self.subresult.as_ref().map(|field| *field)
175 }
176 pub fn set_subresult(&mut self, field: u32) {
178 self.subresult = Some(field);
179 }
180 pub fn with_subresult(mut self, field: u32) -> Self {
182 self.set_subresult(field);
183 self
184 }
185 }
186 impl super::AuthenticatorStateExpire {
187 pub const fn const_default() -> Self {
188 Self {
189 min_epoch: None,
190 authenticator_object_initial_shared_version: None,
191 }
192 }
193 #[doc(hidden)]
194 pub fn default_instance() -> &'static Self {
195 static DEFAULT: super::AuthenticatorStateExpire = super::AuthenticatorStateExpire::const_default();
196 &DEFAULT
197 }
198 pub fn min_epoch_opt_mut(&mut self) -> Option<&mut u64> {
200 self.min_epoch.as_mut().map(|field| field as _)
201 }
202 pub fn min_epoch_mut(&mut self) -> &mut u64 {
205 self.min_epoch.get_or_insert_default()
206 }
207 pub fn min_epoch_opt(&self) -> Option<u64> {
209 self.min_epoch.as_ref().map(|field| *field)
210 }
211 pub fn set_min_epoch(&mut self, field: u64) {
213 self.min_epoch = Some(field);
214 }
215 pub fn with_min_epoch(mut self, field: u64) -> Self {
217 self.set_min_epoch(field);
218 self
219 }
220 pub fn authenticator_object_initial_shared_version_opt_mut(
222 &mut self,
223 ) -> Option<&mut u64> {
224 self.authenticator_object_initial_shared_version
225 .as_mut()
226 .map(|field| field as _)
227 }
228 pub fn authenticator_object_initial_shared_version_mut(&mut self) -> &mut u64 {
231 self.authenticator_object_initial_shared_version.get_or_insert_default()
232 }
233 pub fn authenticator_object_initial_shared_version_opt(&self) -> Option<u64> {
235 self.authenticator_object_initial_shared_version.as_ref().map(|field| *field)
236 }
237 pub fn set_authenticator_object_initial_shared_version(&mut self, field: u64) {
239 self.authenticator_object_initial_shared_version = Some(field);
240 }
241 pub fn with_authenticator_object_initial_shared_version(
243 mut self,
244 field: u64,
245 ) -> Self {
246 self.set_authenticator_object_initial_shared_version(field);
247 self
248 }
249 }
250 impl super::AuthenticatorStateUpdate {
251 pub const fn const_default() -> Self {
252 Self {
253 epoch: None,
254 round: None,
255 new_active_jwks: Vec::new(),
256 authenticator_object_initial_shared_version: None,
257 }
258 }
259 #[doc(hidden)]
260 pub fn default_instance() -> &'static Self {
261 static DEFAULT: super::AuthenticatorStateUpdate = super::AuthenticatorStateUpdate::const_default();
262 &DEFAULT
263 }
264 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
266 self.epoch.as_mut().map(|field| field as _)
267 }
268 pub fn epoch_mut(&mut self) -> &mut u64 {
271 self.epoch.get_or_insert_default()
272 }
273 pub fn epoch_opt(&self) -> Option<u64> {
275 self.epoch.as_ref().map(|field| *field)
276 }
277 pub fn set_epoch(&mut self, field: u64) {
279 self.epoch = Some(field);
280 }
281 pub fn with_epoch(mut self, field: u64) -> Self {
283 self.set_epoch(field);
284 self
285 }
286 pub fn round_opt_mut(&mut self) -> Option<&mut u64> {
288 self.round.as_mut().map(|field| field as _)
289 }
290 pub fn round_mut(&mut self) -> &mut u64 {
293 self.round.get_or_insert_default()
294 }
295 pub fn round_opt(&self) -> Option<u64> {
297 self.round.as_ref().map(|field| *field)
298 }
299 pub fn set_round(&mut self, field: u64) {
301 self.round = Some(field);
302 }
303 pub fn with_round(mut self, field: u64) -> Self {
305 self.set_round(field);
306 self
307 }
308 pub fn new_active_jwks(&self) -> &[super::ActiveJwk] {
310 &self.new_active_jwks
311 }
312 pub fn new_active_jwks_mut(&mut self) -> &mut Vec<super::ActiveJwk> {
315 &mut self.new_active_jwks
316 }
317 pub fn set_new_active_jwks(&mut self, field: Vec<super::ActiveJwk>) {
319 self.new_active_jwks = field;
320 }
321 pub fn with_new_active_jwks(mut self, field: Vec<super::ActiveJwk>) -> Self {
323 self.set_new_active_jwks(field);
324 self
325 }
326 pub fn authenticator_object_initial_shared_version_opt_mut(
328 &mut self,
329 ) -> Option<&mut u64> {
330 self.authenticator_object_initial_shared_version
331 .as_mut()
332 .map(|field| field as _)
333 }
334 pub fn authenticator_object_initial_shared_version_mut(&mut self) -> &mut u64 {
337 self.authenticator_object_initial_shared_version.get_or_insert_default()
338 }
339 pub fn authenticator_object_initial_shared_version_opt(&self) -> Option<u64> {
341 self.authenticator_object_initial_shared_version.as_ref().map(|field| *field)
342 }
343 pub fn set_authenticator_object_initial_shared_version(&mut self, field: u64) {
345 self.authenticator_object_initial_shared_version = Some(field);
346 }
347 pub fn with_authenticator_object_initial_shared_version(
349 mut self,
350 field: u64,
351 ) -> Self {
352 self.set_authenticator_object_initial_shared_version(field);
353 self
354 }
355 }
356 impl super::Balance {
357 pub const fn const_default() -> Self {
358 Self {
359 coin_type: None,
360 balance: None,
361 }
362 }
363 #[doc(hidden)]
364 pub fn default_instance() -> &'static Self {
365 static DEFAULT: super::Balance = super::Balance::const_default();
366 &DEFAULT
367 }
368 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
370 self.coin_type.as_mut().map(|field| field as _)
371 }
372 pub fn coin_type_mut(&mut self) -> &mut String {
375 self.coin_type.get_or_insert_default()
376 }
377 pub fn coin_type_opt(&self) -> Option<&str> {
379 self.coin_type.as_ref().map(|field| field as _)
380 }
381 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
383 self.coin_type = Some(field.into().into());
384 }
385 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
387 self.set_coin_type(field.into());
388 self
389 }
390 pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
392 self.balance.as_mut().map(|field| field as _)
393 }
394 pub fn balance_mut(&mut self) -> &mut u64 {
397 self.balance.get_or_insert_default()
398 }
399 pub fn balance_opt(&self) -> Option<u64> {
401 self.balance.as_ref().map(|field| *field)
402 }
403 pub fn set_balance(&mut self, field: u64) {
405 self.balance = Some(field);
406 }
407 pub fn with_balance(mut self, field: u64) -> Self {
409 self.set_balance(field);
410 self
411 }
412 }
413 impl super::BalanceChange {
414 pub const fn const_default() -> Self {
415 Self {
416 address: None,
417 coin_type: None,
418 amount: None,
419 }
420 }
421 #[doc(hidden)]
422 pub fn default_instance() -> &'static Self {
423 static DEFAULT: super::BalanceChange = super::BalanceChange::const_default();
424 &DEFAULT
425 }
426 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
428 self.address.as_mut().map(|field| field as _)
429 }
430 pub fn address_mut(&mut self) -> &mut String {
433 self.address.get_or_insert_default()
434 }
435 pub fn address_opt(&self) -> Option<&str> {
437 self.address.as_ref().map(|field| field as _)
438 }
439 pub fn set_address<T: Into<String>>(&mut self, field: T) {
441 self.address = Some(field.into().into());
442 }
443 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
445 self.set_address(field.into());
446 self
447 }
448 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
450 self.coin_type.as_mut().map(|field| field as _)
451 }
452 pub fn coin_type_mut(&mut self) -> &mut String {
455 self.coin_type.get_or_insert_default()
456 }
457 pub fn coin_type_opt(&self) -> Option<&str> {
459 self.coin_type.as_ref().map(|field| field as _)
460 }
461 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
463 self.coin_type = Some(field.into().into());
464 }
465 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
467 self.set_coin_type(field.into());
468 self
469 }
470 pub fn amount_opt_mut(&mut self) -> Option<&mut String> {
472 self.amount.as_mut().map(|field| field as _)
473 }
474 pub fn amount_mut(&mut self) -> &mut String {
477 self.amount.get_or_insert_default()
478 }
479 pub fn amount_opt(&self) -> Option<&str> {
481 self.amount.as_ref().map(|field| field as _)
482 }
483 pub fn set_amount<T: Into<String>>(&mut self, field: T) {
485 self.amount = Some(field.into().into());
486 }
487 pub fn with_amount<T: Into<String>>(mut self, field: T) -> Self {
489 self.set_amount(field.into());
490 self
491 }
492 }
493 impl super::BatchGetObjectsRequest {
494 pub const fn const_default() -> Self {
495 Self {
496 requests: Vec::new(),
497 read_mask: None,
498 }
499 }
500 #[doc(hidden)]
501 pub fn default_instance() -> &'static Self {
502 static DEFAULT: super::BatchGetObjectsRequest = super::BatchGetObjectsRequest::const_default();
503 &DEFAULT
504 }
505 pub fn requests(&self) -> &[super::GetObjectRequest] {
507 &self.requests
508 }
509 pub fn requests_mut(&mut self) -> &mut Vec<super::GetObjectRequest> {
512 &mut self.requests
513 }
514 pub fn set_requests(&mut self, field: Vec<super::GetObjectRequest>) {
516 self.requests = field;
517 }
518 pub fn with_requests(mut self, field: Vec<super::GetObjectRequest>) -> Self {
520 self.set_requests(field);
521 self
522 }
523 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
525 self.read_mask.as_mut().map(|field| field as _)
526 }
527 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
530 self.read_mask.get_or_insert_default()
531 }
532 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
534 self.read_mask.as_ref().map(|field| field as _)
535 }
536 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
538 self.read_mask = Some(field.into().into());
539 }
540 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
542 mut self,
543 field: T,
544 ) -> Self {
545 self.set_read_mask(field.into());
546 self
547 }
548 }
549 impl super::BatchGetObjectsResponse {
550 pub const fn const_default() -> Self {
551 Self { objects: Vec::new() }
552 }
553 #[doc(hidden)]
554 pub fn default_instance() -> &'static Self {
555 static DEFAULT: super::BatchGetObjectsResponse = super::BatchGetObjectsResponse::const_default();
556 &DEFAULT
557 }
558 pub fn objects(&self) -> &[super::GetObjectResult] {
560 &self.objects
561 }
562 pub fn objects_mut(&mut self) -> &mut Vec<super::GetObjectResult> {
565 &mut self.objects
566 }
567 pub fn set_objects(&mut self, field: Vec<super::GetObjectResult>) {
569 self.objects = field;
570 }
571 pub fn with_objects(mut self, field: Vec<super::GetObjectResult>) -> Self {
573 self.set_objects(field);
574 self
575 }
576 }
577 impl super::BatchGetTransactionsRequest {
578 pub const fn const_default() -> Self {
579 Self {
580 digests: Vec::new(),
581 read_mask: None,
582 }
583 }
584 #[doc(hidden)]
585 pub fn default_instance() -> &'static Self {
586 static DEFAULT: super::BatchGetTransactionsRequest = super::BatchGetTransactionsRequest::const_default();
587 &DEFAULT
588 }
589 pub fn digests(&self) -> &[String] {
591 &self.digests
592 }
593 pub fn digests_mut(&mut self) -> &mut Vec<String> {
596 &mut self.digests
597 }
598 pub fn set_digests(&mut self, field: Vec<String>) {
600 self.digests = field;
601 }
602 pub fn with_digests(mut self, field: Vec<String>) -> Self {
604 self.set_digests(field);
605 self
606 }
607 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
609 self.read_mask.as_mut().map(|field| field as _)
610 }
611 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
614 self.read_mask.get_or_insert_default()
615 }
616 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
618 self.read_mask.as_ref().map(|field| field as _)
619 }
620 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
622 self.read_mask = Some(field.into().into());
623 }
624 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
626 mut self,
627 field: T,
628 ) -> Self {
629 self.set_read_mask(field.into());
630 self
631 }
632 }
633 impl super::BatchGetTransactionsResponse {
634 pub const fn const_default() -> Self {
635 Self { transactions: Vec::new() }
636 }
637 #[doc(hidden)]
638 pub fn default_instance() -> &'static Self {
639 static DEFAULT: super::BatchGetTransactionsResponse = super::BatchGetTransactionsResponse::const_default();
640 &DEFAULT
641 }
642 pub fn transactions(&self) -> &[super::GetTransactionResult] {
644 &self.transactions
645 }
646 pub fn transactions_mut(&mut self) -> &mut Vec<super::GetTransactionResult> {
649 &mut self.transactions
650 }
651 pub fn set_transactions(&mut self, field: Vec<super::GetTransactionResult>) {
653 self.transactions = field;
654 }
655 pub fn with_transactions(
657 mut self,
658 field: Vec<super::GetTransactionResult>,
659 ) -> Self {
660 self.set_transactions(field);
661 self
662 }
663 }
664 impl super::Bcs {
665 pub const fn const_default() -> Self {
666 Self { name: None, value: None }
667 }
668 #[doc(hidden)]
669 pub fn default_instance() -> &'static Self {
670 static DEFAULT: super::Bcs = super::Bcs::const_default();
671 &DEFAULT
672 }
673 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
675 self.name.as_mut().map(|field| field as _)
676 }
677 pub fn name_mut(&mut self) -> &mut String {
680 self.name.get_or_insert_default()
681 }
682 pub fn name_opt(&self) -> Option<&str> {
684 self.name.as_ref().map(|field| field as _)
685 }
686 pub fn set_name<T: Into<String>>(&mut self, field: T) {
688 self.name = Some(field.into().into());
689 }
690 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
692 self.set_name(field.into());
693 self
694 }
695 pub fn value_opt(&self) -> Option<&[u8]> {
697 self.value.as_ref().map(|field| field as _)
698 }
699 pub fn set_value<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
701 self.value = Some(field.into().into());
702 }
703 pub fn with_value<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
705 self.set_value(field.into());
706 self
707 }
708 }
709 impl super::CanceledTransaction {
710 pub const fn const_default() -> Self {
711 Self {
712 digest: None,
713 version_assignments: Vec::new(),
714 }
715 }
716 #[doc(hidden)]
717 pub fn default_instance() -> &'static Self {
718 static DEFAULT: super::CanceledTransaction = super::CanceledTransaction::const_default();
719 &DEFAULT
720 }
721 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
723 self.digest.as_mut().map(|field| field as _)
724 }
725 pub fn digest_mut(&mut self) -> &mut String {
728 self.digest.get_or_insert_default()
729 }
730 pub fn digest_opt(&self) -> Option<&str> {
732 self.digest.as_ref().map(|field| field as _)
733 }
734 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
736 self.digest = Some(field.into().into());
737 }
738 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
740 self.set_digest(field.into());
741 self
742 }
743 pub fn version_assignments(&self) -> &[super::VersionAssignment] {
745 &self.version_assignments
746 }
747 pub fn version_assignments_mut(&mut self) -> &mut Vec<super::VersionAssignment> {
750 &mut self.version_assignments
751 }
752 pub fn set_version_assignments(&mut self, field: Vec<super::VersionAssignment>) {
754 self.version_assignments = field;
755 }
756 pub fn with_version_assignments(
758 mut self,
759 field: Vec<super::VersionAssignment>,
760 ) -> Self {
761 self.set_version_assignments(field);
762 self
763 }
764 }
765 impl super::ChangeEpoch {
766 pub const fn const_default() -> Self {
767 Self {
768 epoch: None,
769 protocol_version: None,
770 storage_charge: None,
771 computation_charge: None,
772 storage_rebate: None,
773 non_refundable_storage_fee: None,
774 epoch_start_timestamp: None,
775 system_packages: Vec::new(),
776 }
777 }
778 #[doc(hidden)]
779 pub fn default_instance() -> &'static Self {
780 static DEFAULT: super::ChangeEpoch = super::ChangeEpoch::const_default();
781 &DEFAULT
782 }
783 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
785 self.epoch.as_mut().map(|field| field as _)
786 }
787 pub fn epoch_mut(&mut self) -> &mut u64 {
790 self.epoch.get_or_insert_default()
791 }
792 pub fn epoch_opt(&self) -> Option<u64> {
794 self.epoch.as_ref().map(|field| *field)
795 }
796 pub fn set_epoch(&mut self, field: u64) {
798 self.epoch = Some(field);
799 }
800 pub fn with_epoch(mut self, field: u64) -> Self {
802 self.set_epoch(field);
803 self
804 }
805 pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
807 self.protocol_version.as_mut().map(|field| field as _)
808 }
809 pub fn protocol_version_mut(&mut self) -> &mut u64 {
812 self.protocol_version.get_or_insert_default()
813 }
814 pub fn protocol_version_opt(&self) -> Option<u64> {
816 self.protocol_version.as_ref().map(|field| *field)
817 }
818 pub fn set_protocol_version(&mut self, field: u64) {
820 self.protocol_version = Some(field);
821 }
822 pub fn with_protocol_version(mut self, field: u64) -> Self {
824 self.set_protocol_version(field);
825 self
826 }
827 pub fn storage_charge_opt_mut(&mut self) -> Option<&mut u64> {
829 self.storage_charge.as_mut().map(|field| field as _)
830 }
831 pub fn storage_charge_mut(&mut self) -> &mut u64 {
834 self.storage_charge.get_or_insert_default()
835 }
836 pub fn storage_charge_opt(&self) -> Option<u64> {
838 self.storage_charge.as_ref().map(|field| *field)
839 }
840 pub fn set_storage_charge(&mut self, field: u64) {
842 self.storage_charge = Some(field);
843 }
844 pub fn with_storage_charge(mut self, field: u64) -> Self {
846 self.set_storage_charge(field);
847 self
848 }
849 pub fn computation_charge_opt_mut(&mut self) -> Option<&mut u64> {
851 self.computation_charge.as_mut().map(|field| field as _)
852 }
853 pub fn computation_charge_mut(&mut self) -> &mut u64 {
856 self.computation_charge.get_or_insert_default()
857 }
858 pub fn computation_charge_opt(&self) -> Option<u64> {
860 self.computation_charge.as_ref().map(|field| *field)
861 }
862 pub fn set_computation_charge(&mut self, field: u64) {
864 self.computation_charge = Some(field);
865 }
866 pub fn with_computation_charge(mut self, field: u64) -> Self {
868 self.set_computation_charge(field);
869 self
870 }
871 pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
873 self.storage_rebate.as_mut().map(|field| field as _)
874 }
875 pub fn storage_rebate_mut(&mut self) -> &mut u64 {
878 self.storage_rebate.get_or_insert_default()
879 }
880 pub fn storage_rebate_opt(&self) -> Option<u64> {
882 self.storage_rebate.as_ref().map(|field| *field)
883 }
884 pub fn set_storage_rebate(&mut self, field: u64) {
886 self.storage_rebate = Some(field);
887 }
888 pub fn with_storage_rebate(mut self, field: u64) -> Self {
890 self.set_storage_rebate(field);
891 self
892 }
893 pub fn non_refundable_storage_fee_opt_mut(&mut self) -> Option<&mut u64> {
895 self.non_refundable_storage_fee.as_mut().map(|field| field as _)
896 }
897 pub fn non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
900 self.non_refundable_storage_fee.get_or_insert_default()
901 }
902 pub fn non_refundable_storage_fee_opt(&self) -> Option<u64> {
904 self.non_refundable_storage_fee.as_ref().map(|field| *field)
905 }
906 pub fn set_non_refundable_storage_fee(&mut self, field: u64) {
908 self.non_refundable_storage_fee = Some(field);
909 }
910 pub fn with_non_refundable_storage_fee(mut self, field: u64) -> Self {
912 self.set_non_refundable_storage_fee(field);
913 self
914 }
915 pub fn epoch_start_timestamp_opt_mut(
917 &mut self,
918 ) -> Option<&mut ::prost_types::Timestamp> {
919 self.epoch_start_timestamp.as_mut().map(|field| field as _)
920 }
921 pub fn epoch_start_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
924 self.epoch_start_timestamp.get_or_insert_default()
925 }
926 pub fn epoch_start_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
928 self.epoch_start_timestamp.as_ref().map(|field| field as _)
929 }
930 pub fn set_epoch_start_timestamp<T: Into<::prost_types::Timestamp>>(
932 &mut self,
933 field: T,
934 ) {
935 self.epoch_start_timestamp = Some(field.into().into());
936 }
937 pub fn with_epoch_start_timestamp<T: Into<::prost_types::Timestamp>>(
939 mut self,
940 field: T,
941 ) -> Self {
942 self.set_epoch_start_timestamp(field.into());
943 self
944 }
945 pub fn system_packages(&self) -> &[super::SystemPackage] {
947 &self.system_packages
948 }
949 pub fn system_packages_mut(&mut self) -> &mut Vec<super::SystemPackage> {
952 &mut self.system_packages
953 }
954 pub fn set_system_packages(&mut self, field: Vec<super::SystemPackage>) {
956 self.system_packages = field;
957 }
958 pub fn with_system_packages(mut self, field: Vec<super::SystemPackage>) -> Self {
960 self.set_system_packages(field);
961 self
962 }
963 }
964 impl super::ChangedObject {
965 pub const fn const_default() -> Self {
966 Self {
967 object_id: None,
968 input_state: None,
969 input_version: None,
970 input_digest: None,
971 input_owner: None,
972 output_state: None,
973 output_version: None,
974 output_digest: None,
975 output_owner: None,
976 id_operation: None,
977 object_type: None,
978 }
979 }
980 #[doc(hidden)]
981 pub fn default_instance() -> &'static Self {
982 static DEFAULT: super::ChangedObject = super::ChangedObject::const_default();
983 &DEFAULT
984 }
985 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
987 self.object_id.as_mut().map(|field| field as _)
988 }
989 pub fn object_id_mut(&mut self) -> &mut String {
992 self.object_id.get_or_insert_default()
993 }
994 pub fn object_id_opt(&self) -> Option<&str> {
996 self.object_id.as_ref().map(|field| field as _)
997 }
998 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
1000 self.object_id = Some(field.into().into());
1001 }
1002 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
1004 self.set_object_id(field.into());
1005 self
1006 }
1007 pub fn with_input_state<T: Into<super::changed_object::InputObjectState>>(
1009 mut self,
1010 field: T,
1011 ) -> Self {
1012 self.set_input_state(field.into());
1013 self
1014 }
1015 pub fn input_version_opt_mut(&mut self) -> Option<&mut u64> {
1017 self.input_version.as_mut().map(|field| field as _)
1018 }
1019 pub fn input_version_mut(&mut self) -> &mut u64 {
1022 self.input_version.get_or_insert_default()
1023 }
1024 pub fn input_version_opt(&self) -> Option<u64> {
1026 self.input_version.as_ref().map(|field| *field)
1027 }
1028 pub fn set_input_version(&mut self, field: u64) {
1030 self.input_version = Some(field);
1031 }
1032 pub fn with_input_version(mut self, field: u64) -> Self {
1034 self.set_input_version(field);
1035 self
1036 }
1037 pub fn input_digest_opt_mut(&mut self) -> Option<&mut String> {
1039 self.input_digest.as_mut().map(|field| field as _)
1040 }
1041 pub fn input_digest_mut(&mut self) -> &mut String {
1044 self.input_digest.get_or_insert_default()
1045 }
1046 pub fn input_digest_opt(&self) -> Option<&str> {
1048 self.input_digest.as_ref().map(|field| field as _)
1049 }
1050 pub fn set_input_digest<T: Into<String>>(&mut self, field: T) {
1052 self.input_digest = Some(field.into().into());
1053 }
1054 pub fn with_input_digest<T: Into<String>>(mut self, field: T) -> Self {
1056 self.set_input_digest(field.into());
1057 self
1058 }
1059 pub fn input_owner(&self) -> &super::Owner {
1061 self.input_owner
1062 .as_ref()
1063 .map(|field| field as _)
1064 .unwrap_or_else(|| super::Owner::default_instance() as _)
1065 }
1066 pub fn input_owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
1068 self.input_owner.as_mut().map(|field| field as _)
1069 }
1070 pub fn input_owner_mut(&mut self) -> &mut super::Owner {
1073 self.input_owner.get_or_insert_default()
1074 }
1075 pub fn input_owner_opt(&self) -> Option<&super::Owner> {
1077 self.input_owner.as_ref().map(|field| field as _)
1078 }
1079 pub fn set_input_owner<T: Into<super::Owner>>(&mut self, field: T) {
1081 self.input_owner = Some(field.into().into());
1082 }
1083 pub fn with_input_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
1085 self.set_input_owner(field.into());
1086 self
1087 }
1088 pub fn with_output_state<T: Into<super::changed_object::OutputObjectState>>(
1090 mut self,
1091 field: T,
1092 ) -> Self {
1093 self.set_output_state(field.into());
1094 self
1095 }
1096 pub fn output_version_opt_mut(&mut self) -> Option<&mut u64> {
1098 self.output_version.as_mut().map(|field| field as _)
1099 }
1100 pub fn output_version_mut(&mut self) -> &mut u64 {
1103 self.output_version.get_or_insert_default()
1104 }
1105 pub fn output_version_opt(&self) -> Option<u64> {
1107 self.output_version.as_ref().map(|field| *field)
1108 }
1109 pub fn set_output_version(&mut self, field: u64) {
1111 self.output_version = Some(field);
1112 }
1113 pub fn with_output_version(mut self, field: u64) -> Self {
1115 self.set_output_version(field);
1116 self
1117 }
1118 pub fn output_digest_opt_mut(&mut self) -> Option<&mut String> {
1120 self.output_digest.as_mut().map(|field| field as _)
1121 }
1122 pub fn output_digest_mut(&mut self) -> &mut String {
1125 self.output_digest.get_or_insert_default()
1126 }
1127 pub fn output_digest_opt(&self) -> Option<&str> {
1129 self.output_digest.as_ref().map(|field| field as _)
1130 }
1131 pub fn set_output_digest<T: Into<String>>(&mut self, field: T) {
1133 self.output_digest = Some(field.into().into());
1134 }
1135 pub fn with_output_digest<T: Into<String>>(mut self, field: T) -> Self {
1137 self.set_output_digest(field.into());
1138 self
1139 }
1140 pub fn output_owner(&self) -> &super::Owner {
1142 self.output_owner
1143 .as_ref()
1144 .map(|field| field as _)
1145 .unwrap_or_else(|| super::Owner::default_instance() as _)
1146 }
1147 pub fn output_owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
1149 self.output_owner.as_mut().map(|field| field as _)
1150 }
1151 pub fn output_owner_mut(&mut self) -> &mut super::Owner {
1154 self.output_owner.get_or_insert_default()
1155 }
1156 pub fn output_owner_opt(&self) -> Option<&super::Owner> {
1158 self.output_owner.as_ref().map(|field| field as _)
1159 }
1160 pub fn set_output_owner<T: Into<super::Owner>>(&mut self, field: T) {
1162 self.output_owner = Some(field.into().into());
1163 }
1164 pub fn with_output_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
1166 self.set_output_owner(field.into());
1167 self
1168 }
1169 pub fn with_id_operation<T: Into<super::changed_object::IdOperation>>(
1171 mut self,
1172 field: T,
1173 ) -> Self {
1174 self.set_id_operation(field.into());
1175 self
1176 }
1177 pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
1179 self.object_type.as_mut().map(|field| field as _)
1180 }
1181 pub fn object_type_mut(&mut self) -> &mut String {
1184 self.object_type.get_or_insert_default()
1185 }
1186 pub fn object_type_opt(&self) -> Option<&str> {
1188 self.object_type.as_ref().map(|field| field as _)
1189 }
1190 pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
1192 self.object_type = Some(field.into().into());
1193 }
1194 pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
1196 self.set_object_type(field.into());
1197 self
1198 }
1199 }
1200 impl super::Checkpoint {
1201 pub const fn const_default() -> Self {
1202 Self {
1203 sequence_number: None,
1204 digest: None,
1205 summary: None,
1206 signature: None,
1207 contents: None,
1208 transactions: Vec::new(),
1209 objects: None,
1210 }
1211 }
1212 #[doc(hidden)]
1213 pub fn default_instance() -> &'static Self {
1214 static DEFAULT: super::Checkpoint = super::Checkpoint::const_default();
1215 &DEFAULT
1216 }
1217 pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
1219 self.sequence_number.as_mut().map(|field| field as _)
1220 }
1221 pub fn sequence_number_mut(&mut self) -> &mut u64 {
1224 self.sequence_number.get_or_insert_default()
1225 }
1226 pub fn sequence_number_opt(&self) -> Option<u64> {
1228 self.sequence_number.as_ref().map(|field| *field)
1229 }
1230 pub fn set_sequence_number(&mut self, field: u64) {
1232 self.sequence_number = Some(field);
1233 }
1234 pub fn with_sequence_number(mut self, field: u64) -> Self {
1236 self.set_sequence_number(field);
1237 self
1238 }
1239 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1241 self.digest.as_mut().map(|field| field as _)
1242 }
1243 pub fn digest_mut(&mut self) -> &mut String {
1246 self.digest.get_or_insert_default()
1247 }
1248 pub fn digest_opt(&self) -> Option<&str> {
1250 self.digest.as_ref().map(|field| field as _)
1251 }
1252 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1254 self.digest = Some(field.into().into());
1255 }
1256 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1258 self.set_digest(field.into());
1259 self
1260 }
1261 pub fn summary(&self) -> &super::CheckpointSummary {
1263 self.summary
1264 .as_ref()
1265 .map(|field| field as _)
1266 .unwrap_or_else(|| super::CheckpointSummary::default_instance() as _)
1267 }
1268 pub fn summary_opt_mut(&mut self) -> Option<&mut super::CheckpointSummary> {
1270 self.summary.as_mut().map(|field| field as _)
1271 }
1272 pub fn summary_mut(&mut self) -> &mut super::CheckpointSummary {
1275 self.summary.get_or_insert_default()
1276 }
1277 pub fn summary_opt(&self) -> Option<&super::CheckpointSummary> {
1279 self.summary.as_ref().map(|field| field as _)
1280 }
1281 pub fn set_summary<T: Into<super::CheckpointSummary>>(&mut self, field: T) {
1283 self.summary = Some(field.into().into());
1284 }
1285 pub fn with_summary<T: Into<super::CheckpointSummary>>(
1287 mut self,
1288 field: T,
1289 ) -> Self {
1290 self.set_summary(field.into());
1291 self
1292 }
1293 pub fn signature(&self) -> &super::ValidatorAggregatedSignature {
1295 self.signature
1296 .as_ref()
1297 .map(|field| field as _)
1298 .unwrap_or_else(|| {
1299 super::ValidatorAggregatedSignature::default_instance() as _
1300 })
1301 }
1302 pub fn signature_opt_mut(
1304 &mut self,
1305 ) -> Option<&mut super::ValidatorAggregatedSignature> {
1306 self.signature.as_mut().map(|field| field as _)
1307 }
1308 pub fn signature_mut(&mut self) -> &mut super::ValidatorAggregatedSignature {
1311 self.signature.get_or_insert_default()
1312 }
1313 pub fn signature_opt(&self) -> Option<&super::ValidatorAggregatedSignature> {
1315 self.signature.as_ref().map(|field| field as _)
1316 }
1317 pub fn set_signature<T: Into<super::ValidatorAggregatedSignature>>(
1319 &mut self,
1320 field: T,
1321 ) {
1322 self.signature = Some(field.into().into());
1323 }
1324 pub fn with_signature<T: Into<super::ValidatorAggregatedSignature>>(
1326 mut self,
1327 field: T,
1328 ) -> Self {
1329 self.set_signature(field.into());
1330 self
1331 }
1332 pub fn contents(&self) -> &super::CheckpointContents {
1334 self.contents
1335 .as_ref()
1336 .map(|field| field as _)
1337 .unwrap_or_else(|| super::CheckpointContents::default_instance() as _)
1338 }
1339 pub fn contents_opt_mut(&mut self) -> Option<&mut super::CheckpointContents> {
1341 self.contents.as_mut().map(|field| field as _)
1342 }
1343 pub fn contents_mut(&mut self) -> &mut super::CheckpointContents {
1346 self.contents.get_or_insert_default()
1347 }
1348 pub fn contents_opt(&self) -> Option<&super::CheckpointContents> {
1350 self.contents.as_ref().map(|field| field as _)
1351 }
1352 pub fn set_contents<T: Into<super::CheckpointContents>>(&mut self, field: T) {
1354 self.contents = Some(field.into().into());
1355 }
1356 pub fn with_contents<T: Into<super::CheckpointContents>>(
1358 mut self,
1359 field: T,
1360 ) -> Self {
1361 self.set_contents(field.into());
1362 self
1363 }
1364 pub fn transactions(&self) -> &[super::ExecutedTransaction] {
1366 &self.transactions
1367 }
1368 pub fn transactions_mut(&mut self) -> &mut Vec<super::ExecutedTransaction> {
1371 &mut self.transactions
1372 }
1373 pub fn set_transactions(&mut self, field: Vec<super::ExecutedTransaction>) {
1375 self.transactions = field;
1376 }
1377 pub fn with_transactions(
1379 mut self,
1380 field: Vec<super::ExecutedTransaction>,
1381 ) -> Self {
1382 self.set_transactions(field);
1383 self
1384 }
1385 pub fn objects(&self) -> &super::ObjectSet {
1387 self.objects
1388 .as_ref()
1389 .map(|field| field as _)
1390 .unwrap_or_else(|| super::ObjectSet::default_instance() as _)
1391 }
1392 pub fn objects_opt_mut(&mut self) -> Option<&mut super::ObjectSet> {
1394 self.objects.as_mut().map(|field| field as _)
1395 }
1396 pub fn objects_mut(&mut self) -> &mut super::ObjectSet {
1399 self.objects.get_or_insert_default()
1400 }
1401 pub fn objects_opt(&self) -> Option<&super::ObjectSet> {
1403 self.objects.as_ref().map(|field| field as _)
1404 }
1405 pub fn set_objects<T: Into<super::ObjectSet>>(&mut self, field: T) {
1407 self.objects = Some(field.into().into());
1408 }
1409 pub fn with_objects<T: Into<super::ObjectSet>>(mut self, field: T) -> Self {
1411 self.set_objects(field.into());
1412 self
1413 }
1414 }
1415 impl super::CheckpointCommitment {
1416 pub const fn const_default() -> Self {
1417 Self { kind: None, digest: None }
1418 }
1419 #[doc(hidden)]
1420 pub fn default_instance() -> &'static Self {
1421 static DEFAULT: super::CheckpointCommitment = super::CheckpointCommitment::const_default();
1422 &DEFAULT
1423 }
1424 pub fn with_kind<
1426 T: Into<super::checkpoint_commitment::CheckpointCommitmentKind>,
1427 >(mut self, field: T) -> Self {
1428 self.set_kind(field.into());
1429 self
1430 }
1431 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1433 self.digest.as_mut().map(|field| field as _)
1434 }
1435 pub fn digest_mut(&mut self) -> &mut String {
1438 self.digest.get_or_insert_default()
1439 }
1440 pub fn digest_opt(&self) -> Option<&str> {
1442 self.digest.as_ref().map(|field| field as _)
1443 }
1444 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1446 self.digest = Some(field.into().into());
1447 }
1448 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1450 self.set_digest(field.into());
1451 self
1452 }
1453 }
1454 impl super::CheckpointContents {
1455 pub const fn const_default() -> Self {
1456 Self {
1457 bcs: None,
1458 digest: None,
1459 version: None,
1460 transactions: Vec::new(),
1461 }
1462 }
1463 #[doc(hidden)]
1464 pub fn default_instance() -> &'static Self {
1465 static DEFAULT: super::CheckpointContents = super::CheckpointContents::const_default();
1466 &DEFAULT
1467 }
1468 pub fn bcs(&self) -> &super::Bcs {
1470 self.bcs
1471 .as_ref()
1472 .map(|field| field as _)
1473 .unwrap_or_else(|| super::Bcs::default_instance() as _)
1474 }
1475 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
1477 self.bcs.as_mut().map(|field| field as _)
1478 }
1479 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
1482 self.bcs.get_or_insert_default()
1483 }
1484 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
1486 self.bcs.as_ref().map(|field| field as _)
1487 }
1488 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
1490 self.bcs = Some(field.into().into());
1491 }
1492 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
1494 self.set_bcs(field.into());
1495 self
1496 }
1497 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1499 self.digest.as_mut().map(|field| field as _)
1500 }
1501 pub fn digest_mut(&mut self) -> &mut String {
1504 self.digest.get_or_insert_default()
1505 }
1506 pub fn digest_opt(&self) -> Option<&str> {
1508 self.digest.as_ref().map(|field| field as _)
1509 }
1510 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1512 self.digest = Some(field.into().into());
1513 }
1514 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1516 self.set_digest(field.into());
1517 self
1518 }
1519 pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
1521 self.version.as_mut().map(|field| field as _)
1522 }
1523 pub fn version_mut(&mut self) -> &mut i32 {
1526 self.version.get_or_insert_default()
1527 }
1528 pub fn version_opt(&self) -> Option<i32> {
1530 self.version.as_ref().map(|field| *field)
1531 }
1532 pub fn set_version(&mut self, field: i32) {
1534 self.version = Some(field);
1535 }
1536 pub fn with_version(mut self, field: i32) -> Self {
1538 self.set_version(field);
1539 self
1540 }
1541 pub fn transactions(&self) -> &[super::CheckpointedTransactionInfo] {
1543 &self.transactions
1544 }
1545 pub fn transactions_mut(
1548 &mut self,
1549 ) -> &mut Vec<super::CheckpointedTransactionInfo> {
1550 &mut self.transactions
1551 }
1552 pub fn set_transactions(
1554 &mut self,
1555 field: Vec<super::CheckpointedTransactionInfo>,
1556 ) {
1557 self.transactions = field;
1558 }
1559 pub fn with_transactions(
1561 mut self,
1562 field: Vec<super::CheckpointedTransactionInfo>,
1563 ) -> Self {
1564 self.set_transactions(field);
1565 self
1566 }
1567 }
1568 impl super::CheckpointSummary {
1569 pub const fn const_default() -> Self {
1570 Self {
1571 bcs: None,
1572 digest: None,
1573 epoch: None,
1574 sequence_number: None,
1575 total_network_transactions: None,
1576 content_digest: None,
1577 previous_digest: None,
1578 epoch_rolling_gas_cost_summary: None,
1579 timestamp: None,
1580 commitments: Vec::new(),
1581 end_of_epoch_data: None,
1582 version_specific_data: None,
1583 }
1584 }
1585 #[doc(hidden)]
1586 pub fn default_instance() -> &'static Self {
1587 static DEFAULT: super::CheckpointSummary = super::CheckpointSummary::const_default();
1588 &DEFAULT
1589 }
1590 pub fn bcs(&self) -> &super::Bcs {
1592 self.bcs
1593 .as_ref()
1594 .map(|field| field as _)
1595 .unwrap_or_else(|| super::Bcs::default_instance() as _)
1596 }
1597 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
1599 self.bcs.as_mut().map(|field| field as _)
1600 }
1601 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
1604 self.bcs.get_or_insert_default()
1605 }
1606 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
1608 self.bcs.as_ref().map(|field| field as _)
1609 }
1610 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
1612 self.bcs = Some(field.into().into());
1613 }
1614 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
1616 self.set_bcs(field.into());
1617 self
1618 }
1619 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1621 self.digest.as_mut().map(|field| field as _)
1622 }
1623 pub fn digest_mut(&mut self) -> &mut String {
1626 self.digest.get_or_insert_default()
1627 }
1628 pub fn digest_opt(&self) -> Option<&str> {
1630 self.digest.as_ref().map(|field| field as _)
1631 }
1632 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1634 self.digest = Some(field.into().into());
1635 }
1636 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1638 self.set_digest(field.into());
1639 self
1640 }
1641 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
1643 self.epoch.as_mut().map(|field| field as _)
1644 }
1645 pub fn epoch_mut(&mut self) -> &mut u64 {
1648 self.epoch.get_or_insert_default()
1649 }
1650 pub fn epoch_opt(&self) -> Option<u64> {
1652 self.epoch.as_ref().map(|field| *field)
1653 }
1654 pub fn set_epoch(&mut self, field: u64) {
1656 self.epoch = Some(field);
1657 }
1658 pub fn with_epoch(mut self, field: u64) -> Self {
1660 self.set_epoch(field);
1661 self
1662 }
1663 pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
1665 self.sequence_number.as_mut().map(|field| field as _)
1666 }
1667 pub fn sequence_number_mut(&mut self) -> &mut u64 {
1670 self.sequence_number.get_or_insert_default()
1671 }
1672 pub fn sequence_number_opt(&self) -> Option<u64> {
1674 self.sequence_number.as_ref().map(|field| *field)
1675 }
1676 pub fn set_sequence_number(&mut self, field: u64) {
1678 self.sequence_number = Some(field);
1679 }
1680 pub fn with_sequence_number(mut self, field: u64) -> Self {
1682 self.set_sequence_number(field);
1683 self
1684 }
1685 pub fn total_network_transactions_opt_mut(&mut self) -> Option<&mut u64> {
1687 self.total_network_transactions.as_mut().map(|field| field as _)
1688 }
1689 pub fn total_network_transactions_mut(&mut self) -> &mut u64 {
1692 self.total_network_transactions.get_or_insert_default()
1693 }
1694 pub fn total_network_transactions_opt(&self) -> Option<u64> {
1696 self.total_network_transactions.as_ref().map(|field| *field)
1697 }
1698 pub fn set_total_network_transactions(&mut self, field: u64) {
1700 self.total_network_transactions = Some(field);
1701 }
1702 pub fn with_total_network_transactions(mut self, field: u64) -> Self {
1704 self.set_total_network_transactions(field);
1705 self
1706 }
1707 pub fn content_digest_opt_mut(&mut self) -> Option<&mut String> {
1709 self.content_digest.as_mut().map(|field| field as _)
1710 }
1711 pub fn content_digest_mut(&mut self) -> &mut String {
1714 self.content_digest.get_or_insert_default()
1715 }
1716 pub fn content_digest_opt(&self) -> Option<&str> {
1718 self.content_digest.as_ref().map(|field| field as _)
1719 }
1720 pub fn set_content_digest<T: Into<String>>(&mut self, field: T) {
1722 self.content_digest = Some(field.into().into());
1723 }
1724 pub fn with_content_digest<T: Into<String>>(mut self, field: T) -> Self {
1726 self.set_content_digest(field.into());
1727 self
1728 }
1729 pub fn previous_digest_opt_mut(&mut self) -> Option<&mut String> {
1731 self.previous_digest.as_mut().map(|field| field as _)
1732 }
1733 pub fn previous_digest_mut(&mut self) -> &mut String {
1736 self.previous_digest.get_or_insert_default()
1737 }
1738 pub fn previous_digest_opt(&self) -> Option<&str> {
1740 self.previous_digest.as_ref().map(|field| field as _)
1741 }
1742 pub fn set_previous_digest<T: Into<String>>(&mut self, field: T) {
1744 self.previous_digest = Some(field.into().into());
1745 }
1746 pub fn with_previous_digest<T: Into<String>>(mut self, field: T) -> Self {
1748 self.set_previous_digest(field.into());
1749 self
1750 }
1751 pub fn epoch_rolling_gas_cost_summary(&self) -> &super::GasCostSummary {
1753 self.epoch_rolling_gas_cost_summary
1754 .as_ref()
1755 .map(|field| field as _)
1756 .unwrap_or_else(|| super::GasCostSummary::default_instance() as _)
1757 }
1758 pub fn epoch_rolling_gas_cost_summary_opt_mut(
1760 &mut self,
1761 ) -> Option<&mut super::GasCostSummary> {
1762 self.epoch_rolling_gas_cost_summary.as_mut().map(|field| field as _)
1763 }
1764 pub fn epoch_rolling_gas_cost_summary_mut(
1767 &mut self,
1768 ) -> &mut super::GasCostSummary {
1769 self.epoch_rolling_gas_cost_summary.get_or_insert_default()
1770 }
1771 pub fn epoch_rolling_gas_cost_summary_opt(
1773 &self,
1774 ) -> Option<&super::GasCostSummary> {
1775 self.epoch_rolling_gas_cost_summary.as_ref().map(|field| field as _)
1776 }
1777 pub fn set_epoch_rolling_gas_cost_summary<T: Into<super::GasCostSummary>>(
1779 &mut self,
1780 field: T,
1781 ) {
1782 self.epoch_rolling_gas_cost_summary = Some(field.into().into());
1783 }
1784 pub fn with_epoch_rolling_gas_cost_summary<T: Into<super::GasCostSummary>>(
1786 mut self,
1787 field: T,
1788 ) -> Self {
1789 self.set_epoch_rolling_gas_cost_summary(field.into());
1790 self
1791 }
1792 pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
1794 self.timestamp.as_mut().map(|field| field as _)
1795 }
1796 pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
1799 self.timestamp.get_or_insert_default()
1800 }
1801 pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
1803 self.timestamp.as_ref().map(|field| field as _)
1804 }
1805 pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
1807 self.timestamp = Some(field.into().into());
1808 }
1809 pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
1811 mut self,
1812 field: T,
1813 ) -> Self {
1814 self.set_timestamp(field.into());
1815 self
1816 }
1817 pub fn commitments(&self) -> &[super::CheckpointCommitment] {
1819 &self.commitments
1820 }
1821 pub fn commitments_mut(&mut self) -> &mut Vec<super::CheckpointCommitment> {
1824 &mut self.commitments
1825 }
1826 pub fn set_commitments(&mut self, field: Vec<super::CheckpointCommitment>) {
1828 self.commitments = field;
1829 }
1830 pub fn with_commitments(
1832 mut self,
1833 field: Vec<super::CheckpointCommitment>,
1834 ) -> Self {
1835 self.set_commitments(field);
1836 self
1837 }
1838 pub fn end_of_epoch_data(&self) -> &super::EndOfEpochData {
1840 self.end_of_epoch_data
1841 .as_ref()
1842 .map(|field| field as _)
1843 .unwrap_or_else(|| super::EndOfEpochData::default_instance() as _)
1844 }
1845 pub fn end_of_epoch_data_opt_mut(
1847 &mut self,
1848 ) -> Option<&mut super::EndOfEpochData> {
1849 self.end_of_epoch_data.as_mut().map(|field| field as _)
1850 }
1851 pub fn end_of_epoch_data_mut(&mut self) -> &mut super::EndOfEpochData {
1854 self.end_of_epoch_data.get_or_insert_default()
1855 }
1856 pub fn end_of_epoch_data_opt(&self) -> Option<&super::EndOfEpochData> {
1858 self.end_of_epoch_data.as_ref().map(|field| field as _)
1859 }
1860 pub fn set_end_of_epoch_data<T: Into<super::EndOfEpochData>>(
1862 &mut self,
1863 field: T,
1864 ) {
1865 self.end_of_epoch_data = Some(field.into().into());
1866 }
1867 pub fn with_end_of_epoch_data<T: Into<super::EndOfEpochData>>(
1869 mut self,
1870 field: T,
1871 ) -> Self {
1872 self.set_end_of_epoch_data(field.into());
1873 self
1874 }
1875 pub fn version_specific_data_opt(&self) -> Option<&[u8]> {
1877 self.version_specific_data.as_ref().map(|field| field as _)
1878 }
1879 pub fn set_version_specific_data<T: Into<::prost::bytes::Bytes>>(
1881 &mut self,
1882 field: T,
1883 ) {
1884 self.version_specific_data = Some(field.into().into());
1885 }
1886 pub fn with_version_specific_data<T: Into<::prost::bytes::Bytes>>(
1888 mut self,
1889 field: T,
1890 ) -> Self {
1891 self.set_version_specific_data(field.into());
1892 self
1893 }
1894 }
1895 impl super::CheckpointedTransactionInfo {
1896 pub const fn const_default() -> Self {
1897 Self {
1898 transaction: None,
1899 effects: None,
1900 signatures: Vec::new(),
1901 }
1902 }
1903 #[doc(hidden)]
1904 pub fn default_instance() -> &'static Self {
1905 static DEFAULT: super::CheckpointedTransactionInfo = super::CheckpointedTransactionInfo::const_default();
1906 &DEFAULT
1907 }
1908 pub fn transaction_opt_mut(&mut self) -> Option<&mut String> {
1910 self.transaction.as_mut().map(|field| field as _)
1911 }
1912 pub fn transaction_mut(&mut self) -> &mut String {
1915 self.transaction.get_or_insert_default()
1916 }
1917 pub fn transaction_opt(&self) -> Option<&str> {
1919 self.transaction.as_ref().map(|field| field as _)
1920 }
1921 pub fn set_transaction<T: Into<String>>(&mut self, field: T) {
1923 self.transaction = Some(field.into().into());
1924 }
1925 pub fn with_transaction<T: Into<String>>(mut self, field: T) -> Self {
1927 self.set_transaction(field.into());
1928 self
1929 }
1930 pub fn effects_opt_mut(&mut self) -> Option<&mut String> {
1932 self.effects.as_mut().map(|field| field as _)
1933 }
1934 pub fn effects_mut(&mut self) -> &mut String {
1937 self.effects.get_or_insert_default()
1938 }
1939 pub fn effects_opt(&self) -> Option<&str> {
1941 self.effects.as_ref().map(|field| field as _)
1942 }
1943 pub fn set_effects<T: Into<String>>(&mut self, field: T) {
1945 self.effects = Some(field.into().into());
1946 }
1947 pub fn with_effects<T: Into<String>>(mut self, field: T) -> Self {
1949 self.set_effects(field.into());
1950 self
1951 }
1952 pub fn signatures(&self) -> &[super::UserSignature] {
1954 &self.signatures
1955 }
1956 pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
1959 &mut self.signatures
1960 }
1961 pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
1963 self.signatures = field;
1964 }
1965 pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
1967 self.set_signatures(field);
1968 self
1969 }
1970 }
1971 impl super::CircomG1 {
1972 pub const fn const_default() -> Self {
1973 Self {
1974 e0: None,
1975 e1: None,
1976 e2: None,
1977 }
1978 }
1979 #[doc(hidden)]
1980 pub fn default_instance() -> &'static Self {
1981 static DEFAULT: super::CircomG1 = super::CircomG1::const_default();
1982 &DEFAULT
1983 }
1984 pub fn e0_opt_mut(&mut self) -> Option<&mut String> {
1986 self.e0.as_mut().map(|field| field as _)
1987 }
1988 pub fn e0_mut(&mut self) -> &mut String {
1991 self.e0.get_or_insert_default()
1992 }
1993 pub fn e0_opt(&self) -> Option<&str> {
1995 self.e0.as_ref().map(|field| field as _)
1996 }
1997 pub fn set_e0<T: Into<String>>(&mut self, field: T) {
1999 self.e0 = Some(field.into().into());
2000 }
2001 pub fn with_e0<T: Into<String>>(mut self, field: T) -> Self {
2003 self.set_e0(field.into());
2004 self
2005 }
2006 pub fn e1_opt_mut(&mut self) -> Option<&mut String> {
2008 self.e1.as_mut().map(|field| field as _)
2009 }
2010 pub fn e1_mut(&mut self) -> &mut String {
2013 self.e1.get_or_insert_default()
2014 }
2015 pub fn e1_opt(&self) -> Option<&str> {
2017 self.e1.as_ref().map(|field| field as _)
2018 }
2019 pub fn set_e1<T: Into<String>>(&mut self, field: T) {
2021 self.e1 = Some(field.into().into());
2022 }
2023 pub fn with_e1<T: Into<String>>(mut self, field: T) -> Self {
2025 self.set_e1(field.into());
2026 self
2027 }
2028 pub fn e2_opt_mut(&mut self) -> Option<&mut String> {
2030 self.e2.as_mut().map(|field| field as _)
2031 }
2032 pub fn e2_mut(&mut self) -> &mut String {
2035 self.e2.get_or_insert_default()
2036 }
2037 pub fn e2_opt(&self) -> Option<&str> {
2039 self.e2.as_ref().map(|field| field as _)
2040 }
2041 pub fn set_e2<T: Into<String>>(&mut self, field: T) {
2043 self.e2 = Some(field.into().into());
2044 }
2045 pub fn with_e2<T: Into<String>>(mut self, field: T) -> Self {
2047 self.set_e2(field.into());
2048 self
2049 }
2050 }
2051 impl super::CircomG2 {
2052 pub const fn const_default() -> Self {
2053 Self {
2054 e00: None,
2055 e01: None,
2056 e10: None,
2057 e11: None,
2058 e20: None,
2059 e21: None,
2060 }
2061 }
2062 #[doc(hidden)]
2063 pub fn default_instance() -> &'static Self {
2064 static DEFAULT: super::CircomG2 = super::CircomG2::const_default();
2065 &DEFAULT
2066 }
2067 pub fn e00_opt_mut(&mut self) -> Option<&mut String> {
2069 self.e00.as_mut().map(|field| field as _)
2070 }
2071 pub fn e00_mut(&mut self) -> &mut String {
2074 self.e00.get_or_insert_default()
2075 }
2076 pub fn e00_opt(&self) -> Option<&str> {
2078 self.e00.as_ref().map(|field| field as _)
2079 }
2080 pub fn set_e00<T: Into<String>>(&mut self, field: T) {
2082 self.e00 = Some(field.into().into());
2083 }
2084 pub fn with_e00<T: Into<String>>(mut self, field: T) -> Self {
2086 self.set_e00(field.into());
2087 self
2088 }
2089 pub fn e01_opt_mut(&mut self) -> Option<&mut String> {
2091 self.e01.as_mut().map(|field| field as _)
2092 }
2093 pub fn e01_mut(&mut self) -> &mut String {
2096 self.e01.get_or_insert_default()
2097 }
2098 pub fn e01_opt(&self) -> Option<&str> {
2100 self.e01.as_ref().map(|field| field as _)
2101 }
2102 pub fn set_e01<T: Into<String>>(&mut self, field: T) {
2104 self.e01 = Some(field.into().into());
2105 }
2106 pub fn with_e01<T: Into<String>>(mut self, field: T) -> Self {
2108 self.set_e01(field.into());
2109 self
2110 }
2111 pub fn e10_opt_mut(&mut self) -> Option<&mut String> {
2113 self.e10.as_mut().map(|field| field as _)
2114 }
2115 pub fn e10_mut(&mut self) -> &mut String {
2118 self.e10.get_or_insert_default()
2119 }
2120 pub fn e10_opt(&self) -> Option<&str> {
2122 self.e10.as_ref().map(|field| field as _)
2123 }
2124 pub fn set_e10<T: Into<String>>(&mut self, field: T) {
2126 self.e10 = Some(field.into().into());
2127 }
2128 pub fn with_e10<T: Into<String>>(mut self, field: T) -> Self {
2130 self.set_e10(field.into());
2131 self
2132 }
2133 pub fn e11_opt_mut(&mut self) -> Option<&mut String> {
2135 self.e11.as_mut().map(|field| field as _)
2136 }
2137 pub fn e11_mut(&mut self) -> &mut String {
2140 self.e11.get_or_insert_default()
2141 }
2142 pub fn e11_opt(&self) -> Option<&str> {
2144 self.e11.as_ref().map(|field| field as _)
2145 }
2146 pub fn set_e11<T: Into<String>>(&mut self, field: T) {
2148 self.e11 = Some(field.into().into());
2149 }
2150 pub fn with_e11<T: Into<String>>(mut self, field: T) -> Self {
2152 self.set_e11(field.into());
2153 self
2154 }
2155 pub fn e20_opt_mut(&mut self) -> Option<&mut String> {
2157 self.e20.as_mut().map(|field| field as _)
2158 }
2159 pub fn e20_mut(&mut self) -> &mut String {
2162 self.e20.get_or_insert_default()
2163 }
2164 pub fn e20_opt(&self) -> Option<&str> {
2166 self.e20.as_ref().map(|field| field as _)
2167 }
2168 pub fn set_e20<T: Into<String>>(&mut self, field: T) {
2170 self.e20 = Some(field.into().into());
2171 }
2172 pub fn with_e20<T: Into<String>>(mut self, field: T) -> Self {
2174 self.set_e20(field.into());
2175 self
2176 }
2177 pub fn e21_opt_mut(&mut self) -> Option<&mut String> {
2179 self.e21.as_mut().map(|field| field as _)
2180 }
2181 pub fn e21_mut(&mut self) -> &mut String {
2184 self.e21.get_or_insert_default()
2185 }
2186 pub fn e21_opt(&self) -> Option<&str> {
2188 self.e21.as_ref().map(|field| field as _)
2189 }
2190 pub fn set_e21<T: Into<String>>(&mut self, field: T) {
2192 self.e21 = Some(field.into().into());
2193 }
2194 pub fn with_e21<T: Into<String>>(mut self, field: T) -> Self {
2196 self.set_e21(field.into());
2197 self
2198 }
2199 }
2200 impl super::CleverError {
2201 pub const fn const_default() -> Self {
2202 Self {
2203 error_code: None,
2204 line_number: None,
2205 constant_name: None,
2206 constant_type: None,
2207 value: None,
2208 }
2209 }
2210 #[doc(hidden)]
2211 pub fn default_instance() -> &'static Self {
2212 static DEFAULT: super::CleverError = super::CleverError::const_default();
2213 &DEFAULT
2214 }
2215 pub fn error_code_opt_mut(&mut self) -> Option<&mut u64> {
2217 self.error_code.as_mut().map(|field| field as _)
2218 }
2219 pub fn error_code_mut(&mut self) -> &mut u64 {
2222 self.error_code.get_or_insert_default()
2223 }
2224 pub fn error_code_opt(&self) -> Option<u64> {
2226 self.error_code.as_ref().map(|field| *field)
2227 }
2228 pub fn set_error_code(&mut self, field: u64) {
2230 self.error_code = Some(field);
2231 }
2232 pub fn with_error_code(mut self, field: u64) -> Self {
2234 self.set_error_code(field);
2235 self
2236 }
2237 pub fn line_number_opt_mut(&mut self) -> Option<&mut u64> {
2239 self.line_number.as_mut().map(|field| field as _)
2240 }
2241 pub fn line_number_mut(&mut self) -> &mut u64 {
2244 self.line_number.get_or_insert_default()
2245 }
2246 pub fn line_number_opt(&self) -> Option<u64> {
2248 self.line_number.as_ref().map(|field| *field)
2249 }
2250 pub fn set_line_number(&mut self, field: u64) {
2252 self.line_number = Some(field);
2253 }
2254 pub fn with_line_number(mut self, field: u64) -> Self {
2256 self.set_line_number(field);
2257 self
2258 }
2259 pub fn constant_name_opt_mut(&mut self) -> Option<&mut String> {
2261 self.constant_name.as_mut().map(|field| field as _)
2262 }
2263 pub fn constant_name_mut(&mut self) -> &mut String {
2266 self.constant_name.get_or_insert_default()
2267 }
2268 pub fn constant_name_opt(&self) -> Option<&str> {
2270 self.constant_name.as_ref().map(|field| field as _)
2271 }
2272 pub fn set_constant_name<T: Into<String>>(&mut self, field: T) {
2274 self.constant_name = Some(field.into().into());
2275 }
2276 pub fn with_constant_name<T: Into<String>>(mut self, field: T) -> Self {
2278 self.set_constant_name(field.into());
2279 self
2280 }
2281 pub fn constant_type_opt_mut(&mut self) -> Option<&mut String> {
2283 self.constant_type.as_mut().map(|field| field as _)
2284 }
2285 pub fn constant_type_mut(&mut self) -> &mut String {
2288 self.constant_type.get_or_insert_default()
2289 }
2290 pub fn constant_type_opt(&self) -> Option<&str> {
2292 self.constant_type.as_ref().map(|field| field as _)
2293 }
2294 pub fn set_constant_type<T: Into<String>>(&mut self, field: T) {
2296 self.constant_type = Some(field.into().into());
2297 }
2298 pub fn with_constant_type<T: Into<String>>(mut self, field: T) -> Self {
2300 self.set_constant_type(field.into());
2301 self
2302 }
2303 pub fn rendered(&self) -> &str {
2305 if let Some(super::clever_error::Value::Rendered(field)) = &self.value {
2306 field as _
2307 } else {
2308 ""
2309 }
2310 }
2311 pub fn rendered_opt(&self) -> Option<&str> {
2313 if let Some(super::clever_error::Value::Rendered(field)) = &self.value {
2314 Some(field as _)
2315 } else {
2316 None
2317 }
2318 }
2319 pub fn rendered_opt_mut(&mut self) -> Option<&mut String> {
2321 if let Some(super::clever_error::Value::Rendered(field)) = &mut self.value {
2322 Some(field as _)
2323 } else {
2324 None
2325 }
2326 }
2327 pub fn rendered_mut(&mut self) -> &mut String {
2331 if self.rendered_opt_mut().is_none() {
2332 self.value = Some(
2333 super::clever_error::Value::Rendered(String::default()),
2334 );
2335 }
2336 self.rendered_opt_mut().unwrap()
2337 }
2338 pub fn set_rendered<T: Into<String>>(&mut self, field: T) {
2341 self.value = Some(super::clever_error::Value::Rendered(field.into().into()));
2342 }
2343 pub fn with_rendered<T: Into<String>>(mut self, field: T) -> Self {
2346 self.set_rendered(field.into());
2347 self
2348 }
2349 pub fn raw(&self) -> &[u8] {
2351 if let Some(super::clever_error::Value::Raw(field)) = &self.value {
2352 field as _
2353 } else {
2354 &[]
2355 }
2356 }
2357 pub fn raw_opt(&self) -> Option<&[u8]> {
2359 if let Some(super::clever_error::Value::Raw(field)) = &self.value {
2360 Some(field as _)
2361 } else {
2362 None
2363 }
2364 }
2365 pub fn raw_opt_mut(&mut self) -> Option<&mut ::prost::bytes::Bytes> {
2367 if let Some(super::clever_error::Value::Raw(field)) = &mut self.value {
2368 Some(field as _)
2369 } else {
2370 None
2371 }
2372 }
2373 pub fn raw_mut(&mut self) -> &mut ::prost::bytes::Bytes {
2377 if self.raw_opt_mut().is_none() {
2378 self.value = Some(
2379 super::clever_error::Value::Raw(::prost::bytes::Bytes::default()),
2380 );
2381 }
2382 self.raw_opt_mut().unwrap()
2383 }
2384 pub fn set_raw<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
2387 self.value = Some(super::clever_error::Value::Raw(field.into().into()));
2388 }
2389 pub fn with_raw<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
2392 self.set_raw(field.into());
2393 self
2394 }
2395 }
2396 impl super::CoinDenyListError {
2397 pub const fn const_default() -> Self {
2398 Self {
2399 address: None,
2400 coin_type: None,
2401 }
2402 }
2403 #[doc(hidden)]
2404 pub fn default_instance() -> &'static Self {
2405 static DEFAULT: super::CoinDenyListError = super::CoinDenyListError::const_default();
2406 &DEFAULT
2407 }
2408 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
2410 self.address.as_mut().map(|field| field as _)
2411 }
2412 pub fn address_mut(&mut self) -> &mut String {
2415 self.address.get_or_insert_default()
2416 }
2417 pub fn address_opt(&self) -> Option<&str> {
2419 self.address.as_ref().map(|field| field as _)
2420 }
2421 pub fn set_address<T: Into<String>>(&mut self, field: T) {
2423 self.address = Some(field.into().into());
2424 }
2425 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
2427 self.set_address(field.into());
2428 self
2429 }
2430 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
2432 self.coin_type.as_mut().map(|field| field as _)
2433 }
2434 pub fn coin_type_mut(&mut self) -> &mut String {
2437 self.coin_type.get_or_insert_default()
2438 }
2439 pub fn coin_type_opt(&self) -> Option<&str> {
2441 self.coin_type.as_ref().map(|field| field as _)
2442 }
2443 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
2445 self.coin_type = Some(field.into().into());
2446 }
2447 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
2449 self.set_coin_type(field.into());
2450 self
2451 }
2452 }
2453 impl super::CoinMetadata {
2454 pub const fn const_default() -> Self {
2455 Self {
2456 id: None,
2457 decimals: None,
2458 name: None,
2459 symbol: None,
2460 description: None,
2461 icon_url: None,
2462 metadata_cap_id: None,
2463 metadata_cap_state: None,
2464 }
2465 }
2466 #[doc(hidden)]
2467 pub fn default_instance() -> &'static Self {
2468 static DEFAULT: super::CoinMetadata = super::CoinMetadata::const_default();
2469 &DEFAULT
2470 }
2471 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
2473 self.id.as_mut().map(|field| field as _)
2474 }
2475 pub fn id_mut(&mut self) -> &mut String {
2478 self.id.get_or_insert_default()
2479 }
2480 pub fn id_opt(&self) -> Option<&str> {
2482 self.id.as_ref().map(|field| field as _)
2483 }
2484 pub fn set_id<T: Into<String>>(&mut self, field: T) {
2486 self.id = Some(field.into().into());
2487 }
2488 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
2490 self.set_id(field.into());
2491 self
2492 }
2493 pub fn decimals_opt_mut(&mut self) -> Option<&mut u32> {
2495 self.decimals.as_mut().map(|field| field as _)
2496 }
2497 pub fn decimals_mut(&mut self) -> &mut u32 {
2500 self.decimals.get_or_insert_default()
2501 }
2502 pub fn decimals_opt(&self) -> Option<u32> {
2504 self.decimals.as_ref().map(|field| *field)
2505 }
2506 pub fn set_decimals(&mut self, field: u32) {
2508 self.decimals = Some(field);
2509 }
2510 pub fn with_decimals(mut self, field: u32) -> Self {
2512 self.set_decimals(field);
2513 self
2514 }
2515 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
2517 self.name.as_mut().map(|field| field as _)
2518 }
2519 pub fn name_mut(&mut self) -> &mut String {
2522 self.name.get_or_insert_default()
2523 }
2524 pub fn name_opt(&self) -> Option<&str> {
2526 self.name.as_ref().map(|field| field as _)
2527 }
2528 pub fn set_name<T: Into<String>>(&mut self, field: T) {
2530 self.name = Some(field.into().into());
2531 }
2532 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
2534 self.set_name(field.into());
2535 self
2536 }
2537 pub fn symbol_opt_mut(&mut self) -> Option<&mut String> {
2539 self.symbol.as_mut().map(|field| field as _)
2540 }
2541 pub fn symbol_mut(&mut self) -> &mut String {
2544 self.symbol.get_or_insert_default()
2545 }
2546 pub fn symbol_opt(&self) -> Option<&str> {
2548 self.symbol.as_ref().map(|field| field as _)
2549 }
2550 pub fn set_symbol<T: Into<String>>(&mut self, field: T) {
2552 self.symbol = Some(field.into().into());
2553 }
2554 pub fn with_symbol<T: Into<String>>(mut self, field: T) -> Self {
2556 self.set_symbol(field.into());
2557 self
2558 }
2559 pub fn description_opt_mut(&mut self) -> Option<&mut String> {
2561 self.description.as_mut().map(|field| field as _)
2562 }
2563 pub fn description_mut(&mut self) -> &mut String {
2566 self.description.get_or_insert_default()
2567 }
2568 pub fn description_opt(&self) -> Option<&str> {
2570 self.description.as_ref().map(|field| field as _)
2571 }
2572 pub fn set_description<T: Into<String>>(&mut self, field: T) {
2574 self.description = Some(field.into().into());
2575 }
2576 pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
2578 self.set_description(field.into());
2579 self
2580 }
2581 pub fn icon_url_opt_mut(&mut self) -> Option<&mut String> {
2583 self.icon_url.as_mut().map(|field| field as _)
2584 }
2585 pub fn icon_url_mut(&mut self) -> &mut String {
2588 self.icon_url.get_or_insert_default()
2589 }
2590 pub fn icon_url_opt(&self) -> Option<&str> {
2592 self.icon_url.as_ref().map(|field| field as _)
2593 }
2594 pub fn set_icon_url<T: Into<String>>(&mut self, field: T) {
2596 self.icon_url = Some(field.into().into());
2597 }
2598 pub fn with_icon_url<T: Into<String>>(mut self, field: T) -> Self {
2600 self.set_icon_url(field.into());
2601 self
2602 }
2603 pub fn metadata_cap_id_opt_mut(&mut self) -> Option<&mut String> {
2605 self.metadata_cap_id.as_mut().map(|field| field as _)
2606 }
2607 pub fn metadata_cap_id_mut(&mut self) -> &mut String {
2610 self.metadata_cap_id.get_or_insert_default()
2611 }
2612 pub fn metadata_cap_id_opt(&self) -> Option<&str> {
2614 self.metadata_cap_id.as_ref().map(|field| field as _)
2615 }
2616 pub fn set_metadata_cap_id<T: Into<String>>(&mut self, field: T) {
2618 self.metadata_cap_id = Some(field.into().into());
2619 }
2620 pub fn with_metadata_cap_id<T: Into<String>>(mut self, field: T) -> Self {
2622 self.set_metadata_cap_id(field.into());
2623 self
2624 }
2625 pub fn with_metadata_cap_state<T: Into<super::coin_metadata::MetadataCapState>>(
2627 mut self,
2628 field: T,
2629 ) -> Self {
2630 self.set_metadata_cap_state(field.into());
2631 self
2632 }
2633 }
2634 impl super::CoinTreasury {
2635 pub const fn const_default() -> Self {
2636 Self {
2637 id: None,
2638 total_supply: None,
2639 supply_state: None,
2640 }
2641 }
2642 #[doc(hidden)]
2643 pub fn default_instance() -> &'static Self {
2644 static DEFAULT: super::CoinTreasury = super::CoinTreasury::const_default();
2645 &DEFAULT
2646 }
2647 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
2649 self.id.as_mut().map(|field| field as _)
2650 }
2651 pub fn id_mut(&mut self) -> &mut String {
2654 self.id.get_or_insert_default()
2655 }
2656 pub fn id_opt(&self) -> Option<&str> {
2658 self.id.as_ref().map(|field| field as _)
2659 }
2660 pub fn set_id<T: Into<String>>(&mut self, field: T) {
2662 self.id = Some(field.into().into());
2663 }
2664 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
2666 self.set_id(field.into());
2667 self
2668 }
2669 pub fn total_supply_opt_mut(&mut self) -> Option<&mut u64> {
2671 self.total_supply.as_mut().map(|field| field as _)
2672 }
2673 pub fn total_supply_mut(&mut self) -> &mut u64 {
2676 self.total_supply.get_or_insert_default()
2677 }
2678 pub fn total_supply_opt(&self) -> Option<u64> {
2680 self.total_supply.as_ref().map(|field| *field)
2681 }
2682 pub fn set_total_supply(&mut self, field: u64) {
2684 self.total_supply = Some(field);
2685 }
2686 pub fn with_total_supply(mut self, field: u64) -> Self {
2688 self.set_total_supply(field);
2689 self
2690 }
2691 pub fn with_supply_state<T: Into<super::coin_treasury::SupplyState>>(
2693 mut self,
2694 field: T,
2695 ) -> Self {
2696 self.set_supply_state(field.into());
2697 self
2698 }
2699 }
2700 impl super::Command {
2701 pub const fn const_default() -> Self {
2702 Self { command: None }
2703 }
2704 #[doc(hidden)]
2705 pub fn default_instance() -> &'static Self {
2706 static DEFAULT: super::Command = super::Command::const_default();
2707 &DEFAULT
2708 }
2709 pub fn move_call(&self) -> &super::MoveCall {
2711 if let Some(super::command::Command::MoveCall(field)) = &self.command {
2712 field as _
2713 } else {
2714 super::MoveCall::default_instance() as _
2715 }
2716 }
2717 pub fn move_call_opt(&self) -> Option<&super::MoveCall> {
2719 if let Some(super::command::Command::MoveCall(field)) = &self.command {
2720 Some(field as _)
2721 } else {
2722 None
2723 }
2724 }
2725 pub fn move_call_opt_mut(&mut self) -> Option<&mut super::MoveCall> {
2727 if let Some(super::command::Command::MoveCall(field)) = &mut self.command {
2728 Some(field as _)
2729 } else {
2730 None
2731 }
2732 }
2733 pub fn move_call_mut(&mut self) -> &mut super::MoveCall {
2737 if self.move_call_opt_mut().is_none() {
2738 self.command = Some(
2739 super::command::Command::MoveCall(super::MoveCall::default()),
2740 );
2741 }
2742 self.move_call_opt_mut().unwrap()
2743 }
2744 pub fn set_move_call<T: Into<super::MoveCall>>(&mut self, field: T) {
2747 self.command = Some(super::command::Command::MoveCall(field.into().into()));
2748 }
2749 pub fn with_move_call<T: Into<super::MoveCall>>(mut self, field: T) -> Self {
2752 self.set_move_call(field.into());
2753 self
2754 }
2755 pub fn transfer_objects(&self) -> &super::TransferObjects {
2757 if let Some(super::command::Command::TransferObjects(field)) = &self.command
2758 {
2759 field as _
2760 } else {
2761 super::TransferObjects::default_instance() as _
2762 }
2763 }
2764 pub fn transfer_objects_opt(&self) -> Option<&super::TransferObjects> {
2766 if let Some(super::command::Command::TransferObjects(field)) = &self.command
2767 {
2768 Some(field as _)
2769 } else {
2770 None
2771 }
2772 }
2773 pub fn transfer_objects_opt_mut(
2775 &mut self,
2776 ) -> Option<&mut super::TransferObjects> {
2777 if let Some(super::command::Command::TransferObjects(field)) = &mut self
2778 .command
2779 {
2780 Some(field as _)
2781 } else {
2782 None
2783 }
2784 }
2785 pub fn transfer_objects_mut(&mut self) -> &mut super::TransferObjects {
2789 if self.transfer_objects_opt_mut().is_none() {
2790 self.command = Some(
2791 super::command::Command::TransferObjects(
2792 super::TransferObjects::default(),
2793 ),
2794 );
2795 }
2796 self.transfer_objects_opt_mut().unwrap()
2797 }
2798 pub fn set_transfer_objects<T: Into<super::TransferObjects>>(
2801 &mut self,
2802 field: T,
2803 ) {
2804 self.command = Some(
2805 super::command::Command::TransferObjects(field.into().into()),
2806 );
2807 }
2808 pub fn with_transfer_objects<T: Into<super::TransferObjects>>(
2811 mut self,
2812 field: T,
2813 ) -> Self {
2814 self.set_transfer_objects(field.into());
2815 self
2816 }
2817 pub fn split_coins(&self) -> &super::SplitCoins {
2819 if let Some(super::command::Command::SplitCoins(field)) = &self.command {
2820 field as _
2821 } else {
2822 super::SplitCoins::default_instance() as _
2823 }
2824 }
2825 pub fn split_coins_opt(&self) -> Option<&super::SplitCoins> {
2827 if let Some(super::command::Command::SplitCoins(field)) = &self.command {
2828 Some(field as _)
2829 } else {
2830 None
2831 }
2832 }
2833 pub fn split_coins_opt_mut(&mut self) -> Option<&mut super::SplitCoins> {
2835 if let Some(super::command::Command::SplitCoins(field)) = &mut self.command {
2836 Some(field as _)
2837 } else {
2838 None
2839 }
2840 }
2841 pub fn split_coins_mut(&mut self) -> &mut super::SplitCoins {
2845 if self.split_coins_opt_mut().is_none() {
2846 self.command = Some(
2847 super::command::Command::SplitCoins(super::SplitCoins::default()),
2848 );
2849 }
2850 self.split_coins_opt_mut().unwrap()
2851 }
2852 pub fn set_split_coins<T: Into<super::SplitCoins>>(&mut self, field: T) {
2855 self.command = Some(
2856 super::command::Command::SplitCoins(field.into().into()),
2857 );
2858 }
2859 pub fn with_split_coins<T: Into<super::SplitCoins>>(mut self, field: T) -> Self {
2862 self.set_split_coins(field.into());
2863 self
2864 }
2865 pub fn merge_coins(&self) -> &super::MergeCoins {
2867 if let Some(super::command::Command::MergeCoins(field)) = &self.command {
2868 field as _
2869 } else {
2870 super::MergeCoins::default_instance() as _
2871 }
2872 }
2873 pub fn merge_coins_opt(&self) -> Option<&super::MergeCoins> {
2875 if let Some(super::command::Command::MergeCoins(field)) = &self.command {
2876 Some(field as _)
2877 } else {
2878 None
2879 }
2880 }
2881 pub fn merge_coins_opt_mut(&mut self) -> Option<&mut super::MergeCoins> {
2883 if let Some(super::command::Command::MergeCoins(field)) = &mut self.command {
2884 Some(field as _)
2885 } else {
2886 None
2887 }
2888 }
2889 pub fn merge_coins_mut(&mut self) -> &mut super::MergeCoins {
2893 if self.merge_coins_opt_mut().is_none() {
2894 self.command = Some(
2895 super::command::Command::MergeCoins(super::MergeCoins::default()),
2896 );
2897 }
2898 self.merge_coins_opt_mut().unwrap()
2899 }
2900 pub fn set_merge_coins<T: Into<super::MergeCoins>>(&mut self, field: T) {
2903 self.command = Some(
2904 super::command::Command::MergeCoins(field.into().into()),
2905 );
2906 }
2907 pub fn with_merge_coins<T: Into<super::MergeCoins>>(mut self, field: T) -> Self {
2910 self.set_merge_coins(field.into());
2911 self
2912 }
2913 pub fn publish(&self) -> &super::Publish {
2915 if let Some(super::command::Command::Publish(field)) = &self.command {
2916 field as _
2917 } else {
2918 super::Publish::default_instance() as _
2919 }
2920 }
2921 pub fn publish_opt(&self) -> Option<&super::Publish> {
2923 if let Some(super::command::Command::Publish(field)) = &self.command {
2924 Some(field as _)
2925 } else {
2926 None
2927 }
2928 }
2929 pub fn publish_opt_mut(&mut self) -> Option<&mut super::Publish> {
2931 if let Some(super::command::Command::Publish(field)) = &mut self.command {
2932 Some(field as _)
2933 } else {
2934 None
2935 }
2936 }
2937 pub fn publish_mut(&mut self) -> &mut super::Publish {
2941 if self.publish_opt_mut().is_none() {
2942 self.command = Some(
2943 super::command::Command::Publish(super::Publish::default()),
2944 );
2945 }
2946 self.publish_opt_mut().unwrap()
2947 }
2948 pub fn set_publish<T: Into<super::Publish>>(&mut self, field: T) {
2951 self.command = Some(super::command::Command::Publish(field.into().into()));
2952 }
2953 pub fn with_publish<T: Into<super::Publish>>(mut self, field: T) -> Self {
2956 self.set_publish(field.into());
2957 self
2958 }
2959 pub fn make_move_vector(&self) -> &super::MakeMoveVector {
2961 if let Some(super::command::Command::MakeMoveVector(field)) = &self.command {
2962 field as _
2963 } else {
2964 super::MakeMoveVector::default_instance() as _
2965 }
2966 }
2967 pub fn make_move_vector_opt(&self) -> Option<&super::MakeMoveVector> {
2969 if let Some(super::command::Command::MakeMoveVector(field)) = &self.command {
2970 Some(field as _)
2971 } else {
2972 None
2973 }
2974 }
2975 pub fn make_move_vector_opt_mut(
2977 &mut self,
2978 ) -> Option<&mut super::MakeMoveVector> {
2979 if let Some(super::command::Command::MakeMoveVector(field)) = &mut self
2980 .command
2981 {
2982 Some(field as _)
2983 } else {
2984 None
2985 }
2986 }
2987 pub fn make_move_vector_mut(&mut self) -> &mut super::MakeMoveVector {
2991 if self.make_move_vector_opt_mut().is_none() {
2992 self.command = Some(
2993 super::command::Command::MakeMoveVector(
2994 super::MakeMoveVector::default(),
2995 ),
2996 );
2997 }
2998 self.make_move_vector_opt_mut().unwrap()
2999 }
3000 pub fn set_make_move_vector<T: Into<super::MakeMoveVector>>(
3003 &mut self,
3004 field: T,
3005 ) {
3006 self.command = Some(
3007 super::command::Command::MakeMoveVector(field.into().into()),
3008 );
3009 }
3010 pub fn with_make_move_vector<T: Into<super::MakeMoveVector>>(
3013 mut self,
3014 field: T,
3015 ) -> Self {
3016 self.set_make_move_vector(field.into());
3017 self
3018 }
3019 pub fn upgrade(&self) -> &super::Upgrade {
3021 if let Some(super::command::Command::Upgrade(field)) = &self.command {
3022 field as _
3023 } else {
3024 super::Upgrade::default_instance() as _
3025 }
3026 }
3027 pub fn upgrade_opt(&self) -> Option<&super::Upgrade> {
3029 if let Some(super::command::Command::Upgrade(field)) = &self.command {
3030 Some(field as _)
3031 } else {
3032 None
3033 }
3034 }
3035 pub fn upgrade_opt_mut(&mut self) -> Option<&mut super::Upgrade> {
3037 if let Some(super::command::Command::Upgrade(field)) = &mut self.command {
3038 Some(field as _)
3039 } else {
3040 None
3041 }
3042 }
3043 pub fn upgrade_mut(&mut self) -> &mut super::Upgrade {
3047 if self.upgrade_opt_mut().is_none() {
3048 self.command = Some(
3049 super::command::Command::Upgrade(super::Upgrade::default()),
3050 );
3051 }
3052 self.upgrade_opt_mut().unwrap()
3053 }
3054 pub fn set_upgrade<T: Into<super::Upgrade>>(&mut self, field: T) {
3057 self.command = Some(super::command::Command::Upgrade(field.into().into()));
3058 }
3059 pub fn with_upgrade<T: Into<super::Upgrade>>(mut self, field: T) -> Self {
3062 self.set_upgrade(field.into());
3063 self
3064 }
3065 }
3066 impl super::CommandArgumentError {
3067 pub const fn const_default() -> Self {
3068 Self {
3069 argument: None,
3070 kind: None,
3071 index_error: None,
3072 }
3073 }
3074 #[doc(hidden)]
3075 pub fn default_instance() -> &'static Self {
3076 static DEFAULT: super::CommandArgumentError = super::CommandArgumentError::const_default();
3077 &DEFAULT
3078 }
3079 pub fn argument_opt_mut(&mut self) -> Option<&mut u32> {
3081 self.argument.as_mut().map(|field| field as _)
3082 }
3083 pub fn argument_mut(&mut self) -> &mut u32 {
3086 self.argument.get_or_insert_default()
3087 }
3088 pub fn argument_opt(&self) -> Option<u32> {
3090 self.argument.as_ref().map(|field| *field)
3091 }
3092 pub fn set_argument(&mut self, field: u32) {
3094 self.argument = Some(field);
3095 }
3096 pub fn with_argument(mut self, field: u32) -> Self {
3098 self.set_argument(field);
3099 self
3100 }
3101 pub fn with_kind<
3103 T: Into<super::command_argument_error::CommandArgumentErrorKind>,
3104 >(mut self, field: T) -> Self {
3105 self.set_kind(field.into());
3106 self
3107 }
3108 pub fn index_error(&self) -> &super::IndexError {
3110 self.index_error
3111 .as_ref()
3112 .map(|field| field as _)
3113 .unwrap_or_else(|| super::IndexError::default_instance() as _)
3114 }
3115 pub fn index_error_opt_mut(&mut self) -> Option<&mut super::IndexError> {
3117 self.index_error.as_mut().map(|field| field as _)
3118 }
3119 pub fn index_error_mut(&mut self) -> &mut super::IndexError {
3122 self.index_error.get_or_insert_default()
3123 }
3124 pub fn index_error_opt(&self) -> Option<&super::IndexError> {
3126 self.index_error.as_ref().map(|field| field as _)
3127 }
3128 pub fn set_index_error<T: Into<super::IndexError>>(&mut self, field: T) {
3130 self.index_error = Some(field.into().into());
3131 }
3132 pub fn with_index_error<T: Into<super::IndexError>>(mut self, field: T) -> Self {
3134 self.set_index_error(field.into());
3135 self
3136 }
3137 }
3138 impl super::CommandOutput {
3139 pub const fn const_default() -> Self {
3140 Self {
3141 argument: None,
3142 value: None,
3143 json: None,
3144 }
3145 }
3146 #[doc(hidden)]
3147 pub fn default_instance() -> &'static Self {
3148 static DEFAULT: super::CommandOutput = super::CommandOutput::const_default();
3149 &DEFAULT
3150 }
3151 pub fn argument(&self) -> &super::Argument {
3153 self.argument
3154 .as_ref()
3155 .map(|field| field as _)
3156 .unwrap_or_else(|| super::Argument::default_instance() as _)
3157 }
3158 pub fn argument_opt_mut(&mut self) -> Option<&mut super::Argument> {
3160 self.argument.as_mut().map(|field| field as _)
3161 }
3162 pub fn argument_mut(&mut self) -> &mut super::Argument {
3165 self.argument.get_or_insert_default()
3166 }
3167 pub fn argument_opt(&self) -> Option<&super::Argument> {
3169 self.argument.as_ref().map(|field| field as _)
3170 }
3171 pub fn set_argument<T: Into<super::Argument>>(&mut self, field: T) {
3173 self.argument = Some(field.into().into());
3174 }
3175 pub fn with_argument<T: Into<super::Argument>>(mut self, field: T) -> Self {
3177 self.set_argument(field.into());
3178 self
3179 }
3180 pub fn value(&self) -> &super::Bcs {
3182 self.value
3183 .as_ref()
3184 .map(|field| field as _)
3185 .unwrap_or_else(|| super::Bcs::default_instance() as _)
3186 }
3187 pub fn value_opt_mut(&mut self) -> Option<&mut super::Bcs> {
3189 self.value.as_mut().map(|field| field as _)
3190 }
3191 pub fn value_mut(&mut self) -> &mut super::Bcs {
3194 self.value.get_or_insert_default()
3195 }
3196 pub fn value_opt(&self) -> Option<&super::Bcs> {
3198 self.value.as_ref().map(|field| field as _)
3199 }
3200 pub fn set_value<T: Into<super::Bcs>>(&mut self, field: T) {
3202 self.value = Some(field.into().into());
3203 }
3204 pub fn with_value<T: Into<super::Bcs>>(mut self, field: T) -> Self {
3206 self.set_value(field.into());
3207 self
3208 }
3209 pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
3211 self.json.as_mut().map(|field| field as _)
3212 }
3213 pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
3216 self.json.get_or_insert_default()
3217 }
3218 pub fn json_opt(&self) -> Option<&::prost_types::Value> {
3220 self.json.as_ref().map(|field| field as _)
3221 }
3222 pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
3224 self.json = Some(field.into().into());
3225 }
3226 pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
3228 self.set_json(field.into());
3229 self
3230 }
3231 }
3232 impl super::CommandResult {
3233 pub const fn const_default() -> Self {
3234 Self {
3235 return_values: Vec::new(),
3236 mutated_by_ref: Vec::new(),
3237 }
3238 }
3239 #[doc(hidden)]
3240 pub fn default_instance() -> &'static Self {
3241 static DEFAULT: super::CommandResult = super::CommandResult::const_default();
3242 &DEFAULT
3243 }
3244 pub fn return_values(&self) -> &[super::CommandOutput] {
3246 &self.return_values
3247 }
3248 pub fn return_values_mut(&mut self) -> &mut Vec<super::CommandOutput> {
3251 &mut self.return_values
3252 }
3253 pub fn set_return_values(&mut self, field: Vec<super::CommandOutput>) {
3255 self.return_values = field;
3256 }
3257 pub fn with_return_values(mut self, field: Vec<super::CommandOutput>) -> Self {
3259 self.set_return_values(field);
3260 self
3261 }
3262 pub fn mutated_by_ref(&self) -> &[super::CommandOutput] {
3264 &self.mutated_by_ref
3265 }
3266 pub fn mutated_by_ref_mut(&mut self) -> &mut Vec<super::CommandOutput> {
3269 &mut self.mutated_by_ref
3270 }
3271 pub fn set_mutated_by_ref(&mut self, field: Vec<super::CommandOutput>) {
3273 self.mutated_by_ref = field;
3274 }
3275 pub fn with_mutated_by_ref(mut self, field: Vec<super::CommandOutput>) -> Self {
3277 self.set_mutated_by_ref(field);
3278 self
3279 }
3280 }
3281 impl super::CongestedObjects {
3282 pub const fn const_default() -> Self {
3283 Self { objects: Vec::new() }
3284 }
3285 #[doc(hidden)]
3286 pub fn default_instance() -> &'static Self {
3287 static DEFAULT: super::CongestedObjects = super::CongestedObjects::const_default();
3288 &DEFAULT
3289 }
3290 pub fn objects(&self) -> &[String] {
3292 &self.objects
3293 }
3294 pub fn objects_mut(&mut self) -> &mut Vec<String> {
3297 &mut self.objects
3298 }
3299 pub fn set_objects(&mut self, field: Vec<String>) {
3301 self.objects = field;
3302 }
3303 pub fn with_objects(mut self, field: Vec<String>) -> Self {
3305 self.set_objects(field);
3306 self
3307 }
3308 }
3309 impl super::ConsensusCommitPrologue {
3310 pub const fn const_default() -> Self {
3311 Self {
3312 epoch: None,
3313 round: None,
3314 commit_timestamp: None,
3315 consensus_commit_digest: None,
3316 sub_dag_index: None,
3317 consensus_determined_version_assignments: None,
3318 additional_state_digest: None,
3319 }
3320 }
3321 #[doc(hidden)]
3322 pub fn default_instance() -> &'static Self {
3323 static DEFAULT: super::ConsensusCommitPrologue = super::ConsensusCommitPrologue::const_default();
3324 &DEFAULT
3325 }
3326 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
3328 self.epoch.as_mut().map(|field| field as _)
3329 }
3330 pub fn epoch_mut(&mut self) -> &mut u64 {
3333 self.epoch.get_or_insert_default()
3334 }
3335 pub fn epoch_opt(&self) -> Option<u64> {
3337 self.epoch.as_ref().map(|field| *field)
3338 }
3339 pub fn set_epoch(&mut self, field: u64) {
3341 self.epoch = Some(field);
3342 }
3343 pub fn with_epoch(mut self, field: u64) -> Self {
3345 self.set_epoch(field);
3346 self
3347 }
3348 pub fn round_opt_mut(&mut self) -> Option<&mut u64> {
3350 self.round.as_mut().map(|field| field as _)
3351 }
3352 pub fn round_mut(&mut self) -> &mut u64 {
3355 self.round.get_or_insert_default()
3356 }
3357 pub fn round_opt(&self) -> Option<u64> {
3359 self.round.as_ref().map(|field| *field)
3360 }
3361 pub fn set_round(&mut self, field: u64) {
3363 self.round = Some(field);
3364 }
3365 pub fn with_round(mut self, field: u64) -> Self {
3367 self.set_round(field);
3368 self
3369 }
3370 pub fn commit_timestamp_opt_mut(
3372 &mut self,
3373 ) -> Option<&mut ::prost_types::Timestamp> {
3374 self.commit_timestamp.as_mut().map(|field| field as _)
3375 }
3376 pub fn commit_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
3379 self.commit_timestamp.get_or_insert_default()
3380 }
3381 pub fn commit_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
3383 self.commit_timestamp.as_ref().map(|field| field as _)
3384 }
3385 pub fn set_commit_timestamp<T: Into<::prost_types::Timestamp>>(
3387 &mut self,
3388 field: T,
3389 ) {
3390 self.commit_timestamp = Some(field.into().into());
3391 }
3392 pub fn with_commit_timestamp<T: Into<::prost_types::Timestamp>>(
3394 mut self,
3395 field: T,
3396 ) -> Self {
3397 self.set_commit_timestamp(field.into());
3398 self
3399 }
3400 pub fn consensus_commit_digest_opt_mut(&mut self) -> Option<&mut String> {
3402 self.consensus_commit_digest.as_mut().map(|field| field as _)
3403 }
3404 pub fn consensus_commit_digest_mut(&mut self) -> &mut String {
3407 self.consensus_commit_digest.get_or_insert_default()
3408 }
3409 pub fn consensus_commit_digest_opt(&self) -> Option<&str> {
3411 self.consensus_commit_digest.as_ref().map(|field| field as _)
3412 }
3413 pub fn set_consensus_commit_digest<T: Into<String>>(&mut self, field: T) {
3415 self.consensus_commit_digest = Some(field.into().into());
3416 }
3417 pub fn with_consensus_commit_digest<T: Into<String>>(
3419 mut self,
3420 field: T,
3421 ) -> Self {
3422 self.set_consensus_commit_digest(field.into());
3423 self
3424 }
3425 pub fn sub_dag_index_opt_mut(&mut self) -> Option<&mut u64> {
3427 self.sub_dag_index.as_mut().map(|field| field as _)
3428 }
3429 pub fn sub_dag_index_mut(&mut self) -> &mut u64 {
3432 self.sub_dag_index.get_or_insert_default()
3433 }
3434 pub fn sub_dag_index_opt(&self) -> Option<u64> {
3436 self.sub_dag_index.as_ref().map(|field| *field)
3437 }
3438 pub fn set_sub_dag_index(&mut self, field: u64) {
3440 self.sub_dag_index = Some(field);
3441 }
3442 pub fn with_sub_dag_index(mut self, field: u64) -> Self {
3444 self.set_sub_dag_index(field);
3445 self
3446 }
3447 pub fn consensus_determined_version_assignments(
3449 &self,
3450 ) -> &super::ConsensusDeterminedVersionAssignments {
3451 self.consensus_determined_version_assignments
3452 .as_ref()
3453 .map(|field| field as _)
3454 .unwrap_or_else(|| {
3455 super::ConsensusDeterminedVersionAssignments::default_instance() as _
3456 })
3457 }
3458 pub fn consensus_determined_version_assignments_opt_mut(
3460 &mut self,
3461 ) -> Option<&mut super::ConsensusDeterminedVersionAssignments> {
3462 self.consensus_determined_version_assignments
3463 .as_mut()
3464 .map(|field| field as _)
3465 }
3466 pub fn consensus_determined_version_assignments_mut(
3469 &mut self,
3470 ) -> &mut super::ConsensusDeterminedVersionAssignments {
3471 self.consensus_determined_version_assignments.get_or_insert_default()
3472 }
3473 pub fn consensus_determined_version_assignments_opt(
3475 &self,
3476 ) -> Option<&super::ConsensusDeterminedVersionAssignments> {
3477 self.consensus_determined_version_assignments
3478 .as_ref()
3479 .map(|field| field as _)
3480 }
3481 pub fn set_consensus_determined_version_assignments<
3483 T: Into<super::ConsensusDeterminedVersionAssignments>,
3484 >(&mut self, field: T) {
3485 self.consensus_determined_version_assignments = Some(field.into().into());
3486 }
3487 pub fn with_consensus_determined_version_assignments<
3489 T: Into<super::ConsensusDeterminedVersionAssignments>,
3490 >(mut self, field: T) -> Self {
3491 self.set_consensus_determined_version_assignments(field.into());
3492 self
3493 }
3494 pub fn additional_state_digest_opt_mut(&mut self) -> Option<&mut String> {
3496 self.additional_state_digest.as_mut().map(|field| field as _)
3497 }
3498 pub fn additional_state_digest_mut(&mut self) -> &mut String {
3501 self.additional_state_digest.get_or_insert_default()
3502 }
3503 pub fn additional_state_digest_opt(&self) -> Option<&str> {
3505 self.additional_state_digest.as_ref().map(|field| field as _)
3506 }
3507 pub fn set_additional_state_digest<T: Into<String>>(&mut self, field: T) {
3509 self.additional_state_digest = Some(field.into().into());
3510 }
3511 pub fn with_additional_state_digest<T: Into<String>>(
3513 mut self,
3514 field: T,
3515 ) -> Self {
3516 self.set_additional_state_digest(field.into());
3517 self
3518 }
3519 }
3520 impl super::ConsensusDeterminedVersionAssignments {
3521 pub const fn const_default() -> Self {
3522 Self {
3523 version: None,
3524 canceled_transactions: Vec::new(),
3525 }
3526 }
3527 #[doc(hidden)]
3528 pub fn default_instance() -> &'static Self {
3529 static DEFAULT: super::ConsensusDeterminedVersionAssignments = super::ConsensusDeterminedVersionAssignments::const_default();
3530 &DEFAULT
3531 }
3532 pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
3534 self.version.as_mut().map(|field| field as _)
3535 }
3536 pub fn version_mut(&mut self) -> &mut i32 {
3539 self.version.get_or_insert_default()
3540 }
3541 pub fn version_opt(&self) -> Option<i32> {
3543 self.version.as_ref().map(|field| *field)
3544 }
3545 pub fn set_version(&mut self, field: i32) {
3547 self.version = Some(field);
3548 }
3549 pub fn with_version(mut self, field: i32) -> Self {
3551 self.set_version(field);
3552 self
3553 }
3554 pub fn canceled_transactions(&self) -> &[super::CanceledTransaction] {
3556 &self.canceled_transactions
3557 }
3558 pub fn canceled_transactions_mut(
3561 &mut self,
3562 ) -> &mut Vec<super::CanceledTransaction> {
3563 &mut self.canceled_transactions
3564 }
3565 pub fn set_canceled_transactions(
3567 &mut self,
3568 field: Vec<super::CanceledTransaction>,
3569 ) {
3570 self.canceled_transactions = field;
3571 }
3572 pub fn with_canceled_transactions(
3574 mut self,
3575 field: Vec<super::CanceledTransaction>,
3576 ) -> Self {
3577 self.set_canceled_transactions(field);
3578 self
3579 }
3580 }
3581 impl super::DatatypeDescriptor {
3582 pub const fn const_default() -> Self {
3583 Self {
3584 type_name: None,
3585 defining_id: None,
3586 module: None,
3587 name: None,
3588 abilities: Vec::new(),
3589 type_parameters: Vec::new(),
3590 kind: None,
3591 fields: Vec::new(),
3592 variants: Vec::new(),
3593 }
3594 }
3595 #[doc(hidden)]
3596 pub fn default_instance() -> &'static Self {
3597 static DEFAULT: super::DatatypeDescriptor = super::DatatypeDescriptor::const_default();
3598 &DEFAULT
3599 }
3600 pub fn type_name_opt_mut(&mut self) -> Option<&mut String> {
3602 self.type_name.as_mut().map(|field| field as _)
3603 }
3604 pub fn type_name_mut(&mut self) -> &mut String {
3607 self.type_name.get_or_insert_default()
3608 }
3609 pub fn type_name_opt(&self) -> Option<&str> {
3611 self.type_name.as_ref().map(|field| field as _)
3612 }
3613 pub fn set_type_name<T: Into<String>>(&mut self, field: T) {
3615 self.type_name = Some(field.into().into());
3616 }
3617 pub fn with_type_name<T: Into<String>>(mut self, field: T) -> Self {
3619 self.set_type_name(field.into());
3620 self
3621 }
3622 pub fn defining_id_opt_mut(&mut self) -> Option<&mut String> {
3624 self.defining_id.as_mut().map(|field| field as _)
3625 }
3626 pub fn defining_id_mut(&mut self) -> &mut String {
3629 self.defining_id.get_or_insert_default()
3630 }
3631 pub fn defining_id_opt(&self) -> Option<&str> {
3633 self.defining_id.as_ref().map(|field| field as _)
3634 }
3635 pub fn set_defining_id<T: Into<String>>(&mut self, field: T) {
3637 self.defining_id = Some(field.into().into());
3638 }
3639 pub fn with_defining_id<T: Into<String>>(mut self, field: T) -> Self {
3641 self.set_defining_id(field.into());
3642 self
3643 }
3644 pub fn module_opt_mut(&mut self) -> Option<&mut String> {
3646 self.module.as_mut().map(|field| field as _)
3647 }
3648 pub fn module_mut(&mut self) -> &mut String {
3651 self.module.get_or_insert_default()
3652 }
3653 pub fn module_opt(&self) -> Option<&str> {
3655 self.module.as_ref().map(|field| field as _)
3656 }
3657 pub fn set_module<T: Into<String>>(&mut self, field: T) {
3659 self.module = Some(field.into().into());
3660 }
3661 pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
3663 self.set_module(field.into());
3664 self
3665 }
3666 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
3668 self.name.as_mut().map(|field| field as _)
3669 }
3670 pub fn name_mut(&mut self) -> &mut String {
3673 self.name.get_or_insert_default()
3674 }
3675 pub fn name_opt(&self) -> Option<&str> {
3677 self.name.as_ref().map(|field| field as _)
3678 }
3679 pub fn set_name<T: Into<String>>(&mut self, field: T) {
3681 self.name = Some(field.into().into());
3682 }
3683 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
3685 self.set_name(field.into());
3686 self
3687 }
3688 pub fn type_parameters(&self) -> &[super::TypeParameter] {
3690 &self.type_parameters
3691 }
3692 pub fn type_parameters_mut(&mut self) -> &mut Vec<super::TypeParameter> {
3695 &mut self.type_parameters
3696 }
3697 pub fn set_type_parameters(&mut self, field: Vec<super::TypeParameter>) {
3699 self.type_parameters = field;
3700 }
3701 pub fn with_type_parameters(mut self, field: Vec<super::TypeParameter>) -> Self {
3703 self.set_type_parameters(field);
3704 self
3705 }
3706 pub fn with_kind<T: Into<super::datatype_descriptor::DatatypeKind>>(
3708 mut self,
3709 field: T,
3710 ) -> Self {
3711 self.set_kind(field.into());
3712 self
3713 }
3714 pub fn fields(&self) -> &[super::FieldDescriptor] {
3716 &self.fields
3717 }
3718 pub fn fields_mut(&mut self) -> &mut Vec<super::FieldDescriptor> {
3721 &mut self.fields
3722 }
3723 pub fn set_fields(&mut self, field: Vec<super::FieldDescriptor>) {
3725 self.fields = field;
3726 }
3727 pub fn with_fields(mut self, field: Vec<super::FieldDescriptor>) -> Self {
3729 self.set_fields(field);
3730 self
3731 }
3732 pub fn variants(&self) -> &[super::VariantDescriptor] {
3734 &self.variants
3735 }
3736 pub fn variants_mut(&mut self) -> &mut Vec<super::VariantDescriptor> {
3739 &mut self.variants
3740 }
3741 pub fn set_variants(&mut self, field: Vec<super::VariantDescriptor>) {
3743 self.variants = field;
3744 }
3745 pub fn with_variants(mut self, field: Vec<super::VariantDescriptor>) -> Self {
3747 self.set_variants(field);
3748 self
3749 }
3750 }
3751 impl super::DynamicField {
3752 pub const fn const_default() -> Self {
3753 Self {
3754 kind: None,
3755 parent: None,
3756 field_id: None,
3757 field_object: None,
3758 name: None,
3759 value: None,
3760 value_type: None,
3761 child_id: None,
3762 child_object: None,
3763 }
3764 }
3765 #[doc(hidden)]
3766 pub fn default_instance() -> &'static Self {
3767 static DEFAULT: super::DynamicField = super::DynamicField::const_default();
3768 &DEFAULT
3769 }
3770 pub fn with_kind<T: Into<super::dynamic_field::DynamicFieldKind>>(
3772 mut self,
3773 field: T,
3774 ) -> Self {
3775 self.set_kind(field.into());
3776 self
3777 }
3778 pub fn parent_opt_mut(&mut self) -> Option<&mut String> {
3780 self.parent.as_mut().map(|field| field as _)
3781 }
3782 pub fn parent_mut(&mut self) -> &mut String {
3785 self.parent.get_or_insert_default()
3786 }
3787 pub fn parent_opt(&self) -> Option<&str> {
3789 self.parent.as_ref().map(|field| field as _)
3790 }
3791 pub fn set_parent<T: Into<String>>(&mut self, field: T) {
3793 self.parent = Some(field.into().into());
3794 }
3795 pub fn with_parent<T: Into<String>>(mut self, field: T) -> Self {
3797 self.set_parent(field.into());
3798 self
3799 }
3800 pub fn field_id_opt_mut(&mut self) -> Option<&mut String> {
3802 self.field_id.as_mut().map(|field| field as _)
3803 }
3804 pub fn field_id_mut(&mut self) -> &mut String {
3807 self.field_id.get_or_insert_default()
3808 }
3809 pub fn field_id_opt(&self) -> Option<&str> {
3811 self.field_id.as_ref().map(|field| field as _)
3812 }
3813 pub fn set_field_id<T: Into<String>>(&mut self, field: T) {
3815 self.field_id = Some(field.into().into());
3816 }
3817 pub fn with_field_id<T: Into<String>>(mut self, field: T) -> Self {
3819 self.set_field_id(field.into());
3820 self
3821 }
3822 pub fn field_object(&self) -> &super::Object {
3824 self.field_object
3825 .as_ref()
3826 .map(|field| field as _)
3827 .unwrap_or_else(|| super::Object::default_instance() as _)
3828 }
3829 pub fn field_object_opt_mut(&mut self) -> Option<&mut super::Object> {
3831 self.field_object.as_mut().map(|field| field as _)
3832 }
3833 pub fn field_object_mut(&mut self) -> &mut super::Object {
3836 self.field_object.get_or_insert_default()
3837 }
3838 pub fn field_object_opt(&self) -> Option<&super::Object> {
3840 self.field_object.as_ref().map(|field| field as _)
3841 }
3842 pub fn set_field_object<T: Into<super::Object>>(&mut self, field: T) {
3844 self.field_object = Some(field.into().into());
3845 }
3846 pub fn with_field_object<T: Into<super::Object>>(mut self, field: T) -> Self {
3848 self.set_field_object(field.into());
3849 self
3850 }
3851 pub fn name(&self) -> &super::Bcs {
3853 self.name
3854 .as_ref()
3855 .map(|field| field as _)
3856 .unwrap_or_else(|| super::Bcs::default_instance() as _)
3857 }
3858 pub fn name_opt_mut(&mut self) -> Option<&mut super::Bcs> {
3860 self.name.as_mut().map(|field| field as _)
3861 }
3862 pub fn name_mut(&mut self) -> &mut super::Bcs {
3865 self.name.get_or_insert_default()
3866 }
3867 pub fn name_opt(&self) -> Option<&super::Bcs> {
3869 self.name.as_ref().map(|field| field as _)
3870 }
3871 pub fn set_name<T: Into<super::Bcs>>(&mut self, field: T) {
3873 self.name = Some(field.into().into());
3874 }
3875 pub fn with_name<T: Into<super::Bcs>>(mut self, field: T) -> Self {
3877 self.set_name(field.into());
3878 self
3879 }
3880 pub fn value(&self) -> &super::Bcs {
3882 self.value
3883 .as_ref()
3884 .map(|field| field as _)
3885 .unwrap_or_else(|| super::Bcs::default_instance() as _)
3886 }
3887 pub fn value_opt_mut(&mut self) -> Option<&mut super::Bcs> {
3889 self.value.as_mut().map(|field| field as _)
3890 }
3891 pub fn value_mut(&mut self) -> &mut super::Bcs {
3894 self.value.get_or_insert_default()
3895 }
3896 pub fn value_opt(&self) -> Option<&super::Bcs> {
3898 self.value.as_ref().map(|field| field as _)
3899 }
3900 pub fn set_value<T: Into<super::Bcs>>(&mut self, field: T) {
3902 self.value = Some(field.into().into());
3903 }
3904 pub fn with_value<T: Into<super::Bcs>>(mut self, field: T) -> Self {
3906 self.set_value(field.into());
3907 self
3908 }
3909 pub fn value_type_opt_mut(&mut self) -> Option<&mut String> {
3911 self.value_type.as_mut().map(|field| field as _)
3912 }
3913 pub fn value_type_mut(&mut self) -> &mut String {
3916 self.value_type.get_or_insert_default()
3917 }
3918 pub fn value_type_opt(&self) -> Option<&str> {
3920 self.value_type.as_ref().map(|field| field as _)
3921 }
3922 pub fn set_value_type<T: Into<String>>(&mut self, field: T) {
3924 self.value_type = Some(field.into().into());
3925 }
3926 pub fn with_value_type<T: Into<String>>(mut self, field: T) -> Self {
3928 self.set_value_type(field.into());
3929 self
3930 }
3931 pub fn child_id_opt_mut(&mut self) -> Option<&mut String> {
3933 self.child_id.as_mut().map(|field| field as _)
3934 }
3935 pub fn child_id_mut(&mut self) -> &mut String {
3938 self.child_id.get_or_insert_default()
3939 }
3940 pub fn child_id_opt(&self) -> Option<&str> {
3942 self.child_id.as_ref().map(|field| field as _)
3943 }
3944 pub fn set_child_id<T: Into<String>>(&mut self, field: T) {
3946 self.child_id = Some(field.into().into());
3947 }
3948 pub fn with_child_id<T: Into<String>>(mut self, field: T) -> Self {
3950 self.set_child_id(field.into());
3951 self
3952 }
3953 pub fn child_object(&self) -> &super::Object {
3955 self.child_object
3956 .as_ref()
3957 .map(|field| field as _)
3958 .unwrap_or_else(|| super::Object::default_instance() as _)
3959 }
3960 pub fn child_object_opt_mut(&mut self) -> Option<&mut super::Object> {
3962 self.child_object.as_mut().map(|field| field as _)
3963 }
3964 pub fn child_object_mut(&mut self) -> &mut super::Object {
3967 self.child_object.get_or_insert_default()
3968 }
3969 pub fn child_object_opt(&self) -> Option<&super::Object> {
3971 self.child_object.as_ref().map(|field| field as _)
3972 }
3973 pub fn set_child_object<T: Into<super::Object>>(&mut self, field: T) {
3975 self.child_object = Some(field.into().into());
3976 }
3977 pub fn with_child_object<T: Into<super::Object>>(mut self, field: T) -> Self {
3979 self.set_child_object(field.into());
3980 self
3981 }
3982 }
3983 impl super::EndOfEpochData {
3984 pub const fn const_default() -> Self {
3985 Self {
3986 next_epoch_committee: Vec::new(),
3987 next_epoch_protocol_version: None,
3988 epoch_commitments: Vec::new(),
3989 }
3990 }
3991 #[doc(hidden)]
3992 pub fn default_instance() -> &'static Self {
3993 static DEFAULT: super::EndOfEpochData = super::EndOfEpochData::const_default();
3994 &DEFAULT
3995 }
3996 pub fn next_epoch_committee(&self) -> &[super::ValidatorCommitteeMember] {
3998 &self.next_epoch_committee
3999 }
4000 pub fn next_epoch_committee_mut(
4003 &mut self,
4004 ) -> &mut Vec<super::ValidatorCommitteeMember> {
4005 &mut self.next_epoch_committee
4006 }
4007 pub fn set_next_epoch_committee(
4009 &mut self,
4010 field: Vec<super::ValidatorCommitteeMember>,
4011 ) {
4012 self.next_epoch_committee = field;
4013 }
4014 pub fn with_next_epoch_committee(
4016 mut self,
4017 field: Vec<super::ValidatorCommitteeMember>,
4018 ) -> Self {
4019 self.set_next_epoch_committee(field);
4020 self
4021 }
4022 pub fn next_epoch_protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
4024 self.next_epoch_protocol_version.as_mut().map(|field| field as _)
4025 }
4026 pub fn next_epoch_protocol_version_mut(&mut self) -> &mut u64 {
4029 self.next_epoch_protocol_version.get_or_insert_default()
4030 }
4031 pub fn next_epoch_protocol_version_opt(&self) -> Option<u64> {
4033 self.next_epoch_protocol_version.as_ref().map(|field| *field)
4034 }
4035 pub fn set_next_epoch_protocol_version(&mut self, field: u64) {
4037 self.next_epoch_protocol_version = Some(field);
4038 }
4039 pub fn with_next_epoch_protocol_version(mut self, field: u64) -> Self {
4041 self.set_next_epoch_protocol_version(field);
4042 self
4043 }
4044 pub fn epoch_commitments(&self) -> &[super::CheckpointCommitment] {
4046 &self.epoch_commitments
4047 }
4048 pub fn epoch_commitments_mut(
4051 &mut self,
4052 ) -> &mut Vec<super::CheckpointCommitment> {
4053 &mut self.epoch_commitments
4054 }
4055 pub fn set_epoch_commitments(
4057 &mut self,
4058 field: Vec<super::CheckpointCommitment>,
4059 ) {
4060 self.epoch_commitments = field;
4061 }
4062 pub fn with_epoch_commitments(
4064 mut self,
4065 field: Vec<super::CheckpointCommitment>,
4066 ) -> Self {
4067 self.set_epoch_commitments(field);
4068 self
4069 }
4070 }
4071 impl super::EndOfEpochTransaction {
4072 pub const fn const_default() -> Self {
4073 Self { transactions: Vec::new() }
4074 }
4075 #[doc(hidden)]
4076 pub fn default_instance() -> &'static Self {
4077 static DEFAULT: super::EndOfEpochTransaction = super::EndOfEpochTransaction::const_default();
4078 &DEFAULT
4079 }
4080 pub fn transactions(&self) -> &[super::EndOfEpochTransactionKind] {
4082 &self.transactions
4083 }
4084 pub fn transactions_mut(
4087 &mut self,
4088 ) -> &mut Vec<super::EndOfEpochTransactionKind> {
4089 &mut self.transactions
4090 }
4091 pub fn set_transactions(
4093 &mut self,
4094 field: Vec<super::EndOfEpochTransactionKind>,
4095 ) {
4096 self.transactions = field;
4097 }
4098 pub fn with_transactions(
4100 mut self,
4101 field: Vec<super::EndOfEpochTransactionKind>,
4102 ) -> Self {
4103 self.set_transactions(field);
4104 self
4105 }
4106 }
4107 impl super::EndOfEpochTransactionKind {
4108 pub const fn const_default() -> Self {
4109 Self { kind: None, data: None }
4110 }
4111 #[doc(hidden)]
4112 pub fn default_instance() -> &'static Self {
4113 static DEFAULT: super::EndOfEpochTransactionKind = super::EndOfEpochTransactionKind::const_default();
4114 &DEFAULT
4115 }
4116 pub fn with_kind<T: Into<super::end_of_epoch_transaction_kind::Kind>>(
4118 mut self,
4119 field: T,
4120 ) -> Self {
4121 self.set_kind(field.into());
4122 self
4123 }
4124 pub fn change_epoch(&self) -> &super::ChangeEpoch {
4126 if let Some(
4127 super::end_of_epoch_transaction_kind::Data::ChangeEpoch(field),
4128 ) = &self.data
4129 {
4130 field as _
4131 } else {
4132 super::ChangeEpoch::default_instance() as _
4133 }
4134 }
4135 pub fn change_epoch_opt(&self) -> Option<&super::ChangeEpoch> {
4137 if let Some(
4138 super::end_of_epoch_transaction_kind::Data::ChangeEpoch(field),
4139 ) = &self.data
4140 {
4141 Some(field as _)
4142 } else {
4143 None
4144 }
4145 }
4146 pub fn change_epoch_opt_mut(&mut self) -> Option<&mut super::ChangeEpoch> {
4148 if let Some(
4149 super::end_of_epoch_transaction_kind::Data::ChangeEpoch(field),
4150 ) = &mut self.data
4151 {
4152 Some(field as _)
4153 } else {
4154 None
4155 }
4156 }
4157 pub fn change_epoch_mut(&mut self) -> &mut super::ChangeEpoch {
4161 if self.change_epoch_opt_mut().is_none() {
4162 self.data = Some(
4163 super::end_of_epoch_transaction_kind::Data::ChangeEpoch(
4164 super::ChangeEpoch::default(),
4165 ),
4166 );
4167 }
4168 self.change_epoch_opt_mut().unwrap()
4169 }
4170 pub fn set_change_epoch<T: Into<super::ChangeEpoch>>(&mut self, field: T) {
4173 self.data = Some(
4174 super::end_of_epoch_transaction_kind::Data::ChangeEpoch(
4175 field.into().into(),
4176 ),
4177 );
4178 }
4179 pub fn with_change_epoch<T: Into<super::ChangeEpoch>>(
4182 mut self,
4183 field: T,
4184 ) -> Self {
4185 self.set_change_epoch(field.into());
4186 self
4187 }
4188 pub fn authenticator_state_expire(&self) -> &super::AuthenticatorStateExpire {
4190 if let Some(
4191 super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4192 field,
4193 ),
4194 ) = &self.data
4195 {
4196 field as _
4197 } else {
4198 super::AuthenticatorStateExpire::default_instance() as _
4199 }
4200 }
4201 pub fn authenticator_state_expire_opt(
4203 &self,
4204 ) -> Option<&super::AuthenticatorStateExpire> {
4205 if let Some(
4206 super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4207 field,
4208 ),
4209 ) = &self.data
4210 {
4211 Some(field as _)
4212 } else {
4213 None
4214 }
4215 }
4216 pub fn authenticator_state_expire_opt_mut(
4218 &mut self,
4219 ) -> Option<&mut super::AuthenticatorStateExpire> {
4220 if let Some(
4221 super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4222 field,
4223 ),
4224 ) = &mut self.data
4225 {
4226 Some(field as _)
4227 } else {
4228 None
4229 }
4230 }
4231 pub fn authenticator_state_expire_mut(
4235 &mut self,
4236 ) -> &mut super::AuthenticatorStateExpire {
4237 if self.authenticator_state_expire_opt_mut().is_none() {
4238 self.data = Some(
4239 super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4240 super::AuthenticatorStateExpire::default(),
4241 ),
4242 );
4243 }
4244 self.authenticator_state_expire_opt_mut().unwrap()
4245 }
4246 pub fn set_authenticator_state_expire<T: Into<super::AuthenticatorStateExpire>>(
4249 &mut self,
4250 field: T,
4251 ) {
4252 self.data = Some(
4253 super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4254 field.into().into(),
4255 ),
4256 );
4257 }
4258 pub fn with_authenticator_state_expire<T: Into<super::AuthenticatorStateExpire>>(
4261 mut self,
4262 field: T,
4263 ) -> Self {
4264 self.set_authenticator_state_expire(field.into());
4265 self
4266 }
4267 pub fn execution_time_observations(&self) -> &super::ExecutionTimeObservations {
4269 if let Some(
4270 super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4271 field,
4272 ),
4273 ) = &self.data
4274 {
4275 field as _
4276 } else {
4277 super::ExecutionTimeObservations::default_instance() as _
4278 }
4279 }
4280 pub fn execution_time_observations_opt(
4282 &self,
4283 ) -> Option<&super::ExecutionTimeObservations> {
4284 if let Some(
4285 super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4286 field,
4287 ),
4288 ) = &self.data
4289 {
4290 Some(field as _)
4291 } else {
4292 None
4293 }
4294 }
4295 pub fn execution_time_observations_opt_mut(
4297 &mut self,
4298 ) -> Option<&mut super::ExecutionTimeObservations> {
4299 if let Some(
4300 super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4301 field,
4302 ),
4303 ) = &mut self.data
4304 {
4305 Some(field as _)
4306 } else {
4307 None
4308 }
4309 }
4310 pub fn execution_time_observations_mut(
4314 &mut self,
4315 ) -> &mut super::ExecutionTimeObservations {
4316 if self.execution_time_observations_opt_mut().is_none() {
4317 self.data = Some(
4318 super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4319 super::ExecutionTimeObservations::default(),
4320 ),
4321 );
4322 }
4323 self.execution_time_observations_opt_mut().unwrap()
4324 }
4325 pub fn set_execution_time_observations<
4328 T: Into<super::ExecutionTimeObservations>,
4329 >(&mut self, field: T) {
4330 self.data = Some(
4331 super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4332 field.into().into(),
4333 ),
4334 );
4335 }
4336 pub fn with_execution_time_observations<
4339 T: Into<super::ExecutionTimeObservations>,
4340 >(mut self, field: T) -> Self {
4341 self.set_execution_time_observations(field.into());
4342 self
4343 }
4344 pub fn bridge_chain_id(&self) -> &str {
4346 if let Some(
4347 super::end_of_epoch_transaction_kind::Data::BridgeChainId(field),
4348 ) = &self.data
4349 {
4350 field as _
4351 } else {
4352 ""
4353 }
4354 }
4355 pub fn bridge_chain_id_opt(&self) -> Option<&str> {
4357 if let Some(
4358 super::end_of_epoch_transaction_kind::Data::BridgeChainId(field),
4359 ) = &self.data
4360 {
4361 Some(field as _)
4362 } else {
4363 None
4364 }
4365 }
4366 pub fn bridge_chain_id_opt_mut(&mut self) -> Option<&mut String> {
4368 if let Some(
4369 super::end_of_epoch_transaction_kind::Data::BridgeChainId(field),
4370 ) = &mut self.data
4371 {
4372 Some(field as _)
4373 } else {
4374 None
4375 }
4376 }
4377 pub fn bridge_chain_id_mut(&mut self) -> &mut String {
4381 if self.bridge_chain_id_opt_mut().is_none() {
4382 self.data = Some(
4383 super::end_of_epoch_transaction_kind::Data::BridgeChainId(
4384 String::default(),
4385 ),
4386 );
4387 }
4388 self.bridge_chain_id_opt_mut().unwrap()
4389 }
4390 pub fn set_bridge_chain_id<T: Into<String>>(&mut self, field: T) {
4393 self.data = Some(
4394 super::end_of_epoch_transaction_kind::Data::BridgeChainId(
4395 field.into().into(),
4396 ),
4397 );
4398 }
4399 pub fn with_bridge_chain_id<T: Into<String>>(mut self, field: T) -> Self {
4402 self.set_bridge_chain_id(field.into());
4403 self
4404 }
4405 pub fn bridge_object_version(&self) -> u64 {
4407 if let Some(
4408 super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4409 ) = &self.data
4410 {
4411 *field
4412 } else {
4413 0u64
4414 }
4415 }
4416 pub fn bridge_object_version_opt(&self) -> Option<u64> {
4418 if let Some(
4419 super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4420 ) = &self.data
4421 {
4422 Some(*field)
4423 } else {
4424 None
4425 }
4426 }
4427 pub fn bridge_object_version_opt_mut(&mut self) -> Option<&mut u64> {
4429 if let Some(
4430 super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4431 ) = &mut self.data
4432 {
4433 Some(field as _)
4434 } else {
4435 None
4436 }
4437 }
4438 pub fn bridge_object_version_mut(&mut self) -> &mut u64 {
4442 if self.bridge_object_version_opt_mut().is_none() {
4443 self.data = Some(
4444 super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(
4445 u64::default(),
4446 ),
4447 );
4448 }
4449 self.bridge_object_version_opt_mut().unwrap()
4450 }
4451 pub fn set_bridge_object_version(&mut self, field: u64) {
4454 self.data = Some(
4455 super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4456 );
4457 }
4458 pub fn with_bridge_object_version(mut self, field: u64) -> Self {
4461 self.set_bridge_object_version(field);
4462 self
4463 }
4464 }
4465 impl super::Epoch {
4466 pub const fn const_default() -> Self {
4467 Self {
4468 epoch: None,
4469 committee: None,
4470 system_state: None,
4471 first_checkpoint: None,
4472 last_checkpoint: None,
4473 start: None,
4474 end: None,
4475 reference_gas_price: None,
4476 protocol_config: None,
4477 }
4478 }
4479 #[doc(hidden)]
4480 pub fn default_instance() -> &'static Self {
4481 static DEFAULT: super::Epoch = super::Epoch::const_default();
4482 &DEFAULT
4483 }
4484 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
4486 self.epoch.as_mut().map(|field| field as _)
4487 }
4488 pub fn epoch_mut(&mut self) -> &mut u64 {
4491 self.epoch.get_or_insert_default()
4492 }
4493 pub fn epoch_opt(&self) -> Option<u64> {
4495 self.epoch.as_ref().map(|field| *field)
4496 }
4497 pub fn set_epoch(&mut self, field: u64) {
4499 self.epoch = Some(field);
4500 }
4501 pub fn with_epoch(mut self, field: u64) -> Self {
4503 self.set_epoch(field);
4504 self
4505 }
4506 pub fn committee(&self) -> &super::ValidatorCommittee {
4508 self.committee
4509 .as_ref()
4510 .map(|field| field as _)
4511 .unwrap_or_else(|| super::ValidatorCommittee::default_instance() as _)
4512 }
4513 pub fn committee_opt_mut(&mut self) -> Option<&mut super::ValidatorCommittee> {
4515 self.committee.as_mut().map(|field| field as _)
4516 }
4517 pub fn committee_mut(&mut self) -> &mut super::ValidatorCommittee {
4520 self.committee.get_or_insert_default()
4521 }
4522 pub fn committee_opt(&self) -> Option<&super::ValidatorCommittee> {
4524 self.committee.as_ref().map(|field| field as _)
4525 }
4526 pub fn set_committee<T: Into<super::ValidatorCommittee>>(&mut self, field: T) {
4528 self.committee = Some(field.into().into());
4529 }
4530 pub fn with_committee<T: Into<super::ValidatorCommittee>>(
4532 mut self,
4533 field: T,
4534 ) -> Self {
4535 self.set_committee(field.into());
4536 self
4537 }
4538 pub fn system_state(&self) -> &super::SystemState {
4540 self.system_state
4541 .as_ref()
4542 .map(|field| field as _)
4543 .unwrap_or_else(|| super::SystemState::default_instance() as _)
4544 }
4545 pub fn system_state_opt_mut(&mut self) -> Option<&mut super::SystemState> {
4547 self.system_state.as_mut().map(|field| field as _)
4548 }
4549 pub fn system_state_mut(&mut self) -> &mut super::SystemState {
4552 self.system_state.get_or_insert_default()
4553 }
4554 pub fn system_state_opt(&self) -> Option<&super::SystemState> {
4556 self.system_state.as_ref().map(|field| field as _)
4557 }
4558 pub fn set_system_state<T: Into<super::SystemState>>(&mut self, field: T) {
4560 self.system_state = Some(field.into().into());
4561 }
4562 pub fn with_system_state<T: Into<super::SystemState>>(
4564 mut self,
4565 field: T,
4566 ) -> Self {
4567 self.set_system_state(field.into());
4568 self
4569 }
4570 pub fn first_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
4572 self.first_checkpoint.as_mut().map(|field| field as _)
4573 }
4574 pub fn first_checkpoint_mut(&mut self) -> &mut u64 {
4577 self.first_checkpoint.get_or_insert_default()
4578 }
4579 pub fn first_checkpoint_opt(&self) -> Option<u64> {
4581 self.first_checkpoint.as_ref().map(|field| *field)
4582 }
4583 pub fn set_first_checkpoint(&mut self, field: u64) {
4585 self.first_checkpoint = Some(field);
4586 }
4587 pub fn with_first_checkpoint(mut self, field: u64) -> Self {
4589 self.set_first_checkpoint(field);
4590 self
4591 }
4592 pub fn last_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
4594 self.last_checkpoint.as_mut().map(|field| field as _)
4595 }
4596 pub fn last_checkpoint_mut(&mut self) -> &mut u64 {
4599 self.last_checkpoint.get_or_insert_default()
4600 }
4601 pub fn last_checkpoint_opt(&self) -> Option<u64> {
4603 self.last_checkpoint.as_ref().map(|field| *field)
4604 }
4605 pub fn set_last_checkpoint(&mut self, field: u64) {
4607 self.last_checkpoint = Some(field);
4608 }
4609 pub fn with_last_checkpoint(mut self, field: u64) -> Self {
4611 self.set_last_checkpoint(field);
4612 self
4613 }
4614 pub fn start_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
4616 self.start.as_mut().map(|field| field as _)
4617 }
4618 pub fn start_mut(&mut self) -> &mut ::prost_types::Timestamp {
4621 self.start.get_or_insert_default()
4622 }
4623 pub fn start_opt(&self) -> Option<&::prost_types::Timestamp> {
4625 self.start.as_ref().map(|field| field as _)
4626 }
4627 pub fn set_start<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
4629 self.start = Some(field.into().into());
4630 }
4631 pub fn with_start<T: Into<::prost_types::Timestamp>>(
4633 mut self,
4634 field: T,
4635 ) -> Self {
4636 self.set_start(field.into());
4637 self
4638 }
4639 pub fn end_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
4641 self.end.as_mut().map(|field| field as _)
4642 }
4643 pub fn end_mut(&mut self) -> &mut ::prost_types::Timestamp {
4646 self.end.get_or_insert_default()
4647 }
4648 pub fn end_opt(&self) -> Option<&::prost_types::Timestamp> {
4650 self.end.as_ref().map(|field| field as _)
4651 }
4652 pub fn set_end<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
4654 self.end = Some(field.into().into());
4655 }
4656 pub fn with_end<T: Into<::prost_types::Timestamp>>(mut self, field: T) -> Self {
4658 self.set_end(field.into());
4659 self
4660 }
4661 pub fn reference_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
4663 self.reference_gas_price.as_mut().map(|field| field as _)
4664 }
4665 pub fn reference_gas_price_mut(&mut self) -> &mut u64 {
4668 self.reference_gas_price.get_or_insert_default()
4669 }
4670 pub fn reference_gas_price_opt(&self) -> Option<u64> {
4672 self.reference_gas_price.as_ref().map(|field| *field)
4673 }
4674 pub fn set_reference_gas_price(&mut self, field: u64) {
4676 self.reference_gas_price = Some(field);
4677 }
4678 pub fn with_reference_gas_price(mut self, field: u64) -> Self {
4680 self.set_reference_gas_price(field);
4681 self
4682 }
4683 pub fn protocol_config(&self) -> &super::ProtocolConfig {
4685 self.protocol_config
4686 .as_ref()
4687 .map(|field| field as _)
4688 .unwrap_or_else(|| super::ProtocolConfig::default_instance() as _)
4689 }
4690 pub fn protocol_config_opt_mut(&mut self) -> Option<&mut super::ProtocolConfig> {
4692 self.protocol_config.as_mut().map(|field| field as _)
4693 }
4694 pub fn protocol_config_mut(&mut self) -> &mut super::ProtocolConfig {
4697 self.protocol_config.get_or_insert_default()
4698 }
4699 pub fn protocol_config_opt(&self) -> Option<&super::ProtocolConfig> {
4701 self.protocol_config.as_ref().map(|field| field as _)
4702 }
4703 pub fn set_protocol_config<T: Into<super::ProtocolConfig>>(&mut self, field: T) {
4705 self.protocol_config = Some(field.into().into());
4706 }
4707 pub fn with_protocol_config<T: Into<super::ProtocolConfig>>(
4709 mut self,
4710 field: T,
4711 ) -> Self {
4712 self.set_protocol_config(field.into());
4713 self
4714 }
4715 }
4716 impl super::Event {
4717 pub const fn const_default() -> Self {
4718 Self {
4719 package_id: None,
4720 module: None,
4721 sender: None,
4722 event_type: None,
4723 contents: None,
4724 json: None,
4725 }
4726 }
4727 #[doc(hidden)]
4728 pub fn default_instance() -> &'static Self {
4729 static DEFAULT: super::Event = super::Event::const_default();
4730 &DEFAULT
4731 }
4732 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
4734 self.package_id.as_mut().map(|field| field as _)
4735 }
4736 pub fn package_id_mut(&mut self) -> &mut String {
4739 self.package_id.get_or_insert_default()
4740 }
4741 pub fn package_id_opt(&self) -> Option<&str> {
4743 self.package_id.as_ref().map(|field| field as _)
4744 }
4745 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
4747 self.package_id = Some(field.into().into());
4748 }
4749 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
4751 self.set_package_id(field.into());
4752 self
4753 }
4754 pub fn module_opt_mut(&mut self) -> Option<&mut String> {
4756 self.module.as_mut().map(|field| field as _)
4757 }
4758 pub fn module_mut(&mut self) -> &mut String {
4761 self.module.get_or_insert_default()
4762 }
4763 pub fn module_opt(&self) -> Option<&str> {
4765 self.module.as_ref().map(|field| field as _)
4766 }
4767 pub fn set_module<T: Into<String>>(&mut self, field: T) {
4769 self.module = Some(field.into().into());
4770 }
4771 pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
4773 self.set_module(field.into());
4774 self
4775 }
4776 pub fn sender_opt_mut(&mut self) -> Option<&mut String> {
4778 self.sender.as_mut().map(|field| field as _)
4779 }
4780 pub fn sender_mut(&mut self) -> &mut String {
4783 self.sender.get_or_insert_default()
4784 }
4785 pub fn sender_opt(&self) -> Option<&str> {
4787 self.sender.as_ref().map(|field| field as _)
4788 }
4789 pub fn set_sender<T: Into<String>>(&mut self, field: T) {
4791 self.sender = Some(field.into().into());
4792 }
4793 pub fn with_sender<T: Into<String>>(mut self, field: T) -> Self {
4795 self.set_sender(field.into());
4796 self
4797 }
4798 pub fn event_type_opt_mut(&mut self) -> Option<&mut String> {
4800 self.event_type.as_mut().map(|field| field as _)
4801 }
4802 pub fn event_type_mut(&mut self) -> &mut String {
4805 self.event_type.get_or_insert_default()
4806 }
4807 pub fn event_type_opt(&self) -> Option<&str> {
4809 self.event_type.as_ref().map(|field| field as _)
4810 }
4811 pub fn set_event_type<T: Into<String>>(&mut self, field: T) {
4813 self.event_type = Some(field.into().into());
4814 }
4815 pub fn with_event_type<T: Into<String>>(mut self, field: T) -> Self {
4817 self.set_event_type(field.into());
4818 self
4819 }
4820 pub fn contents(&self) -> &super::Bcs {
4822 self.contents
4823 .as_ref()
4824 .map(|field| field as _)
4825 .unwrap_or_else(|| super::Bcs::default_instance() as _)
4826 }
4827 pub fn contents_opt_mut(&mut self) -> Option<&mut super::Bcs> {
4829 self.contents.as_mut().map(|field| field as _)
4830 }
4831 pub fn contents_mut(&mut self) -> &mut super::Bcs {
4834 self.contents.get_or_insert_default()
4835 }
4836 pub fn contents_opt(&self) -> Option<&super::Bcs> {
4838 self.contents.as_ref().map(|field| field as _)
4839 }
4840 pub fn set_contents<T: Into<super::Bcs>>(&mut self, field: T) {
4842 self.contents = Some(field.into().into());
4843 }
4844 pub fn with_contents<T: Into<super::Bcs>>(mut self, field: T) -> Self {
4846 self.set_contents(field.into());
4847 self
4848 }
4849 pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
4851 self.json.as_mut().map(|field| field as _)
4852 }
4853 pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
4856 self.json.get_or_insert_default()
4857 }
4858 pub fn json_opt(&self) -> Option<&::prost_types::Value> {
4860 self.json.as_ref().map(|field| field as _)
4861 }
4862 pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
4864 self.json = Some(field.into().into());
4865 }
4866 pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
4868 self.set_json(field.into());
4869 self
4870 }
4871 }
4872 impl super::ExecuteTransactionRequest {
4873 pub const fn const_default() -> Self {
4874 Self {
4875 transaction: None,
4876 signatures: Vec::new(),
4877 read_mask: None,
4878 }
4879 }
4880 #[doc(hidden)]
4881 pub fn default_instance() -> &'static Self {
4882 static DEFAULT: super::ExecuteTransactionRequest = super::ExecuteTransactionRequest::const_default();
4883 &DEFAULT
4884 }
4885 pub fn transaction(&self) -> &super::Transaction {
4887 self.transaction
4888 .as_ref()
4889 .map(|field| field as _)
4890 .unwrap_or_else(|| super::Transaction::default_instance() as _)
4891 }
4892 pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
4894 self.transaction.as_mut().map(|field| field as _)
4895 }
4896 pub fn transaction_mut(&mut self) -> &mut super::Transaction {
4899 self.transaction.get_or_insert_default()
4900 }
4901 pub fn transaction_opt(&self) -> Option<&super::Transaction> {
4903 self.transaction.as_ref().map(|field| field as _)
4904 }
4905 pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
4907 self.transaction = Some(field.into().into());
4908 }
4909 pub fn with_transaction<T: Into<super::Transaction>>(
4911 mut self,
4912 field: T,
4913 ) -> Self {
4914 self.set_transaction(field.into());
4915 self
4916 }
4917 pub fn signatures(&self) -> &[super::UserSignature] {
4919 &self.signatures
4920 }
4921 pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
4924 &mut self.signatures
4925 }
4926 pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
4928 self.signatures = field;
4929 }
4930 pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
4932 self.set_signatures(field);
4933 self
4934 }
4935 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
4937 self.read_mask.as_mut().map(|field| field as _)
4938 }
4939 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
4942 self.read_mask.get_or_insert_default()
4943 }
4944 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
4946 self.read_mask.as_ref().map(|field| field as _)
4947 }
4948 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
4950 self.read_mask = Some(field.into().into());
4951 }
4952 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
4954 mut self,
4955 field: T,
4956 ) -> Self {
4957 self.set_read_mask(field.into());
4958 self
4959 }
4960 }
4961 impl super::ExecuteTransactionResponse {
4962 pub const fn const_default() -> Self {
4963 Self { transaction: None }
4964 }
4965 #[doc(hidden)]
4966 pub fn default_instance() -> &'static Self {
4967 static DEFAULT: super::ExecuteTransactionResponse = super::ExecuteTransactionResponse::const_default();
4968 &DEFAULT
4969 }
4970 pub fn transaction(&self) -> &super::ExecutedTransaction {
4972 self.transaction
4973 .as_ref()
4974 .map(|field| field as _)
4975 .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
4976 }
4977 pub fn transaction_opt_mut(
4979 &mut self,
4980 ) -> Option<&mut super::ExecutedTransaction> {
4981 self.transaction.as_mut().map(|field| field as _)
4982 }
4983 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
4986 self.transaction.get_or_insert_default()
4987 }
4988 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
4990 self.transaction.as_ref().map(|field| field as _)
4991 }
4992 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
4994 &mut self,
4995 field: T,
4996 ) {
4997 self.transaction = Some(field.into().into());
4998 }
4999 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
5001 mut self,
5002 field: T,
5003 ) -> Self {
5004 self.set_transaction(field.into());
5005 self
5006 }
5007 }
5008 impl super::ExecutedTransaction {
5009 pub const fn const_default() -> Self {
5010 Self {
5011 digest: None,
5012 transaction: None,
5013 signatures: Vec::new(),
5014 effects: None,
5015 events: None,
5016 checkpoint: None,
5017 timestamp: None,
5018 balance_changes: Vec::new(),
5019 objects: None,
5020 }
5021 }
5022 #[doc(hidden)]
5023 pub fn default_instance() -> &'static Self {
5024 static DEFAULT: super::ExecutedTransaction = super::ExecutedTransaction::const_default();
5025 &DEFAULT
5026 }
5027 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
5029 self.digest.as_mut().map(|field| field as _)
5030 }
5031 pub fn digest_mut(&mut self) -> &mut String {
5034 self.digest.get_or_insert_default()
5035 }
5036 pub fn digest_opt(&self) -> Option<&str> {
5038 self.digest.as_ref().map(|field| field as _)
5039 }
5040 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
5042 self.digest = Some(field.into().into());
5043 }
5044 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
5046 self.set_digest(field.into());
5047 self
5048 }
5049 pub fn transaction(&self) -> &super::Transaction {
5051 self.transaction
5052 .as_ref()
5053 .map(|field| field as _)
5054 .unwrap_or_else(|| super::Transaction::default_instance() as _)
5055 }
5056 pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
5058 self.transaction.as_mut().map(|field| field as _)
5059 }
5060 pub fn transaction_mut(&mut self) -> &mut super::Transaction {
5063 self.transaction.get_or_insert_default()
5064 }
5065 pub fn transaction_opt(&self) -> Option<&super::Transaction> {
5067 self.transaction.as_ref().map(|field| field as _)
5068 }
5069 pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
5071 self.transaction = Some(field.into().into());
5072 }
5073 pub fn with_transaction<T: Into<super::Transaction>>(
5075 mut self,
5076 field: T,
5077 ) -> Self {
5078 self.set_transaction(field.into());
5079 self
5080 }
5081 pub fn signatures(&self) -> &[super::UserSignature] {
5083 &self.signatures
5084 }
5085 pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
5088 &mut self.signatures
5089 }
5090 pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
5092 self.signatures = field;
5093 }
5094 pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
5096 self.set_signatures(field);
5097 self
5098 }
5099 pub fn effects(&self) -> &super::TransactionEffects {
5101 self.effects
5102 .as_ref()
5103 .map(|field| field as _)
5104 .unwrap_or_else(|| super::TransactionEffects::default_instance() as _)
5105 }
5106 pub fn effects_opt_mut(&mut self) -> Option<&mut super::TransactionEffects> {
5108 self.effects.as_mut().map(|field| field as _)
5109 }
5110 pub fn effects_mut(&mut self) -> &mut super::TransactionEffects {
5113 self.effects.get_or_insert_default()
5114 }
5115 pub fn effects_opt(&self) -> Option<&super::TransactionEffects> {
5117 self.effects.as_ref().map(|field| field as _)
5118 }
5119 pub fn set_effects<T: Into<super::TransactionEffects>>(&mut self, field: T) {
5121 self.effects = Some(field.into().into());
5122 }
5123 pub fn with_effects<T: Into<super::TransactionEffects>>(
5125 mut self,
5126 field: T,
5127 ) -> Self {
5128 self.set_effects(field.into());
5129 self
5130 }
5131 pub fn events(&self) -> &super::TransactionEvents {
5133 self.events
5134 .as_ref()
5135 .map(|field| field as _)
5136 .unwrap_or_else(|| super::TransactionEvents::default_instance() as _)
5137 }
5138 pub fn events_opt_mut(&mut self) -> Option<&mut super::TransactionEvents> {
5140 self.events.as_mut().map(|field| field as _)
5141 }
5142 pub fn events_mut(&mut self) -> &mut super::TransactionEvents {
5145 self.events.get_or_insert_default()
5146 }
5147 pub fn events_opt(&self) -> Option<&super::TransactionEvents> {
5149 self.events.as_ref().map(|field| field as _)
5150 }
5151 pub fn set_events<T: Into<super::TransactionEvents>>(&mut self, field: T) {
5153 self.events = Some(field.into().into());
5154 }
5155 pub fn with_events<T: Into<super::TransactionEvents>>(
5157 mut self,
5158 field: T,
5159 ) -> Self {
5160 self.set_events(field.into());
5161 self
5162 }
5163 pub fn checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
5165 self.checkpoint.as_mut().map(|field| field as _)
5166 }
5167 pub fn checkpoint_mut(&mut self) -> &mut u64 {
5170 self.checkpoint.get_or_insert_default()
5171 }
5172 pub fn checkpoint_opt(&self) -> Option<u64> {
5174 self.checkpoint.as_ref().map(|field| *field)
5175 }
5176 pub fn set_checkpoint(&mut self, field: u64) {
5178 self.checkpoint = Some(field);
5179 }
5180 pub fn with_checkpoint(mut self, field: u64) -> Self {
5182 self.set_checkpoint(field);
5183 self
5184 }
5185 pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
5187 self.timestamp.as_mut().map(|field| field as _)
5188 }
5189 pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
5192 self.timestamp.get_or_insert_default()
5193 }
5194 pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
5196 self.timestamp.as_ref().map(|field| field as _)
5197 }
5198 pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
5200 self.timestamp = Some(field.into().into());
5201 }
5202 pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
5204 mut self,
5205 field: T,
5206 ) -> Self {
5207 self.set_timestamp(field.into());
5208 self
5209 }
5210 pub fn balance_changes(&self) -> &[super::BalanceChange] {
5212 &self.balance_changes
5213 }
5214 pub fn balance_changes_mut(&mut self) -> &mut Vec<super::BalanceChange> {
5217 &mut self.balance_changes
5218 }
5219 pub fn set_balance_changes(&mut self, field: Vec<super::BalanceChange>) {
5221 self.balance_changes = field;
5222 }
5223 pub fn with_balance_changes(mut self, field: Vec<super::BalanceChange>) -> Self {
5225 self.set_balance_changes(field);
5226 self
5227 }
5228 pub fn objects(&self) -> &super::ObjectSet {
5230 self.objects
5231 .as_ref()
5232 .map(|field| field as _)
5233 .unwrap_or_else(|| super::ObjectSet::default_instance() as _)
5234 }
5235 pub fn objects_opt_mut(&mut self) -> Option<&mut super::ObjectSet> {
5237 self.objects.as_mut().map(|field| field as _)
5238 }
5239 pub fn objects_mut(&mut self) -> &mut super::ObjectSet {
5242 self.objects.get_or_insert_default()
5243 }
5244 pub fn objects_opt(&self) -> Option<&super::ObjectSet> {
5246 self.objects.as_ref().map(|field| field as _)
5247 }
5248 pub fn set_objects<T: Into<super::ObjectSet>>(&mut self, field: T) {
5250 self.objects = Some(field.into().into());
5251 }
5252 pub fn with_objects<T: Into<super::ObjectSet>>(mut self, field: T) -> Self {
5254 self.set_objects(field.into());
5255 self
5256 }
5257 }
5258 impl super::ExecutionError {
5259 pub const fn const_default() -> Self {
5260 Self {
5261 description: None,
5262 command: None,
5263 kind: None,
5264 error_details: None,
5265 }
5266 }
5267 #[doc(hidden)]
5268 pub fn default_instance() -> &'static Self {
5269 static DEFAULT: super::ExecutionError = super::ExecutionError::const_default();
5270 &DEFAULT
5271 }
5272 pub fn description_opt_mut(&mut self) -> Option<&mut String> {
5274 self.description.as_mut().map(|field| field as _)
5275 }
5276 pub fn description_mut(&mut self) -> &mut String {
5279 self.description.get_or_insert_default()
5280 }
5281 pub fn description_opt(&self) -> Option<&str> {
5283 self.description.as_ref().map(|field| field as _)
5284 }
5285 pub fn set_description<T: Into<String>>(&mut self, field: T) {
5287 self.description = Some(field.into().into());
5288 }
5289 pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
5291 self.set_description(field.into());
5292 self
5293 }
5294 pub fn command_opt_mut(&mut self) -> Option<&mut u64> {
5296 self.command.as_mut().map(|field| field as _)
5297 }
5298 pub fn command_mut(&mut self) -> &mut u64 {
5301 self.command.get_or_insert_default()
5302 }
5303 pub fn command_opt(&self) -> Option<u64> {
5305 self.command.as_ref().map(|field| *field)
5306 }
5307 pub fn set_command(&mut self, field: u64) {
5309 self.command = Some(field);
5310 }
5311 pub fn with_command(mut self, field: u64) -> Self {
5313 self.set_command(field);
5314 self
5315 }
5316 pub fn with_kind<T: Into<super::execution_error::ExecutionErrorKind>>(
5318 mut self,
5319 field: T,
5320 ) -> Self {
5321 self.set_kind(field.into());
5322 self
5323 }
5324 pub fn abort(&self) -> &super::MoveAbort {
5326 if let Some(super::execution_error::ErrorDetails::Abort(field)) = &self
5327 .error_details
5328 {
5329 field as _
5330 } else {
5331 super::MoveAbort::default_instance() as _
5332 }
5333 }
5334 pub fn abort_opt(&self) -> Option<&super::MoveAbort> {
5336 if let Some(super::execution_error::ErrorDetails::Abort(field)) = &self
5337 .error_details
5338 {
5339 Some(field as _)
5340 } else {
5341 None
5342 }
5343 }
5344 pub fn abort_opt_mut(&mut self) -> Option<&mut super::MoveAbort> {
5346 if let Some(super::execution_error::ErrorDetails::Abort(field)) = &mut self
5347 .error_details
5348 {
5349 Some(field as _)
5350 } else {
5351 None
5352 }
5353 }
5354 pub fn abort_mut(&mut self) -> &mut super::MoveAbort {
5358 if self.abort_opt_mut().is_none() {
5359 self.error_details = Some(
5360 super::execution_error::ErrorDetails::Abort(
5361 super::MoveAbort::default(),
5362 ),
5363 );
5364 }
5365 self.abort_opt_mut().unwrap()
5366 }
5367 pub fn set_abort<T: Into<super::MoveAbort>>(&mut self, field: T) {
5370 self.error_details = Some(
5371 super::execution_error::ErrorDetails::Abort(field.into().into()),
5372 );
5373 }
5374 pub fn with_abort<T: Into<super::MoveAbort>>(mut self, field: T) -> Self {
5377 self.set_abort(field.into());
5378 self
5379 }
5380 pub fn size_error(&self) -> &super::SizeError {
5382 if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &self
5383 .error_details
5384 {
5385 field as _
5386 } else {
5387 super::SizeError::default_instance() as _
5388 }
5389 }
5390 pub fn size_error_opt(&self) -> Option<&super::SizeError> {
5392 if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &self
5393 .error_details
5394 {
5395 Some(field as _)
5396 } else {
5397 None
5398 }
5399 }
5400 pub fn size_error_opt_mut(&mut self) -> Option<&mut super::SizeError> {
5402 if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &mut self
5403 .error_details
5404 {
5405 Some(field as _)
5406 } else {
5407 None
5408 }
5409 }
5410 pub fn size_error_mut(&mut self) -> &mut super::SizeError {
5414 if self.size_error_opt_mut().is_none() {
5415 self.error_details = Some(
5416 super::execution_error::ErrorDetails::SizeError(
5417 super::SizeError::default(),
5418 ),
5419 );
5420 }
5421 self.size_error_opt_mut().unwrap()
5422 }
5423 pub fn set_size_error<T: Into<super::SizeError>>(&mut self, field: T) {
5426 self.error_details = Some(
5427 super::execution_error::ErrorDetails::SizeError(field.into().into()),
5428 );
5429 }
5430 pub fn with_size_error<T: Into<super::SizeError>>(mut self, field: T) -> Self {
5433 self.set_size_error(field.into());
5434 self
5435 }
5436 pub fn command_argument_error(&self) -> &super::CommandArgumentError {
5438 if let Some(
5439 super::execution_error::ErrorDetails::CommandArgumentError(field),
5440 ) = &self.error_details
5441 {
5442 field as _
5443 } else {
5444 super::CommandArgumentError::default_instance() as _
5445 }
5446 }
5447 pub fn command_argument_error_opt(
5449 &self,
5450 ) -> Option<&super::CommandArgumentError> {
5451 if let Some(
5452 super::execution_error::ErrorDetails::CommandArgumentError(field),
5453 ) = &self.error_details
5454 {
5455 Some(field as _)
5456 } else {
5457 None
5458 }
5459 }
5460 pub fn command_argument_error_opt_mut(
5462 &mut self,
5463 ) -> Option<&mut super::CommandArgumentError> {
5464 if let Some(
5465 super::execution_error::ErrorDetails::CommandArgumentError(field),
5466 ) = &mut self.error_details
5467 {
5468 Some(field as _)
5469 } else {
5470 None
5471 }
5472 }
5473 pub fn command_argument_error_mut(
5477 &mut self,
5478 ) -> &mut super::CommandArgumentError {
5479 if self.command_argument_error_opt_mut().is_none() {
5480 self.error_details = Some(
5481 super::execution_error::ErrorDetails::CommandArgumentError(
5482 super::CommandArgumentError::default(),
5483 ),
5484 );
5485 }
5486 self.command_argument_error_opt_mut().unwrap()
5487 }
5488 pub fn set_command_argument_error<T: Into<super::CommandArgumentError>>(
5491 &mut self,
5492 field: T,
5493 ) {
5494 self.error_details = Some(
5495 super::execution_error::ErrorDetails::CommandArgumentError(
5496 field.into().into(),
5497 ),
5498 );
5499 }
5500 pub fn with_command_argument_error<T: Into<super::CommandArgumentError>>(
5503 mut self,
5504 field: T,
5505 ) -> Self {
5506 self.set_command_argument_error(field.into());
5507 self
5508 }
5509 pub fn type_argument_error(&self) -> &super::TypeArgumentError {
5511 if let Some(
5512 super::execution_error::ErrorDetails::TypeArgumentError(field),
5513 ) = &self.error_details
5514 {
5515 field as _
5516 } else {
5517 super::TypeArgumentError::default_instance() as _
5518 }
5519 }
5520 pub fn type_argument_error_opt(&self) -> Option<&super::TypeArgumentError> {
5522 if let Some(
5523 super::execution_error::ErrorDetails::TypeArgumentError(field),
5524 ) = &self.error_details
5525 {
5526 Some(field as _)
5527 } else {
5528 None
5529 }
5530 }
5531 pub fn type_argument_error_opt_mut(
5533 &mut self,
5534 ) -> Option<&mut super::TypeArgumentError> {
5535 if let Some(
5536 super::execution_error::ErrorDetails::TypeArgumentError(field),
5537 ) = &mut self.error_details
5538 {
5539 Some(field as _)
5540 } else {
5541 None
5542 }
5543 }
5544 pub fn type_argument_error_mut(&mut self) -> &mut super::TypeArgumentError {
5548 if self.type_argument_error_opt_mut().is_none() {
5549 self.error_details = Some(
5550 super::execution_error::ErrorDetails::TypeArgumentError(
5551 super::TypeArgumentError::default(),
5552 ),
5553 );
5554 }
5555 self.type_argument_error_opt_mut().unwrap()
5556 }
5557 pub fn set_type_argument_error<T: Into<super::TypeArgumentError>>(
5560 &mut self,
5561 field: T,
5562 ) {
5563 self.error_details = Some(
5564 super::execution_error::ErrorDetails::TypeArgumentError(
5565 field.into().into(),
5566 ),
5567 );
5568 }
5569 pub fn with_type_argument_error<T: Into<super::TypeArgumentError>>(
5572 mut self,
5573 field: T,
5574 ) -> Self {
5575 self.set_type_argument_error(field.into());
5576 self
5577 }
5578 pub fn package_upgrade_error(&self) -> &super::PackageUpgradeError {
5580 if let Some(
5581 super::execution_error::ErrorDetails::PackageUpgradeError(field),
5582 ) = &self.error_details
5583 {
5584 field as _
5585 } else {
5586 super::PackageUpgradeError::default_instance() as _
5587 }
5588 }
5589 pub fn package_upgrade_error_opt(&self) -> Option<&super::PackageUpgradeError> {
5591 if let Some(
5592 super::execution_error::ErrorDetails::PackageUpgradeError(field),
5593 ) = &self.error_details
5594 {
5595 Some(field as _)
5596 } else {
5597 None
5598 }
5599 }
5600 pub fn package_upgrade_error_opt_mut(
5602 &mut self,
5603 ) -> Option<&mut super::PackageUpgradeError> {
5604 if let Some(
5605 super::execution_error::ErrorDetails::PackageUpgradeError(field),
5606 ) = &mut self.error_details
5607 {
5608 Some(field as _)
5609 } else {
5610 None
5611 }
5612 }
5613 pub fn package_upgrade_error_mut(&mut self) -> &mut super::PackageUpgradeError {
5617 if self.package_upgrade_error_opt_mut().is_none() {
5618 self.error_details = Some(
5619 super::execution_error::ErrorDetails::PackageUpgradeError(
5620 super::PackageUpgradeError::default(),
5621 ),
5622 );
5623 }
5624 self.package_upgrade_error_opt_mut().unwrap()
5625 }
5626 pub fn set_package_upgrade_error<T: Into<super::PackageUpgradeError>>(
5629 &mut self,
5630 field: T,
5631 ) {
5632 self.error_details = Some(
5633 super::execution_error::ErrorDetails::PackageUpgradeError(
5634 field.into().into(),
5635 ),
5636 );
5637 }
5638 pub fn with_package_upgrade_error<T: Into<super::PackageUpgradeError>>(
5641 mut self,
5642 field: T,
5643 ) -> Self {
5644 self.set_package_upgrade_error(field.into());
5645 self
5646 }
5647 pub fn index_error(&self) -> &super::IndexError {
5649 if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &self
5650 .error_details
5651 {
5652 field as _
5653 } else {
5654 super::IndexError::default_instance() as _
5655 }
5656 }
5657 pub fn index_error_opt(&self) -> Option<&super::IndexError> {
5659 if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &self
5660 .error_details
5661 {
5662 Some(field as _)
5663 } else {
5664 None
5665 }
5666 }
5667 pub fn index_error_opt_mut(&mut self) -> Option<&mut super::IndexError> {
5669 if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &mut self
5670 .error_details
5671 {
5672 Some(field as _)
5673 } else {
5674 None
5675 }
5676 }
5677 pub fn index_error_mut(&mut self) -> &mut super::IndexError {
5681 if self.index_error_opt_mut().is_none() {
5682 self.error_details = Some(
5683 super::execution_error::ErrorDetails::IndexError(
5684 super::IndexError::default(),
5685 ),
5686 );
5687 }
5688 self.index_error_opt_mut().unwrap()
5689 }
5690 pub fn set_index_error<T: Into<super::IndexError>>(&mut self, field: T) {
5693 self.error_details = Some(
5694 super::execution_error::ErrorDetails::IndexError(field.into().into()),
5695 );
5696 }
5697 pub fn with_index_error<T: Into<super::IndexError>>(mut self, field: T) -> Self {
5700 self.set_index_error(field.into());
5701 self
5702 }
5703 pub fn object_id(&self) -> &str {
5705 if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &self
5706 .error_details
5707 {
5708 field as _
5709 } else {
5710 ""
5711 }
5712 }
5713 pub fn object_id_opt(&self) -> Option<&str> {
5715 if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &self
5716 .error_details
5717 {
5718 Some(field as _)
5719 } else {
5720 None
5721 }
5722 }
5723 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
5725 if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &mut self
5726 .error_details
5727 {
5728 Some(field as _)
5729 } else {
5730 None
5731 }
5732 }
5733 pub fn object_id_mut(&mut self) -> &mut String {
5737 if self.object_id_opt_mut().is_none() {
5738 self.error_details = Some(
5739 super::execution_error::ErrorDetails::ObjectId(String::default()),
5740 );
5741 }
5742 self.object_id_opt_mut().unwrap()
5743 }
5744 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
5747 self.error_details = Some(
5748 super::execution_error::ErrorDetails::ObjectId(field.into().into()),
5749 );
5750 }
5751 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
5754 self.set_object_id(field.into());
5755 self
5756 }
5757 pub fn coin_deny_list_error(&self) -> &super::CoinDenyListError {
5759 if let Some(
5760 super::execution_error::ErrorDetails::CoinDenyListError(field),
5761 ) = &self.error_details
5762 {
5763 field as _
5764 } else {
5765 super::CoinDenyListError::default_instance() as _
5766 }
5767 }
5768 pub fn coin_deny_list_error_opt(&self) -> Option<&super::CoinDenyListError> {
5770 if let Some(
5771 super::execution_error::ErrorDetails::CoinDenyListError(field),
5772 ) = &self.error_details
5773 {
5774 Some(field as _)
5775 } else {
5776 None
5777 }
5778 }
5779 pub fn coin_deny_list_error_opt_mut(
5781 &mut self,
5782 ) -> Option<&mut super::CoinDenyListError> {
5783 if let Some(
5784 super::execution_error::ErrorDetails::CoinDenyListError(field),
5785 ) = &mut self.error_details
5786 {
5787 Some(field as _)
5788 } else {
5789 None
5790 }
5791 }
5792 pub fn coin_deny_list_error_mut(&mut self) -> &mut super::CoinDenyListError {
5796 if self.coin_deny_list_error_opt_mut().is_none() {
5797 self.error_details = Some(
5798 super::execution_error::ErrorDetails::CoinDenyListError(
5799 super::CoinDenyListError::default(),
5800 ),
5801 );
5802 }
5803 self.coin_deny_list_error_opt_mut().unwrap()
5804 }
5805 pub fn set_coin_deny_list_error<T: Into<super::CoinDenyListError>>(
5808 &mut self,
5809 field: T,
5810 ) {
5811 self.error_details = Some(
5812 super::execution_error::ErrorDetails::CoinDenyListError(
5813 field.into().into(),
5814 ),
5815 );
5816 }
5817 pub fn with_coin_deny_list_error<T: Into<super::CoinDenyListError>>(
5820 mut self,
5821 field: T,
5822 ) -> Self {
5823 self.set_coin_deny_list_error(field.into());
5824 self
5825 }
5826 pub fn congested_objects(&self) -> &super::CongestedObjects {
5828 if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &self
5829 .error_details
5830 {
5831 field as _
5832 } else {
5833 super::CongestedObjects::default_instance() as _
5834 }
5835 }
5836 pub fn congested_objects_opt(&self) -> Option<&super::CongestedObjects> {
5838 if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &self
5839 .error_details
5840 {
5841 Some(field as _)
5842 } else {
5843 None
5844 }
5845 }
5846 pub fn congested_objects_opt_mut(
5848 &mut self,
5849 ) -> Option<&mut super::CongestedObjects> {
5850 if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &mut self
5851 .error_details
5852 {
5853 Some(field as _)
5854 } else {
5855 None
5856 }
5857 }
5858 pub fn congested_objects_mut(&mut self) -> &mut super::CongestedObjects {
5862 if self.congested_objects_opt_mut().is_none() {
5863 self.error_details = Some(
5864 super::execution_error::ErrorDetails::CongestedObjects(
5865 super::CongestedObjects::default(),
5866 ),
5867 );
5868 }
5869 self.congested_objects_opt_mut().unwrap()
5870 }
5871 pub fn set_congested_objects<T: Into<super::CongestedObjects>>(
5874 &mut self,
5875 field: T,
5876 ) {
5877 self.error_details = Some(
5878 super::execution_error::ErrorDetails::CongestedObjects(
5879 field.into().into(),
5880 ),
5881 );
5882 }
5883 pub fn with_congested_objects<T: Into<super::CongestedObjects>>(
5886 mut self,
5887 field: T,
5888 ) -> Self {
5889 self.set_congested_objects(field.into());
5890 self
5891 }
5892 }
5893 impl super::ExecutionStatus {
5894 pub const fn const_default() -> Self {
5895 Self { success: None, error: None }
5896 }
5897 #[doc(hidden)]
5898 pub fn default_instance() -> &'static Self {
5899 static DEFAULT: super::ExecutionStatus = super::ExecutionStatus::const_default();
5900 &DEFAULT
5901 }
5902 pub fn success_opt_mut(&mut self) -> Option<&mut bool> {
5904 self.success.as_mut().map(|field| field as _)
5905 }
5906 pub fn success_mut(&mut self) -> &mut bool {
5909 self.success.get_or_insert_default()
5910 }
5911 pub fn success_opt(&self) -> Option<bool> {
5913 self.success.as_ref().map(|field| *field)
5914 }
5915 pub fn set_success(&mut self, field: bool) {
5917 self.success = Some(field);
5918 }
5919 pub fn with_success(mut self, field: bool) -> Self {
5921 self.set_success(field);
5922 self
5923 }
5924 pub fn error(&self) -> &super::ExecutionError {
5926 self.error
5927 .as_ref()
5928 .map(|field| field as _)
5929 .unwrap_or_else(|| super::ExecutionError::default_instance() as _)
5930 }
5931 pub fn error_opt_mut(&mut self) -> Option<&mut super::ExecutionError> {
5933 self.error.as_mut().map(|field| field as _)
5934 }
5935 pub fn error_mut(&mut self) -> &mut super::ExecutionError {
5938 self.error.get_or_insert_default()
5939 }
5940 pub fn error_opt(&self) -> Option<&super::ExecutionError> {
5942 self.error.as_ref().map(|field| field as _)
5943 }
5944 pub fn set_error<T: Into<super::ExecutionError>>(&mut self, field: T) {
5946 self.error = Some(field.into().into());
5947 }
5948 pub fn with_error<T: Into<super::ExecutionError>>(mut self, field: T) -> Self {
5950 self.set_error(field.into());
5951 self
5952 }
5953 }
5954 impl super::ExecutionTimeObservation {
5955 pub const fn const_default() -> Self {
5956 Self {
5957 kind: None,
5958 move_entry_point: None,
5959 validator_observations: Vec::new(),
5960 }
5961 }
5962 #[doc(hidden)]
5963 pub fn default_instance() -> &'static Self {
5964 static DEFAULT: super::ExecutionTimeObservation = super::ExecutionTimeObservation::const_default();
5965 &DEFAULT
5966 }
5967 pub fn with_kind<
5969 T: Into<super::execution_time_observation::ExecutionTimeObservationKind>,
5970 >(mut self, field: T) -> Self {
5971 self.set_kind(field.into());
5972 self
5973 }
5974 pub fn move_entry_point(&self) -> &super::MoveCall {
5976 self.move_entry_point
5977 .as_ref()
5978 .map(|field| field as _)
5979 .unwrap_or_else(|| super::MoveCall::default_instance() as _)
5980 }
5981 pub fn move_entry_point_opt_mut(&mut self) -> Option<&mut super::MoveCall> {
5983 self.move_entry_point.as_mut().map(|field| field as _)
5984 }
5985 pub fn move_entry_point_mut(&mut self) -> &mut super::MoveCall {
5988 self.move_entry_point.get_or_insert_default()
5989 }
5990 pub fn move_entry_point_opt(&self) -> Option<&super::MoveCall> {
5992 self.move_entry_point.as_ref().map(|field| field as _)
5993 }
5994 pub fn set_move_entry_point<T: Into<super::MoveCall>>(&mut self, field: T) {
5996 self.move_entry_point = Some(field.into().into());
5997 }
5998 pub fn with_move_entry_point<T: Into<super::MoveCall>>(
6000 mut self,
6001 field: T,
6002 ) -> Self {
6003 self.set_move_entry_point(field.into());
6004 self
6005 }
6006 pub fn validator_observations(
6008 &self,
6009 ) -> &[super::ValidatorExecutionTimeObservation] {
6010 &self.validator_observations
6011 }
6012 pub fn validator_observations_mut(
6015 &mut self,
6016 ) -> &mut Vec<super::ValidatorExecutionTimeObservation> {
6017 &mut self.validator_observations
6018 }
6019 pub fn set_validator_observations(
6021 &mut self,
6022 field: Vec<super::ValidatorExecutionTimeObservation>,
6023 ) {
6024 self.validator_observations = field;
6025 }
6026 pub fn with_validator_observations(
6028 mut self,
6029 field: Vec<super::ValidatorExecutionTimeObservation>,
6030 ) -> Self {
6031 self.set_validator_observations(field);
6032 self
6033 }
6034 }
6035 impl super::ExecutionTimeObservations {
6036 pub const fn const_default() -> Self {
6037 Self {
6038 version: None,
6039 observations: Vec::new(),
6040 }
6041 }
6042 #[doc(hidden)]
6043 pub fn default_instance() -> &'static Self {
6044 static DEFAULT: super::ExecutionTimeObservations = super::ExecutionTimeObservations::const_default();
6045 &DEFAULT
6046 }
6047 pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
6049 self.version.as_mut().map(|field| field as _)
6050 }
6051 pub fn version_mut(&mut self) -> &mut i32 {
6054 self.version.get_or_insert_default()
6055 }
6056 pub fn version_opt(&self) -> Option<i32> {
6058 self.version.as_ref().map(|field| *field)
6059 }
6060 pub fn set_version(&mut self, field: i32) {
6062 self.version = Some(field);
6063 }
6064 pub fn with_version(mut self, field: i32) -> Self {
6066 self.set_version(field);
6067 self
6068 }
6069 pub fn observations(&self) -> &[super::ExecutionTimeObservation] {
6071 &self.observations
6072 }
6073 pub fn observations_mut(&mut self) -> &mut Vec<super::ExecutionTimeObservation> {
6076 &mut self.observations
6077 }
6078 pub fn set_observations(&mut self, field: Vec<super::ExecutionTimeObservation>) {
6080 self.observations = field;
6081 }
6082 pub fn with_observations(
6084 mut self,
6085 field: Vec<super::ExecutionTimeObservation>,
6086 ) -> Self {
6087 self.set_observations(field);
6088 self
6089 }
6090 }
6091 impl super::FieldDescriptor {
6092 pub const fn const_default() -> Self {
6093 Self {
6094 name: None,
6095 position: None,
6096 r#type: None,
6097 }
6098 }
6099 #[doc(hidden)]
6100 pub fn default_instance() -> &'static Self {
6101 static DEFAULT: super::FieldDescriptor = super::FieldDescriptor::const_default();
6102 &DEFAULT
6103 }
6104 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
6106 self.name.as_mut().map(|field| field as _)
6107 }
6108 pub fn name_mut(&mut self) -> &mut String {
6111 self.name.get_or_insert_default()
6112 }
6113 pub fn name_opt(&self) -> Option<&str> {
6115 self.name.as_ref().map(|field| field as _)
6116 }
6117 pub fn set_name<T: Into<String>>(&mut self, field: T) {
6119 self.name = Some(field.into().into());
6120 }
6121 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
6123 self.set_name(field.into());
6124 self
6125 }
6126 pub fn position_opt_mut(&mut self) -> Option<&mut u32> {
6128 self.position.as_mut().map(|field| field as _)
6129 }
6130 pub fn position_mut(&mut self) -> &mut u32 {
6133 self.position.get_or_insert_default()
6134 }
6135 pub fn position_opt(&self) -> Option<u32> {
6137 self.position.as_ref().map(|field| *field)
6138 }
6139 pub fn set_position(&mut self, field: u32) {
6141 self.position = Some(field);
6142 }
6143 pub fn with_position(mut self, field: u32) -> Self {
6145 self.set_position(field);
6146 self
6147 }
6148 pub fn r#type(&self) -> &super::OpenSignatureBody {
6150 self.r#type
6151 .as_ref()
6152 .map(|field| field as _)
6153 .unwrap_or_else(|| super::OpenSignatureBody::default_instance() as _)
6154 }
6155 pub fn type_opt_mut(&mut self) -> Option<&mut super::OpenSignatureBody> {
6157 self.r#type.as_mut().map(|field| field as _)
6158 }
6159 pub fn type_mut(&mut self) -> &mut super::OpenSignatureBody {
6162 self.r#type.get_or_insert_default()
6163 }
6164 pub fn type_opt(&self) -> Option<&super::OpenSignatureBody> {
6166 self.r#type.as_ref().map(|field| field as _)
6167 }
6168 pub fn set_type<T: Into<super::OpenSignatureBody>>(&mut self, field: T) {
6170 self.r#type = Some(field.into().into());
6171 }
6172 pub fn with_type<T: Into<super::OpenSignatureBody>>(mut self, field: T) -> Self {
6174 self.set_type(field.into());
6175 self
6176 }
6177 }
6178 impl super::FunctionDescriptor {
6179 pub const fn const_default() -> Self {
6180 Self {
6181 name: None,
6182 visibility: None,
6183 is_entry: None,
6184 type_parameters: Vec::new(),
6185 parameters: Vec::new(),
6186 returns: Vec::new(),
6187 }
6188 }
6189 #[doc(hidden)]
6190 pub fn default_instance() -> &'static Self {
6191 static DEFAULT: super::FunctionDescriptor = super::FunctionDescriptor::const_default();
6192 &DEFAULT
6193 }
6194 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
6196 self.name.as_mut().map(|field| field as _)
6197 }
6198 pub fn name_mut(&mut self) -> &mut String {
6201 self.name.get_or_insert_default()
6202 }
6203 pub fn name_opt(&self) -> Option<&str> {
6205 self.name.as_ref().map(|field| field as _)
6206 }
6207 pub fn set_name<T: Into<String>>(&mut self, field: T) {
6209 self.name = Some(field.into().into());
6210 }
6211 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
6213 self.set_name(field.into());
6214 self
6215 }
6216 pub fn with_visibility<T: Into<super::function_descriptor::Visibility>>(
6218 mut self,
6219 field: T,
6220 ) -> Self {
6221 self.set_visibility(field.into());
6222 self
6223 }
6224 pub fn is_entry_opt_mut(&mut self) -> Option<&mut bool> {
6226 self.is_entry.as_mut().map(|field| field as _)
6227 }
6228 pub fn is_entry_mut(&mut self) -> &mut bool {
6231 self.is_entry.get_or_insert_default()
6232 }
6233 pub fn is_entry_opt(&self) -> Option<bool> {
6235 self.is_entry.as_ref().map(|field| *field)
6236 }
6237 pub fn set_is_entry(&mut self, field: bool) {
6239 self.is_entry = Some(field);
6240 }
6241 pub fn with_is_entry(mut self, field: bool) -> Self {
6243 self.set_is_entry(field);
6244 self
6245 }
6246 pub fn type_parameters(&self) -> &[super::TypeParameter] {
6248 &self.type_parameters
6249 }
6250 pub fn type_parameters_mut(&mut self) -> &mut Vec<super::TypeParameter> {
6253 &mut self.type_parameters
6254 }
6255 pub fn set_type_parameters(&mut self, field: Vec<super::TypeParameter>) {
6257 self.type_parameters = field;
6258 }
6259 pub fn with_type_parameters(mut self, field: Vec<super::TypeParameter>) -> Self {
6261 self.set_type_parameters(field);
6262 self
6263 }
6264 pub fn parameters(&self) -> &[super::OpenSignature] {
6266 &self.parameters
6267 }
6268 pub fn parameters_mut(&mut self) -> &mut Vec<super::OpenSignature> {
6271 &mut self.parameters
6272 }
6273 pub fn set_parameters(&mut self, field: Vec<super::OpenSignature>) {
6275 self.parameters = field;
6276 }
6277 pub fn with_parameters(mut self, field: Vec<super::OpenSignature>) -> Self {
6279 self.set_parameters(field);
6280 self
6281 }
6282 pub fn returns(&self) -> &[super::OpenSignature] {
6284 &self.returns
6285 }
6286 pub fn returns_mut(&mut self) -> &mut Vec<super::OpenSignature> {
6289 &mut self.returns
6290 }
6291 pub fn set_returns(&mut self, field: Vec<super::OpenSignature>) {
6293 self.returns = field;
6294 }
6295 pub fn with_returns(mut self, field: Vec<super::OpenSignature>) -> Self {
6297 self.set_returns(field);
6298 self
6299 }
6300 }
6301 impl super::GasCostSummary {
6302 pub const fn const_default() -> Self {
6303 Self {
6304 computation_cost: None,
6305 storage_cost: None,
6306 storage_rebate: None,
6307 non_refundable_storage_fee: None,
6308 }
6309 }
6310 #[doc(hidden)]
6311 pub fn default_instance() -> &'static Self {
6312 static DEFAULT: super::GasCostSummary = super::GasCostSummary::const_default();
6313 &DEFAULT
6314 }
6315 pub fn computation_cost_opt_mut(&mut self) -> Option<&mut u64> {
6317 self.computation_cost.as_mut().map(|field| field as _)
6318 }
6319 pub fn computation_cost_mut(&mut self) -> &mut u64 {
6322 self.computation_cost.get_or_insert_default()
6323 }
6324 pub fn computation_cost_opt(&self) -> Option<u64> {
6326 self.computation_cost.as_ref().map(|field| *field)
6327 }
6328 pub fn set_computation_cost(&mut self, field: u64) {
6330 self.computation_cost = Some(field);
6331 }
6332 pub fn with_computation_cost(mut self, field: u64) -> Self {
6334 self.set_computation_cost(field);
6335 self
6336 }
6337 pub fn storage_cost_opt_mut(&mut self) -> Option<&mut u64> {
6339 self.storage_cost.as_mut().map(|field| field as _)
6340 }
6341 pub fn storage_cost_mut(&mut self) -> &mut u64 {
6344 self.storage_cost.get_or_insert_default()
6345 }
6346 pub fn storage_cost_opt(&self) -> Option<u64> {
6348 self.storage_cost.as_ref().map(|field| *field)
6349 }
6350 pub fn set_storage_cost(&mut self, field: u64) {
6352 self.storage_cost = Some(field);
6353 }
6354 pub fn with_storage_cost(mut self, field: u64) -> Self {
6356 self.set_storage_cost(field);
6357 self
6358 }
6359 pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
6361 self.storage_rebate.as_mut().map(|field| field as _)
6362 }
6363 pub fn storage_rebate_mut(&mut self) -> &mut u64 {
6366 self.storage_rebate.get_or_insert_default()
6367 }
6368 pub fn storage_rebate_opt(&self) -> Option<u64> {
6370 self.storage_rebate.as_ref().map(|field| *field)
6371 }
6372 pub fn set_storage_rebate(&mut self, field: u64) {
6374 self.storage_rebate = Some(field);
6375 }
6376 pub fn with_storage_rebate(mut self, field: u64) -> Self {
6378 self.set_storage_rebate(field);
6379 self
6380 }
6381 pub fn non_refundable_storage_fee_opt_mut(&mut self) -> Option<&mut u64> {
6383 self.non_refundable_storage_fee.as_mut().map(|field| field as _)
6384 }
6385 pub fn non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
6388 self.non_refundable_storage_fee.get_or_insert_default()
6389 }
6390 pub fn non_refundable_storage_fee_opt(&self) -> Option<u64> {
6392 self.non_refundable_storage_fee.as_ref().map(|field| *field)
6393 }
6394 pub fn set_non_refundable_storage_fee(&mut self, field: u64) {
6396 self.non_refundable_storage_fee = Some(field);
6397 }
6398 pub fn with_non_refundable_storage_fee(mut self, field: u64) -> Self {
6400 self.set_non_refundable_storage_fee(field);
6401 self
6402 }
6403 }
6404 impl super::GasPayment {
6405 pub const fn const_default() -> Self {
6406 Self {
6407 objects: Vec::new(),
6408 owner: None,
6409 price: None,
6410 budget: None,
6411 }
6412 }
6413 #[doc(hidden)]
6414 pub fn default_instance() -> &'static Self {
6415 static DEFAULT: super::GasPayment = super::GasPayment::const_default();
6416 &DEFAULT
6417 }
6418 pub fn objects(&self) -> &[super::ObjectReference] {
6420 &self.objects
6421 }
6422 pub fn objects_mut(&mut self) -> &mut Vec<super::ObjectReference> {
6425 &mut self.objects
6426 }
6427 pub fn set_objects(&mut self, field: Vec<super::ObjectReference>) {
6429 self.objects = field;
6430 }
6431 pub fn with_objects(mut self, field: Vec<super::ObjectReference>) -> Self {
6433 self.set_objects(field);
6434 self
6435 }
6436 pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
6438 self.owner.as_mut().map(|field| field as _)
6439 }
6440 pub fn owner_mut(&mut self) -> &mut String {
6443 self.owner.get_or_insert_default()
6444 }
6445 pub fn owner_opt(&self) -> Option<&str> {
6447 self.owner.as_ref().map(|field| field as _)
6448 }
6449 pub fn set_owner<T: Into<String>>(&mut self, field: T) {
6451 self.owner = Some(field.into().into());
6452 }
6453 pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
6455 self.set_owner(field.into());
6456 self
6457 }
6458 pub fn price_opt_mut(&mut self) -> Option<&mut u64> {
6460 self.price.as_mut().map(|field| field as _)
6461 }
6462 pub fn price_mut(&mut self) -> &mut u64 {
6465 self.price.get_or_insert_default()
6466 }
6467 pub fn price_opt(&self) -> Option<u64> {
6469 self.price.as_ref().map(|field| *field)
6470 }
6471 pub fn set_price(&mut self, field: u64) {
6473 self.price = Some(field);
6474 }
6475 pub fn with_price(mut self, field: u64) -> Self {
6477 self.set_price(field);
6478 self
6479 }
6480 pub fn budget_opt_mut(&mut self) -> Option<&mut u64> {
6482 self.budget.as_mut().map(|field| field as _)
6483 }
6484 pub fn budget_mut(&mut self) -> &mut u64 {
6487 self.budget.get_or_insert_default()
6488 }
6489 pub fn budget_opt(&self) -> Option<u64> {
6491 self.budget.as_ref().map(|field| *field)
6492 }
6493 pub fn set_budget(&mut self, field: u64) {
6495 self.budget = Some(field);
6496 }
6497 pub fn with_budget(mut self, field: u64) -> Self {
6499 self.set_budget(field);
6500 self
6501 }
6502 }
6503 impl super::GenesisTransaction {
6504 pub const fn const_default() -> Self {
6505 Self { objects: Vec::new() }
6506 }
6507 #[doc(hidden)]
6508 pub fn default_instance() -> &'static Self {
6509 static DEFAULT: super::GenesisTransaction = super::GenesisTransaction::const_default();
6510 &DEFAULT
6511 }
6512 pub fn objects(&self) -> &[super::Object] {
6514 &self.objects
6515 }
6516 pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
6519 &mut self.objects
6520 }
6521 pub fn set_objects(&mut self, field: Vec<super::Object>) {
6523 self.objects = field;
6524 }
6525 pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
6527 self.set_objects(field);
6528 self
6529 }
6530 }
6531 impl super::GetBalanceRequest {
6532 pub const fn const_default() -> Self {
6533 Self {
6534 owner: None,
6535 coin_type: None,
6536 }
6537 }
6538 #[doc(hidden)]
6539 pub fn default_instance() -> &'static Self {
6540 static DEFAULT: super::GetBalanceRequest = super::GetBalanceRequest::const_default();
6541 &DEFAULT
6542 }
6543 pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
6545 self.owner.as_mut().map(|field| field as _)
6546 }
6547 pub fn owner_mut(&mut self) -> &mut String {
6550 self.owner.get_or_insert_default()
6551 }
6552 pub fn owner_opt(&self) -> Option<&str> {
6554 self.owner.as_ref().map(|field| field as _)
6555 }
6556 pub fn set_owner<T: Into<String>>(&mut self, field: T) {
6558 self.owner = Some(field.into().into());
6559 }
6560 pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
6562 self.set_owner(field.into());
6563 self
6564 }
6565 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
6567 self.coin_type.as_mut().map(|field| field as _)
6568 }
6569 pub fn coin_type_mut(&mut self) -> &mut String {
6572 self.coin_type.get_or_insert_default()
6573 }
6574 pub fn coin_type_opt(&self) -> Option<&str> {
6576 self.coin_type.as_ref().map(|field| field as _)
6577 }
6578 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
6580 self.coin_type = Some(field.into().into());
6581 }
6582 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
6584 self.set_coin_type(field.into());
6585 self
6586 }
6587 }
6588 impl super::GetBalanceResponse {
6589 pub const fn const_default() -> Self {
6590 Self { balance: None }
6591 }
6592 #[doc(hidden)]
6593 pub fn default_instance() -> &'static Self {
6594 static DEFAULT: super::GetBalanceResponse = super::GetBalanceResponse::const_default();
6595 &DEFAULT
6596 }
6597 pub fn balance(&self) -> &super::Balance {
6599 self.balance
6600 .as_ref()
6601 .map(|field| field as _)
6602 .unwrap_or_else(|| super::Balance::default_instance() as _)
6603 }
6604 pub fn balance_opt_mut(&mut self) -> Option<&mut super::Balance> {
6606 self.balance.as_mut().map(|field| field as _)
6607 }
6608 pub fn balance_mut(&mut self) -> &mut super::Balance {
6611 self.balance.get_or_insert_default()
6612 }
6613 pub fn balance_opt(&self) -> Option<&super::Balance> {
6615 self.balance.as_ref().map(|field| field as _)
6616 }
6617 pub fn set_balance<T: Into<super::Balance>>(&mut self, field: T) {
6619 self.balance = Some(field.into().into());
6620 }
6621 pub fn with_balance<T: Into<super::Balance>>(mut self, field: T) -> Self {
6623 self.set_balance(field.into());
6624 self
6625 }
6626 }
6627 impl super::GetCheckpointRequest {
6628 pub const fn const_default() -> Self {
6629 Self {
6630 read_mask: None,
6631 checkpoint_id: None,
6632 }
6633 }
6634 #[doc(hidden)]
6635 pub fn default_instance() -> &'static Self {
6636 static DEFAULT: super::GetCheckpointRequest = super::GetCheckpointRequest::const_default();
6637 &DEFAULT
6638 }
6639 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
6641 self.read_mask.as_mut().map(|field| field as _)
6642 }
6643 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
6646 self.read_mask.get_or_insert_default()
6647 }
6648 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
6650 self.read_mask.as_ref().map(|field| field as _)
6651 }
6652 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
6654 self.read_mask = Some(field.into().into());
6655 }
6656 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
6658 mut self,
6659 field: T,
6660 ) -> Self {
6661 self.set_read_mask(field.into());
6662 self
6663 }
6664 pub fn sequence_number(&self) -> u64 {
6666 if let Some(
6667 super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
6668 ) = &self.checkpoint_id
6669 {
6670 *field
6671 } else {
6672 0u64
6673 }
6674 }
6675 pub fn sequence_number_opt(&self) -> Option<u64> {
6677 if let Some(
6678 super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
6679 ) = &self.checkpoint_id
6680 {
6681 Some(*field)
6682 } else {
6683 None
6684 }
6685 }
6686 pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
6688 if let Some(
6689 super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
6690 ) = &mut self.checkpoint_id
6691 {
6692 Some(field as _)
6693 } else {
6694 None
6695 }
6696 }
6697 pub fn sequence_number_mut(&mut self) -> &mut u64 {
6701 if self.sequence_number_opt_mut().is_none() {
6702 self.checkpoint_id = Some(
6703 super::get_checkpoint_request::CheckpointId::SequenceNumber(
6704 u64::default(),
6705 ),
6706 );
6707 }
6708 self.sequence_number_opt_mut().unwrap()
6709 }
6710 pub fn set_sequence_number(&mut self, field: u64) {
6713 self.checkpoint_id = Some(
6714 super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
6715 );
6716 }
6717 pub fn with_sequence_number(mut self, field: u64) -> Self {
6720 self.set_sequence_number(field);
6721 self
6722 }
6723 pub fn digest(&self) -> &str {
6725 if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &self
6726 .checkpoint_id
6727 {
6728 field as _
6729 } else {
6730 ""
6731 }
6732 }
6733 pub fn digest_opt(&self) -> Option<&str> {
6735 if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &self
6736 .checkpoint_id
6737 {
6738 Some(field as _)
6739 } else {
6740 None
6741 }
6742 }
6743 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
6745 if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &mut self
6746 .checkpoint_id
6747 {
6748 Some(field as _)
6749 } else {
6750 None
6751 }
6752 }
6753 pub fn digest_mut(&mut self) -> &mut String {
6757 if self.digest_opt_mut().is_none() {
6758 self.checkpoint_id = Some(
6759 super::get_checkpoint_request::CheckpointId::Digest(
6760 String::default(),
6761 ),
6762 );
6763 }
6764 self.digest_opt_mut().unwrap()
6765 }
6766 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
6769 self.checkpoint_id = Some(
6770 super::get_checkpoint_request::CheckpointId::Digest(field.into().into()),
6771 );
6772 }
6773 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
6776 self.set_digest(field.into());
6777 self
6778 }
6779 }
6780 impl super::GetCheckpointResponse {
6781 pub const fn const_default() -> Self {
6782 Self { checkpoint: None }
6783 }
6784 #[doc(hidden)]
6785 pub fn default_instance() -> &'static Self {
6786 static DEFAULT: super::GetCheckpointResponse = super::GetCheckpointResponse::const_default();
6787 &DEFAULT
6788 }
6789 pub fn checkpoint(&self) -> &super::Checkpoint {
6791 self.checkpoint
6792 .as_ref()
6793 .map(|field| field as _)
6794 .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
6795 }
6796 pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
6798 self.checkpoint.as_mut().map(|field| field as _)
6799 }
6800 pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
6803 self.checkpoint.get_or_insert_default()
6804 }
6805 pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
6807 self.checkpoint.as_ref().map(|field| field as _)
6808 }
6809 pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
6811 self.checkpoint = Some(field.into().into());
6812 }
6813 pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
6815 self.set_checkpoint(field.into());
6816 self
6817 }
6818 }
6819 impl super::GetCoinInfoRequest {
6820 pub const fn const_default() -> Self {
6821 Self { coin_type: None }
6822 }
6823 #[doc(hidden)]
6824 pub fn default_instance() -> &'static Self {
6825 static DEFAULT: super::GetCoinInfoRequest = super::GetCoinInfoRequest::const_default();
6826 &DEFAULT
6827 }
6828 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
6830 self.coin_type.as_mut().map(|field| field as _)
6831 }
6832 pub fn coin_type_mut(&mut self) -> &mut String {
6835 self.coin_type.get_or_insert_default()
6836 }
6837 pub fn coin_type_opt(&self) -> Option<&str> {
6839 self.coin_type.as_ref().map(|field| field as _)
6840 }
6841 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
6843 self.coin_type = Some(field.into().into());
6844 }
6845 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
6847 self.set_coin_type(field.into());
6848 self
6849 }
6850 }
6851 impl super::GetCoinInfoResponse {
6852 pub const fn const_default() -> Self {
6853 Self {
6854 coin_type: None,
6855 metadata: None,
6856 treasury: None,
6857 regulated_metadata: None,
6858 }
6859 }
6860 #[doc(hidden)]
6861 pub fn default_instance() -> &'static Self {
6862 static DEFAULT: super::GetCoinInfoResponse = super::GetCoinInfoResponse::const_default();
6863 &DEFAULT
6864 }
6865 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
6867 self.coin_type.as_mut().map(|field| field as _)
6868 }
6869 pub fn coin_type_mut(&mut self) -> &mut String {
6872 self.coin_type.get_or_insert_default()
6873 }
6874 pub fn coin_type_opt(&self) -> Option<&str> {
6876 self.coin_type.as_ref().map(|field| field as _)
6877 }
6878 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
6880 self.coin_type = Some(field.into().into());
6881 }
6882 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
6884 self.set_coin_type(field.into());
6885 self
6886 }
6887 pub fn metadata(&self) -> &super::CoinMetadata {
6889 self.metadata
6890 .as_ref()
6891 .map(|field| field as _)
6892 .unwrap_or_else(|| super::CoinMetadata::default_instance() as _)
6893 }
6894 pub fn metadata_opt_mut(&mut self) -> Option<&mut super::CoinMetadata> {
6896 self.metadata.as_mut().map(|field| field as _)
6897 }
6898 pub fn metadata_mut(&mut self) -> &mut super::CoinMetadata {
6901 self.metadata.get_or_insert_default()
6902 }
6903 pub fn metadata_opt(&self) -> Option<&super::CoinMetadata> {
6905 self.metadata.as_ref().map(|field| field as _)
6906 }
6907 pub fn set_metadata<T: Into<super::CoinMetadata>>(&mut self, field: T) {
6909 self.metadata = Some(field.into().into());
6910 }
6911 pub fn with_metadata<T: Into<super::CoinMetadata>>(mut self, field: T) -> Self {
6913 self.set_metadata(field.into());
6914 self
6915 }
6916 pub fn treasury(&self) -> &super::CoinTreasury {
6918 self.treasury
6919 .as_ref()
6920 .map(|field| field as _)
6921 .unwrap_or_else(|| super::CoinTreasury::default_instance() as _)
6922 }
6923 pub fn treasury_opt_mut(&mut self) -> Option<&mut super::CoinTreasury> {
6925 self.treasury.as_mut().map(|field| field as _)
6926 }
6927 pub fn treasury_mut(&mut self) -> &mut super::CoinTreasury {
6930 self.treasury.get_or_insert_default()
6931 }
6932 pub fn treasury_opt(&self) -> Option<&super::CoinTreasury> {
6934 self.treasury.as_ref().map(|field| field as _)
6935 }
6936 pub fn set_treasury<T: Into<super::CoinTreasury>>(&mut self, field: T) {
6938 self.treasury = Some(field.into().into());
6939 }
6940 pub fn with_treasury<T: Into<super::CoinTreasury>>(mut self, field: T) -> Self {
6942 self.set_treasury(field.into());
6943 self
6944 }
6945 pub fn regulated_metadata(&self) -> &super::RegulatedCoinMetadata {
6947 self.regulated_metadata
6948 .as_ref()
6949 .map(|field| field as _)
6950 .unwrap_or_else(|| super::RegulatedCoinMetadata::default_instance() as _)
6951 }
6952 pub fn regulated_metadata_opt_mut(
6954 &mut self,
6955 ) -> Option<&mut super::RegulatedCoinMetadata> {
6956 self.regulated_metadata.as_mut().map(|field| field as _)
6957 }
6958 pub fn regulated_metadata_mut(&mut self) -> &mut super::RegulatedCoinMetadata {
6961 self.regulated_metadata.get_or_insert_default()
6962 }
6963 pub fn regulated_metadata_opt(&self) -> Option<&super::RegulatedCoinMetadata> {
6965 self.regulated_metadata.as_ref().map(|field| field as _)
6966 }
6967 pub fn set_regulated_metadata<T: Into<super::RegulatedCoinMetadata>>(
6969 &mut self,
6970 field: T,
6971 ) {
6972 self.regulated_metadata = Some(field.into().into());
6973 }
6974 pub fn with_regulated_metadata<T: Into<super::RegulatedCoinMetadata>>(
6976 mut self,
6977 field: T,
6978 ) -> Self {
6979 self.set_regulated_metadata(field.into());
6980 self
6981 }
6982 }
6983 impl super::GetDatatypeRequest {
6984 pub const fn const_default() -> Self {
6985 Self {
6986 package_id: None,
6987 module_name: None,
6988 name: None,
6989 }
6990 }
6991 #[doc(hidden)]
6992 pub fn default_instance() -> &'static Self {
6993 static DEFAULT: super::GetDatatypeRequest = super::GetDatatypeRequest::const_default();
6994 &DEFAULT
6995 }
6996 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
6998 self.package_id.as_mut().map(|field| field as _)
6999 }
7000 pub fn package_id_mut(&mut self) -> &mut String {
7003 self.package_id.get_or_insert_default()
7004 }
7005 pub fn package_id_opt(&self) -> Option<&str> {
7007 self.package_id.as_ref().map(|field| field as _)
7008 }
7009 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
7011 self.package_id = Some(field.into().into());
7012 }
7013 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
7015 self.set_package_id(field.into());
7016 self
7017 }
7018 pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
7020 self.module_name.as_mut().map(|field| field as _)
7021 }
7022 pub fn module_name_mut(&mut self) -> &mut String {
7025 self.module_name.get_or_insert_default()
7026 }
7027 pub fn module_name_opt(&self) -> Option<&str> {
7029 self.module_name.as_ref().map(|field| field as _)
7030 }
7031 pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
7033 self.module_name = Some(field.into().into());
7034 }
7035 pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
7037 self.set_module_name(field.into());
7038 self
7039 }
7040 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
7042 self.name.as_mut().map(|field| field as _)
7043 }
7044 pub fn name_mut(&mut self) -> &mut String {
7047 self.name.get_or_insert_default()
7048 }
7049 pub fn name_opt(&self) -> Option<&str> {
7051 self.name.as_ref().map(|field| field as _)
7052 }
7053 pub fn set_name<T: Into<String>>(&mut self, field: T) {
7055 self.name = Some(field.into().into());
7056 }
7057 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
7059 self.set_name(field.into());
7060 self
7061 }
7062 }
7063 impl super::GetDatatypeResponse {
7064 pub const fn const_default() -> Self {
7065 Self { datatype: None }
7066 }
7067 #[doc(hidden)]
7068 pub fn default_instance() -> &'static Self {
7069 static DEFAULT: super::GetDatatypeResponse = super::GetDatatypeResponse::const_default();
7070 &DEFAULT
7071 }
7072 pub fn datatype(&self) -> &super::DatatypeDescriptor {
7074 self.datatype
7075 .as_ref()
7076 .map(|field| field as _)
7077 .unwrap_or_else(|| super::DatatypeDescriptor::default_instance() as _)
7078 }
7079 pub fn datatype_opt_mut(&mut self) -> Option<&mut super::DatatypeDescriptor> {
7081 self.datatype.as_mut().map(|field| field as _)
7082 }
7083 pub fn datatype_mut(&mut self) -> &mut super::DatatypeDescriptor {
7086 self.datatype.get_or_insert_default()
7087 }
7088 pub fn datatype_opt(&self) -> Option<&super::DatatypeDescriptor> {
7090 self.datatype.as_ref().map(|field| field as _)
7091 }
7092 pub fn set_datatype<T: Into<super::DatatypeDescriptor>>(&mut self, field: T) {
7094 self.datatype = Some(field.into().into());
7095 }
7096 pub fn with_datatype<T: Into<super::DatatypeDescriptor>>(
7098 mut self,
7099 field: T,
7100 ) -> Self {
7101 self.set_datatype(field.into());
7102 self
7103 }
7104 }
7105 impl super::GetEpochRequest {
7106 pub const fn const_default() -> Self {
7107 Self {
7108 epoch: None,
7109 read_mask: None,
7110 }
7111 }
7112 #[doc(hidden)]
7113 pub fn default_instance() -> &'static Self {
7114 static DEFAULT: super::GetEpochRequest = super::GetEpochRequest::const_default();
7115 &DEFAULT
7116 }
7117 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
7119 self.epoch.as_mut().map(|field| field as _)
7120 }
7121 pub fn epoch_mut(&mut self) -> &mut u64 {
7124 self.epoch.get_or_insert_default()
7125 }
7126 pub fn epoch_opt(&self) -> Option<u64> {
7128 self.epoch.as_ref().map(|field| *field)
7129 }
7130 pub fn set_epoch(&mut self, field: u64) {
7132 self.epoch = Some(field);
7133 }
7134 pub fn with_epoch(mut self, field: u64) -> Self {
7136 self.set_epoch(field);
7137 self
7138 }
7139 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
7141 self.read_mask.as_mut().map(|field| field as _)
7142 }
7143 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
7146 self.read_mask.get_or_insert_default()
7147 }
7148 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
7150 self.read_mask.as_ref().map(|field| field as _)
7151 }
7152 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
7154 self.read_mask = Some(field.into().into());
7155 }
7156 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
7158 mut self,
7159 field: T,
7160 ) -> Self {
7161 self.set_read_mask(field.into());
7162 self
7163 }
7164 }
7165 impl super::GetEpochResponse {
7166 pub const fn const_default() -> Self {
7167 Self { epoch: None }
7168 }
7169 #[doc(hidden)]
7170 pub fn default_instance() -> &'static Self {
7171 static DEFAULT: super::GetEpochResponse = super::GetEpochResponse::const_default();
7172 &DEFAULT
7173 }
7174 pub fn epoch(&self) -> &super::Epoch {
7176 self.epoch
7177 .as_ref()
7178 .map(|field| field as _)
7179 .unwrap_or_else(|| super::Epoch::default_instance() as _)
7180 }
7181 pub fn epoch_opt_mut(&mut self) -> Option<&mut super::Epoch> {
7183 self.epoch.as_mut().map(|field| field as _)
7184 }
7185 pub fn epoch_mut(&mut self) -> &mut super::Epoch {
7188 self.epoch.get_or_insert_default()
7189 }
7190 pub fn epoch_opt(&self) -> Option<&super::Epoch> {
7192 self.epoch.as_ref().map(|field| field as _)
7193 }
7194 pub fn set_epoch<T: Into<super::Epoch>>(&mut self, field: T) {
7196 self.epoch = Some(field.into().into());
7197 }
7198 pub fn with_epoch<T: Into<super::Epoch>>(mut self, field: T) -> Self {
7200 self.set_epoch(field.into());
7201 self
7202 }
7203 }
7204 impl super::GetFunctionRequest {
7205 pub const fn const_default() -> Self {
7206 Self {
7207 package_id: None,
7208 module_name: None,
7209 name: None,
7210 }
7211 }
7212 #[doc(hidden)]
7213 pub fn default_instance() -> &'static Self {
7214 static DEFAULT: super::GetFunctionRequest = super::GetFunctionRequest::const_default();
7215 &DEFAULT
7216 }
7217 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
7219 self.package_id.as_mut().map(|field| field as _)
7220 }
7221 pub fn package_id_mut(&mut self) -> &mut String {
7224 self.package_id.get_or_insert_default()
7225 }
7226 pub fn package_id_opt(&self) -> Option<&str> {
7228 self.package_id.as_ref().map(|field| field as _)
7229 }
7230 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
7232 self.package_id = Some(field.into().into());
7233 }
7234 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
7236 self.set_package_id(field.into());
7237 self
7238 }
7239 pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
7241 self.module_name.as_mut().map(|field| field as _)
7242 }
7243 pub fn module_name_mut(&mut self) -> &mut String {
7246 self.module_name.get_or_insert_default()
7247 }
7248 pub fn module_name_opt(&self) -> Option<&str> {
7250 self.module_name.as_ref().map(|field| field as _)
7251 }
7252 pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
7254 self.module_name = Some(field.into().into());
7255 }
7256 pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
7258 self.set_module_name(field.into());
7259 self
7260 }
7261 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
7263 self.name.as_mut().map(|field| field as _)
7264 }
7265 pub fn name_mut(&mut self) -> &mut String {
7268 self.name.get_or_insert_default()
7269 }
7270 pub fn name_opt(&self) -> Option<&str> {
7272 self.name.as_ref().map(|field| field as _)
7273 }
7274 pub fn set_name<T: Into<String>>(&mut self, field: T) {
7276 self.name = Some(field.into().into());
7277 }
7278 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
7280 self.set_name(field.into());
7281 self
7282 }
7283 }
7284 impl super::GetFunctionResponse {
7285 pub const fn const_default() -> Self {
7286 Self { function: None }
7287 }
7288 #[doc(hidden)]
7289 pub fn default_instance() -> &'static Self {
7290 static DEFAULT: super::GetFunctionResponse = super::GetFunctionResponse::const_default();
7291 &DEFAULT
7292 }
7293 pub fn function(&self) -> &super::FunctionDescriptor {
7295 self.function
7296 .as_ref()
7297 .map(|field| field as _)
7298 .unwrap_or_else(|| super::FunctionDescriptor::default_instance() as _)
7299 }
7300 pub fn function_opt_mut(&mut self) -> Option<&mut super::FunctionDescriptor> {
7302 self.function.as_mut().map(|field| field as _)
7303 }
7304 pub fn function_mut(&mut self) -> &mut super::FunctionDescriptor {
7307 self.function.get_or_insert_default()
7308 }
7309 pub fn function_opt(&self) -> Option<&super::FunctionDescriptor> {
7311 self.function.as_ref().map(|field| field as _)
7312 }
7313 pub fn set_function<T: Into<super::FunctionDescriptor>>(&mut self, field: T) {
7315 self.function = Some(field.into().into());
7316 }
7317 pub fn with_function<T: Into<super::FunctionDescriptor>>(
7319 mut self,
7320 field: T,
7321 ) -> Self {
7322 self.set_function(field.into());
7323 self
7324 }
7325 }
7326 impl super::GetObjectRequest {
7327 pub const fn const_default() -> Self {
7328 Self {
7329 object_id: None,
7330 version: None,
7331 read_mask: None,
7332 }
7333 }
7334 #[doc(hidden)]
7335 pub fn default_instance() -> &'static Self {
7336 static DEFAULT: super::GetObjectRequest = super::GetObjectRequest::const_default();
7337 &DEFAULT
7338 }
7339 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
7341 self.object_id.as_mut().map(|field| field as _)
7342 }
7343 pub fn object_id_mut(&mut self) -> &mut String {
7346 self.object_id.get_or_insert_default()
7347 }
7348 pub fn object_id_opt(&self) -> Option<&str> {
7350 self.object_id.as_ref().map(|field| field as _)
7351 }
7352 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
7354 self.object_id = Some(field.into().into());
7355 }
7356 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
7358 self.set_object_id(field.into());
7359 self
7360 }
7361 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
7363 self.version.as_mut().map(|field| field as _)
7364 }
7365 pub fn version_mut(&mut self) -> &mut u64 {
7368 self.version.get_or_insert_default()
7369 }
7370 pub fn version_opt(&self) -> Option<u64> {
7372 self.version.as_ref().map(|field| *field)
7373 }
7374 pub fn set_version(&mut self, field: u64) {
7376 self.version = Some(field);
7377 }
7378 pub fn with_version(mut self, field: u64) -> Self {
7380 self.set_version(field);
7381 self
7382 }
7383 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
7385 self.read_mask.as_mut().map(|field| field as _)
7386 }
7387 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
7390 self.read_mask.get_or_insert_default()
7391 }
7392 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
7394 self.read_mask.as_ref().map(|field| field as _)
7395 }
7396 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
7398 self.read_mask = Some(field.into().into());
7399 }
7400 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
7402 mut self,
7403 field: T,
7404 ) -> Self {
7405 self.set_read_mask(field.into());
7406 self
7407 }
7408 }
7409 impl super::GetObjectResponse {
7410 pub const fn const_default() -> Self {
7411 Self { object: None }
7412 }
7413 #[doc(hidden)]
7414 pub fn default_instance() -> &'static Self {
7415 static DEFAULT: super::GetObjectResponse = super::GetObjectResponse::const_default();
7416 &DEFAULT
7417 }
7418 pub fn object(&self) -> &super::Object {
7420 self.object
7421 .as_ref()
7422 .map(|field| field as _)
7423 .unwrap_or_else(|| super::Object::default_instance() as _)
7424 }
7425 pub fn object_opt_mut(&mut self) -> Option<&mut super::Object> {
7427 self.object.as_mut().map(|field| field as _)
7428 }
7429 pub fn object_mut(&mut self) -> &mut super::Object {
7432 self.object.get_or_insert_default()
7433 }
7434 pub fn object_opt(&self) -> Option<&super::Object> {
7436 self.object.as_ref().map(|field| field as _)
7437 }
7438 pub fn set_object<T: Into<super::Object>>(&mut self, field: T) {
7440 self.object = Some(field.into().into());
7441 }
7442 pub fn with_object<T: Into<super::Object>>(mut self, field: T) -> Self {
7444 self.set_object(field.into());
7445 self
7446 }
7447 }
7448 impl super::GetObjectResult {
7449 pub const fn const_default() -> Self {
7450 Self { result: None }
7451 }
7452 #[doc(hidden)]
7453 pub fn default_instance() -> &'static Self {
7454 static DEFAULT: super::GetObjectResult = super::GetObjectResult::const_default();
7455 &DEFAULT
7456 }
7457 pub fn object(&self) -> &super::Object {
7459 if let Some(super::get_object_result::Result::Object(field)) = &self.result {
7460 field as _
7461 } else {
7462 super::Object::default_instance() as _
7463 }
7464 }
7465 pub fn object_opt(&self) -> Option<&super::Object> {
7467 if let Some(super::get_object_result::Result::Object(field)) = &self.result {
7468 Some(field as _)
7469 } else {
7470 None
7471 }
7472 }
7473 pub fn object_opt_mut(&mut self) -> Option<&mut super::Object> {
7475 if let Some(super::get_object_result::Result::Object(field)) = &mut self
7476 .result
7477 {
7478 Some(field as _)
7479 } else {
7480 None
7481 }
7482 }
7483 pub fn object_mut(&mut self) -> &mut super::Object {
7487 if self.object_opt_mut().is_none() {
7488 self.result = Some(
7489 super::get_object_result::Result::Object(super::Object::default()),
7490 );
7491 }
7492 self.object_opt_mut().unwrap()
7493 }
7494 pub fn set_object<T: Into<super::Object>>(&mut self, field: T) {
7497 self.result = Some(
7498 super::get_object_result::Result::Object(field.into().into()),
7499 );
7500 }
7501 pub fn with_object<T: Into<super::Object>>(mut self, field: T) -> Self {
7504 self.set_object(field.into());
7505 self
7506 }
7507 pub fn error(&self) -> &super::super::super::super::google::rpc::Status {
7509 if let Some(super::get_object_result::Result::Error(field)) = &self.result {
7510 field as _
7511 } else {
7512 super::super::super::super::google::rpc::Status::default_instance() as _
7513 }
7514 }
7515 pub fn error_opt(
7517 &self,
7518 ) -> Option<&super::super::super::super::google::rpc::Status> {
7519 if let Some(super::get_object_result::Result::Error(field)) = &self.result {
7520 Some(field as _)
7521 } else {
7522 None
7523 }
7524 }
7525 pub fn error_opt_mut(
7527 &mut self,
7528 ) -> Option<&mut super::super::super::super::google::rpc::Status> {
7529 if let Some(super::get_object_result::Result::Error(field)) = &mut self
7530 .result
7531 {
7532 Some(field as _)
7533 } else {
7534 None
7535 }
7536 }
7537 pub fn error_mut(
7541 &mut self,
7542 ) -> &mut super::super::super::super::google::rpc::Status {
7543 if self.error_opt_mut().is_none() {
7544 self.result = Some(
7545 super::get_object_result::Result::Error(
7546 super::super::super::super::google::rpc::Status::default(),
7547 ),
7548 );
7549 }
7550 self.error_opt_mut().unwrap()
7551 }
7552 pub fn set_error<T: Into<super::super::super::super::google::rpc::Status>>(
7555 &mut self,
7556 field: T,
7557 ) {
7558 self.result = Some(
7559 super::get_object_result::Result::Error(field.into().into()),
7560 );
7561 }
7562 pub fn with_error<T: Into<super::super::super::super::google::rpc::Status>>(
7565 mut self,
7566 field: T,
7567 ) -> Self {
7568 self.set_error(field.into());
7569 self
7570 }
7571 }
7572 impl super::GetPackageRequest {
7573 pub const fn const_default() -> Self {
7574 Self { package_id: None }
7575 }
7576 #[doc(hidden)]
7577 pub fn default_instance() -> &'static Self {
7578 static DEFAULT: super::GetPackageRequest = super::GetPackageRequest::const_default();
7579 &DEFAULT
7580 }
7581 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
7583 self.package_id.as_mut().map(|field| field as _)
7584 }
7585 pub fn package_id_mut(&mut self) -> &mut String {
7588 self.package_id.get_or_insert_default()
7589 }
7590 pub fn package_id_opt(&self) -> Option<&str> {
7592 self.package_id.as_ref().map(|field| field as _)
7593 }
7594 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
7596 self.package_id = Some(field.into().into());
7597 }
7598 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
7600 self.set_package_id(field.into());
7601 self
7602 }
7603 }
7604 impl super::GetPackageResponse {
7605 pub const fn const_default() -> Self {
7606 Self { package: None }
7607 }
7608 #[doc(hidden)]
7609 pub fn default_instance() -> &'static Self {
7610 static DEFAULT: super::GetPackageResponse = super::GetPackageResponse::const_default();
7611 &DEFAULT
7612 }
7613 pub fn package(&self) -> &super::Package {
7615 self.package
7616 .as_ref()
7617 .map(|field| field as _)
7618 .unwrap_or_else(|| super::Package::default_instance() as _)
7619 }
7620 pub fn package_opt_mut(&mut self) -> Option<&mut super::Package> {
7622 self.package.as_mut().map(|field| field as _)
7623 }
7624 pub fn package_mut(&mut self) -> &mut super::Package {
7627 self.package.get_or_insert_default()
7628 }
7629 pub fn package_opt(&self) -> Option<&super::Package> {
7631 self.package.as_ref().map(|field| field as _)
7632 }
7633 pub fn set_package<T: Into<super::Package>>(&mut self, field: T) {
7635 self.package = Some(field.into().into());
7636 }
7637 pub fn with_package<T: Into<super::Package>>(mut self, field: T) -> Self {
7639 self.set_package(field.into());
7640 self
7641 }
7642 }
7643 impl super::GetServiceInfoRequest {
7644 pub const fn const_default() -> Self {
7645 Self {}
7646 }
7647 #[doc(hidden)]
7648 pub fn default_instance() -> &'static Self {
7649 static DEFAULT: super::GetServiceInfoRequest = super::GetServiceInfoRequest::const_default();
7650 &DEFAULT
7651 }
7652 }
7653 impl super::GetServiceInfoResponse {
7654 pub const fn const_default() -> Self {
7655 Self {
7656 chain_id: None,
7657 chain: None,
7658 epoch: None,
7659 checkpoint_height: None,
7660 timestamp: None,
7661 lowest_available_checkpoint: None,
7662 lowest_available_checkpoint_objects: None,
7663 server: None,
7664 }
7665 }
7666 #[doc(hidden)]
7667 pub fn default_instance() -> &'static Self {
7668 static DEFAULT: super::GetServiceInfoResponse = super::GetServiceInfoResponse::const_default();
7669 &DEFAULT
7670 }
7671 pub fn chain_id_opt_mut(&mut self) -> Option<&mut String> {
7673 self.chain_id.as_mut().map(|field| field as _)
7674 }
7675 pub fn chain_id_mut(&mut self) -> &mut String {
7678 self.chain_id.get_or_insert_default()
7679 }
7680 pub fn chain_id_opt(&self) -> Option<&str> {
7682 self.chain_id.as_ref().map(|field| field as _)
7683 }
7684 pub fn set_chain_id<T: Into<String>>(&mut self, field: T) {
7686 self.chain_id = Some(field.into().into());
7687 }
7688 pub fn with_chain_id<T: Into<String>>(mut self, field: T) -> Self {
7690 self.set_chain_id(field.into());
7691 self
7692 }
7693 pub fn chain_opt_mut(&mut self) -> Option<&mut String> {
7695 self.chain.as_mut().map(|field| field as _)
7696 }
7697 pub fn chain_mut(&mut self) -> &mut String {
7700 self.chain.get_or_insert_default()
7701 }
7702 pub fn chain_opt(&self) -> Option<&str> {
7704 self.chain.as_ref().map(|field| field as _)
7705 }
7706 pub fn set_chain<T: Into<String>>(&mut self, field: T) {
7708 self.chain = Some(field.into().into());
7709 }
7710 pub fn with_chain<T: Into<String>>(mut self, field: T) -> Self {
7712 self.set_chain(field.into());
7713 self
7714 }
7715 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
7717 self.epoch.as_mut().map(|field| field as _)
7718 }
7719 pub fn epoch_mut(&mut self) -> &mut u64 {
7722 self.epoch.get_or_insert_default()
7723 }
7724 pub fn epoch_opt(&self) -> Option<u64> {
7726 self.epoch.as_ref().map(|field| *field)
7727 }
7728 pub fn set_epoch(&mut self, field: u64) {
7730 self.epoch = Some(field);
7731 }
7732 pub fn with_epoch(mut self, field: u64) -> Self {
7734 self.set_epoch(field);
7735 self
7736 }
7737 pub fn checkpoint_height_opt_mut(&mut self) -> Option<&mut u64> {
7739 self.checkpoint_height.as_mut().map(|field| field as _)
7740 }
7741 pub fn checkpoint_height_mut(&mut self) -> &mut u64 {
7744 self.checkpoint_height.get_or_insert_default()
7745 }
7746 pub fn checkpoint_height_opt(&self) -> Option<u64> {
7748 self.checkpoint_height.as_ref().map(|field| *field)
7749 }
7750 pub fn set_checkpoint_height(&mut self, field: u64) {
7752 self.checkpoint_height = Some(field);
7753 }
7754 pub fn with_checkpoint_height(mut self, field: u64) -> Self {
7756 self.set_checkpoint_height(field);
7757 self
7758 }
7759 pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
7761 self.timestamp.as_mut().map(|field| field as _)
7762 }
7763 pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
7766 self.timestamp.get_or_insert_default()
7767 }
7768 pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
7770 self.timestamp.as_ref().map(|field| field as _)
7771 }
7772 pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
7774 self.timestamp = Some(field.into().into());
7775 }
7776 pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
7778 mut self,
7779 field: T,
7780 ) -> Self {
7781 self.set_timestamp(field.into());
7782 self
7783 }
7784 pub fn lowest_available_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
7786 self.lowest_available_checkpoint.as_mut().map(|field| field as _)
7787 }
7788 pub fn lowest_available_checkpoint_mut(&mut self) -> &mut u64 {
7791 self.lowest_available_checkpoint.get_or_insert_default()
7792 }
7793 pub fn lowest_available_checkpoint_opt(&self) -> Option<u64> {
7795 self.lowest_available_checkpoint.as_ref().map(|field| *field)
7796 }
7797 pub fn set_lowest_available_checkpoint(&mut self, field: u64) {
7799 self.lowest_available_checkpoint = Some(field);
7800 }
7801 pub fn with_lowest_available_checkpoint(mut self, field: u64) -> Self {
7803 self.set_lowest_available_checkpoint(field);
7804 self
7805 }
7806 pub fn lowest_available_checkpoint_objects_opt_mut(
7808 &mut self,
7809 ) -> Option<&mut u64> {
7810 self.lowest_available_checkpoint_objects.as_mut().map(|field| field as _)
7811 }
7812 pub fn lowest_available_checkpoint_objects_mut(&mut self) -> &mut u64 {
7815 self.lowest_available_checkpoint_objects.get_or_insert_default()
7816 }
7817 pub fn lowest_available_checkpoint_objects_opt(&self) -> Option<u64> {
7819 self.lowest_available_checkpoint_objects.as_ref().map(|field| *field)
7820 }
7821 pub fn set_lowest_available_checkpoint_objects(&mut self, field: u64) {
7823 self.lowest_available_checkpoint_objects = Some(field);
7824 }
7825 pub fn with_lowest_available_checkpoint_objects(mut self, field: u64) -> Self {
7827 self.set_lowest_available_checkpoint_objects(field);
7828 self
7829 }
7830 pub fn server_opt_mut(&mut self) -> Option<&mut String> {
7832 self.server.as_mut().map(|field| field as _)
7833 }
7834 pub fn server_mut(&mut self) -> &mut String {
7837 self.server.get_or_insert_default()
7838 }
7839 pub fn server_opt(&self) -> Option<&str> {
7841 self.server.as_ref().map(|field| field as _)
7842 }
7843 pub fn set_server<T: Into<String>>(&mut self, field: T) {
7845 self.server = Some(field.into().into());
7846 }
7847 pub fn with_server<T: Into<String>>(mut self, field: T) -> Self {
7849 self.set_server(field.into());
7850 self
7851 }
7852 }
7853 impl super::GetTransactionRequest {
7854 pub const fn const_default() -> Self {
7855 Self {
7856 digest: None,
7857 read_mask: None,
7858 }
7859 }
7860 #[doc(hidden)]
7861 pub fn default_instance() -> &'static Self {
7862 static DEFAULT: super::GetTransactionRequest = super::GetTransactionRequest::const_default();
7863 &DEFAULT
7864 }
7865 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
7867 self.digest.as_mut().map(|field| field as _)
7868 }
7869 pub fn digest_mut(&mut self) -> &mut String {
7872 self.digest.get_or_insert_default()
7873 }
7874 pub fn digest_opt(&self) -> Option<&str> {
7876 self.digest.as_ref().map(|field| field as _)
7877 }
7878 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
7880 self.digest = Some(field.into().into());
7881 }
7882 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
7884 self.set_digest(field.into());
7885 self
7886 }
7887 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
7889 self.read_mask.as_mut().map(|field| field as _)
7890 }
7891 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
7894 self.read_mask.get_or_insert_default()
7895 }
7896 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
7898 self.read_mask.as_ref().map(|field| field as _)
7899 }
7900 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
7902 self.read_mask = Some(field.into().into());
7903 }
7904 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
7906 mut self,
7907 field: T,
7908 ) -> Self {
7909 self.set_read_mask(field.into());
7910 self
7911 }
7912 }
7913 impl super::GetTransactionResponse {
7914 pub const fn const_default() -> Self {
7915 Self { transaction: None }
7916 }
7917 #[doc(hidden)]
7918 pub fn default_instance() -> &'static Self {
7919 static DEFAULT: super::GetTransactionResponse = super::GetTransactionResponse::const_default();
7920 &DEFAULT
7921 }
7922 pub fn transaction(&self) -> &super::ExecutedTransaction {
7924 self.transaction
7925 .as_ref()
7926 .map(|field| field as _)
7927 .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
7928 }
7929 pub fn transaction_opt_mut(
7931 &mut self,
7932 ) -> Option<&mut super::ExecutedTransaction> {
7933 self.transaction.as_mut().map(|field| field as _)
7934 }
7935 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
7938 self.transaction.get_or_insert_default()
7939 }
7940 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
7942 self.transaction.as_ref().map(|field| field as _)
7943 }
7944 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
7946 &mut self,
7947 field: T,
7948 ) {
7949 self.transaction = Some(field.into().into());
7950 }
7951 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
7953 mut self,
7954 field: T,
7955 ) -> Self {
7956 self.set_transaction(field.into());
7957 self
7958 }
7959 }
7960 impl super::GetTransactionResult {
7961 pub const fn const_default() -> Self {
7962 Self { result: None }
7963 }
7964 #[doc(hidden)]
7965 pub fn default_instance() -> &'static Self {
7966 static DEFAULT: super::GetTransactionResult = super::GetTransactionResult::const_default();
7967 &DEFAULT
7968 }
7969 pub fn transaction(&self) -> &super::ExecutedTransaction {
7971 if let Some(super::get_transaction_result::Result::Transaction(field)) = &self
7972 .result
7973 {
7974 field as _
7975 } else {
7976 super::ExecutedTransaction::default_instance() as _
7977 }
7978 }
7979 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
7981 if let Some(super::get_transaction_result::Result::Transaction(field)) = &self
7982 .result
7983 {
7984 Some(field as _)
7985 } else {
7986 None
7987 }
7988 }
7989 pub fn transaction_opt_mut(
7991 &mut self,
7992 ) -> Option<&mut super::ExecutedTransaction> {
7993 if let Some(super::get_transaction_result::Result::Transaction(field)) = &mut self
7994 .result
7995 {
7996 Some(field as _)
7997 } else {
7998 None
7999 }
8000 }
8001 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
8005 if self.transaction_opt_mut().is_none() {
8006 self.result = Some(
8007 super::get_transaction_result::Result::Transaction(
8008 super::ExecutedTransaction::default(),
8009 ),
8010 );
8011 }
8012 self.transaction_opt_mut().unwrap()
8013 }
8014 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
8017 &mut self,
8018 field: T,
8019 ) {
8020 self.result = Some(
8021 super::get_transaction_result::Result::Transaction(field.into().into()),
8022 );
8023 }
8024 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
8027 mut self,
8028 field: T,
8029 ) -> Self {
8030 self.set_transaction(field.into());
8031 self
8032 }
8033 pub fn error(&self) -> &super::super::super::super::google::rpc::Status {
8035 if let Some(super::get_transaction_result::Result::Error(field)) = &self
8036 .result
8037 {
8038 field as _
8039 } else {
8040 super::super::super::super::google::rpc::Status::default_instance() as _
8041 }
8042 }
8043 pub fn error_opt(
8045 &self,
8046 ) -> Option<&super::super::super::super::google::rpc::Status> {
8047 if let Some(super::get_transaction_result::Result::Error(field)) = &self
8048 .result
8049 {
8050 Some(field as _)
8051 } else {
8052 None
8053 }
8054 }
8055 pub fn error_opt_mut(
8057 &mut self,
8058 ) -> Option<&mut super::super::super::super::google::rpc::Status> {
8059 if let Some(super::get_transaction_result::Result::Error(field)) = &mut self
8060 .result
8061 {
8062 Some(field as _)
8063 } else {
8064 None
8065 }
8066 }
8067 pub fn error_mut(
8071 &mut self,
8072 ) -> &mut super::super::super::super::google::rpc::Status {
8073 if self.error_opt_mut().is_none() {
8074 self.result = Some(
8075 super::get_transaction_result::Result::Error(
8076 super::super::super::super::google::rpc::Status::default(),
8077 ),
8078 );
8079 }
8080 self.error_opt_mut().unwrap()
8081 }
8082 pub fn set_error<T: Into<super::super::super::super::google::rpc::Status>>(
8085 &mut self,
8086 field: T,
8087 ) {
8088 self.result = Some(
8089 super::get_transaction_result::Result::Error(field.into().into()),
8090 );
8091 }
8092 pub fn with_error<T: Into<super::super::super::super::google::rpc::Status>>(
8095 mut self,
8096 field: T,
8097 ) -> Self {
8098 self.set_error(field.into());
8099 self
8100 }
8101 }
8102 impl super::IndexError {
8103 pub const fn const_default() -> Self {
8104 Self {
8105 index: None,
8106 subresult: None,
8107 }
8108 }
8109 #[doc(hidden)]
8110 pub fn default_instance() -> &'static Self {
8111 static DEFAULT: super::IndexError = super::IndexError::const_default();
8112 &DEFAULT
8113 }
8114 pub fn index_opt_mut(&mut self) -> Option<&mut u32> {
8116 self.index.as_mut().map(|field| field as _)
8117 }
8118 pub fn index_mut(&mut self) -> &mut u32 {
8121 self.index.get_or_insert_default()
8122 }
8123 pub fn index_opt(&self) -> Option<u32> {
8125 self.index.as_ref().map(|field| *field)
8126 }
8127 pub fn set_index(&mut self, field: u32) {
8129 self.index = Some(field);
8130 }
8131 pub fn with_index(mut self, field: u32) -> Self {
8133 self.set_index(field);
8134 self
8135 }
8136 pub fn subresult_opt_mut(&mut self) -> Option<&mut u32> {
8138 self.subresult.as_mut().map(|field| field as _)
8139 }
8140 pub fn subresult_mut(&mut self) -> &mut u32 {
8143 self.subresult.get_or_insert_default()
8144 }
8145 pub fn subresult_opt(&self) -> Option<u32> {
8147 self.subresult.as_ref().map(|field| *field)
8148 }
8149 pub fn set_subresult(&mut self, field: u32) {
8151 self.subresult = Some(field);
8152 }
8153 pub fn with_subresult(mut self, field: u32) -> Self {
8155 self.set_subresult(field);
8156 self
8157 }
8158 }
8159 impl super::Input {
8160 pub const fn const_default() -> Self {
8161 Self {
8162 kind: None,
8163 pure: None,
8164 object_id: None,
8165 version: None,
8166 digest: None,
8167 mutable: None,
8168 literal: None,
8169 }
8170 }
8171 #[doc(hidden)]
8172 pub fn default_instance() -> &'static Self {
8173 static DEFAULT: super::Input = super::Input::const_default();
8174 &DEFAULT
8175 }
8176 pub fn with_kind<T: Into<super::input::InputKind>>(mut self, field: T) -> Self {
8178 self.set_kind(field.into());
8179 self
8180 }
8181 pub fn pure_opt(&self) -> Option<&[u8]> {
8183 self.pure.as_ref().map(|field| field as _)
8184 }
8185 pub fn set_pure<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
8187 self.pure = Some(field.into().into());
8188 }
8189 pub fn with_pure<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
8191 self.set_pure(field.into());
8192 self
8193 }
8194 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
8196 self.object_id.as_mut().map(|field| field as _)
8197 }
8198 pub fn object_id_mut(&mut self) -> &mut String {
8201 self.object_id.get_or_insert_default()
8202 }
8203 pub fn object_id_opt(&self) -> Option<&str> {
8205 self.object_id.as_ref().map(|field| field as _)
8206 }
8207 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
8209 self.object_id = Some(field.into().into());
8210 }
8211 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
8213 self.set_object_id(field.into());
8214 self
8215 }
8216 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
8218 self.version.as_mut().map(|field| field as _)
8219 }
8220 pub fn version_mut(&mut self) -> &mut u64 {
8223 self.version.get_or_insert_default()
8224 }
8225 pub fn version_opt(&self) -> Option<u64> {
8227 self.version.as_ref().map(|field| *field)
8228 }
8229 pub fn set_version(&mut self, field: u64) {
8231 self.version = Some(field);
8232 }
8233 pub fn with_version(mut self, field: u64) -> Self {
8235 self.set_version(field);
8236 self
8237 }
8238 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
8240 self.digest.as_mut().map(|field| field as _)
8241 }
8242 pub fn digest_mut(&mut self) -> &mut String {
8245 self.digest.get_or_insert_default()
8246 }
8247 pub fn digest_opt(&self) -> Option<&str> {
8249 self.digest.as_ref().map(|field| field as _)
8250 }
8251 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
8253 self.digest = Some(field.into().into());
8254 }
8255 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
8257 self.set_digest(field.into());
8258 self
8259 }
8260 pub fn mutable_opt_mut(&mut self) -> Option<&mut bool> {
8262 self.mutable.as_mut().map(|field| field as _)
8263 }
8264 pub fn mutable_mut(&mut self) -> &mut bool {
8267 self.mutable.get_or_insert_default()
8268 }
8269 pub fn mutable_opt(&self) -> Option<bool> {
8271 self.mutable.as_ref().map(|field| *field)
8272 }
8273 pub fn set_mutable(&mut self, field: bool) {
8275 self.mutable = Some(field);
8276 }
8277 pub fn with_mutable(mut self, field: bool) -> Self {
8279 self.set_mutable(field);
8280 self
8281 }
8282 pub fn literal_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
8284 self.literal.as_mut().map(|field| field as _)
8285 }
8286 pub fn literal_mut(&mut self) -> &mut ::prost_types::Value {
8289 self.literal.get_or_insert_default()
8290 }
8291 pub fn literal_opt(&self) -> Option<&::prost_types::Value> {
8293 self.literal.as_ref().map(|field| field as _)
8294 }
8295 pub fn set_literal<T: Into<::prost_types::Value>>(&mut self, field: T) {
8297 self.literal = Some(field.into().into());
8298 }
8299 pub fn with_literal<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
8301 self.set_literal(field.into());
8302 self
8303 }
8304 }
8305 impl super::Jwk {
8306 pub const fn const_default() -> Self {
8307 Self {
8308 kty: None,
8309 e: None,
8310 n: None,
8311 alg: None,
8312 }
8313 }
8314 #[doc(hidden)]
8315 pub fn default_instance() -> &'static Self {
8316 static DEFAULT: super::Jwk = super::Jwk::const_default();
8317 &DEFAULT
8318 }
8319 pub fn kty_opt_mut(&mut self) -> Option<&mut String> {
8321 self.kty.as_mut().map(|field| field as _)
8322 }
8323 pub fn kty_mut(&mut self) -> &mut String {
8326 self.kty.get_or_insert_default()
8327 }
8328 pub fn kty_opt(&self) -> Option<&str> {
8330 self.kty.as_ref().map(|field| field as _)
8331 }
8332 pub fn set_kty<T: Into<String>>(&mut self, field: T) {
8334 self.kty = Some(field.into().into());
8335 }
8336 pub fn with_kty<T: Into<String>>(mut self, field: T) -> Self {
8338 self.set_kty(field.into());
8339 self
8340 }
8341 pub fn e_opt_mut(&mut self) -> Option<&mut String> {
8343 self.e.as_mut().map(|field| field as _)
8344 }
8345 pub fn e_mut(&mut self) -> &mut String {
8348 self.e.get_or_insert_default()
8349 }
8350 pub fn e_opt(&self) -> Option<&str> {
8352 self.e.as_ref().map(|field| field as _)
8353 }
8354 pub fn set_e<T: Into<String>>(&mut self, field: T) {
8356 self.e = Some(field.into().into());
8357 }
8358 pub fn with_e<T: Into<String>>(mut self, field: T) -> Self {
8360 self.set_e(field.into());
8361 self
8362 }
8363 pub fn n_opt_mut(&mut self) -> Option<&mut String> {
8365 self.n.as_mut().map(|field| field as _)
8366 }
8367 pub fn n_mut(&mut self) -> &mut String {
8370 self.n.get_or_insert_default()
8371 }
8372 pub fn n_opt(&self) -> Option<&str> {
8374 self.n.as_ref().map(|field| field as _)
8375 }
8376 pub fn set_n<T: Into<String>>(&mut self, field: T) {
8378 self.n = Some(field.into().into());
8379 }
8380 pub fn with_n<T: Into<String>>(mut self, field: T) -> Self {
8382 self.set_n(field.into());
8383 self
8384 }
8385 pub fn alg_opt_mut(&mut self) -> Option<&mut String> {
8387 self.alg.as_mut().map(|field| field as _)
8388 }
8389 pub fn alg_mut(&mut self) -> &mut String {
8392 self.alg.get_or_insert_default()
8393 }
8394 pub fn alg_opt(&self) -> Option<&str> {
8396 self.alg.as_ref().map(|field| field as _)
8397 }
8398 pub fn set_alg<T: Into<String>>(&mut self, field: T) {
8400 self.alg = Some(field.into().into());
8401 }
8402 pub fn with_alg<T: Into<String>>(mut self, field: T) -> Self {
8404 self.set_alg(field.into());
8405 self
8406 }
8407 }
8408 impl super::JwkId {
8409 pub const fn const_default() -> Self {
8410 Self { iss: None, kid: None }
8411 }
8412 #[doc(hidden)]
8413 pub fn default_instance() -> &'static Self {
8414 static DEFAULT: super::JwkId = super::JwkId::const_default();
8415 &DEFAULT
8416 }
8417 pub fn iss_opt_mut(&mut self) -> Option<&mut String> {
8419 self.iss.as_mut().map(|field| field as _)
8420 }
8421 pub fn iss_mut(&mut self) -> &mut String {
8424 self.iss.get_or_insert_default()
8425 }
8426 pub fn iss_opt(&self) -> Option<&str> {
8428 self.iss.as_ref().map(|field| field as _)
8429 }
8430 pub fn set_iss<T: Into<String>>(&mut self, field: T) {
8432 self.iss = Some(field.into().into());
8433 }
8434 pub fn with_iss<T: Into<String>>(mut self, field: T) -> Self {
8436 self.set_iss(field.into());
8437 self
8438 }
8439 pub fn kid_opt_mut(&mut self) -> Option<&mut String> {
8441 self.kid.as_mut().map(|field| field as _)
8442 }
8443 pub fn kid_mut(&mut self) -> &mut String {
8446 self.kid.get_or_insert_default()
8447 }
8448 pub fn kid_opt(&self) -> Option<&str> {
8450 self.kid.as_ref().map(|field| field as _)
8451 }
8452 pub fn set_kid<T: Into<String>>(&mut self, field: T) {
8454 self.kid = Some(field.into().into());
8455 }
8456 pub fn with_kid<T: Into<String>>(mut self, field: T) -> Self {
8458 self.set_kid(field.into());
8459 self
8460 }
8461 }
8462 impl super::Linkage {
8463 pub const fn const_default() -> Self {
8464 Self {
8465 original_id: None,
8466 upgraded_id: None,
8467 upgraded_version: None,
8468 }
8469 }
8470 #[doc(hidden)]
8471 pub fn default_instance() -> &'static Self {
8472 static DEFAULT: super::Linkage = super::Linkage::const_default();
8473 &DEFAULT
8474 }
8475 pub fn original_id_opt_mut(&mut self) -> Option<&mut String> {
8477 self.original_id.as_mut().map(|field| field as _)
8478 }
8479 pub fn original_id_mut(&mut self) -> &mut String {
8482 self.original_id.get_or_insert_default()
8483 }
8484 pub fn original_id_opt(&self) -> Option<&str> {
8486 self.original_id.as_ref().map(|field| field as _)
8487 }
8488 pub fn set_original_id<T: Into<String>>(&mut self, field: T) {
8490 self.original_id = Some(field.into().into());
8491 }
8492 pub fn with_original_id<T: Into<String>>(mut self, field: T) -> Self {
8494 self.set_original_id(field.into());
8495 self
8496 }
8497 pub fn upgraded_id_opt_mut(&mut self) -> Option<&mut String> {
8499 self.upgraded_id.as_mut().map(|field| field as _)
8500 }
8501 pub fn upgraded_id_mut(&mut self) -> &mut String {
8504 self.upgraded_id.get_or_insert_default()
8505 }
8506 pub fn upgraded_id_opt(&self) -> Option<&str> {
8508 self.upgraded_id.as_ref().map(|field| field as _)
8509 }
8510 pub fn set_upgraded_id<T: Into<String>>(&mut self, field: T) {
8512 self.upgraded_id = Some(field.into().into());
8513 }
8514 pub fn with_upgraded_id<T: Into<String>>(mut self, field: T) -> Self {
8516 self.set_upgraded_id(field.into());
8517 self
8518 }
8519 pub fn upgraded_version_opt_mut(&mut self) -> Option<&mut u64> {
8521 self.upgraded_version.as_mut().map(|field| field as _)
8522 }
8523 pub fn upgraded_version_mut(&mut self) -> &mut u64 {
8526 self.upgraded_version.get_or_insert_default()
8527 }
8528 pub fn upgraded_version_opt(&self) -> Option<u64> {
8530 self.upgraded_version.as_ref().map(|field| *field)
8531 }
8532 pub fn set_upgraded_version(&mut self, field: u64) {
8534 self.upgraded_version = Some(field);
8535 }
8536 pub fn with_upgraded_version(mut self, field: u64) -> Self {
8538 self.set_upgraded_version(field);
8539 self
8540 }
8541 }
8542 impl super::ListBalancesRequest {
8543 pub const fn const_default() -> Self {
8544 Self {
8545 owner: None,
8546 page_size: None,
8547 page_token: None,
8548 }
8549 }
8550 #[doc(hidden)]
8551 pub fn default_instance() -> &'static Self {
8552 static DEFAULT: super::ListBalancesRequest = super::ListBalancesRequest::const_default();
8553 &DEFAULT
8554 }
8555 pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
8557 self.owner.as_mut().map(|field| field as _)
8558 }
8559 pub fn owner_mut(&mut self) -> &mut String {
8562 self.owner.get_or_insert_default()
8563 }
8564 pub fn owner_opt(&self) -> Option<&str> {
8566 self.owner.as_ref().map(|field| field as _)
8567 }
8568 pub fn set_owner<T: Into<String>>(&mut self, field: T) {
8570 self.owner = Some(field.into().into());
8571 }
8572 pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
8574 self.set_owner(field.into());
8575 self
8576 }
8577 pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
8579 self.page_size.as_mut().map(|field| field as _)
8580 }
8581 pub fn page_size_mut(&mut self) -> &mut u32 {
8584 self.page_size.get_or_insert_default()
8585 }
8586 pub fn page_size_opt(&self) -> Option<u32> {
8588 self.page_size.as_ref().map(|field| *field)
8589 }
8590 pub fn set_page_size(&mut self, field: u32) {
8592 self.page_size = Some(field);
8593 }
8594 pub fn with_page_size(mut self, field: u32) -> Self {
8596 self.set_page_size(field);
8597 self
8598 }
8599 pub fn page_token_opt(&self) -> Option<&[u8]> {
8601 self.page_token.as_ref().map(|field| field as _)
8602 }
8603 pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
8605 self.page_token = Some(field.into().into());
8606 }
8607 pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
8609 mut self,
8610 field: T,
8611 ) -> Self {
8612 self.set_page_token(field.into());
8613 self
8614 }
8615 }
8616 impl super::ListBalancesResponse {
8617 pub const fn const_default() -> Self {
8618 Self {
8619 balances: Vec::new(),
8620 next_page_token: None,
8621 }
8622 }
8623 #[doc(hidden)]
8624 pub fn default_instance() -> &'static Self {
8625 static DEFAULT: super::ListBalancesResponse = super::ListBalancesResponse::const_default();
8626 &DEFAULT
8627 }
8628 pub fn balances(&self) -> &[super::Balance] {
8630 &self.balances
8631 }
8632 pub fn balances_mut(&mut self) -> &mut Vec<super::Balance> {
8635 &mut self.balances
8636 }
8637 pub fn set_balances(&mut self, field: Vec<super::Balance>) {
8639 self.balances = field;
8640 }
8641 pub fn with_balances(mut self, field: Vec<super::Balance>) -> Self {
8643 self.set_balances(field);
8644 self
8645 }
8646 pub fn next_page_token_opt(&self) -> Option<&[u8]> {
8648 self.next_page_token.as_ref().map(|field| field as _)
8649 }
8650 pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
8652 self.next_page_token = Some(field.into().into());
8653 }
8654 pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
8656 mut self,
8657 field: T,
8658 ) -> Self {
8659 self.set_next_page_token(field.into());
8660 self
8661 }
8662 }
8663 impl super::ListDynamicFieldsRequest {
8664 pub const fn const_default() -> Self {
8665 Self {
8666 parent: None,
8667 page_size: None,
8668 page_token: None,
8669 read_mask: None,
8670 }
8671 }
8672 #[doc(hidden)]
8673 pub fn default_instance() -> &'static Self {
8674 static DEFAULT: super::ListDynamicFieldsRequest = super::ListDynamicFieldsRequest::const_default();
8675 &DEFAULT
8676 }
8677 pub fn parent_opt_mut(&mut self) -> Option<&mut String> {
8679 self.parent.as_mut().map(|field| field as _)
8680 }
8681 pub fn parent_mut(&mut self) -> &mut String {
8684 self.parent.get_or_insert_default()
8685 }
8686 pub fn parent_opt(&self) -> Option<&str> {
8688 self.parent.as_ref().map(|field| field as _)
8689 }
8690 pub fn set_parent<T: Into<String>>(&mut self, field: T) {
8692 self.parent = Some(field.into().into());
8693 }
8694 pub fn with_parent<T: Into<String>>(mut self, field: T) -> Self {
8696 self.set_parent(field.into());
8697 self
8698 }
8699 pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
8701 self.page_size.as_mut().map(|field| field as _)
8702 }
8703 pub fn page_size_mut(&mut self) -> &mut u32 {
8706 self.page_size.get_or_insert_default()
8707 }
8708 pub fn page_size_opt(&self) -> Option<u32> {
8710 self.page_size.as_ref().map(|field| *field)
8711 }
8712 pub fn set_page_size(&mut self, field: u32) {
8714 self.page_size = Some(field);
8715 }
8716 pub fn with_page_size(mut self, field: u32) -> Self {
8718 self.set_page_size(field);
8719 self
8720 }
8721 pub fn page_token_opt(&self) -> Option<&[u8]> {
8723 self.page_token.as_ref().map(|field| field as _)
8724 }
8725 pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
8727 self.page_token = Some(field.into().into());
8728 }
8729 pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
8731 mut self,
8732 field: T,
8733 ) -> Self {
8734 self.set_page_token(field.into());
8735 self
8736 }
8737 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
8739 self.read_mask.as_mut().map(|field| field as _)
8740 }
8741 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
8744 self.read_mask.get_or_insert_default()
8745 }
8746 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
8748 self.read_mask.as_ref().map(|field| field as _)
8749 }
8750 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
8752 self.read_mask = Some(field.into().into());
8753 }
8754 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
8756 mut self,
8757 field: T,
8758 ) -> Self {
8759 self.set_read_mask(field.into());
8760 self
8761 }
8762 }
8763 impl super::ListDynamicFieldsResponse {
8764 pub const fn const_default() -> Self {
8765 Self {
8766 dynamic_fields: Vec::new(),
8767 next_page_token: None,
8768 }
8769 }
8770 #[doc(hidden)]
8771 pub fn default_instance() -> &'static Self {
8772 static DEFAULT: super::ListDynamicFieldsResponse = super::ListDynamicFieldsResponse::const_default();
8773 &DEFAULT
8774 }
8775 pub fn dynamic_fields(&self) -> &[super::DynamicField] {
8777 &self.dynamic_fields
8778 }
8779 pub fn dynamic_fields_mut(&mut self) -> &mut Vec<super::DynamicField> {
8782 &mut self.dynamic_fields
8783 }
8784 pub fn set_dynamic_fields(&mut self, field: Vec<super::DynamicField>) {
8786 self.dynamic_fields = field;
8787 }
8788 pub fn with_dynamic_fields(mut self, field: Vec<super::DynamicField>) -> Self {
8790 self.set_dynamic_fields(field);
8791 self
8792 }
8793 pub fn next_page_token_opt(&self) -> Option<&[u8]> {
8795 self.next_page_token.as_ref().map(|field| field as _)
8796 }
8797 pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
8799 self.next_page_token = Some(field.into().into());
8800 }
8801 pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
8803 mut self,
8804 field: T,
8805 ) -> Self {
8806 self.set_next_page_token(field.into());
8807 self
8808 }
8809 }
8810 impl super::ListOwnedObjectsRequest {
8811 pub const fn const_default() -> Self {
8812 Self {
8813 owner: None,
8814 page_size: None,
8815 page_token: None,
8816 read_mask: None,
8817 object_type: None,
8818 }
8819 }
8820 #[doc(hidden)]
8821 pub fn default_instance() -> &'static Self {
8822 static DEFAULT: super::ListOwnedObjectsRequest = super::ListOwnedObjectsRequest::const_default();
8823 &DEFAULT
8824 }
8825 pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
8827 self.owner.as_mut().map(|field| field as _)
8828 }
8829 pub fn owner_mut(&mut self) -> &mut String {
8832 self.owner.get_or_insert_default()
8833 }
8834 pub fn owner_opt(&self) -> Option<&str> {
8836 self.owner.as_ref().map(|field| field as _)
8837 }
8838 pub fn set_owner<T: Into<String>>(&mut self, field: T) {
8840 self.owner = Some(field.into().into());
8841 }
8842 pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
8844 self.set_owner(field.into());
8845 self
8846 }
8847 pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
8849 self.page_size.as_mut().map(|field| field as _)
8850 }
8851 pub fn page_size_mut(&mut self) -> &mut u32 {
8854 self.page_size.get_or_insert_default()
8855 }
8856 pub fn page_size_opt(&self) -> Option<u32> {
8858 self.page_size.as_ref().map(|field| *field)
8859 }
8860 pub fn set_page_size(&mut self, field: u32) {
8862 self.page_size = Some(field);
8863 }
8864 pub fn with_page_size(mut self, field: u32) -> Self {
8866 self.set_page_size(field);
8867 self
8868 }
8869 pub fn page_token_opt(&self) -> Option<&[u8]> {
8871 self.page_token.as_ref().map(|field| field as _)
8872 }
8873 pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
8875 self.page_token = Some(field.into().into());
8876 }
8877 pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
8879 mut self,
8880 field: T,
8881 ) -> Self {
8882 self.set_page_token(field.into());
8883 self
8884 }
8885 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
8887 self.read_mask.as_mut().map(|field| field as _)
8888 }
8889 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
8892 self.read_mask.get_or_insert_default()
8893 }
8894 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
8896 self.read_mask.as_ref().map(|field| field as _)
8897 }
8898 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
8900 self.read_mask = Some(field.into().into());
8901 }
8902 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
8904 mut self,
8905 field: T,
8906 ) -> Self {
8907 self.set_read_mask(field.into());
8908 self
8909 }
8910 pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
8912 self.object_type.as_mut().map(|field| field as _)
8913 }
8914 pub fn object_type_mut(&mut self) -> &mut String {
8917 self.object_type.get_or_insert_default()
8918 }
8919 pub fn object_type_opt(&self) -> Option<&str> {
8921 self.object_type.as_ref().map(|field| field as _)
8922 }
8923 pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
8925 self.object_type = Some(field.into().into());
8926 }
8927 pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
8929 self.set_object_type(field.into());
8930 self
8931 }
8932 }
8933 impl super::ListOwnedObjectsResponse {
8934 pub const fn const_default() -> Self {
8935 Self {
8936 objects: Vec::new(),
8937 next_page_token: None,
8938 }
8939 }
8940 #[doc(hidden)]
8941 pub fn default_instance() -> &'static Self {
8942 static DEFAULT: super::ListOwnedObjectsResponse = super::ListOwnedObjectsResponse::const_default();
8943 &DEFAULT
8944 }
8945 pub fn objects(&self) -> &[super::Object] {
8947 &self.objects
8948 }
8949 pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
8952 &mut self.objects
8953 }
8954 pub fn set_objects(&mut self, field: Vec<super::Object>) {
8956 self.objects = field;
8957 }
8958 pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
8960 self.set_objects(field);
8961 self
8962 }
8963 pub fn next_page_token_opt(&self) -> Option<&[u8]> {
8965 self.next_page_token.as_ref().map(|field| field as _)
8966 }
8967 pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
8969 self.next_page_token = Some(field.into().into());
8970 }
8971 pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
8973 mut self,
8974 field: T,
8975 ) -> Self {
8976 self.set_next_page_token(field.into());
8977 self
8978 }
8979 }
8980 impl super::ListPackageVersionsRequest {
8981 pub const fn const_default() -> Self {
8982 Self {
8983 package_id: None,
8984 page_size: None,
8985 page_token: None,
8986 }
8987 }
8988 #[doc(hidden)]
8989 pub fn default_instance() -> &'static Self {
8990 static DEFAULT: super::ListPackageVersionsRequest = super::ListPackageVersionsRequest::const_default();
8991 &DEFAULT
8992 }
8993 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
8995 self.package_id.as_mut().map(|field| field as _)
8996 }
8997 pub fn package_id_mut(&mut self) -> &mut String {
9000 self.package_id.get_or_insert_default()
9001 }
9002 pub fn package_id_opt(&self) -> Option<&str> {
9004 self.package_id.as_ref().map(|field| field as _)
9005 }
9006 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
9008 self.package_id = Some(field.into().into());
9009 }
9010 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
9012 self.set_package_id(field.into());
9013 self
9014 }
9015 pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
9017 self.page_size.as_mut().map(|field| field as _)
9018 }
9019 pub fn page_size_mut(&mut self) -> &mut u32 {
9022 self.page_size.get_or_insert_default()
9023 }
9024 pub fn page_size_opt(&self) -> Option<u32> {
9026 self.page_size.as_ref().map(|field| *field)
9027 }
9028 pub fn set_page_size(&mut self, field: u32) {
9030 self.page_size = Some(field);
9031 }
9032 pub fn with_page_size(mut self, field: u32) -> Self {
9034 self.set_page_size(field);
9035 self
9036 }
9037 pub fn page_token_opt(&self) -> Option<&[u8]> {
9039 self.page_token.as_ref().map(|field| field as _)
9040 }
9041 pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9043 self.page_token = Some(field.into().into());
9044 }
9045 pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
9047 mut self,
9048 field: T,
9049 ) -> Self {
9050 self.set_page_token(field.into());
9051 self
9052 }
9053 }
9054 impl super::ListPackageVersionsResponse {
9055 pub const fn const_default() -> Self {
9056 Self {
9057 versions: Vec::new(),
9058 next_page_token: None,
9059 }
9060 }
9061 #[doc(hidden)]
9062 pub fn default_instance() -> &'static Self {
9063 static DEFAULT: super::ListPackageVersionsResponse = super::ListPackageVersionsResponse::const_default();
9064 &DEFAULT
9065 }
9066 pub fn versions(&self) -> &[super::PackageVersion] {
9068 &self.versions
9069 }
9070 pub fn versions_mut(&mut self) -> &mut Vec<super::PackageVersion> {
9073 &mut self.versions
9074 }
9075 pub fn set_versions(&mut self, field: Vec<super::PackageVersion>) {
9077 self.versions = field;
9078 }
9079 pub fn with_versions(mut self, field: Vec<super::PackageVersion>) -> Self {
9081 self.set_versions(field);
9082 self
9083 }
9084 pub fn next_page_token_opt(&self) -> Option<&[u8]> {
9086 self.next_page_token.as_ref().map(|field| field as _)
9087 }
9088 pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9090 self.next_page_token = Some(field.into().into());
9091 }
9092 pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
9094 mut self,
9095 field: T,
9096 ) -> Self {
9097 self.set_next_page_token(field.into());
9098 self
9099 }
9100 }
9101 impl super::LookupNameRequest {
9102 pub const fn const_default() -> Self {
9103 Self { name: None }
9104 }
9105 #[doc(hidden)]
9106 pub fn default_instance() -> &'static Self {
9107 static DEFAULT: super::LookupNameRequest = super::LookupNameRequest::const_default();
9108 &DEFAULT
9109 }
9110 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
9112 self.name.as_mut().map(|field| field as _)
9113 }
9114 pub fn name_mut(&mut self) -> &mut String {
9117 self.name.get_or_insert_default()
9118 }
9119 pub fn name_opt(&self) -> Option<&str> {
9121 self.name.as_ref().map(|field| field as _)
9122 }
9123 pub fn set_name<T: Into<String>>(&mut self, field: T) {
9125 self.name = Some(field.into().into());
9126 }
9127 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
9129 self.set_name(field.into());
9130 self
9131 }
9132 }
9133 impl super::LookupNameResponse {
9134 pub const fn const_default() -> Self {
9135 Self { record: None }
9136 }
9137 #[doc(hidden)]
9138 pub fn default_instance() -> &'static Self {
9139 static DEFAULT: super::LookupNameResponse = super::LookupNameResponse::const_default();
9140 &DEFAULT
9141 }
9142 pub fn record(&self) -> &super::NameRecord {
9144 self.record
9145 .as_ref()
9146 .map(|field| field as _)
9147 .unwrap_or_else(|| super::NameRecord::default_instance() as _)
9148 }
9149 pub fn record_opt_mut(&mut self) -> Option<&mut super::NameRecord> {
9151 self.record.as_mut().map(|field| field as _)
9152 }
9153 pub fn record_mut(&mut self) -> &mut super::NameRecord {
9156 self.record.get_or_insert_default()
9157 }
9158 pub fn record_opt(&self) -> Option<&super::NameRecord> {
9160 self.record.as_ref().map(|field| field as _)
9161 }
9162 pub fn set_record<T: Into<super::NameRecord>>(&mut self, field: T) {
9164 self.record = Some(field.into().into());
9165 }
9166 pub fn with_record<T: Into<super::NameRecord>>(mut self, field: T) -> Self {
9168 self.set_record(field.into());
9169 self
9170 }
9171 }
9172 impl super::MakeMoveVector {
9173 pub const fn const_default() -> Self {
9174 Self {
9175 element_type: None,
9176 elements: Vec::new(),
9177 }
9178 }
9179 #[doc(hidden)]
9180 pub fn default_instance() -> &'static Self {
9181 static DEFAULT: super::MakeMoveVector = super::MakeMoveVector::const_default();
9182 &DEFAULT
9183 }
9184 pub fn element_type_opt_mut(&mut self) -> Option<&mut String> {
9186 self.element_type.as_mut().map(|field| field as _)
9187 }
9188 pub fn element_type_mut(&mut self) -> &mut String {
9191 self.element_type.get_or_insert_default()
9192 }
9193 pub fn element_type_opt(&self) -> Option<&str> {
9195 self.element_type.as_ref().map(|field| field as _)
9196 }
9197 pub fn set_element_type<T: Into<String>>(&mut self, field: T) {
9199 self.element_type = Some(field.into().into());
9200 }
9201 pub fn with_element_type<T: Into<String>>(mut self, field: T) -> Self {
9203 self.set_element_type(field.into());
9204 self
9205 }
9206 pub fn elements(&self) -> &[super::Argument] {
9208 &self.elements
9209 }
9210 pub fn elements_mut(&mut self) -> &mut Vec<super::Argument> {
9213 &mut self.elements
9214 }
9215 pub fn set_elements(&mut self, field: Vec<super::Argument>) {
9217 self.elements = field;
9218 }
9219 pub fn with_elements(mut self, field: Vec<super::Argument>) -> Self {
9221 self.set_elements(field);
9222 self
9223 }
9224 }
9225 impl super::MergeCoins {
9226 pub const fn const_default() -> Self {
9227 Self {
9228 coin: None,
9229 coins_to_merge: Vec::new(),
9230 }
9231 }
9232 #[doc(hidden)]
9233 pub fn default_instance() -> &'static Self {
9234 static DEFAULT: super::MergeCoins = super::MergeCoins::const_default();
9235 &DEFAULT
9236 }
9237 pub fn coin(&self) -> &super::Argument {
9239 self.coin
9240 .as_ref()
9241 .map(|field| field as _)
9242 .unwrap_or_else(|| super::Argument::default_instance() as _)
9243 }
9244 pub fn coin_opt_mut(&mut self) -> Option<&mut super::Argument> {
9246 self.coin.as_mut().map(|field| field as _)
9247 }
9248 pub fn coin_mut(&mut self) -> &mut super::Argument {
9251 self.coin.get_or_insert_default()
9252 }
9253 pub fn coin_opt(&self) -> Option<&super::Argument> {
9255 self.coin.as_ref().map(|field| field as _)
9256 }
9257 pub fn set_coin<T: Into<super::Argument>>(&mut self, field: T) {
9259 self.coin = Some(field.into().into());
9260 }
9261 pub fn with_coin<T: Into<super::Argument>>(mut self, field: T) -> Self {
9263 self.set_coin(field.into());
9264 self
9265 }
9266 pub fn coins_to_merge(&self) -> &[super::Argument] {
9268 &self.coins_to_merge
9269 }
9270 pub fn coins_to_merge_mut(&mut self) -> &mut Vec<super::Argument> {
9273 &mut self.coins_to_merge
9274 }
9275 pub fn set_coins_to_merge(&mut self, field: Vec<super::Argument>) {
9277 self.coins_to_merge = field;
9278 }
9279 pub fn with_coins_to_merge(mut self, field: Vec<super::Argument>) -> Self {
9281 self.set_coins_to_merge(field);
9282 self
9283 }
9284 }
9285 impl super::Module {
9286 pub const fn const_default() -> Self {
9287 Self {
9288 name: None,
9289 contents: None,
9290 datatypes: Vec::new(),
9291 functions: Vec::new(),
9292 }
9293 }
9294 #[doc(hidden)]
9295 pub fn default_instance() -> &'static Self {
9296 static DEFAULT: super::Module = super::Module::const_default();
9297 &DEFAULT
9298 }
9299 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
9301 self.name.as_mut().map(|field| field as _)
9302 }
9303 pub fn name_mut(&mut self) -> &mut String {
9306 self.name.get_or_insert_default()
9307 }
9308 pub fn name_opt(&self) -> Option<&str> {
9310 self.name.as_ref().map(|field| field as _)
9311 }
9312 pub fn set_name<T: Into<String>>(&mut self, field: T) {
9314 self.name = Some(field.into().into());
9315 }
9316 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
9318 self.set_name(field.into());
9319 self
9320 }
9321 pub fn contents_opt(&self) -> Option<&[u8]> {
9323 self.contents.as_ref().map(|field| field as _)
9324 }
9325 pub fn set_contents<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9327 self.contents = Some(field.into().into());
9328 }
9329 pub fn with_contents<T: Into<::prost::bytes::Bytes>>(
9331 mut self,
9332 field: T,
9333 ) -> Self {
9334 self.set_contents(field.into());
9335 self
9336 }
9337 pub fn datatypes(&self) -> &[super::DatatypeDescriptor] {
9339 &self.datatypes
9340 }
9341 pub fn datatypes_mut(&mut self) -> &mut Vec<super::DatatypeDescriptor> {
9344 &mut self.datatypes
9345 }
9346 pub fn set_datatypes(&mut self, field: Vec<super::DatatypeDescriptor>) {
9348 self.datatypes = field;
9349 }
9350 pub fn with_datatypes(mut self, field: Vec<super::DatatypeDescriptor>) -> Self {
9352 self.set_datatypes(field);
9353 self
9354 }
9355 pub fn functions(&self) -> &[super::FunctionDescriptor] {
9357 &self.functions
9358 }
9359 pub fn functions_mut(&mut self) -> &mut Vec<super::FunctionDescriptor> {
9362 &mut self.functions
9363 }
9364 pub fn set_functions(&mut self, field: Vec<super::FunctionDescriptor>) {
9366 self.functions = field;
9367 }
9368 pub fn with_functions(mut self, field: Vec<super::FunctionDescriptor>) -> Self {
9370 self.set_functions(field);
9371 self
9372 }
9373 }
9374 impl super::MoveAbort {
9375 pub const fn const_default() -> Self {
9376 Self {
9377 abort_code: None,
9378 location: None,
9379 clever_error: None,
9380 }
9381 }
9382 #[doc(hidden)]
9383 pub fn default_instance() -> &'static Self {
9384 static DEFAULT: super::MoveAbort = super::MoveAbort::const_default();
9385 &DEFAULT
9386 }
9387 pub fn abort_code_opt_mut(&mut self) -> Option<&mut u64> {
9389 self.abort_code.as_mut().map(|field| field as _)
9390 }
9391 pub fn abort_code_mut(&mut self) -> &mut u64 {
9394 self.abort_code.get_or_insert_default()
9395 }
9396 pub fn abort_code_opt(&self) -> Option<u64> {
9398 self.abort_code.as_ref().map(|field| *field)
9399 }
9400 pub fn set_abort_code(&mut self, field: u64) {
9402 self.abort_code = Some(field);
9403 }
9404 pub fn with_abort_code(mut self, field: u64) -> Self {
9406 self.set_abort_code(field);
9407 self
9408 }
9409 pub fn location(&self) -> &super::MoveLocation {
9411 self.location
9412 .as_ref()
9413 .map(|field| field as _)
9414 .unwrap_or_else(|| super::MoveLocation::default_instance() as _)
9415 }
9416 pub fn location_opt_mut(&mut self) -> Option<&mut super::MoveLocation> {
9418 self.location.as_mut().map(|field| field as _)
9419 }
9420 pub fn location_mut(&mut self) -> &mut super::MoveLocation {
9423 self.location.get_or_insert_default()
9424 }
9425 pub fn location_opt(&self) -> Option<&super::MoveLocation> {
9427 self.location.as_ref().map(|field| field as _)
9428 }
9429 pub fn set_location<T: Into<super::MoveLocation>>(&mut self, field: T) {
9431 self.location = Some(field.into().into());
9432 }
9433 pub fn with_location<T: Into<super::MoveLocation>>(mut self, field: T) -> Self {
9435 self.set_location(field.into());
9436 self
9437 }
9438 pub fn clever_error(&self) -> &super::CleverError {
9440 self.clever_error
9441 .as_ref()
9442 .map(|field| field as _)
9443 .unwrap_or_else(|| super::CleverError::default_instance() as _)
9444 }
9445 pub fn clever_error_opt_mut(&mut self) -> Option<&mut super::CleverError> {
9447 self.clever_error.as_mut().map(|field| field as _)
9448 }
9449 pub fn clever_error_mut(&mut self) -> &mut super::CleverError {
9452 self.clever_error.get_or_insert_default()
9453 }
9454 pub fn clever_error_opt(&self) -> Option<&super::CleverError> {
9456 self.clever_error.as_ref().map(|field| field as _)
9457 }
9458 pub fn set_clever_error<T: Into<super::CleverError>>(&mut self, field: T) {
9460 self.clever_error = Some(field.into().into());
9461 }
9462 pub fn with_clever_error<T: Into<super::CleverError>>(
9464 mut self,
9465 field: T,
9466 ) -> Self {
9467 self.set_clever_error(field.into());
9468 self
9469 }
9470 }
9471 impl super::MoveCall {
9472 pub const fn const_default() -> Self {
9473 Self {
9474 package: None,
9475 module: None,
9476 function: None,
9477 type_arguments: Vec::new(),
9478 arguments: Vec::new(),
9479 }
9480 }
9481 #[doc(hidden)]
9482 pub fn default_instance() -> &'static Self {
9483 static DEFAULT: super::MoveCall = super::MoveCall::const_default();
9484 &DEFAULT
9485 }
9486 pub fn package_opt_mut(&mut self) -> Option<&mut String> {
9488 self.package.as_mut().map(|field| field as _)
9489 }
9490 pub fn package_mut(&mut self) -> &mut String {
9493 self.package.get_or_insert_default()
9494 }
9495 pub fn package_opt(&self) -> Option<&str> {
9497 self.package.as_ref().map(|field| field as _)
9498 }
9499 pub fn set_package<T: Into<String>>(&mut self, field: T) {
9501 self.package = Some(field.into().into());
9502 }
9503 pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
9505 self.set_package(field.into());
9506 self
9507 }
9508 pub fn module_opt_mut(&mut self) -> Option<&mut String> {
9510 self.module.as_mut().map(|field| field as _)
9511 }
9512 pub fn module_mut(&mut self) -> &mut String {
9515 self.module.get_or_insert_default()
9516 }
9517 pub fn module_opt(&self) -> Option<&str> {
9519 self.module.as_ref().map(|field| field as _)
9520 }
9521 pub fn set_module<T: Into<String>>(&mut self, field: T) {
9523 self.module = Some(field.into().into());
9524 }
9525 pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
9527 self.set_module(field.into());
9528 self
9529 }
9530 pub fn function_opt_mut(&mut self) -> Option<&mut String> {
9532 self.function.as_mut().map(|field| field as _)
9533 }
9534 pub fn function_mut(&mut self) -> &mut String {
9537 self.function.get_or_insert_default()
9538 }
9539 pub fn function_opt(&self) -> Option<&str> {
9541 self.function.as_ref().map(|field| field as _)
9542 }
9543 pub fn set_function<T: Into<String>>(&mut self, field: T) {
9545 self.function = Some(field.into().into());
9546 }
9547 pub fn with_function<T: Into<String>>(mut self, field: T) -> Self {
9549 self.set_function(field.into());
9550 self
9551 }
9552 pub fn type_arguments(&self) -> &[String] {
9554 &self.type_arguments
9555 }
9556 pub fn type_arguments_mut(&mut self) -> &mut Vec<String> {
9559 &mut self.type_arguments
9560 }
9561 pub fn set_type_arguments(&mut self, field: Vec<String>) {
9563 self.type_arguments = field;
9564 }
9565 pub fn with_type_arguments(mut self, field: Vec<String>) -> Self {
9567 self.set_type_arguments(field);
9568 self
9569 }
9570 pub fn arguments(&self) -> &[super::Argument] {
9572 &self.arguments
9573 }
9574 pub fn arguments_mut(&mut self) -> &mut Vec<super::Argument> {
9577 &mut self.arguments
9578 }
9579 pub fn set_arguments(&mut self, field: Vec<super::Argument>) {
9581 self.arguments = field;
9582 }
9583 pub fn with_arguments(mut self, field: Vec<super::Argument>) -> Self {
9585 self.set_arguments(field);
9586 self
9587 }
9588 }
9589 impl super::MoveLocation {
9590 pub const fn const_default() -> Self {
9591 Self {
9592 package: None,
9593 module: None,
9594 function: None,
9595 instruction: None,
9596 function_name: None,
9597 }
9598 }
9599 #[doc(hidden)]
9600 pub fn default_instance() -> &'static Self {
9601 static DEFAULT: super::MoveLocation = super::MoveLocation::const_default();
9602 &DEFAULT
9603 }
9604 pub fn package_opt_mut(&mut self) -> Option<&mut String> {
9606 self.package.as_mut().map(|field| field as _)
9607 }
9608 pub fn package_mut(&mut self) -> &mut String {
9611 self.package.get_or_insert_default()
9612 }
9613 pub fn package_opt(&self) -> Option<&str> {
9615 self.package.as_ref().map(|field| field as _)
9616 }
9617 pub fn set_package<T: Into<String>>(&mut self, field: T) {
9619 self.package = Some(field.into().into());
9620 }
9621 pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
9623 self.set_package(field.into());
9624 self
9625 }
9626 pub fn module_opt_mut(&mut self) -> Option<&mut String> {
9628 self.module.as_mut().map(|field| field as _)
9629 }
9630 pub fn module_mut(&mut self) -> &mut String {
9633 self.module.get_or_insert_default()
9634 }
9635 pub fn module_opt(&self) -> Option<&str> {
9637 self.module.as_ref().map(|field| field as _)
9638 }
9639 pub fn set_module<T: Into<String>>(&mut self, field: T) {
9641 self.module = Some(field.into().into());
9642 }
9643 pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
9645 self.set_module(field.into());
9646 self
9647 }
9648 pub fn function_opt_mut(&mut self) -> Option<&mut u32> {
9650 self.function.as_mut().map(|field| field as _)
9651 }
9652 pub fn function_mut(&mut self) -> &mut u32 {
9655 self.function.get_or_insert_default()
9656 }
9657 pub fn function_opt(&self) -> Option<u32> {
9659 self.function.as_ref().map(|field| *field)
9660 }
9661 pub fn set_function(&mut self, field: u32) {
9663 self.function = Some(field);
9664 }
9665 pub fn with_function(mut self, field: u32) -> Self {
9667 self.set_function(field);
9668 self
9669 }
9670 pub fn instruction_opt_mut(&mut self) -> Option<&mut u32> {
9672 self.instruction.as_mut().map(|field| field as _)
9673 }
9674 pub fn instruction_mut(&mut self) -> &mut u32 {
9677 self.instruction.get_or_insert_default()
9678 }
9679 pub fn instruction_opt(&self) -> Option<u32> {
9681 self.instruction.as_ref().map(|field| *field)
9682 }
9683 pub fn set_instruction(&mut self, field: u32) {
9685 self.instruction = Some(field);
9686 }
9687 pub fn with_instruction(mut self, field: u32) -> Self {
9689 self.set_instruction(field);
9690 self
9691 }
9692 pub fn function_name_opt_mut(&mut self) -> Option<&mut String> {
9694 self.function_name.as_mut().map(|field| field as _)
9695 }
9696 pub fn function_name_mut(&mut self) -> &mut String {
9699 self.function_name.get_or_insert_default()
9700 }
9701 pub fn function_name_opt(&self) -> Option<&str> {
9703 self.function_name.as_ref().map(|field| field as _)
9704 }
9705 pub fn set_function_name<T: Into<String>>(&mut self, field: T) {
9707 self.function_name = Some(field.into().into());
9708 }
9709 pub fn with_function_name<T: Into<String>>(mut self, field: T) -> Self {
9711 self.set_function_name(field.into());
9712 self
9713 }
9714 }
9715 impl super::MoveTable {
9716 pub const fn const_default() -> Self {
9717 Self { id: None, size: None }
9718 }
9719 #[doc(hidden)]
9720 pub fn default_instance() -> &'static Self {
9721 static DEFAULT: super::MoveTable = super::MoveTable::const_default();
9722 &DEFAULT
9723 }
9724 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
9726 self.id.as_mut().map(|field| field as _)
9727 }
9728 pub fn id_mut(&mut self) -> &mut String {
9731 self.id.get_or_insert_default()
9732 }
9733 pub fn id_opt(&self) -> Option<&str> {
9735 self.id.as_ref().map(|field| field as _)
9736 }
9737 pub fn set_id<T: Into<String>>(&mut self, field: T) {
9739 self.id = Some(field.into().into());
9740 }
9741 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
9743 self.set_id(field.into());
9744 self
9745 }
9746 pub fn size_opt_mut(&mut self) -> Option<&mut u64> {
9748 self.size.as_mut().map(|field| field as _)
9749 }
9750 pub fn size_mut(&mut self) -> &mut u64 {
9753 self.size.get_or_insert_default()
9754 }
9755 pub fn size_opt(&self) -> Option<u64> {
9757 self.size.as_ref().map(|field| *field)
9758 }
9759 pub fn set_size(&mut self, field: u64) {
9761 self.size = Some(field);
9762 }
9763 pub fn with_size(mut self, field: u64) -> Self {
9765 self.set_size(field);
9766 self
9767 }
9768 }
9769 impl super::MultisigAggregatedSignature {
9770 pub const fn const_default() -> Self {
9771 Self {
9772 signatures: Vec::new(),
9773 bitmap: None,
9774 legacy_bitmap: None,
9775 committee: None,
9776 }
9777 }
9778 #[doc(hidden)]
9779 pub fn default_instance() -> &'static Self {
9780 static DEFAULT: super::MultisigAggregatedSignature = super::MultisigAggregatedSignature::const_default();
9781 &DEFAULT
9782 }
9783 pub fn signatures(&self) -> &[super::MultisigMemberSignature] {
9785 &self.signatures
9786 }
9787 pub fn signatures_mut(&mut self) -> &mut Vec<super::MultisigMemberSignature> {
9790 &mut self.signatures
9791 }
9792 pub fn set_signatures(&mut self, field: Vec<super::MultisigMemberSignature>) {
9794 self.signatures = field;
9795 }
9796 pub fn with_signatures(
9798 mut self,
9799 field: Vec<super::MultisigMemberSignature>,
9800 ) -> Self {
9801 self.set_signatures(field);
9802 self
9803 }
9804 pub fn bitmap_opt_mut(&mut self) -> Option<&mut u32> {
9806 self.bitmap.as_mut().map(|field| field as _)
9807 }
9808 pub fn bitmap_mut(&mut self) -> &mut u32 {
9811 self.bitmap.get_or_insert_default()
9812 }
9813 pub fn bitmap_opt(&self) -> Option<u32> {
9815 self.bitmap.as_ref().map(|field| *field)
9816 }
9817 pub fn set_bitmap(&mut self, field: u32) {
9819 self.bitmap = Some(field);
9820 }
9821 pub fn with_bitmap(mut self, field: u32) -> Self {
9823 self.set_bitmap(field);
9824 self
9825 }
9826 pub fn legacy_bitmap_opt(&self) -> Option<&[u8]> {
9828 self.legacy_bitmap.as_ref().map(|field| field as _)
9829 }
9830 pub fn set_legacy_bitmap<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9832 self.legacy_bitmap = Some(field.into().into());
9833 }
9834 pub fn with_legacy_bitmap<T: Into<::prost::bytes::Bytes>>(
9836 mut self,
9837 field: T,
9838 ) -> Self {
9839 self.set_legacy_bitmap(field.into());
9840 self
9841 }
9842 pub fn committee(&self) -> &super::MultisigCommittee {
9844 self.committee
9845 .as_ref()
9846 .map(|field| field as _)
9847 .unwrap_or_else(|| super::MultisigCommittee::default_instance() as _)
9848 }
9849 pub fn committee_opt_mut(&mut self) -> Option<&mut super::MultisigCommittee> {
9851 self.committee.as_mut().map(|field| field as _)
9852 }
9853 pub fn committee_mut(&mut self) -> &mut super::MultisigCommittee {
9856 self.committee.get_or_insert_default()
9857 }
9858 pub fn committee_opt(&self) -> Option<&super::MultisigCommittee> {
9860 self.committee.as_ref().map(|field| field as _)
9861 }
9862 pub fn set_committee<T: Into<super::MultisigCommittee>>(&mut self, field: T) {
9864 self.committee = Some(field.into().into());
9865 }
9866 pub fn with_committee<T: Into<super::MultisigCommittee>>(
9868 mut self,
9869 field: T,
9870 ) -> Self {
9871 self.set_committee(field.into());
9872 self
9873 }
9874 }
9875 impl super::MultisigCommittee {
9876 pub const fn const_default() -> Self {
9877 Self {
9878 members: Vec::new(),
9879 threshold: None,
9880 }
9881 }
9882 #[doc(hidden)]
9883 pub fn default_instance() -> &'static Self {
9884 static DEFAULT: super::MultisigCommittee = super::MultisigCommittee::const_default();
9885 &DEFAULT
9886 }
9887 pub fn members(&self) -> &[super::MultisigMember] {
9889 &self.members
9890 }
9891 pub fn members_mut(&mut self) -> &mut Vec<super::MultisigMember> {
9894 &mut self.members
9895 }
9896 pub fn set_members(&mut self, field: Vec<super::MultisigMember>) {
9898 self.members = field;
9899 }
9900 pub fn with_members(mut self, field: Vec<super::MultisigMember>) -> Self {
9902 self.set_members(field);
9903 self
9904 }
9905 pub fn threshold_opt_mut(&mut self) -> Option<&mut u32> {
9907 self.threshold.as_mut().map(|field| field as _)
9908 }
9909 pub fn threshold_mut(&mut self) -> &mut u32 {
9912 self.threshold.get_or_insert_default()
9913 }
9914 pub fn threshold_opt(&self) -> Option<u32> {
9916 self.threshold.as_ref().map(|field| *field)
9917 }
9918 pub fn set_threshold(&mut self, field: u32) {
9920 self.threshold = Some(field);
9921 }
9922 pub fn with_threshold(mut self, field: u32) -> Self {
9924 self.set_threshold(field);
9925 self
9926 }
9927 }
9928 impl super::MultisigMember {
9929 pub const fn const_default() -> Self {
9930 Self {
9931 public_key: None,
9932 weight: None,
9933 }
9934 }
9935 #[doc(hidden)]
9936 pub fn default_instance() -> &'static Self {
9937 static DEFAULT: super::MultisigMember = super::MultisigMember::const_default();
9938 &DEFAULT
9939 }
9940 pub fn public_key(&self) -> &super::MultisigMemberPublicKey {
9942 self.public_key
9943 .as_ref()
9944 .map(|field| field as _)
9945 .unwrap_or_else(|| {
9946 super::MultisigMemberPublicKey::default_instance() as _
9947 })
9948 }
9949 pub fn public_key_opt_mut(
9951 &mut self,
9952 ) -> Option<&mut super::MultisigMemberPublicKey> {
9953 self.public_key.as_mut().map(|field| field as _)
9954 }
9955 pub fn public_key_mut(&mut self) -> &mut super::MultisigMemberPublicKey {
9958 self.public_key.get_or_insert_default()
9959 }
9960 pub fn public_key_opt(&self) -> Option<&super::MultisigMemberPublicKey> {
9962 self.public_key.as_ref().map(|field| field as _)
9963 }
9964 pub fn set_public_key<T: Into<super::MultisigMemberPublicKey>>(
9966 &mut self,
9967 field: T,
9968 ) {
9969 self.public_key = Some(field.into().into());
9970 }
9971 pub fn with_public_key<T: Into<super::MultisigMemberPublicKey>>(
9973 mut self,
9974 field: T,
9975 ) -> Self {
9976 self.set_public_key(field.into());
9977 self
9978 }
9979 pub fn weight_opt_mut(&mut self) -> Option<&mut u32> {
9981 self.weight.as_mut().map(|field| field as _)
9982 }
9983 pub fn weight_mut(&mut self) -> &mut u32 {
9986 self.weight.get_or_insert_default()
9987 }
9988 pub fn weight_opt(&self) -> Option<u32> {
9990 self.weight.as_ref().map(|field| *field)
9991 }
9992 pub fn set_weight(&mut self, field: u32) {
9994 self.weight = Some(field);
9995 }
9996 pub fn with_weight(mut self, field: u32) -> Self {
9998 self.set_weight(field);
9999 self
10000 }
10001 }
10002 impl super::MultisigMemberPublicKey {
10003 pub const fn const_default() -> Self {
10004 Self {
10005 scheme: None,
10006 public_key: None,
10007 zklogin: None,
10008 }
10009 }
10010 #[doc(hidden)]
10011 pub fn default_instance() -> &'static Self {
10012 static DEFAULT: super::MultisigMemberPublicKey = super::MultisigMemberPublicKey::const_default();
10013 &DEFAULT
10014 }
10015 pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
10017 self.set_scheme(field.into());
10018 self
10019 }
10020 pub fn public_key_opt(&self) -> Option<&[u8]> {
10022 self.public_key.as_ref().map(|field| field as _)
10023 }
10024 pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10026 self.public_key = Some(field.into().into());
10027 }
10028 pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
10030 mut self,
10031 field: T,
10032 ) -> Self {
10033 self.set_public_key(field.into());
10034 self
10035 }
10036 pub fn zklogin(&self) -> &super::ZkLoginPublicIdentifier {
10038 self.zklogin
10039 .as_ref()
10040 .map(|field| field as _)
10041 .unwrap_or_else(|| {
10042 super::ZkLoginPublicIdentifier::default_instance() as _
10043 })
10044 }
10045 pub fn zklogin_opt_mut(
10047 &mut self,
10048 ) -> Option<&mut super::ZkLoginPublicIdentifier> {
10049 self.zklogin.as_mut().map(|field| field as _)
10050 }
10051 pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginPublicIdentifier {
10054 self.zklogin.get_or_insert_default()
10055 }
10056 pub fn zklogin_opt(&self) -> Option<&super::ZkLoginPublicIdentifier> {
10058 self.zklogin.as_ref().map(|field| field as _)
10059 }
10060 pub fn set_zklogin<T: Into<super::ZkLoginPublicIdentifier>>(
10062 &mut self,
10063 field: T,
10064 ) {
10065 self.zklogin = Some(field.into().into());
10066 }
10067 pub fn with_zklogin<T: Into<super::ZkLoginPublicIdentifier>>(
10069 mut self,
10070 field: T,
10071 ) -> Self {
10072 self.set_zklogin(field.into());
10073 self
10074 }
10075 }
10076 impl super::MultisigMemberSignature {
10077 pub const fn const_default() -> Self {
10078 Self {
10079 scheme: None,
10080 signature: None,
10081 zklogin: None,
10082 passkey: None,
10083 }
10084 }
10085 #[doc(hidden)]
10086 pub fn default_instance() -> &'static Self {
10087 static DEFAULT: super::MultisigMemberSignature = super::MultisigMemberSignature::const_default();
10088 &DEFAULT
10089 }
10090 pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
10092 self.set_scheme(field.into());
10093 self
10094 }
10095 pub fn signature_opt(&self) -> Option<&[u8]> {
10097 self.signature.as_ref().map(|field| field as _)
10098 }
10099 pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10101 self.signature = Some(field.into().into());
10102 }
10103 pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
10105 mut self,
10106 field: T,
10107 ) -> Self {
10108 self.set_signature(field.into());
10109 self
10110 }
10111 pub fn zklogin(&self) -> &super::ZkLoginAuthenticator {
10113 self.zklogin
10114 .as_ref()
10115 .map(|field| field as _)
10116 .unwrap_or_else(|| super::ZkLoginAuthenticator::default_instance() as _)
10117 }
10118 pub fn zklogin_opt_mut(&mut self) -> Option<&mut super::ZkLoginAuthenticator> {
10120 self.zklogin.as_mut().map(|field| field as _)
10121 }
10122 pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginAuthenticator {
10125 self.zklogin.get_or_insert_default()
10126 }
10127 pub fn zklogin_opt(&self) -> Option<&super::ZkLoginAuthenticator> {
10129 self.zklogin.as_ref().map(|field| field as _)
10130 }
10131 pub fn set_zklogin<T: Into<super::ZkLoginAuthenticator>>(&mut self, field: T) {
10133 self.zklogin = Some(field.into().into());
10134 }
10135 pub fn with_zklogin<T: Into<super::ZkLoginAuthenticator>>(
10137 mut self,
10138 field: T,
10139 ) -> Self {
10140 self.set_zklogin(field.into());
10141 self
10142 }
10143 pub fn passkey(&self) -> &super::PasskeyAuthenticator {
10145 self.passkey
10146 .as_ref()
10147 .map(|field| field as _)
10148 .unwrap_or_else(|| super::PasskeyAuthenticator::default_instance() as _)
10149 }
10150 pub fn passkey_opt_mut(&mut self) -> Option<&mut super::PasskeyAuthenticator> {
10152 self.passkey.as_mut().map(|field| field as _)
10153 }
10154 pub fn passkey_mut(&mut self) -> &mut super::PasskeyAuthenticator {
10157 self.passkey.get_or_insert_default()
10158 }
10159 pub fn passkey_opt(&self) -> Option<&super::PasskeyAuthenticator> {
10161 self.passkey.as_ref().map(|field| field as _)
10162 }
10163 pub fn set_passkey<T: Into<super::PasskeyAuthenticator>>(&mut self, field: T) {
10165 self.passkey = Some(field.into().into());
10166 }
10167 pub fn with_passkey<T: Into<super::PasskeyAuthenticator>>(
10169 mut self,
10170 field: T,
10171 ) -> Self {
10172 self.set_passkey(field.into());
10173 self
10174 }
10175 }
10176 impl super::NameRecord {
10177 pub const fn const_default() -> Self {
10178 Self {
10179 id: None,
10180 name: None,
10181 registration_nft_id: None,
10182 expiration_timestamp: None,
10183 target_address: None,
10184 data: std::collections::BTreeMap::new(),
10185 }
10186 }
10187 #[doc(hidden)]
10188 pub fn default_instance() -> &'static Self {
10189 static DEFAULT: super::NameRecord = super::NameRecord::const_default();
10190 &DEFAULT
10191 }
10192 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
10194 self.id.as_mut().map(|field| field as _)
10195 }
10196 pub fn id_mut(&mut self) -> &mut String {
10199 self.id.get_or_insert_default()
10200 }
10201 pub fn id_opt(&self) -> Option<&str> {
10203 self.id.as_ref().map(|field| field as _)
10204 }
10205 pub fn set_id<T: Into<String>>(&mut self, field: T) {
10207 self.id = Some(field.into().into());
10208 }
10209 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
10211 self.set_id(field.into());
10212 self
10213 }
10214 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
10216 self.name.as_mut().map(|field| field as _)
10217 }
10218 pub fn name_mut(&mut self) -> &mut String {
10221 self.name.get_or_insert_default()
10222 }
10223 pub fn name_opt(&self) -> Option<&str> {
10225 self.name.as_ref().map(|field| field as _)
10226 }
10227 pub fn set_name<T: Into<String>>(&mut self, field: T) {
10229 self.name = Some(field.into().into());
10230 }
10231 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
10233 self.set_name(field.into());
10234 self
10235 }
10236 pub fn registration_nft_id_opt_mut(&mut self) -> Option<&mut String> {
10238 self.registration_nft_id.as_mut().map(|field| field as _)
10239 }
10240 pub fn registration_nft_id_mut(&mut self) -> &mut String {
10243 self.registration_nft_id.get_or_insert_default()
10244 }
10245 pub fn registration_nft_id_opt(&self) -> Option<&str> {
10247 self.registration_nft_id.as_ref().map(|field| field as _)
10248 }
10249 pub fn set_registration_nft_id<T: Into<String>>(&mut self, field: T) {
10251 self.registration_nft_id = Some(field.into().into());
10252 }
10253 pub fn with_registration_nft_id<T: Into<String>>(mut self, field: T) -> Self {
10255 self.set_registration_nft_id(field.into());
10256 self
10257 }
10258 pub fn expiration_timestamp_opt_mut(
10260 &mut self,
10261 ) -> Option<&mut ::prost_types::Timestamp> {
10262 self.expiration_timestamp.as_mut().map(|field| field as _)
10263 }
10264 pub fn expiration_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
10267 self.expiration_timestamp.get_or_insert_default()
10268 }
10269 pub fn expiration_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
10271 self.expiration_timestamp.as_ref().map(|field| field as _)
10272 }
10273 pub fn set_expiration_timestamp<T: Into<::prost_types::Timestamp>>(
10275 &mut self,
10276 field: T,
10277 ) {
10278 self.expiration_timestamp = Some(field.into().into());
10279 }
10280 pub fn with_expiration_timestamp<T: Into<::prost_types::Timestamp>>(
10282 mut self,
10283 field: T,
10284 ) -> Self {
10285 self.set_expiration_timestamp(field.into());
10286 self
10287 }
10288 pub fn target_address_opt_mut(&mut self) -> Option<&mut String> {
10290 self.target_address.as_mut().map(|field| field as _)
10291 }
10292 pub fn target_address_mut(&mut self) -> &mut String {
10295 self.target_address.get_or_insert_default()
10296 }
10297 pub fn target_address_opt(&self) -> Option<&str> {
10299 self.target_address.as_ref().map(|field| field as _)
10300 }
10301 pub fn set_target_address<T: Into<String>>(&mut self, field: T) {
10303 self.target_address = Some(field.into().into());
10304 }
10305 pub fn with_target_address<T: Into<String>>(mut self, field: T) -> Self {
10307 self.set_target_address(field.into());
10308 self
10309 }
10310 pub fn data(&self) -> &::std::collections::BTreeMap<String, String> {
10312 &self.data
10313 }
10314 pub fn data_mut(&mut self) -> &mut ::std::collections::BTreeMap<String, String> {
10317 &mut self.data
10318 }
10319 pub fn set_data(&mut self, field: ::std::collections::BTreeMap<String, String>) {
10321 self.data = field;
10322 }
10323 pub fn with_data(
10325 mut self,
10326 field: ::std::collections::BTreeMap<String, String>,
10327 ) -> Self {
10328 self.set_data(field);
10329 self
10330 }
10331 }
10332 impl super::Object {
10333 pub const fn const_default() -> Self {
10334 Self {
10335 bcs: None,
10336 object_id: None,
10337 version: None,
10338 digest: None,
10339 owner: None,
10340 object_type: None,
10341 has_public_transfer: None,
10342 contents: None,
10343 package: None,
10344 previous_transaction: None,
10345 storage_rebate: None,
10346 json: None,
10347 balance: None,
10348 }
10349 }
10350 #[doc(hidden)]
10351 pub fn default_instance() -> &'static Self {
10352 static DEFAULT: super::Object = super::Object::const_default();
10353 &DEFAULT
10354 }
10355 pub fn bcs(&self) -> &super::Bcs {
10357 self.bcs
10358 .as_ref()
10359 .map(|field| field as _)
10360 .unwrap_or_else(|| super::Bcs::default_instance() as _)
10361 }
10362 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
10364 self.bcs.as_mut().map(|field| field as _)
10365 }
10366 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
10369 self.bcs.get_or_insert_default()
10370 }
10371 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
10373 self.bcs.as_ref().map(|field| field as _)
10374 }
10375 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
10377 self.bcs = Some(field.into().into());
10378 }
10379 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
10381 self.set_bcs(field.into());
10382 self
10383 }
10384 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
10386 self.object_id.as_mut().map(|field| field as _)
10387 }
10388 pub fn object_id_mut(&mut self) -> &mut String {
10391 self.object_id.get_or_insert_default()
10392 }
10393 pub fn object_id_opt(&self) -> Option<&str> {
10395 self.object_id.as_ref().map(|field| field as _)
10396 }
10397 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
10399 self.object_id = Some(field.into().into());
10400 }
10401 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
10403 self.set_object_id(field.into());
10404 self
10405 }
10406 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
10408 self.version.as_mut().map(|field| field as _)
10409 }
10410 pub fn version_mut(&mut self) -> &mut u64 {
10413 self.version.get_or_insert_default()
10414 }
10415 pub fn version_opt(&self) -> Option<u64> {
10417 self.version.as_ref().map(|field| *field)
10418 }
10419 pub fn set_version(&mut self, field: u64) {
10421 self.version = Some(field);
10422 }
10423 pub fn with_version(mut self, field: u64) -> Self {
10425 self.set_version(field);
10426 self
10427 }
10428 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
10430 self.digest.as_mut().map(|field| field as _)
10431 }
10432 pub fn digest_mut(&mut self) -> &mut String {
10435 self.digest.get_or_insert_default()
10436 }
10437 pub fn digest_opt(&self) -> Option<&str> {
10439 self.digest.as_ref().map(|field| field as _)
10440 }
10441 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
10443 self.digest = Some(field.into().into());
10444 }
10445 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
10447 self.set_digest(field.into());
10448 self
10449 }
10450 pub fn owner(&self) -> &super::Owner {
10452 self.owner
10453 .as_ref()
10454 .map(|field| field as _)
10455 .unwrap_or_else(|| super::Owner::default_instance() as _)
10456 }
10457 pub fn owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
10459 self.owner.as_mut().map(|field| field as _)
10460 }
10461 pub fn owner_mut(&mut self) -> &mut super::Owner {
10464 self.owner.get_or_insert_default()
10465 }
10466 pub fn owner_opt(&self) -> Option<&super::Owner> {
10468 self.owner.as_ref().map(|field| field as _)
10469 }
10470 pub fn set_owner<T: Into<super::Owner>>(&mut self, field: T) {
10472 self.owner = Some(field.into().into());
10473 }
10474 pub fn with_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
10476 self.set_owner(field.into());
10477 self
10478 }
10479 pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
10481 self.object_type.as_mut().map(|field| field as _)
10482 }
10483 pub fn object_type_mut(&mut self) -> &mut String {
10486 self.object_type.get_or_insert_default()
10487 }
10488 pub fn object_type_opt(&self) -> Option<&str> {
10490 self.object_type.as_ref().map(|field| field as _)
10491 }
10492 pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
10494 self.object_type = Some(field.into().into());
10495 }
10496 pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
10498 self.set_object_type(field.into());
10499 self
10500 }
10501 pub fn has_public_transfer_opt_mut(&mut self) -> Option<&mut bool> {
10503 self.has_public_transfer.as_mut().map(|field| field as _)
10504 }
10505 pub fn has_public_transfer_mut(&mut self) -> &mut bool {
10508 self.has_public_transfer.get_or_insert_default()
10509 }
10510 pub fn has_public_transfer_opt(&self) -> Option<bool> {
10512 self.has_public_transfer.as_ref().map(|field| *field)
10513 }
10514 pub fn set_has_public_transfer(&mut self, field: bool) {
10516 self.has_public_transfer = Some(field);
10517 }
10518 pub fn with_has_public_transfer(mut self, field: bool) -> Self {
10520 self.set_has_public_transfer(field);
10521 self
10522 }
10523 pub fn contents(&self) -> &super::Bcs {
10525 self.contents
10526 .as_ref()
10527 .map(|field| field as _)
10528 .unwrap_or_else(|| super::Bcs::default_instance() as _)
10529 }
10530 pub fn contents_opt_mut(&mut self) -> Option<&mut super::Bcs> {
10532 self.contents.as_mut().map(|field| field as _)
10533 }
10534 pub fn contents_mut(&mut self) -> &mut super::Bcs {
10537 self.contents.get_or_insert_default()
10538 }
10539 pub fn contents_opt(&self) -> Option<&super::Bcs> {
10541 self.contents.as_ref().map(|field| field as _)
10542 }
10543 pub fn set_contents<T: Into<super::Bcs>>(&mut self, field: T) {
10545 self.contents = Some(field.into().into());
10546 }
10547 pub fn with_contents<T: Into<super::Bcs>>(mut self, field: T) -> Self {
10549 self.set_contents(field.into());
10550 self
10551 }
10552 pub fn package(&self) -> &super::Package {
10554 self.package
10555 .as_ref()
10556 .map(|field| field as _)
10557 .unwrap_or_else(|| super::Package::default_instance() as _)
10558 }
10559 pub fn package_opt_mut(&mut self) -> Option<&mut super::Package> {
10561 self.package.as_mut().map(|field| field as _)
10562 }
10563 pub fn package_mut(&mut self) -> &mut super::Package {
10566 self.package.get_or_insert_default()
10567 }
10568 pub fn package_opt(&self) -> Option<&super::Package> {
10570 self.package.as_ref().map(|field| field as _)
10571 }
10572 pub fn set_package<T: Into<super::Package>>(&mut self, field: T) {
10574 self.package = Some(field.into().into());
10575 }
10576 pub fn with_package<T: Into<super::Package>>(mut self, field: T) -> Self {
10578 self.set_package(field.into());
10579 self
10580 }
10581 pub fn previous_transaction_opt_mut(&mut self) -> Option<&mut String> {
10583 self.previous_transaction.as_mut().map(|field| field as _)
10584 }
10585 pub fn previous_transaction_mut(&mut self) -> &mut String {
10588 self.previous_transaction.get_or_insert_default()
10589 }
10590 pub fn previous_transaction_opt(&self) -> Option<&str> {
10592 self.previous_transaction.as_ref().map(|field| field as _)
10593 }
10594 pub fn set_previous_transaction<T: Into<String>>(&mut self, field: T) {
10596 self.previous_transaction = Some(field.into().into());
10597 }
10598 pub fn with_previous_transaction<T: Into<String>>(mut self, field: T) -> Self {
10600 self.set_previous_transaction(field.into());
10601 self
10602 }
10603 pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
10605 self.storage_rebate.as_mut().map(|field| field as _)
10606 }
10607 pub fn storage_rebate_mut(&mut self) -> &mut u64 {
10610 self.storage_rebate.get_or_insert_default()
10611 }
10612 pub fn storage_rebate_opt(&self) -> Option<u64> {
10614 self.storage_rebate.as_ref().map(|field| *field)
10615 }
10616 pub fn set_storage_rebate(&mut self, field: u64) {
10618 self.storage_rebate = Some(field);
10619 }
10620 pub fn with_storage_rebate(mut self, field: u64) -> Self {
10622 self.set_storage_rebate(field);
10623 self
10624 }
10625 pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
10627 self.json.as_mut().map(|field| field as _)
10628 }
10629 pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
10632 self.json.get_or_insert_default()
10633 }
10634 pub fn json_opt(&self) -> Option<&::prost_types::Value> {
10636 self.json.as_ref().map(|field| field as _)
10637 }
10638 pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
10640 self.json = Some(field.into().into());
10641 }
10642 pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
10644 self.set_json(field.into());
10645 self
10646 }
10647 pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
10649 self.balance.as_mut().map(|field| field as _)
10650 }
10651 pub fn balance_mut(&mut self) -> &mut u64 {
10654 self.balance.get_or_insert_default()
10655 }
10656 pub fn balance_opt(&self) -> Option<u64> {
10658 self.balance.as_ref().map(|field| *field)
10659 }
10660 pub fn set_balance(&mut self, field: u64) {
10662 self.balance = Some(field);
10663 }
10664 pub fn with_balance(mut self, field: u64) -> Self {
10666 self.set_balance(field);
10667 self
10668 }
10669 }
10670 impl super::ObjectReference {
10671 pub const fn const_default() -> Self {
10672 Self {
10673 object_id: None,
10674 version: None,
10675 digest: None,
10676 }
10677 }
10678 #[doc(hidden)]
10679 pub fn default_instance() -> &'static Self {
10680 static DEFAULT: super::ObjectReference = super::ObjectReference::const_default();
10681 &DEFAULT
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 }
10750 impl super::ObjectSet {
10751 pub const fn const_default() -> Self {
10752 Self { objects: Vec::new() }
10753 }
10754 #[doc(hidden)]
10755 pub fn default_instance() -> &'static Self {
10756 static DEFAULT: super::ObjectSet = super::ObjectSet::const_default();
10757 &DEFAULT
10758 }
10759 pub fn objects(&self) -> &[super::Object] {
10761 &self.objects
10762 }
10763 pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
10766 &mut self.objects
10767 }
10768 pub fn set_objects(&mut self, field: Vec<super::Object>) {
10770 self.objects = field;
10771 }
10772 pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
10774 self.set_objects(field);
10775 self
10776 }
10777 }
10778 impl super::OpenSignature {
10779 pub const fn const_default() -> Self {
10780 Self {
10781 reference: None,
10782 body: None,
10783 }
10784 }
10785 #[doc(hidden)]
10786 pub fn default_instance() -> &'static Self {
10787 static DEFAULT: super::OpenSignature = super::OpenSignature::const_default();
10788 &DEFAULT
10789 }
10790 pub fn with_reference<T: Into<super::open_signature::Reference>>(
10792 mut self,
10793 field: T,
10794 ) -> Self {
10795 self.set_reference(field.into());
10796 self
10797 }
10798 pub fn body(&self) -> &super::OpenSignatureBody {
10800 self.body
10801 .as_ref()
10802 .map(|field| field as _)
10803 .unwrap_or_else(|| super::OpenSignatureBody::default_instance() as _)
10804 }
10805 pub fn body_opt_mut(&mut self) -> Option<&mut super::OpenSignatureBody> {
10807 self.body.as_mut().map(|field| field as _)
10808 }
10809 pub fn body_mut(&mut self) -> &mut super::OpenSignatureBody {
10812 self.body.get_or_insert_default()
10813 }
10814 pub fn body_opt(&self) -> Option<&super::OpenSignatureBody> {
10816 self.body.as_ref().map(|field| field as _)
10817 }
10818 pub fn set_body<T: Into<super::OpenSignatureBody>>(&mut self, field: T) {
10820 self.body = Some(field.into().into());
10821 }
10822 pub fn with_body<T: Into<super::OpenSignatureBody>>(mut self, field: T) -> Self {
10824 self.set_body(field.into());
10825 self
10826 }
10827 }
10828 impl super::OpenSignatureBody {
10829 pub const fn const_default() -> Self {
10830 Self {
10831 r#type: None,
10832 type_name: None,
10833 type_parameter_instantiation: Vec::new(),
10834 type_parameter: None,
10835 }
10836 }
10837 #[doc(hidden)]
10838 pub fn default_instance() -> &'static Self {
10839 static DEFAULT: super::OpenSignatureBody = super::OpenSignatureBody::const_default();
10840 &DEFAULT
10841 }
10842 pub fn with_type<T: Into<super::open_signature_body::Type>>(
10844 mut self,
10845 field: T,
10846 ) -> Self {
10847 self.set_type(field.into());
10848 self
10849 }
10850 pub fn type_name_opt_mut(&mut self) -> Option<&mut String> {
10852 self.type_name.as_mut().map(|field| field as _)
10853 }
10854 pub fn type_name_mut(&mut self) -> &mut String {
10857 self.type_name.get_or_insert_default()
10858 }
10859 pub fn type_name_opt(&self) -> Option<&str> {
10861 self.type_name.as_ref().map(|field| field as _)
10862 }
10863 pub fn set_type_name<T: Into<String>>(&mut self, field: T) {
10865 self.type_name = Some(field.into().into());
10866 }
10867 pub fn with_type_name<T: Into<String>>(mut self, field: T) -> Self {
10869 self.set_type_name(field.into());
10870 self
10871 }
10872 pub fn type_parameter_instantiation(&self) -> &[super::OpenSignatureBody] {
10874 &self.type_parameter_instantiation
10875 }
10876 pub fn type_parameter_instantiation_mut(
10879 &mut self,
10880 ) -> &mut Vec<super::OpenSignatureBody> {
10881 &mut self.type_parameter_instantiation
10882 }
10883 pub fn set_type_parameter_instantiation(
10885 &mut self,
10886 field: Vec<super::OpenSignatureBody>,
10887 ) {
10888 self.type_parameter_instantiation = field;
10889 }
10890 pub fn with_type_parameter_instantiation(
10892 mut self,
10893 field: Vec<super::OpenSignatureBody>,
10894 ) -> Self {
10895 self.set_type_parameter_instantiation(field);
10896 self
10897 }
10898 pub fn type_parameter_opt_mut(&mut self) -> Option<&mut u32> {
10900 self.type_parameter.as_mut().map(|field| field as _)
10901 }
10902 pub fn type_parameter_mut(&mut self) -> &mut u32 {
10905 self.type_parameter.get_or_insert_default()
10906 }
10907 pub fn type_parameter_opt(&self) -> Option<u32> {
10909 self.type_parameter.as_ref().map(|field| *field)
10910 }
10911 pub fn set_type_parameter(&mut self, field: u32) {
10913 self.type_parameter = Some(field);
10914 }
10915 pub fn with_type_parameter(mut self, field: u32) -> Self {
10917 self.set_type_parameter(field);
10918 self
10919 }
10920 }
10921 impl super::Owner {
10922 pub const fn const_default() -> Self {
10923 Self {
10924 kind: None,
10925 address: None,
10926 version: None,
10927 }
10928 }
10929 #[doc(hidden)]
10930 pub fn default_instance() -> &'static Self {
10931 static DEFAULT: super::Owner = super::Owner::const_default();
10932 &DEFAULT
10933 }
10934 pub fn with_kind<T: Into<super::owner::OwnerKind>>(mut self, field: T) -> Self {
10936 self.set_kind(field.into());
10937 self
10938 }
10939 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
10941 self.address.as_mut().map(|field| field as _)
10942 }
10943 pub fn address_mut(&mut self) -> &mut String {
10946 self.address.get_or_insert_default()
10947 }
10948 pub fn address_opt(&self) -> Option<&str> {
10950 self.address.as_ref().map(|field| field as _)
10951 }
10952 pub fn set_address<T: Into<String>>(&mut self, field: T) {
10954 self.address = Some(field.into().into());
10955 }
10956 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
10958 self.set_address(field.into());
10959 self
10960 }
10961 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
10963 self.version.as_mut().map(|field| field as _)
10964 }
10965 pub fn version_mut(&mut self) -> &mut u64 {
10968 self.version.get_or_insert_default()
10969 }
10970 pub fn version_opt(&self) -> Option<u64> {
10972 self.version.as_ref().map(|field| *field)
10973 }
10974 pub fn set_version(&mut self, field: u64) {
10976 self.version = Some(field);
10977 }
10978 pub fn with_version(mut self, field: u64) -> Self {
10980 self.set_version(field);
10981 self
10982 }
10983 }
10984 impl super::Package {
10985 pub const fn const_default() -> Self {
10986 Self {
10987 storage_id: None,
10988 original_id: None,
10989 version: None,
10990 modules: Vec::new(),
10991 type_origins: Vec::new(),
10992 linkage: Vec::new(),
10993 }
10994 }
10995 #[doc(hidden)]
10996 pub fn default_instance() -> &'static Self {
10997 static DEFAULT: super::Package = super::Package::const_default();
10998 &DEFAULT
10999 }
11000 pub fn storage_id_opt_mut(&mut self) -> Option<&mut String> {
11002 self.storage_id.as_mut().map(|field| field as _)
11003 }
11004 pub fn storage_id_mut(&mut self) -> &mut String {
11007 self.storage_id.get_or_insert_default()
11008 }
11009 pub fn storage_id_opt(&self) -> Option<&str> {
11011 self.storage_id.as_ref().map(|field| field as _)
11012 }
11013 pub fn set_storage_id<T: Into<String>>(&mut self, field: T) {
11015 self.storage_id = Some(field.into().into());
11016 }
11017 pub fn with_storage_id<T: Into<String>>(mut self, field: T) -> Self {
11019 self.set_storage_id(field.into());
11020 self
11021 }
11022 pub fn original_id_opt_mut(&mut self) -> Option<&mut String> {
11024 self.original_id.as_mut().map(|field| field as _)
11025 }
11026 pub fn original_id_mut(&mut self) -> &mut String {
11029 self.original_id.get_or_insert_default()
11030 }
11031 pub fn original_id_opt(&self) -> Option<&str> {
11033 self.original_id.as_ref().map(|field| field as _)
11034 }
11035 pub fn set_original_id<T: Into<String>>(&mut self, field: T) {
11037 self.original_id = Some(field.into().into());
11038 }
11039 pub fn with_original_id<T: Into<String>>(mut self, field: T) -> Self {
11041 self.set_original_id(field.into());
11042 self
11043 }
11044 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
11046 self.version.as_mut().map(|field| field as _)
11047 }
11048 pub fn version_mut(&mut self) -> &mut u64 {
11051 self.version.get_or_insert_default()
11052 }
11053 pub fn version_opt(&self) -> Option<u64> {
11055 self.version.as_ref().map(|field| *field)
11056 }
11057 pub fn set_version(&mut self, field: u64) {
11059 self.version = Some(field);
11060 }
11061 pub fn with_version(mut self, field: u64) -> Self {
11063 self.set_version(field);
11064 self
11065 }
11066 pub fn modules(&self) -> &[super::Module] {
11068 &self.modules
11069 }
11070 pub fn modules_mut(&mut self) -> &mut Vec<super::Module> {
11073 &mut self.modules
11074 }
11075 pub fn set_modules(&mut self, field: Vec<super::Module>) {
11077 self.modules = field;
11078 }
11079 pub fn with_modules(mut self, field: Vec<super::Module>) -> Self {
11081 self.set_modules(field);
11082 self
11083 }
11084 pub fn type_origins(&self) -> &[super::TypeOrigin] {
11086 &self.type_origins
11087 }
11088 pub fn type_origins_mut(&mut self) -> &mut Vec<super::TypeOrigin> {
11091 &mut self.type_origins
11092 }
11093 pub fn set_type_origins(&mut self, field: Vec<super::TypeOrigin>) {
11095 self.type_origins = field;
11096 }
11097 pub fn with_type_origins(mut self, field: Vec<super::TypeOrigin>) -> Self {
11099 self.set_type_origins(field);
11100 self
11101 }
11102 pub fn linkage(&self) -> &[super::Linkage] {
11104 &self.linkage
11105 }
11106 pub fn linkage_mut(&mut self) -> &mut Vec<super::Linkage> {
11109 &mut self.linkage
11110 }
11111 pub fn set_linkage(&mut self, field: Vec<super::Linkage>) {
11113 self.linkage = field;
11114 }
11115 pub fn with_linkage(mut self, field: Vec<super::Linkage>) -> Self {
11117 self.set_linkage(field);
11118 self
11119 }
11120 }
11121 impl super::PackageUpgradeError {
11122 pub const fn const_default() -> Self {
11123 Self {
11124 kind: None,
11125 package_id: None,
11126 digest: None,
11127 policy: None,
11128 ticket_id: None,
11129 }
11130 }
11131 #[doc(hidden)]
11132 pub fn default_instance() -> &'static Self {
11133 static DEFAULT: super::PackageUpgradeError = super::PackageUpgradeError::const_default();
11134 &DEFAULT
11135 }
11136 pub fn with_kind<T: Into<super::package_upgrade_error::PackageUpgradeErrorKind>>(
11138 mut self,
11139 field: T,
11140 ) -> Self {
11141 self.set_kind(field.into());
11142 self
11143 }
11144 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
11146 self.package_id.as_mut().map(|field| field as _)
11147 }
11148 pub fn package_id_mut(&mut self) -> &mut String {
11151 self.package_id.get_or_insert_default()
11152 }
11153 pub fn package_id_opt(&self) -> Option<&str> {
11155 self.package_id.as_ref().map(|field| field as _)
11156 }
11157 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
11159 self.package_id = Some(field.into().into());
11160 }
11161 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
11163 self.set_package_id(field.into());
11164 self
11165 }
11166 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
11168 self.digest.as_mut().map(|field| field as _)
11169 }
11170 pub fn digest_mut(&mut self) -> &mut String {
11173 self.digest.get_or_insert_default()
11174 }
11175 pub fn digest_opt(&self) -> Option<&str> {
11177 self.digest.as_ref().map(|field| field as _)
11178 }
11179 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
11181 self.digest = Some(field.into().into());
11182 }
11183 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
11185 self.set_digest(field.into());
11186 self
11187 }
11188 pub fn policy_opt_mut(&mut self) -> Option<&mut u32> {
11190 self.policy.as_mut().map(|field| field as _)
11191 }
11192 pub fn policy_mut(&mut self) -> &mut u32 {
11195 self.policy.get_or_insert_default()
11196 }
11197 pub fn policy_opt(&self) -> Option<u32> {
11199 self.policy.as_ref().map(|field| *field)
11200 }
11201 pub fn set_policy(&mut self, field: u32) {
11203 self.policy = Some(field);
11204 }
11205 pub fn with_policy(mut self, field: u32) -> Self {
11207 self.set_policy(field);
11208 self
11209 }
11210 pub fn ticket_id_opt_mut(&mut self) -> Option<&mut String> {
11212 self.ticket_id.as_mut().map(|field| field as _)
11213 }
11214 pub fn ticket_id_mut(&mut self) -> &mut String {
11217 self.ticket_id.get_or_insert_default()
11218 }
11219 pub fn ticket_id_opt(&self) -> Option<&str> {
11221 self.ticket_id.as_ref().map(|field| field as _)
11222 }
11223 pub fn set_ticket_id<T: Into<String>>(&mut self, field: T) {
11225 self.ticket_id = Some(field.into().into());
11226 }
11227 pub fn with_ticket_id<T: Into<String>>(mut self, field: T) -> Self {
11229 self.set_ticket_id(field.into());
11230 self
11231 }
11232 }
11233 impl super::PackageVersion {
11234 pub const fn const_default() -> Self {
11235 Self {
11236 package_id: None,
11237 version: None,
11238 }
11239 }
11240 #[doc(hidden)]
11241 pub fn default_instance() -> &'static Self {
11242 static DEFAULT: super::PackageVersion = super::PackageVersion::const_default();
11243 &DEFAULT
11244 }
11245 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
11247 self.package_id.as_mut().map(|field| field as _)
11248 }
11249 pub fn package_id_mut(&mut self) -> &mut String {
11252 self.package_id.get_or_insert_default()
11253 }
11254 pub fn package_id_opt(&self) -> Option<&str> {
11256 self.package_id.as_ref().map(|field| field as _)
11257 }
11258 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
11260 self.package_id = Some(field.into().into());
11261 }
11262 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
11264 self.set_package_id(field.into());
11265 self
11266 }
11267 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
11269 self.version.as_mut().map(|field| field as _)
11270 }
11271 pub fn version_mut(&mut self) -> &mut u64 {
11274 self.version.get_or_insert_default()
11275 }
11276 pub fn version_opt(&self) -> Option<u64> {
11278 self.version.as_ref().map(|field| *field)
11279 }
11280 pub fn set_version(&mut self, field: u64) {
11282 self.version = Some(field);
11283 }
11284 pub fn with_version(mut self, field: u64) -> Self {
11286 self.set_version(field);
11287 self
11288 }
11289 }
11290 impl super::PasskeyAuthenticator {
11291 pub const fn const_default() -> Self {
11292 Self {
11293 authenticator_data: None,
11294 client_data_json: None,
11295 signature: None,
11296 }
11297 }
11298 #[doc(hidden)]
11299 pub fn default_instance() -> &'static Self {
11300 static DEFAULT: super::PasskeyAuthenticator = super::PasskeyAuthenticator::const_default();
11301 &DEFAULT
11302 }
11303 pub fn authenticator_data_opt(&self) -> Option<&[u8]> {
11305 self.authenticator_data.as_ref().map(|field| field as _)
11306 }
11307 pub fn set_authenticator_data<T: Into<::prost::bytes::Bytes>>(
11309 &mut self,
11310 field: T,
11311 ) {
11312 self.authenticator_data = Some(field.into().into());
11313 }
11314 pub fn with_authenticator_data<T: Into<::prost::bytes::Bytes>>(
11316 mut self,
11317 field: T,
11318 ) -> Self {
11319 self.set_authenticator_data(field.into());
11320 self
11321 }
11322 pub fn client_data_json_opt_mut(&mut self) -> Option<&mut String> {
11324 self.client_data_json.as_mut().map(|field| field as _)
11325 }
11326 pub fn client_data_json_mut(&mut self) -> &mut String {
11329 self.client_data_json.get_or_insert_default()
11330 }
11331 pub fn client_data_json_opt(&self) -> Option<&str> {
11333 self.client_data_json.as_ref().map(|field| field as _)
11334 }
11335 pub fn set_client_data_json<T: Into<String>>(&mut self, field: T) {
11337 self.client_data_json = Some(field.into().into());
11338 }
11339 pub fn with_client_data_json<T: Into<String>>(mut self, field: T) -> Self {
11341 self.set_client_data_json(field.into());
11342 self
11343 }
11344 pub fn signature(&self) -> &super::SimpleSignature {
11346 self.signature
11347 .as_ref()
11348 .map(|field| field as _)
11349 .unwrap_or_else(|| super::SimpleSignature::default_instance() as _)
11350 }
11351 pub fn signature_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
11353 self.signature.as_mut().map(|field| field as _)
11354 }
11355 pub fn signature_mut(&mut self) -> &mut super::SimpleSignature {
11358 self.signature.get_or_insert_default()
11359 }
11360 pub fn signature_opt(&self) -> Option<&super::SimpleSignature> {
11362 self.signature.as_ref().map(|field| field as _)
11363 }
11364 pub fn set_signature<T: Into<super::SimpleSignature>>(&mut self, field: T) {
11366 self.signature = Some(field.into().into());
11367 }
11368 pub fn with_signature<T: Into<super::SimpleSignature>>(
11370 mut self,
11371 field: T,
11372 ) -> Self {
11373 self.set_signature(field.into());
11374 self
11375 }
11376 }
11377 impl super::ProgrammableTransaction {
11378 pub const fn const_default() -> Self {
11379 Self {
11380 inputs: Vec::new(),
11381 commands: Vec::new(),
11382 }
11383 }
11384 #[doc(hidden)]
11385 pub fn default_instance() -> &'static Self {
11386 static DEFAULT: super::ProgrammableTransaction = super::ProgrammableTransaction::const_default();
11387 &DEFAULT
11388 }
11389 pub fn inputs(&self) -> &[super::Input] {
11391 &self.inputs
11392 }
11393 pub fn inputs_mut(&mut self) -> &mut Vec<super::Input> {
11396 &mut self.inputs
11397 }
11398 pub fn set_inputs(&mut self, field: Vec<super::Input>) {
11400 self.inputs = field;
11401 }
11402 pub fn with_inputs(mut self, field: Vec<super::Input>) -> Self {
11404 self.set_inputs(field);
11405 self
11406 }
11407 pub fn commands(&self) -> &[super::Command] {
11409 &self.commands
11410 }
11411 pub fn commands_mut(&mut self) -> &mut Vec<super::Command> {
11414 &mut self.commands
11415 }
11416 pub fn set_commands(&mut self, field: Vec<super::Command>) {
11418 self.commands = field;
11419 }
11420 pub fn with_commands(mut self, field: Vec<super::Command>) -> Self {
11422 self.set_commands(field);
11423 self
11424 }
11425 }
11426 impl super::ProtocolConfig {
11427 pub const fn const_default() -> Self {
11428 Self {
11429 protocol_version: None,
11430 feature_flags: std::collections::BTreeMap::new(),
11431 attributes: std::collections::BTreeMap::new(),
11432 }
11433 }
11434 #[doc(hidden)]
11435 pub fn default_instance() -> &'static Self {
11436 static DEFAULT: super::ProtocolConfig = super::ProtocolConfig::const_default();
11437 &DEFAULT
11438 }
11439 pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
11441 self.protocol_version.as_mut().map(|field| field as _)
11442 }
11443 pub fn protocol_version_mut(&mut self) -> &mut u64 {
11446 self.protocol_version.get_or_insert_default()
11447 }
11448 pub fn protocol_version_opt(&self) -> Option<u64> {
11450 self.protocol_version.as_ref().map(|field| *field)
11451 }
11452 pub fn set_protocol_version(&mut self, field: u64) {
11454 self.protocol_version = Some(field);
11455 }
11456 pub fn with_protocol_version(mut self, field: u64) -> Self {
11458 self.set_protocol_version(field);
11459 self
11460 }
11461 pub fn feature_flags(&self) -> &::std::collections::BTreeMap<String, bool> {
11463 &self.feature_flags
11464 }
11465 pub fn feature_flags_mut(
11468 &mut self,
11469 ) -> &mut ::std::collections::BTreeMap<String, bool> {
11470 &mut self.feature_flags
11471 }
11472 pub fn set_feature_flags(
11474 &mut self,
11475 field: ::std::collections::BTreeMap<String, bool>,
11476 ) {
11477 self.feature_flags = field;
11478 }
11479 pub fn with_feature_flags(
11481 mut self,
11482 field: ::std::collections::BTreeMap<String, bool>,
11483 ) -> Self {
11484 self.set_feature_flags(field);
11485 self
11486 }
11487 pub fn attributes(&self) -> &::std::collections::BTreeMap<String, String> {
11489 &self.attributes
11490 }
11491 pub fn attributes_mut(
11494 &mut self,
11495 ) -> &mut ::std::collections::BTreeMap<String, String> {
11496 &mut self.attributes
11497 }
11498 pub fn set_attributes(
11500 &mut self,
11501 field: ::std::collections::BTreeMap<String, String>,
11502 ) {
11503 self.attributes = field;
11504 }
11505 pub fn with_attributes(
11507 mut self,
11508 field: ::std::collections::BTreeMap<String, String>,
11509 ) -> Self {
11510 self.set_attributes(field);
11511 self
11512 }
11513 }
11514 impl super::Publish {
11515 pub const fn const_default() -> Self {
11516 Self {
11517 modules: Vec::new(),
11518 dependencies: Vec::new(),
11519 }
11520 }
11521 #[doc(hidden)]
11522 pub fn default_instance() -> &'static Self {
11523 static DEFAULT: super::Publish = super::Publish::const_default();
11524 &DEFAULT
11525 }
11526 pub fn modules(&self) -> &[::prost::bytes::Bytes] {
11528 &self.modules
11529 }
11530 pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
11533 &mut self.modules
11534 }
11535 pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
11537 self.modules = field;
11538 }
11539 pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
11541 self.set_modules(field);
11542 self
11543 }
11544 pub fn dependencies(&self) -> &[String] {
11546 &self.dependencies
11547 }
11548 pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
11551 &mut self.dependencies
11552 }
11553 pub fn set_dependencies(&mut self, field: Vec<String>) {
11555 self.dependencies = field;
11556 }
11557 pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
11559 self.set_dependencies(field);
11560 self
11561 }
11562 }
11563 impl super::RandomnessStateUpdate {
11564 pub const fn const_default() -> Self {
11565 Self {
11566 epoch: None,
11567 randomness_round: None,
11568 random_bytes: None,
11569 randomness_object_initial_shared_version: None,
11570 }
11571 }
11572 #[doc(hidden)]
11573 pub fn default_instance() -> &'static Self {
11574 static DEFAULT: super::RandomnessStateUpdate = super::RandomnessStateUpdate::const_default();
11575 &DEFAULT
11576 }
11577 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
11579 self.epoch.as_mut().map(|field| field as _)
11580 }
11581 pub fn epoch_mut(&mut self) -> &mut u64 {
11584 self.epoch.get_or_insert_default()
11585 }
11586 pub fn epoch_opt(&self) -> Option<u64> {
11588 self.epoch.as_ref().map(|field| *field)
11589 }
11590 pub fn set_epoch(&mut self, field: u64) {
11592 self.epoch = Some(field);
11593 }
11594 pub fn with_epoch(mut self, field: u64) -> Self {
11596 self.set_epoch(field);
11597 self
11598 }
11599 pub fn randomness_round_opt_mut(&mut self) -> Option<&mut u64> {
11601 self.randomness_round.as_mut().map(|field| field as _)
11602 }
11603 pub fn randomness_round_mut(&mut self) -> &mut u64 {
11606 self.randomness_round.get_or_insert_default()
11607 }
11608 pub fn randomness_round_opt(&self) -> Option<u64> {
11610 self.randomness_round.as_ref().map(|field| *field)
11611 }
11612 pub fn set_randomness_round(&mut self, field: u64) {
11614 self.randomness_round = Some(field);
11615 }
11616 pub fn with_randomness_round(mut self, field: u64) -> Self {
11618 self.set_randomness_round(field);
11619 self
11620 }
11621 pub fn random_bytes_opt(&self) -> Option<&[u8]> {
11623 self.random_bytes.as_ref().map(|field| field as _)
11624 }
11625 pub fn set_random_bytes<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
11627 self.random_bytes = Some(field.into().into());
11628 }
11629 pub fn with_random_bytes<T: Into<::prost::bytes::Bytes>>(
11631 mut self,
11632 field: T,
11633 ) -> Self {
11634 self.set_random_bytes(field.into());
11635 self
11636 }
11637 pub fn randomness_object_initial_shared_version_opt_mut(
11639 &mut self,
11640 ) -> Option<&mut u64> {
11641 self.randomness_object_initial_shared_version
11642 .as_mut()
11643 .map(|field| field as _)
11644 }
11645 pub fn randomness_object_initial_shared_version_mut(&mut self) -> &mut u64 {
11648 self.randomness_object_initial_shared_version.get_or_insert_default()
11649 }
11650 pub fn randomness_object_initial_shared_version_opt(&self) -> Option<u64> {
11652 self.randomness_object_initial_shared_version.as_ref().map(|field| *field)
11653 }
11654 pub fn set_randomness_object_initial_shared_version(&mut self, field: u64) {
11656 self.randomness_object_initial_shared_version = Some(field);
11657 }
11658 pub fn with_randomness_object_initial_shared_version(
11660 mut self,
11661 field: u64,
11662 ) -> Self {
11663 self.set_randomness_object_initial_shared_version(field);
11664 self
11665 }
11666 }
11667 impl super::RegulatedCoinMetadata {
11668 pub const fn const_default() -> Self {
11669 Self {
11670 id: None,
11671 coin_metadata_object: None,
11672 deny_cap_object: None,
11673 allow_global_pause: None,
11674 variant: None,
11675 coin_regulated_state: None,
11676 }
11677 }
11678 #[doc(hidden)]
11679 pub fn default_instance() -> &'static Self {
11680 static DEFAULT: super::RegulatedCoinMetadata = super::RegulatedCoinMetadata::const_default();
11681 &DEFAULT
11682 }
11683 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
11685 self.id.as_mut().map(|field| field as _)
11686 }
11687 pub fn id_mut(&mut self) -> &mut String {
11690 self.id.get_or_insert_default()
11691 }
11692 pub fn id_opt(&self) -> Option<&str> {
11694 self.id.as_ref().map(|field| field as _)
11695 }
11696 pub fn set_id<T: Into<String>>(&mut self, field: T) {
11698 self.id = Some(field.into().into());
11699 }
11700 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
11702 self.set_id(field.into());
11703 self
11704 }
11705 pub fn coin_metadata_object_opt_mut(&mut self) -> Option<&mut String> {
11707 self.coin_metadata_object.as_mut().map(|field| field as _)
11708 }
11709 pub fn coin_metadata_object_mut(&mut self) -> &mut String {
11712 self.coin_metadata_object.get_or_insert_default()
11713 }
11714 pub fn coin_metadata_object_opt(&self) -> Option<&str> {
11716 self.coin_metadata_object.as_ref().map(|field| field as _)
11717 }
11718 pub fn set_coin_metadata_object<T: Into<String>>(&mut self, field: T) {
11720 self.coin_metadata_object = Some(field.into().into());
11721 }
11722 pub fn with_coin_metadata_object<T: Into<String>>(mut self, field: T) -> Self {
11724 self.set_coin_metadata_object(field.into());
11725 self
11726 }
11727 pub fn deny_cap_object_opt_mut(&mut self) -> Option<&mut String> {
11729 self.deny_cap_object.as_mut().map(|field| field as _)
11730 }
11731 pub fn deny_cap_object_mut(&mut self) -> &mut String {
11734 self.deny_cap_object.get_or_insert_default()
11735 }
11736 pub fn deny_cap_object_opt(&self) -> Option<&str> {
11738 self.deny_cap_object.as_ref().map(|field| field as _)
11739 }
11740 pub fn set_deny_cap_object<T: Into<String>>(&mut self, field: T) {
11742 self.deny_cap_object = Some(field.into().into());
11743 }
11744 pub fn with_deny_cap_object<T: Into<String>>(mut self, field: T) -> Self {
11746 self.set_deny_cap_object(field.into());
11747 self
11748 }
11749 pub fn allow_global_pause_opt_mut(&mut self) -> Option<&mut bool> {
11751 self.allow_global_pause.as_mut().map(|field| field as _)
11752 }
11753 pub fn allow_global_pause_mut(&mut self) -> &mut bool {
11756 self.allow_global_pause.get_or_insert_default()
11757 }
11758 pub fn allow_global_pause_opt(&self) -> Option<bool> {
11760 self.allow_global_pause.as_ref().map(|field| *field)
11761 }
11762 pub fn set_allow_global_pause(&mut self, field: bool) {
11764 self.allow_global_pause = Some(field);
11765 }
11766 pub fn with_allow_global_pause(mut self, field: bool) -> Self {
11768 self.set_allow_global_pause(field);
11769 self
11770 }
11771 pub fn variant_opt_mut(&mut self) -> Option<&mut u32> {
11773 self.variant.as_mut().map(|field| field as _)
11774 }
11775 pub fn variant_mut(&mut self) -> &mut u32 {
11778 self.variant.get_or_insert_default()
11779 }
11780 pub fn variant_opt(&self) -> Option<u32> {
11782 self.variant.as_ref().map(|field| *field)
11783 }
11784 pub fn set_variant(&mut self, field: u32) {
11786 self.variant = Some(field);
11787 }
11788 pub fn with_variant(mut self, field: u32) -> Self {
11790 self.set_variant(field);
11791 self
11792 }
11793 pub fn with_coin_regulated_state<
11795 T: Into<super::regulated_coin_metadata::CoinRegulatedState>,
11796 >(mut self, field: T) -> Self {
11797 self.set_coin_regulated_state(field.into());
11798 self
11799 }
11800 }
11801 impl super::ReverseLookupNameRequest {
11802 pub const fn const_default() -> Self {
11803 Self { address: None }
11804 }
11805 #[doc(hidden)]
11806 pub fn default_instance() -> &'static Self {
11807 static DEFAULT: super::ReverseLookupNameRequest = super::ReverseLookupNameRequest::const_default();
11808 &DEFAULT
11809 }
11810 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
11812 self.address.as_mut().map(|field| field as _)
11813 }
11814 pub fn address_mut(&mut self) -> &mut String {
11817 self.address.get_or_insert_default()
11818 }
11819 pub fn address_opt(&self) -> Option<&str> {
11821 self.address.as_ref().map(|field| field as _)
11822 }
11823 pub fn set_address<T: Into<String>>(&mut self, field: T) {
11825 self.address = Some(field.into().into());
11826 }
11827 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
11829 self.set_address(field.into());
11830 self
11831 }
11832 }
11833 impl super::ReverseLookupNameResponse {
11834 pub const fn const_default() -> Self {
11835 Self { record: None }
11836 }
11837 #[doc(hidden)]
11838 pub fn default_instance() -> &'static Self {
11839 static DEFAULT: super::ReverseLookupNameResponse = super::ReverseLookupNameResponse::const_default();
11840 &DEFAULT
11841 }
11842 pub fn record(&self) -> &super::NameRecord {
11844 self.record
11845 .as_ref()
11846 .map(|field| field as _)
11847 .unwrap_or_else(|| super::NameRecord::default_instance() as _)
11848 }
11849 pub fn record_opt_mut(&mut self) -> Option<&mut super::NameRecord> {
11851 self.record.as_mut().map(|field| field as _)
11852 }
11853 pub fn record_mut(&mut self) -> &mut super::NameRecord {
11856 self.record.get_or_insert_default()
11857 }
11858 pub fn record_opt(&self) -> Option<&super::NameRecord> {
11860 self.record.as_ref().map(|field| field as _)
11861 }
11862 pub fn set_record<T: Into<super::NameRecord>>(&mut self, field: T) {
11864 self.record = Some(field.into().into());
11865 }
11866 pub fn with_record<T: Into<super::NameRecord>>(mut self, field: T) -> Self {
11868 self.set_record(field.into());
11869 self
11870 }
11871 }
11872 impl super::SimpleSignature {
11873 pub const fn const_default() -> Self {
11874 Self {
11875 scheme: None,
11876 signature: None,
11877 public_key: None,
11878 }
11879 }
11880 #[doc(hidden)]
11881 pub fn default_instance() -> &'static Self {
11882 static DEFAULT: super::SimpleSignature = super::SimpleSignature::const_default();
11883 &DEFAULT
11884 }
11885 pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
11887 self.set_scheme(field.into());
11888 self
11889 }
11890 pub fn signature_opt(&self) -> Option<&[u8]> {
11892 self.signature.as_ref().map(|field| field as _)
11893 }
11894 pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
11896 self.signature = Some(field.into().into());
11897 }
11898 pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
11900 mut self,
11901 field: T,
11902 ) -> Self {
11903 self.set_signature(field.into());
11904 self
11905 }
11906 pub fn public_key_opt(&self) -> Option<&[u8]> {
11908 self.public_key.as_ref().map(|field| field as _)
11909 }
11910 pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
11912 self.public_key = Some(field.into().into());
11913 }
11914 pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
11916 mut self,
11917 field: T,
11918 ) -> Self {
11919 self.set_public_key(field.into());
11920 self
11921 }
11922 }
11923 impl super::SimulateTransactionRequest {
11924 pub const fn const_default() -> Self {
11925 Self {
11926 transaction: None,
11927 read_mask: None,
11928 checks: None,
11929 do_gas_selection: None,
11930 }
11931 }
11932 #[doc(hidden)]
11933 pub fn default_instance() -> &'static Self {
11934 static DEFAULT: super::SimulateTransactionRequest = super::SimulateTransactionRequest::const_default();
11935 &DEFAULT
11936 }
11937 pub fn transaction(&self) -> &super::Transaction {
11939 self.transaction
11940 .as_ref()
11941 .map(|field| field as _)
11942 .unwrap_or_else(|| super::Transaction::default_instance() as _)
11943 }
11944 pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
11946 self.transaction.as_mut().map(|field| field as _)
11947 }
11948 pub fn transaction_mut(&mut self) -> &mut super::Transaction {
11951 self.transaction.get_or_insert_default()
11952 }
11953 pub fn transaction_opt(&self) -> Option<&super::Transaction> {
11955 self.transaction.as_ref().map(|field| field as _)
11956 }
11957 pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
11959 self.transaction = Some(field.into().into());
11960 }
11961 pub fn with_transaction<T: Into<super::Transaction>>(
11963 mut self,
11964 field: T,
11965 ) -> Self {
11966 self.set_transaction(field.into());
11967 self
11968 }
11969 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
11971 self.read_mask.as_mut().map(|field| field as _)
11972 }
11973 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
11976 self.read_mask.get_or_insert_default()
11977 }
11978 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
11980 self.read_mask.as_ref().map(|field| field as _)
11981 }
11982 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
11984 self.read_mask = Some(field.into().into());
11985 }
11986 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
11988 mut self,
11989 field: T,
11990 ) -> Self {
11991 self.set_read_mask(field.into());
11992 self
11993 }
11994 pub fn with_checks<
11996 T: Into<super::simulate_transaction_request::TransactionChecks>,
11997 >(mut self, field: T) -> Self {
11998 self.set_checks(field.into());
11999 self
12000 }
12001 pub fn do_gas_selection_opt_mut(&mut self) -> Option<&mut bool> {
12003 self.do_gas_selection.as_mut().map(|field| field as _)
12004 }
12005 pub fn do_gas_selection_mut(&mut self) -> &mut bool {
12008 self.do_gas_selection.get_or_insert_default()
12009 }
12010 pub fn do_gas_selection_opt(&self) -> Option<bool> {
12012 self.do_gas_selection.as_ref().map(|field| *field)
12013 }
12014 pub fn set_do_gas_selection(&mut self, field: bool) {
12016 self.do_gas_selection = Some(field);
12017 }
12018 pub fn with_do_gas_selection(mut self, field: bool) -> Self {
12020 self.set_do_gas_selection(field);
12021 self
12022 }
12023 }
12024 impl super::SimulateTransactionResponse {
12025 pub const fn const_default() -> Self {
12026 Self {
12027 transaction: None,
12028 command_outputs: Vec::new(),
12029 }
12030 }
12031 #[doc(hidden)]
12032 pub fn default_instance() -> &'static Self {
12033 static DEFAULT: super::SimulateTransactionResponse = super::SimulateTransactionResponse::const_default();
12034 &DEFAULT
12035 }
12036 pub fn transaction(&self) -> &super::ExecutedTransaction {
12038 self.transaction
12039 .as_ref()
12040 .map(|field| field as _)
12041 .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
12042 }
12043 pub fn transaction_opt_mut(
12045 &mut self,
12046 ) -> Option<&mut super::ExecutedTransaction> {
12047 self.transaction.as_mut().map(|field| field as _)
12048 }
12049 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
12052 self.transaction.get_or_insert_default()
12053 }
12054 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
12056 self.transaction.as_ref().map(|field| field as _)
12057 }
12058 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
12060 &mut self,
12061 field: T,
12062 ) {
12063 self.transaction = Some(field.into().into());
12064 }
12065 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
12067 mut self,
12068 field: T,
12069 ) -> Self {
12070 self.set_transaction(field.into());
12071 self
12072 }
12073 pub fn command_outputs(&self) -> &[super::CommandResult] {
12075 &self.command_outputs
12076 }
12077 pub fn command_outputs_mut(&mut self) -> &mut Vec<super::CommandResult> {
12080 &mut self.command_outputs
12081 }
12082 pub fn set_command_outputs(&mut self, field: Vec<super::CommandResult>) {
12084 self.command_outputs = field;
12085 }
12086 pub fn with_command_outputs(mut self, field: Vec<super::CommandResult>) -> Self {
12088 self.set_command_outputs(field);
12089 self
12090 }
12091 }
12092 impl super::SizeError {
12093 pub const fn const_default() -> Self {
12094 Self { size: None, max_size: None }
12095 }
12096 #[doc(hidden)]
12097 pub fn default_instance() -> &'static Self {
12098 static DEFAULT: super::SizeError = super::SizeError::const_default();
12099 &DEFAULT
12100 }
12101 pub fn size_opt_mut(&mut self) -> Option<&mut u64> {
12103 self.size.as_mut().map(|field| field as _)
12104 }
12105 pub fn size_mut(&mut self) -> &mut u64 {
12108 self.size.get_or_insert_default()
12109 }
12110 pub fn size_opt(&self) -> Option<u64> {
12112 self.size.as_ref().map(|field| *field)
12113 }
12114 pub fn set_size(&mut self, field: u64) {
12116 self.size = Some(field);
12117 }
12118 pub fn with_size(mut self, field: u64) -> Self {
12120 self.set_size(field);
12121 self
12122 }
12123 pub fn max_size_opt_mut(&mut self) -> Option<&mut u64> {
12125 self.max_size.as_mut().map(|field| field as _)
12126 }
12127 pub fn max_size_mut(&mut self) -> &mut u64 {
12130 self.max_size.get_or_insert_default()
12131 }
12132 pub fn max_size_opt(&self) -> Option<u64> {
12134 self.max_size.as_ref().map(|field| *field)
12135 }
12136 pub fn set_max_size(&mut self, field: u64) {
12138 self.max_size = Some(field);
12139 }
12140 pub fn with_max_size(mut self, field: u64) -> Self {
12142 self.set_max_size(field);
12143 self
12144 }
12145 }
12146 impl super::SplitCoins {
12147 pub const fn const_default() -> Self {
12148 Self {
12149 coin: None,
12150 amounts: Vec::new(),
12151 }
12152 }
12153 #[doc(hidden)]
12154 pub fn default_instance() -> &'static Self {
12155 static DEFAULT: super::SplitCoins = super::SplitCoins::const_default();
12156 &DEFAULT
12157 }
12158 pub fn coin(&self) -> &super::Argument {
12160 self.coin
12161 .as_ref()
12162 .map(|field| field as _)
12163 .unwrap_or_else(|| super::Argument::default_instance() as _)
12164 }
12165 pub fn coin_opt_mut(&mut self) -> Option<&mut super::Argument> {
12167 self.coin.as_mut().map(|field| field as _)
12168 }
12169 pub fn coin_mut(&mut self) -> &mut super::Argument {
12172 self.coin.get_or_insert_default()
12173 }
12174 pub fn coin_opt(&self) -> Option<&super::Argument> {
12176 self.coin.as_ref().map(|field| field as _)
12177 }
12178 pub fn set_coin<T: Into<super::Argument>>(&mut self, field: T) {
12180 self.coin = Some(field.into().into());
12181 }
12182 pub fn with_coin<T: Into<super::Argument>>(mut self, field: T) -> Self {
12184 self.set_coin(field.into());
12185 self
12186 }
12187 pub fn amounts(&self) -> &[super::Argument] {
12189 &self.amounts
12190 }
12191 pub fn amounts_mut(&mut self) -> &mut Vec<super::Argument> {
12194 &mut self.amounts
12195 }
12196 pub fn set_amounts(&mut self, field: Vec<super::Argument>) {
12198 self.amounts = field;
12199 }
12200 pub fn with_amounts(mut self, field: Vec<super::Argument>) -> Self {
12202 self.set_amounts(field);
12203 self
12204 }
12205 }
12206 impl super::StakeSubsidy {
12207 pub const fn const_default() -> Self {
12208 Self {
12209 balance: None,
12210 distribution_counter: None,
12211 current_distribution_amount: None,
12212 stake_subsidy_period_length: None,
12213 stake_subsidy_decrease_rate: None,
12214 extra_fields: None,
12215 }
12216 }
12217 #[doc(hidden)]
12218 pub fn default_instance() -> &'static Self {
12219 static DEFAULT: super::StakeSubsidy = super::StakeSubsidy::const_default();
12220 &DEFAULT
12221 }
12222 pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
12224 self.balance.as_mut().map(|field| field as _)
12225 }
12226 pub fn balance_mut(&mut self) -> &mut u64 {
12229 self.balance.get_or_insert_default()
12230 }
12231 pub fn balance_opt(&self) -> Option<u64> {
12233 self.balance.as_ref().map(|field| *field)
12234 }
12235 pub fn set_balance(&mut self, field: u64) {
12237 self.balance = Some(field);
12238 }
12239 pub fn with_balance(mut self, field: u64) -> Self {
12241 self.set_balance(field);
12242 self
12243 }
12244 pub fn distribution_counter_opt_mut(&mut self) -> Option<&mut u64> {
12246 self.distribution_counter.as_mut().map(|field| field as _)
12247 }
12248 pub fn distribution_counter_mut(&mut self) -> &mut u64 {
12251 self.distribution_counter.get_or_insert_default()
12252 }
12253 pub fn distribution_counter_opt(&self) -> Option<u64> {
12255 self.distribution_counter.as_ref().map(|field| *field)
12256 }
12257 pub fn set_distribution_counter(&mut self, field: u64) {
12259 self.distribution_counter = Some(field);
12260 }
12261 pub fn with_distribution_counter(mut self, field: u64) -> Self {
12263 self.set_distribution_counter(field);
12264 self
12265 }
12266 pub fn current_distribution_amount_opt_mut(&mut self) -> Option<&mut u64> {
12268 self.current_distribution_amount.as_mut().map(|field| field as _)
12269 }
12270 pub fn current_distribution_amount_mut(&mut self) -> &mut u64 {
12273 self.current_distribution_amount.get_or_insert_default()
12274 }
12275 pub fn current_distribution_amount_opt(&self) -> Option<u64> {
12277 self.current_distribution_amount.as_ref().map(|field| *field)
12278 }
12279 pub fn set_current_distribution_amount(&mut self, field: u64) {
12281 self.current_distribution_amount = Some(field);
12282 }
12283 pub fn with_current_distribution_amount(mut self, field: u64) -> Self {
12285 self.set_current_distribution_amount(field);
12286 self
12287 }
12288 pub fn stake_subsidy_period_length_opt_mut(&mut self) -> Option<&mut u64> {
12290 self.stake_subsidy_period_length.as_mut().map(|field| field as _)
12291 }
12292 pub fn stake_subsidy_period_length_mut(&mut self) -> &mut u64 {
12295 self.stake_subsidy_period_length.get_or_insert_default()
12296 }
12297 pub fn stake_subsidy_period_length_opt(&self) -> Option<u64> {
12299 self.stake_subsidy_period_length.as_ref().map(|field| *field)
12300 }
12301 pub fn set_stake_subsidy_period_length(&mut self, field: u64) {
12303 self.stake_subsidy_period_length = Some(field);
12304 }
12305 pub fn with_stake_subsidy_period_length(mut self, field: u64) -> Self {
12307 self.set_stake_subsidy_period_length(field);
12308 self
12309 }
12310 pub fn stake_subsidy_decrease_rate_opt_mut(&mut self) -> Option<&mut u32> {
12312 self.stake_subsidy_decrease_rate.as_mut().map(|field| field as _)
12313 }
12314 pub fn stake_subsidy_decrease_rate_mut(&mut self) -> &mut u32 {
12317 self.stake_subsidy_decrease_rate.get_or_insert_default()
12318 }
12319 pub fn stake_subsidy_decrease_rate_opt(&self) -> Option<u32> {
12321 self.stake_subsidy_decrease_rate.as_ref().map(|field| *field)
12322 }
12323 pub fn set_stake_subsidy_decrease_rate(&mut self, field: u32) {
12325 self.stake_subsidy_decrease_rate = Some(field);
12326 }
12327 pub fn with_stake_subsidy_decrease_rate(mut self, field: u32) -> Self {
12329 self.set_stake_subsidy_decrease_rate(field);
12330 self
12331 }
12332 pub fn extra_fields(&self) -> &super::MoveTable {
12334 self.extra_fields
12335 .as_ref()
12336 .map(|field| field as _)
12337 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
12338 }
12339 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
12341 self.extra_fields.as_mut().map(|field| field as _)
12342 }
12343 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
12346 self.extra_fields.get_or_insert_default()
12347 }
12348 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
12350 self.extra_fields.as_ref().map(|field| field as _)
12351 }
12352 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
12354 self.extra_fields = Some(field.into().into());
12355 }
12356 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
12358 self.set_extra_fields(field.into());
12359 self
12360 }
12361 }
12362 impl super::StakingPool {
12363 pub const fn const_default() -> Self {
12364 Self {
12365 id: None,
12366 activation_epoch: None,
12367 deactivation_epoch: None,
12368 sui_balance: None,
12369 rewards_pool: None,
12370 pool_token_balance: None,
12371 exchange_rates: None,
12372 pending_stake: None,
12373 pending_total_sui_withdraw: None,
12374 pending_pool_token_withdraw: None,
12375 extra_fields: None,
12376 }
12377 }
12378 #[doc(hidden)]
12379 pub fn default_instance() -> &'static Self {
12380 static DEFAULT: super::StakingPool = super::StakingPool::const_default();
12381 &DEFAULT
12382 }
12383 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
12385 self.id.as_mut().map(|field| field as _)
12386 }
12387 pub fn id_mut(&mut self) -> &mut String {
12390 self.id.get_or_insert_default()
12391 }
12392 pub fn id_opt(&self) -> Option<&str> {
12394 self.id.as_ref().map(|field| field as _)
12395 }
12396 pub fn set_id<T: Into<String>>(&mut self, field: T) {
12398 self.id = Some(field.into().into());
12399 }
12400 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
12402 self.set_id(field.into());
12403 self
12404 }
12405 pub fn activation_epoch_opt_mut(&mut self) -> Option<&mut u64> {
12407 self.activation_epoch.as_mut().map(|field| field as _)
12408 }
12409 pub fn activation_epoch_mut(&mut self) -> &mut u64 {
12412 self.activation_epoch.get_or_insert_default()
12413 }
12414 pub fn activation_epoch_opt(&self) -> Option<u64> {
12416 self.activation_epoch.as_ref().map(|field| *field)
12417 }
12418 pub fn set_activation_epoch(&mut self, field: u64) {
12420 self.activation_epoch = Some(field);
12421 }
12422 pub fn with_activation_epoch(mut self, field: u64) -> Self {
12424 self.set_activation_epoch(field);
12425 self
12426 }
12427 pub fn deactivation_epoch_opt_mut(&mut self) -> Option<&mut u64> {
12429 self.deactivation_epoch.as_mut().map(|field| field as _)
12430 }
12431 pub fn deactivation_epoch_mut(&mut self) -> &mut u64 {
12434 self.deactivation_epoch.get_or_insert_default()
12435 }
12436 pub fn deactivation_epoch_opt(&self) -> Option<u64> {
12438 self.deactivation_epoch.as_ref().map(|field| *field)
12439 }
12440 pub fn set_deactivation_epoch(&mut self, field: u64) {
12442 self.deactivation_epoch = Some(field);
12443 }
12444 pub fn with_deactivation_epoch(mut self, field: u64) -> Self {
12446 self.set_deactivation_epoch(field);
12447 self
12448 }
12449 pub fn sui_balance_opt_mut(&mut self) -> Option<&mut u64> {
12451 self.sui_balance.as_mut().map(|field| field as _)
12452 }
12453 pub fn sui_balance_mut(&mut self) -> &mut u64 {
12456 self.sui_balance.get_or_insert_default()
12457 }
12458 pub fn sui_balance_opt(&self) -> Option<u64> {
12460 self.sui_balance.as_ref().map(|field| *field)
12461 }
12462 pub fn set_sui_balance(&mut self, field: u64) {
12464 self.sui_balance = Some(field);
12465 }
12466 pub fn with_sui_balance(mut self, field: u64) -> Self {
12468 self.set_sui_balance(field);
12469 self
12470 }
12471 pub fn rewards_pool_opt_mut(&mut self) -> Option<&mut u64> {
12473 self.rewards_pool.as_mut().map(|field| field as _)
12474 }
12475 pub fn rewards_pool_mut(&mut self) -> &mut u64 {
12478 self.rewards_pool.get_or_insert_default()
12479 }
12480 pub fn rewards_pool_opt(&self) -> Option<u64> {
12482 self.rewards_pool.as_ref().map(|field| *field)
12483 }
12484 pub fn set_rewards_pool(&mut self, field: u64) {
12486 self.rewards_pool = Some(field);
12487 }
12488 pub fn with_rewards_pool(mut self, field: u64) -> Self {
12490 self.set_rewards_pool(field);
12491 self
12492 }
12493 pub fn pool_token_balance_opt_mut(&mut self) -> Option<&mut u64> {
12495 self.pool_token_balance.as_mut().map(|field| field as _)
12496 }
12497 pub fn pool_token_balance_mut(&mut self) -> &mut u64 {
12500 self.pool_token_balance.get_or_insert_default()
12501 }
12502 pub fn pool_token_balance_opt(&self) -> Option<u64> {
12504 self.pool_token_balance.as_ref().map(|field| *field)
12505 }
12506 pub fn set_pool_token_balance(&mut self, field: u64) {
12508 self.pool_token_balance = Some(field);
12509 }
12510 pub fn with_pool_token_balance(mut self, field: u64) -> Self {
12512 self.set_pool_token_balance(field);
12513 self
12514 }
12515 pub fn exchange_rates(&self) -> &super::MoveTable {
12517 self.exchange_rates
12518 .as_ref()
12519 .map(|field| field as _)
12520 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
12521 }
12522 pub fn exchange_rates_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
12524 self.exchange_rates.as_mut().map(|field| field as _)
12525 }
12526 pub fn exchange_rates_mut(&mut self) -> &mut super::MoveTable {
12529 self.exchange_rates.get_or_insert_default()
12530 }
12531 pub fn exchange_rates_opt(&self) -> Option<&super::MoveTable> {
12533 self.exchange_rates.as_ref().map(|field| field as _)
12534 }
12535 pub fn set_exchange_rates<T: Into<super::MoveTable>>(&mut self, field: T) {
12537 self.exchange_rates = Some(field.into().into());
12538 }
12539 pub fn with_exchange_rates<T: Into<super::MoveTable>>(
12541 mut self,
12542 field: T,
12543 ) -> Self {
12544 self.set_exchange_rates(field.into());
12545 self
12546 }
12547 pub fn pending_stake_opt_mut(&mut self) -> Option<&mut u64> {
12549 self.pending_stake.as_mut().map(|field| field as _)
12550 }
12551 pub fn pending_stake_mut(&mut self) -> &mut u64 {
12554 self.pending_stake.get_or_insert_default()
12555 }
12556 pub fn pending_stake_opt(&self) -> Option<u64> {
12558 self.pending_stake.as_ref().map(|field| *field)
12559 }
12560 pub fn set_pending_stake(&mut self, field: u64) {
12562 self.pending_stake = Some(field);
12563 }
12564 pub fn with_pending_stake(mut self, field: u64) -> Self {
12566 self.set_pending_stake(field);
12567 self
12568 }
12569 pub fn pending_total_sui_withdraw_opt_mut(&mut self) -> Option<&mut u64> {
12571 self.pending_total_sui_withdraw.as_mut().map(|field| field as _)
12572 }
12573 pub fn pending_total_sui_withdraw_mut(&mut self) -> &mut u64 {
12576 self.pending_total_sui_withdraw.get_or_insert_default()
12577 }
12578 pub fn pending_total_sui_withdraw_opt(&self) -> Option<u64> {
12580 self.pending_total_sui_withdraw.as_ref().map(|field| *field)
12581 }
12582 pub fn set_pending_total_sui_withdraw(&mut self, field: u64) {
12584 self.pending_total_sui_withdraw = Some(field);
12585 }
12586 pub fn with_pending_total_sui_withdraw(mut self, field: u64) -> Self {
12588 self.set_pending_total_sui_withdraw(field);
12589 self
12590 }
12591 pub fn pending_pool_token_withdraw_opt_mut(&mut self) -> Option<&mut u64> {
12593 self.pending_pool_token_withdraw.as_mut().map(|field| field as _)
12594 }
12595 pub fn pending_pool_token_withdraw_mut(&mut self) -> &mut u64 {
12598 self.pending_pool_token_withdraw.get_or_insert_default()
12599 }
12600 pub fn pending_pool_token_withdraw_opt(&self) -> Option<u64> {
12602 self.pending_pool_token_withdraw.as_ref().map(|field| *field)
12603 }
12604 pub fn set_pending_pool_token_withdraw(&mut self, field: u64) {
12606 self.pending_pool_token_withdraw = Some(field);
12607 }
12608 pub fn with_pending_pool_token_withdraw(mut self, field: u64) -> Self {
12610 self.set_pending_pool_token_withdraw(field);
12611 self
12612 }
12613 pub fn extra_fields(&self) -> &super::MoveTable {
12615 self.extra_fields
12616 .as_ref()
12617 .map(|field| field as _)
12618 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
12619 }
12620 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
12622 self.extra_fields.as_mut().map(|field| field as _)
12623 }
12624 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
12627 self.extra_fields.get_or_insert_default()
12628 }
12629 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
12631 self.extra_fields.as_ref().map(|field| field as _)
12632 }
12633 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
12635 self.extra_fields = Some(field.into().into());
12636 }
12637 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
12639 self.set_extra_fields(field.into());
12640 self
12641 }
12642 }
12643 impl super::StorageFund {
12644 pub const fn const_default() -> Self {
12645 Self {
12646 total_object_storage_rebates: None,
12647 non_refundable_balance: None,
12648 }
12649 }
12650 #[doc(hidden)]
12651 pub fn default_instance() -> &'static Self {
12652 static DEFAULT: super::StorageFund = super::StorageFund::const_default();
12653 &DEFAULT
12654 }
12655 pub fn total_object_storage_rebates_opt_mut(&mut self) -> Option<&mut u64> {
12657 self.total_object_storage_rebates.as_mut().map(|field| field as _)
12658 }
12659 pub fn total_object_storage_rebates_mut(&mut self) -> &mut u64 {
12662 self.total_object_storage_rebates.get_or_insert_default()
12663 }
12664 pub fn total_object_storage_rebates_opt(&self) -> Option<u64> {
12666 self.total_object_storage_rebates.as_ref().map(|field| *field)
12667 }
12668 pub fn set_total_object_storage_rebates(&mut self, field: u64) {
12670 self.total_object_storage_rebates = Some(field);
12671 }
12672 pub fn with_total_object_storage_rebates(mut self, field: u64) -> Self {
12674 self.set_total_object_storage_rebates(field);
12675 self
12676 }
12677 pub fn non_refundable_balance_opt_mut(&mut self) -> Option<&mut u64> {
12679 self.non_refundable_balance.as_mut().map(|field| field as _)
12680 }
12681 pub fn non_refundable_balance_mut(&mut self) -> &mut u64 {
12684 self.non_refundable_balance.get_or_insert_default()
12685 }
12686 pub fn non_refundable_balance_opt(&self) -> Option<u64> {
12688 self.non_refundable_balance.as_ref().map(|field| *field)
12689 }
12690 pub fn set_non_refundable_balance(&mut self, field: u64) {
12692 self.non_refundable_balance = Some(field);
12693 }
12694 pub fn with_non_refundable_balance(mut self, field: u64) -> Self {
12696 self.set_non_refundable_balance(field);
12697 self
12698 }
12699 }
12700 impl super::SubscribeCheckpointsRequest {
12701 pub const fn const_default() -> Self {
12702 Self { read_mask: None }
12703 }
12704 #[doc(hidden)]
12705 pub fn default_instance() -> &'static Self {
12706 static DEFAULT: super::SubscribeCheckpointsRequest = super::SubscribeCheckpointsRequest::const_default();
12707 &DEFAULT
12708 }
12709 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
12711 self.read_mask.as_mut().map(|field| field as _)
12712 }
12713 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
12716 self.read_mask.get_or_insert_default()
12717 }
12718 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
12720 self.read_mask.as_ref().map(|field| field as _)
12721 }
12722 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
12724 self.read_mask = Some(field.into().into());
12725 }
12726 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
12728 mut self,
12729 field: T,
12730 ) -> Self {
12731 self.set_read_mask(field.into());
12732 self
12733 }
12734 }
12735 impl super::SubscribeCheckpointsResponse {
12736 pub const fn const_default() -> Self {
12737 Self {
12738 cursor: None,
12739 checkpoint: None,
12740 }
12741 }
12742 #[doc(hidden)]
12743 pub fn default_instance() -> &'static Self {
12744 static DEFAULT: super::SubscribeCheckpointsResponse = super::SubscribeCheckpointsResponse::const_default();
12745 &DEFAULT
12746 }
12747 pub fn cursor_opt_mut(&mut self) -> Option<&mut u64> {
12749 self.cursor.as_mut().map(|field| field as _)
12750 }
12751 pub fn cursor_mut(&mut self) -> &mut u64 {
12754 self.cursor.get_or_insert_default()
12755 }
12756 pub fn cursor_opt(&self) -> Option<u64> {
12758 self.cursor.as_ref().map(|field| *field)
12759 }
12760 pub fn set_cursor(&mut self, field: u64) {
12762 self.cursor = Some(field);
12763 }
12764 pub fn with_cursor(mut self, field: u64) -> Self {
12766 self.set_cursor(field);
12767 self
12768 }
12769 pub fn checkpoint(&self) -> &super::Checkpoint {
12771 self.checkpoint
12772 .as_ref()
12773 .map(|field| field as _)
12774 .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
12775 }
12776 pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
12778 self.checkpoint.as_mut().map(|field| field as _)
12779 }
12780 pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
12783 self.checkpoint.get_or_insert_default()
12784 }
12785 pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
12787 self.checkpoint.as_ref().map(|field| field as _)
12788 }
12789 pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
12791 self.checkpoint = Some(field.into().into());
12792 }
12793 pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
12795 self.set_checkpoint(field.into());
12796 self
12797 }
12798 }
12799 impl super::SystemPackage {
12800 pub const fn const_default() -> Self {
12801 Self {
12802 version: None,
12803 modules: Vec::new(),
12804 dependencies: Vec::new(),
12805 }
12806 }
12807 #[doc(hidden)]
12808 pub fn default_instance() -> &'static Self {
12809 static DEFAULT: super::SystemPackage = super::SystemPackage::const_default();
12810 &DEFAULT
12811 }
12812 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
12814 self.version.as_mut().map(|field| field as _)
12815 }
12816 pub fn version_mut(&mut self) -> &mut u64 {
12819 self.version.get_or_insert_default()
12820 }
12821 pub fn version_opt(&self) -> Option<u64> {
12823 self.version.as_ref().map(|field| *field)
12824 }
12825 pub fn set_version(&mut self, field: u64) {
12827 self.version = Some(field);
12828 }
12829 pub fn with_version(mut self, field: u64) -> Self {
12831 self.set_version(field);
12832 self
12833 }
12834 pub fn modules(&self) -> &[::prost::bytes::Bytes] {
12836 &self.modules
12837 }
12838 pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
12841 &mut self.modules
12842 }
12843 pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
12845 self.modules = field;
12846 }
12847 pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
12849 self.set_modules(field);
12850 self
12851 }
12852 pub fn dependencies(&self) -> &[String] {
12854 &self.dependencies
12855 }
12856 pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
12859 &mut self.dependencies
12860 }
12861 pub fn set_dependencies(&mut self, field: Vec<String>) {
12863 self.dependencies = field;
12864 }
12865 pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
12867 self.set_dependencies(field);
12868 self
12869 }
12870 }
12871 impl super::SystemParameters {
12872 pub const fn const_default() -> Self {
12873 Self {
12874 epoch_duration_ms: None,
12875 stake_subsidy_start_epoch: None,
12876 min_validator_count: None,
12877 max_validator_count: None,
12878 min_validator_joining_stake: None,
12879 validator_low_stake_threshold: None,
12880 validator_very_low_stake_threshold: None,
12881 validator_low_stake_grace_period: None,
12882 extra_fields: None,
12883 }
12884 }
12885 #[doc(hidden)]
12886 pub fn default_instance() -> &'static Self {
12887 static DEFAULT: super::SystemParameters = super::SystemParameters::const_default();
12888 &DEFAULT
12889 }
12890 pub fn epoch_duration_ms_opt_mut(&mut self) -> Option<&mut u64> {
12892 self.epoch_duration_ms.as_mut().map(|field| field as _)
12893 }
12894 pub fn epoch_duration_ms_mut(&mut self) -> &mut u64 {
12897 self.epoch_duration_ms.get_or_insert_default()
12898 }
12899 pub fn epoch_duration_ms_opt(&self) -> Option<u64> {
12901 self.epoch_duration_ms.as_ref().map(|field| *field)
12902 }
12903 pub fn set_epoch_duration_ms(&mut self, field: u64) {
12905 self.epoch_duration_ms = Some(field);
12906 }
12907 pub fn with_epoch_duration_ms(mut self, field: u64) -> Self {
12909 self.set_epoch_duration_ms(field);
12910 self
12911 }
12912 pub fn stake_subsidy_start_epoch_opt_mut(&mut self) -> Option<&mut u64> {
12914 self.stake_subsidy_start_epoch.as_mut().map(|field| field as _)
12915 }
12916 pub fn stake_subsidy_start_epoch_mut(&mut self) -> &mut u64 {
12919 self.stake_subsidy_start_epoch.get_or_insert_default()
12920 }
12921 pub fn stake_subsidy_start_epoch_opt(&self) -> Option<u64> {
12923 self.stake_subsidy_start_epoch.as_ref().map(|field| *field)
12924 }
12925 pub fn set_stake_subsidy_start_epoch(&mut self, field: u64) {
12927 self.stake_subsidy_start_epoch = Some(field);
12928 }
12929 pub fn with_stake_subsidy_start_epoch(mut self, field: u64) -> Self {
12931 self.set_stake_subsidy_start_epoch(field);
12932 self
12933 }
12934 pub fn min_validator_count_opt_mut(&mut self) -> Option<&mut u64> {
12936 self.min_validator_count.as_mut().map(|field| field as _)
12937 }
12938 pub fn min_validator_count_mut(&mut self) -> &mut u64 {
12941 self.min_validator_count.get_or_insert_default()
12942 }
12943 pub fn min_validator_count_opt(&self) -> Option<u64> {
12945 self.min_validator_count.as_ref().map(|field| *field)
12946 }
12947 pub fn set_min_validator_count(&mut self, field: u64) {
12949 self.min_validator_count = Some(field);
12950 }
12951 pub fn with_min_validator_count(mut self, field: u64) -> Self {
12953 self.set_min_validator_count(field);
12954 self
12955 }
12956 pub fn max_validator_count_opt_mut(&mut self) -> Option<&mut u64> {
12958 self.max_validator_count.as_mut().map(|field| field as _)
12959 }
12960 pub fn max_validator_count_mut(&mut self) -> &mut u64 {
12963 self.max_validator_count.get_or_insert_default()
12964 }
12965 pub fn max_validator_count_opt(&self) -> Option<u64> {
12967 self.max_validator_count.as_ref().map(|field| *field)
12968 }
12969 pub fn set_max_validator_count(&mut self, field: u64) {
12971 self.max_validator_count = Some(field);
12972 }
12973 pub fn with_max_validator_count(mut self, field: u64) -> Self {
12975 self.set_max_validator_count(field);
12976 self
12977 }
12978 pub fn min_validator_joining_stake_opt_mut(&mut self) -> Option<&mut u64> {
12980 self.min_validator_joining_stake.as_mut().map(|field| field as _)
12981 }
12982 pub fn min_validator_joining_stake_mut(&mut self) -> &mut u64 {
12985 self.min_validator_joining_stake.get_or_insert_default()
12986 }
12987 pub fn min_validator_joining_stake_opt(&self) -> Option<u64> {
12989 self.min_validator_joining_stake.as_ref().map(|field| *field)
12990 }
12991 pub fn set_min_validator_joining_stake(&mut self, field: u64) {
12993 self.min_validator_joining_stake = Some(field);
12994 }
12995 pub fn with_min_validator_joining_stake(mut self, field: u64) -> Self {
12997 self.set_min_validator_joining_stake(field);
12998 self
12999 }
13000 pub fn validator_low_stake_threshold_opt_mut(&mut self) -> Option<&mut u64> {
13002 self.validator_low_stake_threshold.as_mut().map(|field| field as _)
13003 }
13004 pub fn validator_low_stake_threshold_mut(&mut self) -> &mut u64 {
13007 self.validator_low_stake_threshold.get_or_insert_default()
13008 }
13009 pub fn validator_low_stake_threshold_opt(&self) -> Option<u64> {
13011 self.validator_low_stake_threshold.as_ref().map(|field| *field)
13012 }
13013 pub fn set_validator_low_stake_threshold(&mut self, field: u64) {
13015 self.validator_low_stake_threshold = Some(field);
13016 }
13017 pub fn with_validator_low_stake_threshold(mut self, field: u64) -> Self {
13019 self.set_validator_low_stake_threshold(field);
13020 self
13021 }
13022 pub fn validator_very_low_stake_threshold_opt_mut(
13024 &mut self,
13025 ) -> Option<&mut u64> {
13026 self.validator_very_low_stake_threshold.as_mut().map(|field| field as _)
13027 }
13028 pub fn validator_very_low_stake_threshold_mut(&mut self) -> &mut u64 {
13031 self.validator_very_low_stake_threshold.get_or_insert_default()
13032 }
13033 pub fn validator_very_low_stake_threshold_opt(&self) -> Option<u64> {
13035 self.validator_very_low_stake_threshold.as_ref().map(|field| *field)
13036 }
13037 pub fn set_validator_very_low_stake_threshold(&mut self, field: u64) {
13039 self.validator_very_low_stake_threshold = Some(field);
13040 }
13041 pub fn with_validator_very_low_stake_threshold(mut self, field: u64) -> Self {
13043 self.set_validator_very_low_stake_threshold(field);
13044 self
13045 }
13046 pub fn validator_low_stake_grace_period_opt_mut(&mut self) -> Option<&mut u64> {
13048 self.validator_low_stake_grace_period.as_mut().map(|field| field as _)
13049 }
13050 pub fn validator_low_stake_grace_period_mut(&mut self) -> &mut u64 {
13053 self.validator_low_stake_grace_period.get_or_insert_default()
13054 }
13055 pub fn validator_low_stake_grace_period_opt(&self) -> Option<u64> {
13057 self.validator_low_stake_grace_period.as_ref().map(|field| *field)
13058 }
13059 pub fn set_validator_low_stake_grace_period(&mut self, field: u64) {
13061 self.validator_low_stake_grace_period = Some(field);
13062 }
13063 pub fn with_validator_low_stake_grace_period(mut self, field: u64) -> Self {
13065 self.set_validator_low_stake_grace_period(field);
13066 self
13067 }
13068 pub fn extra_fields(&self) -> &super::MoveTable {
13070 self.extra_fields
13071 .as_ref()
13072 .map(|field| field as _)
13073 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
13074 }
13075 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
13077 self.extra_fields.as_mut().map(|field| field as _)
13078 }
13079 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
13082 self.extra_fields.get_or_insert_default()
13083 }
13084 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
13086 self.extra_fields.as_ref().map(|field| field as _)
13087 }
13088 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
13090 self.extra_fields = Some(field.into().into());
13091 }
13092 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
13094 self.set_extra_fields(field.into());
13095 self
13096 }
13097 }
13098 impl super::SystemState {
13099 pub const fn const_default() -> Self {
13100 Self {
13101 version: None,
13102 epoch: None,
13103 protocol_version: None,
13104 validators: None,
13105 storage_fund: None,
13106 parameters: None,
13107 reference_gas_price: None,
13108 validator_report_records: Vec::new(),
13109 stake_subsidy: None,
13110 safe_mode: None,
13111 safe_mode_storage_rewards: None,
13112 safe_mode_computation_rewards: None,
13113 safe_mode_storage_rebates: None,
13114 safe_mode_non_refundable_storage_fee: None,
13115 epoch_start_timestamp_ms: None,
13116 extra_fields: None,
13117 }
13118 }
13119 #[doc(hidden)]
13120 pub fn default_instance() -> &'static Self {
13121 static DEFAULT: super::SystemState = super::SystemState::const_default();
13122 &DEFAULT
13123 }
13124 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
13126 self.version.as_mut().map(|field| field as _)
13127 }
13128 pub fn version_mut(&mut self) -> &mut u64 {
13131 self.version.get_or_insert_default()
13132 }
13133 pub fn version_opt(&self) -> Option<u64> {
13135 self.version.as_ref().map(|field| *field)
13136 }
13137 pub fn set_version(&mut self, field: u64) {
13139 self.version = Some(field);
13140 }
13141 pub fn with_version(mut self, field: u64) -> Self {
13143 self.set_version(field);
13144 self
13145 }
13146 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
13148 self.epoch.as_mut().map(|field| field as _)
13149 }
13150 pub fn epoch_mut(&mut self) -> &mut u64 {
13153 self.epoch.get_or_insert_default()
13154 }
13155 pub fn epoch_opt(&self) -> Option<u64> {
13157 self.epoch.as_ref().map(|field| *field)
13158 }
13159 pub fn set_epoch(&mut self, field: u64) {
13161 self.epoch = Some(field);
13162 }
13163 pub fn with_epoch(mut self, field: u64) -> Self {
13165 self.set_epoch(field);
13166 self
13167 }
13168 pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
13170 self.protocol_version.as_mut().map(|field| field as _)
13171 }
13172 pub fn protocol_version_mut(&mut self) -> &mut u64 {
13175 self.protocol_version.get_or_insert_default()
13176 }
13177 pub fn protocol_version_opt(&self) -> Option<u64> {
13179 self.protocol_version.as_ref().map(|field| *field)
13180 }
13181 pub fn set_protocol_version(&mut self, field: u64) {
13183 self.protocol_version = Some(field);
13184 }
13185 pub fn with_protocol_version(mut self, field: u64) -> Self {
13187 self.set_protocol_version(field);
13188 self
13189 }
13190 pub fn validators(&self) -> &super::ValidatorSet {
13192 self.validators
13193 .as_ref()
13194 .map(|field| field as _)
13195 .unwrap_or_else(|| super::ValidatorSet::default_instance() as _)
13196 }
13197 pub fn validators_opt_mut(&mut self) -> Option<&mut super::ValidatorSet> {
13199 self.validators.as_mut().map(|field| field as _)
13200 }
13201 pub fn validators_mut(&mut self) -> &mut super::ValidatorSet {
13204 self.validators.get_or_insert_default()
13205 }
13206 pub fn validators_opt(&self) -> Option<&super::ValidatorSet> {
13208 self.validators.as_ref().map(|field| field as _)
13209 }
13210 pub fn set_validators<T: Into<super::ValidatorSet>>(&mut self, field: T) {
13212 self.validators = Some(field.into().into());
13213 }
13214 pub fn with_validators<T: Into<super::ValidatorSet>>(
13216 mut self,
13217 field: T,
13218 ) -> Self {
13219 self.set_validators(field.into());
13220 self
13221 }
13222 pub fn storage_fund(&self) -> &super::StorageFund {
13224 self.storage_fund
13225 .as_ref()
13226 .map(|field| field as _)
13227 .unwrap_or_else(|| super::StorageFund::default_instance() as _)
13228 }
13229 pub fn storage_fund_opt_mut(&mut self) -> Option<&mut super::StorageFund> {
13231 self.storage_fund.as_mut().map(|field| field as _)
13232 }
13233 pub fn storage_fund_mut(&mut self) -> &mut super::StorageFund {
13236 self.storage_fund.get_or_insert_default()
13237 }
13238 pub fn storage_fund_opt(&self) -> Option<&super::StorageFund> {
13240 self.storage_fund.as_ref().map(|field| field as _)
13241 }
13242 pub fn set_storage_fund<T: Into<super::StorageFund>>(&mut self, field: T) {
13244 self.storage_fund = Some(field.into().into());
13245 }
13246 pub fn with_storage_fund<T: Into<super::StorageFund>>(
13248 mut self,
13249 field: T,
13250 ) -> Self {
13251 self.set_storage_fund(field.into());
13252 self
13253 }
13254 pub fn parameters(&self) -> &super::SystemParameters {
13256 self.parameters
13257 .as_ref()
13258 .map(|field| field as _)
13259 .unwrap_or_else(|| super::SystemParameters::default_instance() as _)
13260 }
13261 pub fn parameters_opt_mut(&mut self) -> Option<&mut super::SystemParameters> {
13263 self.parameters.as_mut().map(|field| field as _)
13264 }
13265 pub fn parameters_mut(&mut self) -> &mut super::SystemParameters {
13268 self.parameters.get_or_insert_default()
13269 }
13270 pub fn parameters_opt(&self) -> Option<&super::SystemParameters> {
13272 self.parameters.as_ref().map(|field| field as _)
13273 }
13274 pub fn set_parameters<T: Into<super::SystemParameters>>(&mut self, field: T) {
13276 self.parameters = Some(field.into().into());
13277 }
13278 pub fn with_parameters<T: Into<super::SystemParameters>>(
13280 mut self,
13281 field: T,
13282 ) -> Self {
13283 self.set_parameters(field.into());
13284 self
13285 }
13286 pub fn reference_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
13288 self.reference_gas_price.as_mut().map(|field| field as _)
13289 }
13290 pub fn reference_gas_price_mut(&mut self) -> &mut u64 {
13293 self.reference_gas_price.get_or_insert_default()
13294 }
13295 pub fn reference_gas_price_opt(&self) -> Option<u64> {
13297 self.reference_gas_price.as_ref().map(|field| *field)
13298 }
13299 pub fn set_reference_gas_price(&mut self, field: u64) {
13301 self.reference_gas_price = Some(field);
13302 }
13303 pub fn with_reference_gas_price(mut self, field: u64) -> Self {
13305 self.set_reference_gas_price(field);
13306 self
13307 }
13308 pub fn validator_report_records(&self) -> &[super::ValidatorReportRecord] {
13310 &self.validator_report_records
13311 }
13312 pub fn validator_report_records_mut(
13315 &mut self,
13316 ) -> &mut Vec<super::ValidatorReportRecord> {
13317 &mut self.validator_report_records
13318 }
13319 pub fn set_validator_report_records(
13321 &mut self,
13322 field: Vec<super::ValidatorReportRecord>,
13323 ) {
13324 self.validator_report_records = field;
13325 }
13326 pub fn with_validator_report_records(
13328 mut self,
13329 field: Vec<super::ValidatorReportRecord>,
13330 ) -> Self {
13331 self.set_validator_report_records(field);
13332 self
13333 }
13334 pub fn stake_subsidy(&self) -> &super::StakeSubsidy {
13336 self.stake_subsidy
13337 .as_ref()
13338 .map(|field| field as _)
13339 .unwrap_or_else(|| super::StakeSubsidy::default_instance() as _)
13340 }
13341 pub fn stake_subsidy_opt_mut(&mut self) -> Option<&mut super::StakeSubsidy> {
13343 self.stake_subsidy.as_mut().map(|field| field as _)
13344 }
13345 pub fn stake_subsidy_mut(&mut self) -> &mut super::StakeSubsidy {
13348 self.stake_subsidy.get_or_insert_default()
13349 }
13350 pub fn stake_subsidy_opt(&self) -> Option<&super::StakeSubsidy> {
13352 self.stake_subsidy.as_ref().map(|field| field as _)
13353 }
13354 pub fn set_stake_subsidy<T: Into<super::StakeSubsidy>>(&mut self, field: T) {
13356 self.stake_subsidy = Some(field.into().into());
13357 }
13358 pub fn with_stake_subsidy<T: Into<super::StakeSubsidy>>(
13360 mut self,
13361 field: T,
13362 ) -> Self {
13363 self.set_stake_subsidy(field.into());
13364 self
13365 }
13366 pub fn safe_mode_opt_mut(&mut self) -> Option<&mut bool> {
13368 self.safe_mode.as_mut().map(|field| field as _)
13369 }
13370 pub fn safe_mode_mut(&mut self) -> &mut bool {
13373 self.safe_mode.get_or_insert_default()
13374 }
13375 pub fn safe_mode_opt(&self) -> Option<bool> {
13377 self.safe_mode.as_ref().map(|field| *field)
13378 }
13379 pub fn set_safe_mode(&mut self, field: bool) {
13381 self.safe_mode = Some(field);
13382 }
13383 pub fn with_safe_mode(mut self, field: bool) -> Self {
13385 self.set_safe_mode(field);
13386 self
13387 }
13388 pub fn safe_mode_storage_rewards_opt_mut(&mut self) -> Option<&mut u64> {
13390 self.safe_mode_storage_rewards.as_mut().map(|field| field as _)
13391 }
13392 pub fn safe_mode_storage_rewards_mut(&mut self) -> &mut u64 {
13395 self.safe_mode_storage_rewards.get_or_insert_default()
13396 }
13397 pub fn safe_mode_storage_rewards_opt(&self) -> Option<u64> {
13399 self.safe_mode_storage_rewards.as_ref().map(|field| *field)
13400 }
13401 pub fn set_safe_mode_storage_rewards(&mut self, field: u64) {
13403 self.safe_mode_storage_rewards = Some(field);
13404 }
13405 pub fn with_safe_mode_storage_rewards(mut self, field: u64) -> Self {
13407 self.set_safe_mode_storage_rewards(field);
13408 self
13409 }
13410 pub fn safe_mode_computation_rewards_opt_mut(&mut self) -> Option<&mut u64> {
13412 self.safe_mode_computation_rewards.as_mut().map(|field| field as _)
13413 }
13414 pub fn safe_mode_computation_rewards_mut(&mut self) -> &mut u64 {
13417 self.safe_mode_computation_rewards.get_or_insert_default()
13418 }
13419 pub fn safe_mode_computation_rewards_opt(&self) -> Option<u64> {
13421 self.safe_mode_computation_rewards.as_ref().map(|field| *field)
13422 }
13423 pub fn set_safe_mode_computation_rewards(&mut self, field: u64) {
13425 self.safe_mode_computation_rewards = Some(field);
13426 }
13427 pub fn with_safe_mode_computation_rewards(mut self, field: u64) -> Self {
13429 self.set_safe_mode_computation_rewards(field);
13430 self
13431 }
13432 pub fn safe_mode_storage_rebates_opt_mut(&mut self) -> Option<&mut u64> {
13434 self.safe_mode_storage_rebates.as_mut().map(|field| field as _)
13435 }
13436 pub fn safe_mode_storage_rebates_mut(&mut self) -> &mut u64 {
13439 self.safe_mode_storage_rebates.get_or_insert_default()
13440 }
13441 pub fn safe_mode_storage_rebates_opt(&self) -> Option<u64> {
13443 self.safe_mode_storage_rebates.as_ref().map(|field| *field)
13444 }
13445 pub fn set_safe_mode_storage_rebates(&mut self, field: u64) {
13447 self.safe_mode_storage_rebates = Some(field);
13448 }
13449 pub fn with_safe_mode_storage_rebates(mut self, field: u64) -> Self {
13451 self.set_safe_mode_storage_rebates(field);
13452 self
13453 }
13454 pub fn safe_mode_non_refundable_storage_fee_opt_mut(
13456 &mut self,
13457 ) -> Option<&mut u64> {
13458 self.safe_mode_non_refundable_storage_fee.as_mut().map(|field| field as _)
13459 }
13460 pub fn safe_mode_non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
13463 self.safe_mode_non_refundable_storage_fee.get_or_insert_default()
13464 }
13465 pub fn safe_mode_non_refundable_storage_fee_opt(&self) -> Option<u64> {
13467 self.safe_mode_non_refundable_storage_fee.as_ref().map(|field| *field)
13468 }
13469 pub fn set_safe_mode_non_refundable_storage_fee(&mut self, field: u64) {
13471 self.safe_mode_non_refundable_storage_fee = Some(field);
13472 }
13473 pub fn with_safe_mode_non_refundable_storage_fee(mut self, field: u64) -> Self {
13475 self.set_safe_mode_non_refundable_storage_fee(field);
13476 self
13477 }
13478 pub fn epoch_start_timestamp_ms_opt_mut(&mut self) -> Option<&mut u64> {
13480 self.epoch_start_timestamp_ms.as_mut().map(|field| field as _)
13481 }
13482 pub fn epoch_start_timestamp_ms_mut(&mut self) -> &mut u64 {
13485 self.epoch_start_timestamp_ms.get_or_insert_default()
13486 }
13487 pub fn epoch_start_timestamp_ms_opt(&self) -> Option<u64> {
13489 self.epoch_start_timestamp_ms.as_ref().map(|field| *field)
13490 }
13491 pub fn set_epoch_start_timestamp_ms(&mut self, field: u64) {
13493 self.epoch_start_timestamp_ms = Some(field);
13494 }
13495 pub fn with_epoch_start_timestamp_ms(mut self, field: u64) -> Self {
13497 self.set_epoch_start_timestamp_ms(field);
13498 self
13499 }
13500 pub fn extra_fields(&self) -> &super::MoveTable {
13502 self.extra_fields
13503 .as_ref()
13504 .map(|field| field as _)
13505 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
13506 }
13507 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
13509 self.extra_fields.as_mut().map(|field| field as _)
13510 }
13511 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
13514 self.extra_fields.get_or_insert_default()
13515 }
13516 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
13518 self.extra_fields.as_ref().map(|field| field as _)
13519 }
13520 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
13522 self.extra_fields = Some(field.into().into());
13523 }
13524 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
13526 self.set_extra_fields(field.into());
13527 self
13528 }
13529 }
13530 impl super::Transaction {
13531 pub const fn const_default() -> Self {
13532 Self {
13533 bcs: None,
13534 digest: None,
13535 version: None,
13536 kind: None,
13537 sender: None,
13538 gas_payment: None,
13539 expiration: None,
13540 }
13541 }
13542 #[doc(hidden)]
13543 pub fn default_instance() -> &'static Self {
13544 static DEFAULT: super::Transaction = super::Transaction::const_default();
13545 &DEFAULT
13546 }
13547 pub fn bcs(&self) -> &super::Bcs {
13549 self.bcs
13550 .as_ref()
13551 .map(|field| field as _)
13552 .unwrap_or_else(|| super::Bcs::default_instance() as _)
13553 }
13554 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
13556 self.bcs.as_mut().map(|field| field as _)
13557 }
13558 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
13561 self.bcs.get_or_insert_default()
13562 }
13563 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
13565 self.bcs.as_ref().map(|field| field as _)
13566 }
13567 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
13569 self.bcs = Some(field.into().into());
13570 }
13571 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
13573 self.set_bcs(field.into());
13574 self
13575 }
13576 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
13578 self.digest.as_mut().map(|field| field as _)
13579 }
13580 pub fn digest_mut(&mut self) -> &mut String {
13583 self.digest.get_or_insert_default()
13584 }
13585 pub fn digest_opt(&self) -> Option<&str> {
13587 self.digest.as_ref().map(|field| field as _)
13588 }
13589 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
13591 self.digest = Some(field.into().into());
13592 }
13593 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
13595 self.set_digest(field.into());
13596 self
13597 }
13598 pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
13600 self.version.as_mut().map(|field| field as _)
13601 }
13602 pub fn version_mut(&mut self) -> &mut i32 {
13605 self.version.get_or_insert_default()
13606 }
13607 pub fn version_opt(&self) -> Option<i32> {
13609 self.version.as_ref().map(|field| *field)
13610 }
13611 pub fn set_version(&mut self, field: i32) {
13613 self.version = Some(field);
13614 }
13615 pub fn with_version(mut self, field: i32) -> Self {
13617 self.set_version(field);
13618 self
13619 }
13620 pub fn kind(&self) -> &super::TransactionKind {
13622 self.kind
13623 .as_ref()
13624 .map(|field| field as _)
13625 .unwrap_or_else(|| super::TransactionKind::default_instance() as _)
13626 }
13627 pub fn kind_opt_mut(&mut self) -> Option<&mut super::TransactionKind> {
13629 self.kind.as_mut().map(|field| field as _)
13630 }
13631 pub fn kind_mut(&mut self) -> &mut super::TransactionKind {
13634 self.kind.get_or_insert_default()
13635 }
13636 pub fn kind_opt(&self) -> Option<&super::TransactionKind> {
13638 self.kind.as_ref().map(|field| field as _)
13639 }
13640 pub fn set_kind<T: Into<super::TransactionKind>>(&mut self, field: T) {
13642 self.kind = Some(field.into().into());
13643 }
13644 pub fn with_kind<T: Into<super::TransactionKind>>(mut self, field: T) -> Self {
13646 self.set_kind(field.into());
13647 self
13648 }
13649 pub fn sender_opt_mut(&mut self) -> Option<&mut String> {
13651 self.sender.as_mut().map(|field| field as _)
13652 }
13653 pub fn sender_mut(&mut self) -> &mut String {
13656 self.sender.get_or_insert_default()
13657 }
13658 pub fn sender_opt(&self) -> Option<&str> {
13660 self.sender.as_ref().map(|field| field as _)
13661 }
13662 pub fn set_sender<T: Into<String>>(&mut self, field: T) {
13664 self.sender = Some(field.into().into());
13665 }
13666 pub fn with_sender<T: Into<String>>(mut self, field: T) -> Self {
13668 self.set_sender(field.into());
13669 self
13670 }
13671 pub fn gas_payment(&self) -> &super::GasPayment {
13673 self.gas_payment
13674 .as_ref()
13675 .map(|field| field as _)
13676 .unwrap_or_else(|| super::GasPayment::default_instance() as _)
13677 }
13678 pub fn gas_payment_opt_mut(&mut self) -> Option<&mut super::GasPayment> {
13680 self.gas_payment.as_mut().map(|field| field as _)
13681 }
13682 pub fn gas_payment_mut(&mut self) -> &mut super::GasPayment {
13685 self.gas_payment.get_or_insert_default()
13686 }
13687 pub fn gas_payment_opt(&self) -> Option<&super::GasPayment> {
13689 self.gas_payment.as_ref().map(|field| field as _)
13690 }
13691 pub fn set_gas_payment<T: Into<super::GasPayment>>(&mut self, field: T) {
13693 self.gas_payment = Some(field.into().into());
13694 }
13695 pub fn with_gas_payment<T: Into<super::GasPayment>>(mut self, field: T) -> Self {
13697 self.set_gas_payment(field.into());
13698 self
13699 }
13700 pub fn expiration(&self) -> &super::TransactionExpiration {
13702 self.expiration
13703 .as_ref()
13704 .map(|field| field as _)
13705 .unwrap_or_else(|| super::TransactionExpiration::default_instance() as _)
13706 }
13707 pub fn expiration_opt_mut(
13709 &mut self,
13710 ) -> Option<&mut super::TransactionExpiration> {
13711 self.expiration.as_mut().map(|field| field as _)
13712 }
13713 pub fn expiration_mut(&mut self) -> &mut super::TransactionExpiration {
13716 self.expiration.get_or_insert_default()
13717 }
13718 pub fn expiration_opt(&self) -> Option<&super::TransactionExpiration> {
13720 self.expiration.as_ref().map(|field| field as _)
13721 }
13722 pub fn set_expiration<T: Into<super::TransactionExpiration>>(
13724 &mut self,
13725 field: T,
13726 ) {
13727 self.expiration = Some(field.into().into());
13728 }
13729 pub fn with_expiration<T: Into<super::TransactionExpiration>>(
13731 mut self,
13732 field: T,
13733 ) -> Self {
13734 self.set_expiration(field.into());
13735 self
13736 }
13737 }
13738 impl super::TransactionEffects {
13739 pub const fn const_default() -> Self {
13740 Self {
13741 bcs: None,
13742 digest: None,
13743 version: None,
13744 status: None,
13745 epoch: None,
13746 gas_used: None,
13747 transaction_digest: None,
13748 gas_object: None,
13749 events_digest: None,
13750 dependencies: Vec::new(),
13751 lamport_version: None,
13752 changed_objects: Vec::new(),
13753 unchanged_consensus_objects: Vec::new(),
13754 auxiliary_data_digest: None,
13755 unchanged_loaded_runtime_objects: Vec::new(),
13756 }
13757 }
13758 #[doc(hidden)]
13759 pub fn default_instance() -> &'static Self {
13760 static DEFAULT: super::TransactionEffects = super::TransactionEffects::const_default();
13761 &DEFAULT
13762 }
13763 pub fn bcs(&self) -> &super::Bcs {
13765 self.bcs
13766 .as_ref()
13767 .map(|field| field as _)
13768 .unwrap_or_else(|| super::Bcs::default_instance() as _)
13769 }
13770 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
13772 self.bcs.as_mut().map(|field| field as _)
13773 }
13774 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
13777 self.bcs.get_or_insert_default()
13778 }
13779 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
13781 self.bcs.as_ref().map(|field| field as _)
13782 }
13783 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
13785 self.bcs = Some(field.into().into());
13786 }
13787 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
13789 self.set_bcs(field.into());
13790 self
13791 }
13792 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
13794 self.digest.as_mut().map(|field| field as _)
13795 }
13796 pub fn digest_mut(&mut self) -> &mut String {
13799 self.digest.get_or_insert_default()
13800 }
13801 pub fn digest_opt(&self) -> Option<&str> {
13803 self.digest.as_ref().map(|field| field as _)
13804 }
13805 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
13807 self.digest = Some(field.into().into());
13808 }
13809 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
13811 self.set_digest(field.into());
13812 self
13813 }
13814 pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
13816 self.version.as_mut().map(|field| field as _)
13817 }
13818 pub fn version_mut(&mut self) -> &mut i32 {
13821 self.version.get_or_insert_default()
13822 }
13823 pub fn version_opt(&self) -> Option<i32> {
13825 self.version.as_ref().map(|field| *field)
13826 }
13827 pub fn set_version(&mut self, field: i32) {
13829 self.version = Some(field);
13830 }
13831 pub fn with_version(mut self, field: i32) -> Self {
13833 self.set_version(field);
13834 self
13835 }
13836 pub fn status(&self) -> &super::ExecutionStatus {
13838 self.status
13839 .as_ref()
13840 .map(|field| field as _)
13841 .unwrap_or_else(|| super::ExecutionStatus::default_instance() as _)
13842 }
13843 pub fn status_opt_mut(&mut self) -> Option<&mut super::ExecutionStatus> {
13845 self.status.as_mut().map(|field| field as _)
13846 }
13847 pub fn status_mut(&mut self) -> &mut super::ExecutionStatus {
13850 self.status.get_or_insert_default()
13851 }
13852 pub fn status_opt(&self) -> Option<&super::ExecutionStatus> {
13854 self.status.as_ref().map(|field| field as _)
13855 }
13856 pub fn set_status<T: Into<super::ExecutionStatus>>(&mut self, field: T) {
13858 self.status = Some(field.into().into());
13859 }
13860 pub fn with_status<T: Into<super::ExecutionStatus>>(mut self, field: T) -> Self {
13862 self.set_status(field.into());
13863 self
13864 }
13865 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
13867 self.epoch.as_mut().map(|field| field as _)
13868 }
13869 pub fn epoch_mut(&mut self) -> &mut u64 {
13872 self.epoch.get_or_insert_default()
13873 }
13874 pub fn epoch_opt(&self) -> Option<u64> {
13876 self.epoch.as_ref().map(|field| *field)
13877 }
13878 pub fn set_epoch(&mut self, field: u64) {
13880 self.epoch = Some(field);
13881 }
13882 pub fn with_epoch(mut self, field: u64) -> Self {
13884 self.set_epoch(field);
13885 self
13886 }
13887 pub fn gas_used(&self) -> &super::GasCostSummary {
13889 self.gas_used
13890 .as_ref()
13891 .map(|field| field as _)
13892 .unwrap_or_else(|| super::GasCostSummary::default_instance() as _)
13893 }
13894 pub fn gas_used_opt_mut(&mut self) -> Option<&mut super::GasCostSummary> {
13896 self.gas_used.as_mut().map(|field| field as _)
13897 }
13898 pub fn gas_used_mut(&mut self) -> &mut super::GasCostSummary {
13901 self.gas_used.get_or_insert_default()
13902 }
13903 pub fn gas_used_opt(&self) -> Option<&super::GasCostSummary> {
13905 self.gas_used.as_ref().map(|field| field as _)
13906 }
13907 pub fn set_gas_used<T: Into<super::GasCostSummary>>(&mut self, field: T) {
13909 self.gas_used = Some(field.into().into());
13910 }
13911 pub fn with_gas_used<T: Into<super::GasCostSummary>>(
13913 mut self,
13914 field: T,
13915 ) -> Self {
13916 self.set_gas_used(field.into());
13917 self
13918 }
13919 pub fn transaction_digest_opt_mut(&mut self) -> Option<&mut String> {
13921 self.transaction_digest.as_mut().map(|field| field as _)
13922 }
13923 pub fn transaction_digest_mut(&mut self) -> &mut String {
13926 self.transaction_digest.get_or_insert_default()
13927 }
13928 pub fn transaction_digest_opt(&self) -> Option<&str> {
13930 self.transaction_digest.as_ref().map(|field| field as _)
13931 }
13932 pub fn set_transaction_digest<T: Into<String>>(&mut self, field: T) {
13934 self.transaction_digest = Some(field.into().into());
13935 }
13936 pub fn with_transaction_digest<T: Into<String>>(mut self, field: T) -> Self {
13938 self.set_transaction_digest(field.into());
13939 self
13940 }
13941 pub fn gas_object(&self) -> &super::ChangedObject {
13943 self.gas_object
13944 .as_ref()
13945 .map(|field| field as _)
13946 .unwrap_or_else(|| super::ChangedObject::default_instance() as _)
13947 }
13948 pub fn gas_object_opt_mut(&mut self) -> Option<&mut super::ChangedObject> {
13950 self.gas_object.as_mut().map(|field| field as _)
13951 }
13952 pub fn gas_object_mut(&mut self) -> &mut super::ChangedObject {
13955 self.gas_object.get_or_insert_default()
13956 }
13957 pub fn gas_object_opt(&self) -> Option<&super::ChangedObject> {
13959 self.gas_object.as_ref().map(|field| field as _)
13960 }
13961 pub fn set_gas_object<T: Into<super::ChangedObject>>(&mut self, field: T) {
13963 self.gas_object = Some(field.into().into());
13964 }
13965 pub fn with_gas_object<T: Into<super::ChangedObject>>(
13967 mut self,
13968 field: T,
13969 ) -> Self {
13970 self.set_gas_object(field.into());
13971 self
13972 }
13973 pub fn events_digest_opt_mut(&mut self) -> Option<&mut String> {
13975 self.events_digest.as_mut().map(|field| field as _)
13976 }
13977 pub fn events_digest_mut(&mut self) -> &mut String {
13980 self.events_digest.get_or_insert_default()
13981 }
13982 pub fn events_digest_opt(&self) -> Option<&str> {
13984 self.events_digest.as_ref().map(|field| field as _)
13985 }
13986 pub fn set_events_digest<T: Into<String>>(&mut self, field: T) {
13988 self.events_digest = Some(field.into().into());
13989 }
13990 pub fn with_events_digest<T: Into<String>>(mut self, field: T) -> Self {
13992 self.set_events_digest(field.into());
13993 self
13994 }
13995 pub fn dependencies(&self) -> &[String] {
13997 &self.dependencies
13998 }
13999 pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
14002 &mut self.dependencies
14003 }
14004 pub fn set_dependencies(&mut self, field: Vec<String>) {
14006 self.dependencies = field;
14007 }
14008 pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
14010 self.set_dependencies(field);
14011 self
14012 }
14013 pub fn lamport_version_opt_mut(&mut self) -> Option<&mut u64> {
14015 self.lamport_version.as_mut().map(|field| field as _)
14016 }
14017 pub fn lamport_version_mut(&mut self) -> &mut u64 {
14020 self.lamport_version.get_or_insert_default()
14021 }
14022 pub fn lamport_version_opt(&self) -> Option<u64> {
14024 self.lamport_version.as_ref().map(|field| *field)
14025 }
14026 pub fn set_lamport_version(&mut self, field: u64) {
14028 self.lamport_version = Some(field);
14029 }
14030 pub fn with_lamport_version(mut self, field: u64) -> Self {
14032 self.set_lamport_version(field);
14033 self
14034 }
14035 pub fn changed_objects(&self) -> &[super::ChangedObject] {
14037 &self.changed_objects
14038 }
14039 pub fn changed_objects_mut(&mut self) -> &mut Vec<super::ChangedObject> {
14042 &mut self.changed_objects
14043 }
14044 pub fn set_changed_objects(&mut self, field: Vec<super::ChangedObject>) {
14046 self.changed_objects = field;
14047 }
14048 pub fn with_changed_objects(mut self, field: Vec<super::ChangedObject>) -> Self {
14050 self.set_changed_objects(field);
14051 self
14052 }
14053 pub fn unchanged_consensus_objects(&self) -> &[super::UnchangedConsensusObject] {
14055 &self.unchanged_consensus_objects
14056 }
14057 pub fn unchanged_consensus_objects_mut(
14060 &mut self,
14061 ) -> &mut Vec<super::UnchangedConsensusObject> {
14062 &mut self.unchanged_consensus_objects
14063 }
14064 pub fn set_unchanged_consensus_objects(
14066 &mut self,
14067 field: Vec<super::UnchangedConsensusObject>,
14068 ) {
14069 self.unchanged_consensus_objects = field;
14070 }
14071 pub fn with_unchanged_consensus_objects(
14073 mut self,
14074 field: Vec<super::UnchangedConsensusObject>,
14075 ) -> Self {
14076 self.set_unchanged_consensus_objects(field);
14077 self
14078 }
14079 pub fn auxiliary_data_digest_opt_mut(&mut self) -> Option<&mut String> {
14081 self.auxiliary_data_digest.as_mut().map(|field| field as _)
14082 }
14083 pub fn auxiliary_data_digest_mut(&mut self) -> &mut String {
14086 self.auxiliary_data_digest.get_or_insert_default()
14087 }
14088 pub fn auxiliary_data_digest_opt(&self) -> Option<&str> {
14090 self.auxiliary_data_digest.as_ref().map(|field| field as _)
14091 }
14092 pub fn set_auxiliary_data_digest<T: Into<String>>(&mut self, field: T) {
14094 self.auxiliary_data_digest = Some(field.into().into());
14095 }
14096 pub fn with_auxiliary_data_digest<T: Into<String>>(mut self, field: T) -> Self {
14098 self.set_auxiliary_data_digest(field.into());
14099 self
14100 }
14101 pub fn unchanged_loaded_runtime_objects(&self) -> &[super::ObjectReference] {
14103 &self.unchanged_loaded_runtime_objects
14104 }
14105 pub fn unchanged_loaded_runtime_objects_mut(
14108 &mut self,
14109 ) -> &mut Vec<super::ObjectReference> {
14110 &mut self.unchanged_loaded_runtime_objects
14111 }
14112 pub fn set_unchanged_loaded_runtime_objects(
14114 &mut self,
14115 field: Vec<super::ObjectReference>,
14116 ) {
14117 self.unchanged_loaded_runtime_objects = field;
14118 }
14119 pub fn with_unchanged_loaded_runtime_objects(
14121 mut self,
14122 field: Vec<super::ObjectReference>,
14123 ) -> Self {
14124 self.set_unchanged_loaded_runtime_objects(field);
14125 self
14126 }
14127 }
14128 impl super::TransactionEvents {
14129 pub const fn const_default() -> Self {
14130 Self {
14131 bcs: None,
14132 digest: None,
14133 events: Vec::new(),
14134 }
14135 }
14136 #[doc(hidden)]
14137 pub fn default_instance() -> &'static Self {
14138 static DEFAULT: super::TransactionEvents = super::TransactionEvents::const_default();
14139 &DEFAULT
14140 }
14141 pub fn bcs(&self) -> &super::Bcs {
14143 self.bcs
14144 .as_ref()
14145 .map(|field| field as _)
14146 .unwrap_or_else(|| super::Bcs::default_instance() as _)
14147 }
14148 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
14150 self.bcs.as_mut().map(|field| field as _)
14151 }
14152 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
14155 self.bcs.get_or_insert_default()
14156 }
14157 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
14159 self.bcs.as_ref().map(|field| field as _)
14160 }
14161 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
14163 self.bcs = Some(field.into().into());
14164 }
14165 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
14167 self.set_bcs(field.into());
14168 self
14169 }
14170 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
14172 self.digest.as_mut().map(|field| field as _)
14173 }
14174 pub fn digest_mut(&mut self) -> &mut String {
14177 self.digest.get_or_insert_default()
14178 }
14179 pub fn digest_opt(&self) -> Option<&str> {
14181 self.digest.as_ref().map(|field| field as _)
14182 }
14183 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
14185 self.digest = Some(field.into().into());
14186 }
14187 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
14189 self.set_digest(field.into());
14190 self
14191 }
14192 pub fn events(&self) -> &[super::Event] {
14194 &self.events
14195 }
14196 pub fn events_mut(&mut self) -> &mut Vec<super::Event> {
14199 &mut self.events
14200 }
14201 pub fn set_events(&mut self, field: Vec<super::Event>) {
14203 self.events = field;
14204 }
14205 pub fn with_events(mut self, field: Vec<super::Event>) -> Self {
14207 self.set_events(field);
14208 self
14209 }
14210 }
14211 impl super::TransactionExpiration {
14212 pub const fn const_default() -> Self {
14213 Self { kind: None, epoch: None }
14214 }
14215 #[doc(hidden)]
14216 pub fn default_instance() -> &'static Self {
14217 static DEFAULT: super::TransactionExpiration = super::TransactionExpiration::const_default();
14218 &DEFAULT
14219 }
14220 pub fn with_kind<
14222 T: Into<super::transaction_expiration::TransactionExpirationKind>,
14223 >(mut self, field: T) -> Self {
14224 self.set_kind(field.into());
14225 self
14226 }
14227 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
14229 self.epoch.as_mut().map(|field| field as _)
14230 }
14231 pub fn epoch_mut(&mut self) -> &mut u64 {
14234 self.epoch.get_or_insert_default()
14235 }
14236 pub fn epoch_opt(&self) -> Option<u64> {
14238 self.epoch.as_ref().map(|field| *field)
14239 }
14240 pub fn set_epoch(&mut self, field: u64) {
14242 self.epoch = Some(field);
14243 }
14244 pub fn with_epoch(mut self, field: u64) -> Self {
14246 self.set_epoch(field);
14247 self
14248 }
14249 }
14250 impl super::TransactionKind {
14251 pub const fn const_default() -> Self {
14252 Self { kind: None, data: None }
14253 }
14254 #[doc(hidden)]
14255 pub fn default_instance() -> &'static Self {
14256 static DEFAULT: super::TransactionKind = super::TransactionKind::const_default();
14257 &DEFAULT
14258 }
14259 pub fn with_kind<T: Into<super::transaction_kind::Kind>>(
14261 mut self,
14262 field: T,
14263 ) -> Self {
14264 self.set_kind(field.into());
14265 self
14266 }
14267 pub fn programmable_transaction(&self) -> &super::ProgrammableTransaction {
14269 if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &self
14270 .data
14271 {
14272 field as _
14273 } else {
14274 super::ProgrammableTransaction::default_instance() as _
14275 }
14276 }
14277 pub fn programmable_transaction_opt(
14279 &self,
14280 ) -> Option<&super::ProgrammableTransaction> {
14281 if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &self
14282 .data
14283 {
14284 Some(field as _)
14285 } else {
14286 None
14287 }
14288 }
14289 pub fn programmable_transaction_opt_mut(
14291 &mut self,
14292 ) -> Option<&mut super::ProgrammableTransaction> {
14293 if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &mut self
14294 .data
14295 {
14296 Some(field as _)
14297 } else {
14298 None
14299 }
14300 }
14301 pub fn programmable_transaction_mut(
14305 &mut self,
14306 ) -> &mut super::ProgrammableTransaction {
14307 if self.programmable_transaction_opt_mut().is_none() {
14308 self.data = Some(
14309 super::transaction_kind::Data::ProgrammableTransaction(
14310 super::ProgrammableTransaction::default(),
14311 ),
14312 );
14313 }
14314 self.programmable_transaction_opt_mut().unwrap()
14315 }
14316 pub fn set_programmable_transaction<T: Into<super::ProgrammableTransaction>>(
14319 &mut self,
14320 field: T,
14321 ) {
14322 self.data = Some(
14323 super::transaction_kind::Data::ProgrammableTransaction(
14324 field.into().into(),
14325 ),
14326 );
14327 }
14328 pub fn with_programmable_transaction<T: Into<super::ProgrammableTransaction>>(
14331 mut self,
14332 field: T,
14333 ) -> Self {
14334 self.set_programmable_transaction(field.into());
14335 self
14336 }
14337 pub fn change_epoch(&self) -> &super::ChangeEpoch {
14339 if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &self.data {
14340 field as _
14341 } else {
14342 super::ChangeEpoch::default_instance() as _
14343 }
14344 }
14345 pub fn change_epoch_opt(&self) -> Option<&super::ChangeEpoch> {
14347 if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &self.data {
14348 Some(field as _)
14349 } else {
14350 None
14351 }
14352 }
14353 pub fn change_epoch_opt_mut(&mut self) -> Option<&mut super::ChangeEpoch> {
14355 if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &mut self
14356 .data
14357 {
14358 Some(field as _)
14359 } else {
14360 None
14361 }
14362 }
14363 pub fn change_epoch_mut(&mut self) -> &mut super::ChangeEpoch {
14367 if self.change_epoch_opt_mut().is_none() {
14368 self.data = Some(
14369 super::transaction_kind::Data::ChangeEpoch(
14370 super::ChangeEpoch::default(),
14371 ),
14372 );
14373 }
14374 self.change_epoch_opt_mut().unwrap()
14375 }
14376 pub fn set_change_epoch<T: Into<super::ChangeEpoch>>(&mut self, field: T) {
14379 self.data = Some(
14380 super::transaction_kind::Data::ChangeEpoch(field.into().into()),
14381 );
14382 }
14383 pub fn with_change_epoch<T: Into<super::ChangeEpoch>>(
14386 mut self,
14387 field: T,
14388 ) -> Self {
14389 self.set_change_epoch(field.into());
14390 self
14391 }
14392 pub fn genesis(&self) -> &super::GenesisTransaction {
14394 if let Some(super::transaction_kind::Data::Genesis(field)) = &self.data {
14395 field as _
14396 } else {
14397 super::GenesisTransaction::default_instance() as _
14398 }
14399 }
14400 pub fn genesis_opt(&self) -> Option<&super::GenesisTransaction> {
14402 if let Some(super::transaction_kind::Data::Genesis(field)) = &self.data {
14403 Some(field as _)
14404 } else {
14405 None
14406 }
14407 }
14408 pub fn genesis_opt_mut(&mut self) -> Option<&mut super::GenesisTransaction> {
14410 if let Some(super::transaction_kind::Data::Genesis(field)) = &mut self.data {
14411 Some(field as _)
14412 } else {
14413 None
14414 }
14415 }
14416 pub fn genesis_mut(&mut self) -> &mut super::GenesisTransaction {
14420 if self.genesis_opt_mut().is_none() {
14421 self.data = Some(
14422 super::transaction_kind::Data::Genesis(
14423 super::GenesisTransaction::default(),
14424 ),
14425 );
14426 }
14427 self.genesis_opt_mut().unwrap()
14428 }
14429 pub fn set_genesis<T: Into<super::GenesisTransaction>>(&mut self, field: T) {
14432 self.data = Some(
14433 super::transaction_kind::Data::Genesis(field.into().into()),
14434 );
14435 }
14436 pub fn with_genesis<T: Into<super::GenesisTransaction>>(
14439 mut self,
14440 field: T,
14441 ) -> Self {
14442 self.set_genesis(field.into());
14443 self
14444 }
14445 pub fn consensus_commit_prologue(&self) -> &super::ConsensusCommitPrologue {
14447 if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &self
14448 .data
14449 {
14450 field as _
14451 } else {
14452 super::ConsensusCommitPrologue::default_instance() as _
14453 }
14454 }
14455 pub fn consensus_commit_prologue_opt(
14457 &self,
14458 ) -> Option<&super::ConsensusCommitPrologue> {
14459 if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &self
14460 .data
14461 {
14462 Some(field as _)
14463 } else {
14464 None
14465 }
14466 }
14467 pub fn consensus_commit_prologue_opt_mut(
14469 &mut self,
14470 ) -> Option<&mut super::ConsensusCommitPrologue> {
14471 if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &mut self
14472 .data
14473 {
14474 Some(field as _)
14475 } else {
14476 None
14477 }
14478 }
14479 pub fn consensus_commit_prologue_mut(
14483 &mut self,
14484 ) -> &mut super::ConsensusCommitPrologue {
14485 if self.consensus_commit_prologue_opt_mut().is_none() {
14486 self.data = Some(
14487 super::transaction_kind::Data::ConsensusCommitPrologue(
14488 super::ConsensusCommitPrologue::default(),
14489 ),
14490 );
14491 }
14492 self.consensus_commit_prologue_opt_mut().unwrap()
14493 }
14494 pub fn set_consensus_commit_prologue<T: Into<super::ConsensusCommitPrologue>>(
14497 &mut self,
14498 field: T,
14499 ) {
14500 self.data = Some(
14501 super::transaction_kind::Data::ConsensusCommitPrologue(
14502 field.into().into(),
14503 ),
14504 );
14505 }
14506 pub fn with_consensus_commit_prologue<T: Into<super::ConsensusCommitPrologue>>(
14509 mut self,
14510 field: T,
14511 ) -> Self {
14512 self.set_consensus_commit_prologue(field.into());
14513 self
14514 }
14515 pub fn authenticator_state_update(&self) -> &super::AuthenticatorStateUpdate {
14517 if let Some(
14518 super::transaction_kind::Data::AuthenticatorStateUpdate(field),
14519 ) = &self.data
14520 {
14521 field as _
14522 } else {
14523 super::AuthenticatorStateUpdate::default_instance() as _
14524 }
14525 }
14526 pub fn authenticator_state_update_opt(
14528 &self,
14529 ) -> Option<&super::AuthenticatorStateUpdate> {
14530 if let Some(
14531 super::transaction_kind::Data::AuthenticatorStateUpdate(field),
14532 ) = &self.data
14533 {
14534 Some(field as _)
14535 } else {
14536 None
14537 }
14538 }
14539 pub fn authenticator_state_update_opt_mut(
14541 &mut self,
14542 ) -> Option<&mut super::AuthenticatorStateUpdate> {
14543 if let Some(
14544 super::transaction_kind::Data::AuthenticatorStateUpdate(field),
14545 ) = &mut self.data
14546 {
14547 Some(field as _)
14548 } else {
14549 None
14550 }
14551 }
14552 pub fn authenticator_state_update_mut(
14556 &mut self,
14557 ) -> &mut super::AuthenticatorStateUpdate {
14558 if self.authenticator_state_update_opt_mut().is_none() {
14559 self.data = Some(
14560 super::transaction_kind::Data::AuthenticatorStateUpdate(
14561 super::AuthenticatorStateUpdate::default(),
14562 ),
14563 );
14564 }
14565 self.authenticator_state_update_opt_mut().unwrap()
14566 }
14567 pub fn set_authenticator_state_update<T: Into<super::AuthenticatorStateUpdate>>(
14570 &mut self,
14571 field: T,
14572 ) {
14573 self.data = Some(
14574 super::transaction_kind::Data::AuthenticatorStateUpdate(
14575 field.into().into(),
14576 ),
14577 );
14578 }
14579 pub fn with_authenticator_state_update<T: Into<super::AuthenticatorStateUpdate>>(
14582 mut self,
14583 field: T,
14584 ) -> Self {
14585 self.set_authenticator_state_update(field.into());
14586 self
14587 }
14588 pub fn end_of_epoch(&self) -> &super::EndOfEpochTransaction {
14590 if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &self.data {
14591 field as _
14592 } else {
14593 super::EndOfEpochTransaction::default_instance() as _
14594 }
14595 }
14596 pub fn end_of_epoch_opt(&self) -> Option<&super::EndOfEpochTransaction> {
14598 if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &self.data {
14599 Some(field as _)
14600 } else {
14601 None
14602 }
14603 }
14604 pub fn end_of_epoch_opt_mut(
14606 &mut self,
14607 ) -> Option<&mut super::EndOfEpochTransaction> {
14608 if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &mut self
14609 .data
14610 {
14611 Some(field as _)
14612 } else {
14613 None
14614 }
14615 }
14616 pub fn end_of_epoch_mut(&mut self) -> &mut super::EndOfEpochTransaction {
14620 if self.end_of_epoch_opt_mut().is_none() {
14621 self.data = Some(
14622 super::transaction_kind::Data::EndOfEpoch(
14623 super::EndOfEpochTransaction::default(),
14624 ),
14625 );
14626 }
14627 self.end_of_epoch_opt_mut().unwrap()
14628 }
14629 pub fn set_end_of_epoch<T: Into<super::EndOfEpochTransaction>>(
14632 &mut self,
14633 field: T,
14634 ) {
14635 self.data = Some(
14636 super::transaction_kind::Data::EndOfEpoch(field.into().into()),
14637 );
14638 }
14639 pub fn with_end_of_epoch<T: Into<super::EndOfEpochTransaction>>(
14642 mut self,
14643 field: T,
14644 ) -> Self {
14645 self.set_end_of_epoch(field.into());
14646 self
14647 }
14648 pub fn randomness_state_update(&self) -> &super::RandomnessStateUpdate {
14650 if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &self
14651 .data
14652 {
14653 field as _
14654 } else {
14655 super::RandomnessStateUpdate::default_instance() as _
14656 }
14657 }
14658 pub fn randomness_state_update_opt(
14660 &self,
14661 ) -> Option<&super::RandomnessStateUpdate> {
14662 if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &self
14663 .data
14664 {
14665 Some(field as _)
14666 } else {
14667 None
14668 }
14669 }
14670 pub fn randomness_state_update_opt_mut(
14672 &mut self,
14673 ) -> Option<&mut super::RandomnessStateUpdate> {
14674 if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &mut self
14675 .data
14676 {
14677 Some(field as _)
14678 } else {
14679 None
14680 }
14681 }
14682 pub fn randomness_state_update_mut(
14686 &mut self,
14687 ) -> &mut super::RandomnessStateUpdate {
14688 if self.randomness_state_update_opt_mut().is_none() {
14689 self.data = Some(
14690 super::transaction_kind::Data::RandomnessStateUpdate(
14691 super::RandomnessStateUpdate::default(),
14692 ),
14693 );
14694 }
14695 self.randomness_state_update_opt_mut().unwrap()
14696 }
14697 pub fn set_randomness_state_update<T: Into<super::RandomnessStateUpdate>>(
14700 &mut self,
14701 field: T,
14702 ) {
14703 self.data = Some(
14704 super::transaction_kind::Data::RandomnessStateUpdate(field.into().into()),
14705 );
14706 }
14707 pub fn with_randomness_state_update<T: Into<super::RandomnessStateUpdate>>(
14710 mut self,
14711 field: T,
14712 ) -> Self {
14713 self.set_randomness_state_update(field.into());
14714 self
14715 }
14716 }
14717 impl super::TransferObjects {
14718 pub const fn const_default() -> Self {
14719 Self {
14720 objects: Vec::new(),
14721 address: None,
14722 }
14723 }
14724 #[doc(hidden)]
14725 pub fn default_instance() -> &'static Self {
14726 static DEFAULT: super::TransferObjects = super::TransferObjects::const_default();
14727 &DEFAULT
14728 }
14729 pub fn objects(&self) -> &[super::Argument] {
14731 &self.objects
14732 }
14733 pub fn objects_mut(&mut self) -> &mut Vec<super::Argument> {
14736 &mut self.objects
14737 }
14738 pub fn set_objects(&mut self, field: Vec<super::Argument>) {
14740 self.objects = field;
14741 }
14742 pub fn with_objects(mut self, field: Vec<super::Argument>) -> Self {
14744 self.set_objects(field);
14745 self
14746 }
14747 pub fn address(&self) -> &super::Argument {
14749 self.address
14750 .as_ref()
14751 .map(|field| field as _)
14752 .unwrap_or_else(|| super::Argument::default_instance() as _)
14753 }
14754 pub fn address_opt_mut(&mut self) -> Option<&mut super::Argument> {
14756 self.address.as_mut().map(|field| field as _)
14757 }
14758 pub fn address_mut(&mut self) -> &mut super::Argument {
14761 self.address.get_or_insert_default()
14762 }
14763 pub fn address_opt(&self) -> Option<&super::Argument> {
14765 self.address.as_ref().map(|field| field as _)
14766 }
14767 pub fn set_address<T: Into<super::Argument>>(&mut self, field: T) {
14769 self.address = Some(field.into().into());
14770 }
14771 pub fn with_address<T: Into<super::Argument>>(mut self, field: T) -> Self {
14773 self.set_address(field.into());
14774 self
14775 }
14776 }
14777 impl super::TypeArgumentError {
14778 pub const fn const_default() -> Self {
14779 Self {
14780 type_argument: None,
14781 kind: None,
14782 }
14783 }
14784 #[doc(hidden)]
14785 pub fn default_instance() -> &'static Self {
14786 static DEFAULT: super::TypeArgumentError = super::TypeArgumentError::const_default();
14787 &DEFAULT
14788 }
14789 pub fn type_argument_opt_mut(&mut self) -> Option<&mut u32> {
14791 self.type_argument.as_mut().map(|field| field as _)
14792 }
14793 pub fn type_argument_mut(&mut self) -> &mut u32 {
14796 self.type_argument.get_or_insert_default()
14797 }
14798 pub fn type_argument_opt(&self) -> Option<u32> {
14800 self.type_argument.as_ref().map(|field| *field)
14801 }
14802 pub fn set_type_argument(&mut self, field: u32) {
14804 self.type_argument = Some(field);
14805 }
14806 pub fn with_type_argument(mut self, field: u32) -> Self {
14808 self.set_type_argument(field);
14809 self
14810 }
14811 pub fn with_kind<T: Into<super::type_argument_error::TypeArgumentErrorKind>>(
14813 mut self,
14814 field: T,
14815 ) -> Self {
14816 self.set_kind(field.into());
14817 self
14818 }
14819 }
14820 impl super::TypeOrigin {
14821 pub const fn const_default() -> Self {
14822 Self {
14823 module_name: None,
14824 datatype_name: None,
14825 package_id: None,
14826 }
14827 }
14828 #[doc(hidden)]
14829 pub fn default_instance() -> &'static Self {
14830 static DEFAULT: super::TypeOrigin = super::TypeOrigin::const_default();
14831 &DEFAULT
14832 }
14833 pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
14835 self.module_name.as_mut().map(|field| field as _)
14836 }
14837 pub fn module_name_mut(&mut self) -> &mut String {
14840 self.module_name.get_or_insert_default()
14841 }
14842 pub fn module_name_opt(&self) -> Option<&str> {
14844 self.module_name.as_ref().map(|field| field as _)
14845 }
14846 pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
14848 self.module_name = Some(field.into().into());
14849 }
14850 pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
14852 self.set_module_name(field.into());
14853 self
14854 }
14855 pub fn datatype_name_opt_mut(&mut self) -> Option<&mut String> {
14857 self.datatype_name.as_mut().map(|field| field as _)
14858 }
14859 pub fn datatype_name_mut(&mut self) -> &mut String {
14862 self.datatype_name.get_or_insert_default()
14863 }
14864 pub fn datatype_name_opt(&self) -> Option<&str> {
14866 self.datatype_name.as_ref().map(|field| field as _)
14867 }
14868 pub fn set_datatype_name<T: Into<String>>(&mut self, field: T) {
14870 self.datatype_name = Some(field.into().into());
14871 }
14872 pub fn with_datatype_name<T: Into<String>>(mut self, field: T) -> Self {
14874 self.set_datatype_name(field.into());
14875 self
14876 }
14877 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
14879 self.package_id.as_mut().map(|field| field as _)
14880 }
14881 pub fn package_id_mut(&mut self) -> &mut String {
14884 self.package_id.get_or_insert_default()
14885 }
14886 pub fn package_id_opt(&self) -> Option<&str> {
14888 self.package_id.as_ref().map(|field| field as _)
14889 }
14890 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
14892 self.package_id = Some(field.into().into());
14893 }
14894 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
14896 self.set_package_id(field.into());
14897 self
14898 }
14899 }
14900 impl super::TypeParameter {
14901 pub const fn const_default() -> Self {
14902 Self {
14903 constraints: Vec::new(),
14904 is_phantom: None,
14905 }
14906 }
14907 #[doc(hidden)]
14908 pub fn default_instance() -> &'static Self {
14909 static DEFAULT: super::TypeParameter = super::TypeParameter::const_default();
14910 &DEFAULT
14911 }
14912 pub fn is_phantom_opt_mut(&mut self) -> Option<&mut bool> {
14914 self.is_phantom.as_mut().map(|field| field as _)
14915 }
14916 pub fn is_phantom_mut(&mut self) -> &mut bool {
14919 self.is_phantom.get_or_insert_default()
14920 }
14921 pub fn is_phantom_opt(&self) -> Option<bool> {
14923 self.is_phantom.as_ref().map(|field| *field)
14924 }
14925 pub fn set_is_phantom(&mut self, field: bool) {
14927 self.is_phantom = Some(field);
14928 }
14929 pub fn with_is_phantom(mut self, field: bool) -> Self {
14931 self.set_is_phantom(field);
14932 self
14933 }
14934 }
14935 impl super::UnchangedConsensusObject {
14936 pub const fn const_default() -> Self {
14937 Self {
14938 kind: None,
14939 object_id: None,
14940 version: None,
14941 digest: None,
14942 object_type: None,
14943 }
14944 }
14945 #[doc(hidden)]
14946 pub fn default_instance() -> &'static Self {
14947 static DEFAULT: super::UnchangedConsensusObject = super::UnchangedConsensusObject::const_default();
14948 &DEFAULT
14949 }
14950 pub fn with_kind<
14952 T: Into<super::unchanged_consensus_object::UnchangedConsensusObjectKind>,
14953 >(mut self, field: T) -> Self {
14954 self.set_kind(field.into());
14955 self
14956 }
14957 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
14959 self.object_id.as_mut().map(|field| field as _)
14960 }
14961 pub fn object_id_mut(&mut self) -> &mut String {
14964 self.object_id.get_or_insert_default()
14965 }
14966 pub fn object_id_opt(&self) -> Option<&str> {
14968 self.object_id.as_ref().map(|field| field as _)
14969 }
14970 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
14972 self.object_id = Some(field.into().into());
14973 }
14974 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
14976 self.set_object_id(field.into());
14977 self
14978 }
14979 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
14981 self.version.as_mut().map(|field| field as _)
14982 }
14983 pub fn version_mut(&mut self) -> &mut u64 {
14986 self.version.get_or_insert_default()
14987 }
14988 pub fn version_opt(&self) -> Option<u64> {
14990 self.version.as_ref().map(|field| *field)
14991 }
14992 pub fn set_version(&mut self, field: u64) {
14994 self.version = Some(field);
14995 }
14996 pub fn with_version(mut self, field: u64) -> Self {
14998 self.set_version(field);
14999 self
15000 }
15001 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
15003 self.digest.as_mut().map(|field| field as _)
15004 }
15005 pub fn digest_mut(&mut self) -> &mut String {
15008 self.digest.get_or_insert_default()
15009 }
15010 pub fn digest_opt(&self) -> Option<&str> {
15012 self.digest.as_ref().map(|field| field as _)
15013 }
15014 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
15016 self.digest = Some(field.into().into());
15017 }
15018 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
15020 self.set_digest(field.into());
15021 self
15022 }
15023 pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
15025 self.object_type.as_mut().map(|field| field as _)
15026 }
15027 pub fn object_type_mut(&mut self) -> &mut String {
15030 self.object_type.get_or_insert_default()
15031 }
15032 pub fn object_type_opt(&self) -> Option<&str> {
15034 self.object_type.as_ref().map(|field| field as _)
15035 }
15036 pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
15038 self.object_type = Some(field.into().into());
15039 }
15040 pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
15042 self.set_object_type(field.into());
15043 self
15044 }
15045 }
15046 impl super::Upgrade {
15047 pub const fn const_default() -> Self {
15048 Self {
15049 modules: Vec::new(),
15050 dependencies: Vec::new(),
15051 package: None,
15052 ticket: None,
15053 }
15054 }
15055 #[doc(hidden)]
15056 pub fn default_instance() -> &'static Self {
15057 static DEFAULT: super::Upgrade = super::Upgrade::const_default();
15058 &DEFAULT
15059 }
15060 pub fn modules(&self) -> &[::prost::bytes::Bytes] {
15062 &self.modules
15063 }
15064 pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
15067 &mut self.modules
15068 }
15069 pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
15071 self.modules = field;
15072 }
15073 pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
15075 self.set_modules(field);
15076 self
15077 }
15078 pub fn dependencies(&self) -> &[String] {
15080 &self.dependencies
15081 }
15082 pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
15085 &mut self.dependencies
15086 }
15087 pub fn set_dependencies(&mut self, field: Vec<String>) {
15089 self.dependencies = field;
15090 }
15091 pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
15093 self.set_dependencies(field);
15094 self
15095 }
15096 pub fn package_opt_mut(&mut self) -> Option<&mut String> {
15098 self.package.as_mut().map(|field| field as _)
15099 }
15100 pub fn package_mut(&mut self) -> &mut String {
15103 self.package.get_or_insert_default()
15104 }
15105 pub fn package_opt(&self) -> Option<&str> {
15107 self.package.as_ref().map(|field| field as _)
15108 }
15109 pub fn set_package<T: Into<String>>(&mut self, field: T) {
15111 self.package = Some(field.into().into());
15112 }
15113 pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
15115 self.set_package(field.into());
15116 self
15117 }
15118 pub fn ticket(&self) -> &super::Argument {
15120 self.ticket
15121 .as_ref()
15122 .map(|field| field as _)
15123 .unwrap_or_else(|| super::Argument::default_instance() as _)
15124 }
15125 pub fn ticket_opt_mut(&mut self) -> Option<&mut super::Argument> {
15127 self.ticket.as_mut().map(|field| field as _)
15128 }
15129 pub fn ticket_mut(&mut self) -> &mut super::Argument {
15132 self.ticket.get_or_insert_default()
15133 }
15134 pub fn ticket_opt(&self) -> Option<&super::Argument> {
15136 self.ticket.as_ref().map(|field| field as _)
15137 }
15138 pub fn set_ticket<T: Into<super::Argument>>(&mut self, field: T) {
15140 self.ticket = Some(field.into().into());
15141 }
15142 pub fn with_ticket<T: Into<super::Argument>>(mut self, field: T) -> Self {
15144 self.set_ticket(field.into());
15145 self
15146 }
15147 }
15148 impl super::UserSignature {
15149 pub const fn const_default() -> Self {
15150 Self {
15151 bcs: None,
15152 scheme: None,
15153 signature: None,
15154 }
15155 }
15156 #[doc(hidden)]
15157 pub fn default_instance() -> &'static Self {
15158 static DEFAULT: super::UserSignature = super::UserSignature::const_default();
15159 &DEFAULT
15160 }
15161 pub fn bcs(&self) -> &super::Bcs {
15163 self.bcs
15164 .as_ref()
15165 .map(|field| field as _)
15166 .unwrap_or_else(|| super::Bcs::default_instance() as _)
15167 }
15168 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
15170 self.bcs.as_mut().map(|field| field as _)
15171 }
15172 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
15175 self.bcs.get_or_insert_default()
15176 }
15177 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
15179 self.bcs.as_ref().map(|field| field as _)
15180 }
15181 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
15183 self.bcs = Some(field.into().into());
15184 }
15185 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
15187 self.set_bcs(field.into());
15188 self
15189 }
15190 pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
15192 self.set_scheme(field.into());
15193 self
15194 }
15195 pub fn simple(&self) -> &super::SimpleSignature {
15197 if let Some(super::user_signature::Signature::Simple(field)) = &self
15198 .signature
15199 {
15200 field as _
15201 } else {
15202 super::SimpleSignature::default_instance() as _
15203 }
15204 }
15205 pub fn simple_opt(&self) -> Option<&super::SimpleSignature> {
15207 if let Some(super::user_signature::Signature::Simple(field)) = &self
15208 .signature
15209 {
15210 Some(field as _)
15211 } else {
15212 None
15213 }
15214 }
15215 pub fn simple_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
15217 if let Some(super::user_signature::Signature::Simple(field)) = &mut self
15218 .signature
15219 {
15220 Some(field as _)
15221 } else {
15222 None
15223 }
15224 }
15225 pub fn simple_mut(&mut self) -> &mut super::SimpleSignature {
15229 if self.simple_opt_mut().is_none() {
15230 self.signature = Some(
15231 super::user_signature::Signature::Simple(
15232 super::SimpleSignature::default(),
15233 ),
15234 );
15235 }
15236 self.simple_opt_mut().unwrap()
15237 }
15238 pub fn set_simple<T: Into<super::SimpleSignature>>(&mut self, field: T) {
15241 self.signature = Some(
15242 super::user_signature::Signature::Simple(field.into().into()),
15243 );
15244 }
15245 pub fn with_simple<T: Into<super::SimpleSignature>>(mut self, field: T) -> Self {
15248 self.set_simple(field.into());
15249 self
15250 }
15251 pub fn multisig(&self) -> &super::MultisigAggregatedSignature {
15253 if let Some(super::user_signature::Signature::Multisig(field)) = &self
15254 .signature
15255 {
15256 field as _
15257 } else {
15258 super::MultisigAggregatedSignature::default_instance() as _
15259 }
15260 }
15261 pub fn multisig_opt(&self) -> Option<&super::MultisigAggregatedSignature> {
15263 if let Some(super::user_signature::Signature::Multisig(field)) = &self
15264 .signature
15265 {
15266 Some(field as _)
15267 } else {
15268 None
15269 }
15270 }
15271 pub fn multisig_opt_mut(
15273 &mut self,
15274 ) -> Option<&mut super::MultisigAggregatedSignature> {
15275 if let Some(super::user_signature::Signature::Multisig(field)) = &mut self
15276 .signature
15277 {
15278 Some(field as _)
15279 } else {
15280 None
15281 }
15282 }
15283 pub fn multisig_mut(&mut self) -> &mut super::MultisigAggregatedSignature {
15287 if self.multisig_opt_mut().is_none() {
15288 self.signature = Some(
15289 super::user_signature::Signature::Multisig(
15290 super::MultisigAggregatedSignature::default(),
15291 ),
15292 );
15293 }
15294 self.multisig_opt_mut().unwrap()
15295 }
15296 pub fn set_multisig<T: Into<super::MultisigAggregatedSignature>>(
15299 &mut self,
15300 field: T,
15301 ) {
15302 self.signature = Some(
15303 super::user_signature::Signature::Multisig(field.into().into()),
15304 );
15305 }
15306 pub fn with_multisig<T: Into<super::MultisigAggregatedSignature>>(
15309 mut self,
15310 field: T,
15311 ) -> Self {
15312 self.set_multisig(field.into());
15313 self
15314 }
15315 pub fn zklogin(&self) -> &super::ZkLoginAuthenticator {
15317 if let Some(super::user_signature::Signature::Zklogin(field)) = &self
15318 .signature
15319 {
15320 field as _
15321 } else {
15322 super::ZkLoginAuthenticator::default_instance() as _
15323 }
15324 }
15325 pub fn zklogin_opt(&self) -> Option<&super::ZkLoginAuthenticator> {
15327 if let Some(super::user_signature::Signature::Zklogin(field)) = &self
15328 .signature
15329 {
15330 Some(field as _)
15331 } else {
15332 None
15333 }
15334 }
15335 pub fn zklogin_opt_mut(&mut self) -> Option<&mut super::ZkLoginAuthenticator> {
15337 if let Some(super::user_signature::Signature::Zklogin(field)) = &mut self
15338 .signature
15339 {
15340 Some(field as _)
15341 } else {
15342 None
15343 }
15344 }
15345 pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginAuthenticator {
15349 if self.zklogin_opt_mut().is_none() {
15350 self.signature = Some(
15351 super::user_signature::Signature::Zklogin(
15352 super::ZkLoginAuthenticator::default(),
15353 ),
15354 );
15355 }
15356 self.zklogin_opt_mut().unwrap()
15357 }
15358 pub fn set_zklogin<T: Into<super::ZkLoginAuthenticator>>(&mut self, field: T) {
15361 self.signature = Some(
15362 super::user_signature::Signature::Zklogin(field.into().into()),
15363 );
15364 }
15365 pub fn with_zklogin<T: Into<super::ZkLoginAuthenticator>>(
15368 mut self,
15369 field: T,
15370 ) -> Self {
15371 self.set_zklogin(field.into());
15372 self
15373 }
15374 pub fn passkey(&self) -> &super::PasskeyAuthenticator {
15376 if let Some(super::user_signature::Signature::Passkey(field)) = &self
15377 .signature
15378 {
15379 field as _
15380 } else {
15381 super::PasskeyAuthenticator::default_instance() as _
15382 }
15383 }
15384 pub fn passkey_opt(&self) -> Option<&super::PasskeyAuthenticator> {
15386 if let Some(super::user_signature::Signature::Passkey(field)) = &self
15387 .signature
15388 {
15389 Some(field as _)
15390 } else {
15391 None
15392 }
15393 }
15394 pub fn passkey_opt_mut(&mut self) -> Option<&mut super::PasskeyAuthenticator> {
15396 if let Some(super::user_signature::Signature::Passkey(field)) = &mut self
15397 .signature
15398 {
15399 Some(field as _)
15400 } else {
15401 None
15402 }
15403 }
15404 pub fn passkey_mut(&mut self) -> &mut super::PasskeyAuthenticator {
15408 if self.passkey_opt_mut().is_none() {
15409 self.signature = Some(
15410 super::user_signature::Signature::Passkey(
15411 super::PasskeyAuthenticator::default(),
15412 ),
15413 );
15414 }
15415 self.passkey_opt_mut().unwrap()
15416 }
15417 pub fn set_passkey<T: Into<super::PasskeyAuthenticator>>(&mut self, field: T) {
15420 self.signature = Some(
15421 super::user_signature::Signature::Passkey(field.into().into()),
15422 );
15423 }
15424 pub fn with_passkey<T: Into<super::PasskeyAuthenticator>>(
15427 mut self,
15428 field: T,
15429 ) -> Self {
15430 self.set_passkey(field.into());
15431 self
15432 }
15433 }
15434 impl super::Validator {
15435 pub const fn const_default() -> Self {
15436 Self {
15437 name: None,
15438 address: None,
15439 description: None,
15440 image_url: None,
15441 project_url: None,
15442 protocol_public_key: None,
15443 proof_of_possession: None,
15444 network_public_key: None,
15445 worker_public_key: None,
15446 network_address: None,
15447 p2p_address: None,
15448 primary_address: None,
15449 worker_address: None,
15450 next_epoch_protocol_public_key: None,
15451 next_epoch_proof_of_possession: None,
15452 next_epoch_network_public_key: None,
15453 next_epoch_worker_public_key: None,
15454 next_epoch_network_address: None,
15455 next_epoch_p2p_address: None,
15456 next_epoch_primary_address: None,
15457 next_epoch_worker_address: None,
15458 metadata_extra_fields: None,
15459 voting_power: None,
15460 operation_cap_id: None,
15461 gas_price: None,
15462 staking_pool: None,
15463 commission_rate: None,
15464 next_epoch_stake: None,
15465 next_epoch_gas_price: None,
15466 next_epoch_commission_rate: None,
15467 extra_fields: None,
15468 }
15469 }
15470 #[doc(hidden)]
15471 pub fn default_instance() -> &'static Self {
15472 static DEFAULT: super::Validator = super::Validator::const_default();
15473 &DEFAULT
15474 }
15475 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
15477 self.name.as_mut().map(|field| field as _)
15478 }
15479 pub fn name_mut(&mut self) -> &mut String {
15482 self.name.get_or_insert_default()
15483 }
15484 pub fn name_opt(&self) -> Option<&str> {
15486 self.name.as_ref().map(|field| field as _)
15487 }
15488 pub fn set_name<T: Into<String>>(&mut self, field: T) {
15490 self.name = Some(field.into().into());
15491 }
15492 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
15494 self.set_name(field.into());
15495 self
15496 }
15497 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
15499 self.address.as_mut().map(|field| field as _)
15500 }
15501 pub fn address_mut(&mut self) -> &mut String {
15504 self.address.get_or_insert_default()
15505 }
15506 pub fn address_opt(&self) -> Option<&str> {
15508 self.address.as_ref().map(|field| field as _)
15509 }
15510 pub fn set_address<T: Into<String>>(&mut self, field: T) {
15512 self.address = Some(field.into().into());
15513 }
15514 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
15516 self.set_address(field.into());
15517 self
15518 }
15519 pub fn description_opt_mut(&mut self) -> Option<&mut String> {
15521 self.description.as_mut().map(|field| field as _)
15522 }
15523 pub fn description_mut(&mut self) -> &mut String {
15526 self.description.get_or_insert_default()
15527 }
15528 pub fn description_opt(&self) -> Option<&str> {
15530 self.description.as_ref().map(|field| field as _)
15531 }
15532 pub fn set_description<T: Into<String>>(&mut self, field: T) {
15534 self.description = Some(field.into().into());
15535 }
15536 pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
15538 self.set_description(field.into());
15539 self
15540 }
15541 pub fn image_url_opt_mut(&mut self) -> Option<&mut String> {
15543 self.image_url.as_mut().map(|field| field as _)
15544 }
15545 pub fn image_url_mut(&mut self) -> &mut String {
15548 self.image_url.get_or_insert_default()
15549 }
15550 pub fn image_url_opt(&self) -> Option<&str> {
15552 self.image_url.as_ref().map(|field| field as _)
15553 }
15554 pub fn set_image_url<T: Into<String>>(&mut self, field: T) {
15556 self.image_url = Some(field.into().into());
15557 }
15558 pub fn with_image_url<T: Into<String>>(mut self, field: T) -> Self {
15560 self.set_image_url(field.into());
15561 self
15562 }
15563 pub fn project_url_opt_mut(&mut self) -> Option<&mut String> {
15565 self.project_url.as_mut().map(|field| field as _)
15566 }
15567 pub fn project_url_mut(&mut self) -> &mut String {
15570 self.project_url.get_or_insert_default()
15571 }
15572 pub fn project_url_opt(&self) -> Option<&str> {
15574 self.project_url.as_ref().map(|field| field as _)
15575 }
15576 pub fn set_project_url<T: Into<String>>(&mut self, field: T) {
15578 self.project_url = Some(field.into().into());
15579 }
15580 pub fn with_project_url<T: Into<String>>(mut self, field: T) -> Self {
15582 self.set_project_url(field.into());
15583 self
15584 }
15585 pub fn protocol_public_key_opt(&self) -> Option<&[u8]> {
15587 self.protocol_public_key.as_ref().map(|field| field as _)
15588 }
15589 pub fn set_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
15591 &mut self,
15592 field: T,
15593 ) {
15594 self.protocol_public_key = Some(field.into().into());
15595 }
15596 pub fn with_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
15598 mut self,
15599 field: T,
15600 ) -> Self {
15601 self.set_protocol_public_key(field.into());
15602 self
15603 }
15604 pub fn proof_of_possession_opt(&self) -> Option<&[u8]> {
15606 self.proof_of_possession.as_ref().map(|field| field as _)
15607 }
15608 pub fn set_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
15610 &mut self,
15611 field: T,
15612 ) {
15613 self.proof_of_possession = Some(field.into().into());
15614 }
15615 pub fn with_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
15617 mut self,
15618 field: T,
15619 ) -> Self {
15620 self.set_proof_of_possession(field.into());
15621 self
15622 }
15623 pub fn network_public_key_opt(&self) -> Option<&[u8]> {
15625 self.network_public_key.as_ref().map(|field| field as _)
15626 }
15627 pub fn set_network_public_key<T: Into<::prost::bytes::Bytes>>(
15629 &mut self,
15630 field: T,
15631 ) {
15632 self.network_public_key = Some(field.into().into());
15633 }
15634 pub fn with_network_public_key<T: Into<::prost::bytes::Bytes>>(
15636 mut self,
15637 field: T,
15638 ) -> Self {
15639 self.set_network_public_key(field.into());
15640 self
15641 }
15642 pub fn worker_public_key_opt(&self) -> Option<&[u8]> {
15644 self.worker_public_key.as_ref().map(|field| field as _)
15645 }
15646 pub fn set_worker_public_key<T: Into<::prost::bytes::Bytes>>(
15648 &mut self,
15649 field: T,
15650 ) {
15651 self.worker_public_key = Some(field.into().into());
15652 }
15653 pub fn with_worker_public_key<T: Into<::prost::bytes::Bytes>>(
15655 mut self,
15656 field: T,
15657 ) -> Self {
15658 self.set_worker_public_key(field.into());
15659 self
15660 }
15661 pub fn network_address_opt_mut(&mut self) -> Option<&mut String> {
15663 self.network_address.as_mut().map(|field| field as _)
15664 }
15665 pub fn network_address_mut(&mut self) -> &mut String {
15668 self.network_address.get_or_insert_default()
15669 }
15670 pub fn network_address_opt(&self) -> Option<&str> {
15672 self.network_address.as_ref().map(|field| field as _)
15673 }
15674 pub fn set_network_address<T: Into<String>>(&mut self, field: T) {
15676 self.network_address = Some(field.into().into());
15677 }
15678 pub fn with_network_address<T: Into<String>>(mut self, field: T) -> Self {
15680 self.set_network_address(field.into());
15681 self
15682 }
15683 pub fn p2p_address_opt_mut(&mut self) -> Option<&mut String> {
15685 self.p2p_address.as_mut().map(|field| field as _)
15686 }
15687 pub fn p2p_address_mut(&mut self) -> &mut String {
15690 self.p2p_address.get_or_insert_default()
15691 }
15692 pub fn p2p_address_opt(&self) -> Option<&str> {
15694 self.p2p_address.as_ref().map(|field| field as _)
15695 }
15696 pub fn set_p2p_address<T: Into<String>>(&mut self, field: T) {
15698 self.p2p_address = Some(field.into().into());
15699 }
15700 pub fn with_p2p_address<T: Into<String>>(mut self, field: T) -> Self {
15702 self.set_p2p_address(field.into());
15703 self
15704 }
15705 pub fn primary_address_opt_mut(&mut self) -> Option<&mut String> {
15707 self.primary_address.as_mut().map(|field| field as _)
15708 }
15709 pub fn primary_address_mut(&mut self) -> &mut String {
15712 self.primary_address.get_or_insert_default()
15713 }
15714 pub fn primary_address_opt(&self) -> Option<&str> {
15716 self.primary_address.as_ref().map(|field| field as _)
15717 }
15718 pub fn set_primary_address<T: Into<String>>(&mut self, field: T) {
15720 self.primary_address = Some(field.into().into());
15721 }
15722 pub fn with_primary_address<T: Into<String>>(mut self, field: T) -> Self {
15724 self.set_primary_address(field.into());
15725 self
15726 }
15727 pub fn worker_address_opt_mut(&mut self) -> Option<&mut String> {
15729 self.worker_address.as_mut().map(|field| field as _)
15730 }
15731 pub fn worker_address_mut(&mut self) -> &mut String {
15734 self.worker_address.get_or_insert_default()
15735 }
15736 pub fn worker_address_opt(&self) -> Option<&str> {
15738 self.worker_address.as_ref().map(|field| field as _)
15739 }
15740 pub fn set_worker_address<T: Into<String>>(&mut self, field: T) {
15742 self.worker_address = Some(field.into().into());
15743 }
15744 pub fn with_worker_address<T: Into<String>>(mut self, field: T) -> Self {
15746 self.set_worker_address(field.into());
15747 self
15748 }
15749 pub fn next_epoch_protocol_public_key_opt(&self) -> Option<&[u8]> {
15751 self.next_epoch_protocol_public_key.as_ref().map(|field| field as _)
15752 }
15753 pub fn set_next_epoch_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
15755 &mut self,
15756 field: T,
15757 ) {
15758 self.next_epoch_protocol_public_key = Some(field.into().into());
15759 }
15760 pub fn with_next_epoch_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
15762 mut self,
15763 field: T,
15764 ) -> Self {
15765 self.set_next_epoch_protocol_public_key(field.into());
15766 self
15767 }
15768 pub fn next_epoch_proof_of_possession_opt(&self) -> Option<&[u8]> {
15770 self.next_epoch_proof_of_possession.as_ref().map(|field| field as _)
15771 }
15772 pub fn set_next_epoch_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
15774 &mut self,
15775 field: T,
15776 ) {
15777 self.next_epoch_proof_of_possession = Some(field.into().into());
15778 }
15779 pub fn with_next_epoch_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
15781 mut self,
15782 field: T,
15783 ) -> Self {
15784 self.set_next_epoch_proof_of_possession(field.into());
15785 self
15786 }
15787 pub fn next_epoch_network_public_key_opt(&self) -> Option<&[u8]> {
15789 self.next_epoch_network_public_key.as_ref().map(|field| field as _)
15790 }
15791 pub fn set_next_epoch_network_public_key<T: Into<::prost::bytes::Bytes>>(
15793 &mut self,
15794 field: T,
15795 ) {
15796 self.next_epoch_network_public_key = Some(field.into().into());
15797 }
15798 pub fn with_next_epoch_network_public_key<T: Into<::prost::bytes::Bytes>>(
15800 mut self,
15801 field: T,
15802 ) -> Self {
15803 self.set_next_epoch_network_public_key(field.into());
15804 self
15805 }
15806 pub fn next_epoch_worker_public_key_opt(&self) -> Option<&[u8]> {
15808 self.next_epoch_worker_public_key.as_ref().map(|field| field as _)
15809 }
15810 pub fn set_next_epoch_worker_public_key<T: Into<::prost::bytes::Bytes>>(
15812 &mut self,
15813 field: T,
15814 ) {
15815 self.next_epoch_worker_public_key = Some(field.into().into());
15816 }
15817 pub fn with_next_epoch_worker_public_key<T: Into<::prost::bytes::Bytes>>(
15819 mut self,
15820 field: T,
15821 ) -> Self {
15822 self.set_next_epoch_worker_public_key(field.into());
15823 self
15824 }
15825 pub fn next_epoch_network_address_opt_mut(&mut self) -> Option<&mut String> {
15827 self.next_epoch_network_address.as_mut().map(|field| field as _)
15828 }
15829 pub fn next_epoch_network_address_mut(&mut self) -> &mut String {
15832 self.next_epoch_network_address.get_or_insert_default()
15833 }
15834 pub fn next_epoch_network_address_opt(&self) -> Option<&str> {
15836 self.next_epoch_network_address.as_ref().map(|field| field as _)
15837 }
15838 pub fn set_next_epoch_network_address<T: Into<String>>(&mut self, field: T) {
15840 self.next_epoch_network_address = Some(field.into().into());
15841 }
15842 pub fn with_next_epoch_network_address<T: Into<String>>(
15844 mut self,
15845 field: T,
15846 ) -> Self {
15847 self.set_next_epoch_network_address(field.into());
15848 self
15849 }
15850 pub fn next_epoch_p2p_address_opt_mut(&mut self) -> Option<&mut String> {
15852 self.next_epoch_p2p_address.as_mut().map(|field| field as _)
15853 }
15854 pub fn next_epoch_p2p_address_mut(&mut self) -> &mut String {
15857 self.next_epoch_p2p_address.get_or_insert_default()
15858 }
15859 pub fn next_epoch_p2p_address_opt(&self) -> Option<&str> {
15861 self.next_epoch_p2p_address.as_ref().map(|field| field as _)
15862 }
15863 pub fn set_next_epoch_p2p_address<T: Into<String>>(&mut self, field: T) {
15865 self.next_epoch_p2p_address = Some(field.into().into());
15866 }
15867 pub fn with_next_epoch_p2p_address<T: Into<String>>(mut self, field: T) -> Self {
15869 self.set_next_epoch_p2p_address(field.into());
15870 self
15871 }
15872 pub fn next_epoch_primary_address_opt_mut(&mut self) -> Option<&mut String> {
15874 self.next_epoch_primary_address.as_mut().map(|field| field as _)
15875 }
15876 pub fn next_epoch_primary_address_mut(&mut self) -> &mut String {
15879 self.next_epoch_primary_address.get_or_insert_default()
15880 }
15881 pub fn next_epoch_primary_address_opt(&self) -> Option<&str> {
15883 self.next_epoch_primary_address.as_ref().map(|field| field as _)
15884 }
15885 pub fn set_next_epoch_primary_address<T: Into<String>>(&mut self, field: T) {
15887 self.next_epoch_primary_address = Some(field.into().into());
15888 }
15889 pub fn with_next_epoch_primary_address<T: Into<String>>(
15891 mut self,
15892 field: T,
15893 ) -> Self {
15894 self.set_next_epoch_primary_address(field.into());
15895 self
15896 }
15897 pub fn next_epoch_worker_address_opt_mut(&mut self) -> Option<&mut String> {
15899 self.next_epoch_worker_address.as_mut().map(|field| field as _)
15900 }
15901 pub fn next_epoch_worker_address_mut(&mut self) -> &mut String {
15904 self.next_epoch_worker_address.get_or_insert_default()
15905 }
15906 pub fn next_epoch_worker_address_opt(&self) -> Option<&str> {
15908 self.next_epoch_worker_address.as_ref().map(|field| field as _)
15909 }
15910 pub fn set_next_epoch_worker_address<T: Into<String>>(&mut self, field: T) {
15912 self.next_epoch_worker_address = Some(field.into().into());
15913 }
15914 pub fn with_next_epoch_worker_address<T: Into<String>>(
15916 mut self,
15917 field: T,
15918 ) -> Self {
15919 self.set_next_epoch_worker_address(field.into());
15920 self
15921 }
15922 pub fn metadata_extra_fields(&self) -> &super::MoveTable {
15924 self.metadata_extra_fields
15925 .as_ref()
15926 .map(|field| field as _)
15927 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
15928 }
15929 pub fn metadata_extra_fields_opt_mut(
15931 &mut self,
15932 ) -> Option<&mut super::MoveTable> {
15933 self.metadata_extra_fields.as_mut().map(|field| field as _)
15934 }
15935 pub fn metadata_extra_fields_mut(&mut self) -> &mut super::MoveTable {
15938 self.metadata_extra_fields.get_or_insert_default()
15939 }
15940 pub fn metadata_extra_fields_opt(&self) -> Option<&super::MoveTable> {
15942 self.metadata_extra_fields.as_ref().map(|field| field as _)
15943 }
15944 pub fn set_metadata_extra_fields<T: Into<super::MoveTable>>(
15946 &mut self,
15947 field: T,
15948 ) {
15949 self.metadata_extra_fields = Some(field.into().into());
15950 }
15951 pub fn with_metadata_extra_fields<T: Into<super::MoveTable>>(
15953 mut self,
15954 field: T,
15955 ) -> Self {
15956 self.set_metadata_extra_fields(field.into());
15957 self
15958 }
15959 pub fn voting_power_opt_mut(&mut self) -> Option<&mut u64> {
15961 self.voting_power.as_mut().map(|field| field as _)
15962 }
15963 pub fn voting_power_mut(&mut self) -> &mut u64 {
15966 self.voting_power.get_or_insert_default()
15967 }
15968 pub fn voting_power_opt(&self) -> Option<u64> {
15970 self.voting_power.as_ref().map(|field| *field)
15971 }
15972 pub fn set_voting_power(&mut self, field: u64) {
15974 self.voting_power = Some(field);
15975 }
15976 pub fn with_voting_power(mut self, field: u64) -> Self {
15978 self.set_voting_power(field);
15979 self
15980 }
15981 pub fn operation_cap_id_opt_mut(&mut self) -> Option<&mut String> {
15983 self.operation_cap_id.as_mut().map(|field| field as _)
15984 }
15985 pub fn operation_cap_id_mut(&mut self) -> &mut String {
15988 self.operation_cap_id.get_or_insert_default()
15989 }
15990 pub fn operation_cap_id_opt(&self) -> Option<&str> {
15992 self.operation_cap_id.as_ref().map(|field| field as _)
15993 }
15994 pub fn set_operation_cap_id<T: Into<String>>(&mut self, field: T) {
15996 self.operation_cap_id = Some(field.into().into());
15997 }
15998 pub fn with_operation_cap_id<T: Into<String>>(mut self, field: T) -> Self {
16000 self.set_operation_cap_id(field.into());
16001 self
16002 }
16003 pub fn gas_price_opt_mut(&mut self) -> Option<&mut u64> {
16005 self.gas_price.as_mut().map(|field| field as _)
16006 }
16007 pub fn gas_price_mut(&mut self) -> &mut u64 {
16010 self.gas_price.get_or_insert_default()
16011 }
16012 pub fn gas_price_opt(&self) -> Option<u64> {
16014 self.gas_price.as_ref().map(|field| *field)
16015 }
16016 pub fn set_gas_price(&mut self, field: u64) {
16018 self.gas_price = Some(field);
16019 }
16020 pub fn with_gas_price(mut self, field: u64) -> Self {
16022 self.set_gas_price(field);
16023 self
16024 }
16025 pub fn staking_pool(&self) -> &super::StakingPool {
16027 self.staking_pool
16028 .as_ref()
16029 .map(|field| field as _)
16030 .unwrap_or_else(|| super::StakingPool::default_instance() as _)
16031 }
16032 pub fn staking_pool_opt_mut(&mut self) -> Option<&mut super::StakingPool> {
16034 self.staking_pool.as_mut().map(|field| field as _)
16035 }
16036 pub fn staking_pool_mut(&mut self) -> &mut super::StakingPool {
16039 self.staking_pool.get_or_insert_default()
16040 }
16041 pub fn staking_pool_opt(&self) -> Option<&super::StakingPool> {
16043 self.staking_pool.as_ref().map(|field| field as _)
16044 }
16045 pub fn set_staking_pool<T: Into<super::StakingPool>>(&mut self, field: T) {
16047 self.staking_pool = Some(field.into().into());
16048 }
16049 pub fn with_staking_pool<T: Into<super::StakingPool>>(
16051 mut self,
16052 field: T,
16053 ) -> Self {
16054 self.set_staking_pool(field.into());
16055 self
16056 }
16057 pub fn commission_rate_opt_mut(&mut self) -> Option<&mut u64> {
16059 self.commission_rate.as_mut().map(|field| field as _)
16060 }
16061 pub fn commission_rate_mut(&mut self) -> &mut u64 {
16064 self.commission_rate.get_or_insert_default()
16065 }
16066 pub fn commission_rate_opt(&self) -> Option<u64> {
16068 self.commission_rate.as_ref().map(|field| *field)
16069 }
16070 pub fn set_commission_rate(&mut self, field: u64) {
16072 self.commission_rate = Some(field);
16073 }
16074 pub fn with_commission_rate(mut self, field: u64) -> Self {
16076 self.set_commission_rate(field);
16077 self
16078 }
16079 pub fn next_epoch_stake_opt_mut(&mut self) -> Option<&mut u64> {
16081 self.next_epoch_stake.as_mut().map(|field| field as _)
16082 }
16083 pub fn next_epoch_stake_mut(&mut self) -> &mut u64 {
16086 self.next_epoch_stake.get_or_insert_default()
16087 }
16088 pub fn next_epoch_stake_opt(&self) -> Option<u64> {
16090 self.next_epoch_stake.as_ref().map(|field| *field)
16091 }
16092 pub fn set_next_epoch_stake(&mut self, field: u64) {
16094 self.next_epoch_stake = Some(field);
16095 }
16096 pub fn with_next_epoch_stake(mut self, field: u64) -> Self {
16098 self.set_next_epoch_stake(field);
16099 self
16100 }
16101 pub fn next_epoch_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
16103 self.next_epoch_gas_price.as_mut().map(|field| field as _)
16104 }
16105 pub fn next_epoch_gas_price_mut(&mut self) -> &mut u64 {
16108 self.next_epoch_gas_price.get_or_insert_default()
16109 }
16110 pub fn next_epoch_gas_price_opt(&self) -> Option<u64> {
16112 self.next_epoch_gas_price.as_ref().map(|field| *field)
16113 }
16114 pub fn set_next_epoch_gas_price(&mut self, field: u64) {
16116 self.next_epoch_gas_price = Some(field);
16117 }
16118 pub fn with_next_epoch_gas_price(mut self, field: u64) -> Self {
16120 self.set_next_epoch_gas_price(field);
16121 self
16122 }
16123 pub fn next_epoch_commission_rate_opt_mut(&mut self) -> Option<&mut u64> {
16125 self.next_epoch_commission_rate.as_mut().map(|field| field as _)
16126 }
16127 pub fn next_epoch_commission_rate_mut(&mut self) -> &mut u64 {
16130 self.next_epoch_commission_rate.get_or_insert_default()
16131 }
16132 pub fn next_epoch_commission_rate_opt(&self) -> Option<u64> {
16134 self.next_epoch_commission_rate.as_ref().map(|field| *field)
16135 }
16136 pub fn set_next_epoch_commission_rate(&mut self, field: u64) {
16138 self.next_epoch_commission_rate = Some(field);
16139 }
16140 pub fn with_next_epoch_commission_rate(mut self, field: u64) -> Self {
16142 self.set_next_epoch_commission_rate(field);
16143 self
16144 }
16145 pub fn extra_fields(&self) -> &super::MoveTable {
16147 self.extra_fields
16148 .as_ref()
16149 .map(|field| field as _)
16150 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16151 }
16152 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
16154 self.extra_fields.as_mut().map(|field| field as _)
16155 }
16156 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
16159 self.extra_fields.get_or_insert_default()
16160 }
16161 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
16163 self.extra_fields.as_ref().map(|field| field as _)
16164 }
16165 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
16167 self.extra_fields = Some(field.into().into());
16168 }
16169 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
16171 self.set_extra_fields(field.into());
16172 self
16173 }
16174 }
16175 impl super::ValidatorAggregatedSignature {
16176 pub const fn const_default() -> Self {
16177 Self {
16178 epoch: None,
16179 signature: None,
16180 bitmap: None,
16181 }
16182 }
16183 #[doc(hidden)]
16184 pub fn default_instance() -> &'static Self {
16185 static DEFAULT: super::ValidatorAggregatedSignature = super::ValidatorAggregatedSignature::const_default();
16186 &DEFAULT
16187 }
16188 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
16190 self.epoch.as_mut().map(|field| field as _)
16191 }
16192 pub fn epoch_mut(&mut self) -> &mut u64 {
16195 self.epoch.get_or_insert_default()
16196 }
16197 pub fn epoch_opt(&self) -> Option<u64> {
16199 self.epoch.as_ref().map(|field| *field)
16200 }
16201 pub fn set_epoch(&mut self, field: u64) {
16203 self.epoch = Some(field);
16204 }
16205 pub fn with_epoch(mut self, field: u64) -> Self {
16207 self.set_epoch(field);
16208 self
16209 }
16210 pub fn signature_opt(&self) -> Option<&[u8]> {
16212 self.signature.as_ref().map(|field| field as _)
16213 }
16214 pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16216 self.signature = Some(field.into().into());
16217 }
16218 pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
16220 mut self,
16221 field: T,
16222 ) -> Self {
16223 self.set_signature(field.into());
16224 self
16225 }
16226 pub fn bitmap_opt(&self) -> Option<&[u8]> {
16228 self.bitmap.as_ref().map(|field| field as _)
16229 }
16230 pub fn set_bitmap<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16232 self.bitmap = Some(field.into().into());
16233 }
16234 pub fn with_bitmap<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
16236 self.set_bitmap(field.into());
16237 self
16238 }
16239 }
16240 impl super::ValidatorCommittee {
16241 pub const fn const_default() -> Self {
16242 Self {
16243 epoch: None,
16244 members: Vec::new(),
16245 }
16246 }
16247 #[doc(hidden)]
16248 pub fn default_instance() -> &'static Self {
16249 static DEFAULT: super::ValidatorCommittee = super::ValidatorCommittee::const_default();
16250 &DEFAULT
16251 }
16252 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
16254 self.epoch.as_mut().map(|field| field as _)
16255 }
16256 pub fn epoch_mut(&mut self) -> &mut u64 {
16259 self.epoch.get_or_insert_default()
16260 }
16261 pub fn epoch_opt(&self) -> Option<u64> {
16263 self.epoch.as_ref().map(|field| *field)
16264 }
16265 pub fn set_epoch(&mut self, field: u64) {
16267 self.epoch = Some(field);
16268 }
16269 pub fn with_epoch(mut self, field: u64) -> Self {
16271 self.set_epoch(field);
16272 self
16273 }
16274 pub fn members(&self) -> &[super::ValidatorCommitteeMember] {
16276 &self.members
16277 }
16278 pub fn members_mut(&mut self) -> &mut Vec<super::ValidatorCommitteeMember> {
16281 &mut self.members
16282 }
16283 pub fn set_members(&mut self, field: Vec<super::ValidatorCommitteeMember>) {
16285 self.members = field;
16286 }
16287 pub fn with_members(
16289 mut self,
16290 field: Vec<super::ValidatorCommitteeMember>,
16291 ) -> Self {
16292 self.set_members(field);
16293 self
16294 }
16295 }
16296 impl super::ValidatorCommitteeMember {
16297 pub const fn const_default() -> Self {
16298 Self {
16299 public_key: None,
16300 weight: None,
16301 }
16302 }
16303 #[doc(hidden)]
16304 pub fn default_instance() -> &'static Self {
16305 static DEFAULT: super::ValidatorCommitteeMember = super::ValidatorCommitteeMember::const_default();
16306 &DEFAULT
16307 }
16308 pub fn public_key_opt(&self) -> Option<&[u8]> {
16310 self.public_key.as_ref().map(|field| field as _)
16311 }
16312 pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16314 self.public_key = Some(field.into().into());
16315 }
16316 pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
16318 mut self,
16319 field: T,
16320 ) -> Self {
16321 self.set_public_key(field.into());
16322 self
16323 }
16324 pub fn weight_opt_mut(&mut self) -> Option<&mut u64> {
16326 self.weight.as_mut().map(|field| field as _)
16327 }
16328 pub fn weight_mut(&mut self) -> &mut u64 {
16331 self.weight.get_or_insert_default()
16332 }
16333 pub fn weight_opt(&self) -> Option<u64> {
16335 self.weight.as_ref().map(|field| *field)
16336 }
16337 pub fn set_weight(&mut self, field: u64) {
16339 self.weight = Some(field);
16340 }
16341 pub fn with_weight(mut self, field: u64) -> Self {
16343 self.set_weight(field);
16344 self
16345 }
16346 }
16347 impl super::ValidatorExecutionTimeObservation {
16348 pub const fn const_default() -> Self {
16349 Self {
16350 validator: None,
16351 duration: None,
16352 }
16353 }
16354 #[doc(hidden)]
16355 pub fn default_instance() -> &'static Self {
16356 static DEFAULT: super::ValidatorExecutionTimeObservation = super::ValidatorExecutionTimeObservation::const_default();
16357 &DEFAULT
16358 }
16359 pub fn validator_opt(&self) -> Option<&[u8]> {
16361 self.validator.as_ref().map(|field| field as _)
16362 }
16363 pub fn set_validator<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16365 self.validator = Some(field.into().into());
16366 }
16367 pub fn with_validator<T: Into<::prost::bytes::Bytes>>(
16369 mut self,
16370 field: T,
16371 ) -> Self {
16372 self.set_validator(field.into());
16373 self
16374 }
16375 pub fn duration_opt_mut(&mut self) -> Option<&mut ::prost_types::Duration> {
16377 self.duration.as_mut().map(|field| field as _)
16378 }
16379 pub fn duration_mut(&mut self) -> &mut ::prost_types::Duration {
16382 self.duration.get_or_insert_default()
16383 }
16384 pub fn duration_opt(&self) -> Option<&::prost_types::Duration> {
16386 self.duration.as_ref().map(|field| field as _)
16387 }
16388 pub fn set_duration<T: Into<::prost_types::Duration>>(&mut self, field: T) {
16390 self.duration = Some(field.into().into());
16391 }
16392 pub fn with_duration<T: Into<::prost_types::Duration>>(
16394 mut self,
16395 field: T,
16396 ) -> Self {
16397 self.set_duration(field.into());
16398 self
16399 }
16400 }
16401 impl super::ValidatorReportRecord {
16402 pub const fn const_default() -> Self {
16403 Self {
16404 reported: None,
16405 reporters: Vec::new(),
16406 }
16407 }
16408 #[doc(hidden)]
16409 pub fn default_instance() -> &'static Self {
16410 static DEFAULT: super::ValidatorReportRecord = super::ValidatorReportRecord::const_default();
16411 &DEFAULT
16412 }
16413 pub fn reported_opt_mut(&mut self) -> Option<&mut String> {
16415 self.reported.as_mut().map(|field| field as _)
16416 }
16417 pub fn reported_mut(&mut self) -> &mut String {
16420 self.reported.get_or_insert_default()
16421 }
16422 pub fn reported_opt(&self) -> Option<&str> {
16424 self.reported.as_ref().map(|field| field as _)
16425 }
16426 pub fn set_reported<T: Into<String>>(&mut self, field: T) {
16428 self.reported = Some(field.into().into());
16429 }
16430 pub fn with_reported<T: Into<String>>(mut self, field: T) -> Self {
16432 self.set_reported(field.into());
16433 self
16434 }
16435 pub fn reporters(&self) -> &[String] {
16437 &self.reporters
16438 }
16439 pub fn reporters_mut(&mut self) -> &mut Vec<String> {
16442 &mut self.reporters
16443 }
16444 pub fn set_reporters(&mut self, field: Vec<String>) {
16446 self.reporters = field;
16447 }
16448 pub fn with_reporters(mut self, field: Vec<String>) -> Self {
16450 self.set_reporters(field);
16451 self
16452 }
16453 }
16454 impl super::ValidatorSet {
16455 pub const fn const_default() -> Self {
16456 Self {
16457 total_stake: None,
16458 active_validators: Vec::new(),
16459 pending_active_validators: None,
16460 pending_removals: Vec::new(),
16461 staking_pool_mappings: None,
16462 inactive_validators: None,
16463 validator_candidates: None,
16464 at_risk_validators: std::collections::BTreeMap::new(),
16465 extra_fields: None,
16466 }
16467 }
16468 #[doc(hidden)]
16469 pub fn default_instance() -> &'static Self {
16470 static DEFAULT: super::ValidatorSet = super::ValidatorSet::const_default();
16471 &DEFAULT
16472 }
16473 pub fn total_stake_opt_mut(&mut self) -> Option<&mut u64> {
16475 self.total_stake.as_mut().map(|field| field as _)
16476 }
16477 pub fn total_stake_mut(&mut self) -> &mut u64 {
16480 self.total_stake.get_or_insert_default()
16481 }
16482 pub fn total_stake_opt(&self) -> Option<u64> {
16484 self.total_stake.as_ref().map(|field| *field)
16485 }
16486 pub fn set_total_stake(&mut self, field: u64) {
16488 self.total_stake = Some(field);
16489 }
16490 pub fn with_total_stake(mut self, field: u64) -> Self {
16492 self.set_total_stake(field);
16493 self
16494 }
16495 pub fn active_validators(&self) -> &[super::Validator] {
16497 &self.active_validators
16498 }
16499 pub fn active_validators_mut(&mut self) -> &mut Vec<super::Validator> {
16502 &mut self.active_validators
16503 }
16504 pub fn set_active_validators(&mut self, field: Vec<super::Validator>) {
16506 self.active_validators = field;
16507 }
16508 pub fn with_active_validators(mut self, field: Vec<super::Validator>) -> Self {
16510 self.set_active_validators(field);
16511 self
16512 }
16513 pub fn pending_active_validators(&self) -> &super::MoveTable {
16515 self.pending_active_validators
16516 .as_ref()
16517 .map(|field| field as _)
16518 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16519 }
16520 pub fn pending_active_validators_opt_mut(
16522 &mut self,
16523 ) -> Option<&mut super::MoveTable> {
16524 self.pending_active_validators.as_mut().map(|field| field as _)
16525 }
16526 pub fn pending_active_validators_mut(&mut self) -> &mut super::MoveTable {
16529 self.pending_active_validators.get_or_insert_default()
16530 }
16531 pub fn pending_active_validators_opt(&self) -> Option<&super::MoveTable> {
16533 self.pending_active_validators.as_ref().map(|field| field as _)
16534 }
16535 pub fn set_pending_active_validators<T: Into<super::MoveTable>>(
16537 &mut self,
16538 field: T,
16539 ) {
16540 self.pending_active_validators = Some(field.into().into());
16541 }
16542 pub fn with_pending_active_validators<T: Into<super::MoveTable>>(
16544 mut self,
16545 field: T,
16546 ) -> Self {
16547 self.set_pending_active_validators(field.into());
16548 self
16549 }
16550 pub fn pending_removals(&self) -> &[u64] {
16552 &self.pending_removals
16553 }
16554 pub fn pending_removals_mut(&mut self) -> &mut Vec<u64> {
16557 &mut self.pending_removals
16558 }
16559 pub fn set_pending_removals(&mut self, field: Vec<u64>) {
16561 self.pending_removals = field;
16562 }
16563 pub fn with_pending_removals(mut self, field: Vec<u64>) -> Self {
16565 self.set_pending_removals(field);
16566 self
16567 }
16568 pub fn staking_pool_mappings(&self) -> &super::MoveTable {
16570 self.staking_pool_mappings
16571 .as_ref()
16572 .map(|field| field as _)
16573 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16574 }
16575 pub fn staking_pool_mappings_opt_mut(
16577 &mut self,
16578 ) -> Option<&mut super::MoveTable> {
16579 self.staking_pool_mappings.as_mut().map(|field| field as _)
16580 }
16581 pub fn staking_pool_mappings_mut(&mut self) -> &mut super::MoveTable {
16584 self.staking_pool_mappings.get_or_insert_default()
16585 }
16586 pub fn staking_pool_mappings_opt(&self) -> Option<&super::MoveTable> {
16588 self.staking_pool_mappings.as_ref().map(|field| field as _)
16589 }
16590 pub fn set_staking_pool_mappings<T: Into<super::MoveTable>>(
16592 &mut self,
16593 field: T,
16594 ) {
16595 self.staking_pool_mappings = Some(field.into().into());
16596 }
16597 pub fn with_staking_pool_mappings<T: Into<super::MoveTable>>(
16599 mut self,
16600 field: T,
16601 ) -> Self {
16602 self.set_staking_pool_mappings(field.into());
16603 self
16604 }
16605 pub fn inactive_validators(&self) -> &super::MoveTable {
16607 self.inactive_validators
16608 .as_ref()
16609 .map(|field| field as _)
16610 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16611 }
16612 pub fn inactive_validators_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
16614 self.inactive_validators.as_mut().map(|field| field as _)
16615 }
16616 pub fn inactive_validators_mut(&mut self) -> &mut super::MoveTable {
16619 self.inactive_validators.get_or_insert_default()
16620 }
16621 pub fn inactive_validators_opt(&self) -> Option<&super::MoveTable> {
16623 self.inactive_validators.as_ref().map(|field| field as _)
16624 }
16625 pub fn set_inactive_validators<T: Into<super::MoveTable>>(&mut self, field: T) {
16627 self.inactive_validators = Some(field.into().into());
16628 }
16629 pub fn with_inactive_validators<T: Into<super::MoveTable>>(
16631 mut self,
16632 field: T,
16633 ) -> Self {
16634 self.set_inactive_validators(field.into());
16635 self
16636 }
16637 pub fn validator_candidates(&self) -> &super::MoveTable {
16639 self.validator_candidates
16640 .as_ref()
16641 .map(|field| field as _)
16642 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16643 }
16644 pub fn validator_candidates_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
16646 self.validator_candidates.as_mut().map(|field| field as _)
16647 }
16648 pub fn validator_candidates_mut(&mut self) -> &mut super::MoveTable {
16651 self.validator_candidates.get_or_insert_default()
16652 }
16653 pub fn validator_candidates_opt(&self) -> Option<&super::MoveTable> {
16655 self.validator_candidates.as_ref().map(|field| field as _)
16656 }
16657 pub fn set_validator_candidates<T: Into<super::MoveTable>>(&mut self, field: T) {
16659 self.validator_candidates = Some(field.into().into());
16660 }
16661 pub fn with_validator_candidates<T: Into<super::MoveTable>>(
16663 mut self,
16664 field: T,
16665 ) -> Self {
16666 self.set_validator_candidates(field.into());
16667 self
16668 }
16669 pub fn at_risk_validators(&self) -> &::std::collections::BTreeMap<String, u64> {
16671 &self.at_risk_validators
16672 }
16673 pub fn at_risk_validators_mut(
16676 &mut self,
16677 ) -> &mut ::std::collections::BTreeMap<String, u64> {
16678 &mut self.at_risk_validators
16679 }
16680 pub fn set_at_risk_validators(
16682 &mut self,
16683 field: ::std::collections::BTreeMap<String, u64>,
16684 ) {
16685 self.at_risk_validators = field;
16686 }
16687 pub fn with_at_risk_validators(
16689 mut self,
16690 field: ::std::collections::BTreeMap<String, u64>,
16691 ) -> Self {
16692 self.set_at_risk_validators(field);
16693 self
16694 }
16695 pub fn extra_fields(&self) -> &super::MoveTable {
16697 self.extra_fields
16698 .as_ref()
16699 .map(|field| field as _)
16700 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16701 }
16702 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
16704 self.extra_fields.as_mut().map(|field| field as _)
16705 }
16706 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
16709 self.extra_fields.get_or_insert_default()
16710 }
16711 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
16713 self.extra_fields.as_ref().map(|field| field as _)
16714 }
16715 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
16717 self.extra_fields = Some(field.into().into());
16718 }
16719 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
16721 self.set_extra_fields(field.into());
16722 self
16723 }
16724 }
16725 impl super::VariantDescriptor {
16726 pub const fn const_default() -> Self {
16727 Self {
16728 name: None,
16729 position: None,
16730 fields: Vec::new(),
16731 }
16732 }
16733 #[doc(hidden)]
16734 pub fn default_instance() -> &'static Self {
16735 static DEFAULT: super::VariantDescriptor = super::VariantDescriptor::const_default();
16736 &DEFAULT
16737 }
16738 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
16740 self.name.as_mut().map(|field| field as _)
16741 }
16742 pub fn name_mut(&mut self) -> &mut String {
16745 self.name.get_or_insert_default()
16746 }
16747 pub fn name_opt(&self) -> Option<&str> {
16749 self.name.as_ref().map(|field| field as _)
16750 }
16751 pub fn set_name<T: Into<String>>(&mut self, field: T) {
16753 self.name = Some(field.into().into());
16754 }
16755 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
16757 self.set_name(field.into());
16758 self
16759 }
16760 pub fn position_opt_mut(&mut self) -> Option<&mut u32> {
16762 self.position.as_mut().map(|field| field as _)
16763 }
16764 pub fn position_mut(&mut self) -> &mut u32 {
16767 self.position.get_or_insert_default()
16768 }
16769 pub fn position_opt(&self) -> Option<u32> {
16771 self.position.as_ref().map(|field| *field)
16772 }
16773 pub fn set_position(&mut self, field: u32) {
16775 self.position = Some(field);
16776 }
16777 pub fn with_position(mut self, field: u32) -> Self {
16779 self.set_position(field);
16780 self
16781 }
16782 pub fn fields(&self) -> &[super::FieldDescriptor] {
16784 &self.fields
16785 }
16786 pub fn fields_mut(&mut self) -> &mut Vec<super::FieldDescriptor> {
16789 &mut self.fields
16790 }
16791 pub fn set_fields(&mut self, field: Vec<super::FieldDescriptor>) {
16793 self.fields = field;
16794 }
16795 pub fn with_fields(mut self, field: Vec<super::FieldDescriptor>) -> Self {
16797 self.set_fields(field);
16798 self
16799 }
16800 }
16801 impl super::VerifySignatureRequest {
16802 pub const fn const_default() -> Self {
16803 Self {
16804 message: None,
16805 signature: None,
16806 address: None,
16807 jwks: Vec::new(),
16808 }
16809 }
16810 #[doc(hidden)]
16811 pub fn default_instance() -> &'static Self {
16812 static DEFAULT: super::VerifySignatureRequest = super::VerifySignatureRequest::const_default();
16813 &DEFAULT
16814 }
16815 pub fn message(&self) -> &super::Bcs {
16817 self.message
16818 .as_ref()
16819 .map(|field| field as _)
16820 .unwrap_or_else(|| super::Bcs::default_instance() as _)
16821 }
16822 pub fn message_opt_mut(&mut self) -> Option<&mut super::Bcs> {
16824 self.message.as_mut().map(|field| field as _)
16825 }
16826 pub fn message_mut(&mut self) -> &mut super::Bcs {
16829 self.message.get_or_insert_default()
16830 }
16831 pub fn message_opt(&self) -> Option<&super::Bcs> {
16833 self.message.as_ref().map(|field| field as _)
16834 }
16835 pub fn set_message<T: Into<super::Bcs>>(&mut self, field: T) {
16837 self.message = Some(field.into().into());
16838 }
16839 pub fn with_message<T: Into<super::Bcs>>(mut self, field: T) -> Self {
16841 self.set_message(field.into());
16842 self
16843 }
16844 pub fn signature(&self) -> &super::UserSignature {
16846 self.signature
16847 .as_ref()
16848 .map(|field| field as _)
16849 .unwrap_or_else(|| super::UserSignature::default_instance() as _)
16850 }
16851 pub fn signature_opt_mut(&mut self) -> Option<&mut super::UserSignature> {
16853 self.signature.as_mut().map(|field| field as _)
16854 }
16855 pub fn signature_mut(&mut self) -> &mut super::UserSignature {
16858 self.signature.get_or_insert_default()
16859 }
16860 pub fn signature_opt(&self) -> Option<&super::UserSignature> {
16862 self.signature.as_ref().map(|field| field as _)
16863 }
16864 pub fn set_signature<T: Into<super::UserSignature>>(&mut self, field: T) {
16866 self.signature = Some(field.into().into());
16867 }
16868 pub fn with_signature<T: Into<super::UserSignature>>(
16870 mut self,
16871 field: T,
16872 ) -> Self {
16873 self.set_signature(field.into());
16874 self
16875 }
16876 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
16878 self.address.as_mut().map(|field| field as _)
16879 }
16880 pub fn address_mut(&mut self) -> &mut String {
16883 self.address.get_or_insert_default()
16884 }
16885 pub fn address_opt(&self) -> Option<&str> {
16887 self.address.as_ref().map(|field| field as _)
16888 }
16889 pub fn set_address<T: Into<String>>(&mut self, field: T) {
16891 self.address = Some(field.into().into());
16892 }
16893 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
16895 self.set_address(field.into());
16896 self
16897 }
16898 pub fn jwks(&self) -> &[super::ActiveJwk] {
16900 &self.jwks
16901 }
16902 pub fn jwks_mut(&mut self) -> &mut Vec<super::ActiveJwk> {
16905 &mut self.jwks
16906 }
16907 pub fn set_jwks(&mut self, field: Vec<super::ActiveJwk>) {
16909 self.jwks = field;
16910 }
16911 pub fn with_jwks(mut self, field: Vec<super::ActiveJwk>) -> Self {
16913 self.set_jwks(field);
16914 self
16915 }
16916 }
16917 impl super::VerifySignatureResponse {
16918 pub const fn const_default() -> Self {
16919 Self {
16920 is_valid: None,
16921 reason: None,
16922 }
16923 }
16924 #[doc(hidden)]
16925 pub fn default_instance() -> &'static Self {
16926 static DEFAULT: super::VerifySignatureResponse = super::VerifySignatureResponse::const_default();
16927 &DEFAULT
16928 }
16929 pub fn is_valid_opt_mut(&mut self) -> Option<&mut bool> {
16931 self.is_valid.as_mut().map(|field| field as _)
16932 }
16933 pub fn is_valid_mut(&mut self) -> &mut bool {
16936 self.is_valid.get_or_insert_default()
16937 }
16938 pub fn is_valid_opt(&self) -> Option<bool> {
16940 self.is_valid.as_ref().map(|field| *field)
16941 }
16942 pub fn set_is_valid(&mut self, field: bool) {
16944 self.is_valid = Some(field);
16945 }
16946 pub fn with_is_valid(mut self, field: bool) -> Self {
16948 self.set_is_valid(field);
16949 self
16950 }
16951 pub fn reason_opt_mut(&mut self) -> Option<&mut String> {
16953 self.reason.as_mut().map(|field| field as _)
16954 }
16955 pub fn reason_mut(&mut self) -> &mut String {
16958 self.reason.get_or_insert_default()
16959 }
16960 pub fn reason_opt(&self) -> Option<&str> {
16962 self.reason.as_ref().map(|field| field as _)
16963 }
16964 pub fn set_reason<T: Into<String>>(&mut self, field: T) {
16966 self.reason = Some(field.into().into());
16967 }
16968 pub fn with_reason<T: Into<String>>(mut self, field: T) -> Self {
16970 self.set_reason(field.into());
16971 self
16972 }
16973 }
16974 impl super::VersionAssignment {
16975 pub const fn const_default() -> Self {
16976 Self {
16977 object_id: None,
16978 start_version: None,
16979 version: None,
16980 }
16981 }
16982 #[doc(hidden)]
16983 pub fn default_instance() -> &'static Self {
16984 static DEFAULT: super::VersionAssignment = super::VersionAssignment::const_default();
16985 &DEFAULT
16986 }
16987 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
16989 self.object_id.as_mut().map(|field| field as _)
16990 }
16991 pub fn object_id_mut(&mut self) -> &mut String {
16994 self.object_id.get_or_insert_default()
16995 }
16996 pub fn object_id_opt(&self) -> Option<&str> {
16998 self.object_id.as_ref().map(|field| field as _)
16999 }
17000 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
17002 self.object_id = Some(field.into().into());
17003 }
17004 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
17006 self.set_object_id(field.into());
17007 self
17008 }
17009 pub fn start_version_opt_mut(&mut self) -> Option<&mut u64> {
17011 self.start_version.as_mut().map(|field| field as _)
17012 }
17013 pub fn start_version_mut(&mut self) -> &mut u64 {
17016 self.start_version.get_or_insert_default()
17017 }
17018 pub fn start_version_opt(&self) -> Option<u64> {
17020 self.start_version.as_ref().map(|field| *field)
17021 }
17022 pub fn set_start_version(&mut self, field: u64) {
17024 self.start_version = Some(field);
17025 }
17026 pub fn with_start_version(mut self, field: u64) -> Self {
17028 self.set_start_version(field);
17029 self
17030 }
17031 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
17033 self.version.as_mut().map(|field| field as _)
17034 }
17035 pub fn version_mut(&mut self) -> &mut u64 {
17038 self.version.get_or_insert_default()
17039 }
17040 pub fn version_opt(&self) -> Option<u64> {
17042 self.version.as_ref().map(|field| *field)
17043 }
17044 pub fn set_version(&mut self, field: u64) {
17046 self.version = Some(field);
17047 }
17048 pub fn with_version(mut self, field: u64) -> Self {
17050 self.set_version(field);
17051 self
17052 }
17053 }
17054 impl super::ZkLoginAuthenticator {
17055 pub const fn const_default() -> Self {
17056 Self {
17057 inputs: None,
17058 max_epoch: None,
17059 signature: None,
17060 public_identifier: None,
17061 jwk_id: None,
17062 }
17063 }
17064 #[doc(hidden)]
17065 pub fn default_instance() -> &'static Self {
17066 static DEFAULT: super::ZkLoginAuthenticator = super::ZkLoginAuthenticator::const_default();
17067 &DEFAULT
17068 }
17069 pub fn inputs(&self) -> &super::ZkLoginInputs {
17071 self.inputs
17072 .as_ref()
17073 .map(|field| field as _)
17074 .unwrap_or_else(|| super::ZkLoginInputs::default_instance() as _)
17075 }
17076 pub fn inputs_opt_mut(&mut self) -> Option<&mut super::ZkLoginInputs> {
17078 self.inputs.as_mut().map(|field| field as _)
17079 }
17080 pub fn inputs_mut(&mut self) -> &mut super::ZkLoginInputs {
17083 self.inputs.get_or_insert_default()
17084 }
17085 pub fn inputs_opt(&self) -> Option<&super::ZkLoginInputs> {
17087 self.inputs.as_ref().map(|field| field as _)
17088 }
17089 pub fn set_inputs<T: Into<super::ZkLoginInputs>>(&mut self, field: T) {
17091 self.inputs = Some(field.into().into());
17092 }
17093 pub fn with_inputs<T: Into<super::ZkLoginInputs>>(mut self, field: T) -> Self {
17095 self.set_inputs(field.into());
17096 self
17097 }
17098 pub fn max_epoch_opt_mut(&mut self) -> Option<&mut u64> {
17100 self.max_epoch.as_mut().map(|field| field as _)
17101 }
17102 pub fn max_epoch_mut(&mut self) -> &mut u64 {
17105 self.max_epoch.get_or_insert_default()
17106 }
17107 pub fn max_epoch_opt(&self) -> Option<u64> {
17109 self.max_epoch.as_ref().map(|field| *field)
17110 }
17111 pub fn set_max_epoch(&mut self, field: u64) {
17113 self.max_epoch = Some(field);
17114 }
17115 pub fn with_max_epoch(mut self, field: u64) -> Self {
17117 self.set_max_epoch(field);
17118 self
17119 }
17120 pub fn signature(&self) -> &super::SimpleSignature {
17122 self.signature
17123 .as_ref()
17124 .map(|field| field as _)
17125 .unwrap_or_else(|| super::SimpleSignature::default_instance() as _)
17126 }
17127 pub fn signature_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
17129 self.signature.as_mut().map(|field| field as _)
17130 }
17131 pub fn signature_mut(&mut self) -> &mut super::SimpleSignature {
17134 self.signature.get_or_insert_default()
17135 }
17136 pub fn signature_opt(&self) -> Option<&super::SimpleSignature> {
17138 self.signature.as_ref().map(|field| field as _)
17139 }
17140 pub fn set_signature<T: Into<super::SimpleSignature>>(&mut self, field: T) {
17142 self.signature = Some(field.into().into());
17143 }
17144 pub fn with_signature<T: Into<super::SimpleSignature>>(
17146 mut self,
17147 field: T,
17148 ) -> Self {
17149 self.set_signature(field.into());
17150 self
17151 }
17152 pub fn public_identifier(&self) -> &super::ZkLoginPublicIdentifier {
17154 self.public_identifier
17155 .as_ref()
17156 .map(|field| field as _)
17157 .unwrap_or_else(|| {
17158 super::ZkLoginPublicIdentifier::default_instance() as _
17159 })
17160 }
17161 pub fn public_identifier_opt_mut(
17163 &mut self,
17164 ) -> Option<&mut super::ZkLoginPublicIdentifier> {
17165 self.public_identifier.as_mut().map(|field| field as _)
17166 }
17167 pub fn public_identifier_mut(&mut self) -> &mut super::ZkLoginPublicIdentifier {
17170 self.public_identifier.get_or_insert_default()
17171 }
17172 pub fn public_identifier_opt(&self) -> Option<&super::ZkLoginPublicIdentifier> {
17174 self.public_identifier.as_ref().map(|field| field as _)
17175 }
17176 pub fn set_public_identifier<T: Into<super::ZkLoginPublicIdentifier>>(
17178 &mut self,
17179 field: T,
17180 ) {
17181 self.public_identifier = Some(field.into().into());
17182 }
17183 pub fn with_public_identifier<T: Into<super::ZkLoginPublicIdentifier>>(
17185 mut self,
17186 field: T,
17187 ) -> Self {
17188 self.set_public_identifier(field.into());
17189 self
17190 }
17191 pub fn jwk_id(&self) -> &super::JwkId {
17193 self.jwk_id
17194 .as_ref()
17195 .map(|field| field as _)
17196 .unwrap_or_else(|| super::JwkId::default_instance() as _)
17197 }
17198 pub fn jwk_id_opt_mut(&mut self) -> Option<&mut super::JwkId> {
17200 self.jwk_id.as_mut().map(|field| field as _)
17201 }
17202 pub fn jwk_id_mut(&mut self) -> &mut super::JwkId {
17205 self.jwk_id.get_or_insert_default()
17206 }
17207 pub fn jwk_id_opt(&self) -> Option<&super::JwkId> {
17209 self.jwk_id.as_ref().map(|field| field as _)
17210 }
17211 pub fn set_jwk_id<T: Into<super::JwkId>>(&mut self, field: T) {
17213 self.jwk_id = Some(field.into().into());
17214 }
17215 pub fn with_jwk_id<T: Into<super::JwkId>>(mut self, field: T) -> Self {
17217 self.set_jwk_id(field.into());
17218 self
17219 }
17220 }
17221 impl super::ZkLoginClaim {
17222 pub const fn const_default() -> Self {
17223 Self {
17224 value: None,
17225 index_mod_4: None,
17226 }
17227 }
17228 #[doc(hidden)]
17229 pub fn default_instance() -> &'static Self {
17230 static DEFAULT: super::ZkLoginClaim = super::ZkLoginClaim::const_default();
17231 &DEFAULT
17232 }
17233 pub fn value_opt_mut(&mut self) -> Option<&mut String> {
17235 self.value.as_mut().map(|field| field as _)
17236 }
17237 pub fn value_mut(&mut self) -> &mut String {
17240 self.value.get_or_insert_default()
17241 }
17242 pub fn value_opt(&self) -> Option<&str> {
17244 self.value.as_ref().map(|field| field as _)
17245 }
17246 pub fn set_value<T: Into<String>>(&mut self, field: T) {
17248 self.value = Some(field.into().into());
17249 }
17250 pub fn with_value<T: Into<String>>(mut self, field: T) -> Self {
17252 self.set_value(field.into());
17253 self
17254 }
17255 pub fn index_mod_4_opt_mut(&mut self) -> Option<&mut u32> {
17257 self.index_mod_4.as_mut().map(|field| field as _)
17258 }
17259 pub fn index_mod_4_mut(&mut self) -> &mut u32 {
17262 self.index_mod_4.get_or_insert_default()
17263 }
17264 pub fn index_mod_4_opt(&self) -> Option<u32> {
17266 self.index_mod_4.as_ref().map(|field| *field)
17267 }
17268 pub fn set_index_mod_4(&mut self, field: u32) {
17270 self.index_mod_4 = Some(field);
17271 }
17272 pub fn with_index_mod_4(mut self, field: u32) -> Self {
17274 self.set_index_mod_4(field);
17275 self
17276 }
17277 }
17278 impl super::ZkLoginInputs {
17279 pub const fn const_default() -> Self {
17280 Self {
17281 proof_points: None,
17282 iss_base64_details: None,
17283 header_base64: None,
17284 address_seed: None,
17285 }
17286 }
17287 #[doc(hidden)]
17288 pub fn default_instance() -> &'static Self {
17289 static DEFAULT: super::ZkLoginInputs = super::ZkLoginInputs::const_default();
17290 &DEFAULT
17291 }
17292 pub fn proof_points(&self) -> &super::ZkLoginProof {
17294 self.proof_points
17295 .as_ref()
17296 .map(|field| field as _)
17297 .unwrap_or_else(|| super::ZkLoginProof::default_instance() as _)
17298 }
17299 pub fn proof_points_opt_mut(&mut self) -> Option<&mut super::ZkLoginProof> {
17301 self.proof_points.as_mut().map(|field| field as _)
17302 }
17303 pub fn proof_points_mut(&mut self) -> &mut super::ZkLoginProof {
17306 self.proof_points.get_or_insert_default()
17307 }
17308 pub fn proof_points_opt(&self) -> Option<&super::ZkLoginProof> {
17310 self.proof_points.as_ref().map(|field| field as _)
17311 }
17312 pub fn set_proof_points<T: Into<super::ZkLoginProof>>(&mut self, field: T) {
17314 self.proof_points = Some(field.into().into());
17315 }
17316 pub fn with_proof_points<T: Into<super::ZkLoginProof>>(
17318 mut self,
17319 field: T,
17320 ) -> Self {
17321 self.set_proof_points(field.into());
17322 self
17323 }
17324 pub fn iss_base64_details(&self) -> &super::ZkLoginClaim {
17326 self.iss_base64_details
17327 .as_ref()
17328 .map(|field| field as _)
17329 .unwrap_or_else(|| super::ZkLoginClaim::default_instance() as _)
17330 }
17331 pub fn iss_base64_details_opt_mut(
17333 &mut self,
17334 ) -> Option<&mut super::ZkLoginClaim> {
17335 self.iss_base64_details.as_mut().map(|field| field as _)
17336 }
17337 pub fn iss_base64_details_mut(&mut self) -> &mut super::ZkLoginClaim {
17340 self.iss_base64_details.get_or_insert_default()
17341 }
17342 pub fn iss_base64_details_opt(&self) -> Option<&super::ZkLoginClaim> {
17344 self.iss_base64_details.as_ref().map(|field| field as _)
17345 }
17346 pub fn set_iss_base64_details<T: Into<super::ZkLoginClaim>>(
17348 &mut self,
17349 field: T,
17350 ) {
17351 self.iss_base64_details = Some(field.into().into());
17352 }
17353 pub fn with_iss_base64_details<T: Into<super::ZkLoginClaim>>(
17355 mut self,
17356 field: T,
17357 ) -> Self {
17358 self.set_iss_base64_details(field.into());
17359 self
17360 }
17361 pub fn header_base64_opt_mut(&mut self) -> Option<&mut String> {
17363 self.header_base64.as_mut().map(|field| field as _)
17364 }
17365 pub fn header_base64_mut(&mut self) -> &mut String {
17368 self.header_base64.get_or_insert_default()
17369 }
17370 pub fn header_base64_opt(&self) -> Option<&str> {
17372 self.header_base64.as_ref().map(|field| field as _)
17373 }
17374 pub fn set_header_base64<T: Into<String>>(&mut self, field: T) {
17376 self.header_base64 = Some(field.into().into());
17377 }
17378 pub fn with_header_base64<T: Into<String>>(mut self, field: T) -> Self {
17380 self.set_header_base64(field.into());
17381 self
17382 }
17383 pub fn address_seed_opt_mut(&mut self) -> Option<&mut String> {
17385 self.address_seed.as_mut().map(|field| field as _)
17386 }
17387 pub fn address_seed_mut(&mut self) -> &mut String {
17390 self.address_seed.get_or_insert_default()
17391 }
17392 pub fn address_seed_opt(&self) -> Option<&str> {
17394 self.address_seed.as_ref().map(|field| field as _)
17395 }
17396 pub fn set_address_seed<T: Into<String>>(&mut self, field: T) {
17398 self.address_seed = Some(field.into().into());
17399 }
17400 pub fn with_address_seed<T: Into<String>>(mut self, field: T) -> Self {
17402 self.set_address_seed(field.into());
17403 self
17404 }
17405 }
17406 impl super::ZkLoginProof {
17407 pub const fn const_default() -> Self {
17408 Self { a: None, b: None, c: None }
17409 }
17410 #[doc(hidden)]
17411 pub fn default_instance() -> &'static Self {
17412 static DEFAULT: super::ZkLoginProof = super::ZkLoginProof::const_default();
17413 &DEFAULT
17414 }
17415 pub fn a(&self) -> &super::CircomG1 {
17417 self.a
17418 .as_ref()
17419 .map(|field| field as _)
17420 .unwrap_or_else(|| super::CircomG1::default_instance() as _)
17421 }
17422 pub fn a_opt_mut(&mut self) -> Option<&mut super::CircomG1> {
17424 self.a.as_mut().map(|field| field as _)
17425 }
17426 pub fn a_mut(&mut self) -> &mut super::CircomG1 {
17429 self.a.get_or_insert_default()
17430 }
17431 pub fn a_opt(&self) -> Option<&super::CircomG1> {
17433 self.a.as_ref().map(|field| field as _)
17434 }
17435 pub fn set_a<T: Into<super::CircomG1>>(&mut self, field: T) {
17437 self.a = Some(field.into().into());
17438 }
17439 pub fn with_a<T: Into<super::CircomG1>>(mut self, field: T) -> Self {
17441 self.set_a(field.into());
17442 self
17443 }
17444 pub fn b(&self) -> &super::CircomG2 {
17446 self.b
17447 .as_ref()
17448 .map(|field| field as _)
17449 .unwrap_or_else(|| super::CircomG2::default_instance() as _)
17450 }
17451 pub fn b_opt_mut(&mut self) -> Option<&mut super::CircomG2> {
17453 self.b.as_mut().map(|field| field as _)
17454 }
17455 pub fn b_mut(&mut self) -> &mut super::CircomG2 {
17458 self.b.get_or_insert_default()
17459 }
17460 pub fn b_opt(&self) -> Option<&super::CircomG2> {
17462 self.b.as_ref().map(|field| field as _)
17463 }
17464 pub fn set_b<T: Into<super::CircomG2>>(&mut self, field: T) {
17466 self.b = Some(field.into().into());
17467 }
17468 pub fn with_b<T: Into<super::CircomG2>>(mut self, field: T) -> Self {
17470 self.set_b(field.into());
17471 self
17472 }
17473 pub fn c(&self) -> &super::CircomG1 {
17475 self.c
17476 .as_ref()
17477 .map(|field| field as _)
17478 .unwrap_or_else(|| super::CircomG1::default_instance() as _)
17479 }
17480 pub fn c_opt_mut(&mut self) -> Option<&mut super::CircomG1> {
17482 self.c.as_mut().map(|field| field as _)
17483 }
17484 pub fn c_mut(&mut self) -> &mut super::CircomG1 {
17487 self.c.get_or_insert_default()
17488 }
17489 pub fn c_opt(&self) -> Option<&super::CircomG1> {
17491 self.c.as_ref().map(|field| field as _)
17492 }
17493 pub fn set_c<T: Into<super::CircomG1>>(&mut self, field: T) {
17495 self.c = Some(field.into().into());
17496 }
17497 pub fn with_c<T: Into<super::CircomG1>>(mut self, field: T) -> Self {
17499 self.set_c(field.into());
17500 self
17501 }
17502 }
17503 impl super::ZkLoginPublicIdentifier {
17504 pub const fn const_default() -> Self {
17505 Self {
17506 iss: None,
17507 address_seed: None,
17508 }
17509 }
17510 #[doc(hidden)]
17511 pub fn default_instance() -> &'static Self {
17512 static DEFAULT: super::ZkLoginPublicIdentifier = super::ZkLoginPublicIdentifier::const_default();
17513 &DEFAULT
17514 }
17515 pub fn iss_opt_mut(&mut self) -> Option<&mut String> {
17517 self.iss.as_mut().map(|field| field as _)
17518 }
17519 pub fn iss_mut(&mut self) -> &mut String {
17522 self.iss.get_or_insert_default()
17523 }
17524 pub fn iss_opt(&self) -> Option<&str> {
17526 self.iss.as_ref().map(|field| field as _)
17527 }
17528 pub fn set_iss<T: Into<String>>(&mut self, field: T) {
17530 self.iss = Some(field.into().into());
17531 }
17532 pub fn with_iss<T: Into<String>>(mut self, field: T) -> Self {
17534 self.set_iss(field.into());
17535 self
17536 }
17537 pub fn address_seed_opt_mut(&mut self) -> Option<&mut String> {
17539 self.address_seed.as_mut().map(|field| field as _)
17540 }
17541 pub fn address_seed_mut(&mut self) -> &mut String {
17544 self.address_seed.get_or_insert_default()
17545 }
17546 pub fn address_seed_opt(&self) -> Option<&str> {
17548 self.address_seed.as_ref().map(|field| field as _)
17549 }
17550 pub fn set_address_seed<T: Into<String>>(&mut self, field: T) {
17552 self.address_seed = Some(field.into().into());
17553 }
17554 pub fn with_address_seed<T: Into<String>>(mut self, field: T) -> Self {
17556 self.set_address_seed(field.into());
17557 self
17558 }
17559 }
17560}