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::AffectedAddressFilter {
269 pub const fn const_default() -> Self {
270 Self { address: None }
271 }
272 #[doc(hidden)]
273 pub fn default_instance() -> &'static Self {
274 static DEFAULT: super::AffectedAddressFilter = super::AffectedAddressFilter::const_default();
275 &DEFAULT
276 }
277 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
279 self.address.as_mut().map(|field| field as _)
280 }
281 pub fn address_mut(&mut self) -> &mut String {
284 self.address.get_or_insert_default()
285 }
286 pub fn address_opt(&self) -> Option<&str> {
288 self.address.as_ref().map(|field| field as _)
289 }
290 pub fn set_address<T: Into<String>>(&mut self, field: T) {
292 self.address = Some(field.into().into());
293 }
294 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
296 self.set_address(field.into());
297 self
298 }
299 }
300 impl super::AffectedObjectFilter {
301 pub const fn const_default() -> Self {
302 Self { object_id: None }
303 }
304 #[doc(hidden)]
305 pub fn default_instance() -> &'static Self {
306 static DEFAULT: super::AffectedObjectFilter = super::AffectedObjectFilter::const_default();
307 &DEFAULT
308 }
309 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
311 self.object_id.as_mut().map(|field| field as _)
312 }
313 pub fn object_id_mut(&mut self) -> &mut String {
316 self.object_id.get_or_insert_default()
317 }
318 pub fn object_id_opt(&self) -> Option<&str> {
320 self.object_id.as_ref().map(|field| field as _)
321 }
322 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
324 self.object_id = Some(field.into().into());
325 }
326 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
328 self.set_object_id(field.into());
329 self
330 }
331 }
332 impl super::AllowedProposers {
333 pub const fn const_default() -> Self {
334 Self {
335 epoch: None,
336 proposers: Vec::new(),
337 }
338 }
339 #[doc(hidden)]
340 pub fn default_instance() -> &'static Self {
341 static DEFAULT: super::AllowedProposers = super::AllowedProposers::const_default();
342 &DEFAULT
343 }
344 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
346 self.epoch.as_mut().map(|field| field as _)
347 }
348 pub fn epoch_mut(&mut self) -> &mut u64 {
351 self.epoch.get_or_insert_default()
352 }
353 pub fn epoch_opt(&self) -> Option<u64> {
355 self.epoch.as_ref().map(|field| *field)
356 }
357 pub fn set_epoch(&mut self, field: u64) {
359 self.epoch = Some(field);
360 }
361 pub fn with_epoch(mut self, field: u64) -> Self {
363 self.set_epoch(field);
364 self
365 }
366 pub fn proposers(&self) -> &[u32] {
368 &self.proposers
369 }
370 pub fn proposers_mut(&mut self) -> &mut Vec<u32> {
373 &mut self.proposers
374 }
375 pub fn set_proposers(&mut self, field: Vec<u32>) {
377 self.proposers = field;
378 }
379 pub fn with_proposers(mut self, field: Vec<u32>) -> Self {
381 self.set_proposers(field);
382 self
383 }
384 }
385 impl super::Argument {
386 pub const fn const_default() -> Self {
387 Self {
388 kind: None,
389 input: None,
390 result: None,
391 subresult: None,
392 }
393 }
394 #[doc(hidden)]
395 pub fn default_instance() -> &'static Self {
396 static DEFAULT: super::Argument = super::Argument::const_default();
397 &DEFAULT
398 }
399 pub fn with_kind<T: Into<super::argument::ArgumentKind>>(
401 mut self,
402 field: T,
403 ) -> Self {
404 self.set_kind(field.into());
405 self
406 }
407 pub fn input_opt_mut(&mut self) -> Option<&mut u32> {
409 self.input.as_mut().map(|field| field as _)
410 }
411 pub fn input_mut(&mut self) -> &mut u32 {
414 self.input.get_or_insert_default()
415 }
416 pub fn input_opt(&self) -> Option<u32> {
418 self.input.as_ref().map(|field| *field)
419 }
420 pub fn set_input(&mut self, field: u32) {
422 self.input = Some(field);
423 }
424 pub fn with_input(mut self, field: u32) -> Self {
426 self.set_input(field);
427 self
428 }
429 pub fn result_opt_mut(&mut self) -> Option<&mut u32> {
431 self.result.as_mut().map(|field| field as _)
432 }
433 pub fn result_mut(&mut self) -> &mut u32 {
436 self.result.get_or_insert_default()
437 }
438 pub fn result_opt(&self) -> Option<u32> {
440 self.result.as_ref().map(|field| *field)
441 }
442 pub fn set_result(&mut self, field: u32) {
444 self.result = Some(field);
445 }
446 pub fn with_result(mut self, field: u32) -> Self {
448 self.set_result(field);
449 self
450 }
451 pub fn subresult_opt_mut(&mut self) -> Option<&mut u32> {
453 self.subresult.as_mut().map(|field| field as _)
454 }
455 pub fn subresult_mut(&mut self) -> &mut u32 {
458 self.subresult.get_or_insert_default()
459 }
460 pub fn subresult_opt(&self) -> Option<u32> {
462 self.subresult.as_ref().map(|field| *field)
463 }
464 pub fn set_subresult(&mut self, field: u32) {
466 self.subresult = Some(field);
467 }
468 pub fn with_subresult(mut self, field: u32) -> Self {
470 self.set_subresult(field);
471 self
472 }
473 }
474 impl super::AuthenticatorStateExpire {
475 pub const fn const_default() -> Self {
476 Self {
477 min_epoch: None,
478 authenticator_object_initial_shared_version: None,
479 }
480 }
481 #[doc(hidden)]
482 pub fn default_instance() -> &'static Self {
483 static DEFAULT: super::AuthenticatorStateExpire = super::AuthenticatorStateExpire::const_default();
484 &DEFAULT
485 }
486 pub fn min_epoch_opt_mut(&mut self) -> Option<&mut u64> {
488 self.min_epoch.as_mut().map(|field| field as _)
489 }
490 pub fn min_epoch_mut(&mut self) -> &mut u64 {
493 self.min_epoch.get_or_insert_default()
494 }
495 pub fn min_epoch_opt(&self) -> Option<u64> {
497 self.min_epoch.as_ref().map(|field| *field)
498 }
499 pub fn set_min_epoch(&mut self, field: u64) {
501 self.min_epoch = Some(field);
502 }
503 pub fn with_min_epoch(mut self, field: u64) -> Self {
505 self.set_min_epoch(field);
506 self
507 }
508 pub fn authenticator_object_initial_shared_version_opt_mut(
510 &mut self,
511 ) -> Option<&mut u64> {
512 self.authenticator_object_initial_shared_version
513 .as_mut()
514 .map(|field| field as _)
515 }
516 pub fn authenticator_object_initial_shared_version_mut(&mut self) -> &mut u64 {
519 self.authenticator_object_initial_shared_version.get_or_insert_default()
520 }
521 pub fn authenticator_object_initial_shared_version_opt(&self) -> Option<u64> {
523 self.authenticator_object_initial_shared_version.as_ref().map(|field| *field)
524 }
525 pub fn set_authenticator_object_initial_shared_version(&mut self, field: u64) {
527 self.authenticator_object_initial_shared_version = Some(field);
528 }
529 pub fn with_authenticator_object_initial_shared_version(
531 mut self,
532 field: u64,
533 ) -> Self {
534 self.set_authenticator_object_initial_shared_version(field);
535 self
536 }
537 }
538 impl super::AuthenticatorStateUpdate {
539 pub const fn const_default() -> Self {
540 Self {
541 epoch: None,
542 round: None,
543 new_active_jwks: Vec::new(),
544 authenticator_object_initial_shared_version: None,
545 }
546 }
547 #[doc(hidden)]
548 pub fn default_instance() -> &'static Self {
549 static DEFAULT: super::AuthenticatorStateUpdate = super::AuthenticatorStateUpdate::const_default();
550 &DEFAULT
551 }
552 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
554 self.epoch.as_mut().map(|field| field as _)
555 }
556 pub fn epoch_mut(&mut self) -> &mut u64 {
559 self.epoch.get_or_insert_default()
560 }
561 pub fn epoch_opt(&self) -> Option<u64> {
563 self.epoch.as_ref().map(|field| *field)
564 }
565 pub fn set_epoch(&mut self, field: u64) {
567 self.epoch = Some(field);
568 }
569 pub fn with_epoch(mut self, field: u64) -> Self {
571 self.set_epoch(field);
572 self
573 }
574 pub fn round_opt_mut(&mut self) -> Option<&mut u64> {
576 self.round.as_mut().map(|field| field as _)
577 }
578 pub fn round_mut(&mut self) -> &mut u64 {
581 self.round.get_or_insert_default()
582 }
583 pub fn round_opt(&self) -> Option<u64> {
585 self.round.as_ref().map(|field| *field)
586 }
587 pub fn set_round(&mut self, field: u64) {
589 self.round = Some(field);
590 }
591 pub fn with_round(mut self, field: u64) -> Self {
593 self.set_round(field);
594 self
595 }
596 pub fn new_active_jwks(&self) -> &[super::ActiveJwk] {
598 &self.new_active_jwks
599 }
600 pub fn new_active_jwks_mut(&mut self) -> &mut Vec<super::ActiveJwk> {
603 &mut self.new_active_jwks
604 }
605 pub fn set_new_active_jwks(&mut self, field: Vec<super::ActiveJwk>) {
607 self.new_active_jwks = field;
608 }
609 pub fn with_new_active_jwks(mut self, field: Vec<super::ActiveJwk>) -> Self {
611 self.set_new_active_jwks(field);
612 self
613 }
614 pub fn authenticator_object_initial_shared_version_opt_mut(
616 &mut self,
617 ) -> Option<&mut u64> {
618 self.authenticator_object_initial_shared_version
619 .as_mut()
620 .map(|field| field as _)
621 }
622 pub fn authenticator_object_initial_shared_version_mut(&mut self) -> &mut u64 {
625 self.authenticator_object_initial_shared_version.get_or_insert_default()
626 }
627 pub fn authenticator_object_initial_shared_version_opt(&self) -> Option<u64> {
629 self.authenticator_object_initial_shared_version.as_ref().map(|field| *field)
630 }
631 pub fn set_authenticator_object_initial_shared_version(&mut self, field: u64) {
633 self.authenticator_object_initial_shared_version = Some(field);
634 }
635 pub fn with_authenticator_object_initial_shared_version(
637 mut self,
638 field: u64,
639 ) -> Self {
640 self.set_authenticator_object_initial_shared_version(field);
641 self
642 }
643 }
644 impl super::Balance {
645 pub const fn const_default() -> Self {
646 Self {
647 coin_type: None,
648 balance: None,
649 address_balance: None,
650 coin_balance: None,
651 }
652 }
653 #[doc(hidden)]
654 pub fn default_instance() -> &'static Self {
655 static DEFAULT: super::Balance = super::Balance::const_default();
656 &DEFAULT
657 }
658 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
660 self.coin_type.as_mut().map(|field| field as _)
661 }
662 pub fn coin_type_mut(&mut self) -> &mut String {
665 self.coin_type.get_or_insert_default()
666 }
667 pub fn coin_type_opt(&self) -> Option<&str> {
669 self.coin_type.as_ref().map(|field| field as _)
670 }
671 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
673 self.coin_type = Some(field.into().into());
674 }
675 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
677 self.set_coin_type(field.into());
678 self
679 }
680 pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
682 self.balance.as_mut().map(|field| field as _)
683 }
684 pub fn balance_mut(&mut self) -> &mut u64 {
687 self.balance.get_or_insert_default()
688 }
689 pub fn balance_opt(&self) -> Option<u64> {
691 self.balance.as_ref().map(|field| *field)
692 }
693 pub fn set_balance(&mut self, field: u64) {
695 self.balance = Some(field);
696 }
697 pub fn with_balance(mut self, field: u64) -> Self {
699 self.set_balance(field);
700 self
701 }
702 pub fn address_balance_opt_mut(&mut self) -> Option<&mut u64> {
704 self.address_balance.as_mut().map(|field| field as _)
705 }
706 pub fn address_balance_mut(&mut self) -> &mut u64 {
709 self.address_balance.get_or_insert_default()
710 }
711 pub fn address_balance_opt(&self) -> Option<u64> {
713 self.address_balance.as_ref().map(|field| *field)
714 }
715 pub fn set_address_balance(&mut self, field: u64) {
717 self.address_balance = Some(field);
718 }
719 pub fn with_address_balance(mut self, field: u64) -> Self {
721 self.set_address_balance(field);
722 self
723 }
724 pub fn coin_balance_opt_mut(&mut self) -> Option<&mut u64> {
726 self.coin_balance.as_mut().map(|field| field as _)
727 }
728 pub fn coin_balance_mut(&mut self) -> &mut u64 {
731 self.coin_balance.get_or_insert_default()
732 }
733 pub fn coin_balance_opt(&self) -> Option<u64> {
735 self.coin_balance.as_ref().map(|field| *field)
736 }
737 pub fn set_coin_balance(&mut self, field: u64) {
739 self.coin_balance = Some(field);
740 }
741 pub fn with_coin_balance(mut self, field: u64) -> Self {
743 self.set_coin_balance(field);
744 self
745 }
746 }
747 impl super::BalanceChange {
748 pub const fn const_default() -> Self {
749 Self {
750 address: None,
751 coin_type: None,
752 amount: None,
753 }
754 }
755 #[doc(hidden)]
756 pub fn default_instance() -> &'static Self {
757 static DEFAULT: super::BalanceChange = super::BalanceChange::const_default();
758 &DEFAULT
759 }
760 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
762 self.address.as_mut().map(|field| field as _)
763 }
764 pub fn address_mut(&mut self) -> &mut String {
767 self.address.get_or_insert_default()
768 }
769 pub fn address_opt(&self) -> Option<&str> {
771 self.address.as_ref().map(|field| field as _)
772 }
773 pub fn set_address<T: Into<String>>(&mut self, field: T) {
775 self.address = Some(field.into().into());
776 }
777 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
779 self.set_address(field.into());
780 self
781 }
782 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
784 self.coin_type.as_mut().map(|field| field as _)
785 }
786 pub fn coin_type_mut(&mut self) -> &mut String {
789 self.coin_type.get_or_insert_default()
790 }
791 pub fn coin_type_opt(&self) -> Option<&str> {
793 self.coin_type.as_ref().map(|field| field as _)
794 }
795 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
797 self.coin_type = Some(field.into().into());
798 }
799 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
801 self.set_coin_type(field.into());
802 self
803 }
804 pub fn amount_opt_mut(&mut self) -> Option<&mut String> {
806 self.amount.as_mut().map(|field| field as _)
807 }
808 pub fn amount_mut(&mut self) -> &mut String {
811 self.amount.get_or_insert_default()
812 }
813 pub fn amount_opt(&self) -> Option<&str> {
815 self.amount.as_ref().map(|field| field as _)
816 }
817 pub fn set_amount<T: Into<String>>(&mut self, field: T) {
819 self.amount = Some(field.into().into());
820 }
821 pub fn with_amount<T: Into<String>>(mut self, field: T) -> Self {
823 self.set_amount(field.into());
824 self
825 }
826 }
827 impl super::BatchGetObjectsRequest {
828 pub const fn const_default() -> Self {
829 Self {
830 requests: Vec::new(),
831 read_mask: None,
832 }
833 }
834 #[doc(hidden)]
835 pub fn default_instance() -> &'static Self {
836 static DEFAULT: super::BatchGetObjectsRequest = super::BatchGetObjectsRequest::const_default();
837 &DEFAULT
838 }
839 pub fn requests(&self) -> &[super::GetObjectRequest] {
841 &self.requests
842 }
843 pub fn requests_mut(&mut self) -> &mut Vec<super::GetObjectRequest> {
846 &mut self.requests
847 }
848 pub fn set_requests(&mut self, field: Vec<super::GetObjectRequest>) {
850 self.requests = field;
851 }
852 pub fn with_requests(mut self, field: Vec<super::GetObjectRequest>) -> Self {
854 self.set_requests(field);
855 self
856 }
857 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
859 self.read_mask.as_mut().map(|field| field as _)
860 }
861 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
864 self.read_mask.get_or_insert_default()
865 }
866 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
868 self.read_mask.as_ref().map(|field| field as _)
869 }
870 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
872 self.read_mask = Some(field.into().into());
873 }
874 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
876 mut self,
877 field: T,
878 ) -> Self {
879 self.set_read_mask(field.into());
880 self
881 }
882 }
883 impl super::BatchGetObjectsResponse {
884 pub const fn const_default() -> Self {
885 Self { objects: Vec::new() }
886 }
887 #[doc(hidden)]
888 pub fn default_instance() -> &'static Self {
889 static DEFAULT: super::BatchGetObjectsResponse = super::BatchGetObjectsResponse::const_default();
890 &DEFAULT
891 }
892 pub fn objects(&self) -> &[super::GetObjectResult] {
894 &self.objects
895 }
896 pub fn objects_mut(&mut self) -> &mut Vec<super::GetObjectResult> {
899 &mut self.objects
900 }
901 pub fn set_objects(&mut self, field: Vec<super::GetObjectResult>) {
903 self.objects = field;
904 }
905 pub fn with_objects(mut self, field: Vec<super::GetObjectResult>) -> Self {
907 self.set_objects(field);
908 self
909 }
910 }
911 impl super::BatchGetTransactionsRequest {
912 pub const fn const_default() -> Self {
913 Self {
914 digests: Vec::new(),
915 read_mask: None,
916 }
917 }
918 #[doc(hidden)]
919 pub fn default_instance() -> &'static Self {
920 static DEFAULT: super::BatchGetTransactionsRequest = super::BatchGetTransactionsRequest::const_default();
921 &DEFAULT
922 }
923 pub fn digests(&self) -> &[String] {
925 &self.digests
926 }
927 pub fn digests_mut(&mut self) -> &mut Vec<String> {
930 &mut self.digests
931 }
932 pub fn set_digests(&mut self, field: Vec<String>) {
934 self.digests = field;
935 }
936 pub fn with_digests(mut self, field: Vec<String>) -> Self {
938 self.set_digests(field);
939 self
940 }
941 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
943 self.read_mask.as_mut().map(|field| field as _)
944 }
945 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
948 self.read_mask.get_or_insert_default()
949 }
950 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
952 self.read_mask.as_ref().map(|field| field as _)
953 }
954 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
956 self.read_mask = Some(field.into().into());
957 }
958 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
960 mut self,
961 field: T,
962 ) -> Self {
963 self.set_read_mask(field.into());
964 self
965 }
966 }
967 impl super::BatchGetTransactionsResponse {
968 pub const fn const_default() -> Self {
969 Self { transactions: Vec::new() }
970 }
971 #[doc(hidden)]
972 pub fn default_instance() -> &'static Self {
973 static DEFAULT: super::BatchGetTransactionsResponse = super::BatchGetTransactionsResponse::const_default();
974 &DEFAULT
975 }
976 pub fn transactions(&self) -> &[super::GetTransactionResult] {
978 &self.transactions
979 }
980 pub fn transactions_mut(&mut self) -> &mut Vec<super::GetTransactionResult> {
983 &mut self.transactions
984 }
985 pub fn set_transactions(&mut self, field: Vec<super::GetTransactionResult>) {
987 self.transactions = field;
988 }
989 pub fn with_transactions(
991 mut self,
992 field: Vec<super::GetTransactionResult>,
993 ) -> Self {
994 self.set_transactions(field);
995 self
996 }
997 }
998 impl super::Bcs {
999 pub const fn const_default() -> Self {
1000 Self { name: None, value: None }
1001 }
1002 #[doc(hidden)]
1003 pub fn default_instance() -> &'static Self {
1004 static DEFAULT: super::Bcs = super::Bcs::const_default();
1005 &DEFAULT
1006 }
1007 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
1009 self.name.as_mut().map(|field| field as _)
1010 }
1011 pub fn name_mut(&mut self) -> &mut String {
1014 self.name.get_or_insert_default()
1015 }
1016 pub fn name_opt(&self) -> Option<&str> {
1018 self.name.as_ref().map(|field| field as _)
1019 }
1020 pub fn set_name<T: Into<String>>(&mut self, field: T) {
1022 self.name = Some(field.into().into());
1023 }
1024 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
1026 self.set_name(field.into());
1027 self
1028 }
1029 pub fn value_opt(&self) -> Option<&[u8]> {
1031 self.value.as_ref().map(|field| field as _)
1032 }
1033 pub fn set_value<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
1035 self.value = Some(field.into().into());
1036 }
1037 pub fn with_value<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
1039 self.set_value(field.into());
1040 self
1041 }
1042 }
1043 impl super::CanceledTransaction {
1044 pub const fn const_default() -> Self {
1045 Self {
1046 digest: None,
1047 version_assignments: Vec::new(),
1048 }
1049 }
1050 #[doc(hidden)]
1051 pub fn default_instance() -> &'static Self {
1052 static DEFAULT: super::CanceledTransaction = super::CanceledTransaction::const_default();
1053 &DEFAULT
1054 }
1055 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1057 self.digest.as_mut().map(|field| field as _)
1058 }
1059 pub fn digest_mut(&mut self) -> &mut String {
1062 self.digest.get_or_insert_default()
1063 }
1064 pub fn digest_opt(&self) -> Option<&str> {
1066 self.digest.as_ref().map(|field| field as _)
1067 }
1068 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1070 self.digest = Some(field.into().into());
1071 }
1072 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1074 self.set_digest(field.into());
1075 self
1076 }
1077 pub fn version_assignments(&self) -> &[super::VersionAssignment] {
1079 &self.version_assignments
1080 }
1081 pub fn version_assignments_mut(&mut self) -> &mut Vec<super::VersionAssignment> {
1084 &mut self.version_assignments
1085 }
1086 pub fn set_version_assignments(&mut self, field: Vec<super::VersionAssignment>) {
1088 self.version_assignments = field;
1089 }
1090 pub fn with_version_assignments(
1092 mut self,
1093 field: Vec<super::VersionAssignment>,
1094 ) -> Self {
1095 self.set_version_assignments(field);
1096 self
1097 }
1098 }
1099 impl super::ChangeEpoch {
1100 pub const fn const_default() -> Self {
1101 Self {
1102 epoch: None,
1103 protocol_version: None,
1104 storage_charge: None,
1105 computation_charge: None,
1106 storage_rebate: None,
1107 non_refundable_storage_fee: None,
1108 epoch_start_timestamp: None,
1109 system_packages: Vec::new(),
1110 }
1111 }
1112 #[doc(hidden)]
1113 pub fn default_instance() -> &'static Self {
1114 static DEFAULT: super::ChangeEpoch = super::ChangeEpoch::const_default();
1115 &DEFAULT
1116 }
1117 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
1119 self.epoch.as_mut().map(|field| field as _)
1120 }
1121 pub fn epoch_mut(&mut self) -> &mut u64 {
1124 self.epoch.get_or_insert_default()
1125 }
1126 pub fn epoch_opt(&self) -> Option<u64> {
1128 self.epoch.as_ref().map(|field| *field)
1129 }
1130 pub fn set_epoch(&mut self, field: u64) {
1132 self.epoch = Some(field);
1133 }
1134 pub fn with_epoch(mut self, field: u64) -> Self {
1136 self.set_epoch(field);
1137 self
1138 }
1139 pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
1141 self.protocol_version.as_mut().map(|field| field as _)
1142 }
1143 pub fn protocol_version_mut(&mut self) -> &mut u64 {
1146 self.protocol_version.get_or_insert_default()
1147 }
1148 pub fn protocol_version_opt(&self) -> Option<u64> {
1150 self.protocol_version.as_ref().map(|field| *field)
1151 }
1152 pub fn set_protocol_version(&mut self, field: u64) {
1154 self.protocol_version = Some(field);
1155 }
1156 pub fn with_protocol_version(mut self, field: u64) -> Self {
1158 self.set_protocol_version(field);
1159 self
1160 }
1161 pub fn storage_charge_opt_mut(&mut self) -> Option<&mut u64> {
1163 self.storage_charge.as_mut().map(|field| field as _)
1164 }
1165 pub fn storage_charge_mut(&mut self) -> &mut u64 {
1168 self.storage_charge.get_or_insert_default()
1169 }
1170 pub fn storage_charge_opt(&self) -> Option<u64> {
1172 self.storage_charge.as_ref().map(|field| *field)
1173 }
1174 pub fn set_storage_charge(&mut self, field: u64) {
1176 self.storage_charge = Some(field);
1177 }
1178 pub fn with_storage_charge(mut self, field: u64) -> Self {
1180 self.set_storage_charge(field);
1181 self
1182 }
1183 pub fn computation_charge_opt_mut(&mut self) -> Option<&mut u64> {
1185 self.computation_charge.as_mut().map(|field| field as _)
1186 }
1187 pub fn computation_charge_mut(&mut self) -> &mut u64 {
1190 self.computation_charge.get_or_insert_default()
1191 }
1192 pub fn computation_charge_opt(&self) -> Option<u64> {
1194 self.computation_charge.as_ref().map(|field| *field)
1195 }
1196 pub fn set_computation_charge(&mut self, field: u64) {
1198 self.computation_charge = Some(field);
1199 }
1200 pub fn with_computation_charge(mut self, field: u64) -> Self {
1202 self.set_computation_charge(field);
1203 self
1204 }
1205 pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
1207 self.storage_rebate.as_mut().map(|field| field as _)
1208 }
1209 pub fn storage_rebate_mut(&mut self) -> &mut u64 {
1212 self.storage_rebate.get_or_insert_default()
1213 }
1214 pub fn storage_rebate_opt(&self) -> Option<u64> {
1216 self.storage_rebate.as_ref().map(|field| *field)
1217 }
1218 pub fn set_storage_rebate(&mut self, field: u64) {
1220 self.storage_rebate = Some(field);
1221 }
1222 pub fn with_storage_rebate(mut self, field: u64) -> Self {
1224 self.set_storage_rebate(field);
1225 self
1226 }
1227 pub fn non_refundable_storage_fee_opt_mut(&mut self) -> Option<&mut u64> {
1229 self.non_refundable_storage_fee.as_mut().map(|field| field as _)
1230 }
1231 pub fn non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
1234 self.non_refundable_storage_fee.get_or_insert_default()
1235 }
1236 pub fn non_refundable_storage_fee_opt(&self) -> Option<u64> {
1238 self.non_refundable_storage_fee.as_ref().map(|field| *field)
1239 }
1240 pub fn set_non_refundable_storage_fee(&mut self, field: u64) {
1242 self.non_refundable_storage_fee = Some(field);
1243 }
1244 pub fn with_non_refundable_storage_fee(mut self, field: u64) -> Self {
1246 self.set_non_refundable_storage_fee(field);
1247 self
1248 }
1249 pub fn epoch_start_timestamp_opt_mut(
1251 &mut self,
1252 ) -> Option<&mut ::prost_types::Timestamp> {
1253 self.epoch_start_timestamp.as_mut().map(|field| field as _)
1254 }
1255 pub fn epoch_start_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
1258 self.epoch_start_timestamp.get_or_insert_default()
1259 }
1260 pub fn epoch_start_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
1262 self.epoch_start_timestamp.as_ref().map(|field| field as _)
1263 }
1264 pub fn set_epoch_start_timestamp<T: Into<::prost_types::Timestamp>>(
1266 &mut self,
1267 field: T,
1268 ) {
1269 self.epoch_start_timestamp = Some(field.into().into());
1270 }
1271 pub fn with_epoch_start_timestamp<T: Into<::prost_types::Timestamp>>(
1273 mut self,
1274 field: T,
1275 ) -> Self {
1276 self.set_epoch_start_timestamp(field.into());
1277 self
1278 }
1279 pub fn system_packages(&self) -> &[super::SystemPackage] {
1281 &self.system_packages
1282 }
1283 pub fn system_packages_mut(&mut self) -> &mut Vec<super::SystemPackage> {
1286 &mut self.system_packages
1287 }
1288 pub fn set_system_packages(&mut self, field: Vec<super::SystemPackage>) {
1290 self.system_packages = field;
1291 }
1292 pub fn with_system_packages(mut self, field: Vec<super::SystemPackage>) -> Self {
1294 self.set_system_packages(field);
1295 self
1296 }
1297 }
1298 impl super::ChangedObject {
1299 pub const fn const_default() -> Self {
1300 Self {
1301 object_id: None,
1302 input_state: None,
1303 input_version: None,
1304 input_digest: None,
1305 input_owner: None,
1306 output_state: None,
1307 output_version: None,
1308 output_digest: None,
1309 output_owner: None,
1310 accumulator_write: None,
1311 id_operation: None,
1312 object_type: None,
1313 }
1314 }
1315 #[doc(hidden)]
1316 pub fn default_instance() -> &'static Self {
1317 static DEFAULT: super::ChangedObject = super::ChangedObject::const_default();
1318 &DEFAULT
1319 }
1320 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
1322 self.object_id.as_mut().map(|field| field as _)
1323 }
1324 pub fn object_id_mut(&mut self) -> &mut String {
1327 self.object_id.get_or_insert_default()
1328 }
1329 pub fn object_id_opt(&self) -> Option<&str> {
1331 self.object_id.as_ref().map(|field| field as _)
1332 }
1333 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
1335 self.object_id = Some(field.into().into());
1336 }
1337 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
1339 self.set_object_id(field.into());
1340 self
1341 }
1342 pub fn with_input_state<T: Into<super::changed_object::InputObjectState>>(
1344 mut self,
1345 field: T,
1346 ) -> Self {
1347 self.set_input_state(field.into());
1348 self
1349 }
1350 pub fn input_version_opt_mut(&mut self) -> Option<&mut u64> {
1352 self.input_version.as_mut().map(|field| field as _)
1353 }
1354 pub fn input_version_mut(&mut self) -> &mut u64 {
1357 self.input_version.get_or_insert_default()
1358 }
1359 pub fn input_version_opt(&self) -> Option<u64> {
1361 self.input_version.as_ref().map(|field| *field)
1362 }
1363 pub fn set_input_version(&mut self, field: u64) {
1365 self.input_version = Some(field);
1366 }
1367 pub fn with_input_version(mut self, field: u64) -> Self {
1369 self.set_input_version(field);
1370 self
1371 }
1372 pub fn input_digest_opt_mut(&mut self) -> Option<&mut String> {
1374 self.input_digest.as_mut().map(|field| field as _)
1375 }
1376 pub fn input_digest_mut(&mut self) -> &mut String {
1379 self.input_digest.get_or_insert_default()
1380 }
1381 pub fn input_digest_opt(&self) -> Option<&str> {
1383 self.input_digest.as_ref().map(|field| field as _)
1384 }
1385 pub fn set_input_digest<T: Into<String>>(&mut self, field: T) {
1387 self.input_digest = Some(field.into().into());
1388 }
1389 pub fn with_input_digest<T: Into<String>>(mut self, field: T) -> Self {
1391 self.set_input_digest(field.into());
1392 self
1393 }
1394 pub fn input_owner(&self) -> &super::Owner {
1396 self.input_owner
1397 .as_ref()
1398 .map(|field| field as _)
1399 .unwrap_or_else(|| super::Owner::default_instance() as _)
1400 }
1401 pub fn input_owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
1403 self.input_owner.as_mut().map(|field| field as _)
1404 }
1405 pub fn input_owner_mut(&mut self) -> &mut super::Owner {
1408 self.input_owner.get_or_insert_default()
1409 }
1410 pub fn input_owner_opt(&self) -> Option<&super::Owner> {
1412 self.input_owner.as_ref().map(|field| field as _)
1413 }
1414 pub fn set_input_owner<T: Into<super::Owner>>(&mut self, field: T) {
1416 self.input_owner = Some(field.into().into());
1417 }
1418 pub fn with_input_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
1420 self.set_input_owner(field.into());
1421 self
1422 }
1423 pub fn with_output_state<T: Into<super::changed_object::OutputObjectState>>(
1425 mut self,
1426 field: T,
1427 ) -> Self {
1428 self.set_output_state(field.into());
1429 self
1430 }
1431 pub fn output_version_opt_mut(&mut self) -> Option<&mut u64> {
1433 self.output_version.as_mut().map(|field| field as _)
1434 }
1435 pub fn output_version_mut(&mut self) -> &mut u64 {
1438 self.output_version.get_or_insert_default()
1439 }
1440 pub fn output_version_opt(&self) -> Option<u64> {
1442 self.output_version.as_ref().map(|field| *field)
1443 }
1444 pub fn set_output_version(&mut self, field: u64) {
1446 self.output_version = Some(field);
1447 }
1448 pub fn with_output_version(mut self, field: u64) -> Self {
1450 self.set_output_version(field);
1451 self
1452 }
1453 pub fn output_digest_opt_mut(&mut self) -> Option<&mut String> {
1455 self.output_digest.as_mut().map(|field| field as _)
1456 }
1457 pub fn output_digest_mut(&mut self) -> &mut String {
1460 self.output_digest.get_or_insert_default()
1461 }
1462 pub fn output_digest_opt(&self) -> Option<&str> {
1464 self.output_digest.as_ref().map(|field| field as _)
1465 }
1466 pub fn set_output_digest<T: Into<String>>(&mut self, field: T) {
1468 self.output_digest = Some(field.into().into());
1469 }
1470 pub fn with_output_digest<T: Into<String>>(mut self, field: T) -> Self {
1472 self.set_output_digest(field.into());
1473 self
1474 }
1475 pub fn output_owner(&self) -> &super::Owner {
1477 self.output_owner
1478 .as_ref()
1479 .map(|field| field as _)
1480 .unwrap_or_else(|| super::Owner::default_instance() as _)
1481 }
1482 pub fn output_owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
1484 self.output_owner.as_mut().map(|field| field as _)
1485 }
1486 pub fn output_owner_mut(&mut self) -> &mut super::Owner {
1489 self.output_owner.get_or_insert_default()
1490 }
1491 pub fn output_owner_opt(&self) -> Option<&super::Owner> {
1493 self.output_owner.as_ref().map(|field| field as _)
1494 }
1495 pub fn set_output_owner<T: Into<super::Owner>>(&mut self, field: T) {
1497 self.output_owner = Some(field.into().into());
1498 }
1499 pub fn with_output_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
1501 self.set_output_owner(field.into());
1502 self
1503 }
1504 pub fn accumulator_write(&self) -> &super::AccumulatorWrite {
1506 self.accumulator_write
1507 .as_ref()
1508 .map(|field| field as _)
1509 .unwrap_or_else(|| super::AccumulatorWrite::default_instance() as _)
1510 }
1511 pub fn accumulator_write_opt_mut(
1513 &mut self,
1514 ) -> Option<&mut super::AccumulatorWrite> {
1515 self.accumulator_write.as_mut().map(|field| field as _)
1516 }
1517 pub fn accumulator_write_mut(&mut self) -> &mut super::AccumulatorWrite {
1520 self.accumulator_write.get_or_insert_default()
1521 }
1522 pub fn accumulator_write_opt(&self) -> Option<&super::AccumulatorWrite> {
1524 self.accumulator_write.as_ref().map(|field| field as _)
1525 }
1526 pub fn set_accumulator_write<T: Into<super::AccumulatorWrite>>(
1528 &mut self,
1529 field: T,
1530 ) {
1531 self.accumulator_write = Some(field.into().into());
1532 }
1533 pub fn with_accumulator_write<T: Into<super::AccumulatorWrite>>(
1535 mut self,
1536 field: T,
1537 ) -> Self {
1538 self.set_accumulator_write(field.into());
1539 self
1540 }
1541 pub fn with_id_operation<T: Into<super::changed_object::IdOperation>>(
1543 mut self,
1544 field: T,
1545 ) -> Self {
1546 self.set_id_operation(field.into());
1547 self
1548 }
1549 pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
1551 self.object_type.as_mut().map(|field| field as _)
1552 }
1553 pub fn object_type_mut(&mut self) -> &mut String {
1556 self.object_type.get_or_insert_default()
1557 }
1558 pub fn object_type_opt(&self) -> Option<&str> {
1560 self.object_type.as_ref().map(|field| field as _)
1561 }
1562 pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
1564 self.object_type = Some(field.into().into());
1565 }
1566 pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
1568 self.set_object_type(field.into());
1569 self
1570 }
1571 }
1572 impl super::Checkpoint {
1573 pub const fn const_default() -> Self {
1574 Self {
1575 sequence_number: None,
1576 digest: None,
1577 summary: None,
1578 signature: None,
1579 contents: None,
1580 transactions: Vec::new(),
1581 objects: None,
1582 }
1583 }
1584 #[doc(hidden)]
1585 pub fn default_instance() -> &'static Self {
1586 static DEFAULT: super::Checkpoint = super::Checkpoint::const_default();
1587 &DEFAULT
1588 }
1589 pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
1591 self.sequence_number.as_mut().map(|field| field as _)
1592 }
1593 pub fn sequence_number_mut(&mut self) -> &mut u64 {
1596 self.sequence_number.get_or_insert_default()
1597 }
1598 pub fn sequence_number_opt(&self) -> Option<u64> {
1600 self.sequence_number.as_ref().map(|field| *field)
1601 }
1602 pub fn set_sequence_number(&mut self, field: u64) {
1604 self.sequence_number = Some(field);
1605 }
1606 pub fn with_sequence_number(mut self, field: u64) -> Self {
1608 self.set_sequence_number(field);
1609 self
1610 }
1611 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1613 self.digest.as_mut().map(|field| field as _)
1614 }
1615 pub fn digest_mut(&mut self) -> &mut String {
1618 self.digest.get_or_insert_default()
1619 }
1620 pub fn digest_opt(&self) -> Option<&str> {
1622 self.digest.as_ref().map(|field| field as _)
1623 }
1624 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1626 self.digest = Some(field.into().into());
1627 }
1628 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1630 self.set_digest(field.into());
1631 self
1632 }
1633 pub fn summary(&self) -> &super::CheckpointSummary {
1635 self.summary
1636 .as_ref()
1637 .map(|field| field as _)
1638 .unwrap_or_else(|| super::CheckpointSummary::default_instance() as _)
1639 }
1640 pub fn summary_opt_mut(&mut self) -> Option<&mut super::CheckpointSummary> {
1642 self.summary.as_mut().map(|field| field as _)
1643 }
1644 pub fn summary_mut(&mut self) -> &mut super::CheckpointSummary {
1647 self.summary.get_or_insert_default()
1648 }
1649 pub fn summary_opt(&self) -> Option<&super::CheckpointSummary> {
1651 self.summary.as_ref().map(|field| field as _)
1652 }
1653 pub fn set_summary<T: Into<super::CheckpointSummary>>(&mut self, field: T) {
1655 self.summary = Some(field.into().into());
1656 }
1657 pub fn with_summary<T: Into<super::CheckpointSummary>>(
1659 mut self,
1660 field: T,
1661 ) -> Self {
1662 self.set_summary(field.into());
1663 self
1664 }
1665 pub fn signature(&self) -> &super::ValidatorAggregatedSignature {
1667 self.signature
1668 .as_ref()
1669 .map(|field| field as _)
1670 .unwrap_or_else(|| {
1671 super::ValidatorAggregatedSignature::default_instance() as _
1672 })
1673 }
1674 pub fn signature_opt_mut(
1676 &mut self,
1677 ) -> Option<&mut super::ValidatorAggregatedSignature> {
1678 self.signature.as_mut().map(|field| field as _)
1679 }
1680 pub fn signature_mut(&mut self) -> &mut super::ValidatorAggregatedSignature {
1683 self.signature.get_or_insert_default()
1684 }
1685 pub fn signature_opt(&self) -> Option<&super::ValidatorAggregatedSignature> {
1687 self.signature.as_ref().map(|field| field as _)
1688 }
1689 pub fn set_signature<T: Into<super::ValidatorAggregatedSignature>>(
1691 &mut self,
1692 field: T,
1693 ) {
1694 self.signature = Some(field.into().into());
1695 }
1696 pub fn with_signature<T: Into<super::ValidatorAggregatedSignature>>(
1698 mut self,
1699 field: T,
1700 ) -> Self {
1701 self.set_signature(field.into());
1702 self
1703 }
1704 pub fn contents(&self) -> &super::CheckpointContents {
1706 self.contents
1707 .as_ref()
1708 .map(|field| field as _)
1709 .unwrap_or_else(|| super::CheckpointContents::default_instance() as _)
1710 }
1711 pub fn contents_opt_mut(&mut self) -> Option<&mut super::CheckpointContents> {
1713 self.contents.as_mut().map(|field| field as _)
1714 }
1715 pub fn contents_mut(&mut self) -> &mut super::CheckpointContents {
1718 self.contents.get_or_insert_default()
1719 }
1720 pub fn contents_opt(&self) -> Option<&super::CheckpointContents> {
1722 self.contents.as_ref().map(|field| field as _)
1723 }
1724 pub fn set_contents<T: Into<super::CheckpointContents>>(&mut self, field: T) {
1726 self.contents = Some(field.into().into());
1727 }
1728 pub fn with_contents<T: Into<super::CheckpointContents>>(
1730 mut self,
1731 field: T,
1732 ) -> Self {
1733 self.set_contents(field.into());
1734 self
1735 }
1736 pub fn transactions(&self) -> &[super::ExecutedTransaction] {
1738 &self.transactions
1739 }
1740 pub fn transactions_mut(&mut self) -> &mut Vec<super::ExecutedTransaction> {
1743 &mut self.transactions
1744 }
1745 pub fn set_transactions(&mut self, field: Vec<super::ExecutedTransaction>) {
1747 self.transactions = field;
1748 }
1749 pub fn with_transactions(
1751 mut self,
1752 field: Vec<super::ExecutedTransaction>,
1753 ) -> Self {
1754 self.set_transactions(field);
1755 self
1756 }
1757 pub fn objects(&self) -> &super::ObjectSet {
1759 self.objects
1760 .as_ref()
1761 .map(|field| field as _)
1762 .unwrap_or_else(|| super::ObjectSet::default_instance() as _)
1763 }
1764 pub fn objects_opt_mut(&mut self) -> Option<&mut super::ObjectSet> {
1766 self.objects.as_mut().map(|field| field as _)
1767 }
1768 pub fn objects_mut(&mut self) -> &mut super::ObjectSet {
1771 self.objects.get_or_insert_default()
1772 }
1773 pub fn objects_opt(&self) -> Option<&super::ObjectSet> {
1775 self.objects.as_ref().map(|field| field as _)
1776 }
1777 pub fn set_objects<T: Into<super::ObjectSet>>(&mut self, field: T) {
1779 self.objects = Some(field.into().into());
1780 }
1781 pub fn with_objects<T: Into<super::ObjectSet>>(mut self, field: T) -> Self {
1783 self.set_objects(field.into());
1784 self
1785 }
1786 }
1787 impl super::CheckpointCommitment {
1788 pub const fn const_default() -> Self {
1789 Self { kind: None, digest: None }
1790 }
1791 #[doc(hidden)]
1792 pub fn default_instance() -> &'static Self {
1793 static DEFAULT: super::CheckpointCommitment = super::CheckpointCommitment::const_default();
1794 &DEFAULT
1795 }
1796 pub fn with_kind<
1798 T: Into<super::checkpoint_commitment::CheckpointCommitmentKind>,
1799 >(mut self, field: T) -> Self {
1800 self.set_kind(field.into());
1801 self
1802 }
1803 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1805 self.digest.as_mut().map(|field| field as _)
1806 }
1807 pub fn digest_mut(&mut self) -> &mut String {
1810 self.digest.get_or_insert_default()
1811 }
1812 pub fn digest_opt(&self) -> Option<&str> {
1814 self.digest.as_ref().map(|field| field as _)
1815 }
1816 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1818 self.digest = Some(field.into().into());
1819 }
1820 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1822 self.set_digest(field.into());
1823 self
1824 }
1825 }
1826 impl super::CheckpointContents {
1827 pub const fn const_default() -> Self {
1828 Self {
1829 bcs: None,
1830 digest: None,
1831 version: None,
1832 transactions: Vec::new(),
1833 }
1834 }
1835 #[doc(hidden)]
1836 pub fn default_instance() -> &'static Self {
1837 static DEFAULT: super::CheckpointContents = super::CheckpointContents::const_default();
1838 &DEFAULT
1839 }
1840 pub fn bcs(&self) -> &super::Bcs {
1842 self.bcs
1843 .as_ref()
1844 .map(|field| field as _)
1845 .unwrap_or_else(|| super::Bcs::default_instance() as _)
1846 }
1847 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
1849 self.bcs.as_mut().map(|field| field as _)
1850 }
1851 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
1854 self.bcs.get_or_insert_default()
1855 }
1856 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
1858 self.bcs.as_ref().map(|field| field as _)
1859 }
1860 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
1862 self.bcs = Some(field.into().into());
1863 }
1864 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
1866 self.set_bcs(field.into());
1867 self
1868 }
1869 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1871 self.digest.as_mut().map(|field| field as _)
1872 }
1873 pub fn digest_mut(&mut self) -> &mut String {
1876 self.digest.get_or_insert_default()
1877 }
1878 pub fn digest_opt(&self) -> Option<&str> {
1880 self.digest.as_ref().map(|field| field as _)
1881 }
1882 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1884 self.digest = Some(field.into().into());
1885 }
1886 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1888 self.set_digest(field.into());
1889 self
1890 }
1891 pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
1893 self.version.as_mut().map(|field| field as _)
1894 }
1895 pub fn version_mut(&mut self) -> &mut i32 {
1898 self.version.get_or_insert_default()
1899 }
1900 pub fn version_opt(&self) -> Option<i32> {
1902 self.version.as_ref().map(|field| *field)
1903 }
1904 pub fn set_version(&mut self, field: i32) {
1906 self.version = Some(field);
1907 }
1908 pub fn with_version(mut self, field: i32) -> Self {
1910 self.set_version(field);
1911 self
1912 }
1913 pub fn transactions(&self) -> &[super::CheckpointedTransactionInfo] {
1915 &self.transactions
1916 }
1917 pub fn transactions_mut(
1920 &mut self,
1921 ) -> &mut Vec<super::CheckpointedTransactionInfo> {
1922 &mut self.transactions
1923 }
1924 pub fn set_transactions(
1926 &mut self,
1927 field: Vec<super::CheckpointedTransactionInfo>,
1928 ) {
1929 self.transactions = field;
1930 }
1931 pub fn with_transactions(
1933 mut self,
1934 field: Vec<super::CheckpointedTransactionInfo>,
1935 ) -> Self {
1936 self.set_transactions(field);
1937 self
1938 }
1939 }
1940 impl super::CheckpointSummary {
1941 pub const fn const_default() -> Self {
1942 Self {
1943 bcs: None,
1944 digest: None,
1945 epoch: None,
1946 sequence_number: None,
1947 total_network_transactions: None,
1948 content_digest: None,
1949 previous_digest: None,
1950 epoch_rolling_gas_cost_summary: None,
1951 timestamp: None,
1952 commitments: Vec::new(),
1953 end_of_epoch_data: None,
1954 version_specific_data: None,
1955 }
1956 }
1957 #[doc(hidden)]
1958 pub fn default_instance() -> &'static Self {
1959 static DEFAULT: super::CheckpointSummary = super::CheckpointSummary::const_default();
1960 &DEFAULT
1961 }
1962 pub fn bcs(&self) -> &super::Bcs {
1964 self.bcs
1965 .as_ref()
1966 .map(|field| field as _)
1967 .unwrap_or_else(|| super::Bcs::default_instance() as _)
1968 }
1969 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
1971 self.bcs.as_mut().map(|field| field as _)
1972 }
1973 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
1976 self.bcs.get_or_insert_default()
1977 }
1978 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
1980 self.bcs.as_ref().map(|field| field as _)
1981 }
1982 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
1984 self.bcs = Some(field.into().into());
1985 }
1986 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
1988 self.set_bcs(field.into());
1989 self
1990 }
1991 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1993 self.digest.as_mut().map(|field| field as _)
1994 }
1995 pub fn digest_mut(&mut self) -> &mut String {
1998 self.digest.get_or_insert_default()
1999 }
2000 pub fn digest_opt(&self) -> Option<&str> {
2002 self.digest.as_ref().map(|field| field as _)
2003 }
2004 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
2006 self.digest = Some(field.into().into());
2007 }
2008 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
2010 self.set_digest(field.into());
2011 self
2012 }
2013 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
2015 self.epoch.as_mut().map(|field| field as _)
2016 }
2017 pub fn epoch_mut(&mut self) -> &mut u64 {
2020 self.epoch.get_or_insert_default()
2021 }
2022 pub fn epoch_opt(&self) -> Option<u64> {
2024 self.epoch.as_ref().map(|field| *field)
2025 }
2026 pub fn set_epoch(&mut self, field: u64) {
2028 self.epoch = Some(field);
2029 }
2030 pub fn with_epoch(mut self, field: u64) -> Self {
2032 self.set_epoch(field);
2033 self
2034 }
2035 pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
2037 self.sequence_number.as_mut().map(|field| field as _)
2038 }
2039 pub fn sequence_number_mut(&mut self) -> &mut u64 {
2042 self.sequence_number.get_or_insert_default()
2043 }
2044 pub fn sequence_number_opt(&self) -> Option<u64> {
2046 self.sequence_number.as_ref().map(|field| *field)
2047 }
2048 pub fn set_sequence_number(&mut self, field: u64) {
2050 self.sequence_number = Some(field);
2051 }
2052 pub fn with_sequence_number(mut self, field: u64) -> Self {
2054 self.set_sequence_number(field);
2055 self
2056 }
2057 pub fn total_network_transactions_opt_mut(&mut self) -> Option<&mut u64> {
2059 self.total_network_transactions.as_mut().map(|field| field as _)
2060 }
2061 pub fn total_network_transactions_mut(&mut self) -> &mut u64 {
2064 self.total_network_transactions.get_or_insert_default()
2065 }
2066 pub fn total_network_transactions_opt(&self) -> Option<u64> {
2068 self.total_network_transactions.as_ref().map(|field| *field)
2069 }
2070 pub fn set_total_network_transactions(&mut self, field: u64) {
2072 self.total_network_transactions = Some(field);
2073 }
2074 pub fn with_total_network_transactions(mut self, field: u64) -> Self {
2076 self.set_total_network_transactions(field);
2077 self
2078 }
2079 pub fn content_digest_opt_mut(&mut self) -> Option<&mut String> {
2081 self.content_digest.as_mut().map(|field| field as _)
2082 }
2083 pub fn content_digest_mut(&mut self) -> &mut String {
2086 self.content_digest.get_or_insert_default()
2087 }
2088 pub fn content_digest_opt(&self) -> Option<&str> {
2090 self.content_digest.as_ref().map(|field| field as _)
2091 }
2092 pub fn set_content_digest<T: Into<String>>(&mut self, field: T) {
2094 self.content_digest = Some(field.into().into());
2095 }
2096 pub fn with_content_digest<T: Into<String>>(mut self, field: T) -> Self {
2098 self.set_content_digest(field.into());
2099 self
2100 }
2101 pub fn previous_digest_opt_mut(&mut self) -> Option<&mut String> {
2103 self.previous_digest.as_mut().map(|field| field as _)
2104 }
2105 pub fn previous_digest_mut(&mut self) -> &mut String {
2108 self.previous_digest.get_or_insert_default()
2109 }
2110 pub fn previous_digest_opt(&self) -> Option<&str> {
2112 self.previous_digest.as_ref().map(|field| field as _)
2113 }
2114 pub fn set_previous_digest<T: Into<String>>(&mut self, field: T) {
2116 self.previous_digest = Some(field.into().into());
2117 }
2118 pub fn with_previous_digest<T: Into<String>>(mut self, field: T) -> Self {
2120 self.set_previous_digest(field.into());
2121 self
2122 }
2123 pub fn epoch_rolling_gas_cost_summary(&self) -> &super::GasCostSummary {
2125 self.epoch_rolling_gas_cost_summary
2126 .as_ref()
2127 .map(|field| field as _)
2128 .unwrap_or_else(|| super::GasCostSummary::default_instance() as _)
2129 }
2130 pub fn epoch_rolling_gas_cost_summary_opt_mut(
2132 &mut self,
2133 ) -> Option<&mut super::GasCostSummary> {
2134 self.epoch_rolling_gas_cost_summary.as_mut().map(|field| field as _)
2135 }
2136 pub fn epoch_rolling_gas_cost_summary_mut(
2139 &mut self,
2140 ) -> &mut super::GasCostSummary {
2141 self.epoch_rolling_gas_cost_summary.get_or_insert_default()
2142 }
2143 pub fn epoch_rolling_gas_cost_summary_opt(
2145 &self,
2146 ) -> Option<&super::GasCostSummary> {
2147 self.epoch_rolling_gas_cost_summary.as_ref().map(|field| field as _)
2148 }
2149 pub fn set_epoch_rolling_gas_cost_summary<T: Into<super::GasCostSummary>>(
2151 &mut self,
2152 field: T,
2153 ) {
2154 self.epoch_rolling_gas_cost_summary = Some(field.into().into());
2155 }
2156 pub fn with_epoch_rolling_gas_cost_summary<T: Into<super::GasCostSummary>>(
2158 mut self,
2159 field: T,
2160 ) -> Self {
2161 self.set_epoch_rolling_gas_cost_summary(field.into());
2162 self
2163 }
2164 pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
2166 self.timestamp.as_mut().map(|field| field as _)
2167 }
2168 pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
2171 self.timestamp.get_or_insert_default()
2172 }
2173 pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
2175 self.timestamp.as_ref().map(|field| field as _)
2176 }
2177 pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
2179 self.timestamp = Some(field.into().into());
2180 }
2181 pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
2183 mut self,
2184 field: T,
2185 ) -> Self {
2186 self.set_timestamp(field.into());
2187 self
2188 }
2189 pub fn commitments(&self) -> &[super::CheckpointCommitment] {
2191 &self.commitments
2192 }
2193 pub fn commitments_mut(&mut self) -> &mut Vec<super::CheckpointCommitment> {
2196 &mut self.commitments
2197 }
2198 pub fn set_commitments(&mut self, field: Vec<super::CheckpointCommitment>) {
2200 self.commitments = field;
2201 }
2202 pub fn with_commitments(
2204 mut self,
2205 field: Vec<super::CheckpointCommitment>,
2206 ) -> Self {
2207 self.set_commitments(field);
2208 self
2209 }
2210 pub fn end_of_epoch_data(&self) -> &super::EndOfEpochData {
2212 self.end_of_epoch_data
2213 .as_ref()
2214 .map(|field| field as _)
2215 .unwrap_or_else(|| super::EndOfEpochData::default_instance() as _)
2216 }
2217 pub fn end_of_epoch_data_opt_mut(
2219 &mut self,
2220 ) -> Option<&mut super::EndOfEpochData> {
2221 self.end_of_epoch_data.as_mut().map(|field| field as _)
2222 }
2223 pub fn end_of_epoch_data_mut(&mut self) -> &mut super::EndOfEpochData {
2226 self.end_of_epoch_data.get_or_insert_default()
2227 }
2228 pub fn end_of_epoch_data_opt(&self) -> Option<&super::EndOfEpochData> {
2230 self.end_of_epoch_data.as_ref().map(|field| field as _)
2231 }
2232 pub fn set_end_of_epoch_data<T: Into<super::EndOfEpochData>>(
2234 &mut self,
2235 field: T,
2236 ) {
2237 self.end_of_epoch_data = Some(field.into().into());
2238 }
2239 pub fn with_end_of_epoch_data<T: Into<super::EndOfEpochData>>(
2241 mut self,
2242 field: T,
2243 ) -> Self {
2244 self.set_end_of_epoch_data(field.into());
2245 self
2246 }
2247 pub fn version_specific_data_opt(&self) -> Option<&[u8]> {
2249 self.version_specific_data.as_ref().map(|field| field as _)
2250 }
2251 pub fn set_version_specific_data<T: Into<::prost::bytes::Bytes>>(
2253 &mut self,
2254 field: T,
2255 ) {
2256 self.version_specific_data = Some(field.into().into());
2257 }
2258 pub fn with_version_specific_data<T: Into<::prost::bytes::Bytes>>(
2260 mut self,
2261 field: T,
2262 ) -> Self {
2263 self.set_version_specific_data(field.into());
2264 self
2265 }
2266 }
2267 impl super::CheckpointedTransactionInfo {
2268 pub const fn const_default() -> Self {
2269 Self {
2270 transaction: None,
2271 effects: None,
2272 signatures: Vec::new(),
2273 address_aliases_versions: Vec::new(),
2274 }
2275 }
2276 #[doc(hidden)]
2277 pub fn default_instance() -> &'static Self {
2278 static DEFAULT: super::CheckpointedTransactionInfo = super::CheckpointedTransactionInfo::const_default();
2279 &DEFAULT
2280 }
2281 pub fn transaction_opt_mut(&mut self) -> Option<&mut String> {
2283 self.transaction.as_mut().map(|field| field as _)
2284 }
2285 pub fn transaction_mut(&mut self) -> &mut String {
2288 self.transaction.get_or_insert_default()
2289 }
2290 pub fn transaction_opt(&self) -> Option<&str> {
2292 self.transaction.as_ref().map(|field| field as _)
2293 }
2294 pub fn set_transaction<T: Into<String>>(&mut self, field: T) {
2296 self.transaction = Some(field.into().into());
2297 }
2298 pub fn with_transaction<T: Into<String>>(mut self, field: T) -> Self {
2300 self.set_transaction(field.into());
2301 self
2302 }
2303 pub fn effects_opt_mut(&mut self) -> Option<&mut String> {
2305 self.effects.as_mut().map(|field| field as _)
2306 }
2307 pub fn effects_mut(&mut self) -> &mut String {
2310 self.effects.get_or_insert_default()
2311 }
2312 pub fn effects_opt(&self) -> Option<&str> {
2314 self.effects.as_ref().map(|field| field as _)
2315 }
2316 pub fn set_effects<T: Into<String>>(&mut self, field: T) {
2318 self.effects = Some(field.into().into());
2319 }
2320 pub fn with_effects<T: Into<String>>(mut self, field: T) -> Self {
2322 self.set_effects(field.into());
2323 self
2324 }
2325 pub fn signatures(&self) -> &[super::UserSignature] {
2327 &self.signatures
2328 }
2329 pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
2332 &mut self.signatures
2333 }
2334 pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
2336 self.signatures = field;
2337 }
2338 pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
2340 self.set_signatures(field);
2341 self
2342 }
2343 pub fn address_aliases_versions(&self) -> &[super::AddressAliasesVersion] {
2345 &self.address_aliases_versions
2346 }
2347 pub fn address_aliases_versions_mut(
2350 &mut self,
2351 ) -> &mut Vec<super::AddressAliasesVersion> {
2352 &mut self.address_aliases_versions
2353 }
2354 pub fn set_address_aliases_versions(
2356 &mut self,
2357 field: Vec<super::AddressAliasesVersion>,
2358 ) {
2359 self.address_aliases_versions = field;
2360 }
2361 pub fn with_address_aliases_versions(
2363 mut self,
2364 field: Vec<super::AddressAliasesVersion>,
2365 ) -> Self {
2366 self.set_address_aliases_versions(field);
2367 self
2368 }
2369 }
2370 impl super::CircomG1 {
2371 pub const fn const_default() -> Self {
2372 Self {
2373 e0: None,
2374 e1: None,
2375 e2: None,
2376 }
2377 }
2378 #[doc(hidden)]
2379 pub fn default_instance() -> &'static Self {
2380 static DEFAULT: super::CircomG1 = super::CircomG1::const_default();
2381 &DEFAULT
2382 }
2383 pub fn e0_opt_mut(&mut self) -> Option<&mut String> {
2385 self.e0.as_mut().map(|field| field as _)
2386 }
2387 pub fn e0_mut(&mut self) -> &mut String {
2390 self.e0.get_or_insert_default()
2391 }
2392 pub fn e0_opt(&self) -> Option<&str> {
2394 self.e0.as_ref().map(|field| field as _)
2395 }
2396 pub fn set_e0<T: Into<String>>(&mut self, field: T) {
2398 self.e0 = Some(field.into().into());
2399 }
2400 pub fn with_e0<T: Into<String>>(mut self, field: T) -> Self {
2402 self.set_e0(field.into());
2403 self
2404 }
2405 pub fn e1_opt_mut(&mut self) -> Option<&mut String> {
2407 self.e1.as_mut().map(|field| field as _)
2408 }
2409 pub fn e1_mut(&mut self) -> &mut String {
2412 self.e1.get_or_insert_default()
2413 }
2414 pub fn e1_opt(&self) -> Option<&str> {
2416 self.e1.as_ref().map(|field| field as _)
2417 }
2418 pub fn set_e1<T: Into<String>>(&mut self, field: T) {
2420 self.e1 = Some(field.into().into());
2421 }
2422 pub fn with_e1<T: Into<String>>(mut self, field: T) -> Self {
2424 self.set_e1(field.into());
2425 self
2426 }
2427 pub fn e2_opt_mut(&mut self) -> Option<&mut String> {
2429 self.e2.as_mut().map(|field| field as _)
2430 }
2431 pub fn e2_mut(&mut self) -> &mut String {
2434 self.e2.get_or_insert_default()
2435 }
2436 pub fn e2_opt(&self) -> Option<&str> {
2438 self.e2.as_ref().map(|field| field as _)
2439 }
2440 pub fn set_e2<T: Into<String>>(&mut self, field: T) {
2442 self.e2 = Some(field.into().into());
2443 }
2444 pub fn with_e2<T: Into<String>>(mut self, field: T) -> Self {
2446 self.set_e2(field.into());
2447 self
2448 }
2449 }
2450 impl super::CircomG2 {
2451 pub const fn const_default() -> Self {
2452 Self {
2453 e00: None,
2454 e01: None,
2455 e10: None,
2456 e11: None,
2457 e20: None,
2458 e21: None,
2459 }
2460 }
2461 #[doc(hidden)]
2462 pub fn default_instance() -> &'static Self {
2463 static DEFAULT: super::CircomG2 = super::CircomG2::const_default();
2464 &DEFAULT
2465 }
2466 pub fn e00_opt_mut(&mut self) -> Option<&mut String> {
2468 self.e00.as_mut().map(|field| field as _)
2469 }
2470 pub fn e00_mut(&mut self) -> &mut String {
2473 self.e00.get_or_insert_default()
2474 }
2475 pub fn e00_opt(&self) -> Option<&str> {
2477 self.e00.as_ref().map(|field| field as _)
2478 }
2479 pub fn set_e00<T: Into<String>>(&mut self, field: T) {
2481 self.e00 = Some(field.into().into());
2482 }
2483 pub fn with_e00<T: Into<String>>(mut self, field: T) -> Self {
2485 self.set_e00(field.into());
2486 self
2487 }
2488 pub fn e01_opt_mut(&mut self) -> Option<&mut String> {
2490 self.e01.as_mut().map(|field| field as _)
2491 }
2492 pub fn e01_mut(&mut self) -> &mut String {
2495 self.e01.get_or_insert_default()
2496 }
2497 pub fn e01_opt(&self) -> Option<&str> {
2499 self.e01.as_ref().map(|field| field as _)
2500 }
2501 pub fn set_e01<T: Into<String>>(&mut self, field: T) {
2503 self.e01 = Some(field.into().into());
2504 }
2505 pub fn with_e01<T: Into<String>>(mut self, field: T) -> Self {
2507 self.set_e01(field.into());
2508 self
2509 }
2510 pub fn e10_opt_mut(&mut self) -> Option<&mut String> {
2512 self.e10.as_mut().map(|field| field as _)
2513 }
2514 pub fn e10_mut(&mut self) -> &mut String {
2517 self.e10.get_or_insert_default()
2518 }
2519 pub fn e10_opt(&self) -> Option<&str> {
2521 self.e10.as_ref().map(|field| field as _)
2522 }
2523 pub fn set_e10<T: Into<String>>(&mut self, field: T) {
2525 self.e10 = Some(field.into().into());
2526 }
2527 pub fn with_e10<T: Into<String>>(mut self, field: T) -> Self {
2529 self.set_e10(field.into());
2530 self
2531 }
2532 pub fn e11_opt_mut(&mut self) -> Option<&mut String> {
2534 self.e11.as_mut().map(|field| field as _)
2535 }
2536 pub fn e11_mut(&mut self) -> &mut String {
2539 self.e11.get_or_insert_default()
2540 }
2541 pub fn e11_opt(&self) -> Option<&str> {
2543 self.e11.as_ref().map(|field| field as _)
2544 }
2545 pub fn set_e11<T: Into<String>>(&mut self, field: T) {
2547 self.e11 = Some(field.into().into());
2548 }
2549 pub fn with_e11<T: Into<String>>(mut self, field: T) -> Self {
2551 self.set_e11(field.into());
2552 self
2553 }
2554 pub fn e20_opt_mut(&mut self) -> Option<&mut String> {
2556 self.e20.as_mut().map(|field| field as _)
2557 }
2558 pub fn e20_mut(&mut self) -> &mut String {
2561 self.e20.get_or_insert_default()
2562 }
2563 pub fn e20_opt(&self) -> Option<&str> {
2565 self.e20.as_ref().map(|field| field as _)
2566 }
2567 pub fn set_e20<T: Into<String>>(&mut self, field: T) {
2569 self.e20 = Some(field.into().into());
2570 }
2571 pub fn with_e20<T: Into<String>>(mut self, field: T) -> Self {
2573 self.set_e20(field.into());
2574 self
2575 }
2576 pub fn e21_opt_mut(&mut self) -> Option<&mut String> {
2578 self.e21.as_mut().map(|field| field as _)
2579 }
2580 pub fn e21_mut(&mut self) -> &mut String {
2583 self.e21.get_or_insert_default()
2584 }
2585 pub fn e21_opt(&self) -> Option<&str> {
2587 self.e21.as_ref().map(|field| field as _)
2588 }
2589 pub fn set_e21<T: Into<String>>(&mut self, field: T) {
2591 self.e21 = Some(field.into().into());
2592 }
2593 pub fn with_e21<T: Into<String>>(mut self, field: T) -> Self {
2595 self.set_e21(field.into());
2596 self
2597 }
2598 }
2599 impl super::CleverError {
2600 pub const fn const_default() -> Self {
2601 Self {
2602 error_code: None,
2603 line_number: None,
2604 constant_name: None,
2605 constant_type: None,
2606 value: None,
2607 }
2608 }
2609 #[doc(hidden)]
2610 pub fn default_instance() -> &'static Self {
2611 static DEFAULT: super::CleverError = super::CleverError::const_default();
2612 &DEFAULT
2613 }
2614 pub fn error_code_opt_mut(&mut self) -> Option<&mut u64> {
2616 self.error_code.as_mut().map(|field| field as _)
2617 }
2618 pub fn error_code_mut(&mut self) -> &mut u64 {
2621 self.error_code.get_or_insert_default()
2622 }
2623 pub fn error_code_opt(&self) -> Option<u64> {
2625 self.error_code.as_ref().map(|field| *field)
2626 }
2627 pub fn set_error_code(&mut self, field: u64) {
2629 self.error_code = Some(field);
2630 }
2631 pub fn with_error_code(mut self, field: u64) -> Self {
2633 self.set_error_code(field);
2634 self
2635 }
2636 pub fn line_number_opt_mut(&mut self) -> Option<&mut u64> {
2638 self.line_number.as_mut().map(|field| field as _)
2639 }
2640 pub fn line_number_mut(&mut self) -> &mut u64 {
2643 self.line_number.get_or_insert_default()
2644 }
2645 pub fn line_number_opt(&self) -> Option<u64> {
2647 self.line_number.as_ref().map(|field| *field)
2648 }
2649 pub fn set_line_number(&mut self, field: u64) {
2651 self.line_number = Some(field);
2652 }
2653 pub fn with_line_number(mut self, field: u64) -> Self {
2655 self.set_line_number(field);
2656 self
2657 }
2658 pub fn constant_name_opt_mut(&mut self) -> Option<&mut String> {
2660 self.constant_name.as_mut().map(|field| field as _)
2661 }
2662 pub fn constant_name_mut(&mut self) -> &mut String {
2665 self.constant_name.get_or_insert_default()
2666 }
2667 pub fn constant_name_opt(&self) -> Option<&str> {
2669 self.constant_name.as_ref().map(|field| field as _)
2670 }
2671 pub fn set_constant_name<T: Into<String>>(&mut self, field: T) {
2673 self.constant_name = Some(field.into().into());
2674 }
2675 pub fn with_constant_name<T: Into<String>>(mut self, field: T) -> Self {
2677 self.set_constant_name(field.into());
2678 self
2679 }
2680 pub fn constant_type_opt_mut(&mut self) -> Option<&mut String> {
2682 self.constant_type.as_mut().map(|field| field as _)
2683 }
2684 pub fn constant_type_mut(&mut self) -> &mut String {
2687 self.constant_type.get_or_insert_default()
2688 }
2689 pub fn constant_type_opt(&self) -> Option<&str> {
2691 self.constant_type.as_ref().map(|field| field as _)
2692 }
2693 pub fn set_constant_type<T: Into<String>>(&mut self, field: T) {
2695 self.constant_type = Some(field.into().into());
2696 }
2697 pub fn with_constant_type<T: Into<String>>(mut self, field: T) -> Self {
2699 self.set_constant_type(field.into());
2700 self
2701 }
2702 pub fn rendered(&self) -> &str {
2704 if let Some(super::clever_error::Value::Rendered(field)) = &self.value {
2705 field as _
2706 } else {
2707 ""
2708 }
2709 }
2710 pub fn rendered_opt(&self) -> Option<&str> {
2712 if let Some(super::clever_error::Value::Rendered(field)) = &self.value {
2713 Some(field as _)
2714 } else {
2715 None
2716 }
2717 }
2718 pub fn rendered_opt_mut(&mut self) -> Option<&mut String> {
2720 if let Some(super::clever_error::Value::Rendered(field)) = &mut self.value {
2721 Some(field as _)
2722 } else {
2723 None
2724 }
2725 }
2726 pub fn rendered_mut(&mut self) -> &mut String {
2730 if self.rendered_opt_mut().is_none() {
2731 self.value = Some(
2732 super::clever_error::Value::Rendered(String::default()),
2733 );
2734 }
2735 self.rendered_opt_mut().unwrap()
2736 }
2737 pub fn set_rendered<T: Into<String>>(&mut self, field: T) {
2740 self.value = Some(super::clever_error::Value::Rendered(field.into().into()));
2741 }
2742 pub fn with_rendered<T: Into<String>>(mut self, field: T) -> Self {
2745 self.set_rendered(field.into());
2746 self
2747 }
2748 pub fn raw(&self) -> &[u8] {
2750 if let Some(super::clever_error::Value::Raw(field)) = &self.value {
2751 field as _
2752 } else {
2753 &[]
2754 }
2755 }
2756 pub fn raw_opt(&self) -> Option<&[u8]> {
2758 if let Some(super::clever_error::Value::Raw(field)) = &self.value {
2759 Some(field as _)
2760 } else {
2761 None
2762 }
2763 }
2764 pub fn raw_opt_mut(&mut self) -> Option<&mut ::prost::bytes::Bytes> {
2766 if let Some(super::clever_error::Value::Raw(field)) = &mut self.value {
2767 Some(field as _)
2768 } else {
2769 None
2770 }
2771 }
2772 pub fn raw_mut(&mut self) -> &mut ::prost::bytes::Bytes {
2776 if self.raw_opt_mut().is_none() {
2777 self.value = Some(
2778 super::clever_error::Value::Raw(::prost::bytes::Bytes::default()),
2779 );
2780 }
2781 self.raw_opt_mut().unwrap()
2782 }
2783 pub fn set_raw<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
2786 self.value = Some(super::clever_error::Value::Raw(field.into().into()));
2787 }
2788 pub fn with_raw<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
2791 self.set_raw(field.into());
2792 self
2793 }
2794 }
2795 impl super::CoinDenyListError {
2796 pub const fn const_default() -> Self {
2797 Self {
2798 address: None,
2799 coin_type: None,
2800 }
2801 }
2802 #[doc(hidden)]
2803 pub fn default_instance() -> &'static Self {
2804 static DEFAULT: super::CoinDenyListError = super::CoinDenyListError::const_default();
2805 &DEFAULT
2806 }
2807 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
2809 self.address.as_mut().map(|field| field as _)
2810 }
2811 pub fn address_mut(&mut self) -> &mut String {
2814 self.address.get_or_insert_default()
2815 }
2816 pub fn address_opt(&self) -> Option<&str> {
2818 self.address.as_ref().map(|field| field as _)
2819 }
2820 pub fn set_address<T: Into<String>>(&mut self, field: T) {
2822 self.address = Some(field.into().into());
2823 }
2824 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
2826 self.set_address(field.into());
2827 self
2828 }
2829 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
2831 self.coin_type.as_mut().map(|field| field as _)
2832 }
2833 pub fn coin_type_mut(&mut self) -> &mut String {
2836 self.coin_type.get_or_insert_default()
2837 }
2838 pub fn coin_type_opt(&self) -> Option<&str> {
2840 self.coin_type.as_ref().map(|field| field as _)
2841 }
2842 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
2844 self.coin_type = Some(field.into().into());
2845 }
2846 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
2848 self.set_coin_type(field.into());
2849 self
2850 }
2851 }
2852 impl super::CoinMetadata {
2853 pub const fn const_default() -> Self {
2854 Self {
2855 id: None,
2856 decimals: None,
2857 name: None,
2858 symbol: None,
2859 description: None,
2860 icon_url: None,
2861 metadata_cap_id: None,
2862 metadata_cap_state: None,
2863 }
2864 }
2865 #[doc(hidden)]
2866 pub fn default_instance() -> &'static Self {
2867 static DEFAULT: super::CoinMetadata = super::CoinMetadata::const_default();
2868 &DEFAULT
2869 }
2870 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
2872 self.id.as_mut().map(|field| field as _)
2873 }
2874 pub fn id_mut(&mut self) -> &mut String {
2877 self.id.get_or_insert_default()
2878 }
2879 pub fn id_opt(&self) -> Option<&str> {
2881 self.id.as_ref().map(|field| field as _)
2882 }
2883 pub fn set_id<T: Into<String>>(&mut self, field: T) {
2885 self.id = Some(field.into().into());
2886 }
2887 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
2889 self.set_id(field.into());
2890 self
2891 }
2892 pub fn decimals_opt_mut(&mut self) -> Option<&mut u32> {
2894 self.decimals.as_mut().map(|field| field as _)
2895 }
2896 pub fn decimals_mut(&mut self) -> &mut u32 {
2899 self.decimals.get_or_insert_default()
2900 }
2901 pub fn decimals_opt(&self) -> Option<u32> {
2903 self.decimals.as_ref().map(|field| *field)
2904 }
2905 pub fn set_decimals(&mut self, field: u32) {
2907 self.decimals = Some(field);
2908 }
2909 pub fn with_decimals(mut self, field: u32) -> Self {
2911 self.set_decimals(field);
2912 self
2913 }
2914 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
2916 self.name.as_mut().map(|field| field as _)
2917 }
2918 pub fn name_mut(&mut self) -> &mut String {
2921 self.name.get_or_insert_default()
2922 }
2923 pub fn name_opt(&self) -> Option<&str> {
2925 self.name.as_ref().map(|field| field as _)
2926 }
2927 pub fn set_name<T: Into<String>>(&mut self, field: T) {
2929 self.name = Some(field.into().into());
2930 }
2931 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
2933 self.set_name(field.into());
2934 self
2935 }
2936 pub fn symbol_opt_mut(&mut self) -> Option<&mut String> {
2938 self.symbol.as_mut().map(|field| field as _)
2939 }
2940 pub fn symbol_mut(&mut self) -> &mut String {
2943 self.symbol.get_or_insert_default()
2944 }
2945 pub fn symbol_opt(&self) -> Option<&str> {
2947 self.symbol.as_ref().map(|field| field as _)
2948 }
2949 pub fn set_symbol<T: Into<String>>(&mut self, field: T) {
2951 self.symbol = Some(field.into().into());
2952 }
2953 pub fn with_symbol<T: Into<String>>(mut self, field: T) -> Self {
2955 self.set_symbol(field.into());
2956 self
2957 }
2958 pub fn description_opt_mut(&mut self) -> Option<&mut String> {
2960 self.description.as_mut().map(|field| field as _)
2961 }
2962 pub fn description_mut(&mut self) -> &mut String {
2965 self.description.get_or_insert_default()
2966 }
2967 pub fn description_opt(&self) -> Option<&str> {
2969 self.description.as_ref().map(|field| field as _)
2970 }
2971 pub fn set_description<T: Into<String>>(&mut self, field: T) {
2973 self.description = Some(field.into().into());
2974 }
2975 pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
2977 self.set_description(field.into());
2978 self
2979 }
2980 pub fn icon_url_opt_mut(&mut self) -> Option<&mut String> {
2982 self.icon_url.as_mut().map(|field| field as _)
2983 }
2984 pub fn icon_url_mut(&mut self) -> &mut String {
2987 self.icon_url.get_or_insert_default()
2988 }
2989 pub fn icon_url_opt(&self) -> Option<&str> {
2991 self.icon_url.as_ref().map(|field| field as _)
2992 }
2993 pub fn set_icon_url<T: Into<String>>(&mut self, field: T) {
2995 self.icon_url = Some(field.into().into());
2996 }
2997 pub fn with_icon_url<T: Into<String>>(mut self, field: T) -> Self {
2999 self.set_icon_url(field.into());
3000 self
3001 }
3002 pub fn metadata_cap_id_opt_mut(&mut self) -> Option<&mut String> {
3004 self.metadata_cap_id.as_mut().map(|field| field as _)
3005 }
3006 pub fn metadata_cap_id_mut(&mut self) -> &mut String {
3009 self.metadata_cap_id.get_or_insert_default()
3010 }
3011 pub fn metadata_cap_id_opt(&self) -> Option<&str> {
3013 self.metadata_cap_id.as_ref().map(|field| field as _)
3014 }
3015 pub fn set_metadata_cap_id<T: Into<String>>(&mut self, field: T) {
3017 self.metadata_cap_id = Some(field.into().into());
3018 }
3019 pub fn with_metadata_cap_id<T: Into<String>>(mut self, field: T) -> Self {
3021 self.set_metadata_cap_id(field.into());
3022 self
3023 }
3024 pub fn with_metadata_cap_state<T: Into<super::coin_metadata::MetadataCapState>>(
3026 mut self,
3027 field: T,
3028 ) -> Self {
3029 self.set_metadata_cap_state(field.into());
3030 self
3031 }
3032 }
3033 impl super::CoinTreasury {
3034 pub const fn const_default() -> Self {
3035 Self {
3036 id: None,
3037 total_supply: None,
3038 supply_state: None,
3039 }
3040 }
3041 #[doc(hidden)]
3042 pub fn default_instance() -> &'static Self {
3043 static DEFAULT: super::CoinTreasury = super::CoinTreasury::const_default();
3044 &DEFAULT
3045 }
3046 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
3048 self.id.as_mut().map(|field| field as _)
3049 }
3050 pub fn id_mut(&mut self) -> &mut String {
3053 self.id.get_or_insert_default()
3054 }
3055 pub fn id_opt(&self) -> Option<&str> {
3057 self.id.as_ref().map(|field| field as _)
3058 }
3059 pub fn set_id<T: Into<String>>(&mut self, field: T) {
3061 self.id = Some(field.into().into());
3062 }
3063 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
3065 self.set_id(field.into());
3066 self
3067 }
3068 pub fn total_supply_opt_mut(&mut self) -> Option<&mut u64> {
3070 self.total_supply.as_mut().map(|field| field as _)
3071 }
3072 pub fn total_supply_mut(&mut self) -> &mut u64 {
3075 self.total_supply.get_or_insert_default()
3076 }
3077 pub fn total_supply_opt(&self) -> Option<u64> {
3079 self.total_supply.as_ref().map(|field| *field)
3080 }
3081 pub fn set_total_supply(&mut self, field: u64) {
3083 self.total_supply = Some(field);
3084 }
3085 pub fn with_total_supply(mut self, field: u64) -> Self {
3087 self.set_total_supply(field);
3088 self
3089 }
3090 pub fn with_supply_state<T: Into<super::coin_treasury::SupplyState>>(
3092 mut self,
3093 field: T,
3094 ) -> Self {
3095 self.set_supply_state(field.into());
3096 self
3097 }
3098 }
3099 impl super::Command {
3100 pub const fn const_default() -> Self {
3101 Self { command: None }
3102 }
3103 #[doc(hidden)]
3104 pub fn default_instance() -> &'static Self {
3105 static DEFAULT: super::Command = super::Command::const_default();
3106 &DEFAULT
3107 }
3108 pub fn move_call(&self) -> &super::MoveCall {
3110 if let Some(super::command::Command::MoveCall(field)) = &self.command {
3111 field as _
3112 } else {
3113 super::MoveCall::default_instance() as _
3114 }
3115 }
3116 pub fn move_call_opt(&self) -> Option<&super::MoveCall> {
3118 if let Some(super::command::Command::MoveCall(field)) = &self.command {
3119 Some(field as _)
3120 } else {
3121 None
3122 }
3123 }
3124 pub fn move_call_opt_mut(&mut self) -> Option<&mut super::MoveCall> {
3126 if let Some(super::command::Command::MoveCall(field)) = &mut self.command {
3127 Some(field as _)
3128 } else {
3129 None
3130 }
3131 }
3132 pub fn move_call_mut(&mut self) -> &mut super::MoveCall {
3136 if self.move_call_opt_mut().is_none() {
3137 self.command = Some(
3138 super::command::Command::MoveCall(super::MoveCall::default()),
3139 );
3140 }
3141 self.move_call_opt_mut().unwrap()
3142 }
3143 pub fn set_move_call<T: Into<super::MoveCall>>(&mut self, field: T) {
3146 self.command = Some(super::command::Command::MoveCall(field.into().into()));
3147 }
3148 pub fn with_move_call<T: Into<super::MoveCall>>(mut self, field: T) -> Self {
3151 self.set_move_call(field.into());
3152 self
3153 }
3154 pub fn transfer_objects(&self) -> &super::TransferObjects {
3156 if let Some(super::command::Command::TransferObjects(field)) = &self.command
3157 {
3158 field as _
3159 } else {
3160 super::TransferObjects::default_instance() as _
3161 }
3162 }
3163 pub fn transfer_objects_opt(&self) -> Option<&super::TransferObjects> {
3165 if let Some(super::command::Command::TransferObjects(field)) = &self.command
3166 {
3167 Some(field as _)
3168 } else {
3169 None
3170 }
3171 }
3172 pub fn transfer_objects_opt_mut(
3174 &mut self,
3175 ) -> Option<&mut super::TransferObjects> {
3176 if let Some(super::command::Command::TransferObjects(field)) = &mut self
3177 .command
3178 {
3179 Some(field as _)
3180 } else {
3181 None
3182 }
3183 }
3184 pub fn transfer_objects_mut(&mut self) -> &mut super::TransferObjects {
3188 if self.transfer_objects_opt_mut().is_none() {
3189 self.command = Some(
3190 super::command::Command::TransferObjects(
3191 super::TransferObjects::default(),
3192 ),
3193 );
3194 }
3195 self.transfer_objects_opt_mut().unwrap()
3196 }
3197 pub fn set_transfer_objects<T: Into<super::TransferObjects>>(
3200 &mut self,
3201 field: T,
3202 ) {
3203 self.command = Some(
3204 super::command::Command::TransferObjects(field.into().into()),
3205 );
3206 }
3207 pub fn with_transfer_objects<T: Into<super::TransferObjects>>(
3210 mut self,
3211 field: T,
3212 ) -> Self {
3213 self.set_transfer_objects(field.into());
3214 self
3215 }
3216 pub fn split_coins(&self) -> &super::SplitCoins {
3218 if let Some(super::command::Command::SplitCoins(field)) = &self.command {
3219 field as _
3220 } else {
3221 super::SplitCoins::default_instance() as _
3222 }
3223 }
3224 pub fn split_coins_opt(&self) -> Option<&super::SplitCoins> {
3226 if let Some(super::command::Command::SplitCoins(field)) = &self.command {
3227 Some(field as _)
3228 } else {
3229 None
3230 }
3231 }
3232 pub fn split_coins_opt_mut(&mut self) -> Option<&mut super::SplitCoins> {
3234 if let Some(super::command::Command::SplitCoins(field)) = &mut self.command {
3235 Some(field as _)
3236 } else {
3237 None
3238 }
3239 }
3240 pub fn split_coins_mut(&mut self) -> &mut super::SplitCoins {
3244 if self.split_coins_opt_mut().is_none() {
3245 self.command = Some(
3246 super::command::Command::SplitCoins(super::SplitCoins::default()),
3247 );
3248 }
3249 self.split_coins_opt_mut().unwrap()
3250 }
3251 pub fn set_split_coins<T: Into<super::SplitCoins>>(&mut self, field: T) {
3254 self.command = Some(
3255 super::command::Command::SplitCoins(field.into().into()),
3256 );
3257 }
3258 pub fn with_split_coins<T: Into<super::SplitCoins>>(mut self, field: T) -> Self {
3261 self.set_split_coins(field.into());
3262 self
3263 }
3264 pub fn merge_coins(&self) -> &super::MergeCoins {
3266 if let Some(super::command::Command::MergeCoins(field)) = &self.command {
3267 field as _
3268 } else {
3269 super::MergeCoins::default_instance() as _
3270 }
3271 }
3272 pub fn merge_coins_opt(&self) -> Option<&super::MergeCoins> {
3274 if let Some(super::command::Command::MergeCoins(field)) = &self.command {
3275 Some(field as _)
3276 } else {
3277 None
3278 }
3279 }
3280 pub fn merge_coins_opt_mut(&mut self) -> Option<&mut super::MergeCoins> {
3282 if let Some(super::command::Command::MergeCoins(field)) = &mut self.command {
3283 Some(field as _)
3284 } else {
3285 None
3286 }
3287 }
3288 pub fn merge_coins_mut(&mut self) -> &mut super::MergeCoins {
3292 if self.merge_coins_opt_mut().is_none() {
3293 self.command = Some(
3294 super::command::Command::MergeCoins(super::MergeCoins::default()),
3295 );
3296 }
3297 self.merge_coins_opt_mut().unwrap()
3298 }
3299 pub fn set_merge_coins<T: Into<super::MergeCoins>>(&mut self, field: T) {
3302 self.command = Some(
3303 super::command::Command::MergeCoins(field.into().into()),
3304 );
3305 }
3306 pub fn with_merge_coins<T: Into<super::MergeCoins>>(mut self, field: T) -> Self {
3309 self.set_merge_coins(field.into());
3310 self
3311 }
3312 pub fn publish(&self) -> &super::Publish {
3314 if let Some(super::command::Command::Publish(field)) = &self.command {
3315 field as _
3316 } else {
3317 super::Publish::default_instance() as _
3318 }
3319 }
3320 pub fn publish_opt(&self) -> Option<&super::Publish> {
3322 if let Some(super::command::Command::Publish(field)) = &self.command {
3323 Some(field as _)
3324 } else {
3325 None
3326 }
3327 }
3328 pub fn publish_opt_mut(&mut self) -> Option<&mut super::Publish> {
3330 if let Some(super::command::Command::Publish(field)) = &mut self.command {
3331 Some(field as _)
3332 } else {
3333 None
3334 }
3335 }
3336 pub fn publish_mut(&mut self) -> &mut super::Publish {
3340 if self.publish_opt_mut().is_none() {
3341 self.command = Some(
3342 super::command::Command::Publish(super::Publish::default()),
3343 );
3344 }
3345 self.publish_opt_mut().unwrap()
3346 }
3347 pub fn set_publish<T: Into<super::Publish>>(&mut self, field: T) {
3350 self.command = Some(super::command::Command::Publish(field.into().into()));
3351 }
3352 pub fn with_publish<T: Into<super::Publish>>(mut self, field: T) -> Self {
3355 self.set_publish(field.into());
3356 self
3357 }
3358 pub fn make_move_vector(&self) -> &super::MakeMoveVector {
3360 if let Some(super::command::Command::MakeMoveVector(field)) = &self.command {
3361 field as _
3362 } else {
3363 super::MakeMoveVector::default_instance() as _
3364 }
3365 }
3366 pub fn make_move_vector_opt(&self) -> Option<&super::MakeMoveVector> {
3368 if let Some(super::command::Command::MakeMoveVector(field)) = &self.command {
3369 Some(field as _)
3370 } else {
3371 None
3372 }
3373 }
3374 pub fn make_move_vector_opt_mut(
3376 &mut self,
3377 ) -> Option<&mut super::MakeMoveVector> {
3378 if let Some(super::command::Command::MakeMoveVector(field)) = &mut self
3379 .command
3380 {
3381 Some(field as _)
3382 } else {
3383 None
3384 }
3385 }
3386 pub fn make_move_vector_mut(&mut self) -> &mut super::MakeMoveVector {
3390 if self.make_move_vector_opt_mut().is_none() {
3391 self.command = Some(
3392 super::command::Command::MakeMoveVector(
3393 super::MakeMoveVector::default(),
3394 ),
3395 );
3396 }
3397 self.make_move_vector_opt_mut().unwrap()
3398 }
3399 pub fn set_make_move_vector<T: Into<super::MakeMoveVector>>(
3402 &mut self,
3403 field: T,
3404 ) {
3405 self.command = Some(
3406 super::command::Command::MakeMoveVector(field.into().into()),
3407 );
3408 }
3409 pub fn with_make_move_vector<T: Into<super::MakeMoveVector>>(
3412 mut self,
3413 field: T,
3414 ) -> Self {
3415 self.set_make_move_vector(field.into());
3416 self
3417 }
3418 pub fn upgrade(&self) -> &super::Upgrade {
3420 if let Some(super::command::Command::Upgrade(field)) = &self.command {
3421 field as _
3422 } else {
3423 super::Upgrade::default_instance() as _
3424 }
3425 }
3426 pub fn upgrade_opt(&self) -> Option<&super::Upgrade> {
3428 if let Some(super::command::Command::Upgrade(field)) = &self.command {
3429 Some(field as _)
3430 } else {
3431 None
3432 }
3433 }
3434 pub fn upgrade_opt_mut(&mut self) -> Option<&mut super::Upgrade> {
3436 if let Some(super::command::Command::Upgrade(field)) = &mut self.command {
3437 Some(field as _)
3438 } else {
3439 None
3440 }
3441 }
3442 pub fn upgrade_mut(&mut self) -> &mut super::Upgrade {
3446 if self.upgrade_opt_mut().is_none() {
3447 self.command = Some(
3448 super::command::Command::Upgrade(super::Upgrade::default()),
3449 );
3450 }
3451 self.upgrade_opt_mut().unwrap()
3452 }
3453 pub fn set_upgrade<T: Into<super::Upgrade>>(&mut self, field: T) {
3456 self.command = Some(super::command::Command::Upgrade(field.into().into()));
3457 }
3458 pub fn with_upgrade<T: Into<super::Upgrade>>(mut self, field: T) -> Self {
3461 self.set_upgrade(field.into());
3462 self
3463 }
3464 }
3465 impl super::CommandArgumentError {
3466 pub const fn const_default() -> Self {
3467 Self {
3468 argument: None,
3469 kind: None,
3470 index_error: None,
3471 }
3472 }
3473 #[doc(hidden)]
3474 pub fn default_instance() -> &'static Self {
3475 static DEFAULT: super::CommandArgumentError = super::CommandArgumentError::const_default();
3476 &DEFAULT
3477 }
3478 pub fn argument_opt_mut(&mut self) -> Option<&mut u32> {
3480 self.argument.as_mut().map(|field| field as _)
3481 }
3482 pub fn argument_mut(&mut self) -> &mut u32 {
3485 self.argument.get_or_insert_default()
3486 }
3487 pub fn argument_opt(&self) -> Option<u32> {
3489 self.argument.as_ref().map(|field| *field)
3490 }
3491 pub fn set_argument(&mut self, field: u32) {
3493 self.argument = Some(field);
3494 }
3495 pub fn with_argument(mut self, field: u32) -> Self {
3497 self.set_argument(field);
3498 self
3499 }
3500 pub fn with_kind<
3502 T: Into<super::command_argument_error::CommandArgumentErrorKind>,
3503 >(mut self, field: T) -> Self {
3504 self.set_kind(field.into());
3505 self
3506 }
3507 pub fn index_error(&self) -> &super::IndexError {
3509 self.index_error
3510 .as_ref()
3511 .map(|field| field as _)
3512 .unwrap_or_else(|| super::IndexError::default_instance() as _)
3513 }
3514 pub fn index_error_opt_mut(&mut self) -> Option<&mut super::IndexError> {
3516 self.index_error.as_mut().map(|field| field as _)
3517 }
3518 pub fn index_error_mut(&mut self) -> &mut super::IndexError {
3521 self.index_error.get_or_insert_default()
3522 }
3523 pub fn index_error_opt(&self) -> Option<&super::IndexError> {
3525 self.index_error.as_ref().map(|field| field as _)
3526 }
3527 pub fn set_index_error<T: Into<super::IndexError>>(&mut self, field: T) {
3529 self.index_error = Some(field.into().into());
3530 }
3531 pub fn with_index_error<T: Into<super::IndexError>>(mut self, field: T) -> Self {
3533 self.set_index_error(field.into());
3534 self
3535 }
3536 }
3537 impl super::CommandOutput {
3538 pub const fn const_default() -> Self {
3539 Self {
3540 argument: None,
3541 value: None,
3542 json: None,
3543 }
3544 }
3545 #[doc(hidden)]
3546 pub fn default_instance() -> &'static Self {
3547 static DEFAULT: super::CommandOutput = super::CommandOutput::const_default();
3548 &DEFAULT
3549 }
3550 pub fn argument(&self) -> &super::Argument {
3552 self.argument
3553 .as_ref()
3554 .map(|field| field as _)
3555 .unwrap_or_else(|| super::Argument::default_instance() as _)
3556 }
3557 pub fn argument_opt_mut(&mut self) -> Option<&mut super::Argument> {
3559 self.argument.as_mut().map(|field| field as _)
3560 }
3561 pub fn argument_mut(&mut self) -> &mut super::Argument {
3564 self.argument.get_or_insert_default()
3565 }
3566 pub fn argument_opt(&self) -> Option<&super::Argument> {
3568 self.argument.as_ref().map(|field| field as _)
3569 }
3570 pub fn set_argument<T: Into<super::Argument>>(&mut self, field: T) {
3572 self.argument = Some(field.into().into());
3573 }
3574 pub fn with_argument<T: Into<super::Argument>>(mut self, field: T) -> Self {
3576 self.set_argument(field.into());
3577 self
3578 }
3579 pub fn value(&self) -> &super::Bcs {
3581 self.value
3582 .as_ref()
3583 .map(|field| field as _)
3584 .unwrap_or_else(|| super::Bcs::default_instance() as _)
3585 }
3586 pub fn value_opt_mut(&mut self) -> Option<&mut super::Bcs> {
3588 self.value.as_mut().map(|field| field as _)
3589 }
3590 pub fn value_mut(&mut self) -> &mut super::Bcs {
3593 self.value.get_or_insert_default()
3594 }
3595 pub fn value_opt(&self) -> Option<&super::Bcs> {
3597 self.value.as_ref().map(|field| field as _)
3598 }
3599 pub fn set_value<T: Into<super::Bcs>>(&mut self, field: T) {
3601 self.value = Some(field.into().into());
3602 }
3603 pub fn with_value<T: Into<super::Bcs>>(mut self, field: T) -> Self {
3605 self.set_value(field.into());
3606 self
3607 }
3608 pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
3610 self.json.as_mut().map(|field| field as _)
3611 }
3612 pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
3615 self.json.get_or_insert_default()
3616 }
3617 pub fn json_opt(&self) -> Option<&::prost_types::Value> {
3619 self.json.as_ref().map(|field| field as _)
3620 }
3621 pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
3623 self.json = Some(field.into().into());
3624 }
3625 pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
3627 self.set_json(field.into());
3628 self
3629 }
3630 }
3631 impl super::CommandResult {
3632 pub const fn const_default() -> Self {
3633 Self {
3634 return_values: Vec::new(),
3635 mutated_by_ref: Vec::new(),
3636 }
3637 }
3638 #[doc(hidden)]
3639 pub fn default_instance() -> &'static Self {
3640 static DEFAULT: super::CommandResult = super::CommandResult::const_default();
3641 &DEFAULT
3642 }
3643 pub fn return_values(&self) -> &[super::CommandOutput] {
3645 &self.return_values
3646 }
3647 pub fn return_values_mut(&mut self) -> &mut Vec<super::CommandOutput> {
3650 &mut self.return_values
3651 }
3652 pub fn set_return_values(&mut self, field: Vec<super::CommandOutput>) {
3654 self.return_values = field;
3655 }
3656 pub fn with_return_values(mut self, field: Vec<super::CommandOutput>) -> Self {
3658 self.set_return_values(field);
3659 self
3660 }
3661 pub fn mutated_by_ref(&self) -> &[super::CommandOutput] {
3663 &self.mutated_by_ref
3664 }
3665 pub fn mutated_by_ref_mut(&mut self) -> &mut Vec<super::CommandOutput> {
3668 &mut self.mutated_by_ref
3669 }
3670 pub fn set_mutated_by_ref(&mut self, field: Vec<super::CommandOutput>) {
3672 self.mutated_by_ref = field;
3673 }
3674 pub fn with_mutated_by_ref(mut self, field: Vec<super::CommandOutput>) -> Self {
3676 self.set_mutated_by_ref(field);
3677 self
3678 }
3679 }
3680 impl super::CongestedObjects {
3681 pub const fn const_default() -> Self {
3682 Self { objects: Vec::new() }
3683 }
3684 #[doc(hidden)]
3685 pub fn default_instance() -> &'static Self {
3686 static DEFAULT: super::CongestedObjects = super::CongestedObjects::const_default();
3687 &DEFAULT
3688 }
3689 pub fn objects(&self) -> &[String] {
3691 &self.objects
3692 }
3693 pub fn objects_mut(&mut self) -> &mut Vec<String> {
3696 &mut self.objects
3697 }
3698 pub fn set_objects(&mut self, field: Vec<String>) {
3700 self.objects = field;
3701 }
3702 pub fn with_objects(mut self, field: Vec<String>) -> Self {
3704 self.set_objects(field);
3705 self
3706 }
3707 }
3708 impl super::ConsensusCommitPrologue {
3709 pub const fn const_default() -> Self {
3710 Self {
3711 epoch: None,
3712 round: None,
3713 commit_timestamp: None,
3714 consensus_commit_digest: None,
3715 sub_dag_index: None,
3716 consensus_determined_version_assignments: None,
3717 additional_state_digest: None,
3718 }
3719 }
3720 #[doc(hidden)]
3721 pub fn default_instance() -> &'static Self {
3722 static DEFAULT: super::ConsensusCommitPrologue = super::ConsensusCommitPrologue::const_default();
3723 &DEFAULT
3724 }
3725 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
3727 self.epoch.as_mut().map(|field| field as _)
3728 }
3729 pub fn epoch_mut(&mut self) -> &mut u64 {
3732 self.epoch.get_or_insert_default()
3733 }
3734 pub fn epoch_opt(&self) -> Option<u64> {
3736 self.epoch.as_ref().map(|field| *field)
3737 }
3738 pub fn set_epoch(&mut self, field: u64) {
3740 self.epoch = Some(field);
3741 }
3742 pub fn with_epoch(mut self, field: u64) -> Self {
3744 self.set_epoch(field);
3745 self
3746 }
3747 pub fn round_opt_mut(&mut self) -> Option<&mut u64> {
3749 self.round.as_mut().map(|field| field as _)
3750 }
3751 pub fn round_mut(&mut self) -> &mut u64 {
3754 self.round.get_or_insert_default()
3755 }
3756 pub fn round_opt(&self) -> Option<u64> {
3758 self.round.as_ref().map(|field| *field)
3759 }
3760 pub fn set_round(&mut self, field: u64) {
3762 self.round = Some(field);
3763 }
3764 pub fn with_round(mut self, field: u64) -> Self {
3766 self.set_round(field);
3767 self
3768 }
3769 pub fn commit_timestamp_opt_mut(
3771 &mut self,
3772 ) -> Option<&mut ::prost_types::Timestamp> {
3773 self.commit_timestamp.as_mut().map(|field| field as _)
3774 }
3775 pub fn commit_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
3778 self.commit_timestamp.get_or_insert_default()
3779 }
3780 pub fn commit_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
3782 self.commit_timestamp.as_ref().map(|field| field as _)
3783 }
3784 pub fn set_commit_timestamp<T: Into<::prost_types::Timestamp>>(
3786 &mut self,
3787 field: T,
3788 ) {
3789 self.commit_timestamp = Some(field.into().into());
3790 }
3791 pub fn with_commit_timestamp<T: Into<::prost_types::Timestamp>>(
3793 mut self,
3794 field: T,
3795 ) -> Self {
3796 self.set_commit_timestamp(field.into());
3797 self
3798 }
3799 pub fn consensus_commit_digest_opt_mut(&mut self) -> Option<&mut String> {
3801 self.consensus_commit_digest.as_mut().map(|field| field as _)
3802 }
3803 pub fn consensus_commit_digest_mut(&mut self) -> &mut String {
3806 self.consensus_commit_digest.get_or_insert_default()
3807 }
3808 pub fn consensus_commit_digest_opt(&self) -> Option<&str> {
3810 self.consensus_commit_digest.as_ref().map(|field| field as _)
3811 }
3812 pub fn set_consensus_commit_digest<T: Into<String>>(&mut self, field: T) {
3814 self.consensus_commit_digest = Some(field.into().into());
3815 }
3816 pub fn with_consensus_commit_digest<T: Into<String>>(
3818 mut self,
3819 field: T,
3820 ) -> Self {
3821 self.set_consensus_commit_digest(field.into());
3822 self
3823 }
3824 pub fn sub_dag_index_opt_mut(&mut self) -> Option<&mut u64> {
3826 self.sub_dag_index.as_mut().map(|field| field as _)
3827 }
3828 pub fn sub_dag_index_mut(&mut self) -> &mut u64 {
3831 self.sub_dag_index.get_or_insert_default()
3832 }
3833 pub fn sub_dag_index_opt(&self) -> Option<u64> {
3835 self.sub_dag_index.as_ref().map(|field| *field)
3836 }
3837 pub fn set_sub_dag_index(&mut self, field: u64) {
3839 self.sub_dag_index = Some(field);
3840 }
3841 pub fn with_sub_dag_index(mut self, field: u64) -> Self {
3843 self.set_sub_dag_index(field);
3844 self
3845 }
3846 pub fn consensus_determined_version_assignments(
3848 &self,
3849 ) -> &super::ConsensusDeterminedVersionAssignments {
3850 self.consensus_determined_version_assignments
3851 .as_ref()
3852 .map(|field| field as _)
3853 .unwrap_or_else(|| {
3854 super::ConsensusDeterminedVersionAssignments::default_instance() as _
3855 })
3856 }
3857 pub fn consensus_determined_version_assignments_opt_mut(
3859 &mut self,
3860 ) -> Option<&mut super::ConsensusDeterminedVersionAssignments> {
3861 self.consensus_determined_version_assignments
3862 .as_mut()
3863 .map(|field| field as _)
3864 }
3865 pub fn consensus_determined_version_assignments_mut(
3868 &mut self,
3869 ) -> &mut super::ConsensusDeterminedVersionAssignments {
3870 self.consensus_determined_version_assignments.get_or_insert_default()
3871 }
3872 pub fn consensus_determined_version_assignments_opt(
3874 &self,
3875 ) -> Option<&super::ConsensusDeterminedVersionAssignments> {
3876 self.consensus_determined_version_assignments
3877 .as_ref()
3878 .map(|field| field as _)
3879 }
3880 pub fn set_consensus_determined_version_assignments<
3882 T: Into<super::ConsensusDeterminedVersionAssignments>,
3883 >(&mut self, field: T) {
3884 self.consensus_determined_version_assignments = Some(field.into().into());
3885 }
3886 pub fn with_consensus_determined_version_assignments<
3888 T: Into<super::ConsensusDeterminedVersionAssignments>,
3889 >(mut self, field: T) -> Self {
3890 self.set_consensus_determined_version_assignments(field.into());
3891 self
3892 }
3893 pub fn additional_state_digest_opt_mut(&mut self) -> Option<&mut String> {
3895 self.additional_state_digest.as_mut().map(|field| field as _)
3896 }
3897 pub fn additional_state_digest_mut(&mut self) -> &mut String {
3900 self.additional_state_digest.get_or_insert_default()
3901 }
3902 pub fn additional_state_digest_opt(&self) -> Option<&str> {
3904 self.additional_state_digest.as_ref().map(|field| field as _)
3905 }
3906 pub fn set_additional_state_digest<T: Into<String>>(&mut self, field: T) {
3908 self.additional_state_digest = Some(field.into().into());
3909 }
3910 pub fn with_additional_state_digest<T: Into<String>>(
3912 mut self,
3913 field: T,
3914 ) -> Self {
3915 self.set_additional_state_digest(field.into());
3916 self
3917 }
3918 }
3919 impl super::ConsensusDeterminedVersionAssignments {
3920 pub const fn const_default() -> Self {
3921 Self {
3922 version: None,
3923 canceled_transactions: Vec::new(),
3924 }
3925 }
3926 #[doc(hidden)]
3927 pub fn default_instance() -> &'static Self {
3928 static DEFAULT: super::ConsensusDeterminedVersionAssignments = super::ConsensusDeterminedVersionAssignments::const_default();
3929 &DEFAULT
3930 }
3931 pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
3933 self.version.as_mut().map(|field| field as _)
3934 }
3935 pub fn version_mut(&mut self) -> &mut i32 {
3938 self.version.get_or_insert_default()
3939 }
3940 pub fn version_opt(&self) -> Option<i32> {
3942 self.version.as_ref().map(|field| *field)
3943 }
3944 pub fn set_version(&mut self, field: i32) {
3946 self.version = Some(field);
3947 }
3948 pub fn with_version(mut self, field: i32) -> Self {
3950 self.set_version(field);
3951 self
3952 }
3953 pub fn canceled_transactions(&self) -> &[super::CanceledTransaction] {
3955 &self.canceled_transactions
3956 }
3957 pub fn canceled_transactions_mut(
3960 &mut self,
3961 ) -> &mut Vec<super::CanceledTransaction> {
3962 &mut self.canceled_transactions
3963 }
3964 pub fn set_canceled_transactions(
3966 &mut self,
3967 field: Vec<super::CanceledTransaction>,
3968 ) {
3969 self.canceled_transactions = field;
3970 }
3971 pub fn with_canceled_transactions(
3973 mut self,
3974 field: Vec<super::CanceledTransaction>,
3975 ) -> Self {
3976 self.set_canceled_transactions(field);
3977 self
3978 }
3979 }
3980 impl super::DatatypeDescriptor {
3981 pub const fn const_default() -> Self {
3982 Self {
3983 type_name: None,
3984 defining_id: None,
3985 module: None,
3986 name: None,
3987 abilities: Vec::new(),
3988 type_parameters: Vec::new(),
3989 kind: None,
3990 fields: Vec::new(),
3991 variants: Vec::new(),
3992 }
3993 }
3994 #[doc(hidden)]
3995 pub fn default_instance() -> &'static Self {
3996 static DEFAULT: super::DatatypeDescriptor = super::DatatypeDescriptor::const_default();
3997 &DEFAULT
3998 }
3999 pub fn type_name_opt_mut(&mut self) -> Option<&mut String> {
4001 self.type_name.as_mut().map(|field| field as _)
4002 }
4003 pub fn type_name_mut(&mut self) -> &mut String {
4006 self.type_name.get_or_insert_default()
4007 }
4008 pub fn type_name_opt(&self) -> Option<&str> {
4010 self.type_name.as_ref().map(|field| field as _)
4011 }
4012 pub fn set_type_name<T: Into<String>>(&mut self, field: T) {
4014 self.type_name = Some(field.into().into());
4015 }
4016 pub fn with_type_name<T: Into<String>>(mut self, field: T) -> Self {
4018 self.set_type_name(field.into());
4019 self
4020 }
4021 pub fn defining_id_opt_mut(&mut self) -> Option<&mut String> {
4023 self.defining_id.as_mut().map(|field| field as _)
4024 }
4025 pub fn defining_id_mut(&mut self) -> &mut String {
4028 self.defining_id.get_or_insert_default()
4029 }
4030 pub fn defining_id_opt(&self) -> Option<&str> {
4032 self.defining_id.as_ref().map(|field| field as _)
4033 }
4034 pub fn set_defining_id<T: Into<String>>(&mut self, field: T) {
4036 self.defining_id = Some(field.into().into());
4037 }
4038 pub fn with_defining_id<T: Into<String>>(mut self, field: T) -> Self {
4040 self.set_defining_id(field.into());
4041 self
4042 }
4043 pub fn module_opt_mut(&mut self) -> Option<&mut String> {
4045 self.module.as_mut().map(|field| field as _)
4046 }
4047 pub fn module_mut(&mut self) -> &mut String {
4050 self.module.get_or_insert_default()
4051 }
4052 pub fn module_opt(&self) -> Option<&str> {
4054 self.module.as_ref().map(|field| field as _)
4055 }
4056 pub fn set_module<T: Into<String>>(&mut self, field: T) {
4058 self.module = Some(field.into().into());
4059 }
4060 pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
4062 self.set_module(field.into());
4063 self
4064 }
4065 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
4067 self.name.as_mut().map(|field| field as _)
4068 }
4069 pub fn name_mut(&mut self) -> &mut String {
4072 self.name.get_or_insert_default()
4073 }
4074 pub fn name_opt(&self) -> Option<&str> {
4076 self.name.as_ref().map(|field| field as _)
4077 }
4078 pub fn set_name<T: Into<String>>(&mut self, field: T) {
4080 self.name = Some(field.into().into());
4081 }
4082 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
4084 self.set_name(field.into());
4085 self
4086 }
4087 pub fn type_parameters(&self) -> &[super::TypeParameter] {
4089 &self.type_parameters
4090 }
4091 pub fn type_parameters_mut(&mut self) -> &mut Vec<super::TypeParameter> {
4094 &mut self.type_parameters
4095 }
4096 pub fn set_type_parameters(&mut self, field: Vec<super::TypeParameter>) {
4098 self.type_parameters = field;
4099 }
4100 pub fn with_type_parameters(mut self, field: Vec<super::TypeParameter>) -> Self {
4102 self.set_type_parameters(field);
4103 self
4104 }
4105 pub fn with_kind<T: Into<super::datatype_descriptor::DatatypeKind>>(
4107 mut self,
4108 field: T,
4109 ) -> Self {
4110 self.set_kind(field.into());
4111 self
4112 }
4113 pub fn fields(&self) -> &[super::FieldDescriptor] {
4115 &self.fields
4116 }
4117 pub fn fields_mut(&mut self) -> &mut Vec<super::FieldDescriptor> {
4120 &mut self.fields
4121 }
4122 pub fn set_fields(&mut self, field: Vec<super::FieldDescriptor>) {
4124 self.fields = field;
4125 }
4126 pub fn with_fields(mut self, field: Vec<super::FieldDescriptor>) -> Self {
4128 self.set_fields(field);
4129 self
4130 }
4131 pub fn variants(&self) -> &[super::VariantDescriptor] {
4133 &self.variants
4134 }
4135 pub fn variants_mut(&mut self) -> &mut Vec<super::VariantDescriptor> {
4138 &mut self.variants
4139 }
4140 pub fn set_variants(&mut self, field: Vec<super::VariantDescriptor>) {
4142 self.variants = field;
4143 }
4144 pub fn with_variants(mut self, field: Vec<super::VariantDescriptor>) -> Self {
4146 self.set_variants(field);
4147 self
4148 }
4149 }
4150 impl super::Display {
4151 pub const fn const_default() -> Self {
4152 Self { output: None, errors: None }
4153 }
4154 #[doc(hidden)]
4155 pub fn default_instance() -> &'static Self {
4156 static DEFAULT: super::Display = super::Display::const_default();
4157 &DEFAULT
4158 }
4159 pub fn output_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
4161 self.output.as_mut().map(|field| field as _)
4162 }
4163 pub fn output_mut(&mut self) -> &mut ::prost_types::Value {
4166 self.output.get_or_insert_default()
4167 }
4168 pub fn output_opt(&self) -> Option<&::prost_types::Value> {
4170 self.output.as_ref().map(|field| field as _)
4171 }
4172 pub fn set_output<T: Into<::prost_types::Value>>(&mut self, field: T) {
4174 self.output = Some(field.into().into());
4175 }
4176 pub fn with_output<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
4178 self.set_output(field.into());
4179 self
4180 }
4181 pub fn errors_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
4183 self.errors.as_mut().map(|field| field as _)
4184 }
4185 pub fn errors_mut(&mut self) -> &mut ::prost_types::Value {
4188 self.errors.get_or_insert_default()
4189 }
4190 pub fn errors_opt(&self) -> Option<&::prost_types::Value> {
4192 self.errors.as_ref().map(|field| field as _)
4193 }
4194 pub fn set_errors<T: Into<::prost_types::Value>>(&mut self, field: T) {
4196 self.errors = Some(field.into().into());
4197 }
4198 pub fn with_errors<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
4200 self.set_errors(field.into());
4201 self
4202 }
4203 }
4204 impl super::DynamicField {
4205 pub const fn const_default() -> Self {
4206 Self {
4207 kind: None,
4208 parent: None,
4209 field_id: None,
4210 field_object: None,
4211 name: None,
4212 value: None,
4213 value_type: None,
4214 child_id: None,
4215 child_object: None,
4216 }
4217 }
4218 #[doc(hidden)]
4219 pub fn default_instance() -> &'static Self {
4220 static DEFAULT: super::DynamicField = super::DynamicField::const_default();
4221 &DEFAULT
4222 }
4223 pub fn with_kind<T: Into<super::dynamic_field::DynamicFieldKind>>(
4225 mut self,
4226 field: T,
4227 ) -> Self {
4228 self.set_kind(field.into());
4229 self
4230 }
4231 pub fn parent_opt_mut(&mut self) -> Option<&mut String> {
4233 self.parent.as_mut().map(|field| field as _)
4234 }
4235 pub fn parent_mut(&mut self) -> &mut String {
4238 self.parent.get_or_insert_default()
4239 }
4240 pub fn parent_opt(&self) -> Option<&str> {
4242 self.parent.as_ref().map(|field| field as _)
4243 }
4244 pub fn set_parent<T: Into<String>>(&mut self, field: T) {
4246 self.parent = Some(field.into().into());
4247 }
4248 pub fn with_parent<T: Into<String>>(mut self, field: T) -> Self {
4250 self.set_parent(field.into());
4251 self
4252 }
4253 pub fn field_id_opt_mut(&mut self) -> Option<&mut String> {
4255 self.field_id.as_mut().map(|field| field as _)
4256 }
4257 pub fn field_id_mut(&mut self) -> &mut String {
4260 self.field_id.get_or_insert_default()
4261 }
4262 pub fn field_id_opt(&self) -> Option<&str> {
4264 self.field_id.as_ref().map(|field| field as _)
4265 }
4266 pub fn set_field_id<T: Into<String>>(&mut self, field: T) {
4268 self.field_id = Some(field.into().into());
4269 }
4270 pub fn with_field_id<T: Into<String>>(mut self, field: T) -> Self {
4272 self.set_field_id(field.into());
4273 self
4274 }
4275 pub fn field_object(&self) -> &super::Object {
4277 self.field_object
4278 .as_ref()
4279 .map(|field| field as _)
4280 .unwrap_or_else(|| super::Object::default_instance() as _)
4281 }
4282 pub fn field_object_opt_mut(&mut self) -> Option<&mut super::Object> {
4284 self.field_object.as_mut().map(|field| field as _)
4285 }
4286 pub fn field_object_mut(&mut self) -> &mut super::Object {
4289 self.field_object.get_or_insert_default()
4290 }
4291 pub fn field_object_opt(&self) -> Option<&super::Object> {
4293 self.field_object.as_ref().map(|field| field as _)
4294 }
4295 pub fn set_field_object<T: Into<super::Object>>(&mut self, field: T) {
4297 self.field_object = Some(field.into().into());
4298 }
4299 pub fn with_field_object<T: Into<super::Object>>(mut self, field: T) -> Self {
4301 self.set_field_object(field.into());
4302 self
4303 }
4304 pub fn name(&self) -> &super::Bcs {
4306 self.name
4307 .as_ref()
4308 .map(|field| field as _)
4309 .unwrap_or_else(|| super::Bcs::default_instance() as _)
4310 }
4311 pub fn name_opt_mut(&mut self) -> Option<&mut super::Bcs> {
4313 self.name.as_mut().map(|field| field as _)
4314 }
4315 pub fn name_mut(&mut self) -> &mut super::Bcs {
4318 self.name.get_or_insert_default()
4319 }
4320 pub fn name_opt(&self) -> Option<&super::Bcs> {
4322 self.name.as_ref().map(|field| field as _)
4323 }
4324 pub fn set_name<T: Into<super::Bcs>>(&mut self, field: T) {
4326 self.name = Some(field.into().into());
4327 }
4328 pub fn with_name<T: Into<super::Bcs>>(mut self, field: T) -> Self {
4330 self.set_name(field.into());
4331 self
4332 }
4333 pub fn value(&self) -> &super::Bcs {
4335 self.value
4336 .as_ref()
4337 .map(|field| field as _)
4338 .unwrap_or_else(|| super::Bcs::default_instance() as _)
4339 }
4340 pub fn value_opt_mut(&mut self) -> Option<&mut super::Bcs> {
4342 self.value.as_mut().map(|field| field as _)
4343 }
4344 pub fn value_mut(&mut self) -> &mut super::Bcs {
4347 self.value.get_or_insert_default()
4348 }
4349 pub fn value_opt(&self) -> Option<&super::Bcs> {
4351 self.value.as_ref().map(|field| field as _)
4352 }
4353 pub fn set_value<T: Into<super::Bcs>>(&mut self, field: T) {
4355 self.value = Some(field.into().into());
4356 }
4357 pub fn with_value<T: Into<super::Bcs>>(mut self, field: T) -> Self {
4359 self.set_value(field.into());
4360 self
4361 }
4362 pub fn value_type_opt_mut(&mut self) -> Option<&mut String> {
4364 self.value_type.as_mut().map(|field| field as _)
4365 }
4366 pub fn value_type_mut(&mut self) -> &mut String {
4369 self.value_type.get_or_insert_default()
4370 }
4371 pub fn value_type_opt(&self) -> Option<&str> {
4373 self.value_type.as_ref().map(|field| field as _)
4374 }
4375 pub fn set_value_type<T: Into<String>>(&mut self, field: T) {
4377 self.value_type = Some(field.into().into());
4378 }
4379 pub fn with_value_type<T: Into<String>>(mut self, field: T) -> Self {
4381 self.set_value_type(field.into());
4382 self
4383 }
4384 pub fn child_id_opt_mut(&mut self) -> Option<&mut String> {
4386 self.child_id.as_mut().map(|field| field as _)
4387 }
4388 pub fn child_id_mut(&mut self) -> &mut String {
4391 self.child_id.get_or_insert_default()
4392 }
4393 pub fn child_id_opt(&self) -> Option<&str> {
4395 self.child_id.as_ref().map(|field| field as _)
4396 }
4397 pub fn set_child_id<T: Into<String>>(&mut self, field: T) {
4399 self.child_id = Some(field.into().into());
4400 }
4401 pub fn with_child_id<T: Into<String>>(mut self, field: T) -> Self {
4403 self.set_child_id(field.into());
4404 self
4405 }
4406 pub fn child_object(&self) -> &super::Object {
4408 self.child_object
4409 .as_ref()
4410 .map(|field| field as _)
4411 .unwrap_or_else(|| super::Object::default_instance() as _)
4412 }
4413 pub fn child_object_opt_mut(&mut self) -> Option<&mut super::Object> {
4415 self.child_object.as_mut().map(|field| field as _)
4416 }
4417 pub fn child_object_mut(&mut self) -> &mut super::Object {
4420 self.child_object.get_or_insert_default()
4421 }
4422 pub fn child_object_opt(&self) -> Option<&super::Object> {
4424 self.child_object.as_ref().map(|field| field as _)
4425 }
4426 pub fn set_child_object<T: Into<super::Object>>(&mut self, field: T) {
4428 self.child_object = Some(field.into().into());
4429 }
4430 pub fn with_child_object<T: Into<super::Object>>(mut self, field: T) -> Self {
4432 self.set_child_object(field.into());
4433 self
4434 }
4435 }
4436 impl super::EmitModuleFilter {
4437 pub const fn const_default() -> Self {
4438 Self { module: None }
4439 }
4440 #[doc(hidden)]
4441 pub fn default_instance() -> &'static Self {
4442 static DEFAULT: super::EmitModuleFilter = super::EmitModuleFilter::const_default();
4443 &DEFAULT
4444 }
4445 pub fn module_opt_mut(&mut self) -> Option<&mut String> {
4447 self.module.as_mut().map(|field| field as _)
4448 }
4449 pub fn module_mut(&mut self) -> &mut String {
4452 self.module.get_or_insert_default()
4453 }
4454 pub fn module_opt(&self) -> Option<&str> {
4456 self.module.as_ref().map(|field| field as _)
4457 }
4458 pub fn set_module<T: Into<String>>(&mut self, field: T) {
4460 self.module = Some(field.into().into());
4461 }
4462 pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
4464 self.set_module(field.into());
4465 self
4466 }
4467 }
4468 impl super::EndOfEpochData {
4469 pub const fn const_default() -> Self {
4470 Self {
4471 next_epoch_committee: Vec::new(),
4472 next_epoch_protocol_version: None,
4473 epoch_commitments: Vec::new(),
4474 }
4475 }
4476 #[doc(hidden)]
4477 pub fn default_instance() -> &'static Self {
4478 static DEFAULT: super::EndOfEpochData = super::EndOfEpochData::const_default();
4479 &DEFAULT
4480 }
4481 pub fn next_epoch_committee(&self) -> &[super::ValidatorCommitteeMember] {
4483 &self.next_epoch_committee
4484 }
4485 pub fn next_epoch_committee_mut(
4488 &mut self,
4489 ) -> &mut Vec<super::ValidatorCommitteeMember> {
4490 &mut self.next_epoch_committee
4491 }
4492 pub fn set_next_epoch_committee(
4494 &mut self,
4495 field: Vec<super::ValidatorCommitteeMember>,
4496 ) {
4497 self.next_epoch_committee = field;
4498 }
4499 pub fn with_next_epoch_committee(
4501 mut self,
4502 field: Vec<super::ValidatorCommitteeMember>,
4503 ) -> Self {
4504 self.set_next_epoch_committee(field);
4505 self
4506 }
4507 pub fn next_epoch_protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
4509 self.next_epoch_protocol_version.as_mut().map(|field| field as _)
4510 }
4511 pub fn next_epoch_protocol_version_mut(&mut self) -> &mut u64 {
4514 self.next_epoch_protocol_version.get_or_insert_default()
4515 }
4516 pub fn next_epoch_protocol_version_opt(&self) -> Option<u64> {
4518 self.next_epoch_protocol_version.as_ref().map(|field| *field)
4519 }
4520 pub fn set_next_epoch_protocol_version(&mut self, field: u64) {
4522 self.next_epoch_protocol_version = Some(field);
4523 }
4524 pub fn with_next_epoch_protocol_version(mut self, field: u64) -> Self {
4526 self.set_next_epoch_protocol_version(field);
4527 self
4528 }
4529 pub fn epoch_commitments(&self) -> &[super::CheckpointCommitment] {
4531 &self.epoch_commitments
4532 }
4533 pub fn epoch_commitments_mut(
4536 &mut self,
4537 ) -> &mut Vec<super::CheckpointCommitment> {
4538 &mut self.epoch_commitments
4539 }
4540 pub fn set_epoch_commitments(
4542 &mut self,
4543 field: Vec<super::CheckpointCommitment>,
4544 ) {
4545 self.epoch_commitments = field;
4546 }
4547 pub fn with_epoch_commitments(
4549 mut self,
4550 field: Vec<super::CheckpointCommitment>,
4551 ) -> Self {
4552 self.set_epoch_commitments(field);
4553 self
4554 }
4555 }
4556 impl super::EndOfEpochTransaction {
4557 pub const fn const_default() -> Self {
4558 Self { transactions: Vec::new() }
4559 }
4560 #[doc(hidden)]
4561 pub fn default_instance() -> &'static Self {
4562 static DEFAULT: super::EndOfEpochTransaction = super::EndOfEpochTransaction::const_default();
4563 &DEFAULT
4564 }
4565 pub fn transactions(&self) -> &[super::EndOfEpochTransactionKind] {
4567 &self.transactions
4568 }
4569 pub fn transactions_mut(
4572 &mut self,
4573 ) -> &mut Vec<super::EndOfEpochTransactionKind> {
4574 &mut self.transactions
4575 }
4576 pub fn set_transactions(
4578 &mut self,
4579 field: Vec<super::EndOfEpochTransactionKind>,
4580 ) {
4581 self.transactions = field;
4582 }
4583 pub fn with_transactions(
4585 mut self,
4586 field: Vec<super::EndOfEpochTransactionKind>,
4587 ) -> Self {
4588 self.set_transactions(field);
4589 self
4590 }
4591 }
4592 impl super::EndOfEpochTransactionKind {
4593 pub const fn const_default() -> Self {
4594 Self { kind: None, data: None }
4595 }
4596 #[doc(hidden)]
4597 pub fn default_instance() -> &'static Self {
4598 static DEFAULT: super::EndOfEpochTransactionKind = super::EndOfEpochTransactionKind::const_default();
4599 &DEFAULT
4600 }
4601 pub fn with_kind<T: Into<super::end_of_epoch_transaction_kind::Kind>>(
4603 mut self,
4604 field: T,
4605 ) -> Self {
4606 self.set_kind(field.into());
4607 self
4608 }
4609 pub fn change_epoch(&self) -> &super::ChangeEpoch {
4611 if let Some(
4612 super::end_of_epoch_transaction_kind::Data::ChangeEpoch(field),
4613 ) = &self.data
4614 {
4615 field as _
4616 } else {
4617 super::ChangeEpoch::default_instance() as _
4618 }
4619 }
4620 pub fn change_epoch_opt(&self) -> Option<&super::ChangeEpoch> {
4622 if let Some(
4623 super::end_of_epoch_transaction_kind::Data::ChangeEpoch(field),
4624 ) = &self.data
4625 {
4626 Some(field as _)
4627 } else {
4628 None
4629 }
4630 }
4631 pub fn change_epoch_opt_mut(&mut self) -> Option<&mut super::ChangeEpoch> {
4633 if let Some(
4634 super::end_of_epoch_transaction_kind::Data::ChangeEpoch(field),
4635 ) = &mut self.data
4636 {
4637 Some(field as _)
4638 } else {
4639 None
4640 }
4641 }
4642 pub fn change_epoch_mut(&mut self) -> &mut super::ChangeEpoch {
4646 if self.change_epoch_opt_mut().is_none() {
4647 self.data = Some(
4648 super::end_of_epoch_transaction_kind::Data::ChangeEpoch(
4649 super::ChangeEpoch::default(),
4650 ),
4651 );
4652 }
4653 self.change_epoch_opt_mut().unwrap()
4654 }
4655 pub fn set_change_epoch<T: Into<super::ChangeEpoch>>(&mut self, field: T) {
4658 self.data = Some(
4659 super::end_of_epoch_transaction_kind::Data::ChangeEpoch(
4660 field.into().into(),
4661 ),
4662 );
4663 }
4664 pub fn with_change_epoch<T: Into<super::ChangeEpoch>>(
4667 mut self,
4668 field: T,
4669 ) -> Self {
4670 self.set_change_epoch(field.into());
4671 self
4672 }
4673 pub fn authenticator_state_expire(&self) -> &super::AuthenticatorStateExpire {
4675 if let Some(
4676 super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4677 field,
4678 ),
4679 ) = &self.data
4680 {
4681 field as _
4682 } else {
4683 super::AuthenticatorStateExpire::default_instance() as _
4684 }
4685 }
4686 pub fn authenticator_state_expire_opt(
4688 &self,
4689 ) -> Option<&super::AuthenticatorStateExpire> {
4690 if let Some(
4691 super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4692 field,
4693 ),
4694 ) = &self.data
4695 {
4696 Some(field as _)
4697 } else {
4698 None
4699 }
4700 }
4701 pub fn authenticator_state_expire_opt_mut(
4703 &mut self,
4704 ) -> Option<&mut super::AuthenticatorStateExpire> {
4705 if let Some(
4706 super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4707 field,
4708 ),
4709 ) = &mut self.data
4710 {
4711 Some(field as _)
4712 } else {
4713 None
4714 }
4715 }
4716 pub fn authenticator_state_expire_mut(
4720 &mut self,
4721 ) -> &mut super::AuthenticatorStateExpire {
4722 if self.authenticator_state_expire_opt_mut().is_none() {
4723 self.data = Some(
4724 super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4725 super::AuthenticatorStateExpire::default(),
4726 ),
4727 );
4728 }
4729 self.authenticator_state_expire_opt_mut().unwrap()
4730 }
4731 pub fn set_authenticator_state_expire<T: Into<super::AuthenticatorStateExpire>>(
4734 &mut self,
4735 field: T,
4736 ) {
4737 self.data = Some(
4738 super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4739 field.into().into(),
4740 ),
4741 );
4742 }
4743 pub fn with_authenticator_state_expire<T: Into<super::AuthenticatorStateExpire>>(
4746 mut self,
4747 field: T,
4748 ) -> Self {
4749 self.set_authenticator_state_expire(field.into());
4750 self
4751 }
4752 pub fn execution_time_observations(&self) -> &super::ExecutionTimeObservations {
4754 if let Some(
4755 super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4756 field,
4757 ),
4758 ) = &self.data
4759 {
4760 field as _
4761 } else {
4762 super::ExecutionTimeObservations::default_instance() as _
4763 }
4764 }
4765 pub fn execution_time_observations_opt(
4767 &self,
4768 ) -> Option<&super::ExecutionTimeObservations> {
4769 if let Some(
4770 super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4771 field,
4772 ),
4773 ) = &self.data
4774 {
4775 Some(field as _)
4776 } else {
4777 None
4778 }
4779 }
4780 pub fn execution_time_observations_opt_mut(
4782 &mut self,
4783 ) -> Option<&mut super::ExecutionTimeObservations> {
4784 if let Some(
4785 super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4786 field,
4787 ),
4788 ) = &mut self.data
4789 {
4790 Some(field as _)
4791 } else {
4792 None
4793 }
4794 }
4795 pub fn execution_time_observations_mut(
4799 &mut self,
4800 ) -> &mut super::ExecutionTimeObservations {
4801 if self.execution_time_observations_opt_mut().is_none() {
4802 self.data = Some(
4803 super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4804 super::ExecutionTimeObservations::default(),
4805 ),
4806 );
4807 }
4808 self.execution_time_observations_opt_mut().unwrap()
4809 }
4810 pub fn set_execution_time_observations<
4813 T: Into<super::ExecutionTimeObservations>,
4814 >(&mut self, field: T) {
4815 self.data = Some(
4816 super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4817 field.into().into(),
4818 ),
4819 );
4820 }
4821 pub fn with_execution_time_observations<
4824 T: Into<super::ExecutionTimeObservations>,
4825 >(mut self, field: T) -> Self {
4826 self.set_execution_time_observations(field.into());
4827 self
4828 }
4829 pub fn bridge_chain_id(&self) -> &str {
4831 if let Some(
4832 super::end_of_epoch_transaction_kind::Data::BridgeChainId(field),
4833 ) = &self.data
4834 {
4835 field as _
4836 } else {
4837 ""
4838 }
4839 }
4840 pub fn bridge_chain_id_opt(&self) -> Option<&str> {
4842 if let Some(
4843 super::end_of_epoch_transaction_kind::Data::BridgeChainId(field),
4844 ) = &self.data
4845 {
4846 Some(field as _)
4847 } else {
4848 None
4849 }
4850 }
4851 pub fn bridge_chain_id_opt_mut(&mut self) -> Option<&mut String> {
4853 if let Some(
4854 super::end_of_epoch_transaction_kind::Data::BridgeChainId(field),
4855 ) = &mut self.data
4856 {
4857 Some(field as _)
4858 } else {
4859 None
4860 }
4861 }
4862 pub fn bridge_chain_id_mut(&mut self) -> &mut String {
4866 if self.bridge_chain_id_opt_mut().is_none() {
4867 self.data = Some(
4868 super::end_of_epoch_transaction_kind::Data::BridgeChainId(
4869 String::default(),
4870 ),
4871 );
4872 }
4873 self.bridge_chain_id_opt_mut().unwrap()
4874 }
4875 pub fn set_bridge_chain_id<T: Into<String>>(&mut self, field: T) {
4878 self.data = Some(
4879 super::end_of_epoch_transaction_kind::Data::BridgeChainId(
4880 field.into().into(),
4881 ),
4882 );
4883 }
4884 pub fn with_bridge_chain_id<T: Into<String>>(mut self, field: T) -> Self {
4887 self.set_bridge_chain_id(field.into());
4888 self
4889 }
4890 pub fn bridge_object_version(&self) -> u64 {
4892 if let Some(
4893 super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4894 ) = &self.data
4895 {
4896 *field
4897 } else {
4898 0u64
4899 }
4900 }
4901 pub fn bridge_object_version_opt(&self) -> Option<u64> {
4903 if let Some(
4904 super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4905 ) = &self.data
4906 {
4907 Some(*field)
4908 } else {
4909 None
4910 }
4911 }
4912 pub fn bridge_object_version_opt_mut(&mut self) -> Option<&mut u64> {
4914 if let Some(
4915 super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4916 ) = &mut self.data
4917 {
4918 Some(field as _)
4919 } else {
4920 None
4921 }
4922 }
4923 pub fn bridge_object_version_mut(&mut self) -> &mut u64 {
4927 if self.bridge_object_version_opt_mut().is_none() {
4928 self.data = Some(
4929 super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(
4930 u64::default(),
4931 ),
4932 );
4933 }
4934 self.bridge_object_version_opt_mut().unwrap()
4935 }
4936 pub fn set_bridge_object_version(&mut self, field: u64) {
4939 self.data = Some(
4940 super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4941 );
4942 }
4943 pub fn with_bridge_object_version(mut self, field: u64) -> Self {
4946 self.set_bridge_object_version(field);
4947 self
4948 }
4949 pub fn storage_cost(&self) -> u64 {
4951 if let Some(
4952 super::end_of_epoch_transaction_kind::Data::StorageCost(field),
4953 ) = &self.data
4954 {
4955 *field
4956 } else {
4957 0u64
4958 }
4959 }
4960 pub fn storage_cost_opt(&self) -> Option<u64> {
4962 if let Some(
4963 super::end_of_epoch_transaction_kind::Data::StorageCost(field),
4964 ) = &self.data
4965 {
4966 Some(*field)
4967 } else {
4968 None
4969 }
4970 }
4971 pub fn storage_cost_opt_mut(&mut self) -> Option<&mut u64> {
4973 if let Some(
4974 super::end_of_epoch_transaction_kind::Data::StorageCost(field),
4975 ) = &mut self.data
4976 {
4977 Some(field as _)
4978 } else {
4979 None
4980 }
4981 }
4982 pub fn storage_cost_mut(&mut self) -> &mut u64 {
4986 if self.storage_cost_opt_mut().is_none() {
4987 self.data = Some(
4988 super::end_of_epoch_transaction_kind::Data::StorageCost(
4989 u64::default(),
4990 ),
4991 );
4992 }
4993 self.storage_cost_opt_mut().unwrap()
4994 }
4995 pub fn set_storage_cost(&mut self, field: u64) {
4998 self.data = Some(
4999 super::end_of_epoch_transaction_kind::Data::StorageCost(field),
5000 );
5001 }
5002 pub fn with_storage_cost(mut self, field: u64) -> Self {
5005 self.set_storage_cost(field);
5006 self
5007 }
5008 }
5009 impl super::Epoch {
5010 pub const fn const_default() -> Self {
5011 Self {
5012 epoch: None,
5013 committee: None,
5014 system_state: None,
5015 first_checkpoint: None,
5016 last_checkpoint: None,
5017 start: None,
5018 end: None,
5019 reference_gas_price: None,
5020 protocol_config: None,
5021 }
5022 }
5023 #[doc(hidden)]
5024 pub fn default_instance() -> &'static Self {
5025 static DEFAULT: super::Epoch = super::Epoch::const_default();
5026 &DEFAULT
5027 }
5028 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
5030 self.epoch.as_mut().map(|field| field as _)
5031 }
5032 pub fn epoch_mut(&mut self) -> &mut u64 {
5035 self.epoch.get_or_insert_default()
5036 }
5037 pub fn epoch_opt(&self) -> Option<u64> {
5039 self.epoch.as_ref().map(|field| *field)
5040 }
5041 pub fn set_epoch(&mut self, field: u64) {
5043 self.epoch = Some(field);
5044 }
5045 pub fn with_epoch(mut self, field: u64) -> Self {
5047 self.set_epoch(field);
5048 self
5049 }
5050 pub fn committee(&self) -> &super::ValidatorCommittee {
5052 self.committee
5053 .as_ref()
5054 .map(|field| field as _)
5055 .unwrap_or_else(|| super::ValidatorCommittee::default_instance() as _)
5056 }
5057 pub fn committee_opt_mut(&mut self) -> Option<&mut super::ValidatorCommittee> {
5059 self.committee.as_mut().map(|field| field as _)
5060 }
5061 pub fn committee_mut(&mut self) -> &mut super::ValidatorCommittee {
5064 self.committee.get_or_insert_default()
5065 }
5066 pub fn committee_opt(&self) -> Option<&super::ValidatorCommittee> {
5068 self.committee.as_ref().map(|field| field as _)
5069 }
5070 pub fn set_committee<T: Into<super::ValidatorCommittee>>(&mut self, field: T) {
5072 self.committee = Some(field.into().into());
5073 }
5074 pub fn with_committee<T: Into<super::ValidatorCommittee>>(
5076 mut self,
5077 field: T,
5078 ) -> Self {
5079 self.set_committee(field.into());
5080 self
5081 }
5082 pub fn system_state(&self) -> &super::SystemState {
5084 self.system_state
5085 .as_ref()
5086 .map(|field| field as _)
5087 .unwrap_or_else(|| super::SystemState::default_instance() as _)
5088 }
5089 pub fn system_state_opt_mut(&mut self) -> Option<&mut super::SystemState> {
5091 self.system_state.as_mut().map(|field| field as _)
5092 }
5093 pub fn system_state_mut(&mut self) -> &mut super::SystemState {
5096 self.system_state.get_or_insert_default()
5097 }
5098 pub fn system_state_opt(&self) -> Option<&super::SystemState> {
5100 self.system_state.as_ref().map(|field| field as _)
5101 }
5102 pub fn set_system_state<T: Into<super::SystemState>>(&mut self, field: T) {
5104 self.system_state = Some(field.into().into());
5105 }
5106 pub fn with_system_state<T: Into<super::SystemState>>(
5108 mut self,
5109 field: T,
5110 ) -> Self {
5111 self.set_system_state(field.into());
5112 self
5113 }
5114 pub fn first_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
5116 self.first_checkpoint.as_mut().map(|field| field as _)
5117 }
5118 pub fn first_checkpoint_mut(&mut self) -> &mut u64 {
5121 self.first_checkpoint.get_or_insert_default()
5122 }
5123 pub fn first_checkpoint_opt(&self) -> Option<u64> {
5125 self.first_checkpoint.as_ref().map(|field| *field)
5126 }
5127 pub fn set_first_checkpoint(&mut self, field: u64) {
5129 self.first_checkpoint = Some(field);
5130 }
5131 pub fn with_first_checkpoint(mut self, field: u64) -> Self {
5133 self.set_first_checkpoint(field);
5134 self
5135 }
5136 pub fn last_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
5138 self.last_checkpoint.as_mut().map(|field| field as _)
5139 }
5140 pub fn last_checkpoint_mut(&mut self) -> &mut u64 {
5143 self.last_checkpoint.get_or_insert_default()
5144 }
5145 pub fn last_checkpoint_opt(&self) -> Option<u64> {
5147 self.last_checkpoint.as_ref().map(|field| *field)
5148 }
5149 pub fn set_last_checkpoint(&mut self, field: u64) {
5151 self.last_checkpoint = Some(field);
5152 }
5153 pub fn with_last_checkpoint(mut self, field: u64) -> Self {
5155 self.set_last_checkpoint(field);
5156 self
5157 }
5158 pub fn start_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
5160 self.start.as_mut().map(|field| field as _)
5161 }
5162 pub fn start_mut(&mut self) -> &mut ::prost_types::Timestamp {
5165 self.start.get_or_insert_default()
5166 }
5167 pub fn start_opt(&self) -> Option<&::prost_types::Timestamp> {
5169 self.start.as_ref().map(|field| field as _)
5170 }
5171 pub fn set_start<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
5173 self.start = Some(field.into().into());
5174 }
5175 pub fn with_start<T: Into<::prost_types::Timestamp>>(
5177 mut self,
5178 field: T,
5179 ) -> Self {
5180 self.set_start(field.into());
5181 self
5182 }
5183 pub fn end_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
5185 self.end.as_mut().map(|field| field as _)
5186 }
5187 pub fn end_mut(&mut self) -> &mut ::prost_types::Timestamp {
5190 self.end.get_or_insert_default()
5191 }
5192 pub fn end_opt(&self) -> Option<&::prost_types::Timestamp> {
5194 self.end.as_ref().map(|field| field as _)
5195 }
5196 pub fn set_end<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
5198 self.end = Some(field.into().into());
5199 }
5200 pub fn with_end<T: Into<::prost_types::Timestamp>>(mut self, field: T) -> Self {
5202 self.set_end(field.into());
5203 self
5204 }
5205 pub fn reference_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
5207 self.reference_gas_price.as_mut().map(|field| field as _)
5208 }
5209 pub fn reference_gas_price_mut(&mut self) -> &mut u64 {
5212 self.reference_gas_price.get_or_insert_default()
5213 }
5214 pub fn reference_gas_price_opt(&self) -> Option<u64> {
5216 self.reference_gas_price.as_ref().map(|field| *field)
5217 }
5218 pub fn set_reference_gas_price(&mut self, field: u64) {
5220 self.reference_gas_price = Some(field);
5221 }
5222 pub fn with_reference_gas_price(mut self, field: u64) -> Self {
5224 self.set_reference_gas_price(field);
5225 self
5226 }
5227 pub fn protocol_config(&self) -> &super::ProtocolConfig {
5229 self.protocol_config
5230 .as_ref()
5231 .map(|field| field as _)
5232 .unwrap_or_else(|| super::ProtocolConfig::default_instance() as _)
5233 }
5234 pub fn protocol_config_opt_mut(&mut self) -> Option<&mut super::ProtocolConfig> {
5236 self.protocol_config.as_mut().map(|field| field as _)
5237 }
5238 pub fn protocol_config_mut(&mut self) -> &mut super::ProtocolConfig {
5241 self.protocol_config.get_or_insert_default()
5242 }
5243 pub fn protocol_config_opt(&self) -> Option<&super::ProtocolConfig> {
5245 self.protocol_config.as_ref().map(|field| field as _)
5246 }
5247 pub fn set_protocol_config<T: Into<super::ProtocolConfig>>(&mut self, field: T) {
5249 self.protocol_config = Some(field.into().into());
5250 }
5251 pub fn with_protocol_config<T: Into<super::ProtocolConfig>>(
5253 mut self,
5254 field: T,
5255 ) -> Self {
5256 self.set_protocol_config(field.into());
5257 self
5258 }
5259 }
5260 impl super::Event {
5261 pub const fn const_default() -> Self {
5262 Self {
5263 package_id: None,
5264 module: None,
5265 sender: None,
5266 event_type: None,
5267 contents: None,
5268 json: None,
5269 checkpoint: None,
5270 transaction_digest: None,
5271 transaction_index: None,
5272 event_index: None,
5273 }
5274 }
5275 #[doc(hidden)]
5276 pub fn default_instance() -> &'static Self {
5277 static DEFAULT: super::Event = super::Event::const_default();
5278 &DEFAULT
5279 }
5280 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
5282 self.package_id.as_mut().map(|field| field as _)
5283 }
5284 pub fn package_id_mut(&mut self) -> &mut String {
5287 self.package_id.get_or_insert_default()
5288 }
5289 pub fn package_id_opt(&self) -> Option<&str> {
5291 self.package_id.as_ref().map(|field| field as _)
5292 }
5293 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
5295 self.package_id = Some(field.into().into());
5296 }
5297 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
5299 self.set_package_id(field.into());
5300 self
5301 }
5302 pub fn module_opt_mut(&mut self) -> Option<&mut String> {
5304 self.module.as_mut().map(|field| field as _)
5305 }
5306 pub fn module_mut(&mut self) -> &mut String {
5309 self.module.get_or_insert_default()
5310 }
5311 pub fn module_opt(&self) -> Option<&str> {
5313 self.module.as_ref().map(|field| field as _)
5314 }
5315 pub fn set_module<T: Into<String>>(&mut self, field: T) {
5317 self.module = Some(field.into().into());
5318 }
5319 pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
5321 self.set_module(field.into());
5322 self
5323 }
5324 pub fn sender_opt_mut(&mut self) -> Option<&mut String> {
5326 self.sender.as_mut().map(|field| field as _)
5327 }
5328 pub fn sender_mut(&mut self) -> &mut String {
5331 self.sender.get_or_insert_default()
5332 }
5333 pub fn sender_opt(&self) -> Option<&str> {
5335 self.sender.as_ref().map(|field| field as _)
5336 }
5337 pub fn set_sender<T: Into<String>>(&mut self, field: T) {
5339 self.sender = Some(field.into().into());
5340 }
5341 pub fn with_sender<T: Into<String>>(mut self, field: T) -> Self {
5343 self.set_sender(field.into());
5344 self
5345 }
5346 pub fn event_type_opt_mut(&mut self) -> Option<&mut String> {
5348 self.event_type.as_mut().map(|field| field as _)
5349 }
5350 pub fn event_type_mut(&mut self) -> &mut String {
5353 self.event_type.get_or_insert_default()
5354 }
5355 pub fn event_type_opt(&self) -> Option<&str> {
5357 self.event_type.as_ref().map(|field| field as _)
5358 }
5359 pub fn set_event_type<T: Into<String>>(&mut self, field: T) {
5361 self.event_type = Some(field.into().into());
5362 }
5363 pub fn with_event_type<T: Into<String>>(mut self, field: T) -> Self {
5365 self.set_event_type(field.into());
5366 self
5367 }
5368 pub fn contents(&self) -> &super::Bcs {
5370 self.contents
5371 .as_ref()
5372 .map(|field| field as _)
5373 .unwrap_or_else(|| super::Bcs::default_instance() as _)
5374 }
5375 pub fn contents_opt_mut(&mut self) -> Option<&mut super::Bcs> {
5377 self.contents.as_mut().map(|field| field as _)
5378 }
5379 pub fn contents_mut(&mut self) -> &mut super::Bcs {
5382 self.contents.get_or_insert_default()
5383 }
5384 pub fn contents_opt(&self) -> Option<&super::Bcs> {
5386 self.contents.as_ref().map(|field| field as _)
5387 }
5388 pub fn set_contents<T: Into<super::Bcs>>(&mut self, field: T) {
5390 self.contents = Some(field.into().into());
5391 }
5392 pub fn with_contents<T: Into<super::Bcs>>(mut self, field: T) -> Self {
5394 self.set_contents(field.into());
5395 self
5396 }
5397 pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
5399 self.json.as_mut().map(|field| field as _)
5400 }
5401 pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
5404 self.json.get_or_insert_default()
5405 }
5406 pub fn json_opt(&self) -> Option<&::prost_types::Value> {
5408 self.json.as_ref().map(|field| field as _)
5409 }
5410 pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
5412 self.json = Some(field.into().into());
5413 }
5414 pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
5416 self.set_json(field.into());
5417 self
5418 }
5419 pub fn checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
5421 self.checkpoint.as_mut().map(|field| field as _)
5422 }
5423 pub fn checkpoint_mut(&mut self) -> &mut u64 {
5426 self.checkpoint.get_or_insert_default()
5427 }
5428 pub fn checkpoint_opt(&self) -> Option<u64> {
5430 self.checkpoint.as_ref().map(|field| *field)
5431 }
5432 pub fn set_checkpoint(&mut self, field: u64) {
5434 self.checkpoint = Some(field);
5435 }
5436 pub fn with_checkpoint(mut self, field: u64) -> Self {
5438 self.set_checkpoint(field);
5439 self
5440 }
5441 pub fn transaction_digest_opt_mut(&mut self) -> Option<&mut String> {
5443 self.transaction_digest.as_mut().map(|field| field as _)
5444 }
5445 pub fn transaction_digest_mut(&mut self) -> &mut String {
5448 self.transaction_digest.get_or_insert_default()
5449 }
5450 pub fn transaction_digest_opt(&self) -> Option<&str> {
5452 self.transaction_digest.as_ref().map(|field| field as _)
5453 }
5454 pub fn set_transaction_digest<T: Into<String>>(&mut self, field: T) {
5456 self.transaction_digest = Some(field.into().into());
5457 }
5458 pub fn with_transaction_digest<T: Into<String>>(mut self, field: T) -> Self {
5460 self.set_transaction_digest(field.into());
5461 self
5462 }
5463 pub fn transaction_index_opt_mut(&mut self) -> Option<&mut u64> {
5465 self.transaction_index.as_mut().map(|field| field as _)
5466 }
5467 pub fn transaction_index_mut(&mut self) -> &mut u64 {
5470 self.transaction_index.get_or_insert_default()
5471 }
5472 pub fn transaction_index_opt(&self) -> Option<u64> {
5474 self.transaction_index.as_ref().map(|field| *field)
5475 }
5476 pub fn set_transaction_index(&mut self, field: u64) {
5478 self.transaction_index = Some(field);
5479 }
5480 pub fn with_transaction_index(mut self, field: u64) -> Self {
5482 self.set_transaction_index(field);
5483 self
5484 }
5485 pub fn event_index_opt_mut(&mut self) -> Option<&mut u32> {
5487 self.event_index.as_mut().map(|field| field as _)
5488 }
5489 pub fn event_index_mut(&mut self) -> &mut u32 {
5492 self.event_index.get_or_insert_default()
5493 }
5494 pub fn event_index_opt(&self) -> Option<u32> {
5496 self.event_index.as_ref().map(|field| *field)
5497 }
5498 pub fn set_event_index(&mut self, field: u32) {
5500 self.event_index = Some(field);
5501 }
5502 pub fn with_event_index(mut self, field: u32) -> Self {
5504 self.set_event_index(field);
5505 self
5506 }
5507 }
5508 impl super::EventDigestEntry {
5509 pub const fn const_default() -> Self {
5510 Self {
5511 event_index: None,
5512 digest: None,
5513 }
5514 }
5515 #[doc(hidden)]
5516 pub fn default_instance() -> &'static Self {
5517 static DEFAULT: super::EventDigestEntry = super::EventDigestEntry::const_default();
5518 &DEFAULT
5519 }
5520 pub fn event_index_opt_mut(&mut self) -> Option<&mut u64> {
5522 self.event_index.as_mut().map(|field| field as _)
5523 }
5524 pub fn event_index_mut(&mut self) -> &mut u64 {
5527 self.event_index.get_or_insert_default()
5528 }
5529 pub fn event_index_opt(&self) -> Option<u64> {
5531 self.event_index.as_ref().map(|field| *field)
5532 }
5533 pub fn set_event_index(&mut self, field: u64) {
5535 self.event_index = Some(field);
5536 }
5537 pub fn with_event_index(mut self, field: u64) -> Self {
5539 self.set_event_index(field);
5540 self
5541 }
5542 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
5544 self.digest.as_mut().map(|field| field as _)
5545 }
5546 pub fn digest_mut(&mut self) -> &mut String {
5549 self.digest.get_or_insert_default()
5550 }
5551 pub fn digest_opt(&self) -> Option<&str> {
5553 self.digest.as_ref().map(|field| field as _)
5554 }
5555 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
5557 self.digest = Some(field.into().into());
5558 }
5559 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
5561 self.set_digest(field.into());
5562 self
5563 }
5564 }
5565 impl super::EventFilter {
5566 pub const fn const_default() -> Self {
5567 Self { terms: Vec::new() }
5568 }
5569 #[doc(hidden)]
5570 pub fn default_instance() -> &'static Self {
5571 static DEFAULT: super::EventFilter = super::EventFilter::const_default();
5572 &DEFAULT
5573 }
5574 pub fn terms(&self) -> &[super::EventTerm] {
5576 &self.terms
5577 }
5578 pub fn terms_mut(&mut self) -> &mut Vec<super::EventTerm> {
5581 &mut self.terms
5582 }
5583 pub fn set_terms(&mut self, field: Vec<super::EventTerm>) {
5585 self.terms = field;
5586 }
5587 pub fn with_terms(mut self, field: Vec<super::EventTerm>) -> Self {
5589 self.set_terms(field);
5590 self
5591 }
5592 }
5593 impl super::EventLiteral {
5594 pub const fn const_default() -> Self {
5595 Self {
5596 negated: false,
5597 predicate: None,
5598 }
5599 }
5600 #[doc(hidden)]
5601 pub fn default_instance() -> &'static Self {
5602 static DEFAULT: super::EventLiteral = super::EventLiteral::const_default();
5603 &DEFAULT
5604 }
5605 pub fn negated_mut(&mut self) -> &mut bool {
5608 &mut self.negated
5609 }
5610 pub fn set_negated(&mut self, field: bool) {
5612 self.negated = field;
5613 }
5614 pub fn with_negated(mut self, field: bool) -> Self {
5616 self.set_negated(field);
5617 self
5618 }
5619 pub fn sender(&self) -> &super::SenderFilter {
5621 if let Some(super::event_literal::Predicate::Sender(field)) = &self.predicate
5622 {
5623 field as _
5624 } else {
5625 super::SenderFilter::default_instance() as _
5626 }
5627 }
5628 pub fn sender_opt(&self) -> Option<&super::SenderFilter> {
5630 if let Some(super::event_literal::Predicate::Sender(field)) = &self.predicate
5631 {
5632 Some(field as _)
5633 } else {
5634 None
5635 }
5636 }
5637 pub fn sender_opt_mut(&mut self) -> Option<&mut super::SenderFilter> {
5639 if let Some(super::event_literal::Predicate::Sender(field)) = &mut self
5640 .predicate
5641 {
5642 Some(field as _)
5643 } else {
5644 None
5645 }
5646 }
5647 pub fn sender_mut(&mut self) -> &mut super::SenderFilter {
5651 if self.sender_opt_mut().is_none() {
5652 self.predicate = Some(
5653 super::event_literal::Predicate::Sender(
5654 super::SenderFilter::default(),
5655 ),
5656 );
5657 }
5658 self.sender_opt_mut().unwrap()
5659 }
5660 pub fn set_sender<T: Into<super::SenderFilter>>(&mut self, field: T) {
5663 self.predicate = Some(
5664 super::event_literal::Predicate::Sender(field.into().into()),
5665 );
5666 }
5667 pub fn with_sender<T: Into<super::SenderFilter>>(mut self, field: T) -> Self {
5670 self.set_sender(field.into());
5671 self
5672 }
5673 pub fn emit_module(&self) -> &super::EmitModuleFilter {
5675 if let Some(super::event_literal::Predicate::EmitModule(field)) = &self
5676 .predicate
5677 {
5678 field as _
5679 } else {
5680 super::EmitModuleFilter::default_instance() as _
5681 }
5682 }
5683 pub fn emit_module_opt(&self) -> Option<&super::EmitModuleFilter> {
5685 if let Some(super::event_literal::Predicate::EmitModule(field)) = &self
5686 .predicate
5687 {
5688 Some(field as _)
5689 } else {
5690 None
5691 }
5692 }
5693 pub fn emit_module_opt_mut(&mut self) -> Option<&mut super::EmitModuleFilter> {
5695 if let Some(super::event_literal::Predicate::EmitModule(field)) = &mut self
5696 .predicate
5697 {
5698 Some(field as _)
5699 } else {
5700 None
5701 }
5702 }
5703 pub fn emit_module_mut(&mut self) -> &mut super::EmitModuleFilter {
5707 if self.emit_module_opt_mut().is_none() {
5708 self.predicate = Some(
5709 super::event_literal::Predicate::EmitModule(
5710 super::EmitModuleFilter::default(),
5711 ),
5712 );
5713 }
5714 self.emit_module_opt_mut().unwrap()
5715 }
5716 pub fn set_emit_module<T: Into<super::EmitModuleFilter>>(&mut self, field: T) {
5719 self.predicate = Some(
5720 super::event_literal::Predicate::EmitModule(field.into().into()),
5721 );
5722 }
5723 pub fn with_emit_module<T: Into<super::EmitModuleFilter>>(
5726 mut self,
5727 field: T,
5728 ) -> Self {
5729 self.set_emit_module(field.into());
5730 self
5731 }
5732 pub fn event_type(&self) -> &super::EventTypeFilter {
5734 if let Some(super::event_literal::Predicate::EventType(field)) = &self
5735 .predicate
5736 {
5737 field as _
5738 } else {
5739 super::EventTypeFilter::default_instance() as _
5740 }
5741 }
5742 pub fn event_type_opt(&self) -> Option<&super::EventTypeFilter> {
5744 if let Some(super::event_literal::Predicate::EventType(field)) = &self
5745 .predicate
5746 {
5747 Some(field as _)
5748 } else {
5749 None
5750 }
5751 }
5752 pub fn event_type_opt_mut(&mut self) -> Option<&mut super::EventTypeFilter> {
5754 if let Some(super::event_literal::Predicate::EventType(field)) = &mut self
5755 .predicate
5756 {
5757 Some(field as _)
5758 } else {
5759 None
5760 }
5761 }
5762 pub fn event_type_mut(&mut self) -> &mut super::EventTypeFilter {
5766 if self.event_type_opt_mut().is_none() {
5767 self.predicate = Some(
5768 super::event_literal::Predicate::EventType(
5769 super::EventTypeFilter::default(),
5770 ),
5771 );
5772 }
5773 self.event_type_opt_mut().unwrap()
5774 }
5775 pub fn set_event_type<T: Into<super::EventTypeFilter>>(&mut self, field: T) {
5778 self.predicate = Some(
5779 super::event_literal::Predicate::EventType(field.into().into()),
5780 );
5781 }
5782 pub fn with_event_type<T: Into<super::EventTypeFilter>>(
5785 mut self,
5786 field: T,
5787 ) -> Self {
5788 self.set_event_type(field.into());
5789 self
5790 }
5791 pub fn event_stream_head(&self) -> &super::EventStreamHeadFilter {
5793 if let Some(super::event_literal::Predicate::EventStreamHead(field)) = &self
5794 .predicate
5795 {
5796 field as _
5797 } else {
5798 super::EventStreamHeadFilter::default_instance() as _
5799 }
5800 }
5801 pub fn event_stream_head_opt(&self) -> Option<&super::EventStreamHeadFilter> {
5803 if let Some(super::event_literal::Predicate::EventStreamHead(field)) = &self
5804 .predicate
5805 {
5806 Some(field as _)
5807 } else {
5808 None
5809 }
5810 }
5811 pub fn event_stream_head_opt_mut(
5813 &mut self,
5814 ) -> Option<&mut super::EventStreamHeadFilter> {
5815 if let Some(super::event_literal::Predicate::EventStreamHead(field)) = &mut self
5816 .predicate
5817 {
5818 Some(field as _)
5819 } else {
5820 None
5821 }
5822 }
5823 pub fn event_stream_head_mut(&mut self) -> &mut super::EventStreamHeadFilter {
5827 if self.event_stream_head_opt_mut().is_none() {
5828 self.predicate = Some(
5829 super::event_literal::Predicate::EventStreamHead(
5830 super::EventStreamHeadFilter::default(),
5831 ),
5832 );
5833 }
5834 self.event_stream_head_opt_mut().unwrap()
5835 }
5836 pub fn set_event_stream_head<T: Into<super::EventStreamHeadFilter>>(
5839 &mut self,
5840 field: T,
5841 ) {
5842 self.predicate = Some(
5843 super::event_literal::Predicate::EventStreamHead(field.into().into()),
5844 );
5845 }
5846 pub fn with_event_stream_head<T: Into<super::EventStreamHeadFilter>>(
5849 mut self,
5850 field: T,
5851 ) -> Self {
5852 self.set_event_stream_head(field.into());
5853 self
5854 }
5855 }
5856 impl super::EventStreamHeadFilter {
5857 pub const fn const_default() -> Self {
5858 Self { stream_id: None }
5859 }
5860 #[doc(hidden)]
5861 pub fn default_instance() -> &'static Self {
5862 static DEFAULT: super::EventStreamHeadFilter = super::EventStreamHeadFilter::const_default();
5863 &DEFAULT
5864 }
5865 pub fn stream_id_opt_mut(&mut self) -> Option<&mut String> {
5867 self.stream_id.as_mut().map(|field| field as _)
5868 }
5869 pub fn stream_id_mut(&mut self) -> &mut String {
5872 self.stream_id.get_or_insert_default()
5873 }
5874 pub fn stream_id_opt(&self) -> Option<&str> {
5876 self.stream_id.as_ref().map(|field| field as _)
5877 }
5878 pub fn set_stream_id<T: Into<String>>(&mut self, field: T) {
5880 self.stream_id = Some(field.into().into());
5881 }
5882 pub fn with_stream_id<T: Into<String>>(mut self, field: T) -> Self {
5884 self.set_stream_id(field.into());
5885 self
5886 }
5887 }
5888 impl super::EventTerm {
5889 pub const fn const_default() -> Self {
5890 Self { literals: Vec::new() }
5891 }
5892 #[doc(hidden)]
5893 pub fn default_instance() -> &'static Self {
5894 static DEFAULT: super::EventTerm = super::EventTerm::const_default();
5895 &DEFAULT
5896 }
5897 pub fn literals(&self) -> &[super::EventLiteral] {
5899 &self.literals
5900 }
5901 pub fn literals_mut(&mut self) -> &mut Vec<super::EventLiteral> {
5904 &mut self.literals
5905 }
5906 pub fn set_literals(&mut self, field: Vec<super::EventLiteral>) {
5908 self.literals = field;
5909 }
5910 pub fn with_literals(mut self, field: Vec<super::EventLiteral>) -> Self {
5912 self.set_literals(field);
5913 self
5914 }
5915 }
5916 impl super::EventTypeFilter {
5917 pub const fn const_default() -> Self {
5918 Self { event_type: None }
5919 }
5920 #[doc(hidden)]
5921 pub fn default_instance() -> &'static Self {
5922 static DEFAULT: super::EventTypeFilter = super::EventTypeFilter::const_default();
5923 &DEFAULT
5924 }
5925 pub fn event_type_opt_mut(&mut self) -> Option<&mut String> {
5927 self.event_type.as_mut().map(|field| field as _)
5928 }
5929 pub fn event_type_mut(&mut self) -> &mut String {
5932 self.event_type.get_or_insert_default()
5933 }
5934 pub fn event_type_opt(&self) -> Option<&str> {
5936 self.event_type.as_ref().map(|field| field as _)
5937 }
5938 pub fn set_event_type<T: Into<String>>(&mut self, field: T) {
5940 self.event_type = Some(field.into().into());
5941 }
5942 pub fn with_event_type<T: Into<String>>(mut self, field: T) -> Self {
5944 self.set_event_type(field.into());
5945 self
5946 }
5947 }
5948 impl super::ExecuteTransactionRequest {
5949 pub const fn const_default() -> Self {
5950 Self {
5951 transaction: None,
5952 signatures: Vec::new(),
5953 read_mask: None,
5954 }
5955 }
5956 #[doc(hidden)]
5957 pub fn default_instance() -> &'static Self {
5958 static DEFAULT: super::ExecuteTransactionRequest = super::ExecuteTransactionRequest::const_default();
5959 &DEFAULT
5960 }
5961 pub fn transaction(&self) -> &super::Transaction {
5963 self.transaction
5964 .as_ref()
5965 .map(|field| field as _)
5966 .unwrap_or_else(|| super::Transaction::default_instance() as _)
5967 }
5968 pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
5970 self.transaction.as_mut().map(|field| field as _)
5971 }
5972 pub fn transaction_mut(&mut self) -> &mut super::Transaction {
5975 self.transaction.get_or_insert_default()
5976 }
5977 pub fn transaction_opt(&self) -> Option<&super::Transaction> {
5979 self.transaction.as_ref().map(|field| field as _)
5980 }
5981 pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
5983 self.transaction = Some(field.into().into());
5984 }
5985 pub fn with_transaction<T: Into<super::Transaction>>(
5987 mut self,
5988 field: T,
5989 ) -> Self {
5990 self.set_transaction(field.into());
5991 self
5992 }
5993 pub fn signatures(&self) -> &[super::UserSignature] {
5995 &self.signatures
5996 }
5997 pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
6000 &mut self.signatures
6001 }
6002 pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
6004 self.signatures = field;
6005 }
6006 pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
6008 self.set_signatures(field);
6009 self
6010 }
6011 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
6013 self.read_mask.as_mut().map(|field| field as _)
6014 }
6015 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
6018 self.read_mask.get_or_insert_default()
6019 }
6020 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
6022 self.read_mask.as_ref().map(|field| field as _)
6023 }
6024 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
6026 self.read_mask = Some(field.into().into());
6027 }
6028 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
6030 mut self,
6031 field: T,
6032 ) -> Self {
6033 self.set_read_mask(field.into());
6034 self
6035 }
6036 }
6037 impl super::ExecuteTransactionResponse {
6038 pub const fn const_default() -> Self {
6039 Self { transaction: None }
6040 }
6041 #[doc(hidden)]
6042 pub fn default_instance() -> &'static Self {
6043 static DEFAULT: super::ExecuteTransactionResponse = super::ExecuteTransactionResponse::const_default();
6044 &DEFAULT
6045 }
6046 pub fn transaction(&self) -> &super::ExecutedTransaction {
6048 self.transaction
6049 .as_ref()
6050 .map(|field| field as _)
6051 .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
6052 }
6053 pub fn transaction_opt_mut(
6055 &mut self,
6056 ) -> Option<&mut super::ExecutedTransaction> {
6057 self.transaction.as_mut().map(|field| field as _)
6058 }
6059 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
6062 self.transaction.get_or_insert_default()
6063 }
6064 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
6066 self.transaction.as_ref().map(|field| field as _)
6067 }
6068 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
6070 &mut self,
6071 field: T,
6072 ) {
6073 self.transaction = Some(field.into().into());
6074 }
6075 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
6077 mut self,
6078 field: T,
6079 ) -> Self {
6080 self.set_transaction(field.into());
6081 self
6082 }
6083 }
6084 impl super::ExecutedTransaction {
6085 pub const fn const_default() -> Self {
6086 Self {
6087 digest: None,
6088 transaction: None,
6089 signatures: Vec::new(),
6090 effects: None,
6091 events: None,
6092 checkpoint: None,
6093 timestamp: None,
6094 balance_changes: Vec::new(),
6095 objects: None,
6096 transaction_index: None,
6097 }
6098 }
6099 #[doc(hidden)]
6100 pub fn default_instance() -> &'static Self {
6101 static DEFAULT: super::ExecutedTransaction = super::ExecutedTransaction::const_default();
6102 &DEFAULT
6103 }
6104 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
6106 self.digest.as_mut().map(|field| field as _)
6107 }
6108 pub fn digest_mut(&mut self) -> &mut String {
6111 self.digest.get_or_insert_default()
6112 }
6113 pub fn digest_opt(&self) -> Option<&str> {
6115 self.digest.as_ref().map(|field| field as _)
6116 }
6117 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
6119 self.digest = Some(field.into().into());
6120 }
6121 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
6123 self.set_digest(field.into());
6124 self
6125 }
6126 pub fn transaction(&self) -> &super::Transaction {
6128 self.transaction
6129 .as_ref()
6130 .map(|field| field as _)
6131 .unwrap_or_else(|| super::Transaction::default_instance() as _)
6132 }
6133 pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
6135 self.transaction.as_mut().map(|field| field as _)
6136 }
6137 pub fn transaction_mut(&mut self) -> &mut super::Transaction {
6140 self.transaction.get_or_insert_default()
6141 }
6142 pub fn transaction_opt(&self) -> Option<&super::Transaction> {
6144 self.transaction.as_ref().map(|field| field as _)
6145 }
6146 pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
6148 self.transaction = Some(field.into().into());
6149 }
6150 pub fn with_transaction<T: Into<super::Transaction>>(
6152 mut self,
6153 field: T,
6154 ) -> Self {
6155 self.set_transaction(field.into());
6156 self
6157 }
6158 pub fn signatures(&self) -> &[super::UserSignature] {
6160 &self.signatures
6161 }
6162 pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
6165 &mut self.signatures
6166 }
6167 pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
6169 self.signatures = field;
6170 }
6171 pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
6173 self.set_signatures(field);
6174 self
6175 }
6176 pub fn effects(&self) -> &super::TransactionEffects {
6178 self.effects
6179 .as_ref()
6180 .map(|field| field as _)
6181 .unwrap_or_else(|| super::TransactionEffects::default_instance() as _)
6182 }
6183 pub fn effects_opt_mut(&mut self) -> Option<&mut super::TransactionEffects> {
6185 self.effects.as_mut().map(|field| field as _)
6186 }
6187 pub fn effects_mut(&mut self) -> &mut super::TransactionEffects {
6190 self.effects.get_or_insert_default()
6191 }
6192 pub fn effects_opt(&self) -> Option<&super::TransactionEffects> {
6194 self.effects.as_ref().map(|field| field as _)
6195 }
6196 pub fn set_effects<T: Into<super::TransactionEffects>>(&mut self, field: T) {
6198 self.effects = Some(field.into().into());
6199 }
6200 pub fn with_effects<T: Into<super::TransactionEffects>>(
6202 mut self,
6203 field: T,
6204 ) -> Self {
6205 self.set_effects(field.into());
6206 self
6207 }
6208 pub fn events(&self) -> &super::TransactionEvents {
6210 self.events
6211 .as_ref()
6212 .map(|field| field as _)
6213 .unwrap_or_else(|| super::TransactionEvents::default_instance() as _)
6214 }
6215 pub fn events_opt_mut(&mut self) -> Option<&mut super::TransactionEvents> {
6217 self.events.as_mut().map(|field| field as _)
6218 }
6219 pub fn events_mut(&mut self) -> &mut super::TransactionEvents {
6222 self.events.get_or_insert_default()
6223 }
6224 pub fn events_opt(&self) -> Option<&super::TransactionEvents> {
6226 self.events.as_ref().map(|field| field as _)
6227 }
6228 pub fn set_events<T: Into<super::TransactionEvents>>(&mut self, field: T) {
6230 self.events = Some(field.into().into());
6231 }
6232 pub fn with_events<T: Into<super::TransactionEvents>>(
6234 mut self,
6235 field: T,
6236 ) -> Self {
6237 self.set_events(field.into());
6238 self
6239 }
6240 pub fn checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
6242 self.checkpoint.as_mut().map(|field| field as _)
6243 }
6244 pub fn checkpoint_mut(&mut self) -> &mut u64 {
6247 self.checkpoint.get_or_insert_default()
6248 }
6249 pub fn checkpoint_opt(&self) -> Option<u64> {
6251 self.checkpoint.as_ref().map(|field| *field)
6252 }
6253 pub fn set_checkpoint(&mut self, field: u64) {
6255 self.checkpoint = Some(field);
6256 }
6257 pub fn with_checkpoint(mut self, field: u64) -> Self {
6259 self.set_checkpoint(field);
6260 self
6261 }
6262 pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
6264 self.timestamp.as_mut().map(|field| field as _)
6265 }
6266 pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
6269 self.timestamp.get_or_insert_default()
6270 }
6271 pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
6273 self.timestamp.as_ref().map(|field| field as _)
6274 }
6275 pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
6277 self.timestamp = Some(field.into().into());
6278 }
6279 pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
6281 mut self,
6282 field: T,
6283 ) -> Self {
6284 self.set_timestamp(field.into());
6285 self
6286 }
6287 pub fn balance_changes(&self) -> &[super::BalanceChange] {
6289 &self.balance_changes
6290 }
6291 pub fn balance_changes_mut(&mut self) -> &mut Vec<super::BalanceChange> {
6294 &mut self.balance_changes
6295 }
6296 pub fn set_balance_changes(&mut self, field: Vec<super::BalanceChange>) {
6298 self.balance_changes = field;
6299 }
6300 pub fn with_balance_changes(mut self, field: Vec<super::BalanceChange>) -> Self {
6302 self.set_balance_changes(field);
6303 self
6304 }
6305 pub fn objects(&self) -> &super::ObjectSet {
6307 self.objects
6308 .as_ref()
6309 .map(|field| field as _)
6310 .unwrap_or_else(|| super::ObjectSet::default_instance() as _)
6311 }
6312 pub fn objects_opt_mut(&mut self) -> Option<&mut super::ObjectSet> {
6314 self.objects.as_mut().map(|field| field as _)
6315 }
6316 pub fn objects_mut(&mut self) -> &mut super::ObjectSet {
6319 self.objects.get_or_insert_default()
6320 }
6321 pub fn objects_opt(&self) -> Option<&super::ObjectSet> {
6323 self.objects.as_ref().map(|field| field as _)
6324 }
6325 pub fn set_objects<T: Into<super::ObjectSet>>(&mut self, field: T) {
6327 self.objects = Some(field.into().into());
6328 }
6329 pub fn with_objects<T: Into<super::ObjectSet>>(mut self, field: T) -> Self {
6331 self.set_objects(field.into());
6332 self
6333 }
6334 pub fn transaction_index_opt_mut(&mut self) -> Option<&mut u64> {
6336 self.transaction_index.as_mut().map(|field| field as _)
6337 }
6338 pub fn transaction_index_mut(&mut self) -> &mut u64 {
6341 self.transaction_index.get_or_insert_default()
6342 }
6343 pub fn transaction_index_opt(&self) -> Option<u64> {
6345 self.transaction_index.as_ref().map(|field| *field)
6346 }
6347 pub fn set_transaction_index(&mut self, field: u64) {
6349 self.transaction_index = Some(field);
6350 }
6351 pub fn with_transaction_index(mut self, field: u64) -> Self {
6353 self.set_transaction_index(field);
6354 self
6355 }
6356 }
6357 impl super::ExecutionError {
6358 pub const fn const_default() -> Self {
6359 Self {
6360 description: None,
6361 command: None,
6362 kind: None,
6363 error_details: None,
6364 }
6365 }
6366 #[doc(hidden)]
6367 pub fn default_instance() -> &'static Self {
6368 static DEFAULT: super::ExecutionError = super::ExecutionError::const_default();
6369 &DEFAULT
6370 }
6371 pub fn description_opt_mut(&mut self) -> Option<&mut String> {
6373 self.description.as_mut().map(|field| field as _)
6374 }
6375 pub fn description_mut(&mut self) -> &mut String {
6378 self.description.get_or_insert_default()
6379 }
6380 pub fn description_opt(&self) -> Option<&str> {
6382 self.description.as_ref().map(|field| field as _)
6383 }
6384 pub fn set_description<T: Into<String>>(&mut self, field: T) {
6386 self.description = Some(field.into().into());
6387 }
6388 pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
6390 self.set_description(field.into());
6391 self
6392 }
6393 pub fn command_opt_mut(&mut self) -> Option<&mut u64> {
6395 self.command.as_mut().map(|field| field as _)
6396 }
6397 pub fn command_mut(&mut self) -> &mut u64 {
6400 self.command.get_or_insert_default()
6401 }
6402 pub fn command_opt(&self) -> Option<u64> {
6404 self.command.as_ref().map(|field| *field)
6405 }
6406 pub fn set_command(&mut self, field: u64) {
6408 self.command = Some(field);
6409 }
6410 pub fn with_command(mut self, field: u64) -> Self {
6412 self.set_command(field);
6413 self
6414 }
6415 pub fn with_kind<T: Into<super::execution_error::ExecutionErrorKind>>(
6417 mut self,
6418 field: T,
6419 ) -> Self {
6420 self.set_kind(field.into());
6421 self
6422 }
6423 pub fn abort(&self) -> &super::MoveAbort {
6425 if let Some(super::execution_error::ErrorDetails::Abort(field)) = &self
6426 .error_details
6427 {
6428 field as _
6429 } else {
6430 super::MoveAbort::default_instance() as _
6431 }
6432 }
6433 pub fn abort_opt(&self) -> Option<&super::MoveAbort> {
6435 if let Some(super::execution_error::ErrorDetails::Abort(field)) = &self
6436 .error_details
6437 {
6438 Some(field as _)
6439 } else {
6440 None
6441 }
6442 }
6443 pub fn abort_opt_mut(&mut self) -> Option<&mut super::MoveAbort> {
6445 if let Some(super::execution_error::ErrorDetails::Abort(field)) = &mut self
6446 .error_details
6447 {
6448 Some(field as _)
6449 } else {
6450 None
6451 }
6452 }
6453 pub fn abort_mut(&mut self) -> &mut super::MoveAbort {
6457 if self.abort_opt_mut().is_none() {
6458 self.error_details = Some(
6459 super::execution_error::ErrorDetails::Abort(
6460 super::MoveAbort::default(),
6461 ),
6462 );
6463 }
6464 self.abort_opt_mut().unwrap()
6465 }
6466 pub fn set_abort<T: Into<super::MoveAbort>>(&mut self, field: T) {
6469 self.error_details = Some(
6470 super::execution_error::ErrorDetails::Abort(field.into().into()),
6471 );
6472 }
6473 pub fn with_abort<T: Into<super::MoveAbort>>(mut self, field: T) -> Self {
6476 self.set_abort(field.into());
6477 self
6478 }
6479 pub fn size_error(&self) -> &super::SizeError {
6481 if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &self
6482 .error_details
6483 {
6484 field as _
6485 } else {
6486 super::SizeError::default_instance() as _
6487 }
6488 }
6489 pub fn size_error_opt(&self) -> Option<&super::SizeError> {
6491 if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &self
6492 .error_details
6493 {
6494 Some(field as _)
6495 } else {
6496 None
6497 }
6498 }
6499 pub fn size_error_opt_mut(&mut self) -> Option<&mut super::SizeError> {
6501 if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &mut self
6502 .error_details
6503 {
6504 Some(field as _)
6505 } else {
6506 None
6507 }
6508 }
6509 pub fn size_error_mut(&mut self) -> &mut super::SizeError {
6513 if self.size_error_opt_mut().is_none() {
6514 self.error_details = Some(
6515 super::execution_error::ErrorDetails::SizeError(
6516 super::SizeError::default(),
6517 ),
6518 );
6519 }
6520 self.size_error_opt_mut().unwrap()
6521 }
6522 pub fn set_size_error<T: Into<super::SizeError>>(&mut self, field: T) {
6525 self.error_details = Some(
6526 super::execution_error::ErrorDetails::SizeError(field.into().into()),
6527 );
6528 }
6529 pub fn with_size_error<T: Into<super::SizeError>>(mut self, field: T) -> Self {
6532 self.set_size_error(field.into());
6533 self
6534 }
6535 pub fn command_argument_error(&self) -> &super::CommandArgumentError {
6537 if let Some(
6538 super::execution_error::ErrorDetails::CommandArgumentError(field),
6539 ) = &self.error_details
6540 {
6541 field as _
6542 } else {
6543 super::CommandArgumentError::default_instance() as _
6544 }
6545 }
6546 pub fn command_argument_error_opt(
6548 &self,
6549 ) -> Option<&super::CommandArgumentError> {
6550 if let Some(
6551 super::execution_error::ErrorDetails::CommandArgumentError(field),
6552 ) = &self.error_details
6553 {
6554 Some(field as _)
6555 } else {
6556 None
6557 }
6558 }
6559 pub fn command_argument_error_opt_mut(
6561 &mut self,
6562 ) -> Option<&mut super::CommandArgumentError> {
6563 if let Some(
6564 super::execution_error::ErrorDetails::CommandArgumentError(field),
6565 ) = &mut self.error_details
6566 {
6567 Some(field as _)
6568 } else {
6569 None
6570 }
6571 }
6572 pub fn command_argument_error_mut(
6576 &mut self,
6577 ) -> &mut super::CommandArgumentError {
6578 if self.command_argument_error_opt_mut().is_none() {
6579 self.error_details = Some(
6580 super::execution_error::ErrorDetails::CommandArgumentError(
6581 super::CommandArgumentError::default(),
6582 ),
6583 );
6584 }
6585 self.command_argument_error_opt_mut().unwrap()
6586 }
6587 pub fn set_command_argument_error<T: Into<super::CommandArgumentError>>(
6590 &mut self,
6591 field: T,
6592 ) {
6593 self.error_details = Some(
6594 super::execution_error::ErrorDetails::CommandArgumentError(
6595 field.into().into(),
6596 ),
6597 );
6598 }
6599 pub fn with_command_argument_error<T: Into<super::CommandArgumentError>>(
6602 mut self,
6603 field: T,
6604 ) -> Self {
6605 self.set_command_argument_error(field.into());
6606 self
6607 }
6608 pub fn type_argument_error(&self) -> &super::TypeArgumentError {
6610 if let Some(
6611 super::execution_error::ErrorDetails::TypeArgumentError(field),
6612 ) = &self.error_details
6613 {
6614 field as _
6615 } else {
6616 super::TypeArgumentError::default_instance() as _
6617 }
6618 }
6619 pub fn type_argument_error_opt(&self) -> Option<&super::TypeArgumentError> {
6621 if let Some(
6622 super::execution_error::ErrorDetails::TypeArgumentError(field),
6623 ) = &self.error_details
6624 {
6625 Some(field as _)
6626 } else {
6627 None
6628 }
6629 }
6630 pub fn type_argument_error_opt_mut(
6632 &mut self,
6633 ) -> Option<&mut super::TypeArgumentError> {
6634 if let Some(
6635 super::execution_error::ErrorDetails::TypeArgumentError(field),
6636 ) = &mut self.error_details
6637 {
6638 Some(field as _)
6639 } else {
6640 None
6641 }
6642 }
6643 pub fn type_argument_error_mut(&mut self) -> &mut super::TypeArgumentError {
6647 if self.type_argument_error_opt_mut().is_none() {
6648 self.error_details = Some(
6649 super::execution_error::ErrorDetails::TypeArgumentError(
6650 super::TypeArgumentError::default(),
6651 ),
6652 );
6653 }
6654 self.type_argument_error_opt_mut().unwrap()
6655 }
6656 pub fn set_type_argument_error<T: Into<super::TypeArgumentError>>(
6659 &mut self,
6660 field: T,
6661 ) {
6662 self.error_details = Some(
6663 super::execution_error::ErrorDetails::TypeArgumentError(
6664 field.into().into(),
6665 ),
6666 );
6667 }
6668 pub fn with_type_argument_error<T: Into<super::TypeArgumentError>>(
6671 mut self,
6672 field: T,
6673 ) -> Self {
6674 self.set_type_argument_error(field.into());
6675 self
6676 }
6677 pub fn package_upgrade_error(&self) -> &super::PackageUpgradeError {
6679 if let Some(
6680 super::execution_error::ErrorDetails::PackageUpgradeError(field),
6681 ) = &self.error_details
6682 {
6683 field as _
6684 } else {
6685 super::PackageUpgradeError::default_instance() as _
6686 }
6687 }
6688 pub fn package_upgrade_error_opt(&self) -> Option<&super::PackageUpgradeError> {
6690 if let Some(
6691 super::execution_error::ErrorDetails::PackageUpgradeError(field),
6692 ) = &self.error_details
6693 {
6694 Some(field as _)
6695 } else {
6696 None
6697 }
6698 }
6699 pub fn package_upgrade_error_opt_mut(
6701 &mut self,
6702 ) -> Option<&mut super::PackageUpgradeError> {
6703 if let Some(
6704 super::execution_error::ErrorDetails::PackageUpgradeError(field),
6705 ) = &mut self.error_details
6706 {
6707 Some(field as _)
6708 } else {
6709 None
6710 }
6711 }
6712 pub fn package_upgrade_error_mut(&mut self) -> &mut super::PackageUpgradeError {
6716 if self.package_upgrade_error_opt_mut().is_none() {
6717 self.error_details = Some(
6718 super::execution_error::ErrorDetails::PackageUpgradeError(
6719 super::PackageUpgradeError::default(),
6720 ),
6721 );
6722 }
6723 self.package_upgrade_error_opt_mut().unwrap()
6724 }
6725 pub fn set_package_upgrade_error<T: Into<super::PackageUpgradeError>>(
6728 &mut self,
6729 field: T,
6730 ) {
6731 self.error_details = Some(
6732 super::execution_error::ErrorDetails::PackageUpgradeError(
6733 field.into().into(),
6734 ),
6735 );
6736 }
6737 pub fn with_package_upgrade_error<T: Into<super::PackageUpgradeError>>(
6740 mut self,
6741 field: T,
6742 ) -> Self {
6743 self.set_package_upgrade_error(field.into());
6744 self
6745 }
6746 pub fn index_error(&self) -> &super::IndexError {
6748 if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &self
6749 .error_details
6750 {
6751 field as _
6752 } else {
6753 super::IndexError::default_instance() as _
6754 }
6755 }
6756 pub fn index_error_opt(&self) -> Option<&super::IndexError> {
6758 if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &self
6759 .error_details
6760 {
6761 Some(field as _)
6762 } else {
6763 None
6764 }
6765 }
6766 pub fn index_error_opt_mut(&mut self) -> Option<&mut super::IndexError> {
6768 if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &mut self
6769 .error_details
6770 {
6771 Some(field as _)
6772 } else {
6773 None
6774 }
6775 }
6776 pub fn index_error_mut(&mut self) -> &mut super::IndexError {
6780 if self.index_error_opt_mut().is_none() {
6781 self.error_details = Some(
6782 super::execution_error::ErrorDetails::IndexError(
6783 super::IndexError::default(),
6784 ),
6785 );
6786 }
6787 self.index_error_opt_mut().unwrap()
6788 }
6789 pub fn set_index_error<T: Into<super::IndexError>>(&mut self, field: T) {
6792 self.error_details = Some(
6793 super::execution_error::ErrorDetails::IndexError(field.into().into()),
6794 );
6795 }
6796 pub fn with_index_error<T: Into<super::IndexError>>(mut self, field: T) -> Self {
6799 self.set_index_error(field.into());
6800 self
6801 }
6802 pub fn object_id(&self) -> &str {
6804 if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &self
6805 .error_details
6806 {
6807 field as _
6808 } else {
6809 ""
6810 }
6811 }
6812 pub fn object_id_opt(&self) -> Option<&str> {
6814 if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &self
6815 .error_details
6816 {
6817 Some(field as _)
6818 } else {
6819 None
6820 }
6821 }
6822 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
6824 if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &mut self
6825 .error_details
6826 {
6827 Some(field as _)
6828 } else {
6829 None
6830 }
6831 }
6832 pub fn object_id_mut(&mut self) -> &mut String {
6836 if self.object_id_opt_mut().is_none() {
6837 self.error_details = Some(
6838 super::execution_error::ErrorDetails::ObjectId(String::default()),
6839 );
6840 }
6841 self.object_id_opt_mut().unwrap()
6842 }
6843 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
6846 self.error_details = Some(
6847 super::execution_error::ErrorDetails::ObjectId(field.into().into()),
6848 );
6849 }
6850 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
6853 self.set_object_id(field.into());
6854 self
6855 }
6856 pub fn coin_deny_list_error(&self) -> &super::CoinDenyListError {
6858 if let Some(
6859 super::execution_error::ErrorDetails::CoinDenyListError(field),
6860 ) = &self.error_details
6861 {
6862 field as _
6863 } else {
6864 super::CoinDenyListError::default_instance() as _
6865 }
6866 }
6867 pub fn coin_deny_list_error_opt(&self) -> Option<&super::CoinDenyListError> {
6869 if let Some(
6870 super::execution_error::ErrorDetails::CoinDenyListError(field),
6871 ) = &self.error_details
6872 {
6873 Some(field as _)
6874 } else {
6875 None
6876 }
6877 }
6878 pub fn coin_deny_list_error_opt_mut(
6880 &mut self,
6881 ) -> Option<&mut super::CoinDenyListError> {
6882 if let Some(
6883 super::execution_error::ErrorDetails::CoinDenyListError(field),
6884 ) = &mut self.error_details
6885 {
6886 Some(field as _)
6887 } else {
6888 None
6889 }
6890 }
6891 pub fn coin_deny_list_error_mut(&mut self) -> &mut super::CoinDenyListError {
6895 if self.coin_deny_list_error_opt_mut().is_none() {
6896 self.error_details = Some(
6897 super::execution_error::ErrorDetails::CoinDenyListError(
6898 super::CoinDenyListError::default(),
6899 ),
6900 );
6901 }
6902 self.coin_deny_list_error_opt_mut().unwrap()
6903 }
6904 pub fn set_coin_deny_list_error<T: Into<super::CoinDenyListError>>(
6907 &mut self,
6908 field: T,
6909 ) {
6910 self.error_details = Some(
6911 super::execution_error::ErrorDetails::CoinDenyListError(
6912 field.into().into(),
6913 ),
6914 );
6915 }
6916 pub fn with_coin_deny_list_error<T: Into<super::CoinDenyListError>>(
6919 mut self,
6920 field: T,
6921 ) -> Self {
6922 self.set_coin_deny_list_error(field.into());
6923 self
6924 }
6925 pub fn congested_objects(&self) -> &super::CongestedObjects {
6927 if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &self
6928 .error_details
6929 {
6930 field as _
6931 } else {
6932 super::CongestedObjects::default_instance() as _
6933 }
6934 }
6935 pub fn congested_objects_opt(&self) -> Option<&super::CongestedObjects> {
6937 if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &self
6938 .error_details
6939 {
6940 Some(field as _)
6941 } else {
6942 None
6943 }
6944 }
6945 pub fn congested_objects_opt_mut(
6947 &mut self,
6948 ) -> Option<&mut super::CongestedObjects> {
6949 if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &mut self
6950 .error_details
6951 {
6952 Some(field as _)
6953 } else {
6954 None
6955 }
6956 }
6957 pub fn congested_objects_mut(&mut self) -> &mut super::CongestedObjects {
6961 if self.congested_objects_opt_mut().is_none() {
6962 self.error_details = Some(
6963 super::execution_error::ErrorDetails::CongestedObjects(
6964 super::CongestedObjects::default(),
6965 ),
6966 );
6967 }
6968 self.congested_objects_opt_mut().unwrap()
6969 }
6970 pub fn set_congested_objects<T: Into<super::CongestedObjects>>(
6973 &mut self,
6974 field: T,
6975 ) {
6976 self.error_details = Some(
6977 super::execution_error::ErrorDetails::CongestedObjects(
6978 field.into().into(),
6979 ),
6980 );
6981 }
6982 pub fn with_congested_objects<T: Into<super::CongestedObjects>>(
6985 mut self,
6986 field: T,
6987 ) -> Self {
6988 self.set_congested_objects(field.into());
6989 self
6990 }
6991 }
6992 impl super::ExecutionStatus {
6993 pub const fn const_default() -> Self {
6994 Self { success: None, error: None }
6995 }
6996 #[doc(hidden)]
6997 pub fn default_instance() -> &'static Self {
6998 static DEFAULT: super::ExecutionStatus = super::ExecutionStatus::const_default();
6999 &DEFAULT
7000 }
7001 pub fn success_opt_mut(&mut self) -> Option<&mut bool> {
7003 self.success.as_mut().map(|field| field as _)
7004 }
7005 pub fn success_mut(&mut self) -> &mut bool {
7008 self.success.get_or_insert_default()
7009 }
7010 pub fn success_opt(&self) -> Option<bool> {
7012 self.success.as_ref().map(|field| *field)
7013 }
7014 pub fn set_success(&mut self, field: bool) {
7016 self.success = Some(field);
7017 }
7018 pub fn with_success(mut self, field: bool) -> Self {
7020 self.set_success(field);
7021 self
7022 }
7023 pub fn error(&self) -> &super::ExecutionError {
7025 self.error
7026 .as_ref()
7027 .map(|field| field as _)
7028 .unwrap_or_else(|| super::ExecutionError::default_instance() as _)
7029 }
7030 pub fn error_opt_mut(&mut self) -> Option<&mut super::ExecutionError> {
7032 self.error.as_mut().map(|field| field as _)
7033 }
7034 pub fn error_mut(&mut self) -> &mut super::ExecutionError {
7037 self.error.get_or_insert_default()
7038 }
7039 pub fn error_opt(&self) -> Option<&super::ExecutionError> {
7041 self.error.as_ref().map(|field| field as _)
7042 }
7043 pub fn set_error<T: Into<super::ExecutionError>>(&mut self, field: T) {
7045 self.error = Some(field.into().into());
7046 }
7047 pub fn with_error<T: Into<super::ExecutionError>>(mut self, field: T) -> Self {
7049 self.set_error(field.into());
7050 self
7051 }
7052 }
7053 impl super::ExecutionTimeObservation {
7054 pub const fn const_default() -> Self {
7055 Self {
7056 kind: None,
7057 move_entry_point: None,
7058 validator_observations: Vec::new(),
7059 }
7060 }
7061 #[doc(hidden)]
7062 pub fn default_instance() -> &'static Self {
7063 static DEFAULT: super::ExecutionTimeObservation = super::ExecutionTimeObservation::const_default();
7064 &DEFAULT
7065 }
7066 pub fn with_kind<
7068 T: Into<super::execution_time_observation::ExecutionTimeObservationKind>,
7069 >(mut self, field: T) -> Self {
7070 self.set_kind(field.into());
7071 self
7072 }
7073 pub fn move_entry_point(&self) -> &super::MoveCall {
7075 self.move_entry_point
7076 .as_ref()
7077 .map(|field| field as _)
7078 .unwrap_or_else(|| super::MoveCall::default_instance() as _)
7079 }
7080 pub fn move_entry_point_opt_mut(&mut self) -> Option<&mut super::MoveCall> {
7082 self.move_entry_point.as_mut().map(|field| field as _)
7083 }
7084 pub fn move_entry_point_mut(&mut self) -> &mut super::MoveCall {
7087 self.move_entry_point.get_or_insert_default()
7088 }
7089 pub fn move_entry_point_opt(&self) -> Option<&super::MoveCall> {
7091 self.move_entry_point.as_ref().map(|field| field as _)
7092 }
7093 pub fn set_move_entry_point<T: Into<super::MoveCall>>(&mut self, field: T) {
7095 self.move_entry_point = Some(field.into().into());
7096 }
7097 pub fn with_move_entry_point<T: Into<super::MoveCall>>(
7099 mut self,
7100 field: T,
7101 ) -> Self {
7102 self.set_move_entry_point(field.into());
7103 self
7104 }
7105 pub fn validator_observations(
7107 &self,
7108 ) -> &[super::ValidatorExecutionTimeObservation] {
7109 &self.validator_observations
7110 }
7111 pub fn validator_observations_mut(
7114 &mut self,
7115 ) -> &mut Vec<super::ValidatorExecutionTimeObservation> {
7116 &mut self.validator_observations
7117 }
7118 pub fn set_validator_observations(
7120 &mut self,
7121 field: Vec<super::ValidatorExecutionTimeObservation>,
7122 ) {
7123 self.validator_observations = field;
7124 }
7125 pub fn with_validator_observations(
7127 mut self,
7128 field: Vec<super::ValidatorExecutionTimeObservation>,
7129 ) -> Self {
7130 self.set_validator_observations(field);
7131 self
7132 }
7133 }
7134 impl super::ExecutionTimeObservations {
7135 pub const fn const_default() -> Self {
7136 Self {
7137 version: None,
7138 observations: Vec::new(),
7139 }
7140 }
7141 #[doc(hidden)]
7142 pub fn default_instance() -> &'static Self {
7143 static DEFAULT: super::ExecutionTimeObservations = super::ExecutionTimeObservations::const_default();
7144 &DEFAULT
7145 }
7146 pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
7148 self.version.as_mut().map(|field| field as _)
7149 }
7150 pub fn version_mut(&mut self) -> &mut i32 {
7153 self.version.get_or_insert_default()
7154 }
7155 pub fn version_opt(&self) -> Option<i32> {
7157 self.version.as_ref().map(|field| *field)
7158 }
7159 pub fn set_version(&mut self, field: i32) {
7161 self.version = Some(field);
7162 }
7163 pub fn with_version(mut self, field: i32) -> Self {
7165 self.set_version(field);
7166 self
7167 }
7168 pub fn observations(&self) -> &[super::ExecutionTimeObservation] {
7170 &self.observations
7171 }
7172 pub fn observations_mut(&mut self) -> &mut Vec<super::ExecutionTimeObservation> {
7175 &mut self.observations
7176 }
7177 pub fn set_observations(&mut self, field: Vec<super::ExecutionTimeObservation>) {
7179 self.observations = field;
7180 }
7181 pub fn with_observations(
7183 mut self,
7184 field: Vec<super::ExecutionTimeObservation>,
7185 ) -> Self {
7186 self.set_observations(field);
7187 self
7188 }
7189 }
7190 impl super::FieldDescriptor {
7191 pub const fn const_default() -> Self {
7192 Self {
7193 name: None,
7194 position: None,
7195 r#type: None,
7196 }
7197 }
7198 #[doc(hidden)]
7199 pub fn default_instance() -> &'static Self {
7200 static DEFAULT: super::FieldDescriptor = super::FieldDescriptor::const_default();
7201 &DEFAULT
7202 }
7203 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
7205 self.name.as_mut().map(|field| field as _)
7206 }
7207 pub fn name_mut(&mut self) -> &mut String {
7210 self.name.get_or_insert_default()
7211 }
7212 pub fn name_opt(&self) -> Option<&str> {
7214 self.name.as_ref().map(|field| field as _)
7215 }
7216 pub fn set_name<T: Into<String>>(&mut self, field: T) {
7218 self.name = Some(field.into().into());
7219 }
7220 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
7222 self.set_name(field.into());
7223 self
7224 }
7225 pub fn position_opt_mut(&mut self) -> Option<&mut u32> {
7227 self.position.as_mut().map(|field| field as _)
7228 }
7229 pub fn position_mut(&mut self) -> &mut u32 {
7232 self.position.get_or_insert_default()
7233 }
7234 pub fn position_opt(&self) -> Option<u32> {
7236 self.position.as_ref().map(|field| *field)
7237 }
7238 pub fn set_position(&mut self, field: u32) {
7240 self.position = Some(field);
7241 }
7242 pub fn with_position(mut self, field: u32) -> Self {
7244 self.set_position(field);
7245 self
7246 }
7247 pub fn r#type(&self) -> &super::OpenSignatureBody {
7249 self.r#type
7250 .as_ref()
7251 .map(|field| field as _)
7252 .unwrap_or_else(|| super::OpenSignatureBody::default_instance() as _)
7253 }
7254 pub fn type_opt_mut(&mut self) -> Option<&mut super::OpenSignatureBody> {
7256 self.r#type.as_mut().map(|field| field as _)
7257 }
7258 pub fn type_mut(&mut self) -> &mut super::OpenSignatureBody {
7261 self.r#type.get_or_insert_default()
7262 }
7263 pub fn type_opt(&self) -> Option<&super::OpenSignatureBody> {
7265 self.r#type.as_ref().map(|field| field as _)
7266 }
7267 pub fn set_type<T: Into<super::OpenSignatureBody>>(&mut self, field: T) {
7269 self.r#type = Some(field.into().into());
7270 }
7271 pub fn with_type<T: Into<super::OpenSignatureBody>>(mut self, field: T) -> Self {
7273 self.set_type(field.into());
7274 self
7275 }
7276 }
7277 impl super::FunctionDescriptor {
7278 pub const fn const_default() -> Self {
7279 Self {
7280 name: None,
7281 visibility: None,
7282 is_entry: None,
7283 type_parameters: Vec::new(),
7284 parameters: Vec::new(),
7285 returns: Vec::new(),
7286 }
7287 }
7288 #[doc(hidden)]
7289 pub fn default_instance() -> &'static Self {
7290 static DEFAULT: super::FunctionDescriptor = super::FunctionDescriptor::const_default();
7291 &DEFAULT
7292 }
7293 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
7295 self.name.as_mut().map(|field| field as _)
7296 }
7297 pub fn name_mut(&mut self) -> &mut String {
7300 self.name.get_or_insert_default()
7301 }
7302 pub fn name_opt(&self) -> Option<&str> {
7304 self.name.as_ref().map(|field| field as _)
7305 }
7306 pub fn set_name<T: Into<String>>(&mut self, field: T) {
7308 self.name = Some(field.into().into());
7309 }
7310 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
7312 self.set_name(field.into());
7313 self
7314 }
7315 pub fn with_visibility<T: Into<super::function_descriptor::Visibility>>(
7317 mut self,
7318 field: T,
7319 ) -> Self {
7320 self.set_visibility(field.into());
7321 self
7322 }
7323 pub fn is_entry_opt_mut(&mut self) -> Option<&mut bool> {
7325 self.is_entry.as_mut().map(|field| field as _)
7326 }
7327 pub fn is_entry_mut(&mut self) -> &mut bool {
7330 self.is_entry.get_or_insert_default()
7331 }
7332 pub fn is_entry_opt(&self) -> Option<bool> {
7334 self.is_entry.as_ref().map(|field| *field)
7335 }
7336 pub fn set_is_entry(&mut self, field: bool) {
7338 self.is_entry = Some(field);
7339 }
7340 pub fn with_is_entry(mut self, field: bool) -> Self {
7342 self.set_is_entry(field);
7343 self
7344 }
7345 pub fn type_parameters(&self) -> &[super::TypeParameter] {
7347 &self.type_parameters
7348 }
7349 pub fn type_parameters_mut(&mut self) -> &mut Vec<super::TypeParameter> {
7352 &mut self.type_parameters
7353 }
7354 pub fn set_type_parameters(&mut self, field: Vec<super::TypeParameter>) {
7356 self.type_parameters = field;
7357 }
7358 pub fn with_type_parameters(mut self, field: Vec<super::TypeParameter>) -> Self {
7360 self.set_type_parameters(field);
7361 self
7362 }
7363 pub fn parameters(&self) -> &[super::OpenSignature] {
7365 &self.parameters
7366 }
7367 pub fn parameters_mut(&mut self) -> &mut Vec<super::OpenSignature> {
7370 &mut self.parameters
7371 }
7372 pub fn set_parameters(&mut self, field: Vec<super::OpenSignature>) {
7374 self.parameters = field;
7375 }
7376 pub fn with_parameters(mut self, field: Vec<super::OpenSignature>) -> Self {
7378 self.set_parameters(field);
7379 self
7380 }
7381 pub fn returns(&self) -> &[super::OpenSignature] {
7383 &self.returns
7384 }
7385 pub fn returns_mut(&mut self) -> &mut Vec<super::OpenSignature> {
7388 &mut self.returns
7389 }
7390 pub fn set_returns(&mut self, field: Vec<super::OpenSignature>) {
7392 self.returns = field;
7393 }
7394 pub fn with_returns(mut self, field: Vec<super::OpenSignature>) -> Self {
7396 self.set_returns(field);
7397 self
7398 }
7399 }
7400 impl super::FundsWithdrawal {
7401 pub const fn const_default() -> Self {
7402 Self {
7403 amount: None,
7404 coin_type: None,
7405 source: None,
7406 funder: None,
7407 allowance: None,
7408 }
7409 }
7410 #[doc(hidden)]
7411 pub fn default_instance() -> &'static Self {
7412 static DEFAULT: super::FundsWithdrawal = super::FundsWithdrawal::const_default();
7413 &DEFAULT
7414 }
7415 pub fn amount_opt_mut(&mut self) -> Option<&mut u64> {
7417 self.amount.as_mut().map(|field| field as _)
7418 }
7419 pub fn amount_mut(&mut self) -> &mut u64 {
7422 self.amount.get_or_insert_default()
7423 }
7424 pub fn amount_opt(&self) -> Option<u64> {
7426 self.amount.as_ref().map(|field| *field)
7427 }
7428 pub fn set_amount(&mut self, field: u64) {
7430 self.amount = Some(field);
7431 }
7432 pub fn with_amount(mut self, field: u64) -> Self {
7434 self.set_amount(field);
7435 self
7436 }
7437 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
7439 self.coin_type.as_mut().map(|field| field as _)
7440 }
7441 pub fn coin_type_mut(&mut self) -> &mut String {
7444 self.coin_type.get_or_insert_default()
7445 }
7446 pub fn coin_type_opt(&self) -> Option<&str> {
7448 self.coin_type.as_ref().map(|field| field as _)
7449 }
7450 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
7452 self.coin_type = Some(field.into().into());
7453 }
7454 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
7456 self.set_coin_type(field.into());
7457 self
7458 }
7459 pub fn with_source<T: Into<super::funds_withdrawal::Source>>(
7461 mut self,
7462 field: T,
7463 ) -> Self {
7464 self.set_source(field.into());
7465 self
7466 }
7467 pub fn funder_opt_mut(&mut self) -> Option<&mut String> {
7469 self.funder.as_mut().map(|field| field as _)
7470 }
7471 pub fn funder_mut(&mut self) -> &mut String {
7474 self.funder.get_or_insert_default()
7475 }
7476 pub fn funder_opt(&self) -> Option<&str> {
7478 self.funder.as_ref().map(|field| field as _)
7479 }
7480 pub fn set_funder<T: Into<String>>(&mut self, field: T) {
7482 self.funder = Some(field.into().into());
7483 }
7484 pub fn with_funder<T: Into<String>>(mut self, field: T) -> Self {
7486 self.set_funder(field.into());
7487 self
7488 }
7489 pub fn allowance_opt_mut(&mut self) -> Option<&mut String> {
7491 self.allowance.as_mut().map(|field| field as _)
7492 }
7493 pub fn allowance_mut(&mut self) -> &mut String {
7496 self.allowance.get_or_insert_default()
7497 }
7498 pub fn allowance_opt(&self) -> Option<&str> {
7500 self.allowance.as_ref().map(|field| field as _)
7501 }
7502 pub fn set_allowance<T: Into<String>>(&mut self, field: T) {
7504 self.allowance = Some(field.into().into());
7505 }
7506 pub fn with_allowance<T: Into<String>>(mut self, field: T) -> Self {
7508 self.set_allowance(field.into());
7509 self
7510 }
7511 }
7512 impl super::GasCostSummary {
7513 pub const fn const_default() -> Self {
7514 Self {
7515 computation_cost: None,
7516 storage_cost: None,
7517 storage_rebate: None,
7518 non_refundable_storage_fee: None,
7519 }
7520 }
7521 #[doc(hidden)]
7522 pub fn default_instance() -> &'static Self {
7523 static DEFAULT: super::GasCostSummary = super::GasCostSummary::const_default();
7524 &DEFAULT
7525 }
7526 pub fn computation_cost_opt_mut(&mut self) -> Option<&mut u64> {
7528 self.computation_cost.as_mut().map(|field| field as _)
7529 }
7530 pub fn computation_cost_mut(&mut self) -> &mut u64 {
7533 self.computation_cost.get_or_insert_default()
7534 }
7535 pub fn computation_cost_opt(&self) -> Option<u64> {
7537 self.computation_cost.as_ref().map(|field| *field)
7538 }
7539 pub fn set_computation_cost(&mut self, field: u64) {
7541 self.computation_cost = Some(field);
7542 }
7543 pub fn with_computation_cost(mut self, field: u64) -> Self {
7545 self.set_computation_cost(field);
7546 self
7547 }
7548 pub fn storage_cost_opt_mut(&mut self) -> Option<&mut u64> {
7550 self.storage_cost.as_mut().map(|field| field as _)
7551 }
7552 pub fn storage_cost_mut(&mut self) -> &mut u64 {
7555 self.storage_cost.get_or_insert_default()
7556 }
7557 pub fn storage_cost_opt(&self) -> Option<u64> {
7559 self.storage_cost.as_ref().map(|field| *field)
7560 }
7561 pub fn set_storage_cost(&mut self, field: u64) {
7563 self.storage_cost = Some(field);
7564 }
7565 pub fn with_storage_cost(mut self, field: u64) -> Self {
7567 self.set_storage_cost(field);
7568 self
7569 }
7570 pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
7572 self.storage_rebate.as_mut().map(|field| field as _)
7573 }
7574 pub fn storage_rebate_mut(&mut self) -> &mut u64 {
7577 self.storage_rebate.get_or_insert_default()
7578 }
7579 pub fn storage_rebate_opt(&self) -> Option<u64> {
7581 self.storage_rebate.as_ref().map(|field| *field)
7582 }
7583 pub fn set_storage_rebate(&mut self, field: u64) {
7585 self.storage_rebate = Some(field);
7586 }
7587 pub fn with_storage_rebate(mut self, field: u64) -> Self {
7589 self.set_storage_rebate(field);
7590 self
7591 }
7592 pub fn non_refundable_storage_fee_opt_mut(&mut self) -> Option<&mut u64> {
7594 self.non_refundable_storage_fee.as_mut().map(|field| field as _)
7595 }
7596 pub fn non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
7599 self.non_refundable_storage_fee.get_or_insert_default()
7600 }
7601 pub fn non_refundable_storage_fee_opt(&self) -> Option<u64> {
7603 self.non_refundable_storage_fee.as_ref().map(|field| *field)
7604 }
7605 pub fn set_non_refundable_storage_fee(&mut self, field: u64) {
7607 self.non_refundable_storage_fee = Some(field);
7608 }
7609 pub fn with_non_refundable_storage_fee(mut self, field: u64) -> Self {
7611 self.set_non_refundable_storage_fee(field);
7612 self
7613 }
7614 }
7615 impl super::GasPayment {
7616 pub const fn const_default() -> Self {
7617 Self {
7618 objects: Vec::new(),
7619 owner: None,
7620 price: None,
7621 budget: None,
7622 }
7623 }
7624 #[doc(hidden)]
7625 pub fn default_instance() -> &'static Self {
7626 static DEFAULT: super::GasPayment = super::GasPayment::const_default();
7627 &DEFAULT
7628 }
7629 pub fn objects(&self) -> &[super::ObjectReference] {
7631 &self.objects
7632 }
7633 pub fn objects_mut(&mut self) -> &mut Vec<super::ObjectReference> {
7636 &mut self.objects
7637 }
7638 pub fn set_objects(&mut self, field: Vec<super::ObjectReference>) {
7640 self.objects = field;
7641 }
7642 pub fn with_objects(mut self, field: Vec<super::ObjectReference>) -> Self {
7644 self.set_objects(field);
7645 self
7646 }
7647 pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
7649 self.owner.as_mut().map(|field| field as _)
7650 }
7651 pub fn owner_mut(&mut self) -> &mut String {
7654 self.owner.get_or_insert_default()
7655 }
7656 pub fn owner_opt(&self) -> Option<&str> {
7658 self.owner.as_ref().map(|field| field as _)
7659 }
7660 pub fn set_owner<T: Into<String>>(&mut self, field: T) {
7662 self.owner = Some(field.into().into());
7663 }
7664 pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
7666 self.set_owner(field.into());
7667 self
7668 }
7669 pub fn price_opt_mut(&mut self) -> Option<&mut u64> {
7671 self.price.as_mut().map(|field| field as _)
7672 }
7673 pub fn price_mut(&mut self) -> &mut u64 {
7676 self.price.get_or_insert_default()
7677 }
7678 pub fn price_opt(&self) -> Option<u64> {
7680 self.price.as_ref().map(|field| *field)
7681 }
7682 pub fn set_price(&mut self, field: u64) {
7684 self.price = Some(field);
7685 }
7686 pub fn with_price(mut self, field: u64) -> Self {
7688 self.set_price(field);
7689 self
7690 }
7691 pub fn budget_opt_mut(&mut self) -> Option<&mut u64> {
7693 self.budget.as_mut().map(|field| field as _)
7694 }
7695 pub fn budget_mut(&mut self) -> &mut u64 {
7698 self.budget.get_or_insert_default()
7699 }
7700 pub fn budget_opt(&self) -> Option<u64> {
7702 self.budget.as_ref().map(|field| *field)
7703 }
7704 pub fn set_budget(&mut self, field: u64) {
7706 self.budget = Some(field);
7707 }
7708 pub fn with_budget(mut self, field: u64) -> Self {
7710 self.set_budget(field);
7711 self
7712 }
7713 }
7714 impl super::GenesisTransaction {
7715 pub const fn const_default() -> Self {
7716 Self { objects: Vec::new() }
7717 }
7718 #[doc(hidden)]
7719 pub fn default_instance() -> &'static Self {
7720 static DEFAULT: super::GenesisTransaction = super::GenesisTransaction::const_default();
7721 &DEFAULT
7722 }
7723 pub fn objects(&self) -> &[super::Object] {
7725 &self.objects
7726 }
7727 pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
7730 &mut self.objects
7731 }
7732 pub fn set_objects(&mut self, field: Vec<super::Object>) {
7734 self.objects = field;
7735 }
7736 pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
7738 self.set_objects(field);
7739 self
7740 }
7741 }
7742 impl super::GetBalanceRequest {
7743 pub const fn const_default() -> Self {
7744 Self {
7745 owner: None,
7746 coin_type: None,
7747 }
7748 }
7749 #[doc(hidden)]
7750 pub fn default_instance() -> &'static Self {
7751 static DEFAULT: super::GetBalanceRequest = super::GetBalanceRequest::const_default();
7752 &DEFAULT
7753 }
7754 pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
7756 self.owner.as_mut().map(|field| field as _)
7757 }
7758 pub fn owner_mut(&mut self) -> &mut String {
7761 self.owner.get_or_insert_default()
7762 }
7763 pub fn owner_opt(&self) -> Option<&str> {
7765 self.owner.as_ref().map(|field| field as _)
7766 }
7767 pub fn set_owner<T: Into<String>>(&mut self, field: T) {
7769 self.owner = Some(field.into().into());
7770 }
7771 pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
7773 self.set_owner(field.into());
7774 self
7775 }
7776 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
7778 self.coin_type.as_mut().map(|field| field as _)
7779 }
7780 pub fn coin_type_mut(&mut self) -> &mut String {
7783 self.coin_type.get_or_insert_default()
7784 }
7785 pub fn coin_type_opt(&self) -> Option<&str> {
7787 self.coin_type.as_ref().map(|field| field as _)
7788 }
7789 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
7791 self.coin_type = Some(field.into().into());
7792 }
7793 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
7795 self.set_coin_type(field.into());
7796 self
7797 }
7798 }
7799 impl super::GetBalanceResponse {
7800 pub const fn const_default() -> Self {
7801 Self { balance: None }
7802 }
7803 #[doc(hidden)]
7804 pub fn default_instance() -> &'static Self {
7805 static DEFAULT: super::GetBalanceResponse = super::GetBalanceResponse::const_default();
7806 &DEFAULT
7807 }
7808 pub fn balance(&self) -> &super::Balance {
7810 self.balance
7811 .as_ref()
7812 .map(|field| field as _)
7813 .unwrap_or_else(|| super::Balance::default_instance() as _)
7814 }
7815 pub fn balance_opt_mut(&mut self) -> Option<&mut super::Balance> {
7817 self.balance.as_mut().map(|field| field as _)
7818 }
7819 pub fn balance_mut(&mut self) -> &mut super::Balance {
7822 self.balance.get_or_insert_default()
7823 }
7824 pub fn balance_opt(&self) -> Option<&super::Balance> {
7826 self.balance.as_ref().map(|field| field as _)
7827 }
7828 pub fn set_balance<T: Into<super::Balance>>(&mut self, field: T) {
7830 self.balance = Some(field.into().into());
7831 }
7832 pub fn with_balance<T: Into<super::Balance>>(mut self, field: T) -> Self {
7834 self.set_balance(field.into());
7835 self
7836 }
7837 }
7838 impl super::GetCheckpointRequest {
7839 pub const fn const_default() -> Self {
7840 Self {
7841 read_mask: None,
7842 checkpoint_id: None,
7843 }
7844 }
7845 #[doc(hidden)]
7846 pub fn default_instance() -> &'static Self {
7847 static DEFAULT: super::GetCheckpointRequest = super::GetCheckpointRequest::const_default();
7848 &DEFAULT
7849 }
7850 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
7852 self.read_mask.as_mut().map(|field| field as _)
7853 }
7854 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
7857 self.read_mask.get_or_insert_default()
7858 }
7859 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
7861 self.read_mask.as_ref().map(|field| field as _)
7862 }
7863 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
7865 self.read_mask = Some(field.into().into());
7866 }
7867 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
7869 mut self,
7870 field: T,
7871 ) -> Self {
7872 self.set_read_mask(field.into());
7873 self
7874 }
7875 pub fn sequence_number(&self) -> u64 {
7877 if let Some(
7878 super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
7879 ) = &self.checkpoint_id
7880 {
7881 *field
7882 } else {
7883 0u64
7884 }
7885 }
7886 pub fn sequence_number_opt(&self) -> Option<u64> {
7888 if let Some(
7889 super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
7890 ) = &self.checkpoint_id
7891 {
7892 Some(*field)
7893 } else {
7894 None
7895 }
7896 }
7897 pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
7899 if let Some(
7900 super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
7901 ) = &mut self.checkpoint_id
7902 {
7903 Some(field as _)
7904 } else {
7905 None
7906 }
7907 }
7908 pub fn sequence_number_mut(&mut self) -> &mut u64 {
7912 if self.sequence_number_opt_mut().is_none() {
7913 self.checkpoint_id = Some(
7914 super::get_checkpoint_request::CheckpointId::SequenceNumber(
7915 u64::default(),
7916 ),
7917 );
7918 }
7919 self.sequence_number_opt_mut().unwrap()
7920 }
7921 pub fn set_sequence_number(&mut self, field: u64) {
7924 self.checkpoint_id = Some(
7925 super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
7926 );
7927 }
7928 pub fn with_sequence_number(mut self, field: u64) -> Self {
7931 self.set_sequence_number(field);
7932 self
7933 }
7934 pub fn digest(&self) -> &str {
7936 if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &self
7937 .checkpoint_id
7938 {
7939 field as _
7940 } else {
7941 ""
7942 }
7943 }
7944 pub fn digest_opt(&self) -> Option<&str> {
7946 if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &self
7947 .checkpoint_id
7948 {
7949 Some(field as _)
7950 } else {
7951 None
7952 }
7953 }
7954 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
7956 if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &mut self
7957 .checkpoint_id
7958 {
7959 Some(field as _)
7960 } else {
7961 None
7962 }
7963 }
7964 pub fn digest_mut(&mut self) -> &mut String {
7968 if self.digest_opt_mut().is_none() {
7969 self.checkpoint_id = Some(
7970 super::get_checkpoint_request::CheckpointId::Digest(
7971 String::default(),
7972 ),
7973 );
7974 }
7975 self.digest_opt_mut().unwrap()
7976 }
7977 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
7980 self.checkpoint_id = Some(
7981 super::get_checkpoint_request::CheckpointId::Digest(field.into().into()),
7982 );
7983 }
7984 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
7987 self.set_digest(field.into());
7988 self
7989 }
7990 }
7991 impl super::GetCheckpointResponse {
7992 pub const fn const_default() -> Self {
7993 Self { checkpoint: None }
7994 }
7995 #[doc(hidden)]
7996 pub fn default_instance() -> &'static Self {
7997 static DEFAULT: super::GetCheckpointResponse = super::GetCheckpointResponse::const_default();
7998 &DEFAULT
7999 }
8000 pub fn checkpoint(&self) -> &super::Checkpoint {
8002 self.checkpoint
8003 .as_ref()
8004 .map(|field| field as _)
8005 .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
8006 }
8007 pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
8009 self.checkpoint.as_mut().map(|field| field as _)
8010 }
8011 pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
8014 self.checkpoint.get_or_insert_default()
8015 }
8016 pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
8018 self.checkpoint.as_ref().map(|field| field as _)
8019 }
8020 pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
8022 self.checkpoint = Some(field.into().into());
8023 }
8024 pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
8026 self.set_checkpoint(field.into());
8027 self
8028 }
8029 }
8030 impl super::GetCoinInfoRequest {
8031 pub const fn const_default() -> Self {
8032 Self { coin_type: None }
8033 }
8034 #[doc(hidden)]
8035 pub fn default_instance() -> &'static Self {
8036 static DEFAULT: super::GetCoinInfoRequest = super::GetCoinInfoRequest::const_default();
8037 &DEFAULT
8038 }
8039 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
8041 self.coin_type.as_mut().map(|field| field as _)
8042 }
8043 pub fn coin_type_mut(&mut self) -> &mut String {
8046 self.coin_type.get_or_insert_default()
8047 }
8048 pub fn coin_type_opt(&self) -> Option<&str> {
8050 self.coin_type.as_ref().map(|field| field as _)
8051 }
8052 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
8054 self.coin_type = Some(field.into().into());
8055 }
8056 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
8058 self.set_coin_type(field.into());
8059 self
8060 }
8061 }
8062 impl super::GetCoinInfoResponse {
8063 pub const fn const_default() -> Self {
8064 Self {
8065 coin_type: None,
8066 metadata: None,
8067 treasury: None,
8068 regulated_metadata: None,
8069 }
8070 }
8071 #[doc(hidden)]
8072 pub fn default_instance() -> &'static Self {
8073 static DEFAULT: super::GetCoinInfoResponse = super::GetCoinInfoResponse::const_default();
8074 &DEFAULT
8075 }
8076 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
8078 self.coin_type.as_mut().map(|field| field as _)
8079 }
8080 pub fn coin_type_mut(&mut self) -> &mut String {
8083 self.coin_type.get_or_insert_default()
8084 }
8085 pub fn coin_type_opt(&self) -> Option<&str> {
8087 self.coin_type.as_ref().map(|field| field as _)
8088 }
8089 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
8091 self.coin_type = Some(field.into().into());
8092 }
8093 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
8095 self.set_coin_type(field.into());
8096 self
8097 }
8098 pub fn metadata(&self) -> &super::CoinMetadata {
8100 self.metadata
8101 .as_ref()
8102 .map(|field| field as _)
8103 .unwrap_or_else(|| super::CoinMetadata::default_instance() as _)
8104 }
8105 pub fn metadata_opt_mut(&mut self) -> Option<&mut super::CoinMetadata> {
8107 self.metadata.as_mut().map(|field| field as _)
8108 }
8109 pub fn metadata_mut(&mut self) -> &mut super::CoinMetadata {
8112 self.metadata.get_or_insert_default()
8113 }
8114 pub fn metadata_opt(&self) -> Option<&super::CoinMetadata> {
8116 self.metadata.as_ref().map(|field| field as _)
8117 }
8118 pub fn set_metadata<T: Into<super::CoinMetadata>>(&mut self, field: T) {
8120 self.metadata = Some(field.into().into());
8121 }
8122 pub fn with_metadata<T: Into<super::CoinMetadata>>(mut self, field: T) -> Self {
8124 self.set_metadata(field.into());
8125 self
8126 }
8127 pub fn treasury(&self) -> &super::CoinTreasury {
8129 self.treasury
8130 .as_ref()
8131 .map(|field| field as _)
8132 .unwrap_or_else(|| super::CoinTreasury::default_instance() as _)
8133 }
8134 pub fn treasury_opt_mut(&mut self) -> Option<&mut super::CoinTreasury> {
8136 self.treasury.as_mut().map(|field| field as _)
8137 }
8138 pub fn treasury_mut(&mut self) -> &mut super::CoinTreasury {
8141 self.treasury.get_or_insert_default()
8142 }
8143 pub fn treasury_opt(&self) -> Option<&super::CoinTreasury> {
8145 self.treasury.as_ref().map(|field| field as _)
8146 }
8147 pub fn set_treasury<T: Into<super::CoinTreasury>>(&mut self, field: T) {
8149 self.treasury = Some(field.into().into());
8150 }
8151 pub fn with_treasury<T: Into<super::CoinTreasury>>(mut self, field: T) -> Self {
8153 self.set_treasury(field.into());
8154 self
8155 }
8156 pub fn regulated_metadata(&self) -> &super::RegulatedCoinMetadata {
8158 self.regulated_metadata
8159 .as_ref()
8160 .map(|field| field as _)
8161 .unwrap_or_else(|| super::RegulatedCoinMetadata::default_instance() as _)
8162 }
8163 pub fn regulated_metadata_opt_mut(
8165 &mut self,
8166 ) -> Option<&mut super::RegulatedCoinMetadata> {
8167 self.regulated_metadata.as_mut().map(|field| field as _)
8168 }
8169 pub fn regulated_metadata_mut(&mut self) -> &mut super::RegulatedCoinMetadata {
8172 self.regulated_metadata.get_or_insert_default()
8173 }
8174 pub fn regulated_metadata_opt(&self) -> Option<&super::RegulatedCoinMetadata> {
8176 self.regulated_metadata.as_ref().map(|field| field as _)
8177 }
8178 pub fn set_regulated_metadata<T: Into<super::RegulatedCoinMetadata>>(
8180 &mut self,
8181 field: T,
8182 ) {
8183 self.regulated_metadata = Some(field.into().into());
8184 }
8185 pub fn with_regulated_metadata<T: Into<super::RegulatedCoinMetadata>>(
8187 mut self,
8188 field: T,
8189 ) -> Self {
8190 self.set_regulated_metadata(field.into());
8191 self
8192 }
8193 }
8194 impl super::GetDatatypeRequest {
8195 pub const fn const_default() -> Self {
8196 Self {
8197 package_id: None,
8198 module_name: None,
8199 name: None,
8200 }
8201 }
8202 #[doc(hidden)]
8203 pub fn default_instance() -> &'static Self {
8204 static DEFAULT: super::GetDatatypeRequest = super::GetDatatypeRequest::const_default();
8205 &DEFAULT
8206 }
8207 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
8209 self.package_id.as_mut().map(|field| field as _)
8210 }
8211 pub fn package_id_mut(&mut self) -> &mut String {
8214 self.package_id.get_or_insert_default()
8215 }
8216 pub fn package_id_opt(&self) -> Option<&str> {
8218 self.package_id.as_ref().map(|field| field as _)
8219 }
8220 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
8222 self.package_id = Some(field.into().into());
8223 }
8224 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
8226 self.set_package_id(field.into());
8227 self
8228 }
8229 pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
8231 self.module_name.as_mut().map(|field| field as _)
8232 }
8233 pub fn module_name_mut(&mut self) -> &mut String {
8236 self.module_name.get_or_insert_default()
8237 }
8238 pub fn module_name_opt(&self) -> Option<&str> {
8240 self.module_name.as_ref().map(|field| field as _)
8241 }
8242 pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
8244 self.module_name = Some(field.into().into());
8245 }
8246 pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
8248 self.set_module_name(field.into());
8249 self
8250 }
8251 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
8253 self.name.as_mut().map(|field| field as _)
8254 }
8255 pub fn name_mut(&mut self) -> &mut String {
8258 self.name.get_or_insert_default()
8259 }
8260 pub fn name_opt(&self) -> Option<&str> {
8262 self.name.as_ref().map(|field| field as _)
8263 }
8264 pub fn set_name<T: Into<String>>(&mut self, field: T) {
8266 self.name = Some(field.into().into());
8267 }
8268 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
8270 self.set_name(field.into());
8271 self
8272 }
8273 }
8274 impl super::GetDatatypeResponse {
8275 pub const fn const_default() -> Self {
8276 Self { datatype: None }
8277 }
8278 #[doc(hidden)]
8279 pub fn default_instance() -> &'static Self {
8280 static DEFAULT: super::GetDatatypeResponse = super::GetDatatypeResponse::const_default();
8281 &DEFAULT
8282 }
8283 pub fn datatype(&self) -> &super::DatatypeDescriptor {
8285 self.datatype
8286 .as_ref()
8287 .map(|field| field as _)
8288 .unwrap_or_else(|| super::DatatypeDescriptor::default_instance() as _)
8289 }
8290 pub fn datatype_opt_mut(&mut self) -> Option<&mut super::DatatypeDescriptor> {
8292 self.datatype.as_mut().map(|field| field as _)
8293 }
8294 pub fn datatype_mut(&mut self) -> &mut super::DatatypeDescriptor {
8297 self.datatype.get_or_insert_default()
8298 }
8299 pub fn datatype_opt(&self) -> Option<&super::DatatypeDescriptor> {
8301 self.datatype.as_ref().map(|field| field as _)
8302 }
8303 pub fn set_datatype<T: Into<super::DatatypeDescriptor>>(&mut self, field: T) {
8305 self.datatype = Some(field.into().into());
8306 }
8307 pub fn with_datatype<T: Into<super::DatatypeDescriptor>>(
8309 mut self,
8310 field: T,
8311 ) -> Self {
8312 self.set_datatype(field.into());
8313 self
8314 }
8315 }
8316 impl super::GetEpochRequest {
8317 pub const fn const_default() -> Self {
8318 Self {
8319 epoch: None,
8320 read_mask: None,
8321 }
8322 }
8323 #[doc(hidden)]
8324 pub fn default_instance() -> &'static Self {
8325 static DEFAULT: super::GetEpochRequest = super::GetEpochRequest::const_default();
8326 &DEFAULT
8327 }
8328 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
8330 self.epoch.as_mut().map(|field| field as _)
8331 }
8332 pub fn epoch_mut(&mut self) -> &mut u64 {
8335 self.epoch.get_or_insert_default()
8336 }
8337 pub fn epoch_opt(&self) -> Option<u64> {
8339 self.epoch.as_ref().map(|field| *field)
8340 }
8341 pub fn set_epoch(&mut self, field: u64) {
8343 self.epoch = Some(field);
8344 }
8345 pub fn with_epoch(mut self, field: u64) -> Self {
8347 self.set_epoch(field);
8348 self
8349 }
8350 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
8352 self.read_mask.as_mut().map(|field| field as _)
8353 }
8354 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
8357 self.read_mask.get_or_insert_default()
8358 }
8359 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
8361 self.read_mask.as_ref().map(|field| field as _)
8362 }
8363 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
8365 self.read_mask = Some(field.into().into());
8366 }
8367 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
8369 mut self,
8370 field: T,
8371 ) -> Self {
8372 self.set_read_mask(field.into());
8373 self
8374 }
8375 }
8376 impl super::GetEpochResponse {
8377 pub const fn const_default() -> Self {
8378 Self { epoch: None }
8379 }
8380 #[doc(hidden)]
8381 pub fn default_instance() -> &'static Self {
8382 static DEFAULT: super::GetEpochResponse = super::GetEpochResponse::const_default();
8383 &DEFAULT
8384 }
8385 pub fn epoch(&self) -> &super::Epoch {
8387 self.epoch
8388 .as_ref()
8389 .map(|field| field as _)
8390 .unwrap_or_else(|| super::Epoch::default_instance() as _)
8391 }
8392 pub fn epoch_opt_mut(&mut self) -> Option<&mut super::Epoch> {
8394 self.epoch.as_mut().map(|field| field as _)
8395 }
8396 pub fn epoch_mut(&mut self) -> &mut super::Epoch {
8399 self.epoch.get_or_insert_default()
8400 }
8401 pub fn epoch_opt(&self) -> Option<&super::Epoch> {
8403 self.epoch.as_ref().map(|field| field as _)
8404 }
8405 pub fn set_epoch<T: Into<super::Epoch>>(&mut self, field: T) {
8407 self.epoch = Some(field.into().into());
8408 }
8409 pub fn with_epoch<T: Into<super::Epoch>>(mut self, field: T) -> Self {
8411 self.set_epoch(field.into());
8412 self
8413 }
8414 }
8415 impl super::GetFunctionRequest {
8416 pub const fn const_default() -> Self {
8417 Self {
8418 package_id: None,
8419 module_name: None,
8420 name: None,
8421 }
8422 }
8423 #[doc(hidden)]
8424 pub fn default_instance() -> &'static Self {
8425 static DEFAULT: super::GetFunctionRequest = super::GetFunctionRequest::const_default();
8426 &DEFAULT
8427 }
8428 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
8430 self.package_id.as_mut().map(|field| field as _)
8431 }
8432 pub fn package_id_mut(&mut self) -> &mut String {
8435 self.package_id.get_or_insert_default()
8436 }
8437 pub fn package_id_opt(&self) -> Option<&str> {
8439 self.package_id.as_ref().map(|field| field as _)
8440 }
8441 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
8443 self.package_id = Some(field.into().into());
8444 }
8445 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
8447 self.set_package_id(field.into());
8448 self
8449 }
8450 pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
8452 self.module_name.as_mut().map(|field| field as _)
8453 }
8454 pub fn module_name_mut(&mut self) -> &mut String {
8457 self.module_name.get_or_insert_default()
8458 }
8459 pub fn module_name_opt(&self) -> Option<&str> {
8461 self.module_name.as_ref().map(|field| field as _)
8462 }
8463 pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
8465 self.module_name = Some(field.into().into());
8466 }
8467 pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
8469 self.set_module_name(field.into());
8470 self
8471 }
8472 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
8474 self.name.as_mut().map(|field| field as _)
8475 }
8476 pub fn name_mut(&mut self) -> &mut String {
8479 self.name.get_or_insert_default()
8480 }
8481 pub fn name_opt(&self) -> Option<&str> {
8483 self.name.as_ref().map(|field| field as _)
8484 }
8485 pub fn set_name<T: Into<String>>(&mut self, field: T) {
8487 self.name = Some(field.into().into());
8488 }
8489 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
8491 self.set_name(field.into());
8492 self
8493 }
8494 }
8495 impl super::GetFunctionResponse {
8496 pub const fn const_default() -> Self {
8497 Self { function: None }
8498 }
8499 #[doc(hidden)]
8500 pub fn default_instance() -> &'static Self {
8501 static DEFAULT: super::GetFunctionResponse = super::GetFunctionResponse::const_default();
8502 &DEFAULT
8503 }
8504 pub fn function(&self) -> &super::FunctionDescriptor {
8506 self.function
8507 .as_ref()
8508 .map(|field| field as _)
8509 .unwrap_or_else(|| super::FunctionDescriptor::default_instance() as _)
8510 }
8511 pub fn function_opt_mut(&mut self) -> Option<&mut super::FunctionDescriptor> {
8513 self.function.as_mut().map(|field| field as _)
8514 }
8515 pub fn function_mut(&mut self) -> &mut super::FunctionDescriptor {
8518 self.function.get_or_insert_default()
8519 }
8520 pub fn function_opt(&self) -> Option<&super::FunctionDescriptor> {
8522 self.function.as_ref().map(|field| field as _)
8523 }
8524 pub fn set_function<T: Into<super::FunctionDescriptor>>(&mut self, field: T) {
8526 self.function = Some(field.into().into());
8527 }
8528 pub fn with_function<T: Into<super::FunctionDescriptor>>(
8530 mut self,
8531 field: T,
8532 ) -> Self {
8533 self.set_function(field.into());
8534 self
8535 }
8536 }
8537 impl super::GetObjectRequest {
8538 pub const fn const_default() -> Self {
8539 Self {
8540 object_id: None,
8541 version: None,
8542 read_mask: None,
8543 }
8544 }
8545 #[doc(hidden)]
8546 pub fn default_instance() -> &'static Self {
8547 static DEFAULT: super::GetObjectRequest = super::GetObjectRequest::const_default();
8548 &DEFAULT
8549 }
8550 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
8552 self.object_id.as_mut().map(|field| field as _)
8553 }
8554 pub fn object_id_mut(&mut self) -> &mut String {
8557 self.object_id.get_or_insert_default()
8558 }
8559 pub fn object_id_opt(&self) -> Option<&str> {
8561 self.object_id.as_ref().map(|field| field as _)
8562 }
8563 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
8565 self.object_id = Some(field.into().into());
8566 }
8567 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
8569 self.set_object_id(field.into());
8570 self
8571 }
8572 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
8574 self.version.as_mut().map(|field| field as _)
8575 }
8576 pub fn version_mut(&mut self) -> &mut u64 {
8579 self.version.get_or_insert_default()
8580 }
8581 pub fn version_opt(&self) -> Option<u64> {
8583 self.version.as_ref().map(|field| *field)
8584 }
8585 pub fn set_version(&mut self, field: u64) {
8587 self.version = Some(field);
8588 }
8589 pub fn with_version(mut self, field: u64) -> Self {
8591 self.set_version(field);
8592 self
8593 }
8594 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
8596 self.read_mask.as_mut().map(|field| field as _)
8597 }
8598 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
8601 self.read_mask.get_or_insert_default()
8602 }
8603 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
8605 self.read_mask.as_ref().map(|field| field as _)
8606 }
8607 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
8609 self.read_mask = Some(field.into().into());
8610 }
8611 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
8613 mut self,
8614 field: T,
8615 ) -> Self {
8616 self.set_read_mask(field.into());
8617 self
8618 }
8619 }
8620 impl super::GetObjectResponse {
8621 pub const fn const_default() -> Self {
8622 Self { object: None }
8623 }
8624 #[doc(hidden)]
8625 pub fn default_instance() -> &'static Self {
8626 static DEFAULT: super::GetObjectResponse = super::GetObjectResponse::const_default();
8627 &DEFAULT
8628 }
8629 pub fn object(&self) -> &super::Object {
8631 self.object
8632 .as_ref()
8633 .map(|field| field as _)
8634 .unwrap_or_else(|| super::Object::default_instance() as _)
8635 }
8636 pub fn object_opt_mut(&mut self) -> Option<&mut super::Object> {
8638 self.object.as_mut().map(|field| field as _)
8639 }
8640 pub fn object_mut(&mut self) -> &mut super::Object {
8643 self.object.get_or_insert_default()
8644 }
8645 pub fn object_opt(&self) -> Option<&super::Object> {
8647 self.object.as_ref().map(|field| field as _)
8648 }
8649 pub fn set_object<T: Into<super::Object>>(&mut self, field: T) {
8651 self.object = Some(field.into().into());
8652 }
8653 pub fn with_object<T: Into<super::Object>>(mut self, field: T) -> Self {
8655 self.set_object(field.into());
8656 self
8657 }
8658 }
8659 impl super::GetObjectResult {
8660 pub const fn const_default() -> Self {
8661 Self { result: None }
8662 }
8663 #[doc(hidden)]
8664 pub fn default_instance() -> &'static Self {
8665 static DEFAULT: super::GetObjectResult = super::GetObjectResult::const_default();
8666 &DEFAULT
8667 }
8668 pub fn object(&self) -> &super::Object {
8670 if let Some(super::get_object_result::Result::Object(field)) = &self.result {
8671 field as _
8672 } else {
8673 super::Object::default_instance() as _
8674 }
8675 }
8676 pub fn object_opt(&self) -> Option<&super::Object> {
8678 if let Some(super::get_object_result::Result::Object(field)) = &self.result {
8679 Some(field as _)
8680 } else {
8681 None
8682 }
8683 }
8684 pub fn object_opt_mut(&mut self) -> Option<&mut super::Object> {
8686 if let Some(super::get_object_result::Result::Object(field)) = &mut self
8687 .result
8688 {
8689 Some(field as _)
8690 } else {
8691 None
8692 }
8693 }
8694 pub fn object_mut(&mut self) -> &mut super::Object {
8698 if self.object_opt_mut().is_none() {
8699 self.result = Some(
8700 super::get_object_result::Result::Object(super::Object::default()),
8701 );
8702 }
8703 self.object_opt_mut().unwrap()
8704 }
8705 pub fn set_object<T: Into<super::Object>>(&mut self, field: T) {
8708 self.result = Some(
8709 super::get_object_result::Result::Object(field.into().into()),
8710 );
8711 }
8712 pub fn with_object<T: Into<super::Object>>(mut self, field: T) -> Self {
8715 self.set_object(field.into());
8716 self
8717 }
8718 pub fn error(&self) -> &super::super::super::super::google::rpc::Status {
8720 if let Some(super::get_object_result::Result::Error(field)) = &self.result {
8721 field as _
8722 } else {
8723 super::super::super::super::google::rpc::Status::default_instance() as _
8724 }
8725 }
8726 pub fn error_opt(
8728 &self,
8729 ) -> Option<&super::super::super::super::google::rpc::Status> {
8730 if let Some(super::get_object_result::Result::Error(field)) = &self.result {
8731 Some(field as _)
8732 } else {
8733 None
8734 }
8735 }
8736 pub fn error_opt_mut(
8738 &mut self,
8739 ) -> Option<&mut super::super::super::super::google::rpc::Status> {
8740 if let Some(super::get_object_result::Result::Error(field)) = &mut self
8741 .result
8742 {
8743 Some(field as _)
8744 } else {
8745 None
8746 }
8747 }
8748 pub fn error_mut(
8752 &mut self,
8753 ) -> &mut super::super::super::super::google::rpc::Status {
8754 if self.error_opt_mut().is_none() {
8755 self.result = Some(
8756 super::get_object_result::Result::Error(
8757 super::super::super::super::google::rpc::Status::default(),
8758 ),
8759 );
8760 }
8761 self.error_opt_mut().unwrap()
8762 }
8763 pub fn set_error<T: Into<super::super::super::super::google::rpc::Status>>(
8766 &mut self,
8767 field: T,
8768 ) {
8769 self.result = Some(
8770 super::get_object_result::Result::Error(field.into().into()),
8771 );
8772 }
8773 pub fn with_error<T: Into<super::super::super::super::google::rpc::Status>>(
8776 mut self,
8777 field: T,
8778 ) -> Self {
8779 self.set_error(field.into());
8780 self
8781 }
8782 }
8783 impl super::GetPackageRequest {
8784 pub const fn const_default() -> Self {
8785 Self { package_id: None }
8786 }
8787 #[doc(hidden)]
8788 pub fn default_instance() -> &'static Self {
8789 static DEFAULT: super::GetPackageRequest = super::GetPackageRequest::const_default();
8790 &DEFAULT
8791 }
8792 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
8794 self.package_id.as_mut().map(|field| field as _)
8795 }
8796 pub fn package_id_mut(&mut self) -> &mut String {
8799 self.package_id.get_or_insert_default()
8800 }
8801 pub fn package_id_opt(&self) -> Option<&str> {
8803 self.package_id.as_ref().map(|field| field as _)
8804 }
8805 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
8807 self.package_id = Some(field.into().into());
8808 }
8809 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
8811 self.set_package_id(field.into());
8812 self
8813 }
8814 }
8815 impl super::GetPackageResponse {
8816 pub const fn const_default() -> Self {
8817 Self { package: None }
8818 }
8819 #[doc(hidden)]
8820 pub fn default_instance() -> &'static Self {
8821 static DEFAULT: super::GetPackageResponse = super::GetPackageResponse::const_default();
8822 &DEFAULT
8823 }
8824 pub fn package(&self) -> &super::Package {
8826 self.package
8827 .as_ref()
8828 .map(|field| field as _)
8829 .unwrap_or_else(|| super::Package::default_instance() as _)
8830 }
8831 pub fn package_opt_mut(&mut self) -> Option<&mut super::Package> {
8833 self.package.as_mut().map(|field| field as _)
8834 }
8835 pub fn package_mut(&mut self) -> &mut super::Package {
8838 self.package.get_or_insert_default()
8839 }
8840 pub fn package_opt(&self) -> Option<&super::Package> {
8842 self.package.as_ref().map(|field| field as _)
8843 }
8844 pub fn set_package<T: Into<super::Package>>(&mut self, field: T) {
8846 self.package = Some(field.into().into());
8847 }
8848 pub fn with_package<T: Into<super::Package>>(mut self, field: T) -> Self {
8850 self.set_package(field.into());
8851 self
8852 }
8853 }
8854 impl super::GetServiceInfoRequest {
8855 pub const fn const_default() -> Self {
8856 Self {}
8857 }
8858 #[doc(hidden)]
8859 pub fn default_instance() -> &'static Self {
8860 static DEFAULT: super::GetServiceInfoRequest = super::GetServiceInfoRequest::const_default();
8861 &DEFAULT
8862 }
8863 }
8864 impl super::GetServiceInfoResponse {
8865 pub const fn const_default() -> Self {
8866 Self {
8867 chain_id: None,
8868 chain: None,
8869 epoch: None,
8870 checkpoint_height: None,
8871 timestamp: None,
8872 lowest_available_checkpoint: None,
8873 lowest_available_checkpoint_objects: None,
8874 server: None,
8875 }
8876 }
8877 #[doc(hidden)]
8878 pub fn default_instance() -> &'static Self {
8879 static DEFAULT: super::GetServiceInfoResponse = super::GetServiceInfoResponse::const_default();
8880 &DEFAULT
8881 }
8882 pub fn chain_id_opt_mut(&mut self) -> Option<&mut String> {
8884 self.chain_id.as_mut().map(|field| field as _)
8885 }
8886 pub fn chain_id_mut(&mut self) -> &mut String {
8889 self.chain_id.get_or_insert_default()
8890 }
8891 pub fn chain_id_opt(&self) -> Option<&str> {
8893 self.chain_id.as_ref().map(|field| field as _)
8894 }
8895 pub fn set_chain_id<T: Into<String>>(&mut self, field: T) {
8897 self.chain_id = Some(field.into().into());
8898 }
8899 pub fn with_chain_id<T: Into<String>>(mut self, field: T) -> Self {
8901 self.set_chain_id(field.into());
8902 self
8903 }
8904 pub fn chain_opt_mut(&mut self) -> Option<&mut String> {
8906 self.chain.as_mut().map(|field| field as _)
8907 }
8908 pub fn chain_mut(&mut self) -> &mut String {
8911 self.chain.get_or_insert_default()
8912 }
8913 pub fn chain_opt(&self) -> Option<&str> {
8915 self.chain.as_ref().map(|field| field as _)
8916 }
8917 pub fn set_chain<T: Into<String>>(&mut self, field: T) {
8919 self.chain = Some(field.into().into());
8920 }
8921 pub fn with_chain<T: Into<String>>(mut self, field: T) -> Self {
8923 self.set_chain(field.into());
8924 self
8925 }
8926 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
8928 self.epoch.as_mut().map(|field| field as _)
8929 }
8930 pub fn epoch_mut(&mut self) -> &mut u64 {
8933 self.epoch.get_or_insert_default()
8934 }
8935 pub fn epoch_opt(&self) -> Option<u64> {
8937 self.epoch.as_ref().map(|field| *field)
8938 }
8939 pub fn set_epoch(&mut self, field: u64) {
8941 self.epoch = Some(field);
8942 }
8943 pub fn with_epoch(mut self, field: u64) -> Self {
8945 self.set_epoch(field);
8946 self
8947 }
8948 pub fn checkpoint_height_opt_mut(&mut self) -> Option<&mut u64> {
8950 self.checkpoint_height.as_mut().map(|field| field as _)
8951 }
8952 pub fn checkpoint_height_mut(&mut self) -> &mut u64 {
8955 self.checkpoint_height.get_or_insert_default()
8956 }
8957 pub fn checkpoint_height_opt(&self) -> Option<u64> {
8959 self.checkpoint_height.as_ref().map(|field| *field)
8960 }
8961 pub fn set_checkpoint_height(&mut self, field: u64) {
8963 self.checkpoint_height = Some(field);
8964 }
8965 pub fn with_checkpoint_height(mut self, field: u64) -> Self {
8967 self.set_checkpoint_height(field);
8968 self
8969 }
8970 pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
8972 self.timestamp.as_mut().map(|field| field as _)
8973 }
8974 pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
8977 self.timestamp.get_or_insert_default()
8978 }
8979 pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
8981 self.timestamp.as_ref().map(|field| field as _)
8982 }
8983 pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
8985 self.timestamp = Some(field.into().into());
8986 }
8987 pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
8989 mut self,
8990 field: T,
8991 ) -> Self {
8992 self.set_timestamp(field.into());
8993 self
8994 }
8995 pub fn lowest_available_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
8997 self.lowest_available_checkpoint.as_mut().map(|field| field as _)
8998 }
8999 pub fn lowest_available_checkpoint_mut(&mut self) -> &mut u64 {
9002 self.lowest_available_checkpoint.get_or_insert_default()
9003 }
9004 pub fn lowest_available_checkpoint_opt(&self) -> Option<u64> {
9006 self.lowest_available_checkpoint.as_ref().map(|field| *field)
9007 }
9008 pub fn set_lowest_available_checkpoint(&mut self, field: u64) {
9010 self.lowest_available_checkpoint = Some(field);
9011 }
9012 pub fn with_lowest_available_checkpoint(mut self, field: u64) -> Self {
9014 self.set_lowest_available_checkpoint(field);
9015 self
9016 }
9017 pub fn lowest_available_checkpoint_objects_opt_mut(
9019 &mut self,
9020 ) -> Option<&mut u64> {
9021 self.lowest_available_checkpoint_objects.as_mut().map(|field| field as _)
9022 }
9023 pub fn lowest_available_checkpoint_objects_mut(&mut self) -> &mut u64 {
9026 self.lowest_available_checkpoint_objects.get_or_insert_default()
9027 }
9028 pub fn lowest_available_checkpoint_objects_opt(&self) -> Option<u64> {
9030 self.lowest_available_checkpoint_objects.as_ref().map(|field| *field)
9031 }
9032 pub fn set_lowest_available_checkpoint_objects(&mut self, field: u64) {
9034 self.lowest_available_checkpoint_objects = Some(field);
9035 }
9036 pub fn with_lowest_available_checkpoint_objects(mut self, field: u64) -> Self {
9038 self.set_lowest_available_checkpoint_objects(field);
9039 self
9040 }
9041 pub fn server_opt_mut(&mut self) -> Option<&mut String> {
9043 self.server.as_mut().map(|field| field as _)
9044 }
9045 pub fn server_mut(&mut self) -> &mut String {
9048 self.server.get_or_insert_default()
9049 }
9050 pub fn server_opt(&self) -> Option<&str> {
9052 self.server.as_ref().map(|field| field as _)
9053 }
9054 pub fn set_server<T: Into<String>>(&mut self, field: T) {
9056 self.server = Some(field.into().into());
9057 }
9058 pub fn with_server<T: Into<String>>(mut self, field: T) -> Self {
9060 self.set_server(field.into());
9061 self
9062 }
9063 }
9064 impl super::GetTransactionRequest {
9065 pub const fn const_default() -> Self {
9066 Self {
9067 digest: None,
9068 read_mask: None,
9069 }
9070 }
9071 #[doc(hidden)]
9072 pub fn default_instance() -> &'static Self {
9073 static DEFAULT: super::GetTransactionRequest = super::GetTransactionRequest::const_default();
9074 &DEFAULT
9075 }
9076 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
9078 self.digest.as_mut().map(|field| field as _)
9079 }
9080 pub fn digest_mut(&mut self) -> &mut String {
9083 self.digest.get_or_insert_default()
9084 }
9085 pub fn digest_opt(&self) -> Option<&str> {
9087 self.digest.as_ref().map(|field| field as _)
9088 }
9089 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
9091 self.digest = Some(field.into().into());
9092 }
9093 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
9095 self.set_digest(field.into());
9096 self
9097 }
9098 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
9100 self.read_mask.as_mut().map(|field| field as _)
9101 }
9102 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
9105 self.read_mask.get_or_insert_default()
9106 }
9107 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
9109 self.read_mask.as_ref().map(|field| field as _)
9110 }
9111 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
9113 self.read_mask = Some(field.into().into());
9114 }
9115 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
9117 mut self,
9118 field: T,
9119 ) -> Self {
9120 self.set_read_mask(field.into());
9121 self
9122 }
9123 }
9124 impl super::GetTransactionResponse {
9125 pub const fn const_default() -> Self {
9126 Self { transaction: None }
9127 }
9128 #[doc(hidden)]
9129 pub fn default_instance() -> &'static Self {
9130 static DEFAULT: super::GetTransactionResponse = super::GetTransactionResponse::const_default();
9131 &DEFAULT
9132 }
9133 pub fn transaction(&self) -> &super::ExecutedTransaction {
9135 self.transaction
9136 .as_ref()
9137 .map(|field| field as _)
9138 .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
9139 }
9140 pub fn transaction_opt_mut(
9142 &mut self,
9143 ) -> Option<&mut super::ExecutedTransaction> {
9144 self.transaction.as_mut().map(|field| field as _)
9145 }
9146 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
9149 self.transaction.get_or_insert_default()
9150 }
9151 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
9153 self.transaction.as_ref().map(|field| field as _)
9154 }
9155 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
9157 &mut self,
9158 field: T,
9159 ) {
9160 self.transaction = Some(field.into().into());
9161 }
9162 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
9164 mut self,
9165 field: T,
9166 ) -> Self {
9167 self.set_transaction(field.into());
9168 self
9169 }
9170 }
9171 impl super::GetTransactionResult {
9172 pub const fn const_default() -> Self {
9173 Self { result: None }
9174 }
9175 #[doc(hidden)]
9176 pub fn default_instance() -> &'static Self {
9177 static DEFAULT: super::GetTransactionResult = super::GetTransactionResult::const_default();
9178 &DEFAULT
9179 }
9180 pub fn transaction(&self) -> &super::ExecutedTransaction {
9182 if let Some(super::get_transaction_result::Result::Transaction(field)) = &self
9183 .result
9184 {
9185 field as _
9186 } else {
9187 super::ExecutedTransaction::default_instance() as _
9188 }
9189 }
9190 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
9192 if let Some(super::get_transaction_result::Result::Transaction(field)) = &self
9193 .result
9194 {
9195 Some(field as _)
9196 } else {
9197 None
9198 }
9199 }
9200 pub fn transaction_opt_mut(
9202 &mut self,
9203 ) -> Option<&mut super::ExecutedTransaction> {
9204 if let Some(super::get_transaction_result::Result::Transaction(field)) = &mut self
9205 .result
9206 {
9207 Some(field as _)
9208 } else {
9209 None
9210 }
9211 }
9212 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
9216 if self.transaction_opt_mut().is_none() {
9217 self.result = Some(
9218 super::get_transaction_result::Result::Transaction(
9219 super::ExecutedTransaction::default(),
9220 ),
9221 );
9222 }
9223 self.transaction_opt_mut().unwrap()
9224 }
9225 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
9228 &mut self,
9229 field: T,
9230 ) {
9231 self.result = Some(
9232 super::get_transaction_result::Result::Transaction(field.into().into()),
9233 );
9234 }
9235 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
9238 mut self,
9239 field: T,
9240 ) -> Self {
9241 self.set_transaction(field.into());
9242 self
9243 }
9244 pub fn error(&self) -> &super::super::super::super::google::rpc::Status {
9246 if let Some(super::get_transaction_result::Result::Error(field)) = &self
9247 .result
9248 {
9249 field as _
9250 } else {
9251 super::super::super::super::google::rpc::Status::default_instance() as _
9252 }
9253 }
9254 pub fn error_opt(
9256 &self,
9257 ) -> Option<&super::super::super::super::google::rpc::Status> {
9258 if let Some(super::get_transaction_result::Result::Error(field)) = &self
9259 .result
9260 {
9261 Some(field as _)
9262 } else {
9263 None
9264 }
9265 }
9266 pub fn error_opt_mut(
9268 &mut self,
9269 ) -> Option<&mut super::super::super::super::google::rpc::Status> {
9270 if let Some(super::get_transaction_result::Result::Error(field)) = &mut self
9271 .result
9272 {
9273 Some(field as _)
9274 } else {
9275 None
9276 }
9277 }
9278 pub fn error_mut(
9282 &mut self,
9283 ) -> &mut super::super::super::super::google::rpc::Status {
9284 if self.error_opt_mut().is_none() {
9285 self.result = Some(
9286 super::get_transaction_result::Result::Error(
9287 super::super::super::super::google::rpc::Status::default(),
9288 ),
9289 );
9290 }
9291 self.error_opt_mut().unwrap()
9292 }
9293 pub fn set_error<T: Into<super::super::super::super::google::rpc::Status>>(
9296 &mut self,
9297 field: T,
9298 ) {
9299 self.result = Some(
9300 super::get_transaction_result::Result::Error(field.into().into()),
9301 );
9302 }
9303 pub fn with_error<T: Into<super::super::super::super::google::rpc::Status>>(
9306 mut self,
9307 field: T,
9308 ) -> Self {
9309 self.set_error(field.into());
9310 self
9311 }
9312 }
9313 impl super::IndexError {
9314 pub const fn const_default() -> Self {
9315 Self {
9316 index: None,
9317 subresult: None,
9318 }
9319 }
9320 #[doc(hidden)]
9321 pub fn default_instance() -> &'static Self {
9322 static DEFAULT: super::IndexError = super::IndexError::const_default();
9323 &DEFAULT
9324 }
9325 pub fn index_opt_mut(&mut self) -> Option<&mut u32> {
9327 self.index.as_mut().map(|field| field as _)
9328 }
9329 pub fn index_mut(&mut self) -> &mut u32 {
9332 self.index.get_or_insert_default()
9333 }
9334 pub fn index_opt(&self) -> Option<u32> {
9336 self.index.as_ref().map(|field| *field)
9337 }
9338 pub fn set_index(&mut self, field: u32) {
9340 self.index = Some(field);
9341 }
9342 pub fn with_index(mut self, field: u32) -> Self {
9344 self.set_index(field);
9345 self
9346 }
9347 pub fn subresult_opt_mut(&mut self) -> Option<&mut u32> {
9349 self.subresult.as_mut().map(|field| field as _)
9350 }
9351 pub fn subresult_mut(&mut self) -> &mut u32 {
9354 self.subresult.get_or_insert_default()
9355 }
9356 pub fn subresult_opt(&self) -> Option<u32> {
9358 self.subresult.as_ref().map(|field| *field)
9359 }
9360 pub fn set_subresult(&mut self, field: u32) {
9362 self.subresult = Some(field);
9363 }
9364 pub fn with_subresult(mut self, field: u32) -> Self {
9366 self.set_subresult(field);
9367 self
9368 }
9369 }
9370 impl super::Input {
9371 pub const fn const_default() -> Self {
9372 Self {
9373 kind: None,
9374 pure: None,
9375 object_id: None,
9376 version: None,
9377 digest: None,
9378 mutable: None,
9379 mutability: None,
9380 funds_withdrawal: None,
9381 literal: None,
9382 }
9383 }
9384 #[doc(hidden)]
9385 pub fn default_instance() -> &'static Self {
9386 static DEFAULT: super::Input = super::Input::const_default();
9387 &DEFAULT
9388 }
9389 pub fn with_kind<T: Into<super::input::InputKind>>(mut self, field: T) -> Self {
9391 self.set_kind(field.into());
9392 self
9393 }
9394 pub fn pure_opt(&self) -> Option<&[u8]> {
9396 self.pure.as_ref().map(|field| field as _)
9397 }
9398 pub fn set_pure<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9400 self.pure = Some(field.into().into());
9401 }
9402 pub fn with_pure<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
9404 self.set_pure(field.into());
9405 self
9406 }
9407 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
9409 self.object_id.as_mut().map(|field| field as _)
9410 }
9411 pub fn object_id_mut(&mut self) -> &mut String {
9414 self.object_id.get_or_insert_default()
9415 }
9416 pub fn object_id_opt(&self) -> Option<&str> {
9418 self.object_id.as_ref().map(|field| field as _)
9419 }
9420 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
9422 self.object_id = Some(field.into().into());
9423 }
9424 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
9426 self.set_object_id(field.into());
9427 self
9428 }
9429 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
9431 self.version.as_mut().map(|field| field as _)
9432 }
9433 pub fn version_mut(&mut self) -> &mut u64 {
9436 self.version.get_or_insert_default()
9437 }
9438 pub fn version_opt(&self) -> Option<u64> {
9440 self.version.as_ref().map(|field| *field)
9441 }
9442 pub fn set_version(&mut self, field: u64) {
9444 self.version = Some(field);
9445 }
9446 pub fn with_version(mut self, field: u64) -> Self {
9448 self.set_version(field);
9449 self
9450 }
9451 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
9453 self.digest.as_mut().map(|field| field as _)
9454 }
9455 pub fn digest_mut(&mut self) -> &mut String {
9458 self.digest.get_or_insert_default()
9459 }
9460 pub fn digest_opt(&self) -> Option<&str> {
9462 self.digest.as_ref().map(|field| field as _)
9463 }
9464 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
9466 self.digest = Some(field.into().into());
9467 }
9468 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
9470 self.set_digest(field.into());
9471 self
9472 }
9473 pub fn mutable_opt_mut(&mut self) -> Option<&mut bool> {
9475 self.mutable.as_mut().map(|field| field as _)
9476 }
9477 pub fn mutable_mut(&mut self) -> &mut bool {
9480 self.mutable.get_or_insert_default()
9481 }
9482 pub fn mutable_opt(&self) -> Option<bool> {
9484 self.mutable.as_ref().map(|field| *field)
9485 }
9486 pub fn set_mutable(&mut self, field: bool) {
9488 self.mutable = Some(field);
9489 }
9490 pub fn with_mutable(mut self, field: bool) -> Self {
9492 self.set_mutable(field);
9493 self
9494 }
9495 pub fn with_mutability<T: Into<super::input::Mutability>>(
9497 mut self,
9498 field: T,
9499 ) -> Self {
9500 self.set_mutability(field.into());
9501 self
9502 }
9503 pub fn funds_withdrawal(&self) -> &super::FundsWithdrawal {
9505 self.funds_withdrawal
9506 .as_ref()
9507 .map(|field| field as _)
9508 .unwrap_or_else(|| super::FundsWithdrawal::default_instance() as _)
9509 }
9510 pub fn funds_withdrawal_opt_mut(
9512 &mut self,
9513 ) -> Option<&mut super::FundsWithdrawal> {
9514 self.funds_withdrawal.as_mut().map(|field| field as _)
9515 }
9516 pub fn funds_withdrawal_mut(&mut self) -> &mut super::FundsWithdrawal {
9519 self.funds_withdrawal.get_or_insert_default()
9520 }
9521 pub fn funds_withdrawal_opt(&self) -> Option<&super::FundsWithdrawal> {
9523 self.funds_withdrawal.as_ref().map(|field| field as _)
9524 }
9525 pub fn set_funds_withdrawal<T: Into<super::FundsWithdrawal>>(
9527 &mut self,
9528 field: T,
9529 ) {
9530 self.funds_withdrawal = Some(field.into().into());
9531 }
9532 pub fn with_funds_withdrawal<T: Into<super::FundsWithdrawal>>(
9534 mut self,
9535 field: T,
9536 ) -> Self {
9537 self.set_funds_withdrawal(field.into());
9538 self
9539 }
9540 pub fn literal_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
9542 self.literal.as_mut().map(|field| field as _)
9543 }
9544 pub fn literal_mut(&mut self) -> &mut ::prost_types::Value {
9547 self.literal.get_or_insert_default()
9548 }
9549 pub fn literal_opt(&self) -> Option<&::prost_types::Value> {
9551 self.literal.as_ref().map(|field| field as _)
9552 }
9553 pub fn set_literal<T: Into<::prost_types::Value>>(&mut self, field: T) {
9555 self.literal = Some(field.into().into());
9556 }
9557 pub fn with_literal<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
9559 self.set_literal(field.into());
9560 self
9561 }
9562 }
9563 impl super::Jwk {
9564 pub const fn const_default() -> Self {
9565 Self {
9566 kty: None,
9567 e: None,
9568 n: None,
9569 alg: None,
9570 }
9571 }
9572 #[doc(hidden)]
9573 pub fn default_instance() -> &'static Self {
9574 static DEFAULT: super::Jwk = super::Jwk::const_default();
9575 &DEFAULT
9576 }
9577 pub fn kty_opt_mut(&mut self) -> Option<&mut String> {
9579 self.kty.as_mut().map(|field| field as _)
9580 }
9581 pub fn kty_mut(&mut self) -> &mut String {
9584 self.kty.get_or_insert_default()
9585 }
9586 pub fn kty_opt(&self) -> Option<&str> {
9588 self.kty.as_ref().map(|field| field as _)
9589 }
9590 pub fn set_kty<T: Into<String>>(&mut self, field: T) {
9592 self.kty = Some(field.into().into());
9593 }
9594 pub fn with_kty<T: Into<String>>(mut self, field: T) -> Self {
9596 self.set_kty(field.into());
9597 self
9598 }
9599 pub fn e_opt_mut(&mut self) -> Option<&mut String> {
9601 self.e.as_mut().map(|field| field as _)
9602 }
9603 pub fn e_mut(&mut self) -> &mut String {
9606 self.e.get_or_insert_default()
9607 }
9608 pub fn e_opt(&self) -> Option<&str> {
9610 self.e.as_ref().map(|field| field as _)
9611 }
9612 pub fn set_e<T: Into<String>>(&mut self, field: T) {
9614 self.e = Some(field.into().into());
9615 }
9616 pub fn with_e<T: Into<String>>(mut self, field: T) -> Self {
9618 self.set_e(field.into());
9619 self
9620 }
9621 pub fn n_opt_mut(&mut self) -> Option<&mut String> {
9623 self.n.as_mut().map(|field| field as _)
9624 }
9625 pub fn n_mut(&mut self) -> &mut String {
9628 self.n.get_or_insert_default()
9629 }
9630 pub fn n_opt(&self) -> Option<&str> {
9632 self.n.as_ref().map(|field| field as _)
9633 }
9634 pub fn set_n<T: Into<String>>(&mut self, field: T) {
9636 self.n = Some(field.into().into());
9637 }
9638 pub fn with_n<T: Into<String>>(mut self, field: T) -> Self {
9640 self.set_n(field.into());
9641 self
9642 }
9643 pub fn alg_opt_mut(&mut self) -> Option<&mut String> {
9645 self.alg.as_mut().map(|field| field as _)
9646 }
9647 pub fn alg_mut(&mut self) -> &mut String {
9650 self.alg.get_or_insert_default()
9651 }
9652 pub fn alg_opt(&self) -> Option<&str> {
9654 self.alg.as_ref().map(|field| field as _)
9655 }
9656 pub fn set_alg<T: Into<String>>(&mut self, field: T) {
9658 self.alg = Some(field.into().into());
9659 }
9660 pub fn with_alg<T: Into<String>>(mut self, field: T) -> Self {
9662 self.set_alg(field.into());
9663 self
9664 }
9665 }
9666 impl super::JwkId {
9667 pub const fn const_default() -> Self {
9668 Self { iss: None, kid: None }
9669 }
9670 #[doc(hidden)]
9671 pub fn default_instance() -> &'static Self {
9672 static DEFAULT: super::JwkId = super::JwkId::const_default();
9673 &DEFAULT
9674 }
9675 pub fn iss_opt_mut(&mut self) -> Option<&mut String> {
9677 self.iss.as_mut().map(|field| field as _)
9678 }
9679 pub fn iss_mut(&mut self) -> &mut String {
9682 self.iss.get_or_insert_default()
9683 }
9684 pub fn iss_opt(&self) -> Option<&str> {
9686 self.iss.as_ref().map(|field| field as _)
9687 }
9688 pub fn set_iss<T: Into<String>>(&mut self, field: T) {
9690 self.iss = Some(field.into().into());
9691 }
9692 pub fn with_iss<T: Into<String>>(mut self, field: T) -> Self {
9694 self.set_iss(field.into());
9695 self
9696 }
9697 pub fn kid_opt_mut(&mut self) -> Option<&mut String> {
9699 self.kid.as_mut().map(|field| field as _)
9700 }
9701 pub fn kid_mut(&mut self) -> &mut String {
9704 self.kid.get_or_insert_default()
9705 }
9706 pub fn kid_opt(&self) -> Option<&str> {
9708 self.kid.as_ref().map(|field| field as _)
9709 }
9710 pub fn set_kid<T: Into<String>>(&mut self, field: T) {
9712 self.kid = Some(field.into().into());
9713 }
9714 pub fn with_kid<T: Into<String>>(mut self, field: T) -> Self {
9716 self.set_kid(field.into());
9717 self
9718 }
9719 }
9720 impl super::Linkage {
9721 pub const fn const_default() -> Self {
9722 Self {
9723 original_id: None,
9724 upgraded_id: None,
9725 upgraded_version: None,
9726 }
9727 }
9728 #[doc(hidden)]
9729 pub fn default_instance() -> &'static Self {
9730 static DEFAULT: super::Linkage = super::Linkage::const_default();
9731 &DEFAULT
9732 }
9733 pub fn original_id_opt_mut(&mut self) -> Option<&mut String> {
9735 self.original_id.as_mut().map(|field| field as _)
9736 }
9737 pub fn original_id_mut(&mut self) -> &mut String {
9740 self.original_id.get_or_insert_default()
9741 }
9742 pub fn original_id_opt(&self) -> Option<&str> {
9744 self.original_id.as_ref().map(|field| field as _)
9745 }
9746 pub fn set_original_id<T: Into<String>>(&mut self, field: T) {
9748 self.original_id = Some(field.into().into());
9749 }
9750 pub fn with_original_id<T: Into<String>>(mut self, field: T) -> Self {
9752 self.set_original_id(field.into());
9753 self
9754 }
9755 pub fn upgraded_id_opt_mut(&mut self) -> Option<&mut String> {
9757 self.upgraded_id.as_mut().map(|field| field as _)
9758 }
9759 pub fn upgraded_id_mut(&mut self) -> &mut String {
9762 self.upgraded_id.get_or_insert_default()
9763 }
9764 pub fn upgraded_id_opt(&self) -> Option<&str> {
9766 self.upgraded_id.as_ref().map(|field| field as _)
9767 }
9768 pub fn set_upgraded_id<T: Into<String>>(&mut self, field: T) {
9770 self.upgraded_id = Some(field.into().into());
9771 }
9772 pub fn with_upgraded_id<T: Into<String>>(mut self, field: T) -> Self {
9774 self.set_upgraded_id(field.into());
9775 self
9776 }
9777 pub fn upgraded_version_opt_mut(&mut self) -> Option<&mut u64> {
9779 self.upgraded_version.as_mut().map(|field| field as _)
9780 }
9781 pub fn upgraded_version_mut(&mut self) -> &mut u64 {
9784 self.upgraded_version.get_or_insert_default()
9785 }
9786 pub fn upgraded_version_opt(&self) -> Option<u64> {
9788 self.upgraded_version.as_ref().map(|field| *field)
9789 }
9790 pub fn set_upgraded_version(&mut self, field: u64) {
9792 self.upgraded_version = Some(field);
9793 }
9794 pub fn with_upgraded_version(mut self, field: u64) -> Self {
9796 self.set_upgraded_version(field);
9797 self
9798 }
9799 }
9800 impl super::ListBalancesRequest {
9801 pub const fn const_default() -> Self {
9802 Self {
9803 owner: None,
9804 page_size: None,
9805 page_token: None,
9806 }
9807 }
9808 #[doc(hidden)]
9809 pub fn default_instance() -> &'static Self {
9810 static DEFAULT: super::ListBalancesRequest = super::ListBalancesRequest::const_default();
9811 &DEFAULT
9812 }
9813 pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
9815 self.owner.as_mut().map(|field| field as _)
9816 }
9817 pub fn owner_mut(&mut self) -> &mut String {
9820 self.owner.get_or_insert_default()
9821 }
9822 pub fn owner_opt(&self) -> Option<&str> {
9824 self.owner.as_ref().map(|field| field as _)
9825 }
9826 pub fn set_owner<T: Into<String>>(&mut self, field: T) {
9828 self.owner = Some(field.into().into());
9829 }
9830 pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
9832 self.set_owner(field.into());
9833 self
9834 }
9835 pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
9837 self.page_size.as_mut().map(|field| field as _)
9838 }
9839 pub fn page_size_mut(&mut self) -> &mut u32 {
9842 self.page_size.get_or_insert_default()
9843 }
9844 pub fn page_size_opt(&self) -> Option<u32> {
9846 self.page_size.as_ref().map(|field| *field)
9847 }
9848 pub fn set_page_size(&mut self, field: u32) {
9850 self.page_size = Some(field);
9851 }
9852 pub fn with_page_size(mut self, field: u32) -> Self {
9854 self.set_page_size(field);
9855 self
9856 }
9857 pub fn page_token_opt(&self) -> Option<&[u8]> {
9859 self.page_token.as_ref().map(|field| field as _)
9860 }
9861 pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9863 self.page_token = Some(field.into().into());
9864 }
9865 pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
9867 mut self,
9868 field: T,
9869 ) -> Self {
9870 self.set_page_token(field.into());
9871 self
9872 }
9873 }
9874 impl super::ListBalancesResponse {
9875 pub const fn const_default() -> Self {
9876 Self {
9877 balances: Vec::new(),
9878 next_page_token: None,
9879 }
9880 }
9881 #[doc(hidden)]
9882 pub fn default_instance() -> &'static Self {
9883 static DEFAULT: super::ListBalancesResponse = super::ListBalancesResponse::const_default();
9884 &DEFAULT
9885 }
9886 pub fn balances(&self) -> &[super::Balance] {
9888 &self.balances
9889 }
9890 pub fn balances_mut(&mut self) -> &mut Vec<super::Balance> {
9893 &mut self.balances
9894 }
9895 pub fn set_balances(&mut self, field: Vec<super::Balance>) {
9897 self.balances = field;
9898 }
9899 pub fn with_balances(mut self, field: Vec<super::Balance>) -> Self {
9901 self.set_balances(field);
9902 self
9903 }
9904 pub fn next_page_token_opt(&self) -> Option<&[u8]> {
9906 self.next_page_token.as_ref().map(|field| field as _)
9907 }
9908 pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9910 self.next_page_token = Some(field.into().into());
9911 }
9912 pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
9914 mut self,
9915 field: T,
9916 ) -> Self {
9917 self.set_next_page_token(field.into());
9918 self
9919 }
9920 }
9921 impl super::ListCheckpointsRequest {
9922 pub const fn const_default() -> Self {
9923 Self {
9924 read_mask: None,
9925 start_checkpoint: None,
9926 end_checkpoint: None,
9927 filter: None,
9928 options: None,
9929 }
9930 }
9931 #[doc(hidden)]
9932 pub fn default_instance() -> &'static Self {
9933 static DEFAULT: super::ListCheckpointsRequest = super::ListCheckpointsRequest::const_default();
9934 &DEFAULT
9935 }
9936 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
9938 self.read_mask.as_mut().map(|field| field as _)
9939 }
9940 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
9943 self.read_mask.get_or_insert_default()
9944 }
9945 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
9947 self.read_mask.as_ref().map(|field| field as _)
9948 }
9949 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
9951 self.read_mask = Some(field.into().into());
9952 }
9953 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
9955 mut self,
9956 field: T,
9957 ) -> Self {
9958 self.set_read_mask(field.into());
9959 self
9960 }
9961 pub fn start_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
9963 self.start_checkpoint.as_mut().map(|field| field as _)
9964 }
9965 pub fn start_checkpoint_mut(&mut self) -> &mut u64 {
9968 self.start_checkpoint.get_or_insert_default()
9969 }
9970 pub fn start_checkpoint_opt(&self) -> Option<u64> {
9972 self.start_checkpoint.as_ref().map(|field| *field)
9973 }
9974 pub fn set_start_checkpoint(&mut self, field: u64) {
9976 self.start_checkpoint = Some(field);
9977 }
9978 pub fn with_start_checkpoint(mut self, field: u64) -> Self {
9980 self.set_start_checkpoint(field);
9981 self
9982 }
9983 pub fn end_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
9985 self.end_checkpoint.as_mut().map(|field| field as _)
9986 }
9987 pub fn end_checkpoint_mut(&mut self) -> &mut u64 {
9990 self.end_checkpoint.get_or_insert_default()
9991 }
9992 pub fn end_checkpoint_opt(&self) -> Option<u64> {
9994 self.end_checkpoint.as_ref().map(|field| *field)
9995 }
9996 pub fn set_end_checkpoint(&mut self, field: u64) {
9998 self.end_checkpoint = Some(field);
9999 }
10000 pub fn with_end_checkpoint(mut self, field: u64) -> Self {
10002 self.set_end_checkpoint(field);
10003 self
10004 }
10005 pub fn filter(&self) -> &super::TransactionFilter {
10007 self.filter
10008 .as_ref()
10009 .map(|field| field as _)
10010 .unwrap_or_else(|| super::TransactionFilter::default_instance() as _)
10011 }
10012 pub fn filter_opt_mut(&mut self) -> Option<&mut super::TransactionFilter> {
10014 self.filter.as_mut().map(|field| field as _)
10015 }
10016 pub fn filter_mut(&mut self) -> &mut super::TransactionFilter {
10019 self.filter.get_or_insert_default()
10020 }
10021 pub fn filter_opt(&self) -> Option<&super::TransactionFilter> {
10023 self.filter.as_ref().map(|field| field as _)
10024 }
10025 pub fn set_filter<T: Into<super::TransactionFilter>>(&mut self, field: T) {
10027 self.filter = Some(field.into().into());
10028 }
10029 pub fn with_filter<T: Into<super::TransactionFilter>>(
10031 mut self,
10032 field: T,
10033 ) -> Self {
10034 self.set_filter(field.into());
10035 self
10036 }
10037 pub fn options(&self) -> &super::QueryOptions {
10039 self.options
10040 .as_ref()
10041 .map(|field| field as _)
10042 .unwrap_or_else(|| super::QueryOptions::default_instance() as _)
10043 }
10044 pub fn options_opt_mut(&mut self) -> Option<&mut super::QueryOptions> {
10046 self.options.as_mut().map(|field| field as _)
10047 }
10048 pub fn options_mut(&mut self) -> &mut super::QueryOptions {
10051 self.options.get_or_insert_default()
10052 }
10053 pub fn options_opt(&self) -> Option<&super::QueryOptions> {
10055 self.options.as_ref().map(|field| field as _)
10056 }
10057 pub fn set_options<T: Into<super::QueryOptions>>(&mut self, field: T) {
10059 self.options = Some(field.into().into());
10060 }
10061 pub fn with_options<T: Into<super::QueryOptions>>(mut self, field: T) -> Self {
10063 self.set_options(field.into());
10064 self
10065 }
10066 }
10067 impl super::ListCheckpointsResponse {
10068 pub const fn const_default() -> Self {
10069 Self {
10070 checkpoint: None,
10071 watermark: None,
10072 end: None,
10073 }
10074 }
10075 #[doc(hidden)]
10076 pub fn default_instance() -> &'static Self {
10077 static DEFAULT: super::ListCheckpointsResponse = super::ListCheckpointsResponse::const_default();
10078 &DEFAULT
10079 }
10080 pub fn checkpoint(&self) -> &super::Checkpoint {
10082 self.checkpoint
10083 .as_ref()
10084 .map(|field| field as _)
10085 .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
10086 }
10087 pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
10089 self.checkpoint.as_mut().map(|field| field as _)
10090 }
10091 pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
10094 self.checkpoint.get_or_insert_default()
10095 }
10096 pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
10098 self.checkpoint.as_ref().map(|field| field as _)
10099 }
10100 pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
10102 self.checkpoint = Some(field.into().into());
10103 }
10104 pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
10106 self.set_checkpoint(field.into());
10107 self
10108 }
10109 pub fn watermark(&self) -> &super::Watermark {
10111 self.watermark
10112 .as_ref()
10113 .map(|field| field as _)
10114 .unwrap_or_else(|| super::Watermark::default_instance() as _)
10115 }
10116 pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
10118 self.watermark.as_mut().map(|field| field as _)
10119 }
10120 pub fn watermark_mut(&mut self) -> &mut super::Watermark {
10123 self.watermark.get_or_insert_default()
10124 }
10125 pub fn watermark_opt(&self) -> Option<&super::Watermark> {
10127 self.watermark.as_ref().map(|field| field as _)
10128 }
10129 pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
10131 self.watermark = Some(field.into().into());
10132 }
10133 pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
10135 self.set_watermark(field.into());
10136 self
10137 }
10138 pub fn end(&self) -> &super::QueryEnd {
10140 self.end
10141 .as_ref()
10142 .map(|field| field as _)
10143 .unwrap_or_else(|| super::QueryEnd::default_instance() as _)
10144 }
10145 pub fn end_opt_mut(&mut self) -> Option<&mut super::QueryEnd> {
10147 self.end.as_mut().map(|field| field as _)
10148 }
10149 pub fn end_mut(&mut self) -> &mut super::QueryEnd {
10152 self.end.get_or_insert_default()
10153 }
10154 pub fn end_opt(&self) -> Option<&super::QueryEnd> {
10156 self.end.as_ref().map(|field| field as _)
10157 }
10158 pub fn set_end<T: Into<super::QueryEnd>>(&mut self, field: T) {
10160 self.end = Some(field.into().into());
10161 }
10162 pub fn with_end<T: Into<super::QueryEnd>>(mut self, field: T) -> Self {
10164 self.set_end(field.into());
10165 self
10166 }
10167 }
10168 impl super::ListDynamicFieldsRequest {
10169 pub const fn const_default() -> Self {
10170 Self {
10171 parent: None,
10172 page_size: None,
10173 page_token: None,
10174 read_mask: None,
10175 }
10176 }
10177 #[doc(hidden)]
10178 pub fn default_instance() -> &'static Self {
10179 static DEFAULT: super::ListDynamicFieldsRequest = super::ListDynamicFieldsRequest::const_default();
10180 &DEFAULT
10181 }
10182 pub fn parent_opt_mut(&mut self) -> Option<&mut String> {
10184 self.parent.as_mut().map(|field| field as _)
10185 }
10186 pub fn parent_mut(&mut self) -> &mut String {
10189 self.parent.get_or_insert_default()
10190 }
10191 pub fn parent_opt(&self) -> Option<&str> {
10193 self.parent.as_ref().map(|field| field as _)
10194 }
10195 pub fn set_parent<T: Into<String>>(&mut self, field: T) {
10197 self.parent = Some(field.into().into());
10198 }
10199 pub fn with_parent<T: Into<String>>(mut self, field: T) -> Self {
10201 self.set_parent(field.into());
10202 self
10203 }
10204 pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
10206 self.page_size.as_mut().map(|field| field as _)
10207 }
10208 pub fn page_size_mut(&mut self) -> &mut u32 {
10211 self.page_size.get_or_insert_default()
10212 }
10213 pub fn page_size_opt(&self) -> Option<u32> {
10215 self.page_size.as_ref().map(|field| *field)
10216 }
10217 pub fn set_page_size(&mut self, field: u32) {
10219 self.page_size = Some(field);
10220 }
10221 pub fn with_page_size(mut self, field: u32) -> Self {
10223 self.set_page_size(field);
10224 self
10225 }
10226 pub fn page_token_opt(&self) -> Option<&[u8]> {
10228 self.page_token.as_ref().map(|field| field as _)
10229 }
10230 pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10232 self.page_token = Some(field.into().into());
10233 }
10234 pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
10236 mut self,
10237 field: T,
10238 ) -> Self {
10239 self.set_page_token(field.into());
10240 self
10241 }
10242 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
10244 self.read_mask.as_mut().map(|field| field as _)
10245 }
10246 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
10249 self.read_mask.get_or_insert_default()
10250 }
10251 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
10253 self.read_mask.as_ref().map(|field| field as _)
10254 }
10255 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
10257 self.read_mask = Some(field.into().into());
10258 }
10259 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
10261 mut self,
10262 field: T,
10263 ) -> Self {
10264 self.set_read_mask(field.into());
10265 self
10266 }
10267 }
10268 impl super::ListDynamicFieldsResponse {
10269 pub const fn const_default() -> Self {
10270 Self {
10271 dynamic_fields: Vec::new(),
10272 next_page_token: None,
10273 }
10274 }
10275 #[doc(hidden)]
10276 pub fn default_instance() -> &'static Self {
10277 static DEFAULT: super::ListDynamicFieldsResponse = super::ListDynamicFieldsResponse::const_default();
10278 &DEFAULT
10279 }
10280 pub fn dynamic_fields(&self) -> &[super::DynamicField] {
10282 &self.dynamic_fields
10283 }
10284 pub fn dynamic_fields_mut(&mut self) -> &mut Vec<super::DynamicField> {
10287 &mut self.dynamic_fields
10288 }
10289 pub fn set_dynamic_fields(&mut self, field: Vec<super::DynamicField>) {
10291 self.dynamic_fields = field;
10292 }
10293 pub fn with_dynamic_fields(mut self, field: Vec<super::DynamicField>) -> Self {
10295 self.set_dynamic_fields(field);
10296 self
10297 }
10298 pub fn next_page_token_opt(&self) -> Option<&[u8]> {
10300 self.next_page_token.as_ref().map(|field| field as _)
10301 }
10302 pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10304 self.next_page_token = Some(field.into().into());
10305 }
10306 pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
10308 mut self,
10309 field: T,
10310 ) -> Self {
10311 self.set_next_page_token(field.into());
10312 self
10313 }
10314 }
10315 impl super::ListEventsRequest {
10316 pub const fn const_default() -> Self {
10317 Self {
10318 read_mask: None,
10319 start_checkpoint: None,
10320 end_checkpoint: None,
10321 filter: None,
10322 options: None,
10323 }
10324 }
10325 #[doc(hidden)]
10326 pub fn default_instance() -> &'static Self {
10327 static DEFAULT: super::ListEventsRequest = super::ListEventsRequest::const_default();
10328 &DEFAULT
10329 }
10330 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
10332 self.read_mask.as_mut().map(|field| field as _)
10333 }
10334 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
10337 self.read_mask.get_or_insert_default()
10338 }
10339 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
10341 self.read_mask.as_ref().map(|field| field as _)
10342 }
10343 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
10345 self.read_mask = Some(field.into().into());
10346 }
10347 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
10349 mut self,
10350 field: T,
10351 ) -> Self {
10352 self.set_read_mask(field.into());
10353 self
10354 }
10355 pub fn start_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
10357 self.start_checkpoint.as_mut().map(|field| field as _)
10358 }
10359 pub fn start_checkpoint_mut(&mut self) -> &mut u64 {
10362 self.start_checkpoint.get_or_insert_default()
10363 }
10364 pub fn start_checkpoint_opt(&self) -> Option<u64> {
10366 self.start_checkpoint.as_ref().map(|field| *field)
10367 }
10368 pub fn set_start_checkpoint(&mut self, field: u64) {
10370 self.start_checkpoint = Some(field);
10371 }
10372 pub fn with_start_checkpoint(mut self, field: u64) -> Self {
10374 self.set_start_checkpoint(field);
10375 self
10376 }
10377 pub fn end_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
10379 self.end_checkpoint.as_mut().map(|field| field as _)
10380 }
10381 pub fn end_checkpoint_mut(&mut self) -> &mut u64 {
10384 self.end_checkpoint.get_or_insert_default()
10385 }
10386 pub fn end_checkpoint_opt(&self) -> Option<u64> {
10388 self.end_checkpoint.as_ref().map(|field| *field)
10389 }
10390 pub fn set_end_checkpoint(&mut self, field: u64) {
10392 self.end_checkpoint = Some(field);
10393 }
10394 pub fn with_end_checkpoint(mut self, field: u64) -> Self {
10396 self.set_end_checkpoint(field);
10397 self
10398 }
10399 pub fn filter(&self) -> &super::EventFilter {
10401 self.filter
10402 .as_ref()
10403 .map(|field| field as _)
10404 .unwrap_or_else(|| super::EventFilter::default_instance() as _)
10405 }
10406 pub fn filter_opt_mut(&mut self) -> Option<&mut super::EventFilter> {
10408 self.filter.as_mut().map(|field| field as _)
10409 }
10410 pub fn filter_mut(&mut self) -> &mut super::EventFilter {
10413 self.filter.get_or_insert_default()
10414 }
10415 pub fn filter_opt(&self) -> Option<&super::EventFilter> {
10417 self.filter.as_ref().map(|field| field as _)
10418 }
10419 pub fn set_filter<T: Into<super::EventFilter>>(&mut self, field: T) {
10421 self.filter = Some(field.into().into());
10422 }
10423 pub fn with_filter<T: Into<super::EventFilter>>(mut self, field: T) -> Self {
10425 self.set_filter(field.into());
10426 self
10427 }
10428 pub fn options(&self) -> &super::QueryOptions {
10430 self.options
10431 .as_ref()
10432 .map(|field| field as _)
10433 .unwrap_or_else(|| super::QueryOptions::default_instance() as _)
10434 }
10435 pub fn options_opt_mut(&mut self) -> Option<&mut super::QueryOptions> {
10437 self.options.as_mut().map(|field| field as _)
10438 }
10439 pub fn options_mut(&mut self) -> &mut super::QueryOptions {
10442 self.options.get_or_insert_default()
10443 }
10444 pub fn options_opt(&self) -> Option<&super::QueryOptions> {
10446 self.options.as_ref().map(|field| field as _)
10447 }
10448 pub fn set_options<T: Into<super::QueryOptions>>(&mut self, field: T) {
10450 self.options = Some(field.into().into());
10451 }
10452 pub fn with_options<T: Into<super::QueryOptions>>(mut self, field: T) -> Self {
10454 self.set_options(field.into());
10455 self
10456 }
10457 }
10458 impl super::ListEventsResponse {
10459 pub const fn const_default() -> Self {
10460 Self {
10461 event: None,
10462 watermark: None,
10463 end: None,
10464 }
10465 }
10466 #[doc(hidden)]
10467 pub fn default_instance() -> &'static Self {
10468 static DEFAULT: super::ListEventsResponse = super::ListEventsResponse::const_default();
10469 &DEFAULT
10470 }
10471 pub fn event(&self) -> &super::Event {
10473 self.event
10474 .as_ref()
10475 .map(|field| field as _)
10476 .unwrap_or_else(|| super::Event::default_instance() as _)
10477 }
10478 pub fn event_opt_mut(&mut self) -> Option<&mut super::Event> {
10480 self.event.as_mut().map(|field| field as _)
10481 }
10482 pub fn event_mut(&mut self) -> &mut super::Event {
10485 self.event.get_or_insert_default()
10486 }
10487 pub fn event_opt(&self) -> Option<&super::Event> {
10489 self.event.as_ref().map(|field| field as _)
10490 }
10491 pub fn set_event<T: Into<super::Event>>(&mut self, field: T) {
10493 self.event = Some(field.into().into());
10494 }
10495 pub fn with_event<T: Into<super::Event>>(mut self, field: T) -> Self {
10497 self.set_event(field.into());
10498 self
10499 }
10500 pub fn watermark(&self) -> &super::Watermark {
10502 self.watermark
10503 .as_ref()
10504 .map(|field| field as _)
10505 .unwrap_or_else(|| super::Watermark::default_instance() as _)
10506 }
10507 pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
10509 self.watermark.as_mut().map(|field| field as _)
10510 }
10511 pub fn watermark_mut(&mut self) -> &mut super::Watermark {
10514 self.watermark.get_or_insert_default()
10515 }
10516 pub fn watermark_opt(&self) -> Option<&super::Watermark> {
10518 self.watermark.as_ref().map(|field| field as _)
10519 }
10520 pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
10522 self.watermark = Some(field.into().into());
10523 }
10524 pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
10526 self.set_watermark(field.into());
10527 self
10528 }
10529 pub fn end(&self) -> &super::QueryEnd {
10531 self.end
10532 .as_ref()
10533 .map(|field| field as _)
10534 .unwrap_or_else(|| super::QueryEnd::default_instance() as _)
10535 }
10536 pub fn end_opt_mut(&mut self) -> Option<&mut super::QueryEnd> {
10538 self.end.as_mut().map(|field| field as _)
10539 }
10540 pub fn end_mut(&mut self) -> &mut super::QueryEnd {
10543 self.end.get_or_insert_default()
10544 }
10545 pub fn end_opt(&self) -> Option<&super::QueryEnd> {
10547 self.end.as_ref().map(|field| field as _)
10548 }
10549 pub fn set_end<T: Into<super::QueryEnd>>(&mut self, field: T) {
10551 self.end = Some(field.into().into());
10552 }
10553 pub fn with_end<T: Into<super::QueryEnd>>(mut self, field: T) -> Self {
10555 self.set_end(field.into());
10556 self
10557 }
10558 }
10559 impl super::ListOwnedObjectsRequest {
10560 pub const fn const_default() -> Self {
10561 Self {
10562 owner: None,
10563 page_size: None,
10564 page_token: None,
10565 read_mask: None,
10566 object_type: None,
10567 }
10568 }
10569 #[doc(hidden)]
10570 pub fn default_instance() -> &'static Self {
10571 static DEFAULT: super::ListOwnedObjectsRequest = super::ListOwnedObjectsRequest::const_default();
10572 &DEFAULT
10573 }
10574 pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
10576 self.owner.as_mut().map(|field| field as _)
10577 }
10578 pub fn owner_mut(&mut self) -> &mut String {
10581 self.owner.get_or_insert_default()
10582 }
10583 pub fn owner_opt(&self) -> Option<&str> {
10585 self.owner.as_ref().map(|field| field as _)
10586 }
10587 pub fn set_owner<T: Into<String>>(&mut self, field: T) {
10589 self.owner = Some(field.into().into());
10590 }
10591 pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
10593 self.set_owner(field.into());
10594 self
10595 }
10596 pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
10598 self.page_size.as_mut().map(|field| field as _)
10599 }
10600 pub fn page_size_mut(&mut self) -> &mut u32 {
10603 self.page_size.get_or_insert_default()
10604 }
10605 pub fn page_size_opt(&self) -> Option<u32> {
10607 self.page_size.as_ref().map(|field| *field)
10608 }
10609 pub fn set_page_size(&mut self, field: u32) {
10611 self.page_size = Some(field);
10612 }
10613 pub fn with_page_size(mut self, field: u32) -> Self {
10615 self.set_page_size(field);
10616 self
10617 }
10618 pub fn page_token_opt(&self) -> Option<&[u8]> {
10620 self.page_token.as_ref().map(|field| field as _)
10621 }
10622 pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10624 self.page_token = Some(field.into().into());
10625 }
10626 pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
10628 mut self,
10629 field: T,
10630 ) -> Self {
10631 self.set_page_token(field.into());
10632 self
10633 }
10634 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
10636 self.read_mask.as_mut().map(|field| field as _)
10637 }
10638 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
10641 self.read_mask.get_or_insert_default()
10642 }
10643 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
10645 self.read_mask.as_ref().map(|field| field as _)
10646 }
10647 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
10649 self.read_mask = Some(field.into().into());
10650 }
10651 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
10653 mut self,
10654 field: T,
10655 ) -> Self {
10656 self.set_read_mask(field.into());
10657 self
10658 }
10659 pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
10661 self.object_type.as_mut().map(|field| field as _)
10662 }
10663 pub fn object_type_mut(&mut self) -> &mut String {
10666 self.object_type.get_or_insert_default()
10667 }
10668 pub fn object_type_opt(&self) -> Option<&str> {
10670 self.object_type.as_ref().map(|field| field as _)
10671 }
10672 pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
10674 self.object_type = Some(field.into().into());
10675 }
10676 pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
10678 self.set_object_type(field.into());
10679 self
10680 }
10681 }
10682 impl super::ListOwnedObjectsResponse {
10683 pub const fn const_default() -> Self {
10684 Self {
10685 objects: Vec::new(),
10686 next_page_token: None,
10687 }
10688 }
10689 #[doc(hidden)]
10690 pub fn default_instance() -> &'static Self {
10691 static DEFAULT: super::ListOwnedObjectsResponse = super::ListOwnedObjectsResponse::const_default();
10692 &DEFAULT
10693 }
10694 pub fn objects(&self) -> &[super::Object] {
10696 &self.objects
10697 }
10698 pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
10701 &mut self.objects
10702 }
10703 pub fn set_objects(&mut self, field: Vec<super::Object>) {
10705 self.objects = field;
10706 }
10707 pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
10709 self.set_objects(field);
10710 self
10711 }
10712 pub fn next_page_token_opt(&self) -> Option<&[u8]> {
10714 self.next_page_token.as_ref().map(|field| field as _)
10715 }
10716 pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10718 self.next_page_token = Some(field.into().into());
10719 }
10720 pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
10722 mut self,
10723 field: T,
10724 ) -> Self {
10725 self.set_next_page_token(field.into());
10726 self
10727 }
10728 }
10729 impl super::ListPackageVersionsRequest {
10730 pub const fn const_default() -> Self {
10731 Self {
10732 package_id: None,
10733 page_size: None,
10734 page_token: None,
10735 }
10736 }
10737 #[doc(hidden)]
10738 pub fn default_instance() -> &'static Self {
10739 static DEFAULT: super::ListPackageVersionsRequest = super::ListPackageVersionsRequest::const_default();
10740 &DEFAULT
10741 }
10742 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
10744 self.package_id.as_mut().map(|field| field as _)
10745 }
10746 pub fn package_id_mut(&mut self) -> &mut String {
10749 self.package_id.get_or_insert_default()
10750 }
10751 pub fn package_id_opt(&self) -> Option<&str> {
10753 self.package_id.as_ref().map(|field| field as _)
10754 }
10755 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
10757 self.package_id = Some(field.into().into());
10758 }
10759 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
10761 self.set_package_id(field.into());
10762 self
10763 }
10764 pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
10766 self.page_size.as_mut().map(|field| field as _)
10767 }
10768 pub fn page_size_mut(&mut self) -> &mut u32 {
10771 self.page_size.get_or_insert_default()
10772 }
10773 pub fn page_size_opt(&self) -> Option<u32> {
10775 self.page_size.as_ref().map(|field| *field)
10776 }
10777 pub fn set_page_size(&mut self, field: u32) {
10779 self.page_size = Some(field);
10780 }
10781 pub fn with_page_size(mut self, field: u32) -> Self {
10783 self.set_page_size(field);
10784 self
10785 }
10786 pub fn page_token_opt(&self) -> Option<&[u8]> {
10788 self.page_token.as_ref().map(|field| field as _)
10789 }
10790 pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10792 self.page_token = Some(field.into().into());
10793 }
10794 pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
10796 mut self,
10797 field: T,
10798 ) -> Self {
10799 self.set_page_token(field.into());
10800 self
10801 }
10802 }
10803 impl super::ListPackageVersionsResponse {
10804 pub const fn const_default() -> Self {
10805 Self {
10806 versions: Vec::new(),
10807 next_page_token: None,
10808 }
10809 }
10810 #[doc(hidden)]
10811 pub fn default_instance() -> &'static Self {
10812 static DEFAULT: super::ListPackageVersionsResponse = super::ListPackageVersionsResponse::const_default();
10813 &DEFAULT
10814 }
10815 pub fn versions(&self) -> &[super::PackageVersion] {
10817 &self.versions
10818 }
10819 pub fn versions_mut(&mut self) -> &mut Vec<super::PackageVersion> {
10822 &mut self.versions
10823 }
10824 pub fn set_versions(&mut self, field: Vec<super::PackageVersion>) {
10826 self.versions = field;
10827 }
10828 pub fn with_versions(mut self, field: Vec<super::PackageVersion>) -> Self {
10830 self.set_versions(field);
10831 self
10832 }
10833 pub fn next_page_token_opt(&self) -> Option<&[u8]> {
10835 self.next_page_token.as_ref().map(|field| field as _)
10836 }
10837 pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10839 self.next_page_token = Some(field.into().into());
10840 }
10841 pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
10843 mut self,
10844 field: T,
10845 ) -> Self {
10846 self.set_next_page_token(field.into());
10847 self
10848 }
10849 }
10850 impl super::ListTransactionsRequest {
10851 pub const fn const_default() -> Self {
10852 Self {
10853 read_mask: None,
10854 start_checkpoint: None,
10855 end_checkpoint: None,
10856 filter: None,
10857 options: None,
10858 }
10859 }
10860 #[doc(hidden)]
10861 pub fn default_instance() -> &'static Self {
10862 static DEFAULT: super::ListTransactionsRequest = super::ListTransactionsRequest::const_default();
10863 &DEFAULT
10864 }
10865 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
10867 self.read_mask.as_mut().map(|field| field as _)
10868 }
10869 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
10872 self.read_mask.get_or_insert_default()
10873 }
10874 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
10876 self.read_mask.as_ref().map(|field| field as _)
10877 }
10878 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
10880 self.read_mask = Some(field.into().into());
10881 }
10882 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
10884 mut self,
10885 field: T,
10886 ) -> Self {
10887 self.set_read_mask(field.into());
10888 self
10889 }
10890 pub fn start_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
10892 self.start_checkpoint.as_mut().map(|field| field as _)
10893 }
10894 pub fn start_checkpoint_mut(&mut self) -> &mut u64 {
10897 self.start_checkpoint.get_or_insert_default()
10898 }
10899 pub fn start_checkpoint_opt(&self) -> Option<u64> {
10901 self.start_checkpoint.as_ref().map(|field| *field)
10902 }
10903 pub fn set_start_checkpoint(&mut self, field: u64) {
10905 self.start_checkpoint = Some(field);
10906 }
10907 pub fn with_start_checkpoint(mut self, field: u64) -> Self {
10909 self.set_start_checkpoint(field);
10910 self
10911 }
10912 pub fn end_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
10914 self.end_checkpoint.as_mut().map(|field| field as _)
10915 }
10916 pub fn end_checkpoint_mut(&mut self) -> &mut u64 {
10919 self.end_checkpoint.get_or_insert_default()
10920 }
10921 pub fn end_checkpoint_opt(&self) -> Option<u64> {
10923 self.end_checkpoint.as_ref().map(|field| *field)
10924 }
10925 pub fn set_end_checkpoint(&mut self, field: u64) {
10927 self.end_checkpoint = Some(field);
10928 }
10929 pub fn with_end_checkpoint(mut self, field: u64) -> Self {
10931 self.set_end_checkpoint(field);
10932 self
10933 }
10934 pub fn filter(&self) -> &super::TransactionFilter {
10936 self.filter
10937 .as_ref()
10938 .map(|field| field as _)
10939 .unwrap_or_else(|| super::TransactionFilter::default_instance() as _)
10940 }
10941 pub fn filter_opt_mut(&mut self) -> Option<&mut super::TransactionFilter> {
10943 self.filter.as_mut().map(|field| field as _)
10944 }
10945 pub fn filter_mut(&mut self) -> &mut super::TransactionFilter {
10948 self.filter.get_or_insert_default()
10949 }
10950 pub fn filter_opt(&self) -> Option<&super::TransactionFilter> {
10952 self.filter.as_ref().map(|field| field as _)
10953 }
10954 pub fn set_filter<T: Into<super::TransactionFilter>>(&mut self, field: T) {
10956 self.filter = Some(field.into().into());
10957 }
10958 pub fn with_filter<T: Into<super::TransactionFilter>>(
10960 mut self,
10961 field: T,
10962 ) -> Self {
10963 self.set_filter(field.into());
10964 self
10965 }
10966 pub fn options(&self) -> &super::QueryOptions {
10968 self.options
10969 .as_ref()
10970 .map(|field| field as _)
10971 .unwrap_or_else(|| super::QueryOptions::default_instance() as _)
10972 }
10973 pub fn options_opt_mut(&mut self) -> Option<&mut super::QueryOptions> {
10975 self.options.as_mut().map(|field| field as _)
10976 }
10977 pub fn options_mut(&mut self) -> &mut super::QueryOptions {
10980 self.options.get_or_insert_default()
10981 }
10982 pub fn options_opt(&self) -> Option<&super::QueryOptions> {
10984 self.options.as_ref().map(|field| field as _)
10985 }
10986 pub fn set_options<T: Into<super::QueryOptions>>(&mut self, field: T) {
10988 self.options = Some(field.into().into());
10989 }
10990 pub fn with_options<T: Into<super::QueryOptions>>(mut self, field: T) -> Self {
10992 self.set_options(field.into());
10993 self
10994 }
10995 }
10996 impl super::ListTransactionsResponse {
10997 pub const fn const_default() -> Self {
10998 Self {
10999 transaction: None,
11000 watermark: None,
11001 end: None,
11002 }
11003 }
11004 #[doc(hidden)]
11005 pub fn default_instance() -> &'static Self {
11006 static DEFAULT: super::ListTransactionsResponse = super::ListTransactionsResponse::const_default();
11007 &DEFAULT
11008 }
11009 pub fn transaction(&self) -> &super::ExecutedTransaction {
11011 self.transaction
11012 .as_ref()
11013 .map(|field| field as _)
11014 .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
11015 }
11016 pub fn transaction_opt_mut(
11018 &mut self,
11019 ) -> Option<&mut super::ExecutedTransaction> {
11020 self.transaction.as_mut().map(|field| field as _)
11021 }
11022 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
11025 self.transaction.get_or_insert_default()
11026 }
11027 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
11029 self.transaction.as_ref().map(|field| field as _)
11030 }
11031 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
11033 &mut self,
11034 field: T,
11035 ) {
11036 self.transaction = Some(field.into().into());
11037 }
11038 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
11040 mut self,
11041 field: T,
11042 ) -> Self {
11043 self.set_transaction(field.into());
11044 self
11045 }
11046 pub fn watermark(&self) -> &super::Watermark {
11048 self.watermark
11049 .as_ref()
11050 .map(|field| field as _)
11051 .unwrap_or_else(|| super::Watermark::default_instance() as _)
11052 }
11053 pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
11055 self.watermark.as_mut().map(|field| field as _)
11056 }
11057 pub fn watermark_mut(&mut self) -> &mut super::Watermark {
11060 self.watermark.get_or_insert_default()
11061 }
11062 pub fn watermark_opt(&self) -> Option<&super::Watermark> {
11064 self.watermark.as_ref().map(|field| field as _)
11065 }
11066 pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
11068 self.watermark = Some(field.into().into());
11069 }
11070 pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
11072 self.set_watermark(field.into());
11073 self
11074 }
11075 pub fn end(&self) -> &super::QueryEnd {
11077 self.end
11078 .as_ref()
11079 .map(|field| field as _)
11080 .unwrap_or_else(|| super::QueryEnd::default_instance() as _)
11081 }
11082 pub fn end_opt_mut(&mut self) -> Option<&mut super::QueryEnd> {
11084 self.end.as_mut().map(|field| field as _)
11085 }
11086 pub fn end_mut(&mut self) -> &mut super::QueryEnd {
11089 self.end.get_or_insert_default()
11090 }
11091 pub fn end_opt(&self) -> Option<&super::QueryEnd> {
11093 self.end.as_ref().map(|field| field as _)
11094 }
11095 pub fn set_end<T: Into<super::QueryEnd>>(&mut self, field: T) {
11097 self.end = Some(field.into().into());
11098 }
11099 pub fn with_end<T: Into<super::QueryEnd>>(mut self, field: T) -> Self {
11101 self.set_end(field.into());
11102 self
11103 }
11104 }
11105 impl super::LookupNameRequest {
11106 pub const fn const_default() -> Self {
11107 Self { name: None }
11108 }
11109 #[doc(hidden)]
11110 pub fn default_instance() -> &'static Self {
11111 static DEFAULT: super::LookupNameRequest = super::LookupNameRequest::const_default();
11112 &DEFAULT
11113 }
11114 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
11116 self.name.as_mut().map(|field| field as _)
11117 }
11118 pub fn name_mut(&mut self) -> &mut String {
11121 self.name.get_or_insert_default()
11122 }
11123 pub fn name_opt(&self) -> Option<&str> {
11125 self.name.as_ref().map(|field| field as _)
11126 }
11127 pub fn set_name<T: Into<String>>(&mut self, field: T) {
11129 self.name = Some(field.into().into());
11130 }
11131 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
11133 self.set_name(field.into());
11134 self
11135 }
11136 }
11137 impl super::LookupNameResponse {
11138 pub const fn const_default() -> Self {
11139 Self { record: None }
11140 }
11141 #[doc(hidden)]
11142 pub fn default_instance() -> &'static Self {
11143 static DEFAULT: super::LookupNameResponse = super::LookupNameResponse::const_default();
11144 &DEFAULT
11145 }
11146 pub fn record(&self) -> &super::NameRecord {
11148 self.record
11149 .as_ref()
11150 .map(|field| field as _)
11151 .unwrap_or_else(|| super::NameRecord::default_instance() as _)
11152 }
11153 pub fn record_opt_mut(&mut self) -> Option<&mut super::NameRecord> {
11155 self.record.as_mut().map(|field| field as _)
11156 }
11157 pub fn record_mut(&mut self) -> &mut super::NameRecord {
11160 self.record.get_or_insert_default()
11161 }
11162 pub fn record_opt(&self) -> Option<&super::NameRecord> {
11164 self.record.as_ref().map(|field| field as _)
11165 }
11166 pub fn set_record<T: Into<super::NameRecord>>(&mut self, field: T) {
11168 self.record = Some(field.into().into());
11169 }
11170 pub fn with_record<T: Into<super::NameRecord>>(mut self, field: T) -> Self {
11172 self.set_record(field.into());
11173 self
11174 }
11175 }
11176 impl super::MakeMoveVector {
11177 pub const fn const_default() -> Self {
11178 Self {
11179 element_type: None,
11180 elements: Vec::new(),
11181 }
11182 }
11183 #[doc(hidden)]
11184 pub fn default_instance() -> &'static Self {
11185 static DEFAULT: super::MakeMoveVector = super::MakeMoveVector::const_default();
11186 &DEFAULT
11187 }
11188 pub fn element_type_opt_mut(&mut self) -> Option<&mut String> {
11190 self.element_type.as_mut().map(|field| field as _)
11191 }
11192 pub fn element_type_mut(&mut self) -> &mut String {
11195 self.element_type.get_or_insert_default()
11196 }
11197 pub fn element_type_opt(&self) -> Option<&str> {
11199 self.element_type.as_ref().map(|field| field as _)
11200 }
11201 pub fn set_element_type<T: Into<String>>(&mut self, field: T) {
11203 self.element_type = Some(field.into().into());
11204 }
11205 pub fn with_element_type<T: Into<String>>(mut self, field: T) -> Self {
11207 self.set_element_type(field.into());
11208 self
11209 }
11210 pub fn elements(&self) -> &[super::Argument] {
11212 &self.elements
11213 }
11214 pub fn elements_mut(&mut self) -> &mut Vec<super::Argument> {
11217 &mut self.elements
11218 }
11219 pub fn set_elements(&mut self, field: Vec<super::Argument>) {
11221 self.elements = field;
11222 }
11223 pub fn with_elements(mut self, field: Vec<super::Argument>) -> Self {
11225 self.set_elements(field);
11226 self
11227 }
11228 }
11229 impl super::MergeCoins {
11230 pub const fn const_default() -> Self {
11231 Self {
11232 coin: None,
11233 coins_to_merge: Vec::new(),
11234 }
11235 }
11236 #[doc(hidden)]
11237 pub fn default_instance() -> &'static Self {
11238 static DEFAULT: super::MergeCoins = super::MergeCoins::const_default();
11239 &DEFAULT
11240 }
11241 pub fn coin(&self) -> &super::Argument {
11243 self.coin
11244 .as_ref()
11245 .map(|field| field as _)
11246 .unwrap_or_else(|| super::Argument::default_instance() as _)
11247 }
11248 pub fn coin_opt_mut(&mut self) -> Option<&mut super::Argument> {
11250 self.coin.as_mut().map(|field| field as _)
11251 }
11252 pub fn coin_mut(&mut self) -> &mut super::Argument {
11255 self.coin.get_or_insert_default()
11256 }
11257 pub fn coin_opt(&self) -> Option<&super::Argument> {
11259 self.coin.as_ref().map(|field| field as _)
11260 }
11261 pub fn set_coin<T: Into<super::Argument>>(&mut self, field: T) {
11263 self.coin = Some(field.into().into());
11264 }
11265 pub fn with_coin<T: Into<super::Argument>>(mut self, field: T) -> Self {
11267 self.set_coin(field.into());
11268 self
11269 }
11270 pub fn coins_to_merge(&self) -> &[super::Argument] {
11272 &self.coins_to_merge
11273 }
11274 pub fn coins_to_merge_mut(&mut self) -> &mut Vec<super::Argument> {
11277 &mut self.coins_to_merge
11278 }
11279 pub fn set_coins_to_merge(&mut self, field: Vec<super::Argument>) {
11281 self.coins_to_merge = field;
11282 }
11283 pub fn with_coins_to_merge(mut self, field: Vec<super::Argument>) -> Self {
11285 self.set_coins_to_merge(field);
11286 self
11287 }
11288 }
11289 impl super::Module {
11290 pub const fn const_default() -> Self {
11291 Self {
11292 name: None,
11293 contents: None,
11294 datatypes: Vec::new(),
11295 functions: Vec::new(),
11296 }
11297 }
11298 #[doc(hidden)]
11299 pub fn default_instance() -> &'static Self {
11300 static DEFAULT: super::Module = super::Module::const_default();
11301 &DEFAULT
11302 }
11303 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
11305 self.name.as_mut().map(|field| field as _)
11306 }
11307 pub fn name_mut(&mut self) -> &mut String {
11310 self.name.get_or_insert_default()
11311 }
11312 pub fn name_opt(&self) -> Option<&str> {
11314 self.name.as_ref().map(|field| field as _)
11315 }
11316 pub fn set_name<T: Into<String>>(&mut self, field: T) {
11318 self.name = Some(field.into().into());
11319 }
11320 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
11322 self.set_name(field.into());
11323 self
11324 }
11325 pub fn contents_opt(&self) -> Option<&[u8]> {
11327 self.contents.as_ref().map(|field| field as _)
11328 }
11329 pub fn set_contents<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
11331 self.contents = Some(field.into().into());
11332 }
11333 pub fn with_contents<T: Into<::prost::bytes::Bytes>>(
11335 mut self,
11336 field: T,
11337 ) -> Self {
11338 self.set_contents(field.into());
11339 self
11340 }
11341 pub fn datatypes(&self) -> &[super::DatatypeDescriptor] {
11343 &self.datatypes
11344 }
11345 pub fn datatypes_mut(&mut self) -> &mut Vec<super::DatatypeDescriptor> {
11348 &mut self.datatypes
11349 }
11350 pub fn set_datatypes(&mut self, field: Vec<super::DatatypeDescriptor>) {
11352 self.datatypes = field;
11353 }
11354 pub fn with_datatypes(mut self, field: Vec<super::DatatypeDescriptor>) -> Self {
11356 self.set_datatypes(field);
11357 self
11358 }
11359 pub fn functions(&self) -> &[super::FunctionDescriptor] {
11361 &self.functions
11362 }
11363 pub fn functions_mut(&mut self) -> &mut Vec<super::FunctionDescriptor> {
11366 &mut self.functions
11367 }
11368 pub fn set_functions(&mut self, field: Vec<super::FunctionDescriptor>) {
11370 self.functions = field;
11371 }
11372 pub fn with_functions(mut self, field: Vec<super::FunctionDescriptor>) -> Self {
11374 self.set_functions(field);
11375 self
11376 }
11377 }
11378 impl super::MoveAbort {
11379 pub const fn const_default() -> Self {
11380 Self {
11381 abort_code: None,
11382 location: None,
11383 clever_error: None,
11384 }
11385 }
11386 #[doc(hidden)]
11387 pub fn default_instance() -> &'static Self {
11388 static DEFAULT: super::MoveAbort = super::MoveAbort::const_default();
11389 &DEFAULT
11390 }
11391 pub fn abort_code_opt_mut(&mut self) -> Option<&mut u64> {
11393 self.abort_code.as_mut().map(|field| field as _)
11394 }
11395 pub fn abort_code_mut(&mut self) -> &mut u64 {
11398 self.abort_code.get_or_insert_default()
11399 }
11400 pub fn abort_code_opt(&self) -> Option<u64> {
11402 self.abort_code.as_ref().map(|field| *field)
11403 }
11404 pub fn set_abort_code(&mut self, field: u64) {
11406 self.abort_code = Some(field);
11407 }
11408 pub fn with_abort_code(mut self, field: u64) -> Self {
11410 self.set_abort_code(field);
11411 self
11412 }
11413 pub fn location(&self) -> &super::MoveLocation {
11415 self.location
11416 .as_ref()
11417 .map(|field| field as _)
11418 .unwrap_or_else(|| super::MoveLocation::default_instance() as _)
11419 }
11420 pub fn location_opt_mut(&mut self) -> Option<&mut super::MoveLocation> {
11422 self.location.as_mut().map(|field| field as _)
11423 }
11424 pub fn location_mut(&mut self) -> &mut super::MoveLocation {
11427 self.location.get_or_insert_default()
11428 }
11429 pub fn location_opt(&self) -> Option<&super::MoveLocation> {
11431 self.location.as_ref().map(|field| field as _)
11432 }
11433 pub fn set_location<T: Into<super::MoveLocation>>(&mut self, field: T) {
11435 self.location = Some(field.into().into());
11436 }
11437 pub fn with_location<T: Into<super::MoveLocation>>(mut self, field: T) -> Self {
11439 self.set_location(field.into());
11440 self
11441 }
11442 pub fn clever_error(&self) -> &super::CleverError {
11444 self.clever_error
11445 .as_ref()
11446 .map(|field| field as _)
11447 .unwrap_or_else(|| super::CleverError::default_instance() as _)
11448 }
11449 pub fn clever_error_opt_mut(&mut self) -> Option<&mut super::CleverError> {
11451 self.clever_error.as_mut().map(|field| field as _)
11452 }
11453 pub fn clever_error_mut(&mut self) -> &mut super::CleverError {
11456 self.clever_error.get_or_insert_default()
11457 }
11458 pub fn clever_error_opt(&self) -> Option<&super::CleverError> {
11460 self.clever_error.as_ref().map(|field| field as _)
11461 }
11462 pub fn set_clever_error<T: Into<super::CleverError>>(&mut self, field: T) {
11464 self.clever_error = Some(field.into().into());
11465 }
11466 pub fn with_clever_error<T: Into<super::CleverError>>(
11468 mut self,
11469 field: T,
11470 ) -> Self {
11471 self.set_clever_error(field.into());
11472 self
11473 }
11474 }
11475 impl super::MoveCall {
11476 pub const fn const_default() -> Self {
11477 Self {
11478 package: None,
11479 module: None,
11480 function: None,
11481 type_arguments: Vec::new(),
11482 arguments: Vec::new(),
11483 }
11484 }
11485 #[doc(hidden)]
11486 pub fn default_instance() -> &'static Self {
11487 static DEFAULT: super::MoveCall = super::MoveCall::const_default();
11488 &DEFAULT
11489 }
11490 pub fn package_opt_mut(&mut self) -> Option<&mut String> {
11492 self.package.as_mut().map(|field| field as _)
11493 }
11494 pub fn package_mut(&mut self) -> &mut String {
11497 self.package.get_or_insert_default()
11498 }
11499 pub fn package_opt(&self) -> Option<&str> {
11501 self.package.as_ref().map(|field| field as _)
11502 }
11503 pub fn set_package<T: Into<String>>(&mut self, field: T) {
11505 self.package = Some(field.into().into());
11506 }
11507 pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
11509 self.set_package(field.into());
11510 self
11511 }
11512 pub fn module_opt_mut(&mut self) -> Option<&mut String> {
11514 self.module.as_mut().map(|field| field as _)
11515 }
11516 pub fn module_mut(&mut self) -> &mut String {
11519 self.module.get_or_insert_default()
11520 }
11521 pub fn module_opt(&self) -> Option<&str> {
11523 self.module.as_ref().map(|field| field as _)
11524 }
11525 pub fn set_module<T: Into<String>>(&mut self, field: T) {
11527 self.module = Some(field.into().into());
11528 }
11529 pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
11531 self.set_module(field.into());
11532 self
11533 }
11534 pub fn function_opt_mut(&mut self) -> Option<&mut String> {
11536 self.function.as_mut().map(|field| field as _)
11537 }
11538 pub fn function_mut(&mut self) -> &mut String {
11541 self.function.get_or_insert_default()
11542 }
11543 pub fn function_opt(&self) -> Option<&str> {
11545 self.function.as_ref().map(|field| field as _)
11546 }
11547 pub fn set_function<T: Into<String>>(&mut self, field: T) {
11549 self.function = Some(field.into().into());
11550 }
11551 pub fn with_function<T: Into<String>>(mut self, field: T) -> Self {
11553 self.set_function(field.into());
11554 self
11555 }
11556 pub fn type_arguments(&self) -> &[String] {
11558 &self.type_arguments
11559 }
11560 pub fn type_arguments_mut(&mut self) -> &mut Vec<String> {
11563 &mut self.type_arguments
11564 }
11565 pub fn set_type_arguments(&mut self, field: Vec<String>) {
11567 self.type_arguments = field;
11568 }
11569 pub fn with_type_arguments(mut self, field: Vec<String>) -> Self {
11571 self.set_type_arguments(field);
11572 self
11573 }
11574 pub fn arguments(&self) -> &[super::Argument] {
11576 &self.arguments
11577 }
11578 pub fn arguments_mut(&mut self) -> &mut Vec<super::Argument> {
11581 &mut self.arguments
11582 }
11583 pub fn set_arguments(&mut self, field: Vec<super::Argument>) {
11585 self.arguments = field;
11586 }
11587 pub fn with_arguments(mut self, field: Vec<super::Argument>) -> Self {
11589 self.set_arguments(field);
11590 self
11591 }
11592 }
11593 impl super::MoveCallFilter {
11594 pub const fn const_default() -> Self {
11595 Self { function: None }
11596 }
11597 #[doc(hidden)]
11598 pub fn default_instance() -> &'static Self {
11599 static DEFAULT: super::MoveCallFilter = super::MoveCallFilter::const_default();
11600 &DEFAULT
11601 }
11602 pub fn function_opt_mut(&mut self) -> Option<&mut String> {
11604 self.function.as_mut().map(|field| field as _)
11605 }
11606 pub fn function_mut(&mut self) -> &mut String {
11609 self.function.get_or_insert_default()
11610 }
11611 pub fn function_opt(&self) -> Option<&str> {
11613 self.function.as_ref().map(|field| field as _)
11614 }
11615 pub fn set_function<T: Into<String>>(&mut self, field: T) {
11617 self.function = Some(field.into().into());
11618 }
11619 pub fn with_function<T: Into<String>>(mut self, field: T) -> Self {
11621 self.set_function(field.into());
11622 self
11623 }
11624 }
11625 impl super::MoveLocation {
11626 pub const fn const_default() -> Self {
11627 Self {
11628 package: None,
11629 module: None,
11630 function: None,
11631 instruction: None,
11632 function_name: None,
11633 }
11634 }
11635 #[doc(hidden)]
11636 pub fn default_instance() -> &'static Self {
11637 static DEFAULT: super::MoveLocation = super::MoveLocation::const_default();
11638 &DEFAULT
11639 }
11640 pub fn package_opt_mut(&mut self) -> Option<&mut String> {
11642 self.package.as_mut().map(|field| field as _)
11643 }
11644 pub fn package_mut(&mut self) -> &mut String {
11647 self.package.get_or_insert_default()
11648 }
11649 pub fn package_opt(&self) -> Option<&str> {
11651 self.package.as_ref().map(|field| field as _)
11652 }
11653 pub fn set_package<T: Into<String>>(&mut self, field: T) {
11655 self.package = Some(field.into().into());
11656 }
11657 pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
11659 self.set_package(field.into());
11660 self
11661 }
11662 pub fn module_opt_mut(&mut self) -> Option<&mut String> {
11664 self.module.as_mut().map(|field| field as _)
11665 }
11666 pub fn module_mut(&mut self) -> &mut String {
11669 self.module.get_or_insert_default()
11670 }
11671 pub fn module_opt(&self) -> Option<&str> {
11673 self.module.as_ref().map(|field| field as _)
11674 }
11675 pub fn set_module<T: Into<String>>(&mut self, field: T) {
11677 self.module = Some(field.into().into());
11678 }
11679 pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
11681 self.set_module(field.into());
11682 self
11683 }
11684 pub fn function_opt_mut(&mut self) -> Option<&mut u32> {
11686 self.function.as_mut().map(|field| field as _)
11687 }
11688 pub fn function_mut(&mut self) -> &mut u32 {
11691 self.function.get_or_insert_default()
11692 }
11693 pub fn function_opt(&self) -> Option<u32> {
11695 self.function.as_ref().map(|field| *field)
11696 }
11697 pub fn set_function(&mut self, field: u32) {
11699 self.function = Some(field);
11700 }
11701 pub fn with_function(mut self, field: u32) -> Self {
11703 self.set_function(field);
11704 self
11705 }
11706 pub fn instruction_opt_mut(&mut self) -> Option<&mut u32> {
11708 self.instruction.as_mut().map(|field| field as _)
11709 }
11710 pub fn instruction_mut(&mut self) -> &mut u32 {
11713 self.instruction.get_or_insert_default()
11714 }
11715 pub fn instruction_opt(&self) -> Option<u32> {
11717 self.instruction.as_ref().map(|field| *field)
11718 }
11719 pub fn set_instruction(&mut self, field: u32) {
11721 self.instruction = Some(field);
11722 }
11723 pub fn with_instruction(mut self, field: u32) -> Self {
11725 self.set_instruction(field);
11726 self
11727 }
11728 pub fn function_name_opt_mut(&mut self) -> Option<&mut String> {
11730 self.function_name.as_mut().map(|field| field as _)
11731 }
11732 pub fn function_name_mut(&mut self) -> &mut String {
11735 self.function_name.get_or_insert_default()
11736 }
11737 pub fn function_name_opt(&self) -> Option<&str> {
11739 self.function_name.as_ref().map(|field| field as _)
11740 }
11741 pub fn set_function_name<T: Into<String>>(&mut self, field: T) {
11743 self.function_name = Some(field.into().into());
11744 }
11745 pub fn with_function_name<T: Into<String>>(mut self, field: T) -> Self {
11747 self.set_function_name(field.into());
11748 self
11749 }
11750 }
11751 impl super::MoveTable {
11752 pub const fn const_default() -> Self {
11753 Self { id: None, size: None }
11754 }
11755 #[doc(hidden)]
11756 pub fn default_instance() -> &'static Self {
11757 static DEFAULT: super::MoveTable = super::MoveTable::const_default();
11758 &DEFAULT
11759 }
11760 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
11762 self.id.as_mut().map(|field| field as _)
11763 }
11764 pub fn id_mut(&mut self) -> &mut String {
11767 self.id.get_or_insert_default()
11768 }
11769 pub fn id_opt(&self) -> Option<&str> {
11771 self.id.as_ref().map(|field| field as _)
11772 }
11773 pub fn set_id<T: Into<String>>(&mut self, field: T) {
11775 self.id = Some(field.into().into());
11776 }
11777 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
11779 self.set_id(field.into());
11780 self
11781 }
11782 pub fn size_opt_mut(&mut self) -> Option<&mut u64> {
11784 self.size.as_mut().map(|field| field as _)
11785 }
11786 pub fn size_mut(&mut self) -> &mut u64 {
11789 self.size.get_or_insert_default()
11790 }
11791 pub fn size_opt(&self) -> Option<u64> {
11793 self.size.as_ref().map(|field| *field)
11794 }
11795 pub fn set_size(&mut self, field: u64) {
11797 self.size = Some(field);
11798 }
11799 pub fn with_size(mut self, field: u64) -> Self {
11801 self.set_size(field);
11802 self
11803 }
11804 }
11805 impl super::MultisigAggregatedSignature {
11806 pub const fn const_default() -> Self {
11807 Self {
11808 signatures: Vec::new(),
11809 bitmap: None,
11810 legacy_bitmap: None,
11811 committee: None,
11812 }
11813 }
11814 #[doc(hidden)]
11815 pub fn default_instance() -> &'static Self {
11816 static DEFAULT: super::MultisigAggregatedSignature = super::MultisigAggregatedSignature::const_default();
11817 &DEFAULT
11818 }
11819 pub fn signatures(&self) -> &[super::MultisigMemberSignature] {
11821 &self.signatures
11822 }
11823 pub fn signatures_mut(&mut self) -> &mut Vec<super::MultisigMemberSignature> {
11826 &mut self.signatures
11827 }
11828 pub fn set_signatures(&mut self, field: Vec<super::MultisigMemberSignature>) {
11830 self.signatures = field;
11831 }
11832 pub fn with_signatures(
11834 mut self,
11835 field: Vec<super::MultisigMemberSignature>,
11836 ) -> Self {
11837 self.set_signatures(field);
11838 self
11839 }
11840 pub fn bitmap_opt_mut(&mut self) -> Option<&mut u32> {
11842 self.bitmap.as_mut().map(|field| field as _)
11843 }
11844 pub fn bitmap_mut(&mut self) -> &mut u32 {
11847 self.bitmap.get_or_insert_default()
11848 }
11849 pub fn bitmap_opt(&self) -> Option<u32> {
11851 self.bitmap.as_ref().map(|field| *field)
11852 }
11853 pub fn set_bitmap(&mut self, field: u32) {
11855 self.bitmap = Some(field);
11856 }
11857 pub fn with_bitmap(mut self, field: u32) -> Self {
11859 self.set_bitmap(field);
11860 self
11861 }
11862 pub fn legacy_bitmap_opt(&self) -> Option<&[u8]> {
11864 self.legacy_bitmap.as_ref().map(|field| field as _)
11865 }
11866 pub fn set_legacy_bitmap<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
11868 self.legacy_bitmap = Some(field.into().into());
11869 }
11870 pub fn with_legacy_bitmap<T: Into<::prost::bytes::Bytes>>(
11872 mut self,
11873 field: T,
11874 ) -> Self {
11875 self.set_legacy_bitmap(field.into());
11876 self
11877 }
11878 pub fn committee(&self) -> &super::MultisigCommittee {
11880 self.committee
11881 .as_ref()
11882 .map(|field| field as _)
11883 .unwrap_or_else(|| super::MultisigCommittee::default_instance() as _)
11884 }
11885 pub fn committee_opt_mut(&mut self) -> Option<&mut super::MultisigCommittee> {
11887 self.committee.as_mut().map(|field| field as _)
11888 }
11889 pub fn committee_mut(&mut self) -> &mut super::MultisigCommittee {
11892 self.committee.get_or_insert_default()
11893 }
11894 pub fn committee_opt(&self) -> Option<&super::MultisigCommittee> {
11896 self.committee.as_ref().map(|field| field as _)
11897 }
11898 pub fn set_committee<T: Into<super::MultisigCommittee>>(&mut self, field: T) {
11900 self.committee = Some(field.into().into());
11901 }
11902 pub fn with_committee<T: Into<super::MultisigCommittee>>(
11904 mut self,
11905 field: T,
11906 ) -> Self {
11907 self.set_committee(field.into());
11908 self
11909 }
11910 }
11911 impl super::MultisigCommittee {
11912 pub const fn const_default() -> Self {
11913 Self {
11914 members: Vec::new(),
11915 threshold: None,
11916 }
11917 }
11918 #[doc(hidden)]
11919 pub fn default_instance() -> &'static Self {
11920 static DEFAULT: super::MultisigCommittee = super::MultisigCommittee::const_default();
11921 &DEFAULT
11922 }
11923 pub fn members(&self) -> &[super::MultisigMember] {
11925 &self.members
11926 }
11927 pub fn members_mut(&mut self) -> &mut Vec<super::MultisigMember> {
11930 &mut self.members
11931 }
11932 pub fn set_members(&mut self, field: Vec<super::MultisigMember>) {
11934 self.members = field;
11935 }
11936 pub fn with_members(mut self, field: Vec<super::MultisigMember>) -> Self {
11938 self.set_members(field);
11939 self
11940 }
11941 pub fn threshold_opt_mut(&mut self) -> Option<&mut u32> {
11943 self.threshold.as_mut().map(|field| field as _)
11944 }
11945 pub fn threshold_mut(&mut self) -> &mut u32 {
11948 self.threshold.get_or_insert_default()
11949 }
11950 pub fn threshold_opt(&self) -> Option<u32> {
11952 self.threshold.as_ref().map(|field| *field)
11953 }
11954 pub fn set_threshold(&mut self, field: u32) {
11956 self.threshold = Some(field);
11957 }
11958 pub fn with_threshold(mut self, field: u32) -> Self {
11960 self.set_threshold(field);
11961 self
11962 }
11963 }
11964 impl super::MultisigMember {
11965 pub const fn const_default() -> Self {
11966 Self {
11967 public_key: None,
11968 weight: None,
11969 }
11970 }
11971 #[doc(hidden)]
11972 pub fn default_instance() -> &'static Self {
11973 static DEFAULT: super::MultisigMember = super::MultisigMember::const_default();
11974 &DEFAULT
11975 }
11976 pub fn public_key(&self) -> &super::MultisigMemberPublicKey {
11978 self.public_key
11979 .as_ref()
11980 .map(|field| field as _)
11981 .unwrap_or_else(|| {
11982 super::MultisigMemberPublicKey::default_instance() as _
11983 })
11984 }
11985 pub fn public_key_opt_mut(
11987 &mut self,
11988 ) -> Option<&mut super::MultisigMemberPublicKey> {
11989 self.public_key.as_mut().map(|field| field as _)
11990 }
11991 pub fn public_key_mut(&mut self) -> &mut super::MultisigMemberPublicKey {
11994 self.public_key.get_or_insert_default()
11995 }
11996 pub fn public_key_opt(&self) -> Option<&super::MultisigMemberPublicKey> {
11998 self.public_key.as_ref().map(|field| field as _)
11999 }
12000 pub fn set_public_key<T: Into<super::MultisigMemberPublicKey>>(
12002 &mut self,
12003 field: T,
12004 ) {
12005 self.public_key = Some(field.into().into());
12006 }
12007 pub fn with_public_key<T: Into<super::MultisigMemberPublicKey>>(
12009 mut self,
12010 field: T,
12011 ) -> Self {
12012 self.set_public_key(field.into());
12013 self
12014 }
12015 pub fn weight_opt_mut(&mut self) -> Option<&mut u32> {
12017 self.weight.as_mut().map(|field| field as _)
12018 }
12019 pub fn weight_mut(&mut self) -> &mut u32 {
12022 self.weight.get_or_insert_default()
12023 }
12024 pub fn weight_opt(&self) -> Option<u32> {
12026 self.weight.as_ref().map(|field| *field)
12027 }
12028 pub fn set_weight(&mut self, field: u32) {
12030 self.weight = Some(field);
12031 }
12032 pub fn with_weight(mut self, field: u32) -> Self {
12034 self.set_weight(field);
12035 self
12036 }
12037 }
12038 impl super::MultisigMemberPublicKey {
12039 pub const fn const_default() -> Self {
12040 Self {
12041 scheme: None,
12042 public_key: None,
12043 zklogin: None,
12044 }
12045 }
12046 #[doc(hidden)]
12047 pub fn default_instance() -> &'static Self {
12048 static DEFAULT: super::MultisigMemberPublicKey = super::MultisigMemberPublicKey::const_default();
12049 &DEFAULT
12050 }
12051 pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
12053 self.set_scheme(field.into());
12054 self
12055 }
12056 pub fn public_key_opt(&self) -> Option<&[u8]> {
12058 self.public_key.as_ref().map(|field| field as _)
12059 }
12060 pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
12062 self.public_key = Some(field.into().into());
12063 }
12064 pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
12066 mut self,
12067 field: T,
12068 ) -> Self {
12069 self.set_public_key(field.into());
12070 self
12071 }
12072 pub fn zklogin(&self) -> &super::ZkLoginPublicIdentifier {
12074 self.zklogin
12075 .as_ref()
12076 .map(|field| field as _)
12077 .unwrap_or_else(|| {
12078 super::ZkLoginPublicIdentifier::default_instance() as _
12079 })
12080 }
12081 pub fn zklogin_opt_mut(
12083 &mut self,
12084 ) -> Option<&mut super::ZkLoginPublicIdentifier> {
12085 self.zklogin.as_mut().map(|field| field as _)
12086 }
12087 pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginPublicIdentifier {
12090 self.zklogin.get_or_insert_default()
12091 }
12092 pub fn zklogin_opt(&self) -> Option<&super::ZkLoginPublicIdentifier> {
12094 self.zklogin.as_ref().map(|field| field as _)
12095 }
12096 pub fn set_zklogin<T: Into<super::ZkLoginPublicIdentifier>>(
12098 &mut self,
12099 field: T,
12100 ) {
12101 self.zklogin = Some(field.into().into());
12102 }
12103 pub fn with_zklogin<T: Into<super::ZkLoginPublicIdentifier>>(
12105 mut self,
12106 field: T,
12107 ) -> Self {
12108 self.set_zklogin(field.into());
12109 self
12110 }
12111 }
12112 impl super::MultisigMemberSignature {
12113 pub const fn const_default() -> Self {
12114 Self {
12115 scheme: None,
12116 signature: None,
12117 zklogin: None,
12118 passkey: None,
12119 }
12120 }
12121 #[doc(hidden)]
12122 pub fn default_instance() -> &'static Self {
12123 static DEFAULT: super::MultisigMemberSignature = super::MultisigMemberSignature::const_default();
12124 &DEFAULT
12125 }
12126 pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
12128 self.set_scheme(field.into());
12129 self
12130 }
12131 pub fn signature_opt(&self) -> Option<&[u8]> {
12133 self.signature.as_ref().map(|field| field as _)
12134 }
12135 pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
12137 self.signature = Some(field.into().into());
12138 }
12139 pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
12141 mut self,
12142 field: T,
12143 ) -> Self {
12144 self.set_signature(field.into());
12145 self
12146 }
12147 pub fn zklogin(&self) -> &super::ZkLoginAuthenticator {
12149 self.zklogin
12150 .as_ref()
12151 .map(|field| field as _)
12152 .unwrap_or_else(|| super::ZkLoginAuthenticator::default_instance() as _)
12153 }
12154 pub fn zklogin_opt_mut(&mut self) -> Option<&mut super::ZkLoginAuthenticator> {
12156 self.zklogin.as_mut().map(|field| field as _)
12157 }
12158 pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginAuthenticator {
12161 self.zklogin.get_or_insert_default()
12162 }
12163 pub fn zklogin_opt(&self) -> Option<&super::ZkLoginAuthenticator> {
12165 self.zklogin.as_ref().map(|field| field as _)
12166 }
12167 pub fn set_zklogin<T: Into<super::ZkLoginAuthenticator>>(&mut self, field: T) {
12169 self.zklogin = Some(field.into().into());
12170 }
12171 pub fn with_zklogin<T: Into<super::ZkLoginAuthenticator>>(
12173 mut self,
12174 field: T,
12175 ) -> Self {
12176 self.set_zklogin(field.into());
12177 self
12178 }
12179 pub fn passkey(&self) -> &super::PasskeyAuthenticator {
12181 self.passkey
12182 .as_ref()
12183 .map(|field| field as _)
12184 .unwrap_or_else(|| super::PasskeyAuthenticator::default_instance() as _)
12185 }
12186 pub fn passkey_opt_mut(&mut self) -> Option<&mut super::PasskeyAuthenticator> {
12188 self.passkey.as_mut().map(|field| field as _)
12189 }
12190 pub fn passkey_mut(&mut self) -> &mut super::PasskeyAuthenticator {
12193 self.passkey.get_or_insert_default()
12194 }
12195 pub fn passkey_opt(&self) -> Option<&super::PasskeyAuthenticator> {
12197 self.passkey.as_ref().map(|field| field as _)
12198 }
12199 pub fn set_passkey<T: Into<super::PasskeyAuthenticator>>(&mut self, field: T) {
12201 self.passkey = Some(field.into().into());
12202 }
12203 pub fn with_passkey<T: Into<super::PasskeyAuthenticator>>(
12205 mut self,
12206 field: T,
12207 ) -> Self {
12208 self.set_passkey(field.into());
12209 self
12210 }
12211 }
12212 impl super::NameRecord {
12213 pub const fn const_default() -> Self {
12214 Self {
12215 id: None,
12216 name: None,
12217 registration_nft_id: None,
12218 expiration_timestamp: None,
12219 target_address: None,
12220 data: std::collections::BTreeMap::new(),
12221 }
12222 }
12223 #[doc(hidden)]
12224 pub fn default_instance() -> &'static Self {
12225 static DEFAULT: super::NameRecord = super::NameRecord::const_default();
12226 &DEFAULT
12227 }
12228 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
12230 self.id.as_mut().map(|field| field as _)
12231 }
12232 pub fn id_mut(&mut self) -> &mut String {
12235 self.id.get_or_insert_default()
12236 }
12237 pub fn id_opt(&self) -> Option<&str> {
12239 self.id.as_ref().map(|field| field as _)
12240 }
12241 pub fn set_id<T: Into<String>>(&mut self, field: T) {
12243 self.id = Some(field.into().into());
12244 }
12245 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
12247 self.set_id(field.into());
12248 self
12249 }
12250 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
12252 self.name.as_mut().map(|field| field as _)
12253 }
12254 pub fn name_mut(&mut self) -> &mut String {
12257 self.name.get_or_insert_default()
12258 }
12259 pub fn name_opt(&self) -> Option<&str> {
12261 self.name.as_ref().map(|field| field as _)
12262 }
12263 pub fn set_name<T: Into<String>>(&mut self, field: T) {
12265 self.name = Some(field.into().into());
12266 }
12267 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
12269 self.set_name(field.into());
12270 self
12271 }
12272 pub fn registration_nft_id_opt_mut(&mut self) -> Option<&mut String> {
12274 self.registration_nft_id.as_mut().map(|field| field as _)
12275 }
12276 pub fn registration_nft_id_mut(&mut self) -> &mut String {
12279 self.registration_nft_id.get_or_insert_default()
12280 }
12281 pub fn registration_nft_id_opt(&self) -> Option<&str> {
12283 self.registration_nft_id.as_ref().map(|field| field as _)
12284 }
12285 pub fn set_registration_nft_id<T: Into<String>>(&mut self, field: T) {
12287 self.registration_nft_id = Some(field.into().into());
12288 }
12289 pub fn with_registration_nft_id<T: Into<String>>(mut self, field: T) -> Self {
12291 self.set_registration_nft_id(field.into());
12292 self
12293 }
12294 pub fn expiration_timestamp_opt_mut(
12296 &mut self,
12297 ) -> Option<&mut ::prost_types::Timestamp> {
12298 self.expiration_timestamp.as_mut().map(|field| field as _)
12299 }
12300 pub fn expiration_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
12303 self.expiration_timestamp.get_or_insert_default()
12304 }
12305 pub fn expiration_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
12307 self.expiration_timestamp.as_ref().map(|field| field as _)
12308 }
12309 pub fn set_expiration_timestamp<T: Into<::prost_types::Timestamp>>(
12311 &mut self,
12312 field: T,
12313 ) {
12314 self.expiration_timestamp = Some(field.into().into());
12315 }
12316 pub fn with_expiration_timestamp<T: Into<::prost_types::Timestamp>>(
12318 mut self,
12319 field: T,
12320 ) -> Self {
12321 self.set_expiration_timestamp(field.into());
12322 self
12323 }
12324 pub fn target_address_opt_mut(&mut self) -> Option<&mut String> {
12326 self.target_address.as_mut().map(|field| field as _)
12327 }
12328 pub fn target_address_mut(&mut self) -> &mut String {
12331 self.target_address.get_or_insert_default()
12332 }
12333 pub fn target_address_opt(&self) -> Option<&str> {
12335 self.target_address.as_ref().map(|field| field as _)
12336 }
12337 pub fn set_target_address<T: Into<String>>(&mut self, field: T) {
12339 self.target_address = Some(field.into().into());
12340 }
12341 pub fn with_target_address<T: Into<String>>(mut self, field: T) -> Self {
12343 self.set_target_address(field.into());
12344 self
12345 }
12346 pub fn data(&self) -> &::std::collections::BTreeMap<String, String> {
12348 &self.data
12349 }
12350 pub fn data_mut(&mut self) -> &mut ::std::collections::BTreeMap<String, String> {
12353 &mut self.data
12354 }
12355 pub fn set_data(&mut self, field: ::std::collections::BTreeMap<String, String>) {
12357 self.data = field;
12358 }
12359 pub fn with_data(
12361 mut self,
12362 field: ::std::collections::BTreeMap<String, String>,
12363 ) -> Self {
12364 self.set_data(field);
12365 self
12366 }
12367 }
12368 impl super::Object {
12369 pub const fn const_default() -> Self {
12370 Self {
12371 bcs: None,
12372 object_id: None,
12373 version: None,
12374 digest: None,
12375 owner: None,
12376 object_type: None,
12377 has_public_transfer: None,
12378 contents: None,
12379 package: None,
12380 previous_transaction: None,
12381 storage_rebate: None,
12382 json: None,
12383 balance: None,
12384 display: None,
12385 }
12386 }
12387 #[doc(hidden)]
12388 pub fn default_instance() -> &'static Self {
12389 static DEFAULT: super::Object = super::Object::const_default();
12390 &DEFAULT
12391 }
12392 pub fn bcs(&self) -> &super::Bcs {
12394 self.bcs
12395 .as_ref()
12396 .map(|field| field as _)
12397 .unwrap_or_else(|| super::Bcs::default_instance() as _)
12398 }
12399 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
12401 self.bcs.as_mut().map(|field| field as _)
12402 }
12403 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
12406 self.bcs.get_or_insert_default()
12407 }
12408 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
12410 self.bcs.as_ref().map(|field| field as _)
12411 }
12412 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
12414 self.bcs = Some(field.into().into());
12415 }
12416 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
12418 self.set_bcs(field.into());
12419 self
12420 }
12421 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
12423 self.object_id.as_mut().map(|field| field as _)
12424 }
12425 pub fn object_id_mut(&mut self) -> &mut String {
12428 self.object_id.get_or_insert_default()
12429 }
12430 pub fn object_id_opt(&self) -> Option<&str> {
12432 self.object_id.as_ref().map(|field| field as _)
12433 }
12434 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
12436 self.object_id = Some(field.into().into());
12437 }
12438 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
12440 self.set_object_id(field.into());
12441 self
12442 }
12443 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
12445 self.version.as_mut().map(|field| field as _)
12446 }
12447 pub fn version_mut(&mut self) -> &mut u64 {
12450 self.version.get_or_insert_default()
12451 }
12452 pub fn version_opt(&self) -> Option<u64> {
12454 self.version.as_ref().map(|field| *field)
12455 }
12456 pub fn set_version(&mut self, field: u64) {
12458 self.version = Some(field);
12459 }
12460 pub fn with_version(mut self, field: u64) -> Self {
12462 self.set_version(field);
12463 self
12464 }
12465 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
12467 self.digest.as_mut().map(|field| field as _)
12468 }
12469 pub fn digest_mut(&mut self) -> &mut String {
12472 self.digest.get_or_insert_default()
12473 }
12474 pub fn digest_opt(&self) -> Option<&str> {
12476 self.digest.as_ref().map(|field| field as _)
12477 }
12478 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
12480 self.digest = Some(field.into().into());
12481 }
12482 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
12484 self.set_digest(field.into());
12485 self
12486 }
12487 pub fn owner(&self) -> &super::Owner {
12489 self.owner
12490 .as_ref()
12491 .map(|field| field as _)
12492 .unwrap_or_else(|| super::Owner::default_instance() as _)
12493 }
12494 pub fn owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
12496 self.owner.as_mut().map(|field| field as _)
12497 }
12498 pub fn owner_mut(&mut self) -> &mut super::Owner {
12501 self.owner.get_or_insert_default()
12502 }
12503 pub fn owner_opt(&self) -> Option<&super::Owner> {
12505 self.owner.as_ref().map(|field| field as _)
12506 }
12507 pub fn set_owner<T: Into<super::Owner>>(&mut self, field: T) {
12509 self.owner = Some(field.into().into());
12510 }
12511 pub fn with_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
12513 self.set_owner(field.into());
12514 self
12515 }
12516 pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
12518 self.object_type.as_mut().map(|field| field as _)
12519 }
12520 pub fn object_type_mut(&mut self) -> &mut String {
12523 self.object_type.get_or_insert_default()
12524 }
12525 pub fn object_type_opt(&self) -> Option<&str> {
12527 self.object_type.as_ref().map(|field| field as _)
12528 }
12529 pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
12531 self.object_type = Some(field.into().into());
12532 }
12533 pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
12535 self.set_object_type(field.into());
12536 self
12537 }
12538 pub fn has_public_transfer_opt_mut(&mut self) -> Option<&mut bool> {
12540 self.has_public_transfer.as_mut().map(|field| field as _)
12541 }
12542 pub fn has_public_transfer_mut(&mut self) -> &mut bool {
12545 self.has_public_transfer.get_or_insert_default()
12546 }
12547 pub fn has_public_transfer_opt(&self) -> Option<bool> {
12549 self.has_public_transfer.as_ref().map(|field| *field)
12550 }
12551 pub fn set_has_public_transfer(&mut self, field: bool) {
12553 self.has_public_transfer = Some(field);
12554 }
12555 pub fn with_has_public_transfer(mut self, field: bool) -> Self {
12557 self.set_has_public_transfer(field);
12558 self
12559 }
12560 pub fn contents(&self) -> &super::Bcs {
12562 self.contents
12563 .as_ref()
12564 .map(|field| field as _)
12565 .unwrap_or_else(|| super::Bcs::default_instance() as _)
12566 }
12567 pub fn contents_opt_mut(&mut self) -> Option<&mut super::Bcs> {
12569 self.contents.as_mut().map(|field| field as _)
12570 }
12571 pub fn contents_mut(&mut self) -> &mut super::Bcs {
12574 self.contents.get_or_insert_default()
12575 }
12576 pub fn contents_opt(&self) -> Option<&super::Bcs> {
12578 self.contents.as_ref().map(|field| field as _)
12579 }
12580 pub fn set_contents<T: Into<super::Bcs>>(&mut self, field: T) {
12582 self.contents = Some(field.into().into());
12583 }
12584 pub fn with_contents<T: Into<super::Bcs>>(mut self, field: T) -> Self {
12586 self.set_contents(field.into());
12587 self
12588 }
12589 pub fn package(&self) -> &super::Package {
12591 self.package
12592 .as_ref()
12593 .map(|field| field as _)
12594 .unwrap_or_else(|| super::Package::default_instance() as _)
12595 }
12596 pub fn package_opt_mut(&mut self) -> Option<&mut super::Package> {
12598 self.package.as_mut().map(|field| field as _)
12599 }
12600 pub fn package_mut(&mut self) -> &mut super::Package {
12603 self.package.get_or_insert_default()
12604 }
12605 pub fn package_opt(&self) -> Option<&super::Package> {
12607 self.package.as_ref().map(|field| field as _)
12608 }
12609 pub fn set_package<T: Into<super::Package>>(&mut self, field: T) {
12611 self.package = Some(field.into().into());
12612 }
12613 pub fn with_package<T: Into<super::Package>>(mut self, field: T) -> Self {
12615 self.set_package(field.into());
12616 self
12617 }
12618 pub fn previous_transaction_opt_mut(&mut self) -> Option<&mut String> {
12620 self.previous_transaction.as_mut().map(|field| field as _)
12621 }
12622 pub fn previous_transaction_mut(&mut self) -> &mut String {
12625 self.previous_transaction.get_or_insert_default()
12626 }
12627 pub fn previous_transaction_opt(&self) -> Option<&str> {
12629 self.previous_transaction.as_ref().map(|field| field as _)
12630 }
12631 pub fn set_previous_transaction<T: Into<String>>(&mut self, field: T) {
12633 self.previous_transaction = Some(field.into().into());
12634 }
12635 pub fn with_previous_transaction<T: Into<String>>(mut self, field: T) -> Self {
12637 self.set_previous_transaction(field.into());
12638 self
12639 }
12640 pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
12642 self.storage_rebate.as_mut().map(|field| field as _)
12643 }
12644 pub fn storage_rebate_mut(&mut self) -> &mut u64 {
12647 self.storage_rebate.get_or_insert_default()
12648 }
12649 pub fn storage_rebate_opt(&self) -> Option<u64> {
12651 self.storage_rebate.as_ref().map(|field| *field)
12652 }
12653 pub fn set_storage_rebate(&mut self, field: u64) {
12655 self.storage_rebate = Some(field);
12656 }
12657 pub fn with_storage_rebate(mut self, field: u64) -> Self {
12659 self.set_storage_rebate(field);
12660 self
12661 }
12662 pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
12664 self.json.as_mut().map(|field| field as _)
12665 }
12666 pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
12669 self.json.get_or_insert_default()
12670 }
12671 pub fn json_opt(&self) -> Option<&::prost_types::Value> {
12673 self.json.as_ref().map(|field| field as _)
12674 }
12675 pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
12677 self.json = Some(field.into().into());
12678 }
12679 pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
12681 self.set_json(field.into());
12682 self
12683 }
12684 pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
12686 self.balance.as_mut().map(|field| field as _)
12687 }
12688 pub fn balance_mut(&mut self) -> &mut u64 {
12691 self.balance.get_or_insert_default()
12692 }
12693 pub fn balance_opt(&self) -> Option<u64> {
12695 self.balance.as_ref().map(|field| *field)
12696 }
12697 pub fn set_balance(&mut self, field: u64) {
12699 self.balance = Some(field);
12700 }
12701 pub fn with_balance(mut self, field: u64) -> Self {
12703 self.set_balance(field);
12704 self
12705 }
12706 pub fn display(&self) -> &super::Display {
12708 self.display
12709 .as_ref()
12710 .map(|field| field as _)
12711 .unwrap_or_else(|| super::Display::default_instance() as _)
12712 }
12713 pub fn display_opt_mut(&mut self) -> Option<&mut super::Display> {
12715 self.display.as_mut().map(|field| field as _)
12716 }
12717 pub fn display_mut(&mut self) -> &mut super::Display {
12720 self.display.get_or_insert_default()
12721 }
12722 pub fn display_opt(&self) -> Option<&super::Display> {
12724 self.display.as_ref().map(|field| field as _)
12725 }
12726 pub fn set_display<T: Into<super::Display>>(&mut self, field: T) {
12728 self.display = Some(field.into().into());
12729 }
12730 pub fn with_display<T: Into<super::Display>>(mut self, field: T) -> Self {
12732 self.set_display(field.into());
12733 self
12734 }
12735 }
12736 impl super::ObjectReference {
12737 pub const fn const_default() -> Self {
12738 Self {
12739 object_id: None,
12740 version: None,
12741 digest: None,
12742 }
12743 }
12744 #[doc(hidden)]
12745 pub fn default_instance() -> &'static Self {
12746 static DEFAULT: super::ObjectReference = super::ObjectReference::const_default();
12747 &DEFAULT
12748 }
12749 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
12751 self.object_id.as_mut().map(|field| field as _)
12752 }
12753 pub fn object_id_mut(&mut self) -> &mut String {
12756 self.object_id.get_or_insert_default()
12757 }
12758 pub fn object_id_opt(&self) -> Option<&str> {
12760 self.object_id.as_ref().map(|field| field as _)
12761 }
12762 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
12764 self.object_id = Some(field.into().into());
12765 }
12766 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
12768 self.set_object_id(field.into());
12769 self
12770 }
12771 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
12773 self.version.as_mut().map(|field| field as _)
12774 }
12775 pub fn version_mut(&mut self) -> &mut u64 {
12778 self.version.get_or_insert_default()
12779 }
12780 pub fn version_opt(&self) -> Option<u64> {
12782 self.version.as_ref().map(|field| *field)
12783 }
12784 pub fn set_version(&mut self, field: u64) {
12786 self.version = Some(field);
12787 }
12788 pub fn with_version(mut self, field: u64) -> Self {
12790 self.set_version(field);
12791 self
12792 }
12793 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
12795 self.digest.as_mut().map(|field| field as _)
12796 }
12797 pub fn digest_mut(&mut self) -> &mut String {
12800 self.digest.get_or_insert_default()
12801 }
12802 pub fn digest_opt(&self) -> Option<&str> {
12804 self.digest.as_ref().map(|field| field as _)
12805 }
12806 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
12808 self.digest = Some(field.into().into());
12809 }
12810 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
12812 self.set_digest(field.into());
12813 self
12814 }
12815 }
12816 impl super::ObjectSet {
12817 pub const fn const_default() -> Self {
12818 Self { objects: Vec::new() }
12819 }
12820 #[doc(hidden)]
12821 pub fn default_instance() -> &'static Self {
12822 static DEFAULT: super::ObjectSet = super::ObjectSet::const_default();
12823 &DEFAULT
12824 }
12825 pub fn objects(&self) -> &[super::Object] {
12827 &self.objects
12828 }
12829 pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
12832 &mut self.objects
12833 }
12834 pub fn set_objects(&mut self, field: Vec<super::Object>) {
12836 self.objects = field;
12837 }
12838 pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
12840 self.set_objects(field);
12841 self
12842 }
12843 }
12844 impl super::OpenSignature {
12845 pub const fn const_default() -> Self {
12846 Self {
12847 reference: None,
12848 body: None,
12849 }
12850 }
12851 #[doc(hidden)]
12852 pub fn default_instance() -> &'static Self {
12853 static DEFAULT: super::OpenSignature = super::OpenSignature::const_default();
12854 &DEFAULT
12855 }
12856 pub fn with_reference<T: Into<super::open_signature::Reference>>(
12858 mut self,
12859 field: T,
12860 ) -> Self {
12861 self.set_reference(field.into());
12862 self
12863 }
12864 pub fn body(&self) -> &super::OpenSignatureBody {
12866 self.body
12867 .as_ref()
12868 .map(|field| field as _)
12869 .unwrap_or_else(|| super::OpenSignatureBody::default_instance() as _)
12870 }
12871 pub fn body_opt_mut(&mut self) -> Option<&mut super::OpenSignatureBody> {
12873 self.body.as_mut().map(|field| field as _)
12874 }
12875 pub fn body_mut(&mut self) -> &mut super::OpenSignatureBody {
12878 self.body.get_or_insert_default()
12879 }
12880 pub fn body_opt(&self) -> Option<&super::OpenSignatureBody> {
12882 self.body.as_ref().map(|field| field as _)
12883 }
12884 pub fn set_body<T: Into<super::OpenSignatureBody>>(&mut self, field: T) {
12886 self.body = Some(field.into().into());
12887 }
12888 pub fn with_body<T: Into<super::OpenSignatureBody>>(mut self, field: T) -> Self {
12890 self.set_body(field.into());
12891 self
12892 }
12893 }
12894 impl super::OpenSignatureBody {
12895 pub const fn const_default() -> Self {
12896 Self {
12897 r#type: None,
12898 type_name: None,
12899 type_parameter_instantiation: Vec::new(),
12900 type_parameter: None,
12901 }
12902 }
12903 #[doc(hidden)]
12904 pub fn default_instance() -> &'static Self {
12905 static DEFAULT: super::OpenSignatureBody = super::OpenSignatureBody::const_default();
12906 &DEFAULT
12907 }
12908 pub fn with_type<T: Into<super::open_signature_body::Type>>(
12910 mut self,
12911 field: T,
12912 ) -> Self {
12913 self.set_type(field.into());
12914 self
12915 }
12916 pub fn type_name_opt_mut(&mut self) -> Option<&mut String> {
12918 self.type_name.as_mut().map(|field| field as _)
12919 }
12920 pub fn type_name_mut(&mut self) -> &mut String {
12923 self.type_name.get_or_insert_default()
12924 }
12925 pub fn type_name_opt(&self) -> Option<&str> {
12927 self.type_name.as_ref().map(|field| field as _)
12928 }
12929 pub fn set_type_name<T: Into<String>>(&mut self, field: T) {
12931 self.type_name = Some(field.into().into());
12932 }
12933 pub fn with_type_name<T: Into<String>>(mut self, field: T) -> Self {
12935 self.set_type_name(field.into());
12936 self
12937 }
12938 pub fn type_parameter_instantiation(&self) -> &[super::OpenSignatureBody] {
12940 &self.type_parameter_instantiation
12941 }
12942 pub fn type_parameter_instantiation_mut(
12945 &mut self,
12946 ) -> &mut Vec<super::OpenSignatureBody> {
12947 &mut self.type_parameter_instantiation
12948 }
12949 pub fn set_type_parameter_instantiation(
12951 &mut self,
12952 field: Vec<super::OpenSignatureBody>,
12953 ) {
12954 self.type_parameter_instantiation = field;
12955 }
12956 pub fn with_type_parameter_instantiation(
12958 mut self,
12959 field: Vec<super::OpenSignatureBody>,
12960 ) -> Self {
12961 self.set_type_parameter_instantiation(field);
12962 self
12963 }
12964 pub fn type_parameter_opt_mut(&mut self) -> Option<&mut u32> {
12966 self.type_parameter.as_mut().map(|field| field as _)
12967 }
12968 pub fn type_parameter_mut(&mut self) -> &mut u32 {
12971 self.type_parameter.get_or_insert_default()
12972 }
12973 pub fn type_parameter_opt(&self) -> Option<u32> {
12975 self.type_parameter.as_ref().map(|field| *field)
12976 }
12977 pub fn set_type_parameter(&mut self, field: u32) {
12979 self.type_parameter = Some(field);
12980 }
12981 pub fn with_type_parameter(mut self, field: u32) -> Self {
12983 self.set_type_parameter(field);
12984 self
12985 }
12986 }
12987 impl super::Owner {
12988 pub const fn const_default() -> Self {
12989 Self {
12990 kind: None,
12991 address: None,
12992 version: None,
12993 }
12994 }
12995 #[doc(hidden)]
12996 pub fn default_instance() -> &'static Self {
12997 static DEFAULT: super::Owner = super::Owner::const_default();
12998 &DEFAULT
12999 }
13000 pub fn with_kind<T: Into<super::owner::OwnerKind>>(mut self, field: T) -> Self {
13002 self.set_kind(field.into());
13003 self
13004 }
13005 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
13007 self.address.as_mut().map(|field| field as _)
13008 }
13009 pub fn address_mut(&mut self) -> &mut String {
13012 self.address.get_or_insert_default()
13013 }
13014 pub fn address_opt(&self) -> Option<&str> {
13016 self.address.as_ref().map(|field| field as _)
13017 }
13018 pub fn set_address<T: Into<String>>(&mut self, field: T) {
13020 self.address = Some(field.into().into());
13021 }
13022 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
13024 self.set_address(field.into());
13025 self
13026 }
13027 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
13029 self.version.as_mut().map(|field| field as _)
13030 }
13031 pub fn version_mut(&mut self) -> &mut u64 {
13034 self.version.get_or_insert_default()
13035 }
13036 pub fn version_opt(&self) -> Option<u64> {
13038 self.version.as_ref().map(|field| *field)
13039 }
13040 pub fn set_version(&mut self, field: u64) {
13042 self.version = Some(field);
13043 }
13044 pub fn with_version(mut self, field: u64) -> Self {
13046 self.set_version(field);
13047 self
13048 }
13049 }
13050 impl super::Package {
13051 pub const fn const_default() -> Self {
13052 Self {
13053 storage_id: None,
13054 original_id: None,
13055 version: None,
13056 modules: Vec::new(),
13057 type_origins: Vec::new(),
13058 linkage: Vec::new(),
13059 }
13060 }
13061 #[doc(hidden)]
13062 pub fn default_instance() -> &'static Self {
13063 static DEFAULT: super::Package = super::Package::const_default();
13064 &DEFAULT
13065 }
13066 pub fn storage_id_opt_mut(&mut self) -> Option<&mut String> {
13068 self.storage_id.as_mut().map(|field| field as _)
13069 }
13070 pub fn storage_id_mut(&mut self) -> &mut String {
13073 self.storage_id.get_or_insert_default()
13074 }
13075 pub fn storage_id_opt(&self) -> Option<&str> {
13077 self.storage_id.as_ref().map(|field| field as _)
13078 }
13079 pub fn set_storage_id<T: Into<String>>(&mut self, field: T) {
13081 self.storage_id = Some(field.into().into());
13082 }
13083 pub fn with_storage_id<T: Into<String>>(mut self, field: T) -> Self {
13085 self.set_storage_id(field.into());
13086 self
13087 }
13088 pub fn original_id_opt_mut(&mut self) -> Option<&mut String> {
13090 self.original_id.as_mut().map(|field| field as _)
13091 }
13092 pub fn original_id_mut(&mut self) -> &mut String {
13095 self.original_id.get_or_insert_default()
13096 }
13097 pub fn original_id_opt(&self) -> Option<&str> {
13099 self.original_id.as_ref().map(|field| field as _)
13100 }
13101 pub fn set_original_id<T: Into<String>>(&mut self, field: T) {
13103 self.original_id = Some(field.into().into());
13104 }
13105 pub fn with_original_id<T: Into<String>>(mut self, field: T) -> Self {
13107 self.set_original_id(field.into());
13108 self
13109 }
13110 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
13112 self.version.as_mut().map(|field| field as _)
13113 }
13114 pub fn version_mut(&mut self) -> &mut u64 {
13117 self.version.get_or_insert_default()
13118 }
13119 pub fn version_opt(&self) -> Option<u64> {
13121 self.version.as_ref().map(|field| *field)
13122 }
13123 pub fn set_version(&mut self, field: u64) {
13125 self.version = Some(field);
13126 }
13127 pub fn with_version(mut self, field: u64) -> Self {
13129 self.set_version(field);
13130 self
13131 }
13132 pub fn modules(&self) -> &[super::Module] {
13134 &self.modules
13135 }
13136 pub fn modules_mut(&mut self) -> &mut Vec<super::Module> {
13139 &mut self.modules
13140 }
13141 pub fn set_modules(&mut self, field: Vec<super::Module>) {
13143 self.modules = field;
13144 }
13145 pub fn with_modules(mut self, field: Vec<super::Module>) -> Self {
13147 self.set_modules(field);
13148 self
13149 }
13150 pub fn type_origins(&self) -> &[super::TypeOrigin] {
13152 &self.type_origins
13153 }
13154 pub fn type_origins_mut(&mut self) -> &mut Vec<super::TypeOrigin> {
13157 &mut self.type_origins
13158 }
13159 pub fn set_type_origins(&mut self, field: Vec<super::TypeOrigin>) {
13161 self.type_origins = field;
13162 }
13163 pub fn with_type_origins(mut self, field: Vec<super::TypeOrigin>) -> Self {
13165 self.set_type_origins(field);
13166 self
13167 }
13168 pub fn linkage(&self) -> &[super::Linkage] {
13170 &self.linkage
13171 }
13172 pub fn linkage_mut(&mut self) -> &mut Vec<super::Linkage> {
13175 &mut self.linkage
13176 }
13177 pub fn set_linkage(&mut self, field: Vec<super::Linkage>) {
13179 self.linkage = field;
13180 }
13181 pub fn with_linkage(mut self, field: Vec<super::Linkage>) -> Self {
13183 self.set_linkage(field);
13184 self
13185 }
13186 }
13187 impl super::PackageUpgradeError {
13188 pub const fn const_default() -> Self {
13189 Self {
13190 kind: None,
13191 package_id: None,
13192 digest: None,
13193 policy: None,
13194 ticket_id: None,
13195 }
13196 }
13197 #[doc(hidden)]
13198 pub fn default_instance() -> &'static Self {
13199 static DEFAULT: super::PackageUpgradeError = super::PackageUpgradeError::const_default();
13200 &DEFAULT
13201 }
13202 pub fn with_kind<T: Into<super::package_upgrade_error::PackageUpgradeErrorKind>>(
13204 mut self,
13205 field: T,
13206 ) -> Self {
13207 self.set_kind(field.into());
13208 self
13209 }
13210 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
13212 self.package_id.as_mut().map(|field| field as _)
13213 }
13214 pub fn package_id_mut(&mut self) -> &mut String {
13217 self.package_id.get_or_insert_default()
13218 }
13219 pub fn package_id_opt(&self) -> Option<&str> {
13221 self.package_id.as_ref().map(|field| field as _)
13222 }
13223 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
13225 self.package_id = Some(field.into().into());
13226 }
13227 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
13229 self.set_package_id(field.into());
13230 self
13231 }
13232 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
13234 self.digest.as_mut().map(|field| field as _)
13235 }
13236 pub fn digest_mut(&mut self) -> &mut String {
13239 self.digest.get_or_insert_default()
13240 }
13241 pub fn digest_opt(&self) -> Option<&str> {
13243 self.digest.as_ref().map(|field| field as _)
13244 }
13245 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
13247 self.digest = Some(field.into().into());
13248 }
13249 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
13251 self.set_digest(field.into());
13252 self
13253 }
13254 pub fn policy_opt_mut(&mut self) -> Option<&mut u32> {
13256 self.policy.as_mut().map(|field| field as _)
13257 }
13258 pub fn policy_mut(&mut self) -> &mut u32 {
13261 self.policy.get_or_insert_default()
13262 }
13263 pub fn policy_opt(&self) -> Option<u32> {
13265 self.policy.as_ref().map(|field| *field)
13266 }
13267 pub fn set_policy(&mut self, field: u32) {
13269 self.policy = Some(field);
13270 }
13271 pub fn with_policy(mut self, field: u32) -> Self {
13273 self.set_policy(field);
13274 self
13275 }
13276 pub fn ticket_id_opt_mut(&mut self) -> Option<&mut String> {
13278 self.ticket_id.as_mut().map(|field| field as _)
13279 }
13280 pub fn ticket_id_mut(&mut self) -> &mut String {
13283 self.ticket_id.get_or_insert_default()
13284 }
13285 pub fn ticket_id_opt(&self) -> Option<&str> {
13287 self.ticket_id.as_ref().map(|field| field as _)
13288 }
13289 pub fn set_ticket_id<T: Into<String>>(&mut self, field: T) {
13291 self.ticket_id = Some(field.into().into());
13292 }
13293 pub fn with_ticket_id<T: Into<String>>(mut self, field: T) -> Self {
13295 self.set_ticket_id(field.into());
13296 self
13297 }
13298 }
13299 impl super::PackageVersion {
13300 pub const fn const_default() -> Self {
13301 Self {
13302 package_id: None,
13303 version: None,
13304 }
13305 }
13306 #[doc(hidden)]
13307 pub fn default_instance() -> &'static Self {
13308 static DEFAULT: super::PackageVersion = super::PackageVersion::const_default();
13309 &DEFAULT
13310 }
13311 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
13313 self.package_id.as_mut().map(|field| field as _)
13314 }
13315 pub fn package_id_mut(&mut self) -> &mut String {
13318 self.package_id.get_or_insert_default()
13319 }
13320 pub fn package_id_opt(&self) -> Option<&str> {
13322 self.package_id.as_ref().map(|field| field as _)
13323 }
13324 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
13326 self.package_id = Some(field.into().into());
13327 }
13328 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
13330 self.set_package_id(field.into());
13331 self
13332 }
13333 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
13335 self.version.as_mut().map(|field| field as _)
13336 }
13337 pub fn version_mut(&mut self) -> &mut u64 {
13340 self.version.get_or_insert_default()
13341 }
13342 pub fn version_opt(&self) -> Option<u64> {
13344 self.version.as_ref().map(|field| *field)
13345 }
13346 pub fn set_version(&mut self, field: u64) {
13348 self.version = Some(field);
13349 }
13350 pub fn with_version(mut self, field: u64) -> Self {
13352 self.set_version(field);
13353 self
13354 }
13355 }
13356 impl super::PackageWriteFilter {
13357 pub const fn const_default() -> Self {
13358 Self {}
13359 }
13360 #[doc(hidden)]
13361 pub fn default_instance() -> &'static Self {
13362 static DEFAULT: super::PackageWriteFilter = super::PackageWriteFilter::const_default();
13363 &DEFAULT
13364 }
13365 }
13366 impl super::PasskeyAuthenticator {
13367 pub const fn const_default() -> Self {
13368 Self {
13369 authenticator_data: None,
13370 client_data_json: None,
13371 signature: None,
13372 }
13373 }
13374 #[doc(hidden)]
13375 pub fn default_instance() -> &'static Self {
13376 static DEFAULT: super::PasskeyAuthenticator = super::PasskeyAuthenticator::const_default();
13377 &DEFAULT
13378 }
13379 pub fn authenticator_data_opt(&self) -> Option<&[u8]> {
13381 self.authenticator_data.as_ref().map(|field| field as _)
13382 }
13383 pub fn set_authenticator_data<T: Into<::prost::bytes::Bytes>>(
13385 &mut self,
13386 field: T,
13387 ) {
13388 self.authenticator_data = Some(field.into().into());
13389 }
13390 pub fn with_authenticator_data<T: Into<::prost::bytes::Bytes>>(
13392 mut self,
13393 field: T,
13394 ) -> Self {
13395 self.set_authenticator_data(field.into());
13396 self
13397 }
13398 pub fn client_data_json_opt_mut(&mut self) -> Option<&mut String> {
13400 self.client_data_json.as_mut().map(|field| field as _)
13401 }
13402 pub fn client_data_json_mut(&mut self) -> &mut String {
13405 self.client_data_json.get_or_insert_default()
13406 }
13407 pub fn client_data_json_opt(&self) -> Option<&str> {
13409 self.client_data_json.as_ref().map(|field| field as _)
13410 }
13411 pub fn set_client_data_json<T: Into<String>>(&mut self, field: T) {
13413 self.client_data_json = Some(field.into().into());
13414 }
13415 pub fn with_client_data_json<T: Into<String>>(mut self, field: T) -> Self {
13417 self.set_client_data_json(field.into());
13418 self
13419 }
13420 pub fn signature(&self) -> &super::SimpleSignature {
13422 self.signature
13423 .as_ref()
13424 .map(|field| field as _)
13425 .unwrap_or_else(|| super::SimpleSignature::default_instance() as _)
13426 }
13427 pub fn signature_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
13429 self.signature.as_mut().map(|field| field as _)
13430 }
13431 pub fn signature_mut(&mut self) -> &mut super::SimpleSignature {
13434 self.signature.get_or_insert_default()
13435 }
13436 pub fn signature_opt(&self) -> Option<&super::SimpleSignature> {
13438 self.signature.as_ref().map(|field| field as _)
13439 }
13440 pub fn set_signature<T: Into<super::SimpleSignature>>(&mut self, field: T) {
13442 self.signature = Some(field.into().into());
13443 }
13444 pub fn with_signature<T: Into<super::SimpleSignature>>(
13446 mut self,
13447 field: T,
13448 ) -> Self {
13449 self.set_signature(field.into());
13450 self
13451 }
13452 }
13453 impl super::ProgrammableTransaction {
13454 pub const fn const_default() -> Self {
13455 Self {
13456 inputs: Vec::new(),
13457 commands: Vec::new(),
13458 }
13459 }
13460 #[doc(hidden)]
13461 pub fn default_instance() -> &'static Self {
13462 static DEFAULT: super::ProgrammableTransaction = super::ProgrammableTransaction::const_default();
13463 &DEFAULT
13464 }
13465 pub fn inputs(&self) -> &[super::Input] {
13467 &self.inputs
13468 }
13469 pub fn inputs_mut(&mut self) -> &mut Vec<super::Input> {
13472 &mut self.inputs
13473 }
13474 pub fn set_inputs(&mut self, field: Vec<super::Input>) {
13476 self.inputs = field;
13477 }
13478 pub fn with_inputs(mut self, field: Vec<super::Input>) -> Self {
13480 self.set_inputs(field);
13481 self
13482 }
13483 pub fn commands(&self) -> &[super::Command] {
13485 &self.commands
13486 }
13487 pub fn commands_mut(&mut self) -> &mut Vec<super::Command> {
13490 &mut self.commands
13491 }
13492 pub fn set_commands(&mut self, field: Vec<super::Command>) {
13494 self.commands = field;
13495 }
13496 pub fn with_commands(mut self, field: Vec<super::Command>) -> Self {
13498 self.set_commands(field);
13499 self
13500 }
13501 }
13502 impl super::ProtocolConfig {
13503 pub const fn const_default() -> Self {
13504 Self {
13505 protocol_version: None,
13506 feature_flags: std::collections::BTreeMap::new(),
13507 attributes: std::collections::BTreeMap::new(),
13508 configs: std::collections::BTreeMap::new(),
13509 }
13510 }
13511 #[doc(hidden)]
13512 pub fn default_instance() -> &'static Self {
13513 static DEFAULT: super::ProtocolConfig = super::ProtocolConfig::const_default();
13514 &DEFAULT
13515 }
13516 pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
13518 self.protocol_version.as_mut().map(|field| field as _)
13519 }
13520 pub fn protocol_version_mut(&mut self) -> &mut u64 {
13523 self.protocol_version.get_or_insert_default()
13524 }
13525 pub fn protocol_version_opt(&self) -> Option<u64> {
13527 self.protocol_version.as_ref().map(|field| *field)
13528 }
13529 pub fn set_protocol_version(&mut self, field: u64) {
13531 self.protocol_version = Some(field);
13532 }
13533 pub fn with_protocol_version(mut self, field: u64) -> Self {
13535 self.set_protocol_version(field);
13536 self
13537 }
13538 pub fn feature_flags(&self) -> &::std::collections::BTreeMap<String, bool> {
13540 &self.feature_flags
13541 }
13542 pub fn feature_flags_mut(
13545 &mut self,
13546 ) -> &mut ::std::collections::BTreeMap<String, bool> {
13547 &mut self.feature_flags
13548 }
13549 pub fn set_feature_flags(
13551 &mut self,
13552 field: ::std::collections::BTreeMap<String, bool>,
13553 ) {
13554 self.feature_flags = field;
13555 }
13556 pub fn with_feature_flags(
13558 mut self,
13559 field: ::std::collections::BTreeMap<String, bool>,
13560 ) -> Self {
13561 self.set_feature_flags(field);
13562 self
13563 }
13564 pub fn attributes(&self) -> &::std::collections::BTreeMap<String, String> {
13566 &self.attributes
13567 }
13568 pub fn attributes_mut(
13571 &mut self,
13572 ) -> &mut ::std::collections::BTreeMap<String, String> {
13573 &mut self.attributes
13574 }
13575 pub fn set_attributes(
13577 &mut self,
13578 field: ::std::collections::BTreeMap<String, String>,
13579 ) {
13580 self.attributes = field;
13581 }
13582 pub fn with_attributes(
13584 mut self,
13585 field: ::std::collections::BTreeMap<String, String>,
13586 ) -> Self {
13587 self.set_attributes(field);
13588 self
13589 }
13590 pub fn configs(
13592 &self,
13593 ) -> &::std::collections::BTreeMap<String, ::prost_types::Value> {
13594 &self.configs
13595 }
13596 pub fn configs_mut(
13599 &mut self,
13600 ) -> &mut ::std::collections::BTreeMap<String, ::prost_types::Value> {
13601 &mut self.configs
13602 }
13603 pub fn set_configs(
13605 &mut self,
13606 field: ::std::collections::BTreeMap<String, ::prost_types::Value>,
13607 ) {
13608 self.configs = field;
13609 }
13610 pub fn with_configs(
13612 mut self,
13613 field: ::std::collections::BTreeMap<String, ::prost_types::Value>,
13614 ) -> Self {
13615 self.set_configs(field);
13616 self
13617 }
13618 }
13619 impl super::Publish {
13620 pub const fn const_default() -> Self {
13621 Self {
13622 modules: Vec::new(),
13623 dependencies: Vec::new(),
13624 }
13625 }
13626 #[doc(hidden)]
13627 pub fn default_instance() -> &'static Self {
13628 static DEFAULT: super::Publish = super::Publish::const_default();
13629 &DEFAULT
13630 }
13631 pub fn modules(&self) -> &[::prost::bytes::Bytes] {
13633 &self.modules
13634 }
13635 pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
13638 &mut self.modules
13639 }
13640 pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
13642 self.modules = field;
13643 }
13644 pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
13646 self.set_modules(field);
13647 self
13648 }
13649 pub fn dependencies(&self) -> &[String] {
13651 &self.dependencies
13652 }
13653 pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
13656 &mut self.dependencies
13657 }
13658 pub fn set_dependencies(&mut self, field: Vec<String>) {
13660 self.dependencies = field;
13661 }
13662 pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
13664 self.set_dependencies(field);
13665 self
13666 }
13667 }
13668 impl super::QueryEnd {
13669 pub const fn const_default() -> Self {
13670 Self { reason: None }
13671 }
13672 #[doc(hidden)]
13673 pub fn default_instance() -> &'static Self {
13674 static DEFAULT: super::QueryEnd = super::QueryEnd::const_default();
13675 &DEFAULT
13676 }
13677 pub fn with_reason<T: Into<super::QueryEndReason>>(mut self, field: T) -> Self {
13679 self.set_reason(field.into());
13680 self
13681 }
13682 }
13683 impl super::QueryOptions {
13684 pub const fn const_default() -> Self {
13685 Self {
13686 limit: None,
13687 after: None,
13688 before: None,
13689 ordering: None,
13690 }
13691 }
13692 #[doc(hidden)]
13693 pub fn default_instance() -> &'static Self {
13694 static DEFAULT: super::QueryOptions = super::QueryOptions::const_default();
13695 &DEFAULT
13696 }
13697 pub fn limit_opt_mut(&mut self) -> Option<&mut u32> {
13699 self.limit.as_mut().map(|field| field as _)
13700 }
13701 pub fn limit_mut(&mut self) -> &mut u32 {
13704 self.limit.get_or_insert_default()
13705 }
13706 pub fn limit_opt(&self) -> Option<u32> {
13708 self.limit.as_ref().map(|field| *field)
13709 }
13710 pub fn set_limit(&mut self, field: u32) {
13712 self.limit = Some(field);
13713 }
13714 pub fn with_limit(mut self, field: u32) -> Self {
13716 self.set_limit(field);
13717 self
13718 }
13719 pub fn after_opt(&self) -> Option<&[u8]> {
13721 self.after.as_ref().map(|field| field as _)
13722 }
13723 pub fn set_after<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
13725 self.after = Some(field.into().into());
13726 }
13727 pub fn with_after<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
13729 self.set_after(field.into());
13730 self
13731 }
13732 pub fn before_opt(&self) -> Option<&[u8]> {
13734 self.before.as_ref().map(|field| field as _)
13735 }
13736 pub fn set_before<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
13738 self.before = Some(field.into().into());
13739 }
13740 pub fn with_before<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
13742 self.set_before(field.into());
13743 self
13744 }
13745 pub fn with_ordering<T: Into<super::Ordering>>(mut self, field: T) -> Self {
13747 self.set_ordering(field.into());
13748 self
13749 }
13750 }
13751 impl super::RandomnessStateUpdate {
13752 pub const fn const_default() -> Self {
13753 Self {
13754 epoch: None,
13755 randomness_round: None,
13756 random_bytes: None,
13757 randomness_object_initial_shared_version: None,
13758 }
13759 }
13760 #[doc(hidden)]
13761 pub fn default_instance() -> &'static Self {
13762 static DEFAULT: super::RandomnessStateUpdate = super::RandomnessStateUpdate::const_default();
13763 &DEFAULT
13764 }
13765 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
13767 self.epoch.as_mut().map(|field| field as _)
13768 }
13769 pub fn epoch_mut(&mut self) -> &mut u64 {
13772 self.epoch.get_or_insert_default()
13773 }
13774 pub fn epoch_opt(&self) -> Option<u64> {
13776 self.epoch.as_ref().map(|field| *field)
13777 }
13778 pub fn set_epoch(&mut self, field: u64) {
13780 self.epoch = Some(field);
13781 }
13782 pub fn with_epoch(mut self, field: u64) -> Self {
13784 self.set_epoch(field);
13785 self
13786 }
13787 pub fn randomness_round_opt_mut(&mut self) -> Option<&mut u64> {
13789 self.randomness_round.as_mut().map(|field| field as _)
13790 }
13791 pub fn randomness_round_mut(&mut self) -> &mut u64 {
13794 self.randomness_round.get_or_insert_default()
13795 }
13796 pub fn randomness_round_opt(&self) -> Option<u64> {
13798 self.randomness_round.as_ref().map(|field| *field)
13799 }
13800 pub fn set_randomness_round(&mut self, field: u64) {
13802 self.randomness_round = Some(field);
13803 }
13804 pub fn with_randomness_round(mut self, field: u64) -> Self {
13806 self.set_randomness_round(field);
13807 self
13808 }
13809 pub fn random_bytes_opt(&self) -> Option<&[u8]> {
13811 self.random_bytes.as_ref().map(|field| field as _)
13812 }
13813 pub fn set_random_bytes<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
13815 self.random_bytes = Some(field.into().into());
13816 }
13817 pub fn with_random_bytes<T: Into<::prost::bytes::Bytes>>(
13819 mut self,
13820 field: T,
13821 ) -> Self {
13822 self.set_random_bytes(field.into());
13823 self
13824 }
13825 pub fn randomness_object_initial_shared_version_opt_mut(
13827 &mut self,
13828 ) -> Option<&mut u64> {
13829 self.randomness_object_initial_shared_version
13830 .as_mut()
13831 .map(|field| field as _)
13832 }
13833 pub fn randomness_object_initial_shared_version_mut(&mut self) -> &mut u64 {
13836 self.randomness_object_initial_shared_version.get_or_insert_default()
13837 }
13838 pub fn randomness_object_initial_shared_version_opt(&self) -> Option<u64> {
13840 self.randomness_object_initial_shared_version.as_ref().map(|field| *field)
13841 }
13842 pub fn set_randomness_object_initial_shared_version(&mut self, field: u64) {
13844 self.randomness_object_initial_shared_version = Some(field);
13845 }
13846 pub fn with_randomness_object_initial_shared_version(
13848 mut self,
13849 field: u64,
13850 ) -> Self {
13851 self.set_randomness_object_initial_shared_version(field);
13852 self
13853 }
13854 }
13855 impl super::RegulatedCoinMetadata {
13856 pub const fn const_default() -> Self {
13857 Self {
13858 id: None,
13859 coin_metadata_object: None,
13860 deny_cap_object: None,
13861 allow_global_pause: None,
13862 variant: None,
13863 coin_regulated_state: None,
13864 }
13865 }
13866 #[doc(hidden)]
13867 pub fn default_instance() -> &'static Self {
13868 static DEFAULT: super::RegulatedCoinMetadata = super::RegulatedCoinMetadata::const_default();
13869 &DEFAULT
13870 }
13871 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
13873 self.id.as_mut().map(|field| field as _)
13874 }
13875 pub fn id_mut(&mut self) -> &mut String {
13878 self.id.get_or_insert_default()
13879 }
13880 pub fn id_opt(&self) -> Option<&str> {
13882 self.id.as_ref().map(|field| field as _)
13883 }
13884 pub fn set_id<T: Into<String>>(&mut self, field: T) {
13886 self.id = Some(field.into().into());
13887 }
13888 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
13890 self.set_id(field.into());
13891 self
13892 }
13893 pub fn coin_metadata_object_opt_mut(&mut self) -> Option<&mut String> {
13895 self.coin_metadata_object.as_mut().map(|field| field as _)
13896 }
13897 pub fn coin_metadata_object_mut(&mut self) -> &mut String {
13900 self.coin_metadata_object.get_or_insert_default()
13901 }
13902 pub fn coin_metadata_object_opt(&self) -> Option<&str> {
13904 self.coin_metadata_object.as_ref().map(|field| field as _)
13905 }
13906 pub fn set_coin_metadata_object<T: Into<String>>(&mut self, field: T) {
13908 self.coin_metadata_object = Some(field.into().into());
13909 }
13910 pub fn with_coin_metadata_object<T: Into<String>>(mut self, field: T) -> Self {
13912 self.set_coin_metadata_object(field.into());
13913 self
13914 }
13915 pub fn deny_cap_object_opt_mut(&mut self) -> Option<&mut String> {
13917 self.deny_cap_object.as_mut().map(|field| field as _)
13918 }
13919 pub fn deny_cap_object_mut(&mut self) -> &mut String {
13922 self.deny_cap_object.get_or_insert_default()
13923 }
13924 pub fn deny_cap_object_opt(&self) -> Option<&str> {
13926 self.deny_cap_object.as_ref().map(|field| field as _)
13927 }
13928 pub fn set_deny_cap_object<T: Into<String>>(&mut self, field: T) {
13930 self.deny_cap_object = Some(field.into().into());
13931 }
13932 pub fn with_deny_cap_object<T: Into<String>>(mut self, field: T) -> Self {
13934 self.set_deny_cap_object(field.into());
13935 self
13936 }
13937 pub fn allow_global_pause_opt_mut(&mut self) -> Option<&mut bool> {
13939 self.allow_global_pause.as_mut().map(|field| field as _)
13940 }
13941 pub fn allow_global_pause_mut(&mut self) -> &mut bool {
13944 self.allow_global_pause.get_or_insert_default()
13945 }
13946 pub fn allow_global_pause_opt(&self) -> Option<bool> {
13948 self.allow_global_pause.as_ref().map(|field| *field)
13949 }
13950 pub fn set_allow_global_pause(&mut self, field: bool) {
13952 self.allow_global_pause = Some(field);
13953 }
13954 pub fn with_allow_global_pause(mut self, field: bool) -> Self {
13956 self.set_allow_global_pause(field);
13957 self
13958 }
13959 pub fn variant_opt_mut(&mut self) -> Option<&mut u32> {
13961 self.variant.as_mut().map(|field| field as _)
13962 }
13963 pub fn variant_mut(&mut self) -> &mut u32 {
13966 self.variant.get_or_insert_default()
13967 }
13968 pub fn variant_opt(&self) -> Option<u32> {
13970 self.variant.as_ref().map(|field| *field)
13971 }
13972 pub fn set_variant(&mut self, field: u32) {
13974 self.variant = Some(field);
13975 }
13976 pub fn with_variant(mut self, field: u32) -> Self {
13978 self.set_variant(field);
13979 self
13980 }
13981 pub fn with_coin_regulated_state<
13983 T: Into<super::regulated_coin_metadata::CoinRegulatedState>,
13984 >(mut self, field: T) -> Self {
13985 self.set_coin_regulated_state(field.into());
13986 self
13987 }
13988 }
13989 impl super::ReverseLookupNameRequest {
13990 pub const fn const_default() -> Self {
13991 Self { address: None }
13992 }
13993 #[doc(hidden)]
13994 pub fn default_instance() -> &'static Self {
13995 static DEFAULT: super::ReverseLookupNameRequest = super::ReverseLookupNameRequest::const_default();
13996 &DEFAULT
13997 }
13998 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
14000 self.address.as_mut().map(|field| field as _)
14001 }
14002 pub fn address_mut(&mut self) -> &mut String {
14005 self.address.get_or_insert_default()
14006 }
14007 pub fn address_opt(&self) -> Option<&str> {
14009 self.address.as_ref().map(|field| field as _)
14010 }
14011 pub fn set_address<T: Into<String>>(&mut self, field: T) {
14013 self.address = Some(field.into().into());
14014 }
14015 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
14017 self.set_address(field.into());
14018 self
14019 }
14020 }
14021 impl super::ReverseLookupNameResponse {
14022 pub const fn const_default() -> Self {
14023 Self { record: None }
14024 }
14025 #[doc(hidden)]
14026 pub fn default_instance() -> &'static Self {
14027 static DEFAULT: super::ReverseLookupNameResponse = super::ReverseLookupNameResponse::const_default();
14028 &DEFAULT
14029 }
14030 pub fn record(&self) -> &super::NameRecord {
14032 self.record
14033 .as_ref()
14034 .map(|field| field as _)
14035 .unwrap_or_else(|| super::NameRecord::default_instance() as _)
14036 }
14037 pub fn record_opt_mut(&mut self) -> Option<&mut super::NameRecord> {
14039 self.record.as_mut().map(|field| field as _)
14040 }
14041 pub fn record_mut(&mut self) -> &mut super::NameRecord {
14044 self.record.get_or_insert_default()
14045 }
14046 pub fn record_opt(&self) -> Option<&super::NameRecord> {
14048 self.record.as_ref().map(|field| field as _)
14049 }
14050 pub fn set_record<T: Into<super::NameRecord>>(&mut self, field: T) {
14052 self.record = Some(field.into().into());
14053 }
14054 pub fn with_record<T: Into<super::NameRecord>>(mut self, field: T) -> Self {
14056 self.set_record(field.into());
14057 self
14058 }
14059 }
14060 impl super::SenderFilter {
14061 pub const fn const_default() -> Self {
14062 Self { address: None }
14063 }
14064 #[doc(hidden)]
14065 pub fn default_instance() -> &'static Self {
14066 static DEFAULT: super::SenderFilter = super::SenderFilter::const_default();
14067 &DEFAULT
14068 }
14069 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
14071 self.address.as_mut().map(|field| field as _)
14072 }
14073 pub fn address_mut(&mut self) -> &mut String {
14076 self.address.get_or_insert_default()
14077 }
14078 pub fn address_opt(&self) -> Option<&str> {
14080 self.address.as_ref().map(|field| field as _)
14081 }
14082 pub fn set_address<T: Into<String>>(&mut self, field: T) {
14084 self.address = Some(field.into().into());
14085 }
14086 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
14088 self.set_address(field.into());
14089 self
14090 }
14091 }
14092 impl super::SimpleSignature {
14093 pub const fn const_default() -> Self {
14094 Self {
14095 scheme: None,
14096 signature: None,
14097 public_key: None,
14098 }
14099 }
14100 #[doc(hidden)]
14101 pub fn default_instance() -> &'static Self {
14102 static DEFAULT: super::SimpleSignature = super::SimpleSignature::const_default();
14103 &DEFAULT
14104 }
14105 pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
14107 self.set_scheme(field.into());
14108 self
14109 }
14110 pub fn signature_opt(&self) -> Option<&[u8]> {
14112 self.signature.as_ref().map(|field| field as _)
14113 }
14114 pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
14116 self.signature = Some(field.into().into());
14117 }
14118 pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
14120 mut self,
14121 field: T,
14122 ) -> Self {
14123 self.set_signature(field.into());
14124 self
14125 }
14126 pub fn public_key_opt(&self) -> Option<&[u8]> {
14128 self.public_key.as_ref().map(|field| field as _)
14129 }
14130 pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
14132 self.public_key = Some(field.into().into());
14133 }
14134 pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
14136 mut self,
14137 field: T,
14138 ) -> Self {
14139 self.set_public_key(field.into());
14140 self
14141 }
14142 }
14143 impl super::SimulateTransactionRequest {
14144 pub const fn const_default() -> Self {
14145 Self {
14146 transaction: None,
14147 read_mask: None,
14148 checks: None,
14149 do_gas_selection: None,
14150 }
14151 }
14152 #[doc(hidden)]
14153 pub fn default_instance() -> &'static Self {
14154 static DEFAULT: super::SimulateTransactionRequest = super::SimulateTransactionRequest::const_default();
14155 &DEFAULT
14156 }
14157 pub fn transaction(&self) -> &super::Transaction {
14159 self.transaction
14160 .as_ref()
14161 .map(|field| field as _)
14162 .unwrap_or_else(|| super::Transaction::default_instance() as _)
14163 }
14164 pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
14166 self.transaction.as_mut().map(|field| field as _)
14167 }
14168 pub fn transaction_mut(&mut self) -> &mut super::Transaction {
14171 self.transaction.get_or_insert_default()
14172 }
14173 pub fn transaction_opt(&self) -> Option<&super::Transaction> {
14175 self.transaction.as_ref().map(|field| field as _)
14176 }
14177 pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
14179 self.transaction = Some(field.into().into());
14180 }
14181 pub fn with_transaction<T: Into<super::Transaction>>(
14183 mut self,
14184 field: T,
14185 ) -> Self {
14186 self.set_transaction(field.into());
14187 self
14188 }
14189 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
14191 self.read_mask.as_mut().map(|field| field as _)
14192 }
14193 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
14196 self.read_mask.get_or_insert_default()
14197 }
14198 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
14200 self.read_mask.as_ref().map(|field| field as _)
14201 }
14202 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
14204 self.read_mask = Some(field.into().into());
14205 }
14206 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
14208 mut self,
14209 field: T,
14210 ) -> Self {
14211 self.set_read_mask(field.into());
14212 self
14213 }
14214 pub fn with_checks<
14216 T: Into<super::simulate_transaction_request::TransactionChecks>,
14217 >(mut self, field: T) -> Self {
14218 self.set_checks(field.into());
14219 self
14220 }
14221 pub fn do_gas_selection_opt_mut(&mut self) -> Option<&mut bool> {
14223 self.do_gas_selection.as_mut().map(|field| field as _)
14224 }
14225 pub fn do_gas_selection_mut(&mut self) -> &mut bool {
14228 self.do_gas_selection.get_or_insert_default()
14229 }
14230 pub fn do_gas_selection_opt(&self) -> Option<bool> {
14232 self.do_gas_selection.as_ref().map(|field| *field)
14233 }
14234 pub fn set_do_gas_selection(&mut self, field: bool) {
14236 self.do_gas_selection = Some(field);
14237 }
14238 pub fn with_do_gas_selection(mut self, field: bool) -> Self {
14240 self.set_do_gas_selection(field);
14241 self
14242 }
14243 }
14244 impl super::SimulateTransactionResponse {
14245 pub const fn const_default() -> Self {
14246 Self {
14247 transaction: None,
14248 command_outputs: Vec::new(),
14249 suggested_gas_price: None,
14250 }
14251 }
14252 #[doc(hidden)]
14253 pub fn default_instance() -> &'static Self {
14254 static DEFAULT: super::SimulateTransactionResponse = super::SimulateTransactionResponse::const_default();
14255 &DEFAULT
14256 }
14257 pub fn transaction(&self) -> &super::ExecutedTransaction {
14259 self.transaction
14260 .as_ref()
14261 .map(|field| field as _)
14262 .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
14263 }
14264 pub fn transaction_opt_mut(
14266 &mut self,
14267 ) -> Option<&mut super::ExecutedTransaction> {
14268 self.transaction.as_mut().map(|field| field as _)
14269 }
14270 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
14273 self.transaction.get_or_insert_default()
14274 }
14275 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
14277 self.transaction.as_ref().map(|field| field as _)
14278 }
14279 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
14281 &mut self,
14282 field: T,
14283 ) {
14284 self.transaction = Some(field.into().into());
14285 }
14286 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
14288 mut self,
14289 field: T,
14290 ) -> Self {
14291 self.set_transaction(field.into());
14292 self
14293 }
14294 pub fn command_outputs(&self) -> &[super::CommandResult] {
14296 &self.command_outputs
14297 }
14298 pub fn command_outputs_mut(&mut self) -> &mut Vec<super::CommandResult> {
14301 &mut self.command_outputs
14302 }
14303 pub fn set_command_outputs(&mut self, field: Vec<super::CommandResult>) {
14305 self.command_outputs = field;
14306 }
14307 pub fn with_command_outputs(mut self, field: Vec<super::CommandResult>) -> Self {
14309 self.set_command_outputs(field);
14310 self
14311 }
14312 pub fn suggested_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
14314 self.suggested_gas_price.as_mut().map(|field| field as _)
14315 }
14316 pub fn suggested_gas_price_mut(&mut self) -> &mut u64 {
14319 self.suggested_gas_price.get_or_insert_default()
14320 }
14321 pub fn suggested_gas_price_opt(&self) -> Option<u64> {
14323 self.suggested_gas_price.as_ref().map(|field| *field)
14324 }
14325 pub fn set_suggested_gas_price(&mut self, field: u64) {
14327 self.suggested_gas_price = Some(field);
14328 }
14329 pub fn with_suggested_gas_price(mut self, field: u64) -> Self {
14331 self.set_suggested_gas_price(field);
14332 self
14333 }
14334 }
14335 impl super::SizeError {
14336 pub const fn const_default() -> Self {
14337 Self { size: None, max_size: None }
14338 }
14339 #[doc(hidden)]
14340 pub fn default_instance() -> &'static Self {
14341 static DEFAULT: super::SizeError = super::SizeError::const_default();
14342 &DEFAULT
14343 }
14344 pub fn size_opt_mut(&mut self) -> Option<&mut u64> {
14346 self.size.as_mut().map(|field| field as _)
14347 }
14348 pub fn size_mut(&mut self) -> &mut u64 {
14351 self.size.get_or_insert_default()
14352 }
14353 pub fn size_opt(&self) -> Option<u64> {
14355 self.size.as_ref().map(|field| *field)
14356 }
14357 pub fn set_size(&mut self, field: u64) {
14359 self.size = Some(field);
14360 }
14361 pub fn with_size(mut self, field: u64) -> Self {
14363 self.set_size(field);
14364 self
14365 }
14366 pub fn max_size_opt_mut(&mut self) -> Option<&mut u64> {
14368 self.max_size.as_mut().map(|field| field as _)
14369 }
14370 pub fn max_size_mut(&mut self) -> &mut u64 {
14373 self.max_size.get_or_insert_default()
14374 }
14375 pub fn max_size_opt(&self) -> Option<u64> {
14377 self.max_size.as_ref().map(|field| *field)
14378 }
14379 pub fn set_max_size(&mut self, field: u64) {
14381 self.max_size = Some(field);
14382 }
14383 pub fn with_max_size(mut self, field: u64) -> Self {
14385 self.set_max_size(field);
14386 self
14387 }
14388 }
14389 impl super::SplitCoins {
14390 pub const fn const_default() -> Self {
14391 Self {
14392 coin: None,
14393 amounts: Vec::new(),
14394 }
14395 }
14396 #[doc(hidden)]
14397 pub fn default_instance() -> &'static Self {
14398 static DEFAULT: super::SplitCoins = super::SplitCoins::const_default();
14399 &DEFAULT
14400 }
14401 pub fn coin(&self) -> &super::Argument {
14403 self.coin
14404 .as_ref()
14405 .map(|field| field as _)
14406 .unwrap_or_else(|| super::Argument::default_instance() as _)
14407 }
14408 pub fn coin_opt_mut(&mut self) -> Option<&mut super::Argument> {
14410 self.coin.as_mut().map(|field| field as _)
14411 }
14412 pub fn coin_mut(&mut self) -> &mut super::Argument {
14415 self.coin.get_or_insert_default()
14416 }
14417 pub fn coin_opt(&self) -> Option<&super::Argument> {
14419 self.coin.as_ref().map(|field| field as _)
14420 }
14421 pub fn set_coin<T: Into<super::Argument>>(&mut self, field: T) {
14423 self.coin = Some(field.into().into());
14424 }
14425 pub fn with_coin<T: Into<super::Argument>>(mut self, field: T) -> Self {
14427 self.set_coin(field.into());
14428 self
14429 }
14430 pub fn amounts(&self) -> &[super::Argument] {
14432 &self.amounts
14433 }
14434 pub fn amounts_mut(&mut self) -> &mut Vec<super::Argument> {
14437 &mut self.amounts
14438 }
14439 pub fn set_amounts(&mut self, field: Vec<super::Argument>) {
14441 self.amounts = field;
14442 }
14443 pub fn with_amounts(mut self, field: Vec<super::Argument>) -> Self {
14445 self.set_amounts(field);
14446 self
14447 }
14448 }
14449 impl super::StakeSubsidy {
14450 pub const fn const_default() -> Self {
14451 Self {
14452 balance: None,
14453 distribution_counter: None,
14454 current_distribution_amount: None,
14455 stake_subsidy_period_length: None,
14456 stake_subsidy_decrease_rate: None,
14457 extra_fields: None,
14458 }
14459 }
14460 #[doc(hidden)]
14461 pub fn default_instance() -> &'static Self {
14462 static DEFAULT: super::StakeSubsidy = super::StakeSubsidy::const_default();
14463 &DEFAULT
14464 }
14465 pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
14467 self.balance.as_mut().map(|field| field as _)
14468 }
14469 pub fn balance_mut(&mut self) -> &mut u64 {
14472 self.balance.get_or_insert_default()
14473 }
14474 pub fn balance_opt(&self) -> Option<u64> {
14476 self.balance.as_ref().map(|field| *field)
14477 }
14478 pub fn set_balance(&mut self, field: u64) {
14480 self.balance = Some(field);
14481 }
14482 pub fn with_balance(mut self, field: u64) -> Self {
14484 self.set_balance(field);
14485 self
14486 }
14487 pub fn distribution_counter_opt_mut(&mut self) -> Option<&mut u64> {
14489 self.distribution_counter.as_mut().map(|field| field as _)
14490 }
14491 pub fn distribution_counter_mut(&mut self) -> &mut u64 {
14494 self.distribution_counter.get_or_insert_default()
14495 }
14496 pub fn distribution_counter_opt(&self) -> Option<u64> {
14498 self.distribution_counter.as_ref().map(|field| *field)
14499 }
14500 pub fn set_distribution_counter(&mut self, field: u64) {
14502 self.distribution_counter = Some(field);
14503 }
14504 pub fn with_distribution_counter(mut self, field: u64) -> Self {
14506 self.set_distribution_counter(field);
14507 self
14508 }
14509 pub fn current_distribution_amount_opt_mut(&mut self) -> Option<&mut u64> {
14511 self.current_distribution_amount.as_mut().map(|field| field as _)
14512 }
14513 pub fn current_distribution_amount_mut(&mut self) -> &mut u64 {
14516 self.current_distribution_amount.get_or_insert_default()
14517 }
14518 pub fn current_distribution_amount_opt(&self) -> Option<u64> {
14520 self.current_distribution_amount.as_ref().map(|field| *field)
14521 }
14522 pub fn set_current_distribution_amount(&mut self, field: u64) {
14524 self.current_distribution_amount = Some(field);
14525 }
14526 pub fn with_current_distribution_amount(mut self, field: u64) -> Self {
14528 self.set_current_distribution_amount(field);
14529 self
14530 }
14531 pub fn stake_subsidy_period_length_opt_mut(&mut self) -> Option<&mut u64> {
14533 self.stake_subsidy_period_length.as_mut().map(|field| field as _)
14534 }
14535 pub fn stake_subsidy_period_length_mut(&mut self) -> &mut u64 {
14538 self.stake_subsidy_period_length.get_or_insert_default()
14539 }
14540 pub fn stake_subsidy_period_length_opt(&self) -> Option<u64> {
14542 self.stake_subsidy_period_length.as_ref().map(|field| *field)
14543 }
14544 pub fn set_stake_subsidy_period_length(&mut self, field: u64) {
14546 self.stake_subsidy_period_length = Some(field);
14547 }
14548 pub fn with_stake_subsidy_period_length(mut self, field: u64) -> Self {
14550 self.set_stake_subsidy_period_length(field);
14551 self
14552 }
14553 pub fn stake_subsidy_decrease_rate_opt_mut(&mut self) -> Option<&mut u32> {
14555 self.stake_subsidy_decrease_rate.as_mut().map(|field| field as _)
14556 }
14557 pub fn stake_subsidy_decrease_rate_mut(&mut self) -> &mut u32 {
14560 self.stake_subsidy_decrease_rate.get_or_insert_default()
14561 }
14562 pub fn stake_subsidy_decrease_rate_opt(&self) -> Option<u32> {
14564 self.stake_subsidy_decrease_rate.as_ref().map(|field| *field)
14565 }
14566 pub fn set_stake_subsidy_decrease_rate(&mut self, field: u32) {
14568 self.stake_subsidy_decrease_rate = Some(field);
14569 }
14570 pub fn with_stake_subsidy_decrease_rate(mut self, field: u32) -> Self {
14572 self.set_stake_subsidy_decrease_rate(field);
14573 self
14574 }
14575 pub fn extra_fields(&self) -> &super::MoveTable {
14577 self.extra_fields
14578 .as_ref()
14579 .map(|field| field as _)
14580 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
14581 }
14582 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
14584 self.extra_fields.as_mut().map(|field| field as _)
14585 }
14586 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
14589 self.extra_fields.get_or_insert_default()
14590 }
14591 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
14593 self.extra_fields.as_ref().map(|field| field as _)
14594 }
14595 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
14597 self.extra_fields = Some(field.into().into());
14598 }
14599 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
14601 self.set_extra_fields(field.into());
14602 self
14603 }
14604 }
14605 impl super::StakingPool {
14606 pub const fn const_default() -> Self {
14607 Self {
14608 id: None,
14609 activation_epoch: None,
14610 deactivation_epoch: None,
14611 sui_balance: None,
14612 rewards_pool: None,
14613 pool_token_balance: None,
14614 exchange_rates: None,
14615 pending_stake: None,
14616 pending_total_sui_withdraw: None,
14617 pending_pool_token_withdraw: None,
14618 extra_fields: None,
14619 }
14620 }
14621 #[doc(hidden)]
14622 pub fn default_instance() -> &'static Self {
14623 static DEFAULT: super::StakingPool = super::StakingPool::const_default();
14624 &DEFAULT
14625 }
14626 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
14628 self.id.as_mut().map(|field| field as _)
14629 }
14630 pub fn id_mut(&mut self) -> &mut String {
14633 self.id.get_or_insert_default()
14634 }
14635 pub fn id_opt(&self) -> Option<&str> {
14637 self.id.as_ref().map(|field| field as _)
14638 }
14639 pub fn set_id<T: Into<String>>(&mut self, field: T) {
14641 self.id = Some(field.into().into());
14642 }
14643 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
14645 self.set_id(field.into());
14646 self
14647 }
14648 pub fn activation_epoch_opt_mut(&mut self) -> Option<&mut u64> {
14650 self.activation_epoch.as_mut().map(|field| field as _)
14651 }
14652 pub fn activation_epoch_mut(&mut self) -> &mut u64 {
14655 self.activation_epoch.get_or_insert_default()
14656 }
14657 pub fn activation_epoch_opt(&self) -> Option<u64> {
14659 self.activation_epoch.as_ref().map(|field| *field)
14660 }
14661 pub fn set_activation_epoch(&mut self, field: u64) {
14663 self.activation_epoch = Some(field);
14664 }
14665 pub fn with_activation_epoch(mut self, field: u64) -> Self {
14667 self.set_activation_epoch(field);
14668 self
14669 }
14670 pub fn deactivation_epoch_opt_mut(&mut self) -> Option<&mut u64> {
14672 self.deactivation_epoch.as_mut().map(|field| field as _)
14673 }
14674 pub fn deactivation_epoch_mut(&mut self) -> &mut u64 {
14677 self.deactivation_epoch.get_or_insert_default()
14678 }
14679 pub fn deactivation_epoch_opt(&self) -> Option<u64> {
14681 self.deactivation_epoch.as_ref().map(|field| *field)
14682 }
14683 pub fn set_deactivation_epoch(&mut self, field: u64) {
14685 self.deactivation_epoch = Some(field);
14686 }
14687 pub fn with_deactivation_epoch(mut self, field: u64) -> Self {
14689 self.set_deactivation_epoch(field);
14690 self
14691 }
14692 pub fn sui_balance_opt_mut(&mut self) -> Option<&mut u64> {
14694 self.sui_balance.as_mut().map(|field| field as _)
14695 }
14696 pub fn sui_balance_mut(&mut self) -> &mut u64 {
14699 self.sui_balance.get_or_insert_default()
14700 }
14701 pub fn sui_balance_opt(&self) -> Option<u64> {
14703 self.sui_balance.as_ref().map(|field| *field)
14704 }
14705 pub fn set_sui_balance(&mut self, field: u64) {
14707 self.sui_balance = Some(field);
14708 }
14709 pub fn with_sui_balance(mut self, field: u64) -> Self {
14711 self.set_sui_balance(field);
14712 self
14713 }
14714 pub fn rewards_pool_opt_mut(&mut self) -> Option<&mut u64> {
14716 self.rewards_pool.as_mut().map(|field| field as _)
14717 }
14718 pub fn rewards_pool_mut(&mut self) -> &mut u64 {
14721 self.rewards_pool.get_or_insert_default()
14722 }
14723 pub fn rewards_pool_opt(&self) -> Option<u64> {
14725 self.rewards_pool.as_ref().map(|field| *field)
14726 }
14727 pub fn set_rewards_pool(&mut self, field: u64) {
14729 self.rewards_pool = Some(field);
14730 }
14731 pub fn with_rewards_pool(mut self, field: u64) -> Self {
14733 self.set_rewards_pool(field);
14734 self
14735 }
14736 pub fn pool_token_balance_opt_mut(&mut self) -> Option<&mut u64> {
14738 self.pool_token_balance.as_mut().map(|field| field as _)
14739 }
14740 pub fn pool_token_balance_mut(&mut self) -> &mut u64 {
14743 self.pool_token_balance.get_or_insert_default()
14744 }
14745 pub fn pool_token_balance_opt(&self) -> Option<u64> {
14747 self.pool_token_balance.as_ref().map(|field| *field)
14748 }
14749 pub fn set_pool_token_balance(&mut self, field: u64) {
14751 self.pool_token_balance = Some(field);
14752 }
14753 pub fn with_pool_token_balance(mut self, field: u64) -> Self {
14755 self.set_pool_token_balance(field);
14756 self
14757 }
14758 pub fn exchange_rates(&self) -> &super::MoveTable {
14760 self.exchange_rates
14761 .as_ref()
14762 .map(|field| field as _)
14763 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
14764 }
14765 pub fn exchange_rates_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
14767 self.exchange_rates.as_mut().map(|field| field as _)
14768 }
14769 pub fn exchange_rates_mut(&mut self) -> &mut super::MoveTable {
14772 self.exchange_rates.get_or_insert_default()
14773 }
14774 pub fn exchange_rates_opt(&self) -> Option<&super::MoveTable> {
14776 self.exchange_rates.as_ref().map(|field| field as _)
14777 }
14778 pub fn set_exchange_rates<T: Into<super::MoveTable>>(&mut self, field: T) {
14780 self.exchange_rates = Some(field.into().into());
14781 }
14782 pub fn with_exchange_rates<T: Into<super::MoveTable>>(
14784 mut self,
14785 field: T,
14786 ) -> Self {
14787 self.set_exchange_rates(field.into());
14788 self
14789 }
14790 pub fn pending_stake_opt_mut(&mut self) -> Option<&mut u64> {
14792 self.pending_stake.as_mut().map(|field| field as _)
14793 }
14794 pub fn pending_stake_mut(&mut self) -> &mut u64 {
14797 self.pending_stake.get_or_insert_default()
14798 }
14799 pub fn pending_stake_opt(&self) -> Option<u64> {
14801 self.pending_stake.as_ref().map(|field| *field)
14802 }
14803 pub fn set_pending_stake(&mut self, field: u64) {
14805 self.pending_stake = Some(field);
14806 }
14807 pub fn with_pending_stake(mut self, field: u64) -> Self {
14809 self.set_pending_stake(field);
14810 self
14811 }
14812 pub fn pending_total_sui_withdraw_opt_mut(&mut self) -> Option<&mut u64> {
14814 self.pending_total_sui_withdraw.as_mut().map(|field| field as _)
14815 }
14816 pub fn pending_total_sui_withdraw_mut(&mut self) -> &mut u64 {
14819 self.pending_total_sui_withdraw.get_or_insert_default()
14820 }
14821 pub fn pending_total_sui_withdraw_opt(&self) -> Option<u64> {
14823 self.pending_total_sui_withdraw.as_ref().map(|field| *field)
14824 }
14825 pub fn set_pending_total_sui_withdraw(&mut self, field: u64) {
14827 self.pending_total_sui_withdraw = Some(field);
14828 }
14829 pub fn with_pending_total_sui_withdraw(mut self, field: u64) -> Self {
14831 self.set_pending_total_sui_withdraw(field);
14832 self
14833 }
14834 pub fn pending_pool_token_withdraw_opt_mut(&mut self) -> Option<&mut u64> {
14836 self.pending_pool_token_withdraw.as_mut().map(|field| field as _)
14837 }
14838 pub fn pending_pool_token_withdraw_mut(&mut self) -> &mut u64 {
14841 self.pending_pool_token_withdraw.get_or_insert_default()
14842 }
14843 pub fn pending_pool_token_withdraw_opt(&self) -> Option<u64> {
14845 self.pending_pool_token_withdraw.as_ref().map(|field| *field)
14846 }
14847 pub fn set_pending_pool_token_withdraw(&mut self, field: u64) {
14849 self.pending_pool_token_withdraw = Some(field);
14850 }
14851 pub fn with_pending_pool_token_withdraw(mut self, field: u64) -> Self {
14853 self.set_pending_pool_token_withdraw(field);
14854 self
14855 }
14856 pub fn extra_fields(&self) -> &super::MoveTable {
14858 self.extra_fields
14859 .as_ref()
14860 .map(|field| field as _)
14861 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
14862 }
14863 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
14865 self.extra_fields.as_mut().map(|field| field as _)
14866 }
14867 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
14870 self.extra_fields.get_or_insert_default()
14871 }
14872 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
14874 self.extra_fields.as_ref().map(|field| field as _)
14875 }
14876 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
14878 self.extra_fields = Some(field.into().into());
14879 }
14880 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
14882 self.set_extra_fields(field.into());
14883 self
14884 }
14885 }
14886 impl super::StorageFund {
14887 pub const fn const_default() -> Self {
14888 Self {
14889 total_object_storage_rebates: None,
14890 non_refundable_balance: None,
14891 }
14892 }
14893 #[doc(hidden)]
14894 pub fn default_instance() -> &'static Self {
14895 static DEFAULT: super::StorageFund = super::StorageFund::const_default();
14896 &DEFAULT
14897 }
14898 pub fn total_object_storage_rebates_opt_mut(&mut self) -> Option<&mut u64> {
14900 self.total_object_storage_rebates.as_mut().map(|field| field as _)
14901 }
14902 pub fn total_object_storage_rebates_mut(&mut self) -> &mut u64 {
14905 self.total_object_storage_rebates.get_or_insert_default()
14906 }
14907 pub fn total_object_storage_rebates_opt(&self) -> Option<u64> {
14909 self.total_object_storage_rebates.as_ref().map(|field| *field)
14910 }
14911 pub fn set_total_object_storage_rebates(&mut self, field: u64) {
14913 self.total_object_storage_rebates = Some(field);
14914 }
14915 pub fn with_total_object_storage_rebates(mut self, field: u64) -> Self {
14917 self.set_total_object_storage_rebates(field);
14918 self
14919 }
14920 pub fn non_refundable_balance_opt_mut(&mut self) -> Option<&mut u64> {
14922 self.non_refundable_balance.as_mut().map(|field| field as _)
14923 }
14924 pub fn non_refundable_balance_mut(&mut self) -> &mut u64 {
14927 self.non_refundable_balance.get_or_insert_default()
14928 }
14929 pub fn non_refundable_balance_opt(&self) -> Option<u64> {
14931 self.non_refundable_balance.as_ref().map(|field| *field)
14932 }
14933 pub fn set_non_refundable_balance(&mut self, field: u64) {
14935 self.non_refundable_balance = Some(field);
14936 }
14937 pub fn with_non_refundable_balance(mut self, field: u64) -> Self {
14939 self.set_non_refundable_balance(field);
14940 self
14941 }
14942 }
14943 impl super::SubscribeCheckpointsRequest {
14944 pub const fn const_default() -> Self {
14945 Self {
14946 read_mask: None,
14947 filter: None,
14948 }
14949 }
14950 #[doc(hidden)]
14951 pub fn default_instance() -> &'static Self {
14952 static DEFAULT: super::SubscribeCheckpointsRequest = super::SubscribeCheckpointsRequest::const_default();
14953 &DEFAULT
14954 }
14955 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
14957 self.read_mask.as_mut().map(|field| field as _)
14958 }
14959 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
14962 self.read_mask.get_or_insert_default()
14963 }
14964 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
14966 self.read_mask.as_ref().map(|field| field as _)
14967 }
14968 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
14970 self.read_mask = Some(field.into().into());
14971 }
14972 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
14974 mut self,
14975 field: T,
14976 ) -> Self {
14977 self.set_read_mask(field.into());
14978 self
14979 }
14980 pub fn filter(&self) -> &super::TransactionFilter {
14982 self.filter
14983 .as_ref()
14984 .map(|field| field as _)
14985 .unwrap_or_else(|| super::TransactionFilter::default_instance() as _)
14986 }
14987 pub fn filter_opt_mut(&mut self) -> Option<&mut super::TransactionFilter> {
14989 self.filter.as_mut().map(|field| field as _)
14990 }
14991 pub fn filter_mut(&mut self) -> &mut super::TransactionFilter {
14994 self.filter.get_or_insert_default()
14995 }
14996 pub fn filter_opt(&self) -> Option<&super::TransactionFilter> {
14998 self.filter.as_ref().map(|field| field as _)
14999 }
15000 pub fn set_filter<T: Into<super::TransactionFilter>>(&mut self, field: T) {
15002 self.filter = Some(field.into().into());
15003 }
15004 pub fn with_filter<T: Into<super::TransactionFilter>>(
15006 mut self,
15007 field: T,
15008 ) -> Self {
15009 self.set_filter(field.into());
15010 self
15011 }
15012 }
15013 impl super::SubscribeCheckpointsResponse {
15014 pub const fn const_default() -> Self {
15015 Self {
15016 cursor: None,
15017 checkpoint: None,
15018 }
15019 }
15020 #[doc(hidden)]
15021 pub fn default_instance() -> &'static Self {
15022 static DEFAULT: super::SubscribeCheckpointsResponse = super::SubscribeCheckpointsResponse::const_default();
15023 &DEFAULT
15024 }
15025 pub fn cursor_opt_mut(&mut self) -> Option<&mut u64> {
15027 self.cursor.as_mut().map(|field| field as _)
15028 }
15029 pub fn cursor_mut(&mut self) -> &mut u64 {
15032 self.cursor.get_or_insert_default()
15033 }
15034 pub fn cursor_opt(&self) -> Option<u64> {
15036 self.cursor.as_ref().map(|field| *field)
15037 }
15038 pub fn set_cursor(&mut self, field: u64) {
15040 self.cursor = Some(field);
15041 }
15042 pub fn with_cursor(mut self, field: u64) -> Self {
15044 self.set_cursor(field);
15045 self
15046 }
15047 pub fn checkpoint(&self) -> &super::Checkpoint {
15049 self.checkpoint
15050 .as_ref()
15051 .map(|field| field as _)
15052 .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
15053 }
15054 pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
15056 self.checkpoint.as_mut().map(|field| field as _)
15057 }
15058 pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
15061 self.checkpoint.get_or_insert_default()
15062 }
15063 pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
15065 self.checkpoint.as_ref().map(|field| field as _)
15066 }
15067 pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
15069 self.checkpoint = Some(field.into().into());
15070 }
15071 pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
15073 self.set_checkpoint(field.into());
15074 self
15075 }
15076 }
15077 impl super::SubscribeEventsRequest {
15078 pub const fn const_default() -> Self {
15079 Self {
15080 read_mask: None,
15081 filter: None,
15082 }
15083 }
15084 #[doc(hidden)]
15085 pub fn default_instance() -> &'static Self {
15086 static DEFAULT: super::SubscribeEventsRequest = super::SubscribeEventsRequest::const_default();
15087 &DEFAULT
15088 }
15089 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
15091 self.read_mask.as_mut().map(|field| field as _)
15092 }
15093 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
15096 self.read_mask.get_or_insert_default()
15097 }
15098 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
15100 self.read_mask.as_ref().map(|field| field as _)
15101 }
15102 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
15104 self.read_mask = Some(field.into().into());
15105 }
15106 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
15108 mut self,
15109 field: T,
15110 ) -> Self {
15111 self.set_read_mask(field.into());
15112 self
15113 }
15114 pub fn filter(&self) -> &super::EventFilter {
15116 self.filter
15117 .as_ref()
15118 .map(|field| field as _)
15119 .unwrap_or_else(|| super::EventFilter::default_instance() as _)
15120 }
15121 pub fn filter_opt_mut(&mut self) -> Option<&mut super::EventFilter> {
15123 self.filter.as_mut().map(|field| field as _)
15124 }
15125 pub fn filter_mut(&mut self) -> &mut super::EventFilter {
15128 self.filter.get_or_insert_default()
15129 }
15130 pub fn filter_opt(&self) -> Option<&super::EventFilter> {
15132 self.filter.as_ref().map(|field| field as _)
15133 }
15134 pub fn set_filter<T: Into<super::EventFilter>>(&mut self, field: T) {
15136 self.filter = Some(field.into().into());
15137 }
15138 pub fn with_filter<T: Into<super::EventFilter>>(mut self, field: T) -> Self {
15140 self.set_filter(field.into());
15141 self
15142 }
15143 }
15144 impl super::SubscribeEventsResponse {
15145 pub const fn const_default() -> Self {
15146 Self {
15147 event: None,
15148 watermark: None,
15149 }
15150 }
15151 #[doc(hidden)]
15152 pub fn default_instance() -> &'static Self {
15153 static DEFAULT: super::SubscribeEventsResponse = super::SubscribeEventsResponse::const_default();
15154 &DEFAULT
15155 }
15156 pub fn event(&self) -> &super::Event {
15158 self.event
15159 .as_ref()
15160 .map(|field| field as _)
15161 .unwrap_or_else(|| super::Event::default_instance() as _)
15162 }
15163 pub fn event_opt_mut(&mut self) -> Option<&mut super::Event> {
15165 self.event.as_mut().map(|field| field as _)
15166 }
15167 pub fn event_mut(&mut self) -> &mut super::Event {
15170 self.event.get_or_insert_default()
15171 }
15172 pub fn event_opt(&self) -> Option<&super::Event> {
15174 self.event.as_ref().map(|field| field as _)
15175 }
15176 pub fn set_event<T: Into<super::Event>>(&mut self, field: T) {
15178 self.event = Some(field.into().into());
15179 }
15180 pub fn with_event<T: Into<super::Event>>(mut self, field: T) -> Self {
15182 self.set_event(field.into());
15183 self
15184 }
15185 pub fn watermark(&self) -> &super::Watermark {
15187 self.watermark
15188 .as_ref()
15189 .map(|field| field as _)
15190 .unwrap_or_else(|| super::Watermark::default_instance() as _)
15191 }
15192 pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
15194 self.watermark.as_mut().map(|field| field as _)
15195 }
15196 pub fn watermark_mut(&mut self) -> &mut super::Watermark {
15199 self.watermark.get_or_insert_default()
15200 }
15201 pub fn watermark_opt(&self) -> Option<&super::Watermark> {
15203 self.watermark.as_ref().map(|field| field as _)
15204 }
15205 pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
15207 self.watermark = Some(field.into().into());
15208 }
15209 pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
15211 self.set_watermark(field.into());
15212 self
15213 }
15214 }
15215 impl super::SubscribeTransactionsRequest {
15216 pub const fn const_default() -> Self {
15217 Self {
15218 read_mask: None,
15219 filter: None,
15220 }
15221 }
15222 #[doc(hidden)]
15223 pub fn default_instance() -> &'static Self {
15224 static DEFAULT: super::SubscribeTransactionsRequest = super::SubscribeTransactionsRequest::const_default();
15225 &DEFAULT
15226 }
15227 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
15229 self.read_mask.as_mut().map(|field| field as _)
15230 }
15231 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
15234 self.read_mask.get_or_insert_default()
15235 }
15236 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
15238 self.read_mask.as_ref().map(|field| field as _)
15239 }
15240 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
15242 self.read_mask = Some(field.into().into());
15243 }
15244 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
15246 mut self,
15247 field: T,
15248 ) -> Self {
15249 self.set_read_mask(field.into());
15250 self
15251 }
15252 pub fn filter(&self) -> &super::TransactionFilter {
15254 self.filter
15255 .as_ref()
15256 .map(|field| field as _)
15257 .unwrap_or_else(|| super::TransactionFilter::default_instance() as _)
15258 }
15259 pub fn filter_opt_mut(&mut self) -> Option<&mut super::TransactionFilter> {
15261 self.filter.as_mut().map(|field| field as _)
15262 }
15263 pub fn filter_mut(&mut self) -> &mut super::TransactionFilter {
15266 self.filter.get_or_insert_default()
15267 }
15268 pub fn filter_opt(&self) -> Option<&super::TransactionFilter> {
15270 self.filter.as_ref().map(|field| field as _)
15271 }
15272 pub fn set_filter<T: Into<super::TransactionFilter>>(&mut self, field: T) {
15274 self.filter = Some(field.into().into());
15275 }
15276 pub fn with_filter<T: Into<super::TransactionFilter>>(
15278 mut self,
15279 field: T,
15280 ) -> Self {
15281 self.set_filter(field.into());
15282 self
15283 }
15284 }
15285 impl super::SubscribeTransactionsResponse {
15286 pub const fn const_default() -> Self {
15287 Self {
15288 transaction: None,
15289 watermark: None,
15290 }
15291 }
15292 #[doc(hidden)]
15293 pub fn default_instance() -> &'static Self {
15294 static DEFAULT: super::SubscribeTransactionsResponse = super::SubscribeTransactionsResponse::const_default();
15295 &DEFAULT
15296 }
15297 pub fn transaction(&self) -> &super::ExecutedTransaction {
15299 self.transaction
15300 .as_ref()
15301 .map(|field| field as _)
15302 .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
15303 }
15304 pub fn transaction_opt_mut(
15306 &mut self,
15307 ) -> Option<&mut super::ExecutedTransaction> {
15308 self.transaction.as_mut().map(|field| field as _)
15309 }
15310 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
15313 self.transaction.get_or_insert_default()
15314 }
15315 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
15317 self.transaction.as_ref().map(|field| field as _)
15318 }
15319 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
15321 &mut self,
15322 field: T,
15323 ) {
15324 self.transaction = Some(field.into().into());
15325 }
15326 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
15328 mut self,
15329 field: T,
15330 ) -> Self {
15331 self.set_transaction(field.into());
15332 self
15333 }
15334 pub fn watermark(&self) -> &super::Watermark {
15336 self.watermark
15337 .as_ref()
15338 .map(|field| field as _)
15339 .unwrap_or_else(|| super::Watermark::default_instance() as _)
15340 }
15341 pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
15343 self.watermark.as_mut().map(|field| field as _)
15344 }
15345 pub fn watermark_mut(&mut self) -> &mut super::Watermark {
15348 self.watermark.get_or_insert_default()
15349 }
15350 pub fn watermark_opt(&self) -> Option<&super::Watermark> {
15352 self.watermark.as_ref().map(|field| field as _)
15353 }
15354 pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
15356 self.watermark = Some(field.into().into());
15357 }
15358 pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
15360 self.set_watermark(field.into());
15361 self
15362 }
15363 }
15364 impl super::SystemPackage {
15365 pub const fn const_default() -> Self {
15366 Self {
15367 version: None,
15368 modules: Vec::new(),
15369 dependencies: Vec::new(),
15370 }
15371 }
15372 #[doc(hidden)]
15373 pub fn default_instance() -> &'static Self {
15374 static DEFAULT: super::SystemPackage = super::SystemPackage::const_default();
15375 &DEFAULT
15376 }
15377 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
15379 self.version.as_mut().map(|field| field as _)
15380 }
15381 pub fn version_mut(&mut self) -> &mut u64 {
15384 self.version.get_or_insert_default()
15385 }
15386 pub fn version_opt(&self) -> Option<u64> {
15388 self.version.as_ref().map(|field| *field)
15389 }
15390 pub fn set_version(&mut self, field: u64) {
15392 self.version = Some(field);
15393 }
15394 pub fn with_version(mut self, field: u64) -> Self {
15396 self.set_version(field);
15397 self
15398 }
15399 pub fn modules(&self) -> &[::prost::bytes::Bytes] {
15401 &self.modules
15402 }
15403 pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
15406 &mut self.modules
15407 }
15408 pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
15410 self.modules = field;
15411 }
15412 pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
15414 self.set_modules(field);
15415 self
15416 }
15417 pub fn dependencies(&self) -> &[String] {
15419 &self.dependencies
15420 }
15421 pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
15424 &mut self.dependencies
15425 }
15426 pub fn set_dependencies(&mut self, field: Vec<String>) {
15428 self.dependencies = field;
15429 }
15430 pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
15432 self.set_dependencies(field);
15433 self
15434 }
15435 }
15436 impl super::SystemParameters {
15437 pub const fn const_default() -> Self {
15438 Self {
15439 epoch_duration_ms: None,
15440 stake_subsidy_start_epoch: None,
15441 min_validator_count: None,
15442 max_validator_count: None,
15443 min_validator_joining_stake: None,
15444 validator_low_stake_threshold: None,
15445 validator_very_low_stake_threshold: None,
15446 validator_low_stake_grace_period: None,
15447 extra_fields: None,
15448 }
15449 }
15450 #[doc(hidden)]
15451 pub fn default_instance() -> &'static Self {
15452 static DEFAULT: super::SystemParameters = super::SystemParameters::const_default();
15453 &DEFAULT
15454 }
15455 pub fn epoch_duration_ms_opt_mut(&mut self) -> Option<&mut u64> {
15457 self.epoch_duration_ms.as_mut().map(|field| field as _)
15458 }
15459 pub fn epoch_duration_ms_mut(&mut self) -> &mut u64 {
15462 self.epoch_duration_ms.get_or_insert_default()
15463 }
15464 pub fn epoch_duration_ms_opt(&self) -> Option<u64> {
15466 self.epoch_duration_ms.as_ref().map(|field| *field)
15467 }
15468 pub fn set_epoch_duration_ms(&mut self, field: u64) {
15470 self.epoch_duration_ms = Some(field);
15471 }
15472 pub fn with_epoch_duration_ms(mut self, field: u64) -> Self {
15474 self.set_epoch_duration_ms(field);
15475 self
15476 }
15477 pub fn stake_subsidy_start_epoch_opt_mut(&mut self) -> Option<&mut u64> {
15479 self.stake_subsidy_start_epoch.as_mut().map(|field| field as _)
15480 }
15481 pub fn stake_subsidy_start_epoch_mut(&mut self) -> &mut u64 {
15484 self.stake_subsidy_start_epoch.get_or_insert_default()
15485 }
15486 pub fn stake_subsidy_start_epoch_opt(&self) -> Option<u64> {
15488 self.stake_subsidy_start_epoch.as_ref().map(|field| *field)
15489 }
15490 pub fn set_stake_subsidy_start_epoch(&mut self, field: u64) {
15492 self.stake_subsidy_start_epoch = Some(field);
15493 }
15494 pub fn with_stake_subsidy_start_epoch(mut self, field: u64) -> Self {
15496 self.set_stake_subsidy_start_epoch(field);
15497 self
15498 }
15499 pub fn min_validator_count_opt_mut(&mut self) -> Option<&mut u64> {
15501 self.min_validator_count.as_mut().map(|field| field as _)
15502 }
15503 pub fn min_validator_count_mut(&mut self) -> &mut u64 {
15506 self.min_validator_count.get_or_insert_default()
15507 }
15508 pub fn min_validator_count_opt(&self) -> Option<u64> {
15510 self.min_validator_count.as_ref().map(|field| *field)
15511 }
15512 pub fn set_min_validator_count(&mut self, field: u64) {
15514 self.min_validator_count = Some(field);
15515 }
15516 pub fn with_min_validator_count(mut self, field: u64) -> Self {
15518 self.set_min_validator_count(field);
15519 self
15520 }
15521 pub fn max_validator_count_opt_mut(&mut self) -> Option<&mut u64> {
15523 self.max_validator_count.as_mut().map(|field| field as _)
15524 }
15525 pub fn max_validator_count_mut(&mut self) -> &mut u64 {
15528 self.max_validator_count.get_or_insert_default()
15529 }
15530 pub fn max_validator_count_opt(&self) -> Option<u64> {
15532 self.max_validator_count.as_ref().map(|field| *field)
15533 }
15534 pub fn set_max_validator_count(&mut self, field: u64) {
15536 self.max_validator_count = Some(field);
15537 }
15538 pub fn with_max_validator_count(mut self, field: u64) -> Self {
15540 self.set_max_validator_count(field);
15541 self
15542 }
15543 pub fn min_validator_joining_stake_opt_mut(&mut self) -> Option<&mut u64> {
15545 self.min_validator_joining_stake.as_mut().map(|field| field as _)
15546 }
15547 pub fn min_validator_joining_stake_mut(&mut self) -> &mut u64 {
15550 self.min_validator_joining_stake.get_or_insert_default()
15551 }
15552 pub fn min_validator_joining_stake_opt(&self) -> Option<u64> {
15554 self.min_validator_joining_stake.as_ref().map(|field| *field)
15555 }
15556 pub fn set_min_validator_joining_stake(&mut self, field: u64) {
15558 self.min_validator_joining_stake = Some(field);
15559 }
15560 pub fn with_min_validator_joining_stake(mut self, field: u64) -> Self {
15562 self.set_min_validator_joining_stake(field);
15563 self
15564 }
15565 pub fn validator_low_stake_threshold_opt_mut(&mut self) -> Option<&mut u64> {
15567 self.validator_low_stake_threshold.as_mut().map(|field| field as _)
15568 }
15569 pub fn validator_low_stake_threshold_mut(&mut self) -> &mut u64 {
15572 self.validator_low_stake_threshold.get_or_insert_default()
15573 }
15574 pub fn validator_low_stake_threshold_opt(&self) -> Option<u64> {
15576 self.validator_low_stake_threshold.as_ref().map(|field| *field)
15577 }
15578 pub fn set_validator_low_stake_threshold(&mut self, field: u64) {
15580 self.validator_low_stake_threshold = Some(field);
15581 }
15582 pub fn with_validator_low_stake_threshold(mut self, field: u64) -> Self {
15584 self.set_validator_low_stake_threshold(field);
15585 self
15586 }
15587 pub fn validator_very_low_stake_threshold_opt_mut(
15589 &mut self,
15590 ) -> Option<&mut u64> {
15591 self.validator_very_low_stake_threshold.as_mut().map(|field| field as _)
15592 }
15593 pub fn validator_very_low_stake_threshold_mut(&mut self) -> &mut u64 {
15596 self.validator_very_low_stake_threshold.get_or_insert_default()
15597 }
15598 pub fn validator_very_low_stake_threshold_opt(&self) -> Option<u64> {
15600 self.validator_very_low_stake_threshold.as_ref().map(|field| *field)
15601 }
15602 pub fn set_validator_very_low_stake_threshold(&mut self, field: u64) {
15604 self.validator_very_low_stake_threshold = Some(field);
15605 }
15606 pub fn with_validator_very_low_stake_threshold(mut self, field: u64) -> Self {
15608 self.set_validator_very_low_stake_threshold(field);
15609 self
15610 }
15611 pub fn validator_low_stake_grace_period_opt_mut(&mut self) -> Option<&mut u64> {
15613 self.validator_low_stake_grace_period.as_mut().map(|field| field as _)
15614 }
15615 pub fn validator_low_stake_grace_period_mut(&mut self) -> &mut u64 {
15618 self.validator_low_stake_grace_period.get_or_insert_default()
15619 }
15620 pub fn validator_low_stake_grace_period_opt(&self) -> Option<u64> {
15622 self.validator_low_stake_grace_period.as_ref().map(|field| *field)
15623 }
15624 pub fn set_validator_low_stake_grace_period(&mut self, field: u64) {
15626 self.validator_low_stake_grace_period = Some(field);
15627 }
15628 pub fn with_validator_low_stake_grace_period(mut self, field: u64) -> Self {
15630 self.set_validator_low_stake_grace_period(field);
15631 self
15632 }
15633 pub fn extra_fields(&self) -> &super::MoveTable {
15635 self.extra_fields
15636 .as_ref()
15637 .map(|field| field as _)
15638 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
15639 }
15640 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
15642 self.extra_fields.as_mut().map(|field| field as _)
15643 }
15644 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
15647 self.extra_fields.get_or_insert_default()
15648 }
15649 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
15651 self.extra_fields.as_ref().map(|field| field as _)
15652 }
15653 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
15655 self.extra_fields = Some(field.into().into());
15656 }
15657 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
15659 self.set_extra_fields(field.into());
15660 self
15661 }
15662 }
15663 impl super::SystemState {
15664 pub const fn const_default() -> Self {
15665 Self {
15666 version: None,
15667 epoch: None,
15668 protocol_version: None,
15669 validators: None,
15670 storage_fund: None,
15671 parameters: None,
15672 reference_gas_price: None,
15673 validator_report_records: Vec::new(),
15674 stake_subsidy: None,
15675 safe_mode: None,
15676 safe_mode_storage_rewards: None,
15677 safe_mode_computation_rewards: None,
15678 safe_mode_storage_rebates: None,
15679 safe_mode_non_refundable_storage_fee: None,
15680 epoch_start_timestamp_ms: None,
15681 extra_fields: None,
15682 }
15683 }
15684 #[doc(hidden)]
15685 pub fn default_instance() -> &'static Self {
15686 static DEFAULT: super::SystemState = super::SystemState::const_default();
15687 &DEFAULT
15688 }
15689 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
15691 self.version.as_mut().map(|field| field as _)
15692 }
15693 pub fn version_mut(&mut self) -> &mut u64 {
15696 self.version.get_or_insert_default()
15697 }
15698 pub fn version_opt(&self) -> Option<u64> {
15700 self.version.as_ref().map(|field| *field)
15701 }
15702 pub fn set_version(&mut self, field: u64) {
15704 self.version = Some(field);
15705 }
15706 pub fn with_version(mut self, field: u64) -> Self {
15708 self.set_version(field);
15709 self
15710 }
15711 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
15713 self.epoch.as_mut().map(|field| field as _)
15714 }
15715 pub fn epoch_mut(&mut self) -> &mut u64 {
15718 self.epoch.get_or_insert_default()
15719 }
15720 pub fn epoch_opt(&self) -> Option<u64> {
15722 self.epoch.as_ref().map(|field| *field)
15723 }
15724 pub fn set_epoch(&mut self, field: u64) {
15726 self.epoch = Some(field);
15727 }
15728 pub fn with_epoch(mut self, field: u64) -> Self {
15730 self.set_epoch(field);
15731 self
15732 }
15733 pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
15735 self.protocol_version.as_mut().map(|field| field as _)
15736 }
15737 pub fn protocol_version_mut(&mut self) -> &mut u64 {
15740 self.protocol_version.get_or_insert_default()
15741 }
15742 pub fn protocol_version_opt(&self) -> Option<u64> {
15744 self.protocol_version.as_ref().map(|field| *field)
15745 }
15746 pub fn set_protocol_version(&mut self, field: u64) {
15748 self.protocol_version = Some(field);
15749 }
15750 pub fn with_protocol_version(mut self, field: u64) -> Self {
15752 self.set_protocol_version(field);
15753 self
15754 }
15755 pub fn validators(&self) -> &super::ValidatorSet {
15757 self.validators
15758 .as_ref()
15759 .map(|field| field as _)
15760 .unwrap_or_else(|| super::ValidatorSet::default_instance() as _)
15761 }
15762 pub fn validators_opt_mut(&mut self) -> Option<&mut super::ValidatorSet> {
15764 self.validators.as_mut().map(|field| field as _)
15765 }
15766 pub fn validators_mut(&mut self) -> &mut super::ValidatorSet {
15769 self.validators.get_or_insert_default()
15770 }
15771 pub fn validators_opt(&self) -> Option<&super::ValidatorSet> {
15773 self.validators.as_ref().map(|field| field as _)
15774 }
15775 pub fn set_validators<T: Into<super::ValidatorSet>>(&mut self, field: T) {
15777 self.validators = Some(field.into().into());
15778 }
15779 pub fn with_validators<T: Into<super::ValidatorSet>>(
15781 mut self,
15782 field: T,
15783 ) -> Self {
15784 self.set_validators(field.into());
15785 self
15786 }
15787 pub fn storage_fund(&self) -> &super::StorageFund {
15789 self.storage_fund
15790 .as_ref()
15791 .map(|field| field as _)
15792 .unwrap_or_else(|| super::StorageFund::default_instance() as _)
15793 }
15794 pub fn storage_fund_opt_mut(&mut self) -> Option<&mut super::StorageFund> {
15796 self.storage_fund.as_mut().map(|field| field as _)
15797 }
15798 pub fn storage_fund_mut(&mut self) -> &mut super::StorageFund {
15801 self.storage_fund.get_or_insert_default()
15802 }
15803 pub fn storage_fund_opt(&self) -> Option<&super::StorageFund> {
15805 self.storage_fund.as_ref().map(|field| field as _)
15806 }
15807 pub fn set_storage_fund<T: Into<super::StorageFund>>(&mut self, field: T) {
15809 self.storage_fund = Some(field.into().into());
15810 }
15811 pub fn with_storage_fund<T: Into<super::StorageFund>>(
15813 mut self,
15814 field: T,
15815 ) -> Self {
15816 self.set_storage_fund(field.into());
15817 self
15818 }
15819 pub fn parameters(&self) -> &super::SystemParameters {
15821 self.parameters
15822 .as_ref()
15823 .map(|field| field as _)
15824 .unwrap_or_else(|| super::SystemParameters::default_instance() as _)
15825 }
15826 pub fn parameters_opt_mut(&mut self) -> Option<&mut super::SystemParameters> {
15828 self.parameters.as_mut().map(|field| field as _)
15829 }
15830 pub fn parameters_mut(&mut self) -> &mut super::SystemParameters {
15833 self.parameters.get_or_insert_default()
15834 }
15835 pub fn parameters_opt(&self) -> Option<&super::SystemParameters> {
15837 self.parameters.as_ref().map(|field| field as _)
15838 }
15839 pub fn set_parameters<T: Into<super::SystemParameters>>(&mut self, field: T) {
15841 self.parameters = Some(field.into().into());
15842 }
15843 pub fn with_parameters<T: Into<super::SystemParameters>>(
15845 mut self,
15846 field: T,
15847 ) -> Self {
15848 self.set_parameters(field.into());
15849 self
15850 }
15851 pub fn reference_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
15853 self.reference_gas_price.as_mut().map(|field| field as _)
15854 }
15855 pub fn reference_gas_price_mut(&mut self) -> &mut u64 {
15858 self.reference_gas_price.get_or_insert_default()
15859 }
15860 pub fn reference_gas_price_opt(&self) -> Option<u64> {
15862 self.reference_gas_price.as_ref().map(|field| *field)
15863 }
15864 pub fn set_reference_gas_price(&mut self, field: u64) {
15866 self.reference_gas_price = Some(field);
15867 }
15868 pub fn with_reference_gas_price(mut self, field: u64) -> Self {
15870 self.set_reference_gas_price(field);
15871 self
15872 }
15873 pub fn validator_report_records(&self) -> &[super::ValidatorReportRecord] {
15875 &self.validator_report_records
15876 }
15877 pub fn validator_report_records_mut(
15880 &mut self,
15881 ) -> &mut Vec<super::ValidatorReportRecord> {
15882 &mut self.validator_report_records
15883 }
15884 pub fn set_validator_report_records(
15886 &mut self,
15887 field: Vec<super::ValidatorReportRecord>,
15888 ) {
15889 self.validator_report_records = field;
15890 }
15891 pub fn with_validator_report_records(
15893 mut self,
15894 field: Vec<super::ValidatorReportRecord>,
15895 ) -> Self {
15896 self.set_validator_report_records(field);
15897 self
15898 }
15899 pub fn stake_subsidy(&self) -> &super::StakeSubsidy {
15901 self.stake_subsidy
15902 .as_ref()
15903 .map(|field| field as _)
15904 .unwrap_or_else(|| super::StakeSubsidy::default_instance() as _)
15905 }
15906 pub fn stake_subsidy_opt_mut(&mut self) -> Option<&mut super::StakeSubsidy> {
15908 self.stake_subsidy.as_mut().map(|field| field as _)
15909 }
15910 pub fn stake_subsidy_mut(&mut self) -> &mut super::StakeSubsidy {
15913 self.stake_subsidy.get_or_insert_default()
15914 }
15915 pub fn stake_subsidy_opt(&self) -> Option<&super::StakeSubsidy> {
15917 self.stake_subsidy.as_ref().map(|field| field as _)
15918 }
15919 pub fn set_stake_subsidy<T: Into<super::StakeSubsidy>>(&mut self, field: T) {
15921 self.stake_subsidy = Some(field.into().into());
15922 }
15923 pub fn with_stake_subsidy<T: Into<super::StakeSubsidy>>(
15925 mut self,
15926 field: T,
15927 ) -> Self {
15928 self.set_stake_subsidy(field.into());
15929 self
15930 }
15931 pub fn safe_mode_opt_mut(&mut self) -> Option<&mut bool> {
15933 self.safe_mode.as_mut().map(|field| field as _)
15934 }
15935 pub fn safe_mode_mut(&mut self) -> &mut bool {
15938 self.safe_mode.get_or_insert_default()
15939 }
15940 pub fn safe_mode_opt(&self) -> Option<bool> {
15942 self.safe_mode.as_ref().map(|field| *field)
15943 }
15944 pub fn set_safe_mode(&mut self, field: bool) {
15946 self.safe_mode = Some(field);
15947 }
15948 pub fn with_safe_mode(mut self, field: bool) -> Self {
15950 self.set_safe_mode(field);
15951 self
15952 }
15953 pub fn safe_mode_storage_rewards_opt_mut(&mut self) -> Option<&mut u64> {
15955 self.safe_mode_storage_rewards.as_mut().map(|field| field as _)
15956 }
15957 pub fn safe_mode_storage_rewards_mut(&mut self) -> &mut u64 {
15960 self.safe_mode_storage_rewards.get_or_insert_default()
15961 }
15962 pub fn safe_mode_storage_rewards_opt(&self) -> Option<u64> {
15964 self.safe_mode_storage_rewards.as_ref().map(|field| *field)
15965 }
15966 pub fn set_safe_mode_storage_rewards(&mut self, field: u64) {
15968 self.safe_mode_storage_rewards = Some(field);
15969 }
15970 pub fn with_safe_mode_storage_rewards(mut self, field: u64) -> Self {
15972 self.set_safe_mode_storage_rewards(field);
15973 self
15974 }
15975 pub fn safe_mode_computation_rewards_opt_mut(&mut self) -> Option<&mut u64> {
15977 self.safe_mode_computation_rewards.as_mut().map(|field| field as _)
15978 }
15979 pub fn safe_mode_computation_rewards_mut(&mut self) -> &mut u64 {
15982 self.safe_mode_computation_rewards.get_or_insert_default()
15983 }
15984 pub fn safe_mode_computation_rewards_opt(&self) -> Option<u64> {
15986 self.safe_mode_computation_rewards.as_ref().map(|field| *field)
15987 }
15988 pub fn set_safe_mode_computation_rewards(&mut self, field: u64) {
15990 self.safe_mode_computation_rewards = Some(field);
15991 }
15992 pub fn with_safe_mode_computation_rewards(mut self, field: u64) -> Self {
15994 self.set_safe_mode_computation_rewards(field);
15995 self
15996 }
15997 pub fn safe_mode_storage_rebates_opt_mut(&mut self) -> Option<&mut u64> {
15999 self.safe_mode_storage_rebates.as_mut().map(|field| field as _)
16000 }
16001 pub fn safe_mode_storage_rebates_mut(&mut self) -> &mut u64 {
16004 self.safe_mode_storage_rebates.get_or_insert_default()
16005 }
16006 pub fn safe_mode_storage_rebates_opt(&self) -> Option<u64> {
16008 self.safe_mode_storage_rebates.as_ref().map(|field| *field)
16009 }
16010 pub fn set_safe_mode_storage_rebates(&mut self, field: u64) {
16012 self.safe_mode_storage_rebates = Some(field);
16013 }
16014 pub fn with_safe_mode_storage_rebates(mut self, field: u64) -> Self {
16016 self.set_safe_mode_storage_rebates(field);
16017 self
16018 }
16019 pub fn safe_mode_non_refundable_storage_fee_opt_mut(
16021 &mut self,
16022 ) -> Option<&mut u64> {
16023 self.safe_mode_non_refundable_storage_fee.as_mut().map(|field| field as _)
16024 }
16025 pub fn safe_mode_non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
16028 self.safe_mode_non_refundable_storage_fee.get_or_insert_default()
16029 }
16030 pub fn safe_mode_non_refundable_storage_fee_opt(&self) -> Option<u64> {
16032 self.safe_mode_non_refundable_storage_fee.as_ref().map(|field| *field)
16033 }
16034 pub fn set_safe_mode_non_refundable_storage_fee(&mut self, field: u64) {
16036 self.safe_mode_non_refundable_storage_fee = Some(field);
16037 }
16038 pub fn with_safe_mode_non_refundable_storage_fee(mut self, field: u64) -> Self {
16040 self.set_safe_mode_non_refundable_storage_fee(field);
16041 self
16042 }
16043 pub fn epoch_start_timestamp_ms_opt_mut(&mut self) -> Option<&mut u64> {
16045 self.epoch_start_timestamp_ms.as_mut().map(|field| field as _)
16046 }
16047 pub fn epoch_start_timestamp_ms_mut(&mut self) -> &mut u64 {
16050 self.epoch_start_timestamp_ms.get_or_insert_default()
16051 }
16052 pub fn epoch_start_timestamp_ms_opt(&self) -> Option<u64> {
16054 self.epoch_start_timestamp_ms.as_ref().map(|field| *field)
16055 }
16056 pub fn set_epoch_start_timestamp_ms(&mut self, field: u64) {
16058 self.epoch_start_timestamp_ms = Some(field);
16059 }
16060 pub fn with_epoch_start_timestamp_ms(mut self, field: u64) -> Self {
16062 self.set_epoch_start_timestamp_ms(field);
16063 self
16064 }
16065 pub fn extra_fields(&self) -> &super::MoveTable {
16067 self.extra_fields
16068 .as_ref()
16069 .map(|field| field as _)
16070 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16071 }
16072 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
16074 self.extra_fields.as_mut().map(|field| field as _)
16075 }
16076 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
16079 self.extra_fields.get_or_insert_default()
16080 }
16081 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
16083 self.extra_fields.as_ref().map(|field| field as _)
16084 }
16085 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
16087 self.extra_fields = Some(field.into().into());
16088 }
16089 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
16091 self.set_extra_fields(field.into());
16092 self
16093 }
16094 }
16095 impl super::Transaction {
16096 pub const fn const_default() -> Self {
16097 Self {
16098 bcs: None,
16099 digest: None,
16100 version: None,
16101 kind: None,
16102 sender: None,
16103 gas_payment: None,
16104 expiration: None,
16105 }
16106 }
16107 #[doc(hidden)]
16108 pub fn default_instance() -> &'static Self {
16109 static DEFAULT: super::Transaction = super::Transaction::const_default();
16110 &DEFAULT
16111 }
16112 pub fn bcs(&self) -> &super::Bcs {
16114 self.bcs
16115 .as_ref()
16116 .map(|field| field as _)
16117 .unwrap_or_else(|| super::Bcs::default_instance() as _)
16118 }
16119 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
16121 self.bcs.as_mut().map(|field| field as _)
16122 }
16123 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
16126 self.bcs.get_or_insert_default()
16127 }
16128 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
16130 self.bcs.as_ref().map(|field| field as _)
16131 }
16132 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
16134 self.bcs = Some(field.into().into());
16135 }
16136 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
16138 self.set_bcs(field.into());
16139 self
16140 }
16141 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
16143 self.digest.as_mut().map(|field| field as _)
16144 }
16145 pub fn digest_mut(&mut self) -> &mut String {
16148 self.digest.get_or_insert_default()
16149 }
16150 pub fn digest_opt(&self) -> Option<&str> {
16152 self.digest.as_ref().map(|field| field as _)
16153 }
16154 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
16156 self.digest = Some(field.into().into());
16157 }
16158 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
16160 self.set_digest(field.into());
16161 self
16162 }
16163 pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
16165 self.version.as_mut().map(|field| field as _)
16166 }
16167 pub fn version_mut(&mut self) -> &mut i32 {
16170 self.version.get_or_insert_default()
16171 }
16172 pub fn version_opt(&self) -> Option<i32> {
16174 self.version.as_ref().map(|field| *field)
16175 }
16176 pub fn set_version(&mut self, field: i32) {
16178 self.version = Some(field);
16179 }
16180 pub fn with_version(mut self, field: i32) -> Self {
16182 self.set_version(field);
16183 self
16184 }
16185 pub fn kind(&self) -> &super::TransactionKind {
16187 self.kind
16188 .as_ref()
16189 .map(|field| field as _)
16190 .unwrap_or_else(|| super::TransactionKind::default_instance() as _)
16191 }
16192 pub fn kind_opt_mut(&mut self) -> Option<&mut super::TransactionKind> {
16194 self.kind.as_mut().map(|field| field as _)
16195 }
16196 pub fn kind_mut(&mut self) -> &mut super::TransactionKind {
16199 self.kind.get_or_insert_default()
16200 }
16201 pub fn kind_opt(&self) -> Option<&super::TransactionKind> {
16203 self.kind.as_ref().map(|field| field as _)
16204 }
16205 pub fn set_kind<T: Into<super::TransactionKind>>(&mut self, field: T) {
16207 self.kind = Some(field.into().into());
16208 }
16209 pub fn with_kind<T: Into<super::TransactionKind>>(mut self, field: T) -> Self {
16211 self.set_kind(field.into());
16212 self
16213 }
16214 pub fn sender_opt_mut(&mut self) -> Option<&mut String> {
16216 self.sender.as_mut().map(|field| field as _)
16217 }
16218 pub fn sender_mut(&mut self) -> &mut String {
16221 self.sender.get_or_insert_default()
16222 }
16223 pub fn sender_opt(&self) -> Option<&str> {
16225 self.sender.as_ref().map(|field| field as _)
16226 }
16227 pub fn set_sender<T: Into<String>>(&mut self, field: T) {
16229 self.sender = Some(field.into().into());
16230 }
16231 pub fn with_sender<T: Into<String>>(mut self, field: T) -> Self {
16233 self.set_sender(field.into());
16234 self
16235 }
16236 pub fn gas_payment(&self) -> &super::GasPayment {
16238 self.gas_payment
16239 .as_ref()
16240 .map(|field| field as _)
16241 .unwrap_or_else(|| super::GasPayment::default_instance() as _)
16242 }
16243 pub fn gas_payment_opt_mut(&mut self) -> Option<&mut super::GasPayment> {
16245 self.gas_payment.as_mut().map(|field| field as _)
16246 }
16247 pub fn gas_payment_mut(&mut self) -> &mut super::GasPayment {
16250 self.gas_payment.get_or_insert_default()
16251 }
16252 pub fn gas_payment_opt(&self) -> Option<&super::GasPayment> {
16254 self.gas_payment.as_ref().map(|field| field as _)
16255 }
16256 pub fn set_gas_payment<T: Into<super::GasPayment>>(&mut self, field: T) {
16258 self.gas_payment = Some(field.into().into());
16259 }
16260 pub fn with_gas_payment<T: Into<super::GasPayment>>(mut self, field: T) -> Self {
16262 self.set_gas_payment(field.into());
16263 self
16264 }
16265 pub fn expiration(&self) -> &super::TransactionExpiration {
16267 self.expiration
16268 .as_ref()
16269 .map(|field| field as _)
16270 .unwrap_or_else(|| super::TransactionExpiration::default_instance() as _)
16271 }
16272 pub fn expiration_opt_mut(
16274 &mut self,
16275 ) -> Option<&mut super::TransactionExpiration> {
16276 self.expiration.as_mut().map(|field| field as _)
16277 }
16278 pub fn expiration_mut(&mut self) -> &mut super::TransactionExpiration {
16281 self.expiration.get_or_insert_default()
16282 }
16283 pub fn expiration_opt(&self) -> Option<&super::TransactionExpiration> {
16285 self.expiration.as_ref().map(|field| field as _)
16286 }
16287 pub fn set_expiration<T: Into<super::TransactionExpiration>>(
16289 &mut self,
16290 field: T,
16291 ) {
16292 self.expiration = Some(field.into().into());
16293 }
16294 pub fn with_expiration<T: Into<super::TransactionExpiration>>(
16296 mut self,
16297 field: T,
16298 ) -> Self {
16299 self.set_expiration(field.into());
16300 self
16301 }
16302 }
16303 impl super::TransactionEffects {
16304 pub const fn const_default() -> Self {
16305 Self {
16306 bcs: None,
16307 digest: None,
16308 version: None,
16309 status: None,
16310 epoch: None,
16311 gas_used: None,
16312 transaction_digest: None,
16313 gas_object: None,
16314 events_digest: None,
16315 dependencies: Vec::new(),
16316 lamport_version: None,
16317 changed_objects: Vec::new(),
16318 unchanged_consensus_objects: Vec::new(),
16319 auxiliary_data_digest: None,
16320 unchanged_loaded_runtime_objects: Vec::new(),
16321 }
16322 }
16323 #[doc(hidden)]
16324 pub fn default_instance() -> &'static Self {
16325 static DEFAULT: super::TransactionEffects = super::TransactionEffects::const_default();
16326 &DEFAULT
16327 }
16328 pub fn bcs(&self) -> &super::Bcs {
16330 self.bcs
16331 .as_ref()
16332 .map(|field| field as _)
16333 .unwrap_or_else(|| super::Bcs::default_instance() as _)
16334 }
16335 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
16337 self.bcs.as_mut().map(|field| field as _)
16338 }
16339 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
16342 self.bcs.get_or_insert_default()
16343 }
16344 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
16346 self.bcs.as_ref().map(|field| field as _)
16347 }
16348 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
16350 self.bcs = Some(field.into().into());
16351 }
16352 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
16354 self.set_bcs(field.into());
16355 self
16356 }
16357 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
16359 self.digest.as_mut().map(|field| field as _)
16360 }
16361 pub fn digest_mut(&mut self) -> &mut String {
16364 self.digest.get_or_insert_default()
16365 }
16366 pub fn digest_opt(&self) -> Option<&str> {
16368 self.digest.as_ref().map(|field| field as _)
16369 }
16370 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
16372 self.digest = Some(field.into().into());
16373 }
16374 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
16376 self.set_digest(field.into());
16377 self
16378 }
16379 pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
16381 self.version.as_mut().map(|field| field as _)
16382 }
16383 pub fn version_mut(&mut self) -> &mut i32 {
16386 self.version.get_or_insert_default()
16387 }
16388 pub fn version_opt(&self) -> Option<i32> {
16390 self.version.as_ref().map(|field| *field)
16391 }
16392 pub fn set_version(&mut self, field: i32) {
16394 self.version = Some(field);
16395 }
16396 pub fn with_version(mut self, field: i32) -> Self {
16398 self.set_version(field);
16399 self
16400 }
16401 pub fn status(&self) -> &super::ExecutionStatus {
16403 self.status
16404 .as_ref()
16405 .map(|field| field as _)
16406 .unwrap_or_else(|| super::ExecutionStatus::default_instance() as _)
16407 }
16408 pub fn status_opt_mut(&mut self) -> Option<&mut super::ExecutionStatus> {
16410 self.status.as_mut().map(|field| field as _)
16411 }
16412 pub fn status_mut(&mut self) -> &mut super::ExecutionStatus {
16415 self.status.get_or_insert_default()
16416 }
16417 pub fn status_opt(&self) -> Option<&super::ExecutionStatus> {
16419 self.status.as_ref().map(|field| field as _)
16420 }
16421 pub fn set_status<T: Into<super::ExecutionStatus>>(&mut self, field: T) {
16423 self.status = Some(field.into().into());
16424 }
16425 pub fn with_status<T: Into<super::ExecutionStatus>>(mut self, field: T) -> Self {
16427 self.set_status(field.into());
16428 self
16429 }
16430 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
16432 self.epoch.as_mut().map(|field| field as _)
16433 }
16434 pub fn epoch_mut(&mut self) -> &mut u64 {
16437 self.epoch.get_or_insert_default()
16438 }
16439 pub fn epoch_opt(&self) -> Option<u64> {
16441 self.epoch.as_ref().map(|field| *field)
16442 }
16443 pub fn set_epoch(&mut self, field: u64) {
16445 self.epoch = Some(field);
16446 }
16447 pub fn with_epoch(mut self, field: u64) -> Self {
16449 self.set_epoch(field);
16450 self
16451 }
16452 pub fn gas_used(&self) -> &super::GasCostSummary {
16454 self.gas_used
16455 .as_ref()
16456 .map(|field| field as _)
16457 .unwrap_or_else(|| super::GasCostSummary::default_instance() as _)
16458 }
16459 pub fn gas_used_opt_mut(&mut self) -> Option<&mut super::GasCostSummary> {
16461 self.gas_used.as_mut().map(|field| field as _)
16462 }
16463 pub fn gas_used_mut(&mut self) -> &mut super::GasCostSummary {
16466 self.gas_used.get_or_insert_default()
16467 }
16468 pub fn gas_used_opt(&self) -> Option<&super::GasCostSummary> {
16470 self.gas_used.as_ref().map(|field| field as _)
16471 }
16472 pub fn set_gas_used<T: Into<super::GasCostSummary>>(&mut self, field: T) {
16474 self.gas_used = Some(field.into().into());
16475 }
16476 pub fn with_gas_used<T: Into<super::GasCostSummary>>(
16478 mut self,
16479 field: T,
16480 ) -> Self {
16481 self.set_gas_used(field.into());
16482 self
16483 }
16484 pub fn transaction_digest_opt_mut(&mut self) -> Option<&mut String> {
16486 self.transaction_digest.as_mut().map(|field| field as _)
16487 }
16488 pub fn transaction_digest_mut(&mut self) -> &mut String {
16491 self.transaction_digest.get_or_insert_default()
16492 }
16493 pub fn transaction_digest_opt(&self) -> Option<&str> {
16495 self.transaction_digest.as_ref().map(|field| field as _)
16496 }
16497 pub fn set_transaction_digest<T: Into<String>>(&mut self, field: T) {
16499 self.transaction_digest = Some(field.into().into());
16500 }
16501 pub fn with_transaction_digest<T: Into<String>>(mut self, field: T) -> Self {
16503 self.set_transaction_digest(field.into());
16504 self
16505 }
16506 pub fn gas_object(&self) -> &super::ChangedObject {
16508 self.gas_object
16509 .as_ref()
16510 .map(|field| field as _)
16511 .unwrap_or_else(|| super::ChangedObject::default_instance() as _)
16512 }
16513 pub fn gas_object_opt_mut(&mut self) -> Option<&mut super::ChangedObject> {
16515 self.gas_object.as_mut().map(|field| field as _)
16516 }
16517 pub fn gas_object_mut(&mut self) -> &mut super::ChangedObject {
16520 self.gas_object.get_or_insert_default()
16521 }
16522 pub fn gas_object_opt(&self) -> Option<&super::ChangedObject> {
16524 self.gas_object.as_ref().map(|field| field as _)
16525 }
16526 pub fn set_gas_object<T: Into<super::ChangedObject>>(&mut self, field: T) {
16528 self.gas_object = Some(field.into().into());
16529 }
16530 pub fn with_gas_object<T: Into<super::ChangedObject>>(
16532 mut self,
16533 field: T,
16534 ) -> Self {
16535 self.set_gas_object(field.into());
16536 self
16537 }
16538 pub fn events_digest_opt_mut(&mut self) -> Option<&mut String> {
16540 self.events_digest.as_mut().map(|field| field as _)
16541 }
16542 pub fn events_digest_mut(&mut self) -> &mut String {
16545 self.events_digest.get_or_insert_default()
16546 }
16547 pub fn events_digest_opt(&self) -> Option<&str> {
16549 self.events_digest.as_ref().map(|field| field as _)
16550 }
16551 pub fn set_events_digest<T: Into<String>>(&mut self, field: T) {
16553 self.events_digest = Some(field.into().into());
16554 }
16555 pub fn with_events_digest<T: Into<String>>(mut self, field: T) -> Self {
16557 self.set_events_digest(field.into());
16558 self
16559 }
16560 pub fn dependencies(&self) -> &[String] {
16562 &self.dependencies
16563 }
16564 pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
16567 &mut self.dependencies
16568 }
16569 pub fn set_dependencies(&mut self, field: Vec<String>) {
16571 self.dependencies = field;
16572 }
16573 pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
16575 self.set_dependencies(field);
16576 self
16577 }
16578 pub fn lamport_version_opt_mut(&mut self) -> Option<&mut u64> {
16580 self.lamport_version.as_mut().map(|field| field as _)
16581 }
16582 pub fn lamport_version_mut(&mut self) -> &mut u64 {
16585 self.lamport_version.get_or_insert_default()
16586 }
16587 pub fn lamport_version_opt(&self) -> Option<u64> {
16589 self.lamport_version.as_ref().map(|field| *field)
16590 }
16591 pub fn set_lamport_version(&mut self, field: u64) {
16593 self.lamport_version = Some(field);
16594 }
16595 pub fn with_lamport_version(mut self, field: u64) -> Self {
16597 self.set_lamport_version(field);
16598 self
16599 }
16600 pub fn changed_objects(&self) -> &[super::ChangedObject] {
16602 &self.changed_objects
16603 }
16604 pub fn changed_objects_mut(&mut self) -> &mut Vec<super::ChangedObject> {
16607 &mut self.changed_objects
16608 }
16609 pub fn set_changed_objects(&mut self, field: Vec<super::ChangedObject>) {
16611 self.changed_objects = field;
16612 }
16613 pub fn with_changed_objects(mut self, field: Vec<super::ChangedObject>) -> Self {
16615 self.set_changed_objects(field);
16616 self
16617 }
16618 pub fn unchanged_consensus_objects(&self) -> &[super::UnchangedConsensusObject] {
16620 &self.unchanged_consensus_objects
16621 }
16622 pub fn unchanged_consensus_objects_mut(
16625 &mut self,
16626 ) -> &mut Vec<super::UnchangedConsensusObject> {
16627 &mut self.unchanged_consensus_objects
16628 }
16629 pub fn set_unchanged_consensus_objects(
16631 &mut self,
16632 field: Vec<super::UnchangedConsensusObject>,
16633 ) {
16634 self.unchanged_consensus_objects = field;
16635 }
16636 pub fn with_unchanged_consensus_objects(
16638 mut self,
16639 field: Vec<super::UnchangedConsensusObject>,
16640 ) -> Self {
16641 self.set_unchanged_consensus_objects(field);
16642 self
16643 }
16644 pub fn auxiliary_data_digest_opt_mut(&mut self) -> Option<&mut String> {
16646 self.auxiliary_data_digest.as_mut().map(|field| field as _)
16647 }
16648 pub fn auxiliary_data_digest_mut(&mut self) -> &mut String {
16651 self.auxiliary_data_digest.get_or_insert_default()
16652 }
16653 pub fn auxiliary_data_digest_opt(&self) -> Option<&str> {
16655 self.auxiliary_data_digest.as_ref().map(|field| field as _)
16656 }
16657 pub fn set_auxiliary_data_digest<T: Into<String>>(&mut self, field: T) {
16659 self.auxiliary_data_digest = Some(field.into().into());
16660 }
16661 pub fn with_auxiliary_data_digest<T: Into<String>>(mut self, field: T) -> Self {
16663 self.set_auxiliary_data_digest(field.into());
16664 self
16665 }
16666 pub fn unchanged_loaded_runtime_objects(&self) -> &[super::ObjectReference] {
16668 &self.unchanged_loaded_runtime_objects
16669 }
16670 pub fn unchanged_loaded_runtime_objects_mut(
16673 &mut self,
16674 ) -> &mut Vec<super::ObjectReference> {
16675 &mut self.unchanged_loaded_runtime_objects
16676 }
16677 pub fn set_unchanged_loaded_runtime_objects(
16679 &mut self,
16680 field: Vec<super::ObjectReference>,
16681 ) {
16682 self.unchanged_loaded_runtime_objects = field;
16683 }
16684 pub fn with_unchanged_loaded_runtime_objects(
16686 mut self,
16687 field: Vec<super::ObjectReference>,
16688 ) -> Self {
16689 self.set_unchanged_loaded_runtime_objects(field);
16690 self
16691 }
16692 }
16693 impl super::TransactionEvents {
16694 pub const fn const_default() -> Self {
16695 Self {
16696 bcs: None,
16697 digest: None,
16698 events: Vec::new(),
16699 }
16700 }
16701 #[doc(hidden)]
16702 pub fn default_instance() -> &'static Self {
16703 static DEFAULT: super::TransactionEvents = super::TransactionEvents::const_default();
16704 &DEFAULT
16705 }
16706 pub fn bcs(&self) -> &super::Bcs {
16708 self.bcs
16709 .as_ref()
16710 .map(|field| field as _)
16711 .unwrap_or_else(|| super::Bcs::default_instance() as _)
16712 }
16713 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
16715 self.bcs.as_mut().map(|field| field as _)
16716 }
16717 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
16720 self.bcs.get_or_insert_default()
16721 }
16722 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
16724 self.bcs.as_ref().map(|field| field as _)
16725 }
16726 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
16728 self.bcs = Some(field.into().into());
16729 }
16730 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
16732 self.set_bcs(field.into());
16733 self
16734 }
16735 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
16737 self.digest.as_mut().map(|field| field as _)
16738 }
16739 pub fn digest_mut(&mut self) -> &mut String {
16742 self.digest.get_or_insert_default()
16743 }
16744 pub fn digest_opt(&self) -> Option<&str> {
16746 self.digest.as_ref().map(|field| field as _)
16747 }
16748 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
16750 self.digest = Some(field.into().into());
16751 }
16752 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
16754 self.set_digest(field.into());
16755 self
16756 }
16757 pub fn events(&self) -> &[super::Event] {
16759 &self.events
16760 }
16761 pub fn events_mut(&mut self) -> &mut Vec<super::Event> {
16764 &mut self.events
16765 }
16766 pub fn set_events(&mut self, field: Vec<super::Event>) {
16768 self.events = field;
16769 }
16770 pub fn with_events(mut self, field: Vec<super::Event>) -> Self {
16772 self.set_events(field);
16773 self
16774 }
16775 }
16776 impl super::TransactionExpiration {
16777 pub const fn const_default() -> Self {
16778 Self {
16779 kind: None,
16780 epoch: None,
16781 min_epoch: None,
16782 min_timestamp: None,
16783 max_timestamp: None,
16784 chain: None,
16785 nonce: None,
16786 allowed_proposers: None,
16787 }
16788 }
16789 #[doc(hidden)]
16790 pub fn default_instance() -> &'static Self {
16791 static DEFAULT: super::TransactionExpiration = super::TransactionExpiration::const_default();
16792 &DEFAULT
16793 }
16794 pub fn with_kind<
16796 T: Into<super::transaction_expiration::TransactionExpirationKind>,
16797 >(mut self, field: T) -> Self {
16798 self.set_kind(field.into());
16799 self
16800 }
16801 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
16803 self.epoch.as_mut().map(|field| field as _)
16804 }
16805 pub fn epoch_mut(&mut self) -> &mut u64 {
16808 self.epoch.get_or_insert_default()
16809 }
16810 pub fn epoch_opt(&self) -> Option<u64> {
16812 self.epoch.as_ref().map(|field| *field)
16813 }
16814 pub fn set_epoch(&mut self, field: u64) {
16816 self.epoch = Some(field);
16817 }
16818 pub fn with_epoch(mut self, field: u64) -> Self {
16820 self.set_epoch(field);
16821 self
16822 }
16823 pub fn min_epoch_opt_mut(&mut self) -> Option<&mut u64> {
16825 self.min_epoch.as_mut().map(|field| field as _)
16826 }
16827 pub fn min_epoch_mut(&mut self) -> &mut u64 {
16830 self.min_epoch.get_or_insert_default()
16831 }
16832 pub fn min_epoch_opt(&self) -> Option<u64> {
16834 self.min_epoch.as_ref().map(|field| *field)
16835 }
16836 pub fn set_min_epoch(&mut self, field: u64) {
16838 self.min_epoch = Some(field);
16839 }
16840 pub fn with_min_epoch(mut self, field: u64) -> Self {
16842 self.set_min_epoch(field);
16843 self
16844 }
16845 pub fn min_timestamp_opt_mut(
16847 &mut self,
16848 ) -> Option<&mut ::prost_types::Timestamp> {
16849 self.min_timestamp.as_mut().map(|field| field as _)
16850 }
16851 pub fn min_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
16854 self.min_timestamp.get_or_insert_default()
16855 }
16856 pub fn min_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
16858 self.min_timestamp.as_ref().map(|field| field as _)
16859 }
16860 pub fn set_min_timestamp<T: Into<::prost_types::Timestamp>>(
16862 &mut self,
16863 field: T,
16864 ) {
16865 self.min_timestamp = Some(field.into().into());
16866 }
16867 pub fn with_min_timestamp<T: Into<::prost_types::Timestamp>>(
16869 mut self,
16870 field: T,
16871 ) -> Self {
16872 self.set_min_timestamp(field.into());
16873 self
16874 }
16875 pub fn max_timestamp_opt_mut(
16877 &mut self,
16878 ) -> Option<&mut ::prost_types::Timestamp> {
16879 self.max_timestamp.as_mut().map(|field| field as _)
16880 }
16881 pub fn max_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
16884 self.max_timestamp.get_or_insert_default()
16885 }
16886 pub fn max_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
16888 self.max_timestamp.as_ref().map(|field| field as _)
16889 }
16890 pub fn set_max_timestamp<T: Into<::prost_types::Timestamp>>(
16892 &mut self,
16893 field: T,
16894 ) {
16895 self.max_timestamp = Some(field.into().into());
16896 }
16897 pub fn with_max_timestamp<T: Into<::prost_types::Timestamp>>(
16899 mut self,
16900 field: T,
16901 ) -> Self {
16902 self.set_max_timestamp(field.into());
16903 self
16904 }
16905 pub fn chain_opt_mut(&mut self) -> Option<&mut String> {
16907 self.chain.as_mut().map(|field| field as _)
16908 }
16909 pub fn chain_mut(&mut self) -> &mut String {
16912 self.chain.get_or_insert_default()
16913 }
16914 pub fn chain_opt(&self) -> Option<&str> {
16916 self.chain.as_ref().map(|field| field as _)
16917 }
16918 pub fn set_chain<T: Into<String>>(&mut self, field: T) {
16920 self.chain = Some(field.into().into());
16921 }
16922 pub fn with_chain<T: Into<String>>(mut self, field: T) -> Self {
16924 self.set_chain(field.into());
16925 self
16926 }
16927 pub fn nonce_opt_mut(&mut self) -> Option<&mut u32> {
16929 self.nonce.as_mut().map(|field| field as _)
16930 }
16931 pub fn nonce_mut(&mut self) -> &mut u32 {
16934 self.nonce.get_or_insert_default()
16935 }
16936 pub fn nonce_opt(&self) -> Option<u32> {
16938 self.nonce.as_ref().map(|field| *field)
16939 }
16940 pub fn set_nonce(&mut self, field: u32) {
16942 self.nonce = Some(field);
16943 }
16944 pub fn with_nonce(mut self, field: u32) -> Self {
16946 self.set_nonce(field);
16947 self
16948 }
16949 pub fn allowed_proposers(&self) -> &super::AllowedProposers {
16951 self.allowed_proposers
16952 .as_ref()
16953 .map(|field| field as _)
16954 .unwrap_or_else(|| super::AllowedProposers::default_instance() as _)
16955 }
16956 pub fn allowed_proposers_opt_mut(
16958 &mut self,
16959 ) -> Option<&mut super::AllowedProposers> {
16960 self.allowed_proposers.as_mut().map(|field| field as _)
16961 }
16962 pub fn allowed_proposers_mut(&mut self) -> &mut super::AllowedProposers {
16965 self.allowed_proposers.get_or_insert_default()
16966 }
16967 pub fn allowed_proposers_opt(&self) -> Option<&super::AllowedProposers> {
16969 self.allowed_proposers.as_ref().map(|field| field as _)
16970 }
16971 pub fn set_allowed_proposers<T: Into<super::AllowedProposers>>(
16973 &mut self,
16974 field: T,
16975 ) {
16976 self.allowed_proposers = Some(field.into().into());
16977 }
16978 pub fn with_allowed_proposers<T: Into<super::AllowedProposers>>(
16980 mut self,
16981 field: T,
16982 ) -> Self {
16983 self.set_allowed_proposers(field.into());
16984 self
16985 }
16986 }
16987 impl super::TransactionFilter {
16988 pub const fn const_default() -> Self {
16989 Self { terms: Vec::new() }
16990 }
16991 #[doc(hidden)]
16992 pub fn default_instance() -> &'static Self {
16993 static DEFAULT: super::TransactionFilter = super::TransactionFilter::const_default();
16994 &DEFAULT
16995 }
16996 pub fn terms(&self) -> &[super::TransactionTerm] {
16998 &self.terms
16999 }
17000 pub fn terms_mut(&mut self) -> &mut Vec<super::TransactionTerm> {
17003 &mut self.terms
17004 }
17005 pub fn set_terms(&mut self, field: Vec<super::TransactionTerm>) {
17007 self.terms = field;
17008 }
17009 pub fn with_terms(mut self, field: Vec<super::TransactionTerm>) -> Self {
17011 self.set_terms(field);
17012 self
17013 }
17014 }
17015 impl super::TransactionKind {
17016 pub const fn const_default() -> Self {
17017 Self { kind: None, data: None }
17018 }
17019 #[doc(hidden)]
17020 pub fn default_instance() -> &'static Self {
17021 static DEFAULT: super::TransactionKind = super::TransactionKind::const_default();
17022 &DEFAULT
17023 }
17024 pub fn with_kind<T: Into<super::transaction_kind::Kind>>(
17026 mut self,
17027 field: T,
17028 ) -> Self {
17029 self.set_kind(field.into());
17030 self
17031 }
17032 pub fn programmable_transaction(&self) -> &super::ProgrammableTransaction {
17034 if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &self
17035 .data
17036 {
17037 field as _
17038 } else {
17039 super::ProgrammableTransaction::default_instance() as _
17040 }
17041 }
17042 pub fn programmable_transaction_opt(
17044 &self,
17045 ) -> Option<&super::ProgrammableTransaction> {
17046 if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &self
17047 .data
17048 {
17049 Some(field as _)
17050 } else {
17051 None
17052 }
17053 }
17054 pub fn programmable_transaction_opt_mut(
17056 &mut self,
17057 ) -> Option<&mut super::ProgrammableTransaction> {
17058 if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &mut self
17059 .data
17060 {
17061 Some(field as _)
17062 } else {
17063 None
17064 }
17065 }
17066 pub fn programmable_transaction_mut(
17070 &mut self,
17071 ) -> &mut super::ProgrammableTransaction {
17072 if self.programmable_transaction_opt_mut().is_none() {
17073 self.data = Some(
17074 super::transaction_kind::Data::ProgrammableTransaction(
17075 super::ProgrammableTransaction::default(),
17076 ),
17077 );
17078 }
17079 self.programmable_transaction_opt_mut().unwrap()
17080 }
17081 pub fn set_programmable_transaction<T: Into<super::ProgrammableTransaction>>(
17084 &mut self,
17085 field: T,
17086 ) {
17087 self.data = Some(
17088 super::transaction_kind::Data::ProgrammableTransaction(
17089 field.into().into(),
17090 ),
17091 );
17092 }
17093 pub fn with_programmable_transaction<T: Into<super::ProgrammableTransaction>>(
17096 mut self,
17097 field: T,
17098 ) -> Self {
17099 self.set_programmable_transaction(field.into());
17100 self
17101 }
17102 pub fn change_epoch(&self) -> &super::ChangeEpoch {
17104 if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &self.data {
17105 field as _
17106 } else {
17107 super::ChangeEpoch::default_instance() as _
17108 }
17109 }
17110 pub fn change_epoch_opt(&self) -> Option<&super::ChangeEpoch> {
17112 if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &self.data {
17113 Some(field as _)
17114 } else {
17115 None
17116 }
17117 }
17118 pub fn change_epoch_opt_mut(&mut self) -> Option<&mut super::ChangeEpoch> {
17120 if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &mut self
17121 .data
17122 {
17123 Some(field as _)
17124 } else {
17125 None
17126 }
17127 }
17128 pub fn change_epoch_mut(&mut self) -> &mut super::ChangeEpoch {
17132 if self.change_epoch_opt_mut().is_none() {
17133 self.data = Some(
17134 super::transaction_kind::Data::ChangeEpoch(
17135 super::ChangeEpoch::default(),
17136 ),
17137 );
17138 }
17139 self.change_epoch_opt_mut().unwrap()
17140 }
17141 pub fn set_change_epoch<T: Into<super::ChangeEpoch>>(&mut self, field: T) {
17144 self.data = Some(
17145 super::transaction_kind::Data::ChangeEpoch(field.into().into()),
17146 );
17147 }
17148 pub fn with_change_epoch<T: Into<super::ChangeEpoch>>(
17151 mut self,
17152 field: T,
17153 ) -> Self {
17154 self.set_change_epoch(field.into());
17155 self
17156 }
17157 pub fn genesis(&self) -> &super::GenesisTransaction {
17159 if let Some(super::transaction_kind::Data::Genesis(field)) = &self.data {
17160 field as _
17161 } else {
17162 super::GenesisTransaction::default_instance() as _
17163 }
17164 }
17165 pub fn genesis_opt(&self) -> Option<&super::GenesisTransaction> {
17167 if let Some(super::transaction_kind::Data::Genesis(field)) = &self.data {
17168 Some(field as _)
17169 } else {
17170 None
17171 }
17172 }
17173 pub fn genesis_opt_mut(&mut self) -> Option<&mut super::GenesisTransaction> {
17175 if let Some(super::transaction_kind::Data::Genesis(field)) = &mut self.data {
17176 Some(field as _)
17177 } else {
17178 None
17179 }
17180 }
17181 pub fn genesis_mut(&mut self) -> &mut super::GenesisTransaction {
17185 if self.genesis_opt_mut().is_none() {
17186 self.data = Some(
17187 super::transaction_kind::Data::Genesis(
17188 super::GenesisTransaction::default(),
17189 ),
17190 );
17191 }
17192 self.genesis_opt_mut().unwrap()
17193 }
17194 pub fn set_genesis<T: Into<super::GenesisTransaction>>(&mut self, field: T) {
17197 self.data = Some(
17198 super::transaction_kind::Data::Genesis(field.into().into()),
17199 );
17200 }
17201 pub fn with_genesis<T: Into<super::GenesisTransaction>>(
17204 mut self,
17205 field: T,
17206 ) -> Self {
17207 self.set_genesis(field.into());
17208 self
17209 }
17210 pub fn consensus_commit_prologue(&self) -> &super::ConsensusCommitPrologue {
17212 if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &self
17213 .data
17214 {
17215 field as _
17216 } else {
17217 super::ConsensusCommitPrologue::default_instance() as _
17218 }
17219 }
17220 pub fn consensus_commit_prologue_opt(
17222 &self,
17223 ) -> Option<&super::ConsensusCommitPrologue> {
17224 if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &self
17225 .data
17226 {
17227 Some(field as _)
17228 } else {
17229 None
17230 }
17231 }
17232 pub fn consensus_commit_prologue_opt_mut(
17234 &mut self,
17235 ) -> Option<&mut super::ConsensusCommitPrologue> {
17236 if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &mut self
17237 .data
17238 {
17239 Some(field as _)
17240 } else {
17241 None
17242 }
17243 }
17244 pub fn consensus_commit_prologue_mut(
17248 &mut self,
17249 ) -> &mut super::ConsensusCommitPrologue {
17250 if self.consensus_commit_prologue_opt_mut().is_none() {
17251 self.data = Some(
17252 super::transaction_kind::Data::ConsensusCommitPrologue(
17253 super::ConsensusCommitPrologue::default(),
17254 ),
17255 );
17256 }
17257 self.consensus_commit_prologue_opt_mut().unwrap()
17258 }
17259 pub fn set_consensus_commit_prologue<T: Into<super::ConsensusCommitPrologue>>(
17262 &mut self,
17263 field: T,
17264 ) {
17265 self.data = Some(
17266 super::transaction_kind::Data::ConsensusCommitPrologue(
17267 field.into().into(),
17268 ),
17269 );
17270 }
17271 pub fn with_consensus_commit_prologue<T: Into<super::ConsensusCommitPrologue>>(
17274 mut self,
17275 field: T,
17276 ) -> Self {
17277 self.set_consensus_commit_prologue(field.into());
17278 self
17279 }
17280 pub fn authenticator_state_update(&self) -> &super::AuthenticatorStateUpdate {
17282 if let Some(
17283 super::transaction_kind::Data::AuthenticatorStateUpdate(field),
17284 ) = &self.data
17285 {
17286 field as _
17287 } else {
17288 super::AuthenticatorStateUpdate::default_instance() as _
17289 }
17290 }
17291 pub fn authenticator_state_update_opt(
17293 &self,
17294 ) -> Option<&super::AuthenticatorStateUpdate> {
17295 if let Some(
17296 super::transaction_kind::Data::AuthenticatorStateUpdate(field),
17297 ) = &self.data
17298 {
17299 Some(field as _)
17300 } else {
17301 None
17302 }
17303 }
17304 pub fn authenticator_state_update_opt_mut(
17306 &mut self,
17307 ) -> Option<&mut super::AuthenticatorStateUpdate> {
17308 if let Some(
17309 super::transaction_kind::Data::AuthenticatorStateUpdate(field),
17310 ) = &mut self.data
17311 {
17312 Some(field as _)
17313 } else {
17314 None
17315 }
17316 }
17317 pub fn authenticator_state_update_mut(
17321 &mut self,
17322 ) -> &mut super::AuthenticatorStateUpdate {
17323 if self.authenticator_state_update_opt_mut().is_none() {
17324 self.data = Some(
17325 super::transaction_kind::Data::AuthenticatorStateUpdate(
17326 super::AuthenticatorStateUpdate::default(),
17327 ),
17328 );
17329 }
17330 self.authenticator_state_update_opt_mut().unwrap()
17331 }
17332 pub fn set_authenticator_state_update<T: Into<super::AuthenticatorStateUpdate>>(
17335 &mut self,
17336 field: T,
17337 ) {
17338 self.data = Some(
17339 super::transaction_kind::Data::AuthenticatorStateUpdate(
17340 field.into().into(),
17341 ),
17342 );
17343 }
17344 pub fn with_authenticator_state_update<T: Into<super::AuthenticatorStateUpdate>>(
17347 mut self,
17348 field: T,
17349 ) -> Self {
17350 self.set_authenticator_state_update(field.into());
17351 self
17352 }
17353 pub fn end_of_epoch(&self) -> &super::EndOfEpochTransaction {
17355 if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &self.data {
17356 field as _
17357 } else {
17358 super::EndOfEpochTransaction::default_instance() as _
17359 }
17360 }
17361 pub fn end_of_epoch_opt(&self) -> Option<&super::EndOfEpochTransaction> {
17363 if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &self.data {
17364 Some(field as _)
17365 } else {
17366 None
17367 }
17368 }
17369 pub fn end_of_epoch_opt_mut(
17371 &mut self,
17372 ) -> Option<&mut super::EndOfEpochTransaction> {
17373 if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &mut self
17374 .data
17375 {
17376 Some(field as _)
17377 } else {
17378 None
17379 }
17380 }
17381 pub fn end_of_epoch_mut(&mut self) -> &mut super::EndOfEpochTransaction {
17385 if self.end_of_epoch_opt_mut().is_none() {
17386 self.data = Some(
17387 super::transaction_kind::Data::EndOfEpoch(
17388 super::EndOfEpochTransaction::default(),
17389 ),
17390 );
17391 }
17392 self.end_of_epoch_opt_mut().unwrap()
17393 }
17394 pub fn set_end_of_epoch<T: Into<super::EndOfEpochTransaction>>(
17397 &mut self,
17398 field: T,
17399 ) {
17400 self.data = Some(
17401 super::transaction_kind::Data::EndOfEpoch(field.into().into()),
17402 );
17403 }
17404 pub fn with_end_of_epoch<T: Into<super::EndOfEpochTransaction>>(
17407 mut self,
17408 field: T,
17409 ) -> Self {
17410 self.set_end_of_epoch(field.into());
17411 self
17412 }
17413 pub fn randomness_state_update(&self) -> &super::RandomnessStateUpdate {
17415 if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &self
17416 .data
17417 {
17418 field as _
17419 } else {
17420 super::RandomnessStateUpdate::default_instance() as _
17421 }
17422 }
17423 pub fn randomness_state_update_opt(
17425 &self,
17426 ) -> Option<&super::RandomnessStateUpdate> {
17427 if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &self
17428 .data
17429 {
17430 Some(field as _)
17431 } else {
17432 None
17433 }
17434 }
17435 pub fn randomness_state_update_opt_mut(
17437 &mut self,
17438 ) -> Option<&mut super::RandomnessStateUpdate> {
17439 if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &mut self
17440 .data
17441 {
17442 Some(field as _)
17443 } else {
17444 None
17445 }
17446 }
17447 pub fn randomness_state_update_mut(
17451 &mut self,
17452 ) -> &mut super::RandomnessStateUpdate {
17453 if self.randomness_state_update_opt_mut().is_none() {
17454 self.data = Some(
17455 super::transaction_kind::Data::RandomnessStateUpdate(
17456 super::RandomnessStateUpdate::default(),
17457 ),
17458 );
17459 }
17460 self.randomness_state_update_opt_mut().unwrap()
17461 }
17462 pub fn set_randomness_state_update<T: Into<super::RandomnessStateUpdate>>(
17465 &mut self,
17466 field: T,
17467 ) {
17468 self.data = Some(
17469 super::transaction_kind::Data::RandomnessStateUpdate(field.into().into()),
17470 );
17471 }
17472 pub fn with_randomness_state_update<T: Into<super::RandomnessStateUpdate>>(
17475 mut self,
17476 field: T,
17477 ) -> Self {
17478 self.set_randomness_state_update(field.into());
17479 self
17480 }
17481 }
17482 impl super::TransactionLiteral {
17483 pub const fn const_default() -> Self {
17484 Self {
17485 negated: false,
17486 predicate: None,
17487 }
17488 }
17489 #[doc(hidden)]
17490 pub fn default_instance() -> &'static Self {
17491 static DEFAULT: super::TransactionLiteral = super::TransactionLiteral::const_default();
17492 &DEFAULT
17493 }
17494 pub fn negated_mut(&mut self) -> &mut bool {
17497 &mut self.negated
17498 }
17499 pub fn set_negated(&mut self, field: bool) {
17501 self.negated = field;
17502 }
17503 pub fn with_negated(mut self, field: bool) -> Self {
17505 self.set_negated(field);
17506 self
17507 }
17508 pub fn sender(&self) -> &super::SenderFilter {
17510 if let Some(super::transaction_literal::Predicate::Sender(field)) = &self
17511 .predicate
17512 {
17513 field as _
17514 } else {
17515 super::SenderFilter::default_instance() as _
17516 }
17517 }
17518 pub fn sender_opt(&self) -> Option<&super::SenderFilter> {
17520 if let Some(super::transaction_literal::Predicate::Sender(field)) = &self
17521 .predicate
17522 {
17523 Some(field as _)
17524 } else {
17525 None
17526 }
17527 }
17528 pub fn sender_opt_mut(&mut self) -> Option<&mut super::SenderFilter> {
17530 if let Some(super::transaction_literal::Predicate::Sender(field)) = &mut self
17531 .predicate
17532 {
17533 Some(field as _)
17534 } else {
17535 None
17536 }
17537 }
17538 pub fn sender_mut(&mut self) -> &mut super::SenderFilter {
17542 if self.sender_opt_mut().is_none() {
17543 self.predicate = Some(
17544 super::transaction_literal::Predicate::Sender(
17545 super::SenderFilter::default(),
17546 ),
17547 );
17548 }
17549 self.sender_opt_mut().unwrap()
17550 }
17551 pub fn set_sender<T: Into<super::SenderFilter>>(&mut self, field: T) {
17554 self.predicate = Some(
17555 super::transaction_literal::Predicate::Sender(field.into().into()),
17556 );
17557 }
17558 pub fn with_sender<T: Into<super::SenderFilter>>(mut self, field: T) -> Self {
17561 self.set_sender(field.into());
17562 self
17563 }
17564 pub fn affected_address(&self) -> &super::AffectedAddressFilter {
17566 if let Some(super::transaction_literal::Predicate::AffectedAddress(field)) = &self
17567 .predicate
17568 {
17569 field as _
17570 } else {
17571 super::AffectedAddressFilter::default_instance() as _
17572 }
17573 }
17574 pub fn affected_address_opt(&self) -> Option<&super::AffectedAddressFilter> {
17576 if let Some(super::transaction_literal::Predicate::AffectedAddress(field)) = &self
17577 .predicate
17578 {
17579 Some(field as _)
17580 } else {
17581 None
17582 }
17583 }
17584 pub fn affected_address_opt_mut(
17586 &mut self,
17587 ) -> Option<&mut super::AffectedAddressFilter> {
17588 if let Some(super::transaction_literal::Predicate::AffectedAddress(field)) = &mut self
17589 .predicate
17590 {
17591 Some(field as _)
17592 } else {
17593 None
17594 }
17595 }
17596 pub fn affected_address_mut(&mut self) -> &mut super::AffectedAddressFilter {
17600 if self.affected_address_opt_mut().is_none() {
17601 self.predicate = Some(
17602 super::transaction_literal::Predicate::AffectedAddress(
17603 super::AffectedAddressFilter::default(),
17604 ),
17605 );
17606 }
17607 self.affected_address_opt_mut().unwrap()
17608 }
17609 pub fn set_affected_address<T: Into<super::AffectedAddressFilter>>(
17612 &mut self,
17613 field: T,
17614 ) {
17615 self.predicate = Some(
17616 super::transaction_literal::Predicate::AffectedAddress(
17617 field.into().into(),
17618 ),
17619 );
17620 }
17621 pub fn with_affected_address<T: Into<super::AffectedAddressFilter>>(
17624 mut self,
17625 field: T,
17626 ) -> Self {
17627 self.set_affected_address(field.into());
17628 self
17629 }
17630 pub fn affected_object(&self) -> &super::AffectedObjectFilter {
17632 if let Some(super::transaction_literal::Predicate::AffectedObject(field)) = &self
17633 .predicate
17634 {
17635 field as _
17636 } else {
17637 super::AffectedObjectFilter::default_instance() as _
17638 }
17639 }
17640 pub fn affected_object_opt(&self) -> Option<&super::AffectedObjectFilter> {
17642 if let Some(super::transaction_literal::Predicate::AffectedObject(field)) = &self
17643 .predicate
17644 {
17645 Some(field as _)
17646 } else {
17647 None
17648 }
17649 }
17650 pub fn affected_object_opt_mut(
17652 &mut self,
17653 ) -> Option<&mut super::AffectedObjectFilter> {
17654 if let Some(super::transaction_literal::Predicate::AffectedObject(field)) = &mut self
17655 .predicate
17656 {
17657 Some(field as _)
17658 } else {
17659 None
17660 }
17661 }
17662 pub fn affected_object_mut(&mut self) -> &mut super::AffectedObjectFilter {
17666 if self.affected_object_opt_mut().is_none() {
17667 self.predicate = Some(
17668 super::transaction_literal::Predicate::AffectedObject(
17669 super::AffectedObjectFilter::default(),
17670 ),
17671 );
17672 }
17673 self.affected_object_opt_mut().unwrap()
17674 }
17675 pub fn set_affected_object<T: Into<super::AffectedObjectFilter>>(
17678 &mut self,
17679 field: T,
17680 ) {
17681 self.predicate = Some(
17682 super::transaction_literal::Predicate::AffectedObject(
17683 field.into().into(),
17684 ),
17685 );
17686 }
17687 pub fn with_affected_object<T: Into<super::AffectedObjectFilter>>(
17690 mut self,
17691 field: T,
17692 ) -> Self {
17693 self.set_affected_object(field.into());
17694 self
17695 }
17696 pub fn move_call(&self) -> &super::MoveCallFilter {
17698 if let Some(super::transaction_literal::Predicate::MoveCall(field)) = &self
17699 .predicate
17700 {
17701 field as _
17702 } else {
17703 super::MoveCallFilter::default_instance() as _
17704 }
17705 }
17706 pub fn move_call_opt(&self) -> Option<&super::MoveCallFilter> {
17708 if let Some(super::transaction_literal::Predicate::MoveCall(field)) = &self
17709 .predicate
17710 {
17711 Some(field as _)
17712 } else {
17713 None
17714 }
17715 }
17716 pub fn move_call_opt_mut(&mut self) -> Option<&mut super::MoveCallFilter> {
17718 if let Some(super::transaction_literal::Predicate::MoveCall(field)) = &mut self
17719 .predicate
17720 {
17721 Some(field as _)
17722 } else {
17723 None
17724 }
17725 }
17726 pub fn move_call_mut(&mut self) -> &mut super::MoveCallFilter {
17730 if self.move_call_opt_mut().is_none() {
17731 self.predicate = Some(
17732 super::transaction_literal::Predicate::MoveCall(
17733 super::MoveCallFilter::default(),
17734 ),
17735 );
17736 }
17737 self.move_call_opt_mut().unwrap()
17738 }
17739 pub fn set_move_call<T: Into<super::MoveCallFilter>>(&mut self, field: T) {
17742 self.predicate = Some(
17743 super::transaction_literal::Predicate::MoveCall(field.into().into()),
17744 );
17745 }
17746 pub fn with_move_call<T: Into<super::MoveCallFilter>>(
17749 mut self,
17750 field: T,
17751 ) -> Self {
17752 self.set_move_call(field.into());
17753 self
17754 }
17755 pub fn emit_module(&self) -> &super::EmitModuleFilter {
17757 if let Some(super::transaction_literal::Predicate::EmitModule(field)) = &self
17758 .predicate
17759 {
17760 field as _
17761 } else {
17762 super::EmitModuleFilter::default_instance() as _
17763 }
17764 }
17765 pub fn emit_module_opt(&self) -> Option<&super::EmitModuleFilter> {
17767 if let Some(super::transaction_literal::Predicate::EmitModule(field)) = &self
17768 .predicate
17769 {
17770 Some(field as _)
17771 } else {
17772 None
17773 }
17774 }
17775 pub fn emit_module_opt_mut(&mut self) -> Option<&mut super::EmitModuleFilter> {
17777 if let Some(super::transaction_literal::Predicate::EmitModule(field)) = &mut self
17778 .predicate
17779 {
17780 Some(field as _)
17781 } else {
17782 None
17783 }
17784 }
17785 pub fn emit_module_mut(&mut self) -> &mut super::EmitModuleFilter {
17789 if self.emit_module_opt_mut().is_none() {
17790 self.predicate = Some(
17791 super::transaction_literal::Predicate::EmitModule(
17792 super::EmitModuleFilter::default(),
17793 ),
17794 );
17795 }
17796 self.emit_module_opt_mut().unwrap()
17797 }
17798 pub fn set_emit_module<T: Into<super::EmitModuleFilter>>(&mut self, field: T) {
17801 self.predicate = Some(
17802 super::transaction_literal::Predicate::EmitModule(field.into().into()),
17803 );
17804 }
17805 pub fn with_emit_module<T: Into<super::EmitModuleFilter>>(
17808 mut self,
17809 field: T,
17810 ) -> Self {
17811 self.set_emit_module(field.into());
17812 self
17813 }
17814 pub fn event_type(&self) -> &super::EventTypeFilter {
17816 if let Some(super::transaction_literal::Predicate::EventType(field)) = &self
17817 .predicate
17818 {
17819 field as _
17820 } else {
17821 super::EventTypeFilter::default_instance() as _
17822 }
17823 }
17824 pub fn event_type_opt(&self) -> Option<&super::EventTypeFilter> {
17826 if let Some(super::transaction_literal::Predicate::EventType(field)) = &self
17827 .predicate
17828 {
17829 Some(field as _)
17830 } else {
17831 None
17832 }
17833 }
17834 pub fn event_type_opt_mut(&mut self) -> Option<&mut super::EventTypeFilter> {
17836 if let Some(super::transaction_literal::Predicate::EventType(field)) = &mut self
17837 .predicate
17838 {
17839 Some(field as _)
17840 } else {
17841 None
17842 }
17843 }
17844 pub fn event_type_mut(&mut self) -> &mut super::EventTypeFilter {
17848 if self.event_type_opt_mut().is_none() {
17849 self.predicate = Some(
17850 super::transaction_literal::Predicate::EventType(
17851 super::EventTypeFilter::default(),
17852 ),
17853 );
17854 }
17855 self.event_type_opt_mut().unwrap()
17856 }
17857 pub fn set_event_type<T: Into<super::EventTypeFilter>>(&mut self, field: T) {
17860 self.predicate = Some(
17861 super::transaction_literal::Predicate::EventType(field.into().into()),
17862 );
17863 }
17864 pub fn with_event_type<T: Into<super::EventTypeFilter>>(
17867 mut self,
17868 field: T,
17869 ) -> Self {
17870 self.set_event_type(field.into());
17871 self
17872 }
17873 pub fn event_stream_head(&self) -> &super::EventStreamHeadFilter {
17875 if let Some(super::transaction_literal::Predicate::EventStreamHead(field)) = &self
17876 .predicate
17877 {
17878 field as _
17879 } else {
17880 super::EventStreamHeadFilter::default_instance() as _
17881 }
17882 }
17883 pub fn event_stream_head_opt(&self) -> Option<&super::EventStreamHeadFilter> {
17885 if let Some(super::transaction_literal::Predicate::EventStreamHead(field)) = &self
17886 .predicate
17887 {
17888 Some(field as _)
17889 } else {
17890 None
17891 }
17892 }
17893 pub fn event_stream_head_opt_mut(
17895 &mut self,
17896 ) -> Option<&mut super::EventStreamHeadFilter> {
17897 if let Some(super::transaction_literal::Predicate::EventStreamHead(field)) = &mut self
17898 .predicate
17899 {
17900 Some(field as _)
17901 } else {
17902 None
17903 }
17904 }
17905 pub fn event_stream_head_mut(&mut self) -> &mut super::EventStreamHeadFilter {
17909 if self.event_stream_head_opt_mut().is_none() {
17910 self.predicate = Some(
17911 super::transaction_literal::Predicate::EventStreamHead(
17912 super::EventStreamHeadFilter::default(),
17913 ),
17914 );
17915 }
17916 self.event_stream_head_opt_mut().unwrap()
17917 }
17918 pub fn set_event_stream_head<T: Into<super::EventStreamHeadFilter>>(
17921 &mut self,
17922 field: T,
17923 ) {
17924 self.predicate = Some(
17925 super::transaction_literal::Predicate::EventStreamHead(
17926 field.into().into(),
17927 ),
17928 );
17929 }
17930 pub fn with_event_stream_head<T: Into<super::EventStreamHeadFilter>>(
17933 mut self,
17934 field: T,
17935 ) -> Self {
17936 self.set_event_stream_head(field.into());
17937 self
17938 }
17939 pub fn package_write(&self) -> &super::PackageWriteFilter {
17941 if let Some(super::transaction_literal::Predicate::PackageWrite(field)) = &self
17942 .predicate
17943 {
17944 field as _
17945 } else {
17946 super::PackageWriteFilter::default_instance() as _
17947 }
17948 }
17949 pub fn package_write_opt(&self) -> Option<&super::PackageWriteFilter> {
17951 if let Some(super::transaction_literal::Predicate::PackageWrite(field)) = &self
17952 .predicate
17953 {
17954 Some(field as _)
17955 } else {
17956 None
17957 }
17958 }
17959 pub fn package_write_opt_mut(
17961 &mut self,
17962 ) -> Option<&mut super::PackageWriteFilter> {
17963 if let Some(super::transaction_literal::Predicate::PackageWrite(field)) = &mut self
17964 .predicate
17965 {
17966 Some(field as _)
17967 } else {
17968 None
17969 }
17970 }
17971 pub fn package_write_mut(&mut self) -> &mut super::PackageWriteFilter {
17975 if self.package_write_opt_mut().is_none() {
17976 self.predicate = Some(
17977 super::transaction_literal::Predicate::PackageWrite(
17978 super::PackageWriteFilter::default(),
17979 ),
17980 );
17981 }
17982 self.package_write_opt_mut().unwrap()
17983 }
17984 pub fn set_package_write<T: Into<super::PackageWriteFilter>>(
17987 &mut self,
17988 field: T,
17989 ) {
17990 self.predicate = Some(
17991 super::transaction_literal::Predicate::PackageWrite(field.into().into()),
17992 );
17993 }
17994 pub fn with_package_write<T: Into<super::PackageWriteFilter>>(
17997 mut self,
17998 field: T,
17999 ) -> Self {
18000 self.set_package_write(field.into());
18001 self
18002 }
18003 }
18004 impl super::TransactionTerm {
18005 pub const fn const_default() -> Self {
18006 Self { literals: Vec::new() }
18007 }
18008 #[doc(hidden)]
18009 pub fn default_instance() -> &'static Self {
18010 static DEFAULT: super::TransactionTerm = super::TransactionTerm::const_default();
18011 &DEFAULT
18012 }
18013 pub fn literals(&self) -> &[super::TransactionLiteral] {
18015 &self.literals
18016 }
18017 pub fn literals_mut(&mut self) -> &mut Vec<super::TransactionLiteral> {
18020 &mut self.literals
18021 }
18022 pub fn set_literals(&mut self, field: Vec<super::TransactionLiteral>) {
18024 self.literals = field;
18025 }
18026 pub fn with_literals(mut self, field: Vec<super::TransactionLiteral>) -> Self {
18028 self.set_literals(field);
18029 self
18030 }
18031 }
18032 impl super::TransferObjects {
18033 pub const fn const_default() -> Self {
18034 Self {
18035 objects: Vec::new(),
18036 address: None,
18037 }
18038 }
18039 #[doc(hidden)]
18040 pub fn default_instance() -> &'static Self {
18041 static DEFAULT: super::TransferObjects = super::TransferObjects::const_default();
18042 &DEFAULT
18043 }
18044 pub fn objects(&self) -> &[super::Argument] {
18046 &self.objects
18047 }
18048 pub fn objects_mut(&mut self) -> &mut Vec<super::Argument> {
18051 &mut self.objects
18052 }
18053 pub fn set_objects(&mut self, field: Vec<super::Argument>) {
18055 self.objects = field;
18056 }
18057 pub fn with_objects(mut self, field: Vec<super::Argument>) -> Self {
18059 self.set_objects(field);
18060 self
18061 }
18062 pub fn address(&self) -> &super::Argument {
18064 self.address
18065 .as_ref()
18066 .map(|field| field as _)
18067 .unwrap_or_else(|| super::Argument::default_instance() as _)
18068 }
18069 pub fn address_opt_mut(&mut self) -> Option<&mut super::Argument> {
18071 self.address.as_mut().map(|field| field as _)
18072 }
18073 pub fn address_mut(&mut self) -> &mut super::Argument {
18076 self.address.get_or_insert_default()
18077 }
18078 pub fn address_opt(&self) -> Option<&super::Argument> {
18080 self.address.as_ref().map(|field| field as _)
18081 }
18082 pub fn set_address<T: Into<super::Argument>>(&mut self, field: T) {
18084 self.address = Some(field.into().into());
18085 }
18086 pub fn with_address<T: Into<super::Argument>>(mut self, field: T) -> Self {
18088 self.set_address(field.into());
18089 self
18090 }
18091 }
18092 impl super::TypeArgumentError {
18093 pub const fn const_default() -> Self {
18094 Self {
18095 type_argument: None,
18096 kind: None,
18097 }
18098 }
18099 #[doc(hidden)]
18100 pub fn default_instance() -> &'static Self {
18101 static DEFAULT: super::TypeArgumentError = super::TypeArgumentError::const_default();
18102 &DEFAULT
18103 }
18104 pub fn type_argument_opt_mut(&mut self) -> Option<&mut u32> {
18106 self.type_argument.as_mut().map(|field| field as _)
18107 }
18108 pub fn type_argument_mut(&mut self) -> &mut u32 {
18111 self.type_argument.get_or_insert_default()
18112 }
18113 pub fn type_argument_opt(&self) -> Option<u32> {
18115 self.type_argument.as_ref().map(|field| *field)
18116 }
18117 pub fn set_type_argument(&mut self, field: u32) {
18119 self.type_argument = Some(field);
18120 }
18121 pub fn with_type_argument(mut self, field: u32) -> Self {
18123 self.set_type_argument(field);
18124 self
18125 }
18126 pub fn with_kind<T: Into<super::type_argument_error::TypeArgumentErrorKind>>(
18128 mut self,
18129 field: T,
18130 ) -> Self {
18131 self.set_kind(field.into());
18132 self
18133 }
18134 }
18135 impl super::TypeOrigin {
18136 pub const fn const_default() -> Self {
18137 Self {
18138 module_name: None,
18139 datatype_name: None,
18140 package_id: None,
18141 }
18142 }
18143 #[doc(hidden)]
18144 pub fn default_instance() -> &'static Self {
18145 static DEFAULT: super::TypeOrigin = super::TypeOrigin::const_default();
18146 &DEFAULT
18147 }
18148 pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
18150 self.module_name.as_mut().map(|field| field as _)
18151 }
18152 pub fn module_name_mut(&mut self) -> &mut String {
18155 self.module_name.get_or_insert_default()
18156 }
18157 pub fn module_name_opt(&self) -> Option<&str> {
18159 self.module_name.as_ref().map(|field| field as _)
18160 }
18161 pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
18163 self.module_name = Some(field.into().into());
18164 }
18165 pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
18167 self.set_module_name(field.into());
18168 self
18169 }
18170 pub fn datatype_name_opt_mut(&mut self) -> Option<&mut String> {
18172 self.datatype_name.as_mut().map(|field| field as _)
18173 }
18174 pub fn datatype_name_mut(&mut self) -> &mut String {
18177 self.datatype_name.get_or_insert_default()
18178 }
18179 pub fn datatype_name_opt(&self) -> Option<&str> {
18181 self.datatype_name.as_ref().map(|field| field as _)
18182 }
18183 pub fn set_datatype_name<T: Into<String>>(&mut self, field: T) {
18185 self.datatype_name = Some(field.into().into());
18186 }
18187 pub fn with_datatype_name<T: Into<String>>(mut self, field: T) -> Self {
18189 self.set_datatype_name(field.into());
18190 self
18191 }
18192 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
18194 self.package_id.as_mut().map(|field| field as _)
18195 }
18196 pub fn package_id_mut(&mut self) -> &mut String {
18199 self.package_id.get_or_insert_default()
18200 }
18201 pub fn package_id_opt(&self) -> Option<&str> {
18203 self.package_id.as_ref().map(|field| field as _)
18204 }
18205 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
18207 self.package_id = Some(field.into().into());
18208 }
18209 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
18211 self.set_package_id(field.into());
18212 self
18213 }
18214 }
18215 impl super::TypeParameter {
18216 pub const fn const_default() -> Self {
18217 Self {
18218 constraints: Vec::new(),
18219 is_phantom: None,
18220 }
18221 }
18222 #[doc(hidden)]
18223 pub fn default_instance() -> &'static Self {
18224 static DEFAULT: super::TypeParameter = super::TypeParameter::const_default();
18225 &DEFAULT
18226 }
18227 pub fn is_phantom_opt_mut(&mut self) -> Option<&mut bool> {
18229 self.is_phantom.as_mut().map(|field| field as _)
18230 }
18231 pub fn is_phantom_mut(&mut self) -> &mut bool {
18234 self.is_phantom.get_or_insert_default()
18235 }
18236 pub fn is_phantom_opt(&self) -> Option<bool> {
18238 self.is_phantom.as_ref().map(|field| *field)
18239 }
18240 pub fn set_is_phantom(&mut self, field: bool) {
18242 self.is_phantom = Some(field);
18243 }
18244 pub fn with_is_phantom(mut self, field: bool) -> Self {
18246 self.set_is_phantom(field);
18247 self
18248 }
18249 }
18250 impl super::UnchangedConsensusObject {
18251 pub const fn const_default() -> Self {
18252 Self {
18253 kind: None,
18254 object_id: None,
18255 version: None,
18256 digest: None,
18257 object_type: None,
18258 }
18259 }
18260 #[doc(hidden)]
18261 pub fn default_instance() -> &'static Self {
18262 static DEFAULT: super::UnchangedConsensusObject = super::UnchangedConsensusObject::const_default();
18263 &DEFAULT
18264 }
18265 pub fn with_kind<
18267 T: Into<super::unchanged_consensus_object::UnchangedConsensusObjectKind>,
18268 >(mut self, field: T) -> Self {
18269 self.set_kind(field.into());
18270 self
18271 }
18272 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
18274 self.object_id.as_mut().map(|field| field as _)
18275 }
18276 pub fn object_id_mut(&mut self) -> &mut String {
18279 self.object_id.get_or_insert_default()
18280 }
18281 pub fn object_id_opt(&self) -> Option<&str> {
18283 self.object_id.as_ref().map(|field| field as _)
18284 }
18285 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
18287 self.object_id = Some(field.into().into());
18288 }
18289 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
18291 self.set_object_id(field.into());
18292 self
18293 }
18294 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
18296 self.version.as_mut().map(|field| field as _)
18297 }
18298 pub fn version_mut(&mut self) -> &mut u64 {
18301 self.version.get_or_insert_default()
18302 }
18303 pub fn version_opt(&self) -> Option<u64> {
18305 self.version.as_ref().map(|field| *field)
18306 }
18307 pub fn set_version(&mut self, field: u64) {
18309 self.version = Some(field);
18310 }
18311 pub fn with_version(mut self, field: u64) -> Self {
18313 self.set_version(field);
18314 self
18315 }
18316 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
18318 self.digest.as_mut().map(|field| field as _)
18319 }
18320 pub fn digest_mut(&mut self) -> &mut String {
18323 self.digest.get_or_insert_default()
18324 }
18325 pub fn digest_opt(&self) -> Option<&str> {
18327 self.digest.as_ref().map(|field| field as _)
18328 }
18329 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
18331 self.digest = Some(field.into().into());
18332 }
18333 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
18335 self.set_digest(field.into());
18336 self
18337 }
18338 pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
18340 self.object_type.as_mut().map(|field| field as _)
18341 }
18342 pub fn object_type_mut(&mut self) -> &mut String {
18345 self.object_type.get_or_insert_default()
18346 }
18347 pub fn object_type_opt(&self) -> Option<&str> {
18349 self.object_type.as_ref().map(|field| field as _)
18350 }
18351 pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
18353 self.object_type = Some(field.into().into());
18354 }
18355 pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
18357 self.set_object_type(field.into());
18358 self
18359 }
18360 }
18361 impl super::Upgrade {
18362 pub const fn const_default() -> Self {
18363 Self {
18364 modules: Vec::new(),
18365 dependencies: Vec::new(),
18366 package: None,
18367 ticket: None,
18368 }
18369 }
18370 #[doc(hidden)]
18371 pub fn default_instance() -> &'static Self {
18372 static DEFAULT: super::Upgrade = super::Upgrade::const_default();
18373 &DEFAULT
18374 }
18375 pub fn modules(&self) -> &[::prost::bytes::Bytes] {
18377 &self.modules
18378 }
18379 pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
18382 &mut self.modules
18383 }
18384 pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
18386 self.modules = field;
18387 }
18388 pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
18390 self.set_modules(field);
18391 self
18392 }
18393 pub fn dependencies(&self) -> &[String] {
18395 &self.dependencies
18396 }
18397 pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
18400 &mut self.dependencies
18401 }
18402 pub fn set_dependencies(&mut self, field: Vec<String>) {
18404 self.dependencies = field;
18405 }
18406 pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
18408 self.set_dependencies(field);
18409 self
18410 }
18411 pub fn package_opt_mut(&mut self) -> Option<&mut String> {
18413 self.package.as_mut().map(|field| field as _)
18414 }
18415 pub fn package_mut(&mut self) -> &mut String {
18418 self.package.get_or_insert_default()
18419 }
18420 pub fn package_opt(&self) -> Option<&str> {
18422 self.package.as_ref().map(|field| field as _)
18423 }
18424 pub fn set_package<T: Into<String>>(&mut self, field: T) {
18426 self.package = Some(field.into().into());
18427 }
18428 pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
18430 self.set_package(field.into());
18431 self
18432 }
18433 pub fn ticket(&self) -> &super::Argument {
18435 self.ticket
18436 .as_ref()
18437 .map(|field| field as _)
18438 .unwrap_or_else(|| super::Argument::default_instance() as _)
18439 }
18440 pub fn ticket_opt_mut(&mut self) -> Option<&mut super::Argument> {
18442 self.ticket.as_mut().map(|field| field as _)
18443 }
18444 pub fn ticket_mut(&mut self) -> &mut super::Argument {
18447 self.ticket.get_or_insert_default()
18448 }
18449 pub fn ticket_opt(&self) -> Option<&super::Argument> {
18451 self.ticket.as_ref().map(|field| field as _)
18452 }
18453 pub fn set_ticket<T: Into<super::Argument>>(&mut self, field: T) {
18455 self.ticket = Some(field.into().into());
18456 }
18457 pub fn with_ticket<T: Into<super::Argument>>(mut self, field: T) -> Self {
18459 self.set_ticket(field.into());
18460 self
18461 }
18462 }
18463 impl super::UserSignature {
18464 pub const fn const_default() -> Self {
18465 Self {
18466 bcs: None,
18467 scheme: None,
18468 signature: None,
18469 }
18470 }
18471 #[doc(hidden)]
18472 pub fn default_instance() -> &'static Self {
18473 static DEFAULT: super::UserSignature = super::UserSignature::const_default();
18474 &DEFAULT
18475 }
18476 pub fn bcs(&self) -> &super::Bcs {
18478 self.bcs
18479 .as_ref()
18480 .map(|field| field as _)
18481 .unwrap_or_else(|| super::Bcs::default_instance() as _)
18482 }
18483 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
18485 self.bcs.as_mut().map(|field| field as _)
18486 }
18487 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
18490 self.bcs.get_or_insert_default()
18491 }
18492 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
18494 self.bcs.as_ref().map(|field| field as _)
18495 }
18496 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
18498 self.bcs = Some(field.into().into());
18499 }
18500 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
18502 self.set_bcs(field.into());
18503 self
18504 }
18505 pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
18507 self.set_scheme(field.into());
18508 self
18509 }
18510 pub fn simple(&self) -> &super::SimpleSignature {
18512 if let Some(super::user_signature::Signature::Simple(field)) = &self
18513 .signature
18514 {
18515 field as _
18516 } else {
18517 super::SimpleSignature::default_instance() as _
18518 }
18519 }
18520 pub fn simple_opt(&self) -> Option<&super::SimpleSignature> {
18522 if let Some(super::user_signature::Signature::Simple(field)) = &self
18523 .signature
18524 {
18525 Some(field as _)
18526 } else {
18527 None
18528 }
18529 }
18530 pub fn simple_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
18532 if let Some(super::user_signature::Signature::Simple(field)) = &mut self
18533 .signature
18534 {
18535 Some(field as _)
18536 } else {
18537 None
18538 }
18539 }
18540 pub fn simple_mut(&mut self) -> &mut super::SimpleSignature {
18544 if self.simple_opt_mut().is_none() {
18545 self.signature = Some(
18546 super::user_signature::Signature::Simple(
18547 super::SimpleSignature::default(),
18548 ),
18549 );
18550 }
18551 self.simple_opt_mut().unwrap()
18552 }
18553 pub fn set_simple<T: Into<super::SimpleSignature>>(&mut self, field: T) {
18556 self.signature = Some(
18557 super::user_signature::Signature::Simple(field.into().into()),
18558 );
18559 }
18560 pub fn with_simple<T: Into<super::SimpleSignature>>(mut self, field: T) -> Self {
18563 self.set_simple(field.into());
18564 self
18565 }
18566 pub fn multisig(&self) -> &super::MultisigAggregatedSignature {
18568 if let Some(super::user_signature::Signature::Multisig(field)) = &self
18569 .signature
18570 {
18571 field as _
18572 } else {
18573 super::MultisigAggregatedSignature::default_instance() as _
18574 }
18575 }
18576 pub fn multisig_opt(&self) -> Option<&super::MultisigAggregatedSignature> {
18578 if let Some(super::user_signature::Signature::Multisig(field)) = &self
18579 .signature
18580 {
18581 Some(field as _)
18582 } else {
18583 None
18584 }
18585 }
18586 pub fn multisig_opt_mut(
18588 &mut self,
18589 ) -> Option<&mut super::MultisigAggregatedSignature> {
18590 if let Some(super::user_signature::Signature::Multisig(field)) = &mut self
18591 .signature
18592 {
18593 Some(field as _)
18594 } else {
18595 None
18596 }
18597 }
18598 pub fn multisig_mut(&mut self) -> &mut super::MultisigAggregatedSignature {
18602 if self.multisig_opt_mut().is_none() {
18603 self.signature = Some(
18604 super::user_signature::Signature::Multisig(
18605 super::MultisigAggregatedSignature::default(),
18606 ),
18607 );
18608 }
18609 self.multisig_opt_mut().unwrap()
18610 }
18611 pub fn set_multisig<T: Into<super::MultisigAggregatedSignature>>(
18614 &mut self,
18615 field: T,
18616 ) {
18617 self.signature = Some(
18618 super::user_signature::Signature::Multisig(field.into().into()),
18619 );
18620 }
18621 pub fn with_multisig<T: Into<super::MultisigAggregatedSignature>>(
18624 mut self,
18625 field: T,
18626 ) -> Self {
18627 self.set_multisig(field.into());
18628 self
18629 }
18630 pub fn zklogin(&self) -> &super::ZkLoginAuthenticator {
18632 if let Some(super::user_signature::Signature::Zklogin(field)) = &self
18633 .signature
18634 {
18635 field as _
18636 } else {
18637 super::ZkLoginAuthenticator::default_instance() as _
18638 }
18639 }
18640 pub fn zklogin_opt(&self) -> Option<&super::ZkLoginAuthenticator> {
18642 if let Some(super::user_signature::Signature::Zklogin(field)) = &self
18643 .signature
18644 {
18645 Some(field as _)
18646 } else {
18647 None
18648 }
18649 }
18650 pub fn zklogin_opt_mut(&mut self) -> Option<&mut super::ZkLoginAuthenticator> {
18652 if let Some(super::user_signature::Signature::Zklogin(field)) = &mut self
18653 .signature
18654 {
18655 Some(field as _)
18656 } else {
18657 None
18658 }
18659 }
18660 pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginAuthenticator {
18664 if self.zklogin_opt_mut().is_none() {
18665 self.signature = Some(
18666 super::user_signature::Signature::Zklogin(
18667 super::ZkLoginAuthenticator::default(),
18668 ),
18669 );
18670 }
18671 self.zklogin_opt_mut().unwrap()
18672 }
18673 pub fn set_zklogin<T: Into<super::ZkLoginAuthenticator>>(&mut self, field: T) {
18676 self.signature = Some(
18677 super::user_signature::Signature::Zklogin(field.into().into()),
18678 );
18679 }
18680 pub fn with_zklogin<T: Into<super::ZkLoginAuthenticator>>(
18683 mut self,
18684 field: T,
18685 ) -> Self {
18686 self.set_zklogin(field.into());
18687 self
18688 }
18689 pub fn passkey(&self) -> &super::PasskeyAuthenticator {
18691 if let Some(super::user_signature::Signature::Passkey(field)) = &self
18692 .signature
18693 {
18694 field as _
18695 } else {
18696 super::PasskeyAuthenticator::default_instance() as _
18697 }
18698 }
18699 pub fn passkey_opt(&self) -> Option<&super::PasskeyAuthenticator> {
18701 if let Some(super::user_signature::Signature::Passkey(field)) = &self
18702 .signature
18703 {
18704 Some(field as _)
18705 } else {
18706 None
18707 }
18708 }
18709 pub fn passkey_opt_mut(&mut self) -> Option<&mut super::PasskeyAuthenticator> {
18711 if let Some(super::user_signature::Signature::Passkey(field)) = &mut self
18712 .signature
18713 {
18714 Some(field as _)
18715 } else {
18716 None
18717 }
18718 }
18719 pub fn passkey_mut(&mut self) -> &mut super::PasskeyAuthenticator {
18723 if self.passkey_opt_mut().is_none() {
18724 self.signature = Some(
18725 super::user_signature::Signature::Passkey(
18726 super::PasskeyAuthenticator::default(),
18727 ),
18728 );
18729 }
18730 self.passkey_opt_mut().unwrap()
18731 }
18732 pub fn set_passkey<T: Into<super::PasskeyAuthenticator>>(&mut self, field: T) {
18735 self.signature = Some(
18736 super::user_signature::Signature::Passkey(field.into().into()),
18737 );
18738 }
18739 pub fn with_passkey<T: Into<super::PasskeyAuthenticator>>(
18742 mut self,
18743 field: T,
18744 ) -> Self {
18745 self.set_passkey(field.into());
18746 self
18747 }
18748 }
18749 impl super::Validator {
18750 pub const fn const_default() -> Self {
18751 Self {
18752 name: None,
18753 address: None,
18754 description: None,
18755 image_url: None,
18756 project_url: None,
18757 protocol_public_key: None,
18758 proof_of_possession: None,
18759 network_public_key: None,
18760 worker_public_key: None,
18761 network_address: None,
18762 p2p_address: None,
18763 primary_address: None,
18764 worker_address: None,
18765 next_epoch_protocol_public_key: None,
18766 next_epoch_proof_of_possession: None,
18767 next_epoch_network_public_key: None,
18768 next_epoch_worker_public_key: None,
18769 next_epoch_network_address: None,
18770 next_epoch_p2p_address: None,
18771 next_epoch_primary_address: None,
18772 next_epoch_worker_address: None,
18773 metadata_extra_fields: None,
18774 voting_power: None,
18775 operation_cap_id: None,
18776 gas_price: None,
18777 staking_pool: None,
18778 commission_rate: None,
18779 next_epoch_stake: None,
18780 next_epoch_gas_price: None,
18781 next_epoch_commission_rate: None,
18782 extra_fields: None,
18783 }
18784 }
18785 #[doc(hidden)]
18786 pub fn default_instance() -> &'static Self {
18787 static DEFAULT: super::Validator = super::Validator::const_default();
18788 &DEFAULT
18789 }
18790 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
18792 self.name.as_mut().map(|field| field as _)
18793 }
18794 pub fn name_mut(&mut self) -> &mut String {
18797 self.name.get_or_insert_default()
18798 }
18799 pub fn name_opt(&self) -> Option<&str> {
18801 self.name.as_ref().map(|field| field as _)
18802 }
18803 pub fn set_name<T: Into<String>>(&mut self, field: T) {
18805 self.name = Some(field.into().into());
18806 }
18807 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
18809 self.set_name(field.into());
18810 self
18811 }
18812 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
18814 self.address.as_mut().map(|field| field as _)
18815 }
18816 pub fn address_mut(&mut self) -> &mut String {
18819 self.address.get_or_insert_default()
18820 }
18821 pub fn address_opt(&self) -> Option<&str> {
18823 self.address.as_ref().map(|field| field as _)
18824 }
18825 pub fn set_address<T: Into<String>>(&mut self, field: T) {
18827 self.address = Some(field.into().into());
18828 }
18829 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
18831 self.set_address(field.into());
18832 self
18833 }
18834 pub fn description_opt_mut(&mut self) -> Option<&mut String> {
18836 self.description.as_mut().map(|field| field as _)
18837 }
18838 pub fn description_mut(&mut self) -> &mut String {
18841 self.description.get_or_insert_default()
18842 }
18843 pub fn description_opt(&self) -> Option<&str> {
18845 self.description.as_ref().map(|field| field as _)
18846 }
18847 pub fn set_description<T: Into<String>>(&mut self, field: T) {
18849 self.description = Some(field.into().into());
18850 }
18851 pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
18853 self.set_description(field.into());
18854 self
18855 }
18856 pub fn image_url_opt_mut(&mut self) -> Option<&mut String> {
18858 self.image_url.as_mut().map(|field| field as _)
18859 }
18860 pub fn image_url_mut(&mut self) -> &mut String {
18863 self.image_url.get_or_insert_default()
18864 }
18865 pub fn image_url_opt(&self) -> Option<&str> {
18867 self.image_url.as_ref().map(|field| field as _)
18868 }
18869 pub fn set_image_url<T: Into<String>>(&mut self, field: T) {
18871 self.image_url = Some(field.into().into());
18872 }
18873 pub fn with_image_url<T: Into<String>>(mut self, field: T) -> Self {
18875 self.set_image_url(field.into());
18876 self
18877 }
18878 pub fn project_url_opt_mut(&mut self) -> Option<&mut String> {
18880 self.project_url.as_mut().map(|field| field as _)
18881 }
18882 pub fn project_url_mut(&mut self) -> &mut String {
18885 self.project_url.get_or_insert_default()
18886 }
18887 pub fn project_url_opt(&self) -> Option<&str> {
18889 self.project_url.as_ref().map(|field| field as _)
18890 }
18891 pub fn set_project_url<T: Into<String>>(&mut self, field: T) {
18893 self.project_url = Some(field.into().into());
18894 }
18895 pub fn with_project_url<T: Into<String>>(mut self, field: T) -> Self {
18897 self.set_project_url(field.into());
18898 self
18899 }
18900 pub fn protocol_public_key_opt(&self) -> Option<&[u8]> {
18902 self.protocol_public_key.as_ref().map(|field| field as _)
18903 }
18904 pub fn set_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
18906 &mut self,
18907 field: T,
18908 ) {
18909 self.protocol_public_key = Some(field.into().into());
18910 }
18911 pub fn with_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
18913 mut self,
18914 field: T,
18915 ) -> Self {
18916 self.set_protocol_public_key(field.into());
18917 self
18918 }
18919 pub fn proof_of_possession_opt(&self) -> Option<&[u8]> {
18921 self.proof_of_possession.as_ref().map(|field| field as _)
18922 }
18923 pub fn set_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
18925 &mut self,
18926 field: T,
18927 ) {
18928 self.proof_of_possession = Some(field.into().into());
18929 }
18930 pub fn with_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
18932 mut self,
18933 field: T,
18934 ) -> Self {
18935 self.set_proof_of_possession(field.into());
18936 self
18937 }
18938 pub fn network_public_key_opt(&self) -> Option<&[u8]> {
18940 self.network_public_key.as_ref().map(|field| field as _)
18941 }
18942 pub fn set_network_public_key<T: Into<::prost::bytes::Bytes>>(
18944 &mut self,
18945 field: T,
18946 ) {
18947 self.network_public_key = Some(field.into().into());
18948 }
18949 pub fn with_network_public_key<T: Into<::prost::bytes::Bytes>>(
18951 mut self,
18952 field: T,
18953 ) -> Self {
18954 self.set_network_public_key(field.into());
18955 self
18956 }
18957 pub fn worker_public_key_opt(&self) -> Option<&[u8]> {
18959 self.worker_public_key.as_ref().map(|field| field as _)
18960 }
18961 pub fn set_worker_public_key<T: Into<::prost::bytes::Bytes>>(
18963 &mut self,
18964 field: T,
18965 ) {
18966 self.worker_public_key = Some(field.into().into());
18967 }
18968 pub fn with_worker_public_key<T: Into<::prost::bytes::Bytes>>(
18970 mut self,
18971 field: T,
18972 ) -> Self {
18973 self.set_worker_public_key(field.into());
18974 self
18975 }
18976 pub fn network_address_opt_mut(&mut self) -> Option<&mut String> {
18978 self.network_address.as_mut().map(|field| field as _)
18979 }
18980 pub fn network_address_mut(&mut self) -> &mut String {
18983 self.network_address.get_or_insert_default()
18984 }
18985 pub fn network_address_opt(&self) -> Option<&str> {
18987 self.network_address.as_ref().map(|field| field as _)
18988 }
18989 pub fn set_network_address<T: Into<String>>(&mut self, field: T) {
18991 self.network_address = Some(field.into().into());
18992 }
18993 pub fn with_network_address<T: Into<String>>(mut self, field: T) -> Self {
18995 self.set_network_address(field.into());
18996 self
18997 }
18998 pub fn p2p_address_opt_mut(&mut self) -> Option<&mut String> {
19000 self.p2p_address.as_mut().map(|field| field as _)
19001 }
19002 pub fn p2p_address_mut(&mut self) -> &mut String {
19005 self.p2p_address.get_or_insert_default()
19006 }
19007 pub fn p2p_address_opt(&self) -> Option<&str> {
19009 self.p2p_address.as_ref().map(|field| field as _)
19010 }
19011 pub fn set_p2p_address<T: Into<String>>(&mut self, field: T) {
19013 self.p2p_address = Some(field.into().into());
19014 }
19015 pub fn with_p2p_address<T: Into<String>>(mut self, field: T) -> Self {
19017 self.set_p2p_address(field.into());
19018 self
19019 }
19020 pub fn primary_address_opt_mut(&mut self) -> Option<&mut String> {
19022 self.primary_address.as_mut().map(|field| field as _)
19023 }
19024 pub fn primary_address_mut(&mut self) -> &mut String {
19027 self.primary_address.get_or_insert_default()
19028 }
19029 pub fn primary_address_opt(&self) -> Option<&str> {
19031 self.primary_address.as_ref().map(|field| field as _)
19032 }
19033 pub fn set_primary_address<T: Into<String>>(&mut self, field: T) {
19035 self.primary_address = Some(field.into().into());
19036 }
19037 pub fn with_primary_address<T: Into<String>>(mut self, field: T) -> Self {
19039 self.set_primary_address(field.into());
19040 self
19041 }
19042 pub fn worker_address_opt_mut(&mut self) -> Option<&mut String> {
19044 self.worker_address.as_mut().map(|field| field as _)
19045 }
19046 pub fn worker_address_mut(&mut self) -> &mut String {
19049 self.worker_address.get_or_insert_default()
19050 }
19051 pub fn worker_address_opt(&self) -> Option<&str> {
19053 self.worker_address.as_ref().map(|field| field as _)
19054 }
19055 pub fn set_worker_address<T: Into<String>>(&mut self, field: T) {
19057 self.worker_address = Some(field.into().into());
19058 }
19059 pub fn with_worker_address<T: Into<String>>(mut self, field: T) -> Self {
19061 self.set_worker_address(field.into());
19062 self
19063 }
19064 pub fn next_epoch_protocol_public_key_opt(&self) -> Option<&[u8]> {
19066 self.next_epoch_protocol_public_key.as_ref().map(|field| field as _)
19067 }
19068 pub fn set_next_epoch_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
19070 &mut self,
19071 field: T,
19072 ) {
19073 self.next_epoch_protocol_public_key = Some(field.into().into());
19074 }
19075 pub fn with_next_epoch_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
19077 mut self,
19078 field: T,
19079 ) -> Self {
19080 self.set_next_epoch_protocol_public_key(field.into());
19081 self
19082 }
19083 pub fn next_epoch_proof_of_possession_opt(&self) -> Option<&[u8]> {
19085 self.next_epoch_proof_of_possession.as_ref().map(|field| field as _)
19086 }
19087 pub fn set_next_epoch_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
19089 &mut self,
19090 field: T,
19091 ) {
19092 self.next_epoch_proof_of_possession = Some(field.into().into());
19093 }
19094 pub fn with_next_epoch_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
19096 mut self,
19097 field: T,
19098 ) -> Self {
19099 self.set_next_epoch_proof_of_possession(field.into());
19100 self
19101 }
19102 pub fn next_epoch_network_public_key_opt(&self) -> Option<&[u8]> {
19104 self.next_epoch_network_public_key.as_ref().map(|field| field as _)
19105 }
19106 pub fn set_next_epoch_network_public_key<T: Into<::prost::bytes::Bytes>>(
19108 &mut self,
19109 field: T,
19110 ) {
19111 self.next_epoch_network_public_key = Some(field.into().into());
19112 }
19113 pub fn with_next_epoch_network_public_key<T: Into<::prost::bytes::Bytes>>(
19115 mut self,
19116 field: T,
19117 ) -> Self {
19118 self.set_next_epoch_network_public_key(field.into());
19119 self
19120 }
19121 pub fn next_epoch_worker_public_key_opt(&self) -> Option<&[u8]> {
19123 self.next_epoch_worker_public_key.as_ref().map(|field| field as _)
19124 }
19125 pub fn set_next_epoch_worker_public_key<T: Into<::prost::bytes::Bytes>>(
19127 &mut self,
19128 field: T,
19129 ) {
19130 self.next_epoch_worker_public_key = Some(field.into().into());
19131 }
19132 pub fn with_next_epoch_worker_public_key<T: Into<::prost::bytes::Bytes>>(
19134 mut self,
19135 field: T,
19136 ) -> Self {
19137 self.set_next_epoch_worker_public_key(field.into());
19138 self
19139 }
19140 pub fn next_epoch_network_address_opt_mut(&mut self) -> Option<&mut String> {
19142 self.next_epoch_network_address.as_mut().map(|field| field as _)
19143 }
19144 pub fn next_epoch_network_address_mut(&mut self) -> &mut String {
19147 self.next_epoch_network_address.get_or_insert_default()
19148 }
19149 pub fn next_epoch_network_address_opt(&self) -> Option<&str> {
19151 self.next_epoch_network_address.as_ref().map(|field| field as _)
19152 }
19153 pub fn set_next_epoch_network_address<T: Into<String>>(&mut self, field: T) {
19155 self.next_epoch_network_address = Some(field.into().into());
19156 }
19157 pub fn with_next_epoch_network_address<T: Into<String>>(
19159 mut self,
19160 field: T,
19161 ) -> Self {
19162 self.set_next_epoch_network_address(field.into());
19163 self
19164 }
19165 pub fn next_epoch_p2p_address_opt_mut(&mut self) -> Option<&mut String> {
19167 self.next_epoch_p2p_address.as_mut().map(|field| field as _)
19168 }
19169 pub fn next_epoch_p2p_address_mut(&mut self) -> &mut String {
19172 self.next_epoch_p2p_address.get_or_insert_default()
19173 }
19174 pub fn next_epoch_p2p_address_opt(&self) -> Option<&str> {
19176 self.next_epoch_p2p_address.as_ref().map(|field| field as _)
19177 }
19178 pub fn set_next_epoch_p2p_address<T: Into<String>>(&mut self, field: T) {
19180 self.next_epoch_p2p_address = Some(field.into().into());
19181 }
19182 pub fn with_next_epoch_p2p_address<T: Into<String>>(mut self, field: T) -> Self {
19184 self.set_next_epoch_p2p_address(field.into());
19185 self
19186 }
19187 pub fn next_epoch_primary_address_opt_mut(&mut self) -> Option<&mut String> {
19189 self.next_epoch_primary_address.as_mut().map(|field| field as _)
19190 }
19191 pub fn next_epoch_primary_address_mut(&mut self) -> &mut String {
19194 self.next_epoch_primary_address.get_or_insert_default()
19195 }
19196 pub fn next_epoch_primary_address_opt(&self) -> Option<&str> {
19198 self.next_epoch_primary_address.as_ref().map(|field| field as _)
19199 }
19200 pub fn set_next_epoch_primary_address<T: Into<String>>(&mut self, field: T) {
19202 self.next_epoch_primary_address = Some(field.into().into());
19203 }
19204 pub fn with_next_epoch_primary_address<T: Into<String>>(
19206 mut self,
19207 field: T,
19208 ) -> Self {
19209 self.set_next_epoch_primary_address(field.into());
19210 self
19211 }
19212 pub fn next_epoch_worker_address_opt_mut(&mut self) -> Option<&mut String> {
19214 self.next_epoch_worker_address.as_mut().map(|field| field as _)
19215 }
19216 pub fn next_epoch_worker_address_mut(&mut self) -> &mut String {
19219 self.next_epoch_worker_address.get_or_insert_default()
19220 }
19221 pub fn next_epoch_worker_address_opt(&self) -> Option<&str> {
19223 self.next_epoch_worker_address.as_ref().map(|field| field as _)
19224 }
19225 pub fn set_next_epoch_worker_address<T: Into<String>>(&mut self, field: T) {
19227 self.next_epoch_worker_address = Some(field.into().into());
19228 }
19229 pub fn with_next_epoch_worker_address<T: Into<String>>(
19231 mut self,
19232 field: T,
19233 ) -> Self {
19234 self.set_next_epoch_worker_address(field.into());
19235 self
19236 }
19237 pub fn metadata_extra_fields(&self) -> &super::MoveTable {
19239 self.metadata_extra_fields
19240 .as_ref()
19241 .map(|field| field as _)
19242 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
19243 }
19244 pub fn metadata_extra_fields_opt_mut(
19246 &mut self,
19247 ) -> Option<&mut super::MoveTable> {
19248 self.metadata_extra_fields.as_mut().map(|field| field as _)
19249 }
19250 pub fn metadata_extra_fields_mut(&mut self) -> &mut super::MoveTable {
19253 self.metadata_extra_fields.get_or_insert_default()
19254 }
19255 pub fn metadata_extra_fields_opt(&self) -> Option<&super::MoveTable> {
19257 self.metadata_extra_fields.as_ref().map(|field| field as _)
19258 }
19259 pub fn set_metadata_extra_fields<T: Into<super::MoveTable>>(
19261 &mut self,
19262 field: T,
19263 ) {
19264 self.metadata_extra_fields = Some(field.into().into());
19265 }
19266 pub fn with_metadata_extra_fields<T: Into<super::MoveTable>>(
19268 mut self,
19269 field: T,
19270 ) -> Self {
19271 self.set_metadata_extra_fields(field.into());
19272 self
19273 }
19274 pub fn voting_power_opt_mut(&mut self) -> Option<&mut u64> {
19276 self.voting_power.as_mut().map(|field| field as _)
19277 }
19278 pub fn voting_power_mut(&mut self) -> &mut u64 {
19281 self.voting_power.get_or_insert_default()
19282 }
19283 pub fn voting_power_opt(&self) -> Option<u64> {
19285 self.voting_power.as_ref().map(|field| *field)
19286 }
19287 pub fn set_voting_power(&mut self, field: u64) {
19289 self.voting_power = Some(field);
19290 }
19291 pub fn with_voting_power(mut self, field: u64) -> Self {
19293 self.set_voting_power(field);
19294 self
19295 }
19296 pub fn operation_cap_id_opt_mut(&mut self) -> Option<&mut String> {
19298 self.operation_cap_id.as_mut().map(|field| field as _)
19299 }
19300 pub fn operation_cap_id_mut(&mut self) -> &mut String {
19303 self.operation_cap_id.get_or_insert_default()
19304 }
19305 pub fn operation_cap_id_opt(&self) -> Option<&str> {
19307 self.operation_cap_id.as_ref().map(|field| field as _)
19308 }
19309 pub fn set_operation_cap_id<T: Into<String>>(&mut self, field: T) {
19311 self.operation_cap_id = Some(field.into().into());
19312 }
19313 pub fn with_operation_cap_id<T: Into<String>>(mut self, field: T) -> Self {
19315 self.set_operation_cap_id(field.into());
19316 self
19317 }
19318 pub fn gas_price_opt_mut(&mut self) -> Option<&mut u64> {
19320 self.gas_price.as_mut().map(|field| field as _)
19321 }
19322 pub fn gas_price_mut(&mut self) -> &mut u64 {
19325 self.gas_price.get_or_insert_default()
19326 }
19327 pub fn gas_price_opt(&self) -> Option<u64> {
19329 self.gas_price.as_ref().map(|field| *field)
19330 }
19331 pub fn set_gas_price(&mut self, field: u64) {
19333 self.gas_price = Some(field);
19334 }
19335 pub fn with_gas_price(mut self, field: u64) -> Self {
19337 self.set_gas_price(field);
19338 self
19339 }
19340 pub fn staking_pool(&self) -> &super::StakingPool {
19342 self.staking_pool
19343 .as_ref()
19344 .map(|field| field as _)
19345 .unwrap_or_else(|| super::StakingPool::default_instance() as _)
19346 }
19347 pub fn staking_pool_opt_mut(&mut self) -> Option<&mut super::StakingPool> {
19349 self.staking_pool.as_mut().map(|field| field as _)
19350 }
19351 pub fn staking_pool_mut(&mut self) -> &mut super::StakingPool {
19354 self.staking_pool.get_or_insert_default()
19355 }
19356 pub fn staking_pool_opt(&self) -> Option<&super::StakingPool> {
19358 self.staking_pool.as_ref().map(|field| field as _)
19359 }
19360 pub fn set_staking_pool<T: Into<super::StakingPool>>(&mut self, field: T) {
19362 self.staking_pool = Some(field.into().into());
19363 }
19364 pub fn with_staking_pool<T: Into<super::StakingPool>>(
19366 mut self,
19367 field: T,
19368 ) -> Self {
19369 self.set_staking_pool(field.into());
19370 self
19371 }
19372 pub fn commission_rate_opt_mut(&mut self) -> Option<&mut u64> {
19374 self.commission_rate.as_mut().map(|field| field as _)
19375 }
19376 pub fn commission_rate_mut(&mut self) -> &mut u64 {
19379 self.commission_rate.get_or_insert_default()
19380 }
19381 pub fn commission_rate_opt(&self) -> Option<u64> {
19383 self.commission_rate.as_ref().map(|field| *field)
19384 }
19385 pub fn set_commission_rate(&mut self, field: u64) {
19387 self.commission_rate = Some(field);
19388 }
19389 pub fn with_commission_rate(mut self, field: u64) -> Self {
19391 self.set_commission_rate(field);
19392 self
19393 }
19394 pub fn next_epoch_stake_opt_mut(&mut self) -> Option<&mut u64> {
19396 self.next_epoch_stake.as_mut().map(|field| field as _)
19397 }
19398 pub fn next_epoch_stake_mut(&mut self) -> &mut u64 {
19401 self.next_epoch_stake.get_or_insert_default()
19402 }
19403 pub fn next_epoch_stake_opt(&self) -> Option<u64> {
19405 self.next_epoch_stake.as_ref().map(|field| *field)
19406 }
19407 pub fn set_next_epoch_stake(&mut self, field: u64) {
19409 self.next_epoch_stake = Some(field);
19410 }
19411 pub fn with_next_epoch_stake(mut self, field: u64) -> Self {
19413 self.set_next_epoch_stake(field);
19414 self
19415 }
19416 pub fn next_epoch_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
19418 self.next_epoch_gas_price.as_mut().map(|field| field as _)
19419 }
19420 pub fn next_epoch_gas_price_mut(&mut self) -> &mut u64 {
19423 self.next_epoch_gas_price.get_or_insert_default()
19424 }
19425 pub fn next_epoch_gas_price_opt(&self) -> Option<u64> {
19427 self.next_epoch_gas_price.as_ref().map(|field| *field)
19428 }
19429 pub fn set_next_epoch_gas_price(&mut self, field: u64) {
19431 self.next_epoch_gas_price = Some(field);
19432 }
19433 pub fn with_next_epoch_gas_price(mut self, field: u64) -> Self {
19435 self.set_next_epoch_gas_price(field);
19436 self
19437 }
19438 pub fn next_epoch_commission_rate_opt_mut(&mut self) -> Option<&mut u64> {
19440 self.next_epoch_commission_rate.as_mut().map(|field| field as _)
19441 }
19442 pub fn next_epoch_commission_rate_mut(&mut self) -> &mut u64 {
19445 self.next_epoch_commission_rate.get_or_insert_default()
19446 }
19447 pub fn next_epoch_commission_rate_opt(&self) -> Option<u64> {
19449 self.next_epoch_commission_rate.as_ref().map(|field| *field)
19450 }
19451 pub fn set_next_epoch_commission_rate(&mut self, field: u64) {
19453 self.next_epoch_commission_rate = Some(field);
19454 }
19455 pub fn with_next_epoch_commission_rate(mut self, field: u64) -> Self {
19457 self.set_next_epoch_commission_rate(field);
19458 self
19459 }
19460 pub fn extra_fields(&self) -> &super::MoveTable {
19462 self.extra_fields
19463 .as_ref()
19464 .map(|field| field as _)
19465 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
19466 }
19467 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
19469 self.extra_fields.as_mut().map(|field| field as _)
19470 }
19471 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
19474 self.extra_fields.get_or_insert_default()
19475 }
19476 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
19478 self.extra_fields.as_ref().map(|field| field as _)
19479 }
19480 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
19482 self.extra_fields = Some(field.into().into());
19483 }
19484 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
19486 self.set_extra_fields(field.into());
19487 self
19488 }
19489 }
19490 impl super::ValidatorAggregatedSignature {
19491 pub const fn const_default() -> Self {
19492 Self {
19493 epoch: None,
19494 signature: None,
19495 bitmap: None,
19496 }
19497 }
19498 #[doc(hidden)]
19499 pub fn default_instance() -> &'static Self {
19500 static DEFAULT: super::ValidatorAggregatedSignature = super::ValidatorAggregatedSignature::const_default();
19501 &DEFAULT
19502 }
19503 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
19505 self.epoch.as_mut().map(|field| field as _)
19506 }
19507 pub fn epoch_mut(&mut self) -> &mut u64 {
19510 self.epoch.get_or_insert_default()
19511 }
19512 pub fn epoch_opt(&self) -> Option<u64> {
19514 self.epoch.as_ref().map(|field| *field)
19515 }
19516 pub fn set_epoch(&mut self, field: u64) {
19518 self.epoch = Some(field);
19519 }
19520 pub fn with_epoch(mut self, field: u64) -> Self {
19522 self.set_epoch(field);
19523 self
19524 }
19525 pub fn signature_opt(&self) -> Option<&[u8]> {
19527 self.signature.as_ref().map(|field| field as _)
19528 }
19529 pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
19531 self.signature = Some(field.into().into());
19532 }
19533 pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
19535 mut self,
19536 field: T,
19537 ) -> Self {
19538 self.set_signature(field.into());
19539 self
19540 }
19541 pub fn bitmap_opt(&self) -> Option<&[u8]> {
19543 self.bitmap.as_ref().map(|field| field as _)
19544 }
19545 pub fn set_bitmap<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
19547 self.bitmap = Some(field.into().into());
19548 }
19549 pub fn with_bitmap<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
19551 self.set_bitmap(field.into());
19552 self
19553 }
19554 }
19555 impl super::ValidatorCommittee {
19556 pub const fn const_default() -> Self {
19557 Self {
19558 epoch: None,
19559 members: Vec::new(),
19560 }
19561 }
19562 #[doc(hidden)]
19563 pub fn default_instance() -> &'static Self {
19564 static DEFAULT: super::ValidatorCommittee = super::ValidatorCommittee::const_default();
19565 &DEFAULT
19566 }
19567 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
19569 self.epoch.as_mut().map(|field| field as _)
19570 }
19571 pub fn epoch_mut(&mut self) -> &mut u64 {
19574 self.epoch.get_or_insert_default()
19575 }
19576 pub fn epoch_opt(&self) -> Option<u64> {
19578 self.epoch.as_ref().map(|field| *field)
19579 }
19580 pub fn set_epoch(&mut self, field: u64) {
19582 self.epoch = Some(field);
19583 }
19584 pub fn with_epoch(mut self, field: u64) -> Self {
19586 self.set_epoch(field);
19587 self
19588 }
19589 pub fn members(&self) -> &[super::ValidatorCommitteeMember] {
19591 &self.members
19592 }
19593 pub fn members_mut(&mut self) -> &mut Vec<super::ValidatorCommitteeMember> {
19596 &mut self.members
19597 }
19598 pub fn set_members(&mut self, field: Vec<super::ValidatorCommitteeMember>) {
19600 self.members = field;
19601 }
19602 pub fn with_members(
19604 mut self,
19605 field: Vec<super::ValidatorCommitteeMember>,
19606 ) -> Self {
19607 self.set_members(field);
19608 self
19609 }
19610 }
19611 impl super::ValidatorCommitteeMember {
19612 pub const fn const_default() -> Self {
19613 Self {
19614 public_key: None,
19615 weight: None,
19616 }
19617 }
19618 #[doc(hidden)]
19619 pub fn default_instance() -> &'static Self {
19620 static DEFAULT: super::ValidatorCommitteeMember = super::ValidatorCommitteeMember::const_default();
19621 &DEFAULT
19622 }
19623 pub fn public_key_opt(&self) -> Option<&[u8]> {
19625 self.public_key.as_ref().map(|field| field as _)
19626 }
19627 pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
19629 self.public_key = Some(field.into().into());
19630 }
19631 pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
19633 mut self,
19634 field: T,
19635 ) -> Self {
19636 self.set_public_key(field.into());
19637 self
19638 }
19639 pub fn weight_opt_mut(&mut self) -> Option<&mut u64> {
19641 self.weight.as_mut().map(|field| field as _)
19642 }
19643 pub fn weight_mut(&mut self) -> &mut u64 {
19646 self.weight.get_or_insert_default()
19647 }
19648 pub fn weight_opt(&self) -> Option<u64> {
19650 self.weight.as_ref().map(|field| *field)
19651 }
19652 pub fn set_weight(&mut self, field: u64) {
19654 self.weight = Some(field);
19655 }
19656 pub fn with_weight(mut self, field: u64) -> Self {
19658 self.set_weight(field);
19659 self
19660 }
19661 }
19662 impl super::ValidatorExecutionTimeObservation {
19663 pub const fn const_default() -> Self {
19664 Self {
19665 validator: None,
19666 duration: None,
19667 }
19668 }
19669 #[doc(hidden)]
19670 pub fn default_instance() -> &'static Self {
19671 static DEFAULT: super::ValidatorExecutionTimeObservation = super::ValidatorExecutionTimeObservation::const_default();
19672 &DEFAULT
19673 }
19674 pub fn validator_opt(&self) -> Option<&[u8]> {
19676 self.validator.as_ref().map(|field| field as _)
19677 }
19678 pub fn set_validator<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
19680 self.validator = Some(field.into().into());
19681 }
19682 pub fn with_validator<T: Into<::prost::bytes::Bytes>>(
19684 mut self,
19685 field: T,
19686 ) -> Self {
19687 self.set_validator(field.into());
19688 self
19689 }
19690 pub fn duration_opt_mut(&mut self) -> Option<&mut ::prost_types::Duration> {
19692 self.duration.as_mut().map(|field| field as _)
19693 }
19694 pub fn duration_mut(&mut self) -> &mut ::prost_types::Duration {
19697 self.duration.get_or_insert_default()
19698 }
19699 pub fn duration_opt(&self) -> Option<&::prost_types::Duration> {
19701 self.duration.as_ref().map(|field| field as _)
19702 }
19703 pub fn set_duration<T: Into<::prost_types::Duration>>(&mut self, field: T) {
19705 self.duration = Some(field.into().into());
19706 }
19707 pub fn with_duration<T: Into<::prost_types::Duration>>(
19709 mut self,
19710 field: T,
19711 ) -> Self {
19712 self.set_duration(field.into());
19713 self
19714 }
19715 }
19716 impl super::ValidatorReportRecord {
19717 pub const fn const_default() -> Self {
19718 Self {
19719 reported: None,
19720 reporters: Vec::new(),
19721 }
19722 }
19723 #[doc(hidden)]
19724 pub fn default_instance() -> &'static Self {
19725 static DEFAULT: super::ValidatorReportRecord = super::ValidatorReportRecord::const_default();
19726 &DEFAULT
19727 }
19728 pub fn reported_opt_mut(&mut self) -> Option<&mut String> {
19730 self.reported.as_mut().map(|field| field as _)
19731 }
19732 pub fn reported_mut(&mut self) -> &mut String {
19735 self.reported.get_or_insert_default()
19736 }
19737 pub fn reported_opt(&self) -> Option<&str> {
19739 self.reported.as_ref().map(|field| field as _)
19740 }
19741 pub fn set_reported<T: Into<String>>(&mut self, field: T) {
19743 self.reported = Some(field.into().into());
19744 }
19745 pub fn with_reported<T: Into<String>>(mut self, field: T) -> Self {
19747 self.set_reported(field.into());
19748 self
19749 }
19750 pub fn reporters(&self) -> &[String] {
19752 &self.reporters
19753 }
19754 pub fn reporters_mut(&mut self) -> &mut Vec<String> {
19757 &mut self.reporters
19758 }
19759 pub fn set_reporters(&mut self, field: Vec<String>) {
19761 self.reporters = field;
19762 }
19763 pub fn with_reporters(mut self, field: Vec<String>) -> Self {
19765 self.set_reporters(field);
19766 self
19767 }
19768 }
19769 impl super::ValidatorSet {
19770 pub const fn const_default() -> Self {
19771 Self {
19772 total_stake: None,
19773 active_validators: Vec::new(),
19774 pending_active_validators: None,
19775 pending_removals: Vec::new(),
19776 staking_pool_mappings: None,
19777 inactive_validators: None,
19778 validator_candidates: None,
19779 at_risk_validators: std::collections::BTreeMap::new(),
19780 extra_fields: None,
19781 }
19782 }
19783 #[doc(hidden)]
19784 pub fn default_instance() -> &'static Self {
19785 static DEFAULT: super::ValidatorSet = super::ValidatorSet::const_default();
19786 &DEFAULT
19787 }
19788 pub fn total_stake_opt_mut(&mut self) -> Option<&mut u64> {
19790 self.total_stake.as_mut().map(|field| field as _)
19791 }
19792 pub fn total_stake_mut(&mut self) -> &mut u64 {
19795 self.total_stake.get_or_insert_default()
19796 }
19797 pub fn total_stake_opt(&self) -> Option<u64> {
19799 self.total_stake.as_ref().map(|field| *field)
19800 }
19801 pub fn set_total_stake(&mut self, field: u64) {
19803 self.total_stake = Some(field);
19804 }
19805 pub fn with_total_stake(mut self, field: u64) -> Self {
19807 self.set_total_stake(field);
19808 self
19809 }
19810 pub fn active_validators(&self) -> &[super::Validator] {
19812 &self.active_validators
19813 }
19814 pub fn active_validators_mut(&mut self) -> &mut Vec<super::Validator> {
19817 &mut self.active_validators
19818 }
19819 pub fn set_active_validators(&mut self, field: Vec<super::Validator>) {
19821 self.active_validators = field;
19822 }
19823 pub fn with_active_validators(mut self, field: Vec<super::Validator>) -> Self {
19825 self.set_active_validators(field);
19826 self
19827 }
19828 pub fn pending_active_validators(&self) -> &super::MoveTable {
19830 self.pending_active_validators
19831 .as_ref()
19832 .map(|field| field as _)
19833 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
19834 }
19835 pub fn pending_active_validators_opt_mut(
19837 &mut self,
19838 ) -> Option<&mut super::MoveTable> {
19839 self.pending_active_validators.as_mut().map(|field| field as _)
19840 }
19841 pub fn pending_active_validators_mut(&mut self) -> &mut super::MoveTable {
19844 self.pending_active_validators.get_or_insert_default()
19845 }
19846 pub fn pending_active_validators_opt(&self) -> Option<&super::MoveTable> {
19848 self.pending_active_validators.as_ref().map(|field| field as _)
19849 }
19850 pub fn set_pending_active_validators<T: Into<super::MoveTable>>(
19852 &mut self,
19853 field: T,
19854 ) {
19855 self.pending_active_validators = Some(field.into().into());
19856 }
19857 pub fn with_pending_active_validators<T: Into<super::MoveTable>>(
19859 mut self,
19860 field: T,
19861 ) -> Self {
19862 self.set_pending_active_validators(field.into());
19863 self
19864 }
19865 pub fn pending_removals(&self) -> &[u64] {
19867 &self.pending_removals
19868 }
19869 pub fn pending_removals_mut(&mut self) -> &mut Vec<u64> {
19872 &mut self.pending_removals
19873 }
19874 pub fn set_pending_removals(&mut self, field: Vec<u64>) {
19876 self.pending_removals = field;
19877 }
19878 pub fn with_pending_removals(mut self, field: Vec<u64>) -> Self {
19880 self.set_pending_removals(field);
19881 self
19882 }
19883 pub fn staking_pool_mappings(&self) -> &super::MoveTable {
19885 self.staking_pool_mappings
19886 .as_ref()
19887 .map(|field| field as _)
19888 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
19889 }
19890 pub fn staking_pool_mappings_opt_mut(
19892 &mut self,
19893 ) -> Option<&mut super::MoveTable> {
19894 self.staking_pool_mappings.as_mut().map(|field| field as _)
19895 }
19896 pub fn staking_pool_mappings_mut(&mut self) -> &mut super::MoveTable {
19899 self.staking_pool_mappings.get_or_insert_default()
19900 }
19901 pub fn staking_pool_mappings_opt(&self) -> Option<&super::MoveTable> {
19903 self.staking_pool_mappings.as_ref().map(|field| field as _)
19904 }
19905 pub fn set_staking_pool_mappings<T: Into<super::MoveTable>>(
19907 &mut self,
19908 field: T,
19909 ) {
19910 self.staking_pool_mappings = Some(field.into().into());
19911 }
19912 pub fn with_staking_pool_mappings<T: Into<super::MoveTable>>(
19914 mut self,
19915 field: T,
19916 ) -> Self {
19917 self.set_staking_pool_mappings(field.into());
19918 self
19919 }
19920 pub fn inactive_validators(&self) -> &super::MoveTable {
19922 self.inactive_validators
19923 .as_ref()
19924 .map(|field| field as _)
19925 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
19926 }
19927 pub fn inactive_validators_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
19929 self.inactive_validators.as_mut().map(|field| field as _)
19930 }
19931 pub fn inactive_validators_mut(&mut self) -> &mut super::MoveTable {
19934 self.inactive_validators.get_or_insert_default()
19935 }
19936 pub fn inactive_validators_opt(&self) -> Option<&super::MoveTable> {
19938 self.inactive_validators.as_ref().map(|field| field as _)
19939 }
19940 pub fn set_inactive_validators<T: Into<super::MoveTable>>(&mut self, field: T) {
19942 self.inactive_validators = Some(field.into().into());
19943 }
19944 pub fn with_inactive_validators<T: Into<super::MoveTable>>(
19946 mut self,
19947 field: T,
19948 ) -> Self {
19949 self.set_inactive_validators(field.into());
19950 self
19951 }
19952 pub fn validator_candidates(&self) -> &super::MoveTable {
19954 self.validator_candidates
19955 .as_ref()
19956 .map(|field| field as _)
19957 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
19958 }
19959 pub fn validator_candidates_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
19961 self.validator_candidates.as_mut().map(|field| field as _)
19962 }
19963 pub fn validator_candidates_mut(&mut self) -> &mut super::MoveTable {
19966 self.validator_candidates.get_or_insert_default()
19967 }
19968 pub fn validator_candidates_opt(&self) -> Option<&super::MoveTable> {
19970 self.validator_candidates.as_ref().map(|field| field as _)
19971 }
19972 pub fn set_validator_candidates<T: Into<super::MoveTable>>(&mut self, field: T) {
19974 self.validator_candidates = Some(field.into().into());
19975 }
19976 pub fn with_validator_candidates<T: Into<super::MoveTable>>(
19978 mut self,
19979 field: T,
19980 ) -> Self {
19981 self.set_validator_candidates(field.into());
19982 self
19983 }
19984 pub fn at_risk_validators(&self) -> &::std::collections::BTreeMap<String, u64> {
19986 &self.at_risk_validators
19987 }
19988 pub fn at_risk_validators_mut(
19991 &mut self,
19992 ) -> &mut ::std::collections::BTreeMap<String, u64> {
19993 &mut self.at_risk_validators
19994 }
19995 pub fn set_at_risk_validators(
19997 &mut self,
19998 field: ::std::collections::BTreeMap<String, u64>,
19999 ) {
20000 self.at_risk_validators = field;
20001 }
20002 pub fn with_at_risk_validators(
20004 mut self,
20005 field: ::std::collections::BTreeMap<String, u64>,
20006 ) -> Self {
20007 self.set_at_risk_validators(field);
20008 self
20009 }
20010 pub fn extra_fields(&self) -> &super::MoveTable {
20012 self.extra_fields
20013 .as_ref()
20014 .map(|field| field as _)
20015 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
20016 }
20017 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
20019 self.extra_fields.as_mut().map(|field| field as _)
20020 }
20021 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
20024 self.extra_fields.get_or_insert_default()
20025 }
20026 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
20028 self.extra_fields.as_ref().map(|field| field as _)
20029 }
20030 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
20032 self.extra_fields = Some(field.into().into());
20033 }
20034 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
20036 self.set_extra_fields(field.into());
20037 self
20038 }
20039 }
20040 impl super::VariantDescriptor {
20041 pub const fn const_default() -> Self {
20042 Self {
20043 name: None,
20044 position: None,
20045 fields: Vec::new(),
20046 }
20047 }
20048 #[doc(hidden)]
20049 pub fn default_instance() -> &'static Self {
20050 static DEFAULT: super::VariantDescriptor = super::VariantDescriptor::const_default();
20051 &DEFAULT
20052 }
20053 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
20055 self.name.as_mut().map(|field| field as _)
20056 }
20057 pub fn name_mut(&mut self) -> &mut String {
20060 self.name.get_or_insert_default()
20061 }
20062 pub fn name_opt(&self) -> Option<&str> {
20064 self.name.as_ref().map(|field| field as _)
20065 }
20066 pub fn set_name<T: Into<String>>(&mut self, field: T) {
20068 self.name = Some(field.into().into());
20069 }
20070 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
20072 self.set_name(field.into());
20073 self
20074 }
20075 pub fn position_opt_mut(&mut self) -> Option<&mut u32> {
20077 self.position.as_mut().map(|field| field as _)
20078 }
20079 pub fn position_mut(&mut self) -> &mut u32 {
20082 self.position.get_or_insert_default()
20083 }
20084 pub fn position_opt(&self) -> Option<u32> {
20086 self.position.as_ref().map(|field| *field)
20087 }
20088 pub fn set_position(&mut self, field: u32) {
20090 self.position = Some(field);
20091 }
20092 pub fn with_position(mut self, field: u32) -> Self {
20094 self.set_position(field);
20095 self
20096 }
20097 pub fn fields(&self) -> &[super::FieldDescriptor] {
20099 &self.fields
20100 }
20101 pub fn fields_mut(&mut self) -> &mut Vec<super::FieldDescriptor> {
20104 &mut self.fields
20105 }
20106 pub fn set_fields(&mut self, field: Vec<super::FieldDescriptor>) {
20108 self.fields = field;
20109 }
20110 pub fn with_fields(mut self, field: Vec<super::FieldDescriptor>) -> Self {
20112 self.set_fields(field);
20113 self
20114 }
20115 }
20116 impl super::VerifySignatureRequest {
20117 pub const fn const_default() -> Self {
20118 Self {
20119 message: None,
20120 signature: None,
20121 address: None,
20122 jwks: Vec::new(),
20123 }
20124 }
20125 #[doc(hidden)]
20126 pub fn default_instance() -> &'static Self {
20127 static DEFAULT: super::VerifySignatureRequest = super::VerifySignatureRequest::const_default();
20128 &DEFAULT
20129 }
20130 pub fn message(&self) -> &super::Bcs {
20132 self.message
20133 .as_ref()
20134 .map(|field| field as _)
20135 .unwrap_or_else(|| super::Bcs::default_instance() as _)
20136 }
20137 pub fn message_opt_mut(&mut self) -> Option<&mut super::Bcs> {
20139 self.message.as_mut().map(|field| field as _)
20140 }
20141 pub fn message_mut(&mut self) -> &mut super::Bcs {
20144 self.message.get_or_insert_default()
20145 }
20146 pub fn message_opt(&self) -> Option<&super::Bcs> {
20148 self.message.as_ref().map(|field| field as _)
20149 }
20150 pub fn set_message<T: Into<super::Bcs>>(&mut self, field: T) {
20152 self.message = Some(field.into().into());
20153 }
20154 pub fn with_message<T: Into<super::Bcs>>(mut self, field: T) -> Self {
20156 self.set_message(field.into());
20157 self
20158 }
20159 pub fn signature(&self) -> &super::UserSignature {
20161 self.signature
20162 .as_ref()
20163 .map(|field| field as _)
20164 .unwrap_or_else(|| super::UserSignature::default_instance() as _)
20165 }
20166 pub fn signature_opt_mut(&mut self) -> Option<&mut super::UserSignature> {
20168 self.signature.as_mut().map(|field| field as _)
20169 }
20170 pub fn signature_mut(&mut self) -> &mut super::UserSignature {
20173 self.signature.get_or_insert_default()
20174 }
20175 pub fn signature_opt(&self) -> Option<&super::UserSignature> {
20177 self.signature.as_ref().map(|field| field as _)
20178 }
20179 pub fn set_signature<T: Into<super::UserSignature>>(&mut self, field: T) {
20181 self.signature = Some(field.into().into());
20182 }
20183 pub fn with_signature<T: Into<super::UserSignature>>(
20185 mut self,
20186 field: T,
20187 ) -> Self {
20188 self.set_signature(field.into());
20189 self
20190 }
20191 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
20193 self.address.as_mut().map(|field| field as _)
20194 }
20195 pub fn address_mut(&mut self) -> &mut String {
20198 self.address.get_or_insert_default()
20199 }
20200 pub fn address_opt(&self) -> Option<&str> {
20202 self.address.as_ref().map(|field| field as _)
20203 }
20204 pub fn set_address<T: Into<String>>(&mut self, field: T) {
20206 self.address = Some(field.into().into());
20207 }
20208 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
20210 self.set_address(field.into());
20211 self
20212 }
20213 pub fn jwks(&self) -> &[super::ActiveJwk] {
20215 &self.jwks
20216 }
20217 pub fn jwks_mut(&mut self) -> &mut Vec<super::ActiveJwk> {
20220 &mut self.jwks
20221 }
20222 pub fn set_jwks(&mut self, field: Vec<super::ActiveJwk>) {
20224 self.jwks = field;
20225 }
20226 pub fn with_jwks(mut self, field: Vec<super::ActiveJwk>) -> Self {
20228 self.set_jwks(field);
20229 self
20230 }
20231 }
20232 impl super::VerifySignatureResponse {
20233 pub const fn const_default() -> Self {
20234 Self {
20235 is_valid: None,
20236 reason: None,
20237 }
20238 }
20239 #[doc(hidden)]
20240 pub fn default_instance() -> &'static Self {
20241 static DEFAULT: super::VerifySignatureResponse = super::VerifySignatureResponse::const_default();
20242 &DEFAULT
20243 }
20244 pub fn is_valid_opt_mut(&mut self) -> Option<&mut bool> {
20246 self.is_valid.as_mut().map(|field| field as _)
20247 }
20248 pub fn is_valid_mut(&mut self) -> &mut bool {
20251 self.is_valid.get_or_insert_default()
20252 }
20253 pub fn is_valid_opt(&self) -> Option<bool> {
20255 self.is_valid.as_ref().map(|field| *field)
20256 }
20257 pub fn set_is_valid(&mut self, field: bool) {
20259 self.is_valid = Some(field);
20260 }
20261 pub fn with_is_valid(mut self, field: bool) -> Self {
20263 self.set_is_valid(field);
20264 self
20265 }
20266 pub fn reason_opt_mut(&mut self) -> Option<&mut String> {
20268 self.reason.as_mut().map(|field| field as _)
20269 }
20270 pub fn reason_mut(&mut self) -> &mut String {
20273 self.reason.get_or_insert_default()
20274 }
20275 pub fn reason_opt(&self) -> Option<&str> {
20277 self.reason.as_ref().map(|field| field as _)
20278 }
20279 pub fn set_reason<T: Into<String>>(&mut self, field: T) {
20281 self.reason = Some(field.into().into());
20282 }
20283 pub fn with_reason<T: Into<String>>(mut self, field: T) -> Self {
20285 self.set_reason(field.into());
20286 self
20287 }
20288 }
20289 impl super::VersionAssignment {
20290 pub const fn const_default() -> Self {
20291 Self {
20292 object_id: None,
20293 start_version: None,
20294 version: None,
20295 }
20296 }
20297 #[doc(hidden)]
20298 pub fn default_instance() -> &'static Self {
20299 static DEFAULT: super::VersionAssignment = super::VersionAssignment::const_default();
20300 &DEFAULT
20301 }
20302 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
20304 self.object_id.as_mut().map(|field| field as _)
20305 }
20306 pub fn object_id_mut(&mut self) -> &mut String {
20309 self.object_id.get_or_insert_default()
20310 }
20311 pub fn object_id_opt(&self) -> Option<&str> {
20313 self.object_id.as_ref().map(|field| field as _)
20314 }
20315 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
20317 self.object_id = Some(field.into().into());
20318 }
20319 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
20321 self.set_object_id(field.into());
20322 self
20323 }
20324 pub fn start_version_opt_mut(&mut self) -> Option<&mut u64> {
20326 self.start_version.as_mut().map(|field| field as _)
20327 }
20328 pub fn start_version_mut(&mut self) -> &mut u64 {
20331 self.start_version.get_or_insert_default()
20332 }
20333 pub fn start_version_opt(&self) -> Option<u64> {
20335 self.start_version.as_ref().map(|field| *field)
20336 }
20337 pub fn set_start_version(&mut self, field: u64) {
20339 self.start_version = Some(field);
20340 }
20341 pub fn with_start_version(mut self, field: u64) -> Self {
20343 self.set_start_version(field);
20344 self
20345 }
20346 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
20348 self.version.as_mut().map(|field| field as _)
20349 }
20350 pub fn version_mut(&mut self) -> &mut u64 {
20353 self.version.get_or_insert_default()
20354 }
20355 pub fn version_opt(&self) -> Option<u64> {
20357 self.version.as_ref().map(|field| *field)
20358 }
20359 pub fn set_version(&mut self, field: u64) {
20361 self.version = Some(field);
20362 }
20363 pub fn with_version(mut self, field: u64) -> Self {
20365 self.set_version(field);
20366 self
20367 }
20368 }
20369 impl super::Watermark {
20370 pub const fn const_default() -> Self {
20371 Self {
20372 cursor: None,
20373 checkpoint: None,
20374 }
20375 }
20376 #[doc(hidden)]
20377 pub fn default_instance() -> &'static Self {
20378 static DEFAULT: super::Watermark = super::Watermark::const_default();
20379 &DEFAULT
20380 }
20381 pub fn cursor_opt(&self) -> Option<&[u8]> {
20383 self.cursor.as_ref().map(|field| field as _)
20384 }
20385 pub fn set_cursor<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
20387 self.cursor = Some(field.into().into());
20388 }
20389 pub fn with_cursor<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
20391 self.set_cursor(field.into());
20392 self
20393 }
20394 pub fn checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
20396 self.checkpoint.as_mut().map(|field| field as _)
20397 }
20398 pub fn checkpoint_mut(&mut self) -> &mut u64 {
20401 self.checkpoint.get_or_insert_default()
20402 }
20403 pub fn checkpoint_opt(&self) -> Option<u64> {
20405 self.checkpoint.as_ref().map(|field| *field)
20406 }
20407 pub fn set_checkpoint(&mut self, field: u64) {
20409 self.checkpoint = Some(field);
20410 }
20411 pub fn with_checkpoint(mut self, field: u64) -> Self {
20413 self.set_checkpoint(field);
20414 self
20415 }
20416 }
20417 impl super::ZkLoginAuthenticator {
20418 pub const fn const_default() -> Self {
20419 Self {
20420 inputs: None,
20421 max_epoch: None,
20422 signature: None,
20423 public_identifier: None,
20424 jwk_id: None,
20425 }
20426 }
20427 #[doc(hidden)]
20428 pub fn default_instance() -> &'static Self {
20429 static DEFAULT: super::ZkLoginAuthenticator = super::ZkLoginAuthenticator::const_default();
20430 &DEFAULT
20431 }
20432 pub fn inputs(&self) -> &super::ZkLoginInputs {
20434 self.inputs
20435 .as_ref()
20436 .map(|field| field as _)
20437 .unwrap_or_else(|| super::ZkLoginInputs::default_instance() as _)
20438 }
20439 pub fn inputs_opt_mut(&mut self) -> Option<&mut super::ZkLoginInputs> {
20441 self.inputs.as_mut().map(|field| field as _)
20442 }
20443 pub fn inputs_mut(&mut self) -> &mut super::ZkLoginInputs {
20446 self.inputs.get_or_insert_default()
20447 }
20448 pub fn inputs_opt(&self) -> Option<&super::ZkLoginInputs> {
20450 self.inputs.as_ref().map(|field| field as _)
20451 }
20452 pub fn set_inputs<T: Into<super::ZkLoginInputs>>(&mut self, field: T) {
20454 self.inputs = Some(field.into().into());
20455 }
20456 pub fn with_inputs<T: Into<super::ZkLoginInputs>>(mut self, field: T) -> Self {
20458 self.set_inputs(field.into());
20459 self
20460 }
20461 pub fn max_epoch_opt_mut(&mut self) -> Option<&mut u64> {
20463 self.max_epoch.as_mut().map(|field| field as _)
20464 }
20465 pub fn max_epoch_mut(&mut self) -> &mut u64 {
20468 self.max_epoch.get_or_insert_default()
20469 }
20470 pub fn max_epoch_opt(&self) -> Option<u64> {
20472 self.max_epoch.as_ref().map(|field| *field)
20473 }
20474 pub fn set_max_epoch(&mut self, field: u64) {
20476 self.max_epoch = Some(field);
20477 }
20478 pub fn with_max_epoch(mut self, field: u64) -> Self {
20480 self.set_max_epoch(field);
20481 self
20482 }
20483 pub fn signature(&self) -> &super::SimpleSignature {
20485 self.signature
20486 .as_ref()
20487 .map(|field| field as _)
20488 .unwrap_or_else(|| super::SimpleSignature::default_instance() as _)
20489 }
20490 pub fn signature_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
20492 self.signature.as_mut().map(|field| field as _)
20493 }
20494 pub fn signature_mut(&mut self) -> &mut super::SimpleSignature {
20497 self.signature.get_or_insert_default()
20498 }
20499 pub fn signature_opt(&self) -> Option<&super::SimpleSignature> {
20501 self.signature.as_ref().map(|field| field as _)
20502 }
20503 pub fn set_signature<T: Into<super::SimpleSignature>>(&mut self, field: T) {
20505 self.signature = Some(field.into().into());
20506 }
20507 pub fn with_signature<T: Into<super::SimpleSignature>>(
20509 mut self,
20510 field: T,
20511 ) -> Self {
20512 self.set_signature(field.into());
20513 self
20514 }
20515 pub fn public_identifier(&self) -> &super::ZkLoginPublicIdentifier {
20517 self.public_identifier
20518 .as_ref()
20519 .map(|field| field as _)
20520 .unwrap_or_else(|| {
20521 super::ZkLoginPublicIdentifier::default_instance() as _
20522 })
20523 }
20524 pub fn public_identifier_opt_mut(
20526 &mut self,
20527 ) -> Option<&mut super::ZkLoginPublicIdentifier> {
20528 self.public_identifier.as_mut().map(|field| field as _)
20529 }
20530 pub fn public_identifier_mut(&mut self) -> &mut super::ZkLoginPublicIdentifier {
20533 self.public_identifier.get_or_insert_default()
20534 }
20535 pub fn public_identifier_opt(&self) -> Option<&super::ZkLoginPublicIdentifier> {
20537 self.public_identifier.as_ref().map(|field| field as _)
20538 }
20539 pub fn set_public_identifier<T: Into<super::ZkLoginPublicIdentifier>>(
20541 &mut self,
20542 field: T,
20543 ) {
20544 self.public_identifier = Some(field.into().into());
20545 }
20546 pub fn with_public_identifier<T: Into<super::ZkLoginPublicIdentifier>>(
20548 mut self,
20549 field: T,
20550 ) -> Self {
20551 self.set_public_identifier(field.into());
20552 self
20553 }
20554 pub fn jwk_id(&self) -> &super::JwkId {
20556 self.jwk_id
20557 .as_ref()
20558 .map(|field| field as _)
20559 .unwrap_or_else(|| super::JwkId::default_instance() as _)
20560 }
20561 pub fn jwk_id_opt_mut(&mut self) -> Option<&mut super::JwkId> {
20563 self.jwk_id.as_mut().map(|field| field as _)
20564 }
20565 pub fn jwk_id_mut(&mut self) -> &mut super::JwkId {
20568 self.jwk_id.get_or_insert_default()
20569 }
20570 pub fn jwk_id_opt(&self) -> Option<&super::JwkId> {
20572 self.jwk_id.as_ref().map(|field| field as _)
20573 }
20574 pub fn set_jwk_id<T: Into<super::JwkId>>(&mut self, field: T) {
20576 self.jwk_id = Some(field.into().into());
20577 }
20578 pub fn with_jwk_id<T: Into<super::JwkId>>(mut self, field: T) -> Self {
20580 self.set_jwk_id(field.into());
20581 self
20582 }
20583 }
20584 impl super::ZkLoginClaim {
20585 pub const fn const_default() -> Self {
20586 Self {
20587 value: None,
20588 index_mod_4: None,
20589 }
20590 }
20591 #[doc(hidden)]
20592 pub fn default_instance() -> &'static Self {
20593 static DEFAULT: super::ZkLoginClaim = super::ZkLoginClaim::const_default();
20594 &DEFAULT
20595 }
20596 pub fn value_opt_mut(&mut self) -> Option<&mut String> {
20598 self.value.as_mut().map(|field| field as _)
20599 }
20600 pub fn value_mut(&mut self) -> &mut String {
20603 self.value.get_or_insert_default()
20604 }
20605 pub fn value_opt(&self) -> Option<&str> {
20607 self.value.as_ref().map(|field| field as _)
20608 }
20609 pub fn set_value<T: Into<String>>(&mut self, field: T) {
20611 self.value = Some(field.into().into());
20612 }
20613 pub fn with_value<T: Into<String>>(mut self, field: T) -> Self {
20615 self.set_value(field.into());
20616 self
20617 }
20618 pub fn index_mod_4_opt_mut(&mut self) -> Option<&mut u32> {
20620 self.index_mod_4.as_mut().map(|field| field as _)
20621 }
20622 pub fn index_mod_4_mut(&mut self) -> &mut u32 {
20625 self.index_mod_4.get_or_insert_default()
20626 }
20627 pub fn index_mod_4_opt(&self) -> Option<u32> {
20629 self.index_mod_4.as_ref().map(|field| *field)
20630 }
20631 pub fn set_index_mod_4(&mut self, field: u32) {
20633 self.index_mod_4 = Some(field);
20634 }
20635 pub fn with_index_mod_4(mut self, field: u32) -> Self {
20637 self.set_index_mod_4(field);
20638 self
20639 }
20640 }
20641 impl super::ZkLoginInputs {
20642 pub const fn const_default() -> Self {
20643 Self {
20644 proof_points: None,
20645 iss_base64_details: None,
20646 header_base64: None,
20647 address_seed: None,
20648 }
20649 }
20650 #[doc(hidden)]
20651 pub fn default_instance() -> &'static Self {
20652 static DEFAULT: super::ZkLoginInputs = super::ZkLoginInputs::const_default();
20653 &DEFAULT
20654 }
20655 pub fn proof_points(&self) -> &super::ZkLoginProof {
20657 self.proof_points
20658 .as_ref()
20659 .map(|field| field as _)
20660 .unwrap_or_else(|| super::ZkLoginProof::default_instance() as _)
20661 }
20662 pub fn proof_points_opt_mut(&mut self) -> Option<&mut super::ZkLoginProof> {
20664 self.proof_points.as_mut().map(|field| field as _)
20665 }
20666 pub fn proof_points_mut(&mut self) -> &mut super::ZkLoginProof {
20669 self.proof_points.get_or_insert_default()
20670 }
20671 pub fn proof_points_opt(&self) -> Option<&super::ZkLoginProof> {
20673 self.proof_points.as_ref().map(|field| field as _)
20674 }
20675 pub fn set_proof_points<T: Into<super::ZkLoginProof>>(&mut self, field: T) {
20677 self.proof_points = Some(field.into().into());
20678 }
20679 pub fn with_proof_points<T: Into<super::ZkLoginProof>>(
20681 mut self,
20682 field: T,
20683 ) -> Self {
20684 self.set_proof_points(field.into());
20685 self
20686 }
20687 pub fn iss_base64_details(&self) -> &super::ZkLoginClaim {
20689 self.iss_base64_details
20690 .as_ref()
20691 .map(|field| field as _)
20692 .unwrap_or_else(|| super::ZkLoginClaim::default_instance() as _)
20693 }
20694 pub fn iss_base64_details_opt_mut(
20696 &mut self,
20697 ) -> Option<&mut super::ZkLoginClaim> {
20698 self.iss_base64_details.as_mut().map(|field| field as _)
20699 }
20700 pub fn iss_base64_details_mut(&mut self) -> &mut super::ZkLoginClaim {
20703 self.iss_base64_details.get_or_insert_default()
20704 }
20705 pub fn iss_base64_details_opt(&self) -> Option<&super::ZkLoginClaim> {
20707 self.iss_base64_details.as_ref().map(|field| field as _)
20708 }
20709 pub fn set_iss_base64_details<T: Into<super::ZkLoginClaim>>(
20711 &mut self,
20712 field: T,
20713 ) {
20714 self.iss_base64_details = Some(field.into().into());
20715 }
20716 pub fn with_iss_base64_details<T: Into<super::ZkLoginClaim>>(
20718 mut self,
20719 field: T,
20720 ) -> Self {
20721 self.set_iss_base64_details(field.into());
20722 self
20723 }
20724 pub fn header_base64_opt_mut(&mut self) -> Option<&mut String> {
20726 self.header_base64.as_mut().map(|field| field as _)
20727 }
20728 pub fn header_base64_mut(&mut self) -> &mut String {
20731 self.header_base64.get_or_insert_default()
20732 }
20733 pub fn header_base64_opt(&self) -> Option<&str> {
20735 self.header_base64.as_ref().map(|field| field as _)
20736 }
20737 pub fn set_header_base64<T: Into<String>>(&mut self, field: T) {
20739 self.header_base64 = Some(field.into().into());
20740 }
20741 pub fn with_header_base64<T: Into<String>>(mut self, field: T) -> Self {
20743 self.set_header_base64(field.into());
20744 self
20745 }
20746 pub fn address_seed_opt_mut(&mut self) -> Option<&mut String> {
20748 self.address_seed.as_mut().map(|field| field as _)
20749 }
20750 pub fn address_seed_mut(&mut self) -> &mut String {
20753 self.address_seed.get_or_insert_default()
20754 }
20755 pub fn address_seed_opt(&self) -> Option<&str> {
20757 self.address_seed.as_ref().map(|field| field as _)
20758 }
20759 pub fn set_address_seed<T: Into<String>>(&mut self, field: T) {
20761 self.address_seed = Some(field.into().into());
20762 }
20763 pub fn with_address_seed<T: Into<String>>(mut self, field: T) -> Self {
20765 self.set_address_seed(field.into());
20766 self
20767 }
20768 }
20769 impl super::ZkLoginProof {
20770 pub const fn const_default() -> Self {
20771 Self { a: None, b: None, c: None }
20772 }
20773 #[doc(hidden)]
20774 pub fn default_instance() -> &'static Self {
20775 static DEFAULT: super::ZkLoginProof = super::ZkLoginProof::const_default();
20776 &DEFAULT
20777 }
20778 pub fn a(&self) -> &super::CircomG1 {
20780 self.a
20781 .as_ref()
20782 .map(|field| field as _)
20783 .unwrap_or_else(|| super::CircomG1::default_instance() as _)
20784 }
20785 pub fn a_opt_mut(&mut self) -> Option<&mut super::CircomG1> {
20787 self.a.as_mut().map(|field| field as _)
20788 }
20789 pub fn a_mut(&mut self) -> &mut super::CircomG1 {
20792 self.a.get_or_insert_default()
20793 }
20794 pub fn a_opt(&self) -> Option<&super::CircomG1> {
20796 self.a.as_ref().map(|field| field as _)
20797 }
20798 pub fn set_a<T: Into<super::CircomG1>>(&mut self, field: T) {
20800 self.a = Some(field.into().into());
20801 }
20802 pub fn with_a<T: Into<super::CircomG1>>(mut self, field: T) -> Self {
20804 self.set_a(field.into());
20805 self
20806 }
20807 pub fn b(&self) -> &super::CircomG2 {
20809 self.b
20810 .as_ref()
20811 .map(|field| field as _)
20812 .unwrap_or_else(|| super::CircomG2::default_instance() as _)
20813 }
20814 pub fn b_opt_mut(&mut self) -> Option<&mut super::CircomG2> {
20816 self.b.as_mut().map(|field| field as _)
20817 }
20818 pub fn b_mut(&mut self) -> &mut super::CircomG2 {
20821 self.b.get_or_insert_default()
20822 }
20823 pub fn b_opt(&self) -> Option<&super::CircomG2> {
20825 self.b.as_ref().map(|field| field as _)
20826 }
20827 pub fn set_b<T: Into<super::CircomG2>>(&mut self, field: T) {
20829 self.b = Some(field.into().into());
20830 }
20831 pub fn with_b<T: Into<super::CircomG2>>(mut self, field: T) -> Self {
20833 self.set_b(field.into());
20834 self
20835 }
20836 pub fn c(&self) -> &super::CircomG1 {
20838 self.c
20839 .as_ref()
20840 .map(|field| field as _)
20841 .unwrap_or_else(|| super::CircomG1::default_instance() as _)
20842 }
20843 pub fn c_opt_mut(&mut self) -> Option<&mut super::CircomG1> {
20845 self.c.as_mut().map(|field| field as _)
20846 }
20847 pub fn c_mut(&mut self) -> &mut super::CircomG1 {
20850 self.c.get_or_insert_default()
20851 }
20852 pub fn c_opt(&self) -> Option<&super::CircomG1> {
20854 self.c.as_ref().map(|field| field as _)
20855 }
20856 pub fn set_c<T: Into<super::CircomG1>>(&mut self, field: T) {
20858 self.c = Some(field.into().into());
20859 }
20860 pub fn with_c<T: Into<super::CircomG1>>(mut self, field: T) -> Self {
20862 self.set_c(field.into());
20863 self
20864 }
20865 }
20866 impl super::ZkLoginPublicIdentifier {
20867 pub const fn const_default() -> Self {
20868 Self {
20869 iss: None,
20870 address_seed: None,
20871 }
20872 }
20873 #[doc(hidden)]
20874 pub fn default_instance() -> &'static Self {
20875 static DEFAULT: super::ZkLoginPublicIdentifier = super::ZkLoginPublicIdentifier::const_default();
20876 &DEFAULT
20877 }
20878 pub fn iss_opt_mut(&mut self) -> Option<&mut String> {
20880 self.iss.as_mut().map(|field| field as _)
20881 }
20882 pub fn iss_mut(&mut self) -> &mut String {
20885 self.iss.get_or_insert_default()
20886 }
20887 pub fn iss_opt(&self) -> Option<&str> {
20889 self.iss.as_ref().map(|field| field as _)
20890 }
20891 pub fn set_iss<T: Into<String>>(&mut self, field: T) {
20893 self.iss = Some(field.into().into());
20894 }
20895 pub fn with_iss<T: Into<String>>(mut self, field: T) -> Self {
20897 self.set_iss(field.into());
20898 self
20899 }
20900 pub fn address_seed_opt_mut(&mut self) -> Option<&mut String> {
20902 self.address_seed.as_mut().map(|field| field as _)
20903 }
20904 pub fn address_seed_mut(&mut self) -> &mut String {
20907 self.address_seed.get_or_insert_default()
20908 }
20909 pub fn address_seed_opt(&self) -> Option<&str> {
20911 self.address_seed.as_ref().map(|field| field as _)
20912 }
20913 pub fn set_address_seed<T: Into<String>>(&mut self, field: T) {
20915 self.address_seed = Some(field.into().into());
20916 }
20917 pub fn with_address_seed<T: Into<String>>(mut self, field: T) -> Self {
20919 self.set_address_seed(field.into());
20920 self
20921 }
20922 }
20923}