1mod _accessor_impls {
2 #![allow(clippy::useless_conversion)]
3 impl super::AccumulatorWrite {
4 pub const fn const_default() -> Self {
5 Self {
6 address: None,
7 accumulator_type: None,
8 operation: None,
9 value_kind: None,
10 integer_value: None,
11 integer_tuple: Vec::new(),
12 event_digest_value: Vec::new(),
13 }
14 }
15 #[doc(hidden)]
16 pub fn default_instance() -> &'static Self {
17 static DEFAULT: super::AccumulatorWrite = super::AccumulatorWrite::const_default();
18 &DEFAULT
19 }
20 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
22 self.address.as_mut().map(|field| field as _)
23 }
24 pub fn address_mut(&mut self) -> &mut String {
27 self.address.get_or_insert_default()
28 }
29 pub fn address_opt(&self) -> Option<&str> {
31 self.address.as_ref().map(|field| field as _)
32 }
33 pub fn set_address<T: Into<String>>(&mut self, field: T) {
35 self.address = Some(field.into().into());
36 }
37 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
39 self.set_address(field.into());
40 self
41 }
42 pub fn accumulator_type_opt_mut(&mut self) -> Option<&mut String> {
44 self.accumulator_type.as_mut().map(|field| field as _)
45 }
46 pub fn accumulator_type_mut(&mut self) -> &mut String {
49 self.accumulator_type.get_or_insert_default()
50 }
51 pub fn accumulator_type_opt(&self) -> Option<&str> {
53 self.accumulator_type.as_ref().map(|field| field as _)
54 }
55 pub fn set_accumulator_type<T: Into<String>>(&mut self, field: T) {
57 self.accumulator_type = Some(field.into().into());
58 }
59 pub fn with_accumulator_type<T: Into<String>>(mut self, field: T) -> Self {
61 self.set_accumulator_type(field.into());
62 self
63 }
64 pub fn with_operation<T: Into<super::accumulator_write::AccumulatorOperation>>(
66 mut self,
67 field: T,
68 ) -> Self {
69 self.set_operation(field.into());
70 self
71 }
72 pub fn with_value_kind<T: Into<super::accumulator_write::AccumulatorValue>>(
74 mut self,
75 field: T,
76 ) -> Self {
77 self.set_value_kind(field.into());
78 self
79 }
80 pub fn integer_value_opt_mut(&mut self) -> Option<&mut u64> {
82 self.integer_value.as_mut().map(|field| field as _)
83 }
84 pub fn integer_value_mut(&mut self) -> &mut u64 {
87 self.integer_value.get_or_insert_default()
88 }
89 pub fn integer_value_opt(&self) -> Option<u64> {
91 self.integer_value.as_ref().map(|field| *field)
92 }
93 pub fn set_integer_value(&mut self, field: u64) {
95 self.integer_value = Some(field);
96 }
97 pub fn with_integer_value(mut self, field: u64) -> Self {
99 self.set_integer_value(field);
100 self
101 }
102 pub fn integer_tuple(&self) -> &[u64] {
104 &self.integer_tuple
105 }
106 pub fn integer_tuple_mut(&mut self) -> &mut Vec<u64> {
109 &mut self.integer_tuple
110 }
111 pub fn set_integer_tuple(&mut self, field: Vec<u64>) {
113 self.integer_tuple = field;
114 }
115 pub fn with_integer_tuple(mut self, field: Vec<u64>) -> Self {
117 self.set_integer_tuple(field);
118 self
119 }
120 pub fn event_digest_value(&self) -> &[super::EventDigestEntry] {
122 &self.event_digest_value
123 }
124 pub fn event_digest_value_mut(&mut self) -> &mut Vec<super::EventDigestEntry> {
127 &mut self.event_digest_value
128 }
129 pub fn set_event_digest_value(&mut self, field: Vec<super::EventDigestEntry>) {
131 self.event_digest_value = field;
132 }
133 pub fn with_event_digest_value(
135 mut self,
136 field: Vec<super::EventDigestEntry>,
137 ) -> Self {
138 self.set_event_digest_value(field);
139 self
140 }
141 }
142 impl super::ActiveJwk {
143 pub const fn const_default() -> Self {
144 Self {
145 id: None,
146 jwk: None,
147 epoch: None,
148 }
149 }
150 #[doc(hidden)]
151 pub fn default_instance() -> &'static Self {
152 static DEFAULT: super::ActiveJwk = super::ActiveJwk::const_default();
153 &DEFAULT
154 }
155 pub fn id(&self) -> &super::JwkId {
157 self.id
158 .as_ref()
159 .map(|field| field as _)
160 .unwrap_or_else(|| super::JwkId::default_instance() as _)
161 }
162 pub fn id_opt_mut(&mut self) -> Option<&mut super::JwkId> {
164 self.id.as_mut().map(|field| field as _)
165 }
166 pub fn id_mut(&mut self) -> &mut super::JwkId {
169 self.id.get_or_insert_default()
170 }
171 pub fn id_opt(&self) -> Option<&super::JwkId> {
173 self.id.as_ref().map(|field| field as _)
174 }
175 pub fn set_id<T: Into<super::JwkId>>(&mut self, field: T) {
177 self.id = Some(field.into().into());
178 }
179 pub fn with_id<T: Into<super::JwkId>>(mut self, field: T) -> Self {
181 self.set_id(field.into());
182 self
183 }
184 pub fn jwk(&self) -> &super::Jwk {
186 self.jwk
187 .as_ref()
188 .map(|field| field as _)
189 .unwrap_or_else(|| super::Jwk::default_instance() as _)
190 }
191 pub fn jwk_opt_mut(&mut self) -> Option<&mut super::Jwk> {
193 self.jwk.as_mut().map(|field| field as _)
194 }
195 pub fn jwk_mut(&mut self) -> &mut super::Jwk {
198 self.jwk.get_or_insert_default()
199 }
200 pub fn jwk_opt(&self) -> Option<&super::Jwk> {
202 self.jwk.as_ref().map(|field| field as _)
203 }
204 pub fn set_jwk<T: Into<super::Jwk>>(&mut self, field: T) {
206 self.jwk = Some(field.into().into());
207 }
208 pub fn with_jwk<T: Into<super::Jwk>>(mut self, field: T) -> Self {
210 self.set_jwk(field.into());
211 self
212 }
213 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
215 self.epoch.as_mut().map(|field| field as _)
216 }
217 pub fn epoch_mut(&mut self) -> &mut u64 {
220 self.epoch.get_or_insert_default()
221 }
222 pub fn epoch_opt(&self) -> Option<u64> {
224 self.epoch.as_ref().map(|field| *field)
225 }
226 pub fn set_epoch(&mut self, field: u64) {
228 self.epoch = Some(field);
229 }
230 pub fn with_epoch(mut self, field: u64) -> Self {
232 self.set_epoch(field);
233 self
234 }
235 }
236 impl super::AddressAliasesVersion {
237 pub const fn const_default() -> Self {
238 Self { version: None }
239 }
240 #[doc(hidden)]
241 pub fn default_instance() -> &'static Self {
242 static DEFAULT: super::AddressAliasesVersion = super::AddressAliasesVersion::const_default();
243 &DEFAULT
244 }
245 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
247 self.version.as_mut().map(|field| field as _)
248 }
249 pub fn version_mut(&mut self) -> &mut u64 {
252 self.version.get_or_insert_default()
253 }
254 pub fn version_opt(&self) -> Option<u64> {
256 self.version.as_ref().map(|field| *field)
257 }
258 pub fn set_version(&mut self, field: u64) {
260 self.version = Some(field);
261 }
262 pub fn with_version(mut self, field: u64) -> Self {
264 self.set_version(field);
265 self
266 }
267 }
268 impl super::Argument {
269 pub const fn const_default() -> Self {
270 Self {
271 kind: None,
272 input: None,
273 result: None,
274 subresult: None,
275 }
276 }
277 #[doc(hidden)]
278 pub fn default_instance() -> &'static Self {
279 static DEFAULT: super::Argument = super::Argument::const_default();
280 &DEFAULT
281 }
282 pub fn with_kind<T: Into<super::argument::ArgumentKind>>(
284 mut self,
285 field: T,
286 ) -> Self {
287 self.set_kind(field.into());
288 self
289 }
290 pub fn input_opt_mut(&mut self) -> Option<&mut u32> {
292 self.input.as_mut().map(|field| field as _)
293 }
294 pub fn input_mut(&mut self) -> &mut u32 {
297 self.input.get_or_insert_default()
298 }
299 pub fn input_opt(&self) -> Option<u32> {
301 self.input.as_ref().map(|field| *field)
302 }
303 pub fn set_input(&mut self, field: u32) {
305 self.input = Some(field);
306 }
307 pub fn with_input(mut self, field: u32) -> Self {
309 self.set_input(field);
310 self
311 }
312 pub fn result_opt_mut(&mut self) -> Option<&mut u32> {
314 self.result.as_mut().map(|field| field as _)
315 }
316 pub fn result_mut(&mut self) -> &mut u32 {
319 self.result.get_or_insert_default()
320 }
321 pub fn result_opt(&self) -> Option<u32> {
323 self.result.as_ref().map(|field| *field)
324 }
325 pub fn set_result(&mut self, field: u32) {
327 self.result = Some(field);
328 }
329 pub fn with_result(mut self, field: u32) -> Self {
331 self.set_result(field);
332 self
333 }
334 pub fn subresult_opt_mut(&mut self) -> Option<&mut u32> {
336 self.subresult.as_mut().map(|field| field as _)
337 }
338 pub fn subresult_mut(&mut self) -> &mut u32 {
341 self.subresult.get_or_insert_default()
342 }
343 pub fn subresult_opt(&self) -> Option<u32> {
345 self.subresult.as_ref().map(|field| *field)
346 }
347 pub fn set_subresult(&mut self, field: u32) {
349 self.subresult = Some(field);
350 }
351 pub fn with_subresult(mut self, field: u32) -> Self {
353 self.set_subresult(field);
354 self
355 }
356 }
357 impl super::AuthenticatorStateExpire {
358 pub const fn const_default() -> Self {
359 Self {
360 min_epoch: None,
361 authenticator_object_initial_shared_version: None,
362 }
363 }
364 #[doc(hidden)]
365 pub fn default_instance() -> &'static Self {
366 static DEFAULT: super::AuthenticatorStateExpire = super::AuthenticatorStateExpire::const_default();
367 &DEFAULT
368 }
369 pub fn min_epoch_opt_mut(&mut self) -> Option<&mut u64> {
371 self.min_epoch.as_mut().map(|field| field as _)
372 }
373 pub fn min_epoch_mut(&mut self) -> &mut u64 {
376 self.min_epoch.get_or_insert_default()
377 }
378 pub fn min_epoch_opt(&self) -> Option<u64> {
380 self.min_epoch.as_ref().map(|field| *field)
381 }
382 pub fn set_min_epoch(&mut self, field: u64) {
384 self.min_epoch = Some(field);
385 }
386 pub fn with_min_epoch(mut self, field: u64) -> Self {
388 self.set_min_epoch(field);
389 self
390 }
391 pub fn authenticator_object_initial_shared_version_opt_mut(
393 &mut self,
394 ) -> Option<&mut u64> {
395 self.authenticator_object_initial_shared_version
396 .as_mut()
397 .map(|field| field as _)
398 }
399 pub fn authenticator_object_initial_shared_version_mut(&mut self) -> &mut u64 {
402 self.authenticator_object_initial_shared_version.get_or_insert_default()
403 }
404 pub fn authenticator_object_initial_shared_version_opt(&self) -> Option<u64> {
406 self.authenticator_object_initial_shared_version.as_ref().map(|field| *field)
407 }
408 pub fn set_authenticator_object_initial_shared_version(&mut self, field: u64) {
410 self.authenticator_object_initial_shared_version = Some(field);
411 }
412 pub fn with_authenticator_object_initial_shared_version(
414 mut self,
415 field: u64,
416 ) -> Self {
417 self.set_authenticator_object_initial_shared_version(field);
418 self
419 }
420 }
421 impl super::AuthenticatorStateUpdate {
422 pub const fn const_default() -> Self {
423 Self {
424 epoch: None,
425 round: None,
426 new_active_jwks: Vec::new(),
427 authenticator_object_initial_shared_version: None,
428 }
429 }
430 #[doc(hidden)]
431 pub fn default_instance() -> &'static Self {
432 static DEFAULT: super::AuthenticatorStateUpdate = super::AuthenticatorStateUpdate::const_default();
433 &DEFAULT
434 }
435 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
437 self.epoch.as_mut().map(|field| field as _)
438 }
439 pub fn epoch_mut(&mut self) -> &mut u64 {
442 self.epoch.get_or_insert_default()
443 }
444 pub fn epoch_opt(&self) -> Option<u64> {
446 self.epoch.as_ref().map(|field| *field)
447 }
448 pub fn set_epoch(&mut self, field: u64) {
450 self.epoch = Some(field);
451 }
452 pub fn with_epoch(mut self, field: u64) -> Self {
454 self.set_epoch(field);
455 self
456 }
457 pub fn round_opt_mut(&mut self) -> Option<&mut u64> {
459 self.round.as_mut().map(|field| field as _)
460 }
461 pub fn round_mut(&mut self) -> &mut u64 {
464 self.round.get_or_insert_default()
465 }
466 pub fn round_opt(&self) -> Option<u64> {
468 self.round.as_ref().map(|field| *field)
469 }
470 pub fn set_round(&mut self, field: u64) {
472 self.round = Some(field);
473 }
474 pub fn with_round(mut self, field: u64) -> Self {
476 self.set_round(field);
477 self
478 }
479 pub fn new_active_jwks(&self) -> &[super::ActiveJwk] {
481 &self.new_active_jwks
482 }
483 pub fn new_active_jwks_mut(&mut self) -> &mut Vec<super::ActiveJwk> {
486 &mut self.new_active_jwks
487 }
488 pub fn set_new_active_jwks(&mut self, field: Vec<super::ActiveJwk>) {
490 self.new_active_jwks = field;
491 }
492 pub fn with_new_active_jwks(mut self, field: Vec<super::ActiveJwk>) -> Self {
494 self.set_new_active_jwks(field);
495 self
496 }
497 pub fn authenticator_object_initial_shared_version_opt_mut(
499 &mut self,
500 ) -> Option<&mut u64> {
501 self.authenticator_object_initial_shared_version
502 .as_mut()
503 .map(|field| field as _)
504 }
505 pub fn authenticator_object_initial_shared_version_mut(&mut self) -> &mut u64 {
508 self.authenticator_object_initial_shared_version.get_or_insert_default()
509 }
510 pub fn authenticator_object_initial_shared_version_opt(&self) -> Option<u64> {
512 self.authenticator_object_initial_shared_version.as_ref().map(|field| *field)
513 }
514 pub fn set_authenticator_object_initial_shared_version(&mut self, field: u64) {
516 self.authenticator_object_initial_shared_version = Some(field);
517 }
518 pub fn with_authenticator_object_initial_shared_version(
520 mut self,
521 field: u64,
522 ) -> Self {
523 self.set_authenticator_object_initial_shared_version(field);
524 self
525 }
526 }
527 impl super::Balance {
528 pub const fn const_default() -> Self {
529 Self {
530 coin_type: None,
531 balance: None,
532 address_balance: None,
533 coin_balance: None,
534 }
535 }
536 #[doc(hidden)]
537 pub fn default_instance() -> &'static Self {
538 static DEFAULT: super::Balance = super::Balance::const_default();
539 &DEFAULT
540 }
541 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
543 self.coin_type.as_mut().map(|field| field as _)
544 }
545 pub fn coin_type_mut(&mut self) -> &mut String {
548 self.coin_type.get_or_insert_default()
549 }
550 pub fn coin_type_opt(&self) -> Option<&str> {
552 self.coin_type.as_ref().map(|field| field as _)
553 }
554 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
556 self.coin_type = Some(field.into().into());
557 }
558 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
560 self.set_coin_type(field.into());
561 self
562 }
563 pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
565 self.balance.as_mut().map(|field| field as _)
566 }
567 pub fn balance_mut(&mut self) -> &mut u64 {
570 self.balance.get_or_insert_default()
571 }
572 pub fn balance_opt(&self) -> Option<u64> {
574 self.balance.as_ref().map(|field| *field)
575 }
576 pub fn set_balance(&mut self, field: u64) {
578 self.balance = Some(field);
579 }
580 pub fn with_balance(mut self, field: u64) -> Self {
582 self.set_balance(field);
583 self
584 }
585 pub fn address_balance_opt_mut(&mut self) -> Option<&mut u64> {
587 self.address_balance.as_mut().map(|field| field as _)
588 }
589 pub fn address_balance_mut(&mut self) -> &mut u64 {
592 self.address_balance.get_or_insert_default()
593 }
594 pub fn address_balance_opt(&self) -> Option<u64> {
596 self.address_balance.as_ref().map(|field| *field)
597 }
598 pub fn set_address_balance(&mut self, field: u64) {
600 self.address_balance = Some(field);
601 }
602 pub fn with_address_balance(mut self, field: u64) -> Self {
604 self.set_address_balance(field);
605 self
606 }
607 pub fn coin_balance_opt_mut(&mut self) -> Option<&mut u64> {
609 self.coin_balance.as_mut().map(|field| field as _)
610 }
611 pub fn coin_balance_mut(&mut self) -> &mut u64 {
614 self.coin_balance.get_or_insert_default()
615 }
616 pub fn coin_balance_opt(&self) -> Option<u64> {
618 self.coin_balance.as_ref().map(|field| *field)
619 }
620 pub fn set_coin_balance(&mut self, field: u64) {
622 self.coin_balance = Some(field);
623 }
624 pub fn with_coin_balance(mut self, field: u64) -> Self {
626 self.set_coin_balance(field);
627 self
628 }
629 }
630 impl super::BalanceChange {
631 pub const fn const_default() -> Self {
632 Self {
633 address: None,
634 coin_type: None,
635 amount: None,
636 }
637 }
638 #[doc(hidden)]
639 pub fn default_instance() -> &'static Self {
640 static DEFAULT: super::BalanceChange = super::BalanceChange::const_default();
641 &DEFAULT
642 }
643 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
645 self.address.as_mut().map(|field| field as _)
646 }
647 pub fn address_mut(&mut self) -> &mut String {
650 self.address.get_or_insert_default()
651 }
652 pub fn address_opt(&self) -> Option<&str> {
654 self.address.as_ref().map(|field| field as _)
655 }
656 pub fn set_address<T: Into<String>>(&mut self, field: T) {
658 self.address = Some(field.into().into());
659 }
660 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
662 self.set_address(field.into());
663 self
664 }
665 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
667 self.coin_type.as_mut().map(|field| field as _)
668 }
669 pub fn coin_type_mut(&mut self) -> &mut String {
672 self.coin_type.get_or_insert_default()
673 }
674 pub fn coin_type_opt(&self) -> Option<&str> {
676 self.coin_type.as_ref().map(|field| field as _)
677 }
678 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
680 self.coin_type = Some(field.into().into());
681 }
682 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
684 self.set_coin_type(field.into());
685 self
686 }
687 pub fn amount_opt_mut(&mut self) -> Option<&mut String> {
689 self.amount.as_mut().map(|field| field as _)
690 }
691 pub fn amount_mut(&mut self) -> &mut String {
694 self.amount.get_or_insert_default()
695 }
696 pub fn amount_opt(&self) -> Option<&str> {
698 self.amount.as_ref().map(|field| field as _)
699 }
700 pub fn set_amount<T: Into<String>>(&mut self, field: T) {
702 self.amount = Some(field.into().into());
703 }
704 pub fn with_amount<T: Into<String>>(mut self, field: T) -> Self {
706 self.set_amount(field.into());
707 self
708 }
709 }
710 impl super::BatchGetObjectsRequest {
711 pub const fn const_default() -> Self {
712 Self {
713 requests: Vec::new(),
714 read_mask: None,
715 }
716 }
717 #[doc(hidden)]
718 pub fn default_instance() -> &'static Self {
719 static DEFAULT: super::BatchGetObjectsRequest = super::BatchGetObjectsRequest::const_default();
720 &DEFAULT
721 }
722 pub fn requests(&self) -> &[super::GetObjectRequest] {
724 &self.requests
725 }
726 pub fn requests_mut(&mut self) -> &mut Vec<super::GetObjectRequest> {
729 &mut self.requests
730 }
731 pub fn set_requests(&mut self, field: Vec<super::GetObjectRequest>) {
733 self.requests = field;
734 }
735 pub fn with_requests(mut self, field: Vec<super::GetObjectRequest>) -> Self {
737 self.set_requests(field);
738 self
739 }
740 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
742 self.read_mask.as_mut().map(|field| field as _)
743 }
744 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
747 self.read_mask.get_or_insert_default()
748 }
749 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
751 self.read_mask.as_ref().map(|field| field as _)
752 }
753 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
755 self.read_mask = Some(field.into().into());
756 }
757 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
759 mut self,
760 field: T,
761 ) -> Self {
762 self.set_read_mask(field.into());
763 self
764 }
765 }
766 impl super::BatchGetObjectsResponse {
767 pub const fn const_default() -> Self {
768 Self { objects: Vec::new() }
769 }
770 #[doc(hidden)]
771 pub fn default_instance() -> &'static Self {
772 static DEFAULT: super::BatchGetObjectsResponse = super::BatchGetObjectsResponse::const_default();
773 &DEFAULT
774 }
775 pub fn objects(&self) -> &[super::GetObjectResult] {
777 &self.objects
778 }
779 pub fn objects_mut(&mut self) -> &mut Vec<super::GetObjectResult> {
782 &mut self.objects
783 }
784 pub fn set_objects(&mut self, field: Vec<super::GetObjectResult>) {
786 self.objects = field;
787 }
788 pub fn with_objects(mut self, field: Vec<super::GetObjectResult>) -> Self {
790 self.set_objects(field);
791 self
792 }
793 }
794 impl super::BatchGetTransactionsRequest {
795 pub const fn const_default() -> Self {
796 Self {
797 digests: Vec::new(),
798 read_mask: None,
799 }
800 }
801 #[doc(hidden)]
802 pub fn default_instance() -> &'static Self {
803 static DEFAULT: super::BatchGetTransactionsRequest = super::BatchGetTransactionsRequest::const_default();
804 &DEFAULT
805 }
806 pub fn digests(&self) -> &[String] {
808 &self.digests
809 }
810 pub fn digests_mut(&mut self) -> &mut Vec<String> {
813 &mut self.digests
814 }
815 pub fn set_digests(&mut self, field: Vec<String>) {
817 self.digests = field;
818 }
819 pub fn with_digests(mut self, field: Vec<String>) -> Self {
821 self.set_digests(field);
822 self
823 }
824 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
826 self.read_mask.as_mut().map(|field| field as _)
827 }
828 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
831 self.read_mask.get_or_insert_default()
832 }
833 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
835 self.read_mask.as_ref().map(|field| field as _)
836 }
837 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
839 self.read_mask = Some(field.into().into());
840 }
841 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
843 mut self,
844 field: T,
845 ) -> Self {
846 self.set_read_mask(field.into());
847 self
848 }
849 }
850 impl super::BatchGetTransactionsResponse {
851 pub const fn const_default() -> Self {
852 Self { transactions: Vec::new() }
853 }
854 #[doc(hidden)]
855 pub fn default_instance() -> &'static Self {
856 static DEFAULT: super::BatchGetTransactionsResponse = super::BatchGetTransactionsResponse::const_default();
857 &DEFAULT
858 }
859 pub fn transactions(&self) -> &[super::GetTransactionResult] {
861 &self.transactions
862 }
863 pub fn transactions_mut(&mut self) -> &mut Vec<super::GetTransactionResult> {
866 &mut self.transactions
867 }
868 pub fn set_transactions(&mut self, field: Vec<super::GetTransactionResult>) {
870 self.transactions = field;
871 }
872 pub fn with_transactions(
874 mut self,
875 field: Vec<super::GetTransactionResult>,
876 ) -> Self {
877 self.set_transactions(field);
878 self
879 }
880 }
881 impl super::Bcs {
882 pub const fn const_default() -> Self {
883 Self { name: None, value: None }
884 }
885 #[doc(hidden)]
886 pub fn default_instance() -> &'static Self {
887 static DEFAULT: super::Bcs = super::Bcs::const_default();
888 &DEFAULT
889 }
890 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
892 self.name.as_mut().map(|field| field as _)
893 }
894 pub fn name_mut(&mut self) -> &mut String {
897 self.name.get_or_insert_default()
898 }
899 pub fn name_opt(&self) -> Option<&str> {
901 self.name.as_ref().map(|field| field as _)
902 }
903 pub fn set_name<T: Into<String>>(&mut self, field: T) {
905 self.name = Some(field.into().into());
906 }
907 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
909 self.set_name(field.into());
910 self
911 }
912 pub fn value_opt(&self) -> Option<&[u8]> {
914 self.value.as_ref().map(|field| field as _)
915 }
916 pub fn set_value<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
918 self.value = Some(field.into().into());
919 }
920 pub fn with_value<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
922 self.set_value(field.into());
923 self
924 }
925 }
926 impl super::CanceledTransaction {
927 pub const fn const_default() -> Self {
928 Self {
929 digest: None,
930 version_assignments: Vec::new(),
931 }
932 }
933 #[doc(hidden)]
934 pub fn default_instance() -> &'static Self {
935 static DEFAULT: super::CanceledTransaction = super::CanceledTransaction::const_default();
936 &DEFAULT
937 }
938 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
940 self.digest.as_mut().map(|field| field as _)
941 }
942 pub fn digest_mut(&mut self) -> &mut String {
945 self.digest.get_or_insert_default()
946 }
947 pub fn digest_opt(&self) -> Option<&str> {
949 self.digest.as_ref().map(|field| field as _)
950 }
951 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
953 self.digest = Some(field.into().into());
954 }
955 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
957 self.set_digest(field.into());
958 self
959 }
960 pub fn version_assignments(&self) -> &[super::VersionAssignment] {
962 &self.version_assignments
963 }
964 pub fn version_assignments_mut(&mut self) -> &mut Vec<super::VersionAssignment> {
967 &mut self.version_assignments
968 }
969 pub fn set_version_assignments(&mut self, field: Vec<super::VersionAssignment>) {
971 self.version_assignments = field;
972 }
973 pub fn with_version_assignments(
975 mut self,
976 field: Vec<super::VersionAssignment>,
977 ) -> Self {
978 self.set_version_assignments(field);
979 self
980 }
981 }
982 impl super::ChangeEpoch {
983 pub const fn const_default() -> Self {
984 Self {
985 epoch: None,
986 protocol_version: None,
987 storage_charge: None,
988 computation_charge: None,
989 storage_rebate: None,
990 non_refundable_storage_fee: None,
991 epoch_start_timestamp: None,
992 system_packages: Vec::new(),
993 }
994 }
995 #[doc(hidden)]
996 pub fn default_instance() -> &'static Self {
997 static DEFAULT: super::ChangeEpoch = super::ChangeEpoch::const_default();
998 &DEFAULT
999 }
1000 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
1002 self.epoch.as_mut().map(|field| field as _)
1003 }
1004 pub fn epoch_mut(&mut self) -> &mut u64 {
1007 self.epoch.get_or_insert_default()
1008 }
1009 pub fn epoch_opt(&self) -> Option<u64> {
1011 self.epoch.as_ref().map(|field| *field)
1012 }
1013 pub fn set_epoch(&mut self, field: u64) {
1015 self.epoch = Some(field);
1016 }
1017 pub fn with_epoch(mut self, field: u64) -> Self {
1019 self.set_epoch(field);
1020 self
1021 }
1022 pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
1024 self.protocol_version.as_mut().map(|field| field as _)
1025 }
1026 pub fn protocol_version_mut(&mut self) -> &mut u64 {
1029 self.protocol_version.get_or_insert_default()
1030 }
1031 pub fn protocol_version_opt(&self) -> Option<u64> {
1033 self.protocol_version.as_ref().map(|field| *field)
1034 }
1035 pub fn set_protocol_version(&mut self, field: u64) {
1037 self.protocol_version = Some(field);
1038 }
1039 pub fn with_protocol_version(mut self, field: u64) -> Self {
1041 self.set_protocol_version(field);
1042 self
1043 }
1044 pub fn storage_charge_opt_mut(&mut self) -> Option<&mut u64> {
1046 self.storage_charge.as_mut().map(|field| field as _)
1047 }
1048 pub fn storage_charge_mut(&mut self) -> &mut u64 {
1051 self.storage_charge.get_or_insert_default()
1052 }
1053 pub fn storage_charge_opt(&self) -> Option<u64> {
1055 self.storage_charge.as_ref().map(|field| *field)
1056 }
1057 pub fn set_storage_charge(&mut self, field: u64) {
1059 self.storage_charge = Some(field);
1060 }
1061 pub fn with_storage_charge(mut self, field: u64) -> Self {
1063 self.set_storage_charge(field);
1064 self
1065 }
1066 pub fn computation_charge_opt_mut(&mut self) -> Option<&mut u64> {
1068 self.computation_charge.as_mut().map(|field| field as _)
1069 }
1070 pub fn computation_charge_mut(&mut self) -> &mut u64 {
1073 self.computation_charge.get_or_insert_default()
1074 }
1075 pub fn computation_charge_opt(&self) -> Option<u64> {
1077 self.computation_charge.as_ref().map(|field| *field)
1078 }
1079 pub fn set_computation_charge(&mut self, field: u64) {
1081 self.computation_charge = Some(field);
1082 }
1083 pub fn with_computation_charge(mut self, field: u64) -> Self {
1085 self.set_computation_charge(field);
1086 self
1087 }
1088 pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
1090 self.storage_rebate.as_mut().map(|field| field as _)
1091 }
1092 pub fn storage_rebate_mut(&mut self) -> &mut u64 {
1095 self.storage_rebate.get_or_insert_default()
1096 }
1097 pub fn storage_rebate_opt(&self) -> Option<u64> {
1099 self.storage_rebate.as_ref().map(|field| *field)
1100 }
1101 pub fn set_storage_rebate(&mut self, field: u64) {
1103 self.storage_rebate = Some(field);
1104 }
1105 pub fn with_storage_rebate(mut self, field: u64) -> Self {
1107 self.set_storage_rebate(field);
1108 self
1109 }
1110 pub fn non_refundable_storage_fee_opt_mut(&mut self) -> Option<&mut u64> {
1112 self.non_refundable_storage_fee.as_mut().map(|field| field as _)
1113 }
1114 pub fn non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
1117 self.non_refundable_storage_fee.get_or_insert_default()
1118 }
1119 pub fn non_refundable_storage_fee_opt(&self) -> Option<u64> {
1121 self.non_refundable_storage_fee.as_ref().map(|field| *field)
1122 }
1123 pub fn set_non_refundable_storage_fee(&mut self, field: u64) {
1125 self.non_refundable_storage_fee = Some(field);
1126 }
1127 pub fn with_non_refundable_storage_fee(mut self, field: u64) -> Self {
1129 self.set_non_refundable_storage_fee(field);
1130 self
1131 }
1132 pub fn epoch_start_timestamp_opt_mut(
1134 &mut self,
1135 ) -> Option<&mut ::prost_types::Timestamp> {
1136 self.epoch_start_timestamp.as_mut().map(|field| field as _)
1137 }
1138 pub fn epoch_start_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
1141 self.epoch_start_timestamp.get_or_insert_default()
1142 }
1143 pub fn epoch_start_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
1145 self.epoch_start_timestamp.as_ref().map(|field| field as _)
1146 }
1147 pub fn set_epoch_start_timestamp<T: Into<::prost_types::Timestamp>>(
1149 &mut self,
1150 field: T,
1151 ) {
1152 self.epoch_start_timestamp = Some(field.into().into());
1153 }
1154 pub fn with_epoch_start_timestamp<T: Into<::prost_types::Timestamp>>(
1156 mut self,
1157 field: T,
1158 ) -> Self {
1159 self.set_epoch_start_timestamp(field.into());
1160 self
1161 }
1162 pub fn system_packages(&self) -> &[super::SystemPackage] {
1164 &self.system_packages
1165 }
1166 pub fn system_packages_mut(&mut self) -> &mut Vec<super::SystemPackage> {
1169 &mut self.system_packages
1170 }
1171 pub fn set_system_packages(&mut self, field: Vec<super::SystemPackage>) {
1173 self.system_packages = field;
1174 }
1175 pub fn with_system_packages(mut self, field: Vec<super::SystemPackage>) -> Self {
1177 self.set_system_packages(field);
1178 self
1179 }
1180 }
1181 impl super::ChangedObject {
1182 pub const fn const_default() -> Self {
1183 Self {
1184 object_id: None,
1185 input_state: None,
1186 input_version: None,
1187 input_digest: None,
1188 input_owner: None,
1189 output_state: None,
1190 output_version: None,
1191 output_digest: None,
1192 output_owner: None,
1193 accumulator_write: None,
1194 id_operation: None,
1195 object_type: None,
1196 }
1197 }
1198 #[doc(hidden)]
1199 pub fn default_instance() -> &'static Self {
1200 static DEFAULT: super::ChangedObject = super::ChangedObject::const_default();
1201 &DEFAULT
1202 }
1203 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
1205 self.object_id.as_mut().map(|field| field as _)
1206 }
1207 pub fn object_id_mut(&mut self) -> &mut String {
1210 self.object_id.get_or_insert_default()
1211 }
1212 pub fn object_id_opt(&self) -> Option<&str> {
1214 self.object_id.as_ref().map(|field| field as _)
1215 }
1216 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
1218 self.object_id = Some(field.into().into());
1219 }
1220 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
1222 self.set_object_id(field.into());
1223 self
1224 }
1225 pub fn with_input_state<T: Into<super::changed_object::InputObjectState>>(
1227 mut self,
1228 field: T,
1229 ) -> Self {
1230 self.set_input_state(field.into());
1231 self
1232 }
1233 pub fn input_version_opt_mut(&mut self) -> Option<&mut u64> {
1235 self.input_version.as_mut().map(|field| field as _)
1236 }
1237 pub fn input_version_mut(&mut self) -> &mut u64 {
1240 self.input_version.get_or_insert_default()
1241 }
1242 pub fn input_version_opt(&self) -> Option<u64> {
1244 self.input_version.as_ref().map(|field| *field)
1245 }
1246 pub fn set_input_version(&mut self, field: u64) {
1248 self.input_version = Some(field);
1249 }
1250 pub fn with_input_version(mut self, field: u64) -> Self {
1252 self.set_input_version(field);
1253 self
1254 }
1255 pub fn input_digest_opt_mut(&mut self) -> Option<&mut String> {
1257 self.input_digest.as_mut().map(|field| field as _)
1258 }
1259 pub fn input_digest_mut(&mut self) -> &mut String {
1262 self.input_digest.get_or_insert_default()
1263 }
1264 pub fn input_digest_opt(&self) -> Option<&str> {
1266 self.input_digest.as_ref().map(|field| field as _)
1267 }
1268 pub fn set_input_digest<T: Into<String>>(&mut self, field: T) {
1270 self.input_digest = Some(field.into().into());
1271 }
1272 pub fn with_input_digest<T: Into<String>>(mut self, field: T) -> Self {
1274 self.set_input_digest(field.into());
1275 self
1276 }
1277 pub fn input_owner(&self) -> &super::Owner {
1279 self.input_owner
1280 .as_ref()
1281 .map(|field| field as _)
1282 .unwrap_or_else(|| super::Owner::default_instance() as _)
1283 }
1284 pub fn input_owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
1286 self.input_owner.as_mut().map(|field| field as _)
1287 }
1288 pub fn input_owner_mut(&mut self) -> &mut super::Owner {
1291 self.input_owner.get_or_insert_default()
1292 }
1293 pub fn input_owner_opt(&self) -> Option<&super::Owner> {
1295 self.input_owner.as_ref().map(|field| field as _)
1296 }
1297 pub fn set_input_owner<T: Into<super::Owner>>(&mut self, field: T) {
1299 self.input_owner = Some(field.into().into());
1300 }
1301 pub fn with_input_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
1303 self.set_input_owner(field.into());
1304 self
1305 }
1306 pub fn with_output_state<T: Into<super::changed_object::OutputObjectState>>(
1308 mut self,
1309 field: T,
1310 ) -> Self {
1311 self.set_output_state(field.into());
1312 self
1313 }
1314 pub fn output_version_opt_mut(&mut self) -> Option<&mut u64> {
1316 self.output_version.as_mut().map(|field| field as _)
1317 }
1318 pub fn output_version_mut(&mut self) -> &mut u64 {
1321 self.output_version.get_or_insert_default()
1322 }
1323 pub fn output_version_opt(&self) -> Option<u64> {
1325 self.output_version.as_ref().map(|field| *field)
1326 }
1327 pub fn set_output_version(&mut self, field: u64) {
1329 self.output_version = Some(field);
1330 }
1331 pub fn with_output_version(mut self, field: u64) -> Self {
1333 self.set_output_version(field);
1334 self
1335 }
1336 pub fn output_digest_opt_mut(&mut self) -> Option<&mut String> {
1338 self.output_digest.as_mut().map(|field| field as _)
1339 }
1340 pub fn output_digest_mut(&mut self) -> &mut String {
1343 self.output_digest.get_or_insert_default()
1344 }
1345 pub fn output_digest_opt(&self) -> Option<&str> {
1347 self.output_digest.as_ref().map(|field| field as _)
1348 }
1349 pub fn set_output_digest<T: Into<String>>(&mut self, field: T) {
1351 self.output_digest = Some(field.into().into());
1352 }
1353 pub fn with_output_digest<T: Into<String>>(mut self, field: T) -> Self {
1355 self.set_output_digest(field.into());
1356 self
1357 }
1358 pub fn output_owner(&self) -> &super::Owner {
1360 self.output_owner
1361 .as_ref()
1362 .map(|field| field as _)
1363 .unwrap_or_else(|| super::Owner::default_instance() as _)
1364 }
1365 pub fn output_owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
1367 self.output_owner.as_mut().map(|field| field as _)
1368 }
1369 pub fn output_owner_mut(&mut self) -> &mut super::Owner {
1372 self.output_owner.get_or_insert_default()
1373 }
1374 pub fn output_owner_opt(&self) -> Option<&super::Owner> {
1376 self.output_owner.as_ref().map(|field| field as _)
1377 }
1378 pub fn set_output_owner<T: Into<super::Owner>>(&mut self, field: T) {
1380 self.output_owner = Some(field.into().into());
1381 }
1382 pub fn with_output_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
1384 self.set_output_owner(field.into());
1385 self
1386 }
1387 pub fn accumulator_write(&self) -> &super::AccumulatorWrite {
1389 self.accumulator_write
1390 .as_ref()
1391 .map(|field| field as _)
1392 .unwrap_or_else(|| super::AccumulatorWrite::default_instance() as _)
1393 }
1394 pub fn accumulator_write_opt_mut(
1396 &mut self,
1397 ) -> Option<&mut super::AccumulatorWrite> {
1398 self.accumulator_write.as_mut().map(|field| field as _)
1399 }
1400 pub fn accumulator_write_mut(&mut self) -> &mut super::AccumulatorWrite {
1403 self.accumulator_write.get_or_insert_default()
1404 }
1405 pub fn accumulator_write_opt(&self) -> Option<&super::AccumulatorWrite> {
1407 self.accumulator_write.as_ref().map(|field| field as _)
1408 }
1409 pub fn set_accumulator_write<T: Into<super::AccumulatorWrite>>(
1411 &mut self,
1412 field: T,
1413 ) {
1414 self.accumulator_write = Some(field.into().into());
1415 }
1416 pub fn with_accumulator_write<T: Into<super::AccumulatorWrite>>(
1418 mut self,
1419 field: T,
1420 ) -> Self {
1421 self.set_accumulator_write(field.into());
1422 self
1423 }
1424 pub fn with_id_operation<T: Into<super::changed_object::IdOperation>>(
1426 mut self,
1427 field: T,
1428 ) -> Self {
1429 self.set_id_operation(field.into());
1430 self
1431 }
1432 pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
1434 self.object_type.as_mut().map(|field| field as _)
1435 }
1436 pub fn object_type_mut(&mut self) -> &mut String {
1439 self.object_type.get_or_insert_default()
1440 }
1441 pub fn object_type_opt(&self) -> Option<&str> {
1443 self.object_type.as_ref().map(|field| field as _)
1444 }
1445 pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
1447 self.object_type = Some(field.into().into());
1448 }
1449 pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
1451 self.set_object_type(field.into());
1452 self
1453 }
1454 }
1455 impl super::Checkpoint {
1456 pub const fn const_default() -> Self {
1457 Self {
1458 sequence_number: None,
1459 digest: None,
1460 summary: None,
1461 signature: None,
1462 contents: None,
1463 transactions: Vec::new(),
1464 objects: None,
1465 }
1466 }
1467 #[doc(hidden)]
1468 pub fn default_instance() -> &'static Self {
1469 static DEFAULT: super::Checkpoint = super::Checkpoint::const_default();
1470 &DEFAULT
1471 }
1472 pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
1474 self.sequence_number.as_mut().map(|field| field as _)
1475 }
1476 pub fn sequence_number_mut(&mut self) -> &mut u64 {
1479 self.sequence_number.get_or_insert_default()
1480 }
1481 pub fn sequence_number_opt(&self) -> Option<u64> {
1483 self.sequence_number.as_ref().map(|field| *field)
1484 }
1485 pub fn set_sequence_number(&mut self, field: u64) {
1487 self.sequence_number = Some(field);
1488 }
1489 pub fn with_sequence_number(mut self, field: u64) -> Self {
1491 self.set_sequence_number(field);
1492 self
1493 }
1494 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1496 self.digest.as_mut().map(|field| field as _)
1497 }
1498 pub fn digest_mut(&mut self) -> &mut String {
1501 self.digest.get_or_insert_default()
1502 }
1503 pub fn digest_opt(&self) -> Option<&str> {
1505 self.digest.as_ref().map(|field| field as _)
1506 }
1507 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1509 self.digest = Some(field.into().into());
1510 }
1511 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1513 self.set_digest(field.into());
1514 self
1515 }
1516 pub fn summary(&self) -> &super::CheckpointSummary {
1518 self.summary
1519 .as_ref()
1520 .map(|field| field as _)
1521 .unwrap_or_else(|| super::CheckpointSummary::default_instance() as _)
1522 }
1523 pub fn summary_opt_mut(&mut self) -> Option<&mut super::CheckpointSummary> {
1525 self.summary.as_mut().map(|field| field as _)
1526 }
1527 pub fn summary_mut(&mut self) -> &mut super::CheckpointSummary {
1530 self.summary.get_or_insert_default()
1531 }
1532 pub fn summary_opt(&self) -> Option<&super::CheckpointSummary> {
1534 self.summary.as_ref().map(|field| field as _)
1535 }
1536 pub fn set_summary<T: Into<super::CheckpointSummary>>(&mut self, field: T) {
1538 self.summary = Some(field.into().into());
1539 }
1540 pub fn with_summary<T: Into<super::CheckpointSummary>>(
1542 mut self,
1543 field: T,
1544 ) -> Self {
1545 self.set_summary(field.into());
1546 self
1547 }
1548 pub fn signature(&self) -> &super::ValidatorAggregatedSignature {
1550 self.signature
1551 .as_ref()
1552 .map(|field| field as _)
1553 .unwrap_or_else(|| {
1554 super::ValidatorAggregatedSignature::default_instance() as _
1555 })
1556 }
1557 pub fn signature_opt_mut(
1559 &mut self,
1560 ) -> Option<&mut super::ValidatorAggregatedSignature> {
1561 self.signature.as_mut().map(|field| field as _)
1562 }
1563 pub fn signature_mut(&mut self) -> &mut super::ValidatorAggregatedSignature {
1566 self.signature.get_or_insert_default()
1567 }
1568 pub fn signature_opt(&self) -> Option<&super::ValidatorAggregatedSignature> {
1570 self.signature.as_ref().map(|field| field as _)
1571 }
1572 pub fn set_signature<T: Into<super::ValidatorAggregatedSignature>>(
1574 &mut self,
1575 field: T,
1576 ) {
1577 self.signature = Some(field.into().into());
1578 }
1579 pub fn with_signature<T: Into<super::ValidatorAggregatedSignature>>(
1581 mut self,
1582 field: T,
1583 ) -> Self {
1584 self.set_signature(field.into());
1585 self
1586 }
1587 pub fn contents(&self) -> &super::CheckpointContents {
1589 self.contents
1590 .as_ref()
1591 .map(|field| field as _)
1592 .unwrap_or_else(|| super::CheckpointContents::default_instance() as _)
1593 }
1594 pub fn contents_opt_mut(&mut self) -> Option<&mut super::CheckpointContents> {
1596 self.contents.as_mut().map(|field| field as _)
1597 }
1598 pub fn contents_mut(&mut self) -> &mut super::CheckpointContents {
1601 self.contents.get_or_insert_default()
1602 }
1603 pub fn contents_opt(&self) -> Option<&super::CheckpointContents> {
1605 self.contents.as_ref().map(|field| field as _)
1606 }
1607 pub fn set_contents<T: Into<super::CheckpointContents>>(&mut self, field: T) {
1609 self.contents = Some(field.into().into());
1610 }
1611 pub fn with_contents<T: Into<super::CheckpointContents>>(
1613 mut self,
1614 field: T,
1615 ) -> Self {
1616 self.set_contents(field.into());
1617 self
1618 }
1619 pub fn transactions(&self) -> &[super::ExecutedTransaction] {
1621 &self.transactions
1622 }
1623 pub fn transactions_mut(&mut self) -> &mut Vec<super::ExecutedTransaction> {
1626 &mut self.transactions
1627 }
1628 pub fn set_transactions(&mut self, field: Vec<super::ExecutedTransaction>) {
1630 self.transactions = field;
1631 }
1632 pub fn with_transactions(
1634 mut self,
1635 field: Vec<super::ExecutedTransaction>,
1636 ) -> Self {
1637 self.set_transactions(field);
1638 self
1639 }
1640 pub fn objects(&self) -> &super::ObjectSet {
1642 self.objects
1643 .as_ref()
1644 .map(|field| field as _)
1645 .unwrap_or_else(|| super::ObjectSet::default_instance() as _)
1646 }
1647 pub fn objects_opt_mut(&mut self) -> Option<&mut super::ObjectSet> {
1649 self.objects.as_mut().map(|field| field as _)
1650 }
1651 pub fn objects_mut(&mut self) -> &mut super::ObjectSet {
1654 self.objects.get_or_insert_default()
1655 }
1656 pub fn objects_opt(&self) -> Option<&super::ObjectSet> {
1658 self.objects.as_ref().map(|field| field as _)
1659 }
1660 pub fn set_objects<T: Into<super::ObjectSet>>(&mut self, field: T) {
1662 self.objects = Some(field.into().into());
1663 }
1664 pub fn with_objects<T: Into<super::ObjectSet>>(mut self, field: T) -> Self {
1666 self.set_objects(field.into());
1667 self
1668 }
1669 }
1670 impl super::CheckpointCommitment {
1671 pub const fn const_default() -> Self {
1672 Self { kind: None, digest: None }
1673 }
1674 #[doc(hidden)]
1675 pub fn default_instance() -> &'static Self {
1676 static DEFAULT: super::CheckpointCommitment = super::CheckpointCommitment::const_default();
1677 &DEFAULT
1678 }
1679 pub fn with_kind<
1681 T: Into<super::checkpoint_commitment::CheckpointCommitmentKind>,
1682 >(mut self, field: T) -> Self {
1683 self.set_kind(field.into());
1684 self
1685 }
1686 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1688 self.digest.as_mut().map(|field| field as _)
1689 }
1690 pub fn digest_mut(&mut self) -> &mut String {
1693 self.digest.get_or_insert_default()
1694 }
1695 pub fn digest_opt(&self) -> Option<&str> {
1697 self.digest.as_ref().map(|field| field as _)
1698 }
1699 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1701 self.digest = Some(field.into().into());
1702 }
1703 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1705 self.set_digest(field.into());
1706 self
1707 }
1708 }
1709 impl super::CheckpointContents {
1710 pub const fn const_default() -> Self {
1711 Self {
1712 bcs: None,
1713 digest: None,
1714 version: None,
1715 transactions: Vec::new(),
1716 }
1717 }
1718 #[doc(hidden)]
1719 pub fn default_instance() -> &'static Self {
1720 static DEFAULT: super::CheckpointContents = super::CheckpointContents::const_default();
1721 &DEFAULT
1722 }
1723 pub fn bcs(&self) -> &super::Bcs {
1725 self.bcs
1726 .as_ref()
1727 .map(|field| field as _)
1728 .unwrap_or_else(|| super::Bcs::default_instance() as _)
1729 }
1730 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
1732 self.bcs.as_mut().map(|field| field as _)
1733 }
1734 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
1737 self.bcs.get_or_insert_default()
1738 }
1739 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
1741 self.bcs.as_ref().map(|field| field as _)
1742 }
1743 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
1745 self.bcs = Some(field.into().into());
1746 }
1747 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
1749 self.set_bcs(field.into());
1750 self
1751 }
1752 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1754 self.digest.as_mut().map(|field| field as _)
1755 }
1756 pub fn digest_mut(&mut self) -> &mut String {
1759 self.digest.get_or_insert_default()
1760 }
1761 pub fn digest_opt(&self) -> Option<&str> {
1763 self.digest.as_ref().map(|field| field as _)
1764 }
1765 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1767 self.digest = Some(field.into().into());
1768 }
1769 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1771 self.set_digest(field.into());
1772 self
1773 }
1774 pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
1776 self.version.as_mut().map(|field| field as _)
1777 }
1778 pub fn version_mut(&mut self) -> &mut i32 {
1781 self.version.get_or_insert_default()
1782 }
1783 pub fn version_opt(&self) -> Option<i32> {
1785 self.version.as_ref().map(|field| *field)
1786 }
1787 pub fn set_version(&mut self, field: i32) {
1789 self.version = Some(field);
1790 }
1791 pub fn with_version(mut self, field: i32) -> Self {
1793 self.set_version(field);
1794 self
1795 }
1796 pub fn transactions(&self) -> &[super::CheckpointedTransactionInfo] {
1798 &self.transactions
1799 }
1800 pub fn transactions_mut(
1803 &mut self,
1804 ) -> &mut Vec<super::CheckpointedTransactionInfo> {
1805 &mut self.transactions
1806 }
1807 pub fn set_transactions(
1809 &mut self,
1810 field: Vec<super::CheckpointedTransactionInfo>,
1811 ) {
1812 self.transactions = field;
1813 }
1814 pub fn with_transactions(
1816 mut self,
1817 field: Vec<super::CheckpointedTransactionInfo>,
1818 ) -> Self {
1819 self.set_transactions(field);
1820 self
1821 }
1822 }
1823 impl super::CheckpointSummary {
1824 pub const fn const_default() -> Self {
1825 Self {
1826 bcs: None,
1827 digest: None,
1828 epoch: None,
1829 sequence_number: None,
1830 total_network_transactions: None,
1831 content_digest: None,
1832 previous_digest: None,
1833 epoch_rolling_gas_cost_summary: None,
1834 timestamp: None,
1835 commitments: Vec::new(),
1836 end_of_epoch_data: None,
1837 version_specific_data: None,
1838 }
1839 }
1840 #[doc(hidden)]
1841 pub fn default_instance() -> &'static Self {
1842 static DEFAULT: super::CheckpointSummary = super::CheckpointSummary::const_default();
1843 &DEFAULT
1844 }
1845 pub fn bcs(&self) -> &super::Bcs {
1847 self.bcs
1848 .as_ref()
1849 .map(|field| field as _)
1850 .unwrap_or_else(|| super::Bcs::default_instance() as _)
1851 }
1852 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
1854 self.bcs.as_mut().map(|field| field as _)
1855 }
1856 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
1859 self.bcs.get_or_insert_default()
1860 }
1861 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
1863 self.bcs.as_ref().map(|field| field as _)
1864 }
1865 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
1867 self.bcs = Some(field.into().into());
1868 }
1869 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
1871 self.set_bcs(field.into());
1872 self
1873 }
1874 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1876 self.digest.as_mut().map(|field| field as _)
1877 }
1878 pub fn digest_mut(&mut self) -> &mut String {
1881 self.digest.get_or_insert_default()
1882 }
1883 pub fn digest_opt(&self) -> Option<&str> {
1885 self.digest.as_ref().map(|field| field as _)
1886 }
1887 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1889 self.digest = Some(field.into().into());
1890 }
1891 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1893 self.set_digest(field.into());
1894 self
1895 }
1896 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
1898 self.epoch.as_mut().map(|field| field as _)
1899 }
1900 pub fn epoch_mut(&mut self) -> &mut u64 {
1903 self.epoch.get_or_insert_default()
1904 }
1905 pub fn epoch_opt(&self) -> Option<u64> {
1907 self.epoch.as_ref().map(|field| *field)
1908 }
1909 pub fn set_epoch(&mut self, field: u64) {
1911 self.epoch = Some(field);
1912 }
1913 pub fn with_epoch(mut self, field: u64) -> Self {
1915 self.set_epoch(field);
1916 self
1917 }
1918 pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
1920 self.sequence_number.as_mut().map(|field| field as _)
1921 }
1922 pub fn sequence_number_mut(&mut self) -> &mut u64 {
1925 self.sequence_number.get_or_insert_default()
1926 }
1927 pub fn sequence_number_opt(&self) -> Option<u64> {
1929 self.sequence_number.as_ref().map(|field| *field)
1930 }
1931 pub fn set_sequence_number(&mut self, field: u64) {
1933 self.sequence_number = Some(field);
1934 }
1935 pub fn with_sequence_number(mut self, field: u64) -> Self {
1937 self.set_sequence_number(field);
1938 self
1939 }
1940 pub fn total_network_transactions_opt_mut(&mut self) -> Option<&mut u64> {
1942 self.total_network_transactions.as_mut().map(|field| field as _)
1943 }
1944 pub fn total_network_transactions_mut(&mut self) -> &mut u64 {
1947 self.total_network_transactions.get_or_insert_default()
1948 }
1949 pub fn total_network_transactions_opt(&self) -> Option<u64> {
1951 self.total_network_transactions.as_ref().map(|field| *field)
1952 }
1953 pub fn set_total_network_transactions(&mut self, field: u64) {
1955 self.total_network_transactions = Some(field);
1956 }
1957 pub fn with_total_network_transactions(mut self, field: u64) -> Self {
1959 self.set_total_network_transactions(field);
1960 self
1961 }
1962 pub fn content_digest_opt_mut(&mut self) -> Option<&mut String> {
1964 self.content_digest.as_mut().map(|field| field as _)
1965 }
1966 pub fn content_digest_mut(&mut self) -> &mut String {
1969 self.content_digest.get_or_insert_default()
1970 }
1971 pub fn content_digest_opt(&self) -> Option<&str> {
1973 self.content_digest.as_ref().map(|field| field as _)
1974 }
1975 pub fn set_content_digest<T: Into<String>>(&mut self, field: T) {
1977 self.content_digest = Some(field.into().into());
1978 }
1979 pub fn with_content_digest<T: Into<String>>(mut self, field: T) -> Self {
1981 self.set_content_digest(field.into());
1982 self
1983 }
1984 pub fn previous_digest_opt_mut(&mut self) -> Option<&mut String> {
1986 self.previous_digest.as_mut().map(|field| field as _)
1987 }
1988 pub fn previous_digest_mut(&mut self) -> &mut String {
1991 self.previous_digest.get_or_insert_default()
1992 }
1993 pub fn previous_digest_opt(&self) -> Option<&str> {
1995 self.previous_digest.as_ref().map(|field| field as _)
1996 }
1997 pub fn set_previous_digest<T: Into<String>>(&mut self, field: T) {
1999 self.previous_digest = Some(field.into().into());
2000 }
2001 pub fn with_previous_digest<T: Into<String>>(mut self, field: T) -> Self {
2003 self.set_previous_digest(field.into());
2004 self
2005 }
2006 pub fn epoch_rolling_gas_cost_summary(&self) -> &super::GasCostSummary {
2008 self.epoch_rolling_gas_cost_summary
2009 .as_ref()
2010 .map(|field| field as _)
2011 .unwrap_or_else(|| super::GasCostSummary::default_instance() as _)
2012 }
2013 pub fn epoch_rolling_gas_cost_summary_opt_mut(
2015 &mut self,
2016 ) -> Option<&mut super::GasCostSummary> {
2017 self.epoch_rolling_gas_cost_summary.as_mut().map(|field| field as _)
2018 }
2019 pub fn epoch_rolling_gas_cost_summary_mut(
2022 &mut self,
2023 ) -> &mut super::GasCostSummary {
2024 self.epoch_rolling_gas_cost_summary.get_or_insert_default()
2025 }
2026 pub fn epoch_rolling_gas_cost_summary_opt(
2028 &self,
2029 ) -> Option<&super::GasCostSummary> {
2030 self.epoch_rolling_gas_cost_summary.as_ref().map(|field| field as _)
2031 }
2032 pub fn set_epoch_rolling_gas_cost_summary<T: Into<super::GasCostSummary>>(
2034 &mut self,
2035 field: T,
2036 ) {
2037 self.epoch_rolling_gas_cost_summary = Some(field.into().into());
2038 }
2039 pub fn with_epoch_rolling_gas_cost_summary<T: Into<super::GasCostSummary>>(
2041 mut self,
2042 field: T,
2043 ) -> Self {
2044 self.set_epoch_rolling_gas_cost_summary(field.into());
2045 self
2046 }
2047 pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
2049 self.timestamp.as_mut().map(|field| field as _)
2050 }
2051 pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
2054 self.timestamp.get_or_insert_default()
2055 }
2056 pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
2058 self.timestamp.as_ref().map(|field| field as _)
2059 }
2060 pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
2062 self.timestamp = Some(field.into().into());
2063 }
2064 pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
2066 mut self,
2067 field: T,
2068 ) -> Self {
2069 self.set_timestamp(field.into());
2070 self
2071 }
2072 pub fn commitments(&self) -> &[super::CheckpointCommitment] {
2074 &self.commitments
2075 }
2076 pub fn commitments_mut(&mut self) -> &mut Vec<super::CheckpointCommitment> {
2079 &mut self.commitments
2080 }
2081 pub fn set_commitments(&mut self, field: Vec<super::CheckpointCommitment>) {
2083 self.commitments = field;
2084 }
2085 pub fn with_commitments(
2087 mut self,
2088 field: Vec<super::CheckpointCommitment>,
2089 ) -> Self {
2090 self.set_commitments(field);
2091 self
2092 }
2093 pub fn end_of_epoch_data(&self) -> &super::EndOfEpochData {
2095 self.end_of_epoch_data
2096 .as_ref()
2097 .map(|field| field as _)
2098 .unwrap_or_else(|| super::EndOfEpochData::default_instance() as _)
2099 }
2100 pub fn end_of_epoch_data_opt_mut(
2102 &mut self,
2103 ) -> Option<&mut super::EndOfEpochData> {
2104 self.end_of_epoch_data.as_mut().map(|field| field as _)
2105 }
2106 pub fn end_of_epoch_data_mut(&mut self) -> &mut super::EndOfEpochData {
2109 self.end_of_epoch_data.get_or_insert_default()
2110 }
2111 pub fn end_of_epoch_data_opt(&self) -> Option<&super::EndOfEpochData> {
2113 self.end_of_epoch_data.as_ref().map(|field| field as _)
2114 }
2115 pub fn set_end_of_epoch_data<T: Into<super::EndOfEpochData>>(
2117 &mut self,
2118 field: T,
2119 ) {
2120 self.end_of_epoch_data = Some(field.into().into());
2121 }
2122 pub fn with_end_of_epoch_data<T: Into<super::EndOfEpochData>>(
2124 mut self,
2125 field: T,
2126 ) -> Self {
2127 self.set_end_of_epoch_data(field.into());
2128 self
2129 }
2130 pub fn version_specific_data_opt(&self) -> Option<&[u8]> {
2132 self.version_specific_data.as_ref().map(|field| field as _)
2133 }
2134 pub fn set_version_specific_data<T: Into<::prost::bytes::Bytes>>(
2136 &mut self,
2137 field: T,
2138 ) {
2139 self.version_specific_data = Some(field.into().into());
2140 }
2141 pub fn with_version_specific_data<T: Into<::prost::bytes::Bytes>>(
2143 mut self,
2144 field: T,
2145 ) -> Self {
2146 self.set_version_specific_data(field.into());
2147 self
2148 }
2149 }
2150 impl super::CheckpointedTransactionInfo {
2151 pub const fn const_default() -> Self {
2152 Self {
2153 transaction: None,
2154 effects: None,
2155 signatures: Vec::new(),
2156 address_aliases_versions: Vec::new(),
2157 }
2158 }
2159 #[doc(hidden)]
2160 pub fn default_instance() -> &'static Self {
2161 static DEFAULT: super::CheckpointedTransactionInfo = super::CheckpointedTransactionInfo::const_default();
2162 &DEFAULT
2163 }
2164 pub fn transaction_opt_mut(&mut self) -> Option<&mut String> {
2166 self.transaction.as_mut().map(|field| field as _)
2167 }
2168 pub fn transaction_mut(&mut self) -> &mut String {
2171 self.transaction.get_or_insert_default()
2172 }
2173 pub fn transaction_opt(&self) -> Option<&str> {
2175 self.transaction.as_ref().map(|field| field as _)
2176 }
2177 pub fn set_transaction<T: Into<String>>(&mut self, field: T) {
2179 self.transaction = Some(field.into().into());
2180 }
2181 pub fn with_transaction<T: Into<String>>(mut self, field: T) -> Self {
2183 self.set_transaction(field.into());
2184 self
2185 }
2186 pub fn effects_opt_mut(&mut self) -> Option<&mut String> {
2188 self.effects.as_mut().map(|field| field as _)
2189 }
2190 pub fn effects_mut(&mut self) -> &mut String {
2193 self.effects.get_or_insert_default()
2194 }
2195 pub fn effects_opt(&self) -> Option<&str> {
2197 self.effects.as_ref().map(|field| field as _)
2198 }
2199 pub fn set_effects<T: Into<String>>(&mut self, field: T) {
2201 self.effects = Some(field.into().into());
2202 }
2203 pub fn with_effects<T: Into<String>>(mut self, field: T) -> Self {
2205 self.set_effects(field.into());
2206 self
2207 }
2208 pub fn signatures(&self) -> &[super::UserSignature] {
2210 &self.signatures
2211 }
2212 pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
2215 &mut self.signatures
2216 }
2217 pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
2219 self.signatures = field;
2220 }
2221 pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
2223 self.set_signatures(field);
2224 self
2225 }
2226 pub fn address_aliases_versions(&self) -> &[super::AddressAliasesVersion] {
2228 &self.address_aliases_versions
2229 }
2230 pub fn address_aliases_versions_mut(
2233 &mut self,
2234 ) -> &mut Vec<super::AddressAliasesVersion> {
2235 &mut self.address_aliases_versions
2236 }
2237 pub fn set_address_aliases_versions(
2239 &mut self,
2240 field: Vec<super::AddressAliasesVersion>,
2241 ) {
2242 self.address_aliases_versions = field;
2243 }
2244 pub fn with_address_aliases_versions(
2246 mut self,
2247 field: Vec<super::AddressAliasesVersion>,
2248 ) -> Self {
2249 self.set_address_aliases_versions(field);
2250 self
2251 }
2252 }
2253 impl super::CircomG1 {
2254 pub const fn const_default() -> Self {
2255 Self {
2256 e0: None,
2257 e1: None,
2258 e2: None,
2259 }
2260 }
2261 #[doc(hidden)]
2262 pub fn default_instance() -> &'static Self {
2263 static DEFAULT: super::CircomG1 = super::CircomG1::const_default();
2264 &DEFAULT
2265 }
2266 pub fn e0_opt_mut(&mut self) -> Option<&mut String> {
2268 self.e0.as_mut().map(|field| field as _)
2269 }
2270 pub fn e0_mut(&mut self) -> &mut String {
2273 self.e0.get_or_insert_default()
2274 }
2275 pub fn e0_opt(&self) -> Option<&str> {
2277 self.e0.as_ref().map(|field| field as _)
2278 }
2279 pub fn set_e0<T: Into<String>>(&mut self, field: T) {
2281 self.e0 = Some(field.into().into());
2282 }
2283 pub fn with_e0<T: Into<String>>(mut self, field: T) -> Self {
2285 self.set_e0(field.into());
2286 self
2287 }
2288 pub fn e1_opt_mut(&mut self) -> Option<&mut String> {
2290 self.e1.as_mut().map(|field| field as _)
2291 }
2292 pub fn e1_mut(&mut self) -> &mut String {
2295 self.e1.get_or_insert_default()
2296 }
2297 pub fn e1_opt(&self) -> Option<&str> {
2299 self.e1.as_ref().map(|field| field as _)
2300 }
2301 pub fn set_e1<T: Into<String>>(&mut self, field: T) {
2303 self.e1 = Some(field.into().into());
2304 }
2305 pub fn with_e1<T: Into<String>>(mut self, field: T) -> Self {
2307 self.set_e1(field.into());
2308 self
2309 }
2310 pub fn e2_opt_mut(&mut self) -> Option<&mut String> {
2312 self.e2.as_mut().map(|field| field as _)
2313 }
2314 pub fn e2_mut(&mut self) -> &mut String {
2317 self.e2.get_or_insert_default()
2318 }
2319 pub fn e2_opt(&self) -> Option<&str> {
2321 self.e2.as_ref().map(|field| field as _)
2322 }
2323 pub fn set_e2<T: Into<String>>(&mut self, field: T) {
2325 self.e2 = Some(field.into().into());
2326 }
2327 pub fn with_e2<T: Into<String>>(mut self, field: T) -> Self {
2329 self.set_e2(field.into());
2330 self
2331 }
2332 }
2333 impl super::CircomG2 {
2334 pub const fn const_default() -> Self {
2335 Self {
2336 e00: None,
2337 e01: None,
2338 e10: None,
2339 e11: None,
2340 e20: None,
2341 e21: None,
2342 }
2343 }
2344 #[doc(hidden)]
2345 pub fn default_instance() -> &'static Self {
2346 static DEFAULT: super::CircomG2 = super::CircomG2::const_default();
2347 &DEFAULT
2348 }
2349 pub fn e00_opt_mut(&mut self) -> Option<&mut String> {
2351 self.e00.as_mut().map(|field| field as _)
2352 }
2353 pub fn e00_mut(&mut self) -> &mut String {
2356 self.e00.get_or_insert_default()
2357 }
2358 pub fn e00_opt(&self) -> Option<&str> {
2360 self.e00.as_ref().map(|field| field as _)
2361 }
2362 pub fn set_e00<T: Into<String>>(&mut self, field: T) {
2364 self.e00 = Some(field.into().into());
2365 }
2366 pub fn with_e00<T: Into<String>>(mut self, field: T) -> Self {
2368 self.set_e00(field.into());
2369 self
2370 }
2371 pub fn e01_opt_mut(&mut self) -> Option<&mut String> {
2373 self.e01.as_mut().map(|field| field as _)
2374 }
2375 pub fn e01_mut(&mut self) -> &mut String {
2378 self.e01.get_or_insert_default()
2379 }
2380 pub fn e01_opt(&self) -> Option<&str> {
2382 self.e01.as_ref().map(|field| field as _)
2383 }
2384 pub fn set_e01<T: Into<String>>(&mut self, field: T) {
2386 self.e01 = Some(field.into().into());
2387 }
2388 pub fn with_e01<T: Into<String>>(mut self, field: T) -> Self {
2390 self.set_e01(field.into());
2391 self
2392 }
2393 pub fn e10_opt_mut(&mut self) -> Option<&mut String> {
2395 self.e10.as_mut().map(|field| field as _)
2396 }
2397 pub fn e10_mut(&mut self) -> &mut String {
2400 self.e10.get_or_insert_default()
2401 }
2402 pub fn e10_opt(&self) -> Option<&str> {
2404 self.e10.as_ref().map(|field| field as _)
2405 }
2406 pub fn set_e10<T: Into<String>>(&mut self, field: T) {
2408 self.e10 = Some(field.into().into());
2409 }
2410 pub fn with_e10<T: Into<String>>(mut self, field: T) -> Self {
2412 self.set_e10(field.into());
2413 self
2414 }
2415 pub fn e11_opt_mut(&mut self) -> Option<&mut String> {
2417 self.e11.as_mut().map(|field| field as _)
2418 }
2419 pub fn e11_mut(&mut self) -> &mut String {
2422 self.e11.get_or_insert_default()
2423 }
2424 pub fn e11_opt(&self) -> Option<&str> {
2426 self.e11.as_ref().map(|field| field as _)
2427 }
2428 pub fn set_e11<T: Into<String>>(&mut self, field: T) {
2430 self.e11 = Some(field.into().into());
2431 }
2432 pub fn with_e11<T: Into<String>>(mut self, field: T) -> Self {
2434 self.set_e11(field.into());
2435 self
2436 }
2437 pub fn e20_opt_mut(&mut self) -> Option<&mut String> {
2439 self.e20.as_mut().map(|field| field as _)
2440 }
2441 pub fn e20_mut(&mut self) -> &mut String {
2444 self.e20.get_or_insert_default()
2445 }
2446 pub fn e20_opt(&self) -> Option<&str> {
2448 self.e20.as_ref().map(|field| field as _)
2449 }
2450 pub fn set_e20<T: Into<String>>(&mut self, field: T) {
2452 self.e20 = Some(field.into().into());
2453 }
2454 pub fn with_e20<T: Into<String>>(mut self, field: T) -> Self {
2456 self.set_e20(field.into());
2457 self
2458 }
2459 pub fn e21_opt_mut(&mut self) -> Option<&mut String> {
2461 self.e21.as_mut().map(|field| field as _)
2462 }
2463 pub fn e21_mut(&mut self) -> &mut String {
2466 self.e21.get_or_insert_default()
2467 }
2468 pub fn e21_opt(&self) -> Option<&str> {
2470 self.e21.as_ref().map(|field| field as _)
2471 }
2472 pub fn set_e21<T: Into<String>>(&mut self, field: T) {
2474 self.e21 = Some(field.into().into());
2475 }
2476 pub fn with_e21<T: Into<String>>(mut self, field: T) -> Self {
2478 self.set_e21(field.into());
2479 self
2480 }
2481 }
2482 impl super::CleverError {
2483 pub const fn const_default() -> Self {
2484 Self {
2485 error_code: None,
2486 line_number: None,
2487 constant_name: None,
2488 constant_type: None,
2489 value: None,
2490 }
2491 }
2492 #[doc(hidden)]
2493 pub fn default_instance() -> &'static Self {
2494 static DEFAULT: super::CleverError = super::CleverError::const_default();
2495 &DEFAULT
2496 }
2497 pub fn error_code_opt_mut(&mut self) -> Option<&mut u64> {
2499 self.error_code.as_mut().map(|field| field as _)
2500 }
2501 pub fn error_code_mut(&mut self) -> &mut u64 {
2504 self.error_code.get_or_insert_default()
2505 }
2506 pub fn error_code_opt(&self) -> Option<u64> {
2508 self.error_code.as_ref().map(|field| *field)
2509 }
2510 pub fn set_error_code(&mut self, field: u64) {
2512 self.error_code = Some(field);
2513 }
2514 pub fn with_error_code(mut self, field: u64) -> Self {
2516 self.set_error_code(field);
2517 self
2518 }
2519 pub fn line_number_opt_mut(&mut self) -> Option<&mut u64> {
2521 self.line_number.as_mut().map(|field| field as _)
2522 }
2523 pub fn line_number_mut(&mut self) -> &mut u64 {
2526 self.line_number.get_or_insert_default()
2527 }
2528 pub fn line_number_opt(&self) -> Option<u64> {
2530 self.line_number.as_ref().map(|field| *field)
2531 }
2532 pub fn set_line_number(&mut self, field: u64) {
2534 self.line_number = Some(field);
2535 }
2536 pub fn with_line_number(mut self, field: u64) -> Self {
2538 self.set_line_number(field);
2539 self
2540 }
2541 pub fn constant_name_opt_mut(&mut self) -> Option<&mut String> {
2543 self.constant_name.as_mut().map(|field| field as _)
2544 }
2545 pub fn constant_name_mut(&mut self) -> &mut String {
2548 self.constant_name.get_or_insert_default()
2549 }
2550 pub fn constant_name_opt(&self) -> Option<&str> {
2552 self.constant_name.as_ref().map(|field| field as _)
2553 }
2554 pub fn set_constant_name<T: Into<String>>(&mut self, field: T) {
2556 self.constant_name = Some(field.into().into());
2557 }
2558 pub fn with_constant_name<T: Into<String>>(mut self, field: T) -> Self {
2560 self.set_constant_name(field.into());
2561 self
2562 }
2563 pub fn constant_type_opt_mut(&mut self) -> Option<&mut String> {
2565 self.constant_type.as_mut().map(|field| field as _)
2566 }
2567 pub fn constant_type_mut(&mut self) -> &mut String {
2570 self.constant_type.get_or_insert_default()
2571 }
2572 pub fn constant_type_opt(&self) -> Option<&str> {
2574 self.constant_type.as_ref().map(|field| field as _)
2575 }
2576 pub fn set_constant_type<T: Into<String>>(&mut self, field: T) {
2578 self.constant_type = Some(field.into().into());
2579 }
2580 pub fn with_constant_type<T: Into<String>>(mut self, field: T) -> Self {
2582 self.set_constant_type(field.into());
2583 self
2584 }
2585 pub fn rendered(&self) -> &str {
2587 if let Some(super::clever_error::Value::Rendered(field)) = &self.value {
2588 field as _
2589 } else {
2590 ""
2591 }
2592 }
2593 pub fn rendered_opt(&self) -> Option<&str> {
2595 if let Some(super::clever_error::Value::Rendered(field)) = &self.value {
2596 Some(field as _)
2597 } else {
2598 None
2599 }
2600 }
2601 pub fn rendered_opt_mut(&mut self) -> Option<&mut String> {
2603 if let Some(super::clever_error::Value::Rendered(field)) = &mut self.value {
2604 Some(field as _)
2605 } else {
2606 None
2607 }
2608 }
2609 pub fn rendered_mut(&mut self) -> &mut String {
2613 if self.rendered_opt_mut().is_none() {
2614 self.value = Some(
2615 super::clever_error::Value::Rendered(String::default()),
2616 );
2617 }
2618 self.rendered_opt_mut().unwrap()
2619 }
2620 pub fn set_rendered<T: Into<String>>(&mut self, field: T) {
2623 self.value = Some(super::clever_error::Value::Rendered(field.into().into()));
2624 }
2625 pub fn with_rendered<T: Into<String>>(mut self, field: T) -> Self {
2628 self.set_rendered(field.into());
2629 self
2630 }
2631 pub fn raw(&self) -> &[u8] {
2633 if let Some(super::clever_error::Value::Raw(field)) = &self.value {
2634 field as _
2635 } else {
2636 &[]
2637 }
2638 }
2639 pub fn raw_opt(&self) -> Option<&[u8]> {
2641 if let Some(super::clever_error::Value::Raw(field)) = &self.value {
2642 Some(field as _)
2643 } else {
2644 None
2645 }
2646 }
2647 pub fn raw_opt_mut(&mut self) -> Option<&mut ::prost::bytes::Bytes> {
2649 if let Some(super::clever_error::Value::Raw(field)) = &mut self.value {
2650 Some(field as _)
2651 } else {
2652 None
2653 }
2654 }
2655 pub fn raw_mut(&mut self) -> &mut ::prost::bytes::Bytes {
2659 if self.raw_opt_mut().is_none() {
2660 self.value = Some(
2661 super::clever_error::Value::Raw(::prost::bytes::Bytes::default()),
2662 );
2663 }
2664 self.raw_opt_mut().unwrap()
2665 }
2666 pub fn set_raw<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
2669 self.value = Some(super::clever_error::Value::Raw(field.into().into()));
2670 }
2671 pub fn with_raw<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
2674 self.set_raw(field.into());
2675 self
2676 }
2677 }
2678 impl super::CoinDenyListError {
2679 pub const fn const_default() -> Self {
2680 Self {
2681 address: None,
2682 coin_type: None,
2683 }
2684 }
2685 #[doc(hidden)]
2686 pub fn default_instance() -> &'static Self {
2687 static DEFAULT: super::CoinDenyListError = super::CoinDenyListError::const_default();
2688 &DEFAULT
2689 }
2690 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
2692 self.address.as_mut().map(|field| field as _)
2693 }
2694 pub fn address_mut(&mut self) -> &mut String {
2697 self.address.get_or_insert_default()
2698 }
2699 pub fn address_opt(&self) -> Option<&str> {
2701 self.address.as_ref().map(|field| field as _)
2702 }
2703 pub fn set_address<T: Into<String>>(&mut self, field: T) {
2705 self.address = Some(field.into().into());
2706 }
2707 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
2709 self.set_address(field.into());
2710 self
2711 }
2712 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
2714 self.coin_type.as_mut().map(|field| field as _)
2715 }
2716 pub fn coin_type_mut(&mut self) -> &mut String {
2719 self.coin_type.get_or_insert_default()
2720 }
2721 pub fn coin_type_opt(&self) -> Option<&str> {
2723 self.coin_type.as_ref().map(|field| field as _)
2724 }
2725 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
2727 self.coin_type = Some(field.into().into());
2728 }
2729 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
2731 self.set_coin_type(field.into());
2732 self
2733 }
2734 }
2735 impl super::CoinMetadata {
2736 pub const fn const_default() -> Self {
2737 Self {
2738 id: None,
2739 decimals: None,
2740 name: None,
2741 symbol: None,
2742 description: None,
2743 icon_url: None,
2744 metadata_cap_id: None,
2745 metadata_cap_state: None,
2746 }
2747 }
2748 #[doc(hidden)]
2749 pub fn default_instance() -> &'static Self {
2750 static DEFAULT: super::CoinMetadata = super::CoinMetadata::const_default();
2751 &DEFAULT
2752 }
2753 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
2755 self.id.as_mut().map(|field| field as _)
2756 }
2757 pub fn id_mut(&mut self) -> &mut String {
2760 self.id.get_or_insert_default()
2761 }
2762 pub fn id_opt(&self) -> Option<&str> {
2764 self.id.as_ref().map(|field| field as _)
2765 }
2766 pub fn set_id<T: Into<String>>(&mut self, field: T) {
2768 self.id = Some(field.into().into());
2769 }
2770 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
2772 self.set_id(field.into());
2773 self
2774 }
2775 pub fn decimals_opt_mut(&mut self) -> Option<&mut u32> {
2777 self.decimals.as_mut().map(|field| field as _)
2778 }
2779 pub fn decimals_mut(&mut self) -> &mut u32 {
2782 self.decimals.get_or_insert_default()
2783 }
2784 pub fn decimals_opt(&self) -> Option<u32> {
2786 self.decimals.as_ref().map(|field| *field)
2787 }
2788 pub fn set_decimals(&mut self, field: u32) {
2790 self.decimals = Some(field);
2791 }
2792 pub fn with_decimals(mut self, field: u32) -> Self {
2794 self.set_decimals(field);
2795 self
2796 }
2797 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
2799 self.name.as_mut().map(|field| field as _)
2800 }
2801 pub fn name_mut(&mut self) -> &mut String {
2804 self.name.get_or_insert_default()
2805 }
2806 pub fn name_opt(&self) -> Option<&str> {
2808 self.name.as_ref().map(|field| field as _)
2809 }
2810 pub fn set_name<T: Into<String>>(&mut self, field: T) {
2812 self.name = Some(field.into().into());
2813 }
2814 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
2816 self.set_name(field.into());
2817 self
2818 }
2819 pub fn symbol_opt_mut(&mut self) -> Option<&mut String> {
2821 self.symbol.as_mut().map(|field| field as _)
2822 }
2823 pub fn symbol_mut(&mut self) -> &mut String {
2826 self.symbol.get_or_insert_default()
2827 }
2828 pub fn symbol_opt(&self) -> Option<&str> {
2830 self.symbol.as_ref().map(|field| field as _)
2831 }
2832 pub fn set_symbol<T: Into<String>>(&mut self, field: T) {
2834 self.symbol = Some(field.into().into());
2835 }
2836 pub fn with_symbol<T: Into<String>>(mut self, field: T) -> Self {
2838 self.set_symbol(field.into());
2839 self
2840 }
2841 pub fn description_opt_mut(&mut self) -> Option<&mut String> {
2843 self.description.as_mut().map(|field| field as _)
2844 }
2845 pub fn description_mut(&mut self) -> &mut String {
2848 self.description.get_or_insert_default()
2849 }
2850 pub fn description_opt(&self) -> Option<&str> {
2852 self.description.as_ref().map(|field| field as _)
2853 }
2854 pub fn set_description<T: Into<String>>(&mut self, field: T) {
2856 self.description = Some(field.into().into());
2857 }
2858 pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
2860 self.set_description(field.into());
2861 self
2862 }
2863 pub fn icon_url_opt_mut(&mut self) -> Option<&mut String> {
2865 self.icon_url.as_mut().map(|field| field as _)
2866 }
2867 pub fn icon_url_mut(&mut self) -> &mut String {
2870 self.icon_url.get_or_insert_default()
2871 }
2872 pub fn icon_url_opt(&self) -> Option<&str> {
2874 self.icon_url.as_ref().map(|field| field as _)
2875 }
2876 pub fn set_icon_url<T: Into<String>>(&mut self, field: T) {
2878 self.icon_url = Some(field.into().into());
2879 }
2880 pub fn with_icon_url<T: Into<String>>(mut self, field: T) -> Self {
2882 self.set_icon_url(field.into());
2883 self
2884 }
2885 pub fn metadata_cap_id_opt_mut(&mut self) -> Option<&mut String> {
2887 self.metadata_cap_id.as_mut().map(|field| field as _)
2888 }
2889 pub fn metadata_cap_id_mut(&mut self) -> &mut String {
2892 self.metadata_cap_id.get_or_insert_default()
2893 }
2894 pub fn metadata_cap_id_opt(&self) -> Option<&str> {
2896 self.metadata_cap_id.as_ref().map(|field| field as _)
2897 }
2898 pub fn set_metadata_cap_id<T: Into<String>>(&mut self, field: T) {
2900 self.metadata_cap_id = Some(field.into().into());
2901 }
2902 pub fn with_metadata_cap_id<T: Into<String>>(mut self, field: T) -> Self {
2904 self.set_metadata_cap_id(field.into());
2905 self
2906 }
2907 pub fn with_metadata_cap_state<T: Into<super::coin_metadata::MetadataCapState>>(
2909 mut self,
2910 field: T,
2911 ) -> Self {
2912 self.set_metadata_cap_state(field.into());
2913 self
2914 }
2915 }
2916 impl super::CoinTreasury {
2917 pub const fn const_default() -> Self {
2918 Self {
2919 id: None,
2920 total_supply: None,
2921 supply_state: None,
2922 }
2923 }
2924 #[doc(hidden)]
2925 pub fn default_instance() -> &'static Self {
2926 static DEFAULT: super::CoinTreasury = super::CoinTreasury::const_default();
2927 &DEFAULT
2928 }
2929 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
2931 self.id.as_mut().map(|field| field as _)
2932 }
2933 pub fn id_mut(&mut self) -> &mut String {
2936 self.id.get_or_insert_default()
2937 }
2938 pub fn id_opt(&self) -> Option<&str> {
2940 self.id.as_ref().map(|field| field as _)
2941 }
2942 pub fn set_id<T: Into<String>>(&mut self, field: T) {
2944 self.id = Some(field.into().into());
2945 }
2946 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
2948 self.set_id(field.into());
2949 self
2950 }
2951 pub fn total_supply_opt_mut(&mut self) -> Option<&mut u64> {
2953 self.total_supply.as_mut().map(|field| field as _)
2954 }
2955 pub fn total_supply_mut(&mut self) -> &mut u64 {
2958 self.total_supply.get_or_insert_default()
2959 }
2960 pub fn total_supply_opt(&self) -> Option<u64> {
2962 self.total_supply.as_ref().map(|field| *field)
2963 }
2964 pub fn set_total_supply(&mut self, field: u64) {
2966 self.total_supply = Some(field);
2967 }
2968 pub fn with_total_supply(mut self, field: u64) -> Self {
2970 self.set_total_supply(field);
2971 self
2972 }
2973 pub fn with_supply_state<T: Into<super::coin_treasury::SupplyState>>(
2975 mut self,
2976 field: T,
2977 ) -> Self {
2978 self.set_supply_state(field.into());
2979 self
2980 }
2981 }
2982 impl super::Command {
2983 pub const fn const_default() -> Self {
2984 Self { command: None }
2985 }
2986 #[doc(hidden)]
2987 pub fn default_instance() -> &'static Self {
2988 static DEFAULT: super::Command = super::Command::const_default();
2989 &DEFAULT
2990 }
2991 pub fn move_call(&self) -> &super::MoveCall {
2993 if let Some(super::command::Command::MoveCall(field)) = &self.command {
2994 field as _
2995 } else {
2996 super::MoveCall::default_instance() as _
2997 }
2998 }
2999 pub fn move_call_opt(&self) -> Option<&super::MoveCall> {
3001 if let Some(super::command::Command::MoveCall(field)) = &self.command {
3002 Some(field as _)
3003 } else {
3004 None
3005 }
3006 }
3007 pub fn move_call_opt_mut(&mut self) -> Option<&mut super::MoveCall> {
3009 if let Some(super::command::Command::MoveCall(field)) = &mut self.command {
3010 Some(field as _)
3011 } else {
3012 None
3013 }
3014 }
3015 pub fn move_call_mut(&mut self) -> &mut super::MoveCall {
3019 if self.move_call_opt_mut().is_none() {
3020 self.command = Some(
3021 super::command::Command::MoveCall(super::MoveCall::default()),
3022 );
3023 }
3024 self.move_call_opt_mut().unwrap()
3025 }
3026 pub fn set_move_call<T: Into<super::MoveCall>>(&mut self, field: T) {
3029 self.command = Some(super::command::Command::MoveCall(field.into().into()));
3030 }
3031 pub fn with_move_call<T: Into<super::MoveCall>>(mut self, field: T) -> Self {
3034 self.set_move_call(field.into());
3035 self
3036 }
3037 pub fn transfer_objects(&self) -> &super::TransferObjects {
3039 if let Some(super::command::Command::TransferObjects(field)) = &self.command
3040 {
3041 field as _
3042 } else {
3043 super::TransferObjects::default_instance() as _
3044 }
3045 }
3046 pub fn transfer_objects_opt(&self) -> Option<&super::TransferObjects> {
3048 if let Some(super::command::Command::TransferObjects(field)) = &self.command
3049 {
3050 Some(field as _)
3051 } else {
3052 None
3053 }
3054 }
3055 pub fn transfer_objects_opt_mut(
3057 &mut self,
3058 ) -> Option<&mut super::TransferObjects> {
3059 if let Some(super::command::Command::TransferObjects(field)) = &mut self
3060 .command
3061 {
3062 Some(field as _)
3063 } else {
3064 None
3065 }
3066 }
3067 pub fn transfer_objects_mut(&mut self) -> &mut super::TransferObjects {
3071 if self.transfer_objects_opt_mut().is_none() {
3072 self.command = Some(
3073 super::command::Command::TransferObjects(
3074 super::TransferObjects::default(),
3075 ),
3076 );
3077 }
3078 self.transfer_objects_opt_mut().unwrap()
3079 }
3080 pub fn set_transfer_objects<T: Into<super::TransferObjects>>(
3083 &mut self,
3084 field: T,
3085 ) {
3086 self.command = Some(
3087 super::command::Command::TransferObjects(field.into().into()),
3088 );
3089 }
3090 pub fn with_transfer_objects<T: Into<super::TransferObjects>>(
3093 mut self,
3094 field: T,
3095 ) -> Self {
3096 self.set_transfer_objects(field.into());
3097 self
3098 }
3099 pub fn split_coins(&self) -> &super::SplitCoins {
3101 if let Some(super::command::Command::SplitCoins(field)) = &self.command {
3102 field as _
3103 } else {
3104 super::SplitCoins::default_instance() as _
3105 }
3106 }
3107 pub fn split_coins_opt(&self) -> Option<&super::SplitCoins> {
3109 if let Some(super::command::Command::SplitCoins(field)) = &self.command {
3110 Some(field as _)
3111 } else {
3112 None
3113 }
3114 }
3115 pub fn split_coins_opt_mut(&mut self) -> Option<&mut super::SplitCoins> {
3117 if let Some(super::command::Command::SplitCoins(field)) = &mut self.command {
3118 Some(field as _)
3119 } else {
3120 None
3121 }
3122 }
3123 pub fn split_coins_mut(&mut self) -> &mut super::SplitCoins {
3127 if self.split_coins_opt_mut().is_none() {
3128 self.command = Some(
3129 super::command::Command::SplitCoins(super::SplitCoins::default()),
3130 );
3131 }
3132 self.split_coins_opt_mut().unwrap()
3133 }
3134 pub fn set_split_coins<T: Into<super::SplitCoins>>(&mut self, field: T) {
3137 self.command = Some(
3138 super::command::Command::SplitCoins(field.into().into()),
3139 );
3140 }
3141 pub fn with_split_coins<T: Into<super::SplitCoins>>(mut self, field: T) -> Self {
3144 self.set_split_coins(field.into());
3145 self
3146 }
3147 pub fn merge_coins(&self) -> &super::MergeCoins {
3149 if let Some(super::command::Command::MergeCoins(field)) = &self.command {
3150 field as _
3151 } else {
3152 super::MergeCoins::default_instance() as _
3153 }
3154 }
3155 pub fn merge_coins_opt(&self) -> Option<&super::MergeCoins> {
3157 if let Some(super::command::Command::MergeCoins(field)) = &self.command {
3158 Some(field as _)
3159 } else {
3160 None
3161 }
3162 }
3163 pub fn merge_coins_opt_mut(&mut self) -> Option<&mut super::MergeCoins> {
3165 if let Some(super::command::Command::MergeCoins(field)) = &mut self.command {
3166 Some(field as _)
3167 } else {
3168 None
3169 }
3170 }
3171 pub fn merge_coins_mut(&mut self) -> &mut super::MergeCoins {
3175 if self.merge_coins_opt_mut().is_none() {
3176 self.command = Some(
3177 super::command::Command::MergeCoins(super::MergeCoins::default()),
3178 );
3179 }
3180 self.merge_coins_opt_mut().unwrap()
3181 }
3182 pub fn set_merge_coins<T: Into<super::MergeCoins>>(&mut self, field: T) {
3185 self.command = Some(
3186 super::command::Command::MergeCoins(field.into().into()),
3187 );
3188 }
3189 pub fn with_merge_coins<T: Into<super::MergeCoins>>(mut self, field: T) -> Self {
3192 self.set_merge_coins(field.into());
3193 self
3194 }
3195 pub fn publish(&self) -> &super::Publish {
3197 if let Some(super::command::Command::Publish(field)) = &self.command {
3198 field as _
3199 } else {
3200 super::Publish::default_instance() as _
3201 }
3202 }
3203 pub fn publish_opt(&self) -> Option<&super::Publish> {
3205 if let Some(super::command::Command::Publish(field)) = &self.command {
3206 Some(field as _)
3207 } else {
3208 None
3209 }
3210 }
3211 pub fn publish_opt_mut(&mut self) -> Option<&mut super::Publish> {
3213 if let Some(super::command::Command::Publish(field)) = &mut self.command {
3214 Some(field as _)
3215 } else {
3216 None
3217 }
3218 }
3219 pub fn publish_mut(&mut self) -> &mut super::Publish {
3223 if self.publish_opt_mut().is_none() {
3224 self.command = Some(
3225 super::command::Command::Publish(super::Publish::default()),
3226 );
3227 }
3228 self.publish_opt_mut().unwrap()
3229 }
3230 pub fn set_publish<T: Into<super::Publish>>(&mut self, field: T) {
3233 self.command = Some(super::command::Command::Publish(field.into().into()));
3234 }
3235 pub fn with_publish<T: Into<super::Publish>>(mut self, field: T) -> Self {
3238 self.set_publish(field.into());
3239 self
3240 }
3241 pub fn make_move_vector(&self) -> &super::MakeMoveVector {
3243 if let Some(super::command::Command::MakeMoveVector(field)) = &self.command {
3244 field as _
3245 } else {
3246 super::MakeMoveVector::default_instance() as _
3247 }
3248 }
3249 pub fn make_move_vector_opt(&self) -> Option<&super::MakeMoveVector> {
3251 if let Some(super::command::Command::MakeMoveVector(field)) = &self.command {
3252 Some(field as _)
3253 } else {
3254 None
3255 }
3256 }
3257 pub fn make_move_vector_opt_mut(
3259 &mut self,
3260 ) -> Option<&mut super::MakeMoveVector> {
3261 if let Some(super::command::Command::MakeMoveVector(field)) = &mut self
3262 .command
3263 {
3264 Some(field as _)
3265 } else {
3266 None
3267 }
3268 }
3269 pub fn make_move_vector_mut(&mut self) -> &mut super::MakeMoveVector {
3273 if self.make_move_vector_opt_mut().is_none() {
3274 self.command = Some(
3275 super::command::Command::MakeMoveVector(
3276 super::MakeMoveVector::default(),
3277 ),
3278 );
3279 }
3280 self.make_move_vector_opt_mut().unwrap()
3281 }
3282 pub fn set_make_move_vector<T: Into<super::MakeMoveVector>>(
3285 &mut self,
3286 field: T,
3287 ) {
3288 self.command = Some(
3289 super::command::Command::MakeMoveVector(field.into().into()),
3290 );
3291 }
3292 pub fn with_make_move_vector<T: Into<super::MakeMoveVector>>(
3295 mut self,
3296 field: T,
3297 ) -> Self {
3298 self.set_make_move_vector(field.into());
3299 self
3300 }
3301 pub fn upgrade(&self) -> &super::Upgrade {
3303 if let Some(super::command::Command::Upgrade(field)) = &self.command {
3304 field as _
3305 } else {
3306 super::Upgrade::default_instance() as _
3307 }
3308 }
3309 pub fn upgrade_opt(&self) -> Option<&super::Upgrade> {
3311 if let Some(super::command::Command::Upgrade(field)) = &self.command {
3312 Some(field as _)
3313 } else {
3314 None
3315 }
3316 }
3317 pub fn upgrade_opt_mut(&mut self) -> Option<&mut super::Upgrade> {
3319 if let Some(super::command::Command::Upgrade(field)) = &mut self.command {
3320 Some(field as _)
3321 } else {
3322 None
3323 }
3324 }
3325 pub fn upgrade_mut(&mut self) -> &mut super::Upgrade {
3329 if self.upgrade_opt_mut().is_none() {
3330 self.command = Some(
3331 super::command::Command::Upgrade(super::Upgrade::default()),
3332 );
3333 }
3334 self.upgrade_opt_mut().unwrap()
3335 }
3336 pub fn set_upgrade<T: Into<super::Upgrade>>(&mut self, field: T) {
3339 self.command = Some(super::command::Command::Upgrade(field.into().into()));
3340 }
3341 pub fn with_upgrade<T: Into<super::Upgrade>>(mut self, field: T) -> Self {
3344 self.set_upgrade(field.into());
3345 self
3346 }
3347 }
3348 impl super::CommandArgumentError {
3349 pub const fn const_default() -> Self {
3350 Self {
3351 argument: None,
3352 kind: None,
3353 index_error: None,
3354 }
3355 }
3356 #[doc(hidden)]
3357 pub fn default_instance() -> &'static Self {
3358 static DEFAULT: super::CommandArgumentError = super::CommandArgumentError::const_default();
3359 &DEFAULT
3360 }
3361 pub fn argument_opt_mut(&mut self) -> Option<&mut u32> {
3363 self.argument.as_mut().map(|field| field as _)
3364 }
3365 pub fn argument_mut(&mut self) -> &mut u32 {
3368 self.argument.get_or_insert_default()
3369 }
3370 pub fn argument_opt(&self) -> Option<u32> {
3372 self.argument.as_ref().map(|field| *field)
3373 }
3374 pub fn set_argument(&mut self, field: u32) {
3376 self.argument = Some(field);
3377 }
3378 pub fn with_argument(mut self, field: u32) -> Self {
3380 self.set_argument(field);
3381 self
3382 }
3383 pub fn with_kind<
3385 T: Into<super::command_argument_error::CommandArgumentErrorKind>,
3386 >(mut self, field: T) -> Self {
3387 self.set_kind(field.into());
3388 self
3389 }
3390 pub fn index_error(&self) -> &super::IndexError {
3392 self.index_error
3393 .as_ref()
3394 .map(|field| field as _)
3395 .unwrap_or_else(|| super::IndexError::default_instance() as _)
3396 }
3397 pub fn index_error_opt_mut(&mut self) -> Option<&mut super::IndexError> {
3399 self.index_error.as_mut().map(|field| field as _)
3400 }
3401 pub fn index_error_mut(&mut self) -> &mut super::IndexError {
3404 self.index_error.get_or_insert_default()
3405 }
3406 pub fn index_error_opt(&self) -> Option<&super::IndexError> {
3408 self.index_error.as_ref().map(|field| field as _)
3409 }
3410 pub fn set_index_error<T: Into<super::IndexError>>(&mut self, field: T) {
3412 self.index_error = Some(field.into().into());
3413 }
3414 pub fn with_index_error<T: Into<super::IndexError>>(mut self, field: T) -> Self {
3416 self.set_index_error(field.into());
3417 self
3418 }
3419 }
3420 impl super::CommandOutput {
3421 pub const fn const_default() -> Self {
3422 Self {
3423 argument: None,
3424 value: None,
3425 json: None,
3426 }
3427 }
3428 #[doc(hidden)]
3429 pub fn default_instance() -> &'static Self {
3430 static DEFAULT: super::CommandOutput = super::CommandOutput::const_default();
3431 &DEFAULT
3432 }
3433 pub fn argument(&self) -> &super::Argument {
3435 self.argument
3436 .as_ref()
3437 .map(|field| field as _)
3438 .unwrap_or_else(|| super::Argument::default_instance() as _)
3439 }
3440 pub fn argument_opt_mut(&mut self) -> Option<&mut super::Argument> {
3442 self.argument.as_mut().map(|field| field as _)
3443 }
3444 pub fn argument_mut(&mut self) -> &mut super::Argument {
3447 self.argument.get_or_insert_default()
3448 }
3449 pub fn argument_opt(&self) -> Option<&super::Argument> {
3451 self.argument.as_ref().map(|field| field as _)
3452 }
3453 pub fn set_argument<T: Into<super::Argument>>(&mut self, field: T) {
3455 self.argument = Some(field.into().into());
3456 }
3457 pub fn with_argument<T: Into<super::Argument>>(mut self, field: T) -> Self {
3459 self.set_argument(field.into());
3460 self
3461 }
3462 pub fn value(&self) -> &super::Bcs {
3464 self.value
3465 .as_ref()
3466 .map(|field| field as _)
3467 .unwrap_or_else(|| super::Bcs::default_instance() as _)
3468 }
3469 pub fn value_opt_mut(&mut self) -> Option<&mut super::Bcs> {
3471 self.value.as_mut().map(|field| field as _)
3472 }
3473 pub fn value_mut(&mut self) -> &mut super::Bcs {
3476 self.value.get_or_insert_default()
3477 }
3478 pub fn value_opt(&self) -> Option<&super::Bcs> {
3480 self.value.as_ref().map(|field| field as _)
3481 }
3482 pub fn set_value<T: Into<super::Bcs>>(&mut self, field: T) {
3484 self.value = Some(field.into().into());
3485 }
3486 pub fn with_value<T: Into<super::Bcs>>(mut self, field: T) -> Self {
3488 self.set_value(field.into());
3489 self
3490 }
3491 pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
3493 self.json.as_mut().map(|field| field as _)
3494 }
3495 pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
3498 self.json.get_or_insert_default()
3499 }
3500 pub fn json_opt(&self) -> Option<&::prost_types::Value> {
3502 self.json.as_ref().map(|field| field as _)
3503 }
3504 pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
3506 self.json = Some(field.into().into());
3507 }
3508 pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
3510 self.set_json(field.into());
3511 self
3512 }
3513 }
3514 impl super::CommandResult {
3515 pub const fn const_default() -> Self {
3516 Self {
3517 return_values: Vec::new(),
3518 mutated_by_ref: Vec::new(),
3519 }
3520 }
3521 #[doc(hidden)]
3522 pub fn default_instance() -> &'static Self {
3523 static DEFAULT: super::CommandResult = super::CommandResult::const_default();
3524 &DEFAULT
3525 }
3526 pub fn return_values(&self) -> &[super::CommandOutput] {
3528 &self.return_values
3529 }
3530 pub fn return_values_mut(&mut self) -> &mut Vec<super::CommandOutput> {
3533 &mut self.return_values
3534 }
3535 pub fn set_return_values(&mut self, field: Vec<super::CommandOutput>) {
3537 self.return_values = field;
3538 }
3539 pub fn with_return_values(mut self, field: Vec<super::CommandOutput>) -> Self {
3541 self.set_return_values(field);
3542 self
3543 }
3544 pub fn mutated_by_ref(&self) -> &[super::CommandOutput] {
3546 &self.mutated_by_ref
3547 }
3548 pub fn mutated_by_ref_mut(&mut self) -> &mut Vec<super::CommandOutput> {
3551 &mut self.mutated_by_ref
3552 }
3553 pub fn set_mutated_by_ref(&mut self, field: Vec<super::CommandOutput>) {
3555 self.mutated_by_ref = field;
3556 }
3557 pub fn with_mutated_by_ref(mut self, field: Vec<super::CommandOutput>) -> Self {
3559 self.set_mutated_by_ref(field);
3560 self
3561 }
3562 }
3563 impl super::CongestedObjects {
3564 pub const fn const_default() -> Self {
3565 Self { objects: Vec::new() }
3566 }
3567 #[doc(hidden)]
3568 pub fn default_instance() -> &'static Self {
3569 static DEFAULT: super::CongestedObjects = super::CongestedObjects::const_default();
3570 &DEFAULT
3571 }
3572 pub fn objects(&self) -> &[String] {
3574 &self.objects
3575 }
3576 pub fn objects_mut(&mut self) -> &mut Vec<String> {
3579 &mut self.objects
3580 }
3581 pub fn set_objects(&mut self, field: Vec<String>) {
3583 self.objects = field;
3584 }
3585 pub fn with_objects(mut self, field: Vec<String>) -> Self {
3587 self.set_objects(field);
3588 self
3589 }
3590 }
3591 impl super::ConsensusCommitPrologue {
3592 pub const fn const_default() -> Self {
3593 Self {
3594 epoch: None,
3595 round: None,
3596 commit_timestamp: None,
3597 consensus_commit_digest: None,
3598 sub_dag_index: None,
3599 consensus_determined_version_assignments: None,
3600 additional_state_digest: None,
3601 }
3602 }
3603 #[doc(hidden)]
3604 pub fn default_instance() -> &'static Self {
3605 static DEFAULT: super::ConsensusCommitPrologue = super::ConsensusCommitPrologue::const_default();
3606 &DEFAULT
3607 }
3608 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
3610 self.epoch.as_mut().map(|field| field as _)
3611 }
3612 pub fn epoch_mut(&mut self) -> &mut u64 {
3615 self.epoch.get_or_insert_default()
3616 }
3617 pub fn epoch_opt(&self) -> Option<u64> {
3619 self.epoch.as_ref().map(|field| *field)
3620 }
3621 pub fn set_epoch(&mut self, field: u64) {
3623 self.epoch = Some(field);
3624 }
3625 pub fn with_epoch(mut self, field: u64) -> Self {
3627 self.set_epoch(field);
3628 self
3629 }
3630 pub fn round_opt_mut(&mut self) -> Option<&mut u64> {
3632 self.round.as_mut().map(|field| field as _)
3633 }
3634 pub fn round_mut(&mut self) -> &mut u64 {
3637 self.round.get_or_insert_default()
3638 }
3639 pub fn round_opt(&self) -> Option<u64> {
3641 self.round.as_ref().map(|field| *field)
3642 }
3643 pub fn set_round(&mut self, field: u64) {
3645 self.round = Some(field);
3646 }
3647 pub fn with_round(mut self, field: u64) -> Self {
3649 self.set_round(field);
3650 self
3651 }
3652 pub fn commit_timestamp_opt_mut(
3654 &mut self,
3655 ) -> Option<&mut ::prost_types::Timestamp> {
3656 self.commit_timestamp.as_mut().map(|field| field as _)
3657 }
3658 pub fn commit_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
3661 self.commit_timestamp.get_or_insert_default()
3662 }
3663 pub fn commit_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
3665 self.commit_timestamp.as_ref().map(|field| field as _)
3666 }
3667 pub fn set_commit_timestamp<T: Into<::prost_types::Timestamp>>(
3669 &mut self,
3670 field: T,
3671 ) {
3672 self.commit_timestamp = Some(field.into().into());
3673 }
3674 pub fn with_commit_timestamp<T: Into<::prost_types::Timestamp>>(
3676 mut self,
3677 field: T,
3678 ) -> Self {
3679 self.set_commit_timestamp(field.into());
3680 self
3681 }
3682 pub fn consensus_commit_digest_opt_mut(&mut self) -> Option<&mut String> {
3684 self.consensus_commit_digest.as_mut().map(|field| field as _)
3685 }
3686 pub fn consensus_commit_digest_mut(&mut self) -> &mut String {
3689 self.consensus_commit_digest.get_or_insert_default()
3690 }
3691 pub fn consensus_commit_digest_opt(&self) -> Option<&str> {
3693 self.consensus_commit_digest.as_ref().map(|field| field as _)
3694 }
3695 pub fn set_consensus_commit_digest<T: Into<String>>(&mut self, field: T) {
3697 self.consensus_commit_digest = Some(field.into().into());
3698 }
3699 pub fn with_consensus_commit_digest<T: Into<String>>(
3701 mut self,
3702 field: T,
3703 ) -> Self {
3704 self.set_consensus_commit_digest(field.into());
3705 self
3706 }
3707 pub fn sub_dag_index_opt_mut(&mut self) -> Option<&mut u64> {
3709 self.sub_dag_index.as_mut().map(|field| field as _)
3710 }
3711 pub fn sub_dag_index_mut(&mut self) -> &mut u64 {
3714 self.sub_dag_index.get_or_insert_default()
3715 }
3716 pub fn sub_dag_index_opt(&self) -> Option<u64> {
3718 self.sub_dag_index.as_ref().map(|field| *field)
3719 }
3720 pub fn set_sub_dag_index(&mut self, field: u64) {
3722 self.sub_dag_index = Some(field);
3723 }
3724 pub fn with_sub_dag_index(mut self, field: u64) -> Self {
3726 self.set_sub_dag_index(field);
3727 self
3728 }
3729 pub fn consensus_determined_version_assignments(
3731 &self,
3732 ) -> &super::ConsensusDeterminedVersionAssignments {
3733 self.consensus_determined_version_assignments
3734 .as_ref()
3735 .map(|field| field as _)
3736 .unwrap_or_else(|| {
3737 super::ConsensusDeterminedVersionAssignments::default_instance() as _
3738 })
3739 }
3740 pub fn consensus_determined_version_assignments_opt_mut(
3742 &mut self,
3743 ) -> Option<&mut super::ConsensusDeterminedVersionAssignments> {
3744 self.consensus_determined_version_assignments
3745 .as_mut()
3746 .map(|field| field as _)
3747 }
3748 pub fn consensus_determined_version_assignments_mut(
3751 &mut self,
3752 ) -> &mut super::ConsensusDeterminedVersionAssignments {
3753 self.consensus_determined_version_assignments.get_or_insert_default()
3754 }
3755 pub fn consensus_determined_version_assignments_opt(
3757 &self,
3758 ) -> Option<&super::ConsensusDeterminedVersionAssignments> {
3759 self.consensus_determined_version_assignments
3760 .as_ref()
3761 .map(|field| field as _)
3762 }
3763 pub fn set_consensus_determined_version_assignments<
3765 T: Into<super::ConsensusDeterminedVersionAssignments>,
3766 >(&mut self, field: T) {
3767 self.consensus_determined_version_assignments = Some(field.into().into());
3768 }
3769 pub fn with_consensus_determined_version_assignments<
3771 T: Into<super::ConsensusDeterminedVersionAssignments>,
3772 >(mut self, field: T) -> Self {
3773 self.set_consensus_determined_version_assignments(field.into());
3774 self
3775 }
3776 pub fn additional_state_digest_opt_mut(&mut self) -> Option<&mut String> {
3778 self.additional_state_digest.as_mut().map(|field| field as _)
3779 }
3780 pub fn additional_state_digest_mut(&mut self) -> &mut String {
3783 self.additional_state_digest.get_or_insert_default()
3784 }
3785 pub fn additional_state_digest_opt(&self) -> Option<&str> {
3787 self.additional_state_digest.as_ref().map(|field| field as _)
3788 }
3789 pub fn set_additional_state_digest<T: Into<String>>(&mut self, field: T) {
3791 self.additional_state_digest = Some(field.into().into());
3792 }
3793 pub fn with_additional_state_digest<T: Into<String>>(
3795 mut self,
3796 field: T,
3797 ) -> Self {
3798 self.set_additional_state_digest(field.into());
3799 self
3800 }
3801 }
3802 impl super::ConsensusDeterminedVersionAssignments {
3803 pub const fn const_default() -> Self {
3804 Self {
3805 version: None,
3806 canceled_transactions: Vec::new(),
3807 }
3808 }
3809 #[doc(hidden)]
3810 pub fn default_instance() -> &'static Self {
3811 static DEFAULT: super::ConsensusDeterminedVersionAssignments = super::ConsensusDeterminedVersionAssignments::const_default();
3812 &DEFAULT
3813 }
3814 pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
3816 self.version.as_mut().map(|field| field as _)
3817 }
3818 pub fn version_mut(&mut self) -> &mut i32 {
3821 self.version.get_or_insert_default()
3822 }
3823 pub fn version_opt(&self) -> Option<i32> {
3825 self.version.as_ref().map(|field| *field)
3826 }
3827 pub fn set_version(&mut self, field: i32) {
3829 self.version = Some(field);
3830 }
3831 pub fn with_version(mut self, field: i32) -> Self {
3833 self.set_version(field);
3834 self
3835 }
3836 pub fn canceled_transactions(&self) -> &[super::CanceledTransaction] {
3838 &self.canceled_transactions
3839 }
3840 pub fn canceled_transactions_mut(
3843 &mut self,
3844 ) -> &mut Vec<super::CanceledTransaction> {
3845 &mut self.canceled_transactions
3846 }
3847 pub fn set_canceled_transactions(
3849 &mut self,
3850 field: Vec<super::CanceledTransaction>,
3851 ) {
3852 self.canceled_transactions = field;
3853 }
3854 pub fn with_canceled_transactions(
3856 mut self,
3857 field: Vec<super::CanceledTransaction>,
3858 ) -> Self {
3859 self.set_canceled_transactions(field);
3860 self
3861 }
3862 }
3863 impl super::DatatypeDescriptor {
3864 pub const fn const_default() -> Self {
3865 Self {
3866 type_name: None,
3867 defining_id: None,
3868 module: None,
3869 name: None,
3870 abilities: Vec::new(),
3871 type_parameters: Vec::new(),
3872 kind: None,
3873 fields: Vec::new(),
3874 variants: Vec::new(),
3875 }
3876 }
3877 #[doc(hidden)]
3878 pub fn default_instance() -> &'static Self {
3879 static DEFAULT: super::DatatypeDescriptor = super::DatatypeDescriptor::const_default();
3880 &DEFAULT
3881 }
3882 pub fn type_name_opt_mut(&mut self) -> Option<&mut String> {
3884 self.type_name.as_mut().map(|field| field as _)
3885 }
3886 pub fn type_name_mut(&mut self) -> &mut String {
3889 self.type_name.get_or_insert_default()
3890 }
3891 pub fn type_name_opt(&self) -> Option<&str> {
3893 self.type_name.as_ref().map(|field| field as _)
3894 }
3895 pub fn set_type_name<T: Into<String>>(&mut self, field: T) {
3897 self.type_name = Some(field.into().into());
3898 }
3899 pub fn with_type_name<T: Into<String>>(mut self, field: T) -> Self {
3901 self.set_type_name(field.into());
3902 self
3903 }
3904 pub fn defining_id_opt_mut(&mut self) -> Option<&mut String> {
3906 self.defining_id.as_mut().map(|field| field as _)
3907 }
3908 pub fn defining_id_mut(&mut self) -> &mut String {
3911 self.defining_id.get_or_insert_default()
3912 }
3913 pub fn defining_id_opt(&self) -> Option<&str> {
3915 self.defining_id.as_ref().map(|field| field as _)
3916 }
3917 pub fn set_defining_id<T: Into<String>>(&mut self, field: T) {
3919 self.defining_id = Some(field.into().into());
3920 }
3921 pub fn with_defining_id<T: Into<String>>(mut self, field: T) -> Self {
3923 self.set_defining_id(field.into());
3924 self
3925 }
3926 pub fn module_opt_mut(&mut self) -> Option<&mut String> {
3928 self.module.as_mut().map(|field| field as _)
3929 }
3930 pub fn module_mut(&mut self) -> &mut String {
3933 self.module.get_or_insert_default()
3934 }
3935 pub fn module_opt(&self) -> Option<&str> {
3937 self.module.as_ref().map(|field| field as _)
3938 }
3939 pub fn set_module<T: Into<String>>(&mut self, field: T) {
3941 self.module = Some(field.into().into());
3942 }
3943 pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
3945 self.set_module(field.into());
3946 self
3947 }
3948 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
3950 self.name.as_mut().map(|field| field as _)
3951 }
3952 pub fn name_mut(&mut self) -> &mut String {
3955 self.name.get_or_insert_default()
3956 }
3957 pub fn name_opt(&self) -> Option<&str> {
3959 self.name.as_ref().map(|field| field as _)
3960 }
3961 pub fn set_name<T: Into<String>>(&mut self, field: T) {
3963 self.name = Some(field.into().into());
3964 }
3965 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
3967 self.set_name(field.into());
3968 self
3969 }
3970 pub fn type_parameters(&self) -> &[super::TypeParameter] {
3972 &self.type_parameters
3973 }
3974 pub fn type_parameters_mut(&mut self) -> &mut Vec<super::TypeParameter> {
3977 &mut self.type_parameters
3978 }
3979 pub fn set_type_parameters(&mut self, field: Vec<super::TypeParameter>) {
3981 self.type_parameters = field;
3982 }
3983 pub fn with_type_parameters(mut self, field: Vec<super::TypeParameter>) -> Self {
3985 self.set_type_parameters(field);
3986 self
3987 }
3988 pub fn with_kind<T: Into<super::datatype_descriptor::DatatypeKind>>(
3990 mut self,
3991 field: T,
3992 ) -> Self {
3993 self.set_kind(field.into());
3994 self
3995 }
3996 pub fn fields(&self) -> &[super::FieldDescriptor] {
3998 &self.fields
3999 }
4000 pub fn fields_mut(&mut self) -> &mut Vec<super::FieldDescriptor> {
4003 &mut self.fields
4004 }
4005 pub fn set_fields(&mut self, field: Vec<super::FieldDescriptor>) {
4007 self.fields = field;
4008 }
4009 pub fn with_fields(mut self, field: Vec<super::FieldDescriptor>) -> Self {
4011 self.set_fields(field);
4012 self
4013 }
4014 pub fn variants(&self) -> &[super::VariantDescriptor] {
4016 &self.variants
4017 }
4018 pub fn variants_mut(&mut self) -> &mut Vec<super::VariantDescriptor> {
4021 &mut self.variants
4022 }
4023 pub fn set_variants(&mut self, field: Vec<super::VariantDescriptor>) {
4025 self.variants = field;
4026 }
4027 pub fn with_variants(mut self, field: Vec<super::VariantDescriptor>) -> Self {
4029 self.set_variants(field);
4030 self
4031 }
4032 }
4033 impl super::Display {
4034 pub const fn const_default() -> Self {
4035 Self { output: None, errors: None }
4036 }
4037 #[doc(hidden)]
4038 pub fn default_instance() -> &'static Self {
4039 static DEFAULT: super::Display = super::Display::const_default();
4040 &DEFAULT
4041 }
4042 pub fn output_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
4044 self.output.as_mut().map(|field| field as _)
4045 }
4046 pub fn output_mut(&mut self) -> &mut ::prost_types::Value {
4049 self.output.get_or_insert_default()
4050 }
4051 pub fn output_opt(&self) -> Option<&::prost_types::Value> {
4053 self.output.as_ref().map(|field| field as _)
4054 }
4055 pub fn set_output<T: Into<::prost_types::Value>>(&mut self, field: T) {
4057 self.output = Some(field.into().into());
4058 }
4059 pub fn with_output<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
4061 self.set_output(field.into());
4062 self
4063 }
4064 pub fn errors_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
4066 self.errors.as_mut().map(|field| field as _)
4067 }
4068 pub fn errors_mut(&mut self) -> &mut ::prost_types::Value {
4071 self.errors.get_or_insert_default()
4072 }
4073 pub fn errors_opt(&self) -> Option<&::prost_types::Value> {
4075 self.errors.as_ref().map(|field| field as _)
4076 }
4077 pub fn set_errors<T: Into<::prost_types::Value>>(&mut self, field: T) {
4079 self.errors = Some(field.into().into());
4080 }
4081 pub fn with_errors<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
4083 self.set_errors(field.into());
4084 self
4085 }
4086 }
4087 impl super::DynamicField {
4088 pub const fn const_default() -> Self {
4089 Self {
4090 kind: None,
4091 parent: None,
4092 field_id: None,
4093 field_object: None,
4094 name: None,
4095 value: None,
4096 value_type: None,
4097 child_id: None,
4098 child_object: None,
4099 }
4100 }
4101 #[doc(hidden)]
4102 pub fn default_instance() -> &'static Self {
4103 static DEFAULT: super::DynamicField = super::DynamicField::const_default();
4104 &DEFAULT
4105 }
4106 pub fn with_kind<T: Into<super::dynamic_field::DynamicFieldKind>>(
4108 mut self,
4109 field: T,
4110 ) -> Self {
4111 self.set_kind(field.into());
4112 self
4113 }
4114 pub fn parent_opt_mut(&mut self) -> Option<&mut String> {
4116 self.parent.as_mut().map(|field| field as _)
4117 }
4118 pub fn parent_mut(&mut self) -> &mut String {
4121 self.parent.get_or_insert_default()
4122 }
4123 pub fn parent_opt(&self) -> Option<&str> {
4125 self.parent.as_ref().map(|field| field as _)
4126 }
4127 pub fn set_parent<T: Into<String>>(&mut self, field: T) {
4129 self.parent = Some(field.into().into());
4130 }
4131 pub fn with_parent<T: Into<String>>(mut self, field: T) -> Self {
4133 self.set_parent(field.into());
4134 self
4135 }
4136 pub fn field_id_opt_mut(&mut self) -> Option<&mut String> {
4138 self.field_id.as_mut().map(|field| field as _)
4139 }
4140 pub fn field_id_mut(&mut self) -> &mut String {
4143 self.field_id.get_or_insert_default()
4144 }
4145 pub fn field_id_opt(&self) -> Option<&str> {
4147 self.field_id.as_ref().map(|field| field as _)
4148 }
4149 pub fn set_field_id<T: Into<String>>(&mut self, field: T) {
4151 self.field_id = Some(field.into().into());
4152 }
4153 pub fn with_field_id<T: Into<String>>(mut self, field: T) -> Self {
4155 self.set_field_id(field.into());
4156 self
4157 }
4158 pub fn field_object(&self) -> &super::Object {
4160 self.field_object
4161 .as_ref()
4162 .map(|field| field as _)
4163 .unwrap_or_else(|| super::Object::default_instance() as _)
4164 }
4165 pub fn field_object_opt_mut(&mut self) -> Option<&mut super::Object> {
4167 self.field_object.as_mut().map(|field| field as _)
4168 }
4169 pub fn field_object_mut(&mut self) -> &mut super::Object {
4172 self.field_object.get_or_insert_default()
4173 }
4174 pub fn field_object_opt(&self) -> Option<&super::Object> {
4176 self.field_object.as_ref().map(|field| field as _)
4177 }
4178 pub fn set_field_object<T: Into<super::Object>>(&mut self, field: T) {
4180 self.field_object = Some(field.into().into());
4181 }
4182 pub fn with_field_object<T: Into<super::Object>>(mut self, field: T) -> Self {
4184 self.set_field_object(field.into());
4185 self
4186 }
4187 pub fn name(&self) -> &super::Bcs {
4189 self.name
4190 .as_ref()
4191 .map(|field| field as _)
4192 .unwrap_or_else(|| super::Bcs::default_instance() as _)
4193 }
4194 pub fn name_opt_mut(&mut self) -> Option<&mut super::Bcs> {
4196 self.name.as_mut().map(|field| field as _)
4197 }
4198 pub fn name_mut(&mut self) -> &mut super::Bcs {
4201 self.name.get_or_insert_default()
4202 }
4203 pub fn name_opt(&self) -> Option<&super::Bcs> {
4205 self.name.as_ref().map(|field| field as _)
4206 }
4207 pub fn set_name<T: Into<super::Bcs>>(&mut self, field: T) {
4209 self.name = Some(field.into().into());
4210 }
4211 pub fn with_name<T: Into<super::Bcs>>(mut self, field: T) -> Self {
4213 self.set_name(field.into());
4214 self
4215 }
4216 pub fn value(&self) -> &super::Bcs {
4218 self.value
4219 .as_ref()
4220 .map(|field| field as _)
4221 .unwrap_or_else(|| super::Bcs::default_instance() as _)
4222 }
4223 pub fn value_opt_mut(&mut self) -> Option<&mut super::Bcs> {
4225 self.value.as_mut().map(|field| field as _)
4226 }
4227 pub fn value_mut(&mut self) -> &mut super::Bcs {
4230 self.value.get_or_insert_default()
4231 }
4232 pub fn value_opt(&self) -> Option<&super::Bcs> {
4234 self.value.as_ref().map(|field| field as _)
4235 }
4236 pub fn set_value<T: Into<super::Bcs>>(&mut self, field: T) {
4238 self.value = Some(field.into().into());
4239 }
4240 pub fn with_value<T: Into<super::Bcs>>(mut self, field: T) -> Self {
4242 self.set_value(field.into());
4243 self
4244 }
4245 pub fn value_type_opt_mut(&mut self) -> Option<&mut String> {
4247 self.value_type.as_mut().map(|field| field as _)
4248 }
4249 pub fn value_type_mut(&mut self) -> &mut String {
4252 self.value_type.get_or_insert_default()
4253 }
4254 pub fn value_type_opt(&self) -> Option<&str> {
4256 self.value_type.as_ref().map(|field| field as _)
4257 }
4258 pub fn set_value_type<T: Into<String>>(&mut self, field: T) {
4260 self.value_type = Some(field.into().into());
4261 }
4262 pub fn with_value_type<T: Into<String>>(mut self, field: T) -> Self {
4264 self.set_value_type(field.into());
4265 self
4266 }
4267 pub fn child_id_opt_mut(&mut self) -> Option<&mut String> {
4269 self.child_id.as_mut().map(|field| field as _)
4270 }
4271 pub fn child_id_mut(&mut self) -> &mut String {
4274 self.child_id.get_or_insert_default()
4275 }
4276 pub fn child_id_opt(&self) -> Option<&str> {
4278 self.child_id.as_ref().map(|field| field as _)
4279 }
4280 pub fn set_child_id<T: Into<String>>(&mut self, field: T) {
4282 self.child_id = Some(field.into().into());
4283 }
4284 pub fn with_child_id<T: Into<String>>(mut self, field: T) -> Self {
4286 self.set_child_id(field.into());
4287 self
4288 }
4289 pub fn child_object(&self) -> &super::Object {
4291 self.child_object
4292 .as_ref()
4293 .map(|field| field as _)
4294 .unwrap_or_else(|| super::Object::default_instance() as _)
4295 }
4296 pub fn child_object_opt_mut(&mut self) -> Option<&mut super::Object> {
4298 self.child_object.as_mut().map(|field| field as _)
4299 }
4300 pub fn child_object_mut(&mut self) -> &mut super::Object {
4303 self.child_object.get_or_insert_default()
4304 }
4305 pub fn child_object_opt(&self) -> Option<&super::Object> {
4307 self.child_object.as_ref().map(|field| field as _)
4308 }
4309 pub fn set_child_object<T: Into<super::Object>>(&mut self, field: T) {
4311 self.child_object = Some(field.into().into());
4312 }
4313 pub fn with_child_object<T: Into<super::Object>>(mut self, field: T) -> Self {
4315 self.set_child_object(field.into());
4316 self
4317 }
4318 }
4319 impl super::EndOfEpochData {
4320 pub const fn const_default() -> Self {
4321 Self {
4322 next_epoch_committee: Vec::new(),
4323 next_epoch_protocol_version: None,
4324 epoch_commitments: Vec::new(),
4325 }
4326 }
4327 #[doc(hidden)]
4328 pub fn default_instance() -> &'static Self {
4329 static DEFAULT: super::EndOfEpochData = super::EndOfEpochData::const_default();
4330 &DEFAULT
4331 }
4332 pub fn next_epoch_committee(&self) -> &[super::ValidatorCommitteeMember] {
4334 &self.next_epoch_committee
4335 }
4336 pub fn next_epoch_committee_mut(
4339 &mut self,
4340 ) -> &mut Vec<super::ValidatorCommitteeMember> {
4341 &mut self.next_epoch_committee
4342 }
4343 pub fn set_next_epoch_committee(
4345 &mut self,
4346 field: Vec<super::ValidatorCommitteeMember>,
4347 ) {
4348 self.next_epoch_committee = field;
4349 }
4350 pub fn with_next_epoch_committee(
4352 mut self,
4353 field: Vec<super::ValidatorCommitteeMember>,
4354 ) -> Self {
4355 self.set_next_epoch_committee(field);
4356 self
4357 }
4358 pub fn next_epoch_protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
4360 self.next_epoch_protocol_version.as_mut().map(|field| field as _)
4361 }
4362 pub fn next_epoch_protocol_version_mut(&mut self) -> &mut u64 {
4365 self.next_epoch_protocol_version.get_or_insert_default()
4366 }
4367 pub fn next_epoch_protocol_version_opt(&self) -> Option<u64> {
4369 self.next_epoch_protocol_version.as_ref().map(|field| *field)
4370 }
4371 pub fn set_next_epoch_protocol_version(&mut self, field: u64) {
4373 self.next_epoch_protocol_version = Some(field);
4374 }
4375 pub fn with_next_epoch_protocol_version(mut self, field: u64) -> Self {
4377 self.set_next_epoch_protocol_version(field);
4378 self
4379 }
4380 pub fn epoch_commitments(&self) -> &[super::CheckpointCommitment] {
4382 &self.epoch_commitments
4383 }
4384 pub fn epoch_commitments_mut(
4387 &mut self,
4388 ) -> &mut Vec<super::CheckpointCommitment> {
4389 &mut self.epoch_commitments
4390 }
4391 pub fn set_epoch_commitments(
4393 &mut self,
4394 field: Vec<super::CheckpointCommitment>,
4395 ) {
4396 self.epoch_commitments = field;
4397 }
4398 pub fn with_epoch_commitments(
4400 mut self,
4401 field: Vec<super::CheckpointCommitment>,
4402 ) -> Self {
4403 self.set_epoch_commitments(field);
4404 self
4405 }
4406 }
4407 impl super::EndOfEpochTransaction {
4408 pub const fn const_default() -> Self {
4409 Self { transactions: Vec::new() }
4410 }
4411 #[doc(hidden)]
4412 pub fn default_instance() -> &'static Self {
4413 static DEFAULT: super::EndOfEpochTransaction = super::EndOfEpochTransaction::const_default();
4414 &DEFAULT
4415 }
4416 pub fn transactions(&self) -> &[super::EndOfEpochTransactionKind] {
4418 &self.transactions
4419 }
4420 pub fn transactions_mut(
4423 &mut self,
4424 ) -> &mut Vec<super::EndOfEpochTransactionKind> {
4425 &mut self.transactions
4426 }
4427 pub fn set_transactions(
4429 &mut self,
4430 field: Vec<super::EndOfEpochTransactionKind>,
4431 ) {
4432 self.transactions = field;
4433 }
4434 pub fn with_transactions(
4436 mut self,
4437 field: Vec<super::EndOfEpochTransactionKind>,
4438 ) -> Self {
4439 self.set_transactions(field);
4440 self
4441 }
4442 }
4443 impl super::EndOfEpochTransactionKind {
4444 pub const fn const_default() -> Self {
4445 Self { kind: None, data: None }
4446 }
4447 #[doc(hidden)]
4448 pub fn default_instance() -> &'static Self {
4449 static DEFAULT: super::EndOfEpochTransactionKind = super::EndOfEpochTransactionKind::const_default();
4450 &DEFAULT
4451 }
4452 pub fn with_kind<T: Into<super::end_of_epoch_transaction_kind::Kind>>(
4454 mut self,
4455 field: T,
4456 ) -> Self {
4457 self.set_kind(field.into());
4458 self
4459 }
4460 pub fn change_epoch(&self) -> &super::ChangeEpoch {
4462 if let Some(
4463 super::end_of_epoch_transaction_kind::Data::ChangeEpoch(field),
4464 ) = &self.data
4465 {
4466 field as _
4467 } else {
4468 super::ChangeEpoch::default_instance() as _
4469 }
4470 }
4471 pub fn change_epoch_opt(&self) -> Option<&super::ChangeEpoch> {
4473 if let Some(
4474 super::end_of_epoch_transaction_kind::Data::ChangeEpoch(field),
4475 ) = &self.data
4476 {
4477 Some(field as _)
4478 } else {
4479 None
4480 }
4481 }
4482 pub fn change_epoch_opt_mut(&mut self) -> Option<&mut super::ChangeEpoch> {
4484 if let Some(
4485 super::end_of_epoch_transaction_kind::Data::ChangeEpoch(field),
4486 ) = &mut self.data
4487 {
4488 Some(field as _)
4489 } else {
4490 None
4491 }
4492 }
4493 pub fn change_epoch_mut(&mut self) -> &mut super::ChangeEpoch {
4497 if self.change_epoch_opt_mut().is_none() {
4498 self.data = Some(
4499 super::end_of_epoch_transaction_kind::Data::ChangeEpoch(
4500 super::ChangeEpoch::default(),
4501 ),
4502 );
4503 }
4504 self.change_epoch_opt_mut().unwrap()
4505 }
4506 pub fn set_change_epoch<T: Into<super::ChangeEpoch>>(&mut self, field: T) {
4509 self.data = Some(
4510 super::end_of_epoch_transaction_kind::Data::ChangeEpoch(
4511 field.into().into(),
4512 ),
4513 );
4514 }
4515 pub fn with_change_epoch<T: Into<super::ChangeEpoch>>(
4518 mut self,
4519 field: T,
4520 ) -> Self {
4521 self.set_change_epoch(field.into());
4522 self
4523 }
4524 pub fn authenticator_state_expire(&self) -> &super::AuthenticatorStateExpire {
4526 if let Some(
4527 super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4528 field,
4529 ),
4530 ) = &self.data
4531 {
4532 field as _
4533 } else {
4534 super::AuthenticatorStateExpire::default_instance() as _
4535 }
4536 }
4537 pub fn authenticator_state_expire_opt(
4539 &self,
4540 ) -> Option<&super::AuthenticatorStateExpire> {
4541 if let Some(
4542 super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4543 field,
4544 ),
4545 ) = &self.data
4546 {
4547 Some(field as _)
4548 } else {
4549 None
4550 }
4551 }
4552 pub fn authenticator_state_expire_opt_mut(
4554 &mut self,
4555 ) -> Option<&mut super::AuthenticatorStateExpire> {
4556 if let Some(
4557 super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4558 field,
4559 ),
4560 ) = &mut self.data
4561 {
4562 Some(field as _)
4563 } else {
4564 None
4565 }
4566 }
4567 pub fn authenticator_state_expire_mut(
4571 &mut self,
4572 ) -> &mut super::AuthenticatorStateExpire {
4573 if self.authenticator_state_expire_opt_mut().is_none() {
4574 self.data = Some(
4575 super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4576 super::AuthenticatorStateExpire::default(),
4577 ),
4578 );
4579 }
4580 self.authenticator_state_expire_opt_mut().unwrap()
4581 }
4582 pub fn set_authenticator_state_expire<T: Into<super::AuthenticatorStateExpire>>(
4585 &mut self,
4586 field: T,
4587 ) {
4588 self.data = Some(
4589 super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4590 field.into().into(),
4591 ),
4592 );
4593 }
4594 pub fn with_authenticator_state_expire<T: Into<super::AuthenticatorStateExpire>>(
4597 mut self,
4598 field: T,
4599 ) -> Self {
4600 self.set_authenticator_state_expire(field.into());
4601 self
4602 }
4603 pub fn execution_time_observations(&self) -> &super::ExecutionTimeObservations {
4605 if let Some(
4606 super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4607 field,
4608 ),
4609 ) = &self.data
4610 {
4611 field as _
4612 } else {
4613 super::ExecutionTimeObservations::default_instance() as _
4614 }
4615 }
4616 pub fn execution_time_observations_opt(
4618 &self,
4619 ) -> Option<&super::ExecutionTimeObservations> {
4620 if let Some(
4621 super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4622 field,
4623 ),
4624 ) = &self.data
4625 {
4626 Some(field as _)
4627 } else {
4628 None
4629 }
4630 }
4631 pub fn execution_time_observations_opt_mut(
4633 &mut self,
4634 ) -> Option<&mut super::ExecutionTimeObservations> {
4635 if let Some(
4636 super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4637 field,
4638 ),
4639 ) = &mut self.data
4640 {
4641 Some(field as _)
4642 } else {
4643 None
4644 }
4645 }
4646 pub fn execution_time_observations_mut(
4650 &mut self,
4651 ) -> &mut super::ExecutionTimeObservations {
4652 if self.execution_time_observations_opt_mut().is_none() {
4653 self.data = Some(
4654 super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4655 super::ExecutionTimeObservations::default(),
4656 ),
4657 );
4658 }
4659 self.execution_time_observations_opt_mut().unwrap()
4660 }
4661 pub fn set_execution_time_observations<
4664 T: Into<super::ExecutionTimeObservations>,
4665 >(&mut self, field: T) {
4666 self.data = Some(
4667 super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4668 field.into().into(),
4669 ),
4670 );
4671 }
4672 pub fn with_execution_time_observations<
4675 T: Into<super::ExecutionTimeObservations>,
4676 >(mut self, field: T) -> Self {
4677 self.set_execution_time_observations(field.into());
4678 self
4679 }
4680 pub fn bridge_chain_id(&self) -> &str {
4682 if let Some(
4683 super::end_of_epoch_transaction_kind::Data::BridgeChainId(field),
4684 ) = &self.data
4685 {
4686 field as _
4687 } else {
4688 ""
4689 }
4690 }
4691 pub fn bridge_chain_id_opt(&self) -> Option<&str> {
4693 if let Some(
4694 super::end_of_epoch_transaction_kind::Data::BridgeChainId(field),
4695 ) = &self.data
4696 {
4697 Some(field as _)
4698 } else {
4699 None
4700 }
4701 }
4702 pub fn bridge_chain_id_opt_mut(&mut self) -> Option<&mut String> {
4704 if let Some(
4705 super::end_of_epoch_transaction_kind::Data::BridgeChainId(field),
4706 ) = &mut self.data
4707 {
4708 Some(field as _)
4709 } else {
4710 None
4711 }
4712 }
4713 pub fn bridge_chain_id_mut(&mut self) -> &mut String {
4717 if self.bridge_chain_id_opt_mut().is_none() {
4718 self.data = Some(
4719 super::end_of_epoch_transaction_kind::Data::BridgeChainId(
4720 String::default(),
4721 ),
4722 );
4723 }
4724 self.bridge_chain_id_opt_mut().unwrap()
4725 }
4726 pub fn set_bridge_chain_id<T: Into<String>>(&mut self, field: T) {
4729 self.data = Some(
4730 super::end_of_epoch_transaction_kind::Data::BridgeChainId(
4731 field.into().into(),
4732 ),
4733 );
4734 }
4735 pub fn with_bridge_chain_id<T: Into<String>>(mut self, field: T) -> Self {
4738 self.set_bridge_chain_id(field.into());
4739 self
4740 }
4741 pub fn bridge_object_version(&self) -> u64 {
4743 if let Some(
4744 super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4745 ) = &self.data
4746 {
4747 *field
4748 } else {
4749 0u64
4750 }
4751 }
4752 pub fn bridge_object_version_opt(&self) -> Option<u64> {
4754 if let Some(
4755 super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4756 ) = &self.data
4757 {
4758 Some(*field)
4759 } else {
4760 None
4761 }
4762 }
4763 pub fn bridge_object_version_opt_mut(&mut self) -> Option<&mut u64> {
4765 if let Some(
4766 super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4767 ) = &mut self.data
4768 {
4769 Some(field as _)
4770 } else {
4771 None
4772 }
4773 }
4774 pub fn bridge_object_version_mut(&mut self) -> &mut u64 {
4778 if self.bridge_object_version_opt_mut().is_none() {
4779 self.data = Some(
4780 super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(
4781 u64::default(),
4782 ),
4783 );
4784 }
4785 self.bridge_object_version_opt_mut().unwrap()
4786 }
4787 pub fn set_bridge_object_version(&mut self, field: u64) {
4790 self.data = Some(
4791 super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4792 );
4793 }
4794 pub fn with_bridge_object_version(mut self, field: u64) -> Self {
4797 self.set_bridge_object_version(field);
4798 self
4799 }
4800 pub fn storage_cost(&self) -> u64 {
4802 if let Some(
4803 super::end_of_epoch_transaction_kind::Data::StorageCost(field),
4804 ) = &self.data
4805 {
4806 *field
4807 } else {
4808 0u64
4809 }
4810 }
4811 pub fn storage_cost_opt(&self) -> Option<u64> {
4813 if let Some(
4814 super::end_of_epoch_transaction_kind::Data::StorageCost(field),
4815 ) = &self.data
4816 {
4817 Some(*field)
4818 } else {
4819 None
4820 }
4821 }
4822 pub fn storage_cost_opt_mut(&mut self) -> Option<&mut u64> {
4824 if let Some(
4825 super::end_of_epoch_transaction_kind::Data::StorageCost(field),
4826 ) = &mut self.data
4827 {
4828 Some(field as _)
4829 } else {
4830 None
4831 }
4832 }
4833 pub fn storage_cost_mut(&mut self) -> &mut u64 {
4837 if self.storage_cost_opt_mut().is_none() {
4838 self.data = Some(
4839 super::end_of_epoch_transaction_kind::Data::StorageCost(
4840 u64::default(),
4841 ),
4842 );
4843 }
4844 self.storage_cost_opt_mut().unwrap()
4845 }
4846 pub fn set_storage_cost(&mut self, field: u64) {
4849 self.data = Some(
4850 super::end_of_epoch_transaction_kind::Data::StorageCost(field),
4851 );
4852 }
4853 pub fn with_storage_cost(mut self, field: u64) -> Self {
4856 self.set_storage_cost(field);
4857 self
4858 }
4859 }
4860 impl super::Epoch {
4861 pub const fn const_default() -> Self {
4862 Self {
4863 epoch: None,
4864 committee: None,
4865 system_state: None,
4866 first_checkpoint: None,
4867 last_checkpoint: None,
4868 start: None,
4869 end: None,
4870 reference_gas_price: None,
4871 protocol_config: None,
4872 }
4873 }
4874 #[doc(hidden)]
4875 pub fn default_instance() -> &'static Self {
4876 static DEFAULT: super::Epoch = super::Epoch::const_default();
4877 &DEFAULT
4878 }
4879 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
4881 self.epoch.as_mut().map(|field| field as _)
4882 }
4883 pub fn epoch_mut(&mut self) -> &mut u64 {
4886 self.epoch.get_or_insert_default()
4887 }
4888 pub fn epoch_opt(&self) -> Option<u64> {
4890 self.epoch.as_ref().map(|field| *field)
4891 }
4892 pub fn set_epoch(&mut self, field: u64) {
4894 self.epoch = Some(field);
4895 }
4896 pub fn with_epoch(mut self, field: u64) -> Self {
4898 self.set_epoch(field);
4899 self
4900 }
4901 pub fn committee(&self) -> &super::ValidatorCommittee {
4903 self.committee
4904 .as_ref()
4905 .map(|field| field as _)
4906 .unwrap_or_else(|| super::ValidatorCommittee::default_instance() as _)
4907 }
4908 pub fn committee_opt_mut(&mut self) -> Option<&mut super::ValidatorCommittee> {
4910 self.committee.as_mut().map(|field| field as _)
4911 }
4912 pub fn committee_mut(&mut self) -> &mut super::ValidatorCommittee {
4915 self.committee.get_or_insert_default()
4916 }
4917 pub fn committee_opt(&self) -> Option<&super::ValidatorCommittee> {
4919 self.committee.as_ref().map(|field| field as _)
4920 }
4921 pub fn set_committee<T: Into<super::ValidatorCommittee>>(&mut self, field: T) {
4923 self.committee = Some(field.into().into());
4924 }
4925 pub fn with_committee<T: Into<super::ValidatorCommittee>>(
4927 mut self,
4928 field: T,
4929 ) -> Self {
4930 self.set_committee(field.into());
4931 self
4932 }
4933 pub fn system_state(&self) -> &super::SystemState {
4935 self.system_state
4936 .as_ref()
4937 .map(|field| field as _)
4938 .unwrap_or_else(|| super::SystemState::default_instance() as _)
4939 }
4940 pub fn system_state_opt_mut(&mut self) -> Option<&mut super::SystemState> {
4942 self.system_state.as_mut().map(|field| field as _)
4943 }
4944 pub fn system_state_mut(&mut self) -> &mut super::SystemState {
4947 self.system_state.get_or_insert_default()
4948 }
4949 pub fn system_state_opt(&self) -> Option<&super::SystemState> {
4951 self.system_state.as_ref().map(|field| field as _)
4952 }
4953 pub fn set_system_state<T: Into<super::SystemState>>(&mut self, field: T) {
4955 self.system_state = Some(field.into().into());
4956 }
4957 pub fn with_system_state<T: Into<super::SystemState>>(
4959 mut self,
4960 field: T,
4961 ) -> Self {
4962 self.set_system_state(field.into());
4963 self
4964 }
4965 pub fn first_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
4967 self.first_checkpoint.as_mut().map(|field| field as _)
4968 }
4969 pub fn first_checkpoint_mut(&mut self) -> &mut u64 {
4972 self.first_checkpoint.get_or_insert_default()
4973 }
4974 pub fn first_checkpoint_opt(&self) -> Option<u64> {
4976 self.first_checkpoint.as_ref().map(|field| *field)
4977 }
4978 pub fn set_first_checkpoint(&mut self, field: u64) {
4980 self.first_checkpoint = Some(field);
4981 }
4982 pub fn with_first_checkpoint(mut self, field: u64) -> Self {
4984 self.set_first_checkpoint(field);
4985 self
4986 }
4987 pub fn last_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
4989 self.last_checkpoint.as_mut().map(|field| field as _)
4990 }
4991 pub fn last_checkpoint_mut(&mut self) -> &mut u64 {
4994 self.last_checkpoint.get_or_insert_default()
4995 }
4996 pub fn last_checkpoint_opt(&self) -> Option<u64> {
4998 self.last_checkpoint.as_ref().map(|field| *field)
4999 }
5000 pub fn set_last_checkpoint(&mut self, field: u64) {
5002 self.last_checkpoint = Some(field);
5003 }
5004 pub fn with_last_checkpoint(mut self, field: u64) -> Self {
5006 self.set_last_checkpoint(field);
5007 self
5008 }
5009 pub fn start_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
5011 self.start.as_mut().map(|field| field as _)
5012 }
5013 pub fn start_mut(&mut self) -> &mut ::prost_types::Timestamp {
5016 self.start.get_or_insert_default()
5017 }
5018 pub fn start_opt(&self) -> Option<&::prost_types::Timestamp> {
5020 self.start.as_ref().map(|field| field as _)
5021 }
5022 pub fn set_start<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
5024 self.start = Some(field.into().into());
5025 }
5026 pub fn with_start<T: Into<::prost_types::Timestamp>>(
5028 mut self,
5029 field: T,
5030 ) -> Self {
5031 self.set_start(field.into());
5032 self
5033 }
5034 pub fn end_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
5036 self.end.as_mut().map(|field| field as _)
5037 }
5038 pub fn end_mut(&mut self) -> &mut ::prost_types::Timestamp {
5041 self.end.get_or_insert_default()
5042 }
5043 pub fn end_opt(&self) -> Option<&::prost_types::Timestamp> {
5045 self.end.as_ref().map(|field| field as _)
5046 }
5047 pub fn set_end<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
5049 self.end = Some(field.into().into());
5050 }
5051 pub fn with_end<T: Into<::prost_types::Timestamp>>(mut self, field: T) -> Self {
5053 self.set_end(field.into());
5054 self
5055 }
5056 pub fn reference_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
5058 self.reference_gas_price.as_mut().map(|field| field as _)
5059 }
5060 pub fn reference_gas_price_mut(&mut self) -> &mut u64 {
5063 self.reference_gas_price.get_or_insert_default()
5064 }
5065 pub fn reference_gas_price_opt(&self) -> Option<u64> {
5067 self.reference_gas_price.as_ref().map(|field| *field)
5068 }
5069 pub fn set_reference_gas_price(&mut self, field: u64) {
5071 self.reference_gas_price = Some(field);
5072 }
5073 pub fn with_reference_gas_price(mut self, field: u64) -> Self {
5075 self.set_reference_gas_price(field);
5076 self
5077 }
5078 pub fn protocol_config(&self) -> &super::ProtocolConfig {
5080 self.protocol_config
5081 .as_ref()
5082 .map(|field| field as _)
5083 .unwrap_or_else(|| super::ProtocolConfig::default_instance() as _)
5084 }
5085 pub fn protocol_config_opt_mut(&mut self) -> Option<&mut super::ProtocolConfig> {
5087 self.protocol_config.as_mut().map(|field| field as _)
5088 }
5089 pub fn protocol_config_mut(&mut self) -> &mut super::ProtocolConfig {
5092 self.protocol_config.get_or_insert_default()
5093 }
5094 pub fn protocol_config_opt(&self) -> Option<&super::ProtocolConfig> {
5096 self.protocol_config.as_ref().map(|field| field as _)
5097 }
5098 pub fn set_protocol_config<T: Into<super::ProtocolConfig>>(&mut self, field: T) {
5100 self.protocol_config = Some(field.into().into());
5101 }
5102 pub fn with_protocol_config<T: Into<super::ProtocolConfig>>(
5104 mut self,
5105 field: T,
5106 ) -> Self {
5107 self.set_protocol_config(field.into());
5108 self
5109 }
5110 }
5111 impl super::Event {
5112 pub const fn const_default() -> Self {
5113 Self {
5114 package_id: None,
5115 module: None,
5116 sender: None,
5117 event_type: None,
5118 contents: None,
5119 json: None,
5120 }
5121 }
5122 #[doc(hidden)]
5123 pub fn default_instance() -> &'static Self {
5124 static DEFAULT: super::Event = super::Event::const_default();
5125 &DEFAULT
5126 }
5127 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
5129 self.package_id.as_mut().map(|field| field as _)
5130 }
5131 pub fn package_id_mut(&mut self) -> &mut String {
5134 self.package_id.get_or_insert_default()
5135 }
5136 pub fn package_id_opt(&self) -> Option<&str> {
5138 self.package_id.as_ref().map(|field| field as _)
5139 }
5140 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
5142 self.package_id = Some(field.into().into());
5143 }
5144 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
5146 self.set_package_id(field.into());
5147 self
5148 }
5149 pub fn module_opt_mut(&mut self) -> Option<&mut String> {
5151 self.module.as_mut().map(|field| field as _)
5152 }
5153 pub fn module_mut(&mut self) -> &mut String {
5156 self.module.get_or_insert_default()
5157 }
5158 pub fn module_opt(&self) -> Option<&str> {
5160 self.module.as_ref().map(|field| field as _)
5161 }
5162 pub fn set_module<T: Into<String>>(&mut self, field: T) {
5164 self.module = Some(field.into().into());
5165 }
5166 pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
5168 self.set_module(field.into());
5169 self
5170 }
5171 pub fn sender_opt_mut(&mut self) -> Option<&mut String> {
5173 self.sender.as_mut().map(|field| field as _)
5174 }
5175 pub fn sender_mut(&mut self) -> &mut String {
5178 self.sender.get_or_insert_default()
5179 }
5180 pub fn sender_opt(&self) -> Option<&str> {
5182 self.sender.as_ref().map(|field| field as _)
5183 }
5184 pub fn set_sender<T: Into<String>>(&mut self, field: T) {
5186 self.sender = Some(field.into().into());
5187 }
5188 pub fn with_sender<T: Into<String>>(mut self, field: T) -> Self {
5190 self.set_sender(field.into());
5191 self
5192 }
5193 pub fn event_type_opt_mut(&mut self) -> Option<&mut String> {
5195 self.event_type.as_mut().map(|field| field as _)
5196 }
5197 pub fn event_type_mut(&mut self) -> &mut String {
5200 self.event_type.get_or_insert_default()
5201 }
5202 pub fn event_type_opt(&self) -> Option<&str> {
5204 self.event_type.as_ref().map(|field| field as _)
5205 }
5206 pub fn set_event_type<T: Into<String>>(&mut self, field: T) {
5208 self.event_type = Some(field.into().into());
5209 }
5210 pub fn with_event_type<T: Into<String>>(mut self, field: T) -> Self {
5212 self.set_event_type(field.into());
5213 self
5214 }
5215 pub fn contents(&self) -> &super::Bcs {
5217 self.contents
5218 .as_ref()
5219 .map(|field| field as _)
5220 .unwrap_or_else(|| super::Bcs::default_instance() as _)
5221 }
5222 pub fn contents_opt_mut(&mut self) -> Option<&mut super::Bcs> {
5224 self.contents.as_mut().map(|field| field as _)
5225 }
5226 pub fn contents_mut(&mut self) -> &mut super::Bcs {
5229 self.contents.get_or_insert_default()
5230 }
5231 pub fn contents_opt(&self) -> Option<&super::Bcs> {
5233 self.contents.as_ref().map(|field| field as _)
5234 }
5235 pub fn set_contents<T: Into<super::Bcs>>(&mut self, field: T) {
5237 self.contents = Some(field.into().into());
5238 }
5239 pub fn with_contents<T: Into<super::Bcs>>(mut self, field: T) -> Self {
5241 self.set_contents(field.into());
5242 self
5243 }
5244 pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
5246 self.json.as_mut().map(|field| field as _)
5247 }
5248 pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
5251 self.json.get_or_insert_default()
5252 }
5253 pub fn json_opt(&self) -> Option<&::prost_types::Value> {
5255 self.json.as_ref().map(|field| field as _)
5256 }
5257 pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
5259 self.json = Some(field.into().into());
5260 }
5261 pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
5263 self.set_json(field.into());
5264 self
5265 }
5266 }
5267 impl super::EventDigestEntry {
5268 pub const fn const_default() -> Self {
5269 Self {
5270 event_index: None,
5271 digest: None,
5272 }
5273 }
5274 #[doc(hidden)]
5275 pub fn default_instance() -> &'static Self {
5276 static DEFAULT: super::EventDigestEntry = super::EventDigestEntry::const_default();
5277 &DEFAULT
5278 }
5279 pub fn event_index_opt_mut(&mut self) -> Option<&mut u64> {
5281 self.event_index.as_mut().map(|field| field as _)
5282 }
5283 pub fn event_index_mut(&mut self) -> &mut u64 {
5286 self.event_index.get_or_insert_default()
5287 }
5288 pub fn event_index_opt(&self) -> Option<u64> {
5290 self.event_index.as_ref().map(|field| *field)
5291 }
5292 pub fn set_event_index(&mut self, field: u64) {
5294 self.event_index = Some(field);
5295 }
5296 pub fn with_event_index(mut self, field: u64) -> Self {
5298 self.set_event_index(field);
5299 self
5300 }
5301 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
5303 self.digest.as_mut().map(|field| field as _)
5304 }
5305 pub fn digest_mut(&mut self) -> &mut String {
5308 self.digest.get_or_insert_default()
5309 }
5310 pub fn digest_opt(&self) -> Option<&str> {
5312 self.digest.as_ref().map(|field| field as _)
5313 }
5314 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
5316 self.digest = Some(field.into().into());
5317 }
5318 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
5320 self.set_digest(field.into());
5321 self
5322 }
5323 }
5324 impl super::ExecuteTransactionRequest {
5325 pub const fn const_default() -> Self {
5326 Self {
5327 transaction: None,
5328 signatures: Vec::new(),
5329 read_mask: None,
5330 }
5331 }
5332 #[doc(hidden)]
5333 pub fn default_instance() -> &'static Self {
5334 static DEFAULT: super::ExecuteTransactionRequest = super::ExecuteTransactionRequest::const_default();
5335 &DEFAULT
5336 }
5337 pub fn transaction(&self) -> &super::Transaction {
5339 self.transaction
5340 .as_ref()
5341 .map(|field| field as _)
5342 .unwrap_or_else(|| super::Transaction::default_instance() as _)
5343 }
5344 pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
5346 self.transaction.as_mut().map(|field| field as _)
5347 }
5348 pub fn transaction_mut(&mut self) -> &mut super::Transaction {
5351 self.transaction.get_or_insert_default()
5352 }
5353 pub fn transaction_opt(&self) -> Option<&super::Transaction> {
5355 self.transaction.as_ref().map(|field| field as _)
5356 }
5357 pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
5359 self.transaction = Some(field.into().into());
5360 }
5361 pub fn with_transaction<T: Into<super::Transaction>>(
5363 mut self,
5364 field: T,
5365 ) -> Self {
5366 self.set_transaction(field.into());
5367 self
5368 }
5369 pub fn signatures(&self) -> &[super::UserSignature] {
5371 &self.signatures
5372 }
5373 pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
5376 &mut self.signatures
5377 }
5378 pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
5380 self.signatures = field;
5381 }
5382 pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
5384 self.set_signatures(field);
5385 self
5386 }
5387 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
5389 self.read_mask.as_mut().map(|field| field as _)
5390 }
5391 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
5394 self.read_mask.get_or_insert_default()
5395 }
5396 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
5398 self.read_mask.as_ref().map(|field| field as _)
5399 }
5400 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
5402 self.read_mask = Some(field.into().into());
5403 }
5404 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
5406 mut self,
5407 field: T,
5408 ) -> Self {
5409 self.set_read_mask(field.into());
5410 self
5411 }
5412 }
5413 impl super::ExecuteTransactionResponse {
5414 pub const fn const_default() -> Self {
5415 Self { transaction: None }
5416 }
5417 #[doc(hidden)]
5418 pub fn default_instance() -> &'static Self {
5419 static DEFAULT: super::ExecuteTransactionResponse = super::ExecuteTransactionResponse::const_default();
5420 &DEFAULT
5421 }
5422 pub fn transaction(&self) -> &super::ExecutedTransaction {
5424 self.transaction
5425 .as_ref()
5426 .map(|field| field as _)
5427 .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
5428 }
5429 pub fn transaction_opt_mut(
5431 &mut self,
5432 ) -> Option<&mut super::ExecutedTransaction> {
5433 self.transaction.as_mut().map(|field| field as _)
5434 }
5435 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
5438 self.transaction.get_or_insert_default()
5439 }
5440 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
5442 self.transaction.as_ref().map(|field| field as _)
5443 }
5444 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
5446 &mut self,
5447 field: T,
5448 ) {
5449 self.transaction = Some(field.into().into());
5450 }
5451 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
5453 mut self,
5454 field: T,
5455 ) -> Self {
5456 self.set_transaction(field.into());
5457 self
5458 }
5459 }
5460 impl super::ExecutedTransaction {
5461 pub const fn const_default() -> Self {
5462 Self {
5463 digest: None,
5464 transaction: None,
5465 signatures: Vec::new(),
5466 effects: None,
5467 events: None,
5468 checkpoint: None,
5469 timestamp: None,
5470 balance_changes: Vec::new(),
5471 objects: None,
5472 }
5473 }
5474 #[doc(hidden)]
5475 pub fn default_instance() -> &'static Self {
5476 static DEFAULT: super::ExecutedTransaction = super::ExecutedTransaction::const_default();
5477 &DEFAULT
5478 }
5479 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
5481 self.digest.as_mut().map(|field| field as _)
5482 }
5483 pub fn digest_mut(&mut self) -> &mut String {
5486 self.digest.get_or_insert_default()
5487 }
5488 pub fn digest_opt(&self) -> Option<&str> {
5490 self.digest.as_ref().map(|field| field as _)
5491 }
5492 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
5494 self.digest = Some(field.into().into());
5495 }
5496 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
5498 self.set_digest(field.into());
5499 self
5500 }
5501 pub fn transaction(&self) -> &super::Transaction {
5503 self.transaction
5504 .as_ref()
5505 .map(|field| field as _)
5506 .unwrap_or_else(|| super::Transaction::default_instance() as _)
5507 }
5508 pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
5510 self.transaction.as_mut().map(|field| field as _)
5511 }
5512 pub fn transaction_mut(&mut self) -> &mut super::Transaction {
5515 self.transaction.get_or_insert_default()
5516 }
5517 pub fn transaction_opt(&self) -> Option<&super::Transaction> {
5519 self.transaction.as_ref().map(|field| field as _)
5520 }
5521 pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
5523 self.transaction = Some(field.into().into());
5524 }
5525 pub fn with_transaction<T: Into<super::Transaction>>(
5527 mut self,
5528 field: T,
5529 ) -> Self {
5530 self.set_transaction(field.into());
5531 self
5532 }
5533 pub fn signatures(&self) -> &[super::UserSignature] {
5535 &self.signatures
5536 }
5537 pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
5540 &mut self.signatures
5541 }
5542 pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
5544 self.signatures = field;
5545 }
5546 pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
5548 self.set_signatures(field);
5549 self
5550 }
5551 pub fn effects(&self) -> &super::TransactionEffects {
5553 self.effects
5554 .as_ref()
5555 .map(|field| field as _)
5556 .unwrap_or_else(|| super::TransactionEffects::default_instance() as _)
5557 }
5558 pub fn effects_opt_mut(&mut self) -> Option<&mut super::TransactionEffects> {
5560 self.effects.as_mut().map(|field| field as _)
5561 }
5562 pub fn effects_mut(&mut self) -> &mut super::TransactionEffects {
5565 self.effects.get_or_insert_default()
5566 }
5567 pub fn effects_opt(&self) -> Option<&super::TransactionEffects> {
5569 self.effects.as_ref().map(|field| field as _)
5570 }
5571 pub fn set_effects<T: Into<super::TransactionEffects>>(&mut self, field: T) {
5573 self.effects = Some(field.into().into());
5574 }
5575 pub fn with_effects<T: Into<super::TransactionEffects>>(
5577 mut self,
5578 field: T,
5579 ) -> Self {
5580 self.set_effects(field.into());
5581 self
5582 }
5583 pub fn events(&self) -> &super::TransactionEvents {
5585 self.events
5586 .as_ref()
5587 .map(|field| field as _)
5588 .unwrap_or_else(|| super::TransactionEvents::default_instance() as _)
5589 }
5590 pub fn events_opt_mut(&mut self) -> Option<&mut super::TransactionEvents> {
5592 self.events.as_mut().map(|field| field as _)
5593 }
5594 pub fn events_mut(&mut self) -> &mut super::TransactionEvents {
5597 self.events.get_or_insert_default()
5598 }
5599 pub fn events_opt(&self) -> Option<&super::TransactionEvents> {
5601 self.events.as_ref().map(|field| field as _)
5602 }
5603 pub fn set_events<T: Into<super::TransactionEvents>>(&mut self, field: T) {
5605 self.events = Some(field.into().into());
5606 }
5607 pub fn with_events<T: Into<super::TransactionEvents>>(
5609 mut self,
5610 field: T,
5611 ) -> Self {
5612 self.set_events(field.into());
5613 self
5614 }
5615 pub fn checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
5617 self.checkpoint.as_mut().map(|field| field as _)
5618 }
5619 pub fn checkpoint_mut(&mut self) -> &mut u64 {
5622 self.checkpoint.get_or_insert_default()
5623 }
5624 pub fn checkpoint_opt(&self) -> Option<u64> {
5626 self.checkpoint.as_ref().map(|field| *field)
5627 }
5628 pub fn set_checkpoint(&mut self, field: u64) {
5630 self.checkpoint = Some(field);
5631 }
5632 pub fn with_checkpoint(mut self, field: u64) -> Self {
5634 self.set_checkpoint(field);
5635 self
5636 }
5637 pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
5639 self.timestamp.as_mut().map(|field| field as _)
5640 }
5641 pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
5644 self.timestamp.get_or_insert_default()
5645 }
5646 pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
5648 self.timestamp.as_ref().map(|field| field as _)
5649 }
5650 pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
5652 self.timestamp = Some(field.into().into());
5653 }
5654 pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
5656 mut self,
5657 field: T,
5658 ) -> Self {
5659 self.set_timestamp(field.into());
5660 self
5661 }
5662 pub fn balance_changes(&self) -> &[super::BalanceChange] {
5664 &self.balance_changes
5665 }
5666 pub fn balance_changes_mut(&mut self) -> &mut Vec<super::BalanceChange> {
5669 &mut self.balance_changes
5670 }
5671 pub fn set_balance_changes(&mut self, field: Vec<super::BalanceChange>) {
5673 self.balance_changes = field;
5674 }
5675 pub fn with_balance_changes(mut self, field: Vec<super::BalanceChange>) -> Self {
5677 self.set_balance_changes(field);
5678 self
5679 }
5680 pub fn objects(&self) -> &super::ObjectSet {
5682 self.objects
5683 .as_ref()
5684 .map(|field| field as _)
5685 .unwrap_or_else(|| super::ObjectSet::default_instance() as _)
5686 }
5687 pub fn objects_opt_mut(&mut self) -> Option<&mut super::ObjectSet> {
5689 self.objects.as_mut().map(|field| field as _)
5690 }
5691 pub fn objects_mut(&mut self) -> &mut super::ObjectSet {
5694 self.objects.get_or_insert_default()
5695 }
5696 pub fn objects_opt(&self) -> Option<&super::ObjectSet> {
5698 self.objects.as_ref().map(|field| field as _)
5699 }
5700 pub fn set_objects<T: Into<super::ObjectSet>>(&mut self, field: T) {
5702 self.objects = Some(field.into().into());
5703 }
5704 pub fn with_objects<T: Into<super::ObjectSet>>(mut self, field: T) -> Self {
5706 self.set_objects(field.into());
5707 self
5708 }
5709 }
5710 impl super::ExecutionError {
5711 pub const fn const_default() -> Self {
5712 Self {
5713 description: None,
5714 command: None,
5715 kind: None,
5716 error_details: None,
5717 }
5718 }
5719 #[doc(hidden)]
5720 pub fn default_instance() -> &'static Self {
5721 static DEFAULT: super::ExecutionError = super::ExecutionError::const_default();
5722 &DEFAULT
5723 }
5724 pub fn description_opt_mut(&mut self) -> Option<&mut String> {
5726 self.description.as_mut().map(|field| field as _)
5727 }
5728 pub fn description_mut(&mut self) -> &mut String {
5731 self.description.get_or_insert_default()
5732 }
5733 pub fn description_opt(&self) -> Option<&str> {
5735 self.description.as_ref().map(|field| field as _)
5736 }
5737 pub fn set_description<T: Into<String>>(&mut self, field: T) {
5739 self.description = Some(field.into().into());
5740 }
5741 pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
5743 self.set_description(field.into());
5744 self
5745 }
5746 pub fn command_opt_mut(&mut self) -> Option<&mut u64> {
5748 self.command.as_mut().map(|field| field as _)
5749 }
5750 pub fn command_mut(&mut self) -> &mut u64 {
5753 self.command.get_or_insert_default()
5754 }
5755 pub fn command_opt(&self) -> Option<u64> {
5757 self.command.as_ref().map(|field| *field)
5758 }
5759 pub fn set_command(&mut self, field: u64) {
5761 self.command = Some(field);
5762 }
5763 pub fn with_command(mut self, field: u64) -> Self {
5765 self.set_command(field);
5766 self
5767 }
5768 pub fn with_kind<T: Into<super::execution_error::ExecutionErrorKind>>(
5770 mut self,
5771 field: T,
5772 ) -> Self {
5773 self.set_kind(field.into());
5774 self
5775 }
5776 pub fn abort(&self) -> &super::MoveAbort {
5778 if let Some(super::execution_error::ErrorDetails::Abort(field)) = &self
5779 .error_details
5780 {
5781 field as _
5782 } else {
5783 super::MoveAbort::default_instance() as _
5784 }
5785 }
5786 pub fn abort_opt(&self) -> Option<&super::MoveAbort> {
5788 if let Some(super::execution_error::ErrorDetails::Abort(field)) = &self
5789 .error_details
5790 {
5791 Some(field as _)
5792 } else {
5793 None
5794 }
5795 }
5796 pub fn abort_opt_mut(&mut self) -> Option<&mut super::MoveAbort> {
5798 if let Some(super::execution_error::ErrorDetails::Abort(field)) = &mut self
5799 .error_details
5800 {
5801 Some(field as _)
5802 } else {
5803 None
5804 }
5805 }
5806 pub fn abort_mut(&mut self) -> &mut super::MoveAbort {
5810 if self.abort_opt_mut().is_none() {
5811 self.error_details = Some(
5812 super::execution_error::ErrorDetails::Abort(
5813 super::MoveAbort::default(),
5814 ),
5815 );
5816 }
5817 self.abort_opt_mut().unwrap()
5818 }
5819 pub fn set_abort<T: Into<super::MoveAbort>>(&mut self, field: T) {
5822 self.error_details = Some(
5823 super::execution_error::ErrorDetails::Abort(field.into().into()),
5824 );
5825 }
5826 pub fn with_abort<T: Into<super::MoveAbort>>(mut self, field: T) -> Self {
5829 self.set_abort(field.into());
5830 self
5831 }
5832 pub fn size_error(&self) -> &super::SizeError {
5834 if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &self
5835 .error_details
5836 {
5837 field as _
5838 } else {
5839 super::SizeError::default_instance() as _
5840 }
5841 }
5842 pub fn size_error_opt(&self) -> Option<&super::SizeError> {
5844 if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &self
5845 .error_details
5846 {
5847 Some(field as _)
5848 } else {
5849 None
5850 }
5851 }
5852 pub fn size_error_opt_mut(&mut self) -> Option<&mut super::SizeError> {
5854 if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &mut self
5855 .error_details
5856 {
5857 Some(field as _)
5858 } else {
5859 None
5860 }
5861 }
5862 pub fn size_error_mut(&mut self) -> &mut super::SizeError {
5866 if self.size_error_opt_mut().is_none() {
5867 self.error_details = Some(
5868 super::execution_error::ErrorDetails::SizeError(
5869 super::SizeError::default(),
5870 ),
5871 );
5872 }
5873 self.size_error_opt_mut().unwrap()
5874 }
5875 pub fn set_size_error<T: Into<super::SizeError>>(&mut self, field: T) {
5878 self.error_details = Some(
5879 super::execution_error::ErrorDetails::SizeError(field.into().into()),
5880 );
5881 }
5882 pub fn with_size_error<T: Into<super::SizeError>>(mut self, field: T) -> Self {
5885 self.set_size_error(field.into());
5886 self
5887 }
5888 pub fn command_argument_error(&self) -> &super::CommandArgumentError {
5890 if let Some(
5891 super::execution_error::ErrorDetails::CommandArgumentError(field),
5892 ) = &self.error_details
5893 {
5894 field as _
5895 } else {
5896 super::CommandArgumentError::default_instance() as _
5897 }
5898 }
5899 pub fn command_argument_error_opt(
5901 &self,
5902 ) -> Option<&super::CommandArgumentError> {
5903 if let Some(
5904 super::execution_error::ErrorDetails::CommandArgumentError(field),
5905 ) = &self.error_details
5906 {
5907 Some(field as _)
5908 } else {
5909 None
5910 }
5911 }
5912 pub fn command_argument_error_opt_mut(
5914 &mut self,
5915 ) -> Option<&mut super::CommandArgumentError> {
5916 if let Some(
5917 super::execution_error::ErrorDetails::CommandArgumentError(field),
5918 ) = &mut self.error_details
5919 {
5920 Some(field as _)
5921 } else {
5922 None
5923 }
5924 }
5925 pub fn command_argument_error_mut(
5929 &mut self,
5930 ) -> &mut super::CommandArgumentError {
5931 if self.command_argument_error_opt_mut().is_none() {
5932 self.error_details = Some(
5933 super::execution_error::ErrorDetails::CommandArgumentError(
5934 super::CommandArgumentError::default(),
5935 ),
5936 );
5937 }
5938 self.command_argument_error_opt_mut().unwrap()
5939 }
5940 pub fn set_command_argument_error<T: Into<super::CommandArgumentError>>(
5943 &mut self,
5944 field: T,
5945 ) {
5946 self.error_details = Some(
5947 super::execution_error::ErrorDetails::CommandArgumentError(
5948 field.into().into(),
5949 ),
5950 );
5951 }
5952 pub fn with_command_argument_error<T: Into<super::CommandArgumentError>>(
5955 mut self,
5956 field: T,
5957 ) -> Self {
5958 self.set_command_argument_error(field.into());
5959 self
5960 }
5961 pub fn type_argument_error(&self) -> &super::TypeArgumentError {
5963 if let Some(
5964 super::execution_error::ErrorDetails::TypeArgumentError(field),
5965 ) = &self.error_details
5966 {
5967 field as _
5968 } else {
5969 super::TypeArgumentError::default_instance() as _
5970 }
5971 }
5972 pub fn type_argument_error_opt(&self) -> Option<&super::TypeArgumentError> {
5974 if let Some(
5975 super::execution_error::ErrorDetails::TypeArgumentError(field),
5976 ) = &self.error_details
5977 {
5978 Some(field as _)
5979 } else {
5980 None
5981 }
5982 }
5983 pub fn type_argument_error_opt_mut(
5985 &mut self,
5986 ) -> Option<&mut super::TypeArgumentError> {
5987 if let Some(
5988 super::execution_error::ErrorDetails::TypeArgumentError(field),
5989 ) = &mut self.error_details
5990 {
5991 Some(field as _)
5992 } else {
5993 None
5994 }
5995 }
5996 pub fn type_argument_error_mut(&mut self) -> &mut super::TypeArgumentError {
6000 if self.type_argument_error_opt_mut().is_none() {
6001 self.error_details = Some(
6002 super::execution_error::ErrorDetails::TypeArgumentError(
6003 super::TypeArgumentError::default(),
6004 ),
6005 );
6006 }
6007 self.type_argument_error_opt_mut().unwrap()
6008 }
6009 pub fn set_type_argument_error<T: Into<super::TypeArgumentError>>(
6012 &mut self,
6013 field: T,
6014 ) {
6015 self.error_details = Some(
6016 super::execution_error::ErrorDetails::TypeArgumentError(
6017 field.into().into(),
6018 ),
6019 );
6020 }
6021 pub fn with_type_argument_error<T: Into<super::TypeArgumentError>>(
6024 mut self,
6025 field: T,
6026 ) -> Self {
6027 self.set_type_argument_error(field.into());
6028 self
6029 }
6030 pub fn package_upgrade_error(&self) -> &super::PackageUpgradeError {
6032 if let Some(
6033 super::execution_error::ErrorDetails::PackageUpgradeError(field),
6034 ) = &self.error_details
6035 {
6036 field as _
6037 } else {
6038 super::PackageUpgradeError::default_instance() as _
6039 }
6040 }
6041 pub fn package_upgrade_error_opt(&self) -> Option<&super::PackageUpgradeError> {
6043 if let Some(
6044 super::execution_error::ErrorDetails::PackageUpgradeError(field),
6045 ) = &self.error_details
6046 {
6047 Some(field as _)
6048 } else {
6049 None
6050 }
6051 }
6052 pub fn package_upgrade_error_opt_mut(
6054 &mut self,
6055 ) -> Option<&mut super::PackageUpgradeError> {
6056 if let Some(
6057 super::execution_error::ErrorDetails::PackageUpgradeError(field),
6058 ) = &mut self.error_details
6059 {
6060 Some(field as _)
6061 } else {
6062 None
6063 }
6064 }
6065 pub fn package_upgrade_error_mut(&mut self) -> &mut super::PackageUpgradeError {
6069 if self.package_upgrade_error_opt_mut().is_none() {
6070 self.error_details = Some(
6071 super::execution_error::ErrorDetails::PackageUpgradeError(
6072 super::PackageUpgradeError::default(),
6073 ),
6074 );
6075 }
6076 self.package_upgrade_error_opt_mut().unwrap()
6077 }
6078 pub fn set_package_upgrade_error<T: Into<super::PackageUpgradeError>>(
6081 &mut self,
6082 field: T,
6083 ) {
6084 self.error_details = Some(
6085 super::execution_error::ErrorDetails::PackageUpgradeError(
6086 field.into().into(),
6087 ),
6088 );
6089 }
6090 pub fn with_package_upgrade_error<T: Into<super::PackageUpgradeError>>(
6093 mut self,
6094 field: T,
6095 ) -> Self {
6096 self.set_package_upgrade_error(field.into());
6097 self
6098 }
6099 pub fn index_error(&self) -> &super::IndexError {
6101 if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &self
6102 .error_details
6103 {
6104 field as _
6105 } else {
6106 super::IndexError::default_instance() as _
6107 }
6108 }
6109 pub fn index_error_opt(&self) -> Option<&super::IndexError> {
6111 if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &self
6112 .error_details
6113 {
6114 Some(field as _)
6115 } else {
6116 None
6117 }
6118 }
6119 pub fn index_error_opt_mut(&mut self) -> Option<&mut super::IndexError> {
6121 if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &mut self
6122 .error_details
6123 {
6124 Some(field as _)
6125 } else {
6126 None
6127 }
6128 }
6129 pub fn index_error_mut(&mut self) -> &mut super::IndexError {
6133 if self.index_error_opt_mut().is_none() {
6134 self.error_details = Some(
6135 super::execution_error::ErrorDetails::IndexError(
6136 super::IndexError::default(),
6137 ),
6138 );
6139 }
6140 self.index_error_opt_mut().unwrap()
6141 }
6142 pub fn set_index_error<T: Into<super::IndexError>>(&mut self, field: T) {
6145 self.error_details = Some(
6146 super::execution_error::ErrorDetails::IndexError(field.into().into()),
6147 );
6148 }
6149 pub fn with_index_error<T: Into<super::IndexError>>(mut self, field: T) -> Self {
6152 self.set_index_error(field.into());
6153 self
6154 }
6155 pub fn object_id(&self) -> &str {
6157 if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &self
6158 .error_details
6159 {
6160 field as _
6161 } else {
6162 ""
6163 }
6164 }
6165 pub fn object_id_opt(&self) -> Option<&str> {
6167 if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &self
6168 .error_details
6169 {
6170 Some(field as _)
6171 } else {
6172 None
6173 }
6174 }
6175 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
6177 if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &mut self
6178 .error_details
6179 {
6180 Some(field as _)
6181 } else {
6182 None
6183 }
6184 }
6185 pub fn object_id_mut(&mut self) -> &mut String {
6189 if self.object_id_opt_mut().is_none() {
6190 self.error_details = Some(
6191 super::execution_error::ErrorDetails::ObjectId(String::default()),
6192 );
6193 }
6194 self.object_id_opt_mut().unwrap()
6195 }
6196 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
6199 self.error_details = Some(
6200 super::execution_error::ErrorDetails::ObjectId(field.into().into()),
6201 );
6202 }
6203 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
6206 self.set_object_id(field.into());
6207 self
6208 }
6209 pub fn coin_deny_list_error(&self) -> &super::CoinDenyListError {
6211 if let Some(
6212 super::execution_error::ErrorDetails::CoinDenyListError(field),
6213 ) = &self.error_details
6214 {
6215 field as _
6216 } else {
6217 super::CoinDenyListError::default_instance() as _
6218 }
6219 }
6220 pub fn coin_deny_list_error_opt(&self) -> Option<&super::CoinDenyListError> {
6222 if let Some(
6223 super::execution_error::ErrorDetails::CoinDenyListError(field),
6224 ) = &self.error_details
6225 {
6226 Some(field as _)
6227 } else {
6228 None
6229 }
6230 }
6231 pub fn coin_deny_list_error_opt_mut(
6233 &mut self,
6234 ) -> Option<&mut super::CoinDenyListError> {
6235 if let Some(
6236 super::execution_error::ErrorDetails::CoinDenyListError(field),
6237 ) = &mut self.error_details
6238 {
6239 Some(field as _)
6240 } else {
6241 None
6242 }
6243 }
6244 pub fn coin_deny_list_error_mut(&mut self) -> &mut super::CoinDenyListError {
6248 if self.coin_deny_list_error_opt_mut().is_none() {
6249 self.error_details = Some(
6250 super::execution_error::ErrorDetails::CoinDenyListError(
6251 super::CoinDenyListError::default(),
6252 ),
6253 );
6254 }
6255 self.coin_deny_list_error_opt_mut().unwrap()
6256 }
6257 pub fn set_coin_deny_list_error<T: Into<super::CoinDenyListError>>(
6260 &mut self,
6261 field: T,
6262 ) {
6263 self.error_details = Some(
6264 super::execution_error::ErrorDetails::CoinDenyListError(
6265 field.into().into(),
6266 ),
6267 );
6268 }
6269 pub fn with_coin_deny_list_error<T: Into<super::CoinDenyListError>>(
6272 mut self,
6273 field: T,
6274 ) -> Self {
6275 self.set_coin_deny_list_error(field.into());
6276 self
6277 }
6278 pub fn congested_objects(&self) -> &super::CongestedObjects {
6280 if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &self
6281 .error_details
6282 {
6283 field as _
6284 } else {
6285 super::CongestedObjects::default_instance() as _
6286 }
6287 }
6288 pub fn congested_objects_opt(&self) -> Option<&super::CongestedObjects> {
6290 if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &self
6291 .error_details
6292 {
6293 Some(field as _)
6294 } else {
6295 None
6296 }
6297 }
6298 pub fn congested_objects_opt_mut(
6300 &mut self,
6301 ) -> Option<&mut super::CongestedObjects> {
6302 if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &mut self
6303 .error_details
6304 {
6305 Some(field as _)
6306 } else {
6307 None
6308 }
6309 }
6310 pub fn congested_objects_mut(&mut self) -> &mut super::CongestedObjects {
6314 if self.congested_objects_opt_mut().is_none() {
6315 self.error_details = Some(
6316 super::execution_error::ErrorDetails::CongestedObjects(
6317 super::CongestedObjects::default(),
6318 ),
6319 );
6320 }
6321 self.congested_objects_opt_mut().unwrap()
6322 }
6323 pub fn set_congested_objects<T: Into<super::CongestedObjects>>(
6326 &mut self,
6327 field: T,
6328 ) {
6329 self.error_details = Some(
6330 super::execution_error::ErrorDetails::CongestedObjects(
6331 field.into().into(),
6332 ),
6333 );
6334 }
6335 pub fn with_congested_objects<T: Into<super::CongestedObjects>>(
6338 mut self,
6339 field: T,
6340 ) -> Self {
6341 self.set_congested_objects(field.into());
6342 self
6343 }
6344 }
6345 impl super::ExecutionStatus {
6346 pub const fn const_default() -> Self {
6347 Self { success: None, error: None }
6348 }
6349 #[doc(hidden)]
6350 pub fn default_instance() -> &'static Self {
6351 static DEFAULT: super::ExecutionStatus = super::ExecutionStatus::const_default();
6352 &DEFAULT
6353 }
6354 pub fn success_opt_mut(&mut self) -> Option<&mut bool> {
6356 self.success.as_mut().map(|field| field as _)
6357 }
6358 pub fn success_mut(&mut self) -> &mut bool {
6361 self.success.get_or_insert_default()
6362 }
6363 pub fn success_opt(&self) -> Option<bool> {
6365 self.success.as_ref().map(|field| *field)
6366 }
6367 pub fn set_success(&mut self, field: bool) {
6369 self.success = Some(field);
6370 }
6371 pub fn with_success(mut self, field: bool) -> Self {
6373 self.set_success(field);
6374 self
6375 }
6376 pub fn error(&self) -> &super::ExecutionError {
6378 self.error
6379 .as_ref()
6380 .map(|field| field as _)
6381 .unwrap_or_else(|| super::ExecutionError::default_instance() as _)
6382 }
6383 pub fn error_opt_mut(&mut self) -> Option<&mut super::ExecutionError> {
6385 self.error.as_mut().map(|field| field as _)
6386 }
6387 pub fn error_mut(&mut self) -> &mut super::ExecutionError {
6390 self.error.get_or_insert_default()
6391 }
6392 pub fn error_opt(&self) -> Option<&super::ExecutionError> {
6394 self.error.as_ref().map(|field| field as _)
6395 }
6396 pub fn set_error<T: Into<super::ExecutionError>>(&mut self, field: T) {
6398 self.error = Some(field.into().into());
6399 }
6400 pub fn with_error<T: Into<super::ExecutionError>>(mut self, field: T) -> Self {
6402 self.set_error(field.into());
6403 self
6404 }
6405 }
6406 impl super::ExecutionTimeObservation {
6407 pub const fn const_default() -> Self {
6408 Self {
6409 kind: None,
6410 move_entry_point: None,
6411 validator_observations: Vec::new(),
6412 }
6413 }
6414 #[doc(hidden)]
6415 pub fn default_instance() -> &'static Self {
6416 static DEFAULT: super::ExecutionTimeObservation = super::ExecutionTimeObservation::const_default();
6417 &DEFAULT
6418 }
6419 pub fn with_kind<
6421 T: Into<super::execution_time_observation::ExecutionTimeObservationKind>,
6422 >(mut self, field: T) -> Self {
6423 self.set_kind(field.into());
6424 self
6425 }
6426 pub fn move_entry_point(&self) -> &super::MoveCall {
6428 self.move_entry_point
6429 .as_ref()
6430 .map(|field| field as _)
6431 .unwrap_or_else(|| super::MoveCall::default_instance() as _)
6432 }
6433 pub fn move_entry_point_opt_mut(&mut self) -> Option<&mut super::MoveCall> {
6435 self.move_entry_point.as_mut().map(|field| field as _)
6436 }
6437 pub fn move_entry_point_mut(&mut self) -> &mut super::MoveCall {
6440 self.move_entry_point.get_or_insert_default()
6441 }
6442 pub fn move_entry_point_opt(&self) -> Option<&super::MoveCall> {
6444 self.move_entry_point.as_ref().map(|field| field as _)
6445 }
6446 pub fn set_move_entry_point<T: Into<super::MoveCall>>(&mut self, field: T) {
6448 self.move_entry_point = Some(field.into().into());
6449 }
6450 pub fn with_move_entry_point<T: Into<super::MoveCall>>(
6452 mut self,
6453 field: T,
6454 ) -> Self {
6455 self.set_move_entry_point(field.into());
6456 self
6457 }
6458 pub fn validator_observations(
6460 &self,
6461 ) -> &[super::ValidatorExecutionTimeObservation] {
6462 &self.validator_observations
6463 }
6464 pub fn validator_observations_mut(
6467 &mut self,
6468 ) -> &mut Vec<super::ValidatorExecutionTimeObservation> {
6469 &mut self.validator_observations
6470 }
6471 pub fn set_validator_observations(
6473 &mut self,
6474 field: Vec<super::ValidatorExecutionTimeObservation>,
6475 ) {
6476 self.validator_observations = field;
6477 }
6478 pub fn with_validator_observations(
6480 mut self,
6481 field: Vec<super::ValidatorExecutionTimeObservation>,
6482 ) -> Self {
6483 self.set_validator_observations(field);
6484 self
6485 }
6486 }
6487 impl super::ExecutionTimeObservations {
6488 pub const fn const_default() -> Self {
6489 Self {
6490 version: None,
6491 observations: Vec::new(),
6492 }
6493 }
6494 #[doc(hidden)]
6495 pub fn default_instance() -> &'static Self {
6496 static DEFAULT: super::ExecutionTimeObservations = super::ExecutionTimeObservations::const_default();
6497 &DEFAULT
6498 }
6499 pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
6501 self.version.as_mut().map(|field| field as _)
6502 }
6503 pub fn version_mut(&mut self) -> &mut i32 {
6506 self.version.get_or_insert_default()
6507 }
6508 pub fn version_opt(&self) -> Option<i32> {
6510 self.version.as_ref().map(|field| *field)
6511 }
6512 pub fn set_version(&mut self, field: i32) {
6514 self.version = Some(field);
6515 }
6516 pub fn with_version(mut self, field: i32) -> Self {
6518 self.set_version(field);
6519 self
6520 }
6521 pub fn observations(&self) -> &[super::ExecutionTimeObservation] {
6523 &self.observations
6524 }
6525 pub fn observations_mut(&mut self) -> &mut Vec<super::ExecutionTimeObservation> {
6528 &mut self.observations
6529 }
6530 pub fn set_observations(&mut self, field: Vec<super::ExecutionTimeObservation>) {
6532 self.observations = field;
6533 }
6534 pub fn with_observations(
6536 mut self,
6537 field: Vec<super::ExecutionTimeObservation>,
6538 ) -> Self {
6539 self.set_observations(field);
6540 self
6541 }
6542 }
6543 impl super::FieldDescriptor {
6544 pub const fn const_default() -> Self {
6545 Self {
6546 name: None,
6547 position: None,
6548 r#type: None,
6549 }
6550 }
6551 #[doc(hidden)]
6552 pub fn default_instance() -> &'static Self {
6553 static DEFAULT: super::FieldDescriptor = super::FieldDescriptor::const_default();
6554 &DEFAULT
6555 }
6556 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
6558 self.name.as_mut().map(|field| field as _)
6559 }
6560 pub fn name_mut(&mut self) -> &mut String {
6563 self.name.get_or_insert_default()
6564 }
6565 pub fn name_opt(&self) -> Option<&str> {
6567 self.name.as_ref().map(|field| field as _)
6568 }
6569 pub fn set_name<T: Into<String>>(&mut self, field: T) {
6571 self.name = Some(field.into().into());
6572 }
6573 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
6575 self.set_name(field.into());
6576 self
6577 }
6578 pub fn position_opt_mut(&mut self) -> Option<&mut u32> {
6580 self.position.as_mut().map(|field| field as _)
6581 }
6582 pub fn position_mut(&mut self) -> &mut u32 {
6585 self.position.get_or_insert_default()
6586 }
6587 pub fn position_opt(&self) -> Option<u32> {
6589 self.position.as_ref().map(|field| *field)
6590 }
6591 pub fn set_position(&mut self, field: u32) {
6593 self.position = Some(field);
6594 }
6595 pub fn with_position(mut self, field: u32) -> Self {
6597 self.set_position(field);
6598 self
6599 }
6600 pub fn r#type(&self) -> &super::OpenSignatureBody {
6602 self.r#type
6603 .as_ref()
6604 .map(|field| field as _)
6605 .unwrap_or_else(|| super::OpenSignatureBody::default_instance() as _)
6606 }
6607 pub fn type_opt_mut(&mut self) -> Option<&mut super::OpenSignatureBody> {
6609 self.r#type.as_mut().map(|field| field as _)
6610 }
6611 pub fn type_mut(&mut self) -> &mut super::OpenSignatureBody {
6614 self.r#type.get_or_insert_default()
6615 }
6616 pub fn type_opt(&self) -> Option<&super::OpenSignatureBody> {
6618 self.r#type.as_ref().map(|field| field as _)
6619 }
6620 pub fn set_type<T: Into<super::OpenSignatureBody>>(&mut self, field: T) {
6622 self.r#type = Some(field.into().into());
6623 }
6624 pub fn with_type<T: Into<super::OpenSignatureBody>>(mut self, field: T) -> Self {
6626 self.set_type(field.into());
6627 self
6628 }
6629 }
6630 impl super::FunctionDescriptor {
6631 pub const fn const_default() -> Self {
6632 Self {
6633 name: None,
6634 visibility: None,
6635 is_entry: None,
6636 type_parameters: Vec::new(),
6637 parameters: Vec::new(),
6638 returns: Vec::new(),
6639 }
6640 }
6641 #[doc(hidden)]
6642 pub fn default_instance() -> &'static Self {
6643 static DEFAULT: super::FunctionDescriptor = super::FunctionDescriptor::const_default();
6644 &DEFAULT
6645 }
6646 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
6648 self.name.as_mut().map(|field| field as _)
6649 }
6650 pub fn name_mut(&mut self) -> &mut String {
6653 self.name.get_or_insert_default()
6654 }
6655 pub fn name_opt(&self) -> Option<&str> {
6657 self.name.as_ref().map(|field| field as _)
6658 }
6659 pub fn set_name<T: Into<String>>(&mut self, field: T) {
6661 self.name = Some(field.into().into());
6662 }
6663 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
6665 self.set_name(field.into());
6666 self
6667 }
6668 pub fn with_visibility<T: Into<super::function_descriptor::Visibility>>(
6670 mut self,
6671 field: T,
6672 ) -> Self {
6673 self.set_visibility(field.into());
6674 self
6675 }
6676 pub fn is_entry_opt_mut(&mut self) -> Option<&mut bool> {
6678 self.is_entry.as_mut().map(|field| field as _)
6679 }
6680 pub fn is_entry_mut(&mut self) -> &mut bool {
6683 self.is_entry.get_or_insert_default()
6684 }
6685 pub fn is_entry_opt(&self) -> Option<bool> {
6687 self.is_entry.as_ref().map(|field| *field)
6688 }
6689 pub fn set_is_entry(&mut self, field: bool) {
6691 self.is_entry = Some(field);
6692 }
6693 pub fn with_is_entry(mut self, field: bool) -> Self {
6695 self.set_is_entry(field);
6696 self
6697 }
6698 pub fn type_parameters(&self) -> &[super::TypeParameter] {
6700 &self.type_parameters
6701 }
6702 pub fn type_parameters_mut(&mut self) -> &mut Vec<super::TypeParameter> {
6705 &mut self.type_parameters
6706 }
6707 pub fn set_type_parameters(&mut self, field: Vec<super::TypeParameter>) {
6709 self.type_parameters = field;
6710 }
6711 pub fn with_type_parameters(mut self, field: Vec<super::TypeParameter>) -> Self {
6713 self.set_type_parameters(field);
6714 self
6715 }
6716 pub fn parameters(&self) -> &[super::OpenSignature] {
6718 &self.parameters
6719 }
6720 pub fn parameters_mut(&mut self) -> &mut Vec<super::OpenSignature> {
6723 &mut self.parameters
6724 }
6725 pub fn set_parameters(&mut self, field: Vec<super::OpenSignature>) {
6727 self.parameters = field;
6728 }
6729 pub fn with_parameters(mut self, field: Vec<super::OpenSignature>) -> Self {
6731 self.set_parameters(field);
6732 self
6733 }
6734 pub fn returns(&self) -> &[super::OpenSignature] {
6736 &self.returns
6737 }
6738 pub fn returns_mut(&mut self) -> &mut Vec<super::OpenSignature> {
6741 &mut self.returns
6742 }
6743 pub fn set_returns(&mut self, field: Vec<super::OpenSignature>) {
6745 self.returns = field;
6746 }
6747 pub fn with_returns(mut self, field: Vec<super::OpenSignature>) -> Self {
6749 self.set_returns(field);
6750 self
6751 }
6752 }
6753 impl super::FundsWithdrawal {
6754 pub const fn const_default() -> Self {
6755 Self {
6756 amount: None,
6757 coin_type: None,
6758 source: None,
6759 }
6760 }
6761 #[doc(hidden)]
6762 pub fn default_instance() -> &'static Self {
6763 static DEFAULT: super::FundsWithdrawal = super::FundsWithdrawal::const_default();
6764 &DEFAULT
6765 }
6766 pub fn amount_opt_mut(&mut self) -> Option<&mut u64> {
6768 self.amount.as_mut().map(|field| field as _)
6769 }
6770 pub fn amount_mut(&mut self) -> &mut u64 {
6773 self.amount.get_or_insert_default()
6774 }
6775 pub fn amount_opt(&self) -> Option<u64> {
6777 self.amount.as_ref().map(|field| *field)
6778 }
6779 pub fn set_amount(&mut self, field: u64) {
6781 self.amount = Some(field);
6782 }
6783 pub fn with_amount(mut self, field: u64) -> Self {
6785 self.set_amount(field);
6786 self
6787 }
6788 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
6790 self.coin_type.as_mut().map(|field| field as _)
6791 }
6792 pub fn coin_type_mut(&mut self) -> &mut String {
6795 self.coin_type.get_or_insert_default()
6796 }
6797 pub fn coin_type_opt(&self) -> Option<&str> {
6799 self.coin_type.as_ref().map(|field| field as _)
6800 }
6801 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
6803 self.coin_type = Some(field.into().into());
6804 }
6805 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
6807 self.set_coin_type(field.into());
6808 self
6809 }
6810 pub fn with_source<T: Into<super::funds_withdrawal::Source>>(
6812 mut self,
6813 field: T,
6814 ) -> Self {
6815 self.set_source(field.into());
6816 self
6817 }
6818 }
6819 impl super::GasCostSummary {
6820 pub const fn const_default() -> Self {
6821 Self {
6822 computation_cost: None,
6823 storage_cost: None,
6824 storage_rebate: None,
6825 non_refundable_storage_fee: None,
6826 }
6827 }
6828 #[doc(hidden)]
6829 pub fn default_instance() -> &'static Self {
6830 static DEFAULT: super::GasCostSummary = super::GasCostSummary::const_default();
6831 &DEFAULT
6832 }
6833 pub fn computation_cost_opt_mut(&mut self) -> Option<&mut u64> {
6835 self.computation_cost.as_mut().map(|field| field as _)
6836 }
6837 pub fn computation_cost_mut(&mut self) -> &mut u64 {
6840 self.computation_cost.get_or_insert_default()
6841 }
6842 pub fn computation_cost_opt(&self) -> Option<u64> {
6844 self.computation_cost.as_ref().map(|field| *field)
6845 }
6846 pub fn set_computation_cost(&mut self, field: u64) {
6848 self.computation_cost = Some(field);
6849 }
6850 pub fn with_computation_cost(mut self, field: u64) -> Self {
6852 self.set_computation_cost(field);
6853 self
6854 }
6855 pub fn storage_cost_opt_mut(&mut self) -> Option<&mut u64> {
6857 self.storage_cost.as_mut().map(|field| field as _)
6858 }
6859 pub fn storage_cost_mut(&mut self) -> &mut u64 {
6862 self.storage_cost.get_or_insert_default()
6863 }
6864 pub fn storage_cost_opt(&self) -> Option<u64> {
6866 self.storage_cost.as_ref().map(|field| *field)
6867 }
6868 pub fn set_storage_cost(&mut self, field: u64) {
6870 self.storage_cost = Some(field);
6871 }
6872 pub fn with_storage_cost(mut self, field: u64) -> Self {
6874 self.set_storage_cost(field);
6875 self
6876 }
6877 pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
6879 self.storage_rebate.as_mut().map(|field| field as _)
6880 }
6881 pub fn storage_rebate_mut(&mut self) -> &mut u64 {
6884 self.storage_rebate.get_or_insert_default()
6885 }
6886 pub fn storage_rebate_opt(&self) -> Option<u64> {
6888 self.storage_rebate.as_ref().map(|field| *field)
6889 }
6890 pub fn set_storage_rebate(&mut self, field: u64) {
6892 self.storage_rebate = Some(field);
6893 }
6894 pub fn with_storage_rebate(mut self, field: u64) -> Self {
6896 self.set_storage_rebate(field);
6897 self
6898 }
6899 pub fn non_refundable_storage_fee_opt_mut(&mut self) -> Option<&mut u64> {
6901 self.non_refundable_storage_fee.as_mut().map(|field| field as _)
6902 }
6903 pub fn non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
6906 self.non_refundable_storage_fee.get_or_insert_default()
6907 }
6908 pub fn non_refundable_storage_fee_opt(&self) -> Option<u64> {
6910 self.non_refundable_storage_fee.as_ref().map(|field| *field)
6911 }
6912 pub fn set_non_refundable_storage_fee(&mut self, field: u64) {
6914 self.non_refundable_storage_fee = Some(field);
6915 }
6916 pub fn with_non_refundable_storage_fee(mut self, field: u64) -> Self {
6918 self.set_non_refundable_storage_fee(field);
6919 self
6920 }
6921 }
6922 impl super::GasPayment {
6923 pub const fn const_default() -> Self {
6924 Self {
6925 objects: Vec::new(),
6926 owner: None,
6927 price: None,
6928 budget: None,
6929 }
6930 }
6931 #[doc(hidden)]
6932 pub fn default_instance() -> &'static Self {
6933 static DEFAULT: super::GasPayment = super::GasPayment::const_default();
6934 &DEFAULT
6935 }
6936 pub fn objects(&self) -> &[super::ObjectReference] {
6938 &self.objects
6939 }
6940 pub fn objects_mut(&mut self) -> &mut Vec<super::ObjectReference> {
6943 &mut self.objects
6944 }
6945 pub fn set_objects(&mut self, field: Vec<super::ObjectReference>) {
6947 self.objects = field;
6948 }
6949 pub fn with_objects(mut self, field: Vec<super::ObjectReference>) -> Self {
6951 self.set_objects(field);
6952 self
6953 }
6954 pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
6956 self.owner.as_mut().map(|field| field as _)
6957 }
6958 pub fn owner_mut(&mut self) -> &mut String {
6961 self.owner.get_or_insert_default()
6962 }
6963 pub fn owner_opt(&self) -> Option<&str> {
6965 self.owner.as_ref().map(|field| field as _)
6966 }
6967 pub fn set_owner<T: Into<String>>(&mut self, field: T) {
6969 self.owner = Some(field.into().into());
6970 }
6971 pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
6973 self.set_owner(field.into());
6974 self
6975 }
6976 pub fn price_opt_mut(&mut self) -> Option<&mut u64> {
6978 self.price.as_mut().map(|field| field as _)
6979 }
6980 pub fn price_mut(&mut self) -> &mut u64 {
6983 self.price.get_or_insert_default()
6984 }
6985 pub fn price_opt(&self) -> Option<u64> {
6987 self.price.as_ref().map(|field| *field)
6988 }
6989 pub fn set_price(&mut self, field: u64) {
6991 self.price = Some(field);
6992 }
6993 pub fn with_price(mut self, field: u64) -> Self {
6995 self.set_price(field);
6996 self
6997 }
6998 pub fn budget_opt_mut(&mut self) -> Option<&mut u64> {
7000 self.budget.as_mut().map(|field| field as _)
7001 }
7002 pub fn budget_mut(&mut self) -> &mut u64 {
7005 self.budget.get_or_insert_default()
7006 }
7007 pub fn budget_opt(&self) -> Option<u64> {
7009 self.budget.as_ref().map(|field| *field)
7010 }
7011 pub fn set_budget(&mut self, field: u64) {
7013 self.budget = Some(field);
7014 }
7015 pub fn with_budget(mut self, field: u64) -> Self {
7017 self.set_budget(field);
7018 self
7019 }
7020 }
7021 impl super::GenesisTransaction {
7022 pub const fn const_default() -> Self {
7023 Self { objects: Vec::new() }
7024 }
7025 #[doc(hidden)]
7026 pub fn default_instance() -> &'static Self {
7027 static DEFAULT: super::GenesisTransaction = super::GenesisTransaction::const_default();
7028 &DEFAULT
7029 }
7030 pub fn objects(&self) -> &[super::Object] {
7032 &self.objects
7033 }
7034 pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
7037 &mut self.objects
7038 }
7039 pub fn set_objects(&mut self, field: Vec<super::Object>) {
7041 self.objects = field;
7042 }
7043 pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
7045 self.set_objects(field);
7046 self
7047 }
7048 }
7049 impl super::GetBalanceRequest {
7050 pub const fn const_default() -> Self {
7051 Self {
7052 owner: None,
7053 coin_type: None,
7054 }
7055 }
7056 #[doc(hidden)]
7057 pub fn default_instance() -> &'static Self {
7058 static DEFAULT: super::GetBalanceRequest = super::GetBalanceRequest::const_default();
7059 &DEFAULT
7060 }
7061 pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
7063 self.owner.as_mut().map(|field| field as _)
7064 }
7065 pub fn owner_mut(&mut self) -> &mut String {
7068 self.owner.get_or_insert_default()
7069 }
7070 pub fn owner_opt(&self) -> Option<&str> {
7072 self.owner.as_ref().map(|field| field as _)
7073 }
7074 pub fn set_owner<T: Into<String>>(&mut self, field: T) {
7076 self.owner = Some(field.into().into());
7077 }
7078 pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
7080 self.set_owner(field.into());
7081 self
7082 }
7083 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
7085 self.coin_type.as_mut().map(|field| field as _)
7086 }
7087 pub fn coin_type_mut(&mut self) -> &mut String {
7090 self.coin_type.get_or_insert_default()
7091 }
7092 pub fn coin_type_opt(&self) -> Option<&str> {
7094 self.coin_type.as_ref().map(|field| field as _)
7095 }
7096 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
7098 self.coin_type = Some(field.into().into());
7099 }
7100 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
7102 self.set_coin_type(field.into());
7103 self
7104 }
7105 }
7106 impl super::GetBalanceResponse {
7107 pub const fn const_default() -> Self {
7108 Self { balance: None }
7109 }
7110 #[doc(hidden)]
7111 pub fn default_instance() -> &'static Self {
7112 static DEFAULT: super::GetBalanceResponse = super::GetBalanceResponse::const_default();
7113 &DEFAULT
7114 }
7115 pub fn balance(&self) -> &super::Balance {
7117 self.balance
7118 .as_ref()
7119 .map(|field| field as _)
7120 .unwrap_or_else(|| super::Balance::default_instance() as _)
7121 }
7122 pub fn balance_opt_mut(&mut self) -> Option<&mut super::Balance> {
7124 self.balance.as_mut().map(|field| field as _)
7125 }
7126 pub fn balance_mut(&mut self) -> &mut super::Balance {
7129 self.balance.get_or_insert_default()
7130 }
7131 pub fn balance_opt(&self) -> Option<&super::Balance> {
7133 self.balance.as_ref().map(|field| field as _)
7134 }
7135 pub fn set_balance<T: Into<super::Balance>>(&mut self, field: T) {
7137 self.balance = Some(field.into().into());
7138 }
7139 pub fn with_balance<T: Into<super::Balance>>(mut self, field: T) -> Self {
7141 self.set_balance(field.into());
7142 self
7143 }
7144 }
7145 impl super::GetCheckpointRequest {
7146 pub const fn const_default() -> Self {
7147 Self {
7148 read_mask: None,
7149 checkpoint_id: None,
7150 }
7151 }
7152 #[doc(hidden)]
7153 pub fn default_instance() -> &'static Self {
7154 static DEFAULT: super::GetCheckpointRequest = super::GetCheckpointRequest::const_default();
7155 &DEFAULT
7156 }
7157 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
7159 self.read_mask.as_mut().map(|field| field as _)
7160 }
7161 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
7164 self.read_mask.get_or_insert_default()
7165 }
7166 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
7168 self.read_mask.as_ref().map(|field| field as _)
7169 }
7170 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
7172 self.read_mask = Some(field.into().into());
7173 }
7174 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
7176 mut self,
7177 field: T,
7178 ) -> Self {
7179 self.set_read_mask(field.into());
7180 self
7181 }
7182 pub fn sequence_number(&self) -> u64 {
7184 if let Some(
7185 super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
7186 ) = &self.checkpoint_id
7187 {
7188 *field
7189 } else {
7190 0u64
7191 }
7192 }
7193 pub fn sequence_number_opt(&self) -> Option<u64> {
7195 if let Some(
7196 super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
7197 ) = &self.checkpoint_id
7198 {
7199 Some(*field)
7200 } else {
7201 None
7202 }
7203 }
7204 pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
7206 if let Some(
7207 super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
7208 ) = &mut self.checkpoint_id
7209 {
7210 Some(field as _)
7211 } else {
7212 None
7213 }
7214 }
7215 pub fn sequence_number_mut(&mut self) -> &mut u64 {
7219 if self.sequence_number_opt_mut().is_none() {
7220 self.checkpoint_id = Some(
7221 super::get_checkpoint_request::CheckpointId::SequenceNumber(
7222 u64::default(),
7223 ),
7224 );
7225 }
7226 self.sequence_number_opt_mut().unwrap()
7227 }
7228 pub fn set_sequence_number(&mut self, field: u64) {
7231 self.checkpoint_id = Some(
7232 super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
7233 );
7234 }
7235 pub fn with_sequence_number(mut self, field: u64) -> Self {
7238 self.set_sequence_number(field);
7239 self
7240 }
7241 pub fn digest(&self) -> &str {
7243 if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &self
7244 .checkpoint_id
7245 {
7246 field as _
7247 } else {
7248 ""
7249 }
7250 }
7251 pub fn digest_opt(&self) -> Option<&str> {
7253 if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &self
7254 .checkpoint_id
7255 {
7256 Some(field as _)
7257 } else {
7258 None
7259 }
7260 }
7261 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
7263 if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &mut self
7264 .checkpoint_id
7265 {
7266 Some(field as _)
7267 } else {
7268 None
7269 }
7270 }
7271 pub fn digest_mut(&mut self) -> &mut String {
7275 if self.digest_opt_mut().is_none() {
7276 self.checkpoint_id = Some(
7277 super::get_checkpoint_request::CheckpointId::Digest(
7278 String::default(),
7279 ),
7280 );
7281 }
7282 self.digest_opt_mut().unwrap()
7283 }
7284 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
7287 self.checkpoint_id = Some(
7288 super::get_checkpoint_request::CheckpointId::Digest(field.into().into()),
7289 );
7290 }
7291 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
7294 self.set_digest(field.into());
7295 self
7296 }
7297 }
7298 impl super::GetCheckpointResponse {
7299 pub const fn const_default() -> Self {
7300 Self { checkpoint: None }
7301 }
7302 #[doc(hidden)]
7303 pub fn default_instance() -> &'static Self {
7304 static DEFAULT: super::GetCheckpointResponse = super::GetCheckpointResponse::const_default();
7305 &DEFAULT
7306 }
7307 pub fn checkpoint(&self) -> &super::Checkpoint {
7309 self.checkpoint
7310 .as_ref()
7311 .map(|field| field as _)
7312 .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
7313 }
7314 pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
7316 self.checkpoint.as_mut().map(|field| field as _)
7317 }
7318 pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
7321 self.checkpoint.get_or_insert_default()
7322 }
7323 pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
7325 self.checkpoint.as_ref().map(|field| field as _)
7326 }
7327 pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
7329 self.checkpoint = Some(field.into().into());
7330 }
7331 pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
7333 self.set_checkpoint(field.into());
7334 self
7335 }
7336 }
7337 impl super::GetCoinInfoRequest {
7338 pub const fn const_default() -> Self {
7339 Self { coin_type: None }
7340 }
7341 #[doc(hidden)]
7342 pub fn default_instance() -> &'static Self {
7343 static DEFAULT: super::GetCoinInfoRequest = super::GetCoinInfoRequest::const_default();
7344 &DEFAULT
7345 }
7346 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
7348 self.coin_type.as_mut().map(|field| field as _)
7349 }
7350 pub fn coin_type_mut(&mut self) -> &mut String {
7353 self.coin_type.get_or_insert_default()
7354 }
7355 pub fn coin_type_opt(&self) -> Option<&str> {
7357 self.coin_type.as_ref().map(|field| field as _)
7358 }
7359 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
7361 self.coin_type = Some(field.into().into());
7362 }
7363 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
7365 self.set_coin_type(field.into());
7366 self
7367 }
7368 }
7369 impl super::GetCoinInfoResponse {
7370 pub const fn const_default() -> Self {
7371 Self {
7372 coin_type: None,
7373 metadata: None,
7374 treasury: None,
7375 regulated_metadata: None,
7376 }
7377 }
7378 #[doc(hidden)]
7379 pub fn default_instance() -> &'static Self {
7380 static DEFAULT: super::GetCoinInfoResponse = super::GetCoinInfoResponse::const_default();
7381 &DEFAULT
7382 }
7383 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
7385 self.coin_type.as_mut().map(|field| field as _)
7386 }
7387 pub fn coin_type_mut(&mut self) -> &mut String {
7390 self.coin_type.get_or_insert_default()
7391 }
7392 pub fn coin_type_opt(&self) -> Option<&str> {
7394 self.coin_type.as_ref().map(|field| field as _)
7395 }
7396 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
7398 self.coin_type = Some(field.into().into());
7399 }
7400 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
7402 self.set_coin_type(field.into());
7403 self
7404 }
7405 pub fn metadata(&self) -> &super::CoinMetadata {
7407 self.metadata
7408 .as_ref()
7409 .map(|field| field as _)
7410 .unwrap_or_else(|| super::CoinMetadata::default_instance() as _)
7411 }
7412 pub fn metadata_opt_mut(&mut self) -> Option<&mut super::CoinMetadata> {
7414 self.metadata.as_mut().map(|field| field as _)
7415 }
7416 pub fn metadata_mut(&mut self) -> &mut super::CoinMetadata {
7419 self.metadata.get_or_insert_default()
7420 }
7421 pub fn metadata_opt(&self) -> Option<&super::CoinMetadata> {
7423 self.metadata.as_ref().map(|field| field as _)
7424 }
7425 pub fn set_metadata<T: Into<super::CoinMetadata>>(&mut self, field: T) {
7427 self.metadata = Some(field.into().into());
7428 }
7429 pub fn with_metadata<T: Into<super::CoinMetadata>>(mut self, field: T) -> Self {
7431 self.set_metadata(field.into());
7432 self
7433 }
7434 pub fn treasury(&self) -> &super::CoinTreasury {
7436 self.treasury
7437 .as_ref()
7438 .map(|field| field as _)
7439 .unwrap_or_else(|| super::CoinTreasury::default_instance() as _)
7440 }
7441 pub fn treasury_opt_mut(&mut self) -> Option<&mut super::CoinTreasury> {
7443 self.treasury.as_mut().map(|field| field as _)
7444 }
7445 pub fn treasury_mut(&mut self) -> &mut super::CoinTreasury {
7448 self.treasury.get_or_insert_default()
7449 }
7450 pub fn treasury_opt(&self) -> Option<&super::CoinTreasury> {
7452 self.treasury.as_ref().map(|field| field as _)
7453 }
7454 pub fn set_treasury<T: Into<super::CoinTreasury>>(&mut self, field: T) {
7456 self.treasury = Some(field.into().into());
7457 }
7458 pub fn with_treasury<T: Into<super::CoinTreasury>>(mut self, field: T) -> Self {
7460 self.set_treasury(field.into());
7461 self
7462 }
7463 pub fn regulated_metadata(&self) -> &super::RegulatedCoinMetadata {
7465 self.regulated_metadata
7466 .as_ref()
7467 .map(|field| field as _)
7468 .unwrap_or_else(|| super::RegulatedCoinMetadata::default_instance() as _)
7469 }
7470 pub fn regulated_metadata_opt_mut(
7472 &mut self,
7473 ) -> Option<&mut super::RegulatedCoinMetadata> {
7474 self.regulated_metadata.as_mut().map(|field| field as _)
7475 }
7476 pub fn regulated_metadata_mut(&mut self) -> &mut super::RegulatedCoinMetadata {
7479 self.regulated_metadata.get_or_insert_default()
7480 }
7481 pub fn regulated_metadata_opt(&self) -> Option<&super::RegulatedCoinMetadata> {
7483 self.regulated_metadata.as_ref().map(|field| field as _)
7484 }
7485 pub fn set_regulated_metadata<T: Into<super::RegulatedCoinMetadata>>(
7487 &mut self,
7488 field: T,
7489 ) {
7490 self.regulated_metadata = Some(field.into().into());
7491 }
7492 pub fn with_regulated_metadata<T: Into<super::RegulatedCoinMetadata>>(
7494 mut self,
7495 field: T,
7496 ) -> Self {
7497 self.set_regulated_metadata(field.into());
7498 self
7499 }
7500 }
7501 impl super::GetDatatypeRequest {
7502 pub const fn const_default() -> Self {
7503 Self {
7504 package_id: None,
7505 module_name: None,
7506 name: None,
7507 }
7508 }
7509 #[doc(hidden)]
7510 pub fn default_instance() -> &'static Self {
7511 static DEFAULT: super::GetDatatypeRequest = super::GetDatatypeRequest::const_default();
7512 &DEFAULT
7513 }
7514 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
7516 self.package_id.as_mut().map(|field| field as _)
7517 }
7518 pub fn package_id_mut(&mut self) -> &mut String {
7521 self.package_id.get_or_insert_default()
7522 }
7523 pub fn package_id_opt(&self) -> Option<&str> {
7525 self.package_id.as_ref().map(|field| field as _)
7526 }
7527 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
7529 self.package_id = Some(field.into().into());
7530 }
7531 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
7533 self.set_package_id(field.into());
7534 self
7535 }
7536 pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
7538 self.module_name.as_mut().map(|field| field as _)
7539 }
7540 pub fn module_name_mut(&mut self) -> &mut String {
7543 self.module_name.get_or_insert_default()
7544 }
7545 pub fn module_name_opt(&self) -> Option<&str> {
7547 self.module_name.as_ref().map(|field| field as _)
7548 }
7549 pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
7551 self.module_name = Some(field.into().into());
7552 }
7553 pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
7555 self.set_module_name(field.into());
7556 self
7557 }
7558 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
7560 self.name.as_mut().map(|field| field as _)
7561 }
7562 pub fn name_mut(&mut self) -> &mut String {
7565 self.name.get_or_insert_default()
7566 }
7567 pub fn name_opt(&self) -> Option<&str> {
7569 self.name.as_ref().map(|field| field as _)
7570 }
7571 pub fn set_name<T: Into<String>>(&mut self, field: T) {
7573 self.name = Some(field.into().into());
7574 }
7575 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
7577 self.set_name(field.into());
7578 self
7579 }
7580 }
7581 impl super::GetDatatypeResponse {
7582 pub const fn const_default() -> Self {
7583 Self { datatype: None }
7584 }
7585 #[doc(hidden)]
7586 pub fn default_instance() -> &'static Self {
7587 static DEFAULT: super::GetDatatypeResponse = super::GetDatatypeResponse::const_default();
7588 &DEFAULT
7589 }
7590 pub fn datatype(&self) -> &super::DatatypeDescriptor {
7592 self.datatype
7593 .as_ref()
7594 .map(|field| field as _)
7595 .unwrap_or_else(|| super::DatatypeDescriptor::default_instance() as _)
7596 }
7597 pub fn datatype_opt_mut(&mut self) -> Option<&mut super::DatatypeDescriptor> {
7599 self.datatype.as_mut().map(|field| field as _)
7600 }
7601 pub fn datatype_mut(&mut self) -> &mut super::DatatypeDescriptor {
7604 self.datatype.get_or_insert_default()
7605 }
7606 pub fn datatype_opt(&self) -> Option<&super::DatatypeDescriptor> {
7608 self.datatype.as_ref().map(|field| field as _)
7609 }
7610 pub fn set_datatype<T: Into<super::DatatypeDescriptor>>(&mut self, field: T) {
7612 self.datatype = Some(field.into().into());
7613 }
7614 pub fn with_datatype<T: Into<super::DatatypeDescriptor>>(
7616 mut self,
7617 field: T,
7618 ) -> Self {
7619 self.set_datatype(field.into());
7620 self
7621 }
7622 }
7623 impl super::GetEpochRequest {
7624 pub const fn const_default() -> Self {
7625 Self {
7626 epoch: None,
7627 read_mask: None,
7628 }
7629 }
7630 #[doc(hidden)]
7631 pub fn default_instance() -> &'static Self {
7632 static DEFAULT: super::GetEpochRequest = super::GetEpochRequest::const_default();
7633 &DEFAULT
7634 }
7635 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
7637 self.epoch.as_mut().map(|field| field as _)
7638 }
7639 pub fn epoch_mut(&mut self) -> &mut u64 {
7642 self.epoch.get_or_insert_default()
7643 }
7644 pub fn epoch_opt(&self) -> Option<u64> {
7646 self.epoch.as_ref().map(|field| *field)
7647 }
7648 pub fn set_epoch(&mut self, field: u64) {
7650 self.epoch = Some(field);
7651 }
7652 pub fn with_epoch(mut self, field: u64) -> Self {
7654 self.set_epoch(field);
7655 self
7656 }
7657 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
7659 self.read_mask.as_mut().map(|field| field as _)
7660 }
7661 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
7664 self.read_mask.get_or_insert_default()
7665 }
7666 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
7668 self.read_mask.as_ref().map(|field| field as _)
7669 }
7670 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
7672 self.read_mask = Some(field.into().into());
7673 }
7674 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
7676 mut self,
7677 field: T,
7678 ) -> Self {
7679 self.set_read_mask(field.into());
7680 self
7681 }
7682 }
7683 impl super::GetEpochResponse {
7684 pub const fn const_default() -> Self {
7685 Self { epoch: None }
7686 }
7687 #[doc(hidden)]
7688 pub fn default_instance() -> &'static Self {
7689 static DEFAULT: super::GetEpochResponse = super::GetEpochResponse::const_default();
7690 &DEFAULT
7691 }
7692 pub fn epoch(&self) -> &super::Epoch {
7694 self.epoch
7695 .as_ref()
7696 .map(|field| field as _)
7697 .unwrap_or_else(|| super::Epoch::default_instance() as _)
7698 }
7699 pub fn epoch_opt_mut(&mut self) -> Option<&mut super::Epoch> {
7701 self.epoch.as_mut().map(|field| field as _)
7702 }
7703 pub fn epoch_mut(&mut self) -> &mut super::Epoch {
7706 self.epoch.get_or_insert_default()
7707 }
7708 pub fn epoch_opt(&self) -> Option<&super::Epoch> {
7710 self.epoch.as_ref().map(|field| field as _)
7711 }
7712 pub fn set_epoch<T: Into<super::Epoch>>(&mut self, field: T) {
7714 self.epoch = Some(field.into().into());
7715 }
7716 pub fn with_epoch<T: Into<super::Epoch>>(mut self, field: T) -> Self {
7718 self.set_epoch(field.into());
7719 self
7720 }
7721 }
7722 impl super::GetFunctionRequest {
7723 pub const fn const_default() -> Self {
7724 Self {
7725 package_id: None,
7726 module_name: None,
7727 name: None,
7728 }
7729 }
7730 #[doc(hidden)]
7731 pub fn default_instance() -> &'static Self {
7732 static DEFAULT: super::GetFunctionRequest = super::GetFunctionRequest::const_default();
7733 &DEFAULT
7734 }
7735 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
7737 self.package_id.as_mut().map(|field| field as _)
7738 }
7739 pub fn package_id_mut(&mut self) -> &mut String {
7742 self.package_id.get_or_insert_default()
7743 }
7744 pub fn package_id_opt(&self) -> Option<&str> {
7746 self.package_id.as_ref().map(|field| field as _)
7747 }
7748 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
7750 self.package_id = Some(field.into().into());
7751 }
7752 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
7754 self.set_package_id(field.into());
7755 self
7756 }
7757 pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
7759 self.module_name.as_mut().map(|field| field as _)
7760 }
7761 pub fn module_name_mut(&mut self) -> &mut String {
7764 self.module_name.get_or_insert_default()
7765 }
7766 pub fn module_name_opt(&self) -> Option<&str> {
7768 self.module_name.as_ref().map(|field| field as _)
7769 }
7770 pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
7772 self.module_name = Some(field.into().into());
7773 }
7774 pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
7776 self.set_module_name(field.into());
7777 self
7778 }
7779 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
7781 self.name.as_mut().map(|field| field as _)
7782 }
7783 pub fn name_mut(&mut self) -> &mut String {
7786 self.name.get_or_insert_default()
7787 }
7788 pub fn name_opt(&self) -> Option<&str> {
7790 self.name.as_ref().map(|field| field as _)
7791 }
7792 pub fn set_name<T: Into<String>>(&mut self, field: T) {
7794 self.name = Some(field.into().into());
7795 }
7796 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
7798 self.set_name(field.into());
7799 self
7800 }
7801 }
7802 impl super::GetFunctionResponse {
7803 pub const fn const_default() -> Self {
7804 Self { function: None }
7805 }
7806 #[doc(hidden)]
7807 pub fn default_instance() -> &'static Self {
7808 static DEFAULT: super::GetFunctionResponse = super::GetFunctionResponse::const_default();
7809 &DEFAULT
7810 }
7811 pub fn function(&self) -> &super::FunctionDescriptor {
7813 self.function
7814 .as_ref()
7815 .map(|field| field as _)
7816 .unwrap_or_else(|| super::FunctionDescriptor::default_instance() as _)
7817 }
7818 pub fn function_opt_mut(&mut self) -> Option<&mut super::FunctionDescriptor> {
7820 self.function.as_mut().map(|field| field as _)
7821 }
7822 pub fn function_mut(&mut self) -> &mut super::FunctionDescriptor {
7825 self.function.get_or_insert_default()
7826 }
7827 pub fn function_opt(&self) -> Option<&super::FunctionDescriptor> {
7829 self.function.as_ref().map(|field| field as _)
7830 }
7831 pub fn set_function<T: Into<super::FunctionDescriptor>>(&mut self, field: T) {
7833 self.function = Some(field.into().into());
7834 }
7835 pub fn with_function<T: Into<super::FunctionDescriptor>>(
7837 mut self,
7838 field: T,
7839 ) -> Self {
7840 self.set_function(field.into());
7841 self
7842 }
7843 }
7844 impl super::GetObjectRequest {
7845 pub const fn const_default() -> Self {
7846 Self {
7847 object_id: None,
7848 version: None,
7849 read_mask: None,
7850 }
7851 }
7852 #[doc(hidden)]
7853 pub fn default_instance() -> &'static Self {
7854 static DEFAULT: super::GetObjectRequest = super::GetObjectRequest::const_default();
7855 &DEFAULT
7856 }
7857 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
7859 self.object_id.as_mut().map(|field| field as _)
7860 }
7861 pub fn object_id_mut(&mut self) -> &mut String {
7864 self.object_id.get_or_insert_default()
7865 }
7866 pub fn object_id_opt(&self) -> Option<&str> {
7868 self.object_id.as_ref().map(|field| field as _)
7869 }
7870 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
7872 self.object_id = Some(field.into().into());
7873 }
7874 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
7876 self.set_object_id(field.into());
7877 self
7878 }
7879 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
7881 self.version.as_mut().map(|field| field as _)
7882 }
7883 pub fn version_mut(&mut self) -> &mut u64 {
7886 self.version.get_or_insert_default()
7887 }
7888 pub fn version_opt(&self) -> Option<u64> {
7890 self.version.as_ref().map(|field| *field)
7891 }
7892 pub fn set_version(&mut self, field: u64) {
7894 self.version = Some(field);
7895 }
7896 pub fn with_version(mut self, field: u64) -> Self {
7898 self.set_version(field);
7899 self
7900 }
7901 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
7903 self.read_mask.as_mut().map(|field| field as _)
7904 }
7905 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
7908 self.read_mask.get_or_insert_default()
7909 }
7910 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
7912 self.read_mask.as_ref().map(|field| field as _)
7913 }
7914 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
7916 self.read_mask = Some(field.into().into());
7917 }
7918 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
7920 mut self,
7921 field: T,
7922 ) -> Self {
7923 self.set_read_mask(field.into());
7924 self
7925 }
7926 }
7927 impl super::GetObjectResponse {
7928 pub const fn const_default() -> Self {
7929 Self { object: None }
7930 }
7931 #[doc(hidden)]
7932 pub fn default_instance() -> &'static Self {
7933 static DEFAULT: super::GetObjectResponse = super::GetObjectResponse::const_default();
7934 &DEFAULT
7935 }
7936 pub fn object(&self) -> &super::Object {
7938 self.object
7939 .as_ref()
7940 .map(|field| field as _)
7941 .unwrap_or_else(|| super::Object::default_instance() as _)
7942 }
7943 pub fn object_opt_mut(&mut self) -> Option<&mut super::Object> {
7945 self.object.as_mut().map(|field| field as _)
7946 }
7947 pub fn object_mut(&mut self) -> &mut super::Object {
7950 self.object.get_or_insert_default()
7951 }
7952 pub fn object_opt(&self) -> Option<&super::Object> {
7954 self.object.as_ref().map(|field| field as _)
7955 }
7956 pub fn set_object<T: Into<super::Object>>(&mut self, field: T) {
7958 self.object = Some(field.into().into());
7959 }
7960 pub fn with_object<T: Into<super::Object>>(mut self, field: T) -> Self {
7962 self.set_object(field.into());
7963 self
7964 }
7965 }
7966 impl super::GetObjectResult {
7967 pub const fn const_default() -> Self {
7968 Self { result: None }
7969 }
7970 #[doc(hidden)]
7971 pub fn default_instance() -> &'static Self {
7972 static DEFAULT: super::GetObjectResult = super::GetObjectResult::const_default();
7973 &DEFAULT
7974 }
7975 pub fn object(&self) -> &super::Object {
7977 if let Some(super::get_object_result::Result::Object(field)) = &self.result {
7978 field as _
7979 } else {
7980 super::Object::default_instance() as _
7981 }
7982 }
7983 pub fn object_opt(&self) -> Option<&super::Object> {
7985 if let Some(super::get_object_result::Result::Object(field)) = &self.result {
7986 Some(field as _)
7987 } else {
7988 None
7989 }
7990 }
7991 pub fn object_opt_mut(&mut self) -> Option<&mut super::Object> {
7993 if let Some(super::get_object_result::Result::Object(field)) = &mut self
7994 .result
7995 {
7996 Some(field as _)
7997 } else {
7998 None
7999 }
8000 }
8001 pub fn object_mut(&mut self) -> &mut super::Object {
8005 if self.object_opt_mut().is_none() {
8006 self.result = Some(
8007 super::get_object_result::Result::Object(super::Object::default()),
8008 );
8009 }
8010 self.object_opt_mut().unwrap()
8011 }
8012 pub fn set_object<T: Into<super::Object>>(&mut self, field: T) {
8015 self.result = Some(
8016 super::get_object_result::Result::Object(field.into().into()),
8017 );
8018 }
8019 pub fn with_object<T: Into<super::Object>>(mut self, field: T) -> Self {
8022 self.set_object(field.into());
8023 self
8024 }
8025 pub fn error(&self) -> &super::super::super::super::google::rpc::Status {
8027 if let Some(super::get_object_result::Result::Error(field)) = &self.result {
8028 field as _
8029 } else {
8030 super::super::super::super::google::rpc::Status::default_instance() as _
8031 }
8032 }
8033 pub fn error_opt(
8035 &self,
8036 ) -> Option<&super::super::super::super::google::rpc::Status> {
8037 if let Some(super::get_object_result::Result::Error(field)) = &self.result {
8038 Some(field as _)
8039 } else {
8040 None
8041 }
8042 }
8043 pub fn error_opt_mut(
8045 &mut self,
8046 ) -> Option<&mut super::super::super::super::google::rpc::Status> {
8047 if let Some(super::get_object_result::Result::Error(field)) = &mut self
8048 .result
8049 {
8050 Some(field as _)
8051 } else {
8052 None
8053 }
8054 }
8055 pub fn error_mut(
8059 &mut self,
8060 ) -> &mut super::super::super::super::google::rpc::Status {
8061 if self.error_opt_mut().is_none() {
8062 self.result = Some(
8063 super::get_object_result::Result::Error(
8064 super::super::super::super::google::rpc::Status::default(),
8065 ),
8066 );
8067 }
8068 self.error_opt_mut().unwrap()
8069 }
8070 pub fn set_error<T: Into<super::super::super::super::google::rpc::Status>>(
8073 &mut self,
8074 field: T,
8075 ) {
8076 self.result = Some(
8077 super::get_object_result::Result::Error(field.into().into()),
8078 );
8079 }
8080 pub fn with_error<T: Into<super::super::super::super::google::rpc::Status>>(
8083 mut self,
8084 field: T,
8085 ) -> Self {
8086 self.set_error(field.into());
8087 self
8088 }
8089 }
8090 impl super::GetPackageRequest {
8091 pub const fn const_default() -> Self {
8092 Self { package_id: None }
8093 }
8094 #[doc(hidden)]
8095 pub fn default_instance() -> &'static Self {
8096 static DEFAULT: super::GetPackageRequest = super::GetPackageRequest::const_default();
8097 &DEFAULT
8098 }
8099 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
8101 self.package_id.as_mut().map(|field| field as _)
8102 }
8103 pub fn package_id_mut(&mut self) -> &mut String {
8106 self.package_id.get_or_insert_default()
8107 }
8108 pub fn package_id_opt(&self) -> Option<&str> {
8110 self.package_id.as_ref().map(|field| field as _)
8111 }
8112 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
8114 self.package_id = Some(field.into().into());
8115 }
8116 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
8118 self.set_package_id(field.into());
8119 self
8120 }
8121 }
8122 impl super::GetPackageResponse {
8123 pub const fn const_default() -> Self {
8124 Self { package: None }
8125 }
8126 #[doc(hidden)]
8127 pub fn default_instance() -> &'static Self {
8128 static DEFAULT: super::GetPackageResponse = super::GetPackageResponse::const_default();
8129 &DEFAULT
8130 }
8131 pub fn package(&self) -> &super::Package {
8133 self.package
8134 .as_ref()
8135 .map(|field| field as _)
8136 .unwrap_or_else(|| super::Package::default_instance() as _)
8137 }
8138 pub fn package_opt_mut(&mut self) -> Option<&mut super::Package> {
8140 self.package.as_mut().map(|field| field as _)
8141 }
8142 pub fn package_mut(&mut self) -> &mut super::Package {
8145 self.package.get_or_insert_default()
8146 }
8147 pub fn package_opt(&self) -> Option<&super::Package> {
8149 self.package.as_ref().map(|field| field as _)
8150 }
8151 pub fn set_package<T: Into<super::Package>>(&mut self, field: T) {
8153 self.package = Some(field.into().into());
8154 }
8155 pub fn with_package<T: Into<super::Package>>(mut self, field: T) -> Self {
8157 self.set_package(field.into());
8158 self
8159 }
8160 }
8161 impl super::GetServiceInfoRequest {
8162 pub const fn const_default() -> Self {
8163 Self {}
8164 }
8165 #[doc(hidden)]
8166 pub fn default_instance() -> &'static Self {
8167 static DEFAULT: super::GetServiceInfoRequest = super::GetServiceInfoRequest::const_default();
8168 &DEFAULT
8169 }
8170 }
8171 impl super::GetServiceInfoResponse {
8172 pub const fn const_default() -> Self {
8173 Self {
8174 chain_id: None,
8175 chain: None,
8176 epoch: None,
8177 checkpoint_height: None,
8178 timestamp: None,
8179 lowest_available_checkpoint: None,
8180 lowest_available_checkpoint_objects: None,
8181 server: None,
8182 }
8183 }
8184 #[doc(hidden)]
8185 pub fn default_instance() -> &'static Self {
8186 static DEFAULT: super::GetServiceInfoResponse = super::GetServiceInfoResponse::const_default();
8187 &DEFAULT
8188 }
8189 pub fn chain_id_opt_mut(&mut self) -> Option<&mut String> {
8191 self.chain_id.as_mut().map(|field| field as _)
8192 }
8193 pub fn chain_id_mut(&mut self) -> &mut String {
8196 self.chain_id.get_or_insert_default()
8197 }
8198 pub fn chain_id_opt(&self) -> Option<&str> {
8200 self.chain_id.as_ref().map(|field| field as _)
8201 }
8202 pub fn set_chain_id<T: Into<String>>(&mut self, field: T) {
8204 self.chain_id = Some(field.into().into());
8205 }
8206 pub fn with_chain_id<T: Into<String>>(mut self, field: T) -> Self {
8208 self.set_chain_id(field.into());
8209 self
8210 }
8211 pub fn chain_opt_mut(&mut self) -> Option<&mut String> {
8213 self.chain.as_mut().map(|field| field as _)
8214 }
8215 pub fn chain_mut(&mut self) -> &mut String {
8218 self.chain.get_or_insert_default()
8219 }
8220 pub fn chain_opt(&self) -> Option<&str> {
8222 self.chain.as_ref().map(|field| field as _)
8223 }
8224 pub fn set_chain<T: Into<String>>(&mut self, field: T) {
8226 self.chain = Some(field.into().into());
8227 }
8228 pub fn with_chain<T: Into<String>>(mut self, field: T) -> Self {
8230 self.set_chain(field.into());
8231 self
8232 }
8233 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
8235 self.epoch.as_mut().map(|field| field as _)
8236 }
8237 pub fn epoch_mut(&mut self) -> &mut u64 {
8240 self.epoch.get_or_insert_default()
8241 }
8242 pub fn epoch_opt(&self) -> Option<u64> {
8244 self.epoch.as_ref().map(|field| *field)
8245 }
8246 pub fn set_epoch(&mut self, field: u64) {
8248 self.epoch = Some(field);
8249 }
8250 pub fn with_epoch(mut self, field: u64) -> Self {
8252 self.set_epoch(field);
8253 self
8254 }
8255 pub fn checkpoint_height_opt_mut(&mut self) -> Option<&mut u64> {
8257 self.checkpoint_height.as_mut().map(|field| field as _)
8258 }
8259 pub fn checkpoint_height_mut(&mut self) -> &mut u64 {
8262 self.checkpoint_height.get_or_insert_default()
8263 }
8264 pub fn checkpoint_height_opt(&self) -> Option<u64> {
8266 self.checkpoint_height.as_ref().map(|field| *field)
8267 }
8268 pub fn set_checkpoint_height(&mut self, field: u64) {
8270 self.checkpoint_height = Some(field);
8271 }
8272 pub fn with_checkpoint_height(mut self, field: u64) -> Self {
8274 self.set_checkpoint_height(field);
8275 self
8276 }
8277 pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
8279 self.timestamp.as_mut().map(|field| field as _)
8280 }
8281 pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
8284 self.timestamp.get_or_insert_default()
8285 }
8286 pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
8288 self.timestamp.as_ref().map(|field| field as _)
8289 }
8290 pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
8292 self.timestamp = Some(field.into().into());
8293 }
8294 pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
8296 mut self,
8297 field: T,
8298 ) -> Self {
8299 self.set_timestamp(field.into());
8300 self
8301 }
8302 pub fn lowest_available_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
8304 self.lowest_available_checkpoint.as_mut().map(|field| field as _)
8305 }
8306 pub fn lowest_available_checkpoint_mut(&mut self) -> &mut u64 {
8309 self.lowest_available_checkpoint.get_or_insert_default()
8310 }
8311 pub fn lowest_available_checkpoint_opt(&self) -> Option<u64> {
8313 self.lowest_available_checkpoint.as_ref().map(|field| *field)
8314 }
8315 pub fn set_lowest_available_checkpoint(&mut self, field: u64) {
8317 self.lowest_available_checkpoint = Some(field);
8318 }
8319 pub fn with_lowest_available_checkpoint(mut self, field: u64) -> Self {
8321 self.set_lowest_available_checkpoint(field);
8322 self
8323 }
8324 pub fn lowest_available_checkpoint_objects_opt_mut(
8326 &mut self,
8327 ) -> Option<&mut u64> {
8328 self.lowest_available_checkpoint_objects.as_mut().map(|field| field as _)
8329 }
8330 pub fn lowest_available_checkpoint_objects_mut(&mut self) -> &mut u64 {
8333 self.lowest_available_checkpoint_objects.get_or_insert_default()
8334 }
8335 pub fn lowest_available_checkpoint_objects_opt(&self) -> Option<u64> {
8337 self.lowest_available_checkpoint_objects.as_ref().map(|field| *field)
8338 }
8339 pub fn set_lowest_available_checkpoint_objects(&mut self, field: u64) {
8341 self.lowest_available_checkpoint_objects = Some(field);
8342 }
8343 pub fn with_lowest_available_checkpoint_objects(mut self, field: u64) -> Self {
8345 self.set_lowest_available_checkpoint_objects(field);
8346 self
8347 }
8348 pub fn server_opt_mut(&mut self) -> Option<&mut String> {
8350 self.server.as_mut().map(|field| field as _)
8351 }
8352 pub fn server_mut(&mut self) -> &mut String {
8355 self.server.get_or_insert_default()
8356 }
8357 pub fn server_opt(&self) -> Option<&str> {
8359 self.server.as_ref().map(|field| field as _)
8360 }
8361 pub fn set_server<T: Into<String>>(&mut self, field: T) {
8363 self.server = Some(field.into().into());
8364 }
8365 pub fn with_server<T: Into<String>>(mut self, field: T) -> Self {
8367 self.set_server(field.into());
8368 self
8369 }
8370 }
8371 impl super::GetTransactionRequest {
8372 pub const fn const_default() -> Self {
8373 Self {
8374 digest: None,
8375 read_mask: None,
8376 }
8377 }
8378 #[doc(hidden)]
8379 pub fn default_instance() -> &'static Self {
8380 static DEFAULT: super::GetTransactionRequest = super::GetTransactionRequest::const_default();
8381 &DEFAULT
8382 }
8383 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
8385 self.digest.as_mut().map(|field| field as _)
8386 }
8387 pub fn digest_mut(&mut self) -> &mut String {
8390 self.digest.get_or_insert_default()
8391 }
8392 pub fn digest_opt(&self) -> Option<&str> {
8394 self.digest.as_ref().map(|field| field as _)
8395 }
8396 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
8398 self.digest = Some(field.into().into());
8399 }
8400 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
8402 self.set_digest(field.into());
8403 self
8404 }
8405 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
8407 self.read_mask.as_mut().map(|field| field as _)
8408 }
8409 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
8412 self.read_mask.get_or_insert_default()
8413 }
8414 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
8416 self.read_mask.as_ref().map(|field| field as _)
8417 }
8418 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
8420 self.read_mask = Some(field.into().into());
8421 }
8422 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
8424 mut self,
8425 field: T,
8426 ) -> Self {
8427 self.set_read_mask(field.into());
8428 self
8429 }
8430 }
8431 impl super::GetTransactionResponse {
8432 pub const fn const_default() -> Self {
8433 Self { transaction: None }
8434 }
8435 #[doc(hidden)]
8436 pub fn default_instance() -> &'static Self {
8437 static DEFAULT: super::GetTransactionResponse = super::GetTransactionResponse::const_default();
8438 &DEFAULT
8439 }
8440 pub fn transaction(&self) -> &super::ExecutedTransaction {
8442 self.transaction
8443 .as_ref()
8444 .map(|field| field as _)
8445 .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
8446 }
8447 pub fn transaction_opt_mut(
8449 &mut self,
8450 ) -> Option<&mut super::ExecutedTransaction> {
8451 self.transaction.as_mut().map(|field| field as _)
8452 }
8453 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
8456 self.transaction.get_or_insert_default()
8457 }
8458 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
8460 self.transaction.as_ref().map(|field| field as _)
8461 }
8462 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
8464 &mut self,
8465 field: T,
8466 ) {
8467 self.transaction = Some(field.into().into());
8468 }
8469 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
8471 mut self,
8472 field: T,
8473 ) -> Self {
8474 self.set_transaction(field.into());
8475 self
8476 }
8477 }
8478 impl super::GetTransactionResult {
8479 pub const fn const_default() -> Self {
8480 Self { result: None }
8481 }
8482 #[doc(hidden)]
8483 pub fn default_instance() -> &'static Self {
8484 static DEFAULT: super::GetTransactionResult = super::GetTransactionResult::const_default();
8485 &DEFAULT
8486 }
8487 pub fn transaction(&self) -> &super::ExecutedTransaction {
8489 if let Some(super::get_transaction_result::Result::Transaction(field)) = &self
8490 .result
8491 {
8492 field as _
8493 } else {
8494 super::ExecutedTransaction::default_instance() as _
8495 }
8496 }
8497 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
8499 if let Some(super::get_transaction_result::Result::Transaction(field)) = &self
8500 .result
8501 {
8502 Some(field as _)
8503 } else {
8504 None
8505 }
8506 }
8507 pub fn transaction_opt_mut(
8509 &mut self,
8510 ) -> Option<&mut super::ExecutedTransaction> {
8511 if let Some(super::get_transaction_result::Result::Transaction(field)) = &mut self
8512 .result
8513 {
8514 Some(field as _)
8515 } else {
8516 None
8517 }
8518 }
8519 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
8523 if self.transaction_opt_mut().is_none() {
8524 self.result = Some(
8525 super::get_transaction_result::Result::Transaction(
8526 super::ExecutedTransaction::default(),
8527 ),
8528 );
8529 }
8530 self.transaction_opt_mut().unwrap()
8531 }
8532 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
8535 &mut self,
8536 field: T,
8537 ) {
8538 self.result = Some(
8539 super::get_transaction_result::Result::Transaction(field.into().into()),
8540 );
8541 }
8542 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
8545 mut self,
8546 field: T,
8547 ) -> Self {
8548 self.set_transaction(field.into());
8549 self
8550 }
8551 pub fn error(&self) -> &super::super::super::super::google::rpc::Status {
8553 if let Some(super::get_transaction_result::Result::Error(field)) = &self
8554 .result
8555 {
8556 field as _
8557 } else {
8558 super::super::super::super::google::rpc::Status::default_instance() as _
8559 }
8560 }
8561 pub fn error_opt(
8563 &self,
8564 ) -> Option<&super::super::super::super::google::rpc::Status> {
8565 if let Some(super::get_transaction_result::Result::Error(field)) = &self
8566 .result
8567 {
8568 Some(field as _)
8569 } else {
8570 None
8571 }
8572 }
8573 pub fn error_opt_mut(
8575 &mut self,
8576 ) -> Option<&mut super::super::super::super::google::rpc::Status> {
8577 if let Some(super::get_transaction_result::Result::Error(field)) = &mut self
8578 .result
8579 {
8580 Some(field as _)
8581 } else {
8582 None
8583 }
8584 }
8585 pub fn error_mut(
8589 &mut self,
8590 ) -> &mut super::super::super::super::google::rpc::Status {
8591 if self.error_opt_mut().is_none() {
8592 self.result = Some(
8593 super::get_transaction_result::Result::Error(
8594 super::super::super::super::google::rpc::Status::default(),
8595 ),
8596 );
8597 }
8598 self.error_opt_mut().unwrap()
8599 }
8600 pub fn set_error<T: Into<super::super::super::super::google::rpc::Status>>(
8603 &mut self,
8604 field: T,
8605 ) {
8606 self.result = Some(
8607 super::get_transaction_result::Result::Error(field.into().into()),
8608 );
8609 }
8610 pub fn with_error<T: Into<super::super::super::super::google::rpc::Status>>(
8613 mut self,
8614 field: T,
8615 ) -> Self {
8616 self.set_error(field.into());
8617 self
8618 }
8619 }
8620 impl super::IndexError {
8621 pub const fn const_default() -> Self {
8622 Self {
8623 index: None,
8624 subresult: None,
8625 }
8626 }
8627 #[doc(hidden)]
8628 pub fn default_instance() -> &'static Self {
8629 static DEFAULT: super::IndexError = super::IndexError::const_default();
8630 &DEFAULT
8631 }
8632 pub fn index_opt_mut(&mut self) -> Option<&mut u32> {
8634 self.index.as_mut().map(|field| field as _)
8635 }
8636 pub fn index_mut(&mut self) -> &mut u32 {
8639 self.index.get_or_insert_default()
8640 }
8641 pub fn index_opt(&self) -> Option<u32> {
8643 self.index.as_ref().map(|field| *field)
8644 }
8645 pub fn set_index(&mut self, field: u32) {
8647 self.index = Some(field);
8648 }
8649 pub fn with_index(mut self, field: u32) -> Self {
8651 self.set_index(field);
8652 self
8653 }
8654 pub fn subresult_opt_mut(&mut self) -> Option<&mut u32> {
8656 self.subresult.as_mut().map(|field| field as _)
8657 }
8658 pub fn subresult_mut(&mut self) -> &mut u32 {
8661 self.subresult.get_or_insert_default()
8662 }
8663 pub fn subresult_opt(&self) -> Option<u32> {
8665 self.subresult.as_ref().map(|field| *field)
8666 }
8667 pub fn set_subresult(&mut self, field: u32) {
8669 self.subresult = Some(field);
8670 }
8671 pub fn with_subresult(mut self, field: u32) -> Self {
8673 self.set_subresult(field);
8674 self
8675 }
8676 }
8677 impl super::Input {
8678 pub const fn const_default() -> Self {
8679 Self {
8680 kind: None,
8681 pure: None,
8682 object_id: None,
8683 version: None,
8684 digest: None,
8685 mutable: None,
8686 mutability: None,
8687 funds_withdrawal: None,
8688 literal: None,
8689 }
8690 }
8691 #[doc(hidden)]
8692 pub fn default_instance() -> &'static Self {
8693 static DEFAULT: super::Input = super::Input::const_default();
8694 &DEFAULT
8695 }
8696 pub fn with_kind<T: Into<super::input::InputKind>>(mut self, field: T) -> Self {
8698 self.set_kind(field.into());
8699 self
8700 }
8701 pub fn pure_opt(&self) -> Option<&[u8]> {
8703 self.pure.as_ref().map(|field| field as _)
8704 }
8705 pub fn set_pure<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
8707 self.pure = Some(field.into().into());
8708 }
8709 pub fn with_pure<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
8711 self.set_pure(field.into());
8712 self
8713 }
8714 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
8716 self.object_id.as_mut().map(|field| field as _)
8717 }
8718 pub fn object_id_mut(&mut self) -> &mut String {
8721 self.object_id.get_or_insert_default()
8722 }
8723 pub fn object_id_opt(&self) -> Option<&str> {
8725 self.object_id.as_ref().map(|field| field as _)
8726 }
8727 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
8729 self.object_id = Some(field.into().into());
8730 }
8731 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
8733 self.set_object_id(field.into());
8734 self
8735 }
8736 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
8738 self.version.as_mut().map(|field| field as _)
8739 }
8740 pub fn version_mut(&mut self) -> &mut u64 {
8743 self.version.get_or_insert_default()
8744 }
8745 pub fn version_opt(&self) -> Option<u64> {
8747 self.version.as_ref().map(|field| *field)
8748 }
8749 pub fn set_version(&mut self, field: u64) {
8751 self.version = Some(field);
8752 }
8753 pub fn with_version(mut self, field: u64) -> Self {
8755 self.set_version(field);
8756 self
8757 }
8758 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
8760 self.digest.as_mut().map(|field| field as _)
8761 }
8762 pub fn digest_mut(&mut self) -> &mut String {
8765 self.digest.get_or_insert_default()
8766 }
8767 pub fn digest_opt(&self) -> Option<&str> {
8769 self.digest.as_ref().map(|field| field as _)
8770 }
8771 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
8773 self.digest = Some(field.into().into());
8774 }
8775 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
8777 self.set_digest(field.into());
8778 self
8779 }
8780 pub fn mutable_opt_mut(&mut self) -> Option<&mut bool> {
8782 self.mutable.as_mut().map(|field| field as _)
8783 }
8784 pub fn mutable_mut(&mut self) -> &mut bool {
8787 self.mutable.get_or_insert_default()
8788 }
8789 pub fn mutable_opt(&self) -> Option<bool> {
8791 self.mutable.as_ref().map(|field| *field)
8792 }
8793 pub fn set_mutable(&mut self, field: bool) {
8795 self.mutable = Some(field);
8796 }
8797 pub fn with_mutable(mut self, field: bool) -> Self {
8799 self.set_mutable(field);
8800 self
8801 }
8802 pub fn with_mutability<T: Into<super::input::Mutability>>(
8804 mut self,
8805 field: T,
8806 ) -> Self {
8807 self.set_mutability(field.into());
8808 self
8809 }
8810 pub fn funds_withdrawal(&self) -> &super::FundsWithdrawal {
8812 self.funds_withdrawal
8813 .as_ref()
8814 .map(|field| field as _)
8815 .unwrap_or_else(|| super::FundsWithdrawal::default_instance() as _)
8816 }
8817 pub fn funds_withdrawal_opt_mut(
8819 &mut self,
8820 ) -> Option<&mut super::FundsWithdrawal> {
8821 self.funds_withdrawal.as_mut().map(|field| field as _)
8822 }
8823 pub fn funds_withdrawal_mut(&mut self) -> &mut super::FundsWithdrawal {
8826 self.funds_withdrawal.get_or_insert_default()
8827 }
8828 pub fn funds_withdrawal_opt(&self) -> Option<&super::FundsWithdrawal> {
8830 self.funds_withdrawal.as_ref().map(|field| field as _)
8831 }
8832 pub fn set_funds_withdrawal<T: Into<super::FundsWithdrawal>>(
8834 &mut self,
8835 field: T,
8836 ) {
8837 self.funds_withdrawal = Some(field.into().into());
8838 }
8839 pub fn with_funds_withdrawal<T: Into<super::FundsWithdrawal>>(
8841 mut self,
8842 field: T,
8843 ) -> Self {
8844 self.set_funds_withdrawal(field.into());
8845 self
8846 }
8847 pub fn literal_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
8849 self.literal.as_mut().map(|field| field as _)
8850 }
8851 pub fn literal_mut(&mut self) -> &mut ::prost_types::Value {
8854 self.literal.get_or_insert_default()
8855 }
8856 pub fn literal_opt(&self) -> Option<&::prost_types::Value> {
8858 self.literal.as_ref().map(|field| field as _)
8859 }
8860 pub fn set_literal<T: Into<::prost_types::Value>>(&mut self, field: T) {
8862 self.literal = Some(field.into().into());
8863 }
8864 pub fn with_literal<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
8866 self.set_literal(field.into());
8867 self
8868 }
8869 }
8870 impl super::Jwk {
8871 pub const fn const_default() -> Self {
8872 Self {
8873 kty: None,
8874 e: None,
8875 n: None,
8876 alg: None,
8877 }
8878 }
8879 #[doc(hidden)]
8880 pub fn default_instance() -> &'static Self {
8881 static DEFAULT: super::Jwk = super::Jwk::const_default();
8882 &DEFAULT
8883 }
8884 pub fn kty_opt_mut(&mut self) -> Option<&mut String> {
8886 self.kty.as_mut().map(|field| field as _)
8887 }
8888 pub fn kty_mut(&mut self) -> &mut String {
8891 self.kty.get_or_insert_default()
8892 }
8893 pub fn kty_opt(&self) -> Option<&str> {
8895 self.kty.as_ref().map(|field| field as _)
8896 }
8897 pub fn set_kty<T: Into<String>>(&mut self, field: T) {
8899 self.kty = Some(field.into().into());
8900 }
8901 pub fn with_kty<T: Into<String>>(mut self, field: T) -> Self {
8903 self.set_kty(field.into());
8904 self
8905 }
8906 pub fn e_opt_mut(&mut self) -> Option<&mut String> {
8908 self.e.as_mut().map(|field| field as _)
8909 }
8910 pub fn e_mut(&mut self) -> &mut String {
8913 self.e.get_or_insert_default()
8914 }
8915 pub fn e_opt(&self) -> Option<&str> {
8917 self.e.as_ref().map(|field| field as _)
8918 }
8919 pub fn set_e<T: Into<String>>(&mut self, field: T) {
8921 self.e = Some(field.into().into());
8922 }
8923 pub fn with_e<T: Into<String>>(mut self, field: T) -> Self {
8925 self.set_e(field.into());
8926 self
8927 }
8928 pub fn n_opt_mut(&mut self) -> Option<&mut String> {
8930 self.n.as_mut().map(|field| field as _)
8931 }
8932 pub fn n_mut(&mut self) -> &mut String {
8935 self.n.get_or_insert_default()
8936 }
8937 pub fn n_opt(&self) -> Option<&str> {
8939 self.n.as_ref().map(|field| field as _)
8940 }
8941 pub fn set_n<T: Into<String>>(&mut self, field: T) {
8943 self.n = Some(field.into().into());
8944 }
8945 pub fn with_n<T: Into<String>>(mut self, field: T) -> Self {
8947 self.set_n(field.into());
8948 self
8949 }
8950 pub fn alg_opt_mut(&mut self) -> Option<&mut String> {
8952 self.alg.as_mut().map(|field| field as _)
8953 }
8954 pub fn alg_mut(&mut self) -> &mut String {
8957 self.alg.get_or_insert_default()
8958 }
8959 pub fn alg_opt(&self) -> Option<&str> {
8961 self.alg.as_ref().map(|field| field as _)
8962 }
8963 pub fn set_alg<T: Into<String>>(&mut self, field: T) {
8965 self.alg = Some(field.into().into());
8966 }
8967 pub fn with_alg<T: Into<String>>(mut self, field: T) -> Self {
8969 self.set_alg(field.into());
8970 self
8971 }
8972 }
8973 impl super::JwkId {
8974 pub const fn const_default() -> Self {
8975 Self { iss: None, kid: None }
8976 }
8977 #[doc(hidden)]
8978 pub fn default_instance() -> &'static Self {
8979 static DEFAULT: super::JwkId = super::JwkId::const_default();
8980 &DEFAULT
8981 }
8982 pub fn iss_opt_mut(&mut self) -> Option<&mut String> {
8984 self.iss.as_mut().map(|field| field as _)
8985 }
8986 pub fn iss_mut(&mut self) -> &mut String {
8989 self.iss.get_or_insert_default()
8990 }
8991 pub fn iss_opt(&self) -> Option<&str> {
8993 self.iss.as_ref().map(|field| field as _)
8994 }
8995 pub fn set_iss<T: Into<String>>(&mut self, field: T) {
8997 self.iss = Some(field.into().into());
8998 }
8999 pub fn with_iss<T: Into<String>>(mut self, field: T) -> Self {
9001 self.set_iss(field.into());
9002 self
9003 }
9004 pub fn kid_opt_mut(&mut self) -> Option<&mut String> {
9006 self.kid.as_mut().map(|field| field as _)
9007 }
9008 pub fn kid_mut(&mut self) -> &mut String {
9011 self.kid.get_or_insert_default()
9012 }
9013 pub fn kid_opt(&self) -> Option<&str> {
9015 self.kid.as_ref().map(|field| field as _)
9016 }
9017 pub fn set_kid<T: Into<String>>(&mut self, field: T) {
9019 self.kid = Some(field.into().into());
9020 }
9021 pub fn with_kid<T: Into<String>>(mut self, field: T) -> Self {
9023 self.set_kid(field.into());
9024 self
9025 }
9026 }
9027 impl super::Linkage {
9028 pub const fn const_default() -> Self {
9029 Self {
9030 original_id: None,
9031 upgraded_id: None,
9032 upgraded_version: None,
9033 }
9034 }
9035 #[doc(hidden)]
9036 pub fn default_instance() -> &'static Self {
9037 static DEFAULT: super::Linkage = super::Linkage::const_default();
9038 &DEFAULT
9039 }
9040 pub fn original_id_opt_mut(&mut self) -> Option<&mut String> {
9042 self.original_id.as_mut().map(|field| field as _)
9043 }
9044 pub fn original_id_mut(&mut self) -> &mut String {
9047 self.original_id.get_or_insert_default()
9048 }
9049 pub fn original_id_opt(&self) -> Option<&str> {
9051 self.original_id.as_ref().map(|field| field as _)
9052 }
9053 pub fn set_original_id<T: Into<String>>(&mut self, field: T) {
9055 self.original_id = Some(field.into().into());
9056 }
9057 pub fn with_original_id<T: Into<String>>(mut self, field: T) -> Self {
9059 self.set_original_id(field.into());
9060 self
9061 }
9062 pub fn upgraded_id_opt_mut(&mut self) -> Option<&mut String> {
9064 self.upgraded_id.as_mut().map(|field| field as _)
9065 }
9066 pub fn upgraded_id_mut(&mut self) -> &mut String {
9069 self.upgraded_id.get_or_insert_default()
9070 }
9071 pub fn upgraded_id_opt(&self) -> Option<&str> {
9073 self.upgraded_id.as_ref().map(|field| field as _)
9074 }
9075 pub fn set_upgraded_id<T: Into<String>>(&mut self, field: T) {
9077 self.upgraded_id = Some(field.into().into());
9078 }
9079 pub fn with_upgraded_id<T: Into<String>>(mut self, field: T) -> Self {
9081 self.set_upgraded_id(field.into());
9082 self
9083 }
9084 pub fn upgraded_version_opt_mut(&mut self) -> Option<&mut u64> {
9086 self.upgraded_version.as_mut().map(|field| field as _)
9087 }
9088 pub fn upgraded_version_mut(&mut self) -> &mut u64 {
9091 self.upgraded_version.get_or_insert_default()
9092 }
9093 pub fn upgraded_version_opt(&self) -> Option<u64> {
9095 self.upgraded_version.as_ref().map(|field| *field)
9096 }
9097 pub fn set_upgraded_version(&mut self, field: u64) {
9099 self.upgraded_version = Some(field);
9100 }
9101 pub fn with_upgraded_version(mut self, field: u64) -> Self {
9103 self.set_upgraded_version(field);
9104 self
9105 }
9106 }
9107 impl super::ListBalancesRequest {
9108 pub const fn const_default() -> Self {
9109 Self {
9110 owner: None,
9111 page_size: None,
9112 page_token: None,
9113 }
9114 }
9115 #[doc(hidden)]
9116 pub fn default_instance() -> &'static Self {
9117 static DEFAULT: super::ListBalancesRequest = super::ListBalancesRequest::const_default();
9118 &DEFAULT
9119 }
9120 pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
9122 self.owner.as_mut().map(|field| field as _)
9123 }
9124 pub fn owner_mut(&mut self) -> &mut String {
9127 self.owner.get_or_insert_default()
9128 }
9129 pub fn owner_opt(&self) -> Option<&str> {
9131 self.owner.as_ref().map(|field| field as _)
9132 }
9133 pub fn set_owner<T: Into<String>>(&mut self, field: T) {
9135 self.owner = Some(field.into().into());
9136 }
9137 pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
9139 self.set_owner(field.into());
9140 self
9141 }
9142 pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
9144 self.page_size.as_mut().map(|field| field as _)
9145 }
9146 pub fn page_size_mut(&mut self) -> &mut u32 {
9149 self.page_size.get_or_insert_default()
9150 }
9151 pub fn page_size_opt(&self) -> Option<u32> {
9153 self.page_size.as_ref().map(|field| *field)
9154 }
9155 pub fn set_page_size(&mut self, field: u32) {
9157 self.page_size = Some(field);
9158 }
9159 pub fn with_page_size(mut self, field: u32) -> Self {
9161 self.set_page_size(field);
9162 self
9163 }
9164 pub fn page_token_opt(&self) -> Option<&[u8]> {
9166 self.page_token.as_ref().map(|field| field as _)
9167 }
9168 pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9170 self.page_token = Some(field.into().into());
9171 }
9172 pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
9174 mut self,
9175 field: T,
9176 ) -> Self {
9177 self.set_page_token(field.into());
9178 self
9179 }
9180 }
9181 impl super::ListBalancesResponse {
9182 pub const fn const_default() -> Self {
9183 Self {
9184 balances: Vec::new(),
9185 next_page_token: None,
9186 }
9187 }
9188 #[doc(hidden)]
9189 pub fn default_instance() -> &'static Self {
9190 static DEFAULT: super::ListBalancesResponse = super::ListBalancesResponse::const_default();
9191 &DEFAULT
9192 }
9193 pub fn balances(&self) -> &[super::Balance] {
9195 &self.balances
9196 }
9197 pub fn balances_mut(&mut self) -> &mut Vec<super::Balance> {
9200 &mut self.balances
9201 }
9202 pub fn set_balances(&mut self, field: Vec<super::Balance>) {
9204 self.balances = field;
9205 }
9206 pub fn with_balances(mut self, field: Vec<super::Balance>) -> Self {
9208 self.set_balances(field);
9209 self
9210 }
9211 pub fn next_page_token_opt(&self) -> Option<&[u8]> {
9213 self.next_page_token.as_ref().map(|field| field as _)
9214 }
9215 pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9217 self.next_page_token = Some(field.into().into());
9218 }
9219 pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
9221 mut self,
9222 field: T,
9223 ) -> Self {
9224 self.set_next_page_token(field.into());
9225 self
9226 }
9227 }
9228 impl super::ListDynamicFieldsRequest {
9229 pub const fn const_default() -> Self {
9230 Self {
9231 parent: None,
9232 page_size: None,
9233 page_token: None,
9234 read_mask: None,
9235 }
9236 }
9237 #[doc(hidden)]
9238 pub fn default_instance() -> &'static Self {
9239 static DEFAULT: super::ListDynamicFieldsRequest = super::ListDynamicFieldsRequest::const_default();
9240 &DEFAULT
9241 }
9242 pub fn parent_opt_mut(&mut self) -> Option<&mut String> {
9244 self.parent.as_mut().map(|field| field as _)
9245 }
9246 pub fn parent_mut(&mut self) -> &mut String {
9249 self.parent.get_or_insert_default()
9250 }
9251 pub fn parent_opt(&self) -> Option<&str> {
9253 self.parent.as_ref().map(|field| field as _)
9254 }
9255 pub fn set_parent<T: Into<String>>(&mut self, field: T) {
9257 self.parent = Some(field.into().into());
9258 }
9259 pub fn with_parent<T: Into<String>>(mut self, field: T) -> Self {
9261 self.set_parent(field.into());
9262 self
9263 }
9264 pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
9266 self.page_size.as_mut().map(|field| field as _)
9267 }
9268 pub fn page_size_mut(&mut self) -> &mut u32 {
9271 self.page_size.get_or_insert_default()
9272 }
9273 pub fn page_size_opt(&self) -> Option<u32> {
9275 self.page_size.as_ref().map(|field| *field)
9276 }
9277 pub fn set_page_size(&mut self, field: u32) {
9279 self.page_size = Some(field);
9280 }
9281 pub fn with_page_size(mut self, field: u32) -> Self {
9283 self.set_page_size(field);
9284 self
9285 }
9286 pub fn page_token_opt(&self) -> Option<&[u8]> {
9288 self.page_token.as_ref().map(|field| field as _)
9289 }
9290 pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9292 self.page_token = Some(field.into().into());
9293 }
9294 pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
9296 mut self,
9297 field: T,
9298 ) -> Self {
9299 self.set_page_token(field.into());
9300 self
9301 }
9302 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
9304 self.read_mask.as_mut().map(|field| field as _)
9305 }
9306 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
9309 self.read_mask.get_or_insert_default()
9310 }
9311 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
9313 self.read_mask.as_ref().map(|field| field as _)
9314 }
9315 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
9317 self.read_mask = Some(field.into().into());
9318 }
9319 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
9321 mut self,
9322 field: T,
9323 ) -> Self {
9324 self.set_read_mask(field.into());
9325 self
9326 }
9327 }
9328 impl super::ListDynamicFieldsResponse {
9329 pub const fn const_default() -> Self {
9330 Self {
9331 dynamic_fields: Vec::new(),
9332 next_page_token: None,
9333 }
9334 }
9335 #[doc(hidden)]
9336 pub fn default_instance() -> &'static Self {
9337 static DEFAULT: super::ListDynamicFieldsResponse = super::ListDynamicFieldsResponse::const_default();
9338 &DEFAULT
9339 }
9340 pub fn dynamic_fields(&self) -> &[super::DynamicField] {
9342 &self.dynamic_fields
9343 }
9344 pub fn dynamic_fields_mut(&mut self) -> &mut Vec<super::DynamicField> {
9347 &mut self.dynamic_fields
9348 }
9349 pub fn set_dynamic_fields(&mut self, field: Vec<super::DynamicField>) {
9351 self.dynamic_fields = field;
9352 }
9353 pub fn with_dynamic_fields(mut self, field: Vec<super::DynamicField>) -> Self {
9355 self.set_dynamic_fields(field);
9356 self
9357 }
9358 pub fn next_page_token_opt(&self) -> Option<&[u8]> {
9360 self.next_page_token.as_ref().map(|field| field as _)
9361 }
9362 pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9364 self.next_page_token = Some(field.into().into());
9365 }
9366 pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
9368 mut self,
9369 field: T,
9370 ) -> Self {
9371 self.set_next_page_token(field.into());
9372 self
9373 }
9374 }
9375 impl super::ListOwnedObjectsRequest {
9376 pub const fn const_default() -> Self {
9377 Self {
9378 owner: None,
9379 page_size: None,
9380 page_token: None,
9381 read_mask: None,
9382 object_type: None,
9383 }
9384 }
9385 #[doc(hidden)]
9386 pub fn default_instance() -> &'static Self {
9387 static DEFAULT: super::ListOwnedObjectsRequest = super::ListOwnedObjectsRequest::const_default();
9388 &DEFAULT
9389 }
9390 pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
9392 self.owner.as_mut().map(|field| field as _)
9393 }
9394 pub fn owner_mut(&mut self) -> &mut String {
9397 self.owner.get_or_insert_default()
9398 }
9399 pub fn owner_opt(&self) -> Option<&str> {
9401 self.owner.as_ref().map(|field| field as _)
9402 }
9403 pub fn set_owner<T: Into<String>>(&mut self, field: T) {
9405 self.owner = Some(field.into().into());
9406 }
9407 pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
9409 self.set_owner(field.into());
9410 self
9411 }
9412 pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
9414 self.page_size.as_mut().map(|field| field as _)
9415 }
9416 pub fn page_size_mut(&mut self) -> &mut u32 {
9419 self.page_size.get_or_insert_default()
9420 }
9421 pub fn page_size_opt(&self) -> Option<u32> {
9423 self.page_size.as_ref().map(|field| *field)
9424 }
9425 pub fn set_page_size(&mut self, field: u32) {
9427 self.page_size = Some(field);
9428 }
9429 pub fn with_page_size(mut self, field: u32) -> Self {
9431 self.set_page_size(field);
9432 self
9433 }
9434 pub fn page_token_opt(&self) -> Option<&[u8]> {
9436 self.page_token.as_ref().map(|field| field as _)
9437 }
9438 pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9440 self.page_token = Some(field.into().into());
9441 }
9442 pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
9444 mut self,
9445 field: T,
9446 ) -> Self {
9447 self.set_page_token(field.into());
9448 self
9449 }
9450 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
9452 self.read_mask.as_mut().map(|field| field as _)
9453 }
9454 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
9457 self.read_mask.get_or_insert_default()
9458 }
9459 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
9461 self.read_mask.as_ref().map(|field| field as _)
9462 }
9463 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
9465 self.read_mask = Some(field.into().into());
9466 }
9467 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
9469 mut self,
9470 field: T,
9471 ) -> Self {
9472 self.set_read_mask(field.into());
9473 self
9474 }
9475 pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
9477 self.object_type.as_mut().map(|field| field as _)
9478 }
9479 pub fn object_type_mut(&mut self) -> &mut String {
9482 self.object_type.get_or_insert_default()
9483 }
9484 pub fn object_type_opt(&self) -> Option<&str> {
9486 self.object_type.as_ref().map(|field| field as _)
9487 }
9488 pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
9490 self.object_type = Some(field.into().into());
9491 }
9492 pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
9494 self.set_object_type(field.into());
9495 self
9496 }
9497 }
9498 impl super::ListOwnedObjectsResponse {
9499 pub const fn const_default() -> Self {
9500 Self {
9501 objects: Vec::new(),
9502 next_page_token: None,
9503 }
9504 }
9505 #[doc(hidden)]
9506 pub fn default_instance() -> &'static Self {
9507 static DEFAULT: super::ListOwnedObjectsResponse = super::ListOwnedObjectsResponse::const_default();
9508 &DEFAULT
9509 }
9510 pub fn objects(&self) -> &[super::Object] {
9512 &self.objects
9513 }
9514 pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
9517 &mut self.objects
9518 }
9519 pub fn set_objects(&mut self, field: Vec<super::Object>) {
9521 self.objects = field;
9522 }
9523 pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
9525 self.set_objects(field);
9526 self
9527 }
9528 pub fn next_page_token_opt(&self) -> Option<&[u8]> {
9530 self.next_page_token.as_ref().map(|field| field as _)
9531 }
9532 pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9534 self.next_page_token = Some(field.into().into());
9535 }
9536 pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
9538 mut self,
9539 field: T,
9540 ) -> Self {
9541 self.set_next_page_token(field.into());
9542 self
9543 }
9544 }
9545 impl super::ListPackageVersionsRequest {
9546 pub const fn const_default() -> Self {
9547 Self {
9548 package_id: None,
9549 page_size: None,
9550 page_token: None,
9551 }
9552 }
9553 #[doc(hidden)]
9554 pub fn default_instance() -> &'static Self {
9555 static DEFAULT: super::ListPackageVersionsRequest = super::ListPackageVersionsRequest::const_default();
9556 &DEFAULT
9557 }
9558 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
9560 self.package_id.as_mut().map(|field| field as _)
9561 }
9562 pub fn package_id_mut(&mut self) -> &mut String {
9565 self.package_id.get_or_insert_default()
9566 }
9567 pub fn package_id_opt(&self) -> Option<&str> {
9569 self.package_id.as_ref().map(|field| field as _)
9570 }
9571 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
9573 self.package_id = Some(field.into().into());
9574 }
9575 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
9577 self.set_package_id(field.into());
9578 self
9579 }
9580 pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
9582 self.page_size.as_mut().map(|field| field as _)
9583 }
9584 pub fn page_size_mut(&mut self) -> &mut u32 {
9587 self.page_size.get_or_insert_default()
9588 }
9589 pub fn page_size_opt(&self) -> Option<u32> {
9591 self.page_size.as_ref().map(|field| *field)
9592 }
9593 pub fn set_page_size(&mut self, field: u32) {
9595 self.page_size = Some(field);
9596 }
9597 pub fn with_page_size(mut self, field: u32) -> Self {
9599 self.set_page_size(field);
9600 self
9601 }
9602 pub fn page_token_opt(&self) -> Option<&[u8]> {
9604 self.page_token.as_ref().map(|field| field as _)
9605 }
9606 pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9608 self.page_token = Some(field.into().into());
9609 }
9610 pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
9612 mut self,
9613 field: T,
9614 ) -> Self {
9615 self.set_page_token(field.into());
9616 self
9617 }
9618 }
9619 impl super::ListPackageVersionsResponse {
9620 pub const fn const_default() -> Self {
9621 Self {
9622 versions: Vec::new(),
9623 next_page_token: None,
9624 }
9625 }
9626 #[doc(hidden)]
9627 pub fn default_instance() -> &'static Self {
9628 static DEFAULT: super::ListPackageVersionsResponse = super::ListPackageVersionsResponse::const_default();
9629 &DEFAULT
9630 }
9631 pub fn versions(&self) -> &[super::PackageVersion] {
9633 &self.versions
9634 }
9635 pub fn versions_mut(&mut self) -> &mut Vec<super::PackageVersion> {
9638 &mut self.versions
9639 }
9640 pub fn set_versions(&mut self, field: Vec<super::PackageVersion>) {
9642 self.versions = field;
9643 }
9644 pub fn with_versions(mut self, field: Vec<super::PackageVersion>) -> Self {
9646 self.set_versions(field);
9647 self
9648 }
9649 pub fn next_page_token_opt(&self) -> Option<&[u8]> {
9651 self.next_page_token.as_ref().map(|field| field as _)
9652 }
9653 pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9655 self.next_page_token = Some(field.into().into());
9656 }
9657 pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
9659 mut self,
9660 field: T,
9661 ) -> Self {
9662 self.set_next_page_token(field.into());
9663 self
9664 }
9665 }
9666 impl super::LookupNameRequest {
9667 pub const fn const_default() -> Self {
9668 Self { name: None }
9669 }
9670 #[doc(hidden)]
9671 pub fn default_instance() -> &'static Self {
9672 static DEFAULT: super::LookupNameRequest = super::LookupNameRequest::const_default();
9673 &DEFAULT
9674 }
9675 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
9677 self.name.as_mut().map(|field| field as _)
9678 }
9679 pub fn name_mut(&mut self) -> &mut String {
9682 self.name.get_or_insert_default()
9683 }
9684 pub fn name_opt(&self) -> Option<&str> {
9686 self.name.as_ref().map(|field| field as _)
9687 }
9688 pub fn set_name<T: Into<String>>(&mut self, field: T) {
9690 self.name = Some(field.into().into());
9691 }
9692 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
9694 self.set_name(field.into());
9695 self
9696 }
9697 }
9698 impl super::LookupNameResponse {
9699 pub const fn const_default() -> Self {
9700 Self { record: None }
9701 }
9702 #[doc(hidden)]
9703 pub fn default_instance() -> &'static Self {
9704 static DEFAULT: super::LookupNameResponse = super::LookupNameResponse::const_default();
9705 &DEFAULT
9706 }
9707 pub fn record(&self) -> &super::NameRecord {
9709 self.record
9710 .as_ref()
9711 .map(|field| field as _)
9712 .unwrap_or_else(|| super::NameRecord::default_instance() as _)
9713 }
9714 pub fn record_opt_mut(&mut self) -> Option<&mut super::NameRecord> {
9716 self.record.as_mut().map(|field| field as _)
9717 }
9718 pub fn record_mut(&mut self) -> &mut super::NameRecord {
9721 self.record.get_or_insert_default()
9722 }
9723 pub fn record_opt(&self) -> Option<&super::NameRecord> {
9725 self.record.as_ref().map(|field| field as _)
9726 }
9727 pub fn set_record<T: Into<super::NameRecord>>(&mut self, field: T) {
9729 self.record = Some(field.into().into());
9730 }
9731 pub fn with_record<T: Into<super::NameRecord>>(mut self, field: T) -> Self {
9733 self.set_record(field.into());
9734 self
9735 }
9736 }
9737 impl super::MakeMoveVector {
9738 pub const fn const_default() -> Self {
9739 Self {
9740 element_type: None,
9741 elements: Vec::new(),
9742 }
9743 }
9744 #[doc(hidden)]
9745 pub fn default_instance() -> &'static Self {
9746 static DEFAULT: super::MakeMoveVector = super::MakeMoveVector::const_default();
9747 &DEFAULT
9748 }
9749 pub fn element_type_opt_mut(&mut self) -> Option<&mut String> {
9751 self.element_type.as_mut().map(|field| field as _)
9752 }
9753 pub fn element_type_mut(&mut self) -> &mut String {
9756 self.element_type.get_or_insert_default()
9757 }
9758 pub fn element_type_opt(&self) -> Option<&str> {
9760 self.element_type.as_ref().map(|field| field as _)
9761 }
9762 pub fn set_element_type<T: Into<String>>(&mut self, field: T) {
9764 self.element_type = Some(field.into().into());
9765 }
9766 pub fn with_element_type<T: Into<String>>(mut self, field: T) -> Self {
9768 self.set_element_type(field.into());
9769 self
9770 }
9771 pub fn elements(&self) -> &[super::Argument] {
9773 &self.elements
9774 }
9775 pub fn elements_mut(&mut self) -> &mut Vec<super::Argument> {
9778 &mut self.elements
9779 }
9780 pub fn set_elements(&mut self, field: Vec<super::Argument>) {
9782 self.elements = field;
9783 }
9784 pub fn with_elements(mut self, field: Vec<super::Argument>) -> Self {
9786 self.set_elements(field);
9787 self
9788 }
9789 }
9790 impl super::MergeCoins {
9791 pub const fn const_default() -> Self {
9792 Self {
9793 coin: None,
9794 coins_to_merge: Vec::new(),
9795 }
9796 }
9797 #[doc(hidden)]
9798 pub fn default_instance() -> &'static Self {
9799 static DEFAULT: super::MergeCoins = super::MergeCoins::const_default();
9800 &DEFAULT
9801 }
9802 pub fn coin(&self) -> &super::Argument {
9804 self.coin
9805 .as_ref()
9806 .map(|field| field as _)
9807 .unwrap_or_else(|| super::Argument::default_instance() as _)
9808 }
9809 pub fn coin_opt_mut(&mut self) -> Option<&mut super::Argument> {
9811 self.coin.as_mut().map(|field| field as _)
9812 }
9813 pub fn coin_mut(&mut self) -> &mut super::Argument {
9816 self.coin.get_or_insert_default()
9817 }
9818 pub fn coin_opt(&self) -> Option<&super::Argument> {
9820 self.coin.as_ref().map(|field| field as _)
9821 }
9822 pub fn set_coin<T: Into<super::Argument>>(&mut self, field: T) {
9824 self.coin = Some(field.into().into());
9825 }
9826 pub fn with_coin<T: Into<super::Argument>>(mut self, field: T) -> Self {
9828 self.set_coin(field.into());
9829 self
9830 }
9831 pub fn coins_to_merge(&self) -> &[super::Argument] {
9833 &self.coins_to_merge
9834 }
9835 pub fn coins_to_merge_mut(&mut self) -> &mut Vec<super::Argument> {
9838 &mut self.coins_to_merge
9839 }
9840 pub fn set_coins_to_merge(&mut self, field: Vec<super::Argument>) {
9842 self.coins_to_merge = field;
9843 }
9844 pub fn with_coins_to_merge(mut self, field: Vec<super::Argument>) -> Self {
9846 self.set_coins_to_merge(field);
9847 self
9848 }
9849 }
9850 impl super::Module {
9851 pub const fn const_default() -> Self {
9852 Self {
9853 name: None,
9854 contents: None,
9855 datatypes: Vec::new(),
9856 functions: Vec::new(),
9857 }
9858 }
9859 #[doc(hidden)]
9860 pub fn default_instance() -> &'static Self {
9861 static DEFAULT: super::Module = super::Module::const_default();
9862 &DEFAULT
9863 }
9864 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
9866 self.name.as_mut().map(|field| field as _)
9867 }
9868 pub fn name_mut(&mut self) -> &mut String {
9871 self.name.get_or_insert_default()
9872 }
9873 pub fn name_opt(&self) -> Option<&str> {
9875 self.name.as_ref().map(|field| field as _)
9876 }
9877 pub fn set_name<T: Into<String>>(&mut self, field: T) {
9879 self.name = Some(field.into().into());
9880 }
9881 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
9883 self.set_name(field.into());
9884 self
9885 }
9886 pub fn contents_opt(&self) -> Option<&[u8]> {
9888 self.contents.as_ref().map(|field| field as _)
9889 }
9890 pub fn set_contents<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9892 self.contents = Some(field.into().into());
9893 }
9894 pub fn with_contents<T: Into<::prost::bytes::Bytes>>(
9896 mut self,
9897 field: T,
9898 ) -> Self {
9899 self.set_contents(field.into());
9900 self
9901 }
9902 pub fn datatypes(&self) -> &[super::DatatypeDescriptor] {
9904 &self.datatypes
9905 }
9906 pub fn datatypes_mut(&mut self) -> &mut Vec<super::DatatypeDescriptor> {
9909 &mut self.datatypes
9910 }
9911 pub fn set_datatypes(&mut self, field: Vec<super::DatatypeDescriptor>) {
9913 self.datatypes = field;
9914 }
9915 pub fn with_datatypes(mut self, field: Vec<super::DatatypeDescriptor>) -> Self {
9917 self.set_datatypes(field);
9918 self
9919 }
9920 pub fn functions(&self) -> &[super::FunctionDescriptor] {
9922 &self.functions
9923 }
9924 pub fn functions_mut(&mut self) -> &mut Vec<super::FunctionDescriptor> {
9927 &mut self.functions
9928 }
9929 pub fn set_functions(&mut self, field: Vec<super::FunctionDescriptor>) {
9931 self.functions = field;
9932 }
9933 pub fn with_functions(mut self, field: Vec<super::FunctionDescriptor>) -> Self {
9935 self.set_functions(field);
9936 self
9937 }
9938 }
9939 impl super::MoveAbort {
9940 pub const fn const_default() -> Self {
9941 Self {
9942 abort_code: None,
9943 location: None,
9944 clever_error: None,
9945 }
9946 }
9947 #[doc(hidden)]
9948 pub fn default_instance() -> &'static Self {
9949 static DEFAULT: super::MoveAbort = super::MoveAbort::const_default();
9950 &DEFAULT
9951 }
9952 pub fn abort_code_opt_mut(&mut self) -> Option<&mut u64> {
9954 self.abort_code.as_mut().map(|field| field as _)
9955 }
9956 pub fn abort_code_mut(&mut self) -> &mut u64 {
9959 self.abort_code.get_or_insert_default()
9960 }
9961 pub fn abort_code_opt(&self) -> Option<u64> {
9963 self.abort_code.as_ref().map(|field| *field)
9964 }
9965 pub fn set_abort_code(&mut self, field: u64) {
9967 self.abort_code = Some(field);
9968 }
9969 pub fn with_abort_code(mut self, field: u64) -> Self {
9971 self.set_abort_code(field);
9972 self
9973 }
9974 pub fn location(&self) -> &super::MoveLocation {
9976 self.location
9977 .as_ref()
9978 .map(|field| field as _)
9979 .unwrap_or_else(|| super::MoveLocation::default_instance() as _)
9980 }
9981 pub fn location_opt_mut(&mut self) -> Option<&mut super::MoveLocation> {
9983 self.location.as_mut().map(|field| field as _)
9984 }
9985 pub fn location_mut(&mut self) -> &mut super::MoveLocation {
9988 self.location.get_or_insert_default()
9989 }
9990 pub fn location_opt(&self) -> Option<&super::MoveLocation> {
9992 self.location.as_ref().map(|field| field as _)
9993 }
9994 pub fn set_location<T: Into<super::MoveLocation>>(&mut self, field: T) {
9996 self.location = Some(field.into().into());
9997 }
9998 pub fn with_location<T: Into<super::MoveLocation>>(mut self, field: T) -> Self {
10000 self.set_location(field.into());
10001 self
10002 }
10003 pub fn clever_error(&self) -> &super::CleverError {
10005 self.clever_error
10006 .as_ref()
10007 .map(|field| field as _)
10008 .unwrap_or_else(|| super::CleverError::default_instance() as _)
10009 }
10010 pub fn clever_error_opt_mut(&mut self) -> Option<&mut super::CleverError> {
10012 self.clever_error.as_mut().map(|field| field as _)
10013 }
10014 pub fn clever_error_mut(&mut self) -> &mut super::CleverError {
10017 self.clever_error.get_or_insert_default()
10018 }
10019 pub fn clever_error_opt(&self) -> Option<&super::CleverError> {
10021 self.clever_error.as_ref().map(|field| field as _)
10022 }
10023 pub fn set_clever_error<T: Into<super::CleverError>>(&mut self, field: T) {
10025 self.clever_error = Some(field.into().into());
10026 }
10027 pub fn with_clever_error<T: Into<super::CleverError>>(
10029 mut self,
10030 field: T,
10031 ) -> Self {
10032 self.set_clever_error(field.into());
10033 self
10034 }
10035 }
10036 impl super::MoveCall {
10037 pub const fn const_default() -> Self {
10038 Self {
10039 package: None,
10040 module: None,
10041 function: None,
10042 type_arguments: Vec::new(),
10043 arguments: Vec::new(),
10044 }
10045 }
10046 #[doc(hidden)]
10047 pub fn default_instance() -> &'static Self {
10048 static DEFAULT: super::MoveCall = super::MoveCall::const_default();
10049 &DEFAULT
10050 }
10051 pub fn package_opt_mut(&mut self) -> Option<&mut String> {
10053 self.package.as_mut().map(|field| field as _)
10054 }
10055 pub fn package_mut(&mut self) -> &mut String {
10058 self.package.get_or_insert_default()
10059 }
10060 pub fn package_opt(&self) -> Option<&str> {
10062 self.package.as_ref().map(|field| field as _)
10063 }
10064 pub fn set_package<T: Into<String>>(&mut self, field: T) {
10066 self.package = Some(field.into().into());
10067 }
10068 pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
10070 self.set_package(field.into());
10071 self
10072 }
10073 pub fn module_opt_mut(&mut self) -> Option<&mut String> {
10075 self.module.as_mut().map(|field| field as _)
10076 }
10077 pub fn module_mut(&mut self) -> &mut String {
10080 self.module.get_or_insert_default()
10081 }
10082 pub fn module_opt(&self) -> Option<&str> {
10084 self.module.as_ref().map(|field| field as _)
10085 }
10086 pub fn set_module<T: Into<String>>(&mut self, field: T) {
10088 self.module = Some(field.into().into());
10089 }
10090 pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
10092 self.set_module(field.into());
10093 self
10094 }
10095 pub fn function_opt_mut(&mut self) -> Option<&mut String> {
10097 self.function.as_mut().map(|field| field as _)
10098 }
10099 pub fn function_mut(&mut self) -> &mut String {
10102 self.function.get_or_insert_default()
10103 }
10104 pub fn function_opt(&self) -> Option<&str> {
10106 self.function.as_ref().map(|field| field as _)
10107 }
10108 pub fn set_function<T: Into<String>>(&mut self, field: T) {
10110 self.function = Some(field.into().into());
10111 }
10112 pub fn with_function<T: Into<String>>(mut self, field: T) -> Self {
10114 self.set_function(field.into());
10115 self
10116 }
10117 pub fn type_arguments(&self) -> &[String] {
10119 &self.type_arguments
10120 }
10121 pub fn type_arguments_mut(&mut self) -> &mut Vec<String> {
10124 &mut self.type_arguments
10125 }
10126 pub fn set_type_arguments(&mut self, field: Vec<String>) {
10128 self.type_arguments = field;
10129 }
10130 pub fn with_type_arguments(mut self, field: Vec<String>) -> Self {
10132 self.set_type_arguments(field);
10133 self
10134 }
10135 pub fn arguments(&self) -> &[super::Argument] {
10137 &self.arguments
10138 }
10139 pub fn arguments_mut(&mut self) -> &mut Vec<super::Argument> {
10142 &mut self.arguments
10143 }
10144 pub fn set_arguments(&mut self, field: Vec<super::Argument>) {
10146 self.arguments = field;
10147 }
10148 pub fn with_arguments(mut self, field: Vec<super::Argument>) -> Self {
10150 self.set_arguments(field);
10151 self
10152 }
10153 }
10154 impl super::MoveLocation {
10155 pub const fn const_default() -> Self {
10156 Self {
10157 package: None,
10158 module: None,
10159 function: None,
10160 instruction: None,
10161 function_name: None,
10162 }
10163 }
10164 #[doc(hidden)]
10165 pub fn default_instance() -> &'static Self {
10166 static DEFAULT: super::MoveLocation = super::MoveLocation::const_default();
10167 &DEFAULT
10168 }
10169 pub fn package_opt_mut(&mut self) -> Option<&mut String> {
10171 self.package.as_mut().map(|field| field as _)
10172 }
10173 pub fn package_mut(&mut self) -> &mut String {
10176 self.package.get_or_insert_default()
10177 }
10178 pub fn package_opt(&self) -> Option<&str> {
10180 self.package.as_ref().map(|field| field as _)
10181 }
10182 pub fn set_package<T: Into<String>>(&mut self, field: T) {
10184 self.package = Some(field.into().into());
10185 }
10186 pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
10188 self.set_package(field.into());
10189 self
10190 }
10191 pub fn module_opt_mut(&mut self) -> Option<&mut String> {
10193 self.module.as_mut().map(|field| field as _)
10194 }
10195 pub fn module_mut(&mut self) -> &mut String {
10198 self.module.get_or_insert_default()
10199 }
10200 pub fn module_opt(&self) -> Option<&str> {
10202 self.module.as_ref().map(|field| field as _)
10203 }
10204 pub fn set_module<T: Into<String>>(&mut self, field: T) {
10206 self.module = Some(field.into().into());
10207 }
10208 pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
10210 self.set_module(field.into());
10211 self
10212 }
10213 pub fn function_opt_mut(&mut self) -> Option<&mut u32> {
10215 self.function.as_mut().map(|field| field as _)
10216 }
10217 pub fn function_mut(&mut self) -> &mut u32 {
10220 self.function.get_or_insert_default()
10221 }
10222 pub fn function_opt(&self) -> Option<u32> {
10224 self.function.as_ref().map(|field| *field)
10225 }
10226 pub fn set_function(&mut self, field: u32) {
10228 self.function = Some(field);
10229 }
10230 pub fn with_function(mut self, field: u32) -> Self {
10232 self.set_function(field);
10233 self
10234 }
10235 pub fn instruction_opt_mut(&mut self) -> Option<&mut u32> {
10237 self.instruction.as_mut().map(|field| field as _)
10238 }
10239 pub fn instruction_mut(&mut self) -> &mut u32 {
10242 self.instruction.get_or_insert_default()
10243 }
10244 pub fn instruction_opt(&self) -> Option<u32> {
10246 self.instruction.as_ref().map(|field| *field)
10247 }
10248 pub fn set_instruction(&mut self, field: u32) {
10250 self.instruction = Some(field);
10251 }
10252 pub fn with_instruction(mut self, field: u32) -> Self {
10254 self.set_instruction(field);
10255 self
10256 }
10257 pub fn function_name_opt_mut(&mut self) -> Option<&mut String> {
10259 self.function_name.as_mut().map(|field| field as _)
10260 }
10261 pub fn function_name_mut(&mut self) -> &mut String {
10264 self.function_name.get_or_insert_default()
10265 }
10266 pub fn function_name_opt(&self) -> Option<&str> {
10268 self.function_name.as_ref().map(|field| field as _)
10269 }
10270 pub fn set_function_name<T: Into<String>>(&mut self, field: T) {
10272 self.function_name = Some(field.into().into());
10273 }
10274 pub fn with_function_name<T: Into<String>>(mut self, field: T) -> Self {
10276 self.set_function_name(field.into());
10277 self
10278 }
10279 }
10280 impl super::MoveTable {
10281 pub const fn const_default() -> Self {
10282 Self { id: None, size: None }
10283 }
10284 #[doc(hidden)]
10285 pub fn default_instance() -> &'static Self {
10286 static DEFAULT: super::MoveTable = super::MoveTable::const_default();
10287 &DEFAULT
10288 }
10289 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
10291 self.id.as_mut().map(|field| field as _)
10292 }
10293 pub fn id_mut(&mut self) -> &mut String {
10296 self.id.get_or_insert_default()
10297 }
10298 pub fn id_opt(&self) -> Option<&str> {
10300 self.id.as_ref().map(|field| field as _)
10301 }
10302 pub fn set_id<T: Into<String>>(&mut self, field: T) {
10304 self.id = Some(field.into().into());
10305 }
10306 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
10308 self.set_id(field.into());
10309 self
10310 }
10311 pub fn size_opt_mut(&mut self) -> Option<&mut u64> {
10313 self.size.as_mut().map(|field| field as _)
10314 }
10315 pub fn size_mut(&mut self) -> &mut u64 {
10318 self.size.get_or_insert_default()
10319 }
10320 pub fn size_opt(&self) -> Option<u64> {
10322 self.size.as_ref().map(|field| *field)
10323 }
10324 pub fn set_size(&mut self, field: u64) {
10326 self.size = Some(field);
10327 }
10328 pub fn with_size(mut self, field: u64) -> Self {
10330 self.set_size(field);
10331 self
10332 }
10333 }
10334 impl super::MultisigAggregatedSignature {
10335 pub const fn const_default() -> Self {
10336 Self {
10337 signatures: Vec::new(),
10338 bitmap: None,
10339 legacy_bitmap: None,
10340 committee: None,
10341 }
10342 }
10343 #[doc(hidden)]
10344 pub fn default_instance() -> &'static Self {
10345 static DEFAULT: super::MultisigAggregatedSignature = super::MultisigAggregatedSignature::const_default();
10346 &DEFAULT
10347 }
10348 pub fn signatures(&self) -> &[super::MultisigMemberSignature] {
10350 &self.signatures
10351 }
10352 pub fn signatures_mut(&mut self) -> &mut Vec<super::MultisigMemberSignature> {
10355 &mut self.signatures
10356 }
10357 pub fn set_signatures(&mut self, field: Vec<super::MultisigMemberSignature>) {
10359 self.signatures = field;
10360 }
10361 pub fn with_signatures(
10363 mut self,
10364 field: Vec<super::MultisigMemberSignature>,
10365 ) -> Self {
10366 self.set_signatures(field);
10367 self
10368 }
10369 pub fn bitmap_opt_mut(&mut self) -> Option<&mut u32> {
10371 self.bitmap.as_mut().map(|field| field as _)
10372 }
10373 pub fn bitmap_mut(&mut self) -> &mut u32 {
10376 self.bitmap.get_or_insert_default()
10377 }
10378 pub fn bitmap_opt(&self) -> Option<u32> {
10380 self.bitmap.as_ref().map(|field| *field)
10381 }
10382 pub fn set_bitmap(&mut self, field: u32) {
10384 self.bitmap = Some(field);
10385 }
10386 pub fn with_bitmap(mut self, field: u32) -> Self {
10388 self.set_bitmap(field);
10389 self
10390 }
10391 pub fn legacy_bitmap_opt(&self) -> Option<&[u8]> {
10393 self.legacy_bitmap.as_ref().map(|field| field as _)
10394 }
10395 pub fn set_legacy_bitmap<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10397 self.legacy_bitmap = Some(field.into().into());
10398 }
10399 pub fn with_legacy_bitmap<T: Into<::prost::bytes::Bytes>>(
10401 mut self,
10402 field: T,
10403 ) -> Self {
10404 self.set_legacy_bitmap(field.into());
10405 self
10406 }
10407 pub fn committee(&self) -> &super::MultisigCommittee {
10409 self.committee
10410 .as_ref()
10411 .map(|field| field as _)
10412 .unwrap_or_else(|| super::MultisigCommittee::default_instance() as _)
10413 }
10414 pub fn committee_opt_mut(&mut self) -> Option<&mut super::MultisigCommittee> {
10416 self.committee.as_mut().map(|field| field as _)
10417 }
10418 pub fn committee_mut(&mut self) -> &mut super::MultisigCommittee {
10421 self.committee.get_or_insert_default()
10422 }
10423 pub fn committee_opt(&self) -> Option<&super::MultisigCommittee> {
10425 self.committee.as_ref().map(|field| field as _)
10426 }
10427 pub fn set_committee<T: Into<super::MultisigCommittee>>(&mut self, field: T) {
10429 self.committee = Some(field.into().into());
10430 }
10431 pub fn with_committee<T: Into<super::MultisigCommittee>>(
10433 mut self,
10434 field: T,
10435 ) -> Self {
10436 self.set_committee(field.into());
10437 self
10438 }
10439 }
10440 impl super::MultisigCommittee {
10441 pub const fn const_default() -> Self {
10442 Self {
10443 members: Vec::new(),
10444 threshold: None,
10445 }
10446 }
10447 #[doc(hidden)]
10448 pub fn default_instance() -> &'static Self {
10449 static DEFAULT: super::MultisigCommittee = super::MultisigCommittee::const_default();
10450 &DEFAULT
10451 }
10452 pub fn members(&self) -> &[super::MultisigMember] {
10454 &self.members
10455 }
10456 pub fn members_mut(&mut self) -> &mut Vec<super::MultisigMember> {
10459 &mut self.members
10460 }
10461 pub fn set_members(&mut self, field: Vec<super::MultisigMember>) {
10463 self.members = field;
10464 }
10465 pub fn with_members(mut self, field: Vec<super::MultisigMember>) -> Self {
10467 self.set_members(field);
10468 self
10469 }
10470 pub fn threshold_opt_mut(&mut self) -> Option<&mut u32> {
10472 self.threshold.as_mut().map(|field| field as _)
10473 }
10474 pub fn threshold_mut(&mut self) -> &mut u32 {
10477 self.threshold.get_or_insert_default()
10478 }
10479 pub fn threshold_opt(&self) -> Option<u32> {
10481 self.threshold.as_ref().map(|field| *field)
10482 }
10483 pub fn set_threshold(&mut self, field: u32) {
10485 self.threshold = Some(field);
10486 }
10487 pub fn with_threshold(mut self, field: u32) -> Self {
10489 self.set_threshold(field);
10490 self
10491 }
10492 }
10493 impl super::MultisigMember {
10494 pub const fn const_default() -> Self {
10495 Self {
10496 public_key: None,
10497 weight: None,
10498 }
10499 }
10500 #[doc(hidden)]
10501 pub fn default_instance() -> &'static Self {
10502 static DEFAULT: super::MultisigMember = super::MultisigMember::const_default();
10503 &DEFAULT
10504 }
10505 pub fn public_key(&self) -> &super::MultisigMemberPublicKey {
10507 self.public_key
10508 .as_ref()
10509 .map(|field| field as _)
10510 .unwrap_or_else(|| {
10511 super::MultisigMemberPublicKey::default_instance() as _
10512 })
10513 }
10514 pub fn public_key_opt_mut(
10516 &mut self,
10517 ) -> Option<&mut super::MultisigMemberPublicKey> {
10518 self.public_key.as_mut().map(|field| field as _)
10519 }
10520 pub fn public_key_mut(&mut self) -> &mut super::MultisigMemberPublicKey {
10523 self.public_key.get_or_insert_default()
10524 }
10525 pub fn public_key_opt(&self) -> Option<&super::MultisigMemberPublicKey> {
10527 self.public_key.as_ref().map(|field| field as _)
10528 }
10529 pub fn set_public_key<T: Into<super::MultisigMemberPublicKey>>(
10531 &mut self,
10532 field: T,
10533 ) {
10534 self.public_key = Some(field.into().into());
10535 }
10536 pub fn with_public_key<T: Into<super::MultisigMemberPublicKey>>(
10538 mut self,
10539 field: T,
10540 ) -> Self {
10541 self.set_public_key(field.into());
10542 self
10543 }
10544 pub fn weight_opt_mut(&mut self) -> Option<&mut u32> {
10546 self.weight.as_mut().map(|field| field as _)
10547 }
10548 pub fn weight_mut(&mut self) -> &mut u32 {
10551 self.weight.get_or_insert_default()
10552 }
10553 pub fn weight_opt(&self) -> Option<u32> {
10555 self.weight.as_ref().map(|field| *field)
10556 }
10557 pub fn set_weight(&mut self, field: u32) {
10559 self.weight = Some(field);
10560 }
10561 pub fn with_weight(mut self, field: u32) -> Self {
10563 self.set_weight(field);
10564 self
10565 }
10566 }
10567 impl super::MultisigMemberPublicKey {
10568 pub const fn const_default() -> Self {
10569 Self {
10570 scheme: None,
10571 public_key: None,
10572 zklogin: None,
10573 }
10574 }
10575 #[doc(hidden)]
10576 pub fn default_instance() -> &'static Self {
10577 static DEFAULT: super::MultisigMemberPublicKey = super::MultisigMemberPublicKey::const_default();
10578 &DEFAULT
10579 }
10580 pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
10582 self.set_scheme(field.into());
10583 self
10584 }
10585 pub fn public_key_opt(&self) -> Option<&[u8]> {
10587 self.public_key.as_ref().map(|field| field as _)
10588 }
10589 pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10591 self.public_key = Some(field.into().into());
10592 }
10593 pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
10595 mut self,
10596 field: T,
10597 ) -> Self {
10598 self.set_public_key(field.into());
10599 self
10600 }
10601 pub fn zklogin(&self) -> &super::ZkLoginPublicIdentifier {
10603 self.zklogin
10604 .as_ref()
10605 .map(|field| field as _)
10606 .unwrap_or_else(|| {
10607 super::ZkLoginPublicIdentifier::default_instance() as _
10608 })
10609 }
10610 pub fn zklogin_opt_mut(
10612 &mut self,
10613 ) -> Option<&mut super::ZkLoginPublicIdentifier> {
10614 self.zklogin.as_mut().map(|field| field as _)
10615 }
10616 pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginPublicIdentifier {
10619 self.zklogin.get_or_insert_default()
10620 }
10621 pub fn zklogin_opt(&self) -> Option<&super::ZkLoginPublicIdentifier> {
10623 self.zklogin.as_ref().map(|field| field as _)
10624 }
10625 pub fn set_zklogin<T: Into<super::ZkLoginPublicIdentifier>>(
10627 &mut self,
10628 field: T,
10629 ) {
10630 self.zklogin = Some(field.into().into());
10631 }
10632 pub fn with_zklogin<T: Into<super::ZkLoginPublicIdentifier>>(
10634 mut self,
10635 field: T,
10636 ) -> Self {
10637 self.set_zklogin(field.into());
10638 self
10639 }
10640 }
10641 impl super::MultisigMemberSignature {
10642 pub const fn const_default() -> Self {
10643 Self {
10644 scheme: None,
10645 signature: None,
10646 zklogin: None,
10647 passkey: None,
10648 }
10649 }
10650 #[doc(hidden)]
10651 pub fn default_instance() -> &'static Self {
10652 static DEFAULT: super::MultisigMemberSignature = super::MultisigMemberSignature::const_default();
10653 &DEFAULT
10654 }
10655 pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
10657 self.set_scheme(field.into());
10658 self
10659 }
10660 pub fn signature_opt(&self) -> Option<&[u8]> {
10662 self.signature.as_ref().map(|field| field as _)
10663 }
10664 pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10666 self.signature = Some(field.into().into());
10667 }
10668 pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
10670 mut self,
10671 field: T,
10672 ) -> Self {
10673 self.set_signature(field.into());
10674 self
10675 }
10676 pub fn zklogin(&self) -> &super::ZkLoginAuthenticator {
10678 self.zklogin
10679 .as_ref()
10680 .map(|field| field as _)
10681 .unwrap_or_else(|| super::ZkLoginAuthenticator::default_instance() as _)
10682 }
10683 pub fn zklogin_opt_mut(&mut self) -> Option<&mut super::ZkLoginAuthenticator> {
10685 self.zklogin.as_mut().map(|field| field as _)
10686 }
10687 pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginAuthenticator {
10690 self.zklogin.get_or_insert_default()
10691 }
10692 pub fn zklogin_opt(&self) -> Option<&super::ZkLoginAuthenticator> {
10694 self.zklogin.as_ref().map(|field| field as _)
10695 }
10696 pub fn set_zklogin<T: Into<super::ZkLoginAuthenticator>>(&mut self, field: T) {
10698 self.zklogin = Some(field.into().into());
10699 }
10700 pub fn with_zklogin<T: Into<super::ZkLoginAuthenticator>>(
10702 mut self,
10703 field: T,
10704 ) -> Self {
10705 self.set_zklogin(field.into());
10706 self
10707 }
10708 pub fn passkey(&self) -> &super::PasskeyAuthenticator {
10710 self.passkey
10711 .as_ref()
10712 .map(|field| field as _)
10713 .unwrap_or_else(|| super::PasskeyAuthenticator::default_instance() as _)
10714 }
10715 pub fn passkey_opt_mut(&mut self) -> Option<&mut super::PasskeyAuthenticator> {
10717 self.passkey.as_mut().map(|field| field as _)
10718 }
10719 pub fn passkey_mut(&mut self) -> &mut super::PasskeyAuthenticator {
10722 self.passkey.get_or_insert_default()
10723 }
10724 pub fn passkey_opt(&self) -> Option<&super::PasskeyAuthenticator> {
10726 self.passkey.as_ref().map(|field| field as _)
10727 }
10728 pub fn set_passkey<T: Into<super::PasskeyAuthenticator>>(&mut self, field: T) {
10730 self.passkey = Some(field.into().into());
10731 }
10732 pub fn with_passkey<T: Into<super::PasskeyAuthenticator>>(
10734 mut self,
10735 field: T,
10736 ) -> Self {
10737 self.set_passkey(field.into());
10738 self
10739 }
10740 }
10741 impl super::NameRecord {
10742 pub const fn const_default() -> Self {
10743 Self {
10744 id: None,
10745 name: None,
10746 registration_nft_id: None,
10747 expiration_timestamp: None,
10748 target_address: None,
10749 data: std::collections::BTreeMap::new(),
10750 }
10751 }
10752 #[doc(hidden)]
10753 pub fn default_instance() -> &'static Self {
10754 static DEFAULT: super::NameRecord = super::NameRecord::const_default();
10755 &DEFAULT
10756 }
10757 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
10759 self.id.as_mut().map(|field| field as _)
10760 }
10761 pub fn id_mut(&mut self) -> &mut String {
10764 self.id.get_or_insert_default()
10765 }
10766 pub fn id_opt(&self) -> Option<&str> {
10768 self.id.as_ref().map(|field| field as _)
10769 }
10770 pub fn set_id<T: Into<String>>(&mut self, field: T) {
10772 self.id = Some(field.into().into());
10773 }
10774 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
10776 self.set_id(field.into());
10777 self
10778 }
10779 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
10781 self.name.as_mut().map(|field| field as _)
10782 }
10783 pub fn name_mut(&mut self) -> &mut String {
10786 self.name.get_or_insert_default()
10787 }
10788 pub fn name_opt(&self) -> Option<&str> {
10790 self.name.as_ref().map(|field| field as _)
10791 }
10792 pub fn set_name<T: Into<String>>(&mut self, field: T) {
10794 self.name = Some(field.into().into());
10795 }
10796 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
10798 self.set_name(field.into());
10799 self
10800 }
10801 pub fn registration_nft_id_opt_mut(&mut self) -> Option<&mut String> {
10803 self.registration_nft_id.as_mut().map(|field| field as _)
10804 }
10805 pub fn registration_nft_id_mut(&mut self) -> &mut String {
10808 self.registration_nft_id.get_or_insert_default()
10809 }
10810 pub fn registration_nft_id_opt(&self) -> Option<&str> {
10812 self.registration_nft_id.as_ref().map(|field| field as _)
10813 }
10814 pub fn set_registration_nft_id<T: Into<String>>(&mut self, field: T) {
10816 self.registration_nft_id = Some(field.into().into());
10817 }
10818 pub fn with_registration_nft_id<T: Into<String>>(mut self, field: T) -> Self {
10820 self.set_registration_nft_id(field.into());
10821 self
10822 }
10823 pub fn expiration_timestamp_opt_mut(
10825 &mut self,
10826 ) -> Option<&mut ::prost_types::Timestamp> {
10827 self.expiration_timestamp.as_mut().map(|field| field as _)
10828 }
10829 pub fn expiration_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
10832 self.expiration_timestamp.get_or_insert_default()
10833 }
10834 pub fn expiration_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
10836 self.expiration_timestamp.as_ref().map(|field| field as _)
10837 }
10838 pub fn set_expiration_timestamp<T: Into<::prost_types::Timestamp>>(
10840 &mut self,
10841 field: T,
10842 ) {
10843 self.expiration_timestamp = Some(field.into().into());
10844 }
10845 pub fn with_expiration_timestamp<T: Into<::prost_types::Timestamp>>(
10847 mut self,
10848 field: T,
10849 ) -> Self {
10850 self.set_expiration_timestamp(field.into());
10851 self
10852 }
10853 pub fn target_address_opt_mut(&mut self) -> Option<&mut String> {
10855 self.target_address.as_mut().map(|field| field as _)
10856 }
10857 pub fn target_address_mut(&mut self) -> &mut String {
10860 self.target_address.get_or_insert_default()
10861 }
10862 pub fn target_address_opt(&self) -> Option<&str> {
10864 self.target_address.as_ref().map(|field| field as _)
10865 }
10866 pub fn set_target_address<T: Into<String>>(&mut self, field: T) {
10868 self.target_address = Some(field.into().into());
10869 }
10870 pub fn with_target_address<T: Into<String>>(mut self, field: T) -> Self {
10872 self.set_target_address(field.into());
10873 self
10874 }
10875 pub fn data(&self) -> &::std::collections::BTreeMap<String, String> {
10877 &self.data
10878 }
10879 pub fn data_mut(&mut self) -> &mut ::std::collections::BTreeMap<String, String> {
10882 &mut self.data
10883 }
10884 pub fn set_data(&mut self, field: ::std::collections::BTreeMap<String, String>) {
10886 self.data = field;
10887 }
10888 pub fn with_data(
10890 mut self,
10891 field: ::std::collections::BTreeMap<String, String>,
10892 ) -> Self {
10893 self.set_data(field);
10894 self
10895 }
10896 }
10897 impl super::Object {
10898 pub const fn const_default() -> Self {
10899 Self {
10900 bcs: None,
10901 object_id: None,
10902 version: None,
10903 digest: None,
10904 owner: None,
10905 object_type: None,
10906 has_public_transfer: None,
10907 contents: None,
10908 package: None,
10909 previous_transaction: None,
10910 storage_rebate: None,
10911 json: None,
10912 balance: None,
10913 display: None,
10914 }
10915 }
10916 #[doc(hidden)]
10917 pub fn default_instance() -> &'static Self {
10918 static DEFAULT: super::Object = super::Object::const_default();
10919 &DEFAULT
10920 }
10921 pub fn bcs(&self) -> &super::Bcs {
10923 self.bcs
10924 .as_ref()
10925 .map(|field| field as _)
10926 .unwrap_or_else(|| super::Bcs::default_instance() as _)
10927 }
10928 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
10930 self.bcs.as_mut().map(|field| field as _)
10931 }
10932 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
10935 self.bcs.get_or_insert_default()
10936 }
10937 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
10939 self.bcs.as_ref().map(|field| field as _)
10940 }
10941 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
10943 self.bcs = Some(field.into().into());
10944 }
10945 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
10947 self.set_bcs(field.into());
10948 self
10949 }
10950 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
10952 self.object_id.as_mut().map(|field| field as _)
10953 }
10954 pub fn object_id_mut(&mut self) -> &mut String {
10957 self.object_id.get_or_insert_default()
10958 }
10959 pub fn object_id_opt(&self) -> Option<&str> {
10961 self.object_id.as_ref().map(|field| field as _)
10962 }
10963 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
10965 self.object_id = Some(field.into().into());
10966 }
10967 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
10969 self.set_object_id(field.into());
10970 self
10971 }
10972 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
10974 self.version.as_mut().map(|field| field as _)
10975 }
10976 pub fn version_mut(&mut self) -> &mut u64 {
10979 self.version.get_or_insert_default()
10980 }
10981 pub fn version_opt(&self) -> Option<u64> {
10983 self.version.as_ref().map(|field| *field)
10984 }
10985 pub fn set_version(&mut self, field: u64) {
10987 self.version = Some(field);
10988 }
10989 pub fn with_version(mut self, field: u64) -> Self {
10991 self.set_version(field);
10992 self
10993 }
10994 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
10996 self.digest.as_mut().map(|field| field as _)
10997 }
10998 pub fn digest_mut(&mut self) -> &mut String {
11001 self.digest.get_or_insert_default()
11002 }
11003 pub fn digest_opt(&self) -> Option<&str> {
11005 self.digest.as_ref().map(|field| field as _)
11006 }
11007 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
11009 self.digest = Some(field.into().into());
11010 }
11011 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
11013 self.set_digest(field.into());
11014 self
11015 }
11016 pub fn owner(&self) -> &super::Owner {
11018 self.owner
11019 .as_ref()
11020 .map(|field| field as _)
11021 .unwrap_or_else(|| super::Owner::default_instance() as _)
11022 }
11023 pub fn owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
11025 self.owner.as_mut().map(|field| field as _)
11026 }
11027 pub fn owner_mut(&mut self) -> &mut super::Owner {
11030 self.owner.get_or_insert_default()
11031 }
11032 pub fn owner_opt(&self) -> Option<&super::Owner> {
11034 self.owner.as_ref().map(|field| field as _)
11035 }
11036 pub fn set_owner<T: Into<super::Owner>>(&mut self, field: T) {
11038 self.owner = Some(field.into().into());
11039 }
11040 pub fn with_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
11042 self.set_owner(field.into());
11043 self
11044 }
11045 pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
11047 self.object_type.as_mut().map(|field| field as _)
11048 }
11049 pub fn object_type_mut(&mut self) -> &mut String {
11052 self.object_type.get_or_insert_default()
11053 }
11054 pub fn object_type_opt(&self) -> Option<&str> {
11056 self.object_type.as_ref().map(|field| field as _)
11057 }
11058 pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
11060 self.object_type = Some(field.into().into());
11061 }
11062 pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
11064 self.set_object_type(field.into());
11065 self
11066 }
11067 pub fn has_public_transfer_opt_mut(&mut self) -> Option<&mut bool> {
11069 self.has_public_transfer.as_mut().map(|field| field as _)
11070 }
11071 pub fn has_public_transfer_mut(&mut self) -> &mut bool {
11074 self.has_public_transfer.get_or_insert_default()
11075 }
11076 pub fn has_public_transfer_opt(&self) -> Option<bool> {
11078 self.has_public_transfer.as_ref().map(|field| *field)
11079 }
11080 pub fn set_has_public_transfer(&mut self, field: bool) {
11082 self.has_public_transfer = Some(field);
11083 }
11084 pub fn with_has_public_transfer(mut self, field: bool) -> Self {
11086 self.set_has_public_transfer(field);
11087 self
11088 }
11089 pub fn contents(&self) -> &super::Bcs {
11091 self.contents
11092 .as_ref()
11093 .map(|field| field as _)
11094 .unwrap_or_else(|| super::Bcs::default_instance() as _)
11095 }
11096 pub fn contents_opt_mut(&mut self) -> Option<&mut super::Bcs> {
11098 self.contents.as_mut().map(|field| field as _)
11099 }
11100 pub fn contents_mut(&mut self) -> &mut super::Bcs {
11103 self.contents.get_or_insert_default()
11104 }
11105 pub fn contents_opt(&self) -> Option<&super::Bcs> {
11107 self.contents.as_ref().map(|field| field as _)
11108 }
11109 pub fn set_contents<T: Into<super::Bcs>>(&mut self, field: T) {
11111 self.contents = Some(field.into().into());
11112 }
11113 pub fn with_contents<T: Into<super::Bcs>>(mut self, field: T) -> Self {
11115 self.set_contents(field.into());
11116 self
11117 }
11118 pub fn package(&self) -> &super::Package {
11120 self.package
11121 .as_ref()
11122 .map(|field| field as _)
11123 .unwrap_or_else(|| super::Package::default_instance() as _)
11124 }
11125 pub fn package_opt_mut(&mut self) -> Option<&mut super::Package> {
11127 self.package.as_mut().map(|field| field as _)
11128 }
11129 pub fn package_mut(&mut self) -> &mut super::Package {
11132 self.package.get_or_insert_default()
11133 }
11134 pub fn package_opt(&self) -> Option<&super::Package> {
11136 self.package.as_ref().map(|field| field as _)
11137 }
11138 pub fn set_package<T: Into<super::Package>>(&mut self, field: T) {
11140 self.package = Some(field.into().into());
11141 }
11142 pub fn with_package<T: Into<super::Package>>(mut self, field: T) -> Self {
11144 self.set_package(field.into());
11145 self
11146 }
11147 pub fn previous_transaction_opt_mut(&mut self) -> Option<&mut String> {
11149 self.previous_transaction.as_mut().map(|field| field as _)
11150 }
11151 pub fn previous_transaction_mut(&mut self) -> &mut String {
11154 self.previous_transaction.get_or_insert_default()
11155 }
11156 pub fn previous_transaction_opt(&self) -> Option<&str> {
11158 self.previous_transaction.as_ref().map(|field| field as _)
11159 }
11160 pub fn set_previous_transaction<T: Into<String>>(&mut self, field: T) {
11162 self.previous_transaction = Some(field.into().into());
11163 }
11164 pub fn with_previous_transaction<T: Into<String>>(mut self, field: T) -> Self {
11166 self.set_previous_transaction(field.into());
11167 self
11168 }
11169 pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
11171 self.storage_rebate.as_mut().map(|field| field as _)
11172 }
11173 pub fn storage_rebate_mut(&mut self) -> &mut u64 {
11176 self.storage_rebate.get_or_insert_default()
11177 }
11178 pub fn storage_rebate_opt(&self) -> Option<u64> {
11180 self.storage_rebate.as_ref().map(|field| *field)
11181 }
11182 pub fn set_storage_rebate(&mut self, field: u64) {
11184 self.storage_rebate = Some(field);
11185 }
11186 pub fn with_storage_rebate(mut self, field: u64) -> Self {
11188 self.set_storage_rebate(field);
11189 self
11190 }
11191 pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
11193 self.json.as_mut().map(|field| field as _)
11194 }
11195 pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
11198 self.json.get_or_insert_default()
11199 }
11200 pub fn json_opt(&self) -> Option<&::prost_types::Value> {
11202 self.json.as_ref().map(|field| field as _)
11203 }
11204 pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
11206 self.json = Some(field.into().into());
11207 }
11208 pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
11210 self.set_json(field.into());
11211 self
11212 }
11213 pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
11215 self.balance.as_mut().map(|field| field as _)
11216 }
11217 pub fn balance_mut(&mut self) -> &mut u64 {
11220 self.balance.get_or_insert_default()
11221 }
11222 pub fn balance_opt(&self) -> Option<u64> {
11224 self.balance.as_ref().map(|field| *field)
11225 }
11226 pub fn set_balance(&mut self, field: u64) {
11228 self.balance = Some(field);
11229 }
11230 pub fn with_balance(mut self, field: u64) -> Self {
11232 self.set_balance(field);
11233 self
11234 }
11235 pub fn display(&self) -> &super::Display {
11237 self.display
11238 .as_ref()
11239 .map(|field| field as _)
11240 .unwrap_or_else(|| super::Display::default_instance() as _)
11241 }
11242 pub fn display_opt_mut(&mut self) -> Option<&mut super::Display> {
11244 self.display.as_mut().map(|field| field as _)
11245 }
11246 pub fn display_mut(&mut self) -> &mut super::Display {
11249 self.display.get_or_insert_default()
11250 }
11251 pub fn display_opt(&self) -> Option<&super::Display> {
11253 self.display.as_ref().map(|field| field as _)
11254 }
11255 pub fn set_display<T: Into<super::Display>>(&mut self, field: T) {
11257 self.display = Some(field.into().into());
11258 }
11259 pub fn with_display<T: Into<super::Display>>(mut self, field: T) -> Self {
11261 self.set_display(field.into());
11262 self
11263 }
11264 }
11265 impl super::ObjectReference {
11266 pub const fn const_default() -> Self {
11267 Self {
11268 object_id: None,
11269 version: None,
11270 digest: None,
11271 }
11272 }
11273 #[doc(hidden)]
11274 pub fn default_instance() -> &'static Self {
11275 static DEFAULT: super::ObjectReference = super::ObjectReference::const_default();
11276 &DEFAULT
11277 }
11278 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
11280 self.object_id.as_mut().map(|field| field as _)
11281 }
11282 pub fn object_id_mut(&mut self) -> &mut String {
11285 self.object_id.get_or_insert_default()
11286 }
11287 pub fn object_id_opt(&self) -> Option<&str> {
11289 self.object_id.as_ref().map(|field| field as _)
11290 }
11291 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
11293 self.object_id = Some(field.into().into());
11294 }
11295 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
11297 self.set_object_id(field.into());
11298 self
11299 }
11300 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
11302 self.version.as_mut().map(|field| field as _)
11303 }
11304 pub fn version_mut(&mut self) -> &mut u64 {
11307 self.version.get_or_insert_default()
11308 }
11309 pub fn version_opt(&self) -> Option<u64> {
11311 self.version.as_ref().map(|field| *field)
11312 }
11313 pub fn set_version(&mut self, field: u64) {
11315 self.version = Some(field);
11316 }
11317 pub fn with_version(mut self, field: u64) -> Self {
11319 self.set_version(field);
11320 self
11321 }
11322 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
11324 self.digest.as_mut().map(|field| field as _)
11325 }
11326 pub fn digest_mut(&mut self) -> &mut String {
11329 self.digest.get_or_insert_default()
11330 }
11331 pub fn digest_opt(&self) -> Option<&str> {
11333 self.digest.as_ref().map(|field| field as _)
11334 }
11335 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
11337 self.digest = Some(field.into().into());
11338 }
11339 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
11341 self.set_digest(field.into());
11342 self
11343 }
11344 }
11345 impl super::ObjectSet {
11346 pub const fn const_default() -> Self {
11347 Self { objects: Vec::new() }
11348 }
11349 #[doc(hidden)]
11350 pub fn default_instance() -> &'static Self {
11351 static DEFAULT: super::ObjectSet = super::ObjectSet::const_default();
11352 &DEFAULT
11353 }
11354 pub fn objects(&self) -> &[super::Object] {
11356 &self.objects
11357 }
11358 pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
11361 &mut self.objects
11362 }
11363 pub fn set_objects(&mut self, field: Vec<super::Object>) {
11365 self.objects = field;
11366 }
11367 pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
11369 self.set_objects(field);
11370 self
11371 }
11372 }
11373 impl super::OpenSignature {
11374 pub const fn const_default() -> Self {
11375 Self {
11376 reference: None,
11377 body: None,
11378 }
11379 }
11380 #[doc(hidden)]
11381 pub fn default_instance() -> &'static Self {
11382 static DEFAULT: super::OpenSignature = super::OpenSignature::const_default();
11383 &DEFAULT
11384 }
11385 pub fn with_reference<T: Into<super::open_signature::Reference>>(
11387 mut self,
11388 field: T,
11389 ) -> Self {
11390 self.set_reference(field.into());
11391 self
11392 }
11393 pub fn body(&self) -> &super::OpenSignatureBody {
11395 self.body
11396 .as_ref()
11397 .map(|field| field as _)
11398 .unwrap_or_else(|| super::OpenSignatureBody::default_instance() as _)
11399 }
11400 pub fn body_opt_mut(&mut self) -> Option<&mut super::OpenSignatureBody> {
11402 self.body.as_mut().map(|field| field as _)
11403 }
11404 pub fn body_mut(&mut self) -> &mut super::OpenSignatureBody {
11407 self.body.get_or_insert_default()
11408 }
11409 pub fn body_opt(&self) -> Option<&super::OpenSignatureBody> {
11411 self.body.as_ref().map(|field| field as _)
11412 }
11413 pub fn set_body<T: Into<super::OpenSignatureBody>>(&mut self, field: T) {
11415 self.body = Some(field.into().into());
11416 }
11417 pub fn with_body<T: Into<super::OpenSignatureBody>>(mut self, field: T) -> Self {
11419 self.set_body(field.into());
11420 self
11421 }
11422 }
11423 impl super::OpenSignatureBody {
11424 pub const fn const_default() -> Self {
11425 Self {
11426 r#type: None,
11427 type_name: None,
11428 type_parameter_instantiation: Vec::new(),
11429 type_parameter: None,
11430 }
11431 }
11432 #[doc(hidden)]
11433 pub fn default_instance() -> &'static Self {
11434 static DEFAULT: super::OpenSignatureBody = super::OpenSignatureBody::const_default();
11435 &DEFAULT
11436 }
11437 pub fn with_type<T: Into<super::open_signature_body::Type>>(
11439 mut self,
11440 field: T,
11441 ) -> Self {
11442 self.set_type(field.into());
11443 self
11444 }
11445 pub fn type_name_opt_mut(&mut self) -> Option<&mut String> {
11447 self.type_name.as_mut().map(|field| field as _)
11448 }
11449 pub fn type_name_mut(&mut self) -> &mut String {
11452 self.type_name.get_or_insert_default()
11453 }
11454 pub fn type_name_opt(&self) -> Option<&str> {
11456 self.type_name.as_ref().map(|field| field as _)
11457 }
11458 pub fn set_type_name<T: Into<String>>(&mut self, field: T) {
11460 self.type_name = Some(field.into().into());
11461 }
11462 pub fn with_type_name<T: Into<String>>(mut self, field: T) -> Self {
11464 self.set_type_name(field.into());
11465 self
11466 }
11467 pub fn type_parameter_instantiation(&self) -> &[super::OpenSignatureBody] {
11469 &self.type_parameter_instantiation
11470 }
11471 pub fn type_parameter_instantiation_mut(
11474 &mut self,
11475 ) -> &mut Vec<super::OpenSignatureBody> {
11476 &mut self.type_parameter_instantiation
11477 }
11478 pub fn set_type_parameter_instantiation(
11480 &mut self,
11481 field: Vec<super::OpenSignatureBody>,
11482 ) {
11483 self.type_parameter_instantiation = field;
11484 }
11485 pub fn with_type_parameter_instantiation(
11487 mut self,
11488 field: Vec<super::OpenSignatureBody>,
11489 ) -> Self {
11490 self.set_type_parameter_instantiation(field);
11491 self
11492 }
11493 pub fn type_parameter_opt_mut(&mut self) -> Option<&mut u32> {
11495 self.type_parameter.as_mut().map(|field| field as _)
11496 }
11497 pub fn type_parameter_mut(&mut self) -> &mut u32 {
11500 self.type_parameter.get_or_insert_default()
11501 }
11502 pub fn type_parameter_opt(&self) -> Option<u32> {
11504 self.type_parameter.as_ref().map(|field| *field)
11505 }
11506 pub fn set_type_parameter(&mut self, field: u32) {
11508 self.type_parameter = Some(field);
11509 }
11510 pub fn with_type_parameter(mut self, field: u32) -> Self {
11512 self.set_type_parameter(field);
11513 self
11514 }
11515 }
11516 impl super::Owner {
11517 pub const fn const_default() -> Self {
11518 Self {
11519 kind: None,
11520 address: None,
11521 version: None,
11522 }
11523 }
11524 #[doc(hidden)]
11525 pub fn default_instance() -> &'static Self {
11526 static DEFAULT: super::Owner = super::Owner::const_default();
11527 &DEFAULT
11528 }
11529 pub fn with_kind<T: Into<super::owner::OwnerKind>>(mut self, field: T) -> Self {
11531 self.set_kind(field.into());
11532 self
11533 }
11534 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
11536 self.address.as_mut().map(|field| field as _)
11537 }
11538 pub fn address_mut(&mut self) -> &mut String {
11541 self.address.get_or_insert_default()
11542 }
11543 pub fn address_opt(&self) -> Option<&str> {
11545 self.address.as_ref().map(|field| field as _)
11546 }
11547 pub fn set_address<T: Into<String>>(&mut self, field: T) {
11549 self.address = Some(field.into().into());
11550 }
11551 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
11553 self.set_address(field.into());
11554 self
11555 }
11556 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
11558 self.version.as_mut().map(|field| field as _)
11559 }
11560 pub fn version_mut(&mut self) -> &mut u64 {
11563 self.version.get_or_insert_default()
11564 }
11565 pub fn version_opt(&self) -> Option<u64> {
11567 self.version.as_ref().map(|field| *field)
11568 }
11569 pub fn set_version(&mut self, field: u64) {
11571 self.version = Some(field);
11572 }
11573 pub fn with_version(mut self, field: u64) -> Self {
11575 self.set_version(field);
11576 self
11577 }
11578 }
11579 impl super::Package {
11580 pub const fn const_default() -> Self {
11581 Self {
11582 storage_id: None,
11583 original_id: None,
11584 version: None,
11585 modules: Vec::new(),
11586 type_origins: Vec::new(),
11587 linkage: Vec::new(),
11588 }
11589 }
11590 #[doc(hidden)]
11591 pub fn default_instance() -> &'static Self {
11592 static DEFAULT: super::Package = super::Package::const_default();
11593 &DEFAULT
11594 }
11595 pub fn storage_id_opt_mut(&mut self) -> Option<&mut String> {
11597 self.storage_id.as_mut().map(|field| field as _)
11598 }
11599 pub fn storage_id_mut(&mut self) -> &mut String {
11602 self.storage_id.get_or_insert_default()
11603 }
11604 pub fn storage_id_opt(&self) -> Option<&str> {
11606 self.storage_id.as_ref().map(|field| field as _)
11607 }
11608 pub fn set_storage_id<T: Into<String>>(&mut self, field: T) {
11610 self.storage_id = Some(field.into().into());
11611 }
11612 pub fn with_storage_id<T: Into<String>>(mut self, field: T) -> Self {
11614 self.set_storage_id(field.into());
11615 self
11616 }
11617 pub fn original_id_opt_mut(&mut self) -> Option<&mut String> {
11619 self.original_id.as_mut().map(|field| field as _)
11620 }
11621 pub fn original_id_mut(&mut self) -> &mut String {
11624 self.original_id.get_or_insert_default()
11625 }
11626 pub fn original_id_opt(&self) -> Option<&str> {
11628 self.original_id.as_ref().map(|field| field as _)
11629 }
11630 pub fn set_original_id<T: Into<String>>(&mut self, field: T) {
11632 self.original_id = Some(field.into().into());
11633 }
11634 pub fn with_original_id<T: Into<String>>(mut self, field: T) -> Self {
11636 self.set_original_id(field.into());
11637 self
11638 }
11639 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
11641 self.version.as_mut().map(|field| field as _)
11642 }
11643 pub fn version_mut(&mut self) -> &mut u64 {
11646 self.version.get_or_insert_default()
11647 }
11648 pub fn version_opt(&self) -> Option<u64> {
11650 self.version.as_ref().map(|field| *field)
11651 }
11652 pub fn set_version(&mut self, field: u64) {
11654 self.version = Some(field);
11655 }
11656 pub fn with_version(mut self, field: u64) -> Self {
11658 self.set_version(field);
11659 self
11660 }
11661 pub fn modules(&self) -> &[super::Module] {
11663 &self.modules
11664 }
11665 pub fn modules_mut(&mut self) -> &mut Vec<super::Module> {
11668 &mut self.modules
11669 }
11670 pub fn set_modules(&mut self, field: Vec<super::Module>) {
11672 self.modules = field;
11673 }
11674 pub fn with_modules(mut self, field: Vec<super::Module>) -> Self {
11676 self.set_modules(field);
11677 self
11678 }
11679 pub fn type_origins(&self) -> &[super::TypeOrigin] {
11681 &self.type_origins
11682 }
11683 pub fn type_origins_mut(&mut self) -> &mut Vec<super::TypeOrigin> {
11686 &mut self.type_origins
11687 }
11688 pub fn set_type_origins(&mut self, field: Vec<super::TypeOrigin>) {
11690 self.type_origins = field;
11691 }
11692 pub fn with_type_origins(mut self, field: Vec<super::TypeOrigin>) -> Self {
11694 self.set_type_origins(field);
11695 self
11696 }
11697 pub fn linkage(&self) -> &[super::Linkage] {
11699 &self.linkage
11700 }
11701 pub fn linkage_mut(&mut self) -> &mut Vec<super::Linkage> {
11704 &mut self.linkage
11705 }
11706 pub fn set_linkage(&mut self, field: Vec<super::Linkage>) {
11708 self.linkage = field;
11709 }
11710 pub fn with_linkage(mut self, field: Vec<super::Linkage>) -> Self {
11712 self.set_linkage(field);
11713 self
11714 }
11715 }
11716 impl super::PackageUpgradeError {
11717 pub const fn const_default() -> Self {
11718 Self {
11719 kind: None,
11720 package_id: None,
11721 digest: None,
11722 policy: None,
11723 ticket_id: None,
11724 }
11725 }
11726 #[doc(hidden)]
11727 pub fn default_instance() -> &'static Self {
11728 static DEFAULT: super::PackageUpgradeError = super::PackageUpgradeError::const_default();
11729 &DEFAULT
11730 }
11731 pub fn with_kind<T: Into<super::package_upgrade_error::PackageUpgradeErrorKind>>(
11733 mut self,
11734 field: T,
11735 ) -> Self {
11736 self.set_kind(field.into());
11737 self
11738 }
11739 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
11741 self.package_id.as_mut().map(|field| field as _)
11742 }
11743 pub fn package_id_mut(&mut self) -> &mut String {
11746 self.package_id.get_or_insert_default()
11747 }
11748 pub fn package_id_opt(&self) -> Option<&str> {
11750 self.package_id.as_ref().map(|field| field as _)
11751 }
11752 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
11754 self.package_id = Some(field.into().into());
11755 }
11756 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
11758 self.set_package_id(field.into());
11759 self
11760 }
11761 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
11763 self.digest.as_mut().map(|field| field as _)
11764 }
11765 pub fn digest_mut(&mut self) -> &mut String {
11768 self.digest.get_or_insert_default()
11769 }
11770 pub fn digest_opt(&self) -> Option<&str> {
11772 self.digest.as_ref().map(|field| field as _)
11773 }
11774 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
11776 self.digest = Some(field.into().into());
11777 }
11778 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
11780 self.set_digest(field.into());
11781 self
11782 }
11783 pub fn policy_opt_mut(&mut self) -> Option<&mut u32> {
11785 self.policy.as_mut().map(|field| field as _)
11786 }
11787 pub fn policy_mut(&mut self) -> &mut u32 {
11790 self.policy.get_or_insert_default()
11791 }
11792 pub fn policy_opt(&self) -> Option<u32> {
11794 self.policy.as_ref().map(|field| *field)
11795 }
11796 pub fn set_policy(&mut self, field: u32) {
11798 self.policy = Some(field);
11799 }
11800 pub fn with_policy(mut self, field: u32) -> Self {
11802 self.set_policy(field);
11803 self
11804 }
11805 pub fn ticket_id_opt_mut(&mut self) -> Option<&mut String> {
11807 self.ticket_id.as_mut().map(|field| field as _)
11808 }
11809 pub fn ticket_id_mut(&mut self) -> &mut String {
11812 self.ticket_id.get_or_insert_default()
11813 }
11814 pub fn ticket_id_opt(&self) -> Option<&str> {
11816 self.ticket_id.as_ref().map(|field| field as _)
11817 }
11818 pub fn set_ticket_id<T: Into<String>>(&mut self, field: T) {
11820 self.ticket_id = Some(field.into().into());
11821 }
11822 pub fn with_ticket_id<T: Into<String>>(mut self, field: T) -> Self {
11824 self.set_ticket_id(field.into());
11825 self
11826 }
11827 }
11828 impl super::PackageVersion {
11829 pub const fn const_default() -> Self {
11830 Self {
11831 package_id: None,
11832 version: None,
11833 }
11834 }
11835 #[doc(hidden)]
11836 pub fn default_instance() -> &'static Self {
11837 static DEFAULT: super::PackageVersion = super::PackageVersion::const_default();
11838 &DEFAULT
11839 }
11840 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
11842 self.package_id.as_mut().map(|field| field as _)
11843 }
11844 pub fn package_id_mut(&mut self) -> &mut String {
11847 self.package_id.get_or_insert_default()
11848 }
11849 pub fn package_id_opt(&self) -> Option<&str> {
11851 self.package_id.as_ref().map(|field| field as _)
11852 }
11853 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
11855 self.package_id = Some(field.into().into());
11856 }
11857 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
11859 self.set_package_id(field.into());
11860 self
11861 }
11862 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
11864 self.version.as_mut().map(|field| field as _)
11865 }
11866 pub fn version_mut(&mut self) -> &mut u64 {
11869 self.version.get_or_insert_default()
11870 }
11871 pub fn version_opt(&self) -> Option<u64> {
11873 self.version.as_ref().map(|field| *field)
11874 }
11875 pub fn set_version(&mut self, field: u64) {
11877 self.version = Some(field);
11878 }
11879 pub fn with_version(mut self, field: u64) -> Self {
11881 self.set_version(field);
11882 self
11883 }
11884 }
11885 impl super::PasskeyAuthenticator {
11886 pub const fn const_default() -> Self {
11887 Self {
11888 authenticator_data: None,
11889 client_data_json: None,
11890 signature: None,
11891 }
11892 }
11893 #[doc(hidden)]
11894 pub fn default_instance() -> &'static Self {
11895 static DEFAULT: super::PasskeyAuthenticator = super::PasskeyAuthenticator::const_default();
11896 &DEFAULT
11897 }
11898 pub fn authenticator_data_opt(&self) -> Option<&[u8]> {
11900 self.authenticator_data.as_ref().map(|field| field as _)
11901 }
11902 pub fn set_authenticator_data<T: Into<::prost::bytes::Bytes>>(
11904 &mut self,
11905 field: T,
11906 ) {
11907 self.authenticator_data = Some(field.into().into());
11908 }
11909 pub fn with_authenticator_data<T: Into<::prost::bytes::Bytes>>(
11911 mut self,
11912 field: T,
11913 ) -> Self {
11914 self.set_authenticator_data(field.into());
11915 self
11916 }
11917 pub fn client_data_json_opt_mut(&mut self) -> Option<&mut String> {
11919 self.client_data_json.as_mut().map(|field| field as _)
11920 }
11921 pub fn client_data_json_mut(&mut self) -> &mut String {
11924 self.client_data_json.get_or_insert_default()
11925 }
11926 pub fn client_data_json_opt(&self) -> Option<&str> {
11928 self.client_data_json.as_ref().map(|field| field as _)
11929 }
11930 pub fn set_client_data_json<T: Into<String>>(&mut self, field: T) {
11932 self.client_data_json = Some(field.into().into());
11933 }
11934 pub fn with_client_data_json<T: Into<String>>(mut self, field: T) -> Self {
11936 self.set_client_data_json(field.into());
11937 self
11938 }
11939 pub fn signature(&self) -> &super::SimpleSignature {
11941 self.signature
11942 .as_ref()
11943 .map(|field| field as _)
11944 .unwrap_or_else(|| super::SimpleSignature::default_instance() as _)
11945 }
11946 pub fn signature_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
11948 self.signature.as_mut().map(|field| field as _)
11949 }
11950 pub fn signature_mut(&mut self) -> &mut super::SimpleSignature {
11953 self.signature.get_or_insert_default()
11954 }
11955 pub fn signature_opt(&self) -> Option<&super::SimpleSignature> {
11957 self.signature.as_ref().map(|field| field as _)
11958 }
11959 pub fn set_signature<T: Into<super::SimpleSignature>>(&mut self, field: T) {
11961 self.signature = Some(field.into().into());
11962 }
11963 pub fn with_signature<T: Into<super::SimpleSignature>>(
11965 mut self,
11966 field: T,
11967 ) -> Self {
11968 self.set_signature(field.into());
11969 self
11970 }
11971 }
11972 impl super::ProgrammableTransaction {
11973 pub const fn const_default() -> Self {
11974 Self {
11975 inputs: Vec::new(),
11976 commands: Vec::new(),
11977 }
11978 }
11979 #[doc(hidden)]
11980 pub fn default_instance() -> &'static Self {
11981 static DEFAULT: super::ProgrammableTransaction = super::ProgrammableTransaction::const_default();
11982 &DEFAULT
11983 }
11984 pub fn inputs(&self) -> &[super::Input] {
11986 &self.inputs
11987 }
11988 pub fn inputs_mut(&mut self) -> &mut Vec<super::Input> {
11991 &mut self.inputs
11992 }
11993 pub fn set_inputs(&mut self, field: Vec<super::Input>) {
11995 self.inputs = field;
11996 }
11997 pub fn with_inputs(mut self, field: Vec<super::Input>) -> Self {
11999 self.set_inputs(field);
12000 self
12001 }
12002 pub fn commands(&self) -> &[super::Command] {
12004 &self.commands
12005 }
12006 pub fn commands_mut(&mut self) -> &mut Vec<super::Command> {
12009 &mut self.commands
12010 }
12011 pub fn set_commands(&mut self, field: Vec<super::Command>) {
12013 self.commands = field;
12014 }
12015 pub fn with_commands(mut self, field: Vec<super::Command>) -> Self {
12017 self.set_commands(field);
12018 self
12019 }
12020 }
12021 impl super::ProtocolConfig {
12022 pub const fn const_default() -> Self {
12023 Self {
12024 protocol_version: None,
12025 feature_flags: std::collections::BTreeMap::new(),
12026 attributes: std::collections::BTreeMap::new(),
12027 }
12028 }
12029 #[doc(hidden)]
12030 pub fn default_instance() -> &'static Self {
12031 static DEFAULT: super::ProtocolConfig = super::ProtocolConfig::const_default();
12032 &DEFAULT
12033 }
12034 pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
12036 self.protocol_version.as_mut().map(|field| field as _)
12037 }
12038 pub fn protocol_version_mut(&mut self) -> &mut u64 {
12041 self.protocol_version.get_or_insert_default()
12042 }
12043 pub fn protocol_version_opt(&self) -> Option<u64> {
12045 self.protocol_version.as_ref().map(|field| *field)
12046 }
12047 pub fn set_protocol_version(&mut self, field: u64) {
12049 self.protocol_version = Some(field);
12050 }
12051 pub fn with_protocol_version(mut self, field: u64) -> Self {
12053 self.set_protocol_version(field);
12054 self
12055 }
12056 pub fn feature_flags(&self) -> &::std::collections::BTreeMap<String, bool> {
12058 &self.feature_flags
12059 }
12060 pub fn feature_flags_mut(
12063 &mut self,
12064 ) -> &mut ::std::collections::BTreeMap<String, bool> {
12065 &mut self.feature_flags
12066 }
12067 pub fn set_feature_flags(
12069 &mut self,
12070 field: ::std::collections::BTreeMap<String, bool>,
12071 ) {
12072 self.feature_flags = field;
12073 }
12074 pub fn with_feature_flags(
12076 mut self,
12077 field: ::std::collections::BTreeMap<String, bool>,
12078 ) -> Self {
12079 self.set_feature_flags(field);
12080 self
12081 }
12082 pub fn attributes(&self) -> &::std::collections::BTreeMap<String, String> {
12084 &self.attributes
12085 }
12086 pub fn attributes_mut(
12089 &mut self,
12090 ) -> &mut ::std::collections::BTreeMap<String, String> {
12091 &mut self.attributes
12092 }
12093 pub fn set_attributes(
12095 &mut self,
12096 field: ::std::collections::BTreeMap<String, String>,
12097 ) {
12098 self.attributes = field;
12099 }
12100 pub fn with_attributes(
12102 mut self,
12103 field: ::std::collections::BTreeMap<String, String>,
12104 ) -> Self {
12105 self.set_attributes(field);
12106 self
12107 }
12108 }
12109 impl super::Publish {
12110 pub const fn const_default() -> Self {
12111 Self {
12112 modules: Vec::new(),
12113 dependencies: Vec::new(),
12114 }
12115 }
12116 #[doc(hidden)]
12117 pub fn default_instance() -> &'static Self {
12118 static DEFAULT: super::Publish = super::Publish::const_default();
12119 &DEFAULT
12120 }
12121 pub fn modules(&self) -> &[::prost::bytes::Bytes] {
12123 &self.modules
12124 }
12125 pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
12128 &mut self.modules
12129 }
12130 pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
12132 self.modules = field;
12133 }
12134 pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
12136 self.set_modules(field);
12137 self
12138 }
12139 pub fn dependencies(&self) -> &[String] {
12141 &self.dependencies
12142 }
12143 pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
12146 &mut self.dependencies
12147 }
12148 pub fn set_dependencies(&mut self, field: Vec<String>) {
12150 self.dependencies = field;
12151 }
12152 pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
12154 self.set_dependencies(field);
12155 self
12156 }
12157 }
12158 impl super::RandomnessStateUpdate {
12159 pub const fn const_default() -> Self {
12160 Self {
12161 epoch: None,
12162 randomness_round: None,
12163 random_bytes: None,
12164 randomness_object_initial_shared_version: None,
12165 }
12166 }
12167 #[doc(hidden)]
12168 pub fn default_instance() -> &'static Self {
12169 static DEFAULT: super::RandomnessStateUpdate = super::RandomnessStateUpdate::const_default();
12170 &DEFAULT
12171 }
12172 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
12174 self.epoch.as_mut().map(|field| field as _)
12175 }
12176 pub fn epoch_mut(&mut self) -> &mut u64 {
12179 self.epoch.get_or_insert_default()
12180 }
12181 pub fn epoch_opt(&self) -> Option<u64> {
12183 self.epoch.as_ref().map(|field| *field)
12184 }
12185 pub fn set_epoch(&mut self, field: u64) {
12187 self.epoch = Some(field);
12188 }
12189 pub fn with_epoch(mut self, field: u64) -> Self {
12191 self.set_epoch(field);
12192 self
12193 }
12194 pub fn randomness_round_opt_mut(&mut self) -> Option<&mut u64> {
12196 self.randomness_round.as_mut().map(|field| field as _)
12197 }
12198 pub fn randomness_round_mut(&mut self) -> &mut u64 {
12201 self.randomness_round.get_or_insert_default()
12202 }
12203 pub fn randomness_round_opt(&self) -> Option<u64> {
12205 self.randomness_round.as_ref().map(|field| *field)
12206 }
12207 pub fn set_randomness_round(&mut self, field: u64) {
12209 self.randomness_round = Some(field);
12210 }
12211 pub fn with_randomness_round(mut self, field: u64) -> Self {
12213 self.set_randomness_round(field);
12214 self
12215 }
12216 pub fn random_bytes_opt(&self) -> Option<&[u8]> {
12218 self.random_bytes.as_ref().map(|field| field as _)
12219 }
12220 pub fn set_random_bytes<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
12222 self.random_bytes = Some(field.into().into());
12223 }
12224 pub fn with_random_bytes<T: Into<::prost::bytes::Bytes>>(
12226 mut self,
12227 field: T,
12228 ) -> Self {
12229 self.set_random_bytes(field.into());
12230 self
12231 }
12232 pub fn randomness_object_initial_shared_version_opt_mut(
12234 &mut self,
12235 ) -> Option<&mut u64> {
12236 self.randomness_object_initial_shared_version
12237 .as_mut()
12238 .map(|field| field as _)
12239 }
12240 pub fn randomness_object_initial_shared_version_mut(&mut self) -> &mut u64 {
12243 self.randomness_object_initial_shared_version.get_or_insert_default()
12244 }
12245 pub fn randomness_object_initial_shared_version_opt(&self) -> Option<u64> {
12247 self.randomness_object_initial_shared_version.as_ref().map(|field| *field)
12248 }
12249 pub fn set_randomness_object_initial_shared_version(&mut self, field: u64) {
12251 self.randomness_object_initial_shared_version = Some(field);
12252 }
12253 pub fn with_randomness_object_initial_shared_version(
12255 mut self,
12256 field: u64,
12257 ) -> Self {
12258 self.set_randomness_object_initial_shared_version(field);
12259 self
12260 }
12261 }
12262 impl super::RegulatedCoinMetadata {
12263 pub const fn const_default() -> Self {
12264 Self {
12265 id: None,
12266 coin_metadata_object: None,
12267 deny_cap_object: None,
12268 allow_global_pause: None,
12269 variant: None,
12270 coin_regulated_state: None,
12271 }
12272 }
12273 #[doc(hidden)]
12274 pub fn default_instance() -> &'static Self {
12275 static DEFAULT: super::RegulatedCoinMetadata = super::RegulatedCoinMetadata::const_default();
12276 &DEFAULT
12277 }
12278 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
12280 self.id.as_mut().map(|field| field as _)
12281 }
12282 pub fn id_mut(&mut self) -> &mut String {
12285 self.id.get_or_insert_default()
12286 }
12287 pub fn id_opt(&self) -> Option<&str> {
12289 self.id.as_ref().map(|field| field as _)
12290 }
12291 pub fn set_id<T: Into<String>>(&mut self, field: T) {
12293 self.id = Some(field.into().into());
12294 }
12295 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
12297 self.set_id(field.into());
12298 self
12299 }
12300 pub fn coin_metadata_object_opt_mut(&mut self) -> Option<&mut String> {
12302 self.coin_metadata_object.as_mut().map(|field| field as _)
12303 }
12304 pub fn coin_metadata_object_mut(&mut self) -> &mut String {
12307 self.coin_metadata_object.get_or_insert_default()
12308 }
12309 pub fn coin_metadata_object_opt(&self) -> Option<&str> {
12311 self.coin_metadata_object.as_ref().map(|field| field as _)
12312 }
12313 pub fn set_coin_metadata_object<T: Into<String>>(&mut self, field: T) {
12315 self.coin_metadata_object = Some(field.into().into());
12316 }
12317 pub fn with_coin_metadata_object<T: Into<String>>(mut self, field: T) -> Self {
12319 self.set_coin_metadata_object(field.into());
12320 self
12321 }
12322 pub fn deny_cap_object_opt_mut(&mut self) -> Option<&mut String> {
12324 self.deny_cap_object.as_mut().map(|field| field as _)
12325 }
12326 pub fn deny_cap_object_mut(&mut self) -> &mut String {
12329 self.deny_cap_object.get_or_insert_default()
12330 }
12331 pub fn deny_cap_object_opt(&self) -> Option<&str> {
12333 self.deny_cap_object.as_ref().map(|field| field as _)
12334 }
12335 pub fn set_deny_cap_object<T: Into<String>>(&mut self, field: T) {
12337 self.deny_cap_object = Some(field.into().into());
12338 }
12339 pub fn with_deny_cap_object<T: Into<String>>(mut self, field: T) -> Self {
12341 self.set_deny_cap_object(field.into());
12342 self
12343 }
12344 pub fn allow_global_pause_opt_mut(&mut self) -> Option<&mut bool> {
12346 self.allow_global_pause.as_mut().map(|field| field as _)
12347 }
12348 pub fn allow_global_pause_mut(&mut self) -> &mut bool {
12351 self.allow_global_pause.get_or_insert_default()
12352 }
12353 pub fn allow_global_pause_opt(&self) -> Option<bool> {
12355 self.allow_global_pause.as_ref().map(|field| *field)
12356 }
12357 pub fn set_allow_global_pause(&mut self, field: bool) {
12359 self.allow_global_pause = Some(field);
12360 }
12361 pub fn with_allow_global_pause(mut self, field: bool) -> Self {
12363 self.set_allow_global_pause(field);
12364 self
12365 }
12366 pub fn variant_opt_mut(&mut self) -> Option<&mut u32> {
12368 self.variant.as_mut().map(|field| field as _)
12369 }
12370 pub fn variant_mut(&mut self) -> &mut u32 {
12373 self.variant.get_or_insert_default()
12374 }
12375 pub fn variant_opt(&self) -> Option<u32> {
12377 self.variant.as_ref().map(|field| *field)
12378 }
12379 pub fn set_variant(&mut self, field: u32) {
12381 self.variant = Some(field);
12382 }
12383 pub fn with_variant(mut self, field: u32) -> Self {
12385 self.set_variant(field);
12386 self
12387 }
12388 pub fn with_coin_regulated_state<
12390 T: Into<super::regulated_coin_metadata::CoinRegulatedState>,
12391 >(mut self, field: T) -> Self {
12392 self.set_coin_regulated_state(field.into());
12393 self
12394 }
12395 }
12396 impl super::ReverseLookupNameRequest {
12397 pub const fn const_default() -> Self {
12398 Self { address: None }
12399 }
12400 #[doc(hidden)]
12401 pub fn default_instance() -> &'static Self {
12402 static DEFAULT: super::ReverseLookupNameRequest = super::ReverseLookupNameRequest::const_default();
12403 &DEFAULT
12404 }
12405 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
12407 self.address.as_mut().map(|field| field as _)
12408 }
12409 pub fn address_mut(&mut self) -> &mut String {
12412 self.address.get_or_insert_default()
12413 }
12414 pub fn address_opt(&self) -> Option<&str> {
12416 self.address.as_ref().map(|field| field as _)
12417 }
12418 pub fn set_address<T: Into<String>>(&mut self, field: T) {
12420 self.address = Some(field.into().into());
12421 }
12422 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
12424 self.set_address(field.into());
12425 self
12426 }
12427 }
12428 impl super::ReverseLookupNameResponse {
12429 pub const fn const_default() -> Self {
12430 Self { record: None }
12431 }
12432 #[doc(hidden)]
12433 pub fn default_instance() -> &'static Self {
12434 static DEFAULT: super::ReverseLookupNameResponse = super::ReverseLookupNameResponse::const_default();
12435 &DEFAULT
12436 }
12437 pub fn record(&self) -> &super::NameRecord {
12439 self.record
12440 .as_ref()
12441 .map(|field| field as _)
12442 .unwrap_or_else(|| super::NameRecord::default_instance() as _)
12443 }
12444 pub fn record_opt_mut(&mut self) -> Option<&mut super::NameRecord> {
12446 self.record.as_mut().map(|field| field as _)
12447 }
12448 pub fn record_mut(&mut self) -> &mut super::NameRecord {
12451 self.record.get_or_insert_default()
12452 }
12453 pub fn record_opt(&self) -> Option<&super::NameRecord> {
12455 self.record.as_ref().map(|field| field as _)
12456 }
12457 pub fn set_record<T: Into<super::NameRecord>>(&mut self, field: T) {
12459 self.record = Some(field.into().into());
12460 }
12461 pub fn with_record<T: Into<super::NameRecord>>(mut self, field: T) -> Self {
12463 self.set_record(field.into());
12464 self
12465 }
12466 }
12467 impl super::SimpleSignature {
12468 pub const fn const_default() -> Self {
12469 Self {
12470 scheme: None,
12471 signature: None,
12472 public_key: None,
12473 }
12474 }
12475 #[doc(hidden)]
12476 pub fn default_instance() -> &'static Self {
12477 static DEFAULT: super::SimpleSignature = super::SimpleSignature::const_default();
12478 &DEFAULT
12479 }
12480 pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
12482 self.set_scheme(field.into());
12483 self
12484 }
12485 pub fn signature_opt(&self) -> Option<&[u8]> {
12487 self.signature.as_ref().map(|field| field as _)
12488 }
12489 pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
12491 self.signature = Some(field.into().into());
12492 }
12493 pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
12495 mut self,
12496 field: T,
12497 ) -> Self {
12498 self.set_signature(field.into());
12499 self
12500 }
12501 pub fn public_key_opt(&self) -> Option<&[u8]> {
12503 self.public_key.as_ref().map(|field| field as _)
12504 }
12505 pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
12507 self.public_key = Some(field.into().into());
12508 }
12509 pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
12511 mut self,
12512 field: T,
12513 ) -> Self {
12514 self.set_public_key(field.into());
12515 self
12516 }
12517 }
12518 impl super::SimulateTransactionRequest {
12519 pub const fn const_default() -> Self {
12520 Self {
12521 transaction: None,
12522 read_mask: None,
12523 checks: None,
12524 do_gas_selection: None,
12525 }
12526 }
12527 #[doc(hidden)]
12528 pub fn default_instance() -> &'static Self {
12529 static DEFAULT: super::SimulateTransactionRequest = super::SimulateTransactionRequest::const_default();
12530 &DEFAULT
12531 }
12532 pub fn transaction(&self) -> &super::Transaction {
12534 self.transaction
12535 .as_ref()
12536 .map(|field| field as _)
12537 .unwrap_or_else(|| super::Transaction::default_instance() as _)
12538 }
12539 pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
12541 self.transaction.as_mut().map(|field| field as _)
12542 }
12543 pub fn transaction_mut(&mut self) -> &mut super::Transaction {
12546 self.transaction.get_or_insert_default()
12547 }
12548 pub fn transaction_opt(&self) -> Option<&super::Transaction> {
12550 self.transaction.as_ref().map(|field| field as _)
12551 }
12552 pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
12554 self.transaction = Some(field.into().into());
12555 }
12556 pub fn with_transaction<T: Into<super::Transaction>>(
12558 mut self,
12559 field: T,
12560 ) -> Self {
12561 self.set_transaction(field.into());
12562 self
12563 }
12564 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
12566 self.read_mask.as_mut().map(|field| field as _)
12567 }
12568 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
12571 self.read_mask.get_or_insert_default()
12572 }
12573 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
12575 self.read_mask.as_ref().map(|field| field as _)
12576 }
12577 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
12579 self.read_mask = Some(field.into().into());
12580 }
12581 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
12583 mut self,
12584 field: T,
12585 ) -> Self {
12586 self.set_read_mask(field.into());
12587 self
12588 }
12589 pub fn with_checks<
12591 T: Into<super::simulate_transaction_request::TransactionChecks>,
12592 >(mut self, field: T) -> Self {
12593 self.set_checks(field.into());
12594 self
12595 }
12596 pub fn do_gas_selection_opt_mut(&mut self) -> Option<&mut bool> {
12598 self.do_gas_selection.as_mut().map(|field| field as _)
12599 }
12600 pub fn do_gas_selection_mut(&mut self) -> &mut bool {
12603 self.do_gas_selection.get_or_insert_default()
12604 }
12605 pub fn do_gas_selection_opt(&self) -> Option<bool> {
12607 self.do_gas_selection.as_ref().map(|field| *field)
12608 }
12609 pub fn set_do_gas_selection(&mut self, field: bool) {
12611 self.do_gas_selection = Some(field);
12612 }
12613 pub fn with_do_gas_selection(mut self, field: bool) -> Self {
12615 self.set_do_gas_selection(field);
12616 self
12617 }
12618 }
12619 impl super::SimulateTransactionResponse {
12620 pub const fn const_default() -> Self {
12621 Self {
12622 transaction: None,
12623 command_outputs: Vec::new(),
12624 suggested_gas_price: None,
12625 }
12626 }
12627 #[doc(hidden)]
12628 pub fn default_instance() -> &'static Self {
12629 static DEFAULT: super::SimulateTransactionResponse = super::SimulateTransactionResponse::const_default();
12630 &DEFAULT
12631 }
12632 pub fn transaction(&self) -> &super::ExecutedTransaction {
12634 self.transaction
12635 .as_ref()
12636 .map(|field| field as _)
12637 .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
12638 }
12639 pub fn transaction_opt_mut(
12641 &mut self,
12642 ) -> Option<&mut super::ExecutedTransaction> {
12643 self.transaction.as_mut().map(|field| field as _)
12644 }
12645 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
12648 self.transaction.get_or_insert_default()
12649 }
12650 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
12652 self.transaction.as_ref().map(|field| field as _)
12653 }
12654 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
12656 &mut self,
12657 field: T,
12658 ) {
12659 self.transaction = Some(field.into().into());
12660 }
12661 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
12663 mut self,
12664 field: T,
12665 ) -> Self {
12666 self.set_transaction(field.into());
12667 self
12668 }
12669 pub fn command_outputs(&self) -> &[super::CommandResult] {
12671 &self.command_outputs
12672 }
12673 pub fn command_outputs_mut(&mut self) -> &mut Vec<super::CommandResult> {
12676 &mut self.command_outputs
12677 }
12678 pub fn set_command_outputs(&mut self, field: Vec<super::CommandResult>) {
12680 self.command_outputs = field;
12681 }
12682 pub fn with_command_outputs(mut self, field: Vec<super::CommandResult>) -> Self {
12684 self.set_command_outputs(field);
12685 self
12686 }
12687 pub fn suggested_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
12689 self.suggested_gas_price.as_mut().map(|field| field as _)
12690 }
12691 pub fn suggested_gas_price_mut(&mut self) -> &mut u64 {
12694 self.suggested_gas_price.get_or_insert_default()
12695 }
12696 pub fn suggested_gas_price_opt(&self) -> Option<u64> {
12698 self.suggested_gas_price.as_ref().map(|field| *field)
12699 }
12700 pub fn set_suggested_gas_price(&mut self, field: u64) {
12702 self.suggested_gas_price = Some(field);
12703 }
12704 pub fn with_suggested_gas_price(mut self, field: u64) -> Self {
12706 self.set_suggested_gas_price(field);
12707 self
12708 }
12709 }
12710 impl super::SizeError {
12711 pub const fn const_default() -> Self {
12712 Self { size: None, max_size: None }
12713 }
12714 #[doc(hidden)]
12715 pub fn default_instance() -> &'static Self {
12716 static DEFAULT: super::SizeError = super::SizeError::const_default();
12717 &DEFAULT
12718 }
12719 pub fn size_opt_mut(&mut self) -> Option<&mut u64> {
12721 self.size.as_mut().map(|field| field as _)
12722 }
12723 pub fn size_mut(&mut self) -> &mut u64 {
12726 self.size.get_or_insert_default()
12727 }
12728 pub fn size_opt(&self) -> Option<u64> {
12730 self.size.as_ref().map(|field| *field)
12731 }
12732 pub fn set_size(&mut self, field: u64) {
12734 self.size = Some(field);
12735 }
12736 pub fn with_size(mut self, field: u64) -> Self {
12738 self.set_size(field);
12739 self
12740 }
12741 pub fn max_size_opt_mut(&mut self) -> Option<&mut u64> {
12743 self.max_size.as_mut().map(|field| field as _)
12744 }
12745 pub fn max_size_mut(&mut self) -> &mut u64 {
12748 self.max_size.get_or_insert_default()
12749 }
12750 pub fn max_size_opt(&self) -> Option<u64> {
12752 self.max_size.as_ref().map(|field| *field)
12753 }
12754 pub fn set_max_size(&mut self, field: u64) {
12756 self.max_size = Some(field);
12757 }
12758 pub fn with_max_size(mut self, field: u64) -> Self {
12760 self.set_max_size(field);
12761 self
12762 }
12763 }
12764 impl super::SplitCoins {
12765 pub const fn const_default() -> Self {
12766 Self {
12767 coin: None,
12768 amounts: Vec::new(),
12769 }
12770 }
12771 #[doc(hidden)]
12772 pub fn default_instance() -> &'static Self {
12773 static DEFAULT: super::SplitCoins = super::SplitCoins::const_default();
12774 &DEFAULT
12775 }
12776 pub fn coin(&self) -> &super::Argument {
12778 self.coin
12779 .as_ref()
12780 .map(|field| field as _)
12781 .unwrap_or_else(|| super::Argument::default_instance() as _)
12782 }
12783 pub fn coin_opt_mut(&mut self) -> Option<&mut super::Argument> {
12785 self.coin.as_mut().map(|field| field as _)
12786 }
12787 pub fn coin_mut(&mut self) -> &mut super::Argument {
12790 self.coin.get_or_insert_default()
12791 }
12792 pub fn coin_opt(&self) -> Option<&super::Argument> {
12794 self.coin.as_ref().map(|field| field as _)
12795 }
12796 pub fn set_coin<T: Into<super::Argument>>(&mut self, field: T) {
12798 self.coin = Some(field.into().into());
12799 }
12800 pub fn with_coin<T: Into<super::Argument>>(mut self, field: T) -> Self {
12802 self.set_coin(field.into());
12803 self
12804 }
12805 pub fn amounts(&self) -> &[super::Argument] {
12807 &self.amounts
12808 }
12809 pub fn amounts_mut(&mut self) -> &mut Vec<super::Argument> {
12812 &mut self.amounts
12813 }
12814 pub fn set_amounts(&mut self, field: Vec<super::Argument>) {
12816 self.amounts = field;
12817 }
12818 pub fn with_amounts(mut self, field: Vec<super::Argument>) -> Self {
12820 self.set_amounts(field);
12821 self
12822 }
12823 }
12824 impl super::StakeSubsidy {
12825 pub const fn const_default() -> Self {
12826 Self {
12827 balance: None,
12828 distribution_counter: None,
12829 current_distribution_amount: None,
12830 stake_subsidy_period_length: None,
12831 stake_subsidy_decrease_rate: None,
12832 extra_fields: None,
12833 }
12834 }
12835 #[doc(hidden)]
12836 pub fn default_instance() -> &'static Self {
12837 static DEFAULT: super::StakeSubsidy = super::StakeSubsidy::const_default();
12838 &DEFAULT
12839 }
12840 pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
12842 self.balance.as_mut().map(|field| field as _)
12843 }
12844 pub fn balance_mut(&mut self) -> &mut u64 {
12847 self.balance.get_or_insert_default()
12848 }
12849 pub fn balance_opt(&self) -> Option<u64> {
12851 self.balance.as_ref().map(|field| *field)
12852 }
12853 pub fn set_balance(&mut self, field: u64) {
12855 self.balance = Some(field);
12856 }
12857 pub fn with_balance(mut self, field: u64) -> Self {
12859 self.set_balance(field);
12860 self
12861 }
12862 pub fn distribution_counter_opt_mut(&mut self) -> Option<&mut u64> {
12864 self.distribution_counter.as_mut().map(|field| field as _)
12865 }
12866 pub fn distribution_counter_mut(&mut self) -> &mut u64 {
12869 self.distribution_counter.get_or_insert_default()
12870 }
12871 pub fn distribution_counter_opt(&self) -> Option<u64> {
12873 self.distribution_counter.as_ref().map(|field| *field)
12874 }
12875 pub fn set_distribution_counter(&mut self, field: u64) {
12877 self.distribution_counter = Some(field);
12878 }
12879 pub fn with_distribution_counter(mut self, field: u64) -> Self {
12881 self.set_distribution_counter(field);
12882 self
12883 }
12884 pub fn current_distribution_amount_opt_mut(&mut self) -> Option<&mut u64> {
12886 self.current_distribution_amount.as_mut().map(|field| field as _)
12887 }
12888 pub fn current_distribution_amount_mut(&mut self) -> &mut u64 {
12891 self.current_distribution_amount.get_or_insert_default()
12892 }
12893 pub fn current_distribution_amount_opt(&self) -> Option<u64> {
12895 self.current_distribution_amount.as_ref().map(|field| *field)
12896 }
12897 pub fn set_current_distribution_amount(&mut self, field: u64) {
12899 self.current_distribution_amount = Some(field);
12900 }
12901 pub fn with_current_distribution_amount(mut self, field: u64) -> Self {
12903 self.set_current_distribution_amount(field);
12904 self
12905 }
12906 pub fn stake_subsidy_period_length_opt_mut(&mut self) -> Option<&mut u64> {
12908 self.stake_subsidy_period_length.as_mut().map(|field| field as _)
12909 }
12910 pub fn stake_subsidy_period_length_mut(&mut self) -> &mut u64 {
12913 self.stake_subsidy_period_length.get_or_insert_default()
12914 }
12915 pub fn stake_subsidy_period_length_opt(&self) -> Option<u64> {
12917 self.stake_subsidy_period_length.as_ref().map(|field| *field)
12918 }
12919 pub fn set_stake_subsidy_period_length(&mut self, field: u64) {
12921 self.stake_subsidy_period_length = Some(field);
12922 }
12923 pub fn with_stake_subsidy_period_length(mut self, field: u64) -> Self {
12925 self.set_stake_subsidy_period_length(field);
12926 self
12927 }
12928 pub fn stake_subsidy_decrease_rate_opt_mut(&mut self) -> Option<&mut u32> {
12930 self.stake_subsidy_decrease_rate.as_mut().map(|field| field as _)
12931 }
12932 pub fn stake_subsidy_decrease_rate_mut(&mut self) -> &mut u32 {
12935 self.stake_subsidy_decrease_rate.get_or_insert_default()
12936 }
12937 pub fn stake_subsidy_decrease_rate_opt(&self) -> Option<u32> {
12939 self.stake_subsidy_decrease_rate.as_ref().map(|field| *field)
12940 }
12941 pub fn set_stake_subsidy_decrease_rate(&mut self, field: u32) {
12943 self.stake_subsidy_decrease_rate = Some(field);
12944 }
12945 pub fn with_stake_subsidy_decrease_rate(mut self, field: u32) -> Self {
12947 self.set_stake_subsidy_decrease_rate(field);
12948 self
12949 }
12950 pub fn extra_fields(&self) -> &super::MoveTable {
12952 self.extra_fields
12953 .as_ref()
12954 .map(|field| field as _)
12955 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
12956 }
12957 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
12959 self.extra_fields.as_mut().map(|field| field as _)
12960 }
12961 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
12964 self.extra_fields.get_or_insert_default()
12965 }
12966 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
12968 self.extra_fields.as_ref().map(|field| field as _)
12969 }
12970 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
12972 self.extra_fields = Some(field.into().into());
12973 }
12974 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
12976 self.set_extra_fields(field.into());
12977 self
12978 }
12979 }
12980 impl super::StakingPool {
12981 pub const fn const_default() -> Self {
12982 Self {
12983 id: None,
12984 activation_epoch: None,
12985 deactivation_epoch: None,
12986 sui_balance: None,
12987 rewards_pool: None,
12988 pool_token_balance: None,
12989 exchange_rates: None,
12990 pending_stake: None,
12991 pending_total_sui_withdraw: None,
12992 pending_pool_token_withdraw: None,
12993 extra_fields: None,
12994 }
12995 }
12996 #[doc(hidden)]
12997 pub fn default_instance() -> &'static Self {
12998 static DEFAULT: super::StakingPool = super::StakingPool::const_default();
12999 &DEFAULT
13000 }
13001 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
13003 self.id.as_mut().map(|field| field as _)
13004 }
13005 pub fn id_mut(&mut self) -> &mut String {
13008 self.id.get_or_insert_default()
13009 }
13010 pub fn id_opt(&self) -> Option<&str> {
13012 self.id.as_ref().map(|field| field as _)
13013 }
13014 pub fn set_id<T: Into<String>>(&mut self, field: T) {
13016 self.id = Some(field.into().into());
13017 }
13018 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
13020 self.set_id(field.into());
13021 self
13022 }
13023 pub fn activation_epoch_opt_mut(&mut self) -> Option<&mut u64> {
13025 self.activation_epoch.as_mut().map(|field| field as _)
13026 }
13027 pub fn activation_epoch_mut(&mut self) -> &mut u64 {
13030 self.activation_epoch.get_or_insert_default()
13031 }
13032 pub fn activation_epoch_opt(&self) -> Option<u64> {
13034 self.activation_epoch.as_ref().map(|field| *field)
13035 }
13036 pub fn set_activation_epoch(&mut self, field: u64) {
13038 self.activation_epoch = Some(field);
13039 }
13040 pub fn with_activation_epoch(mut self, field: u64) -> Self {
13042 self.set_activation_epoch(field);
13043 self
13044 }
13045 pub fn deactivation_epoch_opt_mut(&mut self) -> Option<&mut u64> {
13047 self.deactivation_epoch.as_mut().map(|field| field as _)
13048 }
13049 pub fn deactivation_epoch_mut(&mut self) -> &mut u64 {
13052 self.deactivation_epoch.get_or_insert_default()
13053 }
13054 pub fn deactivation_epoch_opt(&self) -> Option<u64> {
13056 self.deactivation_epoch.as_ref().map(|field| *field)
13057 }
13058 pub fn set_deactivation_epoch(&mut self, field: u64) {
13060 self.deactivation_epoch = Some(field);
13061 }
13062 pub fn with_deactivation_epoch(mut self, field: u64) -> Self {
13064 self.set_deactivation_epoch(field);
13065 self
13066 }
13067 pub fn sui_balance_opt_mut(&mut self) -> Option<&mut u64> {
13069 self.sui_balance.as_mut().map(|field| field as _)
13070 }
13071 pub fn sui_balance_mut(&mut self) -> &mut u64 {
13074 self.sui_balance.get_or_insert_default()
13075 }
13076 pub fn sui_balance_opt(&self) -> Option<u64> {
13078 self.sui_balance.as_ref().map(|field| *field)
13079 }
13080 pub fn set_sui_balance(&mut self, field: u64) {
13082 self.sui_balance = Some(field);
13083 }
13084 pub fn with_sui_balance(mut self, field: u64) -> Self {
13086 self.set_sui_balance(field);
13087 self
13088 }
13089 pub fn rewards_pool_opt_mut(&mut self) -> Option<&mut u64> {
13091 self.rewards_pool.as_mut().map(|field| field as _)
13092 }
13093 pub fn rewards_pool_mut(&mut self) -> &mut u64 {
13096 self.rewards_pool.get_or_insert_default()
13097 }
13098 pub fn rewards_pool_opt(&self) -> Option<u64> {
13100 self.rewards_pool.as_ref().map(|field| *field)
13101 }
13102 pub fn set_rewards_pool(&mut self, field: u64) {
13104 self.rewards_pool = Some(field);
13105 }
13106 pub fn with_rewards_pool(mut self, field: u64) -> Self {
13108 self.set_rewards_pool(field);
13109 self
13110 }
13111 pub fn pool_token_balance_opt_mut(&mut self) -> Option<&mut u64> {
13113 self.pool_token_balance.as_mut().map(|field| field as _)
13114 }
13115 pub fn pool_token_balance_mut(&mut self) -> &mut u64 {
13118 self.pool_token_balance.get_or_insert_default()
13119 }
13120 pub fn pool_token_balance_opt(&self) -> Option<u64> {
13122 self.pool_token_balance.as_ref().map(|field| *field)
13123 }
13124 pub fn set_pool_token_balance(&mut self, field: u64) {
13126 self.pool_token_balance = Some(field);
13127 }
13128 pub fn with_pool_token_balance(mut self, field: u64) -> Self {
13130 self.set_pool_token_balance(field);
13131 self
13132 }
13133 pub fn exchange_rates(&self) -> &super::MoveTable {
13135 self.exchange_rates
13136 .as_ref()
13137 .map(|field| field as _)
13138 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
13139 }
13140 pub fn exchange_rates_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
13142 self.exchange_rates.as_mut().map(|field| field as _)
13143 }
13144 pub fn exchange_rates_mut(&mut self) -> &mut super::MoveTable {
13147 self.exchange_rates.get_or_insert_default()
13148 }
13149 pub fn exchange_rates_opt(&self) -> Option<&super::MoveTable> {
13151 self.exchange_rates.as_ref().map(|field| field as _)
13152 }
13153 pub fn set_exchange_rates<T: Into<super::MoveTable>>(&mut self, field: T) {
13155 self.exchange_rates = Some(field.into().into());
13156 }
13157 pub fn with_exchange_rates<T: Into<super::MoveTable>>(
13159 mut self,
13160 field: T,
13161 ) -> Self {
13162 self.set_exchange_rates(field.into());
13163 self
13164 }
13165 pub fn pending_stake_opt_mut(&mut self) -> Option<&mut u64> {
13167 self.pending_stake.as_mut().map(|field| field as _)
13168 }
13169 pub fn pending_stake_mut(&mut self) -> &mut u64 {
13172 self.pending_stake.get_or_insert_default()
13173 }
13174 pub fn pending_stake_opt(&self) -> Option<u64> {
13176 self.pending_stake.as_ref().map(|field| *field)
13177 }
13178 pub fn set_pending_stake(&mut self, field: u64) {
13180 self.pending_stake = Some(field);
13181 }
13182 pub fn with_pending_stake(mut self, field: u64) -> Self {
13184 self.set_pending_stake(field);
13185 self
13186 }
13187 pub fn pending_total_sui_withdraw_opt_mut(&mut self) -> Option<&mut u64> {
13189 self.pending_total_sui_withdraw.as_mut().map(|field| field as _)
13190 }
13191 pub fn pending_total_sui_withdraw_mut(&mut self) -> &mut u64 {
13194 self.pending_total_sui_withdraw.get_or_insert_default()
13195 }
13196 pub fn pending_total_sui_withdraw_opt(&self) -> Option<u64> {
13198 self.pending_total_sui_withdraw.as_ref().map(|field| *field)
13199 }
13200 pub fn set_pending_total_sui_withdraw(&mut self, field: u64) {
13202 self.pending_total_sui_withdraw = Some(field);
13203 }
13204 pub fn with_pending_total_sui_withdraw(mut self, field: u64) -> Self {
13206 self.set_pending_total_sui_withdraw(field);
13207 self
13208 }
13209 pub fn pending_pool_token_withdraw_opt_mut(&mut self) -> Option<&mut u64> {
13211 self.pending_pool_token_withdraw.as_mut().map(|field| field as _)
13212 }
13213 pub fn pending_pool_token_withdraw_mut(&mut self) -> &mut u64 {
13216 self.pending_pool_token_withdraw.get_or_insert_default()
13217 }
13218 pub fn pending_pool_token_withdraw_opt(&self) -> Option<u64> {
13220 self.pending_pool_token_withdraw.as_ref().map(|field| *field)
13221 }
13222 pub fn set_pending_pool_token_withdraw(&mut self, field: u64) {
13224 self.pending_pool_token_withdraw = Some(field);
13225 }
13226 pub fn with_pending_pool_token_withdraw(mut self, field: u64) -> Self {
13228 self.set_pending_pool_token_withdraw(field);
13229 self
13230 }
13231 pub fn extra_fields(&self) -> &super::MoveTable {
13233 self.extra_fields
13234 .as_ref()
13235 .map(|field| field as _)
13236 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
13237 }
13238 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
13240 self.extra_fields.as_mut().map(|field| field as _)
13241 }
13242 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
13245 self.extra_fields.get_or_insert_default()
13246 }
13247 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
13249 self.extra_fields.as_ref().map(|field| field as _)
13250 }
13251 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
13253 self.extra_fields = Some(field.into().into());
13254 }
13255 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
13257 self.set_extra_fields(field.into());
13258 self
13259 }
13260 }
13261 impl super::StorageFund {
13262 pub const fn const_default() -> Self {
13263 Self {
13264 total_object_storage_rebates: None,
13265 non_refundable_balance: None,
13266 }
13267 }
13268 #[doc(hidden)]
13269 pub fn default_instance() -> &'static Self {
13270 static DEFAULT: super::StorageFund = super::StorageFund::const_default();
13271 &DEFAULT
13272 }
13273 pub fn total_object_storage_rebates_opt_mut(&mut self) -> Option<&mut u64> {
13275 self.total_object_storage_rebates.as_mut().map(|field| field as _)
13276 }
13277 pub fn total_object_storage_rebates_mut(&mut self) -> &mut u64 {
13280 self.total_object_storage_rebates.get_or_insert_default()
13281 }
13282 pub fn total_object_storage_rebates_opt(&self) -> Option<u64> {
13284 self.total_object_storage_rebates.as_ref().map(|field| *field)
13285 }
13286 pub fn set_total_object_storage_rebates(&mut self, field: u64) {
13288 self.total_object_storage_rebates = Some(field);
13289 }
13290 pub fn with_total_object_storage_rebates(mut self, field: u64) -> Self {
13292 self.set_total_object_storage_rebates(field);
13293 self
13294 }
13295 pub fn non_refundable_balance_opt_mut(&mut self) -> Option<&mut u64> {
13297 self.non_refundable_balance.as_mut().map(|field| field as _)
13298 }
13299 pub fn non_refundable_balance_mut(&mut self) -> &mut u64 {
13302 self.non_refundable_balance.get_or_insert_default()
13303 }
13304 pub fn non_refundable_balance_opt(&self) -> Option<u64> {
13306 self.non_refundable_balance.as_ref().map(|field| *field)
13307 }
13308 pub fn set_non_refundable_balance(&mut self, field: u64) {
13310 self.non_refundable_balance = Some(field);
13311 }
13312 pub fn with_non_refundable_balance(mut self, field: u64) -> Self {
13314 self.set_non_refundable_balance(field);
13315 self
13316 }
13317 }
13318 impl super::SubscribeCheckpointsRequest {
13319 pub const fn const_default() -> Self {
13320 Self { read_mask: None }
13321 }
13322 #[doc(hidden)]
13323 pub fn default_instance() -> &'static Self {
13324 static DEFAULT: super::SubscribeCheckpointsRequest = super::SubscribeCheckpointsRequest::const_default();
13325 &DEFAULT
13326 }
13327 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
13329 self.read_mask.as_mut().map(|field| field as _)
13330 }
13331 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
13334 self.read_mask.get_or_insert_default()
13335 }
13336 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
13338 self.read_mask.as_ref().map(|field| field as _)
13339 }
13340 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
13342 self.read_mask = Some(field.into().into());
13343 }
13344 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
13346 mut self,
13347 field: T,
13348 ) -> Self {
13349 self.set_read_mask(field.into());
13350 self
13351 }
13352 }
13353 impl super::SubscribeCheckpointsResponse {
13354 pub const fn const_default() -> Self {
13355 Self {
13356 cursor: None,
13357 checkpoint: None,
13358 }
13359 }
13360 #[doc(hidden)]
13361 pub fn default_instance() -> &'static Self {
13362 static DEFAULT: super::SubscribeCheckpointsResponse = super::SubscribeCheckpointsResponse::const_default();
13363 &DEFAULT
13364 }
13365 pub fn cursor_opt_mut(&mut self) -> Option<&mut u64> {
13367 self.cursor.as_mut().map(|field| field as _)
13368 }
13369 pub fn cursor_mut(&mut self) -> &mut u64 {
13372 self.cursor.get_or_insert_default()
13373 }
13374 pub fn cursor_opt(&self) -> Option<u64> {
13376 self.cursor.as_ref().map(|field| *field)
13377 }
13378 pub fn set_cursor(&mut self, field: u64) {
13380 self.cursor = Some(field);
13381 }
13382 pub fn with_cursor(mut self, field: u64) -> Self {
13384 self.set_cursor(field);
13385 self
13386 }
13387 pub fn checkpoint(&self) -> &super::Checkpoint {
13389 self.checkpoint
13390 .as_ref()
13391 .map(|field| field as _)
13392 .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
13393 }
13394 pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
13396 self.checkpoint.as_mut().map(|field| field as _)
13397 }
13398 pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
13401 self.checkpoint.get_or_insert_default()
13402 }
13403 pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
13405 self.checkpoint.as_ref().map(|field| field as _)
13406 }
13407 pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
13409 self.checkpoint = Some(field.into().into());
13410 }
13411 pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
13413 self.set_checkpoint(field.into());
13414 self
13415 }
13416 }
13417 impl super::SystemPackage {
13418 pub const fn const_default() -> Self {
13419 Self {
13420 version: None,
13421 modules: Vec::new(),
13422 dependencies: Vec::new(),
13423 }
13424 }
13425 #[doc(hidden)]
13426 pub fn default_instance() -> &'static Self {
13427 static DEFAULT: super::SystemPackage = super::SystemPackage::const_default();
13428 &DEFAULT
13429 }
13430 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
13432 self.version.as_mut().map(|field| field as _)
13433 }
13434 pub fn version_mut(&mut self) -> &mut u64 {
13437 self.version.get_or_insert_default()
13438 }
13439 pub fn version_opt(&self) -> Option<u64> {
13441 self.version.as_ref().map(|field| *field)
13442 }
13443 pub fn set_version(&mut self, field: u64) {
13445 self.version = Some(field);
13446 }
13447 pub fn with_version(mut self, field: u64) -> Self {
13449 self.set_version(field);
13450 self
13451 }
13452 pub fn modules(&self) -> &[::prost::bytes::Bytes] {
13454 &self.modules
13455 }
13456 pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
13459 &mut self.modules
13460 }
13461 pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
13463 self.modules = field;
13464 }
13465 pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
13467 self.set_modules(field);
13468 self
13469 }
13470 pub fn dependencies(&self) -> &[String] {
13472 &self.dependencies
13473 }
13474 pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
13477 &mut self.dependencies
13478 }
13479 pub fn set_dependencies(&mut self, field: Vec<String>) {
13481 self.dependencies = field;
13482 }
13483 pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
13485 self.set_dependencies(field);
13486 self
13487 }
13488 }
13489 impl super::SystemParameters {
13490 pub const fn const_default() -> Self {
13491 Self {
13492 epoch_duration_ms: None,
13493 stake_subsidy_start_epoch: None,
13494 min_validator_count: None,
13495 max_validator_count: None,
13496 min_validator_joining_stake: None,
13497 validator_low_stake_threshold: None,
13498 validator_very_low_stake_threshold: None,
13499 validator_low_stake_grace_period: None,
13500 extra_fields: None,
13501 }
13502 }
13503 #[doc(hidden)]
13504 pub fn default_instance() -> &'static Self {
13505 static DEFAULT: super::SystemParameters = super::SystemParameters::const_default();
13506 &DEFAULT
13507 }
13508 pub fn epoch_duration_ms_opt_mut(&mut self) -> Option<&mut u64> {
13510 self.epoch_duration_ms.as_mut().map(|field| field as _)
13511 }
13512 pub fn epoch_duration_ms_mut(&mut self) -> &mut u64 {
13515 self.epoch_duration_ms.get_or_insert_default()
13516 }
13517 pub fn epoch_duration_ms_opt(&self) -> Option<u64> {
13519 self.epoch_duration_ms.as_ref().map(|field| *field)
13520 }
13521 pub fn set_epoch_duration_ms(&mut self, field: u64) {
13523 self.epoch_duration_ms = Some(field);
13524 }
13525 pub fn with_epoch_duration_ms(mut self, field: u64) -> Self {
13527 self.set_epoch_duration_ms(field);
13528 self
13529 }
13530 pub fn stake_subsidy_start_epoch_opt_mut(&mut self) -> Option<&mut u64> {
13532 self.stake_subsidy_start_epoch.as_mut().map(|field| field as _)
13533 }
13534 pub fn stake_subsidy_start_epoch_mut(&mut self) -> &mut u64 {
13537 self.stake_subsidy_start_epoch.get_or_insert_default()
13538 }
13539 pub fn stake_subsidy_start_epoch_opt(&self) -> Option<u64> {
13541 self.stake_subsidy_start_epoch.as_ref().map(|field| *field)
13542 }
13543 pub fn set_stake_subsidy_start_epoch(&mut self, field: u64) {
13545 self.stake_subsidy_start_epoch = Some(field);
13546 }
13547 pub fn with_stake_subsidy_start_epoch(mut self, field: u64) -> Self {
13549 self.set_stake_subsidy_start_epoch(field);
13550 self
13551 }
13552 pub fn min_validator_count_opt_mut(&mut self) -> Option<&mut u64> {
13554 self.min_validator_count.as_mut().map(|field| field as _)
13555 }
13556 pub fn min_validator_count_mut(&mut self) -> &mut u64 {
13559 self.min_validator_count.get_or_insert_default()
13560 }
13561 pub fn min_validator_count_opt(&self) -> Option<u64> {
13563 self.min_validator_count.as_ref().map(|field| *field)
13564 }
13565 pub fn set_min_validator_count(&mut self, field: u64) {
13567 self.min_validator_count = Some(field);
13568 }
13569 pub fn with_min_validator_count(mut self, field: u64) -> Self {
13571 self.set_min_validator_count(field);
13572 self
13573 }
13574 pub fn max_validator_count_opt_mut(&mut self) -> Option<&mut u64> {
13576 self.max_validator_count.as_mut().map(|field| field as _)
13577 }
13578 pub fn max_validator_count_mut(&mut self) -> &mut u64 {
13581 self.max_validator_count.get_or_insert_default()
13582 }
13583 pub fn max_validator_count_opt(&self) -> Option<u64> {
13585 self.max_validator_count.as_ref().map(|field| *field)
13586 }
13587 pub fn set_max_validator_count(&mut self, field: u64) {
13589 self.max_validator_count = Some(field);
13590 }
13591 pub fn with_max_validator_count(mut self, field: u64) -> Self {
13593 self.set_max_validator_count(field);
13594 self
13595 }
13596 pub fn min_validator_joining_stake_opt_mut(&mut self) -> Option<&mut u64> {
13598 self.min_validator_joining_stake.as_mut().map(|field| field as _)
13599 }
13600 pub fn min_validator_joining_stake_mut(&mut self) -> &mut u64 {
13603 self.min_validator_joining_stake.get_or_insert_default()
13604 }
13605 pub fn min_validator_joining_stake_opt(&self) -> Option<u64> {
13607 self.min_validator_joining_stake.as_ref().map(|field| *field)
13608 }
13609 pub fn set_min_validator_joining_stake(&mut self, field: u64) {
13611 self.min_validator_joining_stake = Some(field);
13612 }
13613 pub fn with_min_validator_joining_stake(mut self, field: u64) -> Self {
13615 self.set_min_validator_joining_stake(field);
13616 self
13617 }
13618 pub fn validator_low_stake_threshold_opt_mut(&mut self) -> Option<&mut u64> {
13620 self.validator_low_stake_threshold.as_mut().map(|field| field as _)
13621 }
13622 pub fn validator_low_stake_threshold_mut(&mut self) -> &mut u64 {
13625 self.validator_low_stake_threshold.get_or_insert_default()
13626 }
13627 pub fn validator_low_stake_threshold_opt(&self) -> Option<u64> {
13629 self.validator_low_stake_threshold.as_ref().map(|field| *field)
13630 }
13631 pub fn set_validator_low_stake_threshold(&mut self, field: u64) {
13633 self.validator_low_stake_threshold = Some(field);
13634 }
13635 pub fn with_validator_low_stake_threshold(mut self, field: u64) -> Self {
13637 self.set_validator_low_stake_threshold(field);
13638 self
13639 }
13640 pub fn validator_very_low_stake_threshold_opt_mut(
13642 &mut self,
13643 ) -> Option<&mut u64> {
13644 self.validator_very_low_stake_threshold.as_mut().map(|field| field as _)
13645 }
13646 pub fn validator_very_low_stake_threshold_mut(&mut self) -> &mut u64 {
13649 self.validator_very_low_stake_threshold.get_or_insert_default()
13650 }
13651 pub fn validator_very_low_stake_threshold_opt(&self) -> Option<u64> {
13653 self.validator_very_low_stake_threshold.as_ref().map(|field| *field)
13654 }
13655 pub fn set_validator_very_low_stake_threshold(&mut self, field: u64) {
13657 self.validator_very_low_stake_threshold = Some(field);
13658 }
13659 pub fn with_validator_very_low_stake_threshold(mut self, field: u64) -> Self {
13661 self.set_validator_very_low_stake_threshold(field);
13662 self
13663 }
13664 pub fn validator_low_stake_grace_period_opt_mut(&mut self) -> Option<&mut u64> {
13666 self.validator_low_stake_grace_period.as_mut().map(|field| field as _)
13667 }
13668 pub fn validator_low_stake_grace_period_mut(&mut self) -> &mut u64 {
13671 self.validator_low_stake_grace_period.get_or_insert_default()
13672 }
13673 pub fn validator_low_stake_grace_period_opt(&self) -> Option<u64> {
13675 self.validator_low_stake_grace_period.as_ref().map(|field| *field)
13676 }
13677 pub fn set_validator_low_stake_grace_period(&mut self, field: u64) {
13679 self.validator_low_stake_grace_period = Some(field);
13680 }
13681 pub fn with_validator_low_stake_grace_period(mut self, field: u64) -> Self {
13683 self.set_validator_low_stake_grace_period(field);
13684 self
13685 }
13686 pub fn extra_fields(&self) -> &super::MoveTable {
13688 self.extra_fields
13689 .as_ref()
13690 .map(|field| field as _)
13691 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
13692 }
13693 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
13695 self.extra_fields.as_mut().map(|field| field as _)
13696 }
13697 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
13700 self.extra_fields.get_or_insert_default()
13701 }
13702 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
13704 self.extra_fields.as_ref().map(|field| field as _)
13705 }
13706 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
13708 self.extra_fields = Some(field.into().into());
13709 }
13710 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
13712 self.set_extra_fields(field.into());
13713 self
13714 }
13715 }
13716 impl super::SystemState {
13717 pub const fn const_default() -> Self {
13718 Self {
13719 version: None,
13720 epoch: None,
13721 protocol_version: None,
13722 validators: None,
13723 storage_fund: None,
13724 parameters: None,
13725 reference_gas_price: None,
13726 validator_report_records: Vec::new(),
13727 stake_subsidy: None,
13728 safe_mode: None,
13729 safe_mode_storage_rewards: None,
13730 safe_mode_computation_rewards: None,
13731 safe_mode_storage_rebates: None,
13732 safe_mode_non_refundable_storage_fee: None,
13733 epoch_start_timestamp_ms: None,
13734 extra_fields: None,
13735 }
13736 }
13737 #[doc(hidden)]
13738 pub fn default_instance() -> &'static Self {
13739 static DEFAULT: super::SystemState = super::SystemState::const_default();
13740 &DEFAULT
13741 }
13742 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
13744 self.version.as_mut().map(|field| field as _)
13745 }
13746 pub fn version_mut(&mut self) -> &mut u64 {
13749 self.version.get_or_insert_default()
13750 }
13751 pub fn version_opt(&self) -> Option<u64> {
13753 self.version.as_ref().map(|field| *field)
13754 }
13755 pub fn set_version(&mut self, field: u64) {
13757 self.version = Some(field);
13758 }
13759 pub fn with_version(mut self, field: u64) -> Self {
13761 self.set_version(field);
13762 self
13763 }
13764 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
13766 self.epoch.as_mut().map(|field| field as _)
13767 }
13768 pub fn epoch_mut(&mut self) -> &mut u64 {
13771 self.epoch.get_or_insert_default()
13772 }
13773 pub fn epoch_opt(&self) -> Option<u64> {
13775 self.epoch.as_ref().map(|field| *field)
13776 }
13777 pub fn set_epoch(&mut self, field: u64) {
13779 self.epoch = Some(field);
13780 }
13781 pub fn with_epoch(mut self, field: u64) -> Self {
13783 self.set_epoch(field);
13784 self
13785 }
13786 pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
13788 self.protocol_version.as_mut().map(|field| field as _)
13789 }
13790 pub fn protocol_version_mut(&mut self) -> &mut u64 {
13793 self.protocol_version.get_or_insert_default()
13794 }
13795 pub fn protocol_version_opt(&self) -> Option<u64> {
13797 self.protocol_version.as_ref().map(|field| *field)
13798 }
13799 pub fn set_protocol_version(&mut self, field: u64) {
13801 self.protocol_version = Some(field);
13802 }
13803 pub fn with_protocol_version(mut self, field: u64) -> Self {
13805 self.set_protocol_version(field);
13806 self
13807 }
13808 pub fn validators(&self) -> &super::ValidatorSet {
13810 self.validators
13811 .as_ref()
13812 .map(|field| field as _)
13813 .unwrap_or_else(|| super::ValidatorSet::default_instance() as _)
13814 }
13815 pub fn validators_opt_mut(&mut self) -> Option<&mut super::ValidatorSet> {
13817 self.validators.as_mut().map(|field| field as _)
13818 }
13819 pub fn validators_mut(&mut self) -> &mut super::ValidatorSet {
13822 self.validators.get_or_insert_default()
13823 }
13824 pub fn validators_opt(&self) -> Option<&super::ValidatorSet> {
13826 self.validators.as_ref().map(|field| field as _)
13827 }
13828 pub fn set_validators<T: Into<super::ValidatorSet>>(&mut self, field: T) {
13830 self.validators = Some(field.into().into());
13831 }
13832 pub fn with_validators<T: Into<super::ValidatorSet>>(
13834 mut self,
13835 field: T,
13836 ) -> Self {
13837 self.set_validators(field.into());
13838 self
13839 }
13840 pub fn storage_fund(&self) -> &super::StorageFund {
13842 self.storage_fund
13843 .as_ref()
13844 .map(|field| field as _)
13845 .unwrap_or_else(|| super::StorageFund::default_instance() as _)
13846 }
13847 pub fn storage_fund_opt_mut(&mut self) -> Option<&mut super::StorageFund> {
13849 self.storage_fund.as_mut().map(|field| field as _)
13850 }
13851 pub fn storage_fund_mut(&mut self) -> &mut super::StorageFund {
13854 self.storage_fund.get_or_insert_default()
13855 }
13856 pub fn storage_fund_opt(&self) -> Option<&super::StorageFund> {
13858 self.storage_fund.as_ref().map(|field| field as _)
13859 }
13860 pub fn set_storage_fund<T: Into<super::StorageFund>>(&mut self, field: T) {
13862 self.storage_fund = Some(field.into().into());
13863 }
13864 pub fn with_storage_fund<T: Into<super::StorageFund>>(
13866 mut self,
13867 field: T,
13868 ) -> Self {
13869 self.set_storage_fund(field.into());
13870 self
13871 }
13872 pub fn parameters(&self) -> &super::SystemParameters {
13874 self.parameters
13875 .as_ref()
13876 .map(|field| field as _)
13877 .unwrap_or_else(|| super::SystemParameters::default_instance() as _)
13878 }
13879 pub fn parameters_opt_mut(&mut self) -> Option<&mut super::SystemParameters> {
13881 self.parameters.as_mut().map(|field| field as _)
13882 }
13883 pub fn parameters_mut(&mut self) -> &mut super::SystemParameters {
13886 self.parameters.get_or_insert_default()
13887 }
13888 pub fn parameters_opt(&self) -> Option<&super::SystemParameters> {
13890 self.parameters.as_ref().map(|field| field as _)
13891 }
13892 pub fn set_parameters<T: Into<super::SystemParameters>>(&mut self, field: T) {
13894 self.parameters = Some(field.into().into());
13895 }
13896 pub fn with_parameters<T: Into<super::SystemParameters>>(
13898 mut self,
13899 field: T,
13900 ) -> Self {
13901 self.set_parameters(field.into());
13902 self
13903 }
13904 pub fn reference_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
13906 self.reference_gas_price.as_mut().map(|field| field as _)
13907 }
13908 pub fn reference_gas_price_mut(&mut self) -> &mut u64 {
13911 self.reference_gas_price.get_or_insert_default()
13912 }
13913 pub fn reference_gas_price_opt(&self) -> Option<u64> {
13915 self.reference_gas_price.as_ref().map(|field| *field)
13916 }
13917 pub fn set_reference_gas_price(&mut self, field: u64) {
13919 self.reference_gas_price = Some(field);
13920 }
13921 pub fn with_reference_gas_price(mut self, field: u64) -> Self {
13923 self.set_reference_gas_price(field);
13924 self
13925 }
13926 pub fn validator_report_records(&self) -> &[super::ValidatorReportRecord] {
13928 &self.validator_report_records
13929 }
13930 pub fn validator_report_records_mut(
13933 &mut self,
13934 ) -> &mut Vec<super::ValidatorReportRecord> {
13935 &mut self.validator_report_records
13936 }
13937 pub fn set_validator_report_records(
13939 &mut self,
13940 field: Vec<super::ValidatorReportRecord>,
13941 ) {
13942 self.validator_report_records = field;
13943 }
13944 pub fn with_validator_report_records(
13946 mut self,
13947 field: Vec<super::ValidatorReportRecord>,
13948 ) -> Self {
13949 self.set_validator_report_records(field);
13950 self
13951 }
13952 pub fn stake_subsidy(&self) -> &super::StakeSubsidy {
13954 self.stake_subsidy
13955 .as_ref()
13956 .map(|field| field as _)
13957 .unwrap_or_else(|| super::StakeSubsidy::default_instance() as _)
13958 }
13959 pub fn stake_subsidy_opt_mut(&mut self) -> Option<&mut super::StakeSubsidy> {
13961 self.stake_subsidy.as_mut().map(|field| field as _)
13962 }
13963 pub fn stake_subsidy_mut(&mut self) -> &mut super::StakeSubsidy {
13966 self.stake_subsidy.get_or_insert_default()
13967 }
13968 pub fn stake_subsidy_opt(&self) -> Option<&super::StakeSubsidy> {
13970 self.stake_subsidy.as_ref().map(|field| field as _)
13971 }
13972 pub fn set_stake_subsidy<T: Into<super::StakeSubsidy>>(&mut self, field: T) {
13974 self.stake_subsidy = Some(field.into().into());
13975 }
13976 pub fn with_stake_subsidy<T: Into<super::StakeSubsidy>>(
13978 mut self,
13979 field: T,
13980 ) -> Self {
13981 self.set_stake_subsidy(field.into());
13982 self
13983 }
13984 pub fn safe_mode_opt_mut(&mut self) -> Option<&mut bool> {
13986 self.safe_mode.as_mut().map(|field| field as _)
13987 }
13988 pub fn safe_mode_mut(&mut self) -> &mut bool {
13991 self.safe_mode.get_or_insert_default()
13992 }
13993 pub fn safe_mode_opt(&self) -> Option<bool> {
13995 self.safe_mode.as_ref().map(|field| *field)
13996 }
13997 pub fn set_safe_mode(&mut self, field: bool) {
13999 self.safe_mode = Some(field);
14000 }
14001 pub fn with_safe_mode(mut self, field: bool) -> Self {
14003 self.set_safe_mode(field);
14004 self
14005 }
14006 pub fn safe_mode_storage_rewards_opt_mut(&mut self) -> Option<&mut u64> {
14008 self.safe_mode_storage_rewards.as_mut().map(|field| field as _)
14009 }
14010 pub fn safe_mode_storage_rewards_mut(&mut self) -> &mut u64 {
14013 self.safe_mode_storage_rewards.get_or_insert_default()
14014 }
14015 pub fn safe_mode_storage_rewards_opt(&self) -> Option<u64> {
14017 self.safe_mode_storage_rewards.as_ref().map(|field| *field)
14018 }
14019 pub fn set_safe_mode_storage_rewards(&mut self, field: u64) {
14021 self.safe_mode_storage_rewards = Some(field);
14022 }
14023 pub fn with_safe_mode_storage_rewards(mut self, field: u64) -> Self {
14025 self.set_safe_mode_storage_rewards(field);
14026 self
14027 }
14028 pub fn safe_mode_computation_rewards_opt_mut(&mut self) -> Option<&mut u64> {
14030 self.safe_mode_computation_rewards.as_mut().map(|field| field as _)
14031 }
14032 pub fn safe_mode_computation_rewards_mut(&mut self) -> &mut u64 {
14035 self.safe_mode_computation_rewards.get_or_insert_default()
14036 }
14037 pub fn safe_mode_computation_rewards_opt(&self) -> Option<u64> {
14039 self.safe_mode_computation_rewards.as_ref().map(|field| *field)
14040 }
14041 pub fn set_safe_mode_computation_rewards(&mut self, field: u64) {
14043 self.safe_mode_computation_rewards = Some(field);
14044 }
14045 pub fn with_safe_mode_computation_rewards(mut self, field: u64) -> Self {
14047 self.set_safe_mode_computation_rewards(field);
14048 self
14049 }
14050 pub fn safe_mode_storage_rebates_opt_mut(&mut self) -> Option<&mut u64> {
14052 self.safe_mode_storage_rebates.as_mut().map(|field| field as _)
14053 }
14054 pub fn safe_mode_storage_rebates_mut(&mut self) -> &mut u64 {
14057 self.safe_mode_storage_rebates.get_or_insert_default()
14058 }
14059 pub fn safe_mode_storage_rebates_opt(&self) -> Option<u64> {
14061 self.safe_mode_storage_rebates.as_ref().map(|field| *field)
14062 }
14063 pub fn set_safe_mode_storage_rebates(&mut self, field: u64) {
14065 self.safe_mode_storage_rebates = Some(field);
14066 }
14067 pub fn with_safe_mode_storage_rebates(mut self, field: u64) -> Self {
14069 self.set_safe_mode_storage_rebates(field);
14070 self
14071 }
14072 pub fn safe_mode_non_refundable_storage_fee_opt_mut(
14074 &mut self,
14075 ) -> Option<&mut u64> {
14076 self.safe_mode_non_refundable_storage_fee.as_mut().map(|field| field as _)
14077 }
14078 pub fn safe_mode_non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
14081 self.safe_mode_non_refundable_storage_fee.get_or_insert_default()
14082 }
14083 pub fn safe_mode_non_refundable_storage_fee_opt(&self) -> Option<u64> {
14085 self.safe_mode_non_refundable_storage_fee.as_ref().map(|field| *field)
14086 }
14087 pub fn set_safe_mode_non_refundable_storage_fee(&mut self, field: u64) {
14089 self.safe_mode_non_refundable_storage_fee = Some(field);
14090 }
14091 pub fn with_safe_mode_non_refundable_storage_fee(mut self, field: u64) -> Self {
14093 self.set_safe_mode_non_refundable_storage_fee(field);
14094 self
14095 }
14096 pub fn epoch_start_timestamp_ms_opt_mut(&mut self) -> Option<&mut u64> {
14098 self.epoch_start_timestamp_ms.as_mut().map(|field| field as _)
14099 }
14100 pub fn epoch_start_timestamp_ms_mut(&mut self) -> &mut u64 {
14103 self.epoch_start_timestamp_ms.get_or_insert_default()
14104 }
14105 pub fn epoch_start_timestamp_ms_opt(&self) -> Option<u64> {
14107 self.epoch_start_timestamp_ms.as_ref().map(|field| *field)
14108 }
14109 pub fn set_epoch_start_timestamp_ms(&mut self, field: u64) {
14111 self.epoch_start_timestamp_ms = Some(field);
14112 }
14113 pub fn with_epoch_start_timestamp_ms(mut self, field: u64) -> Self {
14115 self.set_epoch_start_timestamp_ms(field);
14116 self
14117 }
14118 pub fn extra_fields(&self) -> &super::MoveTable {
14120 self.extra_fields
14121 .as_ref()
14122 .map(|field| field as _)
14123 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
14124 }
14125 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
14127 self.extra_fields.as_mut().map(|field| field as _)
14128 }
14129 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
14132 self.extra_fields.get_or_insert_default()
14133 }
14134 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
14136 self.extra_fields.as_ref().map(|field| field as _)
14137 }
14138 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
14140 self.extra_fields = Some(field.into().into());
14141 }
14142 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
14144 self.set_extra_fields(field.into());
14145 self
14146 }
14147 }
14148 impl super::Transaction {
14149 pub const fn const_default() -> Self {
14150 Self {
14151 bcs: None,
14152 digest: None,
14153 version: None,
14154 kind: None,
14155 sender: None,
14156 gas_payment: None,
14157 expiration: None,
14158 }
14159 }
14160 #[doc(hidden)]
14161 pub fn default_instance() -> &'static Self {
14162 static DEFAULT: super::Transaction = super::Transaction::const_default();
14163 &DEFAULT
14164 }
14165 pub fn bcs(&self) -> &super::Bcs {
14167 self.bcs
14168 .as_ref()
14169 .map(|field| field as _)
14170 .unwrap_or_else(|| super::Bcs::default_instance() as _)
14171 }
14172 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
14174 self.bcs.as_mut().map(|field| field as _)
14175 }
14176 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
14179 self.bcs.get_or_insert_default()
14180 }
14181 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
14183 self.bcs.as_ref().map(|field| field as _)
14184 }
14185 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
14187 self.bcs = Some(field.into().into());
14188 }
14189 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
14191 self.set_bcs(field.into());
14192 self
14193 }
14194 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
14196 self.digest.as_mut().map(|field| field as _)
14197 }
14198 pub fn digest_mut(&mut self) -> &mut String {
14201 self.digest.get_or_insert_default()
14202 }
14203 pub fn digest_opt(&self) -> Option<&str> {
14205 self.digest.as_ref().map(|field| field as _)
14206 }
14207 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
14209 self.digest = Some(field.into().into());
14210 }
14211 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
14213 self.set_digest(field.into());
14214 self
14215 }
14216 pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
14218 self.version.as_mut().map(|field| field as _)
14219 }
14220 pub fn version_mut(&mut self) -> &mut i32 {
14223 self.version.get_or_insert_default()
14224 }
14225 pub fn version_opt(&self) -> Option<i32> {
14227 self.version.as_ref().map(|field| *field)
14228 }
14229 pub fn set_version(&mut self, field: i32) {
14231 self.version = Some(field);
14232 }
14233 pub fn with_version(mut self, field: i32) -> Self {
14235 self.set_version(field);
14236 self
14237 }
14238 pub fn kind(&self) -> &super::TransactionKind {
14240 self.kind
14241 .as_ref()
14242 .map(|field| field as _)
14243 .unwrap_or_else(|| super::TransactionKind::default_instance() as _)
14244 }
14245 pub fn kind_opt_mut(&mut self) -> Option<&mut super::TransactionKind> {
14247 self.kind.as_mut().map(|field| field as _)
14248 }
14249 pub fn kind_mut(&mut self) -> &mut super::TransactionKind {
14252 self.kind.get_or_insert_default()
14253 }
14254 pub fn kind_opt(&self) -> Option<&super::TransactionKind> {
14256 self.kind.as_ref().map(|field| field as _)
14257 }
14258 pub fn set_kind<T: Into<super::TransactionKind>>(&mut self, field: T) {
14260 self.kind = Some(field.into().into());
14261 }
14262 pub fn with_kind<T: Into<super::TransactionKind>>(mut self, field: T) -> Self {
14264 self.set_kind(field.into());
14265 self
14266 }
14267 pub fn sender_opt_mut(&mut self) -> Option<&mut String> {
14269 self.sender.as_mut().map(|field| field as _)
14270 }
14271 pub fn sender_mut(&mut self) -> &mut String {
14274 self.sender.get_or_insert_default()
14275 }
14276 pub fn sender_opt(&self) -> Option<&str> {
14278 self.sender.as_ref().map(|field| field as _)
14279 }
14280 pub fn set_sender<T: Into<String>>(&mut self, field: T) {
14282 self.sender = Some(field.into().into());
14283 }
14284 pub fn with_sender<T: Into<String>>(mut self, field: T) -> Self {
14286 self.set_sender(field.into());
14287 self
14288 }
14289 pub fn gas_payment(&self) -> &super::GasPayment {
14291 self.gas_payment
14292 .as_ref()
14293 .map(|field| field as _)
14294 .unwrap_or_else(|| super::GasPayment::default_instance() as _)
14295 }
14296 pub fn gas_payment_opt_mut(&mut self) -> Option<&mut super::GasPayment> {
14298 self.gas_payment.as_mut().map(|field| field as _)
14299 }
14300 pub fn gas_payment_mut(&mut self) -> &mut super::GasPayment {
14303 self.gas_payment.get_or_insert_default()
14304 }
14305 pub fn gas_payment_opt(&self) -> Option<&super::GasPayment> {
14307 self.gas_payment.as_ref().map(|field| field as _)
14308 }
14309 pub fn set_gas_payment<T: Into<super::GasPayment>>(&mut self, field: T) {
14311 self.gas_payment = Some(field.into().into());
14312 }
14313 pub fn with_gas_payment<T: Into<super::GasPayment>>(mut self, field: T) -> Self {
14315 self.set_gas_payment(field.into());
14316 self
14317 }
14318 pub fn expiration(&self) -> &super::TransactionExpiration {
14320 self.expiration
14321 .as_ref()
14322 .map(|field| field as _)
14323 .unwrap_or_else(|| super::TransactionExpiration::default_instance() as _)
14324 }
14325 pub fn expiration_opt_mut(
14327 &mut self,
14328 ) -> Option<&mut super::TransactionExpiration> {
14329 self.expiration.as_mut().map(|field| field as _)
14330 }
14331 pub fn expiration_mut(&mut self) -> &mut super::TransactionExpiration {
14334 self.expiration.get_or_insert_default()
14335 }
14336 pub fn expiration_opt(&self) -> Option<&super::TransactionExpiration> {
14338 self.expiration.as_ref().map(|field| field as _)
14339 }
14340 pub fn set_expiration<T: Into<super::TransactionExpiration>>(
14342 &mut self,
14343 field: T,
14344 ) {
14345 self.expiration = Some(field.into().into());
14346 }
14347 pub fn with_expiration<T: Into<super::TransactionExpiration>>(
14349 mut self,
14350 field: T,
14351 ) -> Self {
14352 self.set_expiration(field.into());
14353 self
14354 }
14355 }
14356 impl super::TransactionEffects {
14357 pub const fn const_default() -> Self {
14358 Self {
14359 bcs: None,
14360 digest: None,
14361 version: None,
14362 status: None,
14363 epoch: None,
14364 gas_used: None,
14365 transaction_digest: None,
14366 gas_object: None,
14367 events_digest: None,
14368 dependencies: Vec::new(),
14369 lamport_version: None,
14370 changed_objects: Vec::new(),
14371 unchanged_consensus_objects: Vec::new(),
14372 auxiliary_data_digest: None,
14373 unchanged_loaded_runtime_objects: Vec::new(),
14374 }
14375 }
14376 #[doc(hidden)]
14377 pub fn default_instance() -> &'static Self {
14378 static DEFAULT: super::TransactionEffects = super::TransactionEffects::const_default();
14379 &DEFAULT
14380 }
14381 pub fn bcs(&self) -> &super::Bcs {
14383 self.bcs
14384 .as_ref()
14385 .map(|field| field as _)
14386 .unwrap_or_else(|| super::Bcs::default_instance() as _)
14387 }
14388 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
14390 self.bcs.as_mut().map(|field| field as _)
14391 }
14392 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
14395 self.bcs.get_or_insert_default()
14396 }
14397 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
14399 self.bcs.as_ref().map(|field| field as _)
14400 }
14401 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
14403 self.bcs = Some(field.into().into());
14404 }
14405 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
14407 self.set_bcs(field.into());
14408 self
14409 }
14410 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
14412 self.digest.as_mut().map(|field| field as _)
14413 }
14414 pub fn digest_mut(&mut self) -> &mut String {
14417 self.digest.get_or_insert_default()
14418 }
14419 pub fn digest_opt(&self) -> Option<&str> {
14421 self.digest.as_ref().map(|field| field as _)
14422 }
14423 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
14425 self.digest = Some(field.into().into());
14426 }
14427 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
14429 self.set_digest(field.into());
14430 self
14431 }
14432 pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
14434 self.version.as_mut().map(|field| field as _)
14435 }
14436 pub fn version_mut(&mut self) -> &mut i32 {
14439 self.version.get_or_insert_default()
14440 }
14441 pub fn version_opt(&self) -> Option<i32> {
14443 self.version.as_ref().map(|field| *field)
14444 }
14445 pub fn set_version(&mut self, field: i32) {
14447 self.version = Some(field);
14448 }
14449 pub fn with_version(mut self, field: i32) -> Self {
14451 self.set_version(field);
14452 self
14453 }
14454 pub fn status(&self) -> &super::ExecutionStatus {
14456 self.status
14457 .as_ref()
14458 .map(|field| field as _)
14459 .unwrap_or_else(|| super::ExecutionStatus::default_instance() as _)
14460 }
14461 pub fn status_opt_mut(&mut self) -> Option<&mut super::ExecutionStatus> {
14463 self.status.as_mut().map(|field| field as _)
14464 }
14465 pub fn status_mut(&mut self) -> &mut super::ExecutionStatus {
14468 self.status.get_or_insert_default()
14469 }
14470 pub fn status_opt(&self) -> Option<&super::ExecutionStatus> {
14472 self.status.as_ref().map(|field| field as _)
14473 }
14474 pub fn set_status<T: Into<super::ExecutionStatus>>(&mut self, field: T) {
14476 self.status = Some(field.into().into());
14477 }
14478 pub fn with_status<T: Into<super::ExecutionStatus>>(mut self, field: T) -> Self {
14480 self.set_status(field.into());
14481 self
14482 }
14483 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
14485 self.epoch.as_mut().map(|field| field as _)
14486 }
14487 pub fn epoch_mut(&mut self) -> &mut u64 {
14490 self.epoch.get_or_insert_default()
14491 }
14492 pub fn epoch_opt(&self) -> Option<u64> {
14494 self.epoch.as_ref().map(|field| *field)
14495 }
14496 pub fn set_epoch(&mut self, field: u64) {
14498 self.epoch = Some(field);
14499 }
14500 pub fn with_epoch(mut self, field: u64) -> Self {
14502 self.set_epoch(field);
14503 self
14504 }
14505 pub fn gas_used(&self) -> &super::GasCostSummary {
14507 self.gas_used
14508 .as_ref()
14509 .map(|field| field as _)
14510 .unwrap_or_else(|| super::GasCostSummary::default_instance() as _)
14511 }
14512 pub fn gas_used_opt_mut(&mut self) -> Option<&mut super::GasCostSummary> {
14514 self.gas_used.as_mut().map(|field| field as _)
14515 }
14516 pub fn gas_used_mut(&mut self) -> &mut super::GasCostSummary {
14519 self.gas_used.get_or_insert_default()
14520 }
14521 pub fn gas_used_opt(&self) -> Option<&super::GasCostSummary> {
14523 self.gas_used.as_ref().map(|field| field as _)
14524 }
14525 pub fn set_gas_used<T: Into<super::GasCostSummary>>(&mut self, field: T) {
14527 self.gas_used = Some(field.into().into());
14528 }
14529 pub fn with_gas_used<T: Into<super::GasCostSummary>>(
14531 mut self,
14532 field: T,
14533 ) -> Self {
14534 self.set_gas_used(field.into());
14535 self
14536 }
14537 pub fn transaction_digest_opt_mut(&mut self) -> Option<&mut String> {
14539 self.transaction_digest.as_mut().map(|field| field as _)
14540 }
14541 pub fn transaction_digest_mut(&mut self) -> &mut String {
14544 self.transaction_digest.get_or_insert_default()
14545 }
14546 pub fn transaction_digest_opt(&self) -> Option<&str> {
14548 self.transaction_digest.as_ref().map(|field| field as _)
14549 }
14550 pub fn set_transaction_digest<T: Into<String>>(&mut self, field: T) {
14552 self.transaction_digest = Some(field.into().into());
14553 }
14554 pub fn with_transaction_digest<T: Into<String>>(mut self, field: T) -> Self {
14556 self.set_transaction_digest(field.into());
14557 self
14558 }
14559 pub fn gas_object(&self) -> &super::ChangedObject {
14561 self.gas_object
14562 .as_ref()
14563 .map(|field| field as _)
14564 .unwrap_or_else(|| super::ChangedObject::default_instance() as _)
14565 }
14566 pub fn gas_object_opt_mut(&mut self) -> Option<&mut super::ChangedObject> {
14568 self.gas_object.as_mut().map(|field| field as _)
14569 }
14570 pub fn gas_object_mut(&mut self) -> &mut super::ChangedObject {
14573 self.gas_object.get_or_insert_default()
14574 }
14575 pub fn gas_object_opt(&self) -> Option<&super::ChangedObject> {
14577 self.gas_object.as_ref().map(|field| field as _)
14578 }
14579 pub fn set_gas_object<T: Into<super::ChangedObject>>(&mut self, field: T) {
14581 self.gas_object = Some(field.into().into());
14582 }
14583 pub fn with_gas_object<T: Into<super::ChangedObject>>(
14585 mut self,
14586 field: T,
14587 ) -> Self {
14588 self.set_gas_object(field.into());
14589 self
14590 }
14591 pub fn events_digest_opt_mut(&mut self) -> Option<&mut String> {
14593 self.events_digest.as_mut().map(|field| field as _)
14594 }
14595 pub fn events_digest_mut(&mut self) -> &mut String {
14598 self.events_digest.get_or_insert_default()
14599 }
14600 pub fn events_digest_opt(&self) -> Option<&str> {
14602 self.events_digest.as_ref().map(|field| field as _)
14603 }
14604 pub fn set_events_digest<T: Into<String>>(&mut self, field: T) {
14606 self.events_digest = Some(field.into().into());
14607 }
14608 pub fn with_events_digest<T: Into<String>>(mut self, field: T) -> Self {
14610 self.set_events_digest(field.into());
14611 self
14612 }
14613 pub fn dependencies(&self) -> &[String] {
14615 &self.dependencies
14616 }
14617 pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
14620 &mut self.dependencies
14621 }
14622 pub fn set_dependencies(&mut self, field: Vec<String>) {
14624 self.dependencies = field;
14625 }
14626 pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
14628 self.set_dependencies(field);
14629 self
14630 }
14631 pub fn lamport_version_opt_mut(&mut self) -> Option<&mut u64> {
14633 self.lamport_version.as_mut().map(|field| field as _)
14634 }
14635 pub fn lamport_version_mut(&mut self) -> &mut u64 {
14638 self.lamport_version.get_or_insert_default()
14639 }
14640 pub fn lamport_version_opt(&self) -> Option<u64> {
14642 self.lamport_version.as_ref().map(|field| *field)
14643 }
14644 pub fn set_lamport_version(&mut self, field: u64) {
14646 self.lamport_version = Some(field);
14647 }
14648 pub fn with_lamport_version(mut self, field: u64) -> Self {
14650 self.set_lamport_version(field);
14651 self
14652 }
14653 pub fn changed_objects(&self) -> &[super::ChangedObject] {
14655 &self.changed_objects
14656 }
14657 pub fn changed_objects_mut(&mut self) -> &mut Vec<super::ChangedObject> {
14660 &mut self.changed_objects
14661 }
14662 pub fn set_changed_objects(&mut self, field: Vec<super::ChangedObject>) {
14664 self.changed_objects = field;
14665 }
14666 pub fn with_changed_objects(mut self, field: Vec<super::ChangedObject>) -> Self {
14668 self.set_changed_objects(field);
14669 self
14670 }
14671 pub fn unchanged_consensus_objects(&self) -> &[super::UnchangedConsensusObject] {
14673 &self.unchanged_consensus_objects
14674 }
14675 pub fn unchanged_consensus_objects_mut(
14678 &mut self,
14679 ) -> &mut Vec<super::UnchangedConsensusObject> {
14680 &mut self.unchanged_consensus_objects
14681 }
14682 pub fn set_unchanged_consensus_objects(
14684 &mut self,
14685 field: Vec<super::UnchangedConsensusObject>,
14686 ) {
14687 self.unchanged_consensus_objects = field;
14688 }
14689 pub fn with_unchanged_consensus_objects(
14691 mut self,
14692 field: Vec<super::UnchangedConsensusObject>,
14693 ) -> Self {
14694 self.set_unchanged_consensus_objects(field);
14695 self
14696 }
14697 pub fn auxiliary_data_digest_opt_mut(&mut self) -> Option<&mut String> {
14699 self.auxiliary_data_digest.as_mut().map(|field| field as _)
14700 }
14701 pub fn auxiliary_data_digest_mut(&mut self) -> &mut String {
14704 self.auxiliary_data_digest.get_or_insert_default()
14705 }
14706 pub fn auxiliary_data_digest_opt(&self) -> Option<&str> {
14708 self.auxiliary_data_digest.as_ref().map(|field| field as _)
14709 }
14710 pub fn set_auxiliary_data_digest<T: Into<String>>(&mut self, field: T) {
14712 self.auxiliary_data_digest = Some(field.into().into());
14713 }
14714 pub fn with_auxiliary_data_digest<T: Into<String>>(mut self, field: T) -> Self {
14716 self.set_auxiliary_data_digest(field.into());
14717 self
14718 }
14719 pub fn unchanged_loaded_runtime_objects(&self) -> &[super::ObjectReference] {
14721 &self.unchanged_loaded_runtime_objects
14722 }
14723 pub fn unchanged_loaded_runtime_objects_mut(
14726 &mut self,
14727 ) -> &mut Vec<super::ObjectReference> {
14728 &mut self.unchanged_loaded_runtime_objects
14729 }
14730 pub fn set_unchanged_loaded_runtime_objects(
14732 &mut self,
14733 field: Vec<super::ObjectReference>,
14734 ) {
14735 self.unchanged_loaded_runtime_objects = field;
14736 }
14737 pub fn with_unchanged_loaded_runtime_objects(
14739 mut self,
14740 field: Vec<super::ObjectReference>,
14741 ) -> Self {
14742 self.set_unchanged_loaded_runtime_objects(field);
14743 self
14744 }
14745 }
14746 impl super::TransactionEvents {
14747 pub const fn const_default() -> Self {
14748 Self {
14749 bcs: None,
14750 digest: None,
14751 events: Vec::new(),
14752 }
14753 }
14754 #[doc(hidden)]
14755 pub fn default_instance() -> &'static Self {
14756 static DEFAULT: super::TransactionEvents = super::TransactionEvents::const_default();
14757 &DEFAULT
14758 }
14759 pub fn bcs(&self) -> &super::Bcs {
14761 self.bcs
14762 .as_ref()
14763 .map(|field| field as _)
14764 .unwrap_or_else(|| super::Bcs::default_instance() as _)
14765 }
14766 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
14768 self.bcs.as_mut().map(|field| field as _)
14769 }
14770 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
14773 self.bcs.get_or_insert_default()
14774 }
14775 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
14777 self.bcs.as_ref().map(|field| field as _)
14778 }
14779 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
14781 self.bcs = Some(field.into().into());
14782 }
14783 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
14785 self.set_bcs(field.into());
14786 self
14787 }
14788 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
14790 self.digest.as_mut().map(|field| field as _)
14791 }
14792 pub fn digest_mut(&mut self) -> &mut String {
14795 self.digest.get_or_insert_default()
14796 }
14797 pub fn digest_opt(&self) -> Option<&str> {
14799 self.digest.as_ref().map(|field| field as _)
14800 }
14801 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
14803 self.digest = Some(field.into().into());
14804 }
14805 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
14807 self.set_digest(field.into());
14808 self
14809 }
14810 pub fn events(&self) -> &[super::Event] {
14812 &self.events
14813 }
14814 pub fn events_mut(&mut self) -> &mut Vec<super::Event> {
14817 &mut self.events
14818 }
14819 pub fn set_events(&mut self, field: Vec<super::Event>) {
14821 self.events = field;
14822 }
14823 pub fn with_events(mut self, field: Vec<super::Event>) -> Self {
14825 self.set_events(field);
14826 self
14827 }
14828 }
14829 impl super::TransactionExpiration {
14830 pub const fn const_default() -> Self {
14831 Self {
14832 kind: None,
14833 epoch: None,
14834 min_epoch: None,
14835 min_timestamp: None,
14836 max_timestamp: None,
14837 chain: None,
14838 nonce: None,
14839 }
14840 }
14841 #[doc(hidden)]
14842 pub fn default_instance() -> &'static Self {
14843 static DEFAULT: super::TransactionExpiration = super::TransactionExpiration::const_default();
14844 &DEFAULT
14845 }
14846 pub fn with_kind<
14848 T: Into<super::transaction_expiration::TransactionExpirationKind>,
14849 >(mut self, field: T) -> Self {
14850 self.set_kind(field.into());
14851 self
14852 }
14853 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
14855 self.epoch.as_mut().map(|field| field as _)
14856 }
14857 pub fn epoch_mut(&mut self) -> &mut u64 {
14860 self.epoch.get_or_insert_default()
14861 }
14862 pub fn epoch_opt(&self) -> Option<u64> {
14864 self.epoch.as_ref().map(|field| *field)
14865 }
14866 pub fn set_epoch(&mut self, field: u64) {
14868 self.epoch = Some(field);
14869 }
14870 pub fn with_epoch(mut self, field: u64) -> Self {
14872 self.set_epoch(field);
14873 self
14874 }
14875 pub fn min_epoch_opt_mut(&mut self) -> Option<&mut u64> {
14877 self.min_epoch.as_mut().map(|field| field as _)
14878 }
14879 pub fn min_epoch_mut(&mut self) -> &mut u64 {
14882 self.min_epoch.get_or_insert_default()
14883 }
14884 pub fn min_epoch_opt(&self) -> Option<u64> {
14886 self.min_epoch.as_ref().map(|field| *field)
14887 }
14888 pub fn set_min_epoch(&mut self, field: u64) {
14890 self.min_epoch = Some(field);
14891 }
14892 pub fn with_min_epoch(mut self, field: u64) -> Self {
14894 self.set_min_epoch(field);
14895 self
14896 }
14897 pub fn min_timestamp_opt_mut(
14899 &mut self,
14900 ) -> Option<&mut ::prost_types::Timestamp> {
14901 self.min_timestamp.as_mut().map(|field| field as _)
14902 }
14903 pub fn min_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
14906 self.min_timestamp.get_or_insert_default()
14907 }
14908 pub fn min_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
14910 self.min_timestamp.as_ref().map(|field| field as _)
14911 }
14912 pub fn set_min_timestamp<T: Into<::prost_types::Timestamp>>(
14914 &mut self,
14915 field: T,
14916 ) {
14917 self.min_timestamp = Some(field.into().into());
14918 }
14919 pub fn with_min_timestamp<T: Into<::prost_types::Timestamp>>(
14921 mut self,
14922 field: T,
14923 ) -> Self {
14924 self.set_min_timestamp(field.into());
14925 self
14926 }
14927 pub fn max_timestamp_opt_mut(
14929 &mut self,
14930 ) -> Option<&mut ::prost_types::Timestamp> {
14931 self.max_timestamp.as_mut().map(|field| field as _)
14932 }
14933 pub fn max_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
14936 self.max_timestamp.get_or_insert_default()
14937 }
14938 pub fn max_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
14940 self.max_timestamp.as_ref().map(|field| field as _)
14941 }
14942 pub fn set_max_timestamp<T: Into<::prost_types::Timestamp>>(
14944 &mut self,
14945 field: T,
14946 ) {
14947 self.max_timestamp = Some(field.into().into());
14948 }
14949 pub fn with_max_timestamp<T: Into<::prost_types::Timestamp>>(
14951 mut self,
14952 field: T,
14953 ) -> Self {
14954 self.set_max_timestamp(field.into());
14955 self
14956 }
14957 pub fn chain_opt_mut(&mut self) -> Option<&mut String> {
14959 self.chain.as_mut().map(|field| field as _)
14960 }
14961 pub fn chain_mut(&mut self) -> &mut String {
14964 self.chain.get_or_insert_default()
14965 }
14966 pub fn chain_opt(&self) -> Option<&str> {
14968 self.chain.as_ref().map(|field| field as _)
14969 }
14970 pub fn set_chain<T: Into<String>>(&mut self, field: T) {
14972 self.chain = Some(field.into().into());
14973 }
14974 pub fn with_chain<T: Into<String>>(mut self, field: T) -> Self {
14976 self.set_chain(field.into());
14977 self
14978 }
14979 pub fn nonce_opt_mut(&mut self) -> Option<&mut u32> {
14981 self.nonce.as_mut().map(|field| field as _)
14982 }
14983 pub fn nonce_mut(&mut self) -> &mut u32 {
14986 self.nonce.get_or_insert_default()
14987 }
14988 pub fn nonce_opt(&self) -> Option<u32> {
14990 self.nonce.as_ref().map(|field| *field)
14991 }
14992 pub fn set_nonce(&mut self, field: u32) {
14994 self.nonce = Some(field);
14995 }
14996 pub fn with_nonce(mut self, field: u32) -> Self {
14998 self.set_nonce(field);
14999 self
15000 }
15001 }
15002 impl super::TransactionKind {
15003 pub const fn const_default() -> Self {
15004 Self { kind: None, data: None }
15005 }
15006 #[doc(hidden)]
15007 pub fn default_instance() -> &'static Self {
15008 static DEFAULT: super::TransactionKind = super::TransactionKind::const_default();
15009 &DEFAULT
15010 }
15011 pub fn with_kind<T: Into<super::transaction_kind::Kind>>(
15013 mut self,
15014 field: T,
15015 ) -> Self {
15016 self.set_kind(field.into());
15017 self
15018 }
15019 pub fn programmable_transaction(&self) -> &super::ProgrammableTransaction {
15021 if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &self
15022 .data
15023 {
15024 field as _
15025 } else {
15026 super::ProgrammableTransaction::default_instance() as _
15027 }
15028 }
15029 pub fn programmable_transaction_opt(
15031 &self,
15032 ) -> Option<&super::ProgrammableTransaction> {
15033 if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &self
15034 .data
15035 {
15036 Some(field as _)
15037 } else {
15038 None
15039 }
15040 }
15041 pub fn programmable_transaction_opt_mut(
15043 &mut self,
15044 ) -> Option<&mut super::ProgrammableTransaction> {
15045 if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &mut self
15046 .data
15047 {
15048 Some(field as _)
15049 } else {
15050 None
15051 }
15052 }
15053 pub fn programmable_transaction_mut(
15057 &mut self,
15058 ) -> &mut super::ProgrammableTransaction {
15059 if self.programmable_transaction_opt_mut().is_none() {
15060 self.data = Some(
15061 super::transaction_kind::Data::ProgrammableTransaction(
15062 super::ProgrammableTransaction::default(),
15063 ),
15064 );
15065 }
15066 self.programmable_transaction_opt_mut().unwrap()
15067 }
15068 pub fn set_programmable_transaction<T: Into<super::ProgrammableTransaction>>(
15071 &mut self,
15072 field: T,
15073 ) {
15074 self.data = Some(
15075 super::transaction_kind::Data::ProgrammableTransaction(
15076 field.into().into(),
15077 ),
15078 );
15079 }
15080 pub fn with_programmable_transaction<T: Into<super::ProgrammableTransaction>>(
15083 mut self,
15084 field: T,
15085 ) -> Self {
15086 self.set_programmable_transaction(field.into());
15087 self
15088 }
15089 pub fn change_epoch(&self) -> &super::ChangeEpoch {
15091 if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &self.data {
15092 field as _
15093 } else {
15094 super::ChangeEpoch::default_instance() as _
15095 }
15096 }
15097 pub fn change_epoch_opt(&self) -> Option<&super::ChangeEpoch> {
15099 if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &self.data {
15100 Some(field as _)
15101 } else {
15102 None
15103 }
15104 }
15105 pub fn change_epoch_opt_mut(&mut self) -> Option<&mut super::ChangeEpoch> {
15107 if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &mut self
15108 .data
15109 {
15110 Some(field as _)
15111 } else {
15112 None
15113 }
15114 }
15115 pub fn change_epoch_mut(&mut self) -> &mut super::ChangeEpoch {
15119 if self.change_epoch_opt_mut().is_none() {
15120 self.data = Some(
15121 super::transaction_kind::Data::ChangeEpoch(
15122 super::ChangeEpoch::default(),
15123 ),
15124 );
15125 }
15126 self.change_epoch_opt_mut().unwrap()
15127 }
15128 pub fn set_change_epoch<T: Into<super::ChangeEpoch>>(&mut self, field: T) {
15131 self.data = Some(
15132 super::transaction_kind::Data::ChangeEpoch(field.into().into()),
15133 );
15134 }
15135 pub fn with_change_epoch<T: Into<super::ChangeEpoch>>(
15138 mut self,
15139 field: T,
15140 ) -> Self {
15141 self.set_change_epoch(field.into());
15142 self
15143 }
15144 pub fn genesis(&self) -> &super::GenesisTransaction {
15146 if let Some(super::transaction_kind::Data::Genesis(field)) = &self.data {
15147 field as _
15148 } else {
15149 super::GenesisTransaction::default_instance() as _
15150 }
15151 }
15152 pub fn genesis_opt(&self) -> Option<&super::GenesisTransaction> {
15154 if let Some(super::transaction_kind::Data::Genesis(field)) = &self.data {
15155 Some(field as _)
15156 } else {
15157 None
15158 }
15159 }
15160 pub fn genesis_opt_mut(&mut self) -> Option<&mut super::GenesisTransaction> {
15162 if let Some(super::transaction_kind::Data::Genesis(field)) = &mut self.data {
15163 Some(field as _)
15164 } else {
15165 None
15166 }
15167 }
15168 pub fn genesis_mut(&mut self) -> &mut super::GenesisTransaction {
15172 if self.genesis_opt_mut().is_none() {
15173 self.data = Some(
15174 super::transaction_kind::Data::Genesis(
15175 super::GenesisTransaction::default(),
15176 ),
15177 );
15178 }
15179 self.genesis_opt_mut().unwrap()
15180 }
15181 pub fn set_genesis<T: Into<super::GenesisTransaction>>(&mut self, field: T) {
15184 self.data = Some(
15185 super::transaction_kind::Data::Genesis(field.into().into()),
15186 );
15187 }
15188 pub fn with_genesis<T: Into<super::GenesisTransaction>>(
15191 mut self,
15192 field: T,
15193 ) -> Self {
15194 self.set_genesis(field.into());
15195 self
15196 }
15197 pub fn consensus_commit_prologue(&self) -> &super::ConsensusCommitPrologue {
15199 if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &self
15200 .data
15201 {
15202 field as _
15203 } else {
15204 super::ConsensusCommitPrologue::default_instance() as _
15205 }
15206 }
15207 pub fn consensus_commit_prologue_opt(
15209 &self,
15210 ) -> Option<&super::ConsensusCommitPrologue> {
15211 if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &self
15212 .data
15213 {
15214 Some(field as _)
15215 } else {
15216 None
15217 }
15218 }
15219 pub fn consensus_commit_prologue_opt_mut(
15221 &mut self,
15222 ) -> Option<&mut super::ConsensusCommitPrologue> {
15223 if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &mut self
15224 .data
15225 {
15226 Some(field as _)
15227 } else {
15228 None
15229 }
15230 }
15231 pub fn consensus_commit_prologue_mut(
15235 &mut self,
15236 ) -> &mut super::ConsensusCommitPrologue {
15237 if self.consensus_commit_prologue_opt_mut().is_none() {
15238 self.data = Some(
15239 super::transaction_kind::Data::ConsensusCommitPrologue(
15240 super::ConsensusCommitPrologue::default(),
15241 ),
15242 );
15243 }
15244 self.consensus_commit_prologue_opt_mut().unwrap()
15245 }
15246 pub fn set_consensus_commit_prologue<T: Into<super::ConsensusCommitPrologue>>(
15249 &mut self,
15250 field: T,
15251 ) {
15252 self.data = Some(
15253 super::transaction_kind::Data::ConsensusCommitPrologue(
15254 field.into().into(),
15255 ),
15256 );
15257 }
15258 pub fn with_consensus_commit_prologue<T: Into<super::ConsensusCommitPrologue>>(
15261 mut self,
15262 field: T,
15263 ) -> Self {
15264 self.set_consensus_commit_prologue(field.into());
15265 self
15266 }
15267 pub fn authenticator_state_update(&self) -> &super::AuthenticatorStateUpdate {
15269 if let Some(
15270 super::transaction_kind::Data::AuthenticatorStateUpdate(field),
15271 ) = &self.data
15272 {
15273 field as _
15274 } else {
15275 super::AuthenticatorStateUpdate::default_instance() as _
15276 }
15277 }
15278 pub fn authenticator_state_update_opt(
15280 &self,
15281 ) -> Option<&super::AuthenticatorStateUpdate> {
15282 if let Some(
15283 super::transaction_kind::Data::AuthenticatorStateUpdate(field),
15284 ) = &self.data
15285 {
15286 Some(field as _)
15287 } else {
15288 None
15289 }
15290 }
15291 pub fn authenticator_state_update_opt_mut(
15293 &mut self,
15294 ) -> Option<&mut super::AuthenticatorStateUpdate> {
15295 if let Some(
15296 super::transaction_kind::Data::AuthenticatorStateUpdate(field),
15297 ) = &mut self.data
15298 {
15299 Some(field as _)
15300 } else {
15301 None
15302 }
15303 }
15304 pub fn authenticator_state_update_mut(
15308 &mut self,
15309 ) -> &mut super::AuthenticatorStateUpdate {
15310 if self.authenticator_state_update_opt_mut().is_none() {
15311 self.data = Some(
15312 super::transaction_kind::Data::AuthenticatorStateUpdate(
15313 super::AuthenticatorStateUpdate::default(),
15314 ),
15315 );
15316 }
15317 self.authenticator_state_update_opt_mut().unwrap()
15318 }
15319 pub fn set_authenticator_state_update<T: Into<super::AuthenticatorStateUpdate>>(
15322 &mut self,
15323 field: T,
15324 ) {
15325 self.data = Some(
15326 super::transaction_kind::Data::AuthenticatorStateUpdate(
15327 field.into().into(),
15328 ),
15329 );
15330 }
15331 pub fn with_authenticator_state_update<T: Into<super::AuthenticatorStateUpdate>>(
15334 mut self,
15335 field: T,
15336 ) -> Self {
15337 self.set_authenticator_state_update(field.into());
15338 self
15339 }
15340 pub fn end_of_epoch(&self) -> &super::EndOfEpochTransaction {
15342 if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &self.data {
15343 field as _
15344 } else {
15345 super::EndOfEpochTransaction::default_instance() as _
15346 }
15347 }
15348 pub fn end_of_epoch_opt(&self) -> Option<&super::EndOfEpochTransaction> {
15350 if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &self.data {
15351 Some(field as _)
15352 } else {
15353 None
15354 }
15355 }
15356 pub fn end_of_epoch_opt_mut(
15358 &mut self,
15359 ) -> Option<&mut super::EndOfEpochTransaction> {
15360 if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &mut self
15361 .data
15362 {
15363 Some(field as _)
15364 } else {
15365 None
15366 }
15367 }
15368 pub fn end_of_epoch_mut(&mut self) -> &mut super::EndOfEpochTransaction {
15372 if self.end_of_epoch_opt_mut().is_none() {
15373 self.data = Some(
15374 super::transaction_kind::Data::EndOfEpoch(
15375 super::EndOfEpochTransaction::default(),
15376 ),
15377 );
15378 }
15379 self.end_of_epoch_opt_mut().unwrap()
15380 }
15381 pub fn set_end_of_epoch<T: Into<super::EndOfEpochTransaction>>(
15384 &mut self,
15385 field: T,
15386 ) {
15387 self.data = Some(
15388 super::transaction_kind::Data::EndOfEpoch(field.into().into()),
15389 );
15390 }
15391 pub fn with_end_of_epoch<T: Into<super::EndOfEpochTransaction>>(
15394 mut self,
15395 field: T,
15396 ) -> Self {
15397 self.set_end_of_epoch(field.into());
15398 self
15399 }
15400 pub fn randomness_state_update(&self) -> &super::RandomnessStateUpdate {
15402 if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &self
15403 .data
15404 {
15405 field as _
15406 } else {
15407 super::RandomnessStateUpdate::default_instance() as _
15408 }
15409 }
15410 pub fn randomness_state_update_opt(
15412 &self,
15413 ) -> Option<&super::RandomnessStateUpdate> {
15414 if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &self
15415 .data
15416 {
15417 Some(field as _)
15418 } else {
15419 None
15420 }
15421 }
15422 pub fn randomness_state_update_opt_mut(
15424 &mut self,
15425 ) -> Option<&mut super::RandomnessStateUpdate> {
15426 if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &mut self
15427 .data
15428 {
15429 Some(field as _)
15430 } else {
15431 None
15432 }
15433 }
15434 pub fn randomness_state_update_mut(
15438 &mut self,
15439 ) -> &mut super::RandomnessStateUpdate {
15440 if self.randomness_state_update_opt_mut().is_none() {
15441 self.data = Some(
15442 super::transaction_kind::Data::RandomnessStateUpdate(
15443 super::RandomnessStateUpdate::default(),
15444 ),
15445 );
15446 }
15447 self.randomness_state_update_opt_mut().unwrap()
15448 }
15449 pub fn set_randomness_state_update<T: Into<super::RandomnessStateUpdate>>(
15452 &mut self,
15453 field: T,
15454 ) {
15455 self.data = Some(
15456 super::transaction_kind::Data::RandomnessStateUpdate(field.into().into()),
15457 );
15458 }
15459 pub fn with_randomness_state_update<T: Into<super::RandomnessStateUpdate>>(
15462 mut self,
15463 field: T,
15464 ) -> Self {
15465 self.set_randomness_state_update(field.into());
15466 self
15467 }
15468 }
15469 impl super::TransferObjects {
15470 pub const fn const_default() -> Self {
15471 Self {
15472 objects: Vec::new(),
15473 address: None,
15474 }
15475 }
15476 #[doc(hidden)]
15477 pub fn default_instance() -> &'static Self {
15478 static DEFAULT: super::TransferObjects = super::TransferObjects::const_default();
15479 &DEFAULT
15480 }
15481 pub fn objects(&self) -> &[super::Argument] {
15483 &self.objects
15484 }
15485 pub fn objects_mut(&mut self) -> &mut Vec<super::Argument> {
15488 &mut self.objects
15489 }
15490 pub fn set_objects(&mut self, field: Vec<super::Argument>) {
15492 self.objects = field;
15493 }
15494 pub fn with_objects(mut self, field: Vec<super::Argument>) -> Self {
15496 self.set_objects(field);
15497 self
15498 }
15499 pub fn address(&self) -> &super::Argument {
15501 self.address
15502 .as_ref()
15503 .map(|field| field as _)
15504 .unwrap_or_else(|| super::Argument::default_instance() as _)
15505 }
15506 pub fn address_opt_mut(&mut self) -> Option<&mut super::Argument> {
15508 self.address.as_mut().map(|field| field as _)
15509 }
15510 pub fn address_mut(&mut self) -> &mut super::Argument {
15513 self.address.get_or_insert_default()
15514 }
15515 pub fn address_opt(&self) -> Option<&super::Argument> {
15517 self.address.as_ref().map(|field| field as _)
15518 }
15519 pub fn set_address<T: Into<super::Argument>>(&mut self, field: T) {
15521 self.address = Some(field.into().into());
15522 }
15523 pub fn with_address<T: Into<super::Argument>>(mut self, field: T) -> Self {
15525 self.set_address(field.into());
15526 self
15527 }
15528 }
15529 impl super::TypeArgumentError {
15530 pub const fn const_default() -> Self {
15531 Self {
15532 type_argument: None,
15533 kind: None,
15534 }
15535 }
15536 #[doc(hidden)]
15537 pub fn default_instance() -> &'static Self {
15538 static DEFAULT: super::TypeArgumentError = super::TypeArgumentError::const_default();
15539 &DEFAULT
15540 }
15541 pub fn type_argument_opt_mut(&mut self) -> Option<&mut u32> {
15543 self.type_argument.as_mut().map(|field| field as _)
15544 }
15545 pub fn type_argument_mut(&mut self) -> &mut u32 {
15548 self.type_argument.get_or_insert_default()
15549 }
15550 pub fn type_argument_opt(&self) -> Option<u32> {
15552 self.type_argument.as_ref().map(|field| *field)
15553 }
15554 pub fn set_type_argument(&mut self, field: u32) {
15556 self.type_argument = Some(field);
15557 }
15558 pub fn with_type_argument(mut self, field: u32) -> Self {
15560 self.set_type_argument(field);
15561 self
15562 }
15563 pub fn with_kind<T: Into<super::type_argument_error::TypeArgumentErrorKind>>(
15565 mut self,
15566 field: T,
15567 ) -> Self {
15568 self.set_kind(field.into());
15569 self
15570 }
15571 }
15572 impl super::TypeOrigin {
15573 pub const fn const_default() -> Self {
15574 Self {
15575 module_name: None,
15576 datatype_name: None,
15577 package_id: None,
15578 }
15579 }
15580 #[doc(hidden)]
15581 pub fn default_instance() -> &'static Self {
15582 static DEFAULT: super::TypeOrigin = super::TypeOrigin::const_default();
15583 &DEFAULT
15584 }
15585 pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
15587 self.module_name.as_mut().map(|field| field as _)
15588 }
15589 pub fn module_name_mut(&mut self) -> &mut String {
15592 self.module_name.get_or_insert_default()
15593 }
15594 pub fn module_name_opt(&self) -> Option<&str> {
15596 self.module_name.as_ref().map(|field| field as _)
15597 }
15598 pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
15600 self.module_name = Some(field.into().into());
15601 }
15602 pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
15604 self.set_module_name(field.into());
15605 self
15606 }
15607 pub fn datatype_name_opt_mut(&mut self) -> Option<&mut String> {
15609 self.datatype_name.as_mut().map(|field| field as _)
15610 }
15611 pub fn datatype_name_mut(&mut self) -> &mut String {
15614 self.datatype_name.get_or_insert_default()
15615 }
15616 pub fn datatype_name_opt(&self) -> Option<&str> {
15618 self.datatype_name.as_ref().map(|field| field as _)
15619 }
15620 pub fn set_datatype_name<T: Into<String>>(&mut self, field: T) {
15622 self.datatype_name = Some(field.into().into());
15623 }
15624 pub fn with_datatype_name<T: Into<String>>(mut self, field: T) -> Self {
15626 self.set_datatype_name(field.into());
15627 self
15628 }
15629 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
15631 self.package_id.as_mut().map(|field| field as _)
15632 }
15633 pub fn package_id_mut(&mut self) -> &mut String {
15636 self.package_id.get_or_insert_default()
15637 }
15638 pub fn package_id_opt(&self) -> Option<&str> {
15640 self.package_id.as_ref().map(|field| field as _)
15641 }
15642 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
15644 self.package_id = Some(field.into().into());
15645 }
15646 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
15648 self.set_package_id(field.into());
15649 self
15650 }
15651 }
15652 impl super::TypeParameter {
15653 pub const fn const_default() -> Self {
15654 Self {
15655 constraints: Vec::new(),
15656 is_phantom: None,
15657 }
15658 }
15659 #[doc(hidden)]
15660 pub fn default_instance() -> &'static Self {
15661 static DEFAULT: super::TypeParameter = super::TypeParameter::const_default();
15662 &DEFAULT
15663 }
15664 pub fn is_phantom_opt_mut(&mut self) -> Option<&mut bool> {
15666 self.is_phantom.as_mut().map(|field| field as _)
15667 }
15668 pub fn is_phantom_mut(&mut self) -> &mut bool {
15671 self.is_phantom.get_or_insert_default()
15672 }
15673 pub fn is_phantom_opt(&self) -> Option<bool> {
15675 self.is_phantom.as_ref().map(|field| *field)
15676 }
15677 pub fn set_is_phantom(&mut self, field: bool) {
15679 self.is_phantom = Some(field);
15680 }
15681 pub fn with_is_phantom(mut self, field: bool) -> Self {
15683 self.set_is_phantom(field);
15684 self
15685 }
15686 }
15687 impl super::UnchangedConsensusObject {
15688 pub const fn const_default() -> Self {
15689 Self {
15690 kind: None,
15691 object_id: None,
15692 version: None,
15693 digest: None,
15694 object_type: None,
15695 }
15696 }
15697 #[doc(hidden)]
15698 pub fn default_instance() -> &'static Self {
15699 static DEFAULT: super::UnchangedConsensusObject = super::UnchangedConsensusObject::const_default();
15700 &DEFAULT
15701 }
15702 pub fn with_kind<
15704 T: Into<super::unchanged_consensus_object::UnchangedConsensusObjectKind>,
15705 >(mut self, field: T) -> Self {
15706 self.set_kind(field.into());
15707 self
15708 }
15709 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
15711 self.object_id.as_mut().map(|field| field as _)
15712 }
15713 pub fn object_id_mut(&mut self) -> &mut String {
15716 self.object_id.get_or_insert_default()
15717 }
15718 pub fn object_id_opt(&self) -> Option<&str> {
15720 self.object_id.as_ref().map(|field| field as _)
15721 }
15722 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
15724 self.object_id = Some(field.into().into());
15725 }
15726 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
15728 self.set_object_id(field.into());
15729 self
15730 }
15731 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
15733 self.version.as_mut().map(|field| field as _)
15734 }
15735 pub fn version_mut(&mut self) -> &mut u64 {
15738 self.version.get_or_insert_default()
15739 }
15740 pub fn version_opt(&self) -> Option<u64> {
15742 self.version.as_ref().map(|field| *field)
15743 }
15744 pub fn set_version(&mut self, field: u64) {
15746 self.version = Some(field);
15747 }
15748 pub fn with_version(mut self, field: u64) -> Self {
15750 self.set_version(field);
15751 self
15752 }
15753 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
15755 self.digest.as_mut().map(|field| field as _)
15756 }
15757 pub fn digest_mut(&mut self) -> &mut String {
15760 self.digest.get_or_insert_default()
15761 }
15762 pub fn digest_opt(&self) -> Option<&str> {
15764 self.digest.as_ref().map(|field| field as _)
15765 }
15766 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
15768 self.digest = Some(field.into().into());
15769 }
15770 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
15772 self.set_digest(field.into());
15773 self
15774 }
15775 pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
15777 self.object_type.as_mut().map(|field| field as _)
15778 }
15779 pub fn object_type_mut(&mut self) -> &mut String {
15782 self.object_type.get_or_insert_default()
15783 }
15784 pub fn object_type_opt(&self) -> Option<&str> {
15786 self.object_type.as_ref().map(|field| field as _)
15787 }
15788 pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
15790 self.object_type = Some(field.into().into());
15791 }
15792 pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
15794 self.set_object_type(field.into());
15795 self
15796 }
15797 }
15798 impl super::Upgrade {
15799 pub const fn const_default() -> Self {
15800 Self {
15801 modules: Vec::new(),
15802 dependencies: Vec::new(),
15803 package: None,
15804 ticket: None,
15805 }
15806 }
15807 #[doc(hidden)]
15808 pub fn default_instance() -> &'static Self {
15809 static DEFAULT: super::Upgrade = super::Upgrade::const_default();
15810 &DEFAULT
15811 }
15812 pub fn modules(&self) -> &[::prost::bytes::Bytes] {
15814 &self.modules
15815 }
15816 pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
15819 &mut self.modules
15820 }
15821 pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
15823 self.modules = field;
15824 }
15825 pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
15827 self.set_modules(field);
15828 self
15829 }
15830 pub fn dependencies(&self) -> &[String] {
15832 &self.dependencies
15833 }
15834 pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
15837 &mut self.dependencies
15838 }
15839 pub fn set_dependencies(&mut self, field: Vec<String>) {
15841 self.dependencies = field;
15842 }
15843 pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
15845 self.set_dependencies(field);
15846 self
15847 }
15848 pub fn package_opt_mut(&mut self) -> Option<&mut String> {
15850 self.package.as_mut().map(|field| field as _)
15851 }
15852 pub fn package_mut(&mut self) -> &mut String {
15855 self.package.get_or_insert_default()
15856 }
15857 pub fn package_opt(&self) -> Option<&str> {
15859 self.package.as_ref().map(|field| field as _)
15860 }
15861 pub fn set_package<T: Into<String>>(&mut self, field: T) {
15863 self.package = Some(field.into().into());
15864 }
15865 pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
15867 self.set_package(field.into());
15868 self
15869 }
15870 pub fn ticket(&self) -> &super::Argument {
15872 self.ticket
15873 .as_ref()
15874 .map(|field| field as _)
15875 .unwrap_or_else(|| super::Argument::default_instance() as _)
15876 }
15877 pub fn ticket_opt_mut(&mut self) -> Option<&mut super::Argument> {
15879 self.ticket.as_mut().map(|field| field as _)
15880 }
15881 pub fn ticket_mut(&mut self) -> &mut super::Argument {
15884 self.ticket.get_or_insert_default()
15885 }
15886 pub fn ticket_opt(&self) -> Option<&super::Argument> {
15888 self.ticket.as_ref().map(|field| field as _)
15889 }
15890 pub fn set_ticket<T: Into<super::Argument>>(&mut self, field: T) {
15892 self.ticket = Some(field.into().into());
15893 }
15894 pub fn with_ticket<T: Into<super::Argument>>(mut self, field: T) -> Self {
15896 self.set_ticket(field.into());
15897 self
15898 }
15899 }
15900 impl super::UserSignature {
15901 pub const fn const_default() -> Self {
15902 Self {
15903 bcs: None,
15904 scheme: None,
15905 signature: None,
15906 }
15907 }
15908 #[doc(hidden)]
15909 pub fn default_instance() -> &'static Self {
15910 static DEFAULT: super::UserSignature = super::UserSignature::const_default();
15911 &DEFAULT
15912 }
15913 pub fn bcs(&self) -> &super::Bcs {
15915 self.bcs
15916 .as_ref()
15917 .map(|field| field as _)
15918 .unwrap_or_else(|| super::Bcs::default_instance() as _)
15919 }
15920 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
15922 self.bcs.as_mut().map(|field| field as _)
15923 }
15924 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
15927 self.bcs.get_or_insert_default()
15928 }
15929 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
15931 self.bcs.as_ref().map(|field| field as _)
15932 }
15933 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
15935 self.bcs = Some(field.into().into());
15936 }
15937 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
15939 self.set_bcs(field.into());
15940 self
15941 }
15942 pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
15944 self.set_scheme(field.into());
15945 self
15946 }
15947 pub fn simple(&self) -> &super::SimpleSignature {
15949 if let Some(super::user_signature::Signature::Simple(field)) = &self
15950 .signature
15951 {
15952 field as _
15953 } else {
15954 super::SimpleSignature::default_instance() as _
15955 }
15956 }
15957 pub fn simple_opt(&self) -> Option<&super::SimpleSignature> {
15959 if let Some(super::user_signature::Signature::Simple(field)) = &self
15960 .signature
15961 {
15962 Some(field as _)
15963 } else {
15964 None
15965 }
15966 }
15967 pub fn simple_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
15969 if let Some(super::user_signature::Signature::Simple(field)) = &mut self
15970 .signature
15971 {
15972 Some(field as _)
15973 } else {
15974 None
15975 }
15976 }
15977 pub fn simple_mut(&mut self) -> &mut super::SimpleSignature {
15981 if self.simple_opt_mut().is_none() {
15982 self.signature = Some(
15983 super::user_signature::Signature::Simple(
15984 super::SimpleSignature::default(),
15985 ),
15986 );
15987 }
15988 self.simple_opt_mut().unwrap()
15989 }
15990 pub fn set_simple<T: Into<super::SimpleSignature>>(&mut self, field: T) {
15993 self.signature = Some(
15994 super::user_signature::Signature::Simple(field.into().into()),
15995 );
15996 }
15997 pub fn with_simple<T: Into<super::SimpleSignature>>(mut self, field: T) -> Self {
16000 self.set_simple(field.into());
16001 self
16002 }
16003 pub fn multisig(&self) -> &super::MultisigAggregatedSignature {
16005 if let Some(super::user_signature::Signature::Multisig(field)) = &self
16006 .signature
16007 {
16008 field as _
16009 } else {
16010 super::MultisigAggregatedSignature::default_instance() as _
16011 }
16012 }
16013 pub fn multisig_opt(&self) -> Option<&super::MultisigAggregatedSignature> {
16015 if let Some(super::user_signature::Signature::Multisig(field)) = &self
16016 .signature
16017 {
16018 Some(field as _)
16019 } else {
16020 None
16021 }
16022 }
16023 pub fn multisig_opt_mut(
16025 &mut self,
16026 ) -> Option<&mut super::MultisigAggregatedSignature> {
16027 if let Some(super::user_signature::Signature::Multisig(field)) = &mut self
16028 .signature
16029 {
16030 Some(field as _)
16031 } else {
16032 None
16033 }
16034 }
16035 pub fn multisig_mut(&mut self) -> &mut super::MultisigAggregatedSignature {
16039 if self.multisig_opt_mut().is_none() {
16040 self.signature = Some(
16041 super::user_signature::Signature::Multisig(
16042 super::MultisigAggregatedSignature::default(),
16043 ),
16044 );
16045 }
16046 self.multisig_opt_mut().unwrap()
16047 }
16048 pub fn set_multisig<T: Into<super::MultisigAggregatedSignature>>(
16051 &mut self,
16052 field: T,
16053 ) {
16054 self.signature = Some(
16055 super::user_signature::Signature::Multisig(field.into().into()),
16056 );
16057 }
16058 pub fn with_multisig<T: Into<super::MultisigAggregatedSignature>>(
16061 mut self,
16062 field: T,
16063 ) -> Self {
16064 self.set_multisig(field.into());
16065 self
16066 }
16067 pub fn zklogin(&self) -> &super::ZkLoginAuthenticator {
16069 if let Some(super::user_signature::Signature::Zklogin(field)) = &self
16070 .signature
16071 {
16072 field as _
16073 } else {
16074 super::ZkLoginAuthenticator::default_instance() as _
16075 }
16076 }
16077 pub fn zklogin_opt(&self) -> Option<&super::ZkLoginAuthenticator> {
16079 if let Some(super::user_signature::Signature::Zklogin(field)) = &self
16080 .signature
16081 {
16082 Some(field as _)
16083 } else {
16084 None
16085 }
16086 }
16087 pub fn zklogin_opt_mut(&mut self) -> Option<&mut super::ZkLoginAuthenticator> {
16089 if let Some(super::user_signature::Signature::Zklogin(field)) = &mut self
16090 .signature
16091 {
16092 Some(field as _)
16093 } else {
16094 None
16095 }
16096 }
16097 pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginAuthenticator {
16101 if self.zklogin_opt_mut().is_none() {
16102 self.signature = Some(
16103 super::user_signature::Signature::Zklogin(
16104 super::ZkLoginAuthenticator::default(),
16105 ),
16106 );
16107 }
16108 self.zklogin_opt_mut().unwrap()
16109 }
16110 pub fn set_zklogin<T: Into<super::ZkLoginAuthenticator>>(&mut self, field: T) {
16113 self.signature = Some(
16114 super::user_signature::Signature::Zklogin(field.into().into()),
16115 );
16116 }
16117 pub fn with_zklogin<T: Into<super::ZkLoginAuthenticator>>(
16120 mut self,
16121 field: T,
16122 ) -> Self {
16123 self.set_zklogin(field.into());
16124 self
16125 }
16126 pub fn passkey(&self) -> &super::PasskeyAuthenticator {
16128 if let Some(super::user_signature::Signature::Passkey(field)) = &self
16129 .signature
16130 {
16131 field as _
16132 } else {
16133 super::PasskeyAuthenticator::default_instance() as _
16134 }
16135 }
16136 pub fn passkey_opt(&self) -> Option<&super::PasskeyAuthenticator> {
16138 if let Some(super::user_signature::Signature::Passkey(field)) = &self
16139 .signature
16140 {
16141 Some(field as _)
16142 } else {
16143 None
16144 }
16145 }
16146 pub fn passkey_opt_mut(&mut self) -> Option<&mut super::PasskeyAuthenticator> {
16148 if let Some(super::user_signature::Signature::Passkey(field)) = &mut self
16149 .signature
16150 {
16151 Some(field as _)
16152 } else {
16153 None
16154 }
16155 }
16156 pub fn passkey_mut(&mut self) -> &mut super::PasskeyAuthenticator {
16160 if self.passkey_opt_mut().is_none() {
16161 self.signature = Some(
16162 super::user_signature::Signature::Passkey(
16163 super::PasskeyAuthenticator::default(),
16164 ),
16165 );
16166 }
16167 self.passkey_opt_mut().unwrap()
16168 }
16169 pub fn set_passkey<T: Into<super::PasskeyAuthenticator>>(&mut self, field: T) {
16172 self.signature = Some(
16173 super::user_signature::Signature::Passkey(field.into().into()),
16174 );
16175 }
16176 pub fn with_passkey<T: Into<super::PasskeyAuthenticator>>(
16179 mut self,
16180 field: T,
16181 ) -> Self {
16182 self.set_passkey(field.into());
16183 self
16184 }
16185 }
16186 impl super::Validator {
16187 pub const fn const_default() -> Self {
16188 Self {
16189 name: None,
16190 address: None,
16191 description: None,
16192 image_url: None,
16193 project_url: None,
16194 protocol_public_key: None,
16195 proof_of_possession: None,
16196 network_public_key: None,
16197 worker_public_key: None,
16198 network_address: None,
16199 p2p_address: None,
16200 primary_address: None,
16201 worker_address: None,
16202 next_epoch_protocol_public_key: None,
16203 next_epoch_proof_of_possession: None,
16204 next_epoch_network_public_key: None,
16205 next_epoch_worker_public_key: None,
16206 next_epoch_network_address: None,
16207 next_epoch_p2p_address: None,
16208 next_epoch_primary_address: None,
16209 next_epoch_worker_address: None,
16210 metadata_extra_fields: None,
16211 voting_power: None,
16212 operation_cap_id: None,
16213 gas_price: None,
16214 staking_pool: None,
16215 commission_rate: None,
16216 next_epoch_stake: None,
16217 next_epoch_gas_price: None,
16218 next_epoch_commission_rate: None,
16219 extra_fields: None,
16220 }
16221 }
16222 #[doc(hidden)]
16223 pub fn default_instance() -> &'static Self {
16224 static DEFAULT: super::Validator = super::Validator::const_default();
16225 &DEFAULT
16226 }
16227 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
16229 self.name.as_mut().map(|field| field as _)
16230 }
16231 pub fn name_mut(&mut self) -> &mut String {
16234 self.name.get_or_insert_default()
16235 }
16236 pub fn name_opt(&self) -> Option<&str> {
16238 self.name.as_ref().map(|field| field as _)
16239 }
16240 pub fn set_name<T: Into<String>>(&mut self, field: T) {
16242 self.name = Some(field.into().into());
16243 }
16244 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
16246 self.set_name(field.into());
16247 self
16248 }
16249 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
16251 self.address.as_mut().map(|field| field as _)
16252 }
16253 pub fn address_mut(&mut self) -> &mut String {
16256 self.address.get_or_insert_default()
16257 }
16258 pub fn address_opt(&self) -> Option<&str> {
16260 self.address.as_ref().map(|field| field as _)
16261 }
16262 pub fn set_address<T: Into<String>>(&mut self, field: T) {
16264 self.address = Some(field.into().into());
16265 }
16266 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
16268 self.set_address(field.into());
16269 self
16270 }
16271 pub fn description_opt_mut(&mut self) -> Option<&mut String> {
16273 self.description.as_mut().map(|field| field as _)
16274 }
16275 pub fn description_mut(&mut self) -> &mut String {
16278 self.description.get_or_insert_default()
16279 }
16280 pub fn description_opt(&self) -> Option<&str> {
16282 self.description.as_ref().map(|field| field as _)
16283 }
16284 pub fn set_description<T: Into<String>>(&mut self, field: T) {
16286 self.description = Some(field.into().into());
16287 }
16288 pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
16290 self.set_description(field.into());
16291 self
16292 }
16293 pub fn image_url_opt_mut(&mut self) -> Option<&mut String> {
16295 self.image_url.as_mut().map(|field| field as _)
16296 }
16297 pub fn image_url_mut(&mut self) -> &mut String {
16300 self.image_url.get_or_insert_default()
16301 }
16302 pub fn image_url_opt(&self) -> Option<&str> {
16304 self.image_url.as_ref().map(|field| field as _)
16305 }
16306 pub fn set_image_url<T: Into<String>>(&mut self, field: T) {
16308 self.image_url = Some(field.into().into());
16309 }
16310 pub fn with_image_url<T: Into<String>>(mut self, field: T) -> Self {
16312 self.set_image_url(field.into());
16313 self
16314 }
16315 pub fn project_url_opt_mut(&mut self) -> Option<&mut String> {
16317 self.project_url.as_mut().map(|field| field as _)
16318 }
16319 pub fn project_url_mut(&mut self) -> &mut String {
16322 self.project_url.get_or_insert_default()
16323 }
16324 pub fn project_url_opt(&self) -> Option<&str> {
16326 self.project_url.as_ref().map(|field| field as _)
16327 }
16328 pub fn set_project_url<T: Into<String>>(&mut self, field: T) {
16330 self.project_url = Some(field.into().into());
16331 }
16332 pub fn with_project_url<T: Into<String>>(mut self, field: T) -> Self {
16334 self.set_project_url(field.into());
16335 self
16336 }
16337 pub fn protocol_public_key_opt(&self) -> Option<&[u8]> {
16339 self.protocol_public_key.as_ref().map(|field| field as _)
16340 }
16341 pub fn set_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
16343 &mut self,
16344 field: T,
16345 ) {
16346 self.protocol_public_key = Some(field.into().into());
16347 }
16348 pub fn with_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
16350 mut self,
16351 field: T,
16352 ) -> Self {
16353 self.set_protocol_public_key(field.into());
16354 self
16355 }
16356 pub fn proof_of_possession_opt(&self) -> Option<&[u8]> {
16358 self.proof_of_possession.as_ref().map(|field| field as _)
16359 }
16360 pub fn set_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
16362 &mut self,
16363 field: T,
16364 ) {
16365 self.proof_of_possession = Some(field.into().into());
16366 }
16367 pub fn with_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
16369 mut self,
16370 field: T,
16371 ) -> Self {
16372 self.set_proof_of_possession(field.into());
16373 self
16374 }
16375 pub fn network_public_key_opt(&self) -> Option<&[u8]> {
16377 self.network_public_key.as_ref().map(|field| field as _)
16378 }
16379 pub fn set_network_public_key<T: Into<::prost::bytes::Bytes>>(
16381 &mut self,
16382 field: T,
16383 ) {
16384 self.network_public_key = Some(field.into().into());
16385 }
16386 pub fn with_network_public_key<T: Into<::prost::bytes::Bytes>>(
16388 mut self,
16389 field: T,
16390 ) -> Self {
16391 self.set_network_public_key(field.into());
16392 self
16393 }
16394 pub fn worker_public_key_opt(&self) -> Option<&[u8]> {
16396 self.worker_public_key.as_ref().map(|field| field as _)
16397 }
16398 pub fn set_worker_public_key<T: Into<::prost::bytes::Bytes>>(
16400 &mut self,
16401 field: T,
16402 ) {
16403 self.worker_public_key = Some(field.into().into());
16404 }
16405 pub fn with_worker_public_key<T: Into<::prost::bytes::Bytes>>(
16407 mut self,
16408 field: T,
16409 ) -> Self {
16410 self.set_worker_public_key(field.into());
16411 self
16412 }
16413 pub fn network_address_opt_mut(&mut self) -> Option<&mut String> {
16415 self.network_address.as_mut().map(|field| field as _)
16416 }
16417 pub fn network_address_mut(&mut self) -> &mut String {
16420 self.network_address.get_or_insert_default()
16421 }
16422 pub fn network_address_opt(&self) -> Option<&str> {
16424 self.network_address.as_ref().map(|field| field as _)
16425 }
16426 pub fn set_network_address<T: Into<String>>(&mut self, field: T) {
16428 self.network_address = Some(field.into().into());
16429 }
16430 pub fn with_network_address<T: Into<String>>(mut self, field: T) -> Self {
16432 self.set_network_address(field.into());
16433 self
16434 }
16435 pub fn p2p_address_opt_mut(&mut self) -> Option<&mut String> {
16437 self.p2p_address.as_mut().map(|field| field as _)
16438 }
16439 pub fn p2p_address_mut(&mut self) -> &mut String {
16442 self.p2p_address.get_or_insert_default()
16443 }
16444 pub fn p2p_address_opt(&self) -> Option<&str> {
16446 self.p2p_address.as_ref().map(|field| field as _)
16447 }
16448 pub fn set_p2p_address<T: Into<String>>(&mut self, field: T) {
16450 self.p2p_address = Some(field.into().into());
16451 }
16452 pub fn with_p2p_address<T: Into<String>>(mut self, field: T) -> Self {
16454 self.set_p2p_address(field.into());
16455 self
16456 }
16457 pub fn primary_address_opt_mut(&mut self) -> Option<&mut String> {
16459 self.primary_address.as_mut().map(|field| field as _)
16460 }
16461 pub fn primary_address_mut(&mut self) -> &mut String {
16464 self.primary_address.get_or_insert_default()
16465 }
16466 pub fn primary_address_opt(&self) -> Option<&str> {
16468 self.primary_address.as_ref().map(|field| field as _)
16469 }
16470 pub fn set_primary_address<T: Into<String>>(&mut self, field: T) {
16472 self.primary_address = Some(field.into().into());
16473 }
16474 pub fn with_primary_address<T: Into<String>>(mut self, field: T) -> Self {
16476 self.set_primary_address(field.into());
16477 self
16478 }
16479 pub fn worker_address_opt_mut(&mut self) -> Option<&mut String> {
16481 self.worker_address.as_mut().map(|field| field as _)
16482 }
16483 pub fn worker_address_mut(&mut self) -> &mut String {
16486 self.worker_address.get_or_insert_default()
16487 }
16488 pub fn worker_address_opt(&self) -> Option<&str> {
16490 self.worker_address.as_ref().map(|field| field as _)
16491 }
16492 pub fn set_worker_address<T: Into<String>>(&mut self, field: T) {
16494 self.worker_address = Some(field.into().into());
16495 }
16496 pub fn with_worker_address<T: Into<String>>(mut self, field: T) -> Self {
16498 self.set_worker_address(field.into());
16499 self
16500 }
16501 pub fn next_epoch_protocol_public_key_opt(&self) -> Option<&[u8]> {
16503 self.next_epoch_protocol_public_key.as_ref().map(|field| field as _)
16504 }
16505 pub fn set_next_epoch_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
16507 &mut self,
16508 field: T,
16509 ) {
16510 self.next_epoch_protocol_public_key = Some(field.into().into());
16511 }
16512 pub fn with_next_epoch_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
16514 mut self,
16515 field: T,
16516 ) -> Self {
16517 self.set_next_epoch_protocol_public_key(field.into());
16518 self
16519 }
16520 pub fn next_epoch_proof_of_possession_opt(&self) -> Option<&[u8]> {
16522 self.next_epoch_proof_of_possession.as_ref().map(|field| field as _)
16523 }
16524 pub fn set_next_epoch_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
16526 &mut self,
16527 field: T,
16528 ) {
16529 self.next_epoch_proof_of_possession = Some(field.into().into());
16530 }
16531 pub fn with_next_epoch_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
16533 mut self,
16534 field: T,
16535 ) -> Self {
16536 self.set_next_epoch_proof_of_possession(field.into());
16537 self
16538 }
16539 pub fn next_epoch_network_public_key_opt(&self) -> Option<&[u8]> {
16541 self.next_epoch_network_public_key.as_ref().map(|field| field as _)
16542 }
16543 pub fn set_next_epoch_network_public_key<T: Into<::prost::bytes::Bytes>>(
16545 &mut self,
16546 field: T,
16547 ) {
16548 self.next_epoch_network_public_key = Some(field.into().into());
16549 }
16550 pub fn with_next_epoch_network_public_key<T: Into<::prost::bytes::Bytes>>(
16552 mut self,
16553 field: T,
16554 ) -> Self {
16555 self.set_next_epoch_network_public_key(field.into());
16556 self
16557 }
16558 pub fn next_epoch_worker_public_key_opt(&self) -> Option<&[u8]> {
16560 self.next_epoch_worker_public_key.as_ref().map(|field| field as _)
16561 }
16562 pub fn set_next_epoch_worker_public_key<T: Into<::prost::bytes::Bytes>>(
16564 &mut self,
16565 field: T,
16566 ) {
16567 self.next_epoch_worker_public_key = Some(field.into().into());
16568 }
16569 pub fn with_next_epoch_worker_public_key<T: Into<::prost::bytes::Bytes>>(
16571 mut self,
16572 field: T,
16573 ) -> Self {
16574 self.set_next_epoch_worker_public_key(field.into());
16575 self
16576 }
16577 pub fn next_epoch_network_address_opt_mut(&mut self) -> Option<&mut String> {
16579 self.next_epoch_network_address.as_mut().map(|field| field as _)
16580 }
16581 pub fn next_epoch_network_address_mut(&mut self) -> &mut String {
16584 self.next_epoch_network_address.get_or_insert_default()
16585 }
16586 pub fn next_epoch_network_address_opt(&self) -> Option<&str> {
16588 self.next_epoch_network_address.as_ref().map(|field| field as _)
16589 }
16590 pub fn set_next_epoch_network_address<T: Into<String>>(&mut self, field: T) {
16592 self.next_epoch_network_address = Some(field.into().into());
16593 }
16594 pub fn with_next_epoch_network_address<T: Into<String>>(
16596 mut self,
16597 field: T,
16598 ) -> Self {
16599 self.set_next_epoch_network_address(field.into());
16600 self
16601 }
16602 pub fn next_epoch_p2p_address_opt_mut(&mut self) -> Option<&mut String> {
16604 self.next_epoch_p2p_address.as_mut().map(|field| field as _)
16605 }
16606 pub fn next_epoch_p2p_address_mut(&mut self) -> &mut String {
16609 self.next_epoch_p2p_address.get_or_insert_default()
16610 }
16611 pub fn next_epoch_p2p_address_opt(&self) -> Option<&str> {
16613 self.next_epoch_p2p_address.as_ref().map(|field| field as _)
16614 }
16615 pub fn set_next_epoch_p2p_address<T: Into<String>>(&mut self, field: T) {
16617 self.next_epoch_p2p_address = Some(field.into().into());
16618 }
16619 pub fn with_next_epoch_p2p_address<T: Into<String>>(mut self, field: T) -> Self {
16621 self.set_next_epoch_p2p_address(field.into());
16622 self
16623 }
16624 pub fn next_epoch_primary_address_opt_mut(&mut self) -> Option<&mut String> {
16626 self.next_epoch_primary_address.as_mut().map(|field| field as _)
16627 }
16628 pub fn next_epoch_primary_address_mut(&mut self) -> &mut String {
16631 self.next_epoch_primary_address.get_or_insert_default()
16632 }
16633 pub fn next_epoch_primary_address_opt(&self) -> Option<&str> {
16635 self.next_epoch_primary_address.as_ref().map(|field| field as _)
16636 }
16637 pub fn set_next_epoch_primary_address<T: Into<String>>(&mut self, field: T) {
16639 self.next_epoch_primary_address = Some(field.into().into());
16640 }
16641 pub fn with_next_epoch_primary_address<T: Into<String>>(
16643 mut self,
16644 field: T,
16645 ) -> Self {
16646 self.set_next_epoch_primary_address(field.into());
16647 self
16648 }
16649 pub fn next_epoch_worker_address_opt_mut(&mut self) -> Option<&mut String> {
16651 self.next_epoch_worker_address.as_mut().map(|field| field as _)
16652 }
16653 pub fn next_epoch_worker_address_mut(&mut self) -> &mut String {
16656 self.next_epoch_worker_address.get_or_insert_default()
16657 }
16658 pub fn next_epoch_worker_address_opt(&self) -> Option<&str> {
16660 self.next_epoch_worker_address.as_ref().map(|field| field as _)
16661 }
16662 pub fn set_next_epoch_worker_address<T: Into<String>>(&mut self, field: T) {
16664 self.next_epoch_worker_address = Some(field.into().into());
16665 }
16666 pub fn with_next_epoch_worker_address<T: Into<String>>(
16668 mut self,
16669 field: T,
16670 ) -> Self {
16671 self.set_next_epoch_worker_address(field.into());
16672 self
16673 }
16674 pub fn metadata_extra_fields(&self) -> &super::MoveTable {
16676 self.metadata_extra_fields
16677 .as_ref()
16678 .map(|field| field as _)
16679 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16680 }
16681 pub fn metadata_extra_fields_opt_mut(
16683 &mut self,
16684 ) -> Option<&mut super::MoveTable> {
16685 self.metadata_extra_fields.as_mut().map(|field| field as _)
16686 }
16687 pub fn metadata_extra_fields_mut(&mut self) -> &mut super::MoveTable {
16690 self.metadata_extra_fields.get_or_insert_default()
16691 }
16692 pub fn metadata_extra_fields_opt(&self) -> Option<&super::MoveTable> {
16694 self.metadata_extra_fields.as_ref().map(|field| field as _)
16695 }
16696 pub fn set_metadata_extra_fields<T: Into<super::MoveTable>>(
16698 &mut self,
16699 field: T,
16700 ) {
16701 self.metadata_extra_fields = Some(field.into().into());
16702 }
16703 pub fn with_metadata_extra_fields<T: Into<super::MoveTable>>(
16705 mut self,
16706 field: T,
16707 ) -> Self {
16708 self.set_metadata_extra_fields(field.into());
16709 self
16710 }
16711 pub fn voting_power_opt_mut(&mut self) -> Option<&mut u64> {
16713 self.voting_power.as_mut().map(|field| field as _)
16714 }
16715 pub fn voting_power_mut(&mut self) -> &mut u64 {
16718 self.voting_power.get_or_insert_default()
16719 }
16720 pub fn voting_power_opt(&self) -> Option<u64> {
16722 self.voting_power.as_ref().map(|field| *field)
16723 }
16724 pub fn set_voting_power(&mut self, field: u64) {
16726 self.voting_power = Some(field);
16727 }
16728 pub fn with_voting_power(mut self, field: u64) -> Self {
16730 self.set_voting_power(field);
16731 self
16732 }
16733 pub fn operation_cap_id_opt_mut(&mut self) -> Option<&mut String> {
16735 self.operation_cap_id.as_mut().map(|field| field as _)
16736 }
16737 pub fn operation_cap_id_mut(&mut self) -> &mut String {
16740 self.operation_cap_id.get_or_insert_default()
16741 }
16742 pub fn operation_cap_id_opt(&self) -> Option<&str> {
16744 self.operation_cap_id.as_ref().map(|field| field as _)
16745 }
16746 pub fn set_operation_cap_id<T: Into<String>>(&mut self, field: T) {
16748 self.operation_cap_id = Some(field.into().into());
16749 }
16750 pub fn with_operation_cap_id<T: Into<String>>(mut self, field: T) -> Self {
16752 self.set_operation_cap_id(field.into());
16753 self
16754 }
16755 pub fn gas_price_opt_mut(&mut self) -> Option<&mut u64> {
16757 self.gas_price.as_mut().map(|field| field as _)
16758 }
16759 pub fn gas_price_mut(&mut self) -> &mut u64 {
16762 self.gas_price.get_or_insert_default()
16763 }
16764 pub fn gas_price_opt(&self) -> Option<u64> {
16766 self.gas_price.as_ref().map(|field| *field)
16767 }
16768 pub fn set_gas_price(&mut self, field: u64) {
16770 self.gas_price = Some(field);
16771 }
16772 pub fn with_gas_price(mut self, field: u64) -> Self {
16774 self.set_gas_price(field);
16775 self
16776 }
16777 pub fn staking_pool(&self) -> &super::StakingPool {
16779 self.staking_pool
16780 .as_ref()
16781 .map(|field| field as _)
16782 .unwrap_or_else(|| super::StakingPool::default_instance() as _)
16783 }
16784 pub fn staking_pool_opt_mut(&mut self) -> Option<&mut super::StakingPool> {
16786 self.staking_pool.as_mut().map(|field| field as _)
16787 }
16788 pub fn staking_pool_mut(&mut self) -> &mut super::StakingPool {
16791 self.staking_pool.get_or_insert_default()
16792 }
16793 pub fn staking_pool_opt(&self) -> Option<&super::StakingPool> {
16795 self.staking_pool.as_ref().map(|field| field as _)
16796 }
16797 pub fn set_staking_pool<T: Into<super::StakingPool>>(&mut self, field: T) {
16799 self.staking_pool = Some(field.into().into());
16800 }
16801 pub fn with_staking_pool<T: Into<super::StakingPool>>(
16803 mut self,
16804 field: T,
16805 ) -> Self {
16806 self.set_staking_pool(field.into());
16807 self
16808 }
16809 pub fn commission_rate_opt_mut(&mut self) -> Option<&mut u64> {
16811 self.commission_rate.as_mut().map(|field| field as _)
16812 }
16813 pub fn commission_rate_mut(&mut self) -> &mut u64 {
16816 self.commission_rate.get_or_insert_default()
16817 }
16818 pub fn commission_rate_opt(&self) -> Option<u64> {
16820 self.commission_rate.as_ref().map(|field| *field)
16821 }
16822 pub fn set_commission_rate(&mut self, field: u64) {
16824 self.commission_rate = Some(field);
16825 }
16826 pub fn with_commission_rate(mut self, field: u64) -> Self {
16828 self.set_commission_rate(field);
16829 self
16830 }
16831 pub fn next_epoch_stake_opt_mut(&mut self) -> Option<&mut u64> {
16833 self.next_epoch_stake.as_mut().map(|field| field as _)
16834 }
16835 pub fn next_epoch_stake_mut(&mut self) -> &mut u64 {
16838 self.next_epoch_stake.get_or_insert_default()
16839 }
16840 pub fn next_epoch_stake_opt(&self) -> Option<u64> {
16842 self.next_epoch_stake.as_ref().map(|field| *field)
16843 }
16844 pub fn set_next_epoch_stake(&mut self, field: u64) {
16846 self.next_epoch_stake = Some(field);
16847 }
16848 pub fn with_next_epoch_stake(mut self, field: u64) -> Self {
16850 self.set_next_epoch_stake(field);
16851 self
16852 }
16853 pub fn next_epoch_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
16855 self.next_epoch_gas_price.as_mut().map(|field| field as _)
16856 }
16857 pub fn next_epoch_gas_price_mut(&mut self) -> &mut u64 {
16860 self.next_epoch_gas_price.get_or_insert_default()
16861 }
16862 pub fn next_epoch_gas_price_opt(&self) -> Option<u64> {
16864 self.next_epoch_gas_price.as_ref().map(|field| *field)
16865 }
16866 pub fn set_next_epoch_gas_price(&mut self, field: u64) {
16868 self.next_epoch_gas_price = Some(field);
16869 }
16870 pub fn with_next_epoch_gas_price(mut self, field: u64) -> Self {
16872 self.set_next_epoch_gas_price(field);
16873 self
16874 }
16875 pub fn next_epoch_commission_rate_opt_mut(&mut self) -> Option<&mut u64> {
16877 self.next_epoch_commission_rate.as_mut().map(|field| field as _)
16878 }
16879 pub fn next_epoch_commission_rate_mut(&mut self) -> &mut u64 {
16882 self.next_epoch_commission_rate.get_or_insert_default()
16883 }
16884 pub fn next_epoch_commission_rate_opt(&self) -> Option<u64> {
16886 self.next_epoch_commission_rate.as_ref().map(|field| *field)
16887 }
16888 pub fn set_next_epoch_commission_rate(&mut self, field: u64) {
16890 self.next_epoch_commission_rate = Some(field);
16891 }
16892 pub fn with_next_epoch_commission_rate(mut self, field: u64) -> Self {
16894 self.set_next_epoch_commission_rate(field);
16895 self
16896 }
16897 pub fn extra_fields(&self) -> &super::MoveTable {
16899 self.extra_fields
16900 .as_ref()
16901 .map(|field| field as _)
16902 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16903 }
16904 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
16906 self.extra_fields.as_mut().map(|field| field as _)
16907 }
16908 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
16911 self.extra_fields.get_or_insert_default()
16912 }
16913 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
16915 self.extra_fields.as_ref().map(|field| field as _)
16916 }
16917 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
16919 self.extra_fields = Some(field.into().into());
16920 }
16921 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
16923 self.set_extra_fields(field.into());
16924 self
16925 }
16926 }
16927 impl super::ValidatorAggregatedSignature {
16928 pub const fn const_default() -> Self {
16929 Self {
16930 epoch: None,
16931 signature: None,
16932 bitmap: None,
16933 }
16934 }
16935 #[doc(hidden)]
16936 pub fn default_instance() -> &'static Self {
16937 static DEFAULT: super::ValidatorAggregatedSignature = super::ValidatorAggregatedSignature::const_default();
16938 &DEFAULT
16939 }
16940 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
16942 self.epoch.as_mut().map(|field| field as _)
16943 }
16944 pub fn epoch_mut(&mut self) -> &mut u64 {
16947 self.epoch.get_or_insert_default()
16948 }
16949 pub fn epoch_opt(&self) -> Option<u64> {
16951 self.epoch.as_ref().map(|field| *field)
16952 }
16953 pub fn set_epoch(&mut self, field: u64) {
16955 self.epoch = Some(field);
16956 }
16957 pub fn with_epoch(mut self, field: u64) -> Self {
16959 self.set_epoch(field);
16960 self
16961 }
16962 pub fn signature_opt(&self) -> Option<&[u8]> {
16964 self.signature.as_ref().map(|field| field as _)
16965 }
16966 pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16968 self.signature = Some(field.into().into());
16969 }
16970 pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
16972 mut self,
16973 field: T,
16974 ) -> Self {
16975 self.set_signature(field.into());
16976 self
16977 }
16978 pub fn bitmap_opt(&self) -> Option<&[u8]> {
16980 self.bitmap.as_ref().map(|field| field as _)
16981 }
16982 pub fn set_bitmap<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16984 self.bitmap = Some(field.into().into());
16985 }
16986 pub fn with_bitmap<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
16988 self.set_bitmap(field.into());
16989 self
16990 }
16991 }
16992 impl super::ValidatorCommittee {
16993 pub const fn const_default() -> Self {
16994 Self {
16995 epoch: None,
16996 members: Vec::new(),
16997 }
16998 }
16999 #[doc(hidden)]
17000 pub fn default_instance() -> &'static Self {
17001 static DEFAULT: super::ValidatorCommittee = super::ValidatorCommittee::const_default();
17002 &DEFAULT
17003 }
17004 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
17006 self.epoch.as_mut().map(|field| field as _)
17007 }
17008 pub fn epoch_mut(&mut self) -> &mut u64 {
17011 self.epoch.get_or_insert_default()
17012 }
17013 pub fn epoch_opt(&self) -> Option<u64> {
17015 self.epoch.as_ref().map(|field| *field)
17016 }
17017 pub fn set_epoch(&mut self, field: u64) {
17019 self.epoch = Some(field);
17020 }
17021 pub fn with_epoch(mut self, field: u64) -> Self {
17023 self.set_epoch(field);
17024 self
17025 }
17026 pub fn members(&self) -> &[super::ValidatorCommitteeMember] {
17028 &self.members
17029 }
17030 pub fn members_mut(&mut self) -> &mut Vec<super::ValidatorCommitteeMember> {
17033 &mut self.members
17034 }
17035 pub fn set_members(&mut self, field: Vec<super::ValidatorCommitteeMember>) {
17037 self.members = field;
17038 }
17039 pub fn with_members(
17041 mut self,
17042 field: Vec<super::ValidatorCommitteeMember>,
17043 ) -> Self {
17044 self.set_members(field);
17045 self
17046 }
17047 }
17048 impl super::ValidatorCommitteeMember {
17049 pub const fn const_default() -> Self {
17050 Self {
17051 public_key: None,
17052 weight: None,
17053 }
17054 }
17055 #[doc(hidden)]
17056 pub fn default_instance() -> &'static Self {
17057 static DEFAULT: super::ValidatorCommitteeMember = super::ValidatorCommitteeMember::const_default();
17058 &DEFAULT
17059 }
17060 pub fn public_key_opt(&self) -> Option<&[u8]> {
17062 self.public_key.as_ref().map(|field| field as _)
17063 }
17064 pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
17066 self.public_key = Some(field.into().into());
17067 }
17068 pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
17070 mut self,
17071 field: T,
17072 ) -> Self {
17073 self.set_public_key(field.into());
17074 self
17075 }
17076 pub fn weight_opt_mut(&mut self) -> Option<&mut u64> {
17078 self.weight.as_mut().map(|field| field as _)
17079 }
17080 pub fn weight_mut(&mut self) -> &mut u64 {
17083 self.weight.get_or_insert_default()
17084 }
17085 pub fn weight_opt(&self) -> Option<u64> {
17087 self.weight.as_ref().map(|field| *field)
17088 }
17089 pub fn set_weight(&mut self, field: u64) {
17091 self.weight = Some(field);
17092 }
17093 pub fn with_weight(mut self, field: u64) -> Self {
17095 self.set_weight(field);
17096 self
17097 }
17098 }
17099 impl super::ValidatorExecutionTimeObservation {
17100 pub const fn const_default() -> Self {
17101 Self {
17102 validator: None,
17103 duration: None,
17104 }
17105 }
17106 #[doc(hidden)]
17107 pub fn default_instance() -> &'static Self {
17108 static DEFAULT: super::ValidatorExecutionTimeObservation = super::ValidatorExecutionTimeObservation::const_default();
17109 &DEFAULT
17110 }
17111 pub fn validator_opt(&self) -> Option<&[u8]> {
17113 self.validator.as_ref().map(|field| field as _)
17114 }
17115 pub fn set_validator<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
17117 self.validator = Some(field.into().into());
17118 }
17119 pub fn with_validator<T: Into<::prost::bytes::Bytes>>(
17121 mut self,
17122 field: T,
17123 ) -> Self {
17124 self.set_validator(field.into());
17125 self
17126 }
17127 pub fn duration_opt_mut(&mut self) -> Option<&mut ::prost_types::Duration> {
17129 self.duration.as_mut().map(|field| field as _)
17130 }
17131 pub fn duration_mut(&mut self) -> &mut ::prost_types::Duration {
17134 self.duration.get_or_insert_default()
17135 }
17136 pub fn duration_opt(&self) -> Option<&::prost_types::Duration> {
17138 self.duration.as_ref().map(|field| field as _)
17139 }
17140 pub fn set_duration<T: Into<::prost_types::Duration>>(&mut self, field: T) {
17142 self.duration = Some(field.into().into());
17143 }
17144 pub fn with_duration<T: Into<::prost_types::Duration>>(
17146 mut self,
17147 field: T,
17148 ) -> Self {
17149 self.set_duration(field.into());
17150 self
17151 }
17152 }
17153 impl super::ValidatorReportRecord {
17154 pub const fn const_default() -> Self {
17155 Self {
17156 reported: None,
17157 reporters: Vec::new(),
17158 }
17159 }
17160 #[doc(hidden)]
17161 pub fn default_instance() -> &'static Self {
17162 static DEFAULT: super::ValidatorReportRecord = super::ValidatorReportRecord::const_default();
17163 &DEFAULT
17164 }
17165 pub fn reported_opt_mut(&mut self) -> Option<&mut String> {
17167 self.reported.as_mut().map(|field| field as _)
17168 }
17169 pub fn reported_mut(&mut self) -> &mut String {
17172 self.reported.get_or_insert_default()
17173 }
17174 pub fn reported_opt(&self) -> Option<&str> {
17176 self.reported.as_ref().map(|field| field as _)
17177 }
17178 pub fn set_reported<T: Into<String>>(&mut self, field: T) {
17180 self.reported = Some(field.into().into());
17181 }
17182 pub fn with_reported<T: Into<String>>(mut self, field: T) -> Self {
17184 self.set_reported(field.into());
17185 self
17186 }
17187 pub fn reporters(&self) -> &[String] {
17189 &self.reporters
17190 }
17191 pub fn reporters_mut(&mut self) -> &mut Vec<String> {
17194 &mut self.reporters
17195 }
17196 pub fn set_reporters(&mut self, field: Vec<String>) {
17198 self.reporters = field;
17199 }
17200 pub fn with_reporters(mut self, field: Vec<String>) -> Self {
17202 self.set_reporters(field);
17203 self
17204 }
17205 }
17206 impl super::ValidatorSet {
17207 pub const fn const_default() -> Self {
17208 Self {
17209 total_stake: None,
17210 active_validators: Vec::new(),
17211 pending_active_validators: None,
17212 pending_removals: Vec::new(),
17213 staking_pool_mappings: None,
17214 inactive_validators: None,
17215 validator_candidates: None,
17216 at_risk_validators: std::collections::BTreeMap::new(),
17217 extra_fields: None,
17218 }
17219 }
17220 #[doc(hidden)]
17221 pub fn default_instance() -> &'static Self {
17222 static DEFAULT: super::ValidatorSet = super::ValidatorSet::const_default();
17223 &DEFAULT
17224 }
17225 pub fn total_stake_opt_mut(&mut self) -> Option<&mut u64> {
17227 self.total_stake.as_mut().map(|field| field as _)
17228 }
17229 pub fn total_stake_mut(&mut self) -> &mut u64 {
17232 self.total_stake.get_or_insert_default()
17233 }
17234 pub fn total_stake_opt(&self) -> Option<u64> {
17236 self.total_stake.as_ref().map(|field| *field)
17237 }
17238 pub fn set_total_stake(&mut self, field: u64) {
17240 self.total_stake = Some(field);
17241 }
17242 pub fn with_total_stake(mut self, field: u64) -> Self {
17244 self.set_total_stake(field);
17245 self
17246 }
17247 pub fn active_validators(&self) -> &[super::Validator] {
17249 &self.active_validators
17250 }
17251 pub fn active_validators_mut(&mut self) -> &mut Vec<super::Validator> {
17254 &mut self.active_validators
17255 }
17256 pub fn set_active_validators(&mut self, field: Vec<super::Validator>) {
17258 self.active_validators = field;
17259 }
17260 pub fn with_active_validators(mut self, field: Vec<super::Validator>) -> Self {
17262 self.set_active_validators(field);
17263 self
17264 }
17265 pub fn pending_active_validators(&self) -> &super::MoveTable {
17267 self.pending_active_validators
17268 .as_ref()
17269 .map(|field| field as _)
17270 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17271 }
17272 pub fn pending_active_validators_opt_mut(
17274 &mut self,
17275 ) -> Option<&mut super::MoveTable> {
17276 self.pending_active_validators.as_mut().map(|field| field as _)
17277 }
17278 pub fn pending_active_validators_mut(&mut self) -> &mut super::MoveTable {
17281 self.pending_active_validators.get_or_insert_default()
17282 }
17283 pub fn pending_active_validators_opt(&self) -> Option<&super::MoveTable> {
17285 self.pending_active_validators.as_ref().map(|field| field as _)
17286 }
17287 pub fn set_pending_active_validators<T: Into<super::MoveTable>>(
17289 &mut self,
17290 field: T,
17291 ) {
17292 self.pending_active_validators = Some(field.into().into());
17293 }
17294 pub fn with_pending_active_validators<T: Into<super::MoveTable>>(
17296 mut self,
17297 field: T,
17298 ) -> Self {
17299 self.set_pending_active_validators(field.into());
17300 self
17301 }
17302 pub fn pending_removals(&self) -> &[u64] {
17304 &self.pending_removals
17305 }
17306 pub fn pending_removals_mut(&mut self) -> &mut Vec<u64> {
17309 &mut self.pending_removals
17310 }
17311 pub fn set_pending_removals(&mut self, field: Vec<u64>) {
17313 self.pending_removals = field;
17314 }
17315 pub fn with_pending_removals(mut self, field: Vec<u64>) -> Self {
17317 self.set_pending_removals(field);
17318 self
17319 }
17320 pub fn staking_pool_mappings(&self) -> &super::MoveTable {
17322 self.staking_pool_mappings
17323 .as_ref()
17324 .map(|field| field as _)
17325 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17326 }
17327 pub fn staking_pool_mappings_opt_mut(
17329 &mut self,
17330 ) -> Option<&mut super::MoveTable> {
17331 self.staking_pool_mappings.as_mut().map(|field| field as _)
17332 }
17333 pub fn staking_pool_mappings_mut(&mut self) -> &mut super::MoveTable {
17336 self.staking_pool_mappings.get_or_insert_default()
17337 }
17338 pub fn staking_pool_mappings_opt(&self) -> Option<&super::MoveTable> {
17340 self.staking_pool_mappings.as_ref().map(|field| field as _)
17341 }
17342 pub fn set_staking_pool_mappings<T: Into<super::MoveTable>>(
17344 &mut self,
17345 field: T,
17346 ) {
17347 self.staking_pool_mappings = Some(field.into().into());
17348 }
17349 pub fn with_staking_pool_mappings<T: Into<super::MoveTable>>(
17351 mut self,
17352 field: T,
17353 ) -> Self {
17354 self.set_staking_pool_mappings(field.into());
17355 self
17356 }
17357 pub fn inactive_validators(&self) -> &super::MoveTable {
17359 self.inactive_validators
17360 .as_ref()
17361 .map(|field| field as _)
17362 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17363 }
17364 pub fn inactive_validators_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
17366 self.inactive_validators.as_mut().map(|field| field as _)
17367 }
17368 pub fn inactive_validators_mut(&mut self) -> &mut super::MoveTable {
17371 self.inactive_validators.get_or_insert_default()
17372 }
17373 pub fn inactive_validators_opt(&self) -> Option<&super::MoveTable> {
17375 self.inactive_validators.as_ref().map(|field| field as _)
17376 }
17377 pub fn set_inactive_validators<T: Into<super::MoveTable>>(&mut self, field: T) {
17379 self.inactive_validators = Some(field.into().into());
17380 }
17381 pub fn with_inactive_validators<T: Into<super::MoveTable>>(
17383 mut self,
17384 field: T,
17385 ) -> Self {
17386 self.set_inactive_validators(field.into());
17387 self
17388 }
17389 pub fn validator_candidates(&self) -> &super::MoveTable {
17391 self.validator_candidates
17392 .as_ref()
17393 .map(|field| field as _)
17394 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17395 }
17396 pub fn validator_candidates_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
17398 self.validator_candidates.as_mut().map(|field| field as _)
17399 }
17400 pub fn validator_candidates_mut(&mut self) -> &mut super::MoveTable {
17403 self.validator_candidates.get_or_insert_default()
17404 }
17405 pub fn validator_candidates_opt(&self) -> Option<&super::MoveTable> {
17407 self.validator_candidates.as_ref().map(|field| field as _)
17408 }
17409 pub fn set_validator_candidates<T: Into<super::MoveTable>>(&mut self, field: T) {
17411 self.validator_candidates = Some(field.into().into());
17412 }
17413 pub fn with_validator_candidates<T: Into<super::MoveTable>>(
17415 mut self,
17416 field: T,
17417 ) -> Self {
17418 self.set_validator_candidates(field.into());
17419 self
17420 }
17421 pub fn at_risk_validators(&self) -> &::std::collections::BTreeMap<String, u64> {
17423 &self.at_risk_validators
17424 }
17425 pub fn at_risk_validators_mut(
17428 &mut self,
17429 ) -> &mut ::std::collections::BTreeMap<String, u64> {
17430 &mut self.at_risk_validators
17431 }
17432 pub fn set_at_risk_validators(
17434 &mut self,
17435 field: ::std::collections::BTreeMap<String, u64>,
17436 ) {
17437 self.at_risk_validators = field;
17438 }
17439 pub fn with_at_risk_validators(
17441 mut self,
17442 field: ::std::collections::BTreeMap<String, u64>,
17443 ) -> Self {
17444 self.set_at_risk_validators(field);
17445 self
17446 }
17447 pub fn extra_fields(&self) -> &super::MoveTable {
17449 self.extra_fields
17450 .as_ref()
17451 .map(|field| field as _)
17452 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17453 }
17454 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
17456 self.extra_fields.as_mut().map(|field| field as _)
17457 }
17458 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
17461 self.extra_fields.get_or_insert_default()
17462 }
17463 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
17465 self.extra_fields.as_ref().map(|field| field as _)
17466 }
17467 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
17469 self.extra_fields = Some(field.into().into());
17470 }
17471 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
17473 self.set_extra_fields(field.into());
17474 self
17475 }
17476 }
17477 impl super::VariantDescriptor {
17478 pub const fn const_default() -> Self {
17479 Self {
17480 name: None,
17481 position: None,
17482 fields: Vec::new(),
17483 }
17484 }
17485 #[doc(hidden)]
17486 pub fn default_instance() -> &'static Self {
17487 static DEFAULT: super::VariantDescriptor = super::VariantDescriptor::const_default();
17488 &DEFAULT
17489 }
17490 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
17492 self.name.as_mut().map(|field| field as _)
17493 }
17494 pub fn name_mut(&mut self) -> &mut String {
17497 self.name.get_or_insert_default()
17498 }
17499 pub fn name_opt(&self) -> Option<&str> {
17501 self.name.as_ref().map(|field| field as _)
17502 }
17503 pub fn set_name<T: Into<String>>(&mut self, field: T) {
17505 self.name = Some(field.into().into());
17506 }
17507 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
17509 self.set_name(field.into());
17510 self
17511 }
17512 pub fn position_opt_mut(&mut self) -> Option<&mut u32> {
17514 self.position.as_mut().map(|field| field as _)
17515 }
17516 pub fn position_mut(&mut self) -> &mut u32 {
17519 self.position.get_or_insert_default()
17520 }
17521 pub fn position_opt(&self) -> Option<u32> {
17523 self.position.as_ref().map(|field| *field)
17524 }
17525 pub fn set_position(&mut self, field: u32) {
17527 self.position = Some(field);
17528 }
17529 pub fn with_position(mut self, field: u32) -> Self {
17531 self.set_position(field);
17532 self
17533 }
17534 pub fn fields(&self) -> &[super::FieldDescriptor] {
17536 &self.fields
17537 }
17538 pub fn fields_mut(&mut self) -> &mut Vec<super::FieldDescriptor> {
17541 &mut self.fields
17542 }
17543 pub fn set_fields(&mut self, field: Vec<super::FieldDescriptor>) {
17545 self.fields = field;
17546 }
17547 pub fn with_fields(mut self, field: Vec<super::FieldDescriptor>) -> Self {
17549 self.set_fields(field);
17550 self
17551 }
17552 }
17553 impl super::VerifySignatureRequest {
17554 pub const fn const_default() -> Self {
17555 Self {
17556 message: None,
17557 signature: None,
17558 address: None,
17559 jwks: Vec::new(),
17560 }
17561 }
17562 #[doc(hidden)]
17563 pub fn default_instance() -> &'static Self {
17564 static DEFAULT: super::VerifySignatureRequest = super::VerifySignatureRequest::const_default();
17565 &DEFAULT
17566 }
17567 pub fn message(&self) -> &super::Bcs {
17569 self.message
17570 .as_ref()
17571 .map(|field| field as _)
17572 .unwrap_or_else(|| super::Bcs::default_instance() as _)
17573 }
17574 pub fn message_opt_mut(&mut self) -> Option<&mut super::Bcs> {
17576 self.message.as_mut().map(|field| field as _)
17577 }
17578 pub fn message_mut(&mut self) -> &mut super::Bcs {
17581 self.message.get_or_insert_default()
17582 }
17583 pub fn message_opt(&self) -> Option<&super::Bcs> {
17585 self.message.as_ref().map(|field| field as _)
17586 }
17587 pub fn set_message<T: Into<super::Bcs>>(&mut self, field: T) {
17589 self.message = Some(field.into().into());
17590 }
17591 pub fn with_message<T: Into<super::Bcs>>(mut self, field: T) -> Self {
17593 self.set_message(field.into());
17594 self
17595 }
17596 pub fn signature(&self) -> &super::UserSignature {
17598 self.signature
17599 .as_ref()
17600 .map(|field| field as _)
17601 .unwrap_or_else(|| super::UserSignature::default_instance() as _)
17602 }
17603 pub fn signature_opt_mut(&mut self) -> Option<&mut super::UserSignature> {
17605 self.signature.as_mut().map(|field| field as _)
17606 }
17607 pub fn signature_mut(&mut self) -> &mut super::UserSignature {
17610 self.signature.get_or_insert_default()
17611 }
17612 pub fn signature_opt(&self) -> Option<&super::UserSignature> {
17614 self.signature.as_ref().map(|field| field as _)
17615 }
17616 pub fn set_signature<T: Into<super::UserSignature>>(&mut self, field: T) {
17618 self.signature = Some(field.into().into());
17619 }
17620 pub fn with_signature<T: Into<super::UserSignature>>(
17622 mut self,
17623 field: T,
17624 ) -> Self {
17625 self.set_signature(field.into());
17626 self
17627 }
17628 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
17630 self.address.as_mut().map(|field| field as _)
17631 }
17632 pub fn address_mut(&mut self) -> &mut String {
17635 self.address.get_or_insert_default()
17636 }
17637 pub fn address_opt(&self) -> Option<&str> {
17639 self.address.as_ref().map(|field| field as _)
17640 }
17641 pub fn set_address<T: Into<String>>(&mut self, field: T) {
17643 self.address = Some(field.into().into());
17644 }
17645 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
17647 self.set_address(field.into());
17648 self
17649 }
17650 pub fn jwks(&self) -> &[super::ActiveJwk] {
17652 &self.jwks
17653 }
17654 pub fn jwks_mut(&mut self) -> &mut Vec<super::ActiveJwk> {
17657 &mut self.jwks
17658 }
17659 pub fn set_jwks(&mut self, field: Vec<super::ActiveJwk>) {
17661 self.jwks = field;
17662 }
17663 pub fn with_jwks(mut self, field: Vec<super::ActiveJwk>) -> Self {
17665 self.set_jwks(field);
17666 self
17667 }
17668 }
17669 impl super::VerifySignatureResponse {
17670 pub const fn const_default() -> Self {
17671 Self {
17672 is_valid: None,
17673 reason: None,
17674 }
17675 }
17676 #[doc(hidden)]
17677 pub fn default_instance() -> &'static Self {
17678 static DEFAULT: super::VerifySignatureResponse = super::VerifySignatureResponse::const_default();
17679 &DEFAULT
17680 }
17681 pub fn is_valid_opt_mut(&mut self) -> Option<&mut bool> {
17683 self.is_valid.as_mut().map(|field| field as _)
17684 }
17685 pub fn is_valid_mut(&mut self) -> &mut bool {
17688 self.is_valid.get_or_insert_default()
17689 }
17690 pub fn is_valid_opt(&self) -> Option<bool> {
17692 self.is_valid.as_ref().map(|field| *field)
17693 }
17694 pub fn set_is_valid(&mut self, field: bool) {
17696 self.is_valid = Some(field);
17697 }
17698 pub fn with_is_valid(mut self, field: bool) -> Self {
17700 self.set_is_valid(field);
17701 self
17702 }
17703 pub fn reason_opt_mut(&mut self) -> Option<&mut String> {
17705 self.reason.as_mut().map(|field| field as _)
17706 }
17707 pub fn reason_mut(&mut self) -> &mut String {
17710 self.reason.get_or_insert_default()
17711 }
17712 pub fn reason_opt(&self) -> Option<&str> {
17714 self.reason.as_ref().map(|field| field as _)
17715 }
17716 pub fn set_reason<T: Into<String>>(&mut self, field: T) {
17718 self.reason = Some(field.into().into());
17719 }
17720 pub fn with_reason<T: Into<String>>(mut self, field: T) -> Self {
17722 self.set_reason(field.into());
17723 self
17724 }
17725 }
17726 impl super::VersionAssignment {
17727 pub const fn const_default() -> Self {
17728 Self {
17729 object_id: None,
17730 start_version: None,
17731 version: None,
17732 }
17733 }
17734 #[doc(hidden)]
17735 pub fn default_instance() -> &'static Self {
17736 static DEFAULT: super::VersionAssignment = super::VersionAssignment::const_default();
17737 &DEFAULT
17738 }
17739 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
17741 self.object_id.as_mut().map(|field| field as _)
17742 }
17743 pub fn object_id_mut(&mut self) -> &mut String {
17746 self.object_id.get_or_insert_default()
17747 }
17748 pub fn object_id_opt(&self) -> Option<&str> {
17750 self.object_id.as_ref().map(|field| field as _)
17751 }
17752 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
17754 self.object_id = Some(field.into().into());
17755 }
17756 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
17758 self.set_object_id(field.into());
17759 self
17760 }
17761 pub fn start_version_opt_mut(&mut self) -> Option<&mut u64> {
17763 self.start_version.as_mut().map(|field| field as _)
17764 }
17765 pub fn start_version_mut(&mut self) -> &mut u64 {
17768 self.start_version.get_or_insert_default()
17769 }
17770 pub fn start_version_opt(&self) -> Option<u64> {
17772 self.start_version.as_ref().map(|field| *field)
17773 }
17774 pub fn set_start_version(&mut self, field: u64) {
17776 self.start_version = Some(field);
17777 }
17778 pub fn with_start_version(mut self, field: u64) -> Self {
17780 self.set_start_version(field);
17781 self
17782 }
17783 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
17785 self.version.as_mut().map(|field| field as _)
17786 }
17787 pub fn version_mut(&mut self) -> &mut u64 {
17790 self.version.get_or_insert_default()
17791 }
17792 pub fn version_opt(&self) -> Option<u64> {
17794 self.version.as_ref().map(|field| *field)
17795 }
17796 pub fn set_version(&mut self, field: u64) {
17798 self.version = Some(field);
17799 }
17800 pub fn with_version(mut self, field: u64) -> Self {
17802 self.set_version(field);
17803 self
17804 }
17805 }
17806 impl super::ZkLoginAuthenticator {
17807 pub const fn const_default() -> Self {
17808 Self {
17809 inputs: None,
17810 max_epoch: None,
17811 signature: None,
17812 public_identifier: None,
17813 jwk_id: None,
17814 }
17815 }
17816 #[doc(hidden)]
17817 pub fn default_instance() -> &'static Self {
17818 static DEFAULT: super::ZkLoginAuthenticator = super::ZkLoginAuthenticator::const_default();
17819 &DEFAULT
17820 }
17821 pub fn inputs(&self) -> &super::ZkLoginInputs {
17823 self.inputs
17824 .as_ref()
17825 .map(|field| field as _)
17826 .unwrap_or_else(|| super::ZkLoginInputs::default_instance() as _)
17827 }
17828 pub fn inputs_opt_mut(&mut self) -> Option<&mut super::ZkLoginInputs> {
17830 self.inputs.as_mut().map(|field| field as _)
17831 }
17832 pub fn inputs_mut(&mut self) -> &mut super::ZkLoginInputs {
17835 self.inputs.get_or_insert_default()
17836 }
17837 pub fn inputs_opt(&self) -> Option<&super::ZkLoginInputs> {
17839 self.inputs.as_ref().map(|field| field as _)
17840 }
17841 pub fn set_inputs<T: Into<super::ZkLoginInputs>>(&mut self, field: T) {
17843 self.inputs = Some(field.into().into());
17844 }
17845 pub fn with_inputs<T: Into<super::ZkLoginInputs>>(mut self, field: T) -> Self {
17847 self.set_inputs(field.into());
17848 self
17849 }
17850 pub fn max_epoch_opt_mut(&mut self) -> Option<&mut u64> {
17852 self.max_epoch.as_mut().map(|field| field as _)
17853 }
17854 pub fn max_epoch_mut(&mut self) -> &mut u64 {
17857 self.max_epoch.get_or_insert_default()
17858 }
17859 pub fn max_epoch_opt(&self) -> Option<u64> {
17861 self.max_epoch.as_ref().map(|field| *field)
17862 }
17863 pub fn set_max_epoch(&mut self, field: u64) {
17865 self.max_epoch = Some(field);
17866 }
17867 pub fn with_max_epoch(mut self, field: u64) -> Self {
17869 self.set_max_epoch(field);
17870 self
17871 }
17872 pub fn signature(&self) -> &super::SimpleSignature {
17874 self.signature
17875 .as_ref()
17876 .map(|field| field as _)
17877 .unwrap_or_else(|| super::SimpleSignature::default_instance() as _)
17878 }
17879 pub fn signature_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
17881 self.signature.as_mut().map(|field| field as _)
17882 }
17883 pub fn signature_mut(&mut self) -> &mut super::SimpleSignature {
17886 self.signature.get_or_insert_default()
17887 }
17888 pub fn signature_opt(&self) -> Option<&super::SimpleSignature> {
17890 self.signature.as_ref().map(|field| field as _)
17891 }
17892 pub fn set_signature<T: Into<super::SimpleSignature>>(&mut self, field: T) {
17894 self.signature = Some(field.into().into());
17895 }
17896 pub fn with_signature<T: Into<super::SimpleSignature>>(
17898 mut self,
17899 field: T,
17900 ) -> Self {
17901 self.set_signature(field.into());
17902 self
17903 }
17904 pub fn public_identifier(&self) -> &super::ZkLoginPublicIdentifier {
17906 self.public_identifier
17907 .as_ref()
17908 .map(|field| field as _)
17909 .unwrap_or_else(|| {
17910 super::ZkLoginPublicIdentifier::default_instance() as _
17911 })
17912 }
17913 pub fn public_identifier_opt_mut(
17915 &mut self,
17916 ) -> Option<&mut super::ZkLoginPublicIdentifier> {
17917 self.public_identifier.as_mut().map(|field| field as _)
17918 }
17919 pub fn public_identifier_mut(&mut self) -> &mut super::ZkLoginPublicIdentifier {
17922 self.public_identifier.get_or_insert_default()
17923 }
17924 pub fn public_identifier_opt(&self) -> Option<&super::ZkLoginPublicIdentifier> {
17926 self.public_identifier.as_ref().map(|field| field as _)
17927 }
17928 pub fn set_public_identifier<T: Into<super::ZkLoginPublicIdentifier>>(
17930 &mut self,
17931 field: T,
17932 ) {
17933 self.public_identifier = Some(field.into().into());
17934 }
17935 pub fn with_public_identifier<T: Into<super::ZkLoginPublicIdentifier>>(
17937 mut self,
17938 field: T,
17939 ) -> Self {
17940 self.set_public_identifier(field.into());
17941 self
17942 }
17943 pub fn jwk_id(&self) -> &super::JwkId {
17945 self.jwk_id
17946 .as_ref()
17947 .map(|field| field as _)
17948 .unwrap_or_else(|| super::JwkId::default_instance() as _)
17949 }
17950 pub fn jwk_id_opt_mut(&mut self) -> Option<&mut super::JwkId> {
17952 self.jwk_id.as_mut().map(|field| field as _)
17953 }
17954 pub fn jwk_id_mut(&mut self) -> &mut super::JwkId {
17957 self.jwk_id.get_or_insert_default()
17958 }
17959 pub fn jwk_id_opt(&self) -> Option<&super::JwkId> {
17961 self.jwk_id.as_ref().map(|field| field as _)
17962 }
17963 pub fn set_jwk_id<T: Into<super::JwkId>>(&mut self, field: T) {
17965 self.jwk_id = Some(field.into().into());
17966 }
17967 pub fn with_jwk_id<T: Into<super::JwkId>>(mut self, field: T) -> Self {
17969 self.set_jwk_id(field.into());
17970 self
17971 }
17972 }
17973 impl super::ZkLoginClaim {
17974 pub const fn const_default() -> Self {
17975 Self {
17976 value: None,
17977 index_mod_4: None,
17978 }
17979 }
17980 #[doc(hidden)]
17981 pub fn default_instance() -> &'static Self {
17982 static DEFAULT: super::ZkLoginClaim = super::ZkLoginClaim::const_default();
17983 &DEFAULT
17984 }
17985 pub fn value_opt_mut(&mut self) -> Option<&mut String> {
17987 self.value.as_mut().map(|field| field as _)
17988 }
17989 pub fn value_mut(&mut self) -> &mut String {
17992 self.value.get_or_insert_default()
17993 }
17994 pub fn value_opt(&self) -> Option<&str> {
17996 self.value.as_ref().map(|field| field as _)
17997 }
17998 pub fn set_value<T: Into<String>>(&mut self, field: T) {
18000 self.value = Some(field.into().into());
18001 }
18002 pub fn with_value<T: Into<String>>(mut self, field: T) -> Self {
18004 self.set_value(field.into());
18005 self
18006 }
18007 pub fn index_mod_4_opt_mut(&mut self) -> Option<&mut u32> {
18009 self.index_mod_4.as_mut().map(|field| field as _)
18010 }
18011 pub fn index_mod_4_mut(&mut self) -> &mut u32 {
18014 self.index_mod_4.get_or_insert_default()
18015 }
18016 pub fn index_mod_4_opt(&self) -> Option<u32> {
18018 self.index_mod_4.as_ref().map(|field| *field)
18019 }
18020 pub fn set_index_mod_4(&mut self, field: u32) {
18022 self.index_mod_4 = Some(field);
18023 }
18024 pub fn with_index_mod_4(mut self, field: u32) -> Self {
18026 self.set_index_mod_4(field);
18027 self
18028 }
18029 }
18030 impl super::ZkLoginInputs {
18031 pub const fn const_default() -> Self {
18032 Self {
18033 proof_points: None,
18034 iss_base64_details: None,
18035 header_base64: None,
18036 address_seed: None,
18037 }
18038 }
18039 #[doc(hidden)]
18040 pub fn default_instance() -> &'static Self {
18041 static DEFAULT: super::ZkLoginInputs = super::ZkLoginInputs::const_default();
18042 &DEFAULT
18043 }
18044 pub fn proof_points(&self) -> &super::ZkLoginProof {
18046 self.proof_points
18047 .as_ref()
18048 .map(|field| field as _)
18049 .unwrap_or_else(|| super::ZkLoginProof::default_instance() as _)
18050 }
18051 pub fn proof_points_opt_mut(&mut self) -> Option<&mut super::ZkLoginProof> {
18053 self.proof_points.as_mut().map(|field| field as _)
18054 }
18055 pub fn proof_points_mut(&mut self) -> &mut super::ZkLoginProof {
18058 self.proof_points.get_or_insert_default()
18059 }
18060 pub fn proof_points_opt(&self) -> Option<&super::ZkLoginProof> {
18062 self.proof_points.as_ref().map(|field| field as _)
18063 }
18064 pub fn set_proof_points<T: Into<super::ZkLoginProof>>(&mut self, field: T) {
18066 self.proof_points = Some(field.into().into());
18067 }
18068 pub fn with_proof_points<T: Into<super::ZkLoginProof>>(
18070 mut self,
18071 field: T,
18072 ) -> Self {
18073 self.set_proof_points(field.into());
18074 self
18075 }
18076 pub fn iss_base64_details(&self) -> &super::ZkLoginClaim {
18078 self.iss_base64_details
18079 .as_ref()
18080 .map(|field| field as _)
18081 .unwrap_or_else(|| super::ZkLoginClaim::default_instance() as _)
18082 }
18083 pub fn iss_base64_details_opt_mut(
18085 &mut self,
18086 ) -> Option<&mut super::ZkLoginClaim> {
18087 self.iss_base64_details.as_mut().map(|field| field as _)
18088 }
18089 pub fn iss_base64_details_mut(&mut self) -> &mut super::ZkLoginClaim {
18092 self.iss_base64_details.get_or_insert_default()
18093 }
18094 pub fn iss_base64_details_opt(&self) -> Option<&super::ZkLoginClaim> {
18096 self.iss_base64_details.as_ref().map(|field| field as _)
18097 }
18098 pub fn set_iss_base64_details<T: Into<super::ZkLoginClaim>>(
18100 &mut self,
18101 field: T,
18102 ) {
18103 self.iss_base64_details = Some(field.into().into());
18104 }
18105 pub fn with_iss_base64_details<T: Into<super::ZkLoginClaim>>(
18107 mut self,
18108 field: T,
18109 ) -> Self {
18110 self.set_iss_base64_details(field.into());
18111 self
18112 }
18113 pub fn header_base64_opt_mut(&mut self) -> Option<&mut String> {
18115 self.header_base64.as_mut().map(|field| field as _)
18116 }
18117 pub fn header_base64_mut(&mut self) -> &mut String {
18120 self.header_base64.get_or_insert_default()
18121 }
18122 pub fn header_base64_opt(&self) -> Option<&str> {
18124 self.header_base64.as_ref().map(|field| field as _)
18125 }
18126 pub fn set_header_base64<T: Into<String>>(&mut self, field: T) {
18128 self.header_base64 = Some(field.into().into());
18129 }
18130 pub fn with_header_base64<T: Into<String>>(mut self, field: T) -> Self {
18132 self.set_header_base64(field.into());
18133 self
18134 }
18135 pub fn address_seed_opt_mut(&mut self) -> Option<&mut String> {
18137 self.address_seed.as_mut().map(|field| field as _)
18138 }
18139 pub fn address_seed_mut(&mut self) -> &mut String {
18142 self.address_seed.get_or_insert_default()
18143 }
18144 pub fn address_seed_opt(&self) -> Option<&str> {
18146 self.address_seed.as_ref().map(|field| field as _)
18147 }
18148 pub fn set_address_seed<T: Into<String>>(&mut self, field: T) {
18150 self.address_seed = Some(field.into().into());
18151 }
18152 pub fn with_address_seed<T: Into<String>>(mut self, field: T) -> Self {
18154 self.set_address_seed(field.into());
18155 self
18156 }
18157 }
18158 impl super::ZkLoginProof {
18159 pub const fn const_default() -> Self {
18160 Self { a: None, b: None, c: None }
18161 }
18162 #[doc(hidden)]
18163 pub fn default_instance() -> &'static Self {
18164 static DEFAULT: super::ZkLoginProof = super::ZkLoginProof::const_default();
18165 &DEFAULT
18166 }
18167 pub fn a(&self) -> &super::CircomG1 {
18169 self.a
18170 .as_ref()
18171 .map(|field| field as _)
18172 .unwrap_or_else(|| super::CircomG1::default_instance() as _)
18173 }
18174 pub fn a_opt_mut(&mut self) -> Option<&mut super::CircomG1> {
18176 self.a.as_mut().map(|field| field as _)
18177 }
18178 pub fn a_mut(&mut self) -> &mut super::CircomG1 {
18181 self.a.get_or_insert_default()
18182 }
18183 pub fn a_opt(&self) -> Option<&super::CircomG1> {
18185 self.a.as_ref().map(|field| field as _)
18186 }
18187 pub fn set_a<T: Into<super::CircomG1>>(&mut self, field: T) {
18189 self.a = Some(field.into().into());
18190 }
18191 pub fn with_a<T: Into<super::CircomG1>>(mut self, field: T) -> Self {
18193 self.set_a(field.into());
18194 self
18195 }
18196 pub fn b(&self) -> &super::CircomG2 {
18198 self.b
18199 .as_ref()
18200 .map(|field| field as _)
18201 .unwrap_or_else(|| super::CircomG2::default_instance() as _)
18202 }
18203 pub fn b_opt_mut(&mut self) -> Option<&mut super::CircomG2> {
18205 self.b.as_mut().map(|field| field as _)
18206 }
18207 pub fn b_mut(&mut self) -> &mut super::CircomG2 {
18210 self.b.get_or_insert_default()
18211 }
18212 pub fn b_opt(&self) -> Option<&super::CircomG2> {
18214 self.b.as_ref().map(|field| field as _)
18215 }
18216 pub fn set_b<T: Into<super::CircomG2>>(&mut self, field: T) {
18218 self.b = Some(field.into().into());
18219 }
18220 pub fn with_b<T: Into<super::CircomG2>>(mut self, field: T) -> Self {
18222 self.set_b(field.into());
18223 self
18224 }
18225 pub fn c(&self) -> &super::CircomG1 {
18227 self.c
18228 .as_ref()
18229 .map(|field| field as _)
18230 .unwrap_or_else(|| super::CircomG1::default_instance() as _)
18231 }
18232 pub fn c_opt_mut(&mut self) -> Option<&mut super::CircomG1> {
18234 self.c.as_mut().map(|field| field as _)
18235 }
18236 pub fn c_mut(&mut self) -> &mut super::CircomG1 {
18239 self.c.get_or_insert_default()
18240 }
18241 pub fn c_opt(&self) -> Option<&super::CircomG1> {
18243 self.c.as_ref().map(|field| field as _)
18244 }
18245 pub fn set_c<T: Into<super::CircomG1>>(&mut self, field: T) {
18247 self.c = Some(field.into().into());
18248 }
18249 pub fn with_c<T: Into<super::CircomG1>>(mut self, field: T) -> Self {
18251 self.set_c(field.into());
18252 self
18253 }
18254 }
18255 impl super::ZkLoginPublicIdentifier {
18256 pub const fn const_default() -> Self {
18257 Self {
18258 iss: None,
18259 address_seed: None,
18260 }
18261 }
18262 #[doc(hidden)]
18263 pub fn default_instance() -> &'static Self {
18264 static DEFAULT: super::ZkLoginPublicIdentifier = super::ZkLoginPublicIdentifier::const_default();
18265 &DEFAULT
18266 }
18267 pub fn iss_opt_mut(&mut self) -> Option<&mut String> {
18269 self.iss.as_mut().map(|field| field as _)
18270 }
18271 pub fn iss_mut(&mut self) -> &mut String {
18274 self.iss.get_or_insert_default()
18275 }
18276 pub fn iss_opt(&self) -> Option<&str> {
18278 self.iss.as_ref().map(|field| field as _)
18279 }
18280 pub fn set_iss<T: Into<String>>(&mut self, field: T) {
18282 self.iss = Some(field.into().into());
18283 }
18284 pub fn with_iss<T: Into<String>>(mut self, field: T) -> Self {
18286 self.set_iss(field.into());
18287 self
18288 }
18289 pub fn address_seed_opt_mut(&mut self) -> Option<&mut String> {
18291 self.address_seed.as_mut().map(|field| field as _)
18292 }
18293 pub fn address_seed_mut(&mut self) -> &mut String {
18296 self.address_seed.get_or_insert_default()
18297 }
18298 pub fn address_seed_opt(&self) -> Option<&str> {
18300 self.address_seed.as_ref().map(|field| field as _)
18301 }
18302 pub fn set_address_seed<T: Into<String>>(&mut self, field: T) {
18304 self.address_seed = Some(field.into().into());
18305 }
18306 pub fn with_address_seed<T: Into<String>>(mut self, field: T) -> Self {
18308 self.set_address_seed(field.into());
18309 self
18310 }
18311 }
18312}