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 configs: std::collections::BTreeMap::new(),
12028 }
12029 }
12030 #[doc(hidden)]
12031 pub fn default_instance() -> &'static Self {
12032 static DEFAULT: super::ProtocolConfig = super::ProtocolConfig::const_default();
12033 &DEFAULT
12034 }
12035 pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
12037 self.protocol_version.as_mut().map(|field| field as _)
12038 }
12039 pub fn protocol_version_mut(&mut self) -> &mut u64 {
12042 self.protocol_version.get_or_insert_default()
12043 }
12044 pub fn protocol_version_opt(&self) -> Option<u64> {
12046 self.protocol_version.as_ref().map(|field| *field)
12047 }
12048 pub fn set_protocol_version(&mut self, field: u64) {
12050 self.protocol_version = Some(field);
12051 }
12052 pub fn with_protocol_version(mut self, field: u64) -> Self {
12054 self.set_protocol_version(field);
12055 self
12056 }
12057 pub fn feature_flags(&self) -> &::std::collections::BTreeMap<String, bool> {
12059 &self.feature_flags
12060 }
12061 pub fn feature_flags_mut(
12064 &mut self,
12065 ) -> &mut ::std::collections::BTreeMap<String, bool> {
12066 &mut self.feature_flags
12067 }
12068 pub fn set_feature_flags(
12070 &mut self,
12071 field: ::std::collections::BTreeMap<String, bool>,
12072 ) {
12073 self.feature_flags = field;
12074 }
12075 pub fn with_feature_flags(
12077 mut self,
12078 field: ::std::collections::BTreeMap<String, bool>,
12079 ) -> Self {
12080 self.set_feature_flags(field);
12081 self
12082 }
12083 pub fn attributes(&self) -> &::std::collections::BTreeMap<String, String> {
12085 &self.attributes
12086 }
12087 pub fn attributes_mut(
12090 &mut self,
12091 ) -> &mut ::std::collections::BTreeMap<String, String> {
12092 &mut self.attributes
12093 }
12094 pub fn set_attributes(
12096 &mut self,
12097 field: ::std::collections::BTreeMap<String, String>,
12098 ) {
12099 self.attributes = field;
12100 }
12101 pub fn with_attributes(
12103 mut self,
12104 field: ::std::collections::BTreeMap<String, String>,
12105 ) -> Self {
12106 self.set_attributes(field);
12107 self
12108 }
12109 pub fn configs(
12111 &self,
12112 ) -> &::std::collections::BTreeMap<String, ::prost_types::Value> {
12113 &self.configs
12114 }
12115 pub fn configs_mut(
12118 &mut self,
12119 ) -> &mut ::std::collections::BTreeMap<String, ::prost_types::Value> {
12120 &mut self.configs
12121 }
12122 pub fn set_configs(
12124 &mut self,
12125 field: ::std::collections::BTreeMap<String, ::prost_types::Value>,
12126 ) {
12127 self.configs = field;
12128 }
12129 pub fn with_configs(
12131 mut self,
12132 field: ::std::collections::BTreeMap<String, ::prost_types::Value>,
12133 ) -> Self {
12134 self.set_configs(field);
12135 self
12136 }
12137 }
12138 impl super::Publish {
12139 pub const fn const_default() -> Self {
12140 Self {
12141 modules: Vec::new(),
12142 dependencies: Vec::new(),
12143 }
12144 }
12145 #[doc(hidden)]
12146 pub fn default_instance() -> &'static Self {
12147 static DEFAULT: super::Publish = super::Publish::const_default();
12148 &DEFAULT
12149 }
12150 pub fn modules(&self) -> &[::prost::bytes::Bytes] {
12152 &self.modules
12153 }
12154 pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
12157 &mut self.modules
12158 }
12159 pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
12161 self.modules = field;
12162 }
12163 pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
12165 self.set_modules(field);
12166 self
12167 }
12168 pub fn dependencies(&self) -> &[String] {
12170 &self.dependencies
12171 }
12172 pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
12175 &mut self.dependencies
12176 }
12177 pub fn set_dependencies(&mut self, field: Vec<String>) {
12179 self.dependencies = field;
12180 }
12181 pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
12183 self.set_dependencies(field);
12184 self
12185 }
12186 }
12187 impl super::RandomnessStateUpdate {
12188 pub const fn const_default() -> Self {
12189 Self {
12190 epoch: None,
12191 randomness_round: None,
12192 random_bytes: None,
12193 randomness_object_initial_shared_version: None,
12194 }
12195 }
12196 #[doc(hidden)]
12197 pub fn default_instance() -> &'static Self {
12198 static DEFAULT: super::RandomnessStateUpdate = super::RandomnessStateUpdate::const_default();
12199 &DEFAULT
12200 }
12201 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
12203 self.epoch.as_mut().map(|field| field as _)
12204 }
12205 pub fn epoch_mut(&mut self) -> &mut u64 {
12208 self.epoch.get_or_insert_default()
12209 }
12210 pub fn epoch_opt(&self) -> Option<u64> {
12212 self.epoch.as_ref().map(|field| *field)
12213 }
12214 pub fn set_epoch(&mut self, field: u64) {
12216 self.epoch = Some(field);
12217 }
12218 pub fn with_epoch(mut self, field: u64) -> Self {
12220 self.set_epoch(field);
12221 self
12222 }
12223 pub fn randomness_round_opt_mut(&mut self) -> Option<&mut u64> {
12225 self.randomness_round.as_mut().map(|field| field as _)
12226 }
12227 pub fn randomness_round_mut(&mut self) -> &mut u64 {
12230 self.randomness_round.get_or_insert_default()
12231 }
12232 pub fn randomness_round_opt(&self) -> Option<u64> {
12234 self.randomness_round.as_ref().map(|field| *field)
12235 }
12236 pub fn set_randomness_round(&mut self, field: u64) {
12238 self.randomness_round = Some(field);
12239 }
12240 pub fn with_randomness_round(mut self, field: u64) -> Self {
12242 self.set_randomness_round(field);
12243 self
12244 }
12245 pub fn random_bytes_opt(&self) -> Option<&[u8]> {
12247 self.random_bytes.as_ref().map(|field| field as _)
12248 }
12249 pub fn set_random_bytes<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
12251 self.random_bytes = Some(field.into().into());
12252 }
12253 pub fn with_random_bytes<T: Into<::prost::bytes::Bytes>>(
12255 mut self,
12256 field: T,
12257 ) -> Self {
12258 self.set_random_bytes(field.into());
12259 self
12260 }
12261 pub fn randomness_object_initial_shared_version_opt_mut(
12263 &mut self,
12264 ) -> Option<&mut u64> {
12265 self.randomness_object_initial_shared_version
12266 .as_mut()
12267 .map(|field| field as _)
12268 }
12269 pub fn randomness_object_initial_shared_version_mut(&mut self) -> &mut u64 {
12272 self.randomness_object_initial_shared_version.get_or_insert_default()
12273 }
12274 pub fn randomness_object_initial_shared_version_opt(&self) -> Option<u64> {
12276 self.randomness_object_initial_shared_version.as_ref().map(|field| *field)
12277 }
12278 pub fn set_randomness_object_initial_shared_version(&mut self, field: u64) {
12280 self.randomness_object_initial_shared_version = Some(field);
12281 }
12282 pub fn with_randomness_object_initial_shared_version(
12284 mut self,
12285 field: u64,
12286 ) -> Self {
12287 self.set_randomness_object_initial_shared_version(field);
12288 self
12289 }
12290 }
12291 impl super::RegulatedCoinMetadata {
12292 pub const fn const_default() -> Self {
12293 Self {
12294 id: None,
12295 coin_metadata_object: None,
12296 deny_cap_object: None,
12297 allow_global_pause: None,
12298 variant: None,
12299 coin_regulated_state: None,
12300 }
12301 }
12302 #[doc(hidden)]
12303 pub fn default_instance() -> &'static Self {
12304 static DEFAULT: super::RegulatedCoinMetadata = super::RegulatedCoinMetadata::const_default();
12305 &DEFAULT
12306 }
12307 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
12309 self.id.as_mut().map(|field| field as _)
12310 }
12311 pub fn id_mut(&mut self) -> &mut String {
12314 self.id.get_or_insert_default()
12315 }
12316 pub fn id_opt(&self) -> Option<&str> {
12318 self.id.as_ref().map(|field| field as _)
12319 }
12320 pub fn set_id<T: Into<String>>(&mut self, field: T) {
12322 self.id = Some(field.into().into());
12323 }
12324 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
12326 self.set_id(field.into());
12327 self
12328 }
12329 pub fn coin_metadata_object_opt_mut(&mut self) -> Option<&mut String> {
12331 self.coin_metadata_object.as_mut().map(|field| field as _)
12332 }
12333 pub fn coin_metadata_object_mut(&mut self) -> &mut String {
12336 self.coin_metadata_object.get_or_insert_default()
12337 }
12338 pub fn coin_metadata_object_opt(&self) -> Option<&str> {
12340 self.coin_metadata_object.as_ref().map(|field| field as _)
12341 }
12342 pub fn set_coin_metadata_object<T: Into<String>>(&mut self, field: T) {
12344 self.coin_metadata_object = Some(field.into().into());
12345 }
12346 pub fn with_coin_metadata_object<T: Into<String>>(mut self, field: T) -> Self {
12348 self.set_coin_metadata_object(field.into());
12349 self
12350 }
12351 pub fn deny_cap_object_opt_mut(&mut self) -> Option<&mut String> {
12353 self.deny_cap_object.as_mut().map(|field| field as _)
12354 }
12355 pub fn deny_cap_object_mut(&mut self) -> &mut String {
12358 self.deny_cap_object.get_or_insert_default()
12359 }
12360 pub fn deny_cap_object_opt(&self) -> Option<&str> {
12362 self.deny_cap_object.as_ref().map(|field| field as _)
12363 }
12364 pub fn set_deny_cap_object<T: Into<String>>(&mut self, field: T) {
12366 self.deny_cap_object = Some(field.into().into());
12367 }
12368 pub fn with_deny_cap_object<T: Into<String>>(mut self, field: T) -> Self {
12370 self.set_deny_cap_object(field.into());
12371 self
12372 }
12373 pub fn allow_global_pause_opt_mut(&mut self) -> Option<&mut bool> {
12375 self.allow_global_pause.as_mut().map(|field| field as _)
12376 }
12377 pub fn allow_global_pause_mut(&mut self) -> &mut bool {
12380 self.allow_global_pause.get_or_insert_default()
12381 }
12382 pub fn allow_global_pause_opt(&self) -> Option<bool> {
12384 self.allow_global_pause.as_ref().map(|field| *field)
12385 }
12386 pub fn set_allow_global_pause(&mut self, field: bool) {
12388 self.allow_global_pause = Some(field);
12389 }
12390 pub fn with_allow_global_pause(mut self, field: bool) -> Self {
12392 self.set_allow_global_pause(field);
12393 self
12394 }
12395 pub fn variant_opt_mut(&mut self) -> Option<&mut u32> {
12397 self.variant.as_mut().map(|field| field as _)
12398 }
12399 pub fn variant_mut(&mut self) -> &mut u32 {
12402 self.variant.get_or_insert_default()
12403 }
12404 pub fn variant_opt(&self) -> Option<u32> {
12406 self.variant.as_ref().map(|field| *field)
12407 }
12408 pub fn set_variant(&mut self, field: u32) {
12410 self.variant = Some(field);
12411 }
12412 pub fn with_variant(mut self, field: u32) -> Self {
12414 self.set_variant(field);
12415 self
12416 }
12417 pub fn with_coin_regulated_state<
12419 T: Into<super::regulated_coin_metadata::CoinRegulatedState>,
12420 >(mut self, field: T) -> Self {
12421 self.set_coin_regulated_state(field.into());
12422 self
12423 }
12424 }
12425 impl super::ReverseLookupNameRequest {
12426 pub const fn const_default() -> Self {
12427 Self { address: None }
12428 }
12429 #[doc(hidden)]
12430 pub fn default_instance() -> &'static Self {
12431 static DEFAULT: super::ReverseLookupNameRequest = super::ReverseLookupNameRequest::const_default();
12432 &DEFAULT
12433 }
12434 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
12436 self.address.as_mut().map(|field| field as _)
12437 }
12438 pub fn address_mut(&mut self) -> &mut String {
12441 self.address.get_or_insert_default()
12442 }
12443 pub fn address_opt(&self) -> Option<&str> {
12445 self.address.as_ref().map(|field| field as _)
12446 }
12447 pub fn set_address<T: Into<String>>(&mut self, field: T) {
12449 self.address = Some(field.into().into());
12450 }
12451 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
12453 self.set_address(field.into());
12454 self
12455 }
12456 }
12457 impl super::ReverseLookupNameResponse {
12458 pub const fn const_default() -> Self {
12459 Self { record: None }
12460 }
12461 #[doc(hidden)]
12462 pub fn default_instance() -> &'static Self {
12463 static DEFAULT: super::ReverseLookupNameResponse = super::ReverseLookupNameResponse::const_default();
12464 &DEFAULT
12465 }
12466 pub fn record(&self) -> &super::NameRecord {
12468 self.record
12469 .as_ref()
12470 .map(|field| field as _)
12471 .unwrap_or_else(|| super::NameRecord::default_instance() as _)
12472 }
12473 pub fn record_opt_mut(&mut self) -> Option<&mut super::NameRecord> {
12475 self.record.as_mut().map(|field| field as _)
12476 }
12477 pub fn record_mut(&mut self) -> &mut super::NameRecord {
12480 self.record.get_or_insert_default()
12481 }
12482 pub fn record_opt(&self) -> Option<&super::NameRecord> {
12484 self.record.as_ref().map(|field| field as _)
12485 }
12486 pub fn set_record<T: Into<super::NameRecord>>(&mut self, field: T) {
12488 self.record = Some(field.into().into());
12489 }
12490 pub fn with_record<T: Into<super::NameRecord>>(mut self, field: T) -> Self {
12492 self.set_record(field.into());
12493 self
12494 }
12495 }
12496 impl super::SimpleSignature {
12497 pub const fn const_default() -> Self {
12498 Self {
12499 scheme: None,
12500 signature: None,
12501 public_key: None,
12502 }
12503 }
12504 #[doc(hidden)]
12505 pub fn default_instance() -> &'static Self {
12506 static DEFAULT: super::SimpleSignature = super::SimpleSignature::const_default();
12507 &DEFAULT
12508 }
12509 pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
12511 self.set_scheme(field.into());
12512 self
12513 }
12514 pub fn signature_opt(&self) -> Option<&[u8]> {
12516 self.signature.as_ref().map(|field| field as _)
12517 }
12518 pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
12520 self.signature = Some(field.into().into());
12521 }
12522 pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
12524 mut self,
12525 field: T,
12526 ) -> Self {
12527 self.set_signature(field.into());
12528 self
12529 }
12530 pub fn public_key_opt(&self) -> Option<&[u8]> {
12532 self.public_key.as_ref().map(|field| field as _)
12533 }
12534 pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
12536 self.public_key = Some(field.into().into());
12537 }
12538 pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
12540 mut self,
12541 field: T,
12542 ) -> Self {
12543 self.set_public_key(field.into());
12544 self
12545 }
12546 }
12547 impl super::SimulateTransactionRequest {
12548 pub const fn const_default() -> Self {
12549 Self {
12550 transaction: None,
12551 read_mask: None,
12552 checks: None,
12553 do_gas_selection: None,
12554 }
12555 }
12556 #[doc(hidden)]
12557 pub fn default_instance() -> &'static Self {
12558 static DEFAULT: super::SimulateTransactionRequest = super::SimulateTransactionRequest::const_default();
12559 &DEFAULT
12560 }
12561 pub fn transaction(&self) -> &super::Transaction {
12563 self.transaction
12564 .as_ref()
12565 .map(|field| field as _)
12566 .unwrap_or_else(|| super::Transaction::default_instance() as _)
12567 }
12568 pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
12570 self.transaction.as_mut().map(|field| field as _)
12571 }
12572 pub fn transaction_mut(&mut self) -> &mut super::Transaction {
12575 self.transaction.get_or_insert_default()
12576 }
12577 pub fn transaction_opt(&self) -> Option<&super::Transaction> {
12579 self.transaction.as_ref().map(|field| field as _)
12580 }
12581 pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
12583 self.transaction = Some(field.into().into());
12584 }
12585 pub fn with_transaction<T: Into<super::Transaction>>(
12587 mut self,
12588 field: T,
12589 ) -> Self {
12590 self.set_transaction(field.into());
12591 self
12592 }
12593 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
12595 self.read_mask.as_mut().map(|field| field as _)
12596 }
12597 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
12600 self.read_mask.get_or_insert_default()
12601 }
12602 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
12604 self.read_mask.as_ref().map(|field| field as _)
12605 }
12606 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
12608 self.read_mask = Some(field.into().into());
12609 }
12610 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
12612 mut self,
12613 field: T,
12614 ) -> Self {
12615 self.set_read_mask(field.into());
12616 self
12617 }
12618 pub fn with_checks<
12620 T: Into<super::simulate_transaction_request::TransactionChecks>,
12621 >(mut self, field: T) -> Self {
12622 self.set_checks(field.into());
12623 self
12624 }
12625 pub fn do_gas_selection_opt_mut(&mut self) -> Option<&mut bool> {
12627 self.do_gas_selection.as_mut().map(|field| field as _)
12628 }
12629 pub fn do_gas_selection_mut(&mut self) -> &mut bool {
12632 self.do_gas_selection.get_or_insert_default()
12633 }
12634 pub fn do_gas_selection_opt(&self) -> Option<bool> {
12636 self.do_gas_selection.as_ref().map(|field| *field)
12637 }
12638 pub fn set_do_gas_selection(&mut self, field: bool) {
12640 self.do_gas_selection = Some(field);
12641 }
12642 pub fn with_do_gas_selection(mut self, field: bool) -> Self {
12644 self.set_do_gas_selection(field);
12645 self
12646 }
12647 }
12648 impl super::SimulateTransactionResponse {
12649 pub const fn const_default() -> Self {
12650 Self {
12651 transaction: None,
12652 command_outputs: Vec::new(),
12653 suggested_gas_price: None,
12654 }
12655 }
12656 #[doc(hidden)]
12657 pub fn default_instance() -> &'static Self {
12658 static DEFAULT: super::SimulateTransactionResponse = super::SimulateTransactionResponse::const_default();
12659 &DEFAULT
12660 }
12661 pub fn transaction(&self) -> &super::ExecutedTransaction {
12663 self.transaction
12664 .as_ref()
12665 .map(|field| field as _)
12666 .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
12667 }
12668 pub fn transaction_opt_mut(
12670 &mut self,
12671 ) -> Option<&mut super::ExecutedTransaction> {
12672 self.transaction.as_mut().map(|field| field as _)
12673 }
12674 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
12677 self.transaction.get_or_insert_default()
12678 }
12679 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
12681 self.transaction.as_ref().map(|field| field as _)
12682 }
12683 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
12685 &mut self,
12686 field: T,
12687 ) {
12688 self.transaction = Some(field.into().into());
12689 }
12690 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
12692 mut self,
12693 field: T,
12694 ) -> Self {
12695 self.set_transaction(field.into());
12696 self
12697 }
12698 pub fn command_outputs(&self) -> &[super::CommandResult] {
12700 &self.command_outputs
12701 }
12702 pub fn command_outputs_mut(&mut self) -> &mut Vec<super::CommandResult> {
12705 &mut self.command_outputs
12706 }
12707 pub fn set_command_outputs(&mut self, field: Vec<super::CommandResult>) {
12709 self.command_outputs = field;
12710 }
12711 pub fn with_command_outputs(mut self, field: Vec<super::CommandResult>) -> Self {
12713 self.set_command_outputs(field);
12714 self
12715 }
12716 pub fn suggested_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
12718 self.suggested_gas_price.as_mut().map(|field| field as _)
12719 }
12720 pub fn suggested_gas_price_mut(&mut self) -> &mut u64 {
12723 self.suggested_gas_price.get_or_insert_default()
12724 }
12725 pub fn suggested_gas_price_opt(&self) -> Option<u64> {
12727 self.suggested_gas_price.as_ref().map(|field| *field)
12728 }
12729 pub fn set_suggested_gas_price(&mut self, field: u64) {
12731 self.suggested_gas_price = Some(field);
12732 }
12733 pub fn with_suggested_gas_price(mut self, field: u64) -> Self {
12735 self.set_suggested_gas_price(field);
12736 self
12737 }
12738 }
12739 impl super::SizeError {
12740 pub const fn const_default() -> Self {
12741 Self { size: None, max_size: None }
12742 }
12743 #[doc(hidden)]
12744 pub fn default_instance() -> &'static Self {
12745 static DEFAULT: super::SizeError = super::SizeError::const_default();
12746 &DEFAULT
12747 }
12748 pub fn size_opt_mut(&mut self) -> Option<&mut u64> {
12750 self.size.as_mut().map(|field| field as _)
12751 }
12752 pub fn size_mut(&mut self) -> &mut u64 {
12755 self.size.get_or_insert_default()
12756 }
12757 pub fn size_opt(&self) -> Option<u64> {
12759 self.size.as_ref().map(|field| *field)
12760 }
12761 pub fn set_size(&mut self, field: u64) {
12763 self.size = Some(field);
12764 }
12765 pub fn with_size(mut self, field: u64) -> Self {
12767 self.set_size(field);
12768 self
12769 }
12770 pub fn max_size_opt_mut(&mut self) -> Option<&mut u64> {
12772 self.max_size.as_mut().map(|field| field as _)
12773 }
12774 pub fn max_size_mut(&mut self) -> &mut u64 {
12777 self.max_size.get_or_insert_default()
12778 }
12779 pub fn max_size_opt(&self) -> Option<u64> {
12781 self.max_size.as_ref().map(|field| *field)
12782 }
12783 pub fn set_max_size(&mut self, field: u64) {
12785 self.max_size = Some(field);
12786 }
12787 pub fn with_max_size(mut self, field: u64) -> Self {
12789 self.set_max_size(field);
12790 self
12791 }
12792 }
12793 impl super::SplitCoins {
12794 pub const fn const_default() -> Self {
12795 Self {
12796 coin: None,
12797 amounts: Vec::new(),
12798 }
12799 }
12800 #[doc(hidden)]
12801 pub fn default_instance() -> &'static Self {
12802 static DEFAULT: super::SplitCoins = super::SplitCoins::const_default();
12803 &DEFAULT
12804 }
12805 pub fn coin(&self) -> &super::Argument {
12807 self.coin
12808 .as_ref()
12809 .map(|field| field as _)
12810 .unwrap_or_else(|| super::Argument::default_instance() as _)
12811 }
12812 pub fn coin_opt_mut(&mut self) -> Option<&mut super::Argument> {
12814 self.coin.as_mut().map(|field| field as _)
12815 }
12816 pub fn coin_mut(&mut self) -> &mut super::Argument {
12819 self.coin.get_or_insert_default()
12820 }
12821 pub fn coin_opt(&self) -> Option<&super::Argument> {
12823 self.coin.as_ref().map(|field| field as _)
12824 }
12825 pub fn set_coin<T: Into<super::Argument>>(&mut self, field: T) {
12827 self.coin = Some(field.into().into());
12828 }
12829 pub fn with_coin<T: Into<super::Argument>>(mut self, field: T) -> Self {
12831 self.set_coin(field.into());
12832 self
12833 }
12834 pub fn amounts(&self) -> &[super::Argument] {
12836 &self.amounts
12837 }
12838 pub fn amounts_mut(&mut self) -> &mut Vec<super::Argument> {
12841 &mut self.amounts
12842 }
12843 pub fn set_amounts(&mut self, field: Vec<super::Argument>) {
12845 self.amounts = field;
12846 }
12847 pub fn with_amounts(mut self, field: Vec<super::Argument>) -> Self {
12849 self.set_amounts(field);
12850 self
12851 }
12852 }
12853 impl super::StakeSubsidy {
12854 pub const fn const_default() -> Self {
12855 Self {
12856 balance: None,
12857 distribution_counter: None,
12858 current_distribution_amount: None,
12859 stake_subsidy_period_length: None,
12860 stake_subsidy_decrease_rate: None,
12861 extra_fields: None,
12862 }
12863 }
12864 #[doc(hidden)]
12865 pub fn default_instance() -> &'static Self {
12866 static DEFAULT: super::StakeSubsidy = super::StakeSubsidy::const_default();
12867 &DEFAULT
12868 }
12869 pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
12871 self.balance.as_mut().map(|field| field as _)
12872 }
12873 pub fn balance_mut(&mut self) -> &mut u64 {
12876 self.balance.get_or_insert_default()
12877 }
12878 pub fn balance_opt(&self) -> Option<u64> {
12880 self.balance.as_ref().map(|field| *field)
12881 }
12882 pub fn set_balance(&mut self, field: u64) {
12884 self.balance = Some(field);
12885 }
12886 pub fn with_balance(mut self, field: u64) -> Self {
12888 self.set_balance(field);
12889 self
12890 }
12891 pub fn distribution_counter_opt_mut(&mut self) -> Option<&mut u64> {
12893 self.distribution_counter.as_mut().map(|field| field as _)
12894 }
12895 pub fn distribution_counter_mut(&mut self) -> &mut u64 {
12898 self.distribution_counter.get_or_insert_default()
12899 }
12900 pub fn distribution_counter_opt(&self) -> Option<u64> {
12902 self.distribution_counter.as_ref().map(|field| *field)
12903 }
12904 pub fn set_distribution_counter(&mut self, field: u64) {
12906 self.distribution_counter = Some(field);
12907 }
12908 pub fn with_distribution_counter(mut self, field: u64) -> Self {
12910 self.set_distribution_counter(field);
12911 self
12912 }
12913 pub fn current_distribution_amount_opt_mut(&mut self) -> Option<&mut u64> {
12915 self.current_distribution_amount.as_mut().map(|field| field as _)
12916 }
12917 pub fn current_distribution_amount_mut(&mut self) -> &mut u64 {
12920 self.current_distribution_amount.get_or_insert_default()
12921 }
12922 pub fn current_distribution_amount_opt(&self) -> Option<u64> {
12924 self.current_distribution_amount.as_ref().map(|field| *field)
12925 }
12926 pub fn set_current_distribution_amount(&mut self, field: u64) {
12928 self.current_distribution_amount = Some(field);
12929 }
12930 pub fn with_current_distribution_amount(mut self, field: u64) -> Self {
12932 self.set_current_distribution_amount(field);
12933 self
12934 }
12935 pub fn stake_subsidy_period_length_opt_mut(&mut self) -> Option<&mut u64> {
12937 self.stake_subsidy_period_length.as_mut().map(|field| field as _)
12938 }
12939 pub fn stake_subsidy_period_length_mut(&mut self) -> &mut u64 {
12942 self.stake_subsidy_period_length.get_or_insert_default()
12943 }
12944 pub fn stake_subsidy_period_length_opt(&self) -> Option<u64> {
12946 self.stake_subsidy_period_length.as_ref().map(|field| *field)
12947 }
12948 pub fn set_stake_subsidy_period_length(&mut self, field: u64) {
12950 self.stake_subsidy_period_length = Some(field);
12951 }
12952 pub fn with_stake_subsidy_period_length(mut self, field: u64) -> Self {
12954 self.set_stake_subsidy_period_length(field);
12955 self
12956 }
12957 pub fn stake_subsidy_decrease_rate_opt_mut(&mut self) -> Option<&mut u32> {
12959 self.stake_subsidy_decrease_rate.as_mut().map(|field| field as _)
12960 }
12961 pub fn stake_subsidy_decrease_rate_mut(&mut self) -> &mut u32 {
12964 self.stake_subsidy_decrease_rate.get_or_insert_default()
12965 }
12966 pub fn stake_subsidy_decrease_rate_opt(&self) -> Option<u32> {
12968 self.stake_subsidy_decrease_rate.as_ref().map(|field| *field)
12969 }
12970 pub fn set_stake_subsidy_decrease_rate(&mut self, field: u32) {
12972 self.stake_subsidy_decrease_rate = Some(field);
12973 }
12974 pub fn with_stake_subsidy_decrease_rate(mut self, field: u32) -> Self {
12976 self.set_stake_subsidy_decrease_rate(field);
12977 self
12978 }
12979 pub fn extra_fields(&self) -> &super::MoveTable {
12981 self.extra_fields
12982 .as_ref()
12983 .map(|field| field as _)
12984 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
12985 }
12986 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
12988 self.extra_fields.as_mut().map(|field| field as _)
12989 }
12990 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
12993 self.extra_fields.get_or_insert_default()
12994 }
12995 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
12997 self.extra_fields.as_ref().map(|field| field as _)
12998 }
12999 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
13001 self.extra_fields = Some(field.into().into());
13002 }
13003 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
13005 self.set_extra_fields(field.into());
13006 self
13007 }
13008 }
13009 impl super::StakingPool {
13010 pub const fn const_default() -> Self {
13011 Self {
13012 id: None,
13013 activation_epoch: None,
13014 deactivation_epoch: None,
13015 sui_balance: None,
13016 rewards_pool: None,
13017 pool_token_balance: None,
13018 exchange_rates: None,
13019 pending_stake: None,
13020 pending_total_sui_withdraw: None,
13021 pending_pool_token_withdraw: None,
13022 extra_fields: None,
13023 }
13024 }
13025 #[doc(hidden)]
13026 pub fn default_instance() -> &'static Self {
13027 static DEFAULT: super::StakingPool = super::StakingPool::const_default();
13028 &DEFAULT
13029 }
13030 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
13032 self.id.as_mut().map(|field| field as _)
13033 }
13034 pub fn id_mut(&mut self) -> &mut String {
13037 self.id.get_or_insert_default()
13038 }
13039 pub fn id_opt(&self) -> Option<&str> {
13041 self.id.as_ref().map(|field| field as _)
13042 }
13043 pub fn set_id<T: Into<String>>(&mut self, field: T) {
13045 self.id = Some(field.into().into());
13046 }
13047 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
13049 self.set_id(field.into());
13050 self
13051 }
13052 pub fn activation_epoch_opt_mut(&mut self) -> Option<&mut u64> {
13054 self.activation_epoch.as_mut().map(|field| field as _)
13055 }
13056 pub fn activation_epoch_mut(&mut self) -> &mut u64 {
13059 self.activation_epoch.get_or_insert_default()
13060 }
13061 pub fn activation_epoch_opt(&self) -> Option<u64> {
13063 self.activation_epoch.as_ref().map(|field| *field)
13064 }
13065 pub fn set_activation_epoch(&mut self, field: u64) {
13067 self.activation_epoch = Some(field);
13068 }
13069 pub fn with_activation_epoch(mut self, field: u64) -> Self {
13071 self.set_activation_epoch(field);
13072 self
13073 }
13074 pub fn deactivation_epoch_opt_mut(&mut self) -> Option<&mut u64> {
13076 self.deactivation_epoch.as_mut().map(|field| field as _)
13077 }
13078 pub fn deactivation_epoch_mut(&mut self) -> &mut u64 {
13081 self.deactivation_epoch.get_or_insert_default()
13082 }
13083 pub fn deactivation_epoch_opt(&self) -> Option<u64> {
13085 self.deactivation_epoch.as_ref().map(|field| *field)
13086 }
13087 pub fn set_deactivation_epoch(&mut self, field: u64) {
13089 self.deactivation_epoch = Some(field);
13090 }
13091 pub fn with_deactivation_epoch(mut self, field: u64) -> Self {
13093 self.set_deactivation_epoch(field);
13094 self
13095 }
13096 pub fn sui_balance_opt_mut(&mut self) -> Option<&mut u64> {
13098 self.sui_balance.as_mut().map(|field| field as _)
13099 }
13100 pub fn sui_balance_mut(&mut self) -> &mut u64 {
13103 self.sui_balance.get_or_insert_default()
13104 }
13105 pub fn sui_balance_opt(&self) -> Option<u64> {
13107 self.sui_balance.as_ref().map(|field| *field)
13108 }
13109 pub fn set_sui_balance(&mut self, field: u64) {
13111 self.sui_balance = Some(field);
13112 }
13113 pub fn with_sui_balance(mut self, field: u64) -> Self {
13115 self.set_sui_balance(field);
13116 self
13117 }
13118 pub fn rewards_pool_opt_mut(&mut self) -> Option<&mut u64> {
13120 self.rewards_pool.as_mut().map(|field| field as _)
13121 }
13122 pub fn rewards_pool_mut(&mut self) -> &mut u64 {
13125 self.rewards_pool.get_or_insert_default()
13126 }
13127 pub fn rewards_pool_opt(&self) -> Option<u64> {
13129 self.rewards_pool.as_ref().map(|field| *field)
13130 }
13131 pub fn set_rewards_pool(&mut self, field: u64) {
13133 self.rewards_pool = Some(field);
13134 }
13135 pub fn with_rewards_pool(mut self, field: u64) -> Self {
13137 self.set_rewards_pool(field);
13138 self
13139 }
13140 pub fn pool_token_balance_opt_mut(&mut self) -> Option<&mut u64> {
13142 self.pool_token_balance.as_mut().map(|field| field as _)
13143 }
13144 pub fn pool_token_balance_mut(&mut self) -> &mut u64 {
13147 self.pool_token_balance.get_or_insert_default()
13148 }
13149 pub fn pool_token_balance_opt(&self) -> Option<u64> {
13151 self.pool_token_balance.as_ref().map(|field| *field)
13152 }
13153 pub fn set_pool_token_balance(&mut self, field: u64) {
13155 self.pool_token_balance = Some(field);
13156 }
13157 pub fn with_pool_token_balance(mut self, field: u64) -> Self {
13159 self.set_pool_token_balance(field);
13160 self
13161 }
13162 pub fn exchange_rates(&self) -> &super::MoveTable {
13164 self.exchange_rates
13165 .as_ref()
13166 .map(|field| field as _)
13167 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
13168 }
13169 pub fn exchange_rates_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
13171 self.exchange_rates.as_mut().map(|field| field as _)
13172 }
13173 pub fn exchange_rates_mut(&mut self) -> &mut super::MoveTable {
13176 self.exchange_rates.get_or_insert_default()
13177 }
13178 pub fn exchange_rates_opt(&self) -> Option<&super::MoveTable> {
13180 self.exchange_rates.as_ref().map(|field| field as _)
13181 }
13182 pub fn set_exchange_rates<T: Into<super::MoveTable>>(&mut self, field: T) {
13184 self.exchange_rates = Some(field.into().into());
13185 }
13186 pub fn with_exchange_rates<T: Into<super::MoveTable>>(
13188 mut self,
13189 field: T,
13190 ) -> Self {
13191 self.set_exchange_rates(field.into());
13192 self
13193 }
13194 pub fn pending_stake_opt_mut(&mut self) -> Option<&mut u64> {
13196 self.pending_stake.as_mut().map(|field| field as _)
13197 }
13198 pub fn pending_stake_mut(&mut self) -> &mut u64 {
13201 self.pending_stake.get_or_insert_default()
13202 }
13203 pub fn pending_stake_opt(&self) -> Option<u64> {
13205 self.pending_stake.as_ref().map(|field| *field)
13206 }
13207 pub fn set_pending_stake(&mut self, field: u64) {
13209 self.pending_stake = Some(field);
13210 }
13211 pub fn with_pending_stake(mut self, field: u64) -> Self {
13213 self.set_pending_stake(field);
13214 self
13215 }
13216 pub fn pending_total_sui_withdraw_opt_mut(&mut self) -> Option<&mut u64> {
13218 self.pending_total_sui_withdraw.as_mut().map(|field| field as _)
13219 }
13220 pub fn pending_total_sui_withdraw_mut(&mut self) -> &mut u64 {
13223 self.pending_total_sui_withdraw.get_or_insert_default()
13224 }
13225 pub fn pending_total_sui_withdraw_opt(&self) -> Option<u64> {
13227 self.pending_total_sui_withdraw.as_ref().map(|field| *field)
13228 }
13229 pub fn set_pending_total_sui_withdraw(&mut self, field: u64) {
13231 self.pending_total_sui_withdraw = Some(field);
13232 }
13233 pub fn with_pending_total_sui_withdraw(mut self, field: u64) -> Self {
13235 self.set_pending_total_sui_withdraw(field);
13236 self
13237 }
13238 pub fn pending_pool_token_withdraw_opt_mut(&mut self) -> Option<&mut u64> {
13240 self.pending_pool_token_withdraw.as_mut().map(|field| field as _)
13241 }
13242 pub fn pending_pool_token_withdraw_mut(&mut self) -> &mut u64 {
13245 self.pending_pool_token_withdraw.get_or_insert_default()
13246 }
13247 pub fn pending_pool_token_withdraw_opt(&self) -> Option<u64> {
13249 self.pending_pool_token_withdraw.as_ref().map(|field| *field)
13250 }
13251 pub fn set_pending_pool_token_withdraw(&mut self, field: u64) {
13253 self.pending_pool_token_withdraw = Some(field);
13254 }
13255 pub fn with_pending_pool_token_withdraw(mut self, field: u64) -> Self {
13257 self.set_pending_pool_token_withdraw(field);
13258 self
13259 }
13260 pub fn extra_fields(&self) -> &super::MoveTable {
13262 self.extra_fields
13263 .as_ref()
13264 .map(|field| field as _)
13265 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
13266 }
13267 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
13269 self.extra_fields.as_mut().map(|field| field as _)
13270 }
13271 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
13274 self.extra_fields.get_or_insert_default()
13275 }
13276 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
13278 self.extra_fields.as_ref().map(|field| field as _)
13279 }
13280 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
13282 self.extra_fields = Some(field.into().into());
13283 }
13284 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
13286 self.set_extra_fields(field.into());
13287 self
13288 }
13289 }
13290 impl super::StorageFund {
13291 pub const fn const_default() -> Self {
13292 Self {
13293 total_object_storage_rebates: None,
13294 non_refundable_balance: None,
13295 }
13296 }
13297 #[doc(hidden)]
13298 pub fn default_instance() -> &'static Self {
13299 static DEFAULT: super::StorageFund = super::StorageFund::const_default();
13300 &DEFAULT
13301 }
13302 pub fn total_object_storage_rebates_opt_mut(&mut self) -> Option<&mut u64> {
13304 self.total_object_storage_rebates.as_mut().map(|field| field as _)
13305 }
13306 pub fn total_object_storage_rebates_mut(&mut self) -> &mut u64 {
13309 self.total_object_storage_rebates.get_or_insert_default()
13310 }
13311 pub fn total_object_storage_rebates_opt(&self) -> Option<u64> {
13313 self.total_object_storage_rebates.as_ref().map(|field| *field)
13314 }
13315 pub fn set_total_object_storage_rebates(&mut self, field: u64) {
13317 self.total_object_storage_rebates = Some(field);
13318 }
13319 pub fn with_total_object_storage_rebates(mut self, field: u64) -> Self {
13321 self.set_total_object_storage_rebates(field);
13322 self
13323 }
13324 pub fn non_refundable_balance_opt_mut(&mut self) -> Option<&mut u64> {
13326 self.non_refundable_balance.as_mut().map(|field| field as _)
13327 }
13328 pub fn non_refundable_balance_mut(&mut self) -> &mut u64 {
13331 self.non_refundable_balance.get_or_insert_default()
13332 }
13333 pub fn non_refundable_balance_opt(&self) -> Option<u64> {
13335 self.non_refundable_balance.as_ref().map(|field| *field)
13336 }
13337 pub fn set_non_refundable_balance(&mut self, field: u64) {
13339 self.non_refundable_balance = Some(field);
13340 }
13341 pub fn with_non_refundable_balance(mut self, field: u64) -> Self {
13343 self.set_non_refundable_balance(field);
13344 self
13345 }
13346 }
13347 impl super::SubscribeCheckpointsRequest {
13348 pub const fn const_default() -> Self {
13349 Self { read_mask: None }
13350 }
13351 #[doc(hidden)]
13352 pub fn default_instance() -> &'static Self {
13353 static DEFAULT: super::SubscribeCheckpointsRequest = super::SubscribeCheckpointsRequest::const_default();
13354 &DEFAULT
13355 }
13356 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
13358 self.read_mask.as_mut().map(|field| field as _)
13359 }
13360 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
13363 self.read_mask.get_or_insert_default()
13364 }
13365 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
13367 self.read_mask.as_ref().map(|field| field as _)
13368 }
13369 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
13371 self.read_mask = Some(field.into().into());
13372 }
13373 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
13375 mut self,
13376 field: T,
13377 ) -> Self {
13378 self.set_read_mask(field.into());
13379 self
13380 }
13381 }
13382 impl super::SubscribeCheckpointsResponse {
13383 pub const fn const_default() -> Self {
13384 Self {
13385 cursor: None,
13386 checkpoint: None,
13387 }
13388 }
13389 #[doc(hidden)]
13390 pub fn default_instance() -> &'static Self {
13391 static DEFAULT: super::SubscribeCheckpointsResponse = super::SubscribeCheckpointsResponse::const_default();
13392 &DEFAULT
13393 }
13394 pub fn cursor_opt_mut(&mut self) -> Option<&mut u64> {
13396 self.cursor.as_mut().map(|field| field as _)
13397 }
13398 pub fn cursor_mut(&mut self) -> &mut u64 {
13401 self.cursor.get_or_insert_default()
13402 }
13403 pub fn cursor_opt(&self) -> Option<u64> {
13405 self.cursor.as_ref().map(|field| *field)
13406 }
13407 pub fn set_cursor(&mut self, field: u64) {
13409 self.cursor = Some(field);
13410 }
13411 pub fn with_cursor(mut self, field: u64) -> Self {
13413 self.set_cursor(field);
13414 self
13415 }
13416 pub fn checkpoint(&self) -> &super::Checkpoint {
13418 self.checkpoint
13419 .as_ref()
13420 .map(|field| field as _)
13421 .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
13422 }
13423 pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
13425 self.checkpoint.as_mut().map(|field| field as _)
13426 }
13427 pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
13430 self.checkpoint.get_or_insert_default()
13431 }
13432 pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
13434 self.checkpoint.as_ref().map(|field| field as _)
13435 }
13436 pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
13438 self.checkpoint = Some(field.into().into());
13439 }
13440 pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
13442 self.set_checkpoint(field.into());
13443 self
13444 }
13445 }
13446 impl super::SystemPackage {
13447 pub const fn const_default() -> Self {
13448 Self {
13449 version: None,
13450 modules: Vec::new(),
13451 dependencies: Vec::new(),
13452 }
13453 }
13454 #[doc(hidden)]
13455 pub fn default_instance() -> &'static Self {
13456 static DEFAULT: super::SystemPackage = super::SystemPackage::const_default();
13457 &DEFAULT
13458 }
13459 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
13461 self.version.as_mut().map(|field| field as _)
13462 }
13463 pub fn version_mut(&mut self) -> &mut u64 {
13466 self.version.get_or_insert_default()
13467 }
13468 pub fn version_opt(&self) -> Option<u64> {
13470 self.version.as_ref().map(|field| *field)
13471 }
13472 pub fn set_version(&mut self, field: u64) {
13474 self.version = Some(field);
13475 }
13476 pub fn with_version(mut self, field: u64) -> Self {
13478 self.set_version(field);
13479 self
13480 }
13481 pub fn modules(&self) -> &[::prost::bytes::Bytes] {
13483 &self.modules
13484 }
13485 pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
13488 &mut self.modules
13489 }
13490 pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
13492 self.modules = field;
13493 }
13494 pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
13496 self.set_modules(field);
13497 self
13498 }
13499 pub fn dependencies(&self) -> &[String] {
13501 &self.dependencies
13502 }
13503 pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
13506 &mut self.dependencies
13507 }
13508 pub fn set_dependencies(&mut self, field: Vec<String>) {
13510 self.dependencies = field;
13511 }
13512 pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
13514 self.set_dependencies(field);
13515 self
13516 }
13517 }
13518 impl super::SystemParameters {
13519 pub const fn const_default() -> Self {
13520 Self {
13521 epoch_duration_ms: None,
13522 stake_subsidy_start_epoch: None,
13523 min_validator_count: None,
13524 max_validator_count: None,
13525 min_validator_joining_stake: None,
13526 validator_low_stake_threshold: None,
13527 validator_very_low_stake_threshold: None,
13528 validator_low_stake_grace_period: None,
13529 extra_fields: None,
13530 }
13531 }
13532 #[doc(hidden)]
13533 pub fn default_instance() -> &'static Self {
13534 static DEFAULT: super::SystemParameters = super::SystemParameters::const_default();
13535 &DEFAULT
13536 }
13537 pub fn epoch_duration_ms_opt_mut(&mut self) -> Option<&mut u64> {
13539 self.epoch_duration_ms.as_mut().map(|field| field as _)
13540 }
13541 pub fn epoch_duration_ms_mut(&mut self) -> &mut u64 {
13544 self.epoch_duration_ms.get_or_insert_default()
13545 }
13546 pub fn epoch_duration_ms_opt(&self) -> Option<u64> {
13548 self.epoch_duration_ms.as_ref().map(|field| *field)
13549 }
13550 pub fn set_epoch_duration_ms(&mut self, field: u64) {
13552 self.epoch_duration_ms = Some(field);
13553 }
13554 pub fn with_epoch_duration_ms(mut self, field: u64) -> Self {
13556 self.set_epoch_duration_ms(field);
13557 self
13558 }
13559 pub fn stake_subsidy_start_epoch_opt_mut(&mut self) -> Option<&mut u64> {
13561 self.stake_subsidy_start_epoch.as_mut().map(|field| field as _)
13562 }
13563 pub fn stake_subsidy_start_epoch_mut(&mut self) -> &mut u64 {
13566 self.stake_subsidy_start_epoch.get_or_insert_default()
13567 }
13568 pub fn stake_subsidy_start_epoch_opt(&self) -> Option<u64> {
13570 self.stake_subsidy_start_epoch.as_ref().map(|field| *field)
13571 }
13572 pub fn set_stake_subsidy_start_epoch(&mut self, field: u64) {
13574 self.stake_subsidy_start_epoch = Some(field);
13575 }
13576 pub fn with_stake_subsidy_start_epoch(mut self, field: u64) -> Self {
13578 self.set_stake_subsidy_start_epoch(field);
13579 self
13580 }
13581 pub fn min_validator_count_opt_mut(&mut self) -> Option<&mut u64> {
13583 self.min_validator_count.as_mut().map(|field| field as _)
13584 }
13585 pub fn min_validator_count_mut(&mut self) -> &mut u64 {
13588 self.min_validator_count.get_or_insert_default()
13589 }
13590 pub fn min_validator_count_opt(&self) -> Option<u64> {
13592 self.min_validator_count.as_ref().map(|field| *field)
13593 }
13594 pub fn set_min_validator_count(&mut self, field: u64) {
13596 self.min_validator_count = Some(field);
13597 }
13598 pub fn with_min_validator_count(mut self, field: u64) -> Self {
13600 self.set_min_validator_count(field);
13601 self
13602 }
13603 pub fn max_validator_count_opt_mut(&mut self) -> Option<&mut u64> {
13605 self.max_validator_count.as_mut().map(|field| field as _)
13606 }
13607 pub fn max_validator_count_mut(&mut self) -> &mut u64 {
13610 self.max_validator_count.get_or_insert_default()
13611 }
13612 pub fn max_validator_count_opt(&self) -> Option<u64> {
13614 self.max_validator_count.as_ref().map(|field| *field)
13615 }
13616 pub fn set_max_validator_count(&mut self, field: u64) {
13618 self.max_validator_count = Some(field);
13619 }
13620 pub fn with_max_validator_count(mut self, field: u64) -> Self {
13622 self.set_max_validator_count(field);
13623 self
13624 }
13625 pub fn min_validator_joining_stake_opt_mut(&mut self) -> Option<&mut u64> {
13627 self.min_validator_joining_stake.as_mut().map(|field| field as _)
13628 }
13629 pub fn min_validator_joining_stake_mut(&mut self) -> &mut u64 {
13632 self.min_validator_joining_stake.get_or_insert_default()
13633 }
13634 pub fn min_validator_joining_stake_opt(&self) -> Option<u64> {
13636 self.min_validator_joining_stake.as_ref().map(|field| *field)
13637 }
13638 pub fn set_min_validator_joining_stake(&mut self, field: u64) {
13640 self.min_validator_joining_stake = Some(field);
13641 }
13642 pub fn with_min_validator_joining_stake(mut self, field: u64) -> Self {
13644 self.set_min_validator_joining_stake(field);
13645 self
13646 }
13647 pub fn validator_low_stake_threshold_opt_mut(&mut self) -> Option<&mut u64> {
13649 self.validator_low_stake_threshold.as_mut().map(|field| field as _)
13650 }
13651 pub fn validator_low_stake_threshold_mut(&mut self) -> &mut u64 {
13654 self.validator_low_stake_threshold.get_or_insert_default()
13655 }
13656 pub fn validator_low_stake_threshold_opt(&self) -> Option<u64> {
13658 self.validator_low_stake_threshold.as_ref().map(|field| *field)
13659 }
13660 pub fn set_validator_low_stake_threshold(&mut self, field: u64) {
13662 self.validator_low_stake_threshold = Some(field);
13663 }
13664 pub fn with_validator_low_stake_threshold(mut self, field: u64) -> Self {
13666 self.set_validator_low_stake_threshold(field);
13667 self
13668 }
13669 pub fn validator_very_low_stake_threshold_opt_mut(
13671 &mut self,
13672 ) -> Option<&mut u64> {
13673 self.validator_very_low_stake_threshold.as_mut().map(|field| field as _)
13674 }
13675 pub fn validator_very_low_stake_threshold_mut(&mut self) -> &mut u64 {
13678 self.validator_very_low_stake_threshold.get_or_insert_default()
13679 }
13680 pub fn validator_very_low_stake_threshold_opt(&self) -> Option<u64> {
13682 self.validator_very_low_stake_threshold.as_ref().map(|field| *field)
13683 }
13684 pub fn set_validator_very_low_stake_threshold(&mut self, field: u64) {
13686 self.validator_very_low_stake_threshold = Some(field);
13687 }
13688 pub fn with_validator_very_low_stake_threshold(mut self, field: u64) -> Self {
13690 self.set_validator_very_low_stake_threshold(field);
13691 self
13692 }
13693 pub fn validator_low_stake_grace_period_opt_mut(&mut self) -> Option<&mut u64> {
13695 self.validator_low_stake_grace_period.as_mut().map(|field| field as _)
13696 }
13697 pub fn validator_low_stake_grace_period_mut(&mut self) -> &mut u64 {
13700 self.validator_low_stake_grace_period.get_or_insert_default()
13701 }
13702 pub fn validator_low_stake_grace_period_opt(&self) -> Option<u64> {
13704 self.validator_low_stake_grace_period.as_ref().map(|field| *field)
13705 }
13706 pub fn set_validator_low_stake_grace_period(&mut self, field: u64) {
13708 self.validator_low_stake_grace_period = Some(field);
13709 }
13710 pub fn with_validator_low_stake_grace_period(mut self, field: u64) -> Self {
13712 self.set_validator_low_stake_grace_period(field);
13713 self
13714 }
13715 pub fn extra_fields(&self) -> &super::MoveTable {
13717 self.extra_fields
13718 .as_ref()
13719 .map(|field| field as _)
13720 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
13721 }
13722 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
13724 self.extra_fields.as_mut().map(|field| field as _)
13725 }
13726 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
13729 self.extra_fields.get_or_insert_default()
13730 }
13731 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
13733 self.extra_fields.as_ref().map(|field| field as _)
13734 }
13735 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
13737 self.extra_fields = Some(field.into().into());
13738 }
13739 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
13741 self.set_extra_fields(field.into());
13742 self
13743 }
13744 }
13745 impl super::SystemState {
13746 pub const fn const_default() -> Self {
13747 Self {
13748 version: None,
13749 epoch: None,
13750 protocol_version: None,
13751 validators: None,
13752 storage_fund: None,
13753 parameters: None,
13754 reference_gas_price: None,
13755 validator_report_records: Vec::new(),
13756 stake_subsidy: None,
13757 safe_mode: None,
13758 safe_mode_storage_rewards: None,
13759 safe_mode_computation_rewards: None,
13760 safe_mode_storage_rebates: None,
13761 safe_mode_non_refundable_storage_fee: None,
13762 epoch_start_timestamp_ms: None,
13763 extra_fields: None,
13764 }
13765 }
13766 #[doc(hidden)]
13767 pub fn default_instance() -> &'static Self {
13768 static DEFAULT: super::SystemState = super::SystemState::const_default();
13769 &DEFAULT
13770 }
13771 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
13773 self.version.as_mut().map(|field| field as _)
13774 }
13775 pub fn version_mut(&mut self) -> &mut u64 {
13778 self.version.get_or_insert_default()
13779 }
13780 pub fn version_opt(&self) -> Option<u64> {
13782 self.version.as_ref().map(|field| *field)
13783 }
13784 pub fn set_version(&mut self, field: u64) {
13786 self.version = Some(field);
13787 }
13788 pub fn with_version(mut self, field: u64) -> Self {
13790 self.set_version(field);
13791 self
13792 }
13793 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
13795 self.epoch.as_mut().map(|field| field as _)
13796 }
13797 pub fn epoch_mut(&mut self) -> &mut u64 {
13800 self.epoch.get_or_insert_default()
13801 }
13802 pub fn epoch_opt(&self) -> Option<u64> {
13804 self.epoch.as_ref().map(|field| *field)
13805 }
13806 pub fn set_epoch(&mut self, field: u64) {
13808 self.epoch = Some(field);
13809 }
13810 pub fn with_epoch(mut self, field: u64) -> Self {
13812 self.set_epoch(field);
13813 self
13814 }
13815 pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
13817 self.protocol_version.as_mut().map(|field| field as _)
13818 }
13819 pub fn protocol_version_mut(&mut self) -> &mut u64 {
13822 self.protocol_version.get_or_insert_default()
13823 }
13824 pub fn protocol_version_opt(&self) -> Option<u64> {
13826 self.protocol_version.as_ref().map(|field| *field)
13827 }
13828 pub fn set_protocol_version(&mut self, field: u64) {
13830 self.protocol_version = Some(field);
13831 }
13832 pub fn with_protocol_version(mut self, field: u64) -> Self {
13834 self.set_protocol_version(field);
13835 self
13836 }
13837 pub fn validators(&self) -> &super::ValidatorSet {
13839 self.validators
13840 .as_ref()
13841 .map(|field| field as _)
13842 .unwrap_or_else(|| super::ValidatorSet::default_instance() as _)
13843 }
13844 pub fn validators_opt_mut(&mut self) -> Option<&mut super::ValidatorSet> {
13846 self.validators.as_mut().map(|field| field as _)
13847 }
13848 pub fn validators_mut(&mut self) -> &mut super::ValidatorSet {
13851 self.validators.get_or_insert_default()
13852 }
13853 pub fn validators_opt(&self) -> Option<&super::ValidatorSet> {
13855 self.validators.as_ref().map(|field| field as _)
13856 }
13857 pub fn set_validators<T: Into<super::ValidatorSet>>(&mut self, field: T) {
13859 self.validators = Some(field.into().into());
13860 }
13861 pub fn with_validators<T: Into<super::ValidatorSet>>(
13863 mut self,
13864 field: T,
13865 ) -> Self {
13866 self.set_validators(field.into());
13867 self
13868 }
13869 pub fn storage_fund(&self) -> &super::StorageFund {
13871 self.storage_fund
13872 .as_ref()
13873 .map(|field| field as _)
13874 .unwrap_or_else(|| super::StorageFund::default_instance() as _)
13875 }
13876 pub fn storage_fund_opt_mut(&mut self) -> Option<&mut super::StorageFund> {
13878 self.storage_fund.as_mut().map(|field| field as _)
13879 }
13880 pub fn storage_fund_mut(&mut self) -> &mut super::StorageFund {
13883 self.storage_fund.get_or_insert_default()
13884 }
13885 pub fn storage_fund_opt(&self) -> Option<&super::StorageFund> {
13887 self.storage_fund.as_ref().map(|field| field as _)
13888 }
13889 pub fn set_storage_fund<T: Into<super::StorageFund>>(&mut self, field: T) {
13891 self.storage_fund = Some(field.into().into());
13892 }
13893 pub fn with_storage_fund<T: Into<super::StorageFund>>(
13895 mut self,
13896 field: T,
13897 ) -> Self {
13898 self.set_storage_fund(field.into());
13899 self
13900 }
13901 pub fn parameters(&self) -> &super::SystemParameters {
13903 self.parameters
13904 .as_ref()
13905 .map(|field| field as _)
13906 .unwrap_or_else(|| super::SystemParameters::default_instance() as _)
13907 }
13908 pub fn parameters_opt_mut(&mut self) -> Option<&mut super::SystemParameters> {
13910 self.parameters.as_mut().map(|field| field as _)
13911 }
13912 pub fn parameters_mut(&mut self) -> &mut super::SystemParameters {
13915 self.parameters.get_or_insert_default()
13916 }
13917 pub fn parameters_opt(&self) -> Option<&super::SystemParameters> {
13919 self.parameters.as_ref().map(|field| field as _)
13920 }
13921 pub fn set_parameters<T: Into<super::SystemParameters>>(&mut self, field: T) {
13923 self.parameters = Some(field.into().into());
13924 }
13925 pub fn with_parameters<T: Into<super::SystemParameters>>(
13927 mut self,
13928 field: T,
13929 ) -> Self {
13930 self.set_parameters(field.into());
13931 self
13932 }
13933 pub fn reference_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
13935 self.reference_gas_price.as_mut().map(|field| field as _)
13936 }
13937 pub fn reference_gas_price_mut(&mut self) -> &mut u64 {
13940 self.reference_gas_price.get_or_insert_default()
13941 }
13942 pub fn reference_gas_price_opt(&self) -> Option<u64> {
13944 self.reference_gas_price.as_ref().map(|field| *field)
13945 }
13946 pub fn set_reference_gas_price(&mut self, field: u64) {
13948 self.reference_gas_price = Some(field);
13949 }
13950 pub fn with_reference_gas_price(mut self, field: u64) -> Self {
13952 self.set_reference_gas_price(field);
13953 self
13954 }
13955 pub fn validator_report_records(&self) -> &[super::ValidatorReportRecord] {
13957 &self.validator_report_records
13958 }
13959 pub fn validator_report_records_mut(
13962 &mut self,
13963 ) -> &mut Vec<super::ValidatorReportRecord> {
13964 &mut self.validator_report_records
13965 }
13966 pub fn set_validator_report_records(
13968 &mut self,
13969 field: Vec<super::ValidatorReportRecord>,
13970 ) {
13971 self.validator_report_records = field;
13972 }
13973 pub fn with_validator_report_records(
13975 mut self,
13976 field: Vec<super::ValidatorReportRecord>,
13977 ) -> Self {
13978 self.set_validator_report_records(field);
13979 self
13980 }
13981 pub fn stake_subsidy(&self) -> &super::StakeSubsidy {
13983 self.stake_subsidy
13984 .as_ref()
13985 .map(|field| field as _)
13986 .unwrap_or_else(|| super::StakeSubsidy::default_instance() as _)
13987 }
13988 pub fn stake_subsidy_opt_mut(&mut self) -> Option<&mut super::StakeSubsidy> {
13990 self.stake_subsidy.as_mut().map(|field| field as _)
13991 }
13992 pub fn stake_subsidy_mut(&mut self) -> &mut super::StakeSubsidy {
13995 self.stake_subsidy.get_or_insert_default()
13996 }
13997 pub fn stake_subsidy_opt(&self) -> Option<&super::StakeSubsidy> {
13999 self.stake_subsidy.as_ref().map(|field| field as _)
14000 }
14001 pub fn set_stake_subsidy<T: Into<super::StakeSubsidy>>(&mut self, field: T) {
14003 self.stake_subsidy = Some(field.into().into());
14004 }
14005 pub fn with_stake_subsidy<T: Into<super::StakeSubsidy>>(
14007 mut self,
14008 field: T,
14009 ) -> Self {
14010 self.set_stake_subsidy(field.into());
14011 self
14012 }
14013 pub fn safe_mode_opt_mut(&mut self) -> Option<&mut bool> {
14015 self.safe_mode.as_mut().map(|field| field as _)
14016 }
14017 pub fn safe_mode_mut(&mut self) -> &mut bool {
14020 self.safe_mode.get_or_insert_default()
14021 }
14022 pub fn safe_mode_opt(&self) -> Option<bool> {
14024 self.safe_mode.as_ref().map(|field| *field)
14025 }
14026 pub fn set_safe_mode(&mut self, field: bool) {
14028 self.safe_mode = Some(field);
14029 }
14030 pub fn with_safe_mode(mut self, field: bool) -> Self {
14032 self.set_safe_mode(field);
14033 self
14034 }
14035 pub fn safe_mode_storage_rewards_opt_mut(&mut self) -> Option<&mut u64> {
14037 self.safe_mode_storage_rewards.as_mut().map(|field| field as _)
14038 }
14039 pub fn safe_mode_storage_rewards_mut(&mut self) -> &mut u64 {
14042 self.safe_mode_storage_rewards.get_or_insert_default()
14043 }
14044 pub fn safe_mode_storage_rewards_opt(&self) -> Option<u64> {
14046 self.safe_mode_storage_rewards.as_ref().map(|field| *field)
14047 }
14048 pub fn set_safe_mode_storage_rewards(&mut self, field: u64) {
14050 self.safe_mode_storage_rewards = Some(field);
14051 }
14052 pub fn with_safe_mode_storage_rewards(mut self, field: u64) -> Self {
14054 self.set_safe_mode_storage_rewards(field);
14055 self
14056 }
14057 pub fn safe_mode_computation_rewards_opt_mut(&mut self) -> Option<&mut u64> {
14059 self.safe_mode_computation_rewards.as_mut().map(|field| field as _)
14060 }
14061 pub fn safe_mode_computation_rewards_mut(&mut self) -> &mut u64 {
14064 self.safe_mode_computation_rewards.get_or_insert_default()
14065 }
14066 pub fn safe_mode_computation_rewards_opt(&self) -> Option<u64> {
14068 self.safe_mode_computation_rewards.as_ref().map(|field| *field)
14069 }
14070 pub fn set_safe_mode_computation_rewards(&mut self, field: u64) {
14072 self.safe_mode_computation_rewards = Some(field);
14073 }
14074 pub fn with_safe_mode_computation_rewards(mut self, field: u64) -> Self {
14076 self.set_safe_mode_computation_rewards(field);
14077 self
14078 }
14079 pub fn safe_mode_storage_rebates_opt_mut(&mut self) -> Option<&mut u64> {
14081 self.safe_mode_storage_rebates.as_mut().map(|field| field as _)
14082 }
14083 pub fn safe_mode_storage_rebates_mut(&mut self) -> &mut u64 {
14086 self.safe_mode_storage_rebates.get_or_insert_default()
14087 }
14088 pub fn safe_mode_storage_rebates_opt(&self) -> Option<u64> {
14090 self.safe_mode_storage_rebates.as_ref().map(|field| *field)
14091 }
14092 pub fn set_safe_mode_storage_rebates(&mut self, field: u64) {
14094 self.safe_mode_storage_rebates = Some(field);
14095 }
14096 pub fn with_safe_mode_storage_rebates(mut self, field: u64) -> Self {
14098 self.set_safe_mode_storage_rebates(field);
14099 self
14100 }
14101 pub fn safe_mode_non_refundable_storage_fee_opt_mut(
14103 &mut self,
14104 ) -> Option<&mut u64> {
14105 self.safe_mode_non_refundable_storage_fee.as_mut().map(|field| field as _)
14106 }
14107 pub fn safe_mode_non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
14110 self.safe_mode_non_refundable_storage_fee.get_or_insert_default()
14111 }
14112 pub fn safe_mode_non_refundable_storage_fee_opt(&self) -> Option<u64> {
14114 self.safe_mode_non_refundable_storage_fee.as_ref().map(|field| *field)
14115 }
14116 pub fn set_safe_mode_non_refundable_storage_fee(&mut self, field: u64) {
14118 self.safe_mode_non_refundable_storage_fee = Some(field);
14119 }
14120 pub fn with_safe_mode_non_refundable_storage_fee(mut self, field: u64) -> Self {
14122 self.set_safe_mode_non_refundable_storage_fee(field);
14123 self
14124 }
14125 pub fn epoch_start_timestamp_ms_opt_mut(&mut self) -> Option<&mut u64> {
14127 self.epoch_start_timestamp_ms.as_mut().map(|field| field as _)
14128 }
14129 pub fn epoch_start_timestamp_ms_mut(&mut self) -> &mut u64 {
14132 self.epoch_start_timestamp_ms.get_or_insert_default()
14133 }
14134 pub fn epoch_start_timestamp_ms_opt(&self) -> Option<u64> {
14136 self.epoch_start_timestamp_ms.as_ref().map(|field| *field)
14137 }
14138 pub fn set_epoch_start_timestamp_ms(&mut self, field: u64) {
14140 self.epoch_start_timestamp_ms = Some(field);
14141 }
14142 pub fn with_epoch_start_timestamp_ms(mut self, field: u64) -> Self {
14144 self.set_epoch_start_timestamp_ms(field);
14145 self
14146 }
14147 pub fn extra_fields(&self) -> &super::MoveTable {
14149 self.extra_fields
14150 .as_ref()
14151 .map(|field| field as _)
14152 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
14153 }
14154 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
14156 self.extra_fields.as_mut().map(|field| field as _)
14157 }
14158 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
14161 self.extra_fields.get_or_insert_default()
14162 }
14163 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
14165 self.extra_fields.as_ref().map(|field| field as _)
14166 }
14167 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
14169 self.extra_fields = Some(field.into().into());
14170 }
14171 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
14173 self.set_extra_fields(field.into());
14174 self
14175 }
14176 }
14177 impl super::Transaction {
14178 pub const fn const_default() -> Self {
14179 Self {
14180 bcs: None,
14181 digest: None,
14182 version: None,
14183 kind: None,
14184 sender: None,
14185 gas_payment: None,
14186 expiration: None,
14187 }
14188 }
14189 #[doc(hidden)]
14190 pub fn default_instance() -> &'static Self {
14191 static DEFAULT: super::Transaction = super::Transaction::const_default();
14192 &DEFAULT
14193 }
14194 pub fn bcs(&self) -> &super::Bcs {
14196 self.bcs
14197 .as_ref()
14198 .map(|field| field as _)
14199 .unwrap_or_else(|| super::Bcs::default_instance() as _)
14200 }
14201 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
14203 self.bcs.as_mut().map(|field| field as _)
14204 }
14205 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
14208 self.bcs.get_or_insert_default()
14209 }
14210 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
14212 self.bcs.as_ref().map(|field| field as _)
14213 }
14214 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
14216 self.bcs = Some(field.into().into());
14217 }
14218 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
14220 self.set_bcs(field.into());
14221 self
14222 }
14223 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
14225 self.digest.as_mut().map(|field| field as _)
14226 }
14227 pub fn digest_mut(&mut self) -> &mut String {
14230 self.digest.get_or_insert_default()
14231 }
14232 pub fn digest_opt(&self) -> Option<&str> {
14234 self.digest.as_ref().map(|field| field as _)
14235 }
14236 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
14238 self.digest = Some(field.into().into());
14239 }
14240 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
14242 self.set_digest(field.into());
14243 self
14244 }
14245 pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
14247 self.version.as_mut().map(|field| field as _)
14248 }
14249 pub fn version_mut(&mut self) -> &mut i32 {
14252 self.version.get_or_insert_default()
14253 }
14254 pub fn version_opt(&self) -> Option<i32> {
14256 self.version.as_ref().map(|field| *field)
14257 }
14258 pub fn set_version(&mut self, field: i32) {
14260 self.version = Some(field);
14261 }
14262 pub fn with_version(mut self, field: i32) -> Self {
14264 self.set_version(field);
14265 self
14266 }
14267 pub fn kind(&self) -> &super::TransactionKind {
14269 self.kind
14270 .as_ref()
14271 .map(|field| field as _)
14272 .unwrap_or_else(|| super::TransactionKind::default_instance() as _)
14273 }
14274 pub fn kind_opt_mut(&mut self) -> Option<&mut super::TransactionKind> {
14276 self.kind.as_mut().map(|field| field as _)
14277 }
14278 pub fn kind_mut(&mut self) -> &mut super::TransactionKind {
14281 self.kind.get_or_insert_default()
14282 }
14283 pub fn kind_opt(&self) -> Option<&super::TransactionKind> {
14285 self.kind.as_ref().map(|field| field as _)
14286 }
14287 pub fn set_kind<T: Into<super::TransactionKind>>(&mut self, field: T) {
14289 self.kind = Some(field.into().into());
14290 }
14291 pub fn with_kind<T: Into<super::TransactionKind>>(mut self, field: T) -> Self {
14293 self.set_kind(field.into());
14294 self
14295 }
14296 pub fn sender_opt_mut(&mut self) -> Option<&mut String> {
14298 self.sender.as_mut().map(|field| field as _)
14299 }
14300 pub fn sender_mut(&mut self) -> &mut String {
14303 self.sender.get_or_insert_default()
14304 }
14305 pub fn sender_opt(&self) -> Option<&str> {
14307 self.sender.as_ref().map(|field| field as _)
14308 }
14309 pub fn set_sender<T: Into<String>>(&mut self, field: T) {
14311 self.sender = Some(field.into().into());
14312 }
14313 pub fn with_sender<T: Into<String>>(mut self, field: T) -> Self {
14315 self.set_sender(field.into());
14316 self
14317 }
14318 pub fn gas_payment(&self) -> &super::GasPayment {
14320 self.gas_payment
14321 .as_ref()
14322 .map(|field| field as _)
14323 .unwrap_or_else(|| super::GasPayment::default_instance() as _)
14324 }
14325 pub fn gas_payment_opt_mut(&mut self) -> Option<&mut super::GasPayment> {
14327 self.gas_payment.as_mut().map(|field| field as _)
14328 }
14329 pub fn gas_payment_mut(&mut self) -> &mut super::GasPayment {
14332 self.gas_payment.get_or_insert_default()
14333 }
14334 pub fn gas_payment_opt(&self) -> Option<&super::GasPayment> {
14336 self.gas_payment.as_ref().map(|field| field as _)
14337 }
14338 pub fn set_gas_payment<T: Into<super::GasPayment>>(&mut self, field: T) {
14340 self.gas_payment = Some(field.into().into());
14341 }
14342 pub fn with_gas_payment<T: Into<super::GasPayment>>(mut self, field: T) -> Self {
14344 self.set_gas_payment(field.into());
14345 self
14346 }
14347 pub fn expiration(&self) -> &super::TransactionExpiration {
14349 self.expiration
14350 .as_ref()
14351 .map(|field| field as _)
14352 .unwrap_or_else(|| super::TransactionExpiration::default_instance() as _)
14353 }
14354 pub fn expiration_opt_mut(
14356 &mut self,
14357 ) -> Option<&mut super::TransactionExpiration> {
14358 self.expiration.as_mut().map(|field| field as _)
14359 }
14360 pub fn expiration_mut(&mut self) -> &mut super::TransactionExpiration {
14363 self.expiration.get_or_insert_default()
14364 }
14365 pub fn expiration_opt(&self) -> Option<&super::TransactionExpiration> {
14367 self.expiration.as_ref().map(|field| field as _)
14368 }
14369 pub fn set_expiration<T: Into<super::TransactionExpiration>>(
14371 &mut self,
14372 field: T,
14373 ) {
14374 self.expiration = Some(field.into().into());
14375 }
14376 pub fn with_expiration<T: Into<super::TransactionExpiration>>(
14378 mut self,
14379 field: T,
14380 ) -> Self {
14381 self.set_expiration(field.into());
14382 self
14383 }
14384 }
14385 impl super::TransactionEffects {
14386 pub const fn const_default() -> Self {
14387 Self {
14388 bcs: None,
14389 digest: None,
14390 version: None,
14391 status: None,
14392 epoch: None,
14393 gas_used: None,
14394 transaction_digest: None,
14395 gas_object: None,
14396 events_digest: None,
14397 dependencies: Vec::new(),
14398 lamport_version: None,
14399 changed_objects: Vec::new(),
14400 unchanged_consensus_objects: Vec::new(),
14401 auxiliary_data_digest: None,
14402 unchanged_loaded_runtime_objects: Vec::new(),
14403 }
14404 }
14405 #[doc(hidden)]
14406 pub fn default_instance() -> &'static Self {
14407 static DEFAULT: super::TransactionEffects = super::TransactionEffects::const_default();
14408 &DEFAULT
14409 }
14410 pub fn bcs(&self) -> &super::Bcs {
14412 self.bcs
14413 .as_ref()
14414 .map(|field| field as _)
14415 .unwrap_or_else(|| super::Bcs::default_instance() as _)
14416 }
14417 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
14419 self.bcs.as_mut().map(|field| field as _)
14420 }
14421 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
14424 self.bcs.get_or_insert_default()
14425 }
14426 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
14428 self.bcs.as_ref().map(|field| field as _)
14429 }
14430 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
14432 self.bcs = Some(field.into().into());
14433 }
14434 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
14436 self.set_bcs(field.into());
14437 self
14438 }
14439 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
14441 self.digest.as_mut().map(|field| field as _)
14442 }
14443 pub fn digest_mut(&mut self) -> &mut String {
14446 self.digest.get_or_insert_default()
14447 }
14448 pub fn digest_opt(&self) -> Option<&str> {
14450 self.digest.as_ref().map(|field| field as _)
14451 }
14452 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
14454 self.digest = Some(field.into().into());
14455 }
14456 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
14458 self.set_digest(field.into());
14459 self
14460 }
14461 pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
14463 self.version.as_mut().map(|field| field as _)
14464 }
14465 pub fn version_mut(&mut self) -> &mut i32 {
14468 self.version.get_or_insert_default()
14469 }
14470 pub fn version_opt(&self) -> Option<i32> {
14472 self.version.as_ref().map(|field| *field)
14473 }
14474 pub fn set_version(&mut self, field: i32) {
14476 self.version = Some(field);
14477 }
14478 pub fn with_version(mut self, field: i32) -> Self {
14480 self.set_version(field);
14481 self
14482 }
14483 pub fn status(&self) -> &super::ExecutionStatus {
14485 self.status
14486 .as_ref()
14487 .map(|field| field as _)
14488 .unwrap_or_else(|| super::ExecutionStatus::default_instance() as _)
14489 }
14490 pub fn status_opt_mut(&mut self) -> Option<&mut super::ExecutionStatus> {
14492 self.status.as_mut().map(|field| field as _)
14493 }
14494 pub fn status_mut(&mut self) -> &mut super::ExecutionStatus {
14497 self.status.get_or_insert_default()
14498 }
14499 pub fn status_opt(&self) -> Option<&super::ExecutionStatus> {
14501 self.status.as_ref().map(|field| field as _)
14502 }
14503 pub fn set_status<T: Into<super::ExecutionStatus>>(&mut self, field: T) {
14505 self.status = Some(field.into().into());
14506 }
14507 pub fn with_status<T: Into<super::ExecutionStatus>>(mut self, field: T) -> Self {
14509 self.set_status(field.into());
14510 self
14511 }
14512 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
14514 self.epoch.as_mut().map(|field| field as _)
14515 }
14516 pub fn epoch_mut(&mut self) -> &mut u64 {
14519 self.epoch.get_or_insert_default()
14520 }
14521 pub fn epoch_opt(&self) -> Option<u64> {
14523 self.epoch.as_ref().map(|field| *field)
14524 }
14525 pub fn set_epoch(&mut self, field: u64) {
14527 self.epoch = Some(field);
14528 }
14529 pub fn with_epoch(mut self, field: u64) -> Self {
14531 self.set_epoch(field);
14532 self
14533 }
14534 pub fn gas_used(&self) -> &super::GasCostSummary {
14536 self.gas_used
14537 .as_ref()
14538 .map(|field| field as _)
14539 .unwrap_or_else(|| super::GasCostSummary::default_instance() as _)
14540 }
14541 pub fn gas_used_opt_mut(&mut self) -> Option<&mut super::GasCostSummary> {
14543 self.gas_used.as_mut().map(|field| field as _)
14544 }
14545 pub fn gas_used_mut(&mut self) -> &mut super::GasCostSummary {
14548 self.gas_used.get_or_insert_default()
14549 }
14550 pub fn gas_used_opt(&self) -> Option<&super::GasCostSummary> {
14552 self.gas_used.as_ref().map(|field| field as _)
14553 }
14554 pub fn set_gas_used<T: Into<super::GasCostSummary>>(&mut self, field: T) {
14556 self.gas_used = Some(field.into().into());
14557 }
14558 pub fn with_gas_used<T: Into<super::GasCostSummary>>(
14560 mut self,
14561 field: T,
14562 ) -> Self {
14563 self.set_gas_used(field.into());
14564 self
14565 }
14566 pub fn transaction_digest_opt_mut(&mut self) -> Option<&mut String> {
14568 self.transaction_digest.as_mut().map(|field| field as _)
14569 }
14570 pub fn transaction_digest_mut(&mut self) -> &mut String {
14573 self.transaction_digest.get_or_insert_default()
14574 }
14575 pub fn transaction_digest_opt(&self) -> Option<&str> {
14577 self.transaction_digest.as_ref().map(|field| field as _)
14578 }
14579 pub fn set_transaction_digest<T: Into<String>>(&mut self, field: T) {
14581 self.transaction_digest = Some(field.into().into());
14582 }
14583 pub fn with_transaction_digest<T: Into<String>>(mut self, field: T) -> Self {
14585 self.set_transaction_digest(field.into());
14586 self
14587 }
14588 pub fn gas_object(&self) -> &super::ChangedObject {
14590 self.gas_object
14591 .as_ref()
14592 .map(|field| field as _)
14593 .unwrap_or_else(|| super::ChangedObject::default_instance() as _)
14594 }
14595 pub fn gas_object_opt_mut(&mut self) -> Option<&mut super::ChangedObject> {
14597 self.gas_object.as_mut().map(|field| field as _)
14598 }
14599 pub fn gas_object_mut(&mut self) -> &mut super::ChangedObject {
14602 self.gas_object.get_or_insert_default()
14603 }
14604 pub fn gas_object_opt(&self) -> Option<&super::ChangedObject> {
14606 self.gas_object.as_ref().map(|field| field as _)
14607 }
14608 pub fn set_gas_object<T: Into<super::ChangedObject>>(&mut self, field: T) {
14610 self.gas_object = Some(field.into().into());
14611 }
14612 pub fn with_gas_object<T: Into<super::ChangedObject>>(
14614 mut self,
14615 field: T,
14616 ) -> Self {
14617 self.set_gas_object(field.into());
14618 self
14619 }
14620 pub fn events_digest_opt_mut(&mut self) -> Option<&mut String> {
14622 self.events_digest.as_mut().map(|field| field as _)
14623 }
14624 pub fn events_digest_mut(&mut self) -> &mut String {
14627 self.events_digest.get_or_insert_default()
14628 }
14629 pub fn events_digest_opt(&self) -> Option<&str> {
14631 self.events_digest.as_ref().map(|field| field as _)
14632 }
14633 pub fn set_events_digest<T: Into<String>>(&mut self, field: T) {
14635 self.events_digest = Some(field.into().into());
14636 }
14637 pub fn with_events_digest<T: Into<String>>(mut self, field: T) -> Self {
14639 self.set_events_digest(field.into());
14640 self
14641 }
14642 pub fn dependencies(&self) -> &[String] {
14644 &self.dependencies
14645 }
14646 pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
14649 &mut self.dependencies
14650 }
14651 pub fn set_dependencies(&mut self, field: Vec<String>) {
14653 self.dependencies = field;
14654 }
14655 pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
14657 self.set_dependencies(field);
14658 self
14659 }
14660 pub fn lamport_version_opt_mut(&mut self) -> Option<&mut u64> {
14662 self.lamport_version.as_mut().map(|field| field as _)
14663 }
14664 pub fn lamport_version_mut(&mut self) -> &mut u64 {
14667 self.lamport_version.get_or_insert_default()
14668 }
14669 pub fn lamport_version_opt(&self) -> Option<u64> {
14671 self.lamport_version.as_ref().map(|field| *field)
14672 }
14673 pub fn set_lamport_version(&mut self, field: u64) {
14675 self.lamport_version = Some(field);
14676 }
14677 pub fn with_lamport_version(mut self, field: u64) -> Self {
14679 self.set_lamport_version(field);
14680 self
14681 }
14682 pub fn changed_objects(&self) -> &[super::ChangedObject] {
14684 &self.changed_objects
14685 }
14686 pub fn changed_objects_mut(&mut self) -> &mut Vec<super::ChangedObject> {
14689 &mut self.changed_objects
14690 }
14691 pub fn set_changed_objects(&mut self, field: Vec<super::ChangedObject>) {
14693 self.changed_objects = field;
14694 }
14695 pub fn with_changed_objects(mut self, field: Vec<super::ChangedObject>) -> Self {
14697 self.set_changed_objects(field);
14698 self
14699 }
14700 pub fn unchanged_consensus_objects(&self) -> &[super::UnchangedConsensusObject] {
14702 &self.unchanged_consensus_objects
14703 }
14704 pub fn unchanged_consensus_objects_mut(
14707 &mut self,
14708 ) -> &mut Vec<super::UnchangedConsensusObject> {
14709 &mut self.unchanged_consensus_objects
14710 }
14711 pub fn set_unchanged_consensus_objects(
14713 &mut self,
14714 field: Vec<super::UnchangedConsensusObject>,
14715 ) {
14716 self.unchanged_consensus_objects = field;
14717 }
14718 pub fn with_unchanged_consensus_objects(
14720 mut self,
14721 field: Vec<super::UnchangedConsensusObject>,
14722 ) -> Self {
14723 self.set_unchanged_consensus_objects(field);
14724 self
14725 }
14726 pub fn auxiliary_data_digest_opt_mut(&mut self) -> Option<&mut String> {
14728 self.auxiliary_data_digest.as_mut().map(|field| field as _)
14729 }
14730 pub fn auxiliary_data_digest_mut(&mut self) -> &mut String {
14733 self.auxiliary_data_digest.get_or_insert_default()
14734 }
14735 pub fn auxiliary_data_digest_opt(&self) -> Option<&str> {
14737 self.auxiliary_data_digest.as_ref().map(|field| field as _)
14738 }
14739 pub fn set_auxiliary_data_digest<T: Into<String>>(&mut self, field: T) {
14741 self.auxiliary_data_digest = Some(field.into().into());
14742 }
14743 pub fn with_auxiliary_data_digest<T: Into<String>>(mut self, field: T) -> Self {
14745 self.set_auxiliary_data_digest(field.into());
14746 self
14747 }
14748 pub fn unchanged_loaded_runtime_objects(&self) -> &[super::ObjectReference] {
14750 &self.unchanged_loaded_runtime_objects
14751 }
14752 pub fn unchanged_loaded_runtime_objects_mut(
14755 &mut self,
14756 ) -> &mut Vec<super::ObjectReference> {
14757 &mut self.unchanged_loaded_runtime_objects
14758 }
14759 pub fn set_unchanged_loaded_runtime_objects(
14761 &mut self,
14762 field: Vec<super::ObjectReference>,
14763 ) {
14764 self.unchanged_loaded_runtime_objects = field;
14765 }
14766 pub fn with_unchanged_loaded_runtime_objects(
14768 mut self,
14769 field: Vec<super::ObjectReference>,
14770 ) -> Self {
14771 self.set_unchanged_loaded_runtime_objects(field);
14772 self
14773 }
14774 }
14775 impl super::TransactionEvents {
14776 pub const fn const_default() -> Self {
14777 Self {
14778 bcs: None,
14779 digest: None,
14780 events: Vec::new(),
14781 }
14782 }
14783 #[doc(hidden)]
14784 pub fn default_instance() -> &'static Self {
14785 static DEFAULT: super::TransactionEvents = super::TransactionEvents::const_default();
14786 &DEFAULT
14787 }
14788 pub fn bcs(&self) -> &super::Bcs {
14790 self.bcs
14791 .as_ref()
14792 .map(|field| field as _)
14793 .unwrap_or_else(|| super::Bcs::default_instance() as _)
14794 }
14795 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
14797 self.bcs.as_mut().map(|field| field as _)
14798 }
14799 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
14802 self.bcs.get_or_insert_default()
14803 }
14804 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
14806 self.bcs.as_ref().map(|field| field as _)
14807 }
14808 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
14810 self.bcs = Some(field.into().into());
14811 }
14812 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
14814 self.set_bcs(field.into());
14815 self
14816 }
14817 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
14819 self.digest.as_mut().map(|field| field as _)
14820 }
14821 pub fn digest_mut(&mut self) -> &mut String {
14824 self.digest.get_or_insert_default()
14825 }
14826 pub fn digest_opt(&self) -> Option<&str> {
14828 self.digest.as_ref().map(|field| field as _)
14829 }
14830 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
14832 self.digest = Some(field.into().into());
14833 }
14834 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
14836 self.set_digest(field.into());
14837 self
14838 }
14839 pub fn events(&self) -> &[super::Event] {
14841 &self.events
14842 }
14843 pub fn events_mut(&mut self) -> &mut Vec<super::Event> {
14846 &mut self.events
14847 }
14848 pub fn set_events(&mut self, field: Vec<super::Event>) {
14850 self.events = field;
14851 }
14852 pub fn with_events(mut self, field: Vec<super::Event>) -> Self {
14854 self.set_events(field);
14855 self
14856 }
14857 }
14858 impl super::TransactionExpiration {
14859 pub const fn const_default() -> Self {
14860 Self {
14861 kind: None,
14862 epoch: None,
14863 min_epoch: None,
14864 min_timestamp: None,
14865 max_timestamp: None,
14866 chain: None,
14867 nonce: None,
14868 }
14869 }
14870 #[doc(hidden)]
14871 pub fn default_instance() -> &'static Self {
14872 static DEFAULT: super::TransactionExpiration = super::TransactionExpiration::const_default();
14873 &DEFAULT
14874 }
14875 pub fn with_kind<
14877 T: Into<super::transaction_expiration::TransactionExpirationKind>,
14878 >(mut self, field: T) -> Self {
14879 self.set_kind(field.into());
14880 self
14881 }
14882 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
14884 self.epoch.as_mut().map(|field| field as _)
14885 }
14886 pub fn epoch_mut(&mut self) -> &mut u64 {
14889 self.epoch.get_or_insert_default()
14890 }
14891 pub fn epoch_opt(&self) -> Option<u64> {
14893 self.epoch.as_ref().map(|field| *field)
14894 }
14895 pub fn set_epoch(&mut self, field: u64) {
14897 self.epoch = Some(field);
14898 }
14899 pub fn with_epoch(mut self, field: u64) -> Self {
14901 self.set_epoch(field);
14902 self
14903 }
14904 pub fn min_epoch_opt_mut(&mut self) -> Option<&mut u64> {
14906 self.min_epoch.as_mut().map(|field| field as _)
14907 }
14908 pub fn min_epoch_mut(&mut self) -> &mut u64 {
14911 self.min_epoch.get_or_insert_default()
14912 }
14913 pub fn min_epoch_opt(&self) -> Option<u64> {
14915 self.min_epoch.as_ref().map(|field| *field)
14916 }
14917 pub fn set_min_epoch(&mut self, field: u64) {
14919 self.min_epoch = Some(field);
14920 }
14921 pub fn with_min_epoch(mut self, field: u64) -> Self {
14923 self.set_min_epoch(field);
14924 self
14925 }
14926 pub fn min_timestamp_opt_mut(
14928 &mut self,
14929 ) -> Option<&mut ::prost_types::Timestamp> {
14930 self.min_timestamp.as_mut().map(|field| field as _)
14931 }
14932 pub fn min_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
14935 self.min_timestamp.get_or_insert_default()
14936 }
14937 pub fn min_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
14939 self.min_timestamp.as_ref().map(|field| field as _)
14940 }
14941 pub fn set_min_timestamp<T: Into<::prost_types::Timestamp>>(
14943 &mut self,
14944 field: T,
14945 ) {
14946 self.min_timestamp = Some(field.into().into());
14947 }
14948 pub fn with_min_timestamp<T: Into<::prost_types::Timestamp>>(
14950 mut self,
14951 field: T,
14952 ) -> Self {
14953 self.set_min_timestamp(field.into());
14954 self
14955 }
14956 pub fn max_timestamp_opt_mut(
14958 &mut self,
14959 ) -> Option<&mut ::prost_types::Timestamp> {
14960 self.max_timestamp.as_mut().map(|field| field as _)
14961 }
14962 pub fn max_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
14965 self.max_timestamp.get_or_insert_default()
14966 }
14967 pub fn max_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
14969 self.max_timestamp.as_ref().map(|field| field as _)
14970 }
14971 pub fn set_max_timestamp<T: Into<::prost_types::Timestamp>>(
14973 &mut self,
14974 field: T,
14975 ) {
14976 self.max_timestamp = Some(field.into().into());
14977 }
14978 pub fn with_max_timestamp<T: Into<::prost_types::Timestamp>>(
14980 mut self,
14981 field: T,
14982 ) -> Self {
14983 self.set_max_timestamp(field.into());
14984 self
14985 }
14986 pub fn chain_opt_mut(&mut self) -> Option<&mut String> {
14988 self.chain.as_mut().map(|field| field as _)
14989 }
14990 pub fn chain_mut(&mut self) -> &mut String {
14993 self.chain.get_or_insert_default()
14994 }
14995 pub fn chain_opt(&self) -> Option<&str> {
14997 self.chain.as_ref().map(|field| field as _)
14998 }
14999 pub fn set_chain<T: Into<String>>(&mut self, field: T) {
15001 self.chain = Some(field.into().into());
15002 }
15003 pub fn with_chain<T: Into<String>>(mut self, field: T) -> Self {
15005 self.set_chain(field.into());
15006 self
15007 }
15008 pub fn nonce_opt_mut(&mut self) -> Option<&mut u32> {
15010 self.nonce.as_mut().map(|field| field as _)
15011 }
15012 pub fn nonce_mut(&mut self) -> &mut u32 {
15015 self.nonce.get_or_insert_default()
15016 }
15017 pub fn nonce_opt(&self) -> Option<u32> {
15019 self.nonce.as_ref().map(|field| *field)
15020 }
15021 pub fn set_nonce(&mut self, field: u32) {
15023 self.nonce = Some(field);
15024 }
15025 pub fn with_nonce(mut self, field: u32) -> Self {
15027 self.set_nonce(field);
15028 self
15029 }
15030 }
15031 impl super::TransactionKind {
15032 pub const fn const_default() -> Self {
15033 Self { kind: None, data: None }
15034 }
15035 #[doc(hidden)]
15036 pub fn default_instance() -> &'static Self {
15037 static DEFAULT: super::TransactionKind = super::TransactionKind::const_default();
15038 &DEFAULT
15039 }
15040 pub fn with_kind<T: Into<super::transaction_kind::Kind>>(
15042 mut self,
15043 field: T,
15044 ) -> Self {
15045 self.set_kind(field.into());
15046 self
15047 }
15048 pub fn programmable_transaction(&self) -> &super::ProgrammableTransaction {
15050 if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &self
15051 .data
15052 {
15053 field as _
15054 } else {
15055 super::ProgrammableTransaction::default_instance() as _
15056 }
15057 }
15058 pub fn programmable_transaction_opt(
15060 &self,
15061 ) -> Option<&super::ProgrammableTransaction> {
15062 if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &self
15063 .data
15064 {
15065 Some(field as _)
15066 } else {
15067 None
15068 }
15069 }
15070 pub fn programmable_transaction_opt_mut(
15072 &mut self,
15073 ) -> Option<&mut super::ProgrammableTransaction> {
15074 if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &mut self
15075 .data
15076 {
15077 Some(field as _)
15078 } else {
15079 None
15080 }
15081 }
15082 pub fn programmable_transaction_mut(
15086 &mut self,
15087 ) -> &mut super::ProgrammableTransaction {
15088 if self.programmable_transaction_opt_mut().is_none() {
15089 self.data = Some(
15090 super::transaction_kind::Data::ProgrammableTransaction(
15091 super::ProgrammableTransaction::default(),
15092 ),
15093 );
15094 }
15095 self.programmable_transaction_opt_mut().unwrap()
15096 }
15097 pub fn set_programmable_transaction<T: Into<super::ProgrammableTransaction>>(
15100 &mut self,
15101 field: T,
15102 ) {
15103 self.data = Some(
15104 super::transaction_kind::Data::ProgrammableTransaction(
15105 field.into().into(),
15106 ),
15107 );
15108 }
15109 pub fn with_programmable_transaction<T: Into<super::ProgrammableTransaction>>(
15112 mut self,
15113 field: T,
15114 ) -> Self {
15115 self.set_programmable_transaction(field.into());
15116 self
15117 }
15118 pub fn change_epoch(&self) -> &super::ChangeEpoch {
15120 if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &self.data {
15121 field as _
15122 } else {
15123 super::ChangeEpoch::default_instance() as _
15124 }
15125 }
15126 pub fn change_epoch_opt(&self) -> Option<&super::ChangeEpoch> {
15128 if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &self.data {
15129 Some(field as _)
15130 } else {
15131 None
15132 }
15133 }
15134 pub fn change_epoch_opt_mut(&mut self) -> Option<&mut super::ChangeEpoch> {
15136 if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &mut self
15137 .data
15138 {
15139 Some(field as _)
15140 } else {
15141 None
15142 }
15143 }
15144 pub fn change_epoch_mut(&mut self) -> &mut super::ChangeEpoch {
15148 if self.change_epoch_opt_mut().is_none() {
15149 self.data = Some(
15150 super::transaction_kind::Data::ChangeEpoch(
15151 super::ChangeEpoch::default(),
15152 ),
15153 );
15154 }
15155 self.change_epoch_opt_mut().unwrap()
15156 }
15157 pub fn set_change_epoch<T: Into<super::ChangeEpoch>>(&mut self, field: T) {
15160 self.data = Some(
15161 super::transaction_kind::Data::ChangeEpoch(field.into().into()),
15162 );
15163 }
15164 pub fn with_change_epoch<T: Into<super::ChangeEpoch>>(
15167 mut self,
15168 field: T,
15169 ) -> Self {
15170 self.set_change_epoch(field.into());
15171 self
15172 }
15173 pub fn genesis(&self) -> &super::GenesisTransaction {
15175 if let Some(super::transaction_kind::Data::Genesis(field)) = &self.data {
15176 field as _
15177 } else {
15178 super::GenesisTransaction::default_instance() as _
15179 }
15180 }
15181 pub fn genesis_opt(&self) -> Option<&super::GenesisTransaction> {
15183 if let Some(super::transaction_kind::Data::Genesis(field)) = &self.data {
15184 Some(field as _)
15185 } else {
15186 None
15187 }
15188 }
15189 pub fn genesis_opt_mut(&mut self) -> Option<&mut super::GenesisTransaction> {
15191 if let Some(super::transaction_kind::Data::Genesis(field)) = &mut self.data {
15192 Some(field as _)
15193 } else {
15194 None
15195 }
15196 }
15197 pub fn genesis_mut(&mut self) -> &mut super::GenesisTransaction {
15201 if self.genesis_opt_mut().is_none() {
15202 self.data = Some(
15203 super::transaction_kind::Data::Genesis(
15204 super::GenesisTransaction::default(),
15205 ),
15206 );
15207 }
15208 self.genesis_opt_mut().unwrap()
15209 }
15210 pub fn set_genesis<T: Into<super::GenesisTransaction>>(&mut self, field: T) {
15213 self.data = Some(
15214 super::transaction_kind::Data::Genesis(field.into().into()),
15215 );
15216 }
15217 pub fn with_genesis<T: Into<super::GenesisTransaction>>(
15220 mut self,
15221 field: T,
15222 ) -> Self {
15223 self.set_genesis(field.into());
15224 self
15225 }
15226 pub fn consensus_commit_prologue(&self) -> &super::ConsensusCommitPrologue {
15228 if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &self
15229 .data
15230 {
15231 field as _
15232 } else {
15233 super::ConsensusCommitPrologue::default_instance() as _
15234 }
15235 }
15236 pub fn consensus_commit_prologue_opt(
15238 &self,
15239 ) -> Option<&super::ConsensusCommitPrologue> {
15240 if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &self
15241 .data
15242 {
15243 Some(field as _)
15244 } else {
15245 None
15246 }
15247 }
15248 pub fn consensus_commit_prologue_opt_mut(
15250 &mut self,
15251 ) -> Option<&mut super::ConsensusCommitPrologue> {
15252 if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &mut self
15253 .data
15254 {
15255 Some(field as _)
15256 } else {
15257 None
15258 }
15259 }
15260 pub fn consensus_commit_prologue_mut(
15264 &mut self,
15265 ) -> &mut super::ConsensusCommitPrologue {
15266 if self.consensus_commit_prologue_opt_mut().is_none() {
15267 self.data = Some(
15268 super::transaction_kind::Data::ConsensusCommitPrologue(
15269 super::ConsensusCommitPrologue::default(),
15270 ),
15271 );
15272 }
15273 self.consensus_commit_prologue_opt_mut().unwrap()
15274 }
15275 pub fn set_consensus_commit_prologue<T: Into<super::ConsensusCommitPrologue>>(
15278 &mut self,
15279 field: T,
15280 ) {
15281 self.data = Some(
15282 super::transaction_kind::Data::ConsensusCommitPrologue(
15283 field.into().into(),
15284 ),
15285 );
15286 }
15287 pub fn with_consensus_commit_prologue<T: Into<super::ConsensusCommitPrologue>>(
15290 mut self,
15291 field: T,
15292 ) -> Self {
15293 self.set_consensus_commit_prologue(field.into());
15294 self
15295 }
15296 pub fn authenticator_state_update(&self) -> &super::AuthenticatorStateUpdate {
15298 if let Some(
15299 super::transaction_kind::Data::AuthenticatorStateUpdate(field),
15300 ) = &self.data
15301 {
15302 field as _
15303 } else {
15304 super::AuthenticatorStateUpdate::default_instance() as _
15305 }
15306 }
15307 pub fn authenticator_state_update_opt(
15309 &self,
15310 ) -> Option<&super::AuthenticatorStateUpdate> {
15311 if let Some(
15312 super::transaction_kind::Data::AuthenticatorStateUpdate(field),
15313 ) = &self.data
15314 {
15315 Some(field as _)
15316 } else {
15317 None
15318 }
15319 }
15320 pub fn authenticator_state_update_opt_mut(
15322 &mut self,
15323 ) -> Option<&mut super::AuthenticatorStateUpdate> {
15324 if let Some(
15325 super::transaction_kind::Data::AuthenticatorStateUpdate(field),
15326 ) = &mut self.data
15327 {
15328 Some(field as _)
15329 } else {
15330 None
15331 }
15332 }
15333 pub fn authenticator_state_update_mut(
15337 &mut self,
15338 ) -> &mut super::AuthenticatorStateUpdate {
15339 if self.authenticator_state_update_opt_mut().is_none() {
15340 self.data = Some(
15341 super::transaction_kind::Data::AuthenticatorStateUpdate(
15342 super::AuthenticatorStateUpdate::default(),
15343 ),
15344 );
15345 }
15346 self.authenticator_state_update_opt_mut().unwrap()
15347 }
15348 pub fn set_authenticator_state_update<T: Into<super::AuthenticatorStateUpdate>>(
15351 &mut self,
15352 field: T,
15353 ) {
15354 self.data = Some(
15355 super::transaction_kind::Data::AuthenticatorStateUpdate(
15356 field.into().into(),
15357 ),
15358 );
15359 }
15360 pub fn with_authenticator_state_update<T: Into<super::AuthenticatorStateUpdate>>(
15363 mut self,
15364 field: T,
15365 ) -> Self {
15366 self.set_authenticator_state_update(field.into());
15367 self
15368 }
15369 pub fn end_of_epoch(&self) -> &super::EndOfEpochTransaction {
15371 if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &self.data {
15372 field as _
15373 } else {
15374 super::EndOfEpochTransaction::default_instance() as _
15375 }
15376 }
15377 pub fn end_of_epoch_opt(&self) -> Option<&super::EndOfEpochTransaction> {
15379 if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &self.data {
15380 Some(field as _)
15381 } else {
15382 None
15383 }
15384 }
15385 pub fn end_of_epoch_opt_mut(
15387 &mut self,
15388 ) -> Option<&mut super::EndOfEpochTransaction> {
15389 if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &mut self
15390 .data
15391 {
15392 Some(field as _)
15393 } else {
15394 None
15395 }
15396 }
15397 pub fn end_of_epoch_mut(&mut self) -> &mut super::EndOfEpochTransaction {
15401 if self.end_of_epoch_opt_mut().is_none() {
15402 self.data = Some(
15403 super::transaction_kind::Data::EndOfEpoch(
15404 super::EndOfEpochTransaction::default(),
15405 ),
15406 );
15407 }
15408 self.end_of_epoch_opt_mut().unwrap()
15409 }
15410 pub fn set_end_of_epoch<T: Into<super::EndOfEpochTransaction>>(
15413 &mut self,
15414 field: T,
15415 ) {
15416 self.data = Some(
15417 super::transaction_kind::Data::EndOfEpoch(field.into().into()),
15418 );
15419 }
15420 pub fn with_end_of_epoch<T: Into<super::EndOfEpochTransaction>>(
15423 mut self,
15424 field: T,
15425 ) -> Self {
15426 self.set_end_of_epoch(field.into());
15427 self
15428 }
15429 pub fn randomness_state_update(&self) -> &super::RandomnessStateUpdate {
15431 if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &self
15432 .data
15433 {
15434 field as _
15435 } else {
15436 super::RandomnessStateUpdate::default_instance() as _
15437 }
15438 }
15439 pub fn randomness_state_update_opt(
15441 &self,
15442 ) -> Option<&super::RandomnessStateUpdate> {
15443 if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &self
15444 .data
15445 {
15446 Some(field as _)
15447 } else {
15448 None
15449 }
15450 }
15451 pub fn randomness_state_update_opt_mut(
15453 &mut self,
15454 ) -> Option<&mut super::RandomnessStateUpdate> {
15455 if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &mut self
15456 .data
15457 {
15458 Some(field as _)
15459 } else {
15460 None
15461 }
15462 }
15463 pub fn randomness_state_update_mut(
15467 &mut self,
15468 ) -> &mut super::RandomnessStateUpdate {
15469 if self.randomness_state_update_opt_mut().is_none() {
15470 self.data = Some(
15471 super::transaction_kind::Data::RandomnessStateUpdate(
15472 super::RandomnessStateUpdate::default(),
15473 ),
15474 );
15475 }
15476 self.randomness_state_update_opt_mut().unwrap()
15477 }
15478 pub fn set_randomness_state_update<T: Into<super::RandomnessStateUpdate>>(
15481 &mut self,
15482 field: T,
15483 ) {
15484 self.data = Some(
15485 super::transaction_kind::Data::RandomnessStateUpdate(field.into().into()),
15486 );
15487 }
15488 pub fn with_randomness_state_update<T: Into<super::RandomnessStateUpdate>>(
15491 mut self,
15492 field: T,
15493 ) -> Self {
15494 self.set_randomness_state_update(field.into());
15495 self
15496 }
15497 }
15498 impl super::TransferObjects {
15499 pub const fn const_default() -> Self {
15500 Self {
15501 objects: Vec::new(),
15502 address: None,
15503 }
15504 }
15505 #[doc(hidden)]
15506 pub fn default_instance() -> &'static Self {
15507 static DEFAULT: super::TransferObjects = super::TransferObjects::const_default();
15508 &DEFAULT
15509 }
15510 pub fn objects(&self) -> &[super::Argument] {
15512 &self.objects
15513 }
15514 pub fn objects_mut(&mut self) -> &mut Vec<super::Argument> {
15517 &mut self.objects
15518 }
15519 pub fn set_objects(&mut self, field: Vec<super::Argument>) {
15521 self.objects = field;
15522 }
15523 pub fn with_objects(mut self, field: Vec<super::Argument>) -> Self {
15525 self.set_objects(field);
15526 self
15527 }
15528 pub fn address(&self) -> &super::Argument {
15530 self.address
15531 .as_ref()
15532 .map(|field| field as _)
15533 .unwrap_or_else(|| super::Argument::default_instance() as _)
15534 }
15535 pub fn address_opt_mut(&mut self) -> Option<&mut super::Argument> {
15537 self.address.as_mut().map(|field| field as _)
15538 }
15539 pub fn address_mut(&mut self) -> &mut super::Argument {
15542 self.address.get_or_insert_default()
15543 }
15544 pub fn address_opt(&self) -> Option<&super::Argument> {
15546 self.address.as_ref().map(|field| field as _)
15547 }
15548 pub fn set_address<T: Into<super::Argument>>(&mut self, field: T) {
15550 self.address = Some(field.into().into());
15551 }
15552 pub fn with_address<T: Into<super::Argument>>(mut self, field: T) -> Self {
15554 self.set_address(field.into());
15555 self
15556 }
15557 }
15558 impl super::TypeArgumentError {
15559 pub const fn const_default() -> Self {
15560 Self {
15561 type_argument: None,
15562 kind: None,
15563 }
15564 }
15565 #[doc(hidden)]
15566 pub fn default_instance() -> &'static Self {
15567 static DEFAULT: super::TypeArgumentError = super::TypeArgumentError::const_default();
15568 &DEFAULT
15569 }
15570 pub fn type_argument_opt_mut(&mut self) -> Option<&mut u32> {
15572 self.type_argument.as_mut().map(|field| field as _)
15573 }
15574 pub fn type_argument_mut(&mut self) -> &mut u32 {
15577 self.type_argument.get_or_insert_default()
15578 }
15579 pub fn type_argument_opt(&self) -> Option<u32> {
15581 self.type_argument.as_ref().map(|field| *field)
15582 }
15583 pub fn set_type_argument(&mut self, field: u32) {
15585 self.type_argument = Some(field);
15586 }
15587 pub fn with_type_argument(mut self, field: u32) -> Self {
15589 self.set_type_argument(field);
15590 self
15591 }
15592 pub fn with_kind<T: Into<super::type_argument_error::TypeArgumentErrorKind>>(
15594 mut self,
15595 field: T,
15596 ) -> Self {
15597 self.set_kind(field.into());
15598 self
15599 }
15600 }
15601 impl super::TypeOrigin {
15602 pub const fn const_default() -> Self {
15603 Self {
15604 module_name: None,
15605 datatype_name: None,
15606 package_id: None,
15607 }
15608 }
15609 #[doc(hidden)]
15610 pub fn default_instance() -> &'static Self {
15611 static DEFAULT: super::TypeOrigin = super::TypeOrigin::const_default();
15612 &DEFAULT
15613 }
15614 pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
15616 self.module_name.as_mut().map(|field| field as _)
15617 }
15618 pub fn module_name_mut(&mut self) -> &mut String {
15621 self.module_name.get_or_insert_default()
15622 }
15623 pub fn module_name_opt(&self) -> Option<&str> {
15625 self.module_name.as_ref().map(|field| field as _)
15626 }
15627 pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
15629 self.module_name = Some(field.into().into());
15630 }
15631 pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
15633 self.set_module_name(field.into());
15634 self
15635 }
15636 pub fn datatype_name_opt_mut(&mut self) -> Option<&mut String> {
15638 self.datatype_name.as_mut().map(|field| field as _)
15639 }
15640 pub fn datatype_name_mut(&mut self) -> &mut String {
15643 self.datatype_name.get_or_insert_default()
15644 }
15645 pub fn datatype_name_opt(&self) -> Option<&str> {
15647 self.datatype_name.as_ref().map(|field| field as _)
15648 }
15649 pub fn set_datatype_name<T: Into<String>>(&mut self, field: T) {
15651 self.datatype_name = Some(field.into().into());
15652 }
15653 pub fn with_datatype_name<T: Into<String>>(mut self, field: T) -> Self {
15655 self.set_datatype_name(field.into());
15656 self
15657 }
15658 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
15660 self.package_id.as_mut().map(|field| field as _)
15661 }
15662 pub fn package_id_mut(&mut self) -> &mut String {
15665 self.package_id.get_or_insert_default()
15666 }
15667 pub fn package_id_opt(&self) -> Option<&str> {
15669 self.package_id.as_ref().map(|field| field as _)
15670 }
15671 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
15673 self.package_id = Some(field.into().into());
15674 }
15675 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
15677 self.set_package_id(field.into());
15678 self
15679 }
15680 }
15681 impl super::TypeParameter {
15682 pub const fn const_default() -> Self {
15683 Self {
15684 constraints: Vec::new(),
15685 is_phantom: None,
15686 }
15687 }
15688 #[doc(hidden)]
15689 pub fn default_instance() -> &'static Self {
15690 static DEFAULT: super::TypeParameter = super::TypeParameter::const_default();
15691 &DEFAULT
15692 }
15693 pub fn is_phantom_opt_mut(&mut self) -> Option<&mut bool> {
15695 self.is_phantom.as_mut().map(|field| field as _)
15696 }
15697 pub fn is_phantom_mut(&mut self) -> &mut bool {
15700 self.is_phantom.get_or_insert_default()
15701 }
15702 pub fn is_phantom_opt(&self) -> Option<bool> {
15704 self.is_phantom.as_ref().map(|field| *field)
15705 }
15706 pub fn set_is_phantom(&mut self, field: bool) {
15708 self.is_phantom = Some(field);
15709 }
15710 pub fn with_is_phantom(mut self, field: bool) -> Self {
15712 self.set_is_phantom(field);
15713 self
15714 }
15715 }
15716 impl super::UnchangedConsensusObject {
15717 pub const fn const_default() -> Self {
15718 Self {
15719 kind: None,
15720 object_id: None,
15721 version: None,
15722 digest: None,
15723 object_type: None,
15724 }
15725 }
15726 #[doc(hidden)]
15727 pub fn default_instance() -> &'static Self {
15728 static DEFAULT: super::UnchangedConsensusObject = super::UnchangedConsensusObject::const_default();
15729 &DEFAULT
15730 }
15731 pub fn with_kind<
15733 T: Into<super::unchanged_consensus_object::UnchangedConsensusObjectKind>,
15734 >(mut self, field: T) -> Self {
15735 self.set_kind(field.into());
15736 self
15737 }
15738 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
15740 self.object_id.as_mut().map(|field| field as _)
15741 }
15742 pub fn object_id_mut(&mut self) -> &mut String {
15745 self.object_id.get_or_insert_default()
15746 }
15747 pub fn object_id_opt(&self) -> Option<&str> {
15749 self.object_id.as_ref().map(|field| field as _)
15750 }
15751 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
15753 self.object_id = Some(field.into().into());
15754 }
15755 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
15757 self.set_object_id(field.into());
15758 self
15759 }
15760 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
15762 self.version.as_mut().map(|field| field as _)
15763 }
15764 pub fn version_mut(&mut self) -> &mut u64 {
15767 self.version.get_or_insert_default()
15768 }
15769 pub fn version_opt(&self) -> Option<u64> {
15771 self.version.as_ref().map(|field| *field)
15772 }
15773 pub fn set_version(&mut self, field: u64) {
15775 self.version = Some(field);
15776 }
15777 pub fn with_version(mut self, field: u64) -> Self {
15779 self.set_version(field);
15780 self
15781 }
15782 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
15784 self.digest.as_mut().map(|field| field as _)
15785 }
15786 pub fn digest_mut(&mut self) -> &mut String {
15789 self.digest.get_or_insert_default()
15790 }
15791 pub fn digest_opt(&self) -> Option<&str> {
15793 self.digest.as_ref().map(|field| field as _)
15794 }
15795 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
15797 self.digest = Some(field.into().into());
15798 }
15799 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
15801 self.set_digest(field.into());
15802 self
15803 }
15804 pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
15806 self.object_type.as_mut().map(|field| field as _)
15807 }
15808 pub fn object_type_mut(&mut self) -> &mut String {
15811 self.object_type.get_or_insert_default()
15812 }
15813 pub fn object_type_opt(&self) -> Option<&str> {
15815 self.object_type.as_ref().map(|field| field as _)
15816 }
15817 pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
15819 self.object_type = Some(field.into().into());
15820 }
15821 pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
15823 self.set_object_type(field.into());
15824 self
15825 }
15826 }
15827 impl super::Upgrade {
15828 pub const fn const_default() -> Self {
15829 Self {
15830 modules: Vec::new(),
15831 dependencies: Vec::new(),
15832 package: None,
15833 ticket: None,
15834 }
15835 }
15836 #[doc(hidden)]
15837 pub fn default_instance() -> &'static Self {
15838 static DEFAULT: super::Upgrade = super::Upgrade::const_default();
15839 &DEFAULT
15840 }
15841 pub fn modules(&self) -> &[::prost::bytes::Bytes] {
15843 &self.modules
15844 }
15845 pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
15848 &mut self.modules
15849 }
15850 pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
15852 self.modules = field;
15853 }
15854 pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
15856 self.set_modules(field);
15857 self
15858 }
15859 pub fn dependencies(&self) -> &[String] {
15861 &self.dependencies
15862 }
15863 pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
15866 &mut self.dependencies
15867 }
15868 pub fn set_dependencies(&mut self, field: Vec<String>) {
15870 self.dependencies = field;
15871 }
15872 pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
15874 self.set_dependencies(field);
15875 self
15876 }
15877 pub fn package_opt_mut(&mut self) -> Option<&mut String> {
15879 self.package.as_mut().map(|field| field as _)
15880 }
15881 pub fn package_mut(&mut self) -> &mut String {
15884 self.package.get_or_insert_default()
15885 }
15886 pub fn package_opt(&self) -> Option<&str> {
15888 self.package.as_ref().map(|field| field as _)
15889 }
15890 pub fn set_package<T: Into<String>>(&mut self, field: T) {
15892 self.package = Some(field.into().into());
15893 }
15894 pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
15896 self.set_package(field.into());
15897 self
15898 }
15899 pub fn ticket(&self) -> &super::Argument {
15901 self.ticket
15902 .as_ref()
15903 .map(|field| field as _)
15904 .unwrap_or_else(|| super::Argument::default_instance() as _)
15905 }
15906 pub fn ticket_opt_mut(&mut self) -> Option<&mut super::Argument> {
15908 self.ticket.as_mut().map(|field| field as _)
15909 }
15910 pub fn ticket_mut(&mut self) -> &mut super::Argument {
15913 self.ticket.get_or_insert_default()
15914 }
15915 pub fn ticket_opt(&self) -> Option<&super::Argument> {
15917 self.ticket.as_ref().map(|field| field as _)
15918 }
15919 pub fn set_ticket<T: Into<super::Argument>>(&mut self, field: T) {
15921 self.ticket = Some(field.into().into());
15922 }
15923 pub fn with_ticket<T: Into<super::Argument>>(mut self, field: T) -> Self {
15925 self.set_ticket(field.into());
15926 self
15927 }
15928 }
15929 impl super::UserSignature {
15930 pub const fn const_default() -> Self {
15931 Self {
15932 bcs: None,
15933 scheme: None,
15934 signature: None,
15935 }
15936 }
15937 #[doc(hidden)]
15938 pub fn default_instance() -> &'static Self {
15939 static DEFAULT: super::UserSignature = super::UserSignature::const_default();
15940 &DEFAULT
15941 }
15942 pub fn bcs(&self) -> &super::Bcs {
15944 self.bcs
15945 .as_ref()
15946 .map(|field| field as _)
15947 .unwrap_or_else(|| super::Bcs::default_instance() as _)
15948 }
15949 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
15951 self.bcs.as_mut().map(|field| field as _)
15952 }
15953 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
15956 self.bcs.get_or_insert_default()
15957 }
15958 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
15960 self.bcs.as_ref().map(|field| field as _)
15961 }
15962 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
15964 self.bcs = Some(field.into().into());
15965 }
15966 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
15968 self.set_bcs(field.into());
15969 self
15970 }
15971 pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
15973 self.set_scheme(field.into());
15974 self
15975 }
15976 pub fn simple(&self) -> &super::SimpleSignature {
15978 if let Some(super::user_signature::Signature::Simple(field)) = &self
15979 .signature
15980 {
15981 field as _
15982 } else {
15983 super::SimpleSignature::default_instance() as _
15984 }
15985 }
15986 pub fn simple_opt(&self) -> Option<&super::SimpleSignature> {
15988 if let Some(super::user_signature::Signature::Simple(field)) = &self
15989 .signature
15990 {
15991 Some(field as _)
15992 } else {
15993 None
15994 }
15995 }
15996 pub fn simple_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
15998 if let Some(super::user_signature::Signature::Simple(field)) = &mut self
15999 .signature
16000 {
16001 Some(field as _)
16002 } else {
16003 None
16004 }
16005 }
16006 pub fn simple_mut(&mut self) -> &mut super::SimpleSignature {
16010 if self.simple_opt_mut().is_none() {
16011 self.signature = Some(
16012 super::user_signature::Signature::Simple(
16013 super::SimpleSignature::default(),
16014 ),
16015 );
16016 }
16017 self.simple_opt_mut().unwrap()
16018 }
16019 pub fn set_simple<T: Into<super::SimpleSignature>>(&mut self, field: T) {
16022 self.signature = Some(
16023 super::user_signature::Signature::Simple(field.into().into()),
16024 );
16025 }
16026 pub fn with_simple<T: Into<super::SimpleSignature>>(mut self, field: T) -> Self {
16029 self.set_simple(field.into());
16030 self
16031 }
16032 pub fn multisig(&self) -> &super::MultisigAggregatedSignature {
16034 if let Some(super::user_signature::Signature::Multisig(field)) = &self
16035 .signature
16036 {
16037 field as _
16038 } else {
16039 super::MultisigAggregatedSignature::default_instance() as _
16040 }
16041 }
16042 pub fn multisig_opt(&self) -> Option<&super::MultisigAggregatedSignature> {
16044 if let Some(super::user_signature::Signature::Multisig(field)) = &self
16045 .signature
16046 {
16047 Some(field as _)
16048 } else {
16049 None
16050 }
16051 }
16052 pub fn multisig_opt_mut(
16054 &mut self,
16055 ) -> Option<&mut super::MultisigAggregatedSignature> {
16056 if let Some(super::user_signature::Signature::Multisig(field)) = &mut self
16057 .signature
16058 {
16059 Some(field as _)
16060 } else {
16061 None
16062 }
16063 }
16064 pub fn multisig_mut(&mut self) -> &mut super::MultisigAggregatedSignature {
16068 if self.multisig_opt_mut().is_none() {
16069 self.signature = Some(
16070 super::user_signature::Signature::Multisig(
16071 super::MultisigAggregatedSignature::default(),
16072 ),
16073 );
16074 }
16075 self.multisig_opt_mut().unwrap()
16076 }
16077 pub fn set_multisig<T: Into<super::MultisigAggregatedSignature>>(
16080 &mut self,
16081 field: T,
16082 ) {
16083 self.signature = Some(
16084 super::user_signature::Signature::Multisig(field.into().into()),
16085 );
16086 }
16087 pub fn with_multisig<T: Into<super::MultisigAggregatedSignature>>(
16090 mut self,
16091 field: T,
16092 ) -> Self {
16093 self.set_multisig(field.into());
16094 self
16095 }
16096 pub fn zklogin(&self) -> &super::ZkLoginAuthenticator {
16098 if let Some(super::user_signature::Signature::Zklogin(field)) = &self
16099 .signature
16100 {
16101 field as _
16102 } else {
16103 super::ZkLoginAuthenticator::default_instance() as _
16104 }
16105 }
16106 pub fn zklogin_opt(&self) -> Option<&super::ZkLoginAuthenticator> {
16108 if let Some(super::user_signature::Signature::Zklogin(field)) = &self
16109 .signature
16110 {
16111 Some(field as _)
16112 } else {
16113 None
16114 }
16115 }
16116 pub fn zklogin_opt_mut(&mut self) -> Option<&mut super::ZkLoginAuthenticator> {
16118 if let Some(super::user_signature::Signature::Zklogin(field)) = &mut self
16119 .signature
16120 {
16121 Some(field as _)
16122 } else {
16123 None
16124 }
16125 }
16126 pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginAuthenticator {
16130 if self.zklogin_opt_mut().is_none() {
16131 self.signature = Some(
16132 super::user_signature::Signature::Zklogin(
16133 super::ZkLoginAuthenticator::default(),
16134 ),
16135 );
16136 }
16137 self.zklogin_opt_mut().unwrap()
16138 }
16139 pub fn set_zklogin<T: Into<super::ZkLoginAuthenticator>>(&mut self, field: T) {
16142 self.signature = Some(
16143 super::user_signature::Signature::Zklogin(field.into().into()),
16144 );
16145 }
16146 pub fn with_zklogin<T: Into<super::ZkLoginAuthenticator>>(
16149 mut self,
16150 field: T,
16151 ) -> Self {
16152 self.set_zklogin(field.into());
16153 self
16154 }
16155 pub fn passkey(&self) -> &super::PasskeyAuthenticator {
16157 if let Some(super::user_signature::Signature::Passkey(field)) = &self
16158 .signature
16159 {
16160 field as _
16161 } else {
16162 super::PasskeyAuthenticator::default_instance() as _
16163 }
16164 }
16165 pub fn passkey_opt(&self) -> Option<&super::PasskeyAuthenticator> {
16167 if let Some(super::user_signature::Signature::Passkey(field)) = &self
16168 .signature
16169 {
16170 Some(field as _)
16171 } else {
16172 None
16173 }
16174 }
16175 pub fn passkey_opt_mut(&mut self) -> Option<&mut super::PasskeyAuthenticator> {
16177 if let Some(super::user_signature::Signature::Passkey(field)) = &mut self
16178 .signature
16179 {
16180 Some(field as _)
16181 } else {
16182 None
16183 }
16184 }
16185 pub fn passkey_mut(&mut self) -> &mut super::PasskeyAuthenticator {
16189 if self.passkey_opt_mut().is_none() {
16190 self.signature = Some(
16191 super::user_signature::Signature::Passkey(
16192 super::PasskeyAuthenticator::default(),
16193 ),
16194 );
16195 }
16196 self.passkey_opt_mut().unwrap()
16197 }
16198 pub fn set_passkey<T: Into<super::PasskeyAuthenticator>>(&mut self, field: T) {
16201 self.signature = Some(
16202 super::user_signature::Signature::Passkey(field.into().into()),
16203 );
16204 }
16205 pub fn with_passkey<T: Into<super::PasskeyAuthenticator>>(
16208 mut self,
16209 field: T,
16210 ) -> Self {
16211 self.set_passkey(field.into());
16212 self
16213 }
16214 }
16215 impl super::Validator {
16216 pub const fn const_default() -> Self {
16217 Self {
16218 name: None,
16219 address: None,
16220 description: None,
16221 image_url: None,
16222 project_url: None,
16223 protocol_public_key: None,
16224 proof_of_possession: None,
16225 network_public_key: None,
16226 worker_public_key: None,
16227 network_address: None,
16228 p2p_address: None,
16229 primary_address: None,
16230 worker_address: None,
16231 next_epoch_protocol_public_key: None,
16232 next_epoch_proof_of_possession: None,
16233 next_epoch_network_public_key: None,
16234 next_epoch_worker_public_key: None,
16235 next_epoch_network_address: None,
16236 next_epoch_p2p_address: None,
16237 next_epoch_primary_address: None,
16238 next_epoch_worker_address: None,
16239 metadata_extra_fields: None,
16240 voting_power: None,
16241 operation_cap_id: None,
16242 gas_price: None,
16243 staking_pool: None,
16244 commission_rate: None,
16245 next_epoch_stake: None,
16246 next_epoch_gas_price: None,
16247 next_epoch_commission_rate: None,
16248 extra_fields: None,
16249 }
16250 }
16251 #[doc(hidden)]
16252 pub fn default_instance() -> &'static Self {
16253 static DEFAULT: super::Validator = super::Validator::const_default();
16254 &DEFAULT
16255 }
16256 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
16258 self.name.as_mut().map(|field| field as _)
16259 }
16260 pub fn name_mut(&mut self) -> &mut String {
16263 self.name.get_or_insert_default()
16264 }
16265 pub fn name_opt(&self) -> Option<&str> {
16267 self.name.as_ref().map(|field| field as _)
16268 }
16269 pub fn set_name<T: Into<String>>(&mut self, field: T) {
16271 self.name = Some(field.into().into());
16272 }
16273 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
16275 self.set_name(field.into());
16276 self
16277 }
16278 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
16280 self.address.as_mut().map(|field| field as _)
16281 }
16282 pub fn address_mut(&mut self) -> &mut String {
16285 self.address.get_or_insert_default()
16286 }
16287 pub fn address_opt(&self) -> Option<&str> {
16289 self.address.as_ref().map(|field| field as _)
16290 }
16291 pub fn set_address<T: Into<String>>(&mut self, field: T) {
16293 self.address = Some(field.into().into());
16294 }
16295 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
16297 self.set_address(field.into());
16298 self
16299 }
16300 pub fn description_opt_mut(&mut self) -> Option<&mut String> {
16302 self.description.as_mut().map(|field| field as _)
16303 }
16304 pub fn description_mut(&mut self) -> &mut String {
16307 self.description.get_or_insert_default()
16308 }
16309 pub fn description_opt(&self) -> Option<&str> {
16311 self.description.as_ref().map(|field| field as _)
16312 }
16313 pub fn set_description<T: Into<String>>(&mut self, field: T) {
16315 self.description = Some(field.into().into());
16316 }
16317 pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
16319 self.set_description(field.into());
16320 self
16321 }
16322 pub fn image_url_opt_mut(&mut self) -> Option<&mut String> {
16324 self.image_url.as_mut().map(|field| field as _)
16325 }
16326 pub fn image_url_mut(&mut self) -> &mut String {
16329 self.image_url.get_or_insert_default()
16330 }
16331 pub fn image_url_opt(&self) -> Option<&str> {
16333 self.image_url.as_ref().map(|field| field as _)
16334 }
16335 pub fn set_image_url<T: Into<String>>(&mut self, field: T) {
16337 self.image_url = Some(field.into().into());
16338 }
16339 pub fn with_image_url<T: Into<String>>(mut self, field: T) -> Self {
16341 self.set_image_url(field.into());
16342 self
16343 }
16344 pub fn project_url_opt_mut(&mut self) -> Option<&mut String> {
16346 self.project_url.as_mut().map(|field| field as _)
16347 }
16348 pub fn project_url_mut(&mut self) -> &mut String {
16351 self.project_url.get_or_insert_default()
16352 }
16353 pub fn project_url_opt(&self) -> Option<&str> {
16355 self.project_url.as_ref().map(|field| field as _)
16356 }
16357 pub fn set_project_url<T: Into<String>>(&mut self, field: T) {
16359 self.project_url = Some(field.into().into());
16360 }
16361 pub fn with_project_url<T: Into<String>>(mut self, field: T) -> Self {
16363 self.set_project_url(field.into());
16364 self
16365 }
16366 pub fn protocol_public_key_opt(&self) -> Option<&[u8]> {
16368 self.protocol_public_key.as_ref().map(|field| field as _)
16369 }
16370 pub fn set_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
16372 &mut self,
16373 field: T,
16374 ) {
16375 self.protocol_public_key = Some(field.into().into());
16376 }
16377 pub fn with_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
16379 mut self,
16380 field: T,
16381 ) -> Self {
16382 self.set_protocol_public_key(field.into());
16383 self
16384 }
16385 pub fn proof_of_possession_opt(&self) -> Option<&[u8]> {
16387 self.proof_of_possession.as_ref().map(|field| field as _)
16388 }
16389 pub fn set_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
16391 &mut self,
16392 field: T,
16393 ) {
16394 self.proof_of_possession = Some(field.into().into());
16395 }
16396 pub fn with_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
16398 mut self,
16399 field: T,
16400 ) -> Self {
16401 self.set_proof_of_possession(field.into());
16402 self
16403 }
16404 pub fn network_public_key_opt(&self) -> Option<&[u8]> {
16406 self.network_public_key.as_ref().map(|field| field as _)
16407 }
16408 pub fn set_network_public_key<T: Into<::prost::bytes::Bytes>>(
16410 &mut self,
16411 field: T,
16412 ) {
16413 self.network_public_key = Some(field.into().into());
16414 }
16415 pub fn with_network_public_key<T: Into<::prost::bytes::Bytes>>(
16417 mut self,
16418 field: T,
16419 ) -> Self {
16420 self.set_network_public_key(field.into());
16421 self
16422 }
16423 pub fn worker_public_key_opt(&self) -> Option<&[u8]> {
16425 self.worker_public_key.as_ref().map(|field| field as _)
16426 }
16427 pub fn set_worker_public_key<T: Into<::prost::bytes::Bytes>>(
16429 &mut self,
16430 field: T,
16431 ) {
16432 self.worker_public_key = Some(field.into().into());
16433 }
16434 pub fn with_worker_public_key<T: Into<::prost::bytes::Bytes>>(
16436 mut self,
16437 field: T,
16438 ) -> Self {
16439 self.set_worker_public_key(field.into());
16440 self
16441 }
16442 pub fn network_address_opt_mut(&mut self) -> Option<&mut String> {
16444 self.network_address.as_mut().map(|field| field as _)
16445 }
16446 pub fn network_address_mut(&mut self) -> &mut String {
16449 self.network_address.get_or_insert_default()
16450 }
16451 pub fn network_address_opt(&self) -> Option<&str> {
16453 self.network_address.as_ref().map(|field| field as _)
16454 }
16455 pub fn set_network_address<T: Into<String>>(&mut self, field: T) {
16457 self.network_address = Some(field.into().into());
16458 }
16459 pub fn with_network_address<T: Into<String>>(mut self, field: T) -> Self {
16461 self.set_network_address(field.into());
16462 self
16463 }
16464 pub fn p2p_address_opt_mut(&mut self) -> Option<&mut String> {
16466 self.p2p_address.as_mut().map(|field| field as _)
16467 }
16468 pub fn p2p_address_mut(&mut self) -> &mut String {
16471 self.p2p_address.get_or_insert_default()
16472 }
16473 pub fn p2p_address_opt(&self) -> Option<&str> {
16475 self.p2p_address.as_ref().map(|field| field as _)
16476 }
16477 pub fn set_p2p_address<T: Into<String>>(&mut self, field: T) {
16479 self.p2p_address = Some(field.into().into());
16480 }
16481 pub fn with_p2p_address<T: Into<String>>(mut self, field: T) -> Self {
16483 self.set_p2p_address(field.into());
16484 self
16485 }
16486 pub fn primary_address_opt_mut(&mut self) -> Option<&mut String> {
16488 self.primary_address.as_mut().map(|field| field as _)
16489 }
16490 pub fn primary_address_mut(&mut self) -> &mut String {
16493 self.primary_address.get_or_insert_default()
16494 }
16495 pub fn primary_address_opt(&self) -> Option<&str> {
16497 self.primary_address.as_ref().map(|field| field as _)
16498 }
16499 pub fn set_primary_address<T: Into<String>>(&mut self, field: T) {
16501 self.primary_address = Some(field.into().into());
16502 }
16503 pub fn with_primary_address<T: Into<String>>(mut self, field: T) -> Self {
16505 self.set_primary_address(field.into());
16506 self
16507 }
16508 pub fn worker_address_opt_mut(&mut self) -> Option<&mut String> {
16510 self.worker_address.as_mut().map(|field| field as _)
16511 }
16512 pub fn worker_address_mut(&mut self) -> &mut String {
16515 self.worker_address.get_or_insert_default()
16516 }
16517 pub fn worker_address_opt(&self) -> Option<&str> {
16519 self.worker_address.as_ref().map(|field| field as _)
16520 }
16521 pub fn set_worker_address<T: Into<String>>(&mut self, field: T) {
16523 self.worker_address = Some(field.into().into());
16524 }
16525 pub fn with_worker_address<T: Into<String>>(mut self, field: T) -> Self {
16527 self.set_worker_address(field.into());
16528 self
16529 }
16530 pub fn next_epoch_protocol_public_key_opt(&self) -> Option<&[u8]> {
16532 self.next_epoch_protocol_public_key.as_ref().map(|field| field as _)
16533 }
16534 pub fn set_next_epoch_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
16536 &mut self,
16537 field: T,
16538 ) {
16539 self.next_epoch_protocol_public_key = Some(field.into().into());
16540 }
16541 pub fn with_next_epoch_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
16543 mut self,
16544 field: T,
16545 ) -> Self {
16546 self.set_next_epoch_protocol_public_key(field.into());
16547 self
16548 }
16549 pub fn next_epoch_proof_of_possession_opt(&self) -> Option<&[u8]> {
16551 self.next_epoch_proof_of_possession.as_ref().map(|field| field as _)
16552 }
16553 pub fn set_next_epoch_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
16555 &mut self,
16556 field: T,
16557 ) {
16558 self.next_epoch_proof_of_possession = Some(field.into().into());
16559 }
16560 pub fn with_next_epoch_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
16562 mut self,
16563 field: T,
16564 ) -> Self {
16565 self.set_next_epoch_proof_of_possession(field.into());
16566 self
16567 }
16568 pub fn next_epoch_network_public_key_opt(&self) -> Option<&[u8]> {
16570 self.next_epoch_network_public_key.as_ref().map(|field| field as _)
16571 }
16572 pub fn set_next_epoch_network_public_key<T: Into<::prost::bytes::Bytes>>(
16574 &mut self,
16575 field: T,
16576 ) {
16577 self.next_epoch_network_public_key = Some(field.into().into());
16578 }
16579 pub fn with_next_epoch_network_public_key<T: Into<::prost::bytes::Bytes>>(
16581 mut self,
16582 field: T,
16583 ) -> Self {
16584 self.set_next_epoch_network_public_key(field.into());
16585 self
16586 }
16587 pub fn next_epoch_worker_public_key_opt(&self) -> Option<&[u8]> {
16589 self.next_epoch_worker_public_key.as_ref().map(|field| field as _)
16590 }
16591 pub fn set_next_epoch_worker_public_key<T: Into<::prost::bytes::Bytes>>(
16593 &mut self,
16594 field: T,
16595 ) {
16596 self.next_epoch_worker_public_key = Some(field.into().into());
16597 }
16598 pub fn with_next_epoch_worker_public_key<T: Into<::prost::bytes::Bytes>>(
16600 mut self,
16601 field: T,
16602 ) -> Self {
16603 self.set_next_epoch_worker_public_key(field.into());
16604 self
16605 }
16606 pub fn next_epoch_network_address_opt_mut(&mut self) -> Option<&mut String> {
16608 self.next_epoch_network_address.as_mut().map(|field| field as _)
16609 }
16610 pub fn next_epoch_network_address_mut(&mut self) -> &mut String {
16613 self.next_epoch_network_address.get_or_insert_default()
16614 }
16615 pub fn next_epoch_network_address_opt(&self) -> Option<&str> {
16617 self.next_epoch_network_address.as_ref().map(|field| field as _)
16618 }
16619 pub fn set_next_epoch_network_address<T: Into<String>>(&mut self, field: T) {
16621 self.next_epoch_network_address = Some(field.into().into());
16622 }
16623 pub fn with_next_epoch_network_address<T: Into<String>>(
16625 mut self,
16626 field: T,
16627 ) -> Self {
16628 self.set_next_epoch_network_address(field.into());
16629 self
16630 }
16631 pub fn next_epoch_p2p_address_opt_mut(&mut self) -> Option<&mut String> {
16633 self.next_epoch_p2p_address.as_mut().map(|field| field as _)
16634 }
16635 pub fn next_epoch_p2p_address_mut(&mut self) -> &mut String {
16638 self.next_epoch_p2p_address.get_or_insert_default()
16639 }
16640 pub fn next_epoch_p2p_address_opt(&self) -> Option<&str> {
16642 self.next_epoch_p2p_address.as_ref().map(|field| field as _)
16643 }
16644 pub fn set_next_epoch_p2p_address<T: Into<String>>(&mut self, field: T) {
16646 self.next_epoch_p2p_address = Some(field.into().into());
16647 }
16648 pub fn with_next_epoch_p2p_address<T: Into<String>>(mut self, field: T) -> Self {
16650 self.set_next_epoch_p2p_address(field.into());
16651 self
16652 }
16653 pub fn next_epoch_primary_address_opt_mut(&mut self) -> Option<&mut String> {
16655 self.next_epoch_primary_address.as_mut().map(|field| field as _)
16656 }
16657 pub fn next_epoch_primary_address_mut(&mut self) -> &mut String {
16660 self.next_epoch_primary_address.get_or_insert_default()
16661 }
16662 pub fn next_epoch_primary_address_opt(&self) -> Option<&str> {
16664 self.next_epoch_primary_address.as_ref().map(|field| field as _)
16665 }
16666 pub fn set_next_epoch_primary_address<T: Into<String>>(&mut self, field: T) {
16668 self.next_epoch_primary_address = Some(field.into().into());
16669 }
16670 pub fn with_next_epoch_primary_address<T: Into<String>>(
16672 mut self,
16673 field: T,
16674 ) -> Self {
16675 self.set_next_epoch_primary_address(field.into());
16676 self
16677 }
16678 pub fn next_epoch_worker_address_opt_mut(&mut self) -> Option<&mut String> {
16680 self.next_epoch_worker_address.as_mut().map(|field| field as _)
16681 }
16682 pub fn next_epoch_worker_address_mut(&mut self) -> &mut String {
16685 self.next_epoch_worker_address.get_or_insert_default()
16686 }
16687 pub fn next_epoch_worker_address_opt(&self) -> Option<&str> {
16689 self.next_epoch_worker_address.as_ref().map(|field| field as _)
16690 }
16691 pub fn set_next_epoch_worker_address<T: Into<String>>(&mut self, field: T) {
16693 self.next_epoch_worker_address = Some(field.into().into());
16694 }
16695 pub fn with_next_epoch_worker_address<T: Into<String>>(
16697 mut self,
16698 field: T,
16699 ) -> Self {
16700 self.set_next_epoch_worker_address(field.into());
16701 self
16702 }
16703 pub fn metadata_extra_fields(&self) -> &super::MoveTable {
16705 self.metadata_extra_fields
16706 .as_ref()
16707 .map(|field| field as _)
16708 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16709 }
16710 pub fn metadata_extra_fields_opt_mut(
16712 &mut self,
16713 ) -> Option<&mut super::MoveTable> {
16714 self.metadata_extra_fields.as_mut().map(|field| field as _)
16715 }
16716 pub fn metadata_extra_fields_mut(&mut self) -> &mut super::MoveTable {
16719 self.metadata_extra_fields.get_or_insert_default()
16720 }
16721 pub fn metadata_extra_fields_opt(&self) -> Option<&super::MoveTable> {
16723 self.metadata_extra_fields.as_ref().map(|field| field as _)
16724 }
16725 pub fn set_metadata_extra_fields<T: Into<super::MoveTable>>(
16727 &mut self,
16728 field: T,
16729 ) {
16730 self.metadata_extra_fields = Some(field.into().into());
16731 }
16732 pub fn with_metadata_extra_fields<T: Into<super::MoveTable>>(
16734 mut self,
16735 field: T,
16736 ) -> Self {
16737 self.set_metadata_extra_fields(field.into());
16738 self
16739 }
16740 pub fn voting_power_opt_mut(&mut self) -> Option<&mut u64> {
16742 self.voting_power.as_mut().map(|field| field as _)
16743 }
16744 pub fn voting_power_mut(&mut self) -> &mut u64 {
16747 self.voting_power.get_or_insert_default()
16748 }
16749 pub fn voting_power_opt(&self) -> Option<u64> {
16751 self.voting_power.as_ref().map(|field| *field)
16752 }
16753 pub fn set_voting_power(&mut self, field: u64) {
16755 self.voting_power = Some(field);
16756 }
16757 pub fn with_voting_power(mut self, field: u64) -> Self {
16759 self.set_voting_power(field);
16760 self
16761 }
16762 pub fn operation_cap_id_opt_mut(&mut self) -> Option<&mut String> {
16764 self.operation_cap_id.as_mut().map(|field| field as _)
16765 }
16766 pub fn operation_cap_id_mut(&mut self) -> &mut String {
16769 self.operation_cap_id.get_or_insert_default()
16770 }
16771 pub fn operation_cap_id_opt(&self) -> Option<&str> {
16773 self.operation_cap_id.as_ref().map(|field| field as _)
16774 }
16775 pub fn set_operation_cap_id<T: Into<String>>(&mut self, field: T) {
16777 self.operation_cap_id = Some(field.into().into());
16778 }
16779 pub fn with_operation_cap_id<T: Into<String>>(mut self, field: T) -> Self {
16781 self.set_operation_cap_id(field.into());
16782 self
16783 }
16784 pub fn gas_price_opt_mut(&mut self) -> Option<&mut u64> {
16786 self.gas_price.as_mut().map(|field| field as _)
16787 }
16788 pub fn gas_price_mut(&mut self) -> &mut u64 {
16791 self.gas_price.get_or_insert_default()
16792 }
16793 pub fn gas_price_opt(&self) -> Option<u64> {
16795 self.gas_price.as_ref().map(|field| *field)
16796 }
16797 pub fn set_gas_price(&mut self, field: u64) {
16799 self.gas_price = Some(field);
16800 }
16801 pub fn with_gas_price(mut self, field: u64) -> Self {
16803 self.set_gas_price(field);
16804 self
16805 }
16806 pub fn staking_pool(&self) -> &super::StakingPool {
16808 self.staking_pool
16809 .as_ref()
16810 .map(|field| field as _)
16811 .unwrap_or_else(|| super::StakingPool::default_instance() as _)
16812 }
16813 pub fn staking_pool_opt_mut(&mut self) -> Option<&mut super::StakingPool> {
16815 self.staking_pool.as_mut().map(|field| field as _)
16816 }
16817 pub fn staking_pool_mut(&mut self) -> &mut super::StakingPool {
16820 self.staking_pool.get_or_insert_default()
16821 }
16822 pub fn staking_pool_opt(&self) -> Option<&super::StakingPool> {
16824 self.staking_pool.as_ref().map(|field| field as _)
16825 }
16826 pub fn set_staking_pool<T: Into<super::StakingPool>>(&mut self, field: T) {
16828 self.staking_pool = Some(field.into().into());
16829 }
16830 pub fn with_staking_pool<T: Into<super::StakingPool>>(
16832 mut self,
16833 field: T,
16834 ) -> Self {
16835 self.set_staking_pool(field.into());
16836 self
16837 }
16838 pub fn commission_rate_opt_mut(&mut self) -> Option<&mut u64> {
16840 self.commission_rate.as_mut().map(|field| field as _)
16841 }
16842 pub fn commission_rate_mut(&mut self) -> &mut u64 {
16845 self.commission_rate.get_or_insert_default()
16846 }
16847 pub fn commission_rate_opt(&self) -> Option<u64> {
16849 self.commission_rate.as_ref().map(|field| *field)
16850 }
16851 pub fn set_commission_rate(&mut self, field: u64) {
16853 self.commission_rate = Some(field);
16854 }
16855 pub fn with_commission_rate(mut self, field: u64) -> Self {
16857 self.set_commission_rate(field);
16858 self
16859 }
16860 pub fn next_epoch_stake_opt_mut(&mut self) -> Option<&mut u64> {
16862 self.next_epoch_stake.as_mut().map(|field| field as _)
16863 }
16864 pub fn next_epoch_stake_mut(&mut self) -> &mut u64 {
16867 self.next_epoch_stake.get_or_insert_default()
16868 }
16869 pub fn next_epoch_stake_opt(&self) -> Option<u64> {
16871 self.next_epoch_stake.as_ref().map(|field| *field)
16872 }
16873 pub fn set_next_epoch_stake(&mut self, field: u64) {
16875 self.next_epoch_stake = Some(field);
16876 }
16877 pub fn with_next_epoch_stake(mut self, field: u64) -> Self {
16879 self.set_next_epoch_stake(field);
16880 self
16881 }
16882 pub fn next_epoch_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
16884 self.next_epoch_gas_price.as_mut().map(|field| field as _)
16885 }
16886 pub fn next_epoch_gas_price_mut(&mut self) -> &mut u64 {
16889 self.next_epoch_gas_price.get_or_insert_default()
16890 }
16891 pub fn next_epoch_gas_price_opt(&self) -> Option<u64> {
16893 self.next_epoch_gas_price.as_ref().map(|field| *field)
16894 }
16895 pub fn set_next_epoch_gas_price(&mut self, field: u64) {
16897 self.next_epoch_gas_price = Some(field);
16898 }
16899 pub fn with_next_epoch_gas_price(mut self, field: u64) -> Self {
16901 self.set_next_epoch_gas_price(field);
16902 self
16903 }
16904 pub fn next_epoch_commission_rate_opt_mut(&mut self) -> Option<&mut u64> {
16906 self.next_epoch_commission_rate.as_mut().map(|field| field as _)
16907 }
16908 pub fn next_epoch_commission_rate_mut(&mut self) -> &mut u64 {
16911 self.next_epoch_commission_rate.get_or_insert_default()
16912 }
16913 pub fn next_epoch_commission_rate_opt(&self) -> Option<u64> {
16915 self.next_epoch_commission_rate.as_ref().map(|field| *field)
16916 }
16917 pub fn set_next_epoch_commission_rate(&mut self, field: u64) {
16919 self.next_epoch_commission_rate = Some(field);
16920 }
16921 pub fn with_next_epoch_commission_rate(mut self, field: u64) -> Self {
16923 self.set_next_epoch_commission_rate(field);
16924 self
16925 }
16926 pub fn extra_fields(&self) -> &super::MoveTable {
16928 self.extra_fields
16929 .as_ref()
16930 .map(|field| field as _)
16931 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16932 }
16933 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
16935 self.extra_fields.as_mut().map(|field| field as _)
16936 }
16937 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
16940 self.extra_fields.get_or_insert_default()
16941 }
16942 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
16944 self.extra_fields.as_ref().map(|field| field as _)
16945 }
16946 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
16948 self.extra_fields = Some(field.into().into());
16949 }
16950 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
16952 self.set_extra_fields(field.into());
16953 self
16954 }
16955 }
16956 impl super::ValidatorAggregatedSignature {
16957 pub const fn const_default() -> Self {
16958 Self {
16959 epoch: None,
16960 signature: None,
16961 bitmap: None,
16962 }
16963 }
16964 #[doc(hidden)]
16965 pub fn default_instance() -> &'static Self {
16966 static DEFAULT: super::ValidatorAggregatedSignature = super::ValidatorAggregatedSignature::const_default();
16967 &DEFAULT
16968 }
16969 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
16971 self.epoch.as_mut().map(|field| field as _)
16972 }
16973 pub fn epoch_mut(&mut self) -> &mut u64 {
16976 self.epoch.get_or_insert_default()
16977 }
16978 pub fn epoch_opt(&self) -> Option<u64> {
16980 self.epoch.as_ref().map(|field| *field)
16981 }
16982 pub fn set_epoch(&mut self, field: u64) {
16984 self.epoch = Some(field);
16985 }
16986 pub fn with_epoch(mut self, field: u64) -> Self {
16988 self.set_epoch(field);
16989 self
16990 }
16991 pub fn signature_opt(&self) -> Option<&[u8]> {
16993 self.signature.as_ref().map(|field| field as _)
16994 }
16995 pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16997 self.signature = Some(field.into().into());
16998 }
16999 pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
17001 mut self,
17002 field: T,
17003 ) -> Self {
17004 self.set_signature(field.into());
17005 self
17006 }
17007 pub fn bitmap_opt(&self) -> Option<&[u8]> {
17009 self.bitmap.as_ref().map(|field| field as _)
17010 }
17011 pub fn set_bitmap<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
17013 self.bitmap = Some(field.into().into());
17014 }
17015 pub fn with_bitmap<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
17017 self.set_bitmap(field.into());
17018 self
17019 }
17020 }
17021 impl super::ValidatorCommittee {
17022 pub const fn const_default() -> Self {
17023 Self {
17024 epoch: None,
17025 members: Vec::new(),
17026 }
17027 }
17028 #[doc(hidden)]
17029 pub fn default_instance() -> &'static Self {
17030 static DEFAULT: super::ValidatorCommittee = super::ValidatorCommittee::const_default();
17031 &DEFAULT
17032 }
17033 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
17035 self.epoch.as_mut().map(|field| field as _)
17036 }
17037 pub fn epoch_mut(&mut self) -> &mut u64 {
17040 self.epoch.get_or_insert_default()
17041 }
17042 pub fn epoch_opt(&self) -> Option<u64> {
17044 self.epoch.as_ref().map(|field| *field)
17045 }
17046 pub fn set_epoch(&mut self, field: u64) {
17048 self.epoch = Some(field);
17049 }
17050 pub fn with_epoch(mut self, field: u64) -> Self {
17052 self.set_epoch(field);
17053 self
17054 }
17055 pub fn members(&self) -> &[super::ValidatorCommitteeMember] {
17057 &self.members
17058 }
17059 pub fn members_mut(&mut self) -> &mut Vec<super::ValidatorCommitteeMember> {
17062 &mut self.members
17063 }
17064 pub fn set_members(&mut self, field: Vec<super::ValidatorCommitteeMember>) {
17066 self.members = field;
17067 }
17068 pub fn with_members(
17070 mut self,
17071 field: Vec<super::ValidatorCommitteeMember>,
17072 ) -> Self {
17073 self.set_members(field);
17074 self
17075 }
17076 }
17077 impl super::ValidatorCommitteeMember {
17078 pub const fn const_default() -> Self {
17079 Self {
17080 public_key: None,
17081 weight: None,
17082 }
17083 }
17084 #[doc(hidden)]
17085 pub fn default_instance() -> &'static Self {
17086 static DEFAULT: super::ValidatorCommitteeMember = super::ValidatorCommitteeMember::const_default();
17087 &DEFAULT
17088 }
17089 pub fn public_key_opt(&self) -> Option<&[u8]> {
17091 self.public_key.as_ref().map(|field| field as _)
17092 }
17093 pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
17095 self.public_key = Some(field.into().into());
17096 }
17097 pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
17099 mut self,
17100 field: T,
17101 ) -> Self {
17102 self.set_public_key(field.into());
17103 self
17104 }
17105 pub fn weight_opt_mut(&mut self) -> Option<&mut u64> {
17107 self.weight.as_mut().map(|field| field as _)
17108 }
17109 pub fn weight_mut(&mut self) -> &mut u64 {
17112 self.weight.get_or_insert_default()
17113 }
17114 pub fn weight_opt(&self) -> Option<u64> {
17116 self.weight.as_ref().map(|field| *field)
17117 }
17118 pub fn set_weight(&mut self, field: u64) {
17120 self.weight = Some(field);
17121 }
17122 pub fn with_weight(mut self, field: u64) -> Self {
17124 self.set_weight(field);
17125 self
17126 }
17127 }
17128 impl super::ValidatorExecutionTimeObservation {
17129 pub const fn const_default() -> Self {
17130 Self {
17131 validator: None,
17132 duration: None,
17133 }
17134 }
17135 #[doc(hidden)]
17136 pub fn default_instance() -> &'static Self {
17137 static DEFAULT: super::ValidatorExecutionTimeObservation = super::ValidatorExecutionTimeObservation::const_default();
17138 &DEFAULT
17139 }
17140 pub fn validator_opt(&self) -> Option<&[u8]> {
17142 self.validator.as_ref().map(|field| field as _)
17143 }
17144 pub fn set_validator<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
17146 self.validator = Some(field.into().into());
17147 }
17148 pub fn with_validator<T: Into<::prost::bytes::Bytes>>(
17150 mut self,
17151 field: T,
17152 ) -> Self {
17153 self.set_validator(field.into());
17154 self
17155 }
17156 pub fn duration_opt_mut(&mut self) -> Option<&mut ::prost_types::Duration> {
17158 self.duration.as_mut().map(|field| field as _)
17159 }
17160 pub fn duration_mut(&mut self) -> &mut ::prost_types::Duration {
17163 self.duration.get_or_insert_default()
17164 }
17165 pub fn duration_opt(&self) -> Option<&::prost_types::Duration> {
17167 self.duration.as_ref().map(|field| field as _)
17168 }
17169 pub fn set_duration<T: Into<::prost_types::Duration>>(&mut self, field: T) {
17171 self.duration = Some(field.into().into());
17172 }
17173 pub fn with_duration<T: Into<::prost_types::Duration>>(
17175 mut self,
17176 field: T,
17177 ) -> Self {
17178 self.set_duration(field.into());
17179 self
17180 }
17181 }
17182 impl super::ValidatorReportRecord {
17183 pub const fn const_default() -> Self {
17184 Self {
17185 reported: None,
17186 reporters: Vec::new(),
17187 }
17188 }
17189 #[doc(hidden)]
17190 pub fn default_instance() -> &'static Self {
17191 static DEFAULT: super::ValidatorReportRecord = super::ValidatorReportRecord::const_default();
17192 &DEFAULT
17193 }
17194 pub fn reported_opt_mut(&mut self) -> Option<&mut String> {
17196 self.reported.as_mut().map(|field| field as _)
17197 }
17198 pub fn reported_mut(&mut self) -> &mut String {
17201 self.reported.get_or_insert_default()
17202 }
17203 pub fn reported_opt(&self) -> Option<&str> {
17205 self.reported.as_ref().map(|field| field as _)
17206 }
17207 pub fn set_reported<T: Into<String>>(&mut self, field: T) {
17209 self.reported = Some(field.into().into());
17210 }
17211 pub fn with_reported<T: Into<String>>(mut self, field: T) -> Self {
17213 self.set_reported(field.into());
17214 self
17215 }
17216 pub fn reporters(&self) -> &[String] {
17218 &self.reporters
17219 }
17220 pub fn reporters_mut(&mut self) -> &mut Vec<String> {
17223 &mut self.reporters
17224 }
17225 pub fn set_reporters(&mut self, field: Vec<String>) {
17227 self.reporters = field;
17228 }
17229 pub fn with_reporters(mut self, field: Vec<String>) -> Self {
17231 self.set_reporters(field);
17232 self
17233 }
17234 }
17235 impl super::ValidatorSet {
17236 pub const fn const_default() -> Self {
17237 Self {
17238 total_stake: None,
17239 active_validators: Vec::new(),
17240 pending_active_validators: None,
17241 pending_removals: Vec::new(),
17242 staking_pool_mappings: None,
17243 inactive_validators: None,
17244 validator_candidates: None,
17245 at_risk_validators: std::collections::BTreeMap::new(),
17246 extra_fields: None,
17247 }
17248 }
17249 #[doc(hidden)]
17250 pub fn default_instance() -> &'static Self {
17251 static DEFAULT: super::ValidatorSet = super::ValidatorSet::const_default();
17252 &DEFAULT
17253 }
17254 pub fn total_stake_opt_mut(&mut self) -> Option<&mut u64> {
17256 self.total_stake.as_mut().map(|field| field as _)
17257 }
17258 pub fn total_stake_mut(&mut self) -> &mut u64 {
17261 self.total_stake.get_or_insert_default()
17262 }
17263 pub fn total_stake_opt(&self) -> Option<u64> {
17265 self.total_stake.as_ref().map(|field| *field)
17266 }
17267 pub fn set_total_stake(&mut self, field: u64) {
17269 self.total_stake = Some(field);
17270 }
17271 pub fn with_total_stake(mut self, field: u64) -> Self {
17273 self.set_total_stake(field);
17274 self
17275 }
17276 pub fn active_validators(&self) -> &[super::Validator] {
17278 &self.active_validators
17279 }
17280 pub fn active_validators_mut(&mut self) -> &mut Vec<super::Validator> {
17283 &mut self.active_validators
17284 }
17285 pub fn set_active_validators(&mut self, field: Vec<super::Validator>) {
17287 self.active_validators = field;
17288 }
17289 pub fn with_active_validators(mut self, field: Vec<super::Validator>) -> Self {
17291 self.set_active_validators(field);
17292 self
17293 }
17294 pub fn pending_active_validators(&self) -> &super::MoveTable {
17296 self.pending_active_validators
17297 .as_ref()
17298 .map(|field| field as _)
17299 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17300 }
17301 pub fn pending_active_validators_opt_mut(
17303 &mut self,
17304 ) -> Option<&mut super::MoveTable> {
17305 self.pending_active_validators.as_mut().map(|field| field as _)
17306 }
17307 pub fn pending_active_validators_mut(&mut self) -> &mut super::MoveTable {
17310 self.pending_active_validators.get_or_insert_default()
17311 }
17312 pub fn pending_active_validators_opt(&self) -> Option<&super::MoveTable> {
17314 self.pending_active_validators.as_ref().map(|field| field as _)
17315 }
17316 pub fn set_pending_active_validators<T: Into<super::MoveTable>>(
17318 &mut self,
17319 field: T,
17320 ) {
17321 self.pending_active_validators = Some(field.into().into());
17322 }
17323 pub fn with_pending_active_validators<T: Into<super::MoveTable>>(
17325 mut self,
17326 field: T,
17327 ) -> Self {
17328 self.set_pending_active_validators(field.into());
17329 self
17330 }
17331 pub fn pending_removals(&self) -> &[u64] {
17333 &self.pending_removals
17334 }
17335 pub fn pending_removals_mut(&mut self) -> &mut Vec<u64> {
17338 &mut self.pending_removals
17339 }
17340 pub fn set_pending_removals(&mut self, field: Vec<u64>) {
17342 self.pending_removals = field;
17343 }
17344 pub fn with_pending_removals(mut self, field: Vec<u64>) -> Self {
17346 self.set_pending_removals(field);
17347 self
17348 }
17349 pub fn staking_pool_mappings(&self) -> &super::MoveTable {
17351 self.staking_pool_mappings
17352 .as_ref()
17353 .map(|field| field as _)
17354 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17355 }
17356 pub fn staking_pool_mappings_opt_mut(
17358 &mut self,
17359 ) -> Option<&mut super::MoveTable> {
17360 self.staking_pool_mappings.as_mut().map(|field| field as _)
17361 }
17362 pub fn staking_pool_mappings_mut(&mut self) -> &mut super::MoveTable {
17365 self.staking_pool_mappings.get_or_insert_default()
17366 }
17367 pub fn staking_pool_mappings_opt(&self) -> Option<&super::MoveTable> {
17369 self.staking_pool_mappings.as_ref().map(|field| field as _)
17370 }
17371 pub fn set_staking_pool_mappings<T: Into<super::MoveTable>>(
17373 &mut self,
17374 field: T,
17375 ) {
17376 self.staking_pool_mappings = Some(field.into().into());
17377 }
17378 pub fn with_staking_pool_mappings<T: Into<super::MoveTable>>(
17380 mut self,
17381 field: T,
17382 ) -> Self {
17383 self.set_staking_pool_mappings(field.into());
17384 self
17385 }
17386 pub fn inactive_validators(&self) -> &super::MoveTable {
17388 self.inactive_validators
17389 .as_ref()
17390 .map(|field| field as _)
17391 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17392 }
17393 pub fn inactive_validators_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
17395 self.inactive_validators.as_mut().map(|field| field as _)
17396 }
17397 pub fn inactive_validators_mut(&mut self) -> &mut super::MoveTable {
17400 self.inactive_validators.get_or_insert_default()
17401 }
17402 pub fn inactive_validators_opt(&self) -> Option<&super::MoveTable> {
17404 self.inactive_validators.as_ref().map(|field| field as _)
17405 }
17406 pub fn set_inactive_validators<T: Into<super::MoveTable>>(&mut self, field: T) {
17408 self.inactive_validators = Some(field.into().into());
17409 }
17410 pub fn with_inactive_validators<T: Into<super::MoveTable>>(
17412 mut self,
17413 field: T,
17414 ) -> Self {
17415 self.set_inactive_validators(field.into());
17416 self
17417 }
17418 pub fn validator_candidates(&self) -> &super::MoveTable {
17420 self.validator_candidates
17421 .as_ref()
17422 .map(|field| field as _)
17423 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17424 }
17425 pub fn validator_candidates_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
17427 self.validator_candidates.as_mut().map(|field| field as _)
17428 }
17429 pub fn validator_candidates_mut(&mut self) -> &mut super::MoveTable {
17432 self.validator_candidates.get_or_insert_default()
17433 }
17434 pub fn validator_candidates_opt(&self) -> Option<&super::MoveTable> {
17436 self.validator_candidates.as_ref().map(|field| field as _)
17437 }
17438 pub fn set_validator_candidates<T: Into<super::MoveTable>>(&mut self, field: T) {
17440 self.validator_candidates = Some(field.into().into());
17441 }
17442 pub fn with_validator_candidates<T: Into<super::MoveTable>>(
17444 mut self,
17445 field: T,
17446 ) -> Self {
17447 self.set_validator_candidates(field.into());
17448 self
17449 }
17450 pub fn at_risk_validators(&self) -> &::std::collections::BTreeMap<String, u64> {
17452 &self.at_risk_validators
17453 }
17454 pub fn at_risk_validators_mut(
17457 &mut self,
17458 ) -> &mut ::std::collections::BTreeMap<String, u64> {
17459 &mut self.at_risk_validators
17460 }
17461 pub fn set_at_risk_validators(
17463 &mut self,
17464 field: ::std::collections::BTreeMap<String, u64>,
17465 ) {
17466 self.at_risk_validators = field;
17467 }
17468 pub fn with_at_risk_validators(
17470 mut self,
17471 field: ::std::collections::BTreeMap<String, u64>,
17472 ) -> Self {
17473 self.set_at_risk_validators(field);
17474 self
17475 }
17476 pub fn extra_fields(&self) -> &super::MoveTable {
17478 self.extra_fields
17479 .as_ref()
17480 .map(|field| field as _)
17481 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17482 }
17483 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
17485 self.extra_fields.as_mut().map(|field| field as _)
17486 }
17487 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
17490 self.extra_fields.get_or_insert_default()
17491 }
17492 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
17494 self.extra_fields.as_ref().map(|field| field as _)
17495 }
17496 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
17498 self.extra_fields = Some(field.into().into());
17499 }
17500 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
17502 self.set_extra_fields(field.into());
17503 self
17504 }
17505 }
17506 impl super::VariantDescriptor {
17507 pub const fn const_default() -> Self {
17508 Self {
17509 name: None,
17510 position: None,
17511 fields: Vec::new(),
17512 }
17513 }
17514 #[doc(hidden)]
17515 pub fn default_instance() -> &'static Self {
17516 static DEFAULT: super::VariantDescriptor = super::VariantDescriptor::const_default();
17517 &DEFAULT
17518 }
17519 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
17521 self.name.as_mut().map(|field| field as _)
17522 }
17523 pub fn name_mut(&mut self) -> &mut String {
17526 self.name.get_or_insert_default()
17527 }
17528 pub fn name_opt(&self) -> Option<&str> {
17530 self.name.as_ref().map(|field| field as _)
17531 }
17532 pub fn set_name<T: Into<String>>(&mut self, field: T) {
17534 self.name = Some(field.into().into());
17535 }
17536 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
17538 self.set_name(field.into());
17539 self
17540 }
17541 pub fn position_opt_mut(&mut self) -> Option<&mut u32> {
17543 self.position.as_mut().map(|field| field as _)
17544 }
17545 pub fn position_mut(&mut self) -> &mut u32 {
17548 self.position.get_or_insert_default()
17549 }
17550 pub fn position_opt(&self) -> Option<u32> {
17552 self.position.as_ref().map(|field| *field)
17553 }
17554 pub fn set_position(&mut self, field: u32) {
17556 self.position = Some(field);
17557 }
17558 pub fn with_position(mut self, field: u32) -> Self {
17560 self.set_position(field);
17561 self
17562 }
17563 pub fn fields(&self) -> &[super::FieldDescriptor] {
17565 &self.fields
17566 }
17567 pub fn fields_mut(&mut self) -> &mut Vec<super::FieldDescriptor> {
17570 &mut self.fields
17571 }
17572 pub fn set_fields(&mut self, field: Vec<super::FieldDescriptor>) {
17574 self.fields = field;
17575 }
17576 pub fn with_fields(mut self, field: Vec<super::FieldDescriptor>) -> Self {
17578 self.set_fields(field);
17579 self
17580 }
17581 }
17582 impl super::VerifySignatureRequest {
17583 pub const fn const_default() -> Self {
17584 Self {
17585 message: None,
17586 signature: None,
17587 address: None,
17588 jwks: Vec::new(),
17589 }
17590 }
17591 #[doc(hidden)]
17592 pub fn default_instance() -> &'static Self {
17593 static DEFAULT: super::VerifySignatureRequest = super::VerifySignatureRequest::const_default();
17594 &DEFAULT
17595 }
17596 pub fn message(&self) -> &super::Bcs {
17598 self.message
17599 .as_ref()
17600 .map(|field| field as _)
17601 .unwrap_or_else(|| super::Bcs::default_instance() as _)
17602 }
17603 pub fn message_opt_mut(&mut self) -> Option<&mut super::Bcs> {
17605 self.message.as_mut().map(|field| field as _)
17606 }
17607 pub fn message_mut(&mut self) -> &mut super::Bcs {
17610 self.message.get_or_insert_default()
17611 }
17612 pub fn message_opt(&self) -> Option<&super::Bcs> {
17614 self.message.as_ref().map(|field| field as _)
17615 }
17616 pub fn set_message<T: Into<super::Bcs>>(&mut self, field: T) {
17618 self.message = Some(field.into().into());
17619 }
17620 pub fn with_message<T: Into<super::Bcs>>(mut self, field: T) -> Self {
17622 self.set_message(field.into());
17623 self
17624 }
17625 pub fn signature(&self) -> &super::UserSignature {
17627 self.signature
17628 .as_ref()
17629 .map(|field| field as _)
17630 .unwrap_or_else(|| super::UserSignature::default_instance() as _)
17631 }
17632 pub fn signature_opt_mut(&mut self) -> Option<&mut super::UserSignature> {
17634 self.signature.as_mut().map(|field| field as _)
17635 }
17636 pub fn signature_mut(&mut self) -> &mut super::UserSignature {
17639 self.signature.get_or_insert_default()
17640 }
17641 pub fn signature_opt(&self) -> Option<&super::UserSignature> {
17643 self.signature.as_ref().map(|field| field as _)
17644 }
17645 pub fn set_signature<T: Into<super::UserSignature>>(&mut self, field: T) {
17647 self.signature = Some(field.into().into());
17648 }
17649 pub fn with_signature<T: Into<super::UserSignature>>(
17651 mut self,
17652 field: T,
17653 ) -> Self {
17654 self.set_signature(field.into());
17655 self
17656 }
17657 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
17659 self.address.as_mut().map(|field| field as _)
17660 }
17661 pub fn address_mut(&mut self) -> &mut String {
17664 self.address.get_or_insert_default()
17665 }
17666 pub fn address_opt(&self) -> Option<&str> {
17668 self.address.as_ref().map(|field| field as _)
17669 }
17670 pub fn set_address<T: Into<String>>(&mut self, field: T) {
17672 self.address = Some(field.into().into());
17673 }
17674 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
17676 self.set_address(field.into());
17677 self
17678 }
17679 pub fn jwks(&self) -> &[super::ActiveJwk] {
17681 &self.jwks
17682 }
17683 pub fn jwks_mut(&mut self) -> &mut Vec<super::ActiveJwk> {
17686 &mut self.jwks
17687 }
17688 pub fn set_jwks(&mut self, field: Vec<super::ActiveJwk>) {
17690 self.jwks = field;
17691 }
17692 pub fn with_jwks(mut self, field: Vec<super::ActiveJwk>) -> Self {
17694 self.set_jwks(field);
17695 self
17696 }
17697 }
17698 impl super::VerifySignatureResponse {
17699 pub const fn const_default() -> Self {
17700 Self {
17701 is_valid: None,
17702 reason: None,
17703 }
17704 }
17705 #[doc(hidden)]
17706 pub fn default_instance() -> &'static Self {
17707 static DEFAULT: super::VerifySignatureResponse = super::VerifySignatureResponse::const_default();
17708 &DEFAULT
17709 }
17710 pub fn is_valid_opt_mut(&mut self) -> Option<&mut bool> {
17712 self.is_valid.as_mut().map(|field| field as _)
17713 }
17714 pub fn is_valid_mut(&mut self) -> &mut bool {
17717 self.is_valid.get_or_insert_default()
17718 }
17719 pub fn is_valid_opt(&self) -> Option<bool> {
17721 self.is_valid.as_ref().map(|field| *field)
17722 }
17723 pub fn set_is_valid(&mut self, field: bool) {
17725 self.is_valid = Some(field);
17726 }
17727 pub fn with_is_valid(mut self, field: bool) -> Self {
17729 self.set_is_valid(field);
17730 self
17731 }
17732 pub fn reason_opt_mut(&mut self) -> Option<&mut String> {
17734 self.reason.as_mut().map(|field| field as _)
17735 }
17736 pub fn reason_mut(&mut self) -> &mut String {
17739 self.reason.get_or_insert_default()
17740 }
17741 pub fn reason_opt(&self) -> Option<&str> {
17743 self.reason.as_ref().map(|field| field as _)
17744 }
17745 pub fn set_reason<T: Into<String>>(&mut self, field: T) {
17747 self.reason = Some(field.into().into());
17748 }
17749 pub fn with_reason<T: Into<String>>(mut self, field: T) -> Self {
17751 self.set_reason(field.into());
17752 self
17753 }
17754 }
17755 impl super::VersionAssignment {
17756 pub const fn const_default() -> Self {
17757 Self {
17758 object_id: None,
17759 start_version: None,
17760 version: None,
17761 }
17762 }
17763 #[doc(hidden)]
17764 pub fn default_instance() -> &'static Self {
17765 static DEFAULT: super::VersionAssignment = super::VersionAssignment::const_default();
17766 &DEFAULT
17767 }
17768 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
17770 self.object_id.as_mut().map(|field| field as _)
17771 }
17772 pub fn object_id_mut(&mut self) -> &mut String {
17775 self.object_id.get_or_insert_default()
17776 }
17777 pub fn object_id_opt(&self) -> Option<&str> {
17779 self.object_id.as_ref().map(|field| field as _)
17780 }
17781 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
17783 self.object_id = Some(field.into().into());
17784 }
17785 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
17787 self.set_object_id(field.into());
17788 self
17789 }
17790 pub fn start_version_opt_mut(&mut self) -> Option<&mut u64> {
17792 self.start_version.as_mut().map(|field| field as _)
17793 }
17794 pub fn start_version_mut(&mut self) -> &mut u64 {
17797 self.start_version.get_or_insert_default()
17798 }
17799 pub fn start_version_opt(&self) -> Option<u64> {
17801 self.start_version.as_ref().map(|field| *field)
17802 }
17803 pub fn set_start_version(&mut self, field: u64) {
17805 self.start_version = Some(field);
17806 }
17807 pub fn with_start_version(mut self, field: u64) -> Self {
17809 self.set_start_version(field);
17810 self
17811 }
17812 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
17814 self.version.as_mut().map(|field| field as _)
17815 }
17816 pub fn version_mut(&mut self) -> &mut u64 {
17819 self.version.get_or_insert_default()
17820 }
17821 pub fn version_opt(&self) -> Option<u64> {
17823 self.version.as_ref().map(|field| *field)
17824 }
17825 pub fn set_version(&mut self, field: u64) {
17827 self.version = Some(field);
17828 }
17829 pub fn with_version(mut self, field: u64) -> Self {
17831 self.set_version(field);
17832 self
17833 }
17834 }
17835 impl super::ZkLoginAuthenticator {
17836 pub const fn const_default() -> Self {
17837 Self {
17838 inputs: None,
17839 max_epoch: None,
17840 signature: None,
17841 public_identifier: None,
17842 jwk_id: None,
17843 }
17844 }
17845 #[doc(hidden)]
17846 pub fn default_instance() -> &'static Self {
17847 static DEFAULT: super::ZkLoginAuthenticator = super::ZkLoginAuthenticator::const_default();
17848 &DEFAULT
17849 }
17850 pub fn inputs(&self) -> &super::ZkLoginInputs {
17852 self.inputs
17853 .as_ref()
17854 .map(|field| field as _)
17855 .unwrap_or_else(|| super::ZkLoginInputs::default_instance() as _)
17856 }
17857 pub fn inputs_opt_mut(&mut self) -> Option<&mut super::ZkLoginInputs> {
17859 self.inputs.as_mut().map(|field| field as _)
17860 }
17861 pub fn inputs_mut(&mut self) -> &mut super::ZkLoginInputs {
17864 self.inputs.get_or_insert_default()
17865 }
17866 pub fn inputs_opt(&self) -> Option<&super::ZkLoginInputs> {
17868 self.inputs.as_ref().map(|field| field as _)
17869 }
17870 pub fn set_inputs<T: Into<super::ZkLoginInputs>>(&mut self, field: T) {
17872 self.inputs = Some(field.into().into());
17873 }
17874 pub fn with_inputs<T: Into<super::ZkLoginInputs>>(mut self, field: T) -> Self {
17876 self.set_inputs(field.into());
17877 self
17878 }
17879 pub fn max_epoch_opt_mut(&mut self) -> Option<&mut u64> {
17881 self.max_epoch.as_mut().map(|field| field as _)
17882 }
17883 pub fn max_epoch_mut(&mut self) -> &mut u64 {
17886 self.max_epoch.get_or_insert_default()
17887 }
17888 pub fn max_epoch_opt(&self) -> Option<u64> {
17890 self.max_epoch.as_ref().map(|field| *field)
17891 }
17892 pub fn set_max_epoch(&mut self, field: u64) {
17894 self.max_epoch = Some(field);
17895 }
17896 pub fn with_max_epoch(mut self, field: u64) -> Self {
17898 self.set_max_epoch(field);
17899 self
17900 }
17901 pub fn signature(&self) -> &super::SimpleSignature {
17903 self.signature
17904 .as_ref()
17905 .map(|field| field as _)
17906 .unwrap_or_else(|| super::SimpleSignature::default_instance() as _)
17907 }
17908 pub fn signature_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
17910 self.signature.as_mut().map(|field| field as _)
17911 }
17912 pub fn signature_mut(&mut self) -> &mut super::SimpleSignature {
17915 self.signature.get_or_insert_default()
17916 }
17917 pub fn signature_opt(&self) -> Option<&super::SimpleSignature> {
17919 self.signature.as_ref().map(|field| field as _)
17920 }
17921 pub fn set_signature<T: Into<super::SimpleSignature>>(&mut self, field: T) {
17923 self.signature = Some(field.into().into());
17924 }
17925 pub fn with_signature<T: Into<super::SimpleSignature>>(
17927 mut self,
17928 field: T,
17929 ) -> Self {
17930 self.set_signature(field.into());
17931 self
17932 }
17933 pub fn public_identifier(&self) -> &super::ZkLoginPublicIdentifier {
17935 self.public_identifier
17936 .as_ref()
17937 .map(|field| field as _)
17938 .unwrap_or_else(|| {
17939 super::ZkLoginPublicIdentifier::default_instance() as _
17940 })
17941 }
17942 pub fn public_identifier_opt_mut(
17944 &mut self,
17945 ) -> Option<&mut super::ZkLoginPublicIdentifier> {
17946 self.public_identifier.as_mut().map(|field| field as _)
17947 }
17948 pub fn public_identifier_mut(&mut self) -> &mut super::ZkLoginPublicIdentifier {
17951 self.public_identifier.get_or_insert_default()
17952 }
17953 pub fn public_identifier_opt(&self) -> Option<&super::ZkLoginPublicIdentifier> {
17955 self.public_identifier.as_ref().map(|field| field as _)
17956 }
17957 pub fn set_public_identifier<T: Into<super::ZkLoginPublicIdentifier>>(
17959 &mut self,
17960 field: T,
17961 ) {
17962 self.public_identifier = Some(field.into().into());
17963 }
17964 pub fn with_public_identifier<T: Into<super::ZkLoginPublicIdentifier>>(
17966 mut self,
17967 field: T,
17968 ) -> Self {
17969 self.set_public_identifier(field.into());
17970 self
17971 }
17972 pub fn jwk_id(&self) -> &super::JwkId {
17974 self.jwk_id
17975 .as_ref()
17976 .map(|field| field as _)
17977 .unwrap_or_else(|| super::JwkId::default_instance() as _)
17978 }
17979 pub fn jwk_id_opt_mut(&mut self) -> Option<&mut super::JwkId> {
17981 self.jwk_id.as_mut().map(|field| field as _)
17982 }
17983 pub fn jwk_id_mut(&mut self) -> &mut super::JwkId {
17986 self.jwk_id.get_or_insert_default()
17987 }
17988 pub fn jwk_id_opt(&self) -> Option<&super::JwkId> {
17990 self.jwk_id.as_ref().map(|field| field as _)
17991 }
17992 pub fn set_jwk_id<T: Into<super::JwkId>>(&mut self, field: T) {
17994 self.jwk_id = Some(field.into().into());
17995 }
17996 pub fn with_jwk_id<T: Into<super::JwkId>>(mut self, field: T) -> Self {
17998 self.set_jwk_id(field.into());
17999 self
18000 }
18001 }
18002 impl super::ZkLoginClaim {
18003 pub const fn const_default() -> Self {
18004 Self {
18005 value: None,
18006 index_mod_4: None,
18007 }
18008 }
18009 #[doc(hidden)]
18010 pub fn default_instance() -> &'static Self {
18011 static DEFAULT: super::ZkLoginClaim = super::ZkLoginClaim::const_default();
18012 &DEFAULT
18013 }
18014 pub fn value_opt_mut(&mut self) -> Option<&mut String> {
18016 self.value.as_mut().map(|field| field as _)
18017 }
18018 pub fn value_mut(&mut self) -> &mut String {
18021 self.value.get_or_insert_default()
18022 }
18023 pub fn value_opt(&self) -> Option<&str> {
18025 self.value.as_ref().map(|field| field as _)
18026 }
18027 pub fn set_value<T: Into<String>>(&mut self, field: T) {
18029 self.value = Some(field.into().into());
18030 }
18031 pub fn with_value<T: Into<String>>(mut self, field: T) -> Self {
18033 self.set_value(field.into());
18034 self
18035 }
18036 pub fn index_mod_4_opt_mut(&mut self) -> Option<&mut u32> {
18038 self.index_mod_4.as_mut().map(|field| field as _)
18039 }
18040 pub fn index_mod_4_mut(&mut self) -> &mut u32 {
18043 self.index_mod_4.get_or_insert_default()
18044 }
18045 pub fn index_mod_4_opt(&self) -> Option<u32> {
18047 self.index_mod_4.as_ref().map(|field| *field)
18048 }
18049 pub fn set_index_mod_4(&mut self, field: u32) {
18051 self.index_mod_4 = Some(field);
18052 }
18053 pub fn with_index_mod_4(mut self, field: u32) -> Self {
18055 self.set_index_mod_4(field);
18056 self
18057 }
18058 }
18059 impl super::ZkLoginInputs {
18060 pub const fn const_default() -> Self {
18061 Self {
18062 proof_points: None,
18063 iss_base64_details: None,
18064 header_base64: None,
18065 address_seed: None,
18066 }
18067 }
18068 #[doc(hidden)]
18069 pub fn default_instance() -> &'static Self {
18070 static DEFAULT: super::ZkLoginInputs = super::ZkLoginInputs::const_default();
18071 &DEFAULT
18072 }
18073 pub fn proof_points(&self) -> &super::ZkLoginProof {
18075 self.proof_points
18076 .as_ref()
18077 .map(|field| field as _)
18078 .unwrap_or_else(|| super::ZkLoginProof::default_instance() as _)
18079 }
18080 pub fn proof_points_opt_mut(&mut self) -> Option<&mut super::ZkLoginProof> {
18082 self.proof_points.as_mut().map(|field| field as _)
18083 }
18084 pub fn proof_points_mut(&mut self) -> &mut super::ZkLoginProof {
18087 self.proof_points.get_or_insert_default()
18088 }
18089 pub fn proof_points_opt(&self) -> Option<&super::ZkLoginProof> {
18091 self.proof_points.as_ref().map(|field| field as _)
18092 }
18093 pub fn set_proof_points<T: Into<super::ZkLoginProof>>(&mut self, field: T) {
18095 self.proof_points = Some(field.into().into());
18096 }
18097 pub fn with_proof_points<T: Into<super::ZkLoginProof>>(
18099 mut self,
18100 field: T,
18101 ) -> Self {
18102 self.set_proof_points(field.into());
18103 self
18104 }
18105 pub fn iss_base64_details(&self) -> &super::ZkLoginClaim {
18107 self.iss_base64_details
18108 .as_ref()
18109 .map(|field| field as _)
18110 .unwrap_or_else(|| super::ZkLoginClaim::default_instance() as _)
18111 }
18112 pub fn iss_base64_details_opt_mut(
18114 &mut self,
18115 ) -> Option<&mut super::ZkLoginClaim> {
18116 self.iss_base64_details.as_mut().map(|field| field as _)
18117 }
18118 pub fn iss_base64_details_mut(&mut self) -> &mut super::ZkLoginClaim {
18121 self.iss_base64_details.get_or_insert_default()
18122 }
18123 pub fn iss_base64_details_opt(&self) -> Option<&super::ZkLoginClaim> {
18125 self.iss_base64_details.as_ref().map(|field| field as _)
18126 }
18127 pub fn set_iss_base64_details<T: Into<super::ZkLoginClaim>>(
18129 &mut self,
18130 field: T,
18131 ) {
18132 self.iss_base64_details = Some(field.into().into());
18133 }
18134 pub fn with_iss_base64_details<T: Into<super::ZkLoginClaim>>(
18136 mut self,
18137 field: T,
18138 ) -> Self {
18139 self.set_iss_base64_details(field.into());
18140 self
18141 }
18142 pub fn header_base64_opt_mut(&mut self) -> Option<&mut String> {
18144 self.header_base64.as_mut().map(|field| field as _)
18145 }
18146 pub fn header_base64_mut(&mut self) -> &mut String {
18149 self.header_base64.get_or_insert_default()
18150 }
18151 pub fn header_base64_opt(&self) -> Option<&str> {
18153 self.header_base64.as_ref().map(|field| field as _)
18154 }
18155 pub fn set_header_base64<T: Into<String>>(&mut self, field: T) {
18157 self.header_base64 = Some(field.into().into());
18158 }
18159 pub fn with_header_base64<T: Into<String>>(mut self, field: T) -> Self {
18161 self.set_header_base64(field.into());
18162 self
18163 }
18164 pub fn address_seed_opt_mut(&mut self) -> Option<&mut String> {
18166 self.address_seed.as_mut().map(|field| field as _)
18167 }
18168 pub fn address_seed_mut(&mut self) -> &mut String {
18171 self.address_seed.get_or_insert_default()
18172 }
18173 pub fn address_seed_opt(&self) -> Option<&str> {
18175 self.address_seed.as_ref().map(|field| field as _)
18176 }
18177 pub fn set_address_seed<T: Into<String>>(&mut self, field: T) {
18179 self.address_seed = Some(field.into().into());
18180 }
18181 pub fn with_address_seed<T: Into<String>>(mut self, field: T) -> Self {
18183 self.set_address_seed(field.into());
18184 self
18185 }
18186 }
18187 impl super::ZkLoginProof {
18188 pub const fn const_default() -> Self {
18189 Self { a: None, b: None, c: None }
18190 }
18191 #[doc(hidden)]
18192 pub fn default_instance() -> &'static Self {
18193 static DEFAULT: super::ZkLoginProof = super::ZkLoginProof::const_default();
18194 &DEFAULT
18195 }
18196 pub fn a(&self) -> &super::CircomG1 {
18198 self.a
18199 .as_ref()
18200 .map(|field| field as _)
18201 .unwrap_or_else(|| super::CircomG1::default_instance() as _)
18202 }
18203 pub fn a_opt_mut(&mut self) -> Option<&mut super::CircomG1> {
18205 self.a.as_mut().map(|field| field as _)
18206 }
18207 pub fn a_mut(&mut self) -> &mut super::CircomG1 {
18210 self.a.get_or_insert_default()
18211 }
18212 pub fn a_opt(&self) -> Option<&super::CircomG1> {
18214 self.a.as_ref().map(|field| field as _)
18215 }
18216 pub fn set_a<T: Into<super::CircomG1>>(&mut self, field: T) {
18218 self.a = Some(field.into().into());
18219 }
18220 pub fn with_a<T: Into<super::CircomG1>>(mut self, field: T) -> Self {
18222 self.set_a(field.into());
18223 self
18224 }
18225 pub fn b(&self) -> &super::CircomG2 {
18227 self.b
18228 .as_ref()
18229 .map(|field| field as _)
18230 .unwrap_or_else(|| super::CircomG2::default_instance() as _)
18231 }
18232 pub fn b_opt_mut(&mut self) -> Option<&mut super::CircomG2> {
18234 self.b.as_mut().map(|field| field as _)
18235 }
18236 pub fn b_mut(&mut self) -> &mut super::CircomG2 {
18239 self.b.get_or_insert_default()
18240 }
18241 pub fn b_opt(&self) -> Option<&super::CircomG2> {
18243 self.b.as_ref().map(|field| field as _)
18244 }
18245 pub fn set_b<T: Into<super::CircomG2>>(&mut self, field: T) {
18247 self.b = Some(field.into().into());
18248 }
18249 pub fn with_b<T: Into<super::CircomG2>>(mut self, field: T) -> Self {
18251 self.set_b(field.into());
18252 self
18253 }
18254 pub fn c(&self) -> &super::CircomG1 {
18256 self.c
18257 .as_ref()
18258 .map(|field| field as _)
18259 .unwrap_or_else(|| super::CircomG1::default_instance() as _)
18260 }
18261 pub fn c_opt_mut(&mut self) -> Option<&mut super::CircomG1> {
18263 self.c.as_mut().map(|field| field as _)
18264 }
18265 pub fn c_mut(&mut self) -> &mut super::CircomG1 {
18268 self.c.get_or_insert_default()
18269 }
18270 pub fn c_opt(&self) -> Option<&super::CircomG1> {
18272 self.c.as_ref().map(|field| field as _)
18273 }
18274 pub fn set_c<T: Into<super::CircomG1>>(&mut self, field: T) {
18276 self.c = Some(field.into().into());
18277 }
18278 pub fn with_c<T: Into<super::CircomG1>>(mut self, field: T) -> Self {
18280 self.set_c(field.into());
18281 self
18282 }
18283 }
18284 impl super::ZkLoginPublicIdentifier {
18285 pub const fn const_default() -> Self {
18286 Self {
18287 iss: None,
18288 address_seed: None,
18289 }
18290 }
18291 #[doc(hidden)]
18292 pub fn default_instance() -> &'static Self {
18293 static DEFAULT: super::ZkLoginPublicIdentifier = super::ZkLoginPublicIdentifier::const_default();
18294 &DEFAULT
18295 }
18296 pub fn iss_opt_mut(&mut self) -> Option<&mut String> {
18298 self.iss.as_mut().map(|field| field as _)
18299 }
18300 pub fn iss_mut(&mut self) -> &mut String {
18303 self.iss.get_or_insert_default()
18304 }
18305 pub fn iss_opt(&self) -> Option<&str> {
18307 self.iss.as_ref().map(|field| field as _)
18308 }
18309 pub fn set_iss<T: Into<String>>(&mut self, field: T) {
18311 self.iss = Some(field.into().into());
18312 }
18313 pub fn with_iss<T: Into<String>>(mut self, field: T) -> Self {
18315 self.set_iss(field.into());
18316 self
18317 }
18318 pub fn address_seed_opt_mut(&mut self) -> Option<&mut String> {
18320 self.address_seed.as_mut().map(|field| field as _)
18321 }
18322 pub fn address_seed_mut(&mut self) -> &mut String {
18325 self.address_seed.get_or_insert_default()
18326 }
18327 pub fn address_seed_opt(&self) -> Option<&str> {
18329 self.address_seed.as_ref().map(|field| field as _)
18330 }
18331 pub fn set_address_seed<T: Into<String>>(&mut self, field: T) {
18333 self.address_seed = Some(field.into().into());
18334 }
18335 pub fn with_address_seed<T: Into<String>>(mut self, field: T) -> Self {
18337 self.set_address_seed(field.into());
18338 self
18339 }
18340 }
18341}