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<T: Into<u64>>(&mut self, field: T) {
89 self.epoch = Some(field.into().into());
90 }
91 pub fn with_epoch<T: Into<u64>>(mut self, field: T) -> Self {
93 self.set_epoch(field.into());
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<T: Into<u32>>(&mut self, field: T) {
134 self.input = Some(field.into().into());
135 }
136 pub fn with_input<T: Into<u32>>(mut self, field: T) -> Self {
138 self.set_input(field.into());
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<T: Into<u32>>(&mut self, field: T) {
156 self.result = Some(field.into().into());
157 }
158 pub fn with_result<T: Into<u32>>(mut self, field: T) -> Self {
160 self.set_result(field.into());
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<T: Into<u32>>(&mut self, field: T) {
178 self.subresult = Some(field.into().into());
179 }
180 pub fn with_subresult<T: Into<u32>>(mut self, field: T) -> Self {
182 self.set_subresult(field.into());
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<T: Into<u64>>(&mut self, field: T) {
213 self.min_epoch = Some(field.into().into());
214 }
215 pub fn with_min_epoch<T: Into<u64>>(mut self, field: T) -> Self {
217 self.set_min_epoch(field.into());
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<T: Into<u64>>(
239 &mut self,
240 field: T,
241 ) {
242 self.authenticator_object_initial_shared_version = Some(field.into().into());
243 }
244 pub fn with_authenticator_object_initial_shared_version<T: Into<u64>>(
246 mut self,
247 field: T,
248 ) -> Self {
249 self.set_authenticator_object_initial_shared_version(field.into());
250 self
251 }
252 }
253 impl super::AuthenticatorStateUpdate {
254 pub const fn const_default() -> Self {
255 Self {
256 epoch: None,
257 round: None,
258 new_active_jwks: Vec::new(),
259 authenticator_object_initial_shared_version: None,
260 }
261 }
262 #[doc(hidden)]
263 pub fn default_instance() -> &'static Self {
264 static DEFAULT: super::AuthenticatorStateUpdate = super::AuthenticatorStateUpdate::const_default();
265 &DEFAULT
266 }
267 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
269 self.epoch.as_mut().map(|field| field as _)
270 }
271 pub fn epoch_mut(&mut self) -> &mut u64 {
274 self.epoch.get_or_insert_default()
275 }
276 pub fn epoch_opt(&self) -> Option<u64> {
278 self.epoch.as_ref().map(|field| *field)
279 }
280 pub fn set_epoch<T: Into<u64>>(&mut self, field: T) {
282 self.epoch = Some(field.into().into());
283 }
284 pub fn with_epoch<T: Into<u64>>(mut self, field: T) -> Self {
286 self.set_epoch(field.into());
287 self
288 }
289 pub fn round_opt_mut(&mut self) -> Option<&mut u64> {
291 self.round.as_mut().map(|field| field as _)
292 }
293 pub fn round_mut(&mut self) -> &mut u64 {
296 self.round.get_or_insert_default()
297 }
298 pub fn round_opt(&self) -> Option<u64> {
300 self.round.as_ref().map(|field| *field)
301 }
302 pub fn set_round<T: Into<u64>>(&mut self, field: T) {
304 self.round = Some(field.into().into());
305 }
306 pub fn with_round<T: Into<u64>>(mut self, field: T) -> Self {
308 self.set_round(field.into());
309 self
310 }
311 pub fn new_active_jwks(&self) -> &[super::ActiveJwk] {
313 &self.new_active_jwks
314 }
315 pub fn new_active_jwks_mut(&mut self) -> &mut Vec<super::ActiveJwk> {
318 &mut self.new_active_jwks
319 }
320 pub fn set_new_active_jwks(&mut self, field: Vec<super::ActiveJwk>) {
322 self.new_active_jwks = field;
323 }
324 pub fn with_new_active_jwks(mut self, field: Vec<super::ActiveJwk>) -> Self {
326 self.set_new_active_jwks(field);
327 self
328 }
329 pub fn authenticator_object_initial_shared_version_opt_mut(
331 &mut self,
332 ) -> Option<&mut u64> {
333 self.authenticator_object_initial_shared_version
334 .as_mut()
335 .map(|field| field as _)
336 }
337 pub fn authenticator_object_initial_shared_version_mut(&mut self) -> &mut u64 {
340 self.authenticator_object_initial_shared_version.get_or_insert_default()
341 }
342 pub fn authenticator_object_initial_shared_version_opt(&self) -> Option<u64> {
344 self.authenticator_object_initial_shared_version.as_ref().map(|field| *field)
345 }
346 pub fn set_authenticator_object_initial_shared_version<T: Into<u64>>(
348 &mut self,
349 field: T,
350 ) {
351 self.authenticator_object_initial_shared_version = Some(field.into().into());
352 }
353 pub fn with_authenticator_object_initial_shared_version<T: Into<u64>>(
355 mut self,
356 field: T,
357 ) -> Self {
358 self.set_authenticator_object_initial_shared_version(field.into());
359 self
360 }
361 }
362 impl super::Balance {
363 pub const fn const_default() -> Self {
364 Self {
365 coin_type: None,
366 balance: None,
367 }
368 }
369 #[doc(hidden)]
370 pub fn default_instance() -> &'static Self {
371 static DEFAULT: super::Balance = super::Balance::const_default();
372 &DEFAULT
373 }
374 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
376 self.coin_type.as_mut().map(|field| field as _)
377 }
378 pub fn coin_type_mut(&mut self) -> &mut String {
381 self.coin_type.get_or_insert_default()
382 }
383 pub fn coin_type_opt(&self) -> Option<&str> {
385 self.coin_type.as_ref().map(|field| field as _)
386 }
387 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
389 self.coin_type = Some(field.into().into());
390 }
391 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
393 self.set_coin_type(field.into());
394 self
395 }
396 pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
398 self.balance.as_mut().map(|field| field as _)
399 }
400 pub fn balance_mut(&mut self) -> &mut u64 {
403 self.balance.get_or_insert_default()
404 }
405 pub fn balance_opt(&self) -> Option<u64> {
407 self.balance.as_ref().map(|field| *field)
408 }
409 pub fn set_balance<T: Into<u64>>(&mut self, field: T) {
411 self.balance = Some(field.into().into());
412 }
413 pub fn with_balance<T: Into<u64>>(mut self, field: T) -> Self {
415 self.set_balance(field.into());
416 self
417 }
418 }
419 impl super::BalanceChange {
420 pub const fn const_default() -> Self {
421 Self {
422 address: None,
423 coin_type: None,
424 amount: None,
425 }
426 }
427 #[doc(hidden)]
428 pub fn default_instance() -> &'static Self {
429 static DEFAULT: super::BalanceChange = super::BalanceChange::const_default();
430 &DEFAULT
431 }
432 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
434 self.address.as_mut().map(|field| field as _)
435 }
436 pub fn address_mut(&mut self) -> &mut String {
439 self.address.get_or_insert_default()
440 }
441 pub fn address_opt(&self) -> Option<&str> {
443 self.address.as_ref().map(|field| field as _)
444 }
445 pub fn set_address<T: Into<String>>(&mut self, field: T) {
447 self.address = Some(field.into().into());
448 }
449 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
451 self.set_address(field.into());
452 self
453 }
454 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
456 self.coin_type.as_mut().map(|field| field as _)
457 }
458 pub fn coin_type_mut(&mut self) -> &mut String {
461 self.coin_type.get_or_insert_default()
462 }
463 pub fn coin_type_opt(&self) -> Option<&str> {
465 self.coin_type.as_ref().map(|field| field as _)
466 }
467 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
469 self.coin_type = Some(field.into().into());
470 }
471 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
473 self.set_coin_type(field.into());
474 self
475 }
476 pub fn amount_opt_mut(&mut self) -> Option<&mut String> {
478 self.amount.as_mut().map(|field| field as _)
479 }
480 pub fn amount_mut(&mut self) -> &mut String {
483 self.amount.get_or_insert_default()
484 }
485 pub fn amount_opt(&self) -> Option<&str> {
487 self.amount.as_ref().map(|field| field as _)
488 }
489 pub fn set_amount<T: Into<String>>(&mut self, field: T) {
491 self.amount = Some(field.into().into());
492 }
493 pub fn with_amount<T: Into<String>>(mut self, field: T) -> Self {
495 self.set_amount(field.into());
496 self
497 }
498 }
499 impl super::BatchGetObjectsRequest {
500 pub const fn const_default() -> Self {
501 Self {
502 requests: Vec::new(),
503 read_mask: None,
504 }
505 }
506 #[doc(hidden)]
507 pub fn default_instance() -> &'static Self {
508 static DEFAULT: super::BatchGetObjectsRequest = super::BatchGetObjectsRequest::const_default();
509 &DEFAULT
510 }
511 pub fn requests(&self) -> &[super::GetObjectRequest] {
513 &self.requests
514 }
515 pub fn requests_mut(&mut self) -> &mut Vec<super::GetObjectRequest> {
518 &mut self.requests
519 }
520 pub fn set_requests(&mut self, field: Vec<super::GetObjectRequest>) {
522 self.requests = field;
523 }
524 pub fn with_requests(mut self, field: Vec<super::GetObjectRequest>) -> Self {
526 self.set_requests(field);
527 self
528 }
529 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
531 self.read_mask.as_mut().map(|field| field as _)
532 }
533 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
536 self.read_mask.get_or_insert_default()
537 }
538 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
540 self.read_mask.as_ref().map(|field| field as _)
541 }
542 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
544 self.read_mask = Some(field.into().into());
545 }
546 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
548 mut self,
549 field: T,
550 ) -> Self {
551 self.set_read_mask(field.into());
552 self
553 }
554 }
555 impl super::BatchGetObjectsResponse {
556 pub const fn const_default() -> Self {
557 Self { objects: Vec::new() }
558 }
559 #[doc(hidden)]
560 pub fn default_instance() -> &'static Self {
561 static DEFAULT: super::BatchGetObjectsResponse = super::BatchGetObjectsResponse::const_default();
562 &DEFAULT
563 }
564 pub fn objects(&self) -> &[super::GetObjectResult] {
566 &self.objects
567 }
568 pub fn objects_mut(&mut self) -> &mut Vec<super::GetObjectResult> {
571 &mut self.objects
572 }
573 pub fn set_objects(&mut self, field: Vec<super::GetObjectResult>) {
575 self.objects = field;
576 }
577 pub fn with_objects(mut self, field: Vec<super::GetObjectResult>) -> Self {
579 self.set_objects(field);
580 self
581 }
582 }
583 impl super::BatchGetTransactionsRequest {
584 pub const fn const_default() -> Self {
585 Self {
586 digests: Vec::new(),
587 read_mask: None,
588 }
589 }
590 #[doc(hidden)]
591 pub fn default_instance() -> &'static Self {
592 static DEFAULT: super::BatchGetTransactionsRequest = super::BatchGetTransactionsRequest::const_default();
593 &DEFAULT
594 }
595 pub fn digests(&self) -> &[String] {
597 &self.digests
598 }
599 pub fn digests_mut(&mut self) -> &mut Vec<String> {
602 &mut self.digests
603 }
604 pub fn set_digests(&mut self, field: Vec<String>) {
606 self.digests = field;
607 }
608 pub fn with_digests(mut self, field: Vec<String>) -> Self {
610 self.set_digests(field);
611 self
612 }
613 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
615 self.read_mask.as_mut().map(|field| field as _)
616 }
617 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
620 self.read_mask.get_or_insert_default()
621 }
622 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
624 self.read_mask.as_ref().map(|field| field as _)
625 }
626 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
628 self.read_mask = Some(field.into().into());
629 }
630 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
632 mut self,
633 field: T,
634 ) -> Self {
635 self.set_read_mask(field.into());
636 self
637 }
638 }
639 impl super::BatchGetTransactionsResponse {
640 pub const fn const_default() -> Self {
641 Self { transactions: Vec::new() }
642 }
643 #[doc(hidden)]
644 pub fn default_instance() -> &'static Self {
645 static DEFAULT: super::BatchGetTransactionsResponse = super::BatchGetTransactionsResponse::const_default();
646 &DEFAULT
647 }
648 pub fn transactions(&self) -> &[super::GetTransactionResult] {
650 &self.transactions
651 }
652 pub fn transactions_mut(&mut self) -> &mut Vec<super::GetTransactionResult> {
655 &mut self.transactions
656 }
657 pub fn set_transactions(&mut self, field: Vec<super::GetTransactionResult>) {
659 self.transactions = field;
660 }
661 pub fn with_transactions(
663 mut self,
664 field: Vec<super::GetTransactionResult>,
665 ) -> Self {
666 self.set_transactions(field);
667 self
668 }
669 }
670 impl super::Bcs {
671 pub const fn const_default() -> Self {
672 Self { name: None, value: None }
673 }
674 #[doc(hidden)]
675 pub fn default_instance() -> &'static Self {
676 static DEFAULT: super::Bcs = super::Bcs::const_default();
677 &DEFAULT
678 }
679 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
681 self.name.as_mut().map(|field| field as _)
682 }
683 pub fn name_mut(&mut self) -> &mut String {
686 self.name.get_or_insert_default()
687 }
688 pub fn name_opt(&self) -> Option<&str> {
690 self.name.as_ref().map(|field| field as _)
691 }
692 pub fn set_name<T: Into<String>>(&mut self, field: T) {
694 self.name = Some(field.into().into());
695 }
696 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
698 self.set_name(field.into());
699 self
700 }
701 pub fn value_opt(&self) -> Option<&[u8]> {
703 self.value.as_ref().map(|field| field as _)
704 }
705 pub fn set_value<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
707 self.value = Some(field.into().into());
708 }
709 pub fn with_value<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
711 self.set_value(field.into());
712 self
713 }
714 }
715 impl super::CanceledTransaction {
716 pub const fn const_default() -> Self {
717 Self {
718 digest: None,
719 version_assignments: Vec::new(),
720 }
721 }
722 #[doc(hidden)]
723 pub fn default_instance() -> &'static Self {
724 static DEFAULT: super::CanceledTransaction = super::CanceledTransaction::const_default();
725 &DEFAULT
726 }
727 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
729 self.digest.as_mut().map(|field| field as _)
730 }
731 pub fn digest_mut(&mut self) -> &mut String {
734 self.digest.get_or_insert_default()
735 }
736 pub fn digest_opt(&self) -> Option<&str> {
738 self.digest.as_ref().map(|field| field as _)
739 }
740 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
742 self.digest = Some(field.into().into());
743 }
744 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
746 self.set_digest(field.into());
747 self
748 }
749 pub fn version_assignments(&self) -> &[super::VersionAssignment] {
751 &self.version_assignments
752 }
753 pub fn version_assignments_mut(&mut self) -> &mut Vec<super::VersionAssignment> {
756 &mut self.version_assignments
757 }
758 pub fn set_version_assignments(&mut self, field: Vec<super::VersionAssignment>) {
760 self.version_assignments = field;
761 }
762 pub fn with_version_assignments(
764 mut self,
765 field: Vec<super::VersionAssignment>,
766 ) -> Self {
767 self.set_version_assignments(field);
768 self
769 }
770 }
771 impl super::ChangeEpoch {
772 pub const fn const_default() -> Self {
773 Self {
774 epoch: None,
775 protocol_version: None,
776 storage_charge: None,
777 computation_charge: None,
778 storage_rebate: None,
779 non_refundable_storage_fee: None,
780 epoch_start_timestamp: None,
781 system_packages: Vec::new(),
782 }
783 }
784 #[doc(hidden)]
785 pub fn default_instance() -> &'static Self {
786 static DEFAULT: super::ChangeEpoch = super::ChangeEpoch::const_default();
787 &DEFAULT
788 }
789 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
791 self.epoch.as_mut().map(|field| field as _)
792 }
793 pub fn epoch_mut(&mut self) -> &mut u64 {
796 self.epoch.get_or_insert_default()
797 }
798 pub fn epoch_opt(&self) -> Option<u64> {
800 self.epoch.as_ref().map(|field| *field)
801 }
802 pub fn set_epoch<T: Into<u64>>(&mut self, field: T) {
804 self.epoch = Some(field.into().into());
805 }
806 pub fn with_epoch<T: Into<u64>>(mut self, field: T) -> Self {
808 self.set_epoch(field.into());
809 self
810 }
811 pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
813 self.protocol_version.as_mut().map(|field| field as _)
814 }
815 pub fn protocol_version_mut(&mut self) -> &mut u64 {
818 self.protocol_version.get_or_insert_default()
819 }
820 pub fn protocol_version_opt(&self) -> Option<u64> {
822 self.protocol_version.as_ref().map(|field| *field)
823 }
824 pub fn set_protocol_version<T: Into<u64>>(&mut self, field: T) {
826 self.protocol_version = Some(field.into().into());
827 }
828 pub fn with_protocol_version<T: Into<u64>>(mut self, field: T) -> Self {
830 self.set_protocol_version(field.into());
831 self
832 }
833 pub fn storage_charge_opt_mut(&mut self) -> Option<&mut u64> {
835 self.storage_charge.as_mut().map(|field| field as _)
836 }
837 pub fn storage_charge_mut(&mut self) -> &mut u64 {
840 self.storage_charge.get_or_insert_default()
841 }
842 pub fn storage_charge_opt(&self) -> Option<u64> {
844 self.storage_charge.as_ref().map(|field| *field)
845 }
846 pub fn set_storage_charge<T: Into<u64>>(&mut self, field: T) {
848 self.storage_charge = Some(field.into().into());
849 }
850 pub fn with_storage_charge<T: Into<u64>>(mut self, field: T) -> Self {
852 self.set_storage_charge(field.into());
853 self
854 }
855 pub fn computation_charge_opt_mut(&mut self) -> Option<&mut u64> {
857 self.computation_charge.as_mut().map(|field| field as _)
858 }
859 pub fn computation_charge_mut(&mut self) -> &mut u64 {
862 self.computation_charge.get_or_insert_default()
863 }
864 pub fn computation_charge_opt(&self) -> Option<u64> {
866 self.computation_charge.as_ref().map(|field| *field)
867 }
868 pub fn set_computation_charge<T: Into<u64>>(&mut self, field: T) {
870 self.computation_charge = Some(field.into().into());
871 }
872 pub fn with_computation_charge<T: Into<u64>>(mut self, field: T) -> Self {
874 self.set_computation_charge(field.into());
875 self
876 }
877 pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
879 self.storage_rebate.as_mut().map(|field| field as _)
880 }
881 pub fn storage_rebate_mut(&mut self) -> &mut u64 {
884 self.storage_rebate.get_or_insert_default()
885 }
886 pub fn storage_rebate_opt(&self) -> Option<u64> {
888 self.storage_rebate.as_ref().map(|field| *field)
889 }
890 pub fn set_storage_rebate<T: Into<u64>>(&mut self, field: T) {
892 self.storage_rebate = Some(field.into().into());
893 }
894 pub fn with_storage_rebate<T: Into<u64>>(mut self, field: T) -> Self {
896 self.set_storage_rebate(field.into());
897 self
898 }
899 pub fn non_refundable_storage_fee_opt_mut(&mut self) -> Option<&mut u64> {
901 self.non_refundable_storage_fee.as_mut().map(|field| field as _)
902 }
903 pub fn non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
906 self.non_refundable_storage_fee.get_or_insert_default()
907 }
908 pub fn non_refundable_storage_fee_opt(&self) -> Option<u64> {
910 self.non_refundable_storage_fee.as_ref().map(|field| *field)
911 }
912 pub fn set_non_refundable_storage_fee<T: Into<u64>>(&mut self, field: T) {
914 self.non_refundable_storage_fee = Some(field.into().into());
915 }
916 pub fn with_non_refundable_storage_fee<T: Into<u64>>(
918 mut self,
919 field: T,
920 ) -> Self {
921 self.set_non_refundable_storage_fee(field.into());
922 self
923 }
924 pub fn epoch_start_timestamp_opt_mut(
926 &mut self,
927 ) -> Option<&mut ::prost_types::Timestamp> {
928 self.epoch_start_timestamp.as_mut().map(|field| field as _)
929 }
930 pub fn epoch_start_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
933 self.epoch_start_timestamp.get_or_insert_default()
934 }
935 pub fn epoch_start_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
937 self.epoch_start_timestamp.as_ref().map(|field| field as _)
938 }
939 pub fn set_epoch_start_timestamp<T: Into<::prost_types::Timestamp>>(
941 &mut self,
942 field: T,
943 ) {
944 self.epoch_start_timestamp = Some(field.into().into());
945 }
946 pub fn with_epoch_start_timestamp<T: Into<::prost_types::Timestamp>>(
948 mut self,
949 field: T,
950 ) -> Self {
951 self.set_epoch_start_timestamp(field.into());
952 self
953 }
954 pub fn system_packages(&self) -> &[super::SystemPackage] {
956 &self.system_packages
957 }
958 pub fn system_packages_mut(&mut self) -> &mut Vec<super::SystemPackage> {
961 &mut self.system_packages
962 }
963 pub fn set_system_packages(&mut self, field: Vec<super::SystemPackage>) {
965 self.system_packages = field;
966 }
967 pub fn with_system_packages(mut self, field: Vec<super::SystemPackage>) -> Self {
969 self.set_system_packages(field);
970 self
971 }
972 }
973 impl super::ChangedObject {
974 pub const fn const_default() -> Self {
975 Self {
976 object_id: None,
977 input_state: None,
978 input_version: None,
979 input_digest: None,
980 input_owner: None,
981 output_state: None,
982 output_version: None,
983 output_digest: None,
984 output_owner: None,
985 id_operation: None,
986 object_type: None,
987 }
988 }
989 #[doc(hidden)]
990 pub fn default_instance() -> &'static Self {
991 static DEFAULT: super::ChangedObject = super::ChangedObject::const_default();
992 &DEFAULT
993 }
994 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
996 self.object_id.as_mut().map(|field| field as _)
997 }
998 pub fn object_id_mut(&mut self) -> &mut String {
1001 self.object_id.get_or_insert_default()
1002 }
1003 pub fn object_id_opt(&self) -> Option<&str> {
1005 self.object_id.as_ref().map(|field| field as _)
1006 }
1007 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
1009 self.object_id = Some(field.into().into());
1010 }
1011 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
1013 self.set_object_id(field.into());
1014 self
1015 }
1016 pub fn with_input_state<T: Into<super::changed_object::InputObjectState>>(
1018 mut self,
1019 field: T,
1020 ) -> Self {
1021 self.set_input_state(field.into());
1022 self
1023 }
1024 pub fn input_version_opt_mut(&mut self) -> Option<&mut u64> {
1026 self.input_version.as_mut().map(|field| field as _)
1027 }
1028 pub fn input_version_mut(&mut self) -> &mut u64 {
1031 self.input_version.get_or_insert_default()
1032 }
1033 pub fn input_version_opt(&self) -> Option<u64> {
1035 self.input_version.as_ref().map(|field| *field)
1036 }
1037 pub fn set_input_version<T: Into<u64>>(&mut self, field: T) {
1039 self.input_version = Some(field.into().into());
1040 }
1041 pub fn with_input_version<T: Into<u64>>(mut self, field: T) -> Self {
1043 self.set_input_version(field.into());
1044 self
1045 }
1046 pub fn input_digest_opt_mut(&mut self) -> Option<&mut String> {
1048 self.input_digest.as_mut().map(|field| field as _)
1049 }
1050 pub fn input_digest_mut(&mut self) -> &mut String {
1053 self.input_digest.get_or_insert_default()
1054 }
1055 pub fn input_digest_opt(&self) -> Option<&str> {
1057 self.input_digest.as_ref().map(|field| field as _)
1058 }
1059 pub fn set_input_digest<T: Into<String>>(&mut self, field: T) {
1061 self.input_digest = Some(field.into().into());
1062 }
1063 pub fn with_input_digest<T: Into<String>>(mut self, field: T) -> Self {
1065 self.set_input_digest(field.into());
1066 self
1067 }
1068 pub fn input_owner(&self) -> &super::Owner {
1070 self.input_owner
1071 .as_ref()
1072 .map(|field| field as _)
1073 .unwrap_or_else(|| super::Owner::default_instance() as _)
1074 }
1075 pub fn input_owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
1077 self.input_owner.as_mut().map(|field| field as _)
1078 }
1079 pub fn input_owner_mut(&mut self) -> &mut super::Owner {
1082 self.input_owner.get_or_insert_default()
1083 }
1084 pub fn input_owner_opt(&self) -> Option<&super::Owner> {
1086 self.input_owner.as_ref().map(|field| field as _)
1087 }
1088 pub fn set_input_owner<T: Into<super::Owner>>(&mut self, field: T) {
1090 self.input_owner = Some(field.into().into());
1091 }
1092 pub fn with_input_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
1094 self.set_input_owner(field.into());
1095 self
1096 }
1097 pub fn with_output_state<T: Into<super::changed_object::OutputObjectState>>(
1099 mut self,
1100 field: T,
1101 ) -> Self {
1102 self.set_output_state(field.into());
1103 self
1104 }
1105 pub fn output_version_opt_mut(&mut self) -> Option<&mut u64> {
1107 self.output_version.as_mut().map(|field| field as _)
1108 }
1109 pub fn output_version_mut(&mut self) -> &mut u64 {
1112 self.output_version.get_or_insert_default()
1113 }
1114 pub fn output_version_opt(&self) -> Option<u64> {
1116 self.output_version.as_ref().map(|field| *field)
1117 }
1118 pub fn set_output_version<T: Into<u64>>(&mut self, field: T) {
1120 self.output_version = Some(field.into().into());
1121 }
1122 pub fn with_output_version<T: Into<u64>>(mut self, field: T) -> Self {
1124 self.set_output_version(field.into());
1125 self
1126 }
1127 pub fn output_digest_opt_mut(&mut self) -> Option<&mut String> {
1129 self.output_digest.as_mut().map(|field| field as _)
1130 }
1131 pub fn output_digest_mut(&mut self) -> &mut String {
1134 self.output_digest.get_or_insert_default()
1135 }
1136 pub fn output_digest_opt(&self) -> Option<&str> {
1138 self.output_digest.as_ref().map(|field| field as _)
1139 }
1140 pub fn set_output_digest<T: Into<String>>(&mut self, field: T) {
1142 self.output_digest = Some(field.into().into());
1143 }
1144 pub fn with_output_digest<T: Into<String>>(mut self, field: T) -> Self {
1146 self.set_output_digest(field.into());
1147 self
1148 }
1149 pub fn output_owner(&self) -> &super::Owner {
1151 self.output_owner
1152 .as_ref()
1153 .map(|field| field as _)
1154 .unwrap_or_else(|| super::Owner::default_instance() as _)
1155 }
1156 pub fn output_owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
1158 self.output_owner.as_mut().map(|field| field as _)
1159 }
1160 pub fn output_owner_mut(&mut self) -> &mut super::Owner {
1163 self.output_owner.get_or_insert_default()
1164 }
1165 pub fn output_owner_opt(&self) -> Option<&super::Owner> {
1167 self.output_owner.as_ref().map(|field| field as _)
1168 }
1169 pub fn set_output_owner<T: Into<super::Owner>>(&mut self, field: T) {
1171 self.output_owner = Some(field.into().into());
1172 }
1173 pub fn with_output_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
1175 self.set_output_owner(field.into());
1176 self
1177 }
1178 pub fn with_id_operation<T: Into<super::changed_object::IdOperation>>(
1180 mut self,
1181 field: T,
1182 ) -> Self {
1183 self.set_id_operation(field.into());
1184 self
1185 }
1186 pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
1188 self.object_type.as_mut().map(|field| field as _)
1189 }
1190 pub fn object_type_mut(&mut self) -> &mut String {
1193 self.object_type.get_or_insert_default()
1194 }
1195 pub fn object_type_opt(&self) -> Option<&str> {
1197 self.object_type.as_ref().map(|field| field as _)
1198 }
1199 pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
1201 self.object_type = Some(field.into().into());
1202 }
1203 pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
1205 self.set_object_type(field.into());
1206 self
1207 }
1208 }
1209 impl super::Checkpoint {
1210 pub const fn const_default() -> Self {
1211 Self {
1212 sequence_number: None,
1213 digest: None,
1214 summary: None,
1215 signature: None,
1216 contents: None,
1217 transactions: Vec::new(),
1218 objects: None,
1219 }
1220 }
1221 #[doc(hidden)]
1222 pub fn default_instance() -> &'static Self {
1223 static DEFAULT: super::Checkpoint = super::Checkpoint::const_default();
1224 &DEFAULT
1225 }
1226 pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
1228 self.sequence_number.as_mut().map(|field| field as _)
1229 }
1230 pub fn sequence_number_mut(&mut self) -> &mut u64 {
1233 self.sequence_number.get_or_insert_default()
1234 }
1235 pub fn sequence_number_opt(&self) -> Option<u64> {
1237 self.sequence_number.as_ref().map(|field| *field)
1238 }
1239 pub fn set_sequence_number<T: Into<u64>>(&mut self, field: T) {
1241 self.sequence_number = Some(field.into().into());
1242 }
1243 pub fn with_sequence_number<T: Into<u64>>(mut self, field: T) -> Self {
1245 self.set_sequence_number(field.into());
1246 self
1247 }
1248 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1250 self.digest.as_mut().map(|field| field as _)
1251 }
1252 pub fn digest_mut(&mut self) -> &mut String {
1255 self.digest.get_or_insert_default()
1256 }
1257 pub fn digest_opt(&self) -> Option<&str> {
1259 self.digest.as_ref().map(|field| field as _)
1260 }
1261 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1263 self.digest = Some(field.into().into());
1264 }
1265 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1267 self.set_digest(field.into());
1268 self
1269 }
1270 pub fn summary(&self) -> &super::CheckpointSummary {
1272 self.summary
1273 .as_ref()
1274 .map(|field| field as _)
1275 .unwrap_or_else(|| super::CheckpointSummary::default_instance() as _)
1276 }
1277 pub fn summary_opt_mut(&mut self) -> Option<&mut super::CheckpointSummary> {
1279 self.summary.as_mut().map(|field| field as _)
1280 }
1281 pub fn summary_mut(&mut self) -> &mut super::CheckpointSummary {
1284 self.summary.get_or_insert_default()
1285 }
1286 pub fn summary_opt(&self) -> Option<&super::CheckpointSummary> {
1288 self.summary.as_ref().map(|field| field as _)
1289 }
1290 pub fn set_summary<T: Into<super::CheckpointSummary>>(&mut self, field: T) {
1292 self.summary = Some(field.into().into());
1293 }
1294 pub fn with_summary<T: Into<super::CheckpointSummary>>(
1296 mut self,
1297 field: T,
1298 ) -> Self {
1299 self.set_summary(field.into());
1300 self
1301 }
1302 pub fn signature(&self) -> &super::ValidatorAggregatedSignature {
1304 self.signature
1305 .as_ref()
1306 .map(|field| field as _)
1307 .unwrap_or_else(|| {
1308 super::ValidatorAggregatedSignature::default_instance() as _
1309 })
1310 }
1311 pub fn signature_opt_mut(
1313 &mut self,
1314 ) -> Option<&mut super::ValidatorAggregatedSignature> {
1315 self.signature.as_mut().map(|field| field as _)
1316 }
1317 pub fn signature_mut(&mut self) -> &mut super::ValidatorAggregatedSignature {
1320 self.signature.get_or_insert_default()
1321 }
1322 pub fn signature_opt(&self) -> Option<&super::ValidatorAggregatedSignature> {
1324 self.signature.as_ref().map(|field| field as _)
1325 }
1326 pub fn set_signature<T: Into<super::ValidatorAggregatedSignature>>(
1328 &mut self,
1329 field: T,
1330 ) {
1331 self.signature = Some(field.into().into());
1332 }
1333 pub fn with_signature<T: Into<super::ValidatorAggregatedSignature>>(
1335 mut self,
1336 field: T,
1337 ) -> Self {
1338 self.set_signature(field.into());
1339 self
1340 }
1341 pub fn contents(&self) -> &super::CheckpointContents {
1343 self.contents
1344 .as_ref()
1345 .map(|field| field as _)
1346 .unwrap_or_else(|| super::CheckpointContents::default_instance() as _)
1347 }
1348 pub fn contents_opt_mut(&mut self) -> Option<&mut super::CheckpointContents> {
1350 self.contents.as_mut().map(|field| field as _)
1351 }
1352 pub fn contents_mut(&mut self) -> &mut super::CheckpointContents {
1355 self.contents.get_or_insert_default()
1356 }
1357 pub fn contents_opt(&self) -> Option<&super::CheckpointContents> {
1359 self.contents.as_ref().map(|field| field as _)
1360 }
1361 pub fn set_contents<T: Into<super::CheckpointContents>>(&mut self, field: T) {
1363 self.contents = Some(field.into().into());
1364 }
1365 pub fn with_contents<T: Into<super::CheckpointContents>>(
1367 mut self,
1368 field: T,
1369 ) -> Self {
1370 self.set_contents(field.into());
1371 self
1372 }
1373 pub fn transactions(&self) -> &[super::ExecutedTransaction] {
1375 &self.transactions
1376 }
1377 pub fn transactions_mut(&mut self) -> &mut Vec<super::ExecutedTransaction> {
1380 &mut self.transactions
1381 }
1382 pub fn set_transactions(&mut self, field: Vec<super::ExecutedTransaction>) {
1384 self.transactions = field;
1385 }
1386 pub fn with_transactions(
1388 mut self,
1389 field: Vec<super::ExecutedTransaction>,
1390 ) -> Self {
1391 self.set_transactions(field);
1392 self
1393 }
1394 pub fn objects(&self) -> &super::ObjectSet {
1396 self.objects
1397 .as_ref()
1398 .map(|field| field as _)
1399 .unwrap_or_else(|| super::ObjectSet::default_instance() as _)
1400 }
1401 pub fn objects_opt_mut(&mut self) -> Option<&mut super::ObjectSet> {
1403 self.objects.as_mut().map(|field| field as _)
1404 }
1405 pub fn objects_mut(&mut self) -> &mut super::ObjectSet {
1408 self.objects.get_or_insert_default()
1409 }
1410 pub fn objects_opt(&self) -> Option<&super::ObjectSet> {
1412 self.objects.as_ref().map(|field| field as _)
1413 }
1414 pub fn set_objects<T: Into<super::ObjectSet>>(&mut self, field: T) {
1416 self.objects = Some(field.into().into());
1417 }
1418 pub fn with_objects<T: Into<super::ObjectSet>>(mut self, field: T) -> Self {
1420 self.set_objects(field.into());
1421 self
1422 }
1423 }
1424 impl super::CheckpointCommitment {
1425 pub const fn const_default() -> Self {
1426 Self { kind: None, digest: None }
1427 }
1428 #[doc(hidden)]
1429 pub fn default_instance() -> &'static Self {
1430 static DEFAULT: super::CheckpointCommitment = super::CheckpointCommitment::const_default();
1431 &DEFAULT
1432 }
1433 pub fn with_kind<
1435 T: Into<super::checkpoint_commitment::CheckpointCommitmentKind>,
1436 >(mut self, field: T) -> Self {
1437 self.set_kind(field.into());
1438 self
1439 }
1440 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1442 self.digest.as_mut().map(|field| field as _)
1443 }
1444 pub fn digest_mut(&mut self) -> &mut String {
1447 self.digest.get_or_insert_default()
1448 }
1449 pub fn digest_opt(&self) -> Option<&str> {
1451 self.digest.as_ref().map(|field| field as _)
1452 }
1453 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1455 self.digest = Some(field.into().into());
1456 }
1457 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1459 self.set_digest(field.into());
1460 self
1461 }
1462 }
1463 impl super::CheckpointContents {
1464 pub const fn const_default() -> Self {
1465 Self {
1466 bcs: None,
1467 digest: None,
1468 version: None,
1469 transactions: Vec::new(),
1470 }
1471 }
1472 #[doc(hidden)]
1473 pub fn default_instance() -> &'static Self {
1474 static DEFAULT: super::CheckpointContents = super::CheckpointContents::const_default();
1475 &DEFAULT
1476 }
1477 pub fn bcs(&self) -> &super::Bcs {
1479 self.bcs
1480 .as_ref()
1481 .map(|field| field as _)
1482 .unwrap_or_else(|| super::Bcs::default_instance() as _)
1483 }
1484 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
1486 self.bcs.as_mut().map(|field| field as _)
1487 }
1488 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
1491 self.bcs.get_or_insert_default()
1492 }
1493 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
1495 self.bcs.as_ref().map(|field| field as _)
1496 }
1497 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
1499 self.bcs = Some(field.into().into());
1500 }
1501 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
1503 self.set_bcs(field.into());
1504 self
1505 }
1506 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1508 self.digest.as_mut().map(|field| field as _)
1509 }
1510 pub fn digest_mut(&mut self) -> &mut String {
1513 self.digest.get_or_insert_default()
1514 }
1515 pub fn digest_opt(&self) -> Option<&str> {
1517 self.digest.as_ref().map(|field| field as _)
1518 }
1519 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1521 self.digest = Some(field.into().into());
1522 }
1523 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1525 self.set_digest(field.into());
1526 self
1527 }
1528 pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
1530 self.version.as_mut().map(|field| field as _)
1531 }
1532 pub fn version_mut(&mut self) -> &mut i32 {
1535 self.version.get_or_insert_default()
1536 }
1537 pub fn version_opt(&self) -> Option<i32> {
1539 self.version.as_ref().map(|field| *field)
1540 }
1541 pub fn set_version<T: Into<i32>>(&mut self, field: T) {
1543 self.version = Some(field.into().into());
1544 }
1545 pub fn with_version<T: Into<i32>>(mut self, field: T) -> Self {
1547 self.set_version(field.into());
1548 self
1549 }
1550 pub fn transactions(&self) -> &[super::CheckpointedTransactionInfo] {
1552 &self.transactions
1553 }
1554 pub fn transactions_mut(
1557 &mut self,
1558 ) -> &mut Vec<super::CheckpointedTransactionInfo> {
1559 &mut self.transactions
1560 }
1561 pub fn set_transactions(
1563 &mut self,
1564 field: Vec<super::CheckpointedTransactionInfo>,
1565 ) {
1566 self.transactions = field;
1567 }
1568 pub fn with_transactions(
1570 mut self,
1571 field: Vec<super::CheckpointedTransactionInfo>,
1572 ) -> Self {
1573 self.set_transactions(field);
1574 self
1575 }
1576 }
1577 impl super::CheckpointSummary {
1578 pub const fn const_default() -> Self {
1579 Self {
1580 bcs: None,
1581 digest: None,
1582 epoch: None,
1583 sequence_number: None,
1584 total_network_transactions: None,
1585 content_digest: None,
1586 previous_digest: None,
1587 epoch_rolling_gas_cost_summary: None,
1588 timestamp: None,
1589 commitments: Vec::new(),
1590 end_of_epoch_data: None,
1591 version_specific_data: None,
1592 }
1593 }
1594 #[doc(hidden)]
1595 pub fn default_instance() -> &'static Self {
1596 static DEFAULT: super::CheckpointSummary = super::CheckpointSummary::const_default();
1597 &DEFAULT
1598 }
1599 pub fn bcs(&self) -> &super::Bcs {
1601 self.bcs
1602 .as_ref()
1603 .map(|field| field as _)
1604 .unwrap_or_else(|| super::Bcs::default_instance() as _)
1605 }
1606 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
1608 self.bcs.as_mut().map(|field| field as _)
1609 }
1610 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
1613 self.bcs.get_or_insert_default()
1614 }
1615 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
1617 self.bcs.as_ref().map(|field| field as _)
1618 }
1619 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
1621 self.bcs = Some(field.into().into());
1622 }
1623 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
1625 self.set_bcs(field.into());
1626 self
1627 }
1628 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1630 self.digest.as_mut().map(|field| field as _)
1631 }
1632 pub fn digest_mut(&mut self) -> &mut String {
1635 self.digest.get_or_insert_default()
1636 }
1637 pub fn digest_opt(&self) -> Option<&str> {
1639 self.digest.as_ref().map(|field| field as _)
1640 }
1641 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1643 self.digest = Some(field.into().into());
1644 }
1645 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1647 self.set_digest(field.into());
1648 self
1649 }
1650 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
1652 self.epoch.as_mut().map(|field| field as _)
1653 }
1654 pub fn epoch_mut(&mut self) -> &mut u64 {
1657 self.epoch.get_or_insert_default()
1658 }
1659 pub fn epoch_opt(&self) -> Option<u64> {
1661 self.epoch.as_ref().map(|field| *field)
1662 }
1663 pub fn set_epoch<T: Into<u64>>(&mut self, field: T) {
1665 self.epoch = Some(field.into().into());
1666 }
1667 pub fn with_epoch<T: Into<u64>>(mut self, field: T) -> Self {
1669 self.set_epoch(field.into());
1670 self
1671 }
1672 pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
1674 self.sequence_number.as_mut().map(|field| field as _)
1675 }
1676 pub fn sequence_number_mut(&mut self) -> &mut u64 {
1679 self.sequence_number.get_or_insert_default()
1680 }
1681 pub fn sequence_number_opt(&self) -> Option<u64> {
1683 self.sequence_number.as_ref().map(|field| *field)
1684 }
1685 pub fn set_sequence_number<T: Into<u64>>(&mut self, field: T) {
1687 self.sequence_number = Some(field.into().into());
1688 }
1689 pub fn with_sequence_number<T: Into<u64>>(mut self, field: T) -> Self {
1691 self.set_sequence_number(field.into());
1692 self
1693 }
1694 pub fn total_network_transactions_opt_mut(&mut self) -> Option<&mut u64> {
1696 self.total_network_transactions.as_mut().map(|field| field as _)
1697 }
1698 pub fn total_network_transactions_mut(&mut self) -> &mut u64 {
1701 self.total_network_transactions.get_or_insert_default()
1702 }
1703 pub fn total_network_transactions_opt(&self) -> Option<u64> {
1705 self.total_network_transactions.as_ref().map(|field| *field)
1706 }
1707 pub fn set_total_network_transactions<T: Into<u64>>(&mut self, field: T) {
1709 self.total_network_transactions = Some(field.into().into());
1710 }
1711 pub fn with_total_network_transactions<T: Into<u64>>(
1713 mut self,
1714 field: T,
1715 ) -> Self {
1716 self.set_total_network_transactions(field.into());
1717 self
1718 }
1719 pub fn content_digest_opt_mut(&mut self) -> Option<&mut String> {
1721 self.content_digest.as_mut().map(|field| field as _)
1722 }
1723 pub fn content_digest_mut(&mut self) -> &mut String {
1726 self.content_digest.get_or_insert_default()
1727 }
1728 pub fn content_digest_opt(&self) -> Option<&str> {
1730 self.content_digest.as_ref().map(|field| field as _)
1731 }
1732 pub fn set_content_digest<T: Into<String>>(&mut self, field: T) {
1734 self.content_digest = Some(field.into().into());
1735 }
1736 pub fn with_content_digest<T: Into<String>>(mut self, field: T) -> Self {
1738 self.set_content_digest(field.into());
1739 self
1740 }
1741 pub fn previous_digest_opt_mut(&mut self) -> Option<&mut String> {
1743 self.previous_digest.as_mut().map(|field| field as _)
1744 }
1745 pub fn previous_digest_mut(&mut self) -> &mut String {
1748 self.previous_digest.get_or_insert_default()
1749 }
1750 pub fn previous_digest_opt(&self) -> Option<&str> {
1752 self.previous_digest.as_ref().map(|field| field as _)
1753 }
1754 pub fn set_previous_digest<T: Into<String>>(&mut self, field: T) {
1756 self.previous_digest = Some(field.into().into());
1757 }
1758 pub fn with_previous_digest<T: Into<String>>(mut self, field: T) -> Self {
1760 self.set_previous_digest(field.into());
1761 self
1762 }
1763 pub fn epoch_rolling_gas_cost_summary(&self) -> &super::GasCostSummary {
1765 self.epoch_rolling_gas_cost_summary
1766 .as_ref()
1767 .map(|field| field as _)
1768 .unwrap_or_else(|| super::GasCostSummary::default_instance() as _)
1769 }
1770 pub fn epoch_rolling_gas_cost_summary_opt_mut(
1772 &mut self,
1773 ) -> Option<&mut super::GasCostSummary> {
1774 self.epoch_rolling_gas_cost_summary.as_mut().map(|field| field as _)
1775 }
1776 pub fn epoch_rolling_gas_cost_summary_mut(
1779 &mut self,
1780 ) -> &mut super::GasCostSummary {
1781 self.epoch_rolling_gas_cost_summary.get_or_insert_default()
1782 }
1783 pub fn epoch_rolling_gas_cost_summary_opt(
1785 &self,
1786 ) -> Option<&super::GasCostSummary> {
1787 self.epoch_rolling_gas_cost_summary.as_ref().map(|field| field as _)
1788 }
1789 pub fn set_epoch_rolling_gas_cost_summary<T: Into<super::GasCostSummary>>(
1791 &mut self,
1792 field: T,
1793 ) {
1794 self.epoch_rolling_gas_cost_summary = Some(field.into().into());
1795 }
1796 pub fn with_epoch_rolling_gas_cost_summary<T: Into<super::GasCostSummary>>(
1798 mut self,
1799 field: T,
1800 ) -> Self {
1801 self.set_epoch_rolling_gas_cost_summary(field.into());
1802 self
1803 }
1804 pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
1806 self.timestamp.as_mut().map(|field| field as _)
1807 }
1808 pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
1811 self.timestamp.get_or_insert_default()
1812 }
1813 pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
1815 self.timestamp.as_ref().map(|field| field as _)
1816 }
1817 pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
1819 self.timestamp = Some(field.into().into());
1820 }
1821 pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
1823 mut self,
1824 field: T,
1825 ) -> Self {
1826 self.set_timestamp(field.into());
1827 self
1828 }
1829 pub fn commitments(&self) -> &[super::CheckpointCommitment] {
1831 &self.commitments
1832 }
1833 pub fn commitments_mut(&mut self) -> &mut Vec<super::CheckpointCommitment> {
1836 &mut self.commitments
1837 }
1838 pub fn set_commitments(&mut self, field: Vec<super::CheckpointCommitment>) {
1840 self.commitments = field;
1841 }
1842 pub fn with_commitments(
1844 mut self,
1845 field: Vec<super::CheckpointCommitment>,
1846 ) -> Self {
1847 self.set_commitments(field);
1848 self
1849 }
1850 pub fn end_of_epoch_data(&self) -> &super::EndOfEpochData {
1852 self.end_of_epoch_data
1853 .as_ref()
1854 .map(|field| field as _)
1855 .unwrap_or_else(|| super::EndOfEpochData::default_instance() as _)
1856 }
1857 pub fn end_of_epoch_data_opt_mut(
1859 &mut self,
1860 ) -> Option<&mut super::EndOfEpochData> {
1861 self.end_of_epoch_data.as_mut().map(|field| field as _)
1862 }
1863 pub fn end_of_epoch_data_mut(&mut self) -> &mut super::EndOfEpochData {
1866 self.end_of_epoch_data.get_or_insert_default()
1867 }
1868 pub fn end_of_epoch_data_opt(&self) -> Option<&super::EndOfEpochData> {
1870 self.end_of_epoch_data.as_ref().map(|field| field as _)
1871 }
1872 pub fn set_end_of_epoch_data<T: Into<super::EndOfEpochData>>(
1874 &mut self,
1875 field: T,
1876 ) {
1877 self.end_of_epoch_data = Some(field.into().into());
1878 }
1879 pub fn with_end_of_epoch_data<T: Into<super::EndOfEpochData>>(
1881 mut self,
1882 field: T,
1883 ) -> Self {
1884 self.set_end_of_epoch_data(field.into());
1885 self
1886 }
1887 pub fn version_specific_data_opt(&self) -> Option<&[u8]> {
1889 self.version_specific_data.as_ref().map(|field| field as _)
1890 }
1891 pub fn set_version_specific_data<T: Into<::prost::bytes::Bytes>>(
1893 &mut self,
1894 field: T,
1895 ) {
1896 self.version_specific_data = Some(field.into().into());
1897 }
1898 pub fn with_version_specific_data<T: Into<::prost::bytes::Bytes>>(
1900 mut self,
1901 field: T,
1902 ) -> Self {
1903 self.set_version_specific_data(field.into());
1904 self
1905 }
1906 }
1907 impl super::CheckpointedTransactionInfo {
1908 pub const fn const_default() -> Self {
1909 Self {
1910 transaction: None,
1911 effects: None,
1912 signatures: Vec::new(),
1913 }
1914 }
1915 #[doc(hidden)]
1916 pub fn default_instance() -> &'static Self {
1917 static DEFAULT: super::CheckpointedTransactionInfo = super::CheckpointedTransactionInfo::const_default();
1918 &DEFAULT
1919 }
1920 pub fn transaction_opt_mut(&mut self) -> Option<&mut String> {
1922 self.transaction.as_mut().map(|field| field as _)
1923 }
1924 pub fn transaction_mut(&mut self) -> &mut String {
1927 self.transaction.get_or_insert_default()
1928 }
1929 pub fn transaction_opt(&self) -> Option<&str> {
1931 self.transaction.as_ref().map(|field| field as _)
1932 }
1933 pub fn set_transaction<T: Into<String>>(&mut self, field: T) {
1935 self.transaction = Some(field.into().into());
1936 }
1937 pub fn with_transaction<T: Into<String>>(mut self, field: T) -> Self {
1939 self.set_transaction(field.into());
1940 self
1941 }
1942 pub fn effects_opt_mut(&mut self) -> Option<&mut String> {
1944 self.effects.as_mut().map(|field| field as _)
1945 }
1946 pub fn effects_mut(&mut self) -> &mut String {
1949 self.effects.get_or_insert_default()
1950 }
1951 pub fn effects_opt(&self) -> Option<&str> {
1953 self.effects.as_ref().map(|field| field as _)
1954 }
1955 pub fn set_effects<T: Into<String>>(&mut self, field: T) {
1957 self.effects = Some(field.into().into());
1958 }
1959 pub fn with_effects<T: Into<String>>(mut self, field: T) -> Self {
1961 self.set_effects(field.into());
1962 self
1963 }
1964 pub fn signatures(&self) -> &[super::UserSignature] {
1966 &self.signatures
1967 }
1968 pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
1971 &mut self.signatures
1972 }
1973 pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
1975 self.signatures = field;
1976 }
1977 pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
1979 self.set_signatures(field);
1980 self
1981 }
1982 }
1983 impl super::CircomG1 {
1984 pub const fn const_default() -> Self {
1985 Self {
1986 e0: None,
1987 e1: None,
1988 e2: None,
1989 }
1990 }
1991 #[doc(hidden)]
1992 pub fn default_instance() -> &'static Self {
1993 static DEFAULT: super::CircomG1 = super::CircomG1::const_default();
1994 &DEFAULT
1995 }
1996 pub fn e0_opt_mut(&mut self) -> Option<&mut String> {
1998 self.e0.as_mut().map(|field| field as _)
1999 }
2000 pub fn e0_mut(&mut self) -> &mut String {
2003 self.e0.get_or_insert_default()
2004 }
2005 pub fn e0_opt(&self) -> Option<&str> {
2007 self.e0.as_ref().map(|field| field as _)
2008 }
2009 pub fn set_e0<T: Into<String>>(&mut self, field: T) {
2011 self.e0 = Some(field.into().into());
2012 }
2013 pub fn with_e0<T: Into<String>>(mut self, field: T) -> Self {
2015 self.set_e0(field.into());
2016 self
2017 }
2018 pub fn e1_opt_mut(&mut self) -> Option<&mut String> {
2020 self.e1.as_mut().map(|field| field as _)
2021 }
2022 pub fn e1_mut(&mut self) -> &mut String {
2025 self.e1.get_or_insert_default()
2026 }
2027 pub fn e1_opt(&self) -> Option<&str> {
2029 self.e1.as_ref().map(|field| field as _)
2030 }
2031 pub fn set_e1<T: Into<String>>(&mut self, field: T) {
2033 self.e1 = Some(field.into().into());
2034 }
2035 pub fn with_e1<T: Into<String>>(mut self, field: T) -> Self {
2037 self.set_e1(field.into());
2038 self
2039 }
2040 pub fn e2_opt_mut(&mut self) -> Option<&mut String> {
2042 self.e2.as_mut().map(|field| field as _)
2043 }
2044 pub fn e2_mut(&mut self) -> &mut String {
2047 self.e2.get_or_insert_default()
2048 }
2049 pub fn e2_opt(&self) -> Option<&str> {
2051 self.e2.as_ref().map(|field| field as _)
2052 }
2053 pub fn set_e2<T: Into<String>>(&mut self, field: T) {
2055 self.e2 = Some(field.into().into());
2056 }
2057 pub fn with_e2<T: Into<String>>(mut self, field: T) -> Self {
2059 self.set_e2(field.into());
2060 self
2061 }
2062 }
2063 impl super::CircomG2 {
2064 pub const fn const_default() -> Self {
2065 Self {
2066 e00: None,
2067 e01: None,
2068 e10: None,
2069 e11: None,
2070 e20: None,
2071 e21: None,
2072 }
2073 }
2074 #[doc(hidden)]
2075 pub fn default_instance() -> &'static Self {
2076 static DEFAULT: super::CircomG2 = super::CircomG2::const_default();
2077 &DEFAULT
2078 }
2079 pub fn e00_opt_mut(&mut self) -> Option<&mut String> {
2081 self.e00.as_mut().map(|field| field as _)
2082 }
2083 pub fn e00_mut(&mut self) -> &mut String {
2086 self.e00.get_or_insert_default()
2087 }
2088 pub fn e00_opt(&self) -> Option<&str> {
2090 self.e00.as_ref().map(|field| field as _)
2091 }
2092 pub fn set_e00<T: Into<String>>(&mut self, field: T) {
2094 self.e00 = Some(field.into().into());
2095 }
2096 pub fn with_e00<T: Into<String>>(mut self, field: T) -> Self {
2098 self.set_e00(field.into());
2099 self
2100 }
2101 pub fn e01_opt_mut(&mut self) -> Option<&mut String> {
2103 self.e01.as_mut().map(|field| field as _)
2104 }
2105 pub fn e01_mut(&mut self) -> &mut String {
2108 self.e01.get_or_insert_default()
2109 }
2110 pub fn e01_opt(&self) -> Option<&str> {
2112 self.e01.as_ref().map(|field| field as _)
2113 }
2114 pub fn set_e01<T: Into<String>>(&mut self, field: T) {
2116 self.e01 = Some(field.into().into());
2117 }
2118 pub fn with_e01<T: Into<String>>(mut self, field: T) -> Self {
2120 self.set_e01(field.into());
2121 self
2122 }
2123 pub fn e10_opt_mut(&mut self) -> Option<&mut String> {
2125 self.e10.as_mut().map(|field| field as _)
2126 }
2127 pub fn e10_mut(&mut self) -> &mut String {
2130 self.e10.get_or_insert_default()
2131 }
2132 pub fn e10_opt(&self) -> Option<&str> {
2134 self.e10.as_ref().map(|field| field as _)
2135 }
2136 pub fn set_e10<T: Into<String>>(&mut self, field: T) {
2138 self.e10 = Some(field.into().into());
2139 }
2140 pub fn with_e10<T: Into<String>>(mut self, field: T) -> Self {
2142 self.set_e10(field.into());
2143 self
2144 }
2145 pub fn e11_opt_mut(&mut self) -> Option<&mut String> {
2147 self.e11.as_mut().map(|field| field as _)
2148 }
2149 pub fn e11_mut(&mut self) -> &mut String {
2152 self.e11.get_or_insert_default()
2153 }
2154 pub fn e11_opt(&self) -> Option<&str> {
2156 self.e11.as_ref().map(|field| field as _)
2157 }
2158 pub fn set_e11<T: Into<String>>(&mut self, field: T) {
2160 self.e11 = Some(field.into().into());
2161 }
2162 pub fn with_e11<T: Into<String>>(mut self, field: T) -> Self {
2164 self.set_e11(field.into());
2165 self
2166 }
2167 pub fn e20_opt_mut(&mut self) -> Option<&mut String> {
2169 self.e20.as_mut().map(|field| field as _)
2170 }
2171 pub fn e20_mut(&mut self) -> &mut String {
2174 self.e20.get_or_insert_default()
2175 }
2176 pub fn e20_opt(&self) -> Option<&str> {
2178 self.e20.as_ref().map(|field| field as _)
2179 }
2180 pub fn set_e20<T: Into<String>>(&mut self, field: T) {
2182 self.e20 = Some(field.into().into());
2183 }
2184 pub fn with_e20<T: Into<String>>(mut self, field: T) -> Self {
2186 self.set_e20(field.into());
2187 self
2188 }
2189 pub fn e21_opt_mut(&mut self) -> Option<&mut String> {
2191 self.e21.as_mut().map(|field| field as _)
2192 }
2193 pub fn e21_mut(&mut self) -> &mut String {
2196 self.e21.get_or_insert_default()
2197 }
2198 pub fn e21_opt(&self) -> Option<&str> {
2200 self.e21.as_ref().map(|field| field as _)
2201 }
2202 pub fn set_e21<T: Into<String>>(&mut self, field: T) {
2204 self.e21 = Some(field.into().into());
2205 }
2206 pub fn with_e21<T: Into<String>>(mut self, field: T) -> Self {
2208 self.set_e21(field.into());
2209 self
2210 }
2211 }
2212 impl super::CleverError {
2213 pub const fn const_default() -> Self {
2214 Self {
2215 error_code: None,
2216 line_number: None,
2217 constant_name: None,
2218 constant_type: None,
2219 value: None,
2220 }
2221 }
2222 #[doc(hidden)]
2223 pub fn default_instance() -> &'static Self {
2224 static DEFAULT: super::CleverError = super::CleverError::const_default();
2225 &DEFAULT
2226 }
2227 pub fn error_code_opt_mut(&mut self) -> Option<&mut u64> {
2229 self.error_code.as_mut().map(|field| field as _)
2230 }
2231 pub fn error_code_mut(&mut self) -> &mut u64 {
2234 self.error_code.get_or_insert_default()
2235 }
2236 pub fn error_code_opt(&self) -> Option<u64> {
2238 self.error_code.as_ref().map(|field| *field)
2239 }
2240 pub fn set_error_code<T: Into<u64>>(&mut self, field: T) {
2242 self.error_code = Some(field.into().into());
2243 }
2244 pub fn with_error_code<T: Into<u64>>(mut self, field: T) -> Self {
2246 self.set_error_code(field.into());
2247 self
2248 }
2249 pub fn line_number_opt_mut(&mut self) -> Option<&mut u64> {
2251 self.line_number.as_mut().map(|field| field as _)
2252 }
2253 pub fn line_number_mut(&mut self) -> &mut u64 {
2256 self.line_number.get_or_insert_default()
2257 }
2258 pub fn line_number_opt(&self) -> Option<u64> {
2260 self.line_number.as_ref().map(|field| *field)
2261 }
2262 pub fn set_line_number<T: Into<u64>>(&mut self, field: T) {
2264 self.line_number = Some(field.into().into());
2265 }
2266 pub fn with_line_number<T: Into<u64>>(mut self, field: T) -> Self {
2268 self.set_line_number(field.into());
2269 self
2270 }
2271 pub fn constant_name_opt_mut(&mut self) -> Option<&mut String> {
2273 self.constant_name.as_mut().map(|field| field as _)
2274 }
2275 pub fn constant_name_mut(&mut self) -> &mut String {
2278 self.constant_name.get_or_insert_default()
2279 }
2280 pub fn constant_name_opt(&self) -> Option<&str> {
2282 self.constant_name.as_ref().map(|field| field as _)
2283 }
2284 pub fn set_constant_name<T: Into<String>>(&mut self, field: T) {
2286 self.constant_name = Some(field.into().into());
2287 }
2288 pub fn with_constant_name<T: Into<String>>(mut self, field: T) -> Self {
2290 self.set_constant_name(field.into());
2291 self
2292 }
2293 pub fn constant_type_opt_mut(&mut self) -> Option<&mut String> {
2295 self.constant_type.as_mut().map(|field| field as _)
2296 }
2297 pub fn constant_type_mut(&mut self) -> &mut String {
2300 self.constant_type.get_or_insert_default()
2301 }
2302 pub fn constant_type_opt(&self) -> Option<&str> {
2304 self.constant_type.as_ref().map(|field| field as _)
2305 }
2306 pub fn set_constant_type<T: Into<String>>(&mut self, field: T) {
2308 self.constant_type = Some(field.into().into());
2309 }
2310 pub fn with_constant_type<T: Into<String>>(mut self, field: T) -> Self {
2312 self.set_constant_type(field.into());
2313 self
2314 }
2315 pub fn rendered(&self) -> &str {
2317 if let Some(super::clever_error::Value::Rendered(field)) = &self.value {
2318 field as _
2319 } else {
2320 ""
2321 }
2322 }
2323 pub fn rendered_opt(&self) -> Option<&str> {
2325 if let Some(super::clever_error::Value::Rendered(field)) = &self.value {
2326 Some(field as _)
2327 } else {
2328 None
2329 }
2330 }
2331 pub fn rendered_opt_mut(&mut self) -> Option<&mut String> {
2333 if let Some(super::clever_error::Value::Rendered(field)) = &mut self.value {
2334 Some(field as _)
2335 } else {
2336 None
2337 }
2338 }
2339 pub fn rendered_mut(&mut self) -> &mut String {
2343 if self.rendered_opt_mut().is_none() {
2344 self.value = Some(
2345 super::clever_error::Value::Rendered(String::default()),
2346 );
2347 }
2348 self.rendered_opt_mut().unwrap()
2349 }
2350 pub fn set_rendered<T: Into<String>>(&mut self, field: T) {
2353 self.value = Some(super::clever_error::Value::Rendered(field.into().into()));
2354 }
2355 pub fn with_rendered<T: Into<String>>(mut self, field: T) -> Self {
2358 self.set_rendered(field.into());
2359 self
2360 }
2361 pub fn raw(&self) -> &[u8] {
2363 if let Some(super::clever_error::Value::Raw(field)) = &self.value {
2364 field as _
2365 } else {
2366 &[]
2367 }
2368 }
2369 pub fn raw_opt(&self) -> Option<&[u8]> {
2371 if let Some(super::clever_error::Value::Raw(field)) = &self.value {
2372 Some(field as _)
2373 } else {
2374 None
2375 }
2376 }
2377 pub fn raw_opt_mut(&mut self) -> Option<&mut ::prost::bytes::Bytes> {
2379 if let Some(super::clever_error::Value::Raw(field)) = &mut self.value {
2380 Some(field as _)
2381 } else {
2382 None
2383 }
2384 }
2385 pub fn raw_mut(&mut self) -> &mut ::prost::bytes::Bytes {
2389 if self.raw_opt_mut().is_none() {
2390 self.value = Some(
2391 super::clever_error::Value::Raw(::prost::bytes::Bytes::default()),
2392 );
2393 }
2394 self.raw_opt_mut().unwrap()
2395 }
2396 pub fn set_raw<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
2399 self.value = Some(super::clever_error::Value::Raw(field.into().into()));
2400 }
2401 pub fn with_raw<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
2404 self.set_raw(field.into());
2405 self
2406 }
2407 }
2408 impl super::CoinDenyListError {
2409 pub const fn const_default() -> Self {
2410 Self {
2411 address: None,
2412 coin_type: None,
2413 }
2414 }
2415 #[doc(hidden)]
2416 pub fn default_instance() -> &'static Self {
2417 static DEFAULT: super::CoinDenyListError = super::CoinDenyListError::const_default();
2418 &DEFAULT
2419 }
2420 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
2422 self.address.as_mut().map(|field| field as _)
2423 }
2424 pub fn address_mut(&mut self) -> &mut String {
2427 self.address.get_or_insert_default()
2428 }
2429 pub fn address_opt(&self) -> Option<&str> {
2431 self.address.as_ref().map(|field| field as _)
2432 }
2433 pub fn set_address<T: Into<String>>(&mut self, field: T) {
2435 self.address = Some(field.into().into());
2436 }
2437 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
2439 self.set_address(field.into());
2440 self
2441 }
2442 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
2444 self.coin_type.as_mut().map(|field| field as _)
2445 }
2446 pub fn coin_type_mut(&mut self) -> &mut String {
2449 self.coin_type.get_or_insert_default()
2450 }
2451 pub fn coin_type_opt(&self) -> Option<&str> {
2453 self.coin_type.as_ref().map(|field| field as _)
2454 }
2455 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
2457 self.coin_type = Some(field.into().into());
2458 }
2459 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
2461 self.set_coin_type(field.into());
2462 self
2463 }
2464 }
2465 impl super::CoinMetadata {
2466 pub const fn const_default() -> Self {
2467 Self {
2468 id: None,
2469 decimals: None,
2470 name: None,
2471 symbol: None,
2472 description: None,
2473 icon_url: None,
2474 metadata_cap_id: None,
2475 metadata_cap_state: None,
2476 }
2477 }
2478 #[doc(hidden)]
2479 pub fn default_instance() -> &'static Self {
2480 static DEFAULT: super::CoinMetadata = super::CoinMetadata::const_default();
2481 &DEFAULT
2482 }
2483 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
2485 self.id.as_mut().map(|field| field as _)
2486 }
2487 pub fn id_mut(&mut self) -> &mut String {
2490 self.id.get_or_insert_default()
2491 }
2492 pub fn id_opt(&self) -> Option<&str> {
2494 self.id.as_ref().map(|field| field as _)
2495 }
2496 pub fn set_id<T: Into<String>>(&mut self, field: T) {
2498 self.id = Some(field.into().into());
2499 }
2500 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
2502 self.set_id(field.into());
2503 self
2504 }
2505 pub fn decimals_opt_mut(&mut self) -> Option<&mut u32> {
2507 self.decimals.as_mut().map(|field| field as _)
2508 }
2509 pub fn decimals_mut(&mut self) -> &mut u32 {
2512 self.decimals.get_or_insert_default()
2513 }
2514 pub fn decimals_opt(&self) -> Option<u32> {
2516 self.decimals.as_ref().map(|field| *field)
2517 }
2518 pub fn set_decimals<T: Into<u32>>(&mut self, field: T) {
2520 self.decimals = Some(field.into().into());
2521 }
2522 pub fn with_decimals<T: Into<u32>>(mut self, field: T) -> Self {
2524 self.set_decimals(field.into());
2525 self
2526 }
2527 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
2529 self.name.as_mut().map(|field| field as _)
2530 }
2531 pub fn name_mut(&mut self) -> &mut String {
2534 self.name.get_or_insert_default()
2535 }
2536 pub fn name_opt(&self) -> Option<&str> {
2538 self.name.as_ref().map(|field| field as _)
2539 }
2540 pub fn set_name<T: Into<String>>(&mut self, field: T) {
2542 self.name = Some(field.into().into());
2543 }
2544 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
2546 self.set_name(field.into());
2547 self
2548 }
2549 pub fn symbol_opt_mut(&mut self) -> Option<&mut String> {
2551 self.symbol.as_mut().map(|field| field as _)
2552 }
2553 pub fn symbol_mut(&mut self) -> &mut String {
2556 self.symbol.get_or_insert_default()
2557 }
2558 pub fn symbol_opt(&self) -> Option<&str> {
2560 self.symbol.as_ref().map(|field| field as _)
2561 }
2562 pub fn set_symbol<T: Into<String>>(&mut self, field: T) {
2564 self.symbol = Some(field.into().into());
2565 }
2566 pub fn with_symbol<T: Into<String>>(mut self, field: T) -> Self {
2568 self.set_symbol(field.into());
2569 self
2570 }
2571 pub fn description_opt_mut(&mut self) -> Option<&mut String> {
2573 self.description.as_mut().map(|field| field as _)
2574 }
2575 pub fn description_mut(&mut self) -> &mut String {
2578 self.description.get_or_insert_default()
2579 }
2580 pub fn description_opt(&self) -> Option<&str> {
2582 self.description.as_ref().map(|field| field as _)
2583 }
2584 pub fn set_description<T: Into<String>>(&mut self, field: T) {
2586 self.description = Some(field.into().into());
2587 }
2588 pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
2590 self.set_description(field.into());
2591 self
2592 }
2593 pub fn icon_url_opt_mut(&mut self) -> Option<&mut String> {
2595 self.icon_url.as_mut().map(|field| field as _)
2596 }
2597 pub fn icon_url_mut(&mut self) -> &mut String {
2600 self.icon_url.get_or_insert_default()
2601 }
2602 pub fn icon_url_opt(&self) -> Option<&str> {
2604 self.icon_url.as_ref().map(|field| field as _)
2605 }
2606 pub fn set_icon_url<T: Into<String>>(&mut self, field: T) {
2608 self.icon_url = Some(field.into().into());
2609 }
2610 pub fn with_icon_url<T: Into<String>>(mut self, field: T) -> Self {
2612 self.set_icon_url(field.into());
2613 self
2614 }
2615 pub fn metadata_cap_id_opt_mut(&mut self) -> Option<&mut String> {
2617 self.metadata_cap_id.as_mut().map(|field| field as _)
2618 }
2619 pub fn metadata_cap_id_mut(&mut self) -> &mut String {
2622 self.metadata_cap_id.get_or_insert_default()
2623 }
2624 pub fn metadata_cap_id_opt(&self) -> Option<&str> {
2626 self.metadata_cap_id.as_ref().map(|field| field as _)
2627 }
2628 pub fn set_metadata_cap_id<T: Into<String>>(&mut self, field: T) {
2630 self.metadata_cap_id = Some(field.into().into());
2631 }
2632 pub fn with_metadata_cap_id<T: Into<String>>(mut self, field: T) -> Self {
2634 self.set_metadata_cap_id(field.into());
2635 self
2636 }
2637 pub fn with_metadata_cap_state<T: Into<super::coin_metadata::MetadataCapState>>(
2639 mut self,
2640 field: T,
2641 ) -> Self {
2642 self.set_metadata_cap_state(field.into());
2643 self
2644 }
2645 }
2646 impl super::CoinTreasury {
2647 pub const fn const_default() -> Self {
2648 Self {
2649 id: None,
2650 total_supply: None,
2651 supply_state: None,
2652 }
2653 }
2654 #[doc(hidden)]
2655 pub fn default_instance() -> &'static Self {
2656 static DEFAULT: super::CoinTreasury = super::CoinTreasury::const_default();
2657 &DEFAULT
2658 }
2659 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
2661 self.id.as_mut().map(|field| field as _)
2662 }
2663 pub fn id_mut(&mut self) -> &mut String {
2666 self.id.get_or_insert_default()
2667 }
2668 pub fn id_opt(&self) -> Option<&str> {
2670 self.id.as_ref().map(|field| field as _)
2671 }
2672 pub fn set_id<T: Into<String>>(&mut self, field: T) {
2674 self.id = Some(field.into().into());
2675 }
2676 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
2678 self.set_id(field.into());
2679 self
2680 }
2681 pub fn total_supply_opt_mut(&mut self) -> Option<&mut u64> {
2683 self.total_supply.as_mut().map(|field| field as _)
2684 }
2685 pub fn total_supply_mut(&mut self) -> &mut u64 {
2688 self.total_supply.get_or_insert_default()
2689 }
2690 pub fn total_supply_opt(&self) -> Option<u64> {
2692 self.total_supply.as_ref().map(|field| *field)
2693 }
2694 pub fn set_total_supply<T: Into<u64>>(&mut self, field: T) {
2696 self.total_supply = Some(field.into().into());
2697 }
2698 pub fn with_total_supply<T: Into<u64>>(mut self, field: T) -> Self {
2700 self.set_total_supply(field.into());
2701 self
2702 }
2703 pub fn with_supply_state<T: Into<super::coin_treasury::SupplyState>>(
2705 mut self,
2706 field: T,
2707 ) -> Self {
2708 self.set_supply_state(field.into());
2709 self
2710 }
2711 }
2712 impl super::Command {
2713 pub const fn const_default() -> Self {
2714 Self { command: None }
2715 }
2716 #[doc(hidden)]
2717 pub fn default_instance() -> &'static Self {
2718 static DEFAULT: super::Command = super::Command::const_default();
2719 &DEFAULT
2720 }
2721 pub fn move_call(&self) -> &super::MoveCall {
2723 if let Some(super::command::Command::MoveCall(field)) = &self.command {
2724 field as _
2725 } else {
2726 super::MoveCall::default_instance() as _
2727 }
2728 }
2729 pub fn move_call_opt(&self) -> Option<&super::MoveCall> {
2731 if let Some(super::command::Command::MoveCall(field)) = &self.command {
2732 Some(field as _)
2733 } else {
2734 None
2735 }
2736 }
2737 pub fn move_call_opt_mut(&mut self) -> Option<&mut super::MoveCall> {
2739 if let Some(super::command::Command::MoveCall(field)) = &mut self.command {
2740 Some(field as _)
2741 } else {
2742 None
2743 }
2744 }
2745 pub fn move_call_mut(&mut self) -> &mut super::MoveCall {
2749 if self.move_call_opt_mut().is_none() {
2750 self.command = Some(
2751 super::command::Command::MoveCall(super::MoveCall::default()),
2752 );
2753 }
2754 self.move_call_opt_mut().unwrap()
2755 }
2756 pub fn set_move_call<T: Into<super::MoveCall>>(&mut self, field: T) {
2759 self.command = Some(super::command::Command::MoveCall(field.into().into()));
2760 }
2761 pub fn with_move_call<T: Into<super::MoveCall>>(mut self, field: T) -> Self {
2764 self.set_move_call(field.into());
2765 self
2766 }
2767 pub fn transfer_objects(&self) -> &super::TransferObjects {
2769 if let Some(super::command::Command::TransferObjects(field)) = &self.command
2770 {
2771 field as _
2772 } else {
2773 super::TransferObjects::default_instance() as _
2774 }
2775 }
2776 pub fn transfer_objects_opt(&self) -> Option<&super::TransferObjects> {
2778 if let Some(super::command::Command::TransferObjects(field)) = &self.command
2779 {
2780 Some(field as _)
2781 } else {
2782 None
2783 }
2784 }
2785 pub fn transfer_objects_opt_mut(
2787 &mut self,
2788 ) -> Option<&mut super::TransferObjects> {
2789 if let Some(super::command::Command::TransferObjects(field)) = &mut self
2790 .command
2791 {
2792 Some(field as _)
2793 } else {
2794 None
2795 }
2796 }
2797 pub fn transfer_objects_mut(&mut self) -> &mut super::TransferObjects {
2801 if self.transfer_objects_opt_mut().is_none() {
2802 self.command = Some(
2803 super::command::Command::TransferObjects(
2804 super::TransferObjects::default(),
2805 ),
2806 );
2807 }
2808 self.transfer_objects_opt_mut().unwrap()
2809 }
2810 pub fn set_transfer_objects<T: Into<super::TransferObjects>>(
2813 &mut self,
2814 field: T,
2815 ) {
2816 self.command = Some(
2817 super::command::Command::TransferObjects(field.into().into()),
2818 );
2819 }
2820 pub fn with_transfer_objects<T: Into<super::TransferObjects>>(
2823 mut self,
2824 field: T,
2825 ) -> Self {
2826 self.set_transfer_objects(field.into());
2827 self
2828 }
2829 pub fn split_coins(&self) -> &super::SplitCoins {
2831 if let Some(super::command::Command::SplitCoins(field)) = &self.command {
2832 field as _
2833 } else {
2834 super::SplitCoins::default_instance() as _
2835 }
2836 }
2837 pub fn split_coins_opt(&self) -> Option<&super::SplitCoins> {
2839 if let Some(super::command::Command::SplitCoins(field)) = &self.command {
2840 Some(field as _)
2841 } else {
2842 None
2843 }
2844 }
2845 pub fn split_coins_opt_mut(&mut self) -> Option<&mut super::SplitCoins> {
2847 if let Some(super::command::Command::SplitCoins(field)) = &mut self.command {
2848 Some(field as _)
2849 } else {
2850 None
2851 }
2852 }
2853 pub fn split_coins_mut(&mut self) -> &mut super::SplitCoins {
2857 if self.split_coins_opt_mut().is_none() {
2858 self.command = Some(
2859 super::command::Command::SplitCoins(super::SplitCoins::default()),
2860 );
2861 }
2862 self.split_coins_opt_mut().unwrap()
2863 }
2864 pub fn set_split_coins<T: Into<super::SplitCoins>>(&mut self, field: T) {
2867 self.command = Some(
2868 super::command::Command::SplitCoins(field.into().into()),
2869 );
2870 }
2871 pub fn with_split_coins<T: Into<super::SplitCoins>>(mut self, field: T) -> Self {
2874 self.set_split_coins(field.into());
2875 self
2876 }
2877 pub fn merge_coins(&self) -> &super::MergeCoins {
2879 if let Some(super::command::Command::MergeCoins(field)) = &self.command {
2880 field as _
2881 } else {
2882 super::MergeCoins::default_instance() as _
2883 }
2884 }
2885 pub fn merge_coins_opt(&self) -> Option<&super::MergeCoins> {
2887 if let Some(super::command::Command::MergeCoins(field)) = &self.command {
2888 Some(field as _)
2889 } else {
2890 None
2891 }
2892 }
2893 pub fn merge_coins_opt_mut(&mut self) -> Option<&mut super::MergeCoins> {
2895 if let Some(super::command::Command::MergeCoins(field)) = &mut self.command {
2896 Some(field as _)
2897 } else {
2898 None
2899 }
2900 }
2901 pub fn merge_coins_mut(&mut self) -> &mut super::MergeCoins {
2905 if self.merge_coins_opt_mut().is_none() {
2906 self.command = Some(
2907 super::command::Command::MergeCoins(super::MergeCoins::default()),
2908 );
2909 }
2910 self.merge_coins_opt_mut().unwrap()
2911 }
2912 pub fn set_merge_coins<T: Into<super::MergeCoins>>(&mut self, field: T) {
2915 self.command = Some(
2916 super::command::Command::MergeCoins(field.into().into()),
2917 );
2918 }
2919 pub fn with_merge_coins<T: Into<super::MergeCoins>>(mut self, field: T) -> Self {
2922 self.set_merge_coins(field.into());
2923 self
2924 }
2925 pub fn publish(&self) -> &super::Publish {
2927 if let Some(super::command::Command::Publish(field)) = &self.command {
2928 field as _
2929 } else {
2930 super::Publish::default_instance() as _
2931 }
2932 }
2933 pub fn publish_opt(&self) -> Option<&super::Publish> {
2935 if let Some(super::command::Command::Publish(field)) = &self.command {
2936 Some(field as _)
2937 } else {
2938 None
2939 }
2940 }
2941 pub fn publish_opt_mut(&mut self) -> Option<&mut super::Publish> {
2943 if let Some(super::command::Command::Publish(field)) = &mut self.command {
2944 Some(field as _)
2945 } else {
2946 None
2947 }
2948 }
2949 pub fn publish_mut(&mut self) -> &mut super::Publish {
2953 if self.publish_opt_mut().is_none() {
2954 self.command = Some(
2955 super::command::Command::Publish(super::Publish::default()),
2956 );
2957 }
2958 self.publish_opt_mut().unwrap()
2959 }
2960 pub fn set_publish<T: Into<super::Publish>>(&mut self, field: T) {
2963 self.command = Some(super::command::Command::Publish(field.into().into()));
2964 }
2965 pub fn with_publish<T: Into<super::Publish>>(mut self, field: T) -> Self {
2968 self.set_publish(field.into());
2969 self
2970 }
2971 pub fn make_move_vector(&self) -> &super::MakeMoveVector {
2973 if let Some(super::command::Command::MakeMoveVector(field)) = &self.command {
2974 field as _
2975 } else {
2976 super::MakeMoveVector::default_instance() as _
2977 }
2978 }
2979 pub fn make_move_vector_opt(&self) -> Option<&super::MakeMoveVector> {
2981 if let Some(super::command::Command::MakeMoveVector(field)) = &self.command {
2982 Some(field as _)
2983 } else {
2984 None
2985 }
2986 }
2987 pub fn make_move_vector_opt_mut(
2989 &mut self,
2990 ) -> Option<&mut super::MakeMoveVector> {
2991 if let Some(super::command::Command::MakeMoveVector(field)) = &mut self
2992 .command
2993 {
2994 Some(field as _)
2995 } else {
2996 None
2997 }
2998 }
2999 pub fn make_move_vector_mut(&mut self) -> &mut super::MakeMoveVector {
3003 if self.make_move_vector_opt_mut().is_none() {
3004 self.command = Some(
3005 super::command::Command::MakeMoveVector(
3006 super::MakeMoveVector::default(),
3007 ),
3008 );
3009 }
3010 self.make_move_vector_opt_mut().unwrap()
3011 }
3012 pub fn set_make_move_vector<T: Into<super::MakeMoveVector>>(
3015 &mut self,
3016 field: T,
3017 ) {
3018 self.command = Some(
3019 super::command::Command::MakeMoveVector(field.into().into()),
3020 );
3021 }
3022 pub fn with_make_move_vector<T: Into<super::MakeMoveVector>>(
3025 mut self,
3026 field: T,
3027 ) -> Self {
3028 self.set_make_move_vector(field.into());
3029 self
3030 }
3031 pub fn upgrade(&self) -> &super::Upgrade {
3033 if let Some(super::command::Command::Upgrade(field)) = &self.command {
3034 field as _
3035 } else {
3036 super::Upgrade::default_instance() as _
3037 }
3038 }
3039 pub fn upgrade_opt(&self) -> Option<&super::Upgrade> {
3041 if let Some(super::command::Command::Upgrade(field)) = &self.command {
3042 Some(field as _)
3043 } else {
3044 None
3045 }
3046 }
3047 pub fn upgrade_opt_mut(&mut self) -> Option<&mut super::Upgrade> {
3049 if let Some(super::command::Command::Upgrade(field)) = &mut self.command {
3050 Some(field as _)
3051 } else {
3052 None
3053 }
3054 }
3055 pub fn upgrade_mut(&mut self) -> &mut super::Upgrade {
3059 if self.upgrade_opt_mut().is_none() {
3060 self.command = Some(
3061 super::command::Command::Upgrade(super::Upgrade::default()),
3062 );
3063 }
3064 self.upgrade_opt_mut().unwrap()
3065 }
3066 pub fn set_upgrade<T: Into<super::Upgrade>>(&mut self, field: T) {
3069 self.command = Some(super::command::Command::Upgrade(field.into().into()));
3070 }
3071 pub fn with_upgrade<T: Into<super::Upgrade>>(mut self, field: T) -> Self {
3074 self.set_upgrade(field.into());
3075 self
3076 }
3077 }
3078 impl super::CommandArgumentError {
3079 pub const fn const_default() -> Self {
3080 Self {
3081 argument: None,
3082 kind: None,
3083 index_error: None,
3084 }
3085 }
3086 #[doc(hidden)]
3087 pub fn default_instance() -> &'static Self {
3088 static DEFAULT: super::CommandArgumentError = super::CommandArgumentError::const_default();
3089 &DEFAULT
3090 }
3091 pub fn argument_opt_mut(&mut self) -> Option<&mut u32> {
3093 self.argument.as_mut().map(|field| field as _)
3094 }
3095 pub fn argument_mut(&mut self) -> &mut u32 {
3098 self.argument.get_or_insert_default()
3099 }
3100 pub fn argument_opt(&self) -> Option<u32> {
3102 self.argument.as_ref().map(|field| *field)
3103 }
3104 pub fn set_argument<T: Into<u32>>(&mut self, field: T) {
3106 self.argument = Some(field.into().into());
3107 }
3108 pub fn with_argument<T: Into<u32>>(mut self, field: T) -> Self {
3110 self.set_argument(field.into());
3111 self
3112 }
3113 pub fn with_kind<
3115 T: Into<super::command_argument_error::CommandArgumentErrorKind>,
3116 >(mut self, field: T) -> Self {
3117 self.set_kind(field.into());
3118 self
3119 }
3120 pub fn index_error(&self) -> &super::IndexError {
3122 self.index_error
3123 .as_ref()
3124 .map(|field| field as _)
3125 .unwrap_or_else(|| super::IndexError::default_instance() as _)
3126 }
3127 pub fn index_error_opt_mut(&mut self) -> Option<&mut super::IndexError> {
3129 self.index_error.as_mut().map(|field| field as _)
3130 }
3131 pub fn index_error_mut(&mut self) -> &mut super::IndexError {
3134 self.index_error.get_or_insert_default()
3135 }
3136 pub fn index_error_opt(&self) -> Option<&super::IndexError> {
3138 self.index_error.as_ref().map(|field| field as _)
3139 }
3140 pub fn set_index_error<T: Into<super::IndexError>>(&mut self, field: T) {
3142 self.index_error = Some(field.into().into());
3143 }
3144 pub fn with_index_error<T: Into<super::IndexError>>(mut self, field: T) -> Self {
3146 self.set_index_error(field.into());
3147 self
3148 }
3149 }
3150 impl super::CommandOutput {
3151 pub const fn const_default() -> Self {
3152 Self {
3153 argument: None,
3154 value: None,
3155 json: None,
3156 }
3157 }
3158 #[doc(hidden)]
3159 pub fn default_instance() -> &'static Self {
3160 static DEFAULT: super::CommandOutput = super::CommandOutput::const_default();
3161 &DEFAULT
3162 }
3163 pub fn argument(&self) -> &super::Argument {
3165 self.argument
3166 .as_ref()
3167 .map(|field| field as _)
3168 .unwrap_or_else(|| super::Argument::default_instance() as _)
3169 }
3170 pub fn argument_opt_mut(&mut self) -> Option<&mut super::Argument> {
3172 self.argument.as_mut().map(|field| field as _)
3173 }
3174 pub fn argument_mut(&mut self) -> &mut super::Argument {
3177 self.argument.get_or_insert_default()
3178 }
3179 pub fn argument_opt(&self) -> Option<&super::Argument> {
3181 self.argument.as_ref().map(|field| field as _)
3182 }
3183 pub fn set_argument<T: Into<super::Argument>>(&mut self, field: T) {
3185 self.argument = Some(field.into().into());
3186 }
3187 pub fn with_argument<T: Into<super::Argument>>(mut self, field: T) -> Self {
3189 self.set_argument(field.into());
3190 self
3191 }
3192 pub fn value(&self) -> &super::Bcs {
3194 self.value
3195 .as_ref()
3196 .map(|field| field as _)
3197 .unwrap_or_else(|| super::Bcs::default_instance() as _)
3198 }
3199 pub fn value_opt_mut(&mut self) -> Option<&mut super::Bcs> {
3201 self.value.as_mut().map(|field| field as _)
3202 }
3203 pub fn value_mut(&mut self) -> &mut super::Bcs {
3206 self.value.get_or_insert_default()
3207 }
3208 pub fn value_opt(&self) -> Option<&super::Bcs> {
3210 self.value.as_ref().map(|field| field as _)
3211 }
3212 pub fn set_value<T: Into<super::Bcs>>(&mut self, field: T) {
3214 self.value = Some(field.into().into());
3215 }
3216 pub fn with_value<T: Into<super::Bcs>>(mut self, field: T) -> Self {
3218 self.set_value(field.into());
3219 self
3220 }
3221 pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
3223 self.json.as_mut().map(|field| field as _)
3224 }
3225 pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
3228 self.json.get_or_insert_default()
3229 }
3230 pub fn json_opt(&self) -> Option<&::prost_types::Value> {
3232 self.json.as_ref().map(|field| field as _)
3233 }
3234 pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
3236 self.json = Some(field.into().into());
3237 }
3238 pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
3240 self.set_json(field.into());
3241 self
3242 }
3243 }
3244 impl super::CommandResult {
3245 pub const fn const_default() -> Self {
3246 Self {
3247 return_values: Vec::new(),
3248 mutated_by_ref: Vec::new(),
3249 }
3250 }
3251 #[doc(hidden)]
3252 pub fn default_instance() -> &'static Self {
3253 static DEFAULT: super::CommandResult = super::CommandResult::const_default();
3254 &DEFAULT
3255 }
3256 pub fn return_values(&self) -> &[super::CommandOutput] {
3258 &self.return_values
3259 }
3260 pub fn return_values_mut(&mut self) -> &mut Vec<super::CommandOutput> {
3263 &mut self.return_values
3264 }
3265 pub fn set_return_values(&mut self, field: Vec<super::CommandOutput>) {
3267 self.return_values = field;
3268 }
3269 pub fn with_return_values(mut self, field: Vec<super::CommandOutput>) -> Self {
3271 self.set_return_values(field);
3272 self
3273 }
3274 pub fn mutated_by_ref(&self) -> &[super::CommandOutput] {
3276 &self.mutated_by_ref
3277 }
3278 pub fn mutated_by_ref_mut(&mut self) -> &mut Vec<super::CommandOutput> {
3281 &mut self.mutated_by_ref
3282 }
3283 pub fn set_mutated_by_ref(&mut self, field: Vec<super::CommandOutput>) {
3285 self.mutated_by_ref = field;
3286 }
3287 pub fn with_mutated_by_ref(mut self, field: Vec<super::CommandOutput>) -> Self {
3289 self.set_mutated_by_ref(field);
3290 self
3291 }
3292 }
3293 impl super::CongestedObjects {
3294 pub const fn const_default() -> Self {
3295 Self { objects: Vec::new() }
3296 }
3297 #[doc(hidden)]
3298 pub fn default_instance() -> &'static Self {
3299 static DEFAULT: super::CongestedObjects = super::CongestedObjects::const_default();
3300 &DEFAULT
3301 }
3302 pub fn objects(&self) -> &[String] {
3304 &self.objects
3305 }
3306 pub fn objects_mut(&mut self) -> &mut Vec<String> {
3309 &mut self.objects
3310 }
3311 pub fn set_objects(&mut self, field: Vec<String>) {
3313 self.objects = field;
3314 }
3315 pub fn with_objects(mut self, field: Vec<String>) -> Self {
3317 self.set_objects(field);
3318 self
3319 }
3320 }
3321 impl super::ConsensusCommitPrologue {
3322 pub const fn const_default() -> Self {
3323 Self {
3324 epoch: None,
3325 round: None,
3326 commit_timestamp: None,
3327 consensus_commit_digest: None,
3328 sub_dag_index: None,
3329 consensus_determined_version_assignments: None,
3330 additional_state_digest: None,
3331 }
3332 }
3333 #[doc(hidden)]
3334 pub fn default_instance() -> &'static Self {
3335 static DEFAULT: super::ConsensusCommitPrologue = super::ConsensusCommitPrologue::const_default();
3336 &DEFAULT
3337 }
3338 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
3340 self.epoch.as_mut().map(|field| field as _)
3341 }
3342 pub fn epoch_mut(&mut self) -> &mut u64 {
3345 self.epoch.get_or_insert_default()
3346 }
3347 pub fn epoch_opt(&self) -> Option<u64> {
3349 self.epoch.as_ref().map(|field| *field)
3350 }
3351 pub fn set_epoch<T: Into<u64>>(&mut self, field: T) {
3353 self.epoch = Some(field.into().into());
3354 }
3355 pub fn with_epoch<T: Into<u64>>(mut self, field: T) -> Self {
3357 self.set_epoch(field.into());
3358 self
3359 }
3360 pub fn round_opt_mut(&mut self) -> Option<&mut u64> {
3362 self.round.as_mut().map(|field| field as _)
3363 }
3364 pub fn round_mut(&mut self) -> &mut u64 {
3367 self.round.get_or_insert_default()
3368 }
3369 pub fn round_opt(&self) -> Option<u64> {
3371 self.round.as_ref().map(|field| *field)
3372 }
3373 pub fn set_round<T: Into<u64>>(&mut self, field: T) {
3375 self.round = Some(field.into().into());
3376 }
3377 pub fn with_round<T: Into<u64>>(mut self, field: T) -> Self {
3379 self.set_round(field.into());
3380 self
3381 }
3382 pub fn commit_timestamp_opt_mut(
3384 &mut self,
3385 ) -> Option<&mut ::prost_types::Timestamp> {
3386 self.commit_timestamp.as_mut().map(|field| field as _)
3387 }
3388 pub fn commit_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
3391 self.commit_timestamp.get_or_insert_default()
3392 }
3393 pub fn commit_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
3395 self.commit_timestamp.as_ref().map(|field| field as _)
3396 }
3397 pub fn set_commit_timestamp<T: Into<::prost_types::Timestamp>>(
3399 &mut self,
3400 field: T,
3401 ) {
3402 self.commit_timestamp = Some(field.into().into());
3403 }
3404 pub fn with_commit_timestamp<T: Into<::prost_types::Timestamp>>(
3406 mut self,
3407 field: T,
3408 ) -> Self {
3409 self.set_commit_timestamp(field.into());
3410 self
3411 }
3412 pub fn consensus_commit_digest_opt_mut(&mut self) -> Option<&mut String> {
3414 self.consensus_commit_digest.as_mut().map(|field| field as _)
3415 }
3416 pub fn consensus_commit_digest_mut(&mut self) -> &mut String {
3419 self.consensus_commit_digest.get_or_insert_default()
3420 }
3421 pub fn consensus_commit_digest_opt(&self) -> Option<&str> {
3423 self.consensus_commit_digest.as_ref().map(|field| field as _)
3424 }
3425 pub fn set_consensus_commit_digest<T: Into<String>>(&mut self, field: T) {
3427 self.consensus_commit_digest = Some(field.into().into());
3428 }
3429 pub fn with_consensus_commit_digest<T: Into<String>>(
3431 mut self,
3432 field: T,
3433 ) -> Self {
3434 self.set_consensus_commit_digest(field.into());
3435 self
3436 }
3437 pub fn sub_dag_index_opt_mut(&mut self) -> Option<&mut u64> {
3439 self.sub_dag_index.as_mut().map(|field| field as _)
3440 }
3441 pub fn sub_dag_index_mut(&mut self) -> &mut u64 {
3444 self.sub_dag_index.get_or_insert_default()
3445 }
3446 pub fn sub_dag_index_opt(&self) -> Option<u64> {
3448 self.sub_dag_index.as_ref().map(|field| *field)
3449 }
3450 pub fn set_sub_dag_index<T: Into<u64>>(&mut self, field: T) {
3452 self.sub_dag_index = Some(field.into().into());
3453 }
3454 pub fn with_sub_dag_index<T: Into<u64>>(mut self, field: T) -> Self {
3456 self.set_sub_dag_index(field.into());
3457 self
3458 }
3459 pub fn consensus_determined_version_assignments(
3461 &self,
3462 ) -> &super::ConsensusDeterminedVersionAssignments {
3463 self.consensus_determined_version_assignments
3464 .as_ref()
3465 .map(|field| field as _)
3466 .unwrap_or_else(|| {
3467 super::ConsensusDeterminedVersionAssignments::default_instance() as _
3468 })
3469 }
3470 pub fn consensus_determined_version_assignments_opt_mut(
3472 &mut self,
3473 ) -> Option<&mut super::ConsensusDeterminedVersionAssignments> {
3474 self.consensus_determined_version_assignments
3475 .as_mut()
3476 .map(|field| field as _)
3477 }
3478 pub fn consensus_determined_version_assignments_mut(
3481 &mut self,
3482 ) -> &mut super::ConsensusDeterminedVersionAssignments {
3483 self.consensus_determined_version_assignments.get_or_insert_default()
3484 }
3485 pub fn consensus_determined_version_assignments_opt(
3487 &self,
3488 ) -> Option<&super::ConsensusDeterminedVersionAssignments> {
3489 self.consensus_determined_version_assignments
3490 .as_ref()
3491 .map(|field| field as _)
3492 }
3493 pub fn set_consensus_determined_version_assignments<
3495 T: Into<super::ConsensusDeterminedVersionAssignments>,
3496 >(&mut self, field: T) {
3497 self.consensus_determined_version_assignments = Some(field.into().into());
3498 }
3499 pub fn with_consensus_determined_version_assignments<
3501 T: Into<super::ConsensusDeterminedVersionAssignments>,
3502 >(mut self, field: T) -> Self {
3503 self.set_consensus_determined_version_assignments(field.into());
3504 self
3505 }
3506 pub fn additional_state_digest_opt_mut(&mut self) -> Option<&mut String> {
3508 self.additional_state_digest.as_mut().map(|field| field as _)
3509 }
3510 pub fn additional_state_digest_mut(&mut self) -> &mut String {
3513 self.additional_state_digest.get_or_insert_default()
3514 }
3515 pub fn additional_state_digest_opt(&self) -> Option<&str> {
3517 self.additional_state_digest.as_ref().map(|field| field as _)
3518 }
3519 pub fn set_additional_state_digest<T: Into<String>>(&mut self, field: T) {
3521 self.additional_state_digest = Some(field.into().into());
3522 }
3523 pub fn with_additional_state_digest<T: Into<String>>(
3525 mut self,
3526 field: T,
3527 ) -> Self {
3528 self.set_additional_state_digest(field.into());
3529 self
3530 }
3531 }
3532 impl super::ConsensusDeterminedVersionAssignments {
3533 pub const fn const_default() -> Self {
3534 Self {
3535 version: None,
3536 canceled_transactions: Vec::new(),
3537 }
3538 }
3539 #[doc(hidden)]
3540 pub fn default_instance() -> &'static Self {
3541 static DEFAULT: super::ConsensusDeterminedVersionAssignments = super::ConsensusDeterminedVersionAssignments::const_default();
3542 &DEFAULT
3543 }
3544 pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
3546 self.version.as_mut().map(|field| field as _)
3547 }
3548 pub fn version_mut(&mut self) -> &mut i32 {
3551 self.version.get_or_insert_default()
3552 }
3553 pub fn version_opt(&self) -> Option<i32> {
3555 self.version.as_ref().map(|field| *field)
3556 }
3557 pub fn set_version<T: Into<i32>>(&mut self, field: T) {
3559 self.version = Some(field.into().into());
3560 }
3561 pub fn with_version<T: Into<i32>>(mut self, field: T) -> Self {
3563 self.set_version(field.into());
3564 self
3565 }
3566 pub fn canceled_transactions(&self) -> &[super::CanceledTransaction] {
3568 &self.canceled_transactions
3569 }
3570 pub fn canceled_transactions_mut(
3573 &mut self,
3574 ) -> &mut Vec<super::CanceledTransaction> {
3575 &mut self.canceled_transactions
3576 }
3577 pub fn set_canceled_transactions(
3579 &mut self,
3580 field: Vec<super::CanceledTransaction>,
3581 ) {
3582 self.canceled_transactions = field;
3583 }
3584 pub fn with_canceled_transactions(
3586 mut self,
3587 field: Vec<super::CanceledTransaction>,
3588 ) -> Self {
3589 self.set_canceled_transactions(field);
3590 self
3591 }
3592 }
3593 impl super::DatatypeDescriptor {
3594 pub const fn const_default() -> Self {
3595 Self {
3596 type_name: None,
3597 defining_id: None,
3598 module: None,
3599 name: None,
3600 abilities: Vec::new(),
3601 type_parameters: Vec::new(),
3602 kind: None,
3603 fields: Vec::new(),
3604 variants: Vec::new(),
3605 }
3606 }
3607 #[doc(hidden)]
3608 pub fn default_instance() -> &'static Self {
3609 static DEFAULT: super::DatatypeDescriptor = super::DatatypeDescriptor::const_default();
3610 &DEFAULT
3611 }
3612 pub fn type_name_opt_mut(&mut self) -> Option<&mut String> {
3614 self.type_name.as_mut().map(|field| field as _)
3615 }
3616 pub fn type_name_mut(&mut self) -> &mut String {
3619 self.type_name.get_or_insert_default()
3620 }
3621 pub fn type_name_opt(&self) -> Option<&str> {
3623 self.type_name.as_ref().map(|field| field as _)
3624 }
3625 pub fn set_type_name<T: Into<String>>(&mut self, field: T) {
3627 self.type_name = Some(field.into().into());
3628 }
3629 pub fn with_type_name<T: Into<String>>(mut self, field: T) -> Self {
3631 self.set_type_name(field.into());
3632 self
3633 }
3634 pub fn defining_id_opt_mut(&mut self) -> Option<&mut String> {
3636 self.defining_id.as_mut().map(|field| field as _)
3637 }
3638 pub fn defining_id_mut(&mut self) -> &mut String {
3641 self.defining_id.get_or_insert_default()
3642 }
3643 pub fn defining_id_opt(&self) -> Option<&str> {
3645 self.defining_id.as_ref().map(|field| field as _)
3646 }
3647 pub fn set_defining_id<T: Into<String>>(&mut self, field: T) {
3649 self.defining_id = Some(field.into().into());
3650 }
3651 pub fn with_defining_id<T: Into<String>>(mut self, field: T) -> Self {
3653 self.set_defining_id(field.into());
3654 self
3655 }
3656 pub fn module_opt_mut(&mut self) -> Option<&mut String> {
3658 self.module.as_mut().map(|field| field as _)
3659 }
3660 pub fn module_mut(&mut self) -> &mut String {
3663 self.module.get_or_insert_default()
3664 }
3665 pub fn module_opt(&self) -> Option<&str> {
3667 self.module.as_ref().map(|field| field as _)
3668 }
3669 pub fn set_module<T: Into<String>>(&mut self, field: T) {
3671 self.module = Some(field.into().into());
3672 }
3673 pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
3675 self.set_module(field.into());
3676 self
3677 }
3678 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
3680 self.name.as_mut().map(|field| field as _)
3681 }
3682 pub fn name_mut(&mut self) -> &mut String {
3685 self.name.get_or_insert_default()
3686 }
3687 pub fn name_opt(&self) -> Option<&str> {
3689 self.name.as_ref().map(|field| field as _)
3690 }
3691 pub fn set_name<T: Into<String>>(&mut self, field: T) {
3693 self.name = Some(field.into().into());
3694 }
3695 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
3697 self.set_name(field.into());
3698 self
3699 }
3700 pub fn type_parameters(&self) -> &[super::TypeParameter] {
3702 &self.type_parameters
3703 }
3704 pub fn type_parameters_mut(&mut self) -> &mut Vec<super::TypeParameter> {
3707 &mut self.type_parameters
3708 }
3709 pub fn set_type_parameters(&mut self, field: Vec<super::TypeParameter>) {
3711 self.type_parameters = field;
3712 }
3713 pub fn with_type_parameters(mut self, field: Vec<super::TypeParameter>) -> Self {
3715 self.set_type_parameters(field);
3716 self
3717 }
3718 pub fn with_kind<T: Into<super::datatype_descriptor::DatatypeKind>>(
3720 mut self,
3721 field: T,
3722 ) -> Self {
3723 self.set_kind(field.into());
3724 self
3725 }
3726 pub fn fields(&self) -> &[super::FieldDescriptor] {
3728 &self.fields
3729 }
3730 pub fn fields_mut(&mut self) -> &mut Vec<super::FieldDescriptor> {
3733 &mut self.fields
3734 }
3735 pub fn set_fields(&mut self, field: Vec<super::FieldDescriptor>) {
3737 self.fields = field;
3738 }
3739 pub fn with_fields(mut self, field: Vec<super::FieldDescriptor>) -> Self {
3741 self.set_fields(field);
3742 self
3743 }
3744 pub fn variants(&self) -> &[super::VariantDescriptor] {
3746 &self.variants
3747 }
3748 pub fn variants_mut(&mut self) -> &mut Vec<super::VariantDescriptor> {
3751 &mut self.variants
3752 }
3753 pub fn set_variants(&mut self, field: Vec<super::VariantDescriptor>) {
3755 self.variants = field;
3756 }
3757 pub fn with_variants(mut self, field: Vec<super::VariantDescriptor>) -> Self {
3759 self.set_variants(field);
3760 self
3761 }
3762 }
3763 impl super::DynamicField {
3764 pub const fn const_default() -> Self {
3765 Self {
3766 kind: None,
3767 parent: None,
3768 field_id: None,
3769 field_object: None,
3770 name: None,
3771 value: None,
3772 value_type: None,
3773 child_id: None,
3774 child_object: None,
3775 }
3776 }
3777 #[doc(hidden)]
3778 pub fn default_instance() -> &'static Self {
3779 static DEFAULT: super::DynamicField = super::DynamicField::const_default();
3780 &DEFAULT
3781 }
3782 pub fn with_kind<T: Into<super::dynamic_field::DynamicFieldKind>>(
3784 mut self,
3785 field: T,
3786 ) -> Self {
3787 self.set_kind(field.into());
3788 self
3789 }
3790 pub fn parent_opt_mut(&mut self) -> Option<&mut String> {
3792 self.parent.as_mut().map(|field| field as _)
3793 }
3794 pub fn parent_mut(&mut self) -> &mut String {
3797 self.parent.get_or_insert_default()
3798 }
3799 pub fn parent_opt(&self) -> Option<&str> {
3801 self.parent.as_ref().map(|field| field as _)
3802 }
3803 pub fn set_parent<T: Into<String>>(&mut self, field: T) {
3805 self.parent = Some(field.into().into());
3806 }
3807 pub fn with_parent<T: Into<String>>(mut self, field: T) -> Self {
3809 self.set_parent(field.into());
3810 self
3811 }
3812 pub fn field_id_opt_mut(&mut self) -> Option<&mut String> {
3814 self.field_id.as_mut().map(|field| field as _)
3815 }
3816 pub fn field_id_mut(&mut self) -> &mut String {
3819 self.field_id.get_or_insert_default()
3820 }
3821 pub fn field_id_opt(&self) -> Option<&str> {
3823 self.field_id.as_ref().map(|field| field as _)
3824 }
3825 pub fn set_field_id<T: Into<String>>(&mut self, field: T) {
3827 self.field_id = Some(field.into().into());
3828 }
3829 pub fn with_field_id<T: Into<String>>(mut self, field: T) -> Self {
3831 self.set_field_id(field.into());
3832 self
3833 }
3834 pub fn field_object(&self) -> &super::Object {
3836 self.field_object
3837 .as_ref()
3838 .map(|field| field as _)
3839 .unwrap_or_else(|| super::Object::default_instance() as _)
3840 }
3841 pub fn field_object_opt_mut(&mut self) -> Option<&mut super::Object> {
3843 self.field_object.as_mut().map(|field| field as _)
3844 }
3845 pub fn field_object_mut(&mut self) -> &mut super::Object {
3848 self.field_object.get_or_insert_default()
3849 }
3850 pub fn field_object_opt(&self) -> Option<&super::Object> {
3852 self.field_object.as_ref().map(|field| field as _)
3853 }
3854 pub fn set_field_object<T: Into<super::Object>>(&mut self, field: T) {
3856 self.field_object = Some(field.into().into());
3857 }
3858 pub fn with_field_object<T: Into<super::Object>>(mut self, field: T) -> Self {
3860 self.set_field_object(field.into());
3861 self
3862 }
3863 pub fn name(&self) -> &super::Bcs {
3865 self.name
3866 .as_ref()
3867 .map(|field| field as _)
3868 .unwrap_or_else(|| super::Bcs::default_instance() as _)
3869 }
3870 pub fn name_opt_mut(&mut self) -> Option<&mut super::Bcs> {
3872 self.name.as_mut().map(|field| field as _)
3873 }
3874 pub fn name_mut(&mut self) -> &mut super::Bcs {
3877 self.name.get_or_insert_default()
3878 }
3879 pub fn name_opt(&self) -> Option<&super::Bcs> {
3881 self.name.as_ref().map(|field| field as _)
3882 }
3883 pub fn set_name<T: Into<super::Bcs>>(&mut self, field: T) {
3885 self.name = Some(field.into().into());
3886 }
3887 pub fn with_name<T: Into<super::Bcs>>(mut self, field: T) -> Self {
3889 self.set_name(field.into());
3890 self
3891 }
3892 pub fn value(&self) -> &super::Bcs {
3894 self.value
3895 .as_ref()
3896 .map(|field| field as _)
3897 .unwrap_or_else(|| super::Bcs::default_instance() as _)
3898 }
3899 pub fn value_opt_mut(&mut self) -> Option<&mut super::Bcs> {
3901 self.value.as_mut().map(|field| field as _)
3902 }
3903 pub fn value_mut(&mut self) -> &mut super::Bcs {
3906 self.value.get_or_insert_default()
3907 }
3908 pub fn value_opt(&self) -> Option<&super::Bcs> {
3910 self.value.as_ref().map(|field| field as _)
3911 }
3912 pub fn set_value<T: Into<super::Bcs>>(&mut self, field: T) {
3914 self.value = Some(field.into().into());
3915 }
3916 pub fn with_value<T: Into<super::Bcs>>(mut self, field: T) -> Self {
3918 self.set_value(field.into());
3919 self
3920 }
3921 pub fn value_type_opt_mut(&mut self) -> Option<&mut String> {
3923 self.value_type.as_mut().map(|field| field as _)
3924 }
3925 pub fn value_type_mut(&mut self) -> &mut String {
3928 self.value_type.get_or_insert_default()
3929 }
3930 pub fn value_type_opt(&self) -> Option<&str> {
3932 self.value_type.as_ref().map(|field| field as _)
3933 }
3934 pub fn set_value_type<T: Into<String>>(&mut self, field: T) {
3936 self.value_type = Some(field.into().into());
3937 }
3938 pub fn with_value_type<T: Into<String>>(mut self, field: T) -> Self {
3940 self.set_value_type(field.into());
3941 self
3942 }
3943 pub fn child_id_opt_mut(&mut self) -> Option<&mut String> {
3945 self.child_id.as_mut().map(|field| field as _)
3946 }
3947 pub fn child_id_mut(&mut self) -> &mut String {
3950 self.child_id.get_or_insert_default()
3951 }
3952 pub fn child_id_opt(&self) -> Option<&str> {
3954 self.child_id.as_ref().map(|field| field as _)
3955 }
3956 pub fn set_child_id<T: Into<String>>(&mut self, field: T) {
3958 self.child_id = Some(field.into().into());
3959 }
3960 pub fn with_child_id<T: Into<String>>(mut self, field: T) -> Self {
3962 self.set_child_id(field.into());
3963 self
3964 }
3965 pub fn child_object(&self) -> &super::Object {
3967 self.child_object
3968 .as_ref()
3969 .map(|field| field as _)
3970 .unwrap_or_else(|| super::Object::default_instance() as _)
3971 }
3972 pub fn child_object_opt_mut(&mut self) -> Option<&mut super::Object> {
3974 self.child_object.as_mut().map(|field| field as _)
3975 }
3976 pub fn child_object_mut(&mut self) -> &mut super::Object {
3979 self.child_object.get_or_insert_default()
3980 }
3981 pub fn child_object_opt(&self) -> Option<&super::Object> {
3983 self.child_object.as_ref().map(|field| field as _)
3984 }
3985 pub fn set_child_object<T: Into<super::Object>>(&mut self, field: T) {
3987 self.child_object = Some(field.into().into());
3988 }
3989 pub fn with_child_object<T: Into<super::Object>>(mut self, field: T) -> Self {
3991 self.set_child_object(field.into());
3992 self
3993 }
3994 }
3995 impl super::EndOfEpochData {
3996 pub const fn const_default() -> Self {
3997 Self {
3998 next_epoch_committee: Vec::new(),
3999 next_epoch_protocol_version: None,
4000 epoch_commitments: Vec::new(),
4001 }
4002 }
4003 #[doc(hidden)]
4004 pub fn default_instance() -> &'static Self {
4005 static DEFAULT: super::EndOfEpochData = super::EndOfEpochData::const_default();
4006 &DEFAULT
4007 }
4008 pub fn next_epoch_committee(&self) -> &[super::ValidatorCommitteeMember] {
4010 &self.next_epoch_committee
4011 }
4012 pub fn next_epoch_committee_mut(
4015 &mut self,
4016 ) -> &mut Vec<super::ValidatorCommitteeMember> {
4017 &mut self.next_epoch_committee
4018 }
4019 pub fn set_next_epoch_committee(
4021 &mut self,
4022 field: Vec<super::ValidatorCommitteeMember>,
4023 ) {
4024 self.next_epoch_committee = field;
4025 }
4026 pub fn with_next_epoch_committee(
4028 mut self,
4029 field: Vec<super::ValidatorCommitteeMember>,
4030 ) -> Self {
4031 self.set_next_epoch_committee(field);
4032 self
4033 }
4034 pub fn next_epoch_protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
4036 self.next_epoch_protocol_version.as_mut().map(|field| field as _)
4037 }
4038 pub fn next_epoch_protocol_version_mut(&mut self) -> &mut u64 {
4041 self.next_epoch_protocol_version.get_or_insert_default()
4042 }
4043 pub fn next_epoch_protocol_version_opt(&self) -> Option<u64> {
4045 self.next_epoch_protocol_version.as_ref().map(|field| *field)
4046 }
4047 pub fn set_next_epoch_protocol_version<T: Into<u64>>(&mut self, field: T) {
4049 self.next_epoch_protocol_version = Some(field.into().into());
4050 }
4051 pub fn with_next_epoch_protocol_version<T: Into<u64>>(
4053 mut self,
4054 field: T,
4055 ) -> Self {
4056 self.set_next_epoch_protocol_version(field.into());
4057 self
4058 }
4059 pub fn epoch_commitments(&self) -> &[super::CheckpointCommitment] {
4061 &self.epoch_commitments
4062 }
4063 pub fn epoch_commitments_mut(
4066 &mut self,
4067 ) -> &mut Vec<super::CheckpointCommitment> {
4068 &mut self.epoch_commitments
4069 }
4070 pub fn set_epoch_commitments(
4072 &mut self,
4073 field: Vec<super::CheckpointCommitment>,
4074 ) {
4075 self.epoch_commitments = field;
4076 }
4077 pub fn with_epoch_commitments(
4079 mut self,
4080 field: Vec<super::CheckpointCommitment>,
4081 ) -> Self {
4082 self.set_epoch_commitments(field);
4083 self
4084 }
4085 }
4086 impl super::EndOfEpochTransaction {
4087 pub const fn const_default() -> Self {
4088 Self { transactions: Vec::new() }
4089 }
4090 #[doc(hidden)]
4091 pub fn default_instance() -> &'static Self {
4092 static DEFAULT: super::EndOfEpochTransaction = super::EndOfEpochTransaction::const_default();
4093 &DEFAULT
4094 }
4095 pub fn transactions(&self) -> &[super::EndOfEpochTransactionKind] {
4097 &self.transactions
4098 }
4099 pub fn transactions_mut(
4102 &mut self,
4103 ) -> &mut Vec<super::EndOfEpochTransactionKind> {
4104 &mut self.transactions
4105 }
4106 pub fn set_transactions(
4108 &mut self,
4109 field: Vec<super::EndOfEpochTransactionKind>,
4110 ) {
4111 self.transactions = field;
4112 }
4113 pub fn with_transactions(
4115 mut self,
4116 field: Vec<super::EndOfEpochTransactionKind>,
4117 ) -> Self {
4118 self.set_transactions(field);
4119 self
4120 }
4121 }
4122 impl super::EndOfEpochTransactionKind {
4123 pub const fn const_default() -> Self {
4124 Self { kind: None, data: None }
4125 }
4126 #[doc(hidden)]
4127 pub fn default_instance() -> &'static Self {
4128 static DEFAULT: super::EndOfEpochTransactionKind = super::EndOfEpochTransactionKind::const_default();
4129 &DEFAULT
4130 }
4131 pub fn with_kind<T: Into<super::end_of_epoch_transaction_kind::Kind>>(
4133 mut self,
4134 field: T,
4135 ) -> Self {
4136 self.set_kind(field.into());
4137 self
4138 }
4139 pub fn change_epoch(&self) -> &super::ChangeEpoch {
4141 if let Some(
4142 super::end_of_epoch_transaction_kind::Data::ChangeEpoch(field),
4143 ) = &self.data
4144 {
4145 field as _
4146 } else {
4147 super::ChangeEpoch::default_instance() as _
4148 }
4149 }
4150 pub fn change_epoch_opt(&self) -> Option<&super::ChangeEpoch> {
4152 if let Some(
4153 super::end_of_epoch_transaction_kind::Data::ChangeEpoch(field),
4154 ) = &self.data
4155 {
4156 Some(field as _)
4157 } else {
4158 None
4159 }
4160 }
4161 pub fn change_epoch_opt_mut(&mut self) -> Option<&mut super::ChangeEpoch> {
4163 if let Some(
4164 super::end_of_epoch_transaction_kind::Data::ChangeEpoch(field),
4165 ) = &mut self.data
4166 {
4167 Some(field as _)
4168 } else {
4169 None
4170 }
4171 }
4172 pub fn change_epoch_mut(&mut self) -> &mut super::ChangeEpoch {
4176 if self.change_epoch_opt_mut().is_none() {
4177 self.data = Some(
4178 super::end_of_epoch_transaction_kind::Data::ChangeEpoch(
4179 super::ChangeEpoch::default(),
4180 ),
4181 );
4182 }
4183 self.change_epoch_opt_mut().unwrap()
4184 }
4185 pub fn set_change_epoch<T: Into<super::ChangeEpoch>>(&mut self, field: T) {
4188 self.data = Some(
4189 super::end_of_epoch_transaction_kind::Data::ChangeEpoch(
4190 field.into().into(),
4191 ),
4192 );
4193 }
4194 pub fn with_change_epoch<T: Into<super::ChangeEpoch>>(
4197 mut self,
4198 field: T,
4199 ) -> Self {
4200 self.set_change_epoch(field.into());
4201 self
4202 }
4203 pub fn authenticator_state_expire(&self) -> &super::AuthenticatorStateExpire {
4205 if let Some(
4206 super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4207 field,
4208 ),
4209 ) = &self.data
4210 {
4211 field as _
4212 } else {
4213 super::AuthenticatorStateExpire::default_instance() as _
4214 }
4215 }
4216 pub fn authenticator_state_expire_opt(
4218 &self,
4219 ) -> Option<&super::AuthenticatorStateExpire> {
4220 if let Some(
4221 super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4222 field,
4223 ),
4224 ) = &self.data
4225 {
4226 Some(field as _)
4227 } else {
4228 None
4229 }
4230 }
4231 pub fn authenticator_state_expire_opt_mut(
4233 &mut self,
4234 ) -> Option<&mut super::AuthenticatorStateExpire> {
4235 if let Some(
4236 super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4237 field,
4238 ),
4239 ) = &mut self.data
4240 {
4241 Some(field as _)
4242 } else {
4243 None
4244 }
4245 }
4246 pub fn authenticator_state_expire_mut(
4250 &mut self,
4251 ) -> &mut super::AuthenticatorStateExpire {
4252 if self.authenticator_state_expire_opt_mut().is_none() {
4253 self.data = Some(
4254 super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4255 super::AuthenticatorStateExpire::default(),
4256 ),
4257 );
4258 }
4259 self.authenticator_state_expire_opt_mut().unwrap()
4260 }
4261 pub fn set_authenticator_state_expire<T: Into<super::AuthenticatorStateExpire>>(
4264 &mut self,
4265 field: T,
4266 ) {
4267 self.data = Some(
4268 super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4269 field.into().into(),
4270 ),
4271 );
4272 }
4273 pub fn with_authenticator_state_expire<T: Into<super::AuthenticatorStateExpire>>(
4276 mut self,
4277 field: T,
4278 ) -> Self {
4279 self.set_authenticator_state_expire(field.into());
4280 self
4281 }
4282 pub fn execution_time_observations(&self) -> &super::ExecutionTimeObservations {
4284 if let Some(
4285 super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4286 field,
4287 ),
4288 ) = &self.data
4289 {
4290 field as _
4291 } else {
4292 super::ExecutionTimeObservations::default_instance() as _
4293 }
4294 }
4295 pub fn execution_time_observations_opt(
4297 &self,
4298 ) -> Option<&super::ExecutionTimeObservations> {
4299 if let Some(
4300 super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4301 field,
4302 ),
4303 ) = &self.data
4304 {
4305 Some(field as _)
4306 } else {
4307 None
4308 }
4309 }
4310 pub fn execution_time_observations_opt_mut(
4312 &mut self,
4313 ) -> Option<&mut super::ExecutionTimeObservations> {
4314 if let Some(
4315 super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4316 field,
4317 ),
4318 ) = &mut self.data
4319 {
4320 Some(field as _)
4321 } else {
4322 None
4323 }
4324 }
4325 pub fn execution_time_observations_mut(
4329 &mut self,
4330 ) -> &mut super::ExecutionTimeObservations {
4331 if self.execution_time_observations_opt_mut().is_none() {
4332 self.data = Some(
4333 super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4334 super::ExecutionTimeObservations::default(),
4335 ),
4336 );
4337 }
4338 self.execution_time_observations_opt_mut().unwrap()
4339 }
4340 pub fn set_execution_time_observations<
4343 T: Into<super::ExecutionTimeObservations>,
4344 >(&mut self, field: T) {
4345 self.data = Some(
4346 super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4347 field.into().into(),
4348 ),
4349 );
4350 }
4351 pub fn with_execution_time_observations<
4354 T: Into<super::ExecutionTimeObservations>,
4355 >(mut self, field: T) -> Self {
4356 self.set_execution_time_observations(field.into());
4357 self
4358 }
4359 pub fn bridge_chain_id(&self) -> &str {
4361 if let Some(
4362 super::end_of_epoch_transaction_kind::Data::BridgeChainId(field),
4363 ) = &self.data
4364 {
4365 field as _
4366 } else {
4367 ""
4368 }
4369 }
4370 pub fn bridge_chain_id_opt(&self) -> Option<&str> {
4372 if let Some(
4373 super::end_of_epoch_transaction_kind::Data::BridgeChainId(field),
4374 ) = &self.data
4375 {
4376 Some(field as _)
4377 } else {
4378 None
4379 }
4380 }
4381 pub fn bridge_chain_id_opt_mut(&mut self) -> Option<&mut String> {
4383 if let Some(
4384 super::end_of_epoch_transaction_kind::Data::BridgeChainId(field),
4385 ) = &mut self.data
4386 {
4387 Some(field as _)
4388 } else {
4389 None
4390 }
4391 }
4392 pub fn bridge_chain_id_mut(&mut self) -> &mut String {
4396 if self.bridge_chain_id_opt_mut().is_none() {
4397 self.data = Some(
4398 super::end_of_epoch_transaction_kind::Data::BridgeChainId(
4399 String::default(),
4400 ),
4401 );
4402 }
4403 self.bridge_chain_id_opt_mut().unwrap()
4404 }
4405 pub fn set_bridge_chain_id<T: Into<String>>(&mut self, field: T) {
4408 self.data = Some(
4409 super::end_of_epoch_transaction_kind::Data::BridgeChainId(
4410 field.into().into(),
4411 ),
4412 );
4413 }
4414 pub fn with_bridge_chain_id<T: Into<String>>(mut self, field: T) -> Self {
4417 self.set_bridge_chain_id(field.into());
4418 self
4419 }
4420 pub fn bridge_object_version(&self) -> u64 {
4422 if let Some(
4423 super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4424 ) = &self.data
4425 {
4426 *field
4427 } else {
4428 0u64
4429 }
4430 }
4431 pub fn bridge_object_version_opt(&self) -> Option<u64> {
4433 if let Some(
4434 super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4435 ) = &self.data
4436 {
4437 Some(*field)
4438 } else {
4439 None
4440 }
4441 }
4442 pub fn bridge_object_version_opt_mut(&mut self) -> Option<&mut u64> {
4444 if let Some(
4445 super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4446 ) = &mut self.data
4447 {
4448 Some(field as _)
4449 } else {
4450 None
4451 }
4452 }
4453 pub fn bridge_object_version_mut(&mut self) -> &mut u64 {
4457 if self.bridge_object_version_opt_mut().is_none() {
4458 self.data = Some(
4459 super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(
4460 u64::default(),
4461 ),
4462 );
4463 }
4464 self.bridge_object_version_opt_mut().unwrap()
4465 }
4466 pub fn set_bridge_object_version<T: Into<u64>>(&mut self, field: T) {
4469 self.data = Some(
4470 super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(
4471 field.into().into(),
4472 ),
4473 );
4474 }
4475 pub fn with_bridge_object_version<T: Into<u64>>(mut self, field: T) -> Self {
4478 self.set_bridge_object_version(field.into());
4479 self
4480 }
4481 }
4482 impl super::Epoch {
4483 pub const fn const_default() -> Self {
4484 Self {
4485 epoch: None,
4486 committee: None,
4487 system_state: None,
4488 first_checkpoint: None,
4489 last_checkpoint: None,
4490 start: None,
4491 end: None,
4492 reference_gas_price: None,
4493 protocol_config: None,
4494 }
4495 }
4496 #[doc(hidden)]
4497 pub fn default_instance() -> &'static Self {
4498 static DEFAULT: super::Epoch = super::Epoch::const_default();
4499 &DEFAULT
4500 }
4501 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
4503 self.epoch.as_mut().map(|field| field as _)
4504 }
4505 pub fn epoch_mut(&mut self) -> &mut u64 {
4508 self.epoch.get_or_insert_default()
4509 }
4510 pub fn epoch_opt(&self) -> Option<u64> {
4512 self.epoch.as_ref().map(|field| *field)
4513 }
4514 pub fn set_epoch<T: Into<u64>>(&mut self, field: T) {
4516 self.epoch = Some(field.into().into());
4517 }
4518 pub fn with_epoch<T: Into<u64>>(mut self, field: T) -> Self {
4520 self.set_epoch(field.into());
4521 self
4522 }
4523 pub fn committee(&self) -> &super::ValidatorCommittee {
4525 self.committee
4526 .as_ref()
4527 .map(|field| field as _)
4528 .unwrap_or_else(|| super::ValidatorCommittee::default_instance() as _)
4529 }
4530 pub fn committee_opt_mut(&mut self) -> Option<&mut super::ValidatorCommittee> {
4532 self.committee.as_mut().map(|field| field as _)
4533 }
4534 pub fn committee_mut(&mut self) -> &mut super::ValidatorCommittee {
4537 self.committee.get_or_insert_default()
4538 }
4539 pub fn committee_opt(&self) -> Option<&super::ValidatorCommittee> {
4541 self.committee.as_ref().map(|field| field as _)
4542 }
4543 pub fn set_committee<T: Into<super::ValidatorCommittee>>(&mut self, field: T) {
4545 self.committee = Some(field.into().into());
4546 }
4547 pub fn with_committee<T: Into<super::ValidatorCommittee>>(
4549 mut self,
4550 field: T,
4551 ) -> Self {
4552 self.set_committee(field.into());
4553 self
4554 }
4555 pub fn system_state(&self) -> &super::SystemState {
4557 self.system_state
4558 .as_ref()
4559 .map(|field| field as _)
4560 .unwrap_or_else(|| super::SystemState::default_instance() as _)
4561 }
4562 pub fn system_state_opt_mut(&mut self) -> Option<&mut super::SystemState> {
4564 self.system_state.as_mut().map(|field| field as _)
4565 }
4566 pub fn system_state_mut(&mut self) -> &mut super::SystemState {
4569 self.system_state.get_or_insert_default()
4570 }
4571 pub fn system_state_opt(&self) -> Option<&super::SystemState> {
4573 self.system_state.as_ref().map(|field| field as _)
4574 }
4575 pub fn set_system_state<T: Into<super::SystemState>>(&mut self, field: T) {
4577 self.system_state = Some(field.into().into());
4578 }
4579 pub fn with_system_state<T: Into<super::SystemState>>(
4581 mut self,
4582 field: T,
4583 ) -> Self {
4584 self.set_system_state(field.into());
4585 self
4586 }
4587 pub fn first_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
4589 self.first_checkpoint.as_mut().map(|field| field as _)
4590 }
4591 pub fn first_checkpoint_mut(&mut self) -> &mut u64 {
4594 self.first_checkpoint.get_or_insert_default()
4595 }
4596 pub fn first_checkpoint_opt(&self) -> Option<u64> {
4598 self.first_checkpoint.as_ref().map(|field| *field)
4599 }
4600 pub fn set_first_checkpoint<T: Into<u64>>(&mut self, field: T) {
4602 self.first_checkpoint = Some(field.into().into());
4603 }
4604 pub fn with_first_checkpoint<T: Into<u64>>(mut self, field: T) -> Self {
4606 self.set_first_checkpoint(field.into());
4607 self
4608 }
4609 pub fn last_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
4611 self.last_checkpoint.as_mut().map(|field| field as _)
4612 }
4613 pub fn last_checkpoint_mut(&mut self) -> &mut u64 {
4616 self.last_checkpoint.get_or_insert_default()
4617 }
4618 pub fn last_checkpoint_opt(&self) -> Option<u64> {
4620 self.last_checkpoint.as_ref().map(|field| *field)
4621 }
4622 pub fn set_last_checkpoint<T: Into<u64>>(&mut self, field: T) {
4624 self.last_checkpoint = Some(field.into().into());
4625 }
4626 pub fn with_last_checkpoint<T: Into<u64>>(mut self, field: T) -> Self {
4628 self.set_last_checkpoint(field.into());
4629 self
4630 }
4631 pub fn start_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
4633 self.start.as_mut().map(|field| field as _)
4634 }
4635 pub fn start_mut(&mut self) -> &mut ::prost_types::Timestamp {
4638 self.start.get_or_insert_default()
4639 }
4640 pub fn start_opt(&self) -> Option<&::prost_types::Timestamp> {
4642 self.start.as_ref().map(|field| field as _)
4643 }
4644 pub fn set_start<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
4646 self.start = Some(field.into().into());
4647 }
4648 pub fn with_start<T: Into<::prost_types::Timestamp>>(
4650 mut self,
4651 field: T,
4652 ) -> Self {
4653 self.set_start(field.into());
4654 self
4655 }
4656 pub fn end_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
4658 self.end.as_mut().map(|field| field as _)
4659 }
4660 pub fn end_mut(&mut self) -> &mut ::prost_types::Timestamp {
4663 self.end.get_or_insert_default()
4664 }
4665 pub fn end_opt(&self) -> Option<&::prost_types::Timestamp> {
4667 self.end.as_ref().map(|field| field as _)
4668 }
4669 pub fn set_end<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
4671 self.end = Some(field.into().into());
4672 }
4673 pub fn with_end<T: Into<::prost_types::Timestamp>>(mut self, field: T) -> Self {
4675 self.set_end(field.into());
4676 self
4677 }
4678 pub fn reference_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
4680 self.reference_gas_price.as_mut().map(|field| field as _)
4681 }
4682 pub fn reference_gas_price_mut(&mut self) -> &mut u64 {
4685 self.reference_gas_price.get_or_insert_default()
4686 }
4687 pub fn reference_gas_price_opt(&self) -> Option<u64> {
4689 self.reference_gas_price.as_ref().map(|field| *field)
4690 }
4691 pub fn set_reference_gas_price<T: Into<u64>>(&mut self, field: T) {
4693 self.reference_gas_price = Some(field.into().into());
4694 }
4695 pub fn with_reference_gas_price<T: Into<u64>>(mut self, field: T) -> Self {
4697 self.set_reference_gas_price(field.into());
4698 self
4699 }
4700 pub fn protocol_config(&self) -> &super::ProtocolConfig {
4702 self.protocol_config
4703 .as_ref()
4704 .map(|field| field as _)
4705 .unwrap_or_else(|| super::ProtocolConfig::default_instance() as _)
4706 }
4707 pub fn protocol_config_opt_mut(&mut self) -> Option<&mut super::ProtocolConfig> {
4709 self.protocol_config.as_mut().map(|field| field as _)
4710 }
4711 pub fn protocol_config_mut(&mut self) -> &mut super::ProtocolConfig {
4714 self.protocol_config.get_or_insert_default()
4715 }
4716 pub fn protocol_config_opt(&self) -> Option<&super::ProtocolConfig> {
4718 self.protocol_config.as_ref().map(|field| field as _)
4719 }
4720 pub fn set_protocol_config<T: Into<super::ProtocolConfig>>(&mut self, field: T) {
4722 self.protocol_config = Some(field.into().into());
4723 }
4724 pub fn with_protocol_config<T: Into<super::ProtocolConfig>>(
4726 mut self,
4727 field: T,
4728 ) -> Self {
4729 self.set_protocol_config(field.into());
4730 self
4731 }
4732 }
4733 impl super::Event {
4734 pub const fn const_default() -> Self {
4735 Self {
4736 package_id: None,
4737 module: None,
4738 sender: None,
4739 event_type: None,
4740 contents: None,
4741 json: None,
4742 }
4743 }
4744 #[doc(hidden)]
4745 pub fn default_instance() -> &'static Self {
4746 static DEFAULT: super::Event = super::Event::const_default();
4747 &DEFAULT
4748 }
4749 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
4751 self.package_id.as_mut().map(|field| field as _)
4752 }
4753 pub fn package_id_mut(&mut self) -> &mut String {
4756 self.package_id.get_or_insert_default()
4757 }
4758 pub fn package_id_opt(&self) -> Option<&str> {
4760 self.package_id.as_ref().map(|field| field as _)
4761 }
4762 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
4764 self.package_id = Some(field.into().into());
4765 }
4766 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
4768 self.set_package_id(field.into());
4769 self
4770 }
4771 pub fn module_opt_mut(&mut self) -> Option<&mut String> {
4773 self.module.as_mut().map(|field| field as _)
4774 }
4775 pub fn module_mut(&mut self) -> &mut String {
4778 self.module.get_or_insert_default()
4779 }
4780 pub fn module_opt(&self) -> Option<&str> {
4782 self.module.as_ref().map(|field| field as _)
4783 }
4784 pub fn set_module<T: Into<String>>(&mut self, field: T) {
4786 self.module = Some(field.into().into());
4787 }
4788 pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
4790 self.set_module(field.into());
4791 self
4792 }
4793 pub fn sender_opt_mut(&mut self) -> Option<&mut String> {
4795 self.sender.as_mut().map(|field| field as _)
4796 }
4797 pub fn sender_mut(&mut self) -> &mut String {
4800 self.sender.get_or_insert_default()
4801 }
4802 pub fn sender_opt(&self) -> Option<&str> {
4804 self.sender.as_ref().map(|field| field as _)
4805 }
4806 pub fn set_sender<T: Into<String>>(&mut self, field: T) {
4808 self.sender = Some(field.into().into());
4809 }
4810 pub fn with_sender<T: Into<String>>(mut self, field: T) -> Self {
4812 self.set_sender(field.into());
4813 self
4814 }
4815 pub fn event_type_opt_mut(&mut self) -> Option<&mut String> {
4817 self.event_type.as_mut().map(|field| field as _)
4818 }
4819 pub fn event_type_mut(&mut self) -> &mut String {
4822 self.event_type.get_or_insert_default()
4823 }
4824 pub fn event_type_opt(&self) -> Option<&str> {
4826 self.event_type.as_ref().map(|field| field as _)
4827 }
4828 pub fn set_event_type<T: Into<String>>(&mut self, field: T) {
4830 self.event_type = Some(field.into().into());
4831 }
4832 pub fn with_event_type<T: Into<String>>(mut self, field: T) -> Self {
4834 self.set_event_type(field.into());
4835 self
4836 }
4837 pub fn contents(&self) -> &super::Bcs {
4839 self.contents
4840 .as_ref()
4841 .map(|field| field as _)
4842 .unwrap_or_else(|| super::Bcs::default_instance() as _)
4843 }
4844 pub fn contents_opt_mut(&mut self) -> Option<&mut super::Bcs> {
4846 self.contents.as_mut().map(|field| field as _)
4847 }
4848 pub fn contents_mut(&mut self) -> &mut super::Bcs {
4851 self.contents.get_or_insert_default()
4852 }
4853 pub fn contents_opt(&self) -> Option<&super::Bcs> {
4855 self.contents.as_ref().map(|field| field as _)
4856 }
4857 pub fn set_contents<T: Into<super::Bcs>>(&mut self, field: T) {
4859 self.contents = Some(field.into().into());
4860 }
4861 pub fn with_contents<T: Into<super::Bcs>>(mut self, field: T) -> Self {
4863 self.set_contents(field.into());
4864 self
4865 }
4866 pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
4868 self.json.as_mut().map(|field| field as _)
4869 }
4870 pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
4873 self.json.get_or_insert_default()
4874 }
4875 pub fn json_opt(&self) -> Option<&::prost_types::Value> {
4877 self.json.as_ref().map(|field| field as _)
4878 }
4879 pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
4881 self.json = Some(field.into().into());
4882 }
4883 pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
4885 self.set_json(field.into());
4886 self
4887 }
4888 }
4889 impl super::ExecuteTransactionRequest {
4890 pub const fn const_default() -> Self {
4891 Self {
4892 transaction: None,
4893 signatures: Vec::new(),
4894 read_mask: None,
4895 }
4896 }
4897 #[doc(hidden)]
4898 pub fn default_instance() -> &'static Self {
4899 static DEFAULT: super::ExecuteTransactionRequest = super::ExecuteTransactionRequest::const_default();
4900 &DEFAULT
4901 }
4902 pub fn transaction(&self) -> &super::Transaction {
4904 self.transaction
4905 .as_ref()
4906 .map(|field| field as _)
4907 .unwrap_or_else(|| super::Transaction::default_instance() as _)
4908 }
4909 pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
4911 self.transaction.as_mut().map(|field| field as _)
4912 }
4913 pub fn transaction_mut(&mut self) -> &mut super::Transaction {
4916 self.transaction.get_or_insert_default()
4917 }
4918 pub fn transaction_opt(&self) -> Option<&super::Transaction> {
4920 self.transaction.as_ref().map(|field| field as _)
4921 }
4922 pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
4924 self.transaction = Some(field.into().into());
4925 }
4926 pub fn with_transaction<T: Into<super::Transaction>>(
4928 mut self,
4929 field: T,
4930 ) -> Self {
4931 self.set_transaction(field.into());
4932 self
4933 }
4934 pub fn signatures(&self) -> &[super::UserSignature] {
4936 &self.signatures
4937 }
4938 pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
4941 &mut self.signatures
4942 }
4943 pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
4945 self.signatures = field;
4946 }
4947 pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
4949 self.set_signatures(field);
4950 self
4951 }
4952 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
4954 self.read_mask.as_mut().map(|field| field as _)
4955 }
4956 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
4959 self.read_mask.get_or_insert_default()
4960 }
4961 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
4963 self.read_mask.as_ref().map(|field| field as _)
4964 }
4965 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
4967 self.read_mask = Some(field.into().into());
4968 }
4969 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
4971 mut self,
4972 field: T,
4973 ) -> Self {
4974 self.set_read_mask(field.into());
4975 self
4976 }
4977 }
4978 impl super::ExecuteTransactionResponse {
4979 pub const fn const_default() -> Self {
4980 Self { transaction: None }
4981 }
4982 #[doc(hidden)]
4983 pub fn default_instance() -> &'static Self {
4984 static DEFAULT: super::ExecuteTransactionResponse = super::ExecuteTransactionResponse::const_default();
4985 &DEFAULT
4986 }
4987 pub fn transaction(&self) -> &super::ExecutedTransaction {
4989 self.transaction
4990 .as_ref()
4991 .map(|field| field as _)
4992 .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
4993 }
4994 pub fn transaction_opt_mut(
4996 &mut self,
4997 ) -> Option<&mut super::ExecutedTransaction> {
4998 self.transaction.as_mut().map(|field| field as _)
4999 }
5000 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
5003 self.transaction.get_or_insert_default()
5004 }
5005 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
5007 self.transaction.as_ref().map(|field| field as _)
5008 }
5009 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
5011 &mut self,
5012 field: T,
5013 ) {
5014 self.transaction = Some(field.into().into());
5015 }
5016 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
5018 mut self,
5019 field: T,
5020 ) -> Self {
5021 self.set_transaction(field.into());
5022 self
5023 }
5024 }
5025 impl super::ExecutedTransaction {
5026 pub const fn const_default() -> Self {
5027 Self {
5028 digest: None,
5029 transaction: None,
5030 signatures: Vec::new(),
5031 effects: None,
5032 events: None,
5033 checkpoint: None,
5034 timestamp: None,
5035 balance_changes: Vec::new(),
5036 objects: None,
5037 }
5038 }
5039 #[doc(hidden)]
5040 pub fn default_instance() -> &'static Self {
5041 static DEFAULT: super::ExecutedTransaction = super::ExecutedTransaction::const_default();
5042 &DEFAULT
5043 }
5044 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
5046 self.digest.as_mut().map(|field| field as _)
5047 }
5048 pub fn digest_mut(&mut self) -> &mut String {
5051 self.digest.get_or_insert_default()
5052 }
5053 pub fn digest_opt(&self) -> Option<&str> {
5055 self.digest.as_ref().map(|field| field as _)
5056 }
5057 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
5059 self.digest = Some(field.into().into());
5060 }
5061 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
5063 self.set_digest(field.into());
5064 self
5065 }
5066 pub fn transaction(&self) -> &super::Transaction {
5068 self.transaction
5069 .as_ref()
5070 .map(|field| field as _)
5071 .unwrap_or_else(|| super::Transaction::default_instance() as _)
5072 }
5073 pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
5075 self.transaction.as_mut().map(|field| field as _)
5076 }
5077 pub fn transaction_mut(&mut self) -> &mut super::Transaction {
5080 self.transaction.get_or_insert_default()
5081 }
5082 pub fn transaction_opt(&self) -> Option<&super::Transaction> {
5084 self.transaction.as_ref().map(|field| field as _)
5085 }
5086 pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
5088 self.transaction = Some(field.into().into());
5089 }
5090 pub fn with_transaction<T: Into<super::Transaction>>(
5092 mut self,
5093 field: T,
5094 ) -> Self {
5095 self.set_transaction(field.into());
5096 self
5097 }
5098 pub fn signatures(&self) -> &[super::UserSignature] {
5100 &self.signatures
5101 }
5102 pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
5105 &mut self.signatures
5106 }
5107 pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
5109 self.signatures = field;
5110 }
5111 pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
5113 self.set_signatures(field);
5114 self
5115 }
5116 pub fn effects(&self) -> &super::TransactionEffects {
5118 self.effects
5119 .as_ref()
5120 .map(|field| field as _)
5121 .unwrap_or_else(|| super::TransactionEffects::default_instance() as _)
5122 }
5123 pub fn effects_opt_mut(&mut self) -> Option<&mut super::TransactionEffects> {
5125 self.effects.as_mut().map(|field| field as _)
5126 }
5127 pub fn effects_mut(&mut self) -> &mut super::TransactionEffects {
5130 self.effects.get_or_insert_default()
5131 }
5132 pub fn effects_opt(&self) -> Option<&super::TransactionEffects> {
5134 self.effects.as_ref().map(|field| field as _)
5135 }
5136 pub fn set_effects<T: Into<super::TransactionEffects>>(&mut self, field: T) {
5138 self.effects = Some(field.into().into());
5139 }
5140 pub fn with_effects<T: Into<super::TransactionEffects>>(
5142 mut self,
5143 field: T,
5144 ) -> Self {
5145 self.set_effects(field.into());
5146 self
5147 }
5148 pub fn events(&self) -> &super::TransactionEvents {
5150 self.events
5151 .as_ref()
5152 .map(|field| field as _)
5153 .unwrap_or_else(|| super::TransactionEvents::default_instance() as _)
5154 }
5155 pub fn events_opt_mut(&mut self) -> Option<&mut super::TransactionEvents> {
5157 self.events.as_mut().map(|field| field as _)
5158 }
5159 pub fn events_mut(&mut self) -> &mut super::TransactionEvents {
5162 self.events.get_or_insert_default()
5163 }
5164 pub fn events_opt(&self) -> Option<&super::TransactionEvents> {
5166 self.events.as_ref().map(|field| field as _)
5167 }
5168 pub fn set_events<T: Into<super::TransactionEvents>>(&mut self, field: T) {
5170 self.events = Some(field.into().into());
5171 }
5172 pub fn with_events<T: Into<super::TransactionEvents>>(
5174 mut self,
5175 field: T,
5176 ) -> Self {
5177 self.set_events(field.into());
5178 self
5179 }
5180 pub fn checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
5182 self.checkpoint.as_mut().map(|field| field as _)
5183 }
5184 pub fn checkpoint_mut(&mut self) -> &mut u64 {
5187 self.checkpoint.get_or_insert_default()
5188 }
5189 pub fn checkpoint_opt(&self) -> Option<u64> {
5191 self.checkpoint.as_ref().map(|field| *field)
5192 }
5193 pub fn set_checkpoint<T: Into<u64>>(&mut self, field: T) {
5195 self.checkpoint = Some(field.into().into());
5196 }
5197 pub fn with_checkpoint<T: Into<u64>>(mut self, field: T) -> Self {
5199 self.set_checkpoint(field.into());
5200 self
5201 }
5202 pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
5204 self.timestamp.as_mut().map(|field| field as _)
5205 }
5206 pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
5209 self.timestamp.get_or_insert_default()
5210 }
5211 pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
5213 self.timestamp.as_ref().map(|field| field as _)
5214 }
5215 pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
5217 self.timestamp = Some(field.into().into());
5218 }
5219 pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
5221 mut self,
5222 field: T,
5223 ) -> Self {
5224 self.set_timestamp(field.into());
5225 self
5226 }
5227 pub fn balance_changes(&self) -> &[super::BalanceChange] {
5229 &self.balance_changes
5230 }
5231 pub fn balance_changes_mut(&mut self) -> &mut Vec<super::BalanceChange> {
5234 &mut self.balance_changes
5235 }
5236 pub fn set_balance_changes(&mut self, field: Vec<super::BalanceChange>) {
5238 self.balance_changes = field;
5239 }
5240 pub fn with_balance_changes(mut self, field: Vec<super::BalanceChange>) -> Self {
5242 self.set_balance_changes(field);
5243 self
5244 }
5245 pub fn objects(&self) -> &super::ObjectSet {
5247 self.objects
5248 .as_ref()
5249 .map(|field| field as _)
5250 .unwrap_or_else(|| super::ObjectSet::default_instance() as _)
5251 }
5252 pub fn objects_opt_mut(&mut self) -> Option<&mut super::ObjectSet> {
5254 self.objects.as_mut().map(|field| field as _)
5255 }
5256 pub fn objects_mut(&mut self) -> &mut super::ObjectSet {
5259 self.objects.get_or_insert_default()
5260 }
5261 pub fn objects_opt(&self) -> Option<&super::ObjectSet> {
5263 self.objects.as_ref().map(|field| field as _)
5264 }
5265 pub fn set_objects<T: Into<super::ObjectSet>>(&mut self, field: T) {
5267 self.objects = Some(field.into().into());
5268 }
5269 pub fn with_objects<T: Into<super::ObjectSet>>(mut self, field: T) -> Self {
5271 self.set_objects(field.into());
5272 self
5273 }
5274 }
5275 impl super::ExecutionError {
5276 pub const fn const_default() -> Self {
5277 Self {
5278 description: None,
5279 command: None,
5280 kind: None,
5281 error_details: None,
5282 }
5283 }
5284 #[doc(hidden)]
5285 pub fn default_instance() -> &'static Self {
5286 static DEFAULT: super::ExecutionError = super::ExecutionError::const_default();
5287 &DEFAULT
5288 }
5289 pub fn description_opt_mut(&mut self) -> Option<&mut String> {
5291 self.description.as_mut().map(|field| field as _)
5292 }
5293 pub fn description_mut(&mut self) -> &mut String {
5296 self.description.get_or_insert_default()
5297 }
5298 pub fn description_opt(&self) -> Option<&str> {
5300 self.description.as_ref().map(|field| field as _)
5301 }
5302 pub fn set_description<T: Into<String>>(&mut self, field: T) {
5304 self.description = Some(field.into().into());
5305 }
5306 pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
5308 self.set_description(field.into());
5309 self
5310 }
5311 pub fn command_opt_mut(&mut self) -> Option<&mut u64> {
5313 self.command.as_mut().map(|field| field as _)
5314 }
5315 pub fn command_mut(&mut self) -> &mut u64 {
5318 self.command.get_or_insert_default()
5319 }
5320 pub fn command_opt(&self) -> Option<u64> {
5322 self.command.as_ref().map(|field| *field)
5323 }
5324 pub fn set_command<T: Into<u64>>(&mut self, field: T) {
5326 self.command = Some(field.into().into());
5327 }
5328 pub fn with_command<T: Into<u64>>(mut self, field: T) -> Self {
5330 self.set_command(field.into());
5331 self
5332 }
5333 pub fn with_kind<T: Into<super::execution_error::ExecutionErrorKind>>(
5335 mut self,
5336 field: T,
5337 ) -> Self {
5338 self.set_kind(field.into());
5339 self
5340 }
5341 pub fn abort(&self) -> &super::MoveAbort {
5343 if let Some(super::execution_error::ErrorDetails::Abort(field)) = &self
5344 .error_details
5345 {
5346 field as _
5347 } else {
5348 super::MoveAbort::default_instance() as _
5349 }
5350 }
5351 pub fn abort_opt(&self) -> Option<&super::MoveAbort> {
5353 if let Some(super::execution_error::ErrorDetails::Abort(field)) = &self
5354 .error_details
5355 {
5356 Some(field as _)
5357 } else {
5358 None
5359 }
5360 }
5361 pub fn abort_opt_mut(&mut self) -> Option<&mut super::MoveAbort> {
5363 if let Some(super::execution_error::ErrorDetails::Abort(field)) = &mut self
5364 .error_details
5365 {
5366 Some(field as _)
5367 } else {
5368 None
5369 }
5370 }
5371 pub fn abort_mut(&mut self) -> &mut super::MoveAbort {
5375 if self.abort_opt_mut().is_none() {
5376 self.error_details = Some(
5377 super::execution_error::ErrorDetails::Abort(
5378 super::MoveAbort::default(),
5379 ),
5380 );
5381 }
5382 self.abort_opt_mut().unwrap()
5383 }
5384 pub fn set_abort<T: Into<super::MoveAbort>>(&mut self, field: T) {
5387 self.error_details = Some(
5388 super::execution_error::ErrorDetails::Abort(field.into().into()),
5389 );
5390 }
5391 pub fn with_abort<T: Into<super::MoveAbort>>(mut self, field: T) -> Self {
5394 self.set_abort(field.into());
5395 self
5396 }
5397 pub fn size_error(&self) -> &super::SizeError {
5399 if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &self
5400 .error_details
5401 {
5402 field as _
5403 } else {
5404 super::SizeError::default_instance() as _
5405 }
5406 }
5407 pub fn size_error_opt(&self) -> Option<&super::SizeError> {
5409 if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &self
5410 .error_details
5411 {
5412 Some(field as _)
5413 } else {
5414 None
5415 }
5416 }
5417 pub fn size_error_opt_mut(&mut self) -> Option<&mut super::SizeError> {
5419 if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &mut self
5420 .error_details
5421 {
5422 Some(field as _)
5423 } else {
5424 None
5425 }
5426 }
5427 pub fn size_error_mut(&mut self) -> &mut super::SizeError {
5431 if self.size_error_opt_mut().is_none() {
5432 self.error_details = Some(
5433 super::execution_error::ErrorDetails::SizeError(
5434 super::SizeError::default(),
5435 ),
5436 );
5437 }
5438 self.size_error_opt_mut().unwrap()
5439 }
5440 pub fn set_size_error<T: Into<super::SizeError>>(&mut self, field: T) {
5443 self.error_details = Some(
5444 super::execution_error::ErrorDetails::SizeError(field.into().into()),
5445 );
5446 }
5447 pub fn with_size_error<T: Into<super::SizeError>>(mut self, field: T) -> Self {
5450 self.set_size_error(field.into());
5451 self
5452 }
5453 pub fn command_argument_error(&self) -> &super::CommandArgumentError {
5455 if let Some(
5456 super::execution_error::ErrorDetails::CommandArgumentError(field),
5457 ) = &self.error_details
5458 {
5459 field as _
5460 } else {
5461 super::CommandArgumentError::default_instance() as _
5462 }
5463 }
5464 pub fn command_argument_error_opt(
5466 &self,
5467 ) -> Option<&super::CommandArgumentError> {
5468 if let Some(
5469 super::execution_error::ErrorDetails::CommandArgumentError(field),
5470 ) = &self.error_details
5471 {
5472 Some(field as _)
5473 } else {
5474 None
5475 }
5476 }
5477 pub fn command_argument_error_opt_mut(
5479 &mut self,
5480 ) -> Option<&mut super::CommandArgumentError> {
5481 if let Some(
5482 super::execution_error::ErrorDetails::CommandArgumentError(field),
5483 ) = &mut self.error_details
5484 {
5485 Some(field as _)
5486 } else {
5487 None
5488 }
5489 }
5490 pub fn command_argument_error_mut(
5494 &mut self,
5495 ) -> &mut super::CommandArgumentError {
5496 if self.command_argument_error_opt_mut().is_none() {
5497 self.error_details = Some(
5498 super::execution_error::ErrorDetails::CommandArgumentError(
5499 super::CommandArgumentError::default(),
5500 ),
5501 );
5502 }
5503 self.command_argument_error_opt_mut().unwrap()
5504 }
5505 pub fn set_command_argument_error<T: Into<super::CommandArgumentError>>(
5508 &mut self,
5509 field: T,
5510 ) {
5511 self.error_details = Some(
5512 super::execution_error::ErrorDetails::CommandArgumentError(
5513 field.into().into(),
5514 ),
5515 );
5516 }
5517 pub fn with_command_argument_error<T: Into<super::CommandArgumentError>>(
5520 mut self,
5521 field: T,
5522 ) -> Self {
5523 self.set_command_argument_error(field.into());
5524 self
5525 }
5526 pub fn type_argument_error(&self) -> &super::TypeArgumentError {
5528 if let Some(
5529 super::execution_error::ErrorDetails::TypeArgumentError(field),
5530 ) = &self.error_details
5531 {
5532 field as _
5533 } else {
5534 super::TypeArgumentError::default_instance() as _
5535 }
5536 }
5537 pub fn type_argument_error_opt(&self) -> Option<&super::TypeArgumentError> {
5539 if let Some(
5540 super::execution_error::ErrorDetails::TypeArgumentError(field),
5541 ) = &self.error_details
5542 {
5543 Some(field as _)
5544 } else {
5545 None
5546 }
5547 }
5548 pub fn type_argument_error_opt_mut(
5550 &mut self,
5551 ) -> Option<&mut super::TypeArgumentError> {
5552 if let Some(
5553 super::execution_error::ErrorDetails::TypeArgumentError(field),
5554 ) = &mut self.error_details
5555 {
5556 Some(field as _)
5557 } else {
5558 None
5559 }
5560 }
5561 pub fn type_argument_error_mut(&mut self) -> &mut super::TypeArgumentError {
5565 if self.type_argument_error_opt_mut().is_none() {
5566 self.error_details = Some(
5567 super::execution_error::ErrorDetails::TypeArgumentError(
5568 super::TypeArgumentError::default(),
5569 ),
5570 );
5571 }
5572 self.type_argument_error_opt_mut().unwrap()
5573 }
5574 pub fn set_type_argument_error<T: Into<super::TypeArgumentError>>(
5577 &mut self,
5578 field: T,
5579 ) {
5580 self.error_details = Some(
5581 super::execution_error::ErrorDetails::TypeArgumentError(
5582 field.into().into(),
5583 ),
5584 );
5585 }
5586 pub fn with_type_argument_error<T: Into<super::TypeArgumentError>>(
5589 mut self,
5590 field: T,
5591 ) -> Self {
5592 self.set_type_argument_error(field.into());
5593 self
5594 }
5595 pub fn package_upgrade_error(&self) -> &super::PackageUpgradeError {
5597 if let Some(
5598 super::execution_error::ErrorDetails::PackageUpgradeError(field),
5599 ) = &self.error_details
5600 {
5601 field as _
5602 } else {
5603 super::PackageUpgradeError::default_instance() as _
5604 }
5605 }
5606 pub fn package_upgrade_error_opt(&self) -> Option<&super::PackageUpgradeError> {
5608 if let Some(
5609 super::execution_error::ErrorDetails::PackageUpgradeError(field),
5610 ) = &self.error_details
5611 {
5612 Some(field as _)
5613 } else {
5614 None
5615 }
5616 }
5617 pub fn package_upgrade_error_opt_mut(
5619 &mut self,
5620 ) -> Option<&mut super::PackageUpgradeError> {
5621 if let Some(
5622 super::execution_error::ErrorDetails::PackageUpgradeError(field),
5623 ) = &mut self.error_details
5624 {
5625 Some(field as _)
5626 } else {
5627 None
5628 }
5629 }
5630 pub fn package_upgrade_error_mut(&mut self) -> &mut super::PackageUpgradeError {
5634 if self.package_upgrade_error_opt_mut().is_none() {
5635 self.error_details = Some(
5636 super::execution_error::ErrorDetails::PackageUpgradeError(
5637 super::PackageUpgradeError::default(),
5638 ),
5639 );
5640 }
5641 self.package_upgrade_error_opt_mut().unwrap()
5642 }
5643 pub fn set_package_upgrade_error<T: Into<super::PackageUpgradeError>>(
5646 &mut self,
5647 field: T,
5648 ) {
5649 self.error_details = Some(
5650 super::execution_error::ErrorDetails::PackageUpgradeError(
5651 field.into().into(),
5652 ),
5653 );
5654 }
5655 pub fn with_package_upgrade_error<T: Into<super::PackageUpgradeError>>(
5658 mut self,
5659 field: T,
5660 ) -> Self {
5661 self.set_package_upgrade_error(field.into());
5662 self
5663 }
5664 pub fn index_error(&self) -> &super::IndexError {
5666 if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &self
5667 .error_details
5668 {
5669 field as _
5670 } else {
5671 super::IndexError::default_instance() as _
5672 }
5673 }
5674 pub fn index_error_opt(&self) -> Option<&super::IndexError> {
5676 if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &self
5677 .error_details
5678 {
5679 Some(field as _)
5680 } else {
5681 None
5682 }
5683 }
5684 pub fn index_error_opt_mut(&mut self) -> Option<&mut super::IndexError> {
5686 if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &mut self
5687 .error_details
5688 {
5689 Some(field as _)
5690 } else {
5691 None
5692 }
5693 }
5694 pub fn index_error_mut(&mut self) -> &mut super::IndexError {
5698 if self.index_error_opt_mut().is_none() {
5699 self.error_details = Some(
5700 super::execution_error::ErrorDetails::IndexError(
5701 super::IndexError::default(),
5702 ),
5703 );
5704 }
5705 self.index_error_opt_mut().unwrap()
5706 }
5707 pub fn set_index_error<T: Into<super::IndexError>>(&mut self, field: T) {
5710 self.error_details = Some(
5711 super::execution_error::ErrorDetails::IndexError(field.into().into()),
5712 );
5713 }
5714 pub fn with_index_error<T: Into<super::IndexError>>(mut self, field: T) -> Self {
5717 self.set_index_error(field.into());
5718 self
5719 }
5720 pub fn object_id(&self) -> &str {
5722 if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &self
5723 .error_details
5724 {
5725 field as _
5726 } else {
5727 ""
5728 }
5729 }
5730 pub fn object_id_opt(&self) -> Option<&str> {
5732 if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &self
5733 .error_details
5734 {
5735 Some(field as _)
5736 } else {
5737 None
5738 }
5739 }
5740 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
5742 if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &mut self
5743 .error_details
5744 {
5745 Some(field as _)
5746 } else {
5747 None
5748 }
5749 }
5750 pub fn object_id_mut(&mut self) -> &mut String {
5754 if self.object_id_opt_mut().is_none() {
5755 self.error_details = Some(
5756 super::execution_error::ErrorDetails::ObjectId(String::default()),
5757 );
5758 }
5759 self.object_id_opt_mut().unwrap()
5760 }
5761 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
5764 self.error_details = Some(
5765 super::execution_error::ErrorDetails::ObjectId(field.into().into()),
5766 );
5767 }
5768 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
5771 self.set_object_id(field.into());
5772 self
5773 }
5774 pub fn coin_deny_list_error(&self) -> &super::CoinDenyListError {
5776 if let Some(
5777 super::execution_error::ErrorDetails::CoinDenyListError(field),
5778 ) = &self.error_details
5779 {
5780 field as _
5781 } else {
5782 super::CoinDenyListError::default_instance() as _
5783 }
5784 }
5785 pub fn coin_deny_list_error_opt(&self) -> Option<&super::CoinDenyListError> {
5787 if let Some(
5788 super::execution_error::ErrorDetails::CoinDenyListError(field),
5789 ) = &self.error_details
5790 {
5791 Some(field as _)
5792 } else {
5793 None
5794 }
5795 }
5796 pub fn coin_deny_list_error_opt_mut(
5798 &mut self,
5799 ) -> Option<&mut super::CoinDenyListError> {
5800 if let Some(
5801 super::execution_error::ErrorDetails::CoinDenyListError(field),
5802 ) = &mut self.error_details
5803 {
5804 Some(field as _)
5805 } else {
5806 None
5807 }
5808 }
5809 pub fn coin_deny_list_error_mut(&mut self) -> &mut super::CoinDenyListError {
5813 if self.coin_deny_list_error_opt_mut().is_none() {
5814 self.error_details = Some(
5815 super::execution_error::ErrorDetails::CoinDenyListError(
5816 super::CoinDenyListError::default(),
5817 ),
5818 );
5819 }
5820 self.coin_deny_list_error_opt_mut().unwrap()
5821 }
5822 pub fn set_coin_deny_list_error<T: Into<super::CoinDenyListError>>(
5825 &mut self,
5826 field: T,
5827 ) {
5828 self.error_details = Some(
5829 super::execution_error::ErrorDetails::CoinDenyListError(
5830 field.into().into(),
5831 ),
5832 );
5833 }
5834 pub fn with_coin_deny_list_error<T: Into<super::CoinDenyListError>>(
5837 mut self,
5838 field: T,
5839 ) -> Self {
5840 self.set_coin_deny_list_error(field.into());
5841 self
5842 }
5843 pub fn congested_objects(&self) -> &super::CongestedObjects {
5845 if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &self
5846 .error_details
5847 {
5848 field as _
5849 } else {
5850 super::CongestedObjects::default_instance() as _
5851 }
5852 }
5853 pub fn congested_objects_opt(&self) -> Option<&super::CongestedObjects> {
5855 if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &self
5856 .error_details
5857 {
5858 Some(field as _)
5859 } else {
5860 None
5861 }
5862 }
5863 pub fn congested_objects_opt_mut(
5865 &mut self,
5866 ) -> Option<&mut super::CongestedObjects> {
5867 if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &mut self
5868 .error_details
5869 {
5870 Some(field as _)
5871 } else {
5872 None
5873 }
5874 }
5875 pub fn congested_objects_mut(&mut self) -> &mut super::CongestedObjects {
5879 if self.congested_objects_opt_mut().is_none() {
5880 self.error_details = Some(
5881 super::execution_error::ErrorDetails::CongestedObjects(
5882 super::CongestedObjects::default(),
5883 ),
5884 );
5885 }
5886 self.congested_objects_opt_mut().unwrap()
5887 }
5888 pub fn set_congested_objects<T: Into<super::CongestedObjects>>(
5891 &mut self,
5892 field: T,
5893 ) {
5894 self.error_details = Some(
5895 super::execution_error::ErrorDetails::CongestedObjects(
5896 field.into().into(),
5897 ),
5898 );
5899 }
5900 pub fn with_congested_objects<T: Into<super::CongestedObjects>>(
5903 mut self,
5904 field: T,
5905 ) -> Self {
5906 self.set_congested_objects(field.into());
5907 self
5908 }
5909 }
5910 impl super::ExecutionStatus {
5911 pub const fn const_default() -> Self {
5912 Self { success: None, error: None }
5913 }
5914 #[doc(hidden)]
5915 pub fn default_instance() -> &'static Self {
5916 static DEFAULT: super::ExecutionStatus = super::ExecutionStatus::const_default();
5917 &DEFAULT
5918 }
5919 pub fn success_opt_mut(&mut self) -> Option<&mut bool> {
5921 self.success.as_mut().map(|field| field as _)
5922 }
5923 pub fn success_mut(&mut self) -> &mut bool {
5926 self.success.get_or_insert_default()
5927 }
5928 pub fn success_opt(&self) -> Option<bool> {
5930 self.success.as_ref().map(|field| *field)
5931 }
5932 pub fn set_success<T: Into<bool>>(&mut self, field: T) {
5934 self.success = Some(field.into().into());
5935 }
5936 pub fn with_success<T: Into<bool>>(mut self, field: T) -> Self {
5938 self.set_success(field.into());
5939 self
5940 }
5941 pub fn error(&self) -> &super::ExecutionError {
5943 self.error
5944 .as_ref()
5945 .map(|field| field as _)
5946 .unwrap_or_else(|| super::ExecutionError::default_instance() as _)
5947 }
5948 pub fn error_opt_mut(&mut self) -> Option<&mut super::ExecutionError> {
5950 self.error.as_mut().map(|field| field as _)
5951 }
5952 pub fn error_mut(&mut self) -> &mut super::ExecutionError {
5955 self.error.get_or_insert_default()
5956 }
5957 pub fn error_opt(&self) -> Option<&super::ExecutionError> {
5959 self.error.as_ref().map(|field| field as _)
5960 }
5961 pub fn set_error<T: Into<super::ExecutionError>>(&mut self, field: T) {
5963 self.error = Some(field.into().into());
5964 }
5965 pub fn with_error<T: Into<super::ExecutionError>>(mut self, field: T) -> Self {
5967 self.set_error(field.into());
5968 self
5969 }
5970 }
5971 impl super::ExecutionTimeObservation {
5972 pub const fn const_default() -> Self {
5973 Self {
5974 kind: None,
5975 move_entry_point: None,
5976 validator_observations: Vec::new(),
5977 }
5978 }
5979 #[doc(hidden)]
5980 pub fn default_instance() -> &'static Self {
5981 static DEFAULT: super::ExecutionTimeObservation = super::ExecutionTimeObservation::const_default();
5982 &DEFAULT
5983 }
5984 pub fn with_kind<
5986 T: Into<super::execution_time_observation::ExecutionTimeObservationKind>,
5987 >(mut self, field: T) -> Self {
5988 self.set_kind(field.into());
5989 self
5990 }
5991 pub fn move_entry_point(&self) -> &super::MoveCall {
5993 self.move_entry_point
5994 .as_ref()
5995 .map(|field| field as _)
5996 .unwrap_or_else(|| super::MoveCall::default_instance() as _)
5997 }
5998 pub fn move_entry_point_opt_mut(&mut self) -> Option<&mut super::MoveCall> {
6000 self.move_entry_point.as_mut().map(|field| field as _)
6001 }
6002 pub fn move_entry_point_mut(&mut self) -> &mut super::MoveCall {
6005 self.move_entry_point.get_or_insert_default()
6006 }
6007 pub fn move_entry_point_opt(&self) -> Option<&super::MoveCall> {
6009 self.move_entry_point.as_ref().map(|field| field as _)
6010 }
6011 pub fn set_move_entry_point<T: Into<super::MoveCall>>(&mut self, field: T) {
6013 self.move_entry_point = Some(field.into().into());
6014 }
6015 pub fn with_move_entry_point<T: Into<super::MoveCall>>(
6017 mut self,
6018 field: T,
6019 ) -> Self {
6020 self.set_move_entry_point(field.into());
6021 self
6022 }
6023 pub fn validator_observations(
6025 &self,
6026 ) -> &[super::ValidatorExecutionTimeObservation] {
6027 &self.validator_observations
6028 }
6029 pub fn validator_observations_mut(
6032 &mut self,
6033 ) -> &mut Vec<super::ValidatorExecutionTimeObservation> {
6034 &mut self.validator_observations
6035 }
6036 pub fn set_validator_observations(
6038 &mut self,
6039 field: Vec<super::ValidatorExecutionTimeObservation>,
6040 ) {
6041 self.validator_observations = field;
6042 }
6043 pub fn with_validator_observations(
6045 mut self,
6046 field: Vec<super::ValidatorExecutionTimeObservation>,
6047 ) -> Self {
6048 self.set_validator_observations(field);
6049 self
6050 }
6051 }
6052 impl super::ExecutionTimeObservations {
6053 pub const fn const_default() -> Self {
6054 Self {
6055 version: None,
6056 observations: Vec::new(),
6057 }
6058 }
6059 #[doc(hidden)]
6060 pub fn default_instance() -> &'static Self {
6061 static DEFAULT: super::ExecutionTimeObservations = super::ExecutionTimeObservations::const_default();
6062 &DEFAULT
6063 }
6064 pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
6066 self.version.as_mut().map(|field| field as _)
6067 }
6068 pub fn version_mut(&mut self) -> &mut i32 {
6071 self.version.get_or_insert_default()
6072 }
6073 pub fn version_opt(&self) -> Option<i32> {
6075 self.version.as_ref().map(|field| *field)
6076 }
6077 pub fn set_version<T: Into<i32>>(&mut self, field: T) {
6079 self.version = Some(field.into().into());
6080 }
6081 pub fn with_version<T: Into<i32>>(mut self, field: T) -> Self {
6083 self.set_version(field.into());
6084 self
6085 }
6086 pub fn observations(&self) -> &[super::ExecutionTimeObservation] {
6088 &self.observations
6089 }
6090 pub fn observations_mut(&mut self) -> &mut Vec<super::ExecutionTimeObservation> {
6093 &mut self.observations
6094 }
6095 pub fn set_observations(&mut self, field: Vec<super::ExecutionTimeObservation>) {
6097 self.observations = field;
6098 }
6099 pub fn with_observations(
6101 mut self,
6102 field: Vec<super::ExecutionTimeObservation>,
6103 ) -> Self {
6104 self.set_observations(field);
6105 self
6106 }
6107 }
6108 impl super::FieldDescriptor {
6109 pub const fn const_default() -> Self {
6110 Self {
6111 name: None,
6112 position: None,
6113 r#type: None,
6114 }
6115 }
6116 #[doc(hidden)]
6117 pub fn default_instance() -> &'static Self {
6118 static DEFAULT: super::FieldDescriptor = super::FieldDescriptor::const_default();
6119 &DEFAULT
6120 }
6121 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
6123 self.name.as_mut().map(|field| field as _)
6124 }
6125 pub fn name_mut(&mut self) -> &mut String {
6128 self.name.get_or_insert_default()
6129 }
6130 pub fn name_opt(&self) -> Option<&str> {
6132 self.name.as_ref().map(|field| field as _)
6133 }
6134 pub fn set_name<T: Into<String>>(&mut self, field: T) {
6136 self.name = Some(field.into().into());
6137 }
6138 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
6140 self.set_name(field.into());
6141 self
6142 }
6143 pub fn position_opt_mut(&mut self) -> Option<&mut u32> {
6145 self.position.as_mut().map(|field| field as _)
6146 }
6147 pub fn position_mut(&mut self) -> &mut u32 {
6150 self.position.get_or_insert_default()
6151 }
6152 pub fn position_opt(&self) -> Option<u32> {
6154 self.position.as_ref().map(|field| *field)
6155 }
6156 pub fn set_position<T: Into<u32>>(&mut self, field: T) {
6158 self.position = Some(field.into().into());
6159 }
6160 pub fn with_position<T: Into<u32>>(mut self, field: T) -> Self {
6162 self.set_position(field.into());
6163 self
6164 }
6165 pub fn r#type(&self) -> &super::OpenSignatureBody {
6167 self.r#type
6168 .as_ref()
6169 .map(|field| field as _)
6170 .unwrap_or_else(|| super::OpenSignatureBody::default_instance() as _)
6171 }
6172 pub fn type_opt_mut(&mut self) -> Option<&mut super::OpenSignatureBody> {
6174 self.r#type.as_mut().map(|field| field as _)
6175 }
6176 pub fn type_mut(&mut self) -> &mut super::OpenSignatureBody {
6179 self.r#type.get_or_insert_default()
6180 }
6181 pub fn type_opt(&self) -> Option<&super::OpenSignatureBody> {
6183 self.r#type.as_ref().map(|field| field as _)
6184 }
6185 pub fn set_type<T: Into<super::OpenSignatureBody>>(&mut self, field: T) {
6187 self.r#type = Some(field.into().into());
6188 }
6189 pub fn with_type<T: Into<super::OpenSignatureBody>>(mut self, field: T) -> Self {
6191 self.set_type(field.into());
6192 self
6193 }
6194 }
6195 impl super::FunctionDescriptor {
6196 pub const fn const_default() -> Self {
6197 Self {
6198 name: None,
6199 visibility: None,
6200 is_entry: None,
6201 type_parameters: Vec::new(),
6202 parameters: Vec::new(),
6203 returns: Vec::new(),
6204 }
6205 }
6206 #[doc(hidden)]
6207 pub fn default_instance() -> &'static Self {
6208 static DEFAULT: super::FunctionDescriptor = super::FunctionDescriptor::const_default();
6209 &DEFAULT
6210 }
6211 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
6213 self.name.as_mut().map(|field| field as _)
6214 }
6215 pub fn name_mut(&mut self) -> &mut String {
6218 self.name.get_or_insert_default()
6219 }
6220 pub fn name_opt(&self) -> Option<&str> {
6222 self.name.as_ref().map(|field| field as _)
6223 }
6224 pub fn set_name<T: Into<String>>(&mut self, field: T) {
6226 self.name = Some(field.into().into());
6227 }
6228 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
6230 self.set_name(field.into());
6231 self
6232 }
6233 pub fn with_visibility<T: Into<super::function_descriptor::Visibility>>(
6235 mut self,
6236 field: T,
6237 ) -> Self {
6238 self.set_visibility(field.into());
6239 self
6240 }
6241 pub fn is_entry_opt_mut(&mut self) -> Option<&mut bool> {
6243 self.is_entry.as_mut().map(|field| field as _)
6244 }
6245 pub fn is_entry_mut(&mut self) -> &mut bool {
6248 self.is_entry.get_or_insert_default()
6249 }
6250 pub fn is_entry_opt(&self) -> Option<bool> {
6252 self.is_entry.as_ref().map(|field| *field)
6253 }
6254 pub fn set_is_entry<T: Into<bool>>(&mut self, field: T) {
6256 self.is_entry = Some(field.into().into());
6257 }
6258 pub fn with_is_entry<T: Into<bool>>(mut self, field: T) -> Self {
6260 self.set_is_entry(field.into());
6261 self
6262 }
6263 pub fn type_parameters(&self) -> &[super::TypeParameter] {
6265 &self.type_parameters
6266 }
6267 pub fn type_parameters_mut(&mut self) -> &mut Vec<super::TypeParameter> {
6270 &mut self.type_parameters
6271 }
6272 pub fn set_type_parameters(&mut self, field: Vec<super::TypeParameter>) {
6274 self.type_parameters = field;
6275 }
6276 pub fn with_type_parameters(mut self, field: Vec<super::TypeParameter>) -> Self {
6278 self.set_type_parameters(field);
6279 self
6280 }
6281 pub fn parameters(&self) -> &[super::OpenSignature] {
6283 &self.parameters
6284 }
6285 pub fn parameters_mut(&mut self) -> &mut Vec<super::OpenSignature> {
6288 &mut self.parameters
6289 }
6290 pub fn set_parameters(&mut self, field: Vec<super::OpenSignature>) {
6292 self.parameters = field;
6293 }
6294 pub fn with_parameters(mut self, field: Vec<super::OpenSignature>) -> Self {
6296 self.set_parameters(field);
6297 self
6298 }
6299 pub fn returns(&self) -> &[super::OpenSignature] {
6301 &self.returns
6302 }
6303 pub fn returns_mut(&mut self) -> &mut Vec<super::OpenSignature> {
6306 &mut self.returns
6307 }
6308 pub fn set_returns(&mut self, field: Vec<super::OpenSignature>) {
6310 self.returns = field;
6311 }
6312 pub fn with_returns(mut self, field: Vec<super::OpenSignature>) -> Self {
6314 self.set_returns(field);
6315 self
6316 }
6317 }
6318 impl super::GasCostSummary {
6319 pub const fn const_default() -> Self {
6320 Self {
6321 computation_cost: None,
6322 storage_cost: None,
6323 storage_rebate: None,
6324 non_refundable_storage_fee: None,
6325 }
6326 }
6327 #[doc(hidden)]
6328 pub fn default_instance() -> &'static Self {
6329 static DEFAULT: super::GasCostSummary = super::GasCostSummary::const_default();
6330 &DEFAULT
6331 }
6332 pub fn computation_cost_opt_mut(&mut self) -> Option<&mut u64> {
6334 self.computation_cost.as_mut().map(|field| field as _)
6335 }
6336 pub fn computation_cost_mut(&mut self) -> &mut u64 {
6339 self.computation_cost.get_or_insert_default()
6340 }
6341 pub fn computation_cost_opt(&self) -> Option<u64> {
6343 self.computation_cost.as_ref().map(|field| *field)
6344 }
6345 pub fn set_computation_cost<T: Into<u64>>(&mut self, field: T) {
6347 self.computation_cost = Some(field.into().into());
6348 }
6349 pub fn with_computation_cost<T: Into<u64>>(mut self, field: T) -> Self {
6351 self.set_computation_cost(field.into());
6352 self
6353 }
6354 pub fn storage_cost_opt_mut(&mut self) -> Option<&mut u64> {
6356 self.storage_cost.as_mut().map(|field| field as _)
6357 }
6358 pub fn storage_cost_mut(&mut self) -> &mut u64 {
6361 self.storage_cost.get_or_insert_default()
6362 }
6363 pub fn storage_cost_opt(&self) -> Option<u64> {
6365 self.storage_cost.as_ref().map(|field| *field)
6366 }
6367 pub fn set_storage_cost<T: Into<u64>>(&mut self, field: T) {
6369 self.storage_cost = Some(field.into().into());
6370 }
6371 pub fn with_storage_cost<T: Into<u64>>(mut self, field: T) -> Self {
6373 self.set_storage_cost(field.into());
6374 self
6375 }
6376 pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
6378 self.storage_rebate.as_mut().map(|field| field as _)
6379 }
6380 pub fn storage_rebate_mut(&mut self) -> &mut u64 {
6383 self.storage_rebate.get_or_insert_default()
6384 }
6385 pub fn storage_rebate_opt(&self) -> Option<u64> {
6387 self.storage_rebate.as_ref().map(|field| *field)
6388 }
6389 pub fn set_storage_rebate<T: Into<u64>>(&mut self, field: T) {
6391 self.storage_rebate = Some(field.into().into());
6392 }
6393 pub fn with_storage_rebate<T: Into<u64>>(mut self, field: T) -> Self {
6395 self.set_storage_rebate(field.into());
6396 self
6397 }
6398 pub fn non_refundable_storage_fee_opt_mut(&mut self) -> Option<&mut u64> {
6400 self.non_refundable_storage_fee.as_mut().map(|field| field as _)
6401 }
6402 pub fn non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
6405 self.non_refundable_storage_fee.get_or_insert_default()
6406 }
6407 pub fn non_refundable_storage_fee_opt(&self) -> Option<u64> {
6409 self.non_refundable_storage_fee.as_ref().map(|field| *field)
6410 }
6411 pub fn set_non_refundable_storage_fee<T: Into<u64>>(&mut self, field: T) {
6413 self.non_refundable_storage_fee = Some(field.into().into());
6414 }
6415 pub fn with_non_refundable_storage_fee<T: Into<u64>>(
6417 mut self,
6418 field: T,
6419 ) -> Self {
6420 self.set_non_refundable_storage_fee(field.into());
6421 self
6422 }
6423 }
6424 impl super::GasPayment {
6425 pub const fn const_default() -> Self {
6426 Self {
6427 objects: Vec::new(),
6428 owner: None,
6429 price: None,
6430 budget: None,
6431 }
6432 }
6433 #[doc(hidden)]
6434 pub fn default_instance() -> &'static Self {
6435 static DEFAULT: super::GasPayment = super::GasPayment::const_default();
6436 &DEFAULT
6437 }
6438 pub fn objects(&self) -> &[super::ObjectReference] {
6440 &self.objects
6441 }
6442 pub fn objects_mut(&mut self) -> &mut Vec<super::ObjectReference> {
6445 &mut self.objects
6446 }
6447 pub fn set_objects(&mut self, field: Vec<super::ObjectReference>) {
6449 self.objects = field;
6450 }
6451 pub fn with_objects(mut self, field: Vec<super::ObjectReference>) -> Self {
6453 self.set_objects(field);
6454 self
6455 }
6456 pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
6458 self.owner.as_mut().map(|field| field as _)
6459 }
6460 pub fn owner_mut(&mut self) -> &mut String {
6463 self.owner.get_or_insert_default()
6464 }
6465 pub fn owner_opt(&self) -> Option<&str> {
6467 self.owner.as_ref().map(|field| field as _)
6468 }
6469 pub fn set_owner<T: Into<String>>(&mut self, field: T) {
6471 self.owner = Some(field.into().into());
6472 }
6473 pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
6475 self.set_owner(field.into());
6476 self
6477 }
6478 pub fn price_opt_mut(&mut self) -> Option<&mut u64> {
6480 self.price.as_mut().map(|field| field as _)
6481 }
6482 pub fn price_mut(&mut self) -> &mut u64 {
6485 self.price.get_or_insert_default()
6486 }
6487 pub fn price_opt(&self) -> Option<u64> {
6489 self.price.as_ref().map(|field| *field)
6490 }
6491 pub fn set_price<T: Into<u64>>(&mut self, field: T) {
6493 self.price = Some(field.into().into());
6494 }
6495 pub fn with_price<T: Into<u64>>(mut self, field: T) -> Self {
6497 self.set_price(field.into());
6498 self
6499 }
6500 pub fn budget_opt_mut(&mut self) -> Option<&mut u64> {
6502 self.budget.as_mut().map(|field| field as _)
6503 }
6504 pub fn budget_mut(&mut self) -> &mut u64 {
6507 self.budget.get_or_insert_default()
6508 }
6509 pub fn budget_opt(&self) -> Option<u64> {
6511 self.budget.as_ref().map(|field| *field)
6512 }
6513 pub fn set_budget<T: Into<u64>>(&mut self, field: T) {
6515 self.budget = Some(field.into().into());
6516 }
6517 pub fn with_budget<T: Into<u64>>(mut self, field: T) -> Self {
6519 self.set_budget(field.into());
6520 self
6521 }
6522 }
6523 impl super::GenesisTransaction {
6524 pub const fn const_default() -> Self {
6525 Self { objects: Vec::new() }
6526 }
6527 #[doc(hidden)]
6528 pub fn default_instance() -> &'static Self {
6529 static DEFAULT: super::GenesisTransaction = super::GenesisTransaction::const_default();
6530 &DEFAULT
6531 }
6532 pub fn objects(&self) -> &[super::Object] {
6534 &self.objects
6535 }
6536 pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
6539 &mut self.objects
6540 }
6541 pub fn set_objects(&mut self, field: Vec<super::Object>) {
6543 self.objects = field;
6544 }
6545 pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
6547 self.set_objects(field);
6548 self
6549 }
6550 }
6551 impl super::GetBalanceRequest {
6552 pub const fn const_default() -> Self {
6553 Self {
6554 owner: None,
6555 coin_type: None,
6556 }
6557 }
6558 #[doc(hidden)]
6559 pub fn default_instance() -> &'static Self {
6560 static DEFAULT: super::GetBalanceRequest = super::GetBalanceRequest::const_default();
6561 &DEFAULT
6562 }
6563 pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
6565 self.owner.as_mut().map(|field| field as _)
6566 }
6567 pub fn owner_mut(&mut self) -> &mut String {
6570 self.owner.get_or_insert_default()
6571 }
6572 pub fn owner_opt(&self) -> Option<&str> {
6574 self.owner.as_ref().map(|field| field as _)
6575 }
6576 pub fn set_owner<T: Into<String>>(&mut self, field: T) {
6578 self.owner = Some(field.into().into());
6579 }
6580 pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
6582 self.set_owner(field.into());
6583 self
6584 }
6585 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
6587 self.coin_type.as_mut().map(|field| field as _)
6588 }
6589 pub fn coin_type_mut(&mut self) -> &mut String {
6592 self.coin_type.get_or_insert_default()
6593 }
6594 pub fn coin_type_opt(&self) -> Option<&str> {
6596 self.coin_type.as_ref().map(|field| field as _)
6597 }
6598 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
6600 self.coin_type = Some(field.into().into());
6601 }
6602 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
6604 self.set_coin_type(field.into());
6605 self
6606 }
6607 }
6608 impl super::GetBalanceResponse {
6609 pub const fn const_default() -> Self {
6610 Self { balance: None }
6611 }
6612 #[doc(hidden)]
6613 pub fn default_instance() -> &'static Self {
6614 static DEFAULT: super::GetBalanceResponse = super::GetBalanceResponse::const_default();
6615 &DEFAULT
6616 }
6617 pub fn balance(&self) -> &super::Balance {
6619 self.balance
6620 .as_ref()
6621 .map(|field| field as _)
6622 .unwrap_or_else(|| super::Balance::default_instance() as _)
6623 }
6624 pub fn balance_opt_mut(&mut self) -> Option<&mut super::Balance> {
6626 self.balance.as_mut().map(|field| field as _)
6627 }
6628 pub fn balance_mut(&mut self) -> &mut super::Balance {
6631 self.balance.get_or_insert_default()
6632 }
6633 pub fn balance_opt(&self) -> Option<&super::Balance> {
6635 self.balance.as_ref().map(|field| field as _)
6636 }
6637 pub fn set_balance<T: Into<super::Balance>>(&mut self, field: T) {
6639 self.balance = Some(field.into().into());
6640 }
6641 pub fn with_balance<T: Into<super::Balance>>(mut self, field: T) -> Self {
6643 self.set_balance(field.into());
6644 self
6645 }
6646 }
6647 impl super::GetCheckpointRequest {
6648 pub const fn const_default() -> Self {
6649 Self {
6650 read_mask: None,
6651 checkpoint_id: None,
6652 }
6653 }
6654 #[doc(hidden)]
6655 pub fn default_instance() -> &'static Self {
6656 static DEFAULT: super::GetCheckpointRequest = super::GetCheckpointRequest::const_default();
6657 &DEFAULT
6658 }
6659 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
6661 self.read_mask.as_mut().map(|field| field as _)
6662 }
6663 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
6666 self.read_mask.get_or_insert_default()
6667 }
6668 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
6670 self.read_mask.as_ref().map(|field| field as _)
6671 }
6672 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
6674 self.read_mask = Some(field.into().into());
6675 }
6676 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
6678 mut self,
6679 field: T,
6680 ) -> Self {
6681 self.set_read_mask(field.into());
6682 self
6683 }
6684 pub fn sequence_number(&self) -> u64 {
6686 if let Some(
6687 super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
6688 ) = &self.checkpoint_id
6689 {
6690 *field
6691 } else {
6692 0u64
6693 }
6694 }
6695 pub fn sequence_number_opt(&self) -> Option<u64> {
6697 if let Some(
6698 super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
6699 ) = &self.checkpoint_id
6700 {
6701 Some(*field)
6702 } else {
6703 None
6704 }
6705 }
6706 pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
6708 if let Some(
6709 super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
6710 ) = &mut self.checkpoint_id
6711 {
6712 Some(field as _)
6713 } else {
6714 None
6715 }
6716 }
6717 pub fn sequence_number_mut(&mut self) -> &mut u64 {
6721 if self.sequence_number_opt_mut().is_none() {
6722 self.checkpoint_id = Some(
6723 super::get_checkpoint_request::CheckpointId::SequenceNumber(
6724 u64::default(),
6725 ),
6726 );
6727 }
6728 self.sequence_number_opt_mut().unwrap()
6729 }
6730 pub fn set_sequence_number<T: Into<u64>>(&mut self, field: T) {
6733 self.checkpoint_id = Some(
6734 super::get_checkpoint_request::CheckpointId::SequenceNumber(
6735 field.into().into(),
6736 ),
6737 );
6738 }
6739 pub fn with_sequence_number<T: Into<u64>>(mut self, field: T) -> Self {
6742 self.set_sequence_number(field.into());
6743 self
6744 }
6745 pub fn digest(&self) -> &str {
6747 if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &self
6748 .checkpoint_id
6749 {
6750 field as _
6751 } else {
6752 ""
6753 }
6754 }
6755 pub fn digest_opt(&self) -> Option<&str> {
6757 if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &self
6758 .checkpoint_id
6759 {
6760 Some(field as _)
6761 } else {
6762 None
6763 }
6764 }
6765 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
6767 if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &mut self
6768 .checkpoint_id
6769 {
6770 Some(field as _)
6771 } else {
6772 None
6773 }
6774 }
6775 pub fn digest_mut(&mut self) -> &mut String {
6779 if self.digest_opt_mut().is_none() {
6780 self.checkpoint_id = Some(
6781 super::get_checkpoint_request::CheckpointId::Digest(
6782 String::default(),
6783 ),
6784 );
6785 }
6786 self.digest_opt_mut().unwrap()
6787 }
6788 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
6791 self.checkpoint_id = Some(
6792 super::get_checkpoint_request::CheckpointId::Digest(field.into().into()),
6793 );
6794 }
6795 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
6798 self.set_digest(field.into());
6799 self
6800 }
6801 }
6802 impl super::GetCheckpointResponse {
6803 pub const fn const_default() -> Self {
6804 Self { checkpoint: None }
6805 }
6806 #[doc(hidden)]
6807 pub fn default_instance() -> &'static Self {
6808 static DEFAULT: super::GetCheckpointResponse = super::GetCheckpointResponse::const_default();
6809 &DEFAULT
6810 }
6811 pub fn checkpoint(&self) -> &super::Checkpoint {
6813 self.checkpoint
6814 .as_ref()
6815 .map(|field| field as _)
6816 .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
6817 }
6818 pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
6820 self.checkpoint.as_mut().map(|field| field as _)
6821 }
6822 pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
6825 self.checkpoint.get_or_insert_default()
6826 }
6827 pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
6829 self.checkpoint.as_ref().map(|field| field as _)
6830 }
6831 pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
6833 self.checkpoint = Some(field.into().into());
6834 }
6835 pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
6837 self.set_checkpoint(field.into());
6838 self
6839 }
6840 }
6841 impl super::GetCoinInfoRequest {
6842 pub const fn const_default() -> Self {
6843 Self { coin_type: None }
6844 }
6845 #[doc(hidden)]
6846 pub fn default_instance() -> &'static Self {
6847 static DEFAULT: super::GetCoinInfoRequest = super::GetCoinInfoRequest::const_default();
6848 &DEFAULT
6849 }
6850 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
6852 self.coin_type.as_mut().map(|field| field as _)
6853 }
6854 pub fn coin_type_mut(&mut self) -> &mut String {
6857 self.coin_type.get_or_insert_default()
6858 }
6859 pub fn coin_type_opt(&self) -> Option<&str> {
6861 self.coin_type.as_ref().map(|field| field as _)
6862 }
6863 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
6865 self.coin_type = Some(field.into().into());
6866 }
6867 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
6869 self.set_coin_type(field.into());
6870 self
6871 }
6872 }
6873 impl super::GetCoinInfoResponse {
6874 pub const fn const_default() -> Self {
6875 Self {
6876 coin_type: None,
6877 metadata: None,
6878 treasury: None,
6879 regulated_metadata: None,
6880 }
6881 }
6882 #[doc(hidden)]
6883 pub fn default_instance() -> &'static Self {
6884 static DEFAULT: super::GetCoinInfoResponse = super::GetCoinInfoResponse::const_default();
6885 &DEFAULT
6886 }
6887 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
6889 self.coin_type.as_mut().map(|field| field as _)
6890 }
6891 pub fn coin_type_mut(&mut self) -> &mut String {
6894 self.coin_type.get_or_insert_default()
6895 }
6896 pub fn coin_type_opt(&self) -> Option<&str> {
6898 self.coin_type.as_ref().map(|field| field as _)
6899 }
6900 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
6902 self.coin_type = Some(field.into().into());
6903 }
6904 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
6906 self.set_coin_type(field.into());
6907 self
6908 }
6909 pub fn metadata(&self) -> &super::CoinMetadata {
6911 self.metadata
6912 .as_ref()
6913 .map(|field| field as _)
6914 .unwrap_or_else(|| super::CoinMetadata::default_instance() as _)
6915 }
6916 pub fn metadata_opt_mut(&mut self) -> Option<&mut super::CoinMetadata> {
6918 self.metadata.as_mut().map(|field| field as _)
6919 }
6920 pub fn metadata_mut(&mut self) -> &mut super::CoinMetadata {
6923 self.metadata.get_or_insert_default()
6924 }
6925 pub fn metadata_opt(&self) -> Option<&super::CoinMetadata> {
6927 self.metadata.as_ref().map(|field| field as _)
6928 }
6929 pub fn set_metadata<T: Into<super::CoinMetadata>>(&mut self, field: T) {
6931 self.metadata = Some(field.into().into());
6932 }
6933 pub fn with_metadata<T: Into<super::CoinMetadata>>(mut self, field: T) -> Self {
6935 self.set_metadata(field.into());
6936 self
6937 }
6938 pub fn treasury(&self) -> &super::CoinTreasury {
6940 self.treasury
6941 .as_ref()
6942 .map(|field| field as _)
6943 .unwrap_or_else(|| super::CoinTreasury::default_instance() as _)
6944 }
6945 pub fn treasury_opt_mut(&mut self) -> Option<&mut super::CoinTreasury> {
6947 self.treasury.as_mut().map(|field| field as _)
6948 }
6949 pub fn treasury_mut(&mut self) -> &mut super::CoinTreasury {
6952 self.treasury.get_or_insert_default()
6953 }
6954 pub fn treasury_opt(&self) -> Option<&super::CoinTreasury> {
6956 self.treasury.as_ref().map(|field| field as _)
6957 }
6958 pub fn set_treasury<T: Into<super::CoinTreasury>>(&mut self, field: T) {
6960 self.treasury = Some(field.into().into());
6961 }
6962 pub fn with_treasury<T: Into<super::CoinTreasury>>(mut self, field: T) -> Self {
6964 self.set_treasury(field.into());
6965 self
6966 }
6967 pub fn regulated_metadata(&self) -> &super::RegulatedCoinMetadata {
6969 self.regulated_metadata
6970 .as_ref()
6971 .map(|field| field as _)
6972 .unwrap_or_else(|| super::RegulatedCoinMetadata::default_instance() as _)
6973 }
6974 pub fn regulated_metadata_opt_mut(
6976 &mut self,
6977 ) -> Option<&mut super::RegulatedCoinMetadata> {
6978 self.regulated_metadata.as_mut().map(|field| field as _)
6979 }
6980 pub fn regulated_metadata_mut(&mut self) -> &mut super::RegulatedCoinMetadata {
6983 self.regulated_metadata.get_or_insert_default()
6984 }
6985 pub fn regulated_metadata_opt(&self) -> Option<&super::RegulatedCoinMetadata> {
6987 self.regulated_metadata.as_ref().map(|field| field as _)
6988 }
6989 pub fn set_regulated_metadata<T: Into<super::RegulatedCoinMetadata>>(
6991 &mut self,
6992 field: T,
6993 ) {
6994 self.regulated_metadata = Some(field.into().into());
6995 }
6996 pub fn with_regulated_metadata<T: Into<super::RegulatedCoinMetadata>>(
6998 mut self,
6999 field: T,
7000 ) -> Self {
7001 self.set_regulated_metadata(field.into());
7002 self
7003 }
7004 }
7005 impl super::GetDatatypeRequest {
7006 pub const fn const_default() -> Self {
7007 Self {
7008 package_id: None,
7009 module_name: None,
7010 name: None,
7011 }
7012 }
7013 #[doc(hidden)]
7014 pub fn default_instance() -> &'static Self {
7015 static DEFAULT: super::GetDatatypeRequest = super::GetDatatypeRequest::const_default();
7016 &DEFAULT
7017 }
7018 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
7020 self.package_id.as_mut().map(|field| field as _)
7021 }
7022 pub fn package_id_mut(&mut self) -> &mut String {
7025 self.package_id.get_or_insert_default()
7026 }
7027 pub fn package_id_opt(&self) -> Option<&str> {
7029 self.package_id.as_ref().map(|field| field as _)
7030 }
7031 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
7033 self.package_id = Some(field.into().into());
7034 }
7035 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
7037 self.set_package_id(field.into());
7038 self
7039 }
7040 pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
7042 self.module_name.as_mut().map(|field| field as _)
7043 }
7044 pub fn module_name_mut(&mut self) -> &mut String {
7047 self.module_name.get_or_insert_default()
7048 }
7049 pub fn module_name_opt(&self) -> Option<&str> {
7051 self.module_name.as_ref().map(|field| field as _)
7052 }
7053 pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
7055 self.module_name = Some(field.into().into());
7056 }
7057 pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
7059 self.set_module_name(field.into());
7060 self
7061 }
7062 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
7064 self.name.as_mut().map(|field| field as _)
7065 }
7066 pub fn name_mut(&mut self) -> &mut String {
7069 self.name.get_or_insert_default()
7070 }
7071 pub fn name_opt(&self) -> Option<&str> {
7073 self.name.as_ref().map(|field| field as _)
7074 }
7075 pub fn set_name<T: Into<String>>(&mut self, field: T) {
7077 self.name = Some(field.into().into());
7078 }
7079 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
7081 self.set_name(field.into());
7082 self
7083 }
7084 }
7085 impl super::GetDatatypeResponse {
7086 pub const fn const_default() -> Self {
7087 Self { datatype: None }
7088 }
7089 #[doc(hidden)]
7090 pub fn default_instance() -> &'static Self {
7091 static DEFAULT: super::GetDatatypeResponse = super::GetDatatypeResponse::const_default();
7092 &DEFAULT
7093 }
7094 pub fn datatype(&self) -> &super::DatatypeDescriptor {
7096 self.datatype
7097 .as_ref()
7098 .map(|field| field as _)
7099 .unwrap_or_else(|| super::DatatypeDescriptor::default_instance() as _)
7100 }
7101 pub fn datatype_opt_mut(&mut self) -> Option<&mut super::DatatypeDescriptor> {
7103 self.datatype.as_mut().map(|field| field as _)
7104 }
7105 pub fn datatype_mut(&mut self) -> &mut super::DatatypeDescriptor {
7108 self.datatype.get_or_insert_default()
7109 }
7110 pub fn datatype_opt(&self) -> Option<&super::DatatypeDescriptor> {
7112 self.datatype.as_ref().map(|field| field as _)
7113 }
7114 pub fn set_datatype<T: Into<super::DatatypeDescriptor>>(&mut self, field: T) {
7116 self.datatype = Some(field.into().into());
7117 }
7118 pub fn with_datatype<T: Into<super::DatatypeDescriptor>>(
7120 mut self,
7121 field: T,
7122 ) -> Self {
7123 self.set_datatype(field.into());
7124 self
7125 }
7126 }
7127 impl super::GetEpochRequest {
7128 pub const fn const_default() -> Self {
7129 Self {
7130 epoch: None,
7131 read_mask: None,
7132 }
7133 }
7134 #[doc(hidden)]
7135 pub fn default_instance() -> &'static Self {
7136 static DEFAULT: super::GetEpochRequest = super::GetEpochRequest::const_default();
7137 &DEFAULT
7138 }
7139 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
7141 self.epoch.as_mut().map(|field| field as _)
7142 }
7143 pub fn epoch_mut(&mut self) -> &mut u64 {
7146 self.epoch.get_or_insert_default()
7147 }
7148 pub fn epoch_opt(&self) -> Option<u64> {
7150 self.epoch.as_ref().map(|field| *field)
7151 }
7152 pub fn set_epoch<T: Into<u64>>(&mut self, field: T) {
7154 self.epoch = Some(field.into().into());
7155 }
7156 pub fn with_epoch<T: Into<u64>>(mut self, field: T) -> Self {
7158 self.set_epoch(field.into());
7159 self
7160 }
7161 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
7163 self.read_mask.as_mut().map(|field| field as _)
7164 }
7165 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
7168 self.read_mask.get_or_insert_default()
7169 }
7170 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
7172 self.read_mask.as_ref().map(|field| field as _)
7173 }
7174 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
7176 self.read_mask = Some(field.into().into());
7177 }
7178 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
7180 mut self,
7181 field: T,
7182 ) -> Self {
7183 self.set_read_mask(field.into());
7184 self
7185 }
7186 }
7187 impl super::GetEpochResponse {
7188 pub const fn const_default() -> Self {
7189 Self { epoch: None }
7190 }
7191 #[doc(hidden)]
7192 pub fn default_instance() -> &'static Self {
7193 static DEFAULT: super::GetEpochResponse = super::GetEpochResponse::const_default();
7194 &DEFAULT
7195 }
7196 pub fn epoch(&self) -> &super::Epoch {
7198 self.epoch
7199 .as_ref()
7200 .map(|field| field as _)
7201 .unwrap_or_else(|| super::Epoch::default_instance() as _)
7202 }
7203 pub fn epoch_opt_mut(&mut self) -> Option<&mut super::Epoch> {
7205 self.epoch.as_mut().map(|field| field as _)
7206 }
7207 pub fn epoch_mut(&mut self) -> &mut super::Epoch {
7210 self.epoch.get_or_insert_default()
7211 }
7212 pub fn epoch_opt(&self) -> Option<&super::Epoch> {
7214 self.epoch.as_ref().map(|field| field as _)
7215 }
7216 pub fn set_epoch<T: Into<super::Epoch>>(&mut self, field: T) {
7218 self.epoch = Some(field.into().into());
7219 }
7220 pub fn with_epoch<T: Into<super::Epoch>>(mut self, field: T) -> Self {
7222 self.set_epoch(field.into());
7223 self
7224 }
7225 }
7226 impl super::GetFunctionRequest {
7227 pub const fn const_default() -> Self {
7228 Self {
7229 package_id: None,
7230 module_name: None,
7231 name: None,
7232 }
7233 }
7234 #[doc(hidden)]
7235 pub fn default_instance() -> &'static Self {
7236 static DEFAULT: super::GetFunctionRequest = super::GetFunctionRequest::const_default();
7237 &DEFAULT
7238 }
7239 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
7241 self.package_id.as_mut().map(|field| field as _)
7242 }
7243 pub fn package_id_mut(&mut self) -> &mut String {
7246 self.package_id.get_or_insert_default()
7247 }
7248 pub fn package_id_opt(&self) -> Option<&str> {
7250 self.package_id.as_ref().map(|field| field as _)
7251 }
7252 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
7254 self.package_id = Some(field.into().into());
7255 }
7256 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
7258 self.set_package_id(field.into());
7259 self
7260 }
7261 pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
7263 self.module_name.as_mut().map(|field| field as _)
7264 }
7265 pub fn module_name_mut(&mut self) -> &mut String {
7268 self.module_name.get_or_insert_default()
7269 }
7270 pub fn module_name_opt(&self) -> Option<&str> {
7272 self.module_name.as_ref().map(|field| field as _)
7273 }
7274 pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
7276 self.module_name = Some(field.into().into());
7277 }
7278 pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
7280 self.set_module_name(field.into());
7281 self
7282 }
7283 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
7285 self.name.as_mut().map(|field| field as _)
7286 }
7287 pub fn name_mut(&mut self) -> &mut String {
7290 self.name.get_or_insert_default()
7291 }
7292 pub fn name_opt(&self) -> Option<&str> {
7294 self.name.as_ref().map(|field| field as _)
7295 }
7296 pub fn set_name<T: Into<String>>(&mut self, field: T) {
7298 self.name = Some(field.into().into());
7299 }
7300 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
7302 self.set_name(field.into());
7303 self
7304 }
7305 }
7306 impl super::GetFunctionResponse {
7307 pub const fn const_default() -> Self {
7308 Self { function: None }
7309 }
7310 #[doc(hidden)]
7311 pub fn default_instance() -> &'static Self {
7312 static DEFAULT: super::GetFunctionResponse = super::GetFunctionResponse::const_default();
7313 &DEFAULT
7314 }
7315 pub fn function(&self) -> &super::FunctionDescriptor {
7317 self.function
7318 .as_ref()
7319 .map(|field| field as _)
7320 .unwrap_or_else(|| super::FunctionDescriptor::default_instance() as _)
7321 }
7322 pub fn function_opt_mut(&mut self) -> Option<&mut super::FunctionDescriptor> {
7324 self.function.as_mut().map(|field| field as _)
7325 }
7326 pub fn function_mut(&mut self) -> &mut super::FunctionDescriptor {
7329 self.function.get_or_insert_default()
7330 }
7331 pub fn function_opt(&self) -> Option<&super::FunctionDescriptor> {
7333 self.function.as_ref().map(|field| field as _)
7334 }
7335 pub fn set_function<T: Into<super::FunctionDescriptor>>(&mut self, field: T) {
7337 self.function = Some(field.into().into());
7338 }
7339 pub fn with_function<T: Into<super::FunctionDescriptor>>(
7341 mut self,
7342 field: T,
7343 ) -> Self {
7344 self.set_function(field.into());
7345 self
7346 }
7347 }
7348 impl super::GetObjectRequest {
7349 pub const fn const_default() -> Self {
7350 Self {
7351 object_id: None,
7352 version: None,
7353 read_mask: None,
7354 }
7355 }
7356 #[doc(hidden)]
7357 pub fn default_instance() -> &'static Self {
7358 static DEFAULT: super::GetObjectRequest = super::GetObjectRequest::const_default();
7359 &DEFAULT
7360 }
7361 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
7363 self.object_id.as_mut().map(|field| field as _)
7364 }
7365 pub fn object_id_mut(&mut self) -> &mut String {
7368 self.object_id.get_or_insert_default()
7369 }
7370 pub fn object_id_opt(&self) -> Option<&str> {
7372 self.object_id.as_ref().map(|field| field as _)
7373 }
7374 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
7376 self.object_id = Some(field.into().into());
7377 }
7378 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
7380 self.set_object_id(field.into());
7381 self
7382 }
7383 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
7385 self.version.as_mut().map(|field| field as _)
7386 }
7387 pub fn version_mut(&mut self) -> &mut u64 {
7390 self.version.get_or_insert_default()
7391 }
7392 pub fn version_opt(&self) -> Option<u64> {
7394 self.version.as_ref().map(|field| *field)
7395 }
7396 pub fn set_version<T: Into<u64>>(&mut self, field: T) {
7398 self.version = Some(field.into().into());
7399 }
7400 pub fn with_version<T: Into<u64>>(mut self, field: T) -> Self {
7402 self.set_version(field.into());
7403 self
7404 }
7405 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
7407 self.read_mask.as_mut().map(|field| field as _)
7408 }
7409 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
7412 self.read_mask.get_or_insert_default()
7413 }
7414 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
7416 self.read_mask.as_ref().map(|field| field as _)
7417 }
7418 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
7420 self.read_mask = Some(field.into().into());
7421 }
7422 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
7424 mut self,
7425 field: T,
7426 ) -> Self {
7427 self.set_read_mask(field.into());
7428 self
7429 }
7430 }
7431 impl super::GetObjectResponse {
7432 pub const fn const_default() -> Self {
7433 Self { object: None }
7434 }
7435 #[doc(hidden)]
7436 pub fn default_instance() -> &'static Self {
7437 static DEFAULT: super::GetObjectResponse = super::GetObjectResponse::const_default();
7438 &DEFAULT
7439 }
7440 pub fn object(&self) -> &super::Object {
7442 self.object
7443 .as_ref()
7444 .map(|field| field as _)
7445 .unwrap_or_else(|| super::Object::default_instance() as _)
7446 }
7447 pub fn object_opt_mut(&mut self) -> Option<&mut super::Object> {
7449 self.object.as_mut().map(|field| field as _)
7450 }
7451 pub fn object_mut(&mut self) -> &mut super::Object {
7454 self.object.get_or_insert_default()
7455 }
7456 pub fn object_opt(&self) -> Option<&super::Object> {
7458 self.object.as_ref().map(|field| field as _)
7459 }
7460 pub fn set_object<T: Into<super::Object>>(&mut self, field: T) {
7462 self.object = Some(field.into().into());
7463 }
7464 pub fn with_object<T: Into<super::Object>>(mut self, field: T) -> Self {
7466 self.set_object(field.into());
7467 self
7468 }
7469 }
7470 impl super::GetObjectResult {
7471 pub const fn const_default() -> Self {
7472 Self { result: None }
7473 }
7474 #[doc(hidden)]
7475 pub fn default_instance() -> &'static Self {
7476 static DEFAULT: super::GetObjectResult = super::GetObjectResult::const_default();
7477 &DEFAULT
7478 }
7479 pub fn object(&self) -> &super::Object {
7481 if let Some(super::get_object_result::Result::Object(field)) = &self.result {
7482 field as _
7483 } else {
7484 super::Object::default_instance() as _
7485 }
7486 }
7487 pub fn object_opt(&self) -> Option<&super::Object> {
7489 if let Some(super::get_object_result::Result::Object(field)) = &self.result {
7490 Some(field as _)
7491 } else {
7492 None
7493 }
7494 }
7495 pub fn object_opt_mut(&mut self) -> Option<&mut super::Object> {
7497 if let Some(super::get_object_result::Result::Object(field)) = &mut self
7498 .result
7499 {
7500 Some(field as _)
7501 } else {
7502 None
7503 }
7504 }
7505 pub fn object_mut(&mut self) -> &mut super::Object {
7509 if self.object_opt_mut().is_none() {
7510 self.result = Some(
7511 super::get_object_result::Result::Object(super::Object::default()),
7512 );
7513 }
7514 self.object_opt_mut().unwrap()
7515 }
7516 pub fn set_object<T: Into<super::Object>>(&mut self, field: T) {
7519 self.result = Some(
7520 super::get_object_result::Result::Object(field.into().into()),
7521 );
7522 }
7523 pub fn with_object<T: Into<super::Object>>(mut self, field: T) -> Self {
7526 self.set_object(field.into());
7527 self
7528 }
7529 pub fn error(&self) -> &super::super::super::super::google::rpc::Status {
7531 if let Some(super::get_object_result::Result::Error(field)) = &self.result {
7532 field as _
7533 } else {
7534 super::super::super::super::google::rpc::Status::default_instance() as _
7535 }
7536 }
7537 pub fn error_opt(
7539 &self,
7540 ) -> Option<&super::super::super::super::google::rpc::Status> {
7541 if let Some(super::get_object_result::Result::Error(field)) = &self.result {
7542 Some(field as _)
7543 } else {
7544 None
7545 }
7546 }
7547 pub fn error_opt_mut(
7549 &mut self,
7550 ) -> Option<&mut super::super::super::super::google::rpc::Status> {
7551 if let Some(super::get_object_result::Result::Error(field)) = &mut self
7552 .result
7553 {
7554 Some(field as _)
7555 } else {
7556 None
7557 }
7558 }
7559 pub fn error_mut(
7563 &mut self,
7564 ) -> &mut super::super::super::super::google::rpc::Status {
7565 if self.error_opt_mut().is_none() {
7566 self.result = Some(
7567 super::get_object_result::Result::Error(
7568 super::super::super::super::google::rpc::Status::default(),
7569 ),
7570 );
7571 }
7572 self.error_opt_mut().unwrap()
7573 }
7574 pub fn set_error<T: Into<super::super::super::super::google::rpc::Status>>(
7577 &mut self,
7578 field: T,
7579 ) {
7580 self.result = Some(
7581 super::get_object_result::Result::Error(field.into().into()),
7582 );
7583 }
7584 pub fn with_error<T: Into<super::super::super::super::google::rpc::Status>>(
7587 mut self,
7588 field: T,
7589 ) -> Self {
7590 self.set_error(field.into());
7591 self
7592 }
7593 }
7594 impl super::GetPackageRequest {
7595 pub const fn const_default() -> Self {
7596 Self { package_id: None }
7597 }
7598 #[doc(hidden)]
7599 pub fn default_instance() -> &'static Self {
7600 static DEFAULT: super::GetPackageRequest = super::GetPackageRequest::const_default();
7601 &DEFAULT
7602 }
7603 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
7605 self.package_id.as_mut().map(|field| field as _)
7606 }
7607 pub fn package_id_mut(&mut self) -> &mut String {
7610 self.package_id.get_or_insert_default()
7611 }
7612 pub fn package_id_opt(&self) -> Option<&str> {
7614 self.package_id.as_ref().map(|field| field as _)
7615 }
7616 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
7618 self.package_id = Some(field.into().into());
7619 }
7620 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
7622 self.set_package_id(field.into());
7623 self
7624 }
7625 }
7626 impl super::GetPackageResponse {
7627 pub const fn const_default() -> Self {
7628 Self { package: None }
7629 }
7630 #[doc(hidden)]
7631 pub fn default_instance() -> &'static Self {
7632 static DEFAULT: super::GetPackageResponse = super::GetPackageResponse::const_default();
7633 &DEFAULT
7634 }
7635 pub fn package(&self) -> &super::Package {
7637 self.package
7638 .as_ref()
7639 .map(|field| field as _)
7640 .unwrap_or_else(|| super::Package::default_instance() as _)
7641 }
7642 pub fn package_opt_mut(&mut self) -> Option<&mut super::Package> {
7644 self.package.as_mut().map(|field| field as _)
7645 }
7646 pub fn package_mut(&mut self) -> &mut super::Package {
7649 self.package.get_or_insert_default()
7650 }
7651 pub fn package_opt(&self) -> Option<&super::Package> {
7653 self.package.as_ref().map(|field| field as _)
7654 }
7655 pub fn set_package<T: Into<super::Package>>(&mut self, field: T) {
7657 self.package = Some(field.into().into());
7658 }
7659 pub fn with_package<T: Into<super::Package>>(mut self, field: T) -> Self {
7661 self.set_package(field.into());
7662 self
7663 }
7664 }
7665 impl super::GetServiceInfoRequest {
7666 pub const fn const_default() -> Self {
7667 Self {}
7668 }
7669 #[doc(hidden)]
7670 pub fn default_instance() -> &'static Self {
7671 static DEFAULT: super::GetServiceInfoRequest = super::GetServiceInfoRequest::const_default();
7672 &DEFAULT
7673 }
7674 }
7675 impl super::GetServiceInfoResponse {
7676 pub const fn const_default() -> Self {
7677 Self {
7678 chain_id: None,
7679 chain: None,
7680 epoch: None,
7681 checkpoint_height: None,
7682 timestamp: None,
7683 lowest_available_checkpoint: None,
7684 lowest_available_checkpoint_objects: None,
7685 server: None,
7686 }
7687 }
7688 #[doc(hidden)]
7689 pub fn default_instance() -> &'static Self {
7690 static DEFAULT: super::GetServiceInfoResponse = super::GetServiceInfoResponse::const_default();
7691 &DEFAULT
7692 }
7693 pub fn chain_id_opt_mut(&mut self) -> Option<&mut String> {
7695 self.chain_id.as_mut().map(|field| field as _)
7696 }
7697 pub fn chain_id_mut(&mut self) -> &mut String {
7700 self.chain_id.get_or_insert_default()
7701 }
7702 pub fn chain_id_opt(&self) -> Option<&str> {
7704 self.chain_id.as_ref().map(|field| field as _)
7705 }
7706 pub fn set_chain_id<T: Into<String>>(&mut self, field: T) {
7708 self.chain_id = Some(field.into().into());
7709 }
7710 pub fn with_chain_id<T: Into<String>>(mut self, field: T) -> Self {
7712 self.set_chain_id(field.into());
7713 self
7714 }
7715 pub fn chain_opt_mut(&mut self) -> Option<&mut String> {
7717 self.chain.as_mut().map(|field| field as _)
7718 }
7719 pub fn chain_mut(&mut self) -> &mut String {
7722 self.chain.get_or_insert_default()
7723 }
7724 pub fn chain_opt(&self) -> Option<&str> {
7726 self.chain.as_ref().map(|field| field as _)
7727 }
7728 pub fn set_chain<T: Into<String>>(&mut self, field: T) {
7730 self.chain = Some(field.into().into());
7731 }
7732 pub fn with_chain<T: Into<String>>(mut self, field: T) -> Self {
7734 self.set_chain(field.into());
7735 self
7736 }
7737 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
7739 self.epoch.as_mut().map(|field| field as _)
7740 }
7741 pub fn epoch_mut(&mut self) -> &mut u64 {
7744 self.epoch.get_or_insert_default()
7745 }
7746 pub fn epoch_opt(&self) -> Option<u64> {
7748 self.epoch.as_ref().map(|field| *field)
7749 }
7750 pub fn set_epoch<T: Into<u64>>(&mut self, field: T) {
7752 self.epoch = Some(field.into().into());
7753 }
7754 pub fn with_epoch<T: Into<u64>>(mut self, field: T) -> Self {
7756 self.set_epoch(field.into());
7757 self
7758 }
7759 pub fn checkpoint_height_opt_mut(&mut self) -> Option<&mut u64> {
7761 self.checkpoint_height.as_mut().map(|field| field as _)
7762 }
7763 pub fn checkpoint_height_mut(&mut self) -> &mut u64 {
7766 self.checkpoint_height.get_or_insert_default()
7767 }
7768 pub fn checkpoint_height_opt(&self) -> Option<u64> {
7770 self.checkpoint_height.as_ref().map(|field| *field)
7771 }
7772 pub fn set_checkpoint_height<T: Into<u64>>(&mut self, field: T) {
7774 self.checkpoint_height = Some(field.into().into());
7775 }
7776 pub fn with_checkpoint_height<T: Into<u64>>(mut self, field: T) -> Self {
7778 self.set_checkpoint_height(field.into());
7779 self
7780 }
7781 pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
7783 self.timestamp.as_mut().map(|field| field as _)
7784 }
7785 pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
7788 self.timestamp.get_or_insert_default()
7789 }
7790 pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
7792 self.timestamp.as_ref().map(|field| field as _)
7793 }
7794 pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
7796 self.timestamp = Some(field.into().into());
7797 }
7798 pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
7800 mut self,
7801 field: T,
7802 ) -> Self {
7803 self.set_timestamp(field.into());
7804 self
7805 }
7806 pub fn lowest_available_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
7808 self.lowest_available_checkpoint.as_mut().map(|field| field as _)
7809 }
7810 pub fn lowest_available_checkpoint_mut(&mut self) -> &mut u64 {
7813 self.lowest_available_checkpoint.get_or_insert_default()
7814 }
7815 pub fn lowest_available_checkpoint_opt(&self) -> Option<u64> {
7817 self.lowest_available_checkpoint.as_ref().map(|field| *field)
7818 }
7819 pub fn set_lowest_available_checkpoint<T: Into<u64>>(&mut self, field: T) {
7821 self.lowest_available_checkpoint = Some(field.into().into());
7822 }
7823 pub fn with_lowest_available_checkpoint<T: Into<u64>>(
7825 mut self,
7826 field: T,
7827 ) -> Self {
7828 self.set_lowest_available_checkpoint(field.into());
7829 self
7830 }
7831 pub fn lowest_available_checkpoint_objects_opt_mut(
7833 &mut self,
7834 ) -> Option<&mut u64> {
7835 self.lowest_available_checkpoint_objects.as_mut().map(|field| field as _)
7836 }
7837 pub fn lowest_available_checkpoint_objects_mut(&mut self) -> &mut u64 {
7840 self.lowest_available_checkpoint_objects.get_or_insert_default()
7841 }
7842 pub fn lowest_available_checkpoint_objects_opt(&self) -> Option<u64> {
7844 self.lowest_available_checkpoint_objects.as_ref().map(|field| *field)
7845 }
7846 pub fn set_lowest_available_checkpoint_objects<T: Into<u64>>(
7848 &mut self,
7849 field: T,
7850 ) {
7851 self.lowest_available_checkpoint_objects = Some(field.into().into());
7852 }
7853 pub fn with_lowest_available_checkpoint_objects<T: Into<u64>>(
7855 mut self,
7856 field: T,
7857 ) -> Self {
7858 self.set_lowest_available_checkpoint_objects(field.into());
7859 self
7860 }
7861 pub fn server_opt_mut(&mut self) -> Option<&mut String> {
7863 self.server.as_mut().map(|field| field as _)
7864 }
7865 pub fn server_mut(&mut self) -> &mut String {
7868 self.server.get_or_insert_default()
7869 }
7870 pub fn server_opt(&self) -> Option<&str> {
7872 self.server.as_ref().map(|field| field as _)
7873 }
7874 pub fn set_server<T: Into<String>>(&mut self, field: T) {
7876 self.server = Some(field.into().into());
7877 }
7878 pub fn with_server<T: Into<String>>(mut self, field: T) -> Self {
7880 self.set_server(field.into());
7881 self
7882 }
7883 }
7884 impl super::GetTransactionRequest {
7885 pub const fn const_default() -> Self {
7886 Self {
7887 digest: None,
7888 read_mask: None,
7889 }
7890 }
7891 #[doc(hidden)]
7892 pub fn default_instance() -> &'static Self {
7893 static DEFAULT: super::GetTransactionRequest = super::GetTransactionRequest::const_default();
7894 &DEFAULT
7895 }
7896 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
7898 self.digest.as_mut().map(|field| field as _)
7899 }
7900 pub fn digest_mut(&mut self) -> &mut String {
7903 self.digest.get_or_insert_default()
7904 }
7905 pub fn digest_opt(&self) -> Option<&str> {
7907 self.digest.as_ref().map(|field| field as _)
7908 }
7909 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
7911 self.digest = Some(field.into().into());
7912 }
7913 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
7915 self.set_digest(field.into());
7916 self
7917 }
7918 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
7920 self.read_mask.as_mut().map(|field| field as _)
7921 }
7922 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
7925 self.read_mask.get_or_insert_default()
7926 }
7927 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
7929 self.read_mask.as_ref().map(|field| field as _)
7930 }
7931 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
7933 self.read_mask = Some(field.into().into());
7934 }
7935 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
7937 mut self,
7938 field: T,
7939 ) -> Self {
7940 self.set_read_mask(field.into());
7941 self
7942 }
7943 }
7944 impl super::GetTransactionResponse {
7945 pub const fn const_default() -> Self {
7946 Self { transaction: None }
7947 }
7948 #[doc(hidden)]
7949 pub fn default_instance() -> &'static Self {
7950 static DEFAULT: super::GetTransactionResponse = super::GetTransactionResponse::const_default();
7951 &DEFAULT
7952 }
7953 pub fn transaction(&self) -> &super::ExecutedTransaction {
7955 self.transaction
7956 .as_ref()
7957 .map(|field| field as _)
7958 .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
7959 }
7960 pub fn transaction_opt_mut(
7962 &mut self,
7963 ) -> Option<&mut super::ExecutedTransaction> {
7964 self.transaction.as_mut().map(|field| field as _)
7965 }
7966 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
7969 self.transaction.get_or_insert_default()
7970 }
7971 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
7973 self.transaction.as_ref().map(|field| field as _)
7974 }
7975 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
7977 &mut self,
7978 field: T,
7979 ) {
7980 self.transaction = Some(field.into().into());
7981 }
7982 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
7984 mut self,
7985 field: T,
7986 ) -> Self {
7987 self.set_transaction(field.into());
7988 self
7989 }
7990 }
7991 impl super::GetTransactionResult {
7992 pub const fn const_default() -> Self {
7993 Self { result: None }
7994 }
7995 #[doc(hidden)]
7996 pub fn default_instance() -> &'static Self {
7997 static DEFAULT: super::GetTransactionResult = super::GetTransactionResult::const_default();
7998 &DEFAULT
7999 }
8000 pub fn transaction(&self) -> &super::ExecutedTransaction {
8002 if let Some(super::get_transaction_result::Result::Transaction(field)) = &self
8003 .result
8004 {
8005 field as _
8006 } else {
8007 super::ExecutedTransaction::default_instance() as _
8008 }
8009 }
8010 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
8012 if let Some(super::get_transaction_result::Result::Transaction(field)) = &self
8013 .result
8014 {
8015 Some(field as _)
8016 } else {
8017 None
8018 }
8019 }
8020 pub fn transaction_opt_mut(
8022 &mut self,
8023 ) -> Option<&mut super::ExecutedTransaction> {
8024 if let Some(super::get_transaction_result::Result::Transaction(field)) = &mut self
8025 .result
8026 {
8027 Some(field as _)
8028 } else {
8029 None
8030 }
8031 }
8032 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
8036 if self.transaction_opt_mut().is_none() {
8037 self.result = Some(
8038 super::get_transaction_result::Result::Transaction(
8039 super::ExecutedTransaction::default(),
8040 ),
8041 );
8042 }
8043 self.transaction_opt_mut().unwrap()
8044 }
8045 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
8048 &mut self,
8049 field: T,
8050 ) {
8051 self.result = Some(
8052 super::get_transaction_result::Result::Transaction(field.into().into()),
8053 );
8054 }
8055 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
8058 mut self,
8059 field: T,
8060 ) -> Self {
8061 self.set_transaction(field.into());
8062 self
8063 }
8064 pub fn error(&self) -> &super::super::super::super::google::rpc::Status {
8066 if let Some(super::get_transaction_result::Result::Error(field)) = &self
8067 .result
8068 {
8069 field as _
8070 } else {
8071 super::super::super::super::google::rpc::Status::default_instance() as _
8072 }
8073 }
8074 pub fn error_opt(
8076 &self,
8077 ) -> Option<&super::super::super::super::google::rpc::Status> {
8078 if let Some(super::get_transaction_result::Result::Error(field)) = &self
8079 .result
8080 {
8081 Some(field as _)
8082 } else {
8083 None
8084 }
8085 }
8086 pub fn error_opt_mut(
8088 &mut self,
8089 ) -> Option<&mut super::super::super::super::google::rpc::Status> {
8090 if let Some(super::get_transaction_result::Result::Error(field)) = &mut self
8091 .result
8092 {
8093 Some(field as _)
8094 } else {
8095 None
8096 }
8097 }
8098 pub fn error_mut(
8102 &mut self,
8103 ) -> &mut super::super::super::super::google::rpc::Status {
8104 if self.error_opt_mut().is_none() {
8105 self.result = Some(
8106 super::get_transaction_result::Result::Error(
8107 super::super::super::super::google::rpc::Status::default(),
8108 ),
8109 );
8110 }
8111 self.error_opt_mut().unwrap()
8112 }
8113 pub fn set_error<T: Into<super::super::super::super::google::rpc::Status>>(
8116 &mut self,
8117 field: T,
8118 ) {
8119 self.result = Some(
8120 super::get_transaction_result::Result::Error(field.into().into()),
8121 );
8122 }
8123 pub fn with_error<T: Into<super::super::super::super::google::rpc::Status>>(
8126 mut self,
8127 field: T,
8128 ) -> Self {
8129 self.set_error(field.into());
8130 self
8131 }
8132 }
8133 impl super::IndexError {
8134 pub const fn const_default() -> Self {
8135 Self {
8136 index: None,
8137 subresult: None,
8138 }
8139 }
8140 #[doc(hidden)]
8141 pub fn default_instance() -> &'static Self {
8142 static DEFAULT: super::IndexError = super::IndexError::const_default();
8143 &DEFAULT
8144 }
8145 pub fn index_opt_mut(&mut self) -> Option<&mut u32> {
8147 self.index.as_mut().map(|field| field as _)
8148 }
8149 pub fn index_mut(&mut self) -> &mut u32 {
8152 self.index.get_or_insert_default()
8153 }
8154 pub fn index_opt(&self) -> Option<u32> {
8156 self.index.as_ref().map(|field| *field)
8157 }
8158 pub fn set_index<T: Into<u32>>(&mut self, field: T) {
8160 self.index = Some(field.into().into());
8161 }
8162 pub fn with_index<T: Into<u32>>(mut self, field: T) -> Self {
8164 self.set_index(field.into());
8165 self
8166 }
8167 pub fn subresult_opt_mut(&mut self) -> Option<&mut u32> {
8169 self.subresult.as_mut().map(|field| field as _)
8170 }
8171 pub fn subresult_mut(&mut self) -> &mut u32 {
8174 self.subresult.get_or_insert_default()
8175 }
8176 pub fn subresult_opt(&self) -> Option<u32> {
8178 self.subresult.as_ref().map(|field| *field)
8179 }
8180 pub fn set_subresult<T: Into<u32>>(&mut self, field: T) {
8182 self.subresult = Some(field.into().into());
8183 }
8184 pub fn with_subresult<T: Into<u32>>(mut self, field: T) -> Self {
8186 self.set_subresult(field.into());
8187 self
8188 }
8189 }
8190 impl super::Input {
8191 pub const fn const_default() -> Self {
8192 Self {
8193 kind: None,
8194 pure: None,
8195 object_id: None,
8196 version: None,
8197 digest: None,
8198 mutable: None,
8199 literal: None,
8200 }
8201 }
8202 #[doc(hidden)]
8203 pub fn default_instance() -> &'static Self {
8204 static DEFAULT: super::Input = super::Input::const_default();
8205 &DEFAULT
8206 }
8207 pub fn with_kind<T: Into<super::input::InputKind>>(mut self, field: T) -> Self {
8209 self.set_kind(field.into());
8210 self
8211 }
8212 pub fn pure_opt(&self) -> Option<&[u8]> {
8214 self.pure.as_ref().map(|field| field as _)
8215 }
8216 pub fn set_pure<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
8218 self.pure = Some(field.into().into());
8219 }
8220 pub fn with_pure<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
8222 self.set_pure(field.into());
8223 self
8224 }
8225 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
8227 self.object_id.as_mut().map(|field| field as _)
8228 }
8229 pub fn object_id_mut(&mut self) -> &mut String {
8232 self.object_id.get_or_insert_default()
8233 }
8234 pub fn object_id_opt(&self) -> Option<&str> {
8236 self.object_id.as_ref().map(|field| field as _)
8237 }
8238 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
8240 self.object_id = Some(field.into().into());
8241 }
8242 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
8244 self.set_object_id(field.into());
8245 self
8246 }
8247 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
8249 self.version.as_mut().map(|field| field as _)
8250 }
8251 pub fn version_mut(&mut self) -> &mut u64 {
8254 self.version.get_or_insert_default()
8255 }
8256 pub fn version_opt(&self) -> Option<u64> {
8258 self.version.as_ref().map(|field| *field)
8259 }
8260 pub fn set_version<T: Into<u64>>(&mut self, field: T) {
8262 self.version = Some(field.into().into());
8263 }
8264 pub fn with_version<T: Into<u64>>(mut self, field: T) -> Self {
8266 self.set_version(field.into());
8267 self
8268 }
8269 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
8271 self.digest.as_mut().map(|field| field as _)
8272 }
8273 pub fn digest_mut(&mut self) -> &mut String {
8276 self.digest.get_or_insert_default()
8277 }
8278 pub fn digest_opt(&self) -> Option<&str> {
8280 self.digest.as_ref().map(|field| field as _)
8281 }
8282 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
8284 self.digest = Some(field.into().into());
8285 }
8286 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
8288 self.set_digest(field.into());
8289 self
8290 }
8291 pub fn mutable_opt_mut(&mut self) -> Option<&mut bool> {
8293 self.mutable.as_mut().map(|field| field as _)
8294 }
8295 pub fn mutable_mut(&mut self) -> &mut bool {
8298 self.mutable.get_or_insert_default()
8299 }
8300 pub fn mutable_opt(&self) -> Option<bool> {
8302 self.mutable.as_ref().map(|field| *field)
8303 }
8304 pub fn set_mutable<T: Into<bool>>(&mut self, field: T) {
8306 self.mutable = Some(field.into().into());
8307 }
8308 pub fn with_mutable<T: Into<bool>>(mut self, field: T) -> Self {
8310 self.set_mutable(field.into());
8311 self
8312 }
8313 pub fn literal_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
8315 self.literal.as_mut().map(|field| field as _)
8316 }
8317 pub fn literal_mut(&mut self) -> &mut ::prost_types::Value {
8320 self.literal.get_or_insert_default()
8321 }
8322 pub fn literal_opt(&self) -> Option<&::prost_types::Value> {
8324 self.literal.as_ref().map(|field| field as _)
8325 }
8326 pub fn set_literal<T: Into<::prost_types::Value>>(&mut self, field: T) {
8328 self.literal = Some(field.into().into());
8329 }
8330 pub fn with_literal<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
8332 self.set_literal(field.into());
8333 self
8334 }
8335 }
8336 impl super::Jwk {
8337 pub const fn const_default() -> Self {
8338 Self {
8339 kty: None,
8340 e: None,
8341 n: None,
8342 alg: None,
8343 }
8344 }
8345 #[doc(hidden)]
8346 pub fn default_instance() -> &'static Self {
8347 static DEFAULT: super::Jwk = super::Jwk::const_default();
8348 &DEFAULT
8349 }
8350 pub fn kty_opt_mut(&mut self) -> Option<&mut String> {
8352 self.kty.as_mut().map(|field| field as _)
8353 }
8354 pub fn kty_mut(&mut self) -> &mut String {
8357 self.kty.get_or_insert_default()
8358 }
8359 pub fn kty_opt(&self) -> Option<&str> {
8361 self.kty.as_ref().map(|field| field as _)
8362 }
8363 pub fn set_kty<T: Into<String>>(&mut self, field: T) {
8365 self.kty = Some(field.into().into());
8366 }
8367 pub fn with_kty<T: Into<String>>(mut self, field: T) -> Self {
8369 self.set_kty(field.into());
8370 self
8371 }
8372 pub fn e_opt_mut(&mut self) -> Option<&mut String> {
8374 self.e.as_mut().map(|field| field as _)
8375 }
8376 pub fn e_mut(&mut self) -> &mut String {
8379 self.e.get_or_insert_default()
8380 }
8381 pub fn e_opt(&self) -> Option<&str> {
8383 self.e.as_ref().map(|field| field as _)
8384 }
8385 pub fn set_e<T: Into<String>>(&mut self, field: T) {
8387 self.e = Some(field.into().into());
8388 }
8389 pub fn with_e<T: Into<String>>(mut self, field: T) -> Self {
8391 self.set_e(field.into());
8392 self
8393 }
8394 pub fn n_opt_mut(&mut self) -> Option<&mut String> {
8396 self.n.as_mut().map(|field| field as _)
8397 }
8398 pub fn n_mut(&mut self) -> &mut String {
8401 self.n.get_or_insert_default()
8402 }
8403 pub fn n_opt(&self) -> Option<&str> {
8405 self.n.as_ref().map(|field| field as _)
8406 }
8407 pub fn set_n<T: Into<String>>(&mut self, field: T) {
8409 self.n = Some(field.into().into());
8410 }
8411 pub fn with_n<T: Into<String>>(mut self, field: T) -> Self {
8413 self.set_n(field.into());
8414 self
8415 }
8416 pub fn alg_opt_mut(&mut self) -> Option<&mut String> {
8418 self.alg.as_mut().map(|field| field as _)
8419 }
8420 pub fn alg_mut(&mut self) -> &mut String {
8423 self.alg.get_or_insert_default()
8424 }
8425 pub fn alg_opt(&self) -> Option<&str> {
8427 self.alg.as_ref().map(|field| field as _)
8428 }
8429 pub fn set_alg<T: Into<String>>(&mut self, field: T) {
8431 self.alg = Some(field.into().into());
8432 }
8433 pub fn with_alg<T: Into<String>>(mut self, field: T) -> Self {
8435 self.set_alg(field.into());
8436 self
8437 }
8438 }
8439 impl super::JwkId {
8440 pub const fn const_default() -> Self {
8441 Self { iss: None, kid: None }
8442 }
8443 #[doc(hidden)]
8444 pub fn default_instance() -> &'static Self {
8445 static DEFAULT: super::JwkId = super::JwkId::const_default();
8446 &DEFAULT
8447 }
8448 pub fn iss_opt_mut(&mut self) -> Option<&mut String> {
8450 self.iss.as_mut().map(|field| field as _)
8451 }
8452 pub fn iss_mut(&mut self) -> &mut String {
8455 self.iss.get_or_insert_default()
8456 }
8457 pub fn iss_opt(&self) -> Option<&str> {
8459 self.iss.as_ref().map(|field| field as _)
8460 }
8461 pub fn set_iss<T: Into<String>>(&mut self, field: T) {
8463 self.iss = Some(field.into().into());
8464 }
8465 pub fn with_iss<T: Into<String>>(mut self, field: T) -> Self {
8467 self.set_iss(field.into());
8468 self
8469 }
8470 pub fn kid_opt_mut(&mut self) -> Option<&mut String> {
8472 self.kid.as_mut().map(|field| field as _)
8473 }
8474 pub fn kid_mut(&mut self) -> &mut String {
8477 self.kid.get_or_insert_default()
8478 }
8479 pub fn kid_opt(&self) -> Option<&str> {
8481 self.kid.as_ref().map(|field| field as _)
8482 }
8483 pub fn set_kid<T: Into<String>>(&mut self, field: T) {
8485 self.kid = Some(field.into().into());
8486 }
8487 pub fn with_kid<T: Into<String>>(mut self, field: T) -> Self {
8489 self.set_kid(field.into());
8490 self
8491 }
8492 }
8493 impl super::Linkage {
8494 pub const fn const_default() -> Self {
8495 Self {
8496 original_id: None,
8497 upgraded_id: None,
8498 upgraded_version: None,
8499 }
8500 }
8501 #[doc(hidden)]
8502 pub fn default_instance() -> &'static Self {
8503 static DEFAULT: super::Linkage = super::Linkage::const_default();
8504 &DEFAULT
8505 }
8506 pub fn original_id_opt_mut(&mut self) -> Option<&mut String> {
8508 self.original_id.as_mut().map(|field| field as _)
8509 }
8510 pub fn original_id_mut(&mut self) -> &mut String {
8513 self.original_id.get_or_insert_default()
8514 }
8515 pub fn original_id_opt(&self) -> Option<&str> {
8517 self.original_id.as_ref().map(|field| field as _)
8518 }
8519 pub fn set_original_id<T: Into<String>>(&mut self, field: T) {
8521 self.original_id = Some(field.into().into());
8522 }
8523 pub fn with_original_id<T: Into<String>>(mut self, field: T) -> Self {
8525 self.set_original_id(field.into());
8526 self
8527 }
8528 pub fn upgraded_id_opt_mut(&mut self) -> Option<&mut String> {
8530 self.upgraded_id.as_mut().map(|field| field as _)
8531 }
8532 pub fn upgraded_id_mut(&mut self) -> &mut String {
8535 self.upgraded_id.get_or_insert_default()
8536 }
8537 pub fn upgraded_id_opt(&self) -> Option<&str> {
8539 self.upgraded_id.as_ref().map(|field| field as _)
8540 }
8541 pub fn set_upgraded_id<T: Into<String>>(&mut self, field: T) {
8543 self.upgraded_id = Some(field.into().into());
8544 }
8545 pub fn with_upgraded_id<T: Into<String>>(mut self, field: T) -> Self {
8547 self.set_upgraded_id(field.into());
8548 self
8549 }
8550 pub fn upgraded_version_opt_mut(&mut self) -> Option<&mut u64> {
8552 self.upgraded_version.as_mut().map(|field| field as _)
8553 }
8554 pub fn upgraded_version_mut(&mut self) -> &mut u64 {
8557 self.upgraded_version.get_or_insert_default()
8558 }
8559 pub fn upgraded_version_opt(&self) -> Option<u64> {
8561 self.upgraded_version.as_ref().map(|field| *field)
8562 }
8563 pub fn set_upgraded_version<T: Into<u64>>(&mut self, field: T) {
8565 self.upgraded_version = Some(field.into().into());
8566 }
8567 pub fn with_upgraded_version<T: Into<u64>>(mut self, field: T) -> Self {
8569 self.set_upgraded_version(field.into());
8570 self
8571 }
8572 }
8573 impl super::ListBalancesRequest {
8574 pub const fn const_default() -> Self {
8575 Self {
8576 owner: None,
8577 page_size: None,
8578 page_token: None,
8579 }
8580 }
8581 #[doc(hidden)]
8582 pub fn default_instance() -> &'static Self {
8583 static DEFAULT: super::ListBalancesRequest = super::ListBalancesRequest::const_default();
8584 &DEFAULT
8585 }
8586 pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
8588 self.owner.as_mut().map(|field| field as _)
8589 }
8590 pub fn owner_mut(&mut self) -> &mut String {
8593 self.owner.get_or_insert_default()
8594 }
8595 pub fn owner_opt(&self) -> Option<&str> {
8597 self.owner.as_ref().map(|field| field as _)
8598 }
8599 pub fn set_owner<T: Into<String>>(&mut self, field: T) {
8601 self.owner = Some(field.into().into());
8602 }
8603 pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
8605 self.set_owner(field.into());
8606 self
8607 }
8608 pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
8610 self.page_size.as_mut().map(|field| field as _)
8611 }
8612 pub fn page_size_mut(&mut self) -> &mut u32 {
8615 self.page_size.get_or_insert_default()
8616 }
8617 pub fn page_size_opt(&self) -> Option<u32> {
8619 self.page_size.as_ref().map(|field| *field)
8620 }
8621 pub fn set_page_size<T: Into<u32>>(&mut self, field: T) {
8623 self.page_size = Some(field.into().into());
8624 }
8625 pub fn with_page_size<T: Into<u32>>(mut self, field: T) -> Self {
8627 self.set_page_size(field.into());
8628 self
8629 }
8630 pub fn page_token_opt(&self) -> Option<&[u8]> {
8632 self.page_token.as_ref().map(|field| field as _)
8633 }
8634 pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
8636 self.page_token = Some(field.into().into());
8637 }
8638 pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
8640 mut self,
8641 field: T,
8642 ) -> Self {
8643 self.set_page_token(field.into());
8644 self
8645 }
8646 }
8647 impl super::ListBalancesResponse {
8648 pub const fn const_default() -> Self {
8649 Self {
8650 balances: Vec::new(),
8651 next_page_token: None,
8652 }
8653 }
8654 #[doc(hidden)]
8655 pub fn default_instance() -> &'static Self {
8656 static DEFAULT: super::ListBalancesResponse = super::ListBalancesResponse::const_default();
8657 &DEFAULT
8658 }
8659 pub fn balances(&self) -> &[super::Balance] {
8661 &self.balances
8662 }
8663 pub fn balances_mut(&mut self) -> &mut Vec<super::Balance> {
8666 &mut self.balances
8667 }
8668 pub fn set_balances(&mut self, field: Vec<super::Balance>) {
8670 self.balances = field;
8671 }
8672 pub fn with_balances(mut self, field: Vec<super::Balance>) -> Self {
8674 self.set_balances(field);
8675 self
8676 }
8677 pub fn next_page_token_opt(&self) -> Option<&[u8]> {
8679 self.next_page_token.as_ref().map(|field| field as _)
8680 }
8681 pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
8683 self.next_page_token = Some(field.into().into());
8684 }
8685 pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
8687 mut self,
8688 field: T,
8689 ) -> Self {
8690 self.set_next_page_token(field.into());
8691 self
8692 }
8693 }
8694 impl super::ListDynamicFieldsRequest {
8695 pub const fn const_default() -> Self {
8696 Self {
8697 parent: None,
8698 page_size: None,
8699 page_token: None,
8700 read_mask: None,
8701 }
8702 }
8703 #[doc(hidden)]
8704 pub fn default_instance() -> &'static Self {
8705 static DEFAULT: super::ListDynamicFieldsRequest = super::ListDynamicFieldsRequest::const_default();
8706 &DEFAULT
8707 }
8708 pub fn parent_opt_mut(&mut self) -> Option<&mut String> {
8710 self.parent.as_mut().map(|field| field as _)
8711 }
8712 pub fn parent_mut(&mut self) -> &mut String {
8715 self.parent.get_or_insert_default()
8716 }
8717 pub fn parent_opt(&self) -> Option<&str> {
8719 self.parent.as_ref().map(|field| field as _)
8720 }
8721 pub fn set_parent<T: Into<String>>(&mut self, field: T) {
8723 self.parent = Some(field.into().into());
8724 }
8725 pub fn with_parent<T: Into<String>>(mut self, field: T) -> Self {
8727 self.set_parent(field.into());
8728 self
8729 }
8730 pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
8732 self.page_size.as_mut().map(|field| field as _)
8733 }
8734 pub fn page_size_mut(&mut self) -> &mut u32 {
8737 self.page_size.get_or_insert_default()
8738 }
8739 pub fn page_size_opt(&self) -> Option<u32> {
8741 self.page_size.as_ref().map(|field| *field)
8742 }
8743 pub fn set_page_size<T: Into<u32>>(&mut self, field: T) {
8745 self.page_size = Some(field.into().into());
8746 }
8747 pub fn with_page_size<T: Into<u32>>(mut self, field: T) -> Self {
8749 self.set_page_size(field.into());
8750 self
8751 }
8752 pub fn page_token_opt(&self) -> Option<&[u8]> {
8754 self.page_token.as_ref().map(|field| field as _)
8755 }
8756 pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
8758 self.page_token = Some(field.into().into());
8759 }
8760 pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
8762 mut self,
8763 field: T,
8764 ) -> Self {
8765 self.set_page_token(field.into());
8766 self
8767 }
8768 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
8770 self.read_mask.as_mut().map(|field| field as _)
8771 }
8772 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
8775 self.read_mask.get_or_insert_default()
8776 }
8777 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
8779 self.read_mask.as_ref().map(|field| field as _)
8780 }
8781 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
8783 self.read_mask = Some(field.into().into());
8784 }
8785 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
8787 mut self,
8788 field: T,
8789 ) -> Self {
8790 self.set_read_mask(field.into());
8791 self
8792 }
8793 }
8794 impl super::ListDynamicFieldsResponse {
8795 pub const fn const_default() -> Self {
8796 Self {
8797 dynamic_fields: Vec::new(),
8798 next_page_token: None,
8799 }
8800 }
8801 #[doc(hidden)]
8802 pub fn default_instance() -> &'static Self {
8803 static DEFAULT: super::ListDynamicFieldsResponse = super::ListDynamicFieldsResponse::const_default();
8804 &DEFAULT
8805 }
8806 pub fn dynamic_fields(&self) -> &[super::DynamicField] {
8808 &self.dynamic_fields
8809 }
8810 pub fn dynamic_fields_mut(&mut self) -> &mut Vec<super::DynamicField> {
8813 &mut self.dynamic_fields
8814 }
8815 pub fn set_dynamic_fields(&mut self, field: Vec<super::DynamicField>) {
8817 self.dynamic_fields = field;
8818 }
8819 pub fn with_dynamic_fields(mut self, field: Vec<super::DynamicField>) -> Self {
8821 self.set_dynamic_fields(field);
8822 self
8823 }
8824 pub fn next_page_token_opt(&self) -> Option<&[u8]> {
8826 self.next_page_token.as_ref().map(|field| field as _)
8827 }
8828 pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
8830 self.next_page_token = Some(field.into().into());
8831 }
8832 pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
8834 mut self,
8835 field: T,
8836 ) -> Self {
8837 self.set_next_page_token(field.into());
8838 self
8839 }
8840 }
8841 impl super::ListOwnedObjectsRequest {
8842 pub const fn const_default() -> Self {
8843 Self {
8844 owner: None,
8845 page_size: None,
8846 page_token: None,
8847 read_mask: None,
8848 object_type: None,
8849 }
8850 }
8851 #[doc(hidden)]
8852 pub fn default_instance() -> &'static Self {
8853 static DEFAULT: super::ListOwnedObjectsRequest = super::ListOwnedObjectsRequest::const_default();
8854 &DEFAULT
8855 }
8856 pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
8858 self.owner.as_mut().map(|field| field as _)
8859 }
8860 pub fn owner_mut(&mut self) -> &mut String {
8863 self.owner.get_or_insert_default()
8864 }
8865 pub fn owner_opt(&self) -> Option<&str> {
8867 self.owner.as_ref().map(|field| field as _)
8868 }
8869 pub fn set_owner<T: Into<String>>(&mut self, field: T) {
8871 self.owner = Some(field.into().into());
8872 }
8873 pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
8875 self.set_owner(field.into());
8876 self
8877 }
8878 pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
8880 self.page_size.as_mut().map(|field| field as _)
8881 }
8882 pub fn page_size_mut(&mut self) -> &mut u32 {
8885 self.page_size.get_or_insert_default()
8886 }
8887 pub fn page_size_opt(&self) -> Option<u32> {
8889 self.page_size.as_ref().map(|field| *field)
8890 }
8891 pub fn set_page_size<T: Into<u32>>(&mut self, field: T) {
8893 self.page_size = Some(field.into().into());
8894 }
8895 pub fn with_page_size<T: Into<u32>>(mut self, field: T) -> Self {
8897 self.set_page_size(field.into());
8898 self
8899 }
8900 pub fn page_token_opt(&self) -> Option<&[u8]> {
8902 self.page_token.as_ref().map(|field| field as _)
8903 }
8904 pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
8906 self.page_token = Some(field.into().into());
8907 }
8908 pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
8910 mut self,
8911 field: T,
8912 ) -> Self {
8913 self.set_page_token(field.into());
8914 self
8915 }
8916 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
8918 self.read_mask.as_mut().map(|field| field as _)
8919 }
8920 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
8923 self.read_mask.get_or_insert_default()
8924 }
8925 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
8927 self.read_mask.as_ref().map(|field| field as _)
8928 }
8929 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
8931 self.read_mask = Some(field.into().into());
8932 }
8933 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
8935 mut self,
8936 field: T,
8937 ) -> Self {
8938 self.set_read_mask(field.into());
8939 self
8940 }
8941 pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
8943 self.object_type.as_mut().map(|field| field as _)
8944 }
8945 pub fn object_type_mut(&mut self) -> &mut String {
8948 self.object_type.get_or_insert_default()
8949 }
8950 pub fn object_type_opt(&self) -> Option<&str> {
8952 self.object_type.as_ref().map(|field| field as _)
8953 }
8954 pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
8956 self.object_type = Some(field.into().into());
8957 }
8958 pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
8960 self.set_object_type(field.into());
8961 self
8962 }
8963 }
8964 impl super::ListOwnedObjectsResponse {
8965 pub const fn const_default() -> Self {
8966 Self {
8967 objects: Vec::new(),
8968 next_page_token: None,
8969 }
8970 }
8971 #[doc(hidden)]
8972 pub fn default_instance() -> &'static Self {
8973 static DEFAULT: super::ListOwnedObjectsResponse = super::ListOwnedObjectsResponse::const_default();
8974 &DEFAULT
8975 }
8976 pub fn objects(&self) -> &[super::Object] {
8978 &self.objects
8979 }
8980 pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
8983 &mut self.objects
8984 }
8985 pub fn set_objects(&mut self, field: Vec<super::Object>) {
8987 self.objects = field;
8988 }
8989 pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
8991 self.set_objects(field);
8992 self
8993 }
8994 pub fn next_page_token_opt(&self) -> Option<&[u8]> {
8996 self.next_page_token.as_ref().map(|field| field as _)
8997 }
8998 pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9000 self.next_page_token = Some(field.into().into());
9001 }
9002 pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
9004 mut self,
9005 field: T,
9006 ) -> Self {
9007 self.set_next_page_token(field.into());
9008 self
9009 }
9010 }
9011 impl super::ListPackageVersionsRequest {
9012 pub const fn const_default() -> Self {
9013 Self {
9014 package_id: None,
9015 page_size: None,
9016 page_token: None,
9017 }
9018 }
9019 #[doc(hidden)]
9020 pub fn default_instance() -> &'static Self {
9021 static DEFAULT: super::ListPackageVersionsRequest = super::ListPackageVersionsRequest::const_default();
9022 &DEFAULT
9023 }
9024 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
9026 self.package_id.as_mut().map(|field| field as _)
9027 }
9028 pub fn package_id_mut(&mut self) -> &mut String {
9031 self.package_id.get_or_insert_default()
9032 }
9033 pub fn package_id_opt(&self) -> Option<&str> {
9035 self.package_id.as_ref().map(|field| field as _)
9036 }
9037 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
9039 self.package_id = Some(field.into().into());
9040 }
9041 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
9043 self.set_package_id(field.into());
9044 self
9045 }
9046 pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
9048 self.page_size.as_mut().map(|field| field as _)
9049 }
9050 pub fn page_size_mut(&mut self) -> &mut u32 {
9053 self.page_size.get_or_insert_default()
9054 }
9055 pub fn page_size_opt(&self) -> Option<u32> {
9057 self.page_size.as_ref().map(|field| *field)
9058 }
9059 pub fn set_page_size<T: Into<u32>>(&mut self, field: T) {
9061 self.page_size = Some(field.into().into());
9062 }
9063 pub fn with_page_size<T: Into<u32>>(mut self, field: T) -> Self {
9065 self.set_page_size(field.into());
9066 self
9067 }
9068 pub fn page_token_opt(&self) -> Option<&[u8]> {
9070 self.page_token.as_ref().map(|field| field as _)
9071 }
9072 pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9074 self.page_token = Some(field.into().into());
9075 }
9076 pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
9078 mut self,
9079 field: T,
9080 ) -> Self {
9081 self.set_page_token(field.into());
9082 self
9083 }
9084 }
9085 impl super::ListPackageVersionsResponse {
9086 pub const fn const_default() -> Self {
9087 Self {
9088 versions: Vec::new(),
9089 next_page_token: None,
9090 }
9091 }
9092 #[doc(hidden)]
9093 pub fn default_instance() -> &'static Self {
9094 static DEFAULT: super::ListPackageVersionsResponse = super::ListPackageVersionsResponse::const_default();
9095 &DEFAULT
9096 }
9097 pub fn versions(&self) -> &[super::PackageVersion] {
9099 &self.versions
9100 }
9101 pub fn versions_mut(&mut self) -> &mut Vec<super::PackageVersion> {
9104 &mut self.versions
9105 }
9106 pub fn set_versions(&mut self, field: Vec<super::PackageVersion>) {
9108 self.versions = field;
9109 }
9110 pub fn with_versions(mut self, field: Vec<super::PackageVersion>) -> Self {
9112 self.set_versions(field);
9113 self
9114 }
9115 pub fn next_page_token_opt(&self) -> Option<&[u8]> {
9117 self.next_page_token.as_ref().map(|field| field as _)
9118 }
9119 pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9121 self.next_page_token = Some(field.into().into());
9122 }
9123 pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
9125 mut self,
9126 field: T,
9127 ) -> Self {
9128 self.set_next_page_token(field.into());
9129 self
9130 }
9131 }
9132 impl super::LookupNameRequest {
9133 pub const fn const_default() -> Self {
9134 Self { name: None }
9135 }
9136 #[doc(hidden)]
9137 pub fn default_instance() -> &'static Self {
9138 static DEFAULT: super::LookupNameRequest = super::LookupNameRequest::const_default();
9139 &DEFAULT
9140 }
9141 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
9143 self.name.as_mut().map(|field| field as _)
9144 }
9145 pub fn name_mut(&mut self) -> &mut String {
9148 self.name.get_or_insert_default()
9149 }
9150 pub fn name_opt(&self) -> Option<&str> {
9152 self.name.as_ref().map(|field| field as _)
9153 }
9154 pub fn set_name<T: Into<String>>(&mut self, field: T) {
9156 self.name = Some(field.into().into());
9157 }
9158 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
9160 self.set_name(field.into());
9161 self
9162 }
9163 }
9164 impl super::LookupNameResponse {
9165 pub const fn const_default() -> Self {
9166 Self { record: None }
9167 }
9168 #[doc(hidden)]
9169 pub fn default_instance() -> &'static Self {
9170 static DEFAULT: super::LookupNameResponse = super::LookupNameResponse::const_default();
9171 &DEFAULT
9172 }
9173 pub fn record(&self) -> &super::NameRecord {
9175 self.record
9176 .as_ref()
9177 .map(|field| field as _)
9178 .unwrap_or_else(|| super::NameRecord::default_instance() as _)
9179 }
9180 pub fn record_opt_mut(&mut self) -> Option<&mut super::NameRecord> {
9182 self.record.as_mut().map(|field| field as _)
9183 }
9184 pub fn record_mut(&mut self) -> &mut super::NameRecord {
9187 self.record.get_or_insert_default()
9188 }
9189 pub fn record_opt(&self) -> Option<&super::NameRecord> {
9191 self.record.as_ref().map(|field| field as _)
9192 }
9193 pub fn set_record<T: Into<super::NameRecord>>(&mut self, field: T) {
9195 self.record = Some(field.into().into());
9196 }
9197 pub fn with_record<T: Into<super::NameRecord>>(mut self, field: T) -> Self {
9199 self.set_record(field.into());
9200 self
9201 }
9202 }
9203 impl super::MakeMoveVector {
9204 pub const fn const_default() -> Self {
9205 Self {
9206 element_type: None,
9207 elements: Vec::new(),
9208 }
9209 }
9210 #[doc(hidden)]
9211 pub fn default_instance() -> &'static Self {
9212 static DEFAULT: super::MakeMoveVector = super::MakeMoveVector::const_default();
9213 &DEFAULT
9214 }
9215 pub fn element_type_opt_mut(&mut self) -> Option<&mut String> {
9217 self.element_type.as_mut().map(|field| field as _)
9218 }
9219 pub fn element_type_mut(&mut self) -> &mut String {
9222 self.element_type.get_or_insert_default()
9223 }
9224 pub fn element_type_opt(&self) -> Option<&str> {
9226 self.element_type.as_ref().map(|field| field as _)
9227 }
9228 pub fn set_element_type<T: Into<String>>(&mut self, field: T) {
9230 self.element_type = Some(field.into().into());
9231 }
9232 pub fn with_element_type<T: Into<String>>(mut self, field: T) -> Self {
9234 self.set_element_type(field.into());
9235 self
9236 }
9237 pub fn elements(&self) -> &[super::Argument] {
9239 &self.elements
9240 }
9241 pub fn elements_mut(&mut self) -> &mut Vec<super::Argument> {
9244 &mut self.elements
9245 }
9246 pub fn set_elements(&mut self, field: Vec<super::Argument>) {
9248 self.elements = field;
9249 }
9250 pub fn with_elements(mut self, field: Vec<super::Argument>) -> Self {
9252 self.set_elements(field);
9253 self
9254 }
9255 }
9256 impl super::MergeCoins {
9257 pub const fn const_default() -> Self {
9258 Self {
9259 coin: None,
9260 coins_to_merge: Vec::new(),
9261 }
9262 }
9263 #[doc(hidden)]
9264 pub fn default_instance() -> &'static Self {
9265 static DEFAULT: super::MergeCoins = super::MergeCoins::const_default();
9266 &DEFAULT
9267 }
9268 pub fn coin(&self) -> &super::Argument {
9270 self.coin
9271 .as_ref()
9272 .map(|field| field as _)
9273 .unwrap_or_else(|| super::Argument::default_instance() as _)
9274 }
9275 pub fn coin_opt_mut(&mut self) -> Option<&mut super::Argument> {
9277 self.coin.as_mut().map(|field| field as _)
9278 }
9279 pub fn coin_mut(&mut self) -> &mut super::Argument {
9282 self.coin.get_or_insert_default()
9283 }
9284 pub fn coin_opt(&self) -> Option<&super::Argument> {
9286 self.coin.as_ref().map(|field| field as _)
9287 }
9288 pub fn set_coin<T: Into<super::Argument>>(&mut self, field: T) {
9290 self.coin = Some(field.into().into());
9291 }
9292 pub fn with_coin<T: Into<super::Argument>>(mut self, field: T) -> Self {
9294 self.set_coin(field.into());
9295 self
9296 }
9297 pub fn coins_to_merge(&self) -> &[super::Argument] {
9299 &self.coins_to_merge
9300 }
9301 pub fn coins_to_merge_mut(&mut self) -> &mut Vec<super::Argument> {
9304 &mut self.coins_to_merge
9305 }
9306 pub fn set_coins_to_merge(&mut self, field: Vec<super::Argument>) {
9308 self.coins_to_merge = field;
9309 }
9310 pub fn with_coins_to_merge(mut self, field: Vec<super::Argument>) -> Self {
9312 self.set_coins_to_merge(field);
9313 self
9314 }
9315 }
9316 impl super::Module {
9317 pub const fn const_default() -> Self {
9318 Self {
9319 name: None,
9320 contents: None,
9321 datatypes: Vec::new(),
9322 functions: Vec::new(),
9323 }
9324 }
9325 #[doc(hidden)]
9326 pub fn default_instance() -> &'static Self {
9327 static DEFAULT: super::Module = super::Module::const_default();
9328 &DEFAULT
9329 }
9330 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
9332 self.name.as_mut().map(|field| field as _)
9333 }
9334 pub fn name_mut(&mut self) -> &mut String {
9337 self.name.get_or_insert_default()
9338 }
9339 pub fn name_opt(&self) -> Option<&str> {
9341 self.name.as_ref().map(|field| field as _)
9342 }
9343 pub fn set_name<T: Into<String>>(&mut self, field: T) {
9345 self.name = Some(field.into().into());
9346 }
9347 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
9349 self.set_name(field.into());
9350 self
9351 }
9352 pub fn contents_opt(&self) -> Option<&[u8]> {
9354 self.contents.as_ref().map(|field| field as _)
9355 }
9356 pub fn set_contents<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9358 self.contents = Some(field.into().into());
9359 }
9360 pub fn with_contents<T: Into<::prost::bytes::Bytes>>(
9362 mut self,
9363 field: T,
9364 ) -> Self {
9365 self.set_contents(field.into());
9366 self
9367 }
9368 pub fn datatypes(&self) -> &[super::DatatypeDescriptor] {
9370 &self.datatypes
9371 }
9372 pub fn datatypes_mut(&mut self) -> &mut Vec<super::DatatypeDescriptor> {
9375 &mut self.datatypes
9376 }
9377 pub fn set_datatypes(&mut self, field: Vec<super::DatatypeDescriptor>) {
9379 self.datatypes = field;
9380 }
9381 pub fn with_datatypes(mut self, field: Vec<super::DatatypeDescriptor>) -> Self {
9383 self.set_datatypes(field);
9384 self
9385 }
9386 pub fn functions(&self) -> &[super::FunctionDescriptor] {
9388 &self.functions
9389 }
9390 pub fn functions_mut(&mut self) -> &mut Vec<super::FunctionDescriptor> {
9393 &mut self.functions
9394 }
9395 pub fn set_functions(&mut self, field: Vec<super::FunctionDescriptor>) {
9397 self.functions = field;
9398 }
9399 pub fn with_functions(mut self, field: Vec<super::FunctionDescriptor>) -> Self {
9401 self.set_functions(field);
9402 self
9403 }
9404 }
9405 impl super::MoveAbort {
9406 pub const fn const_default() -> Self {
9407 Self {
9408 abort_code: None,
9409 location: None,
9410 clever_error: None,
9411 }
9412 }
9413 #[doc(hidden)]
9414 pub fn default_instance() -> &'static Self {
9415 static DEFAULT: super::MoveAbort = super::MoveAbort::const_default();
9416 &DEFAULT
9417 }
9418 pub fn abort_code_opt_mut(&mut self) -> Option<&mut u64> {
9420 self.abort_code.as_mut().map(|field| field as _)
9421 }
9422 pub fn abort_code_mut(&mut self) -> &mut u64 {
9425 self.abort_code.get_or_insert_default()
9426 }
9427 pub fn abort_code_opt(&self) -> Option<u64> {
9429 self.abort_code.as_ref().map(|field| *field)
9430 }
9431 pub fn set_abort_code<T: Into<u64>>(&mut self, field: T) {
9433 self.abort_code = Some(field.into().into());
9434 }
9435 pub fn with_abort_code<T: Into<u64>>(mut self, field: T) -> Self {
9437 self.set_abort_code(field.into());
9438 self
9439 }
9440 pub fn location(&self) -> &super::MoveLocation {
9442 self.location
9443 .as_ref()
9444 .map(|field| field as _)
9445 .unwrap_or_else(|| super::MoveLocation::default_instance() as _)
9446 }
9447 pub fn location_opt_mut(&mut self) -> Option<&mut super::MoveLocation> {
9449 self.location.as_mut().map(|field| field as _)
9450 }
9451 pub fn location_mut(&mut self) -> &mut super::MoveLocation {
9454 self.location.get_or_insert_default()
9455 }
9456 pub fn location_opt(&self) -> Option<&super::MoveLocation> {
9458 self.location.as_ref().map(|field| field as _)
9459 }
9460 pub fn set_location<T: Into<super::MoveLocation>>(&mut self, field: T) {
9462 self.location = Some(field.into().into());
9463 }
9464 pub fn with_location<T: Into<super::MoveLocation>>(mut self, field: T) -> Self {
9466 self.set_location(field.into());
9467 self
9468 }
9469 pub fn clever_error(&self) -> &super::CleverError {
9471 self.clever_error
9472 .as_ref()
9473 .map(|field| field as _)
9474 .unwrap_or_else(|| super::CleverError::default_instance() as _)
9475 }
9476 pub fn clever_error_opt_mut(&mut self) -> Option<&mut super::CleverError> {
9478 self.clever_error.as_mut().map(|field| field as _)
9479 }
9480 pub fn clever_error_mut(&mut self) -> &mut super::CleverError {
9483 self.clever_error.get_or_insert_default()
9484 }
9485 pub fn clever_error_opt(&self) -> Option<&super::CleverError> {
9487 self.clever_error.as_ref().map(|field| field as _)
9488 }
9489 pub fn set_clever_error<T: Into<super::CleverError>>(&mut self, field: T) {
9491 self.clever_error = Some(field.into().into());
9492 }
9493 pub fn with_clever_error<T: Into<super::CleverError>>(
9495 mut self,
9496 field: T,
9497 ) -> Self {
9498 self.set_clever_error(field.into());
9499 self
9500 }
9501 }
9502 impl super::MoveCall {
9503 pub const fn const_default() -> Self {
9504 Self {
9505 package: None,
9506 module: None,
9507 function: None,
9508 type_arguments: Vec::new(),
9509 arguments: Vec::new(),
9510 }
9511 }
9512 #[doc(hidden)]
9513 pub fn default_instance() -> &'static Self {
9514 static DEFAULT: super::MoveCall = super::MoveCall::const_default();
9515 &DEFAULT
9516 }
9517 pub fn package_opt_mut(&mut self) -> Option<&mut String> {
9519 self.package.as_mut().map(|field| field as _)
9520 }
9521 pub fn package_mut(&mut self) -> &mut String {
9524 self.package.get_or_insert_default()
9525 }
9526 pub fn package_opt(&self) -> Option<&str> {
9528 self.package.as_ref().map(|field| field as _)
9529 }
9530 pub fn set_package<T: Into<String>>(&mut self, field: T) {
9532 self.package = Some(field.into().into());
9533 }
9534 pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
9536 self.set_package(field.into());
9537 self
9538 }
9539 pub fn module_opt_mut(&mut self) -> Option<&mut String> {
9541 self.module.as_mut().map(|field| field as _)
9542 }
9543 pub fn module_mut(&mut self) -> &mut String {
9546 self.module.get_or_insert_default()
9547 }
9548 pub fn module_opt(&self) -> Option<&str> {
9550 self.module.as_ref().map(|field| field as _)
9551 }
9552 pub fn set_module<T: Into<String>>(&mut self, field: T) {
9554 self.module = Some(field.into().into());
9555 }
9556 pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
9558 self.set_module(field.into());
9559 self
9560 }
9561 pub fn function_opt_mut(&mut self) -> Option<&mut String> {
9563 self.function.as_mut().map(|field| field as _)
9564 }
9565 pub fn function_mut(&mut self) -> &mut String {
9568 self.function.get_or_insert_default()
9569 }
9570 pub fn function_opt(&self) -> Option<&str> {
9572 self.function.as_ref().map(|field| field as _)
9573 }
9574 pub fn set_function<T: Into<String>>(&mut self, field: T) {
9576 self.function = Some(field.into().into());
9577 }
9578 pub fn with_function<T: Into<String>>(mut self, field: T) -> Self {
9580 self.set_function(field.into());
9581 self
9582 }
9583 pub fn type_arguments(&self) -> &[String] {
9585 &self.type_arguments
9586 }
9587 pub fn type_arguments_mut(&mut self) -> &mut Vec<String> {
9590 &mut self.type_arguments
9591 }
9592 pub fn set_type_arguments(&mut self, field: Vec<String>) {
9594 self.type_arguments = field;
9595 }
9596 pub fn with_type_arguments(mut self, field: Vec<String>) -> Self {
9598 self.set_type_arguments(field);
9599 self
9600 }
9601 pub fn arguments(&self) -> &[super::Argument] {
9603 &self.arguments
9604 }
9605 pub fn arguments_mut(&mut self) -> &mut Vec<super::Argument> {
9608 &mut self.arguments
9609 }
9610 pub fn set_arguments(&mut self, field: Vec<super::Argument>) {
9612 self.arguments = field;
9613 }
9614 pub fn with_arguments(mut self, field: Vec<super::Argument>) -> Self {
9616 self.set_arguments(field);
9617 self
9618 }
9619 }
9620 impl super::MoveLocation {
9621 pub const fn const_default() -> Self {
9622 Self {
9623 package: None,
9624 module: None,
9625 function: None,
9626 instruction: None,
9627 function_name: None,
9628 }
9629 }
9630 #[doc(hidden)]
9631 pub fn default_instance() -> &'static Self {
9632 static DEFAULT: super::MoveLocation = super::MoveLocation::const_default();
9633 &DEFAULT
9634 }
9635 pub fn package_opt_mut(&mut self) -> Option<&mut String> {
9637 self.package.as_mut().map(|field| field as _)
9638 }
9639 pub fn package_mut(&mut self) -> &mut String {
9642 self.package.get_or_insert_default()
9643 }
9644 pub fn package_opt(&self) -> Option<&str> {
9646 self.package.as_ref().map(|field| field as _)
9647 }
9648 pub fn set_package<T: Into<String>>(&mut self, field: T) {
9650 self.package = Some(field.into().into());
9651 }
9652 pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
9654 self.set_package(field.into());
9655 self
9656 }
9657 pub fn module_opt_mut(&mut self) -> Option<&mut String> {
9659 self.module.as_mut().map(|field| field as _)
9660 }
9661 pub fn module_mut(&mut self) -> &mut String {
9664 self.module.get_or_insert_default()
9665 }
9666 pub fn module_opt(&self) -> Option<&str> {
9668 self.module.as_ref().map(|field| field as _)
9669 }
9670 pub fn set_module<T: Into<String>>(&mut self, field: T) {
9672 self.module = Some(field.into().into());
9673 }
9674 pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
9676 self.set_module(field.into());
9677 self
9678 }
9679 pub fn function_opt_mut(&mut self) -> Option<&mut u32> {
9681 self.function.as_mut().map(|field| field as _)
9682 }
9683 pub fn function_mut(&mut self) -> &mut u32 {
9686 self.function.get_or_insert_default()
9687 }
9688 pub fn function_opt(&self) -> Option<u32> {
9690 self.function.as_ref().map(|field| *field)
9691 }
9692 pub fn set_function<T: Into<u32>>(&mut self, field: T) {
9694 self.function = Some(field.into().into());
9695 }
9696 pub fn with_function<T: Into<u32>>(mut self, field: T) -> Self {
9698 self.set_function(field.into());
9699 self
9700 }
9701 pub fn instruction_opt_mut(&mut self) -> Option<&mut u32> {
9703 self.instruction.as_mut().map(|field| field as _)
9704 }
9705 pub fn instruction_mut(&mut self) -> &mut u32 {
9708 self.instruction.get_or_insert_default()
9709 }
9710 pub fn instruction_opt(&self) -> Option<u32> {
9712 self.instruction.as_ref().map(|field| *field)
9713 }
9714 pub fn set_instruction<T: Into<u32>>(&mut self, field: T) {
9716 self.instruction = Some(field.into().into());
9717 }
9718 pub fn with_instruction<T: Into<u32>>(mut self, field: T) -> Self {
9720 self.set_instruction(field.into());
9721 self
9722 }
9723 pub fn function_name_opt_mut(&mut self) -> Option<&mut String> {
9725 self.function_name.as_mut().map(|field| field as _)
9726 }
9727 pub fn function_name_mut(&mut self) -> &mut String {
9730 self.function_name.get_or_insert_default()
9731 }
9732 pub fn function_name_opt(&self) -> Option<&str> {
9734 self.function_name.as_ref().map(|field| field as _)
9735 }
9736 pub fn set_function_name<T: Into<String>>(&mut self, field: T) {
9738 self.function_name = Some(field.into().into());
9739 }
9740 pub fn with_function_name<T: Into<String>>(mut self, field: T) -> Self {
9742 self.set_function_name(field.into());
9743 self
9744 }
9745 }
9746 impl super::MoveTable {
9747 pub const fn const_default() -> Self {
9748 Self { id: None, size: None }
9749 }
9750 #[doc(hidden)]
9751 pub fn default_instance() -> &'static Self {
9752 static DEFAULT: super::MoveTable = super::MoveTable::const_default();
9753 &DEFAULT
9754 }
9755 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
9757 self.id.as_mut().map(|field| field as _)
9758 }
9759 pub fn id_mut(&mut self) -> &mut String {
9762 self.id.get_or_insert_default()
9763 }
9764 pub fn id_opt(&self) -> Option<&str> {
9766 self.id.as_ref().map(|field| field as _)
9767 }
9768 pub fn set_id<T: Into<String>>(&mut self, field: T) {
9770 self.id = Some(field.into().into());
9771 }
9772 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
9774 self.set_id(field.into());
9775 self
9776 }
9777 pub fn size_opt_mut(&mut self) -> Option<&mut u64> {
9779 self.size.as_mut().map(|field| field as _)
9780 }
9781 pub fn size_mut(&mut self) -> &mut u64 {
9784 self.size.get_or_insert_default()
9785 }
9786 pub fn size_opt(&self) -> Option<u64> {
9788 self.size.as_ref().map(|field| *field)
9789 }
9790 pub fn set_size<T: Into<u64>>(&mut self, field: T) {
9792 self.size = Some(field.into().into());
9793 }
9794 pub fn with_size<T: Into<u64>>(mut self, field: T) -> Self {
9796 self.set_size(field.into());
9797 self
9798 }
9799 }
9800 impl super::MultisigAggregatedSignature {
9801 pub const fn const_default() -> Self {
9802 Self {
9803 signatures: Vec::new(),
9804 bitmap: None,
9805 legacy_bitmap: None,
9806 committee: None,
9807 }
9808 }
9809 #[doc(hidden)]
9810 pub fn default_instance() -> &'static Self {
9811 static DEFAULT: super::MultisigAggregatedSignature = super::MultisigAggregatedSignature::const_default();
9812 &DEFAULT
9813 }
9814 pub fn signatures(&self) -> &[super::MultisigMemberSignature] {
9816 &self.signatures
9817 }
9818 pub fn signatures_mut(&mut self) -> &mut Vec<super::MultisigMemberSignature> {
9821 &mut self.signatures
9822 }
9823 pub fn set_signatures(&mut self, field: Vec<super::MultisigMemberSignature>) {
9825 self.signatures = field;
9826 }
9827 pub fn with_signatures(
9829 mut self,
9830 field: Vec<super::MultisigMemberSignature>,
9831 ) -> Self {
9832 self.set_signatures(field);
9833 self
9834 }
9835 pub fn bitmap_opt_mut(&mut self) -> Option<&mut u32> {
9837 self.bitmap.as_mut().map(|field| field as _)
9838 }
9839 pub fn bitmap_mut(&mut self) -> &mut u32 {
9842 self.bitmap.get_or_insert_default()
9843 }
9844 pub fn bitmap_opt(&self) -> Option<u32> {
9846 self.bitmap.as_ref().map(|field| *field)
9847 }
9848 pub fn set_bitmap<T: Into<u32>>(&mut self, field: T) {
9850 self.bitmap = Some(field.into().into());
9851 }
9852 pub fn with_bitmap<T: Into<u32>>(mut self, field: T) -> Self {
9854 self.set_bitmap(field.into());
9855 self
9856 }
9857 pub fn legacy_bitmap_opt(&self) -> Option<&[u8]> {
9859 self.legacy_bitmap.as_ref().map(|field| field as _)
9860 }
9861 pub fn set_legacy_bitmap<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9863 self.legacy_bitmap = Some(field.into().into());
9864 }
9865 pub fn with_legacy_bitmap<T: Into<::prost::bytes::Bytes>>(
9867 mut self,
9868 field: T,
9869 ) -> Self {
9870 self.set_legacy_bitmap(field.into());
9871 self
9872 }
9873 pub fn committee(&self) -> &super::MultisigCommittee {
9875 self.committee
9876 .as_ref()
9877 .map(|field| field as _)
9878 .unwrap_or_else(|| super::MultisigCommittee::default_instance() as _)
9879 }
9880 pub fn committee_opt_mut(&mut self) -> Option<&mut super::MultisigCommittee> {
9882 self.committee.as_mut().map(|field| field as _)
9883 }
9884 pub fn committee_mut(&mut self) -> &mut super::MultisigCommittee {
9887 self.committee.get_or_insert_default()
9888 }
9889 pub fn committee_opt(&self) -> Option<&super::MultisigCommittee> {
9891 self.committee.as_ref().map(|field| field as _)
9892 }
9893 pub fn set_committee<T: Into<super::MultisigCommittee>>(&mut self, field: T) {
9895 self.committee = Some(field.into().into());
9896 }
9897 pub fn with_committee<T: Into<super::MultisigCommittee>>(
9899 mut self,
9900 field: T,
9901 ) -> Self {
9902 self.set_committee(field.into());
9903 self
9904 }
9905 }
9906 impl super::MultisigCommittee {
9907 pub const fn const_default() -> Self {
9908 Self {
9909 members: Vec::new(),
9910 threshold: None,
9911 }
9912 }
9913 #[doc(hidden)]
9914 pub fn default_instance() -> &'static Self {
9915 static DEFAULT: super::MultisigCommittee = super::MultisigCommittee::const_default();
9916 &DEFAULT
9917 }
9918 pub fn members(&self) -> &[super::MultisigMember] {
9920 &self.members
9921 }
9922 pub fn members_mut(&mut self) -> &mut Vec<super::MultisigMember> {
9925 &mut self.members
9926 }
9927 pub fn set_members(&mut self, field: Vec<super::MultisigMember>) {
9929 self.members = field;
9930 }
9931 pub fn with_members(mut self, field: Vec<super::MultisigMember>) -> Self {
9933 self.set_members(field);
9934 self
9935 }
9936 pub fn threshold_opt_mut(&mut self) -> Option<&mut u32> {
9938 self.threshold.as_mut().map(|field| field as _)
9939 }
9940 pub fn threshold_mut(&mut self) -> &mut u32 {
9943 self.threshold.get_or_insert_default()
9944 }
9945 pub fn threshold_opt(&self) -> Option<u32> {
9947 self.threshold.as_ref().map(|field| *field)
9948 }
9949 pub fn set_threshold<T: Into<u32>>(&mut self, field: T) {
9951 self.threshold = Some(field.into().into());
9952 }
9953 pub fn with_threshold<T: Into<u32>>(mut self, field: T) -> Self {
9955 self.set_threshold(field.into());
9956 self
9957 }
9958 }
9959 impl super::MultisigMember {
9960 pub const fn const_default() -> Self {
9961 Self {
9962 public_key: None,
9963 weight: None,
9964 }
9965 }
9966 #[doc(hidden)]
9967 pub fn default_instance() -> &'static Self {
9968 static DEFAULT: super::MultisigMember = super::MultisigMember::const_default();
9969 &DEFAULT
9970 }
9971 pub fn public_key(&self) -> &super::MultisigMemberPublicKey {
9973 self.public_key
9974 .as_ref()
9975 .map(|field| field as _)
9976 .unwrap_or_else(|| {
9977 super::MultisigMemberPublicKey::default_instance() as _
9978 })
9979 }
9980 pub fn public_key_opt_mut(
9982 &mut self,
9983 ) -> Option<&mut super::MultisigMemberPublicKey> {
9984 self.public_key.as_mut().map(|field| field as _)
9985 }
9986 pub fn public_key_mut(&mut self) -> &mut super::MultisigMemberPublicKey {
9989 self.public_key.get_or_insert_default()
9990 }
9991 pub fn public_key_opt(&self) -> Option<&super::MultisigMemberPublicKey> {
9993 self.public_key.as_ref().map(|field| field as _)
9994 }
9995 pub fn set_public_key<T: Into<super::MultisigMemberPublicKey>>(
9997 &mut self,
9998 field: T,
9999 ) {
10000 self.public_key = Some(field.into().into());
10001 }
10002 pub fn with_public_key<T: Into<super::MultisigMemberPublicKey>>(
10004 mut self,
10005 field: T,
10006 ) -> Self {
10007 self.set_public_key(field.into());
10008 self
10009 }
10010 pub fn weight_opt_mut(&mut self) -> Option<&mut u32> {
10012 self.weight.as_mut().map(|field| field as _)
10013 }
10014 pub fn weight_mut(&mut self) -> &mut u32 {
10017 self.weight.get_or_insert_default()
10018 }
10019 pub fn weight_opt(&self) -> Option<u32> {
10021 self.weight.as_ref().map(|field| *field)
10022 }
10023 pub fn set_weight<T: Into<u32>>(&mut self, field: T) {
10025 self.weight = Some(field.into().into());
10026 }
10027 pub fn with_weight<T: Into<u32>>(mut self, field: T) -> Self {
10029 self.set_weight(field.into());
10030 self
10031 }
10032 }
10033 impl super::MultisigMemberPublicKey {
10034 pub const fn const_default() -> Self {
10035 Self {
10036 scheme: None,
10037 public_key: None,
10038 zklogin: None,
10039 }
10040 }
10041 #[doc(hidden)]
10042 pub fn default_instance() -> &'static Self {
10043 static DEFAULT: super::MultisigMemberPublicKey = super::MultisigMemberPublicKey::const_default();
10044 &DEFAULT
10045 }
10046 pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
10048 self.set_scheme(field.into());
10049 self
10050 }
10051 pub fn public_key_opt(&self) -> Option<&[u8]> {
10053 self.public_key.as_ref().map(|field| field as _)
10054 }
10055 pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10057 self.public_key = Some(field.into().into());
10058 }
10059 pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
10061 mut self,
10062 field: T,
10063 ) -> Self {
10064 self.set_public_key(field.into());
10065 self
10066 }
10067 pub fn zklogin(&self) -> &super::ZkLoginPublicIdentifier {
10069 self.zklogin
10070 .as_ref()
10071 .map(|field| field as _)
10072 .unwrap_or_else(|| {
10073 super::ZkLoginPublicIdentifier::default_instance() as _
10074 })
10075 }
10076 pub fn zklogin_opt_mut(
10078 &mut self,
10079 ) -> Option<&mut super::ZkLoginPublicIdentifier> {
10080 self.zklogin.as_mut().map(|field| field as _)
10081 }
10082 pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginPublicIdentifier {
10085 self.zklogin.get_or_insert_default()
10086 }
10087 pub fn zklogin_opt(&self) -> Option<&super::ZkLoginPublicIdentifier> {
10089 self.zklogin.as_ref().map(|field| field as _)
10090 }
10091 pub fn set_zklogin<T: Into<super::ZkLoginPublicIdentifier>>(
10093 &mut self,
10094 field: T,
10095 ) {
10096 self.zklogin = Some(field.into().into());
10097 }
10098 pub fn with_zklogin<T: Into<super::ZkLoginPublicIdentifier>>(
10100 mut self,
10101 field: T,
10102 ) -> Self {
10103 self.set_zklogin(field.into());
10104 self
10105 }
10106 }
10107 impl super::MultisigMemberSignature {
10108 pub const fn const_default() -> Self {
10109 Self {
10110 scheme: None,
10111 signature: None,
10112 zklogin: None,
10113 passkey: None,
10114 }
10115 }
10116 #[doc(hidden)]
10117 pub fn default_instance() -> &'static Self {
10118 static DEFAULT: super::MultisigMemberSignature = super::MultisigMemberSignature::const_default();
10119 &DEFAULT
10120 }
10121 pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
10123 self.set_scheme(field.into());
10124 self
10125 }
10126 pub fn signature_opt(&self) -> Option<&[u8]> {
10128 self.signature.as_ref().map(|field| field as _)
10129 }
10130 pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10132 self.signature = Some(field.into().into());
10133 }
10134 pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
10136 mut self,
10137 field: T,
10138 ) -> Self {
10139 self.set_signature(field.into());
10140 self
10141 }
10142 pub fn zklogin(&self) -> &super::ZkLoginAuthenticator {
10144 self.zklogin
10145 .as_ref()
10146 .map(|field| field as _)
10147 .unwrap_or_else(|| super::ZkLoginAuthenticator::default_instance() as _)
10148 }
10149 pub fn zklogin_opt_mut(&mut self) -> Option<&mut super::ZkLoginAuthenticator> {
10151 self.zklogin.as_mut().map(|field| field as _)
10152 }
10153 pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginAuthenticator {
10156 self.zklogin.get_or_insert_default()
10157 }
10158 pub fn zklogin_opt(&self) -> Option<&super::ZkLoginAuthenticator> {
10160 self.zklogin.as_ref().map(|field| field as _)
10161 }
10162 pub fn set_zklogin<T: Into<super::ZkLoginAuthenticator>>(&mut self, field: T) {
10164 self.zklogin = Some(field.into().into());
10165 }
10166 pub fn with_zklogin<T: Into<super::ZkLoginAuthenticator>>(
10168 mut self,
10169 field: T,
10170 ) -> Self {
10171 self.set_zklogin(field.into());
10172 self
10173 }
10174 pub fn passkey(&self) -> &super::PasskeyAuthenticator {
10176 self.passkey
10177 .as_ref()
10178 .map(|field| field as _)
10179 .unwrap_or_else(|| super::PasskeyAuthenticator::default_instance() as _)
10180 }
10181 pub fn passkey_opt_mut(&mut self) -> Option<&mut super::PasskeyAuthenticator> {
10183 self.passkey.as_mut().map(|field| field as _)
10184 }
10185 pub fn passkey_mut(&mut self) -> &mut super::PasskeyAuthenticator {
10188 self.passkey.get_or_insert_default()
10189 }
10190 pub fn passkey_opt(&self) -> Option<&super::PasskeyAuthenticator> {
10192 self.passkey.as_ref().map(|field| field as _)
10193 }
10194 pub fn set_passkey<T: Into<super::PasskeyAuthenticator>>(&mut self, field: T) {
10196 self.passkey = Some(field.into().into());
10197 }
10198 pub fn with_passkey<T: Into<super::PasskeyAuthenticator>>(
10200 mut self,
10201 field: T,
10202 ) -> Self {
10203 self.set_passkey(field.into());
10204 self
10205 }
10206 }
10207 impl super::NameRecord {
10208 pub const fn const_default() -> Self {
10209 Self {
10210 id: None,
10211 name: None,
10212 registration_nft_id: None,
10213 expiration_timestamp: None,
10214 target_address: None,
10215 data: std::collections::BTreeMap::new(),
10216 }
10217 }
10218 #[doc(hidden)]
10219 pub fn default_instance() -> &'static Self {
10220 static DEFAULT: super::NameRecord = super::NameRecord::const_default();
10221 &DEFAULT
10222 }
10223 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
10225 self.id.as_mut().map(|field| field as _)
10226 }
10227 pub fn id_mut(&mut self) -> &mut String {
10230 self.id.get_or_insert_default()
10231 }
10232 pub fn id_opt(&self) -> Option<&str> {
10234 self.id.as_ref().map(|field| field as _)
10235 }
10236 pub fn set_id<T: Into<String>>(&mut self, field: T) {
10238 self.id = Some(field.into().into());
10239 }
10240 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
10242 self.set_id(field.into());
10243 self
10244 }
10245 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
10247 self.name.as_mut().map(|field| field as _)
10248 }
10249 pub fn name_mut(&mut self) -> &mut String {
10252 self.name.get_or_insert_default()
10253 }
10254 pub fn name_opt(&self) -> Option<&str> {
10256 self.name.as_ref().map(|field| field as _)
10257 }
10258 pub fn set_name<T: Into<String>>(&mut self, field: T) {
10260 self.name = Some(field.into().into());
10261 }
10262 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
10264 self.set_name(field.into());
10265 self
10266 }
10267 pub fn registration_nft_id_opt_mut(&mut self) -> Option<&mut String> {
10269 self.registration_nft_id.as_mut().map(|field| field as _)
10270 }
10271 pub fn registration_nft_id_mut(&mut self) -> &mut String {
10274 self.registration_nft_id.get_or_insert_default()
10275 }
10276 pub fn registration_nft_id_opt(&self) -> Option<&str> {
10278 self.registration_nft_id.as_ref().map(|field| field as _)
10279 }
10280 pub fn set_registration_nft_id<T: Into<String>>(&mut self, field: T) {
10282 self.registration_nft_id = Some(field.into().into());
10283 }
10284 pub fn with_registration_nft_id<T: Into<String>>(mut self, field: T) -> Self {
10286 self.set_registration_nft_id(field.into());
10287 self
10288 }
10289 pub fn expiration_timestamp_opt_mut(
10291 &mut self,
10292 ) -> Option<&mut ::prost_types::Timestamp> {
10293 self.expiration_timestamp.as_mut().map(|field| field as _)
10294 }
10295 pub fn expiration_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
10298 self.expiration_timestamp.get_or_insert_default()
10299 }
10300 pub fn expiration_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
10302 self.expiration_timestamp.as_ref().map(|field| field as _)
10303 }
10304 pub fn set_expiration_timestamp<T: Into<::prost_types::Timestamp>>(
10306 &mut self,
10307 field: T,
10308 ) {
10309 self.expiration_timestamp = Some(field.into().into());
10310 }
10311 pub fn with_expiration_timestamp<T: Into<::prost_types::Timestamp>>(
10313 mut self,
10314 field: T,
10315 ) -> Self {
10316 self.set_expiration_timestamp(field.into());
10317 self
10318 }
10319 pub fn target_address_opt_mut(&mut self) -> Option<&mut String> {
10321 self.target_address.as_mut().map(|field| field as _)
10322 }
10323 pub fn target_address_mut(&mut self) -> &mut String {
10326 self.target_address.get_or_insert_default()
10327 }
10328 pub fn target_address_opt(&self) -> Option<&str> {
10330 self.target_address.as_ref().map(|field| field as _)
10331 }
10332 pub fn set_target_address<T: Into<String>>(&mut self, field: T) {
10334 self.target_address = Some(field.into().into());
10335 }
10336 pub fn with_target_address<T: Into<String>>(mut self, field: T) -> Self {
10338 self.set_target_address(field.into());
10339 self
10340 }
10341 pub fn data(&self) -> &::std::collections::BTreeMap<String, String> {
10343 &self.data
10344 }
10345 pub fn data_mut(&mut self) -> &mut ::std::collections::BTreeMap<String, String> {
10348 &mut self.data
10349 }
10350 pub fn set_data(&mut self, field: ::std::collections::BTreeMap<String, String>) {
10352 self.data = field;
10353 }
10354 pub fn with_data(
10356 mut self,
10357 field: ::std::collections::BTreeMap<String, String>,
10358 ) -> Self {
10359 self.set_data(field);
10360 self
10361 }
10362 }
10363 impl super::Object {
10364 pub const fn const_default() -> Self {
10365 Self {
10366 bcs: None,
10367 object_id: None,
10368 version: None,
10369 digest: None,
10370 owner: None,
10371 object_type: None,
10372 has_public_transfer: None,
10373 contents: None,
10374 package: None,
10375 previous_transaction: None,
10376 storage_rebate: None,
10377 json: None,
10378 balance: None,
10379 }
10380 }
10381 #[doc(hidden)]
10382 pub fn default_instance() -> &'static Self {
10383 static DEFAULT: super::Object = super::Object::const_default();
10384 &DEFAULT
10385 }
10386 pub fn bcs(&self) -> &super::Bcs {
10388 self.bcs
10389 .as_ref()
10390 .map(|field| field as _)
10391 .unwrap_or_else(|| super::Bcs::default_instance() as _)
10392 }
10393 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
10395 self.bcs.as_mut().map(|field| field as _)
10396 }
10397 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
10400 self.bcs.get_or_insert_default()
10401 }
10402 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
10404 self.bcs.as_ref().map(|field| field as _)
10405 }
10406 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
10408 self.bcs = Some(field.into().into());
10409 }
10410 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
10412 self.set_bcs(field.into());
10413 self
10414 }
10415 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
10417 self.object_id.as_mut().map(|field| field as _)
10418 }
10419 pub fn object_id_mut(&mut self) -> &mut String {
10422 self.object_id.get_or_insert_default()
10423 }
10424 pub fn object_id_opt(&self) -> Option<&str> {
10426 self.object_id.as_ref().map(|field| field as _)
10427 }
10428 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
10430 self.object_id = Some(field.into().into());
10431 }
10432 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
10434 self.set_object_id(field.into());
10435 self
10436 }
10437 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
10439 self.version.as_mut().map(|field| field as _)
10440 }
10441 pub fn version_mut(&mut self) -> &mut u64 {
10444 self.version.get_or_insert_default()
10445 }
10446 pub fn version_opt(&self) -> Option<u64> {
10448 self.version.as_ref().map(|field| *field)
10449 }
10450 pub fn set_version<T: Into<u64>>(&mut self, field: T) {
10452 self.version = Some(field.into().into());
10453 }
10454 pub fn with_version<T: Into<u64>>(mut self, field: T) -> Self {
10456 self.set_version(field.into());
10457 self
10458 }
10459 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
10461 self.digest.as_mut().map(|field| field as _)
10462 }
10463 pub fn digest_mut(&mut self) -> &mut String {
10466 self.digest.get_or_insert_default()
10467 }
10468 pub fn digest_opt(&self) -> Option<&str> {
10470 self.digest.as_ref().map(|field| field as _)
10471 }
10472 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
10474 self.digest = Some(field.into().into());
10475 }
10476 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
10478 self.set_digest(field.into());
10479 self
10480 }
10481 pub fn owner(&self) -> &super::Owner {
10483 self.owner
10484 .as_ref()
10485 .map(|field| field as _)
10486 .unwrap_or_else(|| super::Owner::default_instance() as _)
10487 }
10488 pub fn owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
10490 self.owner.as_mut().map(|field| field as _)
10491 }
10492 pub fn owner_mut(&mut self) -> &mut super::Owner {
10495 self.owner.get_or_insert_default()
10496 }
10497 pub fn owner_opt(&self) -> Option<&super::Owner> {
10499 self.owner.as_ref().map(|field| field as _)
10500 }
10501 pub fn set_owner<T: Into<super::Owner>>(&mut self, field: T) {
10503 self.owner = Some(field.into().into());
10504 }
10505 pub fn with_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
10507 self.set_owner(field.into());
10508 self
10509 }
10510 pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
10512 self.object_type.as_mut().map(|field| field as _)
10513 }
10514 pub fn object_type_mut(&mut self) -> &mut String {
10517 self.object_type.get_or_insert_default()
10518 }
10519 pub fn object_type_opt(&self) -> Option<&str> {
10521 self.object_type.as_ref().map(|field| field as _)
10522 }
10523 pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
10525 self.object_type = Some(field.into().into());
10526 }
10527 pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
10529 self.set_object_type(field.into());
10530 self
10531 }
10532 pub fn has_public_transfer_opt_mut(&mut self) -> Option<&mut bool> {
10534 self.has_public_transfer.as_mut().map(|field| field as _)
10535 }
10536 pub fn has_public_transfer_mut(&mut self) -> &mut bool {
10539 self.has_public_transfer.get_or_insert_default()
10540 }
10541 pub fn has_public_transfer_opt(&self) -> Option<bool> {
10543 self.has_public_transfer.as_ref().map(|field| *field)
10544 }
10545 pub fn set_has_public_transfer<T: Into<bool>>(&mut self, field: T) {
10547 self.has_public_transfer = Some(field.into().into());
10548 }
10549 pub fn with_has_public_transfer<T: Into<bool>>(mut self, field: T) -> Self {
10551 self.set_has_public_transfer(field.into());
10552 self
10553 }
10554 pub fn contents(&self) -> &super::Bcs {
10556 self.contents
10557 .as_ref()
10558 .map(|field| field as _)
10559 .unwrap_or_else(|| super::Bcs::default_instance() as _)
10560 }
10561 pub fn contents_opt_mut(&mut self) -> Option<&mut super::Bcs> {
10563 self.contents.as_mut().map(|field| field as _)
10564 }
10565 pub fn contents_mut(&mut self) -> &mut super::Bcs {
10568 self.contents.get_or_insert_default()
10569 }
10570 pub fn contents_opt(&self) -> Option<&super::Bcs> {
10572 self.contents.as_ref().map(|field| field as _)
10573 }
10574 pub fn set_contents<T: Into<super::Bcs>>(&mut self, field: T) {
10576 self.contents = Some(field.into().into());
10577 }
10578 pub fn with_contents<T: Into<super::Bcs>>(mut self, field: T) -> Self {
10580 self.set_contents(field.into());
10581 self
10582 }
10583 pub fn package(&self) -> &super::Package {
10585 self.package
10586 .as_ref()
10587 .map(|field| field as _)
10588 .unwrap_or_else(|| super::Package::default_instance() as _)
10589 }
10590 pub fn package_opt_mut(&mut self) -> Option<&mut super::Package> {
10592 self.package.as_mut().map(|field| field as _)
10593 }
10594 pub fn package_mut(&mut self) -> &mut super::Package {
10597 self.package.get_or_insert_default()
10598 }
10599 pub fn package_opt(&self) -> Option<&super::Package> {
10601 self.package.as_ref().map(|field| field as _)
10602 }
10603 pub fn set_package<T: Into<super::Package>>(&mut self, field: T) {
10605 self.package = Some(field.into().into());
10606 }
10607 pub fn with_package<T: Into<super::Package>>(mut self, field: T) -> Self {
10609 self.set_package(field.into());
10610 self
10611 }
10612 pub fn previous_transaction_opt_mut(&mut self) -> Option<&mut String> {
10614 self.previous_transaction.as_mut().map(|field| field as _)
10615 }
10616 pub fn previous_transaction_mut(&mut self) -> &mut String {
10619 self.previous_transaction.get_or_insert_default()
10620 }
10621 pub fn previous_transaction_opt(&self) -> Option<&str> {
10623 self.previous_transaction.as_ref().map(|field| field as _)
10624 }
10625 pub fn set_previous_transaction<T: Into<String>>(&mut self, field: T) {
10627 self.previous_transaction = Some(field.into().into());
10628 }
10629 pub fn with_previous_transaction<T: Into<String>>(mut self, field: T) -> Self {
10631 self.set_previous_transaction(field.into());
10632 self
10633 }
10634 pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
10636 self.storage_rebate.as_mut().map(|field| field as _)
10637 }
10638 pub fn storage_rebate_mut(&mut self) -> &mut u64 {
10641 self.storage_rebate.get_or_insert_default()
10642 }
10643 pub fn storage_rebate_opt(&self) -> Option<u64> {
10645 self.storage_rebate.as_ref().map(|field| *field)
10646 }
10647 pub fn set_storage_rebate<T: Into<u64>>(&mut self, field: T) {
10649 self.storage_rebate = Some(field.into().into());
10650 }
10651 pub fn with_storage_rebate<T: Into<u64>>(mut self, field: T) -> Self {
10653 self.set_storage_rebate(field.into());
10654 self
10655 }
10656 pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
10658 self.json.as_mut().map(|field| field as _)
10659 }
10660 pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
10663 self.json.get_or_insert_default()
10664 }
10665 pub fn json_opt(&self) -> Option<&::prost_types::Value> {
10667 self.json.as_ref().map(|field| field as _)
10668 }
10669 pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
10671 self.json = Some(field.into().into());
10672 }
10673 pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
10675 self.set_json(field.into());
10676 self
10677 }
10678 pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
10680 self.balance.as_mut().map(|field| field as _)
10681 }
10682 pub fn balance_mut(&mut self) -> &mut u64 {
10685 self.balance.get_or_insert_default()
10686 }
10687 pub fn balance_opt(&self) -> Option<u64> {
10689 self.balance.as_ref().map(|field| *field)
10690 }
10691 pub fn set_balance<T: Into<u64>>(&mut self, field: T) {
10693 self.balance = Some(field.into().into());
10694 }
10695 pub fn with_balance<T: Into<u64>>(mut self, field: T) -> Self {
10697 self.set_balance(field.into());
10698 self
10699 }
10700 }
10701 impl super::ObjectReference {
10702 pub const fn const_default() -> Self {
10703 Self {
10704 object_id: None,
10705 version: None,
10706 digest: None,
10707 }
10708 }
10709 #[doc(hidden)]
10710 pub fn default_instance() -> &'static Self {
10711 static DEFAULT: super::ObjectReference = super::ObjectReference::const_default();
10712 &DEFAULT
10713 }
10714 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
10716 self.object_id.as_mut().map(|field| field as _)
10717 }
10718 pub fn object_id_mut(&mut self) -> &mut String {
10721 self.object_id.get_or_insert_default()
10722 }
10723 pub fn object_id_opt(&self) -> Option<&str> {
10725 self.object_id.as_ref().map(|field| field as _)
10726 }
10727 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
10729 self.object_id = Some(field.into().into());
10730 }
10731 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
10733 self.set_object_id(field.into());
10734 self
10735 }
10736 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
10738 self.version.as_mut().map(|field| field as _)
10739 }
10740 pub fn version_mut(&mut self) -> &mut u64 {
10743 self.version.get_or_insert_default()
10744 }
10745 pub fn version_opt(&self) -> Option<u64> {
10747 self.version.as_ref().map(|field| *field)
10748 }
10749 pub fn set_version<T: Into<u64>>(&mut self, field: T) {
10751 self.version = Some(field.into().into());
10752 }
10753 pub fn with_version<T: Into<u64>>(mut self, field: T) -> Self {
10755 self.set_version(field.into());
10756 self
10757 }
10758 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
10760 self.digest.as_mut().map(|field| field as _)
10761 }
10762 pub fn digest_mut(&mut self) -> &mut String {
10765 self.digest.get_or_insert_default()
10766 }
10767 pub fn digest_opt(&self) -> Option<&str> {
10769 self.digest.as_ref().map(|field| field as _)
10770 }
10771 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
10773 self.digest = Some(field.into().into());
10774 }
10775 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
10777 self.set_digest(field.into());
10778 self
10779 }
10780 }
10781 impl super::ObjectSet {
10782 pub const fn const_default() -> Self {
10783 Self { objects: Vec::new() }
10784 }
10785 #[doc(hidden)]
10786 pub fn default_instance() -> &'static Self {
10787 static DEFAULT: super::ObjectSet = super::ObjectSet::const_default();
10788 &DEFAULT
10789 }
10790 pub fn objects(&self) -> &[super::Object] {
10792 &self.objects
10793 }
10794 pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
10797 &mut self.objects
10798 }
10799 pub fn set_objects(&mut self, field: Vec<super::Object>) {
10801 self.objects = field;
10802 }
10803 pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
10805 self.set_objects(field);
10806 self
10807 }
10808 }
10809 impl super::OpenSignature {
10810 pub const fn const_default() -> Self {
10811 Self {
10812 reference: None,
10813 body: None,
10814 }
10815 }
10816 #[doc(hidden)]
10817 pub fn default_instance() -> &'static Self {
10818 static DEFAULT: super::OpenSignature = super::OpenSignature::const_default();
10819 &DEFAULT
10820 }
10821 pub fn with_reference<T: Into<super::open_signature::Reference>>(
10823 mut self,
10824 field: T,
10825 ) -> Self {
10826 self.set_reference(field.into());
10827 self
10828 }
10829 pub fn body(&self) -> &super::OpenSignatureBody {
10831 self.body
10832 .as_ref()
10833 .map(|field| field as _)
10834 .unwrap_or_else(|| super::OpenSignatureBody::default_instance() as _)
10835 }
10836 pub fn body_opt_mut(&mut self) -> Option<&mut super::OpenSignatureBody> {
10838 self.body.as_mut().map(|field| field as _)
10839 }
10840 pub fn body_mut(&mut self) -> &mut super::OpenSignatureBody {
10843 self.body.get_or_insert_default()
10844 }
10845 pub fn body_opt(&self) -> Option<&super::OpenSignatureBody> {
10847 self.body.as_ref().map(|field| field as _)
10848 }
10849 pub fn set_body<T: Into<super::OpenSignatureBody>>(&mut self, field: T) {
10851 self.body = Some(field.into().into());
10852 }
10853 pub fn with_body<T: Into<super::OpenSignatureBody>>(mut self, field: T) -> Self {
10855 self.set_body(field.into());
10856 self
10857 }
10858 }
10859 impl super::OpenSignatureBody {
10860 pub const fn const_default() -> Self {
10861 Self {
10862 r#type: None,
10863 type_name: None,
10864 type_parameter_instantiation: Vec::new(),
10865 type_parameter: None,
10866 }
10867 }
10868 #[doc(hidden)]
10869 pub fn default_instance() -> &'static Self {
10870 static DEFAULT: super::OpenSignatureBody = super::OpenSignatureBody::const_default();
10871 &DEFAULT
10872 }
10873 pub fn with_type<T: Into<super::open_signature_body::Type>>(
10875 mut self,
10876 field: T,
10877 ) -> Self {
10878 self.set_type(field.into());
10879 self
10880 }
10881 pub fn type_name_opt_mut(&mut self) -> Option<&mut String> {
10883 self.type_name.as_mut().map(|field| field as _)
10884 }
10885 pub fn type_name_mut(&mut self) -> &mut String {
10888 self.type_name.get_or_insert_default()
10889 }
10890 pub fn type_name_opt(&self) -> Option<&str> {
10892 self.type_name.as_ref().map(|field| field as _)
10893 }
10894 pub fn set_type_name<T: Into<String>>(&mut self, field: T) {
10896 self.type_name = Some(field.into().into());
10897 }
10898 pub fn with_type_name<T: Into<String>>(mut self, field: T) -> Self {
10900 self.set_type_name(field.into());
10901 self
10902 }
10903 pub fn type_parameter_instantiation(&self) -> &[super::OpenSignatureBody] {
10905 &self.type_parameter_instantiation
10906 }
10907 pub fn type_parameter_instantiation_mut(
10910 &mut self,
10911 ) -> &mut Vec<super::OpenSignatureBody> {
10912 &mut self.type_parameter_instantiation
10913 }
10914 pub fn set_type_parameter_instantiation(
10916 &mut self,
10917 field: Vec<super::OpenSignatureBody>,
10918 ) {
10919 self.type_parameter_instantiation = field;
10920 }
10921 pub fn with_type_parameter_instantiation(
10923 mut self,
10924 field: Vec<super::OpenSignatureBody>,
10925 ) -> Self {
10926 self.set_type_parameter_instantiation(field);
10927 self
10928 }
10929 pub fn type_parameter_opt_mut(&mut self) -> Option<&mut u32> {
10931 self.type_parameter.as_mut().map(|field| field as _)
10932 }
10933 pub fn type_parameter_mut(&mut self) -> &mut u32 {
10936 self.type_parameter.get_or_insert_default()
10937 }
10938 pub fn type_parameter_opt(&self) -> Option<u32> {
10940 self.type_parameter.as_ref().map(|field| *field)
10941 }
10942 pub fn set_type_parameter<T: Into<u32>>(&mut self, field: T) {
10944 self.type_parameter = Some(field.into().into());
10945 }
10946 pub fn with_type_parameter<T: Into<u32>>(mut self, field: T) -> Self {
10948 self.set_type_parameter(field.into());
10949 self
10950 }
10951 }
10952 impl super::Owner {
10953 pub const fn const_default() -> Self {
10954 Self {
10955 kind: None,
10956 address: None,
10957 version: None,
10958 }
10959 }
10960 #[doc(hidden)]
10961 pub fn default_instance() -> &'static Self {
10962 static DEFAULT: super::Owner = super::Owner::const_default();
10963 &DEFAULT
10964 }
10965 pub fn with_kind<T: Into<super::owner::OwnerKind>>(mut self, field: T) -> Self {
10967 self.set_kind(field.into());
10968 self
10969 }
10970 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
10972 self.address.as_mut().map(|field| field as _)
10973 }
10974 pub fn address_mut(&mut self) -> &mut String {
10977 self.address.get_or_insert_default()
10978 }
10979 pub fn address_opt(&self) -> Option<&str> {
10981 self.address.as_ref().map(|field| field as _)
10982 }
10983 pub fn set_address<T: Into<String>>(&mut self, field: T) {
10985 self.address = Some(field.into().into());
10986 }
10987 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
10989 self.set_address(field.into());
10990 self
10991 }
10992 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
10994 self.version.as_mut().map(|field| field as _)
10995 }
10996 pub fn version_mut(&mut self) -> &mut u64 {
10999 self.version.get_or_insert_default()
11000 }
11001 pub fn version_opt(&self) -> Option<u64> {
11003 self.version.as_ref().map(|field| *field)
11004 }
11005 pub fn set_version<T: Into<u64>>(&mut self, field: T) {
11007 self.version = Some(field.into().into());
11008 }
11009 pub fn with_version<T: Into<u64>>(mut self, field: T) -> Self {
11011 self.set_version(field.into());
11012 self
11013 }
11014 }
11015 impl super::Package {
11016 pub const fn const_default() -> Self {
11017 Self {
11018 storage_id: None,
11019 original_id: None,
11020 version: None,
11021 modules: Vec::new(),
11022 type_origins: Vec::new(),
11023 linkage: Vec::new(),
11024 }
11025 }
11026 #[doc(hidden)]
11027 pub fn default_instance() -> &'static Self {
11028 static DEFAULT: super::Package = super::Package::const_default();
11029 &DEFAULT
11030 }
11031 pub fn storage_id_opt_mut(&mut self) -> Option<&mut String> {
11033 self.storage_id.as_mut().map(|field| field as _)
11034 }
11035 pub fn storage_id_mut(&mut self) -> &mut String {
11038 self.storage_id.get_or_insert_default()
11039 }
11040 pub fn storage_id_opt(&self) -> Option<&str> {
11042 self.storage_id.as_ref().map(|field| field as _)
11043 }
11044 pub fn set_storage_id<T: Into<String>>(&mut self, field: T) {
11046 self.storage_id = Some(field.into().into());
11047 }
11048 pub fn with_storage_id<T: Into<String>>(mut self, field: T) -> Self {
11050 self.set_storage_id(field.into());
11051 self
11052 }
11053 pub fn original_id_opt_mut(&mut self) -> Option<&mut String> {
11055 self.original_id.as_mut().map(|field| field as _)
11056 }
11057 pub fn original_id_mut(&mut self) -> &mut String {
11060 self.original_id.get_or_insert_default()
11061 }
11062 pub fn original_id_opt(&self) -> Option<&str> {
11064 self.original_id.as_ref().map(|field| field as _)
11065 }
11066 pub fn set_original_id<T: Into<String>>(&mut self, field: T) {
11068 self.original_id = Some(field.into().into());
11069 }
11070 pub fn with_original_id<T: Into<String>>(mut self, field: T) -> Self {
11072 self.set_original_id(field.into());
11073 self
11074 }
11075 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
11077 self.version.as_mut().map(|field| field as _)
11078 }
11079 pub fn version_mut(&mut self) -> &mut u64 {
11082 self.version.get_or_insert_default()
11083 }
11084 pub fn version_opt(&self) -> Option<u64> {
11086 self.version.as_ref().map(|field| *field)
11087 }
11088 pub fn set_version<T: Into<u64>>(&mut self, field: T) {
11090 self.version = Some(field.into().into());
11091 }
11092 pub fn with_version<T: Into<u64>>(mut self, field: T) -> Self {
11094 self.set_version(field.into());
11095 self
11096 }
11097 pub fn modules(&self) -> &[super::Module] {
11099 &self.modules
11100 }
11101 pub fn modules_mut(&mut self) -> &mut Vec<super::Module> {
11104 &mut self.modules
11105 }
11106 pub fn set_modules(&mut self, field: Vec<super::Module>) {
11108 self.modules = field;
11109 }
11110 pub fn with_modules(mut self, field: Vec<super::Module>) -> Self {
11112 self.set_modules(field);
11113 self
11114 }
11115 pub fn type_origins(&self) -> &[super::TypeOrigin] {
11117 &self.type_origins
11118 }
11119 pub fn type_origins_mut(&mut self) -> &mut Vec<super::TypeOrigin> {
11122 &mut self.type_origins
11123 }
11124 pub fn set_type_origins(&mut self, field: Vec<super::TypeOrigin>) {
11126 self.type_origins = field;
11127 }
11128 pub fn with_type_origins(mut self, field: Vec<super::TypeOrigin>) -> Self {
11130 self.set_type_origins(field);
11131 self
11132 }
11133 pub fn linkage(&self) -> &[super::Linkage] {
11135 &self.linkage
11136 }
11137 pub fn linkage_mut(&mut self) -> &mut Vec<super::Linkage> {
11140 &mut self.linkage
11141 }
11142 pub fn set_linkage(&mut self, field: Vec<super::Linkage>) {
11144 self.linkage = field;
11145 }
11146 pub fn with_linkage(mut self, field: Vec<super::Linkage>) -> Self {
11148 self.set_linkage(field);
11149 self
11150 }
11151 }
11152 impl super::PackageUpgradeError {
11153 pub const fn const_default() -> Self {
11154 Self {
11155 kind: None,
11156 package_id: None,
11157 digest: None,
11158 policy: None,
11159 ticket_id: None,
11160 }
11161 }
11162 #[doc(hidden)]
11163 pub fn default_instance() -> &'static Self {
11164 static DEFAULT: super::PackageUpgradeError = super::PackageUpgradeError::const_default();
11165 &DEFAULT
11166 }
11167 pub fn with_kind<T: Into<super::package_upgrade_error::PackageUpgradeErrorKind>>(
11169 mut self,
11170 field: T,
11171 ) -> Self {
11172 self.set_kind(field.into());
11173 self
11174 }
11175 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
11177 self.package_id.as_mut().map(|field| field as _)
11178 }
11179 pub fn package_id_mut(&mut self) -> &mut String {
11182 self.package_id.get_or_insert_default()
11183 }
11184 pub fn package_id_opt(&self) -> Option<&str> {
11186 self.package_id.as_ref().map(|field| field as _)
11187 }
11188 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
11190 self.package_id = Some(field.into().into());
11191 }
11192 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
11194 self.set_package_id(field.into());
11195 self
11196 }
11197 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
11199 self.digest.as_mut().map(|field| field as _)
11200 }
11201 pub fn digest_mut(&mut self) -> &mut String {
11204 self.digest.get_or_insert_default()
11205 }
11206 pub fn digest_opt(&self) -> Option<&str> {
11208 self.digest.as_ref().map(|field| field as _)
11209 }
11210 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
11212 self.digest = Some(field.into().into());
11213 }
11214 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
11216 self.set_digest(field.into());
11217 self
11218 }
11219 pub fn policy_opt_mut(&mut self) -> Option<&mut u32> {
11221 self.policy.as_mut().map(|field| field as _)
11222 }
11223 pub fn policy_mut(&mut self) -> &mut u32 {
11226 self.policy.get_or_insert_default()
11227 }
11228 pub fn policy_opt(&self) -> Option<u32> {
11230 self.policy.as_ref().map(|field| *field)
11231 }
11232 pub fn set_policy<T: Into<u32>>(&mut self, field: T) {
11234 self.policy = Some(field.into().into());
11235 }
11236 pub fn with_policy<T: Into<u32>>(mut self, field: T) -> Self {
11238 self.set_policy(field.into());
11239 self
11240 }
11241 pub fn ticket_id_opt_mut(&mut self) -> Option<&mut String> {
11243 self.ticket_id.as_mut().map(|field| field as _)
11244 }
11245 pub fn ticket_id_mut(&mut self) -> &mut String {
11248 self.ticket_id.get_or_insert_default()
11249 }
11250 pub fn ticket_id_opt(&self) -> Option<&str> {
11252 self.ticket_id.as_ref().map(|field| field as _)
11253 }
11254 pub fn set_ticket_id<T: Into<String>>(&mut self, field: T) {
11256 self.ticket_id = Some(field.into().into());
11257 }
11258 pub fn with_ticket_id<T: Into<String>>(mut self, field: T) -> Self {
11260 self.set_ticket_id(field.into());
11261 self
11262 }
11263 }
11264 impl super::PackageVersion {
11265 pub const fn const_default() -> Self {
11266 Self {
11267 package_id: None,
11268 version: None,
11269 }
11270 }
11271 #[doc(hidden)]
11272 pub fn default_instance() -> &'static Self {
11273 static DEFAULT: super::PackageVersion = super::PackageVersion::const_default();
11274 &DEFAULT
11275 }
11276 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
11278 self.package_id.as_mut().map(|field| field as _)
11279 }
11280 pub fn package_id_mut(&mut self) -> &mut String {
11283 self.package_id.get_or_insert_default()
11284 }
11285 pub fn package_id_opt(&self) -> Option<&str> {
11287 self.package_id.as_ref().map(|field| field as _)
11288 }
11289 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
11291 self.package_id = Some(field.into().into());
11292 }
11293 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
11295 self.set_package_id(field.into());
11296 self
11297 }
11298 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
11300 self.version.as_mut().map(|field| field as _)
11301 }
11302 pub fn version_mut(&mut self) -> &mut u64 {
11305 self.version.get_or_insert_default()
11306 }
11307 pub fn version_opt(&self) -> Option<u64> {
11309 self.version.as_ref().map(|field| *field)
11310 }
11311 pub fn set_version<T: Into<u64>>(&mut self, field: T) {
11313 self.version = Some(field.into().into());
11314 }
11315 pub fn with_version<T: Into<u64>>(mut self, field: T) -> Self {
11317 self.set_version(field.into());
11318 self
11319 }
11320 }
11321 impl super::PasskeyAuthenticator {
11322 pub const fn const_default() -> Self {
11323 Self {
11324 authenticator_data: None,
11325 client_data_json: None,
11326 signature: None,
11327 }
11328 }
11329 #[doc(hidden)]
11330 pub fn default_instance() -> &'static Self {
11331 static DEFAULT: super::PasskeyAuthenticator = super::PasskeyAuthenticator::const_default();
11332 &DEFAULT
11333 }
11334 pub fn authenticator_data_opt(&self) -> Option<&[u8]> {
11336 self.authenticator_data.as_ref().map(|field| field as _)
11337 }
11338 pub fn set_authenticator_data<T: Into<::prost::bytes::Bytes>>(
11340 &mut self,
11341 field: T,
11342 ) {
11343 self.authenticator_data = Some(field.into().into());
11344 }
11345 pub fn with_authenticator_data<T: Into<::prost::bytes::Bytes>>(
11347 mut self,
11348 field: T,
11349 ) -> Self {
11350 self.set_authenticator_data(field.into());
11351 self
11352 }
11353 pub fn client_data_json_opt_mut(&mut self) -> Option<&mut String> {
11355 self.client_data_json.as_mut().map(|field| field as _)
11356 }
11357 pub fn client_data_json_mut(&mut self) -> &mut String {
11360 self.client_data_json.get_or_insert_default()
11361 }
11362 pub fn client_data_json_opt(&self) -> Option<&str> {
11364 self.client_data_json.as_ref().map(|field| field as _)
11365 }
11366 pub fn set_client_data_json<T: Into<String>>(&mut self, field: T) {
11368 self.client_data_json = Some(field.into().into());
11369 }
11370 pub fn with_client_data_json<T: Into<String>>(mut self, field: T) -> Self {
11372 self.set_client_data_json(field.into());
11373 self
11374 }
11375 pub fn signature(&self) -> &super::SimpleSignature {
11377 self.signature
11378 .as_ref()
11379 .map(|field| field as _)
11380 .unwrap_or_else(|| super::SimpleSignature::default_instance() as _)
11381 }
11382 pub fn signature_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
11384 self.signature.as_mut().map(|field| field as _)
11385 }
11386 pub fn signature_mut(&mut self) -> &mut super::SimpleSignature {
11389 self.signature.get_or_insert_default()
11390 }
11391 pub fn signature_opt(&self) -> Option<&super::SimpleSignature> {
11393 self.signature.as_ref().map(|field| field as _)
11394 }
11395 pub fn set_signature<T: Into<super::SimpleSignature>>(&mut self, field: T) {
11397 self.signature = Some(field.into().into());
11398 }
11399 pub fn with_signature<T: Into<super::SimpleSignature>>(
11401 mut self,
11402 field: T,
11403 ) -> Self {
11404 self.set_signature(field.into());
11405 self
11406 }
11407 }
11408 impl super::ProgrammableTransaction {
11409 pub const fn const_default() -> Self {
11410 Self {
11411 inputs: Vec::new(),
11412 commands: Vec::new(),
11413 }
11414 }
11415 #[doc(hidden)]
11416 pub fn default_instance() -> &'static Self {
11417 static DEFAULT: super::ProgrammableTransaction = super::ProgrammableTransaction::const_default();
11418 &DEFAULT
11419 }
11420 pub fn inputs(&self) -> &[super::Input] {
11422 &self.inputs
11423 }
11424 pub fn inputs_mut(&mut self) -> &mut Vec<super::Input> {
11427 &mut self.inputs
11428 }
11429 pub fn set_inputs(&mut self, field: Vec<super::Input>) {
11431 self.inputs = field;
11432 }
11433 pub fn with_inputs(mut self, field: Vec<super::Input>) -> Self {
11435 self.set_inputs(field);
11436 self
11437 }
11438 pub fn commands(&self) -> &[super::Command] {
11440 &self.commands
11441 }
11442 pub fn commands_mut(&mut self) -> &mut Vec<super::Command> {
11445 &mut self.commands
11446 }
11447 pub fn set_commands(&mut self, field: Vec<super::Command>) {
11449 self.commands = field;
11450 }
11451 pub fn with_commands(mut self, field: Vec<super::Command>) -> Self {
11453 self.set_commands(field);
11454 self
11455 }
11456 }
11457 impl super::ProtocolConfig {
11458 pub const fn const_default() -> Self {
11459 Self {
11460 protocol_version: None,
11461 feature_flags: std::collections::BTreeMap::new(),
11462 attributes: std::collections::BTreeMap::new(),
11463 }
11464 }
11465 #[doc(hidden)]
11466 pub fn default_instance() -> &'static Self {
11467 static DEFAULT: super::ProtocolConfig = super::ProtocolConfig::const_default();
11468 &DEFAULT
11469 }
11470 pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
11472 self.protocol_version.as_mut().map(|field| field as _)
11473 }
11474 pub fn protocol_version_mut(&mut self) -> &mut u64 {
11477 self.protocol_version.get_or_insert_default()
11478 }
11479 pub fn protocol_version_opt(&self) -> Option<u64> {
11481 self.protocol_version.as_ref().map(|field| *field)
11482 }
11483 pub fn set_protocol_version<T: Into<u64>>(&mut self, field: T) {
11485 self.protocol_version = Some(field.into().into());
11486 }
11487 pub fn with_protocol_version<T: Into<u64>>(mut self, field: T) -> Self {
11489 self.set_protocol_version(field.into());
11490 self
11491 }
11492 pub fn feature_flags(&self) -> &::std::collections::BTreeMap<String, bool> {
11494 &self.feature_flags
11495 }
11496 pub fn feature_flags_mut(
11499 &mut self,
11500 ) -> &mut ::std::collections::BTreeMap<String, bool> {
11501 &mut self.feature_flags
11502 }
11503 pub fn set_feature_flags(
11505 &mut self,
11506 field: ::std::collections::BTreeMap<String, bool>,
11507 ) {
11508 self.feature_flags = field;
11509 }
11510 pub fn with_feature_flags(
11512 mut self,
11513 field: ::std::collections::BTreeMap<String, bool>,
11514 ) -> Self {
11515 self.set_feature_flags(field);
11516 self
11517 }
11518 pub fn attributes(&self) -> &::std::collections::BTreeMap<String, String> {
11520 &self.attributes
11521 }
11522 pub fn attributes_mut(
11525 &mut self,
11526 ) -> &mut ::std::collections::BTreeMap<String, String> {
11527 &mut self.attributes
11528 }
11529 pub fn set_attributes(
11531 &mut self,
11532 field: ::std::collections::BTreeMap<String, String>,
11533 ) {
11534 self.attributes = field;
11535 }
11536 pub fn with_attributes(
11538 mut self,
11539 field: ::std::collections::BTreeMap<String, String>,
11540 ) -> Self {
11541 self.set_attributes(field);
11542 self
11543 }
11544 }
11545 impl super::Publish {
11546 pub const fn const_default() -> Self {
11547 Self {
11548 modules: Vec::new(),
11549 dependencies: Vec::new(),
11550 }
11551 }
11552 #[doc(hidden)]
11553 pub fn default_instance() -> &'static Self {
11554 static DEFAULT: super::Publish = super::Publish::const_default();
11555 &DEFAULT
11556 }
11557 pub fn modules(&self) -> &[::prost::bytes::Bytes] {
11559 &self.modules
11560 }
11561 pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
11564 &mut self.modules
11565 }
11566 pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
11568 self.modules = field;
11569 }
11570 pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
11572 self.set_modules(field);
11573 self
11574 }
11575 pub fn dependencies(&self) -> &[String] {
11577 &self.dependencies
11578 }
11579 pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
11582 &mut self.dependencies
11583 }
11584 pub fn set_dependencies(&mut self, field: Vec<String>) {
11586 self.dependencies = field;
11587 }
11588 pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
11590 self.set_dependencies(field);
11591 self
11592 }
11593 }
11594 impl super::RandomnessStateUpdate {
11595 pub const fn const_default() -> Self {
11596 Self {
11597 epoch: None,
11598 randomness_round: None,
11599 random_bytes: None,
11600 randomness_object_initial_shared_version: None,
11601 }
11602 }
11603 #[doc(hidden)]
11604 pub fn default_instance() -> &'static Self {
11605 static DEFAULT: super::RandomnessStateUpdate = super::RandomnessStateUpdate::const_default();
11606 &DEFAULT
11607 }
11608 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
11610 self.epoch.as_mut().map(|field| field as _)
11611 }
11612 pub fn epoch_mut(&mut self) -> &mut u64 {
11615 self.epoch.get_or_insert_default()
11616 }
11617 pub fn epoch_opt(&self) -> Option<u64> {
11619 self.epoch.as_ref().map(|field| *field)
11620 }
11621 pub fn set_epoch<T: Into<u64>>(&mut self, field: T) {
11623 self.epoch = Some(field.into().into());
11624 }
11625 pub fn with_epoch<T: Into<u64>>(mut self, field: T) -> Self {
11627 self.set_epoch(field.into());
11628 self
11629 }
11630 pub fn randomness_round_opt_mut(&mut self) -> Option<&mut u64> {
11632 self.randomness_round.as_mut().map(|field| field as _)
11633 }
11634 pub fn randomness_round_mut(&mut self) -> &mut u64 {
11637 self.randomness_round.get_or_insert_default()
11638 }
11639 pub fn randomness_round_opt(&self) -> Option<u64> {
11641 self.randomness_round.as_ref().map(|field| *field)
11642 }
11643 pub fn set_randomness_round<T: Into<u64>>(&mut self, field: T) {
11645 self.randomness_round = Some(field.into().into());
11646 }
11647 pub fn with_randomness_round<T: Into<u64>>(mut self, field: T) -> Self {
11649 self.set_randomness_round(field.into());
11650 self
11651 }
11652 pub fn random_bytes_opt(&self) -> Option<&[u8]> {
11654 self.random_bytes.as_ref().map(|field| field as _)
11655 }
11656 pub fn set_random_bytes<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
11658 self.random_bytes = Some(field.into().into());
11659 }
11660 pub fn with_random_bytes<T: Into<::prost::bytes::Bytes>>(
11662 mut self,
11663 field: T,
11664 ) -> Self {
11665 self.set_random_bytes(field.into());
11666 self
11667 }
11668 pub fn randomness_object_initial_shared_version_opt_mut(
11670 &mut self,
11671 ) -> Option<&mut u64> {
11672 self.randomness_object_initial_shared_version
11673 .as_mut()
11674 .map(|field| field as _)
11675 }
11676 pub fn randomness_object_initial_shared_version_mut(&mut self) -> &mut u64 {
11679 self.randomness_object_initial_shared_version.get_or_insert_default()
11680 }
11681 pub fn randomness_object_initial_shared_version_opt(&self) -> Option<u64> {
11683 self.randomness_object_initial_shared_version.as_ref().map(|field| *field)
11684 }
11685 pub fn set_randomness_object_initial_shared_version<T: Into<u64>>(
11687 &mut self,
11688 field: T,
11689 ) {
11690 self.randomness_object_initial_shared_version = Some(field.into().into());
11691 }
11692 pub fn with_randomness_object_initial_shared_version<T: Into<u64>>(
11694 mut self,
11695 field: T,
11696 ) -> Self {
11697 self.set_randomness_object_initial_shared_version(field.into());
11698 self
11699 }
11700 }
11701 impl super::RegulatedCoinMetadata {
11702 pub const fn const_default() -> Self {
11703 Self {
11704 id: None,
11705 coin_metadata_object: None,
11706 deny_cap_object: None,
11707 allow_global_pause: None,
11708 variant: None,
11709 coin_regulated_state: None,
11710 }
11711 }
11712 #[doc(hidden)]
11713 pub fn default_instance() -> &'static Self {
11714 static DEFAULT: super::RegulatedCoinMetadata = super::RegulatedCoinMetadata::const_default();
11715 &DEFAULT
11716 }
11717 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
11719 self.id.as_mut().map(|field| field as _)
11720 }
11721 pub fn id_mut(&mut self) -> &mut String {
11724 self.id.get_or_insert_default()
11725 }
11726 pub fn id_opt(&self) -> Option<&str> {
11728 self.id.as_ref().map(|field| field as _)
11729 }
11730 pub fn set_id<T: Into<String>>(&mut self, field: T) {
11732 self.id = Some(field.into().into());
11733 }
11734 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
11736 self.set_id(field.into());
11737 self
11738 }
11739 pub fn coin_metadata_object_opt_mut(&mut self) -> Option<&mut String> {
11741 self.coin_metadata_object.as_mut().map(|field| field as _)
11742 }
11743 pub fn coin_metadata_object_mut(&mut self) -> &mut String {
11746 self.coin_metadata_object.get_or_insert_default()
11747 }
11748 pub fn coin_metadata_object_opt(&self) -> Option<&str> {
11750 self.coin_metadata_object.as_ref().map(|field| field as _)
11751 }
11752 pub fn set_coin_metadata_object<T: Into<String>>(&mut self, field: T) {
11754 self.coin_metadata_object = Some(field.into().into());
11755 }
11756 pub fn with_coin_metadata_object<T: Into<String>>(mut self, field: T) -> Self {
11758 self.set_coin_metadata_object(field.into());
11759 self
11760 }
11761 pub fn deny_cap_object_opt_mut(&mut self) -> Option<&mut String> {
11763 self.deny_cap_object.as_mut().map(|field| field as _)
11764 }
11765 pub fn deny_cap_object_mut(&mut self) -> &mut String {
11768 self.deny_cap_object.get_or_insert_default()
11769 }
11770 pub fn deny_cap_object_opt(&self) -> Option<&str> {
11772 self.deny_cap_object.as_ref().map(|field| field as _)
11773 }
11774 pub fn set_deny_cap_object<T: Into<String>>(&mut self, field: T) {
11776 self.deny_cap_object = Some(field.into().into());
11777 }
11778 pub fn with_deny_cap_object<T: Into<String>>(mut self, field: T) -> Self {
11780 self.set_deny_cap_object(field.into());
11781 self
11782 }
11783 pub fn allow_global_pause_opt_mut(&mut self) -> Option<&mut bool> {
11785 self.allow_global_pause.as_mut().map(|field| field as _)
11786 }
11787 pub fn allow_global_pause_mut(&mut self) -> &mut bool {
11790 self.allow_global_pause.get_or_insert_default()
11791 }
11792 pub fn allow_global_pause_opt(&self) -> Option<bool> {
11794 self.allow_global_pause.as_ref().map(|field| *field)
11795 }
11796 pub fn set_allow_global_pause<T: Into<bool>>(&mut self, field: T) {
11798 self.allow_global_pause = Some(field.into().into());
11799 }
11800 pub fn with_allow_global_pause<T: Into<bool>>(mut self, field: T) -> Self {
11802 self.set_allow_global_pause(field.into());
11803 self
11804 }
11805 pub fn variant_opt_mut(&mut self) -> Option<&mut u32> {
11807 self.variant.as_mut().map(|field| field as _)
11808 }
11809 pub fn variant_mut(&mut self) -> &mut u32 {
11812 self.variant.get_or_insert_default()
11813 }
11814 pub fn variant_opt(&self) -> Option<u32> {
11816 self.variant.as_ref().map(|field| *field)
11817 }
11818 pub fn set_variant<T: Into<u32>>(&mut self, field: T) {
11820 self.variant = Some(field.into().into());
11821 }
11822 pub fn with_variant<T: Into<u32>>(mut self, field: T) -> Self {
11824 self.set_variant(field.into());
11825 self
11826 }
11827 pub fn with_coin_regulated_state<
11829 T: Into<super::regulated_coin_metadata::CoinRegulatedState>,
11830 >(mut self, field: T) -> Self {
11831 self.set_coin_regulated_state(field.into());
11832 self
11833 }
11834 }
11835 impl super::ReverseLookupNameRequest {
11836 pub const fn const_default() -> Self {
11837 Self { address: None }
11838 }
11839 #[doc(hidden)]
11840 pub fn default_instance() -> &'static Self {
11841 static DEFAULT: super::ReverseLookupNameRequest = super::ReverseLookupNameRequest::const_default();
11842 &DEFAULT
11843 }
11844 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
11846 self.address.as_mut().map(|field| field as _)
11847 }
11848 pub fn address_mut(&mut self) -> &mut String {
11851 self.address.get_or_insert_default()
11852 }
11853 pub fn address_opt(&self) -> Option<&str> {
11855 self.address.as_ref().map(|field| field as _)
11856 }
11857 pub fn set_address<T: Into<String>>(&mut self, field: T) {
11859 self.address = Some(field.into().into());
11860 }
11861 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
11863 self.set_address(field.into());
11864 self
11865 }
11866 }
11867 impl super::ReverseLookupNameResponse {
11868 pub const fn const_default() -> Self {
11869 Self { record: None }
11870 }
11871 #[doc(hidden)]
11872 pub fn default_instance() -> &'static Self {
11873 static DEFAULT: super::ReverseLookupNameResponse = super::ReverseLookupNameResponse::const_default();
11874 &DEFAULT
11875 }
11876 pub fn record(&self) -> &super::NameRecord {
11878 self.record
11879 .as_ref()
11880 .map(|field| field as _)
11881 .unwrap_or_else(|| super::NameRecord::default_instance() as _)
11882 }
11883 pub fn record_opt_mut(&mut self) -> Option<&mut super::NameRecord> {
11885 self.record.as_mut().map(|field| field as _)
11886 }
11887 pub fn record_mut(&mut self) -> &mut super::NameRecord {
11890 self.record.get_or_insert_default()
11891 }
11892 pub fn record_opt(&self) -> Option<&super::NameRecord> {
11894 self.record.as_ref().map(|field| field as _)
11895 }
11896 pub fn set_record<T: Into<super::NameRecord>>(&mut self, field: T) {
11898 self.record = Some(field.into().into());
11899 }
11900 pub fn with_record<T: Into<super::NameRecord>>(mut self, field: T) -> Self {
11902 self.set_record(field.into());
11903 self
11904 }
11905 }
11906 impl super::SimpleSignature {
11907 pub const fn const_default() -> Self {
11908 Self {
11909 scheme: None,
11910 signature: None,
11911 public_key: None,
11912 }
11913 }
11914 #[doc(hidden)]
11915 pub fn default_instance() -> &'static Self {
11916 static DEFAULT: super::SimpleSignature = super::SimpleSignature::const_default();
11917 &DEFAULT
11918 }
11919 pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
11921 self.set_scheme(field.into());
11922 self
11923 }
11924 pub fn signature_opt(&self) -> Option<&[u8]> {
11926 self.signature.as_ref().map(|field| field as _)
11927 }
11928 pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
11930 self.signature = Some(field.into().into());
11931 }
11932 pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
11934 mut self,
11935 field: T,
11936 ) -> Self {
11937 self.set_signature(field.into());
11938 self
11939 }
11940 pub fn public_key_opt(&self) -> Option<&[u8]> {
11942 self.public_key.as_ref().map(|field| field as _)
11943 }
11944 pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
11946 self.public_key = Some(field.into().into());
11947 }
11948 pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
11950 mut self,
11951 field: T,
11952 ) -> Self {
11953 self.set_public_key(field.into());
11954 self
11955 }
11956 }
11957 impl super::SimulateTransactionRequest {
11958 pub const fn const_default() -> Self {
11959 Self {
11960 transaction: None,
11961 read_mask: None,
11962 checks: None,
11963 do_gas_selection: None,
11964 }
11965 }
11966 #[doc(hidden)]
11967 pub fn default_instance() -> &'static Self {
11968 static DEFAULT: super::SimulateTransactionRequest = super::SimulateTransactionRequest::const_default();
11969 &DEFAULT
11970 }
11971 pub fn transaction(&self) -> &super::Transaction {
11973 self.transaction
11974 .as_ref()
11975 .map(|field| field as _)
11976 .unwrap_or_else(|| super::Transaction::default_instance() as _)
11977 }
11978 pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
11980 self.transaction.as_mut().map(|field| field as _)
11981 }
11982 pub fn transaction_mut(&mut self) -> &mut super::Transaction {
11985 self.transaction.get_or_insert_default()
11986 }
11987 pub fn transaction_opt(&self) -> Option<&super::Transaction> {
11989 self.transaction.as_ref().map(|field| field as _)
11990 }
11991 pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
11993 self.transaction = Some(field.into().into());
11994 }
11995 pub fn with_transaction<T: Into<super::Transaction>>(
11997 mut self,
11998 field: T,
11999 ) -> Self {
12000 self.set_transaction(field.into());
12001 self
12002 }
12003 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
12005 self.read_mask.as_mut().map(|field| field as _)
12006 }
12007 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
12010 self.read_mask.get_or_insert_default()
12011 }
12012 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
12014 self.read_mask.as_ref().map(|field| field as _)
12015 }
12016 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
12018 self.read_mask = Some(field.into().into());
12019 }
12020 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
12022 mut self,
12023 field: T,
12024 ) -> Self {
12025 self.set_read_mask(field.into());
12026 self
12027 }
12028 pub fn with_checks<
12030 T: Into<super::simulate_transaction_request::TransactionChecks>,
12031 >(mut self, field: T) -> Self {
12032 self.set_checks(field.into());
12033 self
12034 }
12035 pub fn do_gas_selection_opt_mut(&mut self) -> Option<&mut bool> {
12037 self.do_gas_selection.as_mut().map(|field| field as _)
12038 }
12039 pub fn do_gas_selection_mut(&mut self) -> &mut bool {
12042 self.do_gas_selection.get_or_insert_default()
12043 }
12044 pub fn do_gas_selection_opt(&self) -> Option<bool> {
12046 self.do_gas_selection.as_ref().map(|field| *field)
12047 }
12048 pub fn set_do_gas_selection<T: Into<bool>>(&mut self, field: T) {
12050 self.do_gas_selection = Some(field.into().into());
12051 }
12052 pub fn with_do_gas_selection<T: Into<bool>>(mut self, field: T) -> Self {
12054 self.set_do_gas_selection(field.into());
12055 self
12056 }
12057 }
12058 impl super::SimulateTransactionResponse {
12059 pub const fn const_default() -> Self {
12060 Self {
12061 transaction: None,
12062 command_outputs: Vec::new(),
12063 }
12064 }
12065 #[doc(hidden)]
12066 pub fn default_instance() -> &'static Self {
12067 static DEFAULT: super::SimulateTransactionResponse = super::SimulateTransactionResponse::const_default();
12068 &DEFAULT
12069 }
12070 pub fn transaction(&self) -> &super::ExecutedTransaction {
12072 self.transaction
12073 .as_ref()
12074 .map(|field| field as _)
12075 .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
12076 }
12077 pub fn transaction_opt_mut(
12079 &mut self,
12080 ) -> Option<&mut super::ExecutedTransaction> {
12081 self.transaction.as_mut().map(|field| field as _)
12082 }
12083 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
12086 self.transaction.get_or_insert_default()
12087 }
12088 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
12090 self.transaction.as_ref().map(|field| field as _)
12091 }
12092 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
12094 &mut self,
12095 field: T,
12096 ) {
12097 self.transaction = Some(field.into().into());
12098 }
12099 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
12101 mut self,
12102 field: T,
12103 ) -> Self {
12104 self.set_transaction(field.into());
12105 self
12106 }
12107 pub fn command_outputs(&self) -> &[super::CommandResult] {
12109 &self.command_outputs
12110 }
12111 pub fn command_outputs_mut(&mut self) -> &mut Vec<super::CommandResult> {
12114 &mut self.command_outputs
12115 }
12116 pub fn set_command_outputs(&mut self, field: Vec<super::CommandResult>) {
12118 self.command_outputs = field;
12119 }
12120 pub fn with_command_outputs(mut self, field: Vec<super::CommandResult>) -> Self {
12122 self.set_command_outputs(field);
12123 self
12124 }
12125 }
12126 impl super::SizeError {
12127 pub const fn const_default() -> Self {
12128 Self { size: None, max_size: None }
12129 }
12130 #[doc(hidden)]
12131 pub fn default_instance() -> &'static Self {
12132 static DEFAULT: super::SizeError = super::SizeError::const_default();
12133 &DEFAULT
12134 }
12135 pub fn size_opt_mut(&mut self) -> Option<&mut u64> {
12137 self.size.as_mut().map(|field| field as _)
12138 }
12139 pub fn size_mut(&mut self) -> &mut u64 {
12142 self.size.get_or_insert_default()
12143 }
12144 pub fn size_opt(&self) -> Option<u64> {
12146 self.size.as_ref().map(|field| *field)
12147 }
12148 pub fn set_size<T: Into<u64>>(&mut self, field: T) {
12150 self.size = Some(field.into().into());
12151 }
12152 pub fn with_size<T: Into<u64>>(mut self, field: T) -> Self {
12154 self.set_size(field.into());
12155 self
12156 }
12157 pub fn max_size_opt_mut(&mut self) -> Option<&mut u64> {
12159 self.max_size.as_mut().map(|field| field as _)
12160 }
12161 pub fn max_size_mut(&mut self) -> &mut u64 {
12164 self.max_size.get_or_insert_default()
12165 }
12166 pub fn max_size_opt(&self) -> Option<u64> {
12168 self.max_size.as_ref().map(|field| *field)
12169 }
12170 pub fn set_max_size<T: Into<u64>>(&mut self, field: T) {
12172 self.max_size = Some(field.into().into());
12173 }
12174 pub fn with_max_size<T: Into<u64>>(mut self, field: T) -> Self {
12176 self.set_max_size(field.into());
12177 self
12178 }
12179 }
12180 impl super::SplitCoins {
12181 pub const fn const_default() -> Self {
12182 Self {
12183 coin: None,
12184 amounts: Vec::new(),
12185 }
12186 }
12187 #[doc(hidden)]
12188 pub fn default_instance() -> &'static Self {
12189 static DEFAULT: super::SplitCoins = super::SplitCoins::const_default();
12190 &DEFAULT
12191 }
12192 pub fn coin(&self) -> &super::Argument {
12194 self.coin
12195 .as_ref()
12196 .map(|field| field as _)
12197 .unwrap_or_else(|| super::Argument::default_instance() as _)
12198 }
12199 pub fn coin_opt_mut(&mut self) -> Option<&mut super::Argument> {
12201 self.coin.as_mut().map(|field| field as _)
12202 }
12203 pub fn coin_mut(&mut self) -> &mut super::Argument {
12206 self.coin.get_or_insert_default()
12207 }
12208 pub fn coin_opt(&self) -> Option<&super::Argument> {
12210 self.coin.as_ref().map(|field| field as _)
12211 }
12212 pub fn set_coin<T: Into<super::Argument>>(&mut self, field: T) {
12214 self.coin = Some(field.into().into());
12215 }
12216 pub fn with_coin<T: Into<super::Argument>>(mut self, field: T) -> Self {
12218 self.set_coin(field.into());
12219 self
12220 }
12221 pub fn amounts(&self) -> &[super::Argument] {
12223 &self.amounts
12224 }
12225 pub fn amounts_mut(&mut self) -> &mut Vec<super::Argument> {
12228 &mut self.amounts
12229 }
12230 pub fn set_amounts(&mut self, field: Vec<super::Argument>) {
12232 self.amounts = field;
12233 }
12234 pub fn with_amounts(mut self, field: Vec<super::Argument>) -> Self {
12236 self.set_amounts(field);
12237 self
12238 }
12239 }
12240 impl super::StakeSubsidy {
12241 pub const fn const_default() -> Self {
12242 Self {
12243 balance: None,
12244 distribution_counter: None,
12245 current_distribution_amount: None,
12246 stake_subsidy_period_length: None,
12247 stake_subsidy_decrease_rate: None,
12248 extra_fields: None,
12249 }
12250 }
12251 #[doc(hidden)]
12252 pub fn default_instance() -> &'static Self {
12253 static DEFAULT: super::StakeSubsidy = super::StakeSubsidy::const_default();
12254 &DEFAULT
12255 }
12256 pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
12258 self.balance.as_mut().map(|field| field as _)
12259 }
12260 pub fn balance_mut(&mut self) -> &mut u64 {
12263 self.balance.get_or_insert_default()
12264 }
12265 pub fn balance_opt(&self) -> Option<u64> {
12267 self.balance.as_ref().map(|field| *field)
12268 }
12269 pub fn set_balance<T: Into<u64>>(&mut self, field: T) {
12271 self.balance = Some(field.into().into());
12272 }
12273 pub fn with_balance<T: Into<u64>>(mut self, field: T) -> Self {
12275 self.set_balance(field.into());
12276 self
12277 }
12278 pub fn distribution_counter_opt_mut(&mut self) -> Option<&mut u64> {
12280 self.distribution_counter.as_mut().map(|field| field as _)
12281 }
12282 pub fn distribution_counter_mut(&mut self) -> &mut u64 {
12285 self.distribution_counter.get_or_insert_default()
12286 }
12287 pub fn distribution_counter_opt(&self) -> Option<u64> {
12289 self.distribution_counter.as_ref().map(|field| *field)
12290 }
12291 pub fn set_distribution_counter<T: Into<u64>>(&mut self, field: T) {
12293 self.distribution_counter = Some(field.into().into());
12294 }
12295 pub fn with_distribution_counter<T: Into<u64>>(mut self, field: T) -> Self {
12297 self.set_distribution_counter(field.into());
12298 self
12299 }
12300 pub fn current_distribution_amount_opt_mut(&mut self) -> Option<&mut u64> {
12302 self.current_distribution_amount.as_mut().map(|field| field as _)
12303 }
12304 pub fn current_distribution_amount_mut(&mut self) -> &mut u64 {
12307 self.current_distribution_amount.get_or_insert_default()
12308 }
12309 pub fn current_distribution_amount_opt(&self) -> Option<u64> {
12311 self.current_distribution_amount.as_ref().map(|field| *field)
12312 }
12313 pub fn set_current_distribution_amount<T: Into<u64>>(&mut self, field: T) {
12315 self.current_distribution_amount = Some(field.into().into());
12316 }
12317 pub fn with_current_distribution_amount<T: Into<u64>>(
12319 mut self,
12320 field: T,
12321 ) -> Self {
12322 self.set_current_distribution_amount(field.into());
12323 self
12324 }
12325 pub fn stake_subsidy_period_length_opt_mut(&mut self) -> Option<&mut u64> {
12327 self.stake_subsidy_period_length.as_mut().map(|field| field as _)
12328 }
12329 pub fn stake_subsidy_period_length_mut(&mut self) -> &mut u64 {
12332 self.stake_subsidy_period_length.get_or_insert_default()
12333 }
12334 pub fn stake_subsidy_period_length_opt(&self) -> Option<u64> {
12336 self.stake_subsidy_period_length.as_ref().map(|field| *field)
12337 }
12338 pub fn set_stake_subsidy_period_length<T: Into<u64>>(&mut self, field: T) {
12340 self.stake_subsidy_period_length = Some(field.into().into());
12341 }
12342 pub fn with_stake_subsidy_period_length<T: Into<u64>>(
12344 mut self,
12345 field: T,
12346 ) -> Self {
12347 self.set_stake_subsidy_period_length(field.into());
12348 self
12349 }
12350 pub fn stake_subsidy_decrease_rate_opt_mut(&mut self) -> Option<&mut u32> {
12352 self.stake_subsidy_decrease_rate.as_mut().map(|field| field as _)
12353 }
12354 pub fn stake_subsidy_decrease_rate_mut(&mut self) -> &mut u32 {
12357 self.stake_subsidy_decrease_rate.get_or_insert_default()
12358 }
12359 pub fn stake_subsidy_decrease_rate_opt(&self) -> Option<u32> {
12361 self.stake_subsidy_decrease_rate.as_ref().map(|field| *field)
12362 }
12363 pub fn set_stake_subsidy_decrease_rate<T: Into<u32>>(&mut self, field: T) {
12365 self.stake_subsidy_decrease_rate = Some(field.into().into());
12366 }
12367 pub fn with_stake_subsidy_decrease_rate<T: Into<u32>>(
12369 mut self,
12370 field: T,
12371 ) -> Self {
12372 self.set_stake_subsidy_decrease_rate(field.into());
12373 self
12374 }
12375 pub fn extra_fields(&self) -> &super::MoveTable {
12377 self.extra_fields
12378 .as_ref()
12379 .map(|field| field as _)
12380 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
12381 }
12382 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
12384 self.extra_fields.as_mut().map(|field| field as _)
12385 }
12386 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
12389 self.extra_fields.get_or_insert_default()
12390 }
12391 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
12393 self.extra_fields.as_ref().map(|field| field as _)
12394 }
12395 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
12397 self.extra_fields = Some(field.into().into());
12398 }
12399 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
12401 self.set_extra_fields(field.into());
12402 self
12403 }
12404 }
12405 impl super::StakingPool {
12406 pub const fn const_default() -> Self {
12407 Self {
12408 id: None,
12409 activation_epoch: None,
12410 deactivation_epoch: None,
12411 sui_balance: None,
12412 rewards_pool: None,
12413 pool_token_balance: None,
12414 exchange_rates: None,
12415 pending_stake: None,
12416 pending_total_sui_withdraw: None,
12417 pending_pool_token_withdraw: None,
12418 extra_fields: None,
12419 }
12420 }
12421 #[doc(hidden)]
12422 pub fn default_instance() -> &'static Self {
12423 static DEFAULT: super::StakingPool = super::StakingPool::const_default();
12424 &DEFAULT
12425 }
12426 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
12428 self.id.as_mut().map(|field| field as _)
12429 }
12430 pub fn id_mut(&mut self) -> &mut String {
12433 self.id.get_or_insert_default()
12434 }
12435 pub fn id_opt(&self) -> Option<&str> {
12437 self.id.as_ref().map(|field| field as _)
12438 }
12439 pub fn set_id<T: Into<String>>(&mut self, field: T) {
12441 self.id = Some(field.into().into());
12442 }
12443 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
12445 self.set_id(field.into());
12446 self
12447 }
12448 pub fn activation_epoch_opt_mut(&mut self) -> Option<&mut u64> {
12450 self.activation_epoch.as_mut().map(|field| field as _)
12451 }
12452 pub fn activation_epoch_mut(&mut self) -> &mut u64 {
12455 self.activation_epoch.get_or_insert_default()
12456 }
12457 pub fn activation_epoch_opt(&self) -> Option<u64> {
12459 self.activation_epoch.as_ref().map(|field| *field)
12460 }
12461 pub fn set_activation_epoch<T: Into<u64>>(&mut self, field: T) {
12463 self.activation_epoch = Some(field.into().into());
12464 }
12465 pub fn with_activation_epoch<T: Into<u64>>(mut self, field: T) -> Self {
12467 self.set_activation_epoch(field.into());
12468 self
12469 }
12470 pub fn deactivation_epoch_opt_mut(&mut self) -> Option<&mut u64> {
12472 self.deactivation_epoch.as_mut().map(|field| field as _)
12473 }
12474 pub fn deactivation_epoch_mut(&mut self) -> &mut u64 {
12477 self.deactivation_epoch.get_or_insert_default()
12478 }
12479 pub fn deactivation_epoch_opt(&self) -> Option<u64> {
12481 self.deactivation_epoch.as_ref().map(|field| *field)
12482 }
12483 pub fn set_deactivation_epoch<T: Into<u64>>(&mut self, field: T) {
12485 self.deactivation_epoch = Some(field.into().into());
12486 }
12487 pub fn with_deactivation_epoch<T: Into<u64>>(mut self, field: T) -> Self {
12489 self.set_deactivation_epoch(field.into());
12490 self
12491 }
12492 pub fn sui_balance_opt_mut(&mut self) -> Option<&mut u64> {
12494 self.sui_balance.as_mut().map(|field| field as _)
12495 }
12496 pub fn sui_balance_mut(&mut self) -> &mut u64 {
12499 self.sui_balance.get_or_insert_default()
12500 }
12501 pub fn sui_balance_opt(&self) -> Option<u64> {
12503 self.sui_balance.as_ref().map(|field| *field)
12504 }
12505 pub fn set_sui_balance<T: Into<u64>>(&mut self, field: T) {
12507 self.sui_balance = Some(field.into().into());
12508 }
12509 pub fn with_sui_balance<T: Into<u64>>(mut self, field: T) -> Self {
12511 self.set_sui_balance(field.into());
12512 self
12513 }
12514 pub fn rewards_pool_opt_mut(&mut self) -> Option<&mut u64> {
12516 self.rewards_pool.as_mut().map(|field| field as _)
12517 }
12518 pub fn rewards_pool_mut(&mut self) -> &mut u64 {
12521 self.rewards_pool.get_or_insert_default()
12522 }
12523 pub fn rewards_pool_opt(&self) -> Option<u64> {
12525 self.rewards_pool.as_ref().map(|field| *field)
12526 }
12527 pub fn set_rewards_pool<T: Into<u64>>(&mut self, field: T) {
12529 self.rewards_pool = Some(field.into().into());
12530 }
12531 pub fn with_rewards_pool<T: Into<u64>>(mut self, field: T) -> Self {
12533 self.set_rewards_pool(field.into());
12534 self
12535 }
12536 pub fn pool_token_balance_opt_mut(&mut self) -> Option<&mut u64> {
12538 self.pool_token_balance.as_mut().map(|field| field as _)
12539 }
12540 pub fn pool_token_balance_mut(&mut self) -> &mut u64 {
12543 self.pool_token_balance.get_or_insert_default()
12544 }
12545 pub fn pool_token_balance_opt(&self) -> Option<u64> {
12547 self.pool_token_balance.as_ref().map(|field| *field)
12548 }
12549 pub fn set_pool_token_balance<T: Into<u64>>(&mut self, field: T) {
12551 self.pool_token_balance = Some(field.into().into());
12552 }
12553 pub fn with_pool_token_balance<T: Into<u64>>(mut self, field: T) -> Self {
12555 self.set_pool_token_balance(field.into());
12556 self
12557 }
12558 pub fn exchange_rates(&self) -> &super::MoveTable {
12560 self.exchange_rates
12561 .as_ref()
12562 .map(|field| field as _)
12563 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
12564 }
12565 pub fn exchange_rates_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
12567 self.exchange_rates.as_mut().map(|field| field as _)
12568 }
12569 pub fn exchange_rates_mut(&mut self) -> &mut super::MoveTable {
12572 self.exchange_rates.get_or_insert_default()
12573 }
12574 pub fn exchange_rates_opt(&self) -> Option<&super::MoveTable> {
12576 self.exchange_rates.as_ref().map(|field| field as _)
12577 }
12578 pub fn set_exchange_rates<T: Into<super::MoveTable>>(&mut self, field: T) {
12580 self.exchange_rates = Some(field.into().into());
12581 }
12582 pub fn with_exchange_rates<T: Into<super::MoveTable>>(
12584 mut self,
12585 field: T,
12586 ) -> Self {
12587 self.set_exchange_rates(field.into());
12588 self
12589 }
12590 pub fn pending_stake_opt_mut(&mut self) -> Option<&mut u64> {
12592 self.pending_stake.as_mut().map(|field| field as _)
12593 }
12594 pub fn pending_stake_mut(&mut self) -> &mut u64 {
12597 self.pending_stake.get_or_insert_default()
12598 }
12599 pub fn pending_stake_opt(&self) -> Option<u64> {
12601 self.pending_stake.as_ref().map(|field| *field)
12602 }
12603 pub fn set_pending_stake<T: Into<u64>>(&mut self, field: T) {
12605 self.pending_stake = Some(field.into().into());
12606 }
12607 pub fn with_pending_stake<T: Into<u64>>(mut self, field: T) -> Self {
12609 self.set_pending_stake(field.into());
12610 self
12611 }
12612 pub fn pending_total_sui_withdraw_opt_mut(&mut self) -> Option<&mut u64> {
12614 self.pending_total_sui_withdraw.as_mut().map(|field| field as _)
12615 }
12616 pub fn pending_total_sui_withdraw_mut(&mut self) -> &mut u64 {
12619 self.pending_total_sui_withdraw.get_or_insert_default()
12620 }
12621 pub fn pending_total_sui_withdraw_opt(&self) -> Option<u64> {
12623 self.pending_total_sui_withdraw.as_ref().map(|field| *field)
12624 }
12625 pub fn set_pending_total_sui_withdraw<T: Into<u64>>(&mut self, field: T) {
12627 self.pending_total_sui_withdraw = Some(field.into().into());
12628 }
12629 pub fn with_pending_total_sui_withdraw<T: Into<u64>>(
12631 mut self,
12632 field: T,
12633 ) -> Self {
12634 self.set_pending_total_sui_withdraw(field.into());
12635 self
12636 }
12637 pub fn pending_pool_token_withdraw_opt_mut(&mut self) -> Option<&mut u64> {
12639 self.pending_pool_token_withdraw.as_mut().map(|field| field as _)
12640 }
12641 pub fn pending_pool_token_withdraw_mut(&mut self) -> &mut u64 {
12644 self.pending_pool_token_withdraw.get_or_insert_default()
12645 }
12646 pub fn pending_pool_token_withdraw_opt(&self) -> Option<u64> {
12648 self.pending_pool_token_withdraw.as_ref().map(|field| *field)
12649 }
12650 pub fn set_pending_pool_token_withdraw<T: Into<u64>>(&mut self, field: T) {
12652 self.pending_pool_token_withdraw = Some(field.into().into());
12653 }
12654 pub fn with_pending_pool_token_withdraw<T: Into<u64>>(
12656 mut self,
12657 field: T,
12658 ) -> Self {
12659 self.set_pending_pool_token_withdraw(field.into());
12660 self
12661 }
12662 pub fn extra_fields(&self) -> &super::MoveTable {
12664 self.extra_fields
12665 .as_ref()
12666 .map(|field| field as _)
12667 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
12668 }
12669 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
12671 self.extra_fields.as_mut().map(|field| field as _)
12672 }
12673 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
12676 self.extra_fields.get_or_insert_default()
12677 }
12678 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
12680 self.extra_fields.as_ref().map(|field| field as _)
12681 }
12682 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
12684 self.extra_fields = Some(field.into().into());
12685 }
12686 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
12688 self.set_extra_fields(field.into());
12689 self
12690 }
12691 }
12692 impl super::StorageFund {
12693 pub const fn const_default() -> Self {
12694 Self {
12695 total_object_storage_rebates: None,
12696 non_refundable_balance: None,
12697 }
12698 }
12699 #[doc(hidden)]
12700 pub fn default_instance() -> &'static Self {
12701 static DEFAULT: super::StorageFund = super::StorageFund::const_default();
12702 &DEFAULT
12703 }
12704 pub fn total_object_storage_rebates_opt_mut(&mut self) -> Option<&mut u64> {
12706 self.total_object_storage_rebates.as_mut().map(|field| field as _)
12707 }
12708 pub fn total_object_storage_rebates_mut(&mut self) -> &mut u64 {
12711 self.total_object_storage_rebates.get_or_insert_default()
12712 }
12713 pub fn total_object_storage_rebates_opt(&self) -> Option<u64> {
12715 self.total_object_storage_rebates.as_ref().map(|field| *field)
12716 }
12717 pub fn set_total_object_storage_rebates<T: Into<u64>>(&mut self, field: T) {
12719 self.total_object_storage_rebates = Some(field.into().into());
12720 }
12721 pub fn with_total_object_storage_rebates<T: Into<u64>>(
12723 mut self,
12724 field: T,
12725 ) -> Self {
12726 self.set_total_object_storage_rebates(field.into());
12727 self
12728 }
12729 pub fn non_refundable_balance_opt_mut(&mut self) -> Option<&mut u64> {
12731 self.non_refundable_balance.as_mut().map(|field| field as _)
12732 }
12733 pub fn non_refundable_balance_mut(&mut self) -> &mut u64 {
12736 self.non_refundable_balance.get_or_insert_default()
12737 }
12738 pub fn non_refundable_balance_opt(&self) -> Option<u64> {
12740 self.non_refundable_balance.as_ref().map(|field| *field)
12741 }
12742 pub fn set_non_refundable_balance<T: Into<u64>>(&mut self, field: T) {
12744 self.non_refundable_balance = Some(field.into().into());
12745 }
12746 pub fn with_non_refundable_balance<T: Into<u64>>(mut self, field: T) -> Self {
12748 self.set_non_refundable_balance(field.into());
12749 self
12750 }
12751 }
12752 impl super::SubscribeCheckpointsRequest {
12753 pub const fn const_default() -> Self {
12754 Self { read_mask: None }
12755 }
12756 #[doc(hidden)]
12757 pub fn default_instance() -> &'static Self {
12758 static DEFAULT: super::SubscribeCheckpointsRequest = super::SubscribeCheckpointsRequest::const_default();
12759 &DEFAULT
12760 }
12761 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
12763 self.read_mask.as_mut().map(|field| field as _)
12764 }
12765 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
12768 self.read_mask.get_or_insert_default()
12769 }
12770 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
12772 self.read_mask.as_ref().map(|field| field as _)
12773 }
12774 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
12776 self.read_mask = Some(field.into().into());
12777 }
12778 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
12780 mut self,
12781 field: T,
12782 ) -> Self {
12783 self.set_read_mask(field.into());
12784 self
12785 }
12786 }
12787 impl super::SubscribeCheckpointsResponse {
12788 pub const fn const_default() -> Self {
12789 Self {
12790 cursor: None,
12791 checkpoint: None,
12792 }
12793 }
12794 #[doc(hidden)]
12795 pub fn default_instance() -> &'static Self {
12796 static DEFAULT: super::SubscribeCheckpointsResponse = super::SubscribeCheckpointsResponse::const_default();
12797 &DEFAULT
12798 }
12799 pub fn cursor_opt_mut(&mut self) -> Option<&mut u64> {
12801 self.cursor.as_mut().map(|field| field as _)
12802 }
12803 pub fn cursor_mut(&mut self) -> &mut u64 {
12806 self.cursor.get_or_insert_default()
12807 }
12808 pub fn cursor_opt(&self) -> Option<u64> {
12810 self.cursor.as_ref().map(|field| *field)
12811 }
12812 pub fn set_cursor<T: Into<u64>>(&mut self, field: T) {
12814 self.cursor = Some(field.into().into());
12815 }
12816 pub fn with_cursor<T: Into<u64>>(mut self, field: T) -> Self {
12818 self.set_cursor(field.into());
12819 self
12820 }
12821 pub fn checkpoint(&self) -> &super::Checkpoint {
12823 self.checkpoint
12824 .as_ref()
12825 .map(|field| field as _)
12826 .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
12827 }
12828 pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
12830 self.checkpoint.as_mut().map(|field| field as _)
12831 }
12832 pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
12835 self.checkpoint.get_or_insert_default()
12836 }
12837 pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
12839 self.checkpoint.as_ref().map(|field| field as _)
12840 }
12841 pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
12843 self.checkpoint = Some(field.into().into());
12844 }
12845 pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
12847 self.set_checkpoint(field.into());
12848 self
12849 }
12850 }
12851 impl super::SystemPackage {
12852 pub const fn const_default() -> Self {
12853 Self {
12854 version: None,
12855 modules: Vec::new(),
12856 dependencies: Vec::new(),
12857 }
12858 }
12859 #[doc(hidden)]
12860 pub fn default_instance() -> &'static Self {
12861 static DEFAULT: super::SystemPackage = super::SystemPackage::const_default();
12862 &DEFAULT
12863 }
12864 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
12866 self.version.as_mut().map(|field| field as _)
12867 }
12868 pub fn version_mut(&mut self) -> &mut u64 {
12871 self.version.get_or_insert_default()
12872 }
12873 pub fn version_opt(&self) -> Option<u64> {
12875 self.version.as_ref().map(|field| *field)
12876 }
12877 pub fn set_version<T: Into<u64>>(&mut self, field: T) {
12879 self.version = Some(field.into().into());
12880 }
12881 pub fn with_version<T: Into<u64>>(mut self, field: T) -> Self {
12883 self.set_version(field.into());
12884 self
12885 }
12886 pub fn modules(&self) -> &[::prost::bytes::Bytes] {
12888 &self.modules
12889 }
12890 pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
12893 &mut self.modules
12894 }
12895 pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
12897 self.modules = field;
12898 }
12899 pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
12901 self.set_modules(field);
12902 self
12903 }
12904 pub fn dependencies(&self) -> &[String] {
12906 &self.dependencies
12907 }
12908 pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
12911 &mut self.dependencies
12912 }
12913 pub fn set_dependencies(&mut self, field: Vec<String>) {
12915 self.dependencies = field;
12916 }
12917 pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
12919 self.set_dependencies(field);
12920 self
12921 }
12922 }
12923 impl super::SystemParameters {
12924 pub const fn const_default() -> Self {
12925 Self {
12926 epoch_duration_ms: None,
12927 stake_subsidy_start_epoch: None,
12928 min_validator_count: None,
12929 max_validator_count: None,
12930 min_validator_joining_stake: None,
12931 validator_low_stake_threshold: None,
12932 validator_very_low_stake_threshold: None,
12933 validator_low_stake_grace_period: None,
12934 extra_fields: None,
12935 }
12936 }
12937 #[doc(hidden)]
12938 pub fn default_instance() -> &'static Self {
12939 static DEFAULT: super::SystemParameters = super::SystemParameters::const_default();
12940 &DEFAULT
12941 }
12942 pub fn epoch_duration_ms_opt_mut(&mut self) -> Option<&mut u64> {
12944 self.epoch_duration_ms.as_mut().map(|field| field as _)
12945 }
12946 pub fn epoch_duration_ms_mut(&mut self) -> &mut u64 {
12949 self.epoch_duration_ms.get_or_insert_default()
12950 }
12951 pub fn epoch_duration_ms_opt(&self) -> Option<u64> {
12953 self.epoch_duration_ms.as_ref().map(|field| *field)
12954 }
12955 pub fn set_epoch_duration_ms<T: Into<u64>>(&mut self, field: T) {
12957 self.epoch_duration_ms = Some(field.into().into());
12958 }
12959 pub fn with_epoch_duration_ms<T: Into<u64>>(mut self, field: T) -> Self {
12961 self.set_epoch_duration_ms(field.into());
12962 self
12963 }
12964 pub fn stake_subsidy_start_epoch_opt_mut(&mut self) -> Option<&mut u64> {
12966 self.stake_subsidy_start_epoch.as_mut().map(|field| field as _)
12967 }
12968 pub fn stake_subsidy_start_epoch_mut(&mut self) -> &mut u64 {
12971 self.stake_subsidy_start_epoch.get_or_insert_default()
12972 }
12973 pub fn stake_subsidy_start_epoch_opt(&self) -> Option<u64> {
12975 self.stake_subsidy_start_epoch.as_ref().map(|field| *field)
12976 }
12977 pub fn set_stake_subsidy_start_epoch<T: Into<u64>>(&mut self, field: T) {
12979 self.stake_subsidy_start_epoch = Some(field.into().into());
12980 }
12981 pub fn with_stake_subsidy_start_epoch<T: Into<u64>>(mut self, field: T) -> Self {
12983 self.set_stake_subsidy_start_epoch(field.into());
12984 self
12985 }
12986 pub fn min_validator_count_opt_mut(&mut self) -> Option<&mut u64> {
12988 self.min_validator_count.as_mut().map(|field| field as _)
12989 }
12990 pub fn min_validator_count_mut(&mut self) -> &mut u64 {
12993 self.min_validator_count.get_or_insert_default()
12994 }
12995 pub fn min_validator_count_opt(&self) -> Option<u64> {
12997 self.min_validator_count.as_ref().map(|field| *field)
12998 }
12999 pub fn set_min_validator_count<T: Into<u64>>(&mut self, field: T) {
13001 self.min_validator_count = Some(field.into().into());
13002 }
13003 pub fn with_min_validator_count<T: Into<u64>>(mut self, field: T) -> Self {
13005 self.set_min_validator_count(field.into());
13006 self
13007 }
13008 pub fn max_validator_count_opt_mut(&mut self) -> Option<&mut u64> {
13010 self.max_validator_count.as_mut().map(|field| field as _)
13011 }
13012 pub fn max_validator_count_mut(&mut self) -> &mut u64 {
13015 self.max_validator_count.get_or_insert_default()
13016 }
13017 pub fn max_validator_count_opt(&self) -> Option<u64> {
13019 self.max_validator_count.as_ref().map(|field| *field)
13020 }
13021 pub fn set_max_validator_count<T: Into<u64>>(&mut self, field: T) {
13023 self.max_validator_count = Some(field.into().into());
13024 }
13025 pub fn with_max_validator_count<T: Into<u64>>(mut self, field: T) -> Self {
13027 self.set_max_validator_count(field.into());
13028 self
13029 }
13030 pub fn min_validator_joining_stake_opt_mut(&mut self) -> Option<&mut u64> {
13032 self.min_validator_joining_stake.as_mut().map(|field| field as _)
13033 }
13034 pub fn min_validator_joining_stake_mut(&mut self) -> &mut u64 {
13037 self.min_validator_joining_stake.get_or_insert_default()
13038 }
13039 pub fn min_validator_joining_stake_opt(&self) -> Option<u64> {
13041 self.min_validator_joining_stake.as_ref().map(|field| *field)
13042 }
13043 pub fn set_min_validator_joining_stake<T: Into<u64>>(&mut self, field: T) {
13045 self.min_validator_joining_stake = Some(field.into().into());
13046 }
13047 pub fn with_min_validator_joining_stake<T: Into<u64>>(
13049 mut self,
13050 field: T,
13051 ) -> Self {
13052 self.set_min_validator_joining_stake(field.into());
13053 self
13054 }
13055 pub fn validator_low_stake_threshold_opt_mut(&mut self) -> Option<&mut u64> {
13057 self.validator_low_stake_threshold.as_mut().map(|field| field as _)
13058 }
13059 pub fn validator_low_stake_threshold_mut(&mut self) -> &mut u64 {
13062 self.validator_low_stake_threshold.get_or_insert_default()
13063 }
13064 pub fn validator_low_stake_threshold_opt(&self) -> Option<u64> {
13066 self.validator_low_stake_threshold.as_ref().map(|field| *field)
13067 }
13068 pub fn set_validator_low_stake_threshold<T: Into<u64>>(&mut self, field: T) {
13070 self.validator_low_stake_threshold = Some(field.into().into());
13071 }
13072 pub fn with_validator_low_stake_threshold<T: Into<u64>>(
13074 mut self,
13075 field: T,
13076 ) -> Self {
13077 self.set_validator_low_stake_threshold(field.into());
13078 self
13079 }
13080 pub fn validator_very_low_stake_threshold_opt_mut(
13082 &mut self,
13083 ) -> Option<&mut u64> {
13084 self.validator_very_low_stake_threshold.as_mut().map(|field| field as _)
13085 }
13086 pub fn validator_very_low_stake_threshold_mut(&mut self) -> &mut u64 {
13089 self.validator_very_low_stake_threshold.get_or_insert_default()
13090 }
13091 pub fn validator_very_low_stake_threshold_opt(&self) -> Option<u64> {
13093 self.validator_very_low_stake_threshold.as_ref().map(|field| *field)
13094 }
13095 pub fn set_validator_very_low_stake_threshold<T: Into<u64>>(
13097 &mut self,
13098 field: T,
13099 ) {
13100 self.validator_very_low_stake_threshold = Some(field.into().into());
13101 }
13102 pub fn with_validator_very_low_stake_threshold<T: Into<u64>>(
13104 mut self,
13105 field: T,
13106 ) -> Self {
13107 self.set_validator_very_low_stake_threshold(field.into());
13108 self
13109 }
13110 pub fn validator_low_stake_grace_period_opt_mut(&mut self) -> Option<&mut u64> {
13112 self.validator_low_stake_grace_period.as_mut().map(|field| field as _)
13113 }
13114 pub fn validator_low_stake_grace_period_mut(&mut self) -> &mut u64 {
13117 self.validator_low_stake_grace_period.get_or_insert_default()
13118 }
13119 pub fn validator_low_stake_grace_period_opt(&self) -> Option<u64> {
13121 self.validator_low_stake_grace_period.as_ref().map(|field| *field)
13122 }
13123 pub fn set_validator_low_stake_grace_period<T: Into<u64>>(&mut self, field: T) {
13125 self.validator_low_stake_grace_period = Some(field.into().into());
13126 }
13127 pub fn with_validator_low_stake_grace_period<T: Into<u64>>(
13129 mut self,
13130 field: T,
13131 ) -> Self {
13132 self.set_validator_low_stake_grace_period(field.into());
13133 self
13134 }
13135 pub fn extra_fields(&self) -> &super::MoveTable {
13137 self.extra_fields
13138 .as_ref()
13139 .map(|field| field as _)
13140 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
13141 }
13142 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
13144 self.extra_fields.as_mut().map(|field| field as _)
13145 }
13146 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
13149 self.extra_fields.get_or_insert_default()
13150 }
13151 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
13153 self.extra_fields.as_ref().map(|field| field as _)
13154 }
13155 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
13157 self.extra_fields = Some(field.into().into());
13158 }
13159 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
13161 self.set_extra_fields(field.into());
13162 self
13163 }
13164 }
13165 impl super::SystemState {
13166 pub const fn const_default() -> Self {
13167 Self {
13168 version: None,
13169 epoch: None,
13170 protocol_version: None,
13171 validators: None,
13172 storage_fund: None,
13173 parameters: None,
13174 reference_gas_price: None,
13175 validator_report_records: Vec::new(),
13176 stake_subsidy: None,
13177 safe_mode: None,
13178 safe_mode_storage_rewards: None,
13179 safe_mode_computation_rewards: None,
13180 safe_mode_storage_rebates: None,
13181 safe_mode_non_refundable_storage_fee: None,
13182 epoch_start_timestamp_ms: None,
13183 extra_fields: None,
13184 }
13185 }
13186 #[doc(hidden)]
13187 pub fn default_instance() -> &'static Self {
13188 static DEFAULT: super::SystemState = super::SystemState::const_default();
13189 &DEFAULT
13190 }
13191 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
13193 self.version.as_mut().map(|field| field as _)
13194 }
13195 pub fn version_mut(&mut self) -> &mut u64 {
13198 self.version.get_or_insert_default()
13199 }
13200 pub fn version_opt(&self) -> Option<u64> {
13202 self.version.as_ref().map(|field| *field)
13203 }
13204 pub fn set_version<T: Into<u64>>(&mut self, field: T) {
13206 self.version = Some(field.into().into());
13207 }
13208 pub fn with_version<T: Into<u64>>(mut self, field: T) -> Self {
13210 self.set_version(field.into());
13211 self
13212 }
13213 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
13215 self.epoch.as_mut().map(|field| field as _)
13216 }
13217 pub fn epoch_mut(&mut self) -> &mut u64 {
13220 self.epoch.get_or_insert_default()
13221 }
13222 pub fn epoch_opt(&self) -> Option<u64> {
13224 self.epoch.as_ref().map(|field| *field)
13225 }
13226 pub fn set_epoch<T: Into<u64>>(&mut self, field: T) {
13228 self.epoch = Some(field.into().into());
13229 }
13230 pub fn with_epoch<T: Into<u64>>(mut self, field: T) -> Self {
13232 self.set_epoch(field.into());
13233 self
13234 }
13235 pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
13237 self.protocol_version.as_mut().map(|field| field as _)
13238 }
13239 pub fn protocol_version_mut(&mut self) -> &mut u64 {
13242 self.protocol_version.get_or_insert_default()
13243 }
13244 pub fn protocol_version_opt(&self) -> Option<u64> {
13246 self.protocol_version.as_ref().map(|field| *field)
13247 }
13248 pub fn set_protocol_version<T: Into<u64>>(&mut self, field: T) {
13250 self.protocol_version = Some(field.into().into());
13251 }
13252 pub fn with_protocol_version<T: Into<u64>>(mut self, field: T) -> Self {
13254 self.set_protocol_version(field.into());
13255 self
13256 }
13257 pub fn validators(&self) -> &super::ValidatorSet {
13259 self.validators
13260 .as_ref()
13261 .map(|field| field as _)
13262 .unwrap_or_else(|| super::ValidatorSet::default_instance() as _)
13263 }
13264 pub fn validators_opt_mut(&mut self) -> Option<&mut super::ValidatorSet> {
13266 self.validators.as_mut().map(|field| field as _)
13267 }
13268 pub fn validators_mut(&mut self) -> &mut super::ValidatorSet {
13271 self.validators.get_or_insert_default()
13272 }
13273 pub fn validators_opt(&self) -> Option<&super::ValidatorSet> {
13275 self.validators.as_ref().map(|field| field as _)
13276 }
13277 pub fn set_validators<T: Into<super::ValidatorSet>>(&mut self, field: T) {
13279 self.validators = Some(field.into().into());
13280 }
13281 pub fn with_validators<T: Into<super::ValidatorSet>>(
13283 mut self,
13284 field: T,
13285 ) -> Self {
13286 self.set_validators(field.into());
13287 self
13288 }
13289 pub fn storage_fund(&self) -> &super::StorageFund {
13291 self.storage_fund
13292 .as_ref()
13293 .map(|field| field as _)
13294 .unwrap_or_else(|| super::StorageFund::default_instance() as _)
13295 }
13296 pub fn storage_fund_opt_mut(&mut self) -> Option<&mut super::StorageFund> {
13298 self.storage_fund.as_mut().map(|field| field as _)
13299 }
13300 pub fn storage_fund_mut(&mut self) -> &mut super::StorageFund {
13303 self.storage_fund.get_or_insert_default()
13304 }
13305 pub fn storage_fund_opt(&self) -> Option<&super::StorageFund> {
13307 self.storage_fund.as_ref().map(|field| field as _)
13308 }
13309 pub fn set_storage_fund<T: Into<super::StorageFund>>(&mut self, field: T) {
13311 self.storage_fund = Some(field.into().into());
13312 }
13313 pub fn with_storage_fund<T: Into<super::StorageFund>>(
13315 mut self,
13316 field: T,
13317 ) -> Self {
13318 self.set_storage_fund(field.into());
13319 self
13320 }
13321 pub fn parameters(&self) -> &super::SystemParameters {
13323 self.parameters
13324 .as_ref()
13325 .map(|field| field as _)
13326 .unwrap_or_else(|| super::SystemParameters::default_instance() as _)
13327 }
13328 pub fn parameters_opt_mut(&mut self) -> Option<&mut super::SystemParameters> {
13330 self.parameters.as_mut().map(|field| field as _)
13331 }
13332 pub fn parameters_mut(&mut self) -> &mut super::SystemParameters {
13335 self.parameters.get_or_insert_default()
13336 }
13337 pub fn parameters_opt(&self) -> Option<&super::SystemParameters> {
13339 self.parameters.as_ref().map(|field| field as _)
13340 }
13341 pub fn set_parameters<T: Into<super::SystemParameters>>(&mut self, field: T) {
13343 self.parameters = Some(field.into().into());
13344 }
13345 pub fn with_parameters<T: Into<super::SystemParameters>>(
13347 mut self,
13348 field: T,
13349 ) -> Self {
13350 self.set_parameters(field.into());
13351 self
13352 }
13353 pub fn reference_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
13355 self.reference_gas_price.as_mut().map(|field| field as _)
13356 }
13357 pub fn reference_gas_price_mut(&mut self) -> &mut u64 {
13360 self.reference_gas_price.get_or_insert_default()
13361 }
13362 pub fn reference_gas_price_opt(&self) -> Option<u64> {
13364 self.reference_gas_price.as_ref().map(|field| *field)
13365 }
13366 pub fn set_reference_gas_price<T: Into<u64>>(&mut self, field: T) {
13368 self.reference_gas_price = Some(field.into().into());
13369 }
13370 pub fn with_reference_gas_price<T: Into<u64>>(mut self, field: T) -> Self {
13372 self.set_reference_gas_price(field.into());
13373 self
13374 }
13375 pub fn validator_report_records(&self) -> &[super::ValidatorReportRecord] {
13377 &self.validator_report_records
13378 }
13379 pub fn validator_report_records_mut(
13382 &mut self,
13383 ) -> &mut Vec<super::ValidatorReportRecord> {
13384 &mut self.validator_report_records
13385 }
13386 pub fn set_validator_report_records(
13388 &mut self,
13389 field: Vec<super::ValidatorReportRecord>,
13390 ) {
13391 self.validator_report_records = field;
13392 }
13393 pub fn with_validator_report_records(
13395 mut self,
13396 field: Vec<super::ValidatorReportRecord>,
13397 ) -> Self {
13398 self.set_validator_report_records(field);
13399 self
13400 }
13401 pub fn stake_subsidy(&self) -> &super::StakeSubsidy {
13403 self.stake_subsidy
13404 .as_ref()
13405 .map(|field| field as _)
13406 .unwrap_or_else(|| super::StakeSubsidy::default_instance() as _)
13407 }
13408 pub fn stake_subsidy_opt_mut(&mut self) -> Option<&mut super::StakeSubsidy> {
13410 self.stake_subsidy.as_mut().map(|field| field as _)
13411 }
13412 pub fn stake_subsidy_mut(&mut self) -> &mut super::StakeSubsidy {
13415 self.stake_subsidy.get_or_insert_default()
13416 }
13417 pub fn stake_subsidy_opt(&self) -> Option<&super::StakeSubsidy> {
13419 self.stake_subsidy.as_ref().map(|field| field as _)
13420 }
13421 pub fn set_stake_subsidy<T: Into<super::StakeSubsidy>>(&mut self, field: T) {
13423 self.stake_subsidy = Some(field.into().into());
13424 }
13425 pub fn with_stake_subsidy<T: Into<super::StakeSubsidy>>(
13427 mut self,
13428 field: T,
13429 ) -> Self {
13430 self.set_stake_subsidy(field.into());
13431 self
13432 }
13433 pub fn safe_mode_opt_mut(&mut self) -> Option<&mut bool> {
13435 self.safe_mode.as_mut().map(|field| field as _)
13436 }
13437 pub fn safe_mode_mut(&mut self) -> &mut bool {
13440 self.safe_mode.get_or_insert_default()
13441 }
13442 pub fn safe_mode_opt(&self) -> Option<bool> {
13444 self.safe_mode.as_ref().map(|field| *field)
13445 }
13446 pub fn set_safe_mode<T: Into<bool>>(&mut self, field: T) {
13448 self.safe_mode = Some(field.into().into());
13449 }
13450 pub fn with_safe_mode<T: Into<bool>>(mut self, field: T) -> Self {
13452 self.set_safe_mode(field.into());
13453 self
13454 }
13455 pub fn safe_mode_storage_rewards_opt_mut(&mut self) -> Option<&mut u64> {
13457 self.safe_mode_storage_rewards.as_mut().map(|field| field as _)
13458 }
13459 pub fn safe_mode_storage_rewards_mut(&mut self) -> &mut u64 {
13462 self.safe_mode_storage_rewards.get_or_insert_default()
13463 }
13464 pub fn safe_mode_storage_rewards_opt(&self) -> Option<u64> {
13466 self.safe_mode_storage_rewards.as_ref().map(|field| *field)
13467 }
13468 pub fn set_safe_mode_storage_rewards<T: Into<u64>>(&mut self, field: T) {
13470 self.safe_mode_storage_rewards = Some(field.into().into());
13471 }
13472 pub fn with_safe_mode_storage_rewards<T: Into<u64>>(mut self, field: T) -> Self {
13474 self.set_safe_mode_storage_rewards(field.into());
13475 self
13476 }
13477 pub fn safe_mode_computation_rewards_opt_mut(&mut self) -> Option<&mut u64> {
13479 self.safe_mode_computation_rewards.as_mut().map(|field| field as _)
13480 }
13481 pub fn safe_mode_computation_rewards_mut(&mut self) -> &mut u64 {
13484 self.safe_mode_computation_rewards.get_or_insert_default()
13485 }
13486 pub fn safe_mode_computation_rewards_opt(&self) -> Option<u64> {
13488 self.safe_mode_computation_rewards.as_ref().map(|field| *field)
13489 }
13490 pub fn set_safe_mode_computation_rewards<T: Into<u64>>(&mut self, field: T) {
13492 self.safe_mode_computation_rewards = Some(field.into().into());
13493 }
13494 pub fn with_safe_mode_computation_rewards<T: Into<u64>>(
13496 mut self,
13497 field: T,
13498 ) -> Self {
13499 self.set_safe_mode_computation_rewards(field.into());
13500 self
13501 }
13502 pub fn safe_mode_storage_rebates_opt_mut(&mut self) -> Option<&mut u64> {
13504 self.safe_mode_storage_rebates.as_mut().map(|field| field as _)
13505 }
13506 pub fn safe_mode_storage_rebates_mut(&mut self) -> &mut u64 {
13509 self.safe_mode_storage_rebates.get_or_insert_default()
13510 }
13511 pub fn safe_mode_storage_rebates_opt(&self) -> Option<u64> {
13513 self.safe_mode_storage_rebates.as_ref().map(|field| *field)
13514 }
13515 pub fn set_safe_mode_storage_rebates<T: Into<u64>>(&mut self, field: T) {
13517 self.safe_mode_storage_rebates = Some(field.into().into());
13518 }
13519 pub fn with_safe_mode_storage_rebates<T: Into<u64>>(mut self, field: T) -> Self {
13521 self.set_safe_mode_storage_rebates(field.into());
13522 self
13523 }
13524 pub fn safe_mode_non_refundable_storage_fee_opt_mut(
13526 &mut self,
13527 ) -> Option<&mut u64> {
13528 self.safe_mode_non_refundable_storage_fee.as_mut().map(|field| field as _)
13529 }
13530 pub fn safe_mode_non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
13533 self.safe_mode_non_refundable_storage_fee.get_or_insert_default()
13534 }
13535 pub fn safe_mode_non_refundable_storage_fee_opt(&self) -> Option<u64> {
13537 self.safe_mode_non_refundable_storage_fee.as_ref().map(|field| *field)
13538 }
13539 pub fn set_safe_mode_non_refundable_storage_fee<T: Into<u64>>(
13541 &mut self,
13542 field: T,
13543 ) {
13544 self.safe_mode_non_refundable_storage_fee = Some(field.into().into());
13545 }
13546 pub fn with_safe_mode_non_refundable_storage_fee<T: Into<u64>>(
13548 mut self,
13549 field: T,
13550 ) -> Self {
13551 self.set_safe_mode_non_refundable_storage_fee(field.into());
13552 self
13553 }
13554 pub fn epoch_start_timestamp_ms_opt_mut(&mut self) -> Option<&mut u64> {
13556 self.epoch_start_timestamp_ms.as_mut().map(|field| field as _)
13557 }
13558 pub fn epoch_start_timestamp_ms_mut(&mut self) -> &mut u64 {
13561 self.epoch_start_timestamp_ms.get_or_insert_default()
13562 }
13563 pub fn epoch_start_timestamp_ms_opt(&self) -> Option<u64> {
13565 self.epoch_start_timestamp_ms.as_ref().map(|field| *field)
13566 }
13567 pub fn set_epoch_start_timestamp_ms<T: Into<u64>>(&mut self, field: T) {
13569 self.epoch_start_timestamp_ms = Some(field.into().into());
13570 }
13571 pub fn with_epoch_start_timestamp_ms<T: Into<u64>>(mut self, field: T) -> Self {
13573 self.set_epoch_start_timestamp_ms(field.into());
13574 self
13575 }
13576 pub fn extra_fields(&self) -> &super::MoveTable {
13578 self.extra_fields
13579 .as_ref()
13580 .map(|field| field as _)
13581 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
13582 }
13583 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
13585 self.extra_fields.as_mut().map(|field| field as _)
13586 }
13587 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
13590 self.extra_fields.get_or_insert_default()
13591 }
13592 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
13594 self.extra_fields.as_ref().map(|field| field as _)
13595 }
13596 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
13598 self.extra_fields = Some(field.into().into());
13599 }
13600 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
13602 self.set_extra_fields(field.into());
13603 self
13604 }
13605 }
13606 impl super::Transaction {
13607 pub const fn const_default() -> Self {
13608 Self {
13609 bcs: None,
13610 digest: None,
13611 version: None,
13612 kind: None,
13613 sender: None,
13614 gas_payment: None,
13615 expiration: None,
13616 }
13617 }
13618 #[doc(hidden)]
13619 pub fn default_instance() -> &'static Self {
13620 static DEFAULT: super::Transaction = super::Transaction::const_default();
13621 &DEFAULT
13622 }
13623 pub fn bcs(&self) -> &super::Bcs {
13625 self.bcs
13626 .as_ref()
13627 .map(|field| field as _)
13628 .unwrap_or_else(|| super::Bcs::default_instance() as _)
13629 }
13630 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
13632 self.bcs.as_mut().map(|field| field as _)
13633 }
13634 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
13637 self.bcs.get_or_insert_default()
13638 }
13639 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
13641 self.bcs.as_ref().map(|field| field as _)
13642 }
13643 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
13645 self.bcs = Some(field.into().into());
13646 }
13647 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
13649 self.set_bcs(field.into());
13650 self
13651 }
13652 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
13654 self.digest.as_mut().map(|field| field as _)
13655 }
13656 pub fn digest_mut(&mut self) -> &mut String {
13659 self.digest.get_or_insert_default()
13660 }
13661 pub fn digest_opt(&self) -> Option<&str> {
13663 self.digest.as_ref().map(|field| field as _)
13664 }
13665 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
13667 self.digest = Some(field.into().into());
13668 }
13669 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
13671 self.set_digest(field.into());
13672 self
13673 }
13674 pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
13676 self.version.as_mut().map(|field| field as _)
13677 }
13678 pub fn version_mut(&mut self) -> &mut i32 {
13681 self.version.get_or_insert_default()
13682 }
13683 pub fn version_opt(&self) -> Option<i32> {
13685 self.version.as_ref().map(|field| *field)
13686 }
13687 pub fn set_version<T: Into<i32>>(&mut self, field: T) {
13689 self.version = Some(field.into().into());
13690 }
13691 pub fn with_version<T: Into<i32>>(mut self, field: T) -> Self {
13693 self.set_version(field.into());
13694 self
13695 }
13696 pub fn kind(&self) -> &super::TransactionKind {
13698 self.kind
13699 .as_ref()
13700 .map(|field| field as _)
13701 .unwrap_or_else(|| super::TransactionKind::default_instance() as _)
13702 }
13703 pub fn kind_opt_mut(&mut self) -> Option<&mut super::TransactionKind> {
13705 self.kind.as_mut().map(|field| field as _)
13706 }
13707 pub fn kind_mut(&mut self) -> &mut super::TransactionKind {
13710 self.kind.get_or_insert_default()
13711 }
13712 pub fn kind_opt(&self) -> Option<&super::TransactionKind> {
13714 self.kind.as_ref().map(|field| field as _)
13715 }
13716 pub fn set_kind<T: Into<super::TransactionKind>>(&mut self, field: T) {
13718 self.kind = Some(field.into().into());
13719 }
13720 pub fn with_kind<T: Into<super::TransactionKind>>(mut self, field: T) -> Self {
13722 self.set_kind(field.into());
13723 self
13724 }
13725 pub fn sender_opt_mut(&mut self) -> Option<&mut String> {
13727 self.sender.as_mut().map(|field| field as _)
13728 }
13729 pub fn sender_mut(&mut self) -> &mut String {
13732 self.sender.get_or_insert_default()
13733 }
13734 pub fn sender_opt(&self) -> Option<&str> {
13736 self.sender.as_ref().map(|field| field as _)
13737 }
13738 pub fn set_sender<T: Into<String>>(&mut self, field: T) {
13740 self.sender = Some(field.into().into());
13741 }
13742 pub fn with_sender<T: Into<String>>(mut self, field: T) -> Self {
13744 self.set_sender(field.into());
13745 self
13746 }
13747 pub fn gas_payment(&self) -> &super::GasPayment {
13749 self.gas_payment
13750 .as_ref()
13751 .map(|field| field as _)
13752 .unwrap_or_else(|| super::GasPayment::default_instance() as _)
13753 }
13754 pub fn gas_payment_opt_mut(&mut self) -> Option<&mut super::GasPayment> {
13756 self.gas_payment.as_mut().map(|field| field as _)
13757 }
13758 pub fn gas_payment_mut(&mut self) -> &mut super::GasPayment {
13761 self.gas_payment.get_or_insert_default()
13762 }
13763 pub fn gas_payment_opt(&self) -> Option<&super::GasPayment> {
13765 self.gas_payment.as_ref().map(|field| field as _)
13766 }
13767 pub fn set_gas_payment<T: Into<super::GasPayment>>(&mut self, field: T) {
13769 self.gas_payment = Some(field.into().into());
13770 }
13771 pub fn with_gas_payment<T: Into<super::GasPayment>>(mut self, field: T) -> Self {
13773 self.set_gas_payment(field.into());
13774 self
13775 }
13776 pub fn expiration(&self) -> &super::TransactionExpiration {
13778 self.expiration
13779 .as_ref()
13780 .map(|field| field as _)
13781 .unwrap_or_else(|| super::TransactionExpiration::default_instance() as _)
13782 }
13783 pub fn expiration_opt_mut(
13785 &mut self,
13786 ) -> Option<&mut super::TransactionExpiration> {
13787 self.expiration.as_mut().map(|field| field as _)
13788 }
13789 pub fn expiration_mut(&mut self) -> &mut super::TransactionExpiration {
13792 self.expiration.get_or_insert_default()
13793 }
13794 pub fn expiration_opt(&self) -> Option<&super::TransactionExpiration> {
13796 self.expiration.as_ref().map(|field| field as _)
13797 }
13798 pub fn set_expiration<T: Into<super::TransactionExpiration>>(
13800 &mut self,
13801 field: T,
13802 ) {
13803 self.expiration = Some(field.into().into());
13804 }
13805 pub fn with_expiration<T: Into<super::TransactionExpiration>>(
13807 mut self,
13808 field: T,
13809 ) -> Self {
13810 self.set_expiration(field.into());
13811 self
13812 }
13813 }
13814 impl super::TransactionEffects {
13815 pub const fn const_default() -> Self {
13816 Self {
13817 bcs: None,
13818 digest: None,
13819 version: None,
13820 status: None,
13821 epoch: None,
13822 gas_used: None,
13823 transaction_digest: None,
13824 gas_object: None,
13825 events_digest: None,
13826 dependencies: Vec::new(),
13827 lamport_version: None,
13828 changed_objects: Vec::new(),
13829 unchanged_consensus_objects: Vec::new(),
13830 auxiliary_data_digest: None,
13831 unchanged_loaded_runtime_objects: Vec::new(),
13832 }
13833 }
13834 #[doc(hidden)]
13835 pub fn default_instance() -> &'static Self {
13836 static DEFAULT: super::TransactionEffects = super::TransactionEffects::const_default();
13837 &DEFAULT
13838 }
13839 pub fn bcs(&self) -> &super::Bcs {
13841 self.bcs
13842 .as_ref()
13843 .map(|field| field as _)
13844 .unwrap_or_else(|| super::Bcs::default_instance() as _)
13845 }
13846 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
13848 self.bcs.as_mut().map(|field| field as _)
13849 }
13850 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
13853 self.bcs.get_or_insert_default()
13854 }
13855 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
13857 self.bcs.as_ref().map(|field| field as _)
13858 }
13859 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
13861 self.bcs = Some(field.into().into());
13862 }
13863 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
13865 self.set_bcs(field.into());
13866 self
13867 }
13868 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
13870 self.digest.as_mut().map(|field| field as _)
13871 }
13872 pub fn digest_mut(&mut self) -> &mut String {
13875 self.digest.get_or_insert_default()
13876 }
13877 pub fn digest_opt(&self) -> Option<&str> {
13879 self.digest.as_ref().map(|field| field as _)
13880 }
13881 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
13883 self.digest = Some(field.into().into());
13884 }
13885 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
13887 self.set_digest(field.into());
13888 self
13889 }
13890 pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
13892 self.version.as_mut().map(|field| field as _)
13893 }
13894 pub fn version_mut(&mut self) -> &mut i32 {
13897 self.version.get_or_insert_default()
13898 }
13899 pub fn version_opt(&self) -> Option<i32> {
13901 self.version.as_ref().map(|field| *field)
13902 }
13903 pub fn set_version<T: Into<i32>>(&mut self, field: T) {
13905 self.version = Some(field.into().into());
13906 }
13907 pub fn with_version<T: Into<i32>>(mut self, field: T) -> Self {
13909 self.set_version(field.into());
13910 self
13911 }
13912 pub fn status(&self) -> &super::ExecutionStatus {
13914 self.status
13915 .as_ref()
13916 .map(|field| field as _)
13917 .unwrap_or_else(|| super::ExecutionStatus::default_instance() as _)
13918 }
13919 pub fn status_opt_mut(&mut self) -> Option<&mut super::ExecutionStatus> {
13921 self.status.as_mut().map(|field| field as _)
13922 }
13923 pub fn status_mut(&mut self) -> &mut super::ExecutionStatus {
13926 self.status.get_or_insert_default()
13927 }
13928 pub fn status_opt(&self) -> Option<&super::ExecutionStatus> {
13930 self.status.as_ref().map(|field| field as _)
13931 }
13932 pub fn set_status<T: Into<super::ExecutionStatus>>(&mut self, field: T) {
13934 self.status = Some(field.into().into());
13935 }
13936 pub fn with_status<T: Into<super::ExecutionStatus>>(mut self, field: T) -> Self {
13938 self.set_status(field.into());
13939 self
13940 }
13941 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
13943 self.epoch.as_mut().map(|field| field as _)
13944 }
13945 pub fn epoch_mut(&mut self) -> &mut u64 {
13948 self.epoch.get_or_insert_default()
13949 }
13950 pub fn epoch_opt(&self) -> Option<u64> {
13952 self.epoch.as_ref().map(|field| *field)
13953 }
13954 pub fn set_epoch<T: Into<u64>>(&mut self, field: T) {
13956 self.epoch = Some(field.into().into());
13957 }
13958 pub fn with_epoch<T: Into<u64>>(mut self, field: T) -> Self {
13960 self.set_epoch(field.into());
13961 self
13962 }
13963 pub fn gas_used(&self) -> &super::GasCostSummary {
13965 self.gas_used
13966 .as_ref()
13967 .map(|field| field as _)
13968 .unwrap_or_else(|| super::GasCostSummary::default_instance() as _)
13969 }
13970 pub fn gas_used_opt_mut(&mut self) -> Option<&mut super::GasCostSummary> {
13972 self.gas_used.as_mut().map(|field| field as _)
13973 }
13974 pub fn gas_used_mut(&mut self) -> &mut super::GasCostSummary {
13977 self.gas_used.get_or_insert_default()
13978 }
13979 pub fn gas_used_opt(&self) -> Option<&super::GasCostSummary> {
13981 self.gas_used.as_ref().map(|field| field as _)
13982 }
13983 pub fn set_gas_used<T: Into<super::GasCostSummary>>(&mut self, field: T) {
13985 self.gas_used = Some(field.into().into());
13986 }
13987 pub fn with_gas_used<T: Into<super::GasCostSummary>>(
13989 mut self,
13990 field: T,
13991 ) -> Self {
13992 self.set_gas_used(field.into());
13993 self
13994 }
13995 pub fn transaction_digest_opt_mut(&mut self) -> Option<&mut String> {
13997 self.transaction_digest.as_mut().map(|field| field as _)
13998 }
13999 pub fn transaction_digest_mut(&mut self) -> &mut String {
14002 self.transaction_digest.get_or_insert_default()
14003 }
14004 pub fn transaction_digest_opt(&self) -> Option<&str> {
14006 self.transaction_digest.as_ref().map(|field| field as _)
14007 }
14008 pub fn set_transaction_digest<T: Into<String>>(&mut self, field: T) {
14010 self.transaction_digest = Some(field.into().into());
14011 }
14012 pub fn with_transaction_digest<T: Into<String>>(mut self, field: T) -> Self {
14014 self.set_transaction_digest(field.into());
14015 self
14016 }
14017 pub fn gas_object(&self) -> &super::ChangedObject {
14019 self.gas_object
14020 .as_ref()
14021 .map(|field| field as _)
14022 .unwrap_or_else(|| super::ChangedObject::default_instance() as _)
14023 }
14024 pub fn gas_object_opt_mut(&mut self) -> Option<&mut super::ChangedObject> {
14026 self.gas_object.as_mut().map(|field| field as _)
14027 }
14028 pub fn gas_object_mut(&mut self) -> &mut super::ChangedObject {
14031 self.gas_object.get_or_insert_default()
14032 }
14033 pub fn gas_object_opt(&self) -> Option<&super::ChangedObject> {
14035 self.gas_object.as_ref().map(|field| field as _)
14036 }
14037 pub fn set_gas_object<T: Into<super::ChangedObject>>(&mut self, field: T) {
14039 self.gas_object = Some(field.into().into());
14040 }
14041 pub fn with_gas_object<T: Into<super::ChangedObject>>(
14043 mut self,
14044 field: T,
14045 ) -> Self {
14046 self.set_gas_object(field.into());
14047 self
14048 }
14049 pub fn events_digest_opt_mut(&mut self) -> Option<&mut String> {
14051 self.events_digest.as_mut().map(|field| field as _)
14052 }
14053 pub fn events_digest_mut(&mut self) -> &mut String {
14056 self.events_digest.get_or_insert_default()
14057 }
14058 pub fn events_digest_opt(&self) -> Option<&str> {
14060 self.events_digest.as_ref().map(|field| field as _)
14061 }
14062 pub fn set_events_digest<T: Into<String>>(&mut self, field: T) {
14064 self.events_digest = Some(field.into().into());
14065 }
14066 pub fn with_events_digest<T: Into<String>>(mut self, field: T) -> Self {
14068 self.set_events_digest(field.into());
14069 self
14070 }
14071 pub fn dependencies(&self) -> &[String] {
14073 &self.dependencies
14074 }
14075 pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
14078 &mut self.dependencies
14079 }
14080 pub fn set_dependencies(&mut self, field: Vec<String>) {
14082 self.dependencies = field;
14083 }
14084 pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
14086 self.set_dependencies(field);
14087 self
14088 }
14089 pub fn lamport_version_opt_mut(&mut self) -> Option<&mut u64> {
14091 self.lamport_version.as_mut().map(|field| field as _)
14092 }
14093 pub fn lamport_version_mut(&mut self) -> &mut u64 {
14096 self.lamport_version.get_or_insert_default()
14097 }
14098 pub fn lamport_version_opt(&self) -> Option<u64> {
14100 self.lamport_version.as_ref().map(|field| *field)
14101 }
14102 pub fn set_lamport_version<T: Into<u64>>(&mut self, field: T) {
14104 self.lamport_version = Some(field.into().into());
14105 }
14106 pub fn with_lamport_version<T: Into<u64>>(mut self, field: T) -> Self {
14108 self.set_lamport_version(field.into());
14109 self
14110 }
14111 pub fn changed_objects(&self) -> &[super::ChangedObject] {
14113 &self.changed_objects
14114 }
14115 pub fn changed_objects_mut(&mut self) -> &mut Vec<super::ChangedObject> {
14118 &mut self.changed_objects
14119 }
14120 pub fn set_changed_objects(&mut self, field: Vec<super::ChangedObject>) {
14122 self.changed_objects = field;
14123 }
14124 pub fn with_changed_objects(mut self, field: Vec<super::ChangedObject>) -> Self {
14126 self.set_changed_objects(field);
14127 self
14128 }
14129 pub fn unchanged_consensus_objects(&self) -> &[super::UnchangedConsensusObject] {
14131 &self.unchanged_consensus_objects
14132 }
14133 pub fn unchanged_consensus_objects_mut(
14136 &mut self,
14137 ) -> &mut Vec<super::UnchangedConsensusObject> {
14138 &mut self.unchanged_consensus_objects
14139 }
14140 pub fn set_unchanged_consensus_objects(
14142 &mut self,
14143 field: Vec<super::UnchangedConsensusObject>,
14144 ) {
14145 self.unchanged_consensus_objects = field;
14146 }
14147 pub fn with_unchanged_consensus_objects(
14149 mut self,
14150 field: Vec<super::UnchangedConsensusObject>,
14151 ) -> Self {
14152 self.set_unchanged_consensus_objects(field);
14153 self
14154 }
14155 pub fn auxiliary_data_digest_opt_mut(&mut self) -> Option<&mut String> {
14157 self.auxiliary_data_digest.as_mut().map(|field| field as _)
14158 }
14159 pub fn auxiliary_data_digest_mut(&mut self) -> &mut String {
14162 self.auxiliary_data_digest.get_or_insert_default()
14163 }
14164 pub fn auxiliary_data_digest_opt(&self) -> Option<&str> {
14166 self.auxiliary_data_digest.as_ref().map(|field| field as _)
14167 }
14168 pub fn set_auxiliary_data_digest<T: Into<String>>(&mut self, field: T) {
14170 self.auxiliary_data_digest = Some(field.into().into());
14171 }
14172 pub fn with_auxiliary_data_digest<T: Into<String>>(mut self, field: T) -> Self {
14174 self.set_auxiliary_data_digest(field.into());
14175 self
14176 }
14177 pub fn unchanged_loaded_runtime_objects(&self) -> &[super::ObjectReference] {
14179 &self.unchanged_loaded_runtime_objects
14180 }
14181 pub fn unchanged_loaded_runtime_objects_mut(
14184 &mut self,
14185 ) -> &mut Vec<super::ObjectReference> {
14186 &mut self.unchanged_loaded_runtime_objects
14187 }
14188 pub fn set_unchanged_loaded_runtime_objects(
14190 &mut self,
14191 field: Vec<super::ObjectReference>,
14192 ) {
14193 self.unchanged_loaded_runtime_objects = field;
14194 }
14195 pub fn with_unchanged_loaded_runtime_objects(
14197 mut self,
14198 field: Vec<super::ObjectReference>,
14199 ) -> Self {
14200 self.set_unchanged_loaded_runtime_objects(field);
14201 self
14202 }
14203 }
14204 impl super::TransactionEvents {
14205 pub const fn const_default() -> Self {
14206 Self {
14207 bcs: None,
14208 digest: None,
14209 events: Vec::new(),
14210 }
14211 }
14212 #[doc(hidden)]
14213 pub fn default_instance() -> &'static Self {
14214 static DEFAULT: super::TransactionEvents = super::TransactionEvents::const_default();
14215 &DEFAULT
14216 }
14217 pub fn bcs(&self) -> &super::Bcs {
14219 self.bcs
14220 .as_ref()
14221 .map(|field| field as _)
14222 .unwrap_or_else(|| super::Bcs::default_instance() as _)
14223 }
14224 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
14226 self.bcs.as_mut().map(|field| field as _)
14227 }
14228 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
14231 self.bcs.get_or_insert_default()
14232 }
14233 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
14235 self.bcs.as_ref().map(|field| field as _)
14236 }
14237 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
14239 self.bcs = Some(field.into().into());
14240 }
14241 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
14243 self.set_bcs(field.into());
14244 self
14245 }
14246 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
14248 self.digest.as_mut().map(|field| field as _)
14249 }
14250 pub fn digest_mut(&mut self) -> &mut String {
14253 self.digest.get_or_insert_default()
14254 }
14255 pub fn digest_opt(&self) -> Option<&str> {
14257 self.digest.as_ref().map(|field| field as _)
14258 }
14259 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
14261 self.digest = Some(field.into().into());
14262 }
14263 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
14265 self.set_digest(field.into());
14266 self
14267 }
14268 pub fn events(&self) -> &[super::Event] {
14270 &self.events
14271 }
14272 pub fn events_mut(&mut self) -> &mut Vec<super::Event> {
14275 &mut self.events
14276 }
14277 pub fn set_events(&mut self, field: Vec<super::Event>) {
14279 self.events = field;
14280 }
14281 pub fn with_events(mut self, field: Vec<super::Event>) -> Self {
14283 self.set_events(field);
14284 self
14285 }
14286 }
14287 impl super::TransactionExpiration {
14288 pub const fn const_default() -> Self {
14289 Self { kind: None, epoch: None }
14290 }
14291 #[doc(hidden)]
14292 pub fn default_instance() -> &'static Self {
14293 static DEFAULT: super::TransactionExpiration = super::TransactionExpiration::const_default();
14294 &DEFAULT
14295 }
14296 pub fn with_kind<
14298 T: Into<super::transaction_expiration::TransactionExpirationKind>,
14299 >(mut self, field: T) -> Self {
14300 self.set_kind(field.into());
14301 self
14302 }
14303 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
14305 self.epoch.as_mut().map(|field| field as _)
14306 }
14307 pub fn epoch_mut(&mut self) -> &mut u64 {
14310 self.epoch.get_or_insert_default()
14311 }
14312 pub fn epoch_opt(&self) -> Option<u64> {
14314 self.epoch.as_ref().map(|field| *field)
14315 }
14316 pub fn set_epoch<T: Into<u64>>(&mut self, field: T) {
14318 self.epoch = Some(field.into().into());
14319 }
14320 pub fn with_epoch<T: Into<u64>>(mut self, field: T) -> Self {
14322 self.set_epoch(field.into());
14323 self
14324 }
14325 }
14326 impl super::TransactionKind {
14327 pub const fn const_default() -> Self {
14328 Self { kind: None, data: None }
14329 }
14330 #[doc(hidden)]
14331 pub fn default_instance() -> &'static Self {
14332 static DEFAULT: super::TransactionKind = super::TransactionKind::const_default();
14333 &DEFAULT
14334 }
14335 pub fn with_kind<T: Into<super::transaction_kind::Kind>>(
14337 mut self,
14338 field: T,
14339 ) -> Self {
14340 self.set_kind(field.into());
14341 self
14342 }
14343 pub fn programmable_transaction(&self) -> &super::ProgrammableTransaction {
14345 if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &self
14346 .data
14347 {
14348 field as _
14349 } else {
14350 super::ProgrammableTransaction::default_instance() as _
14351 }
14352 }
14353 pub fn programmable_transaction_opt(
14355 &self,
14356 ) -> Option<&super::ProgrammableTransaction> {
14357 if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &self
14358 .data
14359 {
14360 Some(field as _)
14361 } else {
14362 None
14363 }
14364 }
14365 pub fn programmable_transaction_opt_mut(
14367 &mut self,
14368 ) -> Option<&mut super::ProgrammableTransaction> {
14369 if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &mut self
14370 .data
14371 {
14372 Some(field as _)
14373 } else {
14374 None
14375 }
14376 }
14377 pub fn programmable_transaction_mut(
14381 &mut self,
14382 ) -> &mut super::ProgrammableTransaction {
14383 if self.programmable_transaction_opt_mut().is_none() {
14384 self.data = Some(
14385 super::transaction_kind::Data::ProgrammableTransaction(
14386 super::ProgrammableTransaction::default(),
14387 ),
14388 );
14389 }
14390 self.programmable_transaction_opt_mut().unwrap()
14391 }
14392 pub fn set_programmable_transaction<T: Into<super::ProgrammableTransaction>>(
14395 &mut self,
14396 field: T,
14397 ) {
14398 self.data = Some(
14399 super::transaction_kind::Data::ProgrammableTransaction(
14400 field.into().into(),
14401 ),
14402 );
14403 }
14404 pub fn with_programmable_transaction<T: Into<super::ProgrammableTransaction>>(
14407 mut self,
14408 field: T,
14409 ) -> Self {
14410 self.set_programmable_transaction(field.into());
14411 self
14412 }
14413 pub fn change_epoch(&self) -> &super::ChangeEpoch {
14415 if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &self.data {
14416 field as _
14417 } else {
14418 super::ChangeEpoch::default_instance() as _
14419 }
14420 }
14421 pub fn change_epoch_opt(&self) -> Option<&super::ChangeEpoch> {
14423 if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &self.data {
14424 Some(field as _)
14425 } else {
14426 None
14427 }
14428 }
14429 pub fn change_epoch_opt_mut(&mut self) -> Option<&mut super::ChangeEpoch> {
14431 if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &mut self
14432 .data
14433 {
14434 Some(field as _)
14435 } else {
14436 None
14437 }
14438 }
14439 pub fn change_epoch_mut(&mut self) -> &mut super::ChangeEpoch {
14443 if self.change_epoch_opt_mut().is_none() {
14444 self.data = Some(
14445 super::transaction_kind::Data::ChangeEpoch(
14446 super::ChangeEpoch::default(),
14447 ),
14448 );
14449 }
14450 self.change_epoch_opt_mut().unwrap()
14451 }
14452 pub fn set_change_epoch<T: Into<super::ChangeEpoch>>(&mut self, field: T) {
14455 self.data = Some(
14456 super::transaction_kind::Data::ChangeEpoch(field.into().into()),
14457 );
14458 }
14459 pub fn with_change_epoch<T: Into<super::ChangeEpoch>>(
14462 mut self,
14463 field: T,
14464 ) -> Self {
14465 self.set_change_epoch(field.into());
14466 self
14467 }
14468 pub fn genesis(&self) -> &super::GenesisTransaction {
14470 if let Some(super::transaction_kind::Data::Genesis(field)) = &self.data {
14471 field as _
14472 } else {
14473 super::GenesisTransaction::default_instance() as _
14474 }
14475 }
14476 pub fn genesis_opt(&self) -> Option<&super::GenesisTransaction> {
14478 if let Some(super::transaction_kind::Data::Genesis(field)) = &self.data {
14479 Some(field as _)
14480 } else {
14481 None
14482 }
14483 }
14484 pub fn genesis_opt_mut(&mut self) -> Option<&mut super::GenesisTransaction> {
14486 if let Some(super::transaction_kind::Data::Genesis(field)) = &mut self.data {
14487 Some(field as _)
14488 } else {
14489 None
14490 }
14491 }
14492 pub fn genesis_mut(&mut self) -> &mut super::GenesisTransaction {
14496 if self.genesis_opt_mut().is_none() {
14497 self.data = Some(
14498 super::transaction_kind::Data::Genesis(
14499 super::GenesisTransaction::default(),
14500 ),
14501 );
14502 }
14503 self.genesis_opt_mut().unwrap()
14504 }
14505 pub fn set_genesis<T: Into<super::GenesisTransaction>>(&mut self, field: T) {
14508 self.data = Some(
14509 super::transaction_kind::Data::Genesis(field.into().into()),
14510 );
14511 }
14512 pub fn with_genesis<T: Into<super::GenesisTransaction>>(
14515 mut self,
14516 field: T,
14517 ) -> Self {
14518 self.set_genesis(field.into());
14519 self
14520 }
14521 pub fn consensus_commit_prologue(&self) -> &super::ConsensusCommitPrologue {
14523 if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &self
14524 .data
14525 {
14526 field as _
14527 } else {
14528 super::ConsensusCommitPrologue::default_instance() as _
14529 }
14530 }
14531 pub fn consensus_commit_prologue_opt(
14533 &self,
14534 ) -> Option<&super::ConsensusCommitPrologue> {
14535 if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &self
14536 .data
14537 {
14538 Some(field as _)
14539 } else {
14540 None
14541 }
14542 }
14543 pub fn consensus_commit_prologue_opt_mut(
14545 &mut self,
14546 ) -> Option<&mut super::ConsensusCommitPrologue> {
14547 if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &mut self
14548 .data
14549 {
14550 Some(field as _)
14551 } else {
14552 None
14553 }
14554 }
14555 pub fn consensus_commit_prologue_mut(
14559 &mut self,
14560 ) -> &mut super::ConsensusCommitPrologue {
14561 if self.consensus_commit_prologue_opt_mut().is_none() {
14562 self.data = Some(
14563 super::transaction_kind::Data::ConsensusCommitPrologue(
14564 super::ConsensusCommitPrologue::default(),
14565 ),
14566 );
14567 }
14568 self.consensus_commit_prologue_opt_mut().unwrap()
14569 }
14570 pub fn set_consensus_commit_prologue<T: Into<super::ConsensusCommitPrologue>>(
14573 &mut self,
14574 field: T,
14575 ) {
14576 self.data = Some(
14577 super::transaction_kind::Data::ConsensusCommitPrologue(
14578 field.into().into(),
14579 ),
14580 );
14581 }
14582 pub fn with_consensus_commit_prologue<T: Into<super::ConsensusCommitPrologue>>(
14585 mut self,
14586 field: T,
14587 ) -> Self {
14588 self.set_consensus_commit_prologue(field.into());
14589 self
14590 }
14591 pub fn authenticator_state_update(&self) -> &super::AuthenticatorStateUpdate {
14593 if let Some(
14594 super::transaction_kind::Data::AuthenticatorStateUpdate(field),
14595 ) = &self.data
14596 {
14597 field as _
14598 } else {
14599 super::AuthenticatorStateUpdate::default_instance() as _
14600 }
14601 }
14602 pub fn authenticator_state_update_opt(
14604 &self,
14605 ) -> Option<&super::AuthenticatorStateUpdate> {
14606 if let Some(
14607 super::transaction_kind::Data::AuthenticatorStateUpdate(field),
14608 ) = &self.data
14609 {
14610 Some(field as _)
14611 } else {
14612 None
14613 }
14614 }
14615 pub fn authenticator_state_update_opt_mut(
14617 &mut self,
14618 ) -> Option<&mut super::AuthenticatorStateUpdate> {
14619 if let Some(
14620 super::transaction_kind::Data::AuthenticatorStateUpdate(field),
14621 ) = &mut self.data
14622 {
14623 Some(field as _)
14624 } else {
14625 None
14626 }
14627 }
14628 pub fn authenticator_state_update_mut(
14632 &mut self,
14633 ) -> &mut super::AuthenticatorStateUpdate {
14634 if self.authenticator_state_update_opt_mut().is_none() {
14635 self.data = Some(
14636 super::transaction_kind::Data::AuthenticatorStateUpdate(
14637 super::AuthenticatorStateUpdate::default(),
14638 ),
14639 );
14640 }
14641 self.authenticator_state_update_opt_mut().unwrap()
14642 }
14643 pub fn set_authenticator_state_update<T: Into<super::AuthenticatorStateUpdate>>(
14646 &mut self,
14647 field: T,
14648 ) {
14649 self.data = Some(
14650 super::transaction_kind::Data::AuthenticatorStateUpdate(
14651 field.into().into(),
14652 ),
14653 );
14654 }
14655 pub fn with_authenticator_state_update<T: Into<super::AuthenticatorStateUpdate>>(
14658 mut self,
14659 field: T,
14660 ) -> Self {
14661 self.set_authenticator_state_update(field.into());
14662 self
14663 }
14664 pub fn end_of_epoch(&self) -> &super::EndOfEpochTransaction {
14666 if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &self.data {
14667 field as _
14668 } else {
14669 super::EndOfEpochTransaction::default_instance() as _
14670 }
14671 }
14672 pub fn end_of_epoch_opt(&self) -> Option<&super::EndOfEpochTransaction> {
14674 if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &self.data {
14675 Some(field as _)
14676 } else {
14677 None
14678 }
14679 }
14680 pub fn end_of_epoch_opt_mut(
14682 &mut self,
14683 ) -> Option<&mut super::EndOfEpochTransaction> {
14684 if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &mut self
14685 .data
14686 {
14687 Some(field as _)
14688 } else {
14689 None
14690 }
14691 }
14692 pub fn end_of_epoch_mut(&mut self) -> &mut super::EndOfEpochTransaction {
14696 if self.end_of_epoch_opt_mut().is_none() {
14697 self.data = Some(
14698 super::transaction_kind::Data::EndOfEpoch(
14699 super::EndOfEpochTransaction::default(),
14700 ),
14701 );
14702 }
14703 self.end_of_epoch_opt_mut().unwrap()
14704 }
14705 pub fn set_end_of_epoch<T: Into<super::EndOfEpochTransaction>>(
14708 &mut self,
14709 field: T,
14710 ) {
14711 self.data = Some(
14712 super::transaction_kind::Data::EndOfEpoch(field.into().into()),
14713 );
14714 }
14715 pub fn with_end_of_epoch<T: Into<super::EndOfEpochTransaction>>(
14718 mut self,
14719 field: T,
14720 ) -> Self {
14721 self.set_end_of_epoch(field.into());
14722 self
14723 }
14724 pub fn randomness_state_update(&self) -> &super::RandomnessStateUpdate {
14726 if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &self
14727 .data
14728 {
14729 field as _
14730 } else {
14731 super::RandomnessStateUpdate::default_instance() as _
14732 }
14733 }
14734 pub fn randomness_state_update_opt(
14736 &self,
14737 ) -> Option<&super::RandomnessStateUpdate> {
14738 if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &self
14739 .data
14740 {
14741 Some(field as _)
14742 } else {
14743 None
14744 }
14745 }
14746 pub fn randomness_state_update_opt_mut(
14748 &mut self,
14749 ) -> Option<&mut super::RandomnessStateUpdate> {
14750 if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &mut self
14751 .data
14752 {
14753 Some(field as _)
14754 } else {
14755 None
14756 }
14757 }
14758 pub fn randomness_state_update_mut(
14762 &mut self,
14763 ) -> &mut super::RandomnessStateUpdate {
14764 if self.randomness_state_update_opt_mut().is_none() {
14765 self.data = Some(
14766 super::transaction_kind::Data::RandomnessStateUpdate(
14767 super::RandomnessStateUpdate::default(),
14768 ),
14769 );
14770 }
14771 self.randomness_state_update_opt_mut().unwrap()
14772 }
14773 pub fn set_randomness_state_update<T: Into<super::RandomnessStateUpdate>>(
14776 &mut self,
14777 field: T,
14778 ) {
14779 self.data = Some(
14780 super::transaction_kind::Data::RandomnessStateUpdate(field.into().into()),
14781 );
14782 }
14783 pub fn with_randomness_state_update<T: Into<super::RandomnessStateUpdate>>(
14786 mut self,
14787 field: T,
14788 ) -> Self {
14789 self.set_randomness_state_update(field.into());
14790 self
14791 }
14792 }
14793 impl super::TransferObjects {
14794 pub const fn const_default() -> Self {
14795 Self {
14796 objects: Vec::new(),
14797 address: None,
14798 }
14799 }
14800 #[doc(hidden)]
14801 pub fn default_instance() -> &'static Self {
14802 static DEFAULT: super::TransferObjects = super::TransferObjects::const_default();
14803 &DEFAULT
14804 }
14805 pub fn objects(&self) -> &[super::Argument] {
14807 &self.objects
14808 }
14809 pub fn objects_mut(&mut self) -> &mut Vec<super::Argument> {
14812 &mut self.objects
14813 }
14814 pub fn set_objects(&mut self, field: Vec<super::Argument>) {
14816 self.objects = field;
14817 }
14818 pub fn with_objects(mut self, field: Vec<super::Argument>) -> Self {
14820 self.set_objects(field);
14821 self
14822 }
14823 pub fn address(&self) -> &super::Argument {
14825 self.address
14826 .as_ref()
14827 .map(|field| field as _)
14828 .unwrap_or_else(|| super::Argument::default_instance() as _)
14829 }
14830 pub fn address_opt_mut(&mut self) -> Option<&mut super::Argument> {
14832 self.address.as_mut().map(|field| field as _)
14833 }
14834 pub fn address_mut(&mut self) -> &mut super::Argument {
14837 self.address.get_or_insert_default()
14838 }
14839 pub fn address_opt(&self) -> Option<&super::Argument> {
14841 self.address.as_ref().map(|field| field as _)
14842 }
14843 pub fn set_address<T: Into<super::Argument>>(&mut self, field: T) {
14845 self.address = Some(field.into().into());
14846 }
14847 pub fn with_address<T: Into<super::Argument>>(mut self, field: T) -> Self {
14849 self.set_address(field.into());
14850 self
14851 }
14852 }
14853 impl super::TypeArgumentError {
14854 pub const fn const_default() -> Self {
14855 Self {
14856 type_argument: None,
14857 kind: None,
14858 }
14859 }
14860 #[doc(hidden)]
14861 pub fn default_instance() -> &'static Self {
14862 static DEFAULT: super::TypeArgumentError = super::TypeArgumentError::const_default();
14863 &DEFAULT
14864 }
14865 pub fn type_argument_opt_mut(&mut self) -> Option<&mut u32> {
14867 self.type_argument.as_mut().map(|field| field as _)
14868 }
14869 pub fn type_argument_mut(&mut self) -> &mut u32 {
14872 self.type_argument.get_or_insert_default()
14873 }
14874 pub fn type_argument_opt(&self) -> Option<u32> {
14876 self.type_argument.as_ref().map(|field| *field)
14877 }
14878 pub fn set_type_argument<T: Into<u32>>(&mut self, field: T) {
14880 self.type_argument = Some(field.into().into());
14881 }
14882 pub fn with_type_argument<T: Into<u32>>(mut self, field: T) -> Self {
14884 self.set_type_argument(field.into());
14885 self
14886 }
14887 pub fn with_kind<T: Into<super::type_argument_error::TypeArgumentErrorKind>>(
14889 mut self,
14890 field: T,
14891 ) -> Self {
14892 self.set_kind(field.into());
14893 self
14894 }
14895 }
14896 impl super::TypeOrigin {
14897 pub const fn const_default() -> Self {
14898 Self {
14899 module_name: None,
14900 datatype_name: None,
14901 package_id: None,
14902 }
14903 }
14904 #[doc(hidden)]
14905 pub fn default_instance() -> &'static Self {
14906 static DEFAULT: super::TypeOrigin = super::TypeOrigin::const_default();
14907 &DEFAULT
14908 }
14909 pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
14911 self.module_name.as_mut().map(|field| field as _)
14912 }
14913 pub fn module_name_mut(&mut self) -> &mut String {
14916 self.module_name.get_or_insert_default()
14917 }
14918 pub fn module_name_opt(&self) -> Option<&str> {
14920 self.module_name.as_ref().map(|field| field as _)
14921 }
14922 pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
14924 self.module_name = Some(field.into().into());
14925 }
14926 pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
14928 self.set_module_name(field.into());
14929 self
14930 }
14931 pub fn datatype_name_opt_mut(&mut self) -> Option<&mut String> {
14933 self.datatype_name.as_mut().map(|field| field as _)
14934 }
14935 pub fn datatype_name_mut(&mut self) -> &mut String {
14938 self.datatype_name.get_or_insert_default()
14939 }
14940 pub fn datatype_name_opt(&self) -> Option<&str> {
14942 self.datatype_name.as_ref().map(|field| field as _)
14943 }
14944 pub fn set_datatype_name<T: Into<String>>(&mut self, field: T) {
14946 self.datatype_name = Some(field.into().into());
14947 }
14948 pub fn with_datatype_name<T: Into<String>>(mut self, field: T) -> Self {
14950 self.set_datatype_name(field.into());
14951 self
14952 }
14953 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
14955 self.package_id.as_mut().map(|field| field as _)
14956 }
14957 pub fn package_id_mut(&mut self) -> &mut String {
14960 self.package_id.get_or_insert_default()
14961 }
14962 pub fn package_id_opt(&self) -> Option<&str> {
14964 self.package_id.as_ref().map(|field| field as _)
14965 }
14966 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
14968 self.package_id = Some(field.into().into());
14969 }
14970 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
14972 self.set_package_id(field.into());
14973 self
14974 }
14975 }
14976 impl super::TypeParameter {
14977 pub const fn const_default() -> Self {
14978 Self {
14979 constraints: Vec::new(),
14980 is_phantom: None,
14981 }
14982 }
14983 #[doc(hidden)]
14984 pub fn default_instance() -> &'static Self {
14985 static DEFAULT: super::TypeParameter = super::TypeParameter::const_default();
14986 &DEFAULT
14987 }
14988 pub fn is_phantom_opt_mut(&mut self) -> Option<&mut bool> {
14990 self.is_phantom.as_mut().map(|field| field as _)
14991 }
14992 pub fn is_phantom_mut(&mut self) -> &mut bool {
14995 self.is_phantom.get_or_insert_default()
14996 }
14997 pub fn is_phantom_opt(&self) -> Option<bool> {
14999 self.is_phantom.as_ref().map(|field| *field)
15000 }
15001 pub fn set_is_phantom<T: Into<bool>>(&mut self, field: T) {
15003 self.is_phantom = Some(field.into().into());
15004 }
15005 pub fn with_is_phantom<T: Into<bool>>(mut self, field: T) -> Self {
15007 self.set_is_phantom(field.into());
15008 self
15009 }
15010 }
15011 impl super::UnchangedConsensusObject {
15012 pub const fn const_default() -> Self {
15013 Self {
15014 kind: None,
15015 object_id: None,
15016 version: None,
15017 digest: None,
15018 object_type: None,
15019 }
15020 }
15021 #[doc(hidden)]
15022 pub fn default_instance() -> &'static Self {
15023 static DEFAULT: super::UnchangedConsensusObject = super::UnchangedConsensusObject::const_default();
15024 &DEFAULT
15025 }
15026 pub fn with_kind<
15028 T: Into<super::unchanged_consensus_object::UnchangedConsensusObjectKind>,
15029 >(mut self, field: T) -> Self {
15030 self.set_kind(field.into());
15031 self
15032 }
15033 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
15035 self.object_id.as_mut().map(|field| field as _)
15036 }
15037 pub fn object_id_mut(&mut self) -> &mut String {
15040 self.object_id.get_or_insert_default()
15041 }
15042 pub fn object_id_opt(&self) -> Option<&str> {
15044 self.object_id.as_ref().map(|field| field as _)
15045 }
15046 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
15048 self.object_id = Some(field.into().into());
15049 }
15050 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
15052 self.set_object_id(field.into());
15053 self
15054 }
15055 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
15057 self.version.as_mut().map(|field| field as _)
15058 }
15059 pub fn version_mut(&mut self) -> &mut u64 {
15062 self.version.get_or_insert_default()
15063 }
15064 pub fn version_opt(&self) -> Option<u64> {
15066 self.version.as_ref().map(|field| *field)
15067 }
15068 pub fn set_version<T: Into<u64>>(&mut self, field: T) {
15070 self.version = Some(field.into().into());
15071 }
15072 pub fn with_version<T: Into<u64>>(mut self, field: T) -> Self {
15074 self.set_version(field.into());
15075 self
15076 }
15077 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
15079 self.digest.as_mut().map(|field| field as _)
15080 }
15081 pub fn digest_mut(&mut self) -> &mut String {
15084 self.digest.get_or_insert_default()
15085 }
15086 pub fn digest_opt(&self) -> Option<&str> {
15088 self.digest.as_ref().map(|field| field as _)
15089 }
15090 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
15092 self.digest = Some(field.into().into());
15093 }
15094 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
15096 self.set_digest(field.into());
15097 self
15098 }
15099 pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
15101 self.object_type.as_mut().map(|field| field as _)
15102 }
15103 pub fn object_type_mut(&mut self) -> &mut String {
15106 self.object_type.get_or_insert_default()
15107 }
15108 pub fn object_type_opt(&self) -> Option<&str> {
15110 self.object_type.as_ref().map(|field| field as _)
15111 }
15112 pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
15114 self.object_type = Some(field.into().into());
15115 }
15116 pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
15118 self.set_object_type(field.into());
15119 self
15120 }
15121 }
15122 impl super::Upgrade {
15123 pub const fn const_default() -> Self {
15124 Self {
15125 modules: Vec::new(),
15126 dependencies: Vec::new(),
15127 package: None,
15128 ticket: None,
15129 }
15130 }
15131 #[doc(hidden)]
15132 pub fn default_instance() -> &'static Self {
15133 static DEFAULT: super::Upgrade = super::Upgrade::const_default();
15134 &DEFAULT
15135 }
15136 pub fn modules(&self) -> &[::prost::bytes::Bytes] {
15138 &self.modules
15139 }
15140 pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
15143 &mut self.modules
15144 }
15145 pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
15147 self.modules = field;
15148 }
15149 pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
15151 self.set_modules(field);
15152 self
15153 }
15154 pub fn dependencies(&self) -> &[String] {
15156 &self.dependencies
15157 }
15158 pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
15161 &mut self.dependencies
15162 }
15163 pub fn set_dependencies(&mut self, field: Vec<String>) {
15165 self.dependencies = field;
15166 }
15167 pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
15169 self.set_dependencies(field);
15170 self
15171 }
15172 pub fn package_opt_mut(&mut self) -> Option<&mut String> {
15174 self.package.as_mut().map(|field| field as _)
15175 }
15176 pub fn package_mut(&mut self) -> &mut String {
15179 self.package.get_or_insert_default()
15180 }
15181 pub fn package_opt(&self) -> Option<&str> {
15183 self.package.as_ref().map(|field| field as _)
15184 }
15185 pub fn set_package<T: Into<String>>(&mut self, field: T) {
15187 self.package = Some(field.into().into());
15188 }
15189 pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
15191 self.set_package(field.into());
15192 self
15193 }
15194 pub fn ticket(&self) -> &super::Argument {
15196 self.ticket
15197 .as_ref()
15198 .map(|field| field as _)
15199 .unwrap_or_else(|| super::Argument::default_instance() as _)
15200 }
15201 pub fn ticket_opt_mut(&mut self) -> Option<&mut super::Argument> {
15203 self.ticket.as_mut().map(|field| field as _)
15204 }
15205 pub fn ticket_mut(&mut self) -> &mut super::Argument {
15208 self.ticket.get_or_insert_default()
15209 }
15210 pub fn ticket_opt(&self) -> Option<&super::Argument> {
15212 self.ticket.as_ref().map(|field| field as _)
15213 }
15214 pub fn set_ticket<T: Into<super::Argument>>(&mut self, field: T) {
15216 self.ticket = Some(field.into().into());
15217 }
15218 pub fn with_ticket<T: Into<super::Argument>>(mut self, field: T) -> Self {
15220 self.set_ticket(field.into());
15221 self
15222 }
15223 }
15224 impl super::UserSignature {
15225 pub const fn const_default() -> Self {
15226 Self {
15227 bcs: None,
15228 scheme: None,
15229 signature: None,
15230 }
15231 }
15232 #[doc(hidden)]
15233 pub fn default_instance() -> &'static Self {
15234 static DEFAULT: super::UserSignature = super::UserSignature::const_default();
15235 &DEFAULT
15236 }
15237 pub fn bcs(&self) -> &super::Bcs {
15239 self.bcs
15240 .as_ref()
15241 .map(|field| field as _)
15242 .unwrap_or_else(|| super::Bcs::default_instance() as _)
15243 }
15244 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
15246 self.bcs.as_mut().map(|field| field as _)
15247 }
15248 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
15251 self.bcs.get_or_insert_default()
15252 }
15253 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
15255 self.bcs.as_ref().map(|field| field as _)
15256 }
15257 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
15259 self.bcs = Some(field.into().into());
15260 }
15261 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
15263 self.set_bcs(field.into());
15264 self
15265 }
15266 pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
15268 self.set_scheme(field.into());
15269 self
15270 }
15271 pub fn simple(&self) -> &super::SimpleSignature {
15273 if let Some(super::user_signature::Signature::Simple(field)) = &self
15274 .signature
15275 {
15276 field as _
15277 } else {
15278 super::SimpleSignature::default_instance() as _
15279 }
15280 }
15281 pub fn simple_opt(&self) -> Option<&super::SimpleSignature> {
15283 if let Some(super::user_signature::Signature::Simple(field)) = &self
15284 .signature
15285 {
15286 Some(field as _)
15287 } else {
15288 None
15289 }
15290 }
15291 pub fn simple_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
15293 if let Some(super::user_signature::Signature::Simple(field)) = &mut self
15294 .signature
15295 {
15296 Some(field as _)
15297 } else {
15298 None
15299 }
15300 }
15301 pub fn simple_mut(&mut self) -> &mut super::SimpleSignature {
15305 if self.simple_opt_mut().is_none() {
15306 self.signature = Some(
15307 super::user_signature::Signature::Simple(
15308 super::SimpleSignature::default(),
15309 ),
15310 );
15311 }
15312 self.simple_opt_mut().unwrap()
15313 }
15314 pub fn set_simple<T: Into<super::SimpleSignature>>(&mut self, field: T) {
15317 self.signature = Some(
15318 super::user_signature::Signature::Simple(field.into().into()),
15319 );
15320 }
15321 pub fn with_simple<T: Into<super::SimpleSignature>>(mut self, field: T) -> Self {
15324 self.set_simple(field.into());
15325 self
15326 }
15327 pub fn multisig(&self) -> &super::MultisigAggregatedSignature {
15329 if let Some(super::user_signature::Signature::Multisig(field)) = &self
15330 .signature
15331 {
15332 field as _
15333 } else {
15334 super::MultisigAggregatedSignature::default_instance() as _
15335 }
15336 }
15337 pub fn multisig_opt(&self) -> Option<&super::MultisigAggregatedSignature> {
15339 if let Some(super::user_signature::Signature::Multisig(field)) = &self
15340 .signature
15341 {
15342 Some(field as _)
15343 } else {
15344 None
15345 }
15346 }
15347 pub fn multisig_opt_mut(
15349 &mut self,
15350 ) -> Option<&mut super::MultisigAggregatedSignature> {
15351 if let Some(super::user_signature::Signature::Multisig(field)) = &mut self
15352 .signature
15353 {
15354 Some(field as _)
15355 } else {
15356 None
15357 }
15358 }
15359 pub fn multisig_mut(&mut self) -> &mut super::MultisigAggregatedSignature {
15363 if self.multisig_opt_mut().is_none() {
15364 self.signature = Some(
15365 super::user_signature::Signature::Multisig(
15366 super::MultisigAggregatedSignature::default(),
15367 ),
15368 );
15369 }
15370 self.multisig_opt_mut().unwrap()
15371 }
15372 pub fn set_multisig<T: Into<super::MultisigAggregatedSignature>>(
15375 &mut self,
15376 field: T,
15377 ) {
15378 self.signature = Some(
15379 super::user_signature::Signature::Multisig(field.into().into()),
15380 );
15381 }
15382 pub fn with_multisig<T: Into<super::MultisigAggregatedSignature>>(
15385 mut self,
15386 field: T,
15387 ) -> Self {
15388 self.set_multisig(field.into());
15389 self
15390 }
15391 pub fn zklogin(&self) -> &super::ZkLoginAuthenticator {
15393 if let Some(super::user_signature::Signature::Zklogin(field)) = &self
15394 .signature
15395 {
15396 field as _
15397 } else {
15398 super::ZkLoginAuthenticator::default_instance() as _
15399 }
15400 }
15401 pub fn zklogin_opt(&self) -> Option<&super::ZkLoginAuthenticator> {
15403 if let Some(super::user_signature::Signature::Zklogin(field)) = &self
15404 .signature
15405 {
15406 Some(field as _)
15407 } else {
15408 None
15409 }
15410 }
15411 pub fn zklogin_opt_mut(&mut self) -> Option<&mut super::ZkLoginAuthenticator> {
15413 if let Some(super::user_signature::Signature::Zklogin(field)) = &mut self
15414 .signature
15415 {
15416 Some(field as _)
15417 } else {
15418 None
15419 }
15420 }
15421 pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginAuthenticator {
15425 if self.zklogin_opt_mut().is_none() {
15426 self.signature = Some(
15427 super::user_signature::Signature::Zklogin(
15428 super::ZkLoginAuthenticator::default(),
15429 ),
15430 );
15431 }
15432 self.zklogin_opt_mut().unwrap()
15433 }
15434 pub fn set_zklogin<T: Into<super::ZkLoginAuthenticator>>(&mut self, field: T) {
15437 self.signature = Some(
15438 super::user_signature::Signature::Zklogin(field.into().into()),
15439 );
15440 }
15441 pub fn with_zklogin<T: Into<super::ZkLoginAuthenticator>>(
15444 mut self,
15445 field: T,
15446 ) -> Self {
15447 self.set_zklogin(field.into());
15448 self
15449 }
15450 pub fn passkey(&self) -> &super::PasskeyAuthenticator {
15452 if let Some(super::user_signature::Signature::Passkey(field)) = &self
15453 .signature
15454 {
15455 field as _
15456 } else {
15457 super::PasskeyAuthenticator::default_instance() as _
15458 }
15459 }
15460 pub fn passkey_opt(&self) -> Option<&super::PasskeyAuthenticator> {
15462 if let Some(super::user_signature::Signature::Passkey(field)) = &self
15463 .signature
15464 {
15465 Some(field as _)
15466 } else {
15467 None
15468 }
15469 }
15470 pub fn passkey_opt_mut(&mut self) -> Option<&mut super::PasskeyAuthenticator> {
15472 if let Some(super::user_signature::Signature::Passkey(field)) = &mut self
15473 .signature
15474 {
15475 Some(field as _)
15476 } else {
15477 None
15478 }
15479 }
15480 pub fn passkey_mut(&mut self) -> &mut super::PasskeyAuthenticator {
15484 if self.passkey_opt_mut().is_none() {
15485 self.signature = Some(
15486 super::user_signature::Signature::Passkey(
15487 super::PasskeyAuthenticator::default(),
15488 ),
15489 );
15490 }
15491 self.passkey_opt_mut().unwrap()
15492 }
15493 pub fn set_passkey<T: Into<super::PasskeyAuthenticator>>(&mut self, field: T) {
15496 self.signature = Some(
15497 super::user_signature::Signature::Passkey(field.into().into()),
15498 );
15499 }
15500 pub fn with_passkey<T: Into<super::PasskeyAuthenticator>>(
15503 mut self,
15504 field: T,
15505 ) -> Self {
15506 self.set_passkey(field.into());
15507 self
15508 }
15509 }
15510 impl super::Validator {
15511 pub const fn const_default() -> Self {
15512 Self {
15513 name: None,
15514 address: None,
15515 description: None,
15516 image_url: None,
15517 project_url: None,
15518 protocol_public_key: None,
15519 proof_of_possession: None,
15520 network_public_key: None,
15521 worker_public_key: None,
15522 network_address: None,
15523 p2p_address: None,
15524 primary_address: None,
15525 worker_address: None,
15526 next_epoch_protocol_public_key: None,
15527 next_epoch_proof_of_possession: None,
15528 next_epoch_network_public_key: None,
15529 next_epoch_worker_public_key: None,
15530 next_epoch_network_address: None,
15531 next_epoch_p2p_address: None,
15532 next_epoch_primary_address: None,
15533 next_epoch_worker_address: None,
15534 metadata_extra_fields: None,
15535 voting_power: None,
15536 operation_cap_id: None,
15537 gas_price: None,
15538 staking_pool: None,
15539 commission_rate: None,
15540 next_epoch_stake: None,
15541 next_epoch_gas_price: None,
15542 next_epoch_commission_rate: None,
15543 extra_fields: None,
15544 }
15545 }
15546 #[doc(hidden)]
15547 pub fn default_instance() -> &'static Self {
15548 static DEFAULT: super::Validator = super::Validator::const_default();
15549 &DEFAULT
15550 }
15551 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
15553 self.name.as_mut().map(|field| field as _)
15554 }
15555 pub fn name_mut(&mut self) -> &mut String {
15558 self.name.get_or_insert_default()
15559 }
15560 pub fn name_opt(&self) -> Option<&str> {
15562 self.name.as_ref().map(|field| field as _)
15563 }
15564 pub fn set_name<T: Into<String>>(&mut self, field: T) {
15566 self.name = Some(field.into().into());
15567 }
15568 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
15570 self.set_name(field.into());
15571 self
15572 }
15573 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
15575 self.address.as_mut().map(|field| field as _)
15576 }
15577 pub fn address_mut(&mut self) -> &mut String {
15580 self.address.get_or_insert_default()
15581 }
15582 pub fn address_opt(&self) -> Option<&str> {
15584 self.address.as_ref().map(|field| field as _)
15585 }
15586 pub fn set_address<T: Into<String>>(&mut self, field: T) {
15588 self.address = Some(field.into().into());
15589 }
15590 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
15592 self.set_address(field.into());
15593 self
15594 }
15595 pub fn description_opt_mut(&mut self) -> Option<&mut String> {
15597 self.description.as_mut().map(|field| field as _)
15598 }
15599 pub fn description_mut(&mut self) -> &mut String {
15602 self.description.get_or_insert_default()
15603 }
15604 pub fn description_opt(&self) -> Option<&str> {
15606 self.description.as_ref().map(|field| field as _)
15607 }
15608 pub fn set_description<T: Into<String>>(&mut self, field: T) {
15610 self.description = Some(field.into().into());
15611 }
15612 pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
15614 self.set_description(field.into());
15615 self
15616 }
15617 pub fn image_url_opt_mut(&mut self) -> Option<&mut String> {
15619 self.image_url.as_mut().map(|field| field as _)
15620 }
15621 pub fn image_url_mut(&mut self) -> &mut String {
15624 self.image_url.get_or_insert_default()
15625 }
15626 pub fn image_url_opt(&self) -> Option<&str> {
15628 self.image_url.as_ref().map(|field| field as _)
15629 }
15630 pub fn set_image_url<T: Into<String>>(&mut self, field: T) {
15632 self.image_url = Some(field.into().into());
15633 }
15634 pub fn with_image_url<T: Into<String>>(mut self, field: T) -> Self {
15636 self.set_image_url(field.into());
15637 self
15638 }
15639 pub fn project_url_opt_mut(&mut self) -> Option<&mut String> {
15641 self.project_url.as_mut().map(|field| field as _)
15642 }
15643 pub fn project_url_mut(&mut self) -> &mut String {
15646 self.project_url.get_or_insert_default()
15647 }
15648 pub fn project_url_opt(&self) -> Option<&str> {
15650 self.project_url.as_ref().map(|field| field as _)
15651 }
15652 pub fn set_project_url<T: Into<String>>(&mut self, field: T) {
15654 self.project_url = Some(field.into().into());
15655 }
15656 pub fn with_project_url<T: Into<String>>(mut self, field: T) -> Self {
15658 self.set_project_url(field.into());
15659 self
15660 }
15661 pub fn protocol_public_key_opt(&self) -> Option<&[u8]> {
15663 self.protocol_public_key.as_ref().map(|field| field as _)
15664 }
15665 pub fn set_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
15667 &mut self,
15668 field: T,
15669 ) {
15670 self.protocol_public_key = Some(field.into().into());
15671 }
15672 pub fn with_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
15674 mut self,
15675 field: T,
15676 ) -> Self {
15677 self.set_protocol_public_key(field.into());
15678 self
15679 }
15680 pub fn proof_of_possession_opt(&self) -> Option<&[u8]> {
15682 self.proof_of_possession.as_ref().map(|field| field as _)
15683 }
15684 pub fn set_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
15686 &mut self,
15687 field: T,
15688 ) {
15689 self.proof_of_possession = Some(field.into().into());
15690 }
15691 pub fn with_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
15693 mut self,
15694 field: T,
15695 ) -> Self {
15696 self.set_proof_of_possession(field.into());
15697 self
15698 }
15699 pub fn network_public_key_opt(&self) -> Option<&[u8]> {
15701 self.network_public_key.as_ref().map(|field| field as _)
15702 }
15703 pub fn set_network_public_key<T: Into<::prost::bytes::Bytes>>(
15705 &mut self,
15706 field: T,
15707 ) {
15708 self.network_public_key = Some(field.into().into());
15709 }
15710 pub fn with_network_public_key<T: Into<::prost::bytes::Bytes>>(
15712 mut self,
15713 field: T,
15714 ) -> Self {
15715 self.set_network_public_key(field.into());
15716 self
15717 }
15718 pub fn worker_public_key_opt(&self) -> Option<&[u8]> {
15720 self.worker_public_key.as_ref().map(|field| field as _)
15721 }
15722 pub fn set_worker_public_key<T: Into<::prost::bytes::Bytes>>(
15724 &mut self,
15725 field: T,
15726 ) {
15727 self.worker_public_key = Some(field.into().into());
15728 }
15729 pub fn with_worker_public_key<T: Into<::prost::bytes::Bytes>>(
15731 mut self,
15732 field: T,
15733 ) -> Self {
15734 self.set_worker_public_key(field.into());
15735 self
15736 }
15737 pub fn network_address_opt_mut(&mut self) -> Option<&mut String> {
15739 self.network_address.as_mut().map(|field| field as _)
15740 }
15741 pub fn network_address_mut(&mut self) -> &mut String {
15744 self.network_address.get_or_insert_default()
15745 }
15746 pub fn network_address_opt(&self) -> Option<&str> {
15748 self.network_address.as_ref().map(|field| field as _)
15749 }
15750 pub fn set_network_address<T: Into<String>>(&mut self, field: T) {
15752 self.network_address = Some(field.into().into());
15753 }
15754 pub fn with_network_address<T: Into<String>>(mut self, field: T) -> Self {
15756 self.set_network_address(field.into());
15757 self
15758 }
15759 pub fn p2p_address_opt_mut(&mut self) -> Option<&mut String> {
15761 self.p2p_address.as_mut().map(|field| field as _)
15762 }
15763 pub fn p2p_address_mut(&mut self) -> &mut String {
15766 self.p2p_address.get_or_insert_default()
15767 }
15768 pub fn p2p_address_opt(&self) -> Option<&str> {
15770 self.p2p_address.as_ref().map(|field| field as _)
15771 }
15772 pub fn set_p2p_address<T: Into<String>>(&mut self, field: T) {
15774 self.p2p_address = Some(field.into().into());
15775 }
15776 pub fn with_p2p_address<T: Into<String>>(mut self, field: T) -> Self {
15778 self.set_p2p_address(field.into());
15779 self
15780 }
15781 pub fn primary_address_opt_mut(&mut self) -> Option<&mut String> {
15783 self.primary_address.as_mut().map(|field| field as _)
15784 }
15785 pub fn primary_address_mut(&mut self) -> &mut String {
15788 self.primary_address.get_or_insert_default()
15789 }
15790 pub fn primary_address_opt(&self) -> Option<&str> {
15792 self.primary_address.as_ref().map(|field| field as _)
15793 }
15794 pub fn set_primary_address<T: Into<String>>(&mut self, field: T) {
15796 self.primary_address = Some(field.into().into());
15797 }
15798 pub fn with_primary_address<T: Into<String>>(mut self, field: T) -> Self {
15800 self.set_primary_address(field.into());
15801 self
15802 }
15803 pub fn worker_address_opt_mut(&mut self) -> Option<&mut String> {
15805 self.worker_address.as_mut().map(|field| field as _)
15806 }
15807 pub fn worker_address_mut(&mut self) -> &mut String {
15810 self.worker_address.get_or_insert_default()
15811 }
15812 pub fn worker_address_opt(&self) -> Option<&str> {
15814 self.worker_address.as_ref().map(|field| field as _)
15815 }
15816 pub fn set_worker_address<T: Into<String>>(&mut self, field: T) {
15818 self.worker_address = Some(field.into().into());
15819 }
15820 pub fn with_worker_address<T: Into<String>>(mut self, field: T) -> Self {
15822 self.set_worker_address(field.into());
15823 self
15824 }
15825 pub fn next_epoch_protocol_public_key_opt(&self) -> Option<&[u8]> {
15827 self.next_epoch_protocol_public_key.as_ref().map(|field| field as _)
15828 }
15829 pub fn set_next_epoch_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
15831 &mut self,
15832 field: T,
15833 ) {
15834 self.next_epoch_protocol_public_key = Some(field.into().into());
15835 }
15836 pub fn with_next_epoch_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
15838 mut self,
15839 field: T,
15840 ) -> Self {
15841 self.set_next_epoch_protocol_public_key(field.into());
15842 self
15843 }
15844 pub fn next_epoch_proof_of_possession_opt(&self) -> Option<&[u8]> {
15846 self.next_epoch_proof_of_possession.as_ref().map(|field| field as _)
15847 }
15848 pub fn set_next_epoch_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
15850 &mut self,
15851 field: T,
15852 ) {
15853 self.next_epoch_proof_of_possession = Some(field.into().into());
15854 }
15855 pub fn with_next_epoch_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
15857 mut self,
15858 field: T,
15859 ) -> Self {
15860 self.set_next_epoch_proof_of_possession(field.into());
15861 self
15862 }
15863 pub fn next_epoch_network_public_key_opt(&self) -> Option<&[u8]> {
15865 self.next_epoch_network_public_key.as_ref().map(|field| field as _)
15866 }
15867 pub fn set_next_epoch_network_public_key<T: Into<::prost::bytes::Bytes>>(
15869 &mut self,
15870 field: T,
15871 ) {
15872 self.next_epoch_network_public_key = Some(field.into().into());
15873 }
15874 pub fn with_next_epoch_network_public_key<T: Into<::prost::bytes::Bytes>>(
15876 mut self,
15877 field: T,
15878 ) -> Self {
15879 self.set_next_epoch_network_public_key(field.into());
15880 self
15881 }
15882 pub fn next_epoch_worker_public_key_opt(&self) -> Option<&[u8]> {
15884 self.next_epoch_worker_public_key.as_ref().map(|field| field as _)
15885 }
15886 pub fn set_next_epoch_worker_public_key<T: Into<::prost::bytes::Bytes>>(
15888 &mut self,
15889 field: T,
15890 ) {
15891 self.next_epoch_worker_public_key = Some(field.into().into());
15892 }
15893 pub fn with_next_epoch_worker_public_key<T: Into<::prost::bytes::Bytes>>(
15895 mut self,
15896 field: T,
15897 ) -> Self {
15898 self.set_next_epoch_worker_public_key(field.into());
15899 self
15900 }
15901 pub fn next_epoch_network_address_opt_mut(&mut self) -> Option<&mut String> {
15903 self.next_epoch_network_address.as_mut().map(|field| field as _)
15904 }
15905 pub fn next_epoch_network_address_mut(&mut self) -> &mut String {
15908 self.next_epoch_network_address.get_or_insert_default()
15909 }
15910 pub fn next_epoch_network_address_opt(&self) -> Option<&str> {
15912 self.next_epoch_network_address.as_ref().map(|field| field as _)
15913 }
15914 pub fn set_next_epoch_network_address<T: Into<String>>(&mut self, field: T) {
15916 self.next_epoch_network_address = Some(field.into().into());
15917 }
15918 pub fn with_next_epoch_network_address<T: Into<String>>(
15920 mut self,
15921 field: T,
15922 ) -> Self {
15923 self.set_next_epoch_network_address(field.into());
15924 self
15925 }
15926 pub fn next_epoch_p2p_address_opt_mut(&mut self) -> Option<&mut String> {
15928 self.next_epoch_p2p_address.as_mut().map(|field| field as _)
15929 }
15930 pub fn next_epoch_p2p_address_mut(&mut self) -> &mut String {
15933 self.next_epoch_p2p_address.get_or_insert_default()
15934 }
15935 pub fn next_epoch_p2p_address_opt(&self) -> Option<&str> {
15937 self.next_epoch_p2p_address.as_ref().map(|field| field as _)
15938 }
15939 pub fn set_next_epoch_p2p_address<T: Into<String>>(&mut self, field: T) {
15941 self.next_epoch_p2p_address = Some(field.into().into());
15942 }
15943 pub fn with_next_epoch_p2p_address<T: Into<String>>(mut self, field: T) -> Self {
15945 self.set_next_epoch_p2p_address(field.into());
15946 self
15947 }
15948 pub fn next_epoch_primary_address_opt_mut(&mut self) -> Option<&mut String> {
15950 self.next_epoch_primary_address.as_mut().map(|field| field as _)
15951 }
15952 pub fn next_epoch_primary_address_mut(&mut self) -> &mut String {
15955 self.next_epoch_primary_address.get_or_insert_default()
15956 }
15957 pub fn next_epoch_primary_address_opt(&self) -> Option<&str> {
15959 self.next_epoch_primary_address.as_ref().map(|field| field as _)
15960 }
15961 pub fn set_next_epoch_primary_address<T: Into<String>>(&mut self, field: T) {
15963 self.next_epoch_primary_address = Some(field.into().into());
15964 }
15965 pub fn with_next_epoch_primary_address<T: Into<String>>(
15967 mut self,
15968 field: T,
15969 ) -> Self {
15970 self.set_next_epoch_primary_address(field.into());
15971 self
15972 }
15973 pub fn next_epoch_worker_address_opt_mut(&mut self) -> Option<&mut String> {
15975 self.next_epoch_worker_address.as_mut().map(|field| field as _)
15976 }
15977 pub fn next_epoch_worker_address_mut(&mut self) -> &mut String {
15980 self.next_epoch_worker_address.get_or_insert_default()
15981 }
15982 pub fn next_epoch_worker_address_opt(&self) -> Option<&str> {
15984 self.next_epoch_worker_address.as_ref().map(|field| field as _)
15985 }
15986 pub fn set_next_epoch_worker_address<T: Into<String>>(&mut self, field: T) {
15988 self.next_epoch_worker_address = Some(field.into().into());
15989 }
15990 pub fn with_next_epoch_worker_address<T: Into<String>>(
15992 mut self,
15993 field: T,
15994 ) -> Self {
15995 self.set_next_epoch_worker_address(field.into());
15996 self
15997 }
15998 pub fn metadata_extra_fields(&self) -> &super::MoveTable {
16000 self.metadata_extra_fields
16001 .as_ref()
16002 .map(|field| field as _)
16003 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16004 }
16005 pub fn metadata_extra_fields_opt_mut(
16007 &mut self,
16008 ) -> Option<&mut super::MoveTable> {
16009 self.metadata_extra_fields.as_mut().map(|field| field as _)
16010 }
16011 pub fn metadata_extra_fields_mut(&mut self) -> &mut super::MoveTable {
16014 self.metadata_extra_fields.get_or_insert_default()
16015 }
16016 pub fn metadata_extra_fields_opt(&self) -> Option<&super::MoveTable> {
16018 self.metadata_extra_fields.as_ref().map(|field| field as _)
16019 }
16020 pub fn set_metadata_extra_fields<T: Into<super::MoveTable>>(
16022 &mut self,
16023 field: T,
16024 ) {
16025 self.metadata_extra_fields = Some(field.into().into());
16026 }
16027 pub fn with_metadata_extra_fields<T: Into<super::MoveTable>>(
16029 mut self,
16030 field: T,
16031 ) -> Self {
16032 self.set_metadata_extra_fields(field.into());
16033 self
16034 }
16035 pub fn voting_power_opt_mut(&mut self) -> Option<&mut u64> {
16037 self.voting_power.as_mut().map(|field| field as _)
16038 }
16039 pub fn voting_power_mut(&mut self) -> &mut u64 {
16042 self.voting_power.get_or_insert_default()
16043 }
16044 pub fn voting_power_opt(&self) -> Option<u64> {
16046 self.voting_power.as_ref().map(|field| *field)
16047 }
16048 pub fn set_voting_power<T: Into<u64>>(&mut self, field: T) {
16050 self.voting_power = Some(field.into().into());
16051 }
16052 pub fn with_voting_power<T: Into<u64>>(mut self, field: T) -> Self {
16054 self.set_voting_power(field.into());
16055 self
16056 }
16057 pub fn operation_cap_id_opt_mut(&mut self) -> Option<&mut String> {
16059 self.operation_cap_id.as_mut().map(|field| field as _)
16060 }
16061 pub fn operation_cap_id_mut(&mut self) -> &mut String {
16064 self.operation_cap_id.get_or_insert_default()
16065 }
16066 pub fn operation_cap_id_opt(&self) -> Option<&str> {
16068 self.operation_cap_id.as_ref().map(|field| field as _)
16069 }
16070 pub fn set_operation_cap_id<T: Into<String>>(&mut self, field: T) {
16072 self.operation_cap_id = Some(field.into().into());
16073 }
16074 pub fn with_operation_cap_id<T: Into<String>>(mut self, field: T) -> Self {
16076 self.set_operation_cap_id(field.into());
16077 self
16078 }
16079 pub fn gas_price_opt_mut(&mut self) -> Option<&mut u64> {
16081 self.gas_price.as_mut().map(|field| field as _)
16082 }
16083 pub fn gas_price_mut(&mut self) -> &mut u64 {
16086 self.gas_price.get_or_insert_default()
16087 }
16088 pub fn gas_price_opt(&self) -> Option<u64> {
16090 self.gas_price.as_ref().map(|field| *field)
16091 }
16092 pub fn set_gas_price<T: Into<u64>>(&mut self, field: T) {
16094 self.gas_price = Some(field.into().into());
16095 }
16096 pub fn with_gas_price<T: Into<u64>>(mut self, field: T) -> Self {
16098 self.set_gas_price(field.into());
16099 self
16100 }
16101 pub fn staking_pool(&self) -> &super::StakingPool {
16103 self.staking_pool
16104 .as_ref()
16105 .map(|field| field as _)
16106 .unwrap_or_else(|| super::StakingPool::default_instance() as _)
16107 }
16108 pub fn staking_pool_opt_mut(&mut self) -> Option<&mut super::StakingPool> {
16110 self.staking_pool.as_mut().map(|field| field as _)
16111 }
16112 pub fn staking_pool_mut(&mut self) -> &mut super::StakingPool {
16115 self.staking_pool.get_or_insert_default()
16116 }
16117 pub fn staking_pool_opt(&self) -> Option<&super::StakingPool> {
16119 self.staking_pool.as_ref().map(|field| field as _)
16120 }
16121 pub fn set_staking_pool<T: Into<super::StakingPool>>(&mut self, field: T) {
16123 self.staking_pool = Some(field.into().into());
16124 }
16125 pub fn with_staking_pool<T: Into<super::StakingPool>>(
16127 mut self,
16128 field: T,
16129 ) -> Self {
16130 self.set_staking_pool(field.into());
16131 self
16132 }
16133 pub fn commission_rate_opt_mut(&mut self) -> Option<&mut u64> {
16135 self.commission_rate.as_mut().map(|field| field as _)
16136 }
16137 pub fn commission_rate_mut(&mut self) -> &mut u64 {
16140 self.commission_rate.get_or_insert_default()
16141 }
16142 pub fn commission_rate_opt(&self) -> Option<u64> {
16144 self.commission_rate.as_ref().map(|field| *field)
16145 }
16146 pub fn set_commission_rate<T: Into<u64>>(&mut self, field: T) {
16148 self.commission_rate = Some(field.into().into());
16149 }
16150 pub fn with_commission_rate<T: Into<u64>>(mut self, field: T) -> Self {
16152 self.set_commission_rate(field.into());
16153 self
16154 }
16155 pub fn next_epoch_stake_opt_mut(&mut self) -> Option<&mut u64> {
16157 self.next_epoch_stake.as_mut().map(|field| field as _)
16158 }
16159 pub fn next_epoch_stake_mut(&mut self) -> &mut u64 {
16162 self.next_epoch_stake.get_or_insert_default()
16163 }
16164 pub fn next_epoch_stake_opt(&self) -> Option<u64> {
16166 self.next_epoch_stake.as_ref().map(|field| *field)
16167 }
16168 pub fn set_next_epoch_stake<T: Into<u64>>(&mut self, field: T) {
16170 self.next_epoch_stake = Some(field.into().into());
16171 }
16172 pub fn with_next_epoch_stake<T: Into<u64>>(mut self, field: T) -> Self {
16174 self.set_next_epoch_stake(field.into());
16175 self
16176 }
16177 pub fn next_epoch_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
16179 self.next_epoch_gas_price.as_mut().map(|field| field as _)
16180 }
16181 pub fn next_epoch_gas_price_mut(&mut self) -> &mut u64 {
16184 self.next_epoch_gas_price.get_or_insert_default()
16185 }
16186 pub fn next_epoch_gas_price_opt(&self) -> Option<u64> {
16188 self.next_epoch_gas_price.as_ref().map(|field| *field)
16189 }
16190 pub fn set_next_epoch_gas_price<T: Into<u64>>(&mut self, field: T) {
16192 self.next_epoch_gas_price = Some(field.into().into());
16193 }
16194 pub fn with_next_epoch_gas_price<T: Into<u64>>(mut self, field: T) -> Self {
16196 self.set_next_epoch_gas_price(field.into());
16197 self
16198 }
16199 pub fn next_epoch_commission_rate_opt_mut(&mut self) -> Option<&mut u64> {
16201 self.next_epoch_commission_rate.as_mut().map(|field| field as _)
16202 }
16203 pub fn next_epoch_commission_rate_mut(&mut self) -> &mut u64 {
16206 self.next_epoch_commission_rate.get_or_insert_default()
16207 }
16208 pub fn next_epoch_commission_rate_opt(&self) -> Option<u64> {
16210 self.next_epoch_commission_rate.as_ref().map(|field| *field)
16211 }
16212 pub fn set_next_epoch_commission_rate<T: Into<u64>>(&mut self, field: T) {
16214 self.next_epoch_commission_rate = Some(field.into().into());
16215 }
16216 pub fn with_next_epoch_commission_rate<T: Into<u64>>(
16218 mut self,
16219 field: T,
16220 ) -> Self {
16221 self.set_next_epoch_commission_rate(field.into());
16222 self
16223 }
16224 pub fn extra_fields(&self) -> &super::MoveTable {
16226 self.extra_fields
16227 .as_ref()
16228 .map(|field| field as _)
16229 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16230 }
16231 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
16233 self.extra_fields.as_mut().map(|field| field as _)
16234 }
16235 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
16238 self.extra_fields.get_or_insert_default()
16239 }
16240 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
16242 self.extra_fields.as_ref().map(|field| field as _)
16243 }
16244 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
16246 self.extra_fields = Some(field.into().into());
16247 }
16248 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
16250 self.set_extra_fields(field.into());
16251 self
16252 }
16253 }
16254 impl super::ValidatorAggregatedSignature {
16255 pub const fn const_default() -> Self {
16256 Self {
16257 epoch: None,
16258 signature: None,
16259 bitmap: None,
16260 }
16261 }
16262 #[doc(hidden)]
16263 pub fn default_instance() -> &'static Self {
16264 static DEFAULT: super::ValidatorAggregatedSignature = super::ValidatorAggregatedSignature::const_default();
16265 &DEFAULT
16266 }
16267 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
16269 self.epoch.as_mut().map(|field| field as _)
16270 }
16271 pub fn epoch_mut(&mut self) -> &mut u64 {
16274 self.epoch.get_or_insert_default()
16275 }
16276 pub fn epoch_opt(&self) -> Option<u64> {
16278 self.epoch.as_ref().map(|field| *field)
16279 }
16280 pub fn set_epoch<T: Into<u64>>(&mut self, field: T) {
16282 self.epoch = Some(field.into().into());
16283 }
16284 pub fn with_epoch<T: Into<u64>>(mut self, field: T) -> Self {
16286 self.set_epoch(field.into());
16287 self
16288 }
16289 pub fn signature_opt(&self) -> Option<&[u8]> {
16291 self.signature.as_ref().map(|field| field as _)
16292 }
16293 pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16295 self.signature = Some(field.into().into());
16296 }
16297 pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
16299 mut self,
16300 field: T,
16301 ) -> Self {
16302 self.set_signature(field.into());
16303 self
16304 }
16305 pub fn bitmap_opt(&self) -> Option<&[u8]> {
16307 self.bitmap.as_ref().map(|field| field as _)
16308 }
16309 pub fn set_bitmap<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16311 self.bitmap = Some(field.into().into());
16312 }
16313 pub fn with_bitmap<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
16315 self.set_bitmap(field.into());
16316 self
16317 }
16318 }
16319 impl super::ValidatorCommittee {
16320 pub const fn const_default() -> Self {
16321 Self {
16322 epoch: None,
16323 members: Vec::new(),
16324 }
16325 }
16326 #[doc(hidden)]
16327 pub fn default_instance() -> &'static Self {
16328 static DEFAULT: super::ValidatorCommittee = super::ValidatorCommittee::const_default();
16329 &DEFAULT
16330 }
16331 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
16333 self.epoch.as_mut().map(|field| field as _)
16334 }
16335 pub fn epoch_mut(&mut self) -> &mut u64 {
16338 self.epoch.get_or_insert_default()
16339 }
16340 pub fn epoch_opt(&self) -> Option<u64> {
16342 self.epoch.as_ref().map(|field| *field)
16343 }
16344 pub fn set_epoch<T: Into<u64>>(&mut self, field: T) {
16346 self.epoch = Some(field.into().into());
16347 }
16348 pub fn with_epoch<T: Into<u64>>(mut self, field: T) -> Self {
16350 self.set_epoch(field.into());
16351 self
16352 }
16353 pub fn members(&self) -> &[super::ValidatorCommitteeMember] {
16355 &self.members
16356 }
16357 pub fn members_mut(&mut self) -> &mut Vec<super::ValidatorCommitteeMember> {
16360 &mut self.members
16361 }
16362 pub fn set_members(&mut self, field: Vec<super::ValidatorCommitteeMember>) {
16364 self.members = field;
16365 }
16366 pub fn with_members(
16368 mut self,
16369 field: Vec<super::ValidatorCommitteeMember>,
16370 ) -> Self {
16371 self.set_members(field);
16372 self
16373 }
16374 }
16375 impl super::ValidatorCommitteeMember {
16376 pub const fn const_default() -> Self {
16377 Self {
16378 public_key: None,
16379 weight: None,
16380 }
16381 }
16382 #[doc(hidden)]
16383 pub fn default_instance() -> &'static Self {
16384 static DEFAULT: super::ValidatorCommitteeMember = super::ValidatorCommitteeMember::const_default();
16385 &DEFAULT
16386 }
16387 pub fn public_key_opt(&self) -> Option<&[u8]> {
16389 self.public_key.as_ref().map(|field| field as _)
16390 }
16391 pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16393 self.public_key = Some(field.into().into());
16394 }
16395 pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
16397 mut self,
16398 field: T,
16399 ) -> Self {
16400 self.set_public_key(field.into());
16401 self
16402 }
16403 pub fn weight_opt_mut(&mut self) -> Option<&mut u64> {
16405 self.weight.as_mut().map(|field| field as _)
16406 }
16407 pub fn weight_mut(&mut self) -> &mut u64 {
16410 self.weight.get_or_insert_default()
16411 }
16412 pub fn weight_opt(&self) -> Option<u64> {
16414 self.weight.as_ref().map(|field| *field)
16415 }
16416 pub fn set_weight<T: Into<u64>>(&mut self, field: T) {
16418 self.weight = Some(field.into().into());
16419 }
16420 pub fn with_weight<T: Into<u64>>(mut self, field: T) -> Self {
16422 self.set_weight(field.into());
16423 self
16424 }
16425 }
16426 impl super::ValidatorExecutionTimeObservation {
16427 pub const fn const_default() -> Self {
16428 Self {
16429 validator: None,
16430 duration: None,
16431 }
16432 }
16433 #[doc(hidden)]
16434 pub fn default_instance() -> &'static Self {
16435 static DEFAULT: super::ValidatorExecutionTimeObservation = super::ValidatorExecutionTimeObservation::const_default();
16436 &DEFAULT
16437 }
16438 pub fn validator_opt(&self) -> Option<&[u8]> {
16440 self.validator.as_ref().map(|field| field as _)
16441 }
16442 pub fn set_validator<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16444 self.validator = Some(field.into().into());
16445 }
16446 pub fn with_validator<T: Into<::prost::bytes::Bytes>>(
16448 mut self,
16449 field: T,
16450 ) -> Self {
16451 self.set_validator(field.into());
16452 self
16453 }
16454 pub fn duration_opt_mut(&mut self) -> Option<&mut ::prost_types::Duration> {
16456 self.duration.as_mut().map(|field| field as _)
16457 }
16458 pub fn duration_mut(&mut self) -> &mut ::prost_types::Duration {
16461 self.duration.get_or_insert_default()
16462 }
16463 pub fn duration_opt(&self) -> Option<&::prost_types::Duration> {
16465 self.duration.as_ref().map(|field| field as _)
16466 }
16467 pub fn set_duration<T: Into<::prost_types::Duration>>(&mut self, field: T) {
16469 self.duration = Some(field.into().into());
16470 }
16471 pub fn with_duration<T: Into<::prost_types::Duration>>(
16473 mut self,
16474 field: T,
16475 ) -> Self {
16476 self.set_duration(field.into());
16477 self
16478 }
16479 }
16480 impl super::ValidatorReportRecord {
16481 pub const fn const_default() -> Self {
16482 Self {
16483 reported: None,
16484 reporters: Vec::new(),
16485 }
16486 }
16487 #[doc(hidden)]
16488 pub fn default_instance() -> &'static Self {
16489 static DEFAULT: super::ValidatorReportRecord = super::ValidatorReportRecord::const_default();
16490 &DEFAULT
16491 }
16492 pub fn reported_opt_mut(&mut self) -> Option<&mut String> {
16494 self.reported.as_mut().map(|field| field as _)
16495 }
16496 pub fn reported_mut(&mut self) -> &mut String {
16499 self.reported.get_or_insert_default()
16500 }
16501 pub fn reported_opt(&self) -> Option<&str> {
16503 self.reported.as_ref().map(|field| field as _)
16504 }
16505 pub fn set_reported<T: Into<String>>(&mut self, field: T) {
16507 self.reported = Some(field.into().into());
16508 }
16509 pub fn with_reported<T: Into<String>>(mut self, field: T) -> Self {
16511 self.set_reported(field.into());
16512 self
16513 }
16514 pub fn reporters(&self) -> &[String] {
16516 &self.reporters
16517 }
16518 pub fn reporters_mut(&mut self) -> &mut Vec<String> {
16521 &mut self.reporters
16522 }
16523 pub fn set_reporters(&mut self, field: Vec<String>) {
16525 self.reporters = field;
16526 }
16527 pub fn with_reporters(mut self, field: Vec<String>) -> Self {
16529 self.set_reporters(field);
16530 self
16531 }
16532 }
16533 impl super::ValidatorSet {
16534 pub const fn const_default() -> Self {
16535 Self {
16536 total_stake: None,
16537 active_validators: Vec::new(),
16538 pending_active_validators: None,
16539 pending_removals: Vec::new(),
16540 staking_pool_mappings: None,
16541 inactive_validators: None,
16542 validator_candidates: None,
16543 at_risk_validators: std::collections::BTreeMap::new(),
16544 extra_fields: None,
16545 }
16546 }
16547 #[doc(hidden)]
16548 pub fn default_instance() -> &'static Self {
16549 static DEFAULT: super::ValidatorSet = super::ValidatorSet::const_default();
16550 &DEFAULT
16551 }
16552 pub fn total_stake_opt_mut(&mut self) -> Option<&mut u64> {
16554 self.total_stake.as_mut().map(|field| field as _)
16555 }
16556 pub fn total_stake_mut(&mut self) -> &mut u64 {
16559 self.total_stake.get_or_insert_default()
16560 }
16561 pub fn total_stake_opt(&self) -> Option<u64> {
16563 self.total_stake.as_ref().map(|field| *field)
16564 }
16565 pub fn set_total_stake<T: Into<u64>>(&mut self, field: T) {
16567 self.total_stake = Some(field.into().into());
16568 }
16569 pub fn with_total_stake<T: Into<u64>>(mut self, field: T) -> Self {
16571 self.set_total_stake(field.into());
16572 self
16573 }
16574 pub fn active_validators(&self) -> &[super::Validator] {
16576 &self.active_validators
16577 }
16578 pub fn active_validators_mut(&mut self) -> &mut Vec<super::Validator> {
16581 &mut self.active_validators
16582 }
16583 pub fn set_active_validators(&mut self, field: Vec<super::Validator>) {
16585 self.active_validators = field;
16586 }
16587 pub fn with_active_validators(mut self, field: Vec<super::Validator>) -> Self {
16589 self.set_active_validators(field);
16590 self
16591 }
16592 pub fn pending_active_validators(&self) -> &super::MoveTable {
16594 self.pending_active_validators
16595 .as_ref()
16596 .map(|field| field as _)
16597 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16598 }
16599 pub fn pending_active_validators_opt_mut(
16601 &mut self,
16602 ) -> Option<&mut super::MoveTable> {
16603 self.pending_active_validators.as_mut().map(|field| field as _)
16604 }
16605 pub fn pending_active_validators_mut(&mut self) -> &mut super::MoveTable {
16608 self.pending_active_validators.get_or_insert_default()
16609 }
16610 pub fn pending_active_validators_opt(&self) -> Option<&super::MoveTable> {
16612 self.pending_active_validators.as_ref().map(|field| field as _)
16613 }
16614 pub fn set_pending_active_validators<T: Into<super::MoveTable>>(
16616 &mut self,
16617 field: T,
16618 ) {
16619 self.pending_active_validators = Some(field.into().into());
16620 }
16621 pub fn with_pending_active_validators<T: Into<super::MoveTable>>(
16623 mut self,
16624 field: T,
16625 ) -> Self {
16626 self.set_pending_active_validators(field.into());
16627 self
16628 }
16629 pub fn pending_removals(&self) -> &[u64] {
16631 &self.pending_removals
16632 }
16633 pub fn pending_removals_mut(&mut self) -> &mut Vec<u64> {
16636 &mut self.pending_removals
16637 }
16638 pub fn set_pending_removals(&mut self, field: Vec<u64>) {
16640 self.pending_removals = field;
16641 }
16642 pub fn with_pending_removals(mut self, field: Vec<u64>) -> Self {
16644 self.set_pending_removals(field);
16645 self
16646 }
16647 pub fn staking_pool_mappings(&self) -> &super::MoveTable {
16649 self.staking_pool_mappings
16650 .as_ref()
16651 .map(|field| field as _)
16652 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16653 }
16654 pub fn staking_pool_mappings_opt_mut(
16656 &mut self,
16657 ) -> Option<&mut super::MoveTable> {
16658 self.staking_pool_mappings.as_mut().map(|field| field as _)
16659 }
16660 pub fn staking_pool_mappings_mut(&mut self) -> &mut super::MoveTable {
16663 self.staking_pool_mappings.get_or_insert_default()
16664 }
16665 pub fn staking_pool_mappings_opt(&self) -> Option<&super::MoveTable> {
16667 self.staking_pool_mappings.as_ref().map(|field| field as _)
16668 }
16669 pub fn set_staking_pool_mappings<T: Into<super::MoveTable>>(
16671 &mut self,
16672 field: T,
16673 ) {
16674 self.staking_pool_mappings = Some(field.into().into());
16675 }
16676 pub fn with_staking_pool_mappings<T: Into<super::MoveTable>>(
16678 mut self,
16679 field: T,
16680 ) -> Self {
16681 self.set_staking_pool_mappings(field.into());
16682 self
16683 }
16684 pub fn inactive_validators(&self) -> &super::MoveTable {
16686 self.inactive_validators
16687 .as_ref()
16688 .map(|field| field as _)
16689 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16690 }
16691 pub fn inactive_validators_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
16693 self.inactive_validators.as_mut().map(|field| field as _)
16694 }
16695 pub fn inactive_validators_mut(&mut self) -> &mut super::MoveTable {
16698 self.inactive_validators.get_or_insert_default()
16699 }
16700 pub fn inactive_validators_opt(&self) -> Option<&super::MoveTable> {
16702 self.inactive_validators.as_ref().map(|field| field as _)
16703 }
16704 pub fn set_inactive_validators<T: Into<super::MoveTable>>(&mut self, field: T) {
16706 self.inactive_validators = Some(field.into().into());
16707 }
16708 pub fn with_inactive_validators<T: Into<super::MoveTable>>(
16710 mut self,
16711 field: T,
16712 ) -> Self {
16713 self.set_inactive_validators(field.into());
16714 self
16715 }
16716 pub fn validator_candidates(&self) -> &super::MoveTable {
16718 self.validator_candidates
16719 .as_ref()
16720 .map(|field| field as _)
16721 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16722 }
16723 pub fn validator_candidates_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
16725 self.validator_candidates.as_mut().map(|field| field as _)
16726 }
16727 pub fn validator_candidates_mut(&mut self) -> &mut super::MoveTable {
16730 self.validator_candidates.get_or_insert_default()
16731 }
16732 pub fn validator_candidates_opt(&self) -> Option<&super::MoveTable> {
16734 self.validator_candidates.as_ref().map(|field| field as _)
16735 }
16736 pub fn set_validator_candidates<T: Into<super::MoveTable>>(&mut self, field: T) {
16738 self.validator_candidates = Some(field.into().into());
16739 }
16740 pub fn with_validator_candidates<T: Into<super::MoveTable>>(
16742 mut self,
16743 field: T,
16744 ) -> Self {
16745 self.set_validator_candidates(field.into());
16746 self
16747 }
16748 pub fn at_risk_validators(&self) -> &::std::collections::BTreeMap<String, u64> {
16750 &self.at_risk_validators
16751 }
16752 pub fn at_risk_validators_mut(
16755 &mut self,
16756 ) -> &mut ::std::collections::BTreeMap<String, u64> {
16757 &mut self.at_risk_validators
16758 }
16759 pub fn set_at_risk_validators(
16761 &mut self,
16762 field: ::std::collections::BTreeMap<String, u64>,
16763 ) {
16764 self.at_risk_validators = field;
16765 }
16766 pub fn with_at_risk_validators(
16768 mut self,
16769 field: ::std::collections::BTreeMap<String, u64>,
16770 ) -> Self {
16771 self.set_at_risk_validators(field);
16772 self
16773 }
16774 pub fn extra_fields(&self) -> &super::MoveTable {
16776 self.extra_fields
16777 .as_ref()
16778 .map(|field| field as _)
16779 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16780 }
16781 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
16783 self.extra_fields.as_mut().map(|field| field as _)
16784 }
16785 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
16788 self.extra_fields.get_or_insert_default()
16789 }
16790 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
16792 self.extra_fields.as_ref().map(|field| field as _)
16793 }
16794 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
16796 self.extra_fields = Some(field.into().into());
16797 }
16798 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
16800 self.set_extra_fields(field.into());
16801 self
16802 }
16803 }
16804 impl super::VariantDescriptor {
16805 pub const fn const_default() -> Self {
16806 Self {
16807 name: None,
16808 position: None,
16809 fields: Vec::new(),
16810 }
16811 }
16812 #[doc(hidden)]
16813 pub fn default_instance() -> &'static Self {
16814 static DEFAULT: super::VariantDescriptor = super::VariantDescriptor::const_default();
16815 &DEFAULT
16816 }
16817 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
16819 self.name.as_mut().map(|field| field as _)
16820 }
16821 pub fn name_mut(&mut self) -> &mut String {
16824 self.name.get_or_insert_default()
16825 }
16826 pub fn name_opt(&self) -> Option<&str> {
16828 self.name.as_ref().map(|field| field as _)
16829 }
16830 pub fn set_name<T: Into<String>>(&mut self, field: T) {
16832 self.name = Some(field.into().into());
16833 }
16834 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
16836 self.set_name(field.into());
16837 self
16838 }
16839 pub fn position_opt_mut(&mut self) -> Option<&mut u32> {
16841 self.position.as_mut().map(|field| field as _)
16842 }
16843 pub fn position_mut(&mut self) -> &mut u32 {
16846 self.position.get_or_insert_default()
16847 }
16848 pub fn position_opt(&self) -> Option<u32> {
16850 self.position.as_ref().map(|field| *field)
16851 }
16852 pub fn set_position<T: Into<u32>>(&mut self, field: T) {
16854 self.position = Some(field.into().into());
16855 }
16856 pub fn with_position<T: Into<u32>>(mut self, field: T) -> Self {
16858 self.set_position(field.into());
16859 self
16860 }
16861 pub fn fields(&self) -> &[super::FieldDescriptor] {
16863 &self.fields
16864 }
16865 pub fn fields_mut(&mut self) -> &mut Vec<super::FieldDescriptor> {
16868 &mut self.fields
16869 }
16870 pub fn set_fields(&mut self, field: Vec<super::FieldDescriptor>) {
16872 self.fields = field;
16873 }
16874 pub fn with_fields(mut self, field: Vec<super::FieldDescriptor>) -> Self {
16876 self.set_fields(field);
16877 self
16878 }
16879 }
16880 impl super::VerifySignatureRequest {
16881 pub const fn const_default() -> Self {
16882 Self {
16883 message: None,
16884 signature: None,
16885 address: None,
16886 jwks: Vec::new(),
16887 }
16888 }
16889 #[doc(hidden)]
16890 pub fn default_instance() -> &'static Self {
16891 static DEFAULT: super::VerifySignatureRequest = super::VerifySignatureRequest::const_default();
16892 &DEFAULT
16893 }
16894 pub fn message(&self) -> &super::Bcs {
16896 self.message
16897 .as_ref()
16898 .map(|field| field as _)
16899 .unwrap_or_else(|| super::Bcs::default_instance() as _)
16900 }
16901 pub fn message_opt_mut(&mut self) -> Option<&mut super::Bcs> {
16903 self.message.as_mut().map(|field| field as _)
16904 }
16905 pub fn message_mut(&mut self) -> &mut super::Bcs {
16908 self.message.get_or_insert_default()
16909 }
16910 pub fn message_opt(&self) -> Option<&super::Bcs> {
16912 self.message.as_ref().map(|field| field as _)
16913 }
16914 pub fn set_message<T: Into<super::Bcs>>(&mut self, field: T) {
16916 self.message = Some(field.into().into());
16917 }
16918 pub fn with_message<T: Into<super::Bcs>>(mut self, field: T) -> Self {
16920 self.set_message(field.into());
16921 self
16922 }
16923 pub fn signature(&self) -> &super::UserSignature {
16925 self.signature
16926 .as_ref()
16927 .map(|field| field as _)
16928 .unwrap_or_else(|| super::UserSignature::default_instance() as _)
16929 }
16930 pub fn signature_opt_mut(&mut self) -> Option<&mut super::UserSignature> {
16932 self.signature.as_mut().map(|field| field as _)
16933 }
16934 pub fn signature_mut(&mut self) -> &mut super::UserSignature {
16937 self.signature.get_or_insert_default()
16938 }
16939 pub fn signature_opt(&self) -> Option<&super::UserSignature> {
16941 self.signature.as_ref().map(|field| field as _)
16942 }
16943 pub fn set_signature<T: Into<super::UserSignature>>(&mut self, field: T) {
16945 self.signature = Some(field.into().into());
16946 }
16947 pub fn with_signature<T: Into<super::UserSignature>>(
16949 mut self,
16950 field: T,
16951 ) -> Self {
16952 self.set_signature(field.into());
16953 self
16954 }
16955 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
16957 self.address.as_mut().map(|field| field as _)
16958 }
16959 pub fn address_mut(&mut self) -> &mut String {
16962 self.address.get_or_insert_default()
16963 }
16964 pub fn address_opt(&self) -> Option<&str> {
16966 self.address.as_ref().map(|field| field as _)
16967 }
16968 pub fn set_address<T: Into<String>>(&mut self, field: T) {
16970 self.address = Some(field.into().into());
16971 }
16972 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
16974 self.set_address(field.into());
16975 self
16976 }
16977 pub fn jwks(&self) -> &[super::ActiveJwk] {
16979 &self.jwks
16980 }
16981 pub fn jwks_mut(&mut self) -> &mut Vec<super::ActiveJwk> {
16984 &mut self.jwks
16985 }
16986 pub fn set_jwks(&mut self, field: Vec<super::ActiveJwk>) {
16988 self.jwks = field;
16989 }
16990 pub fn with_jwks(mut self, field: Vec<super::ActiveJwk>) -> Self {
16992 self.set_jwks(field);
16993 self
16994 }
16995 }
16996 impl super::VerifySignatureResponse {
16997 pub const fn const_default() -> Self {
16998 Self {
16999 is_valid: None,
17000 reason: None,
17001 }
17002 }
17003 #[doc(hidden)]
17004 pub fn default_instance() -> &'static Self {
17005 static DEFAULT: super::VerifySignatureResponse = super::VerifySignatureResponse::const_default();
17006 &DEFAULT
17007 }
17008 pub fn is_valid_opt_mut(&mut self) -> Option<&mut bool> {
17010 self.is_valid.as_mut().map(|field| field as _)
17011 }
17012 pub fn is_valid_mut(&mut self) -> &mut bool {
17015 self.is_valid.get_or_insert_default()
17016 }
17017 pub fn is_valid_opt(&self) -> Option<bool> {
17019 self.is_valid.as_ref().map(|field| *field)
17020 }
17021 pub fn set_is_valid<T: Into<bool>>(&mut self, field: T) {
17023 self.is_valid = Some(field.into().into());
17024 }
17025 pub fn with_is_valid<T: Into<bool>>(mut self, field: T) -> Self {
17027 self.set_is_valid(field.into());
17028 self
17029 }
17030 pub fn reason_opt_mut(&mut self) -> Option<&mut String> {
17032 self.reason.as_mut().map(|field| field as _)
17033 }
17034 pub fn reason_mut(&mut self) -> &mut String {
17037 self.reason.get_or_insert_default()
17038 }
17039 pub fn reason_opt(&self) -> Option<&str> {
17041 self.reason.as_ref().map(|field| field as _)
17042 }
17043 pub fn set_reason<T: Into<String>>(&mut self, field: T) {
17045 self.reason = Some(field.into().into());
17046 }
17047 pub fn with_reason<T: Into<String>>(mut self, field: T) -> Self {
17049 self.set_reason(field.into());
17050 self
17051 }
17052 }
17053 impl super::VersionAssignment {
17054 pub const fn const_default() -> Self {
17055 Self {
17056 object_id: None,
17057 start_version: None,
17058 version: None,
17059 }
17060 }
17061 #[doc(hidden)]
17062 pub fn default_instance() -> &'static Self {
17063 static DEFAULT: super::VersionAssignment = super::VersionAssignment::const_default();
17064 &DEFAULT
17065 }
17066 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
17068 self.object_id.as_mut().map(|field| field as _)
17069 }
17070 pub fn object_id_mut(&mut self) -> &mut String {
17073 self.object_id.get_or_insert_default()
17074 }
17075 pub fn object_id_opt(&self) -> Option<&str> {
17077 self.object_id.as_ref().map(|field| field as _)
17078 }
17079 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
17081 self.object_id = Some(field.into().into());
17082 }
17083 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
17085 self.set_object_id(field.into());
17086 self
17087 }
17088 pub fn start_version_opt_mut(&mut self) -> Option<&mut u64> {
17090 self.start_version.as_mut().map(|field| field as _)
17091 }
17092 pub fn start_version_mut(&mut self) -> &mut u64 {
17095 self.start_version.get_or_insert_default()
17096 }
17097 pub fn start_version_opt(&self) -> Option<u64> {
17099 self.start_version.as_ref().map(|field| *field)
17100 }
17101 pub fn set_start_version<T: Into<u64>>(&mut self, field: T) {
17103 self.start_version = Some(field.into().into());
17104 }
17105 pub fn with_start_version<T: Into<u64>>(mut self, field: T) -> Self {
17107 self.set_start_version(field.into());
17108 self
17109 }
17110 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
17112 self.version.as_mut().map(|field| field as _)
17113 }
17114 pub fn version_mut(&mut self) -> &mut u64 {
17117 self.version.get_or_insert_default()
17118 }
17119 pub fn version_opt(&self) -> Option<u64> {
17121 self.version.as_ref().map(|field| *field)
17122 }
17123 pub fn set_version<T: Into<u64>>(&mut self, field: T) {
17125 self.version = Some(field.into().into());
17126 }
17127 pub fn with_version<T: Into<u64>>(mut self, field: T) -> Self {
17129 self.set_version(field.into());
17130 self
17131 }
17132 }
17133 impl super::ZkLoginAuthenticator {
17134 pub const fn const_default() -> Self {
17135 Self {
17136 inputs: None,
17137 max_epoch: None,
17138 signature: None,
17139 public_identifier: None,
17140 jwk_id: None,
17141 }
17142 }
17143 #[doc(hidden)]
17144 pub fn default_instance() -> &'static Self {
17145 static DEFAULT: super::ZkLoginAuthenticator = super::ZkLoginAuthenticator::const_default();
17146 &DEFAULT
17147 }
17148 pub fn inputs(&self) -> &super::ZkLoginInputs {
17150 self.inputs
17151 .as_ref()
17152 .map(|field| field as _)
17153 .unwrap_or_else(|| super::ZkLoginInputs::default_instance() as _)
17154 }
17155 pub fn inputs_opt_mut(&mut self) -> Option<&mut super::ZkLoginInputs> {
17157 self.inputs.as_mut().map(|field| field as _)
17158 }
17159 pub fn inputs_mut(&mut self) -> &mut super::ZkLoginInputs {
17162 self.inputs.get_or_insert_default()
17163 }
17164 pub fn inputs_opt(&self) -> Option<&super::ZkLoginInputs> {
17166 self.inputs.as_ref().map(|field| field as _)
17167 }
17168 pub fn set_inputs<T: Into<super::ZkLoginInputs>>(&mut self, field: T) {
17170 self.inputs = Some(field.into().into());
17171 }
17172 pub fn with_inputs<T: Into<super::ZkLoginInputs>>(mut self, field: T) -> Self {
17174 self.set_inputs(field.into());
17175 self
17176 }
17177 pub fn max_epoch_opt_mut(&mut self) -> Option<&mut u64> {
17179 self.max_epoch.as_mut().map(|field| field as _)
17180 }
17181 pub fn max_epoch_mut(&mut self) -> &mut u64 {
17184 self.max_epoch.get_or_insert_default()
17185 }
17186 pub fn max_epoch_opt(&self) -> Option<u64> {
17188 self.max_epoch.as_ref().map(|field| *field)
17189 }
17190 pub fn set_max_epoch<T: Into<u64>>(&mut self, field: T) {
17192 self.max_epoch = Some(field.into().into());
17193 }
17194 pub fn with_max_epoch<T: Into<u64>>(mut self, field: T) -> Self {
17196 self.set_max_epoch(field.into());
17197 self
17198 }
17199 pub fn signature(&self) -> &super::SimpleSignature {
17201 self.signature
17202 .as_ref()
17203 .map(|field| field as _)
17204 .unwrap_or_else(|| super::SimpleSignature::default_instance() as _)
17205 }
17206 pub fn signature_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
17208 self.signature.as_mut().map(|field| field as _)
17209 }
17210 pub fn signature_mut(&mut self) -> &mut super::SimpleSignature {
17213 self.signature.get_or_insert_default()
17214 }
17215 pub fn signature_opt(&self) -> Option<&super::SimpleSignature> {
17217 self.signature.as_ref().map(|field| field as _)
17218 }
17219 pub fn set_signature<T: Into<super::SimpleSignature>>(&mut self, field: T) {
17221 self.signature = Some(field.into().into());
17222 }
17223 pub fn with_signature<T: Into<super::SimpleSignature>>(
17225 mut self,
17226 field: T,
17227 ) -> Self {
17228 self.set_signature(field.into());
17229 self
17230 }
17231 pub fn public_identifier(&self) -> &super::ZkLoginPublicIdentifier {
17233 self.public_identifier
17234 .as_ref()
17235 .map(|field| field as _)
17236 .unwrap_or_else(|| {
17237 super::ZkLoginPublicIdentifier::default_instance() as _
17238 })
17239 }
17240 pub fn public_identifier_opt_mut(
17242 &mut self,
17243 ) -> Option<&mut super::ZkLoginPublicIdentifier> {
17244 self.public_identifier.as_mut().map(|field| field as _)
17245 }
17246 pub fn public_identifier_mut(&mut self) -> &mut super::ZkLoginPublicIdentifier {
17249 self.public_identifier.get_or_insert_default()
17250 }
17251 pub fn public_identifier_opt(&self) -> Option<&super::ZkLoginPublicIdentifier> {
17253 self.public_identifier.as_ref().map(|field| field as _)
17254 }
17255 pub fn set_public_identifier<T: Into<super::ZkLoginPublicIdentifier>>(
17257 &mut self,
17258 field: T,
17259 ) {
17260 self.public_identifier = Some(field.into().into());
17261 }
17262 pub fn with_public_identifier<T: Into<super::ZkLoginPublicIdentifier>>(
17264 mut self,
17265 field: T,
17266 ) -> Self {
17267 self.set_public_identifier(field.into());
17268 self
17269 }
17270 pub fn jwk_id(&self) -> &super::JwkId {
17272 self.jwk_id
17273 .as_ref()
17274 .map(|field| field as _)
17275 .unwrap_or_else(|| super::JwkId::default_instance() as _)
17276 }
17277 pub fn jwk_id_opt_mut(&mut self) -> Option<&mut super::JwkId> {
17279 self.jwk_id.as_mut().map(|field| field as _)
17280 }
17281 pub fn jwk_id_mut(&mut self) -> &mut super::JwkId {
17284 self.jwk_id.get_or_insert_default()
17285 }
17286 pub fn jwk_id_opt(&self) -> Option<&super::JwkId> {
17288 self.jwk_id.as_ref().map(|field| field as _)
17289 }
17290 pub fn set_jwk_id<T: Into<super::JwkId>>(&mut self, field: T) {
17292 self.jwk_id = Some(field.into().into());
17293 }
17294 pub fn with_jwk_id<T: Into<super::JwkId>>(mut self, field: T) -> Self {
17296 self.set_jwk_id(field.into());
17297 self
17298 }
17299 }
17300 impl super::ZkLoginClaim {
17301 pub const fn const_default() -> Self {
17302 Self {
17303 value: None,
17304 index_mod_4: None,
17305 }
17306 }
17307 #[doc(hidden)]
17308 pub fn default_instance() -> &'static Self {
17309 static DEFAULT: super::ZkLoginClaim = super::ZkLoginClaim::const_default();
17310 &DEFAULT
17311 }
17312 pub fn value_opt_mut(&mut self) -> Option<&mut String> {
17314 self.value.as_mut().map(|field| field as _)
17315 }
17316 pub fn value_mut(&mut self) -> &mut String {
17319 self.value.get_or_insert_default()
17320 }
17321 pub fn value_opt(&self) -> Option<&str> {
17323 self.value.as_ref().map(|field| field as _)
17324 }
17325 pub fn set_value<T: Into<String>>(&mut self, field: T) {
17327 self.value = Some(field.into().into());
17328 }
17329 pub fn with_value<T: Into<String>>(mut self, field: T) -> Self {
17331 self.set_value(field.into());
17332 self
17333 }
17334 pub fn index_mod_4_opt_mut(&mut self) -> Option<&mut u32> {
17336 self.index_mod_4.as_mut().map(|field| field as _)
17337 }
17338 pub fn index_mod_4_mut(&mut self) -> &mut u32 {
17341 self.index_mod_4.get_or_insert_default()
17342 }
17343 pub fn index_mod_4_opt(&self) -> Option<u32> {
17345 self.index_mod_4.as_ref().map(|field| *field)
17346 }
17347 pub fn set_index_mod_4<T: Into<u32>>(&mut self, field: T) {
17349 self.index_mod_4 = Some(field.into().into());
17350 }
17351 pub fn with_index_mod_4<T: Into<u32>>(mut self, field: T) -> Self {
17353 self.set_index_mod_4(field.into());
17354 self
17355 }
17356 }
17357 impl super::ZkLoginInputs {
17358 pub const fn const_default() -> Self {
17359 Self {
17360 proof_points: None,
17361 iss_base64_details: None,
17362 header_base64: None,
17363 address_seed: None,
17364 }
17365 }
17366 #[doc(hidden)]
17367 pub fn default_instance() -> &'static Self {
17368 static DEFAULT: super::ZkLoginInputs = super::ZkLoginInputs::const_default();
17369 &DEFAULT
17370 }
17371 pub fn proof_points(&self) -> &super::ZkLoginProof {
17373 self.proof_points
17374 .as_ref()
17375 .map(|field| field as _)
17376 .unwrap_or_else(|| super::ZkLoginProof::default_instance() as _)
17377 }
17378 pub fn proof_points_opt_mut(&mut self) -> Option<&mut super::ZkLoginProof> {
17380 self.proof_points.as_mut().map(|field| field as _)
17381 }
17382 pub fn proof_points_mut(&mut self) -> &mut super::ZkLoginProof {
17385 self.proof_points.get_or_insert_default()
17386 }
17387 pub fn proof_points_opt(&self) -> Option<&super::ZkLoginProof> {
17389 self.proof_points.as_ref().map(|field| field as _)
17390 }
17391 pub fn set_proof_points<T: Into<super::ZkLoginProof>>(&mut self, field: T) {
17393 self.proof_points = Some(field.into().into());
17394 }
17395 pub fn with_proof_points<T: Into<super::ZkLoginProof>>(
17397 mut self,
17398 field: T,
17399 ) -> Self {
17400 self.set_proof_points(field.into());
17401 self
17402 }
17403 pub fn iss_base64_details(&self) -> &super::ZkLoginClaim {
17405 self.iss_base64_details
17406 .as_ref()
17407 .map(|field| field as _)
17408 .unwrap_or_else(|| super::ZkLoginClaim::default_instance() as _)
17409 }
17410 pub fn iss_base64_details_opt_mut(
17412 &mut self,
17413 ) -> Option<&mut super::ZkLoginClaim> {
17414 self.iss_base64_details.as_mut().map(|field| field as _)
17415 }
17416 pub fn iss_base64_details_mut(&mut self) -> &mut super::ZkLoginClaim {
17419 self.iss_base64_details.get_or_insert_default()
17420 }
17421 pub fn iss_base64_details_opt(&self) -> Option<&super::ZkLoginClaim> {
17423 self.iss_base64_details.as_ref().map(|field| field as _)
17424 }
17425 pub fn set_iss_base64_details<T: Into<super::ZkLoginClaim>>(
17427 &mut self,
17428 field: T,
17429 ) {
17430 self.iss_base64_details = Some(field.into().into());
17431 }
17432 pub fn with_iss_base64_details<T: Into<super::ZkLoginClaim>>(
17434 mut self,
17435 field: T,
17436 ) -> Self {
17437 self.set_iss_base64_details(field.into());
17438 self
17439 }
17440 pub fn header_base64_opt_mut(&mut self) -> Option<&mut String> {
17442 self.header_base64.as_mut().map(|field| field as _)
17443 }
17444 pub fn header_base64_mut(&mut self) -> &mut String {
17447 self.header_base64.get_or_insert_default()
17448 }
17449 pub fn header_base64_opt(&self) -> Option<&str> {
17451 self.header_base64.as_ref().map(|field| field as _)
17452 }
17453 pub fn set_header_base64<T: Into<String>>(&mut self, field: T) {
17455 self.header_base64 = Some(field.into().into());
17456 }
17457 pub fn with_header_base64<T: Into<String>>(mut self, field: T) -> Self {
17459 self.set_header_base64(field.into());
17460 self
17461 }
17462 pub fn address_seed_opt_mut(&mut self) -> Option<&mut String> {
17464 self.address_seed.as_mut().map(|field| field as _)
17465 }
17466 pub fn address_seed_mut(&mut self) -> &mut String {
17469 self.address_seed.get_or_insert_default()
17470 }
17471 pub fn address_seed_opt(&self) -> Option<&str> {
17473 self.address_seed.as_ref().map(|field| field as _)
17474 }
17475 pub fn set_address_seed<T: Into<String>>(&mut self, field: T) {
17477 self.address_seed = Some(field.into().into());
17478 }
17479 pub fn with_address_seed<T: Into<String>>(mut self, field: T) -> Self {
17481 self.set_address_seed(field.into());
17482 self
17483 }
17484 }
17485 impl super::ZkLoginProof {
17486 pub const fn const_default() -> Self {
17487 Self { a: None, b: None, c: None }
17488 }
17489 #[doc(hidden)]
17490 pub fn default_instance() -> &'static Self {
17491 static DEFAULT: super::ZkLoginProof = super::ZkLoginProof::const_default();
17492 &DEFAULT
17493 }
17494 pub fn a(&self) -> &super::CircomG1 {
17496 self.a
17497 .as_ref()
17498 .map(|field| field as _)
17499 .unwrap_or_else(|| super::CircomG1::default_instance() as _)
17500 }
17501 pub fn a_opt_mut(&mut self) -> Option<&mut super::CircomG1> {
17503 self.a.as_mut().map(|field| field as _)
17504 }
17505 pub fn a_mut(&mut self) -> &mut super::CircomG1 {
17508 self.a.get_or_insert_default()
17509 }
17510 pub fn a_opt(&self) -> Option<&super::CircomG1> {
17512 self.a.as_ref().map(|field| field as _)
17513 }
17514 pub fn set_a<T: Into<super::CircomG1>>(&mut self, field: T) {
17516 self.a = Some(field.into().into());
17517 }
17518 pub fn with_a<T: Into<super::CircomG1>>(mut self, field: T) -> Self {
17520 self.set_a(field.into());
17521 self
17522 }
17523 pub fn b(&self) -> &super::CircomG2 {
17525 self.b
17526 .as_ref()
17527 .map(|field| field as _)
17528 .unwrap_or_else(|| super::CircomG2::default_instance() as _)
17529 }
17530 pub fn b_opt_mut(&mut self) -> Option<&mut super::CircomG2> {
17532 self.b.as_mut().map(|field| field as _)
17533 }
17534 pub fn b_mut(&mut self) -> &mut super::CircomG2 {
17537 self.b.get_or_insert_default()
17538 }
17539 pub fn b_opt(&self) -> Option<&super::CircomG2> {
17541 self.b.as_ref().map(|field| field as _)
17542 }
17543 pub fn set_b<T: Into<super::CircomG2>>(&mut self, field: T) {
17545 self.b = Some(field.into().into());
17546 }
17547 pub fn with_b<T: Into<super::CircomG2>>(mut self, field: T) -> Self {
17549 self.set_b(field.into());
17550 self
17551 }
17552 pub fn c(&self) -> &super::CircomG1 {
17554 self.c
17555 .as_ref()
17556 .map(|field| field as _)
17557 .unwrap_or_else(|| super::CircomG1::default_instance() as _)
17558 }
17559 pub fn c_opt_mut(&mut self) -> Option<&mut super::CircomG1> {
17561 self.c.as_mut().map(|field| field as _)
17562 }
17563 pub fn c_mut(&mut self) -> &mut super::CircomG1 {
17566 self.c.get_or_insert_default()
17567 }
17568 pub fn c_opt(&self) -> Option<&super::CircomG1> {
17570 self.c.as_ref().map(|field| field as _)
17571 }
17572 pub fn set_c<T: Into<super::CircomG1>>(&mut self, field: T) {
17574 self.c = Some(field.into().into());
17575 }
17576 pub fn with_c<T: Into<super::CircomG1>>(mut self, field: T) -> Self {
17578 self.set_c(field.into());
17579 self
17580 }
17581 }
17582 impl super::ZkLoginPublicIdentifier {
17583 pub const fn const_default() -> Self {
17584 Self {
17585 iss: None,
17586 address_seed: None,
17587 }
17588 }
17589 #[doc(hidden)]
17590 pub fn default_instance() -> &'static Self {
17591 static DEFAULT: super::ZkLoginPublicIdentifier = super::ZkLoginPublicIdentifier::const_default();
17592 &DEFAULT
17593 }
17594 pub fn iss_opt_mut(&mut self) -> Option<&mut String> {
17596 self.iss.as_mut().map(|field| field as _)
17597 }
17598 pub fn iss_mut(&mut self) -> &mut String {
17601 self.iss.get_or_insert_default()
17602 }
17603 pub fn iss_opt(&self) -> Option<&str> {
17605 self.iss.as_ref().map(|field| field as _)
17606 }
17607 pub fn set_iss<T: Into<String>>(&mut self, field: T) {
17609 self.iss = Some(field.into().into());
17610 }
17611 pub fn with_iss<T: Into<String>>(mut self, field: T) -> Self {
17613 self.set_iss(field.into());
17614 self
17615 }
17616 pub fn address_seed_opt_mut(&mut self) -> Option<&mut String> {
17618 self.address_seed.as_mut().map(|field| field as _)
17619 }
17620 pub fn address_seed_mut(&mut self) -> &mut String {
17623 self.address_seed.get_or_insert_default()
17624 }
17625 pub fn address_seed_opt(&self) -> Option<&str> {
17627 self.address_seed.as_ref().map(|field| field as _)
17628 }
17629 pub fn set_address_seed<T: Into<String>>(&mut self, field: T) {
17631 self.address_seed = Some(field.into().into());
17632 }
17633 pub fn with_address_seed<T: Into<String>>(mut self, field: T) -> Self {
17635 self.set_address_seed(field.into());
17636 self
17637 }
17638 }
17639}