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 {
8786 package_id: None,
8787 selector: None,
8788 }
8789 }
8790 #[doc(hidden)]
8791 pub fn default_instance() -> &'static Self {
8792 static DEFAULT: super::GetPackageRequest = super::GetPackageRequest::const_default();
8793 &DEFAULT
8794 }
8795 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
8797 self.package_id.as_mut().map(|field| field as _)
8798 }
8799 pub fn package_id_mut(&mut self) -> &mut String {
8802 self.package_id.get_or_insert_default()
8803 }
8804 pub fn package_id_opt(&self) -> Option<&str> {
8806 self.package_id.as_ref().map(|field| field as _)
8807 }
8808 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
8810 self.package_id = Some(field.into().into());
8811 }
8812 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
8814 self.set_package_id(field.into());
8815 self
8816 }
8817 pub fn version(&self) -> u64 {
8819 if let Some(super::get_package_request::Selector::Version(field)) = &self
8820 .selector
8821 {
8822 *field
8823 } else {
8824 0u64
8825 }
8826 }
8827 pub fn version_opt(&self) -> Option<u64> {
8829 if let Some(super::get_package_request::Selector::Version(field)) = &self
8830 .selector
8831 {
8832 Some(*field)
8833 } else {
8834 None
8835 }
8836 }
8837 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
8839 if let Some(super::get_package_request::Selector::Version(field)) = &mut self
8840 .selector
8841 {
8842 Some(field as _)
8843 } else {
8844 None
8845 }
8846 }
8847 pub fn version_mut(&mut self) -> &mut u64 {
8851 if self.version_opt_mut().is_none() {
8852 self.selector = Some(
8853 super::get_package_request::Selector::Version(u64::default()),
8854 );
8855 }
8856 self.version_opt_mut().unwrap()
8857 }
8858 pub fn set_version(&mut self, field: u64) {
8861 self.selector = Some(super::get_package_request::Selector::Version(field));
8862 }
8863 pub fn with_version(mut self, field: u64) -> Self {
8866 self.set_version(field);
8867 self
8868 }
8869 pub fn at_checkpoint(&self) -> u64 {
8871 if let Some(super::get_package_request::Selector::AtCheckpoint(field)) = &self
8872 .selector
8873 {
8874 *field
8875 } else {
8876 0u64
8877 }
8878 }
8879 pub fn at_checkpoint_opt(&self) -> Option<u64> {
8881 if let Some(super::get_package_request::Selector::AtCheckpoint(field)) = &self
8882 .selector
8883 {
8884 Some(*field)
8885 } else {
8886 None
8887 }
8888 }
8889 pub fn at_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
8891 if let Some(super::get_package_request::Selector::AtCheckpoint(field)) = &mut self
8892 .selector
8893 {
8894 Some(field as _)
8895 } else {
8896 None
8897 }
8898 }
8899 pub fn at_checkpoint_mut(&mut self) -> &mut u64 {
8903 if self.at_checkpoint_opt_mut().is_none() {
8904 self.selector = Some(
8905 super::get_package_request::Selector::AtCheckpoint(u64::default()),
8906 );
8907 }
8908 self.at_checkpoint_opt_mut().unwrap()
8909 }
8910 pub fn set_at_checkpoint(&mut self, field: u64) {
8913 self.selector = Some(
8914 super::get_package_request::Selector::AtCheckpoint(field),
8915 );
8916 }
8917 pub fn with_at_checkpoint(mut self, field: u64) -> Self {
8920 self.set_at_checkpoint(field);
8921 self
8922 }
8923 }
8924 impl super::GetPackageResponse {
8925 pub const fn const_default() -> Self {
8926 Self { package: None }
8927 }
8928 #[doc(hidden)]
8929 pub fn default_instance() -> &'static Self {
8930 static DEFAULT: super::GetPackageResponse = super::GetPackageResponse::const_default();
8931 &DEFAULT
8932 }
8933 pub fn package(&self) -> &super::Package {
8935 self.package
8936 .as_ref()
8937 .map(|field| field as _)
8938 .unwrap_or_else(|| super::Package::default_instance() as _)
8939 }
8940 pub fn package_opt_mut(&mut self) -> Option<&mut super::Package> {
8942 self.package.as_mut().map(|field| field as _)
8943 }
8944 pub fn package_mut(&mut self) -> &mut super::Package {
8947 self.package.get_or_insert_default()
8948 }
8949 pub fn package_opt(&self) -> Option<&super::Package> {
8951 self.package.as_ref().map(|field| field as _)
8952 }
8953 pub fn set_package<T: Into<super::Package>>(&mut self, field: T) {
8955 self.package = Some(field.into().into());
8956 }
8957 pub fn with_package<T: Into<super::Package>>(mut self, field: T) -> Self {
8959 self.set_package(field.into());
8960 self
8961 }
8962 }
8963 impl super::GetServiceInfoRequest {
8964 pub const fn const_default() -> Self {
8965 Self {}
8966 }
8967 #[doc(hidden)]
8968 pub fn default_instance() -> &'static Self {
8969 static DEFAULT: super::GetServiceInfoRequest = super::GetServiceInfoRequest::const_default();
8970 &DEFAULT
8971 }
8972 }
8973 impl super::GetServiceInfoResponse {
8974 pub const fn const_default() -> Self {
8975 Self {
8976 chain_id: None,
8977 chain: None,
8978 epoch: None,
8979 checkpoint_height: None,
8980 timestamp: None,
8981 lowest_available_checkpoint: None,
8982 lowest_available_checkpoint_objects: None,
8983 server: None,
8984 }
8985 }
8986 #[doc(hidden)]
8987 pub fn default_instance() -> &'static Self {
8988 static DEFAULT: super::GetServiceInfoResponse = super::GetServiceInfoResponse::const_default();
8989 &DEFAULT
8990 }
8991 pub fn chain_id_opt_mut(&mut self) -> Option<&mut String> {
8993 self.chain_id.as_mut().map(|field| field as _)
8994 }
8995 pub fn chain_id_mut(&mut self) -> &mut String {
8998 self.chain_id.get_or_insert_default()
8999 }
9000 pub fn chain_id_opt(&self) -> Option<&str> {
9002 self.chain_id.as_ref().map(|field| field as _)
9003 }
9004 pub fn set_chain_id<T: Into<String>>(&mut self, field: T) {
9006 self.chain_id = Some(field.into().into());
9007 }
9008 pub fn with_chain_id<T: Into<String>>(mut self, field: T) -> Self {
9010 self.set_chain_id(field.into());
9011 self
9012 }
9013 pub fn chain_opt_mut(&mut self) -> Option<&mut String> {
9015 self.chain.as_mut().map(|field| field as _)
9016 }
9017 pub fn chain_mut(&mut self) -> &mut String {
9020 self.chain.get_or_insert_default()
9021 }
9022 pub fn chain_opt(&self) -> Option<&str> {
9024 self.chain.as_ref().map(|field| field as _)
9025 }
9026 pub fn set_chain<T: Into<String>>(&mut self, field: T) {
9028 self.chain = Some(field.into().into());
9029 }
9030 pub fn with_chain<T: Into<String>>(mut self, field: T) -> Self {
9032 self.set_chain(field.into());
9033 self
9034 }
9035 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
9037 self.epoch.as_mut().map(|field| field as _)
9038 }
9039 pub fn epoch_mut(&mut self) -> &mut u64 {
9042 self.epoch.get_or_insert_default()
9043 }
9044 pub fn epoch_opt(&self) -> Option<u64> {
9046 self.epoch.as_ref().map(|field| *field)
9047 }
9048 pub fn set_epoch(&mut self, field: u64) {
9050 self.epoch = Some(field);
9051 }
9052 pub fn with_epoch(mut self, field: u64) -> Self {
9054 self.set_epoch(field);
9055 self
9056 }
9057 pub fn checkpoint_height_opt_mut(&mut self) -> Option<&mut u64> {
9059 self.checkpoint_height.as_mut().map(|field| field as _)
9060 }
9061 pub fn checkpoint_height_mut(&mut self) -> &mut u64 {
9064 self.checkpoint_height.get_or_insert_default()
9065 }
9066 pub fn checkpoint_height_opt(&self) -> Option<u64> {
9068 self.checkpoint_height.as_ref().map(|field| *field)
9069 }
9070 pub fn set_checkpoint_height(&mut self, field: u64) {
9072 self.checkpoint_height = Some(field);
9073 }
9074 pub fn with_checkpoint_height(mut self, field: u64) -> Self {
9076 self.set_checkpoint_height(field);
9077 self
9078 }
9079 pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
9081 self.timestamp.as_mut().map(|field| field as _)
9082 }
9083 pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
9086 self.timestamp.get_or_insert_default()
9087 }
9088 pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
9090 self.timestamp.as_ref().map(|field| field as _)
9091 }
9092 pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
9094 self.timestamp = Some(field.into().into());
9095 }
9096 pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
9098 mut self,
9099 field: T,
9100 ) -> Self {
9101 self.set_timestamp(field.into());
9102 self
9103 }
9104 pub fn lowest_available_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
9106 self.lowest_available_checkpoint.as_mut().map(|field| field as _)
9107 }
9108 pub fn lowest_available_checkpoint_mut(&mut self) -> &mut u64 {
9111 self.lowest_available_checkpoint.get_or_insert_default()
9112 }
9113 pub fn lowest_available_checkpoint_opt(&self) -> Option<u64> {
9115 self.lowest_available_checkpoint.as_ref().map(|field| *field)
9116 }
9117 pub fn set_lowest_available_checkpoint(&mut self, field: u64) {
9119 self.lowest_available_checkpoint = Some(field);
9120 }
9121 pub fn with_lowest_available_checkpoint(mut self, field: u64) -> Self {
9123 self.set_lowest_available_checkpoint(field);
9124 self
9125 }
9126 pub fn lowest_available_checkpoint_objects_opt_mut(
9128 &mut self,
9129 ) -> Option<&mut u64> {
9130 self.lowest_available_checkpoint_objects.as_mut().map(|field| field as _)
9131 }
9132 pub fn lowest_available_checkpoint_objects_mut(&mut self) -> &mut u64 {
9135 self.lowest_available_checkpoint_objects.get_or_insert_default()
9136 }
9137 pub fn lowest_available_checkpoint_objects_opt(&self) -> Option<u64> {
9139 self.lowest_available_checkpoint_objects.as_ref().map(|field| *field)
9140 }
9141 pub fn set_lowest_available_checkpoint_objects(&mut self, field: u64) {
9143 self.lowest_available_checkpoint_objects = Some(field);
9144 }
9145 pub fn with_lowest_available_checkpoint_objects(mut self, field: u64) -> Self {
9147 self.set_lowest_available_checkpoint_objects(field);
9148 self
9149 }
9150 pub fn server_opt_mut(&mut self) -> Option<&mut String> {
9152 self.server.as_mut().map(|field| field as _)
9153 }
9154 pub fn server_mut(&mut self) -> &mut String {
9157 self.server.get_or_insert_default()
9158 }
9159 pub fn server_opt(&self) -> Option<&str> {
9161 self.server.as_ref().map(|field| field as _)
9162 }
9163 pub fn set_server<T: Into<String>>(&mut self, field: T) {
9165 self.server = Some(field.into().into());
9166 }
9167 pub fn with_server<T: Into<String>>(mut self, field: T) -> Self {
9169 self.set_server(field.into());
9170 self
9171 }
9172 }
9173 impl super::GetTransactionRequest {
9174 pub const fn const_default() -> Self {
9175 Self {
9176 digest: None,
9177 read_mask: None,
9178 }
9179 }
9180 #[doc(hidden)]
9181 pub fn default_instance() -> &'static Self {
9182 static DEFAULT: super::GetTransactionRequest = super::GetTransactionRequest::const_default();
9183 &DEFAULT
9184 }
9185 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
9187 self.digest.as_mut().map(|field| field as _)
9188 }
9189 pub fn digest_mut(&mut self) -> &mut String {
9192 self.digest.get_or_insert_default()
9193 }
9194 pub fn digest_opt(&self) -> Option<&str> {
9196 self.digest.as_ref().map(|field| field as _)
9197 }
9198 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
9200 self.digest = Some(field.into().into());
9201 }
9202 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
9204 self.set_digest(field.into());
9205 self
9206 }
9207 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
9209 self.read_mask.as_mut().map(|field| field as _)
9210 }
9211 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
9214 self.read_mask.get_or_insert_default()
9215 }
9216 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
9218 self.read_mask.as_ref().map(|field| field as _)
9219 }
9220 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
9222 self.read_mask = Some(field.into().into());
9223 }
9224 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
9226 mut self,
9227 field: T,
9228 ) -> Self {
9229 self.set_read_mask(field.into());
9230 self
9231 }
9232 }
9233 impl super::GetTransactionResponse {
9234 pub const fn const_default() -> Self {
9235 Self { transaction: None }
9236 }
9237 #[doc(hidden)]
9238 pub fn default_instance() -> &'static Self {
9239 static DEFAULT: super::GetTransactionResponse = super::GetTransactionResponse::const_default();
9240 &DEFAULT
9241 }
9242 pub fn transaction(&self) -> &super::ExecutedTransaction {
9244 self.transaction
9245 .as_ref()
9246 .map(|field| field as _)
9247 .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
9248 }
9249 pub fn transaction_opt_mut(
9251 &mut self,
9252 ) -> Option<&mut super::ExecutedTransaction> {
9253 self.transaction.as_mut().map(|field| field as _)
9254 }
9255 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
9258 self.transaction.get_or_insert_default()
9259 }
9260 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
9262 self.transaction.as_ref().map(|field| field as _)
9263 }
9264 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
9266 &mut self,
9267 field: T,
9268 ) {
9269 self.transaction = Some(field.into().into());
9270 }
9271 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
9273 mut self,
9274 field: T,
9275 ) -> Self {
9276 self.set_transaction(field.into());
9277 self
9278 }
9279 }
9280 impl super::GetTransactionResult {
9281 pub const fn const_default() -> Self {
9282 Self { result: None }
9283 }
9284 #[doc(hidden)]
9285 pub fn default_instance() -> &'static Self {
9286 static DEFAULT: super::GetTransactionResult = super::GetTransactionResult::const_default();
9287 &DEFAULT
9288 }
9289 pub fn transaction(&self) -> &super::ExecutedTransaction {
9291 if let Some(super::get_transaction_result::Result::Transaction(field)) = &self
9292 .result
9293 {
9294 field as _
9295 } else {
9296 super::ExecutedTransaction::default_instance() as _
9297 }
9298 }
9299 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
9301 if let Some(super::get_transaction_result::Result::Transaction(field)) = &self
9302 .result
9303 {
9304 Some(field as _)
9305 } else {
9306 None
9307 }
9308 }
9309 pub fn transaction_opt_mut(
9311 &mut self,
9312 ) -> Option<&mut super::ExecutedTransaction> {
9313 if let Some(super::get_transaction_result::Result::Transaction(field)) = &mut self
9314 .result
9315 {
9316 Some(field as _)
9317 } else {
9318 None
9319 }
9320 }
9321 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
9325 if self.transaction_opt_mut().is_none() {
9326 self.result = Some(
9327 super::get_transaction_result::Result::Transaction(
9328 super::ExecutedTransaction::default(),
9329 ),
9330 );
9331 }
9332 self.transaction_opt_mut().unwrap()
9333 }
9334 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
9337 &mut self,
9338 field: T,
9339 ) {
9340 self.result = Some(
9341 super::get_transaction_result::Result::Transaction(field.into().into()),
9342 );
9343 }
9344 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
9347 mut self,
9348 field: T,
9349 ) -> Self {
9350 self.set_transaction(field.into());
9351 self
9352 }
9353 pub fn error(&self) -> &super::super::super::super::google::rpc::Status {
9355 if let Some(super::get_transaction_result::Result::Error(field)) = &self
9356 .result
9357 {
9358 field as _
9359 } else {
9360 super::super::super::super::google::rpc::Status::default_instance() as _
9361 }
9362 }
9363 pub fn error_opt(
9365 &self,
9366 ) -> Option<&super::super::super::super::google::rpc::Status> {
9367 if let Some(super::get_transaction_result::Result::Error(field)) = &self
9368 .result
9369 {
9370 Some(field as _)
9371 } else {
9372 None
9373 }
9374 }
9375 pub fn error_opt_mut(
9377 &mut self,
9378 ) -> Option<&mut super::super::super::super::google::rpc::Status> {
9379 if let Some(super::get_transaction_result::Result::Error(field)) = &mut self
9380 .result
9381 {
9382 Some(field as _)
9383 } else {
9384 None
9385 }
9386 }
9387 pub fn error_mut(
9391 &mut self,
9392 ) -> &mut super::super::super::super::google::rpc::Status {
9393 if self.error_opt_mut().is_none() {
9394 self.result = Some(
9395 super::get_transaction_result::Result::Error(
9396 super::super::super::super::google::rpc::Status::default(),
9397 ),
9398 );
9399 }
9400 self.error_opt_mut().unwrap()
9401 }
9402 pub fn set_error<T: Into<super::super::super::super::google::rpc::Status>>(
9405 &mut self,
9406 field: T,
9407 ) {
9408 self.result = Some(
9409 super::get_transaction_result::Result::Error(field.into().into()),
9410 );
9411 }
9412 pub fn with_error<T: Into<super::super::super::super::google::rpc::Status>>(
9415 mut self,
9416 field: T,
9417 ) -> Self {
9418 self.set_error(field.into());
9419 self
9420 }
9421 }
9422 impl super::IndexError {
9423 pub const fn const_default() -> Self {
9424 Self {
9425 index: None,
9426 subresult: None,
9427 }
9428 }
9429 #[doc(hidden)]
9430 pub fn default_instance() -> &'static Self {
9431 static DEFAULT: super::IndexError = super::IndexError::const_default();
9432 &DEFAULT
9433 }
9434 pub fn index_opt_mut(&mut self) -> Option<&mut u32> {
9436 self.index.as_mut().map(|field| field as _)
9437 }
9438 pub fn index_mut(&mut self) -> &mut u32 {
9441 self.index.get_or_insert_default()
9442 }
9443 pub fn index_opt(&self) -> Option<u32> {
9445 self.index.as_ref().map(|field| *field)
9446 }
9447 pub fn set_index(&mut self, field: u32) {
9449 self.index = Some(field);
9450 }
9451 pub fn with_index(mut self, field: u32) -> Self {
9453 self.set_index(field);
9454 self
9455 }
9456 pub fn subresult_opt_mut(&mut self) -> Option<&mut u32> {
9458 self.subresult.as_mut().map(|field| field as _)
9459 }
9460 pub fn subresult_mut(&mut self) -> &mut u32 {
9463 self.subresult.get_or_insert_default()
9464 }
9465 pub fn subresult_opt(&self) -> Option<u32> {
9467 self.subresult.as_ref().map(|field| *field)
9468 }
9469 pub fn set_subresult(&mut self, field: u32) {
9471 self.subresult = Some(field);
9472 }
9473 pub fn with_subresult(mut self, field: u32) -> Self {
9475 self.set_subresult(field);
9476 self
9477 }
9478 }
9479 impl super::Input {
9480 pub const fn const_default() -> Self {
9481 Self {
9482 kind: None,
9483 pure: None,
9484 object_id: None,
9485 version: None,
9486 digest: None,
9487 mutable: None,
9488 mutability: None,
9489 funds_withdrawal: None,
9490 literal: None,
9491 }
9492 }
9493 #[doc(hidden)]
9494 pub fn default_instance() -> &'static Self {
9495 static DEFAULT: super::Input = super::Input::const_default();
9496 &DEFAULT
9497 }
9498 pub fn with_kind<T: Into<super::input::InputKind>>(mut self, field: T) -> Self {
9500 self.set_kind(field.into());
9501 self
9502 }
9503 pub fn pure_opt(&self) -> Option<&[u8]> {
9505 self.pure.as_ref().map(|field| field as _)
9506 }
9507 pub fn set_pure<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9509 self.pure = Some(field.into().into());
9510 }
9511 pub fn with_pure<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
9513 self.set_pure(field.into());
9514 self
9515 }
9516 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
9518 self.object_id.as_mut().map(|field| field as _)
9519 }
9520 pub fn object_id_mut(&mut self) -> &mut String {
9523 self.object_id.get_or_insert_default()
9524 }
9525 pub fn object_id_opt(&self) -> Option<&str> {
9527 self.object_id.as_ref().map(|field| field as _)
9528 }
9529 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
9531 self.object_id = Some(field.into().into());
9532 }
9533 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
9535 self.set_object_id(field.into());
9536 self
9537 }
9538 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
9540 self.version.as_mut().map(|field| field as _)
9541 }
9542 pub fn version_mut(&mut self) -> &mut u64 {
9545 self.version.get_or_insert_default()
9546 }
9547 pub fn version_opt(&self) -> Option<u64> {
9549 self.version.as_ref().map(|field| *field)
9550 }
9551 pub fn set_version(&mut self, field: u64) {
9553 self.version = Some(field);
9554 }
9555 pub fn with_version(mut self, field: u64) -> Self {
9557 self.set_version(field);
9558 self
9559 }
9560 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
9562 self.digest.as_mut().map(|field| field as _)
9563 }
9564 pub fn digest_mut(&mut self) -> &mut String {
9567 self.digest.get_or_insert_default()
9568 }
9569 pub fn digest_opt(&self) -> Option<&str> {
9571 self.digest.as_ref().map(|field| field as _)
9572 }
9573 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
9575 self.digest = Some(field.into().into());
9576 }
9577 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
9579 self.set_digest(field.into());
9580 self
9581 }
9582 pub fn mutable_opt_mut(&mut self) -> Option<&mut bool> {
9584 self.mutable.as_mut().map(|field| field as _)
9585 }
9586 pub fn mutable_mut(&mut self) -> &mut bool {
9589 self.mutable.get_or_insert_default()
9590 }
9591 pub fn mutable_opt(&self) -> Option<bool> {
9593 self.mutable.as_ref().map(|field| *field)
9594 }
9595 pub fn set_mutable(&mut self, field: bool) {
9597 self.mutable = Some(field);
9598 }
9599 pub fn with_mutable(mut self, field: bool) -> Self {
9601 self.set_mutable(field);
9602 self
9603 }
9604 pub fn with_mutability<T: Into<super::input::Mutability>>(
9606 mut self,
9607 field: T,
9608 ) -> Self {
9609 self.set_mutability(field.into());
9610 self
9611 }
9612 pub fn funds_withdrawal(&self) -> &super::FundsWithdrawal {
9614 self.funds_withdrawal
9615 .as_ref()
9616 .map(|field| field as _)
9617 .unwrap_or_else(|| super::FundsWithdrawal::default_instance() as _)
9618 }
9619 pub fn funds_withdrawal_opt_mut(
9621 &mut self,
9622 ) -> Option<&mut super::FundsWithdrawal> {
9623 self.funds_withdrawal.as_mut().map(|field| field as _)
9624 }
9625 pub fn funds_withdrawal_mut(&mut self) -> &mut super::FundsWithdrawal {
9628 self.funds_withdrawal.get_or_insert_default()
9629 }
9630 pub fn funds_withdrawal_opt(&self) -> Option<&super::FundsWithdrawal> {
9632 self.funds_withdrawal.as_ref().map(|field| field as _)
9633 }
9634 pub fn set_funds_withdrawal<T: Into<super::FundsWithdrawal>>(
9636 &mut self,
9637 field: T,
9638 ) {
9639 self.funds_withdrawal = Some(field.into().into());
9640 }
9641 pub fn with_funds_withdrawal<T: Into<super::FundsWithdrawal>>(
9643 mut self,
9644 field: T,
9645 ) -> Self {
9646 self.set_funds_withdrawal(field.into());
9647 self
9648 }
9649 pub fn literal_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
9651 self.literal.as_mut().map(|field| field as _)
9652 }
9653 pub fn literal_mut(&mut self) -> &mut ::prost_types::Value {
9656 self.literal.get_or_insert_default()
9657 }
9658 pub fn literal_opt(&self) -> Option<&::prost_types::Value> {
9660 self.literal.as_ref().map(|field| field as _)
9661 }
9662 pub fn set_literal<T: Into<::prost_types::Value>>(&mut self, field: T) {
9664 self.literal = Some(field.into().into());
9665 }
9666 pub fn with_literal<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
9668 self.set_literal(field.into());
9669 self
9670 }
9671 }
9672 impl super::Jwk {
9673 pub const fn const_default() -> Self {
9674 Self {
9675 kty: None,
9676 e: None,
9677 n: None,
9678 alg: None,
9679 }
9680 }
9681 #[doc(hidden)]
9682 pub fn default_instance() -> &'static Self {
9683 static DEFAULT: super::Jwk = super::Jwk::const_default();
9684 &DEFAULT
9685 }
9686 pub fn kty_opt_mut(&mut self) -> Option<&mut String> {
9688 self.kty.as_mut().map(|field| field as _)
9689 }
9690 pub fn kty_mut(&mut self) -> &mut String {
9693 self.kty.get_or_insert_default()
9694 }
9695 pub fn kty_opt(&self) -> Option<&str> {
9697 self.kty.as_ref().map(|field| field as _)
9698 }
9699 pub fn set_kty<T: Into<String>>(&mut self, field: T) {
9701 self.kty = Some(field.into().into());
9702 }
9703 pub fn with_kty<T: Into<String>>(mut self, field: T) -> Self {
9705 self.set_kty(field.into());
9706 self
9707 }
9708 pub fn e_opt_mut(&mut self) -> Option<&mut String> {
9710 self.e.as_mut().map(|field| field as _)
9711 }
9712 pub fn e_mut(&mut self) -> &mut String {
9715 self.e.get_or_insert_default()
9716 }
9717 pub fn e_opt(&self) -> Option<&str> {
9719 self.e.as_ref().map(|field| field as _)
9720 }
9721 pub fn set_e<T: Into<String>>(&mut self, field: T) {
9723 self.e = Some(field.into().into());
9724 }
9725 pub fn with_e<T: Into<String>>(mut self, field: T) -> Self {
9727 self.set_e(field.into());
9728 self
9729 }
9730 pub fn n_opt_mut(&mut self) -> Option<&mut String> {
9732 self.n.as_mut().map(|field| field as _)
9733 }
9734 pub fn n_mut(&mut self) -> &mut String {
9737 self.n.get_or_insert_default()
9738 }
9739 pub fn n_opt(&self) -> Option<&str> {
9741 self.n.as_ref().map(|field| field as _)
9742 }
9743 pub fn set_n<T: Into<String>>(&mut self, field: T) {
9745 self.n = Some(field.into().into());
9746 }
9747 pub fn with_n<T: Into<String>>(mut self, field: T) -> Self {
9749 self.set_n(field.into());
9750 self
9751 }
9752 pub fn alg_opt_mut(&mut self) -> Option<&mut String> {
9754 self.alg.as_mut().map(|field| field as _)
9755 }
9756 pub fn alg_mut(&mut self) -> &mut String {
9759 self.alg.get_or_insert_default()
9760 }
9761 pub fn alg_opt(&self) -> Option<&str> {
9763 self.alg.as_ref().map(|field| field as _)
9764 }
9765 pub fn set_alg<T: Into<String>>(&mut self, field: T) {
9767 self.alg = Some(field.into().into());
9768 }
9769 pub fn with_alg<T: Into<String>>(mut self, field: T) -> Self {
9771 self.set_alg(field.into());
9772 self
9773 }
9774 }
9775 impl super::JwkId {
9776 pub const fn const_default() -> Self {
9777 Self { iss: None, kid: None }
9778 }
9779 #[doc(hidden)]
9780 pub fn default_instance() -> &'static Self {
9781 static DEFAULT: super::JwkId = super::JwkId::const_default();
9782 &DEFAULT
9783 }
9784 pub fn iss_opt_mut(&mut self) -> Option<&mut String> {
9786 self.iss.as_mut().map(|field| field as _)
9787 }
9788 pub fn iss_mut(&mut self) -> &mut String {
9791 self.iss.get_or_insert_default()
9792 }
9793 pub fn iss_opt(&self) -> Option<&str> {
9795 self.iss.as_ref().map(|field| field as _)
9796 }
9797 pub fn set_iss<T: Into<String>>(&mut self, field: T) {
9799 self.iss = Some(field.into().into());
9800 }
9801 pub fn with_iss<T: Into<String>>(mut self, field: T) -> Self {
9803 self.set_iss(field.into());
9804 self
9805 }
9806 pub fn kid_opt_mut(&mut self) -> Option<&mut String> {
9808 self.kid.as_mut().map(|field| field as _)
9809 }
9810 pub fn kid_mut(&mut self) -> &mut String {
9813 self.kid.get_or_insert_default()
9814 }
9815 pub fn kid_opt(&self) -> Option<&str> {
9817 self.kid.as_ref().map(|field| field as _)
9818 }
9819 pub fn set_kid<T: Into<String>>(&mut self, field: T) {
9821 self.kid = Some(field.into().into());
9822 }
9823 pub fn with_kid<T: Into<String>>(mut self, field: T) -> Self {
9825 self.set_kid(field.into());
9826 self
9827 }
9828 }
9829 impl super::Linkage {
9830 pub const fn const_default() -> Self {
9831 Self {
9832 original_id: None,
9833 upgraded_id: None,
9834 upgraded_version: None,
9835 }
9836 }
9837 #[doc(hidden)]
9838 pub fn default_instance() -> &'static Self {
9839 static DEFAULT: super::Linkage = super::Linkage::const_default();
9840 &DEFAULT
9841 }
9842 pub fn original_id_opt_mut(&mut self) -> Option<&mut String> {
9844 self.original_id.as_mut().map(|field| field as _)
9845 }
9846 pub fn original_id_mut(&mut self) -> &mut String {
9849 self.original_id.get_or_insert_default()
9850 }
9851 pub fn original_id_opt(&self) -> Option<&str> {
9853 self.original_id.as_ref().map(|field| field as _)
9854 }
9855 pub fn set_original_id<T: Into<String>>(&mut self, field: T) {
9857 self.original_id = Some(field.into().into());
9858 }
9859 pub fn with_original_id<T: Into<String>>(mut self, field: T) -> Self {
9861 self.set_original_id(field.into());
9862 self
9863 }
9864 pub fn upgraded_id_opt_mut(&mut self) -> Option<&mut String> {
9866 self.upgraded_id.as_mut().map(|field| field as _)
9867 }
9868 pub fn upgraded_id_mut(&mut self) -> &mut String {
9871 self.upgraded_id.get_or_insert_default()
9872 }
9873 pub fn upgraded_id_opt(&self) -> Option<&str> {
9875 self.upgraded_id.as_ref().map(|field| field as _)
9876 }
9877 pub fn set_upgraded_id<T: Into<String>>(&mut self, field: T) {
9879 self.upgraded_id = Some(field.into().into());
9880 }
9881 pub fn with_upgraded_id<T: Into<String>>(mut self, field: T) -> Self {
9883 self.set_upgraded_id(field.into());
9884 self
9885 }
9886 pub fn upgraded_version_opt_mut(&mut self) -> Option<&mut u64> {
9888 self.upgraded_version.as_mut().map(|field| field as _)
9889 }
9890 pub fn upgraded_version_mut(&mut self) -> &mut u64 {
9893 self.upgraded_version.get_or_insert_default()
9894 }
9895 pub fn upgraded_version_opt(&self) -> Option<u64> {
9897 self.upgraded_version.as_ref().map(|field| *field)
9898 }
9899 pub fn set_upgraded_version(&mut self, field: u64) {
9901 self.upgraded_version = Some(field);
9902 }
9903 pub fn with_upgraded_version(mut self, field: u64) -> Self {
9905 self.set_upgraded_version(field);
9906 self
9907 }
9908 }
9909 impl super::ListBalancesRequest {
9910 pub const fn const_default() -> Self {
9911 Self {
9912 owner: None,
9913 page_size: None,
9914 page_token: None,
9915 }
9916 }
9917 #[doc(hidden)]
9918 pub fn default_instance() -> &'static Self {
9919 static DEFAULT: super::ListBalancesRequest = super::ListBalancesRequest::const_default();
9920 &DEFAULT
9921 }
9922 pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
9924 self.owner.as_mut().map(|field| field as _)
9925 }
9926 pub fn owner_mut(&mut self) -> &mut String {
9929 self.owner.get_or_insert_default()
9930 }
9931 pub fn owner_opt(&self) -> Option<&str> {
9933 self.owner.as_ref().map(|field| field as _)
9934 }
9935 pub fn set_owner<T: Into<String>>(&mut self, field: T) {
9937 self.owner = Some(field.into().into());
9938 }
9939 pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
9941 self.set_owner(field.into());
9942 self
9943 }
9944 pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
9946 self.page_size.as_mut().map(|field| field as _)
9947 }
9948 pub fn page_size_mut(&mut self) -> &mut u32 {
9951 self.page_size.get_or_insert_default()
9952 }
9953 pub fn page_size_opt(&self) -> Option<u32> {
9955 self.page_size.as_ref().map(|field| *field)
9956 }
9957 pub fn set_page_size(&mut self, field: u32) {
9959 self.page_size = Some(field);
9960 }
9961 pub fn with_page_size(mut self, field: u32) -> Self {
9963 self.set_page_size(field);
9964 self
9965 }
9966 pub fn page_token_opt(&self) -> Option<&[u8]> {
9968 self.page_token.as_ref().map(|field| field as _)
9969 }
9970 pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9972 self.page_token = Some(field.into().into());
9973 }
9974 pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
9976 mut self,
9977 field: T,
9978 ) -> Self {
9979 self.set_page_token(field.into());
9980 self
9981 }
9982 }
9983 impl super::ListBalancesResponse {
9984 pub const fn const_default() -> Self {
9985 Self {
9986 balances: Vec::new(),
9987 next_page_token: None,
9988 }
9989 }
9990 #[doc(hidden)]
9991 pub fn default_instance() -> &'static Self {
9992 static DEFAULT: super::ListBalancesResponse = super::ListBalancesResponse::const_default();
9993 &DEFAULT
9994 }
9995 pub fn balances(&self) -> &[super::Balance] {
9997 &self.balances
9998 }
9999 pub fn balances_mut(&mut self) -> &mut Vec<super::Balance> {
10002 &mut self.balances
10003 }
10004 pub fn set_balances(&mut self, field: Vec<super::Balance>) {
10006 self.balances = field;
10007 }
10008 pub fn with_balances(mut self, field: Vec<super::Balance>) -> Self {
10010 self.set_balances(field);
10011 self
10012 }
10013 pub fn next_page_token_opt(&self) -> Option<&[u8]> {
10015 self.next_page_token.as_ref().map(|field| field as _)
10016 }
10017 pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10019 self.next_page_token = Some(field.into().into());
10020 }
10021 pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
10023 mut self,
10024 field: T,
10025 ) -> Self {
10026 self.set_next_page_token(field.into());
10027 self
10028 }
10029 }
10030 impl super::ListCheckpointsRequest {
10031 pub const fn const_default() -> Self {
10032 Self {
10033 read_mask: None,
10034 start_checkpoint: None,
10035 end_checkpoint: None,
10036 filter: None,
10037 options: None,
10038 }
10039 }
10040 #[doc(hidden)]
10041 pub fn default_instance() -> &'static Self {
10042 static DEFAULT: super::ListCheckpointsRequest = super::ListCheckpointsRequest::const_default();
10043 &DEFAULT
10044 }
10045 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
10047 self.read_mask.as_mut().map(|field| field as _)
10048 }
10049 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
10052 self.read_mask.get_or_insert_default()
10053 }
10054 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
10056 self.read_mask.as_ref().map(|field| field as _)
10057 }
10058 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
10060 self.read_mask = Some(field.into().into());
10061 }
10062 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
10064 mut self,
10065 field: T,
10066 ) -> Self {
10067 self.set_read_mask(field.into());
10068 self
10069 }
10070 pub fn start_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
10072 self.start_checkpoint.as_mut().map(|field| field as _)
10073 }
10074 pub fn start_checkpoint_mut(&mut self) -> &mut u64 {
10077 self.start_checkpoint.get_or_insert_default()
10078 }
10079 pub fn start_checkpoint_opt(&self) -> Option<u64> {
10081 self.start_checkpoint.as_ref().map(|field| *field)
10082 }
10083 pub fn set_start_checkpoint(&mut self, field: u64) {
10085 self.start_checkpoint = Some(field);
10086 }
10087 pub fn with_start_checkpoint(mut self, field: u64) -> Self {
10089 self.set_start_checkpoint(field);
10090 self
10091 }
10092 pub fn end_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
10094 self.end_checkpoint.as_mut().map(|field| field as _)
10095 }
10096 pub fn end_checkpoint_mut(&mut self) -> &mut u64 {
10099 self.end_checkpoint.get_or_insert_default()
10100 }
10101 pub fn end_checkpoint_opt(&self) -> Option<u64> {
10103 self.end_checkpoint.as_ref().map(|field| *field)
10104 }
10105 pub fn set_end_checkpoint(&mut self, field: u64) {
10107 self.end_checkpoint = Some(field);
10108 }
10109 pub fn with_end_checkpoint(mut self, field: u64) -> Self {
10111 self.set_end_checkpoint(field);
10112 self
10113 }
10114 pub fn filter(&self) -> &super::TransactionFilter {
10116 self.filter
10117 .as_ref()
10118 .map(|field| field as _)
10119 .unwrap_or_else(|| super::TransactionFilter::default_instance() as _)
10120 }
10121 pub fn filter_opt_mut(&mut self) -> Option<&mut super::TransactionFilter> {
10123 self.filter.as_mut().map(|field| field as _)
10124 }
10125 pub fn filter_mut(&mut self) -> &mut super::TransactionFilter {
10128 self.filter.get_or_insert_default()
10129 }
10130 pub fn filter_opt(&self) -> Option<&super::TransactionFilter> {
10132 self.filter.as_ref().map(|field| field as _)
10133 }
10134 pub fn set_filter<T: Into<super::TransactionFilter>>(&mut self, field: T) {
10136 self.filter = Some(field.into().into());
10137 }
10138 pub fn with_filter<T: Into<super::TransactionFilter>>(
10140 mut self,
10141 field: T,
10142 ) -> Self {
10143 self.set_filter(field.into());
10144 self
10145 }
10146 pub fn options(&self) -> &super::QueryOptions {
10148 self.options
10149 .as_ref()
10150 .map(|field| field as _)
10151 .unwrap_or_else(|| super::QueryOptions::default_instance() as _)
10152 }
10153 pub fn options_opt_mut(&mut self) -> Option<&mut super::QueryOptions> {
10155 self.options.as_mut().map(|field| field as _)
10156 }
10157 pub fn options_mut(&mut self) -> &mut super::QueryOptions {
10160 self.options.get_or_insert_default()
10161 }
10162 pub fn options_opt(&self) -> Option<&super::QueryOptions> {
10164 self.options.as_ref().map(|field| field as _)
10165 }
10166 pub fn set_options<T: Into<super::QueryOptions>>(&mut self, field: T) {
10168 self.options = Some(field.into().into());
10169 }
10170 pub fn with_options<T: Into<super::QueryOptions>>(mut self, field: T) -> Self {
10172 self.set_options(field.into());
10173 self
10174 }
10175 }
10176 impl super::ListCheckpointsResponse {
10177 pub const fn const_default() -> Self {
10178 Self {
10179 checkpoint: None,
10180 watermark: None,
10181 end: None,
10182 }
10183 }
10184 #[doc(hidden)]
10185 pub fn default_instance() -> &'static Self {
10186 static DEFAULT: super::ListCheckpointsResponse = super::ListCheckpointsResponse::const_default();
10187 &DEFAULT
10188 }
10189 pub fn checkpoint(&self) -> &super::Checkpoint {
10191 self.checkpoint
10192 .as_ref()
10193 .map(|field| field as _)
10194 .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
10195 }
10196 pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
10198 self.checkpoint.as_mut().map(|field| field as _)
10199 }
10200 pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
10203 self.checkpoint.get_or_insert_default()
10204 }
10205 pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
10207 self.checkpoint.as_ref().map(|field| field as _)
10208 }
10209 pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
10211 self.checkpoint = Some(field.into().into());
10212 }
10213 pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
10215 self.set_checkpoint(field.into());
10216 self
10217 }
10218 pub fn watermark(&self) -> &super::Watermark {
10220 self.watermark
10221 .as_ref()
10222 .map(|field| field as _)
10223 .unwrap_or_else(|| super::Watermark::default_instance() as _)
10224 }
10225 pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
10227 self.watermark.as_mut().map(|field| field as _)
10228 }
10229 pub fn watermark_mut(&mut self) -> &mut super::Watermark {
10232 self.watermark.get_or_insert_default()
10233 }
10234 pub fn watermark_opt(&self) -> Option<&super::Watermark> {
10236 self.watermark.as_ref().map(|field| field as _)
10237 }
10238 pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
10240 self.watermark = Some(field.into().into());
10241 }
10242 pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
10244 self.set_watermark(field.into());
10245 self
10246 }
10247 pub fn end(&self) -> &super::QueryEnd {
10249 self.end
10250 .as_ref()
10251 .map(|field| field as _)
10252 .unwrap_or_else(|| super::QueryEnd::default_instance() as _)
10253 }
10254 pub fn end_opt_mut(&mut self) -> Option<&mut super::QueryEnd> {
10256 self.end.as_mut().map(|field| field as _)
10257 }
10258 pub fn end_mut(&mut self) -> &mut super::QueryEnd {
10261 self.end.get_or_insert_default()
10262 }
10263 pub fn end_opt(&self) -> Option<&super::QueryEnd> {
10265 self.end.as_ref().map(|field| field as _)
10266 }
10267 pub fn set_end<T: Into<super::QueryEnd>>(&mut self, field: T) {
10269 self.end = Some(field.into().into());
10270 }
10271 pub fn with_end<T: Into<super::QueryEnd>>(mut self, field: T) -> Self {
10273 self.set_end(field.into());
10274 self
10275 }
10276 }
10277 impl super::ListDynamicFieldsRequest {
10278 pub const fn const_default() -> Self {
10279 Self {
10280 parent: None,
10281 page_size: None,
10282 page_token: None,
10283 read_mask: None,
10284 }
10285 }
10286 #[doc(hidden)]
10287 pub fn default_instance() -> &'static Self {
10288 static DEFAULT: super::ListDynamicFieldsRequest = super::ListDynamicFieldsRequest::const_default();
10289 &DEFAULT
10290 }
10291 pub fn parent_opt_mut(&mut self) -> Option<&mut String> {
10293 self.parent.as_mut().map(|field| field as _)
10294 }
10295 pub fn parent_mut(&mut self) -> &mut String {
10298 self.parent.get_or_insert_default()
10299 }
10300 pub fn parent_opt(&self) -> Option<&str> {
10302 self.parent.as_ref().map(|field| field as _)
10303 }
10304 pub fn set_parent<T: Into<String>>(&mut self, field: T) {
10306 self.parent = Some(field.into().into());
10307 }
10308 pub fn with_parent<T: Into<String>>(mut self, field: T) -> Self {
10310 self.set_parent(field.into());
10311 self
10312 }
10313 pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
10315 self.page_size.as_mut().map(|field| field as _)
10316 }
10317 pub fn page_size_mut(&mut self) -> &mut u32 {
10320 self.page_size.get_or_insert_default()
10321 }
10322 pub fn page_size_opt(&self) -> Option<u32> {
10324 self.page_size.as_ref().map(|field| *field)
10325 }
10326 pub fn set_page_size(&mut self, field: u32) {
10328 self.page_size = Some(field);
10329 }
10330 pub fn with_page_size(mut self, field: u32) -> Self {
10332 self.set_page_size(field);
10333 self
10334 }
10335 pub fn page_token_opt(&self) -> Option<&[u8]> {
10337 self.page_token.as_ref().map(|field| field as _)
10338 }
10339 pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10341 self.page_token = Some(field.into().into());
10342 }
10343 pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
10345 mut self,
10346 field: T,
10347 ) -> Self {
10348 self.set_page_token(field.into());
10349 self
10350 }
10351 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
10353 self.read_mask.as_mut().map(|field| field as _)
10354 }
10355 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
10358 self.read_mask.get_or_insert_default()
10359 }
10360 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
10362 self.read_mask.as_ref().map(|field| field as _)
10363 }
10364 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
10366 self.read_mask = Some(field.into().into());
10367 }
10368 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
10370 mut self,
10371 field: T,
10372 ) -> Self {
10373 self.set_read_mask(field.into());
10374 self
10375 }
10376 }
10377 impl super::ListDynamicFieldsResponse {
10378 pub const fn const_default() -> Self {
10379 Self {
10380 dynamic_fields: Vec::new(),
10381 next_page_token: None,
10382 }
10383 }
10384 #[doc(hidden)]
10385 pub fn default_instance() -> &'static Self {
10386 static DEFAULT: super::ListDynamicFieldsResponse = super::ListDynamicFieldsResponse::const_default();
10387 &DEFAULT
10388 }
10389 pub fn dynamic_fields(&self) -> &[super::DynamicField] {
10391 &self.dynamic_fields
10392 }
10393 pub fn dynamic_fields_mut(&mut self) -> &mut Vec<super::DynamicField> {
10396 &mut self.dynamic_fields
10397 }
10398 pub fn set_dynamic_fields(&mut self, field: Vec<super::DynamicField>) {
10400 self.dynamic_fields = field;
10401 }
10402 pub fn with_dynamic_fields(mut self, field: Vec<super::DynamicField>) -> Self {
10404 self.set_dynamic_fields(field);
10405 self
10406 }
10407 pub fn next_page_token_opt(&self) -> Option<&[u8]> {
10409 self.next_page_token.as_ref().map(|field| field as _)
10410 }
10411 pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10413 self.next_page_token = Some(field.into().into());
10414 }
10415 pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
10417 mut self,
10418 field: T,
10419 ) -> Self {
10420 self.set_next_page_token(field.into());
10421 self
10422 }
10423 }
10424 impl super::ListEventsRequest {
10425 pub const fn const_default() -> Self {
10426 Self {
10427 read_mask: None,
10428 start_checkpoint: None,
10429 end_checkpoint: None,
10430 filter: None,
10431 options: None,
10432 }
10433 }
10434 #[doc(hidden)]
10435 pub fn default_instance() -> &'static Self {
10436 static DEFAULT: super::ListEventsRequest = super::ListEventsRequest::const_default();
10437 &DEFAULT
10438 }
10439 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
10441 self.read_mask.as_mut().map(|field| field as _)
10442 }
10443 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
10446 self.read_mask.get_or_insert_default()
10447 }
10448 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
10450 self.read_mask.as_ref().map(|field| field as _)
10451 }
10452 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
10454 self.read_mask = Some(field.into().into());
10455 }
10456 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
10458 mut self,
10459 field: T,
10460 ) -> Self {
10461 self.set_read_mask(field.into());
10462 self
10463 }
10464 pub fn start_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
10466 self.start_checkpoint.as_mut().map(|field| field as _)
10467 }
10468 pub fn start_checkpoint_mut(&mut self) -> &mut u64 {
10471 self.start_checkpoint.get_or_insert_default()
10472 }
10473 pub fn start_checkpoint_opt(&self) -> Option<u64> {
10475 self.start_checkpoint.as_ref().map(|field| *field)
10476 }
10477 pub fn set_start_checkpoint(&mut self, field: u64) {
10479 self.start_checkpoint = Some(field);
10480 }
10481 pub fn with_start_checkpoint(mut self, field: u64) -> Self {
10483 self.set_start_checkpoint(field);
10484 self
10485 }
10486 pub fn end_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
10488 self.end_checkpoint.as_mut().map(|field| field as _)
10489 }
10490 pub fn end_checkpoint_mut(&mut self) -> &mut u64 {
10493 self.end_checkpoint.get_or_insert_default()
10494 }
10495 pub fn end_checkpoint_opt(&self) -> Option<u64> {
10497 self.end_checkpoint.as_ref().map(|field| *field)
10498 }
10499 pub fn set_end_checkpoint(&mut self, field: u64) {
10501 self.end_checkpoint = Some(field);
10502 }
10503 pub fn with_end_checkpoint(mut self, field: u64) -> Self {
10505 self.set_end_checkpoint(field);
10506 self
10507 }
10508 pub fn filter(&self) -> &super::EventFilter {
10510 self.filter
10511 .as_ref()
10512 .map(|field| field as _)
10513 .unwrap_or_else(|| super::EventFilter::default_instance() as _)
10514 }
10515 pub fn filter_opt_mut(&mut self) -> Option<&mut super::EventFilter> {
10517 self.filter.as_mut().map(|field| field as _)
10518 }
10519 pub fn filter_mut(&mut self) -> &mut super::EventFilter {
10522 self.filter.get_or_insert_default()
10523 }
10524 pub fn filter_opt(&self) -> Option<&super::EventFilter> {
10526 self.filter.as_ref().map(|field| field as _)
10527 }
10528 pub fn set_filter<T: Into<super::EventFilter>>(&mut self, field: T) {
10530 self.filter = Some(field.into().into());
10531 }
10532 pub fn with_filter<T: Into<super::EventFilter>>(mut self, field: T) -> Self {
10534 self.set_filter(field.into());
10535 self
10536 }
10537 pub fn options(&self) -> &super::QueryOptions {
10539 self.options
10540 .as_ref()
10541 .map(|field| field as _)
10542 .unwrap_or_else(|| super::QueryOptions::default_instance() as _)
10543 }
10544 pub fn options_opt_mut(&mut self) -> Option<&mut super::QueryOptions> {
10546 self.options.as_mut().map(|field| field as _)
10547 }
10548 pub fn options_mut(&mut self) -> &mut super::QueryOptions {
10551 self.options.get_or_insert_default()
10552 }
10553 pub fn options_opt(&self) -> Option<&super::QueryOptions> {
10555 self.options.as_ref().map(|field| field as _)
10556 }
10557 pub fn set_options<T: Into<super::QueryOptions>>(&mut self, field: T) {
10559 self.options = Some(field.into().into());
10560 }
10561 pub fn with_options<T: Into<super::QueryOptions>>(mut self, field: T) -> Self {
10563 self.set_options(field.into());
10564 self
10565 }
10566 }
10567 impl super::ListEventsResponse {
10568 pub const fn const_default() -> Self {
10569 Self {
10570 event: None,
10571 watermark: None,
10572 end: None,
10573 }
10574 }
10575 #[doc(hidden)]
10576 pub fn default_instance() -> &'static Self {
10577 static DEFAULT: super::ListEventsResponse = super::ListEventsResponse::const_default();
10578 &DEFAULT
10579 }
10580 pub fn event(&self) -> &super::Event {
10582 self.event
10583 .as_ref()
10584 .map(|field| field as _)
10585 .unwrap_or_else(|| super::Event::default_instance() as _)
10586 }
10587 pub fn event_opt_mut(&mut self) -> Option<&mut super::Event> {
10589 self.event.as_mut().map(|field| field as _)
10590 }
10591 pub fn event_mut(&mut self) -> &mut super::Event {
10594 self.event.get_or_insert_default()
10595 }
10596 pub fn event_opt(&self) -> Option<&super::Event> {
10598 self.event.as_ref().map(|field| field as _)
10599 }
10600 pub fn set_event<T: Into<super::Event>>(&mut self, field: T) {
10602 self.event = Some(field.into().into());
10603 }
10604 pub fn with_event<T: Into<super::Event>>(mut self, field: T) -> Self {
10606 self.set_event(field.into());
10607 self
10608 }
10609 pub fn watermark(&self) -> &super::Watermark {
10611 self.watermark
10612 .as_ref()
10613 .map(|field| field as _)
10614 .unwrap_or_else(|| super::Watermark::default_instance() as _)
10615 }
10616 pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
10618 self.watermark.as_mut().map(|field| field as _)
10619 }
10620 pub fn watermark_mut(&mut self) -> &mut super::Watermark {
10623 self.watermark.get_or_insert_default()
10624 }
10625 pub fn watermark_opt(&self) -> Option<&super::Watermark> {
10627 self.watermark.as_ref().map(|field| field as _)
10628 }
10629 pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
10631 self.watermark = Some(field.into().into());
10632 }
10633 pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
10635 self.set_watermark(field.into());
10636 self
10637 }
10638 pub fn end(&self) -> &super::QueryEnd {
10640 self.end
10641 .as_ref()
10642 .map(|field| field as _)
10643 .unwrap_or_else(|| super::QueryEnd::default_instance() as _)
10644 }
10645 pub fn end_opt_mut(&mut self) -> Option<&mut super::QueryEnd> {
10647 self.end.as_mut().map(|field| field as _)
10648 }
10649 pub fn end_mut(&mut self) -> &mut super::QueryEnd {
10652 self.end.get_or_insert_default()
10653 }
10654 pub fn end_opt(&self) -> Option<&super::QueryEnd> {
10656 self.end.as_ref().map(|field| field as _)
10657 }
10658 pub fn set_end<T: Into<super::QueryEnd>>(&mut self, field: T) {
10660 self.end = Some(field.into().into());
10661 }
10662 pub fn with_end<T: Into<super::QueryEnd>>(mut self, field: T) -> Self {
10664 self.set_end(field.into());
10665 self
10666 }
10667 }
10668 impl super::ListOwnedObjectsRequest {
10669 pub const fn const_default() -> Self {
10670 Self {
10671 owner: None,
10672 page_size: None,
10673 page_token: None,
10674 read_mask: None,
10675 object_type: None,
10676 }
10677 }
10678 #[doc(hidden)]
10679 pub fn default_instance() -> &'static Self {
10680 static DEFAULT: super::ListOwnedObjectsRequest = super::ListOwnedObjectsRequest::const_default();
10681 &DEFAULT
10682 }
10683 pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
10685 self.owner.as_mut().map(|field| field as _)
10686 }
10687 pub fn owner_mut(&mut self) -> &mut String {
10690 self.owner.get_or_insert_default()
10691 }
10692 pub fn owner_opt(&self) -> Option<&str> {
10694 self.owner.as_ref().map(|field| field as _)
10695 }
10696 pub fn set_owner<T: Into<String>>(&mut self, field: T) {
10698 self.owner = Some(field.into().into());
10699 }
10700 pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
10702 self.set_owner(field.into());
10703 self
10704 }
10705 pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
10707 self.page_size.as_mut().map(|field| field as _)
10708 }
10709 pub fn page_size_mut(&mut self) -> &mut u32 {
10712 self.page_size.get_or_insert_default()
10713 }
10714 pub fn page_size_opt(&self) -> Option<u32> {
10716 self.page_size.as_ref().map(|field| *field)
10717 }
10718 pub fn set_page_size(&mut self, field: u32) {
10720 self.page_size = Some(field);
10721 }
10722 pub fn with_page_size(mut self, field: u32) -> Self {
10724 self.set_page_size(field);
10725 self
10726 }
10727 pub fn page_token_opt(&self) -> Option<&[u8]> {
10729 self.page_token.as_ref().map(|field| field as _)
10730 }
10731 pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10733 self.page_token = Some(field.into().into());
10734 }
10735 pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
10737 mut self,
10738 field: T,
10739 ) -> Self {
10740 self.set_page_token(field.into());
10741 self
10742 }
10743 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
10745 self.read_mask.as_mut().map(|field| field as _)
10746 }
10747 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
10750 self.read_mask.get_or_insert_default()
10751 }
10752 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
10754 self.read_mask.as_ref().map(|field| field as _)
10755 }
10756 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
10758 self.read_mask = Some(field.into().into());
10759 }
10760 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
10762 mut self,
10763 field: T,
10764 ) -> Self {
10765 self.set_read_mask(field.into());
10766 self
10767 }
10768 pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
10770 self.object_type.as_mut().map(|field| field as _)
10771 }
10772 pub fn object_type_mut(&mut self) -> &mut String {
10775 self.object_type.get_or_insert_default()
10776 }
10777 pub fn object_type_opt(&self) -> Option<&str> {
10779 self.object_type.as_ref().map(|field| field as _)
10780 }
10781 pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
10783 self.object_type = Some(field.into().into());
10784 }
10785 pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
10787 self.set_object_type(field.into());
10788 self
10789 }
10790 }
10791 impl super::ListOwnedObjectsResponse {
10792 pub const fn const_default() -> Self {
10793 Self {
10794 objects: Vec::new(),
10795 next_page_token: None,
10796 }
10797 }
10798 #[doc(hidden)]
10799 pub fn default_instance() -> &'static Self {
10800 static DEFAULT: super::ListOwnedObjectsResponse = super::ListOwnedObjectsResponse::const_default();
10801 &DEFAULT
10802 }
10803 pub fn objects(&self) -> &[super::Object] {
10805 &self.objects
10806 }
10807 pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
10810 &mut self.objects
10811 }
10812 pub fn set_objects(&mut self, field: Vec<super::Object>) {
10814 self.objects = field;
10815 }
10816 pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
10818 self.set_objects(field);
10819 self
10820 }
10821 pub fn next_page_token_opt(&self) -> Option<&[u8]> {
10823 self.next_page_token.as_ref().map(|field| field as _)
10824 }
10825 pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10827 self.next_page_token = Some(field.into().into());
10828 }
10829 pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
10831 mut self,
10832 field: T,
10833 ) -> Self {
10834 self.set_next_page_token(field.into());
10835 self
10836 }
10837 }
10838 impl super::ListPackageVersionsRequest {
10839 pub const fn const_default() -> Self {
10840 Self {
10841 package_id: None,
10842 page_size: None,
10843 page_token: None,
10844 }
10845 }
10846 #[doc(hidden)]
10847 pub fn default_instance() -> &'static Self {
10848 static DEFAULT: super::ListPackageVersionsRequest = super::ListPackageVersionsRequest::const_default();
10849 &DEFAULT
10850 }
10851 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
10853 self.package_id.as_mut().map(|field| field as _)
10854 }
10855 pub fn package_id_mut(&mut self) -> &mut String {
10858 self.package_id.get_or_insert_default()
10859 }
10860 pub fn package_id_opt(&self) -> Option<&str> {
10862 self.package_id.as_ref().map(|field| field as _)
10863 }
10864 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
10866 self.package_id = Some(field.into().into());
10867 }
10868 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
10870 self.set_package_id(field.into());
10871 self
10872 }
10873 pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
10875 self.page_size.as_mut().map(|field| field as _)
10876 }
10877 pub fn page_size_mut(&mut self) -> &mut u32 {
10880 self.page_size.get_or_insert_default()
10881 }
10882 pub fn page_size_opt(&self) -> Option<u32> {
10884 self.page_size.as_ref().map(|field| *field)
10885 }
10886 pub fn set_page_size(&mut self, field: u32) {
10888 self.page_size = Some(field);
10889 }
10890 pub fn with_page_size(mut self, field: u32) -> Self {
10892 self.set_page_size(field);
10893 self
10894 }
10895 pub fn page_token_opt(&self) -> Option<&[u8]> {
10897 self.page_token.as_ref().map(|field| field as _)
10898 }
10899 pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10901 self.page_token = Some(field.into().into());
10902 }
10903 pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
10905 mut self,
10906 field: T,
10907 ) -> Self {
10908 self.set_page_token(field.into());
10909 self
10910 }
10911 }
10912 impl super::ListPackageVersionsResponse {
10913 pub const fn const_default() -> Self {
10914 Self {
10915 versions: Vec::new(),
10916 next_page_token: None,
10917 }
10918 }
10919 #[doc(hidden)]
10920 pub fn default_instance() -> &'static Self {
10921 static DEFAULT: super::ListPackageVersionsResponse = super::ListPackageVersionsResponse::const_default();
10922 &DEFAULT
10923 }
10924 pub fn versions(&self) -> &[super::PackageVersion] {
10926 &self.versions
10927 }
10928 pub fn versions_mut(&mut self) -> &mut Vec<super::PackageVersion> {
10931 &mut self.versions
10932 }
10933 pub fn set_versions(&mut self, field: Vec<super::PackageVersion>) {
10935 self.versions = field;
10936 }
10937 pub fn with_versions(mut self, field: Vec<super::PackageVersion>) -> Self {
10939 self.set_versions(field);
10940 self
10941 }
10942 pub fn next_page_token_opt(&self) -> Option<&[u8]> {
10944 self.next_page_token.as_ref().map(|field| field as _)
10945 }
10946 pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10948 self.next_page_token = Some(field.into().into());
10949 }
10950 pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
10952 mut self,
10953 field: T,
10954 ) -> Self {
10955 self.set_next_page_token(field.into());
10956 self
10957 }
10958 }
10959 impl super::ListTransactionsRequest {
10960 pub const fn const_default() -> Self {
10961 Self {
10962 read_mask: None,
10963 start_checkpoint: None,
10964 end_checkpoint: None,
10965 filter: None,
10966 options: None,
10967 }
10968 }
10969 #[doc(hidden)]
10970 pub fn default_instance() -> &'static Self {
10971 static DEFAULT: super::ListTransactionsRequest = super::ListTransactionsRequest::const_default();
10972 &DEFAULT
10973 }
10974 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
10976 self.read_mask.as_mut().map(|field| field as _)
10977 }
10978 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
10981 self.read_mask.get_or_insert_default()
10982 }
10983 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
10985 self.read_mask.as_ref().map(|field| field as _)
10986 }
10987 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
10989 self.read_mask = Some(field.into().into());
10990 }
10991 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
10993 mut self,
10994 field: T,
10995 ) -> Self {
10996 self.set_read_mask(field.into());
10997 self
10998 }
10999 pub fn start_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
11001 self.start_checkpoint.as_mut().map(|field| field as _)
11002 }
11003 pub fn start_checkpoint_mut(&mut self) -> &mut u64 {
11006 self.start_checkpoint.get_or_insert_default()
11007 }
11008 pub fn start_checkpoint_opt(&self) -> Option<u64> {
11010 self.start_checkpoint.as_ref().map(|field| *field)
11011 }
11012 pub fn set_start_checkpoint(&mut self, field: u64) {
11014 self.start_checkpoint = Some(field);
11015 }
11016 pub fn with_start_checkpoint(mut self, field: u64) -> Self {
11018 self.set_start_checkpoint(field);
11019 self
11020 }
11021 pub fn end_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
11023 self.end_checkpoint.as_mut().map(|field| field as _)
11024 }
11025 pub fn end_checkpoint_mut(&mut self) -> &mut u64 {
11028 self.end_checkpoint.get_or_insert_default()
11029 }
11030 pub fn end_checkpoint_opt(&self) -> Option<u64> {
11032 self.end_checkpoint.as_ref().map(|field| *field)
11033 }
11034 pub fn set_end_checkpoint(&mut self, field: u64) {
11036 self.end_checkpoint = Some(field);
11037 }
11038 pub fn with_end_checkpoint(mut self, field: u64) -> Self {
11040 self.set_end_checkpoint(field);
11041 self
11042 }
11043 pub fn filter(&self) -> &super::TransactionFilter {
11045 self.filter
11046 .as_ref()
11047 .map(|field| field as _)
11048 .unwrap_or_else(|| super::TransactionFilter::default_instance() as _)
11049 }
11050 pub fn filter_opt_mut(&mut self) -> Option<&mut super::TransactionFilter> {
11052 self.filter.as_mut().map(|field| field as _)
11053 }
11054 pub fn filter_mut(&mut self) -> &mut super::TransactionFilter {
11057 self.filter.get_or_insert_default()
11058 }
11059 pub fn filter_opt(&self) -> Option<&super::TransactionFilter> {
11061 self.filter.as_ref().map(|field| field as _)
11062 }
11063 pub fn set_filter<T: Into<super::TransactionFilter>>(&mut self, field: T) {
11065 self.filter = Some(field.into().into());
11066 }
11067 pub fn with_filter<T: Into<super::TransactionFilter>>(
11069 mut self,
11070 field: T,
11071 ) -> Self {
11072 self.set_filter(field.into());
11073 self
11074 }
11075 pub fn options(&self) -> &super::QueryOptions {
11077 self.options
11078 .as_ref()
11079 .map(|field| field as _)
11080 .unwrap_or_else(|| super::QueryOptions::default_instance() as _)
11081 }
11082 pub fn options_opt_mut(&mut self) -> Option<&mut super::QueryOptions> {
11084 self.options.as_mut().map(|field| field as _)
11085 }
11086 pub fn options_mut(&mut self) -> &mut super::QueryOptions {
11089 self.options.get_or_insert_default()
11090 }
11091 pub fn options_opt(&self) -> Option<&super::QueryOptions> {
11093 self.options.as_ref().map(|field| field as _)
11094 }
11095 pub fn set_options<T: Into<super::QueryOptions>>(&mut self, field: T) {
11097 self.options = Some(field.into().into());
11098 }
11099 pub fn with_options<T: Into<super::QueryOptions>>(mut self, field: T) -> Self {
11101 self.set_options(field.into());
11102 self
11103 }
11104 }
11105 impl super::ListTransactionsResponse {
11106 pub const fn const_default() -> Self {
11107 Self {
11108 transaction: None,
11109 watermark: None,
11110 end: None,
11111 }
11112 }
11113 #[doc(hidden)]
11114 pub fn default_instance() -> &'static Self {
11115 static DEFAULT: super::ListTransactionsResponse = super::ListTransactionsResponse::const_default();
11116 &DEFAULT
11117 }
11118 pub fn transaction(&self) -> &super::ExecutedTransaction {
11120 self.transaction
11121 .as_ref()
11122 .map(|field| field as _)
11123 .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
11124 }
11125 pub fn transaction_opt_mut(
11127 &mut self,
11128 ) -> Option<&mut super::ExecutedTransaction> {
11129 self.transaction.as_mut().map(|field| field as _)
11130 }
11131 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
11134 self.transaction.get_or_insert_default()
11135 }
11136 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
11138 self.transaction.as_ref().map(|field| field as _)
11139 }
11140 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
11142 &mut self,
11143 field: T,
11144 ) {
11145 self.transaction = Some(field.into().into());
11146 }
11147 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
11149 mut self,
11150 field: T,
11151 ) -> Self {
11152 self.set_transaction(field.into());
11153 self
11154 }
11155 pub fn watermark(&self) -> &super::Watermark {
11157 self.watermark
11158 .as_ref()
11159 .map(|field| field as _)
11160 .unwrap_or_else(|| super::Watermark::default_instance() as _)
11161 }
11162 pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
11164 self.watermark.as_mut().map(|field| field as _)
11165 }
11166 pub fn watermark_mut(&mut self) -> &mut super::Watermark {
11169 self.watermark.get_or_insert_default()
11170 }
11171 pub fn watermark_opt(&self) -> Option<&super::Watermark> {
11173 self.watermark.as_ref().map(|field| field as _)
11174 }
11175 pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
11177 self.watermark = Some(field.into().into());
11178 }
11179 pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
11181 self.set_watermark(field.into());
11182 self
11183 }
11184 pub fn end(&self) -> &super::QueryEnd {
11186 self.end
11187 .as_ref()
11188 .map(|field| field as _)
11189 .unwrap_or_else(|| super::QueryEnd::default_instance() as _)
11190 }
11191 pub fn end_opt_mut(&mut self) -> Option<&mut super::QueryEnd> {
11193 self.end.as_mut().map(|field| field as _)
11194 }
11195 pub fn end_mut(&mut self) -> &mut super::QueryEnd {
11198 self.end.get_or_insert_default()
11199 }
11200 pub fn end_opt(&self) -> Option<&super::QueryEnd> {
11202 self.end.as_ref().map(|field| field as _)
11203 }
11204 pub fn set_end<T: Into<super::QueryEnd>>(&mut self, field: T) {
11206 self.end = Some(field.into().into());
11207 }
11208 pub fn with_end<T: Into<super::QueryEnd>>(mut self, field: T) -> Self {
11210 self.set_end(field.into());
11211 self
11212 }
11213 }
11214 impl super::LookupNameRequest {
11215 pub const fn const_default() -> Self {
11216 Self { name: None }
11217 }
11218 #[doc(hidden)]
11219 pub fn default_instance() -> &'static Self {
11220 static DEFAULT: super::LookupNameRequest = super::LookupNameRequest::const_default();
11221 &DEFAULT
11222 }
11223 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
11225 self.name.as_mut().map(|field| field as _)
11226 }
11227 pub fn name_mut(&mut self) -> &mut String {
11230 self.name.get_or_insert_default()
11231 }
11232 pub fn name_opt(&self) -> Option<&str> {
11234 self.name.as_ref().map(|field| field as _)
11235 }
11236 pub fn set_name<T: Into<String>>(&mut self, field: T) {
11238 self.name = Some(field.into().into());
11239 }
11240 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
11242 self.set_name(field.into());
11243 self
11244 }
11245 }
11246 impl super::LookupNameResponse {
11247 pub const fn const_default() -> Self {
11248 Self { record: None }
11249 }
11250 #[doc(hidden)]
11251 pub fn default_instance() -> &'static Self {
11252 static DEFAULT: super::LookupNameResponse = super::LookupNameResponse::const_default();
11253 &DEFAULT
11254 }
11255 pub fn record(&self) -> &super::NameRecord {
11257 self.record
11258 .as_ref()
11259 .map(|field| field as _)
11260 .unwrap_or_else(|| super::NameRecord::default_instance() as _)
11261 }
11262 pub fn record_opt_mut(&mut self) -> Option<&mut super::NameRecord> {
11264 self.record.as_mut().map(|field| field as _)
11265 }
11266 pub fn record_mut(&mut self) -> &mut super::NameRecord {
11269 self.record.get_or_insert_default()
11270 }
11271 pub fn record_opt(&self) -> Option<&super::NameRecord> {
11273 self.record.as_ref().map(|field| field as _)
11274 }
11275 pub fn set_record<T: Into<super::NameRecord>>(&mut self, field: T) {
11277 self.record = Some(field.into().into());
11278 }
11279 pub fn with_record<T: Into<super::NameRecord>>(mut self, field: T) -> Self {
11281 self.set_record(field.into());
11282 self
11283 }
11284 }
11285 impl super::MakeMoveVector {
11286 pub const fn const_default() -> Self {
11287 Self {
11288 element_type: None,
11289 elements: Vec::new(),
11290 }
11291 }
11292 #[doc(hidden)]
11293 pub fn default_instance() -> &'static Self {
11294 static DEFAULT: super::MakeMoveVector = super::MakeMoveVector::const_default();
11295 &DEFAULT
11296 }
11297 pub fn element_type_opt_mut(&mut self) -> Option<&mut String> {
11299 self.element_type.as_mut().map(|field| field as _)
11300 }
11301 pub fn element_type_mut(&mut self) -> &mut String {
11304 self.element_type.get_or_insert_default()
11305 }
11306 pub fn element_type_opt(&self) -> Option<&str> {
11308 self.element_type.as_ref().map(|field| field as _)
11309 }
11310 pub fn set_element_type<T: Into<String>>(&mut self, field: T) {
11312 self.element_type = Some(field.into().into());
11313 }
11314 pub fn with_element_type<T: Into<String>>(mut self, field: T) -> Self {
11316 self.set_element_type(field.into());
11317 self
11318 }
11319 pub fn elements(&self) -> &[super::Argument] {
11321 &self.elements
11322 }
11323 pub fn elements_mut(&mut self) -> &mut Vec<super::Argument> {
11326 &mut self.elements
11327 }
11328 pub fn set_elements(&mut self, field: Vec<super::Argument>) {
11330 self.elements = field;
11331 }
11332 pub fn with_elements(mut self, field: Vec<super::Argument>) -> Self {
11334 self.set_elements(field);
11335 self
11336 }
11337 }
11338 impl super::MergeCoins {
11339 pub const fn const_default() -> Self {
11340 Self {
11341 coin: None,
11342 coins_to_merge: Vec::new(),
11343 }
11344 }
11345 #[doc(hidden)]
11346 pub fn default_instance() -> &'static Self {
11347 static DEFAULT: super::MergeCoins = super::MergeCoins::const_default();
11348 &DEFAULT
11349 }
11350 pub fn coin(&self) -> &super::Argument {
11352 self.coin
11353 .as_ref()
11354 .map(|field| field as _)
11355 .unwrap_or_else(|| super::Argument::default_instance() as _)
11356 }
11357 pub fn coin_opt_mut(&mut self) -> Option<&mut super::Argument> {
11359 self.coin.as_mut().map(|field| field as _)
11360 }
11361 pub fn coin_mut(&mut self) -> &mut super::Argument {
11364 self.coin.get_or_insert_default()
11365 }
11366 pub fn coin_opt(&self) -> Option<&super::Argument> {
11368 self.coin.as_ref().map(|field| field as _)
11369 }
11370 pub fn set_coin<T: Into<super::Argument>>(&mut self, field: T) {
11372 self.coin = Some(field.into().into());
11373 }
11374 pub fn with_coin<T: Into<super::Argument>>(mut self, field: T) -> Self {
11376 self.set_coin(field.into());
11377 self
11378 }
11379 pub fn coins_to_merge(&self) -> &[super::Argument] {
11381 &self.coins_to_merge
11382 }
11383 pub fn coins_to_merge_mut(&mut self) -> &mut Vec<super::Argument> {
11386 &mut self.coins_to_merge
11387 }
11388 pub fn set_coins_to_merge(&mut self, field: Vec<super::Argument>) {
11390 self.coins_to_merge = field;
11391 }
11392 pub fn with_coins_to_merge(mut self, field: Vec<super::Argument>) -> Self {
11394 self.set_coins_to_merge(field);
11395 self
11396 }
11397 }
11398 impl super::Module {
11399 pub const fn const_default() -> Self {
11400 Self {
11401 name: None,
11402 contents: None,
11403 datatypes: Vec::new(),
11404 functions: Vec::new(),
11405 }
11406 }
11407 #[doc(hidden)]
11408 pub fn default_instance() -> &'static Self {
11409 static DEFAULT: super::Module = super::Module::const_default();
11410 &DEFAULT
11411 }
11412 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
11414 self.name.as_mut().map(|field| field as _)
11415 }
11416 pub fn name_mut(&mut self) -> &mut String {
11419 self.name.get_or_insert_default()
11420 }
11421 pub fn name_opt(&self) -> Option<&str> {
11423 self.name.as_ref().map(|field| field as _)
11424 }
11425 pub fn set_name<T: Into<String>>(&mut self, field: T) {
11427 self.name = Some(field.into().into());
11428 }
11429 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
11431 self.set_name(field.into());
11432 self
11433 }
11434 pub fn contents_opt(&self) -> Option<&[u8]> {
11436 self.contents.as_ref().map(|field| field as _)
11437 }
11438 pub fn set_contents<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
11440 self.contents = Some(field.into().into());
11441 }
11442 pub fn with_contents<T: Into<::prost::bytes::Bytes>>(
11444 mut self,
11445 field: T,
11446 ) -> Self {
11447 self.set_contents(field.into());
11448 self
11449 }
11450 pub fn datatypes(&self) -> &[super::DatatypeDescriptor] {
11452 &self.datatypes
11453 }
11454 pub fn datatypes_mut(&mut self) -> &mut Vec<super::DatatypeDescriptor> {
11457 &mut self.datatypes
11458 }
11459 pub fn set_datatypes(&mut self, field: Vec<super::DatatypeDescriptor>) {
11461 self.datatypes = field;
11462 }
11463 pub fn with_datatypes(mut self, field: Vec<super::DatatypeDescriptor>) -> Self {
11465 self.set_datatypes(field);
11466 self
11467 }
11468 pub fn functions(&self) -> &[super::FunctionDescriptor] {
11470 &self.functions
11471 }
11472 pub fn functions_mut(&mut self) -> &mut Vec<super::FunctionDescriptor> {
11475 &mut self.functions
11476 }
11477 pub fn set_functions(&mut self, field: Vec<super::FunctionDescriptor>) {
11479 self.functions = field;
11480 }
11481 pub fn with_functions(mut self, field: Vec<super::FunctionDescriptor>) -> Self {
11483 self.set_functions(field);
11484 self
11485 }
11486 }
11487 impl super::MoveAbort {
11488 pub const fn const_default() -> Self {
11489 Self {
11490 abort_code: None,
11491 location: None,
11492 clever_error: None,
11493 }
11494 }
11495 #[doc(hidden)]
11496 pub fn default_instance() -> &'static Self {
11497 static DEFAULT: super::MoveAbort = super::MoveAbort::const_default();
11498 &DEFAULT
11499 }
11500 pub fn abort_code_opt_mut(&mut self) -> Option<&mut u64> {
11502 self.abort_code.as_mut().map(|field| field as _)
11503 }
11504 pub fn abort_code_mut(&mut self) -> &mut u64 {
11507 self.abort_code.get_or_insert_default()
11508 }
11509 pub fn abort_code_opt(&self) -> Option<u64> {
11511 self.abort_code.as_ref().map(|field| *field)
11512 }
11513 pub fn set_abort_code(&mut self, field: u64) {
11515 self.abort_code = Some(field);
11516 }
11517 pub fn with_abort_code(mut self, field: u64) -> Self {
11519 self.set_abort_code(field);
11520 self
11521 }
11522 pub fn location(&self) -> &super::MoveLocation {
11524 self.location
11525 .as_ref()
11526 .map(|field| field as _)
11527 .unwrap_or_else(|| super::MoveLocation::default_instance() as _)
11528 }
11529 pub fn location_opt_mut(&mut self) -> Option<&mut super::MoveLocation> {
11531 self.location.as_mut().map(|field| field as _)
11532 }
11533 pub fn location_mut(&mut self) -> &mut super::MoveLocation {
11536 self.location.get_or_insert_default()
11537 }
11538 pub fn location_opt(&self) -> Option<&super::MoveLocation> {
11540 self.location.as_ref().map(|field| field as _)
11541 }
11542 pub fn set_location<T: Into<super::MoveLocation>>(&mut self, field: T) {
11544 self.location = Some(field.into().into());
11545 }
11546 pub fn with_location<T: Into<super::MoveLocation>>(mut self, field: T) -> Self {
11548 self.set_location(field.into());
11549 self
11550 }
11551 pub fn clever_error(&self) -> &super::CleverError {
11553 self.clever_error
11554 .as_ref()
11555 .map(|field| field as _)
11556 .unwrap_or_else(|| super::CleverError::default_instance() as _)
11557 }
11558 pub fn clever_error_opt_mut(&mut self) -> Option<&mut super::CleverError> {
11560 self.clever_error.as_mut().map(|field| field as _)
11561 }
11562 pub fn clever_error_mut(&mut self) -> &mut super::CleverError {
11565 self.clever_error.get_or_insert_default()
11566 }
11567 pub fn clever_error_opt(&self) -> Option<&super::CleverError> {
11569 self.clever_error.as_ref().map(|field| field as _)
11570 }
11571 pub fn set_clever_error<T: Into<super::CleverError>>(&mut self, field: T) {
11573 self.clever_error = Some(field.into().into());
11574 }
11575 pub fn with_clever_error<T: Into<super::CleverError>>(
11577 mut self,
11578 field: T,
11579 ) -> Self {
11580 self.set_clever_error(field.into());
11581 self
11582 }
11583 }
11584 impl super::MoveCall {
11585 pub const fn const_default() -> Self {
11586 Self {
11587 package: None,
11588 module: None,
11589 function: None,
11590 type_arguments: Vec::new(),
11591 arguments: Vec::new(),
11592 }
11593 }
11594 #[doc(hidden)]
11595 pub fn default_instance() -> &'static Self {
11596 static DEFAULT: super::MoveCall = super::MoveCall::const_default();
11597 &DEFAULT
11598 }
11599 pub fn package_opt_mut(&mut self) -> Option<&mut String> {
11601 self.package.as_mut().map(|field| field as _)
11602 }
11603 pub fn package_mut(&mut self) -> &mut String {
11606 self.package.get_or_insert_default()
11607 }
11608 pub fn package_opt(&self) -> Option<&str> {
11610 self.package.as_ref().map(|field| field as _)
11611 }
11612 pub fn set_package<T: Into<String>>(&mut self, field: T) {
11614 self.package = Some(field.into().into());
11615 }
11616 pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
11618 self.set_package(field.into());
11619 self
11620 }
11621 pub fn module_opt_mut(&mut self) -> Option<&mut String> {
11623 self.module.as_mut().map(|field| field as _)
11624 }
11625 pub fn module_mut(&mut self) -> &mut String {
11628 self.module.get_or_insert_default()
11629 }
11630 pub fn module_opt(&self) -> Option<&str> {
11632 self.module.as_ref().map(|field| field as _)
11633 }
11634 pub fn set_module<T: Into<String>>(&mut self, field: T) {
11636 self.module = Some(field.into().into());
11637 }
11638 pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
11640 self.set_module(field.into());
11641 self
11642 }
11643 pub fn function_opt_mut(&mut self) -> Option<&mut String> {
11645 self.function.as_mut().map(|field| field as _)
11646 }
11647 pub fn function_mut(&mut self) -> &mut String {
11650 self.function.get_or_insert_default()
11651 }
11652 pub fn function_opt(&self) -> Option<&str> {
11654 self.function.as_ref().map(|field| field as _)
11655 }
11656 pub fn set_function<T: Into<String>>(&mut self, field: T) {
11658 self.function = Some(field.into().into());
11659 }
11660 pub fn with_function<T: Into<String>>(mut self, field: T) -> Self {
11662 self.set_function(field.into());
11663 self
11664 }
11665 pub fn type_arguments(&self) -> &[String] {
11667 &self.type_arguments
11668 }
11669 pub fn type_arguments_mut(&mut self) -> &mut Vec<String> {
11672 &mut self.type_arguments
11673 }
11674 pub fn set_type_arguments(&mut self, field: Vec<String>) {
11676 self.type_arguments = field;
11677 }
11678 pub fn with_type_arguments(mut self, field: Vec<String>) -> Self {
11680 self.set_type_arguments(field);
11681 self
11682 }
11683 pub fn arguments(&self) -> &[super::Argument] {
11685 &self.arguments
11686 }
11687 pub fn arguments_mut(&mut self) -> &mut Vec<super::Argument> {
11690 &mut self.arguments
11691 }
11692 pub fn set_arguments(&mut self, field: Vec<super::Argument>) {
11694 self.arguments = field;
11695 }
11696 pub fn with_arguments(mut self, field: Vec<super::Argument>) -> Self {
11698 self.set_arguments(field);
11699 self
11700 }
11701 }
11702 impl super::MoveCallFilter {
11703 pub const fn const_default() -> Self {
11704 Self { function: None }
11705 }
11706 #[doc(hidden)]
11707 pub fn default_instance() -> &'static Self {
11708 static DEFAULT: super::MoveCallFilter = super::MoveCallFilter::const_default();
11709 &DEFAULT
11710 }
11711 pub fn function_opt_mut(&mut self) -> Option<&mut String> {
11713 self.function.as_mut().map(|field| field as _)
11714 }
11715 pub fn function_mut(&mut self) -> &mut String {
11718 self.function.get_or_insert_default()
11719 }
11720 pub fn function_opt(&self) -> Option<&str> {
11722 self.function.as_ref().map(|field| field as _)
11723 }
11724 pub fn set_function<T: Into<String>>(&mut self, field: T) {
11726 self.function = Some(field.into().into());
11727 }
11728 pub fn with_function<T: Into<String>>(mut self, field: T) -> Self {
11730 self.set_function(field.into());
11731 self
11732 }
11733 }
11734 impl super::MoveLocation {
11735 pub const fn const_default() -> Self {
11736 Self {
11737 package: None,
11738 module: None,
11739 function: None,
11740 instruction: None,
11741 function_name: None,
11742 }
11743 }
11744 #[doc(hidden)]
11745 pub fn default_instance() -> &'static Self {
11746 static DEFAULT: super::MoveLocation = super::MoveLocation::const_default();
11747 &DEFAULT
11748 }
11749 pub fn package_opt_mut(&mut self) -> Option<&mut String> {
11751 self.package.as_mut().map(|field| field as _)
11752 }
11753 pub fn package_mut(&mut self) -> &mut String {
11756 self.package.get_or_insert_default()
11757 }
11758 pub fn package_opt(&self) -> Option<&str> {
11760 self.package.as_ref().map(|field| field as _)
11761 }
11762 pub fn set_package<T: Into<String>>(&mut self, field: T) {
11764 self.package = Some(field.into().into());
11765 }
11766 pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
11768 self.set_package(field.into());
11769 self
11770 }
11771 pub fn module_opt_mut(&mut self) -> Option<&mut String> {
11773 self.module.as_mut().map(|field| field as _)
11774 }
11775 pub fn module_mut(&mut self) -> &mut String {
11778 self.module.get_or_insert_default()
11779 }
11780 pub fn module_opt(&self) -> Option<&str> {
11782 self.module.as_ref().map(|field| field as _)
11783 }
11784 pub fn set_module<T: Into<String>>(&mut self, field: T) {
11786 self.module = Some(field.into().into());
11787 }
11788 pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
11790 self.set_module(field.into());
11791 self
11792 }
11793 pub fn function_opt_mut(&mut self) -> Option<&mut u32> {
11795 self.function.as_mut().map(|field| field as _)
11796 }
11797 pub fn function_mut(&mut self) -> &mut u32 {
11800 self.function.get_or_insert_default()
11801 }
11802 pub fn function_opt(&self) -> Option<u32> {
11804 self.function.as_ref().map(|field| *field)
11805 }
11806 pub fn set_function(&mut self, field: u32) {
11808 self.function = Some(field);
11809 }
11810 pub fn with_function(mut self, field: u32) -> Self {
11812 self.set_function(field);
11813 self
11814 }
11815 pub fn instruction_opt_mut(&mut self) -> Option<&mut u32> {
11817 self.instruction.as_mut().map(|field| field as _)
11818 }
11819 pub fn instruction_mut(&mut self) -> &mut u32 {
11822 self.instruction.get_or_insert_default()
11823 }
11824 pub fn instruction_opt(&self) -> Option<u32> {
11826 self.instruction.as_ref().map(|field| *field)
11827 }
11828 pub fn set_instruction(&mut self, field: u32) {
11830 self.instruction = Some(field);
11831 }
11832 pub fn with_instruction(mut self, field: u32) -> Self {
11834 self.set_instruction(field);
11835 self
11836 }
11837 pub fn function_name_opt_mut(&mut self) -> Option<&mut String> {
11839 self.function_name.as_mut().map(|field| field as _)
11840 }
11841 pub fn function_name_mut(&mut self) -> &mut String {
11844 self.function_name.get_or_insert_default()
11845 }
11846 pub fn function_name_opt(&self) -> Option<&str> {
11848 self.function_name.as_ref().map(|field| field as _)
11849 }
11850 pub fn set_function_name<T: Into<String>>(&mut self, field: T) {
11852 self.function_name = Some(field.into().into());
11853 }
11854 pub fn with_function_name<T: Into<String>>(mut self, field: T) -> Self {
11856 self.set_function_name(field.into());
11857 self
11858 }
11859 }
11860 impl super::MoveTable {
11861 pub const fn const_default() -> Self {
11862 Self { id: None, size: None }
11863 }
11864 #[doc(hidden)]
11865 pub fn default_instance() -> &'static Self {
11866 static DEFAULT: super::MoveTable = super::MoveTable::const_default();
11867 &DEFAULT
11868 }
11869 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
11871 self.id.as_mut().map(|field| field as _)
11872 }
11873 pub fn id_mut(&mut self) -> &mut String {
11876 self.id.get_or_insert_default()
11877 }
11878 pub fn id_opt(&self) -> Option<&str> {
11880 self.id.as_ref().map(|field| field as _)
11881 }
11882 pub fn set_id<T: Into<String>>(&mut self, field: T) {
11884 self.id = Some(field.into().into());
11885 }
11886 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
11888 self.set_id(field.into());
11889 self
11890 }
11891 pub fn size_opt_mut(&mut self) -> Option<&mut u64> {
11893 self.size.as_mut().map(|field| field as _)
11894 }
11895 pub fn size_mut(&mut self) -> &mut u64 {
11898 self.size.get_or_insert_default()
11899 }
11900 pub fn size_opt(&self) -> Option<u64> {
11902 self.size.as_ref().map(|field| *field)
11903 }
11904 pub fn set_size(&mut self, field: u64) {
11906 self.size = Some(field);
11907 }
11908 pub fn with_size(mut self, field: u64) -> Self {
11910 self.set_size(field);
11911 self
11912 }
11913 }
11914 impl super::MultisigAggregatedSignature {
11915 pub const fn const_default() -> Self {
11916 Self {
11917 signatures: Vec::new(),
11918 bitmap: None,
11919 legacy_bitmap: None,
11920 committee: None,
11921 }
11922 }
11923 #[doc(hidden)]
11924 pub fn default_instance() -> &'static Self {
11925 static DEFAULT: super::MultisigAggregatedSignature = super::MultisigAggregatedSignature::const_default();
11926 &DEFAULT
11927 }
11928 pub fn signatures(&self) -> &[super::MultisigMemberSignature] {
11930 &self.signatures
11931 }
11932 pub fn signatures_mut(&mut self) -> &mut Vec<super::MultisigMemberSignature> {
11935 &mut self.signatures
11936 }
11937 pub fn set_signatures(&mut self, field: Vec<super::MultisigMemberSignature>) {
11939 self.signatures = field;
11940 }
11941 pub fn with_signatures(
11943 mut self,
11944 field: Vec<super::MultisigMemberSignature>,
11945 ) -> Self {
11946 self.set_signatures(field);
11947 self
11948 }
11949 pub fn bitmap_opt_mut(&mut self) -> Option<&mut u32> {
11951 self.bitmap.as_mut().map(|field| field as _)
11952 }
11953 pub fn bitmap_mut(&mut self) -> &mut u32 {
11956 self.bitmap.get_or_insert_default()
11957 }
11958 pub fn bitmap_opt(&self) -> Option<u32> {
11960 self.bitmap.as_ref().map(|field| *field)
11961 }
11962 pub fn set_bitmap(&mut self, field: u32) {
11964 self.bitmap = Some(field);
11965 }
11966 pub fn with_bitmap(mut self, field: u32) -> Self {
11968 self.set_bitmap(field);
11969 self
11970 }
11971 pub fn legacy_bitmap_opt(&self) -> Option<&[u8]> {
11973 self.legacy_bitmap.as_ref().map(|field| field as _)
11974 }
11975 pub fn set_legacy_bitmap<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
11977 self.legacy_bitmap = Some(field.into().into());
11978 }
11979 pub fn with_legacy_bitmap<T: Into<::prost::bytes::Bytes>>(
11981 mut self,
11982 field: T,
11983 ) -> Self {
11984 self.set_legacy_bitmap(field.into());
11985 self
11986 }
11987 pub fn committee(&self) -> &super::MultisigCommittee {
11989 self.committee
11990 .as_ref()
11991 .map(|field| field as _)
11992 .unwrap_or_else(|| super::MultisigCommittee::default_instance() as _)
11993 }
11994 pub fn committee_opt_mut(&mut self) -> Option<&mut super::MultisigCommittee> {
11996 self.committee.as_mut().map(|field| field as _)
11997 }
11998 pub fn committee_mut(&mut self) -> &mut super::MultisigCommittee {
12001 self.committee.get_or_insert_default()
12002 }
12003 pub fn committee_opt(&self) -> Option<&super::MultisigCommittee> {
12005 self.committee.as_ref().map(|field| field as _)
12006 }
12007 pub fn set_committee<T: Into<super::MultisigCommittee>>(&mut self, field: T) {
12009 self.committee = Some(field.into().into());
12010 }
12011 pub fn with_committee<T: Into<super::MultisigCommittee>>(
12013 mut self,
12014 field: T,
12015 ) -> Self {
12016 self.set_committee(field.into());
12017 self
12018 }
12019 }
12020 impl super::MultisigCommittee {
12021 pub const fn const_default() -> Self {
12022 Self {
12023 members: Vec::new(),
12024 threshold: None,
12025 }
12026 }
12027 #[doc(hidden)]
12028 pub fn default_instance() -> &'static Self {
12029 static DEFAULT: super::MultisigCommittee = super::MultisigCommittee::const_default();
12030 &DEFAULT
12031 }
12032 pub fn members(&self) -> &[super::MultisigMember] {
12034 &self.members
12035 }
12036 pub fn members_mut(&mut self) -> &mut Vec<super::MultisigMember> {
12039 &mut self.members
12040 }
12041 pub fn set_members(&mut self, field: Vec<super::MultisigMember>) {
12043 self.members = field;
12044 }
12045 pub fn with_members(mut self, field: Vec<super::MultisigMember>) -> Self {
12047 self.set_members(field);
12048 self
12049 }
12050 pub fn threshold_opt_mut(&mut self) -> Option<&mut u32> {
12052 self.threshold.as_mut().map(|field| field as _)
12053 }
12054 pub fn threshold_mut(&mut self) -> &mut u32 {
12057 self.threshold.get_or_insert_default()
12058 }
12059 pub fn threshold_opt(&self) -> Option<u32> {
12061 self.threshold.as_ref().map(|field| *field)
12062 }
12063 pub fn set_threshold(&mut self, field: u32) {
12065 self.threshold = Some(field);
12066 }
12067 pub fn with_threshold(mut self, field: u32) -> Self {
12069 self.set_threshold(field);
12070 self
12071 }
12072 }
12073 impl super::MultisigMember {
12074 pub const fn const_default() -> Self {
12075 Self {
12076 public_key: None,
12077 weight: None,
12078 }
12079 }
12080 #[doc(hidden)]
12081 pub fn default_instance() -> &'static Self {
12082 static DEFAULT: super::MultisigMember = super::MultisigMember::const_default();
12083 &DEFAULT
12084 }
12085 pub fn public_key(&self) -> &super::MultisigMemberPublicKey {
12087 self.public_key
12088 .as_ref()
12089 .map(|field| field as _)
12090 .unwrap_or_else(|| {
12091 super::MultisigMemberPublicKey::default_instance() as _
12092 })
12093 }
12094 pub fn public_key_opt_mut(
12096 &mut self,
12097 ) -> Option<&mut super::MultisigMemberPublicKey> {
12098 self.public_key.as_mut().map(|field| field as _)
12099 }
12100 pub fn public_key_mut(&mut self) -> &mut super::MultisigMemberPublicKey {
12103 self.public_key.get_or_insert_default()
12104 }
12105 pub fn public_key_opt(&self) -> Option<&super::MultisigMemberPublicKey> {
12107 self.public_key.as_ref().map(|field| field as _)
12108 }
12109 pub fn set_public_key<T: Into<super::MultisigMemberPublicKey>>(
12111 &mut self,
12112 field: T,
12113 ) {
12114 self.public_key = Some(field.into().into());
12115 }
12116 pub fn with_public_key<T: Into<super::MultisigMemberPublicKey>>(
12118 mut self,
12119 field: T,
12120 ) -> Self {
12121 self.set_public_key(field.into());
12122 self
12123 }
12124 pub fn weight_opt_mut(&mut self) -> Option<&mut u32> {
12126 self.weight.as_mut().map(|field| field as _)
12127 }
12128 pub fn weight_mut(&mut self) -> &mut u32 {
12131 self.weight.get_or_insert_default()
12132 }
12133 pub fn weight_opt(&self) -> Option<u32> {
12135 self.weight.as_ref().map(|field| *field)
12136 }
12137 pub fn set_weight(&mut self, field: u32) {
12139 self.weight = Some(field);
12140 }
12141 pub fn with_weight(mut self, field: u32) -> Self {
12143 self.set_weight(field);
12144 self
12145 }
12146 }
12147 impl super::MultisigMemberPublicKey {
12148 pub const fn const_default() -> Self {
12149 Self {
12150 scheme: None,
12151 public_key: None,
12152 zklogin: None,
12153 }
12154 }
12155 #[doc(hidden)]
12156 pub fn default_instance() -> &'static Self {
12157 static DEFAULT: super::MultisigMemberPublicKey = super::MultisigMemberPublicKey::const_default();
12158 &DEFAULT
12159 }
12160 pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
12162 self.set_scheme(field.into());
12163 self
12164 }
12165 pub fn public_key_opt(&self) -> Option<&[u8]> {
12167 self.public_key.as_ref().map(|field| field as _)
12168 }
12169 pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
12171 self.public_key = Some(field.into().into());
12172 }
12173 pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
12175 mut self,
12176 field: T,
12177 ) -> Self {
12178 self.set_public_key(field.into());
12179 self
12180 }
12181 pub fn zklogin(&self) -> &super::ZkLoginPublicIdentifier {
12183 self.zklogin
12184 .as_ref()
12185 .map(|field| field as _)
12186 .unwrap_or_else(|| {
12187 super::ZkLoginPublicIdentifier::default_instance() as _
12188 })
12189 }
12190 pub fn zklogin_opt_mut(
12192 &mut self,
12193 ) -> Option<&mut super::ZkLoginPublicIdentifier> {
12194 self.zklogin.as_mut().map(|field| field as _)
12195 }
12196 pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginPublicIdentifier {
12199 self.zklogin.get_or_insert_default()
12200 }
12201 pub fn zklogin_opt(&self) -> Option<&super::ZkLoginPublicIdentifier> {
12203 self.zklogin.as_ref().map(|field| field as _)
12204 }
12205 pub fn set_zklogin<T: Into<super::ZkLoginPublicIdentifier>>(
12207 &mut self,
12208 field: T,
12209 ) {
12210 self.zklogin = Some(field.into().into());
12211 }
12212 pub fn with_zklogin<T: Into<super::ZkLoginPublicIdentifier>>(
12214 mut self,
12215 field: T,
12216 ) -> Self {
12217 self.set_zklogin(field.into());
12218 self
12219 }
12220 }
12221 impl super::MultisigMemberSignature {
12222 pub const fn const_default() -> Self {
12223 Self {
12224 scheme: None,
12225 signature: None,
12226 zklogin: None,
12227 passkey: None,
12228 }
12229 }
12230 #[doc(hidden)]
12231 pub fn default_instance() -> &'static Self {
12232 static DEFAULT: super::MultisigMemberSignature = super::MultisigMemberSignature::const_default();
12233 &DEFAULT
12234 }
12235 pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
12237 self.set_scheme(field.into());
12238 self
12239 }
12240 pub fn signature_opt(&self) -> Option<&[u8]> {
12242 self.signature.as_ref().map(|field| field as _)
12243 }
12244 pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
12246 self.signature = Some(field.into().into());
12247 }
12248 pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
12250 mut self,
12251 field: T,
12252 ) -> Self {
12253 self.set_signature(field.into());
12254 self
12255 }
12256 pub fn zklogin(&self) -> &super::ZkLoginAuthenticator {
12258 self.zklogin
12259 .as_ref()
12260 .map(|field| field as _)
12261 .unwrap_or_else(|| super::ZkLoginAuthenticator::default_instance() as _)
12262 }
12263 pub fn zklogin_opt_mut(&mut self) -> Option<&mut super::ZkLoginAuthenticator> {
12265 self.zklogin.as_mut().map(|field| field as _)
12266 }
12267 pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginAuthenticator {
12270 self.zklogin.get_or_insert_default()
12271 }
12272 pub fn zklogin_opt(&self) -> Option<&super::ZkLoginAuthenticator> {
12274 self.zklogin.as_ref().map(|field| field as _)
12275 }
12276 pub fn set_zklogin<T: Into<super::ZkLoginAuthenticator>>(&mut self, field: T) {
12278 self.zklogin = Some(field.into().into());
12279 }
12280 pub fn with_zklogin<T: Into<super::ZkLoginAuthenticator>>(
12282 mut self,
12283 field: T,
12284 ) -> Self {
12285 self.set_zklogin(field.into());
12286 self
12287 }
12288 pub fn passkey(&self) -> &super::PasskeyAuthenticator {
12290 self.passkey
12291 .as_ref()
12292 .map(|field| field as _)
12293 .unwrap_or_else(|| super::PasskeyAuthenticator::default_instance() as _)
12294 }
12295 pub fn passkey_opt_mut(&mut self) -> Option<&mut super::PasskeyAuthenticator> {
12297 self.passkey.as_mut().map(|field| field as _)
12298 }
12299 pub fn passkey_mut(&mut self) -> &mut super::PasskeyAuthenticator {
12302 self.passkey.get_or_insert_default()
12303 }
12304 pub fn passkey_opt(&self) -> Option<&super::PasskeyAuthenticator> {
12306 self.passkey.as_ref().map(|field| field as _)
12307 }
12308 pub fn set_passkey<T: Into<super::PasskeyAuthenticator>>(&mut self, field: T) {
12310 self.passkey = Some(field.into().into());
12311 }
12312 pub fn with_passkey<T: Into<super::PasskeyAuthenticator>>(
12314 mut self,
12315 field: T,
12316 ) -> Self {
12317 self.set_passkey(field.into());
12318 self
12319 }
12320 }
12321 impl super::NameRecord {
12322 pub const fn const_default() -> Self {
12323 Self {
12324 id: None,
12325 name: None,
12326 registration_nft_id: None,
12327 expiration_timestamp: None,
12328 target_address: None,
12329 data: std::collections::BTreeMap::new(),
12330 }
12331 }
12332 #[doc(hidden)]
12333 pub fn default_instance() -> &'static Self {
12334 static DEFAULT: super::NameRecord = super::NameRecord::const_default();
12335 &DEFAULT
12336 }
12337 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
12339 self.id.as_mut().map(|field| field as _)
12340 }
12341 pub fn id_mut(&mut self) -> &mut String {
12344 self.id.get_or_insert_default()
12345 }
12346 pub fn id_opt(&self) -> Option<&str> {
12348 self.id.as_ref().map(|field| field as _)
12349 }
12350 pub fn set_id<T: Into<String>>(&mut self, field: T) {
12352 self.id = Some(field.into().into());
12353 }
12354 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
12356 self.set_id(field.into());
12357 self
12358 }
12359 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
12361 self.name.as_mut().map(|field| field as _)
12362 }
12363 pub fn name_mut(&mut self) -> &mut String {
12366 self.name.get_or_insert_default()
12367 }
12368 pub fn name_opt(&self) -> Option<&str> {
12370 self.name.as_ref().map(|field| field as _)
12371 }
12372 pub fn set_name<T: Into<String>>(&mut self, field: T) {
12374 self.name = Some(field.into().into());
12375 }
12376 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
12378 self.set_name(field.into());
12379 self
12380 }
12381 pub fn registration_nft_id_opt_mut(&mut self) -> Option<&mut String> {
12383 self.registration_nft_id.as_mut().map(|field| field as _)
12384 }
12385 pub fn registration_nft_id_mut(&mut self) -> &mut String {
12388 self.registration_nft_id.get_or_insert_default()
12389 }
12390 pub fn registration_nft_id_opt(&self) -> Option<&str> {
12392 self.registration_nft_id.as_ref().map(|field| field as _)
12393 }
12394 pub fn set_registration_nft_id<T: Into<String>>(&mut self, field: T) {
12396 self.registration_nft_id = Some(field.into().into());
12397 }
12398 pub fn with_registration_nft_id<T: Into<String>>(mut self, field: T) -> Self {
12400 self.set_registration_nft_id(field.into());
12401 self
12402 }
12403 pub fn expiration_timestamp_opt_mut(
12405 &mut self,
12406 ) -> Option<&mut ::prost_types::Timestamp> {
12407 self.expiration_timestamp.as_mut().map(|field| field as _)
12408 }
12409 pub fn expiration_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
12412 self.expiration_timestamp.get_or_insert_default()
12413 }
12414 pub fn expiration_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
12416 self.expiration_timestamp.as_ref().map(|field| field as _)
12417 }
12418 pub fn set_expiration_timestamp<T: Into<::prost_types::Timestamp>>(
12420 &mut self,
12421 field: T,
12422 ) {
12423 self.expiration_timestamp = Some(field.into().into());
12424 }
12425 pub fn with_expiration_timestamp<T: Into<::prost_types::Timestamp>>(
12427 mut self,
12428 field: T,
12429 ) -> Self {
12430 self.set_expiration_timestamp(field.into());
12431 self
12432 }
12433 pub fn target_address_opt_mut(&mut self) -> Option<&mut String> {
12435 self.target_address.as_mut().map(|field| field as _)
12436 }
12437 pub fn target_address_mut(&mut self) -> &mut String {
12440 self.target_address.get_or_insert_default()
12441 }
12442 pub fn target_address_opt(&self) -> Option<&str> {
12444 self.target_address.as_ref().map(|field| field as _)
12445 }
12446 pub fn set_target_address<T: Into<String>>(&mut self, field: T) {
12448 self.target_address = Some(field.into().into());
12449 }
12450 pub fn with_target_address<T: Into<String>>(mut self, field: T) -> Self {
12452 self.set_target_address(field.into());
12453 self
12454 }
12455 pub fn data(&self) -> &::std::collections::BTreeMap<String, String> {
12457 &self.data
12458 }
12459 pub fn data_mut(&mut self) -> &mut ::std::collections::BTreeMap<String, String> {
12462 &mut self.data
12463 }
12464 pub fn set_data(&mut self, field: ::std::collections::BTreeMap<String, String>) {
12466 self.data = field;
12467 }
12468 pub fn with_data(
12470 mut self,
12471 field: ::std::collections::BTreeMap<String, String>,
12472 ) -> Self {
12473 self.set_data(field);
12474 self
12475 }
12476 }
12477 impl super::Object {
12478 pub const fn const_default() -> Self {
12479 Self {
12480 bcs: None,
12481 object_id: None,
12482 version: None,
12483 digest: None,
12484 owner: None,
12485 object_type: None,
12486 has_public_transfer: None,
12487 contents: None,
12488 package: None,
12489 previous_transaction: None,
12490 storage_rebate: None,
12491 json: None,
12492 balance: None,
12493 display: None,
12494 }
12495 }
12496 #[doc(hidden)]
12497 pub fn default_instance() -> &'static Self {
12498 static DEFAULT: super::Object = super::Object::const_default();
12499 &DEFAULT
12500 }
12501 pub fn bcs(&self) -> &super::Bcs {
12503 self.bcs
12504 .as_ref()
12505 .map(|field| field as _)
12506 .unwrap_or_else(|| super::Bcs::default_instance() as _)
12507 }
12508 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
12510 self.bcs.as_mut().map(|field| field as _)
12511 }
12512 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
12515 self.bcs.get_or_insert_default()
12516 }
12517 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
12519 self.bcs.as_ref().map(|field| field as _)
12520 }
12521 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
12523 self.bcs = Some(field.into().into());
12524 }
12525 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
12527 self.set_bcs(field.into());
12528 self
12529 }
12530 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
12532 self.object_id.as_mut().map(|field| field as _)
12533 }
12534 pub fn object_id_mut(&mut self) -> &mut String {
12537 self.object_id.get_or_insert_default()
12538 }
12539 pub fn object_id_opt(&self) -> Option<&str> {
12541 self.object_id.as_ref().map(|field| field as _)
12542 }
12543 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
12545 self.object_id = Some(field.into().into());
12546 }
12547 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
12549 self.set_object_id(field.into());
12550 self
12551 }
12552 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
12554 self.version.as_mut().map(|field| field as _)
12555 }
12556 pub fn version_mut(&mut self) -> &mut u64 {
12559 self.version.get_or_insert_default()
12560 }
12561 pub fn version_opt(&self) -> Option<u64> {
12563 self.version.as_ref().map(|field| *field)
12564 }
12565 pub fn set_version(&mut self, field: u64) {
12567 self.version = Some(field);
12568 }
12569 pub fn with_version(mut self, field: u64) -> Self {
12571 self.set_version(field);
12572 self
12573 }
12574 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
12576 self.digest.as_mut().map(|field| field as _)
12577 }
12578 pub fn digest_mut(&mut self) -> &mut String {
12581 self.digest.get_or_insert_default()
12582 }
12583 pub fn digest_opt(&self) -> Option<&str> {
12585 self.digest.as_ref().map(|field| field as _)
12586 }
12587 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
12589 self.digest = Some(field.into().into());
12590 }
12591 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
12593 self.set_digest(field.into());
12594 self
12595 }
12596 pub fn owner(&self) -> &super::Owner {
12598 self.owner
12599 .as_ref()
12600 .map(|field| field as _)
12601 .unwrap_or_else(|| super::Owner::default_instance() as _)
12602 }
12603 pub fn owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
12605 self.owner.as_mut().map(|field| field as _)
12606 }
12607 pub fn owner_mut(&mut self) -> &mut super::Owner {
12610 self.owner.get_or_insert_default()
12611 }
12612 pub fn owner_opt(&self) -> Option<&super::Owner> {
12614 self.owner.as_ref().map(|field| field as _)
12615 }
12616 pub fn set_owner<T: Into<super::Owner>>(&mut self, field: T) {
12618 self.owner = Some(field.into().into());
12619 }
12620 pub fn with_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
12622 self.set_owner(field.into());
12623 self
12624 }
12625 pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
12627 self.object_type.as_mut().map(|field| field as _)
12628 }
12629 pub fn object_type_mut(&mut self) -> &mut String {
12632 self.object_type.get_or_insert_default()
12633 }
12634 pub fn object_type_opt(&self) -> Option<&str> {
12636 self.object_type.as_ref().map(|field| field as _)
12637 }
12638 pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
12640 self.object_type = Some(field.into().into());
12641 }
12642 pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
12644 self.set_object_type(field.into());
12645 self
12646 }
12647 pub fn has_public_transfer_opt_mut(&mut self) -> Option<&mut bool> {
12649 self.has_public_transfer.as_mut().map(|field| field as _)
12650 }
12651 pub fn has_public_transfer_mut(&mut self) -> &mut bool {
12654 self.has_public_transfer.get_or_insert_default()
12655 }
12656 pub fn has_public_transfer_opt(&self) -> Option<bool> {
12658 self.has_public_transfer.as_ref().map(|field| *field)
12659 }
12660 pub fn set_has_public_transfer(&mut self, field: bool) {
12662 self.has_public_transfer = Some(field);
12663 }
12664 pub fn with_has_public_transfer(mut self, field: bool) -> Self {
12666 self.set_has_public_transfer(field);
12667 self
12668 }
12669 pub fn contents(&self) -> &super::Bcs {
12671 self.contents
12672 .as_ref()
12673 .map(|field| field as _)
12674 .unwrap_or_else(|| super::Bcs::default_instance() as _)
12675 }
12676 pub fn contents_opt_mut(&mut self) -> Option<&mut super::Bcs> {
12678 self.contents.as_mut().map(|field| field as _)
12679 }
12680 pub fn contents_mut(&mut self) -> &mut super::Bcs {
12683 self.contents.get_or_insert_default()
12684 }
12685 pub fn contents_opt(&self) -> Option<&super::Bcs> {
12687 self.contents.as_ref().map(|field| field as _)
12688 }
12689 pub fn set_contents<T: Into<super::Bcs>>(&mut self, field: T) {
12691 self.contents = Some(field.into().into());
12692 }
12693 pub fn with_contents<T: Into<super::Bcs>>(mut self, field: T) -> Self {
12695 self.set_contents(field.into());
12696 self
12697 }
12698 pub fn package(&self) -> &super::Package {
12700 self.package
12701 .as_ref()
12702 .map(|field| field as _)
12703 .unwrap_or_else(|| super::Package::default_instance() as _)
12704 }
12705 pub fn package_opt_mut(&mut self) -> Option<&mut super::Package> {
12707 self.package.as_mut().map(|field| field as _)
12708 }
12709 pub fn package_mut(&mut self) -> &mut super::Package {
12712 self.package.get_or_insert_default()
12713 }
12714 pub fn package_opt(&self) -> Option<&super::Package> {
12716 self.package.as_ref().map(|field| field as _)
12717 }
12718 pub fn set_package<T: Into<super::Package>>(&mut self, field: T) {
12720 self.package = Some(field.into().into());
12721 }
12722 pub fn with_package<T: Into<super::Package>>(mut self, field: T) -> Self {
12724 self.set_package(field.into());
12725 self
12726 }
12727 pub fn previous_transaction_opt_mut(&mut self) -> Option<&mut String> {
12729 self.previous_transaction.as_mut().map(|field| field as _)
12730 }
12731 pub fn previous_transaction_mut(&mut self) -> &mut String {
12734 self.previous_transaction.get_or_insert_default()
12735 }
12736 pub fn previous_transaction_opt(&self) -> Option<&str> {
12738 self.previous_transaction.as_ref().map(|field| field as _)
12739 }
12740 pub fn set_previous_transaction<T: Into<String>>(&mut self, field: T) {
12742 self.previous_transaction = Some(field.into().into());
12743 }
12744 pub fn with_previous_transaction<T: Into<String>>(mut self, field: T) -> Self {
12746 self.set_previous_transaction(field.into());
12747 self
12748 }
12749 pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
12751 self.storage_rebate.as_mut().map(|field| field as _)
12752 }
12753 pub fn storage_rebate_mut(&mut self) -> &mut u64 {
12756 self.storage_rebate.get_or_insert_default()
12757 }
12758 pub fn storage_rebate_opt(&self) -> Option<u64> {
12760 self.storage_rebate.as_ref().map(|field| *field)
12761 }
12762 pub fn set_storage_rebate(&mut self, field: u64) {
12764 self.storage_rebate = Some(field);
12765 }
12766 pub fn with_storage_rebate(mut self, field: u64) -> Self {
12768 self.set_storage_rebate(field);
12769 self
12770 }
12771 pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
12773 self.json.as_mut().map(|field| field as _)
12774 }
12775 pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
12778 self.json.get_or_insert_default()
12779 }
12780 pub fn json_opt(&self) -> Option<&::prost_types::Value> {
12782 self.json.as_ref().map(|field| field as _)
12783 }
12784 pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
12786 self.json = Some(field.into().into());
12787 }
12788 pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
12790 self.set_json(field.into());
12791 self
12792 }
12793 pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
12795 self.balance.as_mut().map(|field| field as _)
12796 }
12797 pub fn balance_mut(&mut self) -> &mut u64 {
12800 self.balance.get_or_insert_default()
12801 }
12802 pub fn balance_opt(&self) -> Option<u64> {
12804 self.balance.as_ref().map(|field| *field)
12805 }
12806 pub fn set_balance(&mut self, field: u64) {
12808 self.balance = Some(field);
12809 }
12810 pub fn with_balance(mut self, field: u64) -> Self {
12812 self.set_balance(field);
12813 self
12814 }
12815 pub fn display(&self) -> &super::Display {
12817 self.display
12818 .as_ref()
12819 .map(|field| field as _)
12820 .unwrap_or_else(|| super::Display::default_instance() as _)
12821 }
12822 pub fn display_opt_mut(&mut self) -> Option<&mut super::Display> {
12824 self.display.as_mut().map(|field| field as _)
12825 }
12826 pub fn display_mut(&mut self) -> &mut super::Display {
12829 self.display.get_or_insert_default()
12830 }
12831 pub fn display_opt(&self) -> Option<&super::Display> {
12833 self.display.as_ref().map(|field| field as _)
12834 }
12835 pub fn set_display<T: Into<super::Display>>(&mut self, field: T) {
12837 self.display = Some(field.into().into());
12838 }
12839 pub fn with_display<T: Into<super::Display>>(mut self, field: T) -> Self {
12841 self.set_display(field.into());
12842 self
12843 }
12844 }
12845 impl super::ObjectReference {
12846 pub const fn const_default() -> Self {
12847 Self {
12848 object_id: None,
12849 version: None,
12850 digest: None,
12851 }
12852 }
12853 #[doc(hidden)]
12854 pub fn default_instance() -> &'static Self {
12855 static DEFAULT: super::ObjectReference = super::ObjectReference::const_default();
12856 &DEFAULT
12857 }
12858 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
12860 self.object_id.as_mut().map(|field| field as _)
12861 }
12862 pub fn object_id_mut(&mut self) -> &mut String {
12865 self.object_id.get_or_insert_default()
12866 }
12867 pub fn object_id_opt(&self) -> Option<&str> {
12869 self.object_id.as_ref().map(|field| field as _)
12870 }
12871 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
12873 self.object_id = Some(field.into().into());
12874 }
12875 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
12877 self.set_object_id(field.into());
12878 self
12879 }
12880 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
12882 self.version.as_mut().map(|field| field as _)
12883 }
12884 pub fn version_mut(&mut self) -> &mut u64 {
12887 self.version.get_or_insert_default()
12888 }
12889 pub fn version_opt(&self) -> Option<u64> {
12891 self.version.as_ref().map(|field| *field)
12892 }
12893 pub fn set_version(&mut self, field: u64) {
12895 self.version = Some(field);
12896 }
12897 pub fn with_version(mut self, field: u64) -> Self {
12899 self.set_version(field);
12900 self
12901 }
12902 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
12904 self.digest.as_mut().map(|field| field as _)
12905 }
12906 pub fn digest_mut(&mut self) -> &mut String {
12909 self.digest.get_or_insert_default()
12910 }
12911 pub fn digest_opt(&self) -> Option<&str> {
12913 self.digest.as_ref().map(|field| field as _)
12914 }
12915 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
12917 self.digest = Some(field.into().into());
12918 }
12919 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
12921 self.set_digest(field.into());
12922 self
12923 }
12924 }
12925 impl super::ObjectSet {
12926 pub const fn const_default() -> Self {
12927 Self { objects: Vec::new() }
12928 }
12929 #[doc(hidden)]
12930 pub fn default_instance() -> &'static Self {
12931 static DEFAULT: super::ObjectSet = super::ObjectSet::const_default();
12932 &DEFAULT
12933 }
12934 pub fn objects(&self) -> &[super::Object] {
12936 &self.objects
12937 }
12938 pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
12941 &mut self.objects
12942 }
12943 pub fn set_objects(&mut self, field: Vec<super::Object>) {
12945 self.objects = field;
12946 }
12947 pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
12949 self.set_objects(field);
12950 self
12951 }
12952 }
12953 impl super::OpenSignature {
12954 pub const fn const_default() -> Self {
12955 Self {
12956 reference: None,
12957 body: None,
12958 }
12959 }
12960 #[doc(hidden)]
12961 pub fn default_instance() -> &'static Self {
12962 static DEFAULT: super::OpenSignature = super::OpenSignature::const_default();
12963 &DEFAULT
12964 }
12965 pub fn with_reference<T: Into<super::open_signature::Reference>>(
12967 mut self,
12968 field: T,
12969 ) -> Self {
12970 self.set_reference(field.into());
12971 self
12972 }
12973 pub fn body(&self) -> &super::OpenSignatureBody {
12975 self.body
12976 .as_ref()
12977 .map(|field| field as _)
12978 .unwrap_or_else(|| super::OpenSignatureBody::default_instance() as _)
12979 }
12980 pub fn body_opt_mut(&mut self) -> Option<&mut super::OpenSignatureBody> {
12982 self.body.as_mut().map(|field| field as _)
12983 }
12984 pub fn body_mut(&mut self) -> &mut super::OpenSignatureBody {
12987 self.body.get_or_insert_default()
12988 }
12989 pub fn body_opt(&self) -> Option<&super::OpenSignatureBody> {
12991 self.body.as_ref().map(|field| field as _)
12992 }
12993 pub fn set_body<T: Into<super::OpenSignatureBody>>(&mut self, field: T) {
12995 self.body = Some(field.into().into());
12996 }
12997 pub fn with_body<T: Into<super::OpenSignatureBody>>(mut self, field: T) -> Self {
12999 self.set_body(field.into());
13000 self
13001 }
13002 }
13003 impl super::OpenSignatureBody {
13004 pub const fn const_default() -> Self {
13005 Self {
13006 r#type: None,
13007 type_name: None,
13008 type_parameter_instantiation: Vec::new(),
13009 type_parameter: None,
13010 }
13011 }
13012 #[doc(hidden)]
13013 pub fn default_instance() -> &'static Self {
13014 static DEFAULT: super::OpenSignatureBody = super::OpenSignatureBody::const_default();
13015 &DEFAULT
13016 }
13017 pub fn with_type<T: Into<super::open_signature_body::Type>>(
13019 mut self,
13020 field: T,
13021 ) -> Self {
13022 self.set_type(field.into());
13023 self
13024 }
13025 pub fn type_name_opt_mut(&mut self) -> Option<&mut String> {
13027 self.type_name.as_mut().map(|field| field as _)
13028 }
13029 pub fn type_name_mut(&mut self) -> &mut String {
13032 self.type_name.get_or_insert_default()
13033 }
13034 pub fn type_name_opt(&self) -> Option<&str> {
13036 self.type_name.as_ref().map(|field| field as _)
13037 }
13038 pub fn set_type_name<T: Into<String>>(&mut self, field: T) {
13040 self.type_name = Some(field.into().into());
13041 }
13042 pub fn with_type_name<T: Into<String>>(mut self, field: T) -> Self {
13044 self.set_type_name(field.into());
13045 self
13046 }
13047 pub fn type_parameter_instantiation(&self) -> &[super::OpenSignatureBody] {
13049 &self.type_parameter_instantiation
13050 }
13051 pub fn type_parameter_instantiation_mut(
13054 &mut self,
13055 ) -> &mut Vec<super::OpenSignatureBody> {
13056 &mut self.type_parameter_instantiation
13057 }
13058 pub fn set_type_parameter_instantiation(
13060 &mut self,
13061 field: Vec<super::OpenSignatureBody>,
13062 ) {
13063 self.type_parameter_instantiation = field;
13064 }
13065 pub fn with_type_parameter_instantiation(
13067 mut self,
13068 field: Vec<super::OpenSignatureBody>,
13069 ) -> Self {
13070 self.set_type_parameter_instantiation(field);
13071 self
13072 }
13073 pub fn type_parameter_opt_mut(&mut self) -> Option<&mut u32> {
13075 self.type_parameter.as_mut().map(|field| field as _)
13076 }
13077 pub fn type_parameter_mut(&mut self) -> &mut u32 {
13080 self.type_parameter.get_or_insert_default()
13081 }
13082 pub fn type_parameter_opt(&self) -> Option<u32> {
13084 self.type_parameter.as_ref().map(|field| *field)
13085 }
13086 pub fn set_type_parameter(&mut self, field: u32) {
13088 self.type_parameter = Some(field);
13089 }
13090 pub fn with_type_parameter(mut self, field: u32) -> Self {
13092 self.set_type_parameter(field);
13093 self
13094 }
13095 }
13096 impl super::Owner {
13097 pub const fn const_default() -> Self {
13098 Self {
13099 kind: None,
13100 address: None,
13101 version: None,
13102 }
13103 }
13104 #[doc(hidden)]
13105 pub fn default_instance() -> &'static Self {
13106 static DEFAULT: super::Owner = super::Owner::const_default();
13107 &DEFAULT
13108 }
13109 pub fn with_kind<T: Into<super::owner::OwnerKind>>(mut self, field: T) -> Self {
13111 self.set_kind(field.into());
13112 self
13113 }
13114 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
13116 self.address.as_mut().map(|field| field as _)
13117 }
13118 pub fn address_mut(&mut self) -> &mut String {
13121 self.address.get_or_insert_default()
13122 }
13123 pub fn address_opt(&self) -> Option<&str> {
13125 self.address.as_ref().map(|field| field as _)
13126 }
13127 pub fn set_address<T: Into<String>>(&mut self, field: T) {
13129 self.address = Some(field.into().into());
13130 }
13131 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
13133 self.set_address(field.into());
13134 self
13135 }
13136 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
13138 self.version.as_mut().map(|field| field as _)
13139 }
13140 pub fn version_mut(&mut self) -> &mut u64 {
13143 self.version.get_or_insert_default()
13144 }
13145 pub fn version_opt(&self) -> Option<u64> {
13147 self.version.as_ref().map(|field| *field)
13148 }
13149 pub fn set_version(&mut self, field: u64) {
13151 self.version = Some(field);
13152 }
13153 pub fn with_version(mut self, field: u64) -> Self {
13155 self.set_version(field);
13156 self
13157 }
13158 }
13159 impl super::Package {
13160 pub const fn const_default() -> Self {
13161 Self {
13162 storage_id: None,
13163 original_id: None,
13164 version: None,
13165 modules: Vec::new(),
13166 type_origins: Vec::new(),
13167 linkage: Vec::new(),
13168 }
13169 }
13170 #[doc(hidden)]
13171 pub fn default_instance() -> &'static Self {
13172 static DEFAULT: super::Package = super::Package::const_default();
13173 &DEFAULT
13174 }
13175 pub fn storage_id_opt_mut(&mut self) -> Option<&mut String> {
13177 self.storage_id.as_mut().map(|field| field as _)
13178 }
13179 pub fn storage_id_mut(&mut self) -> &mut String {
13182 self.storage_id.get_or_insert_default()
13183 }
13184 pub fn storage_id_opt(&self) -> Option<&str> {
13186 self.storage_id.as_ref().map(|field| field as _)
13187 }
13188 pub fn set_storage_id<T: Into<String>>(&mut self, field: T) {
13190 self.storage_id = Some(field.into().into());
13191 }
13192 pub fn with_storage_id<T: Into<String>>(mut self, field: T) -> Self {
13194 self.set_storage_id(field.into());
13195 self
13196 }
13197 pub fn original_id_opt_mut(&mut self) -> Option<&mut String> {
13199 self.original_id.as_mut().map(|field| field as _)
13200 }
13201 pub fn original_id_mut(&mut self) -> &mut String {
13204 self.original_id.get_or_insert_default()
13205 }
13206 pub fn original_id_opt(&self) -> Option<&str> {
13208 self.original_id.as_ref().map(|field| field as _)
13209 }
13210 pub fn set_original_id<T: Into<String>>(&mut self, field: T) {
13212 self.original_id = Some(field.into().into());
13213 }
13214 pub fn with_original_id<T: Into<String>>(mut self, field: T) -> Self {
13216 self.set_original_id(field.into());
13217 self
13218 }
13219 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
13221 self.version.as_mut().map(|field| field as _)
13222 }
13223 pub fn version_mut(&mut self) -> &mut u64 {
13226 self.version.get_or_insert_default()
13227 }
13228 pub fn version_opt(&self) -> Option<u64> {
13230 self.version.as_ref().map(|field| *field)
13231 }
13232 pub fn set_version(&mut self, field: u64) {
13234 self.version = Some(field);
13235 }
13236 pub fn with_version(mut self, field: u64) -> Self {
13238 self.set_version(field);
13239 self
13240 }
13241 pub fn modules(&self) -> &[super::Module] {
13243 &self.modules
13244 }
13245 pub fn modules_mut(&mut self) -> &mut Vec<super::Module> {
13248 &mut self.modules
13249 }
13250 pub fn set_modules(&mut self, field: Vec<super::Module>) {
13252 self.modules = field;
13253 }
13254 pub fn with_modules(mut self, field: Vec<super::Module>) -> Self {
13256 self.set_modules(field);
13257 self
13258 }
13259 pub fn type_origins(&self) -> &[super::TypeOrigin] {
13261 &self.type_origins
13262 }
13263 pub fn type_origins_mut(&mut self) -> &mut Vec<super::TypeOrigin> {
13266 &mut self.type_origins
13267 }
13268 pub fn set_type_origins(&mut self, field: Vec<super::TypeOrigin>) {
13270 self.type_origins = field;
13271 }
13272 pub fn with_type_origins(mut self, field: Vec<super::TypeOrigin>) -> Self {
13274 self.set_type_origins(field);
13275 self
13276 }
13277 pub fn linkage(&self) -> &[super::Linkage] {
13279 &self.linkage
13280 }
13281 pub fn linkage_mut(&mut self) -> &mut Vec<super::Linkage> {
13284 &mut self.linkage
13285 }
13286 pub fn set_linkage(&mut self, field: Vec<super::Linkage>) {
13288 self.linkage = field;
13289 }
13290 pub fn with_linkage(mut self, field: Vec<super::Linkage>) -> Self {
13292 self.set_linkage(field);
13293 self
13294 }
13295 }
13296 impl super::PackageUpgradeError {
13297 pub const fn const_default() -> Self {
13298 Self {
13299 kind: None,
13300 package_id: None,
13301 digest: None,
13302 policy: None,
13303 ticket_id: None,
13304 }
13305 }
13306 #[doc(hidden)]
13307 pub fn default_instance() -> &'static Self {
13308 static DEFAULT: super::PackageUpgradeError = super::PackageUpgradeError::const_default();
13309 &DEFAULT
13310 }
13311 pub fn with_kind<T: Into<super::package_upgrade_error::PackageUpgradeErrorKind>>(
13313 mut self,
13314 field: T,
13315 ) -> Self {
13316 self.set_kind(field.into());
13317 self
13318 }
13319 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
13321 self.package_id.as_mut().map(|field| field as _)
13322 }
13323 pub fn package_id_mut(&mut self) -> &mut String {
13326 self.package_id.get_or_insert_default()
13327 }
13328 pub fn package_id_opt(&self) -> Option<&str> {
13330 self.package_id.as_ref().map(|field| field as _)
13331 }
13332 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
13334 self.package_id = Some(field.into().into());
13335 }
13336 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
13338 self.set_package_id(field.into());
13339 self
13340 }
13341 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
13343 self.digest.as_mut().map(|field| field as _)
13344 }
13345 pub fn digest_mut(&mut self) -> &mut String {
13348 self.digest.get_or_insert_default()
13349 }
13350 pub fn digest_opt(&self) -> Option<&str> {
13352 self.digest.as_ref().map(|field| field as _)
13353 }
13354 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
13356 self.digest = Some(field.into().into());
13357 }
13358 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
13360 self.set_digest(field.into());
13361 self
13362 }
13363 pub fn policy_opt_mut(&mut self) -> Option<&mut u32> {
13365 self.policy.as_mut().map(|field| field as _)
13366 }
13367 pub fn policy_mut(&mut self) -> &mut u32 {
13370 self.policy.get_or_insert_default()
13371 }
13372 pub fn policy_opt(&self) -> Option<u32> {
13374 self.policy.as_ref().map(|field| *field)
13375 }
13376 pub fn set_policy(&mut self, field: u32) {
13378 self.policy = Some(field);
13379 }
13380 pub fn with_policy(mut self, field: u32) -> Self {
13382 self.set_policy(field);
13383 self
13384 }
13385 pub fn ticket_id_opt_mut(&mut self) -> Option<&mut String> {
13387 self.ticket_id.as_mut().map(|field| field as _)
13388 }
13389 pub fn ticket_id_mut(&mut self) -> &mut String {
13392 self.ticket_id.get_or_insert_default()
13393 }
13394 pub fn ticket_id_opt(&self) -> Option<&str> {
13396 self.ticket_id.as_ref().map(|field| field as _)
13397 }
13398 pub fn set_ticket_id<T: Into<String>>(&mut self, field: T) {
13400 self.ticket_id = Some(field.into().into());
13401 }
13402 pub fn with_ticket_id<T: Into<String>>(mut self, field: T) -> Self {
13404 self.set_ticket_id(field.into());
13405 self
13406 }
13407 }
13408 impl super::PackageVersion {
13409 pub const fn const_default() -> Self {
13410 Self {
13411 package_id: None,
13412 version: None,
13413 }
13414 }
13415 #[doc(hidden)]
13416 pub fn default_instance() -> &'static Self {
13417 static DEFAULT: super::PackageVersion = super::PackageVersion::const_default();
13418 &DEFAULT
13419 }
13420 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
13422 self.package_id.as_mut().map(|field| field as _)
13423 }
13424 pub fn package_id_mut(&mut self) -> &mut String {
13427 self.package_id.get_or_insert_default()
13428 }
13429 pub fn package_id_opt(&self) -> Option<&str> {
13431 self.package_id.as_ref().map(|field| field as _)
13432 }
13433 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
13435 self.package_id = Some(field.into().into());
13436 }
13437 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
13439 self.set_package_id(field.into());
13440 self
13441 }
13442 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
13444 self.version.as_mut().map(|field| field as _)
13445 }
13446 pub fn version_mut(&mut self) -> &mut u64 {
13449 self.version.get_or_insert_default()
13450 }
13451 pub fn version_opt(&self) -> Option<u64> {
13453 self.version.as_ref().map(|field| *field)
13454 }
13455 pub fn set_version(&mut self, field: u64) {
13457 self.version = Some(field);
13458 }
13459 pub fn with_version(mut self, field: u64) -> Self {
13461 self.set_version(field);
13462 self
13463 }
13464 }
13465 impl super::PackageWriteFilter {
13466 pub const fn const_default() -> Self {
13467 Self {}
13468 }
13469 #[doc(hidden)]
13470 pub fn default_instance() -> &'static Self {
13471 static DEFAULT: super::PackageWriteFilter = super::PackageWriteFilter::const_default();
13472 &DEFAULT
13473 }
13474 }
13475 impl super::PasskeyAuthenticator {
13476 pub const fn const_default() -> Self {
13477 Self {
13478 authenticator_data: None,
13479 client_data_json: None,
13480 signature: None,
13481 }
13482 }
13483 #[doc(hidden)]
13484 pub fn default_instance() -> &'static Self {
13485 static DEFAULT: super::PasskeyAuthenticator = super::PasskeyAuthenticator::const_default();
13486 &DEFAULT
13487 }
13488 pub fn authenticator_data_opt(&self) -> Option<&[u8]> {
13490 self.authenticator_data.as_ref().map(|field| field as _)
13491 }
13492 pub fn set_authenticator_data<T: Into<::prost::bytes::Bytes>>(
13494 &mut self,
13495 field: T,
13496 ) {
13497 self.authenticator_data = Some(field.into().into());
13498 }
13499 pub fn with_authenticator_data<T: Into<::prost::bytes::Bytes>>(
13501 mut self,
13502 field: T,
13503 ) -> Self {
13504 self.set_authenticator_data(field.into());
13505 self
13506 }
13507 pub fn client_data_json_opt_mut(&mut self) -> Option<&mut String> {
13509 self.client_data_json.as_mut().map(|field| field as _)
13510 }
13511 pub fn client_data_json_mut(&mut self) -> &mut String {
13514 self.client_data_json.get_or_insert_default()
13515 }
13516 pub fn client_data_json_opt(&self) -> Option<&str> {
13518 self.client_data_json.as_ref().map(|field| field as _)
13519 }
13520 pub fn set_client_data_json<T: Into<String>>(&mut self, field: T) {
13522 self.client_data_json = Some(field.into().into());
13523 }
13524 pub fn with_client_data_json<T: Into<String>>(mut self, field: T) -> Self {
13526 self.set_client_data_json(field.into());
13527 self
13528 }
13529 pub fn signature(&self) -> &super::SimpleSignature {
13531 self.signature
13532 .as_ref()
13533 .map(|field| field as _)
13534 .unwrap_or_else(|| super::SimpleSignature::default_instance() as _)
13535 }
13536 pub fn signature_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
13538 self.signature.as_mut().map(|field| field as _)
13539 }
13540 pub fn signature_mut(&mut self) -> &mut super::SimpleSignature {
13543 self.signature.get_or_insert_default()
13544 }
13545 pub fn signature_opt(&self) -> Option<&super::SimpleSignature> {
13547 self.signature.as_ref().map(|field| field as _)
13548 }
13549 pub fn set_signature<T: Into<super::SimpleSignature>>(&mut self, field: T) {
13551 self.signature = Some(field.into().into());
13552 }
13553 pub fn with_signature<T: Into<super::SimpleSignature>>(
13555 mut self,
13556 field: T,
13557 ) -> Self {
13558 self.set_signature(field.into());
13559 self
13560 }
13561 }
13562 impl super::ProgrammableTransaction {
13563 pub const fn const_default() -> Self {
13564 Self {
13565 inputs: Vec::new(),
13566 commands: Vec::new(),
13567 }
13568 }
13569 #[doc(hidden)]
13570 pub fn default_instance() -> &'static Self {
13571 static DEFAULT: super::ProgrammableTransaction = super::ProgrammableTransaction::const_default();
13572 &DEFAULT
13573 }
13574 pub fn inputs(&self) -> &[super::Input] {
13576 &self.inputs
13577 }
13578 pub fn inputs_mut(&mut self) -> &mut Vec<super::Input> {
13581 &mut self.inputs
13582 }
13583 pub fn set_inputs(&mut self, field: Vec<super::Input>) {
13585 self.inputs = field;
13586 }
13587 pub fn with_inputs(mut self, field: Vec<super::Input>) -> Self {
13589 self.set_inputs(field);
13590 self
13591 }
13592 pub fn commands(&self) -> &[super::Command] {
13594 &self.commands
13595 }
13596 pub fn commands_mut(&mut self) -> &mut Vec<super::Command> {
13599 &mut self.commands
13600 }
13601 pub fn set_commands(&mut self, field: Vec<super::Command>) {
13603 self.commands = field;
13604 }
13605 pub fn with_commands(mut self, field: Vec<super::Command>) -> Self {
13607 self.set_commands(field);
13608 self
13609 }
13610 }
13611 impl super::ProtocolConfig {
13612 pub const fn const_default() -> Self {
13613 Self {
13614 protocol_version: None,
13615 feature_flags: std::collections::BTreeMap::new(),
13616 attributes: std::collections::BTreeMap::new(),
13617 configs: std::collections::BTreeMap::new(),
13618 }
13619 }
13620 #[doc(hidden)]
13621 pub fn default_instance() -> &'static Self {
13622 static DEFAULT: super::ProtocolConfig = super::ProtocolConfig::const_default();
13623 &DEFAULT
13624 }
13625 pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
13627 self.protocol_version.as_mut().map(|field| field as _)
13628 }
13629 pub fn protocol_version_mut(&mut self) -> &mut u64 {
13632 self.protocol_version.get_or_insert_default()
13633 }
13634 pub fn protocol_version_opt(&self) -> Option<u64> {
13636 self.protocol_version.as_ref().map(|field| *field)
13637 }
13638 pub fn set_protocol_version(&mut self, field: u64) {
13640 self.protocol_version = Some(field);
13641 }
13642 pub fn with_protocol_version(mut self, field: u64) -> Self {
13644 self.set_protocol_version(field);
13645 self
13646 }
13647 pub fn feature_flags(&self) -> &::std::collections::BTreeMap<String, bool> {
13649 &self.feature_flags
13650 }
13651 pub fn feature_flags_mut(
13654 &mut self,
13655 ) -> &mut ::std::collections::BTreeMap<String, bool> {
13656 &mut self.feature_flags
13657 }
13658 pub fn set_feature_flags(
13660 &mut self,
13661 field: ::std::collections::BTreeMap<String, bool>,
13662 ) {
13663 self.feature_flags = field;
13664 }
13665 pub fn with_feature_flags(
13667 mut self,
13668 field: ::std::collections::BTreeMap<String, bool>,
13669 ) -> Self {
13670 self.set_feature_flags(field);
13671 self
13672 }
13673 pub fn attributes(&self) -> &::std::collections::BTreeMap<String, String> {
13675 &self.attributes
13676 }
13677 pub fn attributes_mut(
13680 &mut self,
13681 ) -> &mut ::std::collections::BTreeMap<String, String> {
13682 &mut self.attributes
13683 }
13684 pub fn set_attributes(
13686 &mut self,
13687 field: ::std::collections::BTreeMap<String, String>,
13688 ) {
13689 self.attributes = field;
13690 }
13691 pub fn with_attributes(
13693 mut self,
13694 field: ::std::collections::BTreeMap<String, String>,
13695 ) -> Self {
13696 self.set_attributes(field);
13697 self
13698 }
13699 pub fn configs(
13701 &self,
13702 ) -> &::std::collections::BTreeMap<String, ::prost_types::Value> {
13703 &self.configs
13704 }
13705 pub fn configs_mut(
13708 &mut self,
13709 ) -> &mut ::std::collections::BTreeMap<String, ::prost_types::Value> {
13710 &mut self.configs
13711 }
13712 pub fn set_configs(
13714 &mut self,
13715 field: ::std::collections::BTreeMap<String, ::prost_types::Value>,
13716 ) {
13717 self.configs = field;
13718 }
13719 pub fn with_configs(
13721 mut self,
13722 field: ::std::collections::BTreeMap<String, ::prost_types::Value>,
13723 ) -> Self {
13724 self.set_configs(field);
13725 self
13726 }
13727 }
13728 impl super::Publish {
13729 pub const fn const_default() -> Self {
13730 Self {
13731 modules: Vec::new(),
13732 dependencies: Vec::new(),
13733 }
13734 }
13735 #[doc(hidden)]
13736 pub fn default_instance() -> &'static Self {
13737 static DEFAULT: super::Publish = super::Publish::const_default();
13738 &DEFAULT
13739 }
13740 pub fn modules(&self) -> &[::prost::bytes::Bytes] {
13742 &self.modules
13743 }
13744 pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
13747 &mut self.modules
13748 }
13749 pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
13751 self.modules = field;
13752 }
13753 pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
13755 self.set_modules(field);
13756 self
13757 }
13758 pub fn dependencies(&self) -> &[String] {
13760 &self.dependencies
13761 }
13762 pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
13765 &mut self.dependencies
13766 }
13767 pub fn set_dependencies(&mut self, field: Vec<String>) {
13769 self.dependencies = field;
13770 }
13771 pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
13773 self.set_dependencies(field);
13774 self
13775 }
13776 }
13777 impl super::QueryEnd {
13778 pub const fn const_default() -> Self {
13779 Self { reason: None }
13780 }
13781 #[doc(hidden)]
13782 pub fn default_instance() -> &'static Self {
13783 static DEFAULT: super::QueryEnd = super::QueryEnd::const_default();
13784 &DEFAULT
13785 }
13786 pub fn with_reason<T: Into<super::QueryEndReason>>(mut self, field: T) -> Self {
13788 self.set_reason(field.into());
13789 self
13790 }
13791 }
13792 impl super::QueryOptions {
13793 pub const fn const_default() -> Self {
13794 Self {
13795 limit: None,
13796 after: None,
13797 before: None,
13798 ordering: None,
13799 }
13800 }
13801 #[doc(hidden)]
13802 pub fn default_instance() -> &'static Self {
13803 static DEFAULT: super::QueryOptions = super::QueryOptions::const_default();
13804 &DEFAULT
13805 }
13806 pub fn limit_opt_mut(&mut self) -> Option<&mut u32> {
13808 self.limit.as_mut().map(|field| field as _)
13809 }
13810 pub fn limit_mut(&mut self) -> &mut u32 {
13813 self.limit.get_or_insert_default()
13814 }
13815 pub fn limit_opt(&self) -> Option<u32> {
13817 self.limit.as_ref().map(|field| *field)
13818 }
13819 pub fn set_limit(&mut self, field: u32) {
13821 self.limit = Some(field);
13822 }
13823 pub fn with_limit(mut self, field: u32) -> Self {
13825 self.set_limit(field);
13826 self
13827 }
13828 pub fn after_opt(&self) -> Option<&[u8]> {
13830 self.after.as_ref().map(|field| field as _)
13831 }
13832 pub fn set_after<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
13834 self.after = Some(field.into().into());
13835 }
13836 pub fn with_after<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
13838 self.set_after(field.into());
13839 self
13840 }
13841 pub fn before_opt(&self) -> Option<&[u8]> {
13843 self.before.as_ref().map(|field| field as _)
13844 }
13845 pub fn set_before<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
13847 self.before = Some(field.into().into());
13848 }
13849 pub fn with_before<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
13851 self.set_before(field.into());
13852 self
13853 }
13854 pub fn with_ordering<T: Into<super::Ordering>>(mut self, field: T) -> Self {
13856 self.set_ordering(field.into());
13857 self
13858 }
13859 }
13860 impl super::RandomnessStateUpdate {
13861 pub const fn const_default() -> Self {
13862 Self {
13863 epoch: None,
13864 randomness_round: None,
13865 random_bytes: None,
13866 randomness_object_initial_shared_version: None,
13867 }
13868 }
13869 #[doc(hidden)]
13870 pub fn default_instance() -> &'static Self {
13871 static DEFAULT: super::RandomnessStateUpdate = super::RandomnessStateUpdate::const_default();
13872 &DEFAULT
13873 }
13874 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
13876 self.epoch.as_mut().map(|field| field as _)
13877 }
13878 pub fn epoch_mut(&mut self) -> &mut u64 {
13881 self.epoch.get_or_insert_default()
13882 }
13883 pub fn epoch_opt(&self) -> Option<u64> {
13885 self.epoch.as_ref().map(|field| *field)
13886 }
13887 pub fn set_epoch(&mut self, field: u64) {
13889 self.epoch = Some(field);
13890 }
13891 pub fn with_epoch(mut self, field: u64) -> Self {
13893 self.set_epoch(field);
13894 self
13895 }
13896 pub fn randomness_round_opt_mut(&mut self) -> Option<&mut u64> {
13898 self.randomness_round.as_mut().map(|field| field as _)
13899 }
13900 pub fn randomness_round_mut(&mut self) -> &mut u64 {
13903 self.randomness_round.get_or_insert_default()
13904 }
13905 pub fn randomness_round_opt(&self) -> Option<u64> {
13907 self.randomness_round.as_ref().map(|field| *field)
13908 }
13909 pub fn set_randomness_round(&mut self, field: u64) {
13911 self.randomness_round = Some(field);
13912 }
13913 pub fn with_randomness_round(mut self, field: u64) -> Self {
13915 self.set_randomness_round(field);
13916 self
13917 }
13918 pub fn random_bytes_opt(&self) -> Option<&[u8]> {
13920 self.random_bytes.as_ref().map(|field| field as _)
13921 }
13922 pub fn set_random_bytes<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
13924 self.random_bytes = Some(field.into().into());
13925 }
13926 pub fn with_random_bytes<T: Into<::prost::bytes::Bytes>>(
13928 mut self,
13929 field: T,
13930 ) -> Self {
13931 self.set_random_bytes(field.into());
13932 self
13933 }
13934 pub fn randomness_object_initial_shared_version_opt_mut(
13936 &mut self,
13937 ) -> Option<&mut u64> {
13938 self.randomness_object_initial_shared_version
13939 .as_mut()
13940 .map(|field| field as _)
13941 }
13942 pub fn randomness_object_initial_shared_version_mut(&mut self) -> &mut u64 {
13945 self.randomness_object_initial_shared_version.get_or_insert_default()
13946 }
13947 pub fn randomness_object_initial_shared_version_opt(&self) -> Option<u64> {
13949 self.randomness_object_initial_shared_version.as_ref().map(|field| *field)
13950 }
13951 pub fn set_randomness_object_initial_shared_version(&mut self, field: u64) {
13953 self.randomness_object_initial_shared_version = Some(field);
13954 }
13955 pub fn with_randomness_object_initial_shared_version(
13957 mut self,
13958 field: u64,
13959 ) -> Self {
13960 self.set_randomness_object_initial_shared_version(field);
13961 self
13962 }
13963 }
13964 impl super::RegulatedCoinMetadata {
13965 pub const fn const_default() -> Self {
13966 Self {
13967 id: None,
13968 coin_metadata_object: None,
13969 deny_cap_object: None,
13970 allow_global_pause: None,
13971 variant: None,
13972 coin_regulated_state: None,
13973 }
13974 }
13975 #[doc(hidden)]
13976 pub fn default_instance() -> &'static Self {
13977 static DEFAULT: super::RegulatedCoinMetadata = super::RegulatedCoinMetadata::const_default();
13978 &DEFAULT
13979 }
13980 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
13982 self.id.as_mut().map(|field| field as _)
13983 }
13984 pub fn id_mut(&mut self) -> &mut String {
13987 self.id.get_or_insert_default()
13988 }
13989 pub fn id_opt(&self) -> Option<&str> {
13991 self.id.as_ref().map(|field| field as _)
13992 }
13993 pub fn set_id<T: Into<String>>(&mut self, field: T) {
13995 self.id = Some(field.into().into());
13996 }
13997 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
13999 self.set_id(field.into());
14000 self
14001 }
14002 pub fn coin_metadata_object_opt_mut(&mut self) -> Option<&mut String> {
14004 self.coin_metadata_object.as_mut().map(|field| field as _)
14005 }
14006 pub fn coin_metadata_object_mut(&mut self) -> &mut String {
14009 self.coin_metadata_object.get_or_insert_default()
14010 }
14011 pub fn coin_metadata_object_opt(&self) -> Option<&str> {
14013 self.coin_metadata_object.as_ref().map(|field| field as _)
14014 }
14015 pub fn set_coin_metadata_object<T: Into<String>>(&mut self, field: T) {
14017 self.coin_metadata_object = Some(field.into().into());
14018 }
14019 pub fn with_coin_metadata_object<T: Into<String>>(mut self, field: T) -> Self {
14021 self.set_coin_metadata_object(field.into());
14022 self
14023 }
14024 pub fn deny_cap_object_opt_mut(&mut self) -> Option<&mut String> {
14026 self.deny_cap_object.as_mut().map(|field| field as _)
14027 }
14028 pub fn deny_cap_object_mut(&mut self) -> &mut String {
14031 self.deny_cap_object.get_or_insert_default()
14032 }
14033 pub fn deny_cap_object_opt(&self) -> Option<&str> {
14035 self.deny_cap_object.as_ref().map(|field| field as _)
14036 }
14037 pub fn set_deny_cap_object<T: Into<String>>(&mut self, field: T) {
14039 self.deny_cap_object = Some(field.into().into());
14040 }
14041 pub fn with_deny_cap_object<T: Into<String>>(mut self, field: T) -> Self {
14043 self.set_deny_cap_object(field.into());
14044 self
14045 }
14046 pub fn allow_global_pause_opt_mut(&mut self) -> Option<&mut bool> {
14048 self.allow_global_pause.as_mut().map(|field| field as _)
14049 }
14050 pub fn allow_global_pause_mut(&mut self) -> &mut bool {
14053 self.allow_global_pause.get_or_insert_default()
14054 }
14055 pub fn allow_global_pause_opt(&self) -> Option<bool> {
14057 self.allow_global_pause.as_ref().map(|field| *field)
14058 }
14059 pub fn set_allow_global_pause(&mut self, field: bool) {
14061 self.allow_global_pause = Some(field);
14062 }
14063 pub fn with_allow_global_pause(mut self, field: bool) -> Self {
14065 self.set_allow_global_pause(field);
14066 self
14067 }
14068 pub fn variant_opt_mut(&mut self) -> Option<&mut u32> {
14070 self.variant.as_mut().map(|field| field as _)
14071 }
14072 pub fn variant_mut(&mut self) -> &mut u32 {
14075 self.variant.get_or_insert_default()
14076 }
14077 pub fn variant_opt(&self) -> Option<u32> {
14079 self.variant.as_ref().map(|field| *field)
14080 }
14081 pub fn set_variant(&mut self, field: u32) {
14083 self.variant = Some(field);
14084 }
14085 pub fn with_variant(mut self, field: u32) -> Self {
14087 self.set_variant(field);
14088 self
14089 }
14090 pub fn with_coin_regulated_state<
14092 T: Into<super::regulated_coin_metadata::CoinRegulatedState>,
14093 >(mut self, field: T) -> Self {
14094 self.set_coin_regulated_state(field.into());
14095 self
14096 }
14097 }
14098 impl super::ReverseLookupNameRequest {
14099 pub const fn const_default() -> Self {
14100 Self { address: None }
14101 }
14102 #[doc(hidden)]
14103 pub fn default_instance() -> &'static Self {
14104 static DEFAULT: super::ReverseLookupNameRequest = super::ReverseLookupNameRequest::const_default();
14105 &DEFAULT
14106 }
14107 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
14109 self.address.as_mut().map(|field| field as _)
14110 }
14111 pub fn address_mut(&mut self) -> &mut String {
14114 self.address.get_or_insert_default()
14115 }
14116 pub fn address_opt(&self) -> Option<&str> {
14118 self.address.as_ref().map(|field| field as _)
14119 }
14120 pub fn set_address<T: Into<String>>(&mut self, field: T) {
14122 self.address = Some(field.into().into());
14123 }
14124 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
14126 self.set_address(field.into());
14127 self
14128 }
14129 }
14130 impl super::ReverseLookupNameResponse {
14131 pub const fn const_default() -> Self {
14132 Self { record: None }
14133 }
14134 #[doc(hidden)]
14135 pub fn default_instance() -> &'static Self {
14136 static DEFAULT: super::ReverseLookupNameResponse = super::ReverseLookupNameResponse::const_default();
14137 &DEFAULT
14138 }
14139 pub fn record(&self) -> &super::NameRecord {
14141 self.record
14142 .as_ref()
14143 .map(|field| field as _)
14144 .unwrap_or_else(|| super::NameRecord::default_instance() as _)
14145 }
14146 pub fn record_opt_mut(&mut self) -> Option<&mut super::NameRecord> {
14148 self.record.as_mut().map(|field| field as _)
14149 }
14150 pub fn record_mut(&mut self) -> &mut super::NameRecord {
14153 self.record.get_or_insert_default()
14154 }
14155 pub fn record_opt(&self) -> Option<&super::NameRecord> {
14157 self.record.as_ref().map(|field| field as _)
14158 }
14159 pub fn set_record<T: Into<super::NameRecord>>(&mut self, field: T) {
14161 self.record = Some(field.into().into());
14162 }
14163 pub fn with_record<T: Into<super::NameRecord>>(mut self, field: T) -> Self {
14165 self.set_record(field.into());
14166 self
14167 }
14168 }
14169 impl super::SenderFilter {
14170 pub const fn const_default() -> Self {
14171 Self { address: None }
14172 }
14173 #[doc(hidden)]
14174 pub fn default_instance() -> &'static Self {
14175 static DEFAULT: super::SenderFilter = super::SenderFilter::const_default();
14176 &DEFAULT
14177 }
14178 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
14180 self.address.as_mut().map(|field| field as _)
14181 }
14182 pub fn address_mut(&mut self) -> &mut String {
14185 self.address.get_or_insert_default()
14186 }
14187 pub fn address_opt(&self) -> Option<&str> {
14189 self.address.as_ref().map(|field| field as _)
14190 }
14191 pub fn set_address<T: Into<String>>(&mut self, field: T) {
14193 self.address = Some(field.into().into());
14194 }
14195 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
14197 self.set_address(field.into());
14198 self
14199 }
14200 }
14201 impl super::SimpleSignature {
14202 pub const fn const_default() -> Self {
14203 Self {
14204 scheme: None,
14205 signature: None,
14206 public_key: None,
14207 }
14208 }
14209 #[doc(hidden)]
14210 pub fn default_instance() -> &'static Self {
14211 static DEFAULT: super::SimpleSignature = super::SimpleSignature::const_default();
14212 &DEFAULT
14213 }
14214 pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
14216 self.set_scheme(field.into());
14217 self
14218 }
14219 pub fn signature_opt(&self) -> Option<&[u8]> {
14221 self.signature.as_ref().map(|field| field as _)
14222 }
14223 pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
14225 self.signature = Some(field.into().into());
14226 }
14227 pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
14229 mut self,
14230 field: T,
14231 ) -> Self {
14232 self.set_signature(field.into());
14233 self
14234 }
14235 pub fn public_key_opt(&self) -> Option<&[u8]> {
14237 self.public_key.as_ref().map(|field| field as _)
14238 }
14239 pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
14241 self.public_key = Some(field.into().into());
14242 }
14243 pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
14245 mut self,
14246 field: T,
14247 ) -> Self {
14248 self.set_public_key(field.into());
14249 self
14250 }
14251 }
14252 impl super::SimulateTransactionRequest {
14253 pub const fn const_default() -> Self {
14254 Self {
14255 transaction: None,
14256 read_mask: None,
14257 checks: None,
14258 do_gas_selection: None,
14259 }
14260 }
14261 #[doc(hidden)]
14262 pub fn default_instance() -> &'static Self {
14263 static DEFAULT: super::SimulateTransactionRequest = super::SimulateTransactionRequest::const_default();
14264 &DEFAULT
14265 }
14266 pub fn transaction(&self) -> &super::Transaction {
14268 self.transaction
14269 .as_ref()
14270 .map(|field| field as _)
14271 .unwrap_or_else(|| super::Transaction::default_instance() as _)
14272 }
14273 pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
14275 self.transaction.as_mut().map(|field| field as _)
14276 }
14277 pub fn transaction_mut(&mut self) -> &mut super::Transaction {
14280 self.transaction.get_or_insert_default()
14281 }
14282 pub fn transaction_opt(&self) -> Option<&super::Transaction> {
14284 self.transaction.as_ref().map(|field| field as _)
14285 }
14286 pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
14288 self.transaction = Some(field.into().into());
14289 }
14290 pub fn with_transaction<T: Into<super::Transaction>>(
14292 mut self,
14293 field: T,
14294 ) -> Self {
14295 self.set_transaction(field.into());
14296 self
14297 }
14298 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
14300 self.read_mask.as_mut().map(|field| field as _)
14301 }
14302 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
14305 self.read_mask.get_or_insert_default()
14306 }
14307 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
14309 self.read_mask.as_ref().map(|field| field as _)
14310 }
14311 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
14313 self.read_mask = Some(field.into().into());
14314 }
14315 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
14317 mut self,
14318 field: T,
14319 ) -> Self {
14320 self.set_read_mask(field.into());
14321 self
14322 }
14323 pub fn with_checks<
14325 T: Into<super::simulate_transaction_request::TransactionChecks>,
14326 >(mut self, field: T) -> Self {
14327 self.set_checks(field.into());
14328 self
14329 }
14330 pub fn do_gas_selection_opt_mut(&mut self) -> Option<&mut bool> {
14332 self.do_gas_selection.as_mut().map(|field| field as _)
14333 }
14334 pub fn do_gas_selection_mut(&mut self) -> &mut bool {
14337 self.do_gas_selection.get_or_insert_default()
14338 }
14339 pub fn do_gas_selection_opt(&self) -> Option<bool> {
14341 self.do_gas_selection.as_ref().map(|field| *field)
14342 }
14343 pub fn set_do_gas_selection(&mut self, field: bool) {
14345 self.do_gas_selection = Some(field);
14346 }
14347 pub fn with_do_gas_selection(mut self, field: bool) -> Self {
14349 self.set_do_gas_selection(field);
14350 self
14351 }
14352 }
14353 impl super::SimulateTransactionResponse {
14354 pub const fn const_default() -> Self {
14355 Self {
14356 transaction: None,
14357 command_outputs: Vec::new(),
14358 suggested_gas_price: None,
14359 }
14360 }
14361 #[doc(hidden)]
14362 pub fn default_instance() -> &'static Self {
14363 static DEFAULT: super::SimulateTransactionResponse = super::SimulateTransactionResponse::const_default();
14364 &DEFAULT
14365 }
14366 pub fn transaction(&self) -> &super::ExecutedTransaction {
14368 self.transaction
14369 .as_ref()
14370 .map(|field| field as _)
14371 .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
14372 }
14373 pub fn transaction_opt_mut(
14375 &mut self,
14376 ) -> Option<&mut super::ExecutedTransaction> {
14377 self.transaction.as_mut().map(|field| field as _)
14378 }
14379 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
14382 self.transaction.get_or_insert_default()
14383 }
14384 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
14386 self.transaction.as_ref().map(|field| field as _)
14387 }
14388 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
14390 &mut self,
14391 field: T,
14392 ) {
14393 self.transaction = Some(field.into().into());
14394 }
14395 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
14397 mut self,
14398 field: T,
14399 ) -> Self {
14400 self.set_transaction(field.into());
14401 self
14402 }
14403 pub fn command_outputs(&self) -> &[super::CommandResult] {
14405 &self.command_outputs
14406 }
14407 pub fn command_outputs_mut(&mut self) -> &mut Vec<super::CommandResult> {
14410 &mut self.command_outputs
14411 }
14412 pub fn set_command_outputs(&mut self, field: Vec<super::CommandResult>) {
14414 self.command_outputs = field;
14415 }
14416 pub fn with_command_outputs(mut self, field: Vec<super::CommandResult>) -> Self {
14418 self.set_command_outputs(field);
14419 self
14420 }
14421 pub fn suggested_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
14423 self.suggested_gas_price.as_mut().map(|field| field as _)
14424 }
14425 pub fn suggested_gas_price_mut(&mut self) -> &mut u64 {
14428 self.suggested_gas_price.get_or_insert_default()
14429 }
14430 pub fn suggested_gas_price_opt(&self) -> Option<u64> {
14432 self.suggested_gas_price.as_ref().map(|field| *field)
14433 }
14434 pub fn set_suggested_gas_price(&mut self, field: u64) {
14436 self.suggested_gas_price = Some(field);
14437 }
14438 pub fn with_suggested_gas_price(mut self, field: u64) -> Self {
14440 self.set_suggested_gas_price(field);
14441 self
14442 }
14443 }
14444 impl super::SizeError {
14445 pub const fn const_default() -> Self {
14446 Self { size: None, max_size: None }
14447 }
14448 #[doc(hidden)]
14449 pub fn default_instance() -> &'static Self {
14450 static DEFAULT: super::SizeError = super::SizeError::const_default();
14451 &DEFAULT
14452 }
14453 pub fn size_opt_mut(&mut self) -> Option<&mut u64> {
14455 self.size.as_mut().map(|field| field as _)
14456 }
14457 pub fn size_mut(&mut self) -> &mut u64 {
14460 self.size.get_or_insert_default()
14461 }
14462 pub fn size_opt(&self) -> Option<u64> {
14464 self.size.as_ref().map(|field| *field)
14465 }
14466 pub fn set_size(&mut self, field: u64) {
14468 self.size = Some(field);
14469 }
14470 pub fn with_size(mut self, field: u64) -> Self {
14472 self.set_size(field);
14473 self
14474 }
14475 pub fn max_size_opt_mut(&mut self) -> Option<&mut u64> {
14477 self.max_size.as_mut().map(|field| field as _)
14478 }
14479 pub fn max_size_mut(&mut self) -> &mut u64 {
14482 self.max_size.get_or_insert_default()
14483 }
14484 pub fn max_size_opt(&self) -> Option<u64> {
14486 self.max_size.as_ref().map(|field| *field)
14487 }
14488 pub fn set_max_size(&mut self, field: u64) {
14490 self.max_size = Some(field);
14491 }
14492 pub fn with_max_size(mut self, field: u64) -> Self {
14494 self.set_max_size(field);
14495 self
14496 }
14497 }
14498 impl super::SplitCoins {
14499 pub const fn const_default() -> Self {
14500 Self {
14501 coin: None,
14502 amounts: Vec::new(),
14503 }
14504 }
14505 #[doc(hidden)]
14506 pub fn default_instance() -> &'static Self {
14507 static DEFAULT: super::SplitCoins = super::SplitCoins::const_default();
14508 &DEFAULT
14509 }
14510 pub fn coin(&self) -> &super::Argument {
14512 self.coin
14513 .as_ref()
14514 .map(|field| field as _)
14515 .unwrap_or_else(|| super::Argument::default_instance() as _)
14516 }
14517 pub fn coin_opt_mut(&mut self) -> Option<&mut super::Argument> {
14519 self.coin.as_mut().map(|field| field as _)
14520 }
14521 pub fn coin_mut(&mut self) -> &mut super::Argument {
14524 self.coin.get_or_insert_default()
14525 }
14526 pub fn coin_opt(&self) -> Option<&super::Argument> {
14528 self.coin.as_ref().map(|field| field as _)
14529 }
14530 pub fn set_coin<T: Into<super::Argument>>(&mut self, field: T) {
14532 self.coin = Some(field.into().into());
14533 }
14534 pub fn with_coin<T: Into<super::Argument>>(mut self, field: T) -> Self {
14536 self.set_coin(field.into());
14537 self
14538 }
14539 pub fn amounts(&self) -> &[super::Argument] {
14541 &self.amounts
14542 }
14543 pub fn amounts_mut(&mut self) -> &mut Vec<super::Argument> {
14546 &mut self.amounts
14547 }
14548 pub fn set_amounts(&mut self, field: Vec<super::Argument>) {
14550 self.amounts = field;
14551 }
14552 pub fn with_amounts(mut self, field: Vec<super::Argument>) -> Self {
14554 self.set_amounts(field);
14555 self
14556 }
14557 }
14558 impl super::StakeSubsidy {
14559 pub const fn const_default() -> Self {
14560 Self {
14561 balance: None,
14562 distribution_counter: None,
14563 current_distribution_amount: None,
14564 stake_subsidy_period_length: None,
14565 stake_subsidy_decrease_rate: None,
14566 extra_fields: None,
14567 }
14568 }
14569 #[doc(hidden)]
14570 pub fn default_instance() -> &'static Self {
14571 static DEFAULT: super::StakeSubsidy = super::StakeSubsidy::const_default();
14572 &DEFAULT
14573 }
14574 pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
14576 self.balance.as_mut().map(|field| field as _)
14577 }
14578 pub fn balance_mut(&mut self) -> &mut u64 {
14581 self.balance.get_or_insert_default()
14582 }
14583 pub fn balance_opt(&self) -> Option<u64> {
14585 self.balance.as_ref().map(|field| *field)
14586 }
14587 pub fn set_balance(&mut self, field: u64) {
14589 self.balance = Some(field);
14590 }
14591 pub fn with_balance(mut self, field: u64) -> Self {
14593 self.set_balance(field);
14594 self
14595 }
14596 pub fn distribution_counter_opt_mut(&mut self) -> Option<&mut u64> {
14598 self.distribution_counter.as_mut().map(|field| field as _)
14599 }
14600 pub fn distribution_counter_mut(&mut self) -> &mut u64 {
14603 self.distribution_counter.get_or_insert_default()
14604 }
14605 pub fn distribution_counter_opt(&self) -> Option<u64> {
14607 self.distribution_counter.as_ref().map(|field| *field)
14608 }
14609 pub fn set_distribution_counter(&mut self, field: u64) {
14611 self.distribution_counter = Some(field);
14612 }
14613 pub fn with_distribution_counter(mut self, field: u64) -> Self {
14615 self.set_distribution_counter(field);
14616 self
14617 }
14618 pub fn current_distribution_amount_opt_mut(&mut self) -> Option<&mut u64> {
14620 self.current_distribution_amount.as_mut().map(|field| field as _)
14621 }
14622 pub fn current_distribution_amount_mut(&mut self) -> &mut u64 {
14625 self.current_distribution_amount.get_or_insert_default()
14626 }
14627 pub fn current_distribution_amount_opt(&self) -> Option<u64> {
14629 self.current_distribution_amount.as_ref().map(|field| *field)
14630 }
14631 pub fn set_current_distribution_amount(&mut self, field: u64) {
14633 self.current_distribution_amount = Some(field);
14634 }
14635 pub fn with_current_distribution_amount(mut self, field: u64) -> Self {
14637 self.set_current_distribution_amount(field);
14638 self
14639 }
14640 pub fn stake_subsidy_period_length_opt_mut(&mut self) -> Option<&mut u64> {
14642 self.stake_subsidy_period_length.as_mut().map(|field| field as _)
14643 }
14644 pub fn stake_subsidy_period_length_mut(&mut self) -> &mut u64 {
14647 self.stake_subsidy_period_length.get_or_insert_default()
14648 }
14649 pub fn stake_subsidy_period_length_opt(&self) -> Option<u64> {
14651 self.stake_subsidy_period_length.as_ref().map(|field| *field)
14652 }
14653 pub fn set_stake_subsidy_period_length(&mut self, field: u64) {
14655 self.stake_subsidy_period_length = Some(field);
14656 }
14657 pub fn with_stake_subsidy_period_length(mut self, field: u64) -> Self {
14659 self.set_stake_subsidy_period_length(field);
14660 self
14661 }
14662 pub fn stake_subsidy_decrease_rate_opt_mut(&mut self) -> Option<&mut u32> {
14664 self.stake_subsidy_decrease_rate.as_mut().map(|field| field as _)
14665 }
14666 pub fn stake_subsidy_decrease_rate_mut(&mut self) -> &mut u32 {
14669 self.stake_subsidy_decrease_rate.get_or_insert_default()
14670 }
14671 pub fn stake_subsidy_decrease_rate_opt(&self) -> Option<u32> {
14673 self.stake_subsidy_decrease_rate.as_ref().map(|field| *field)
14674 }
14675 pub fn set_stake_subsidy_decrease_rate(&mut self, field: u32) {
14677 self.stake_subsidy_decrease_rate = Some(field);
14678 }
14679 pub fn with_stake_subsidy_decrease_rate(mut self, field: u32) -> Self {
14681 self.set_stake_subsidy_decrease_rate(field);
14682 self
14683 }
14684 pub fn extra_fields(&self) -> &super::MoveTable {
14686 self.extra_fields
14687 .as_ref()
14688 .map(|field| field as _)
14689 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
14690 }
14691 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
14693 self.extra_fields.as_mut().map(|field| field as _)
14694 }
14695 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
14698 self.extra_fields.get_or_insert_default()
14699 }
14700 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
14702 self.extra_fields.as_ref().map(|field| field as _)
14703 }
14704 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
14706 self.extra_fields = Some(field.into().into());
14707 }
14708 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
14710 self.set_extra_fields(field.into());
14711 self
14712 }
14713 }
14714 impl super::StakingPool {
14715 pub const fn const_default() -> Self {
14716 Self {
14717 id: None,
14718 activation_epoch: None,
14719 deactivation_epoch: None,
14720 sui_balance: None,
14721 rewards_pool: None,
14722 pool_token_balance: None,
14723 exchange_rates: None,
14724 pending_stake: None,
14725 pending_total_sui_withdraw: None,
14726 pending_pool_token_withdraw: None,
14727 extra_fields: None,
14728 }
14729 }
14730 #[doc(hidden)]
14731 pub fn default_instance() -> &'static Self {
14732 static DEFAULT: super::StakingPool = super::StakingPool::const_default();
14733 &DEFAULT
14734 }
14735 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
14737 self.id.as_mut().map(|field| field as _)
14738 }
14739 pub fn id_mut(&mut self) -> &mut String {
14742 self.id.get_or_insert_default()
14743 }
14744 pub fn id_opt(&self) -> Option<&str> {
14746 self.id.as_ref().map(|field| field as _)
14747 }
14748 pub fn set_id<T: Into<String>>(&mut self, field: T) {
14750 self.id = Some(field.into().into());
14751 }
14752 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
14754 self.set_id(field.into());
14755 self
14756 }
14757 pub fn activation_epoch_opt_mut(&mut self) -> Option<&mut u64> {
14759 self.activation_epoch.as_mut().map(|field| field as _)
14760 }
14761 pub fn activation_epoch_mut(&mut self) -> &mut u64 {
14764 self.activation_epoch.get_or_insert_default()
14765 }
14766 pub fn activation_epoch_opt(&self) -> Option<u64> {
14768 self.activation_epoch.as_ref().map(|field| *field)
14769 }
14770 pub fn set_activation_epoch(&mut self, field: u64) {
14772 self.activation_epoch = Some(field);
14773 }
14774 pub fn with_activation_epoch(mut self, field: u64) -> Self {
14776 self.set_activation_epoch(field);
14777 self
14778 }
14779 pub fn deactivation_epoch_opt_mut(&mut self) -> Option<&mut u64> {
14781 self.deactivation_epoch.as_mut().map(|field| field as _)
14782 }
14783 pub fn deactivation_epoch_mut(&mut self) -> &mut u64 {
14786 self.deactivation_epoch.get_or_insert_default()
14787 }
14788 pub fn deactivation_epoch_opt(&self) -> Option<u64> {
14790 self.deactivation_epoch.as_ref().map(|field| *field)
14791 }
14792 pub fn set_deactivation_epoch(&mut self, field: u64) {
14794 self.deactivation_epoch = Some(field);
14795 }
14796 pub fn with_deactivation_epoch(mut self, field: u64) -> Self {
14798 self.set_deactivation_epoch(field);
14799 self
14800 }
14801 pub fn sui_balance_opt_mut(&mut self) -> Option<&mut u64> {
14803 self.sui_balance.as_mut().map(|field| field as _)
14804 }
14805 pub fn sui_balance_mut(&mut self) -> &mut u64 {
14808 self.sui_balance.get_or_insert_default()
14809 }
14810 pub fn sui_balance_opt(&self) -> Option<u64> {
14812 self.sui_balance.as_ref().map(|field| *field)
14813 }
14814 pub fn set_sui_balance(&mut self, field: u64) {
14816 self.sui_balance = Some(field);
14817 }
14818 pub fn with_sui_balance(mut self, field: u64) -> Self {
14820 self.set_sui_balance(field);
14821 self
14822 }
14823 pub fn rewards_pool_opt_mut(&mut self) -> Option<&mut u64> {
14825 self.rewards_pool.as_mut().map(|field| field as _)
14826 }
14827 pub fn rewards_pool_mut(&mut self) -> &mut u64 {
14830 self.rewards_pool.get_or_insert_default()
14831 }
14832 pub fn rewards_pool_opt(&self) -> Option<u64> {
14834 self.rewards_pool.as_ref().map(|field| *field)
14835 }
14836 pub fn set_rewards_pool(&mut self, field: u64) {
14838 self.rewards_pool = Some(field);
14839 }
14840 pub fn with_rewards_pool(mut self, field: u64) -> Self {
14842 self.set_rewards_pool(field);
14843 self
14844 }
14845 pub fn pool_token_balance_opt_mut(&mut self) -> Option<&mut u64> {
14847 self.pool_token_balance.as_mut().map(|field| field as _)
14848 }
14849 pub fn pool_token_balance_mut(&mut self) -> &mut u64 {
14852 self.pool_token_balance.get_or_insert_default()
14853 }
14854 pub fn pool_token_balance_opt(&self) -> Option<u64> {
14856 self.pool_token_balance.as_ref().map(|field| *field)
14857 }
14858 pub fn set_pool_token_balance(&mut self, field: u64) {
14860 self.pool_token_balance = Some(field);
14861 }
14862 pub fn with_pool_token_balance(mut self, field: u64) -> Self {
14864 self.set_pool_token_balance(field);
14865 self
14866 }
14867 pub fn exchange_rates(&self) -> &super::MoveTable {
14869 self.exchange_rates
14870 .as_ref()
14871 .map(|field| field as _)
14872 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
14873 }
14874 pub fn exchange_rates_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
14876 self.exchange_rates.as_mut().map(|field| field as _)
14877 }
14878 pub fn exchange_rates_mut(&mut self) -> &mut super::MoveTable {
14881 self.exchange_rates.get_or_insert_default()
14882 }
14883 pub fn exchange_rates_opt(&self) -> Option<&super::MoveTable> {
14885 self.exchange_rates.as_ref().map(|field| field as _)
14886 }
14887 pub fn set_exchange_rates<T: Into<super::MoveTable>>(&mut self, field: T) {
14889 self.exchange_rates = Some(field.into().into());
14890 }
14891 pub fn with_exchange_rates<T: Into<super::MoveTable>>(
14893 mut self,
14894 field: T,
14895 ) -> Self {
14896 self.set_exchange_rates(field.into());
14897 self
14898 }
14899 pub fn pending_stake_opt_mut(&mut self) -> Option<&mut u64> {
14901 self.pending_stake.as_mut().map(|field| field as _)
14902 }
14903 pub fn pending_stake_mut(&mut self) -> &mut u64 {
14906 self.pending_stake.get_or_insert_default()
14907 }
14908 pub fn pending_stake_opt(&self) -> Option<u64> {
14910 self.pending_stake.as_ref().map(|field| *field)
14911 }
14912 pub fn set_pending_stake(&mut self, field: u64) {
14914 self.pending_stake = Some(field);
14915 }
14916 pub fn with_pending_stake(mut self, field: u64) -> Self {
14918 self.set_pending_stake(field);
14919 self
14920 }
14921 pub fn pending_total_sui_withdraw_opt_mut(&mut self) -> Option<&mut u64> {
14923 self.pending_total_sui_withdraw.as_mut().map(|field| field as _)
14924 }
14925 pub fn pending_total_sui_withdraw_mut(&mut self) -> &mut u64 {
14928 self.pending_total_sui_withdraw.get_or_insert_default()
14929 }
14930 pub fn pending_total_sui_withdraw_opt(&self) -> Option<u64> {
14932 self.pending_total_sui_withdraw.as_ref().map(|field| *field)
14933 }
14934 pub fn set_pending_total_sui_withdraw(&mut self, field: u64) {
14936 self.pending_total_sui_withdraw = Some(field);
14937 }
14938 pub fn with_pending_total_sui_withdraw(mut self, field: u64) -> Self {
14940 self.set_pending_total_sui_withdraw(field);
14941 self
14942 }
14943 pub fn pending_pool_token_withdraw_opt_mut(&mut self) -> Option<&mut u64> {
14945 self.pending_pool_token_withdraw.as_mut().map(|field| field as _)
14946 }
14947 pub fn pending_pool_token_withdraw_mut(&mut self) -> &mut u64 {
14950 self.pending_pool_token_withdraw.get_or_insert_default()
14951 }
14952 pub fn pending_pool_token_withdraw_opt(&self) -> Option<u64> {
14954 self.pending_pool_token_withdraw.as_ref().map(|field| *field)
14955 }
14956 pub fn set_pending_pool_token_withdraw(&mut self, field: u64) {
14958 self.pending_pool_token_withdraw = Some(field);
14959 }
14960 pub fn with_pending_pool_token_withdraw(mut self, field: u64) -> Self {
14962 self.set_pending_pool_token_withdraw(field);
14963 self
14964 }
14965 pub fn extra_fields(&self) -> &super::MoveTable {
14967 self.extra_fields
14968 .as_ref()
14969 .map(|field| field as _)
14970 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
14971 }
14972 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
14974 self.extra_fields.as_mut().map(|field| field as _)
14975 }
14976 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
14979 self.extra_fields.get_or_insert_default()
14980 }
14981 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
14983 self.extra_fields.as_ref().map(|field| field as _)
14984 }
14985 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
14987 self.extra_fields = Some(field.into().into());
14988 }
14989 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
14991 self.set_extra_fields(field.into());
14992 self
14993 }
14994 }
14995 impl super::StorageFund {
14996 pub const fn const_default() -> Self {
14997 Self {
14998 total_object_storage_rebates: None,
14999 non_refundable_balance: None,
15000 }
15001 }
15002 #[doc(hidden)]
15003 pub fn default_instance() -> &'static Self {
15004 static DEFAULT: super::StorageFund = super::StorageFund::const_default();
15005 &DEFAULT
15006 }
15007 pub fn total_object_storage_rebates_opt_mut(&mut self) -> Option<&mut u64> {
15009 self.total_object_storage_rebates.as_mut().map(|field| field as _)
15010 }
15011 pub fn total_object_storage_rebates_mut(&mut self) -> &mut u64 {
15014 self.total_object_storage_rebates.get_or_insert_default()
15015 }
15016 pub fn total_object_storage_rebates_opt(&self) -> Option<u64> {
15018 self.total_object_storage_rebates.as_ref().map(|field| *field)
15019 }
15020 pub fn set_total_object_storage_rebates(&mut self, field: u64) {
15022 self.total_object_storage_rebates = Some(field);
15023 }
15024 pub fn with_total_object_storage_rebates(mut self, field: u64) -> Self {
15026 self.set_total_object_storage_rebates(field);
15027 self
15028 }
15029 pub fn non_refundable_balance_opt_mut(&mut self) -> Option<&mut u64> {
15031 self.non_refundable_balance.as_mut().map(|field| field as _)
15032 }
15033 pub fn non_refundable_balance_mut(&mut self) -> &mut u64 {
15036 self.non_refundable_balance.get_or_insert_default()
15037 }
15038 pub fn non_refundable_balance_opt(&self) -> Option<u64> {
15040 self.non_refundable_balance.as_ref().map(|field| *field)
15041 }
15042 pub fn set_non_refundable_balance(&mut self, field: u64) {
15044 self.non_refundable_balance = Some(field);
15045 }
15046 pub fn with_non_refundable_balance(mut self, field: u64) -> Self {
15048 self.set_non_refundable_balance(field);
15049 self
15050 }
15051 }
15052 impl super::SubscribeCheckpointsRequest {
15053 pub const fn const_default() -> Self {
15054 Self {
15055 read_mask: None,
15056 filter: None,
15057 }
15058 }
15059 #[doc(hidden)]
15060 pub fn default_instance() -> &'static Self {
15061 static DEFAULT: super::SubscribeCheckpointsRequest = super::SubscribeCheckpointsRequest::const_default();
15062 &DEFAULT
15063 }
15064 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
15066 self.read_mask.as_mut().map(|field| field as _)
15067 }
15068 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
15071 self.read_mask.get_or_insert_default()
15072 }
15073 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
15075 self.read_mask.as_ref().map(|field| field as _)
15076 }
15077 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
15079 self.read_mask = Some(field.into().into());
15080 }
15081 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
15083 mut self,
15084 field: T,
15085 ) -> Self {
15086 self.set_read_mask(field.into());
15087 self
15088 }
15089 pub fn filter(&self) -> &super::TransactionFilter {
15091 self.filter
15092 .as_ref()
15093 .map(|field| field as _)
15094 .unwrap_or_else(|| super::TransactionFilter::default_instance() as _)
15095 }
15096 pub fn filter_opt_mut(&mut self) -> Option<&mut super::TransactionFilter> {
15098 self.filter.as_mut().map(|field| field as _)
15099 }
15100 pub fn filter_mut(&mut self) -> &mut super::TransactionFilter {
15103 self.filter.get_or_insert_default()
15104 }
15105 pub fn filter_opt(&self) -> Option<&super::TransactionFilter> {
15107 self.filter.as_ref().map(|field| field as _)
15108 }
15109 pub fn set_filter<T: Into<super::TransactionFilter>>(&mut self, field: T) {
15111 self.filter = Some(field.into().into());
15112 }
15113 pub fn with_filter<T: Into<super::TransactionFilter>>(
15115 mut self,
15116 field: T,
15117 ) -> Self {
15118 self.set_filter(field.into());
15119 self
15120 }
15121 }
15122 impl super::SubscribeCheckpointsResponse {
15123 pub const fn const_default() -> Self {
15124 Self {
15125 cursor: None,
15126 checkpoint: None,
15127 }
15128 }
15129 #[doc(hidden)]
15130 pub fn default_instance() -> &'static Self {
15131 static DEFAULT: super::SubscribeCheckpointsResponse = super::SubscribeCheckpointsResponse::const_default();
15132 &DEFAULT
15133 }
15134 pub fn cursor_opt_mut(&mut self) -> Option<&mut u64> {
15136 self.cursor.as_mut().map(|field| field as _)
15137 }
15138 pub fn cursor_mut(&mut self) -> &mut u64 {
15141 self.cursor.get_or_insert_default()
15142 }
15143 pub fn cursor_opt(&self) -> Option<u64> {
15145 self.cursor.as_ref().map(|field| *field)
15146 }
15147 pub fn set_cursor(&mut self, field: u64) {
15149 self.cursor = Some(field);
15150 }
15151 pub fn with_cursor(mut self, field: u64) -> Self {
15153 self.set_cursor(field);
15154 self
15155 }
15156 pub fn checkpoint(&self) -> &super::Checkpoint {
15158 self.checkpoint
15159 .as_ref()
15160 .map(|field| field as _)
15161 .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
15162 }
15163 pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
15165 self.checkpoint.as_mut().map(|field| field as _)
15166 }
15167 pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
15170 self.checkpoint.get_or_insert_default()
15171 }
15172 pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
15174 self.checkpoint.as_ref().map(|field| field as _)
15175 }
15176 pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
15178 self.checkpoint = Some(field.into().into());
15179 }
15180 pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
15182 self.set_checkpoint(field.into());
15183 self
15184 }
15185 }
15186 impl super::SubscribeEventsRequest {
15187 pub const fn const_default() -> Self {
15188 Self {
15189 read_mask: None,
15190 filter: None,
15191 }
15192 }
15193 #[doc(hidden)]
15194 pub fn default_instance() -> &'static Self {
15195 static DEFAULT: super::SubscribeEventsRequest = super::SubscribeEventsRequest::const_default();
15196 &DEFAULT
15197 }
15198 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
15200 self.read_mask.as_mut().map(|field| field as _)
15201 }
15202 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
15205 self.read_mask.get_or_insert_default()
15206 }
15207 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
15209 self.read_mask.as_ref().map(|field| field as _)
15210 }
15211 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
15213 self.read_mask = Some(field.into().into());
15214 }
15215 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
15217 mut self,
15218 field: T,
15219 ) -> Self {
15220 self.set_read_mask(field.into());
15221 self
15222 }
15223 pub fn filter(&self) -> &super::EventFilter {
15225 self.filter
15226 .as_ref()
15227 .map(|field| field as _)
15228 .unwrap_or_else(|| super::EventFilter::default_instance() as _)
15229 }
15230 pub fn filter_opt_mut(&mut self) -> Option<&mut super::EventFilter> {
15232 self.filter.as_mut().map(|field| field as _)
15233 }
15234 pub fn filter_mut(&mut self) -> &mut super::EventFilter {
15237 self.filter.get_or_insert_default()
15238 }
15239 pub fn filter_opt(&self) -> Option<&super::EventFilter> {
15241 self.filter.as_ref().map(|field| field as _)
15242 }
15243 pub fn set_filter<T: Into<super::EventFilter>>(&mut self, field: T) {
15245 self.filter = Some(field.into().into());
15246 }
15247 pub fn with_filter<T: Into<super::EventFilter>>(mut self, field: T) -> Self {
15249 self.set_filter(field.into());
15250 self
15251 }
15252 }
15253 impl super::SubscribeEventsResponse {
15254 pub const fn const_default() -> Self {
15255 Self {
15256 event: None,
15257 watermark: None,
15258 }
15259 }
15260 #[doc(hidden)]
15261 pub fn default_instance() -> &'static Self {
15262 static DEFAULT: super::SubscribeEventsResponse = super::SubscribeEventsResponse::const_default();
15263 &DEFAULT
15264 }
15265 pub fn event(&self) -> &super::Event {
15267 self.event
15268 .as_ref()
15269 .map(|field| field as _)
15270 .unwrap_or_else(|| super::Event::default_instance() as _)
15271 }
15272 pub fn event_opt_mut(&mut self) -> Option<&mut super::Event> {
15274 self.event.as_mut().map(|field| field as _)
15275 }
15276 pub fn event_mut(&mut self) -> &mut super::Event {
15279 self.event.get_or_insert_default()
15280 }
15281 pub fn event_opt(&self) -> Option<&super::Event> {
15283 self.event.as_ref().map(|field| field as _)
15284 }
15285 pub fn set_event<T: Into<super::Event>>(&mut self, field: T) {
15287 self.event = Some(field.into().into());
15288 }
15289 pub fn with_event<T: Into<super::Event>>(mut self, field: T) -> Self {
15291 self.set_event(field.into());
15292 self
15293 }
15294 pub fn watermark(&self) -> &super::Watermark {
15296 self.watermark
15297 .as_ref()
15298 .map(|field| field as _)
15299 .unwrap_or_else(|| super::Watermark::default_instance() as _)
15300 }
15301 pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
15303 self.watermark.as_mut().map(|field| field as _)
15304 }
15305 pub fn watermark_mut(&mut self) -> &mut super::Watermark {
15308 self.watermark.get_or_insert_default()
15309 }
15310 pub fn watermark_opt(&self) -> Option<&super::Watermark> {
15312 self.watermark.as_ref().map(|field| field as _)
15313 }
15314 pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
15316 self.watermark = Some(field.into().into());
15317 }
15318 pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
15320 self.set_watermark(field.into());
15321 self
15322 }
15323 }
15324 impl super::SubscribeTransactionsRequest {
15325 pub const fn const_default() -> Self {
15326 Self {
15327 read_mask: None,
15328 filter: None,
15329 }
15330 }
15331 #[doc(hidden)]
15332 pub fn default_instance() -> &'static Self {
15333 static DEFAULT: super::SubscribeTransactionsRequest = super::SubscribeTransactionsRequest::const_default();
15334 &DEFAULT
15335 }
15336 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
15338 self.read_mask.as_mut().map(|field| field as _)
15339 }
15340 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
15343 self.read_mask.get_or_insert_default()
15344 }
15345 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
15347 self.read_mask.as_ref().map(|field| field as _)
15348 }
15349 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
15351 self.read_mask = Some(field.into().into());
15352 }
15353 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
15355 mut self,
15356 field: T,
15357 ) -> Self {
15358 self.set_read_mask(field.into());
15359 self
15360 }
15361 pub fn filter(&self) -> &super::TransactionFilter {
15363 self.filter
15364 .as_ref()
15365 .map(|field| field as _)
15366 .unwrap_or_else(|| super::TransactionFilter::default_instance() as _)
15367 }
15368 pub fn filter_opt_mut(&mut self) -> Option<&mut super::TransactionFilter> {
15370 self.filter.as_mut().map(|field| field as _)
15371 }
15372 pub fn filter_mut(&mut self) -> &mut super::TransactionFilter {
15375 self.filter.get_or_insert_default()
15376 }
15377 pub fn filter_opt(&self) -> Option<&super::TransactionFilter> {
15379 self.filter.as_ref().map(|field| field as _)
15380 }
15381 pub fn set_filter<T: Into<super::TransactionFilter>>(&mut self, field: T) {
15383 self.filter = Some(field.into().into());
15384 }
15385 pub fn with_filter<T: Into<super::TransactionFilter>>(
15387 mut self,
15388 field: T,
15389 ) -> Self {
15390 self.set_filter(field.into());
15391 self
15392 }
15393 }
15394 impl super::SubscribeTransactionsResponse {
15395 pub const fn const_default() -> Self {
15396 Self {
15397 transaction: None,
15398 watermark: None,
15399 }
15400 }
15401 #[doc(hidden)]
15402 pub fn default_instance() -> &'static Self {
15403 static DEFAULT: super::SubscribeTransactionsResponse = super::SubscribeTransactionsResponse::const_default();
15404 &DEFAULT
15405 }
15406 pub fn transaction(&self) -> &super::ExecutedTransaction {
15408 self.transaction
15409 .as_ref()
15410 .map(|field| field as _)
15411 .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
15412 }
15413 pub fn transaction_opt_mut(
15415 &mut self,
15416 ) -> Option<&mut super::ExecutedTransaction> {
15417 self.transaction.as_mut().map(|field| field as _)
15418 }
15419 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
15422 self.transaction.get_or_insert_default()
15423 }
15424 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
15426 self.transaction.as_ref().map(|field| field as _)
15427 }
15428 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
15430 &mut self,
15431 field: T,
15432 ) {
15433 self.transaction = Some(field.into().into());
15434 }
15435 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
15437 mut self,
15438 field: T,
15439 ) -> Self {
15440 self.set_transaction(field.into());
15441 self
15442 }
15443 pub fn watermark(&self) -> &super::Watermark {
15445 self.watermark
15446 .as_ref()
15447 .map(|field| field as _)
15448 .unwrap_or_else(|| super::Watermark::default_instance() as _)
15449 }
15450 pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
15452 self.watermark.as_mut().map(|field| field as _)
15453 }
15454 pub fn watermark_mut(&mut self) -> &mut super::Watermark {
15457 self.watermark.get_or_insert_default()
15458 }
15459 pub fn watermark_opt(&self) -> Option<&super::Watermark> {
15461 self.watermark.as_ref().map(|field| field as _)
15462 }
15463 pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
15465 self.watermark = Some(field.into().into());
15466 }
15467 pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
15469 self.set_watermark(field.into());
15470 self
15471 }
15472 }
15473 impl super::SystemPackage {
15474 pub const fn const_default() -> Self {
15475 Self {
15476 version: None,
15477 modules: Vec::new(),
15478 dependencies: Vec::new(),
15479 }
15480 }
15481 #[doc(hidden)]
15482 pub fn default_instance() -> &'static Self {
15483 static DEFAULT: super::SystemPackage = super::SystemPackage::const_default();
15484 &DEFAULT
15485 }
15486 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
15488 self.version.as_mut().map(|field| field as _)
15489 }
15490 pub fn version_mut(&mut self) -> &mut u64 {
15493 self.version.get_or_insert_default()
15494 }
15495 pub fn version_opt(&self) -> Option<u64> {
15497 self.version.as_ref().map(|field| *field)
15498 }
15499 pub fn set_version(&mut self, field: u64) {
15501 self.version = Some(field);
15502 }
15503 pub fn with_version(mut self, field: u64) -> Self {
15505 self.set_version(field);
15506 self
15507 }
15508 pub fn modules(&self) -> &[::prost::bytes::Bytes] {
15510 &self.modules
15511 }
15512 pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
15515 &mut self.modules
15516 }
15517 pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
15519 self.modules = field;
15520 }
15521 pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
15523 self.set_modules(field);
15524 self
15525 }
15526 pub fn dependencies(&self) -> &[String] {
15528 &self.dependencies
15529 }
15530 pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
15533 &mut self.dependencies
15534 }
15535 pub fn set_dependencies(&mut self, field: Vec<String>) {
15537 self.dependencies = field;
15538 }
15539 pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
15541 self.set_dependencies(field);
15542 self
15543 }
15544 }
15545 impl super::SystemParameters {
15546 pub const fn const_default() -> Self {
15547 Self {
15548 epoch_duration_ms: None,
15549 stake_subsidy_start_epoch: None,
15550 min_validator_count: None,
15551 max_validator_count: None,
15552 min_validator_joining_stake: None,
15553 validator_low_stake_threshold: None,
15554 validator_very_low_stake_threshold: None,
15555 validator_low_stake_grace_period: None,
15556 extra_fields: None,
15557 }
15558 }
15559 #[doc(hidden)]
15560 pub fn default_instance() -> &'static Self {
15561 static DEFAULT: super::SystemParameters = super::SystemParameters::const_default();
15562 &DEFAULT
15563 }
15564 pub fn epoch_duration_ms_opt_mut(&mut self) -> Option<&mut u64> {
15566 self.epoch_duration_ms.as_mut().map(|field| field as _)
15567 }
15568 pub fn epoch_duration_ms_mut(&mut self) -> &mut u64 {
15571 self.epoch_duration_ms.get_or_insert_default()
15572 }
15573 pub fn epoch_duration_ms_opt(&self) -> Option<u64> {
15575 self.epoch_duration_ms.as_ref().map(|field| *field)
15576 }
15577 pub fn set_epoch_duration_ms(&mut self, field: u64) {
15579 self.epoch_duration_ms = Some(field);
15580 }
15581 pub fn with_epoch_duration_ms(mut self, field: u64) -> Self {
15583 self.set_epoch_duration_ms(field);
15584 self
15585 }
15586 pub fn stake_subsidy_start_epoch_opt_mut(&mut self) -> Option<&mut u64> {
15588 self.stake_subsidy_start_epoch.as_mut().map(|field| field as _)
15589 }
15590 pub fn stake_subsidy_start_epoch_mut(&mut self) -> &mut u64 {
15593 self.stake_subsidy_start_epoch.get_or_insert_default()
15594 }
15595 pub fn stake_subsidy_start_epoch_opt(&self) -> Option<u64> {
15597 self.stake_subsidy_start_epoch.as_ref().map(|field| *field)
15598 }
15599 pub fn set_stake_subsidy_start_epoch(&mut self, field: u64) {
15601 self.stake_subsidy_start_epoch = Some(field);
15602 }
15603 pub fn with_stake_subsidy_start_epoch(mut self, field: u64) -> Self {
15605 self.set_stake_subsidy_start_epoch(field);
15606 self
15607 }
15608 pub fn min_validator_count_opt_mut(&mut self) -> Option<&mut u64> {
15610 self.min_validator_count.as_mut().map(|field| field as _)
15611 }
15612 pub fn min_validator_count_mut(&mut self) -> &mut u64 {
15615 self.min_validator_count.get_or_insert_default()
15616 }
15617 pub fn min_validator_count_opt(&self) -> Option<u64> {
15619 self.min_validator_count.as_ref().map(|field| *field)
15620 }
15621 pub fn set_min_validator_count(&mut self, field: u64) {
15623 self.min_validator_count = Some(field);
15624 }
15625 pub fn with_min_validator_count(mut self, field: u64) -> Self {
15627 self.set_min_validator_count(field);
15628 self
15629 }
15630 pub fn max_validator_count_opt_mut(&mut self) -> Option<&mut u64> {
15632 self.max_validator_count.as_mut().map(|field| field as _)
15633 }
15634 pub fn max_validator_count_mut(&mut self) -> &mut u64 {
15637 self.max_validator_count.get_or_insert_default()
15638 }
15639 pub fn max_validator_count_opt(&self) -> Option<u64> {
15641 self.max_validator_count.as_ref().map(|field| *field)
15642 }
15643 pub fn set_max_validator_count(&mut self, field: u64) {
15645 self.max_validator_count = Some(field);
15646 }
15647 pub fn with_max_validator_count(mut self, field: u64) -> Self {
15649 self.set_max_validator_count(field);
15650 self
15651 }
15652 pub fn min_validator_joining_stake_opt_mut(&mut self) -> Option<&mut u64> {
15654 self.min_validator_joining_stake.as_mut().map(|field| field as _)
15655 }
15656 pub fn min_validator_joining_stake_mut(&mut self) -> &mut u64 {
15659 self.min_validator_joining_stake.get_or_insert_default()
15660 }
15661 pub fn min_validator_joining_stake_opt(&self) -> Option<u64> {
15663 self.min_validator_joining_stake.as_ref().map(|field| *field)
15664 }
15665 pub fn set_min_validator_joining_stake(&mut self, field: u64) {
15667 self.min_validator_joining_stake = Some(field);
15668 }
15669 pub fn with_min_validator_joining_stake(mut self, field: u64) -> Self {
15671 self.set_min_validator_joining_stake(field);
15672 self
15673 }
15674 pub fn validator_low_stake_threshold_opt_mut(&mut self) -> Option<&mut u64> {
15676 self.validator_low_stake_threshold.as_mut().map(|field| field as _)
15677 }
15678 pub fn validator_low_stake_threshold_mut(&mut self) -> &mut u64 {
15681 self.validator_low_stake_threshold.get_or_insert_default()
15682 }
15683 pub fn validator_low_stake_threshold_opt(&self) -> Option<u64> {
15685 self.validator_low_stake_threshold.as_ref().map(|field| *field)
15686 }
15687 pub fn set_validator_low_stake_threshold(&mut self, field: u64) {
15689 self.validator_low_stake_threshold = Some(field);
15690 }
15691 pub fn with_validator_low_stake_threshold(mut self, field: u64) -> Self {
15693 self.set_validator_low_stake_threshold(field);
15694 self
15695 }
15696 pub fn validator_very_low_stake_threshold_opt_mut(
15698 &mut self,
15699 ) -> Option<&mut u64> {
15700 self.validator_very_low_stake_threshold.as_mut().map(|field| field as _)
15701 }
15702 pub fn validator_very_low_stake_threshold_mut(&mut self) -> &mut u64 {
15705 self.validator_very_low_stake_threshold.get_or_insert_default()
15706 }
15707 pub fn validator_very_low_stake_threshold_opt(&self) -> Option<u64> {
15709 self.validator_very_low_stake_threshold.as_ref().map(|field| *field)
15710 }
15711 pub fn set_validator_very_low_stake_threshold(&mut self, field: u64) {
15713 self.validator_very_low_stake_threshold = Some(field);
15714 }
15715 pub fn with_validator_very_low_stake_threshold(mut self, field: u64) -> Self {
15717 self.set_validator_very_low_stake_threshold(field);
15718 self
15719 }
15720 pub fn validator_low_stake_grace_period_opt_mut(&mut self) -> Option<&mut u64> {
15722 self.validator_low_stake_grace_period.as_mut().map(|field| field as _)
15723 }
15724 pub fn validator_low_stake_grace_period_mut(&mut self) -> &mut u64 {
15727 self.validator_low_stake_grace_period.get_or_insert_default()
15728 }
15729 pub fn validator_low_stake_grace_period_opt(&self) -> Option<u64> {
15731 self.validator_low_stake_grace_period.as_ref().map(|field| *field)
15732 }
15733 pub fn set_validator_low_stake_grace_period(&mut self, field: u64) {
15735 self.validator_low_stake_grace_period = Some(field);
15736 }
15737 pub fn with_validator_low_stake_grace_period(mut self, field: u64) -> Self {
15739 self.set_validator_low_stake_grace_period(field);
15740 self
15741 }
15742 pub fn extra_fields(&self) -> &super::MoveTable {
15744 self.extra_fields
15745 .as_ref()
15746 .map(|field| field as _)
15747 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
15748 }
15749 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
15751 self.extra_fields.as_mut().map(|field| field as _)
15752 }
15753 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
15756 self.extra_fields.get_or_insert_default()
15757 }
15758 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
15760 self.extra_fields.as_ref().map(|field| field as _)
15761 }
15762 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
15764 self.extra_fields = Some(field.into().into());
15765 }
15766 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
15768 self.set_extra_fields(field.into());
15769 self
15770 }
15771 }
15772 impl super::SystemState {
15773 pub const fn const_default() -> Self {
15774 Self {
15775 version: None,
15776 epoch: None,
15777 protocol_version: None,
15778 validators: None,
15779 storage_fund: None,
15780 parameters: None,
15781 reference_gas_price: None,
15782 validator_report_records: Vec::new(),
15783 stake_subsidy: None,
15784 safe_mode: None,
15785 safe_mode_storage_rewards: None,
15786 safe_mode_computation_rewards: None,
15787 safe_mode_storage_rebates: None,
15788 safe_mode_non_refundable_storage_fee: None,
15789 epoch_start_timestamp_ms: None,
15790 extra_fields: None,
15791 }
15792 }
15793 #[doc(hidden)]
15794 pub fn default_instance() -> &'static Self {
15795 static DEFAULT: super::SystemState = super::SystemState::const_default();
15796 &DEFAULT
15797 }
15798 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
15800 self.version.as_mut().map(|field| field as _)
15801 }
15802 pub fn version_mut(&mut self) -> &mut u64 {
15805 self.version.get_or_insert_default()
15806 }
15807 pub fn version_opt(&self) -> Option<u64> {
15809 self.version.as_ref().map(|field| *field)
15810 }
15811 pub fn set_version(&mut self, field: u64) {
15813 self.version = Some(field);
15814 }
15815 pub fn with_version(mut self, field: u64) -> Self {
15817 self.set_version(field);
15818 self
15819 }
15820 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
15822 self.epoch.as_mut().map(|field| field as _)
15823 }
15824 pub fn epoch_mut(&mut self) -> &mut u64 {
15827 self.epoch.get_or_insert_default()
15828 }
15829 pub fn epoch_opt(&self) -> Option<u64> {
15831 self.epoch.as_ref().map(|field| *field)
15832 }
15833 pub fn set_epoch(&mut self, field: u64) {
15835 self.epoch = Some(field);
15836 }
15837 pub fn with_epoch(mut self, field: u64) -> Self {
15839 self.set_epoch(field);
15840 self
15841 }
15842 pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
15844 self.protocol_version.as_mut().map(|field| field as _)
15845 }
15846 pub fn protocol_version_mut(&mut self) -> &mut u64 {
15849 self.protocol_version.get_or_insert_default()
15850 }
15851 pub fn protocol_version_opt(&self) -> Option<u64> {
15853 self.protocol_version.as_ref().map(|field| *field)
15854 }
15855 pub fn set_protocol_version(&mut self, field: u64) {
15857 self.protocol_version = Some(field);
15858 }
15859 pub fn with_protocol_version(mut self, field: u64) -> Self {
15861 self.set_protocol_version(field);
15862 self
15863 }
15864 pub fn validators(&self) -> &super::ValidatorSet {
15866 self.validators
15867 .as_ref()
15868 .map(|field| field as _)
15869 .unwrap_or_else(|| super::ValidatorSet::default_instance() as _)
15870 }
15871 pub fn validators_opt_mut(&mut self) -> Option<&mut super::ValidatorSet> {
15873 self.validators.as_mut().map(|field| field as _)
15874 }
15875 pub fn validators_mut(&mut self) -> &mut super::ValidatorSet {
15878 self.validators.get_or_insert_default()
15879 }
15880 pub fn validators_opt(&self) -> Option<&super::ValidatorSet> {
15882 self.validators.as_ref().map(|field| field as _)
15883 }
15884 pub fn set_validators<T: Into<super::ValidatorSet>>(&mut self, field: T) {
15886 self.validators = Some(field.into().into());
15887 }
15888 pub fn with_validators<T: Into<super::ValidatorSet>>(
15890 mut self,
15891 field: T,
15892 ) -> Self {
15893 self.set_validators(field.into());
15894 self
15895 }
15896 pub fn storage_fund(&self) -> &super::StorageFund {
15898 self.storage_fund
15899 .as_ref()
15900 .map(|field| field as _)
15901 .unwrap_or_else(|| super::StorageFund::default_instance() as _)
15902 }
15903 pub fn storage_fund_opt_mut(&mut self) -> Option<&mut super::StorageFund> {
15905 self.storage_fund.as_mut().map(|field| field as _)
15906 }
15907 pub fn storage_fund_mut(&mut self) -> &mut super::StorageFund {
15910 self.storage_fund.get_or_insert_default()
15911 }
15912 pub fn storage_fund_opt(&self) -> Option<&super::StorageFund> {
15914 self.storage_fund.as_ref().map(|field| field as _)
15915 }
15916 pub fn set_storage_fund<T: Into<super::StorageFund>>(&mut self, field: T) {
15918 self.storage_fund = Some(field.into().into());
15919 }
15920 pub fn with_storage_fund<T: Into<super::StorageFund>>(
15922 mut self,
15923 field: T,
15924 ) -> Self {
15925 self.set_storage_fund(field.into());
15926 self
15927 }
15928 pub fn parameters(&self) -> &super::SystemParameters {
15930 self.parameters
15931 .as_ref()
15932 .map(|field| field as _)
15933 .unwrap_or_else(|| super::SystemParameters::default_instance() as _)
15934 }
15935 pub fn parameters_opt_mut(&mut self) -> Option<&mut super::SystemParameters> {
15937 self.parameters.as_mut().map(|field| field as _)
15938 }
15939 pub fn parameters_mut(&mut self) -> &mut super::SystemParameters {
15942 self.parameters.get_or_insert_default()
15943 }
15944 pub fn parameters_opt(&self) -> Option<&super::SystemParameters> {
15946 self.parameters.as_ref().map(|field| field as _)
15947 }
15948 pub fn set_parameters<T: Into<super::SystemParameters>>(&mut self, field: T) {
15950 self.parameters = Some(field.into().into());
15951 }
15952 pub fn with_parameters<T: Into<super::SystemParameters>>(
15954 mut self,
15955 field: T,
15956 ) -> Self {
15957 self.set_parameters(field.into());
15958 self
15959 }
15960 pub fn reference_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
15962 self.reference_gas_price.as_mut().map(|field| field as _)
15963 }
15964 pub fn reference_gas_price_mut(&mut self) -> &mut u64 {
15967 self.reference_gas_price.get_or_insert_default()
15968 }
15969 pub fn reference_gas_price_opt(&self) -> Option<u64> {
15971 self.reference_gas_price.as_ref().map(|field| *field)
15972 }
15973 pub fn set_reference_gas_price(&mut self, field: u64) {
15975 self.reference_gas_price = Some(field);
15976 }
15977 pub fn with_reference_gas_price(mut self, field: u64) -> Self {
15979 self.set_reference_gas_price(field);
15980 self
15981 }
15982 pub fn validator_report_records(&self) -> &[super::ValidatorReportRecord] {
15984 &self.validator_report_records
15985 }
15986 pub fn validator_report_records_mut(
15989 &mut self,
15990 ) -> &mut Vec<super::ValidatorReportRecord> {
15991 &mut self.validator_report_records
15992 }
15993 pub fn set_validator_report_records(
15995 &mut self,
15996 field: Vec<super::ValidatorReportRecord>,
15997 ) {
15998 self.validator_report_records = field;
15999 }
16000 pub fn with_validator_report_records(
16002 mut self,
16003 field: Vec<super::ValidatorReportRecord>,
16004 ) -> Self {
16005 self.set_validator_report_records(field);
16006 self
16007 }
16008 pub fn stake_subsidy(&self) -> &super::StakeSubsidy {
16010 self.stake_subsidy
16011 .as_ref()
16012 .map(|field| field as _)
16013 .unwrap_or_else(|| super::StakeSubsidy::default_instance() as _)
16014 }
16015 pub fn stake_subsidy_opt_mut(&mut self) -> Option<&mut super::StakeSubsidy> {
16017 self.stake_subsidy.as_mut().map(|field| field as _)
16018 }
16019 pub fn stake_subsidy_mut(&mut self) -> &mut super::StakeSubsidy {
16022 self.stake_subsidy.get_or_insert_default()
16023 }
16024 pub fn stake_subsidy_opt(&self) -> Option<&super::StakeSubsidy> {
16026 self.stake_subsidy.as_ref().map(|field| field as _)
16027 }
16028 pub fn set_stake_subsidy<T: Into<super::StakeSubsidy>>(&mut self, field: T) {
16030 self.stake_subsidy = Some(field.into().into());
16031 }
16032 pub fn with_stake_subsidy<T: Into<super::StakeSubsidy>>(
16034 mut self,
16035 field: T,
16036 ) -> Self {
16037 self.set_stake_subsidy(field.into());
16038 self
16039 }
16040 pub fn safe_mode_opt_mut(&mut self) -> Option<&mut bool> {
16042 self.safe_mode.as_mut().map(|field| field as _)
16043 }
16044 pub fn safe_mode_mut(&mut self) -> &mut bool {
16047 self.safe_mode.get_or_insert_default()
16048 }
16049 pub fn safe_mode_opt(&self) -> Option<bool> {
16051 self.safe_mode.as_ref().map(|field| *field)
16052 }
16053 pub fn set_safe_mode(&mut self, field: bool) {
16055 self.safe_mode = Some(field);
16056 }
16057 pub fn with_safe_mode(mut self, field: bool) -> Self {
16059 self.set_safe_mode(field);
16060 self
16061 }
16062 pub fn safe_mode_storage_rewards_opt_mut(&mut self) -> Option<&mut u64> {
16064 self.safe_mode_storage_rewards.as_mut().map(|field| field as _)
16065 }
16066 pub fn safe_mode_storage_rewards_mut(&mut self) -> &mut u64 {
16069 self.safe_mode_storage_rewards.get_or_insert_default()
16070 }
16071 pub fn safe_mode_storage_rewards_opt(&self) -> Option<u64> {
16073 self.safe_mode_storage_rewards.as_ref().map(|field| *field)
16074 }
16075 pub fn set_safe_mode_storage_rewards(&mut self, field: u64) {
16077 self.safe_mode_storage_rewards = Some(field);
16078 }
16079 pub fn with_safe_mode_storage_rewards(mut self, field: u64) -> Self {
16081 self.set_safe_mode_storage_rewards(field);
16082 self
16083 }
16084 pub fn safe_mode_computation_rewards_opt_mut(&mut self) -> Option<&mut u64> {
16086 self.safe_mode_computation_rewards.as_mut().map(|field| field as _)
16087 }
16088 pub fn safe_mode_computation_rewards_mut(&mut self) -> &mut u64 {
16091 self.safe_mode_computation_rewards.get_or_insert_default()
16092 }
16093 pub fn safe_mode_computation_rewards_opt(&self) -> Option<u64> {
16095 self.safe_mode_computation_rewards.as_ref().map(|field| *field)
16096 }
16097 pub fn set_safe_mode_computation_rewards(&mut self, field: u64) {
16099 self.safe_mode_computation_rewards = Some(field);
16100 }
16101 pub fn with_safe_mode_computation_rewards(mut self, field: u64) -> Self {
16103 self.set_safe_mode_computation_rewards(field);
16104 self
16105 }
16106 pub fn safe_mode_storage_rebates_opt_mut(&mut self) -> Option<&mut u64> {
16108 self.safe_mode_storage_rebates.as_mut().map(|field| field as _)
16109 }
16110 pub fn safe_mode_storage_rebates_mut(&mut self) -> &mut u64 {
16113 self.safe_mode_storage_rebates.get_or_insert_default()
16114 }
16115 pub fn safe_mode_storage_rebates_opt(&self) -> Option<u64> {
16117 self.safe_mode_storage_rebates.as_ref().map(|field| *field)
16118 }
16119 pub fn set_safe_mode_storage_rebates(&mut self, field: u64) {
16121 self.safe_mode_storage_rebates = Some(field);
16122 }
16123 pub fn with_safe_mode_storage_rebates(mut self, field: u64) -> Self {
16125 self.set_safe_mode_storage_rebates(field);
16126 self
16127 }
16128 pub fn safe_mode_non_refundable_storage_fee_opt_mut(
16130 &mut self,
16131 ) -> Option<&mut u64> {
16132 self.safe_mode_non_refundable_storage_fee.as_mut().map(|field| field as _)
16133 }
16134 pub fn safe_mode_non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
16137 self.safe_mode_non_refundable_storage_fee.get_or_insert_default()
16138 }
16139 pub fn safe_mode_non_refundable_storage_fee_opt(&self) -> Option<u64> {
16141 self.safe_mode_non_refundable_storage_fee.as_ref().map(|field| *field)
16142 }
16143 pub fn set_safe_mode_non_refundable_storage_fee(&mut self, field: u64) {
16145 self.safe_mode_non_refundable_storage_fee = Some(field);
16146 }
16147 pub fn with_safe_mode_non_refundable_storage_fee(mut self, field: u64) -> Self {
16149 self.set_safe_mode_non_refundable_storage_fee(field);
16150 self
16151 }
16152 pub fn epoch_start_timestamp_ms_opt_mut(&mut self) -> Option<&mut u64> {
16154 self.epoch_start_timestamp_ms.as_mut().map(|field| field as _)
16155 }
16156 pub fn epoch_start_timestamp_ms_mut(&mut self) -> &mut u64 {
16159 self.epoch_start_timestamp_ms.get_or_insert_default()
16160 }
16161 pub fn epoch_start_timestamp_ms_opt(&self) -> Option<u64> {
16163 self.epoch_start_timestamp_ms.as_ref().map(|field| *field)
16164 }
16165 pub fn set_epoch_start_timestamp_ms(&mut self, field: u64) {
16167 self.epoch_start_timestamp_ms = Some(field);
16168 }
16169 pub fn with_epoch_start_timestamp_ms(mut self, field: u64) -> Self {
16171 self.set_epoch_start_timestamp_ms(field);
16172 self
16173 }
16174 pub fn extra_fields(&self) -> &super::MoveTable {
16176 self.extra_fields
16177 .as_ref()
16178 .map(|field| field as _)
16179 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16180 }
16181 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
16183 self.extra_fields.as_mut().map(|field| field as _)
16184 }
16185 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
16188 self.extra_fields.get_or_insert_default()
16189 }
16190 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
16192 self.extra_fields.as_ref().map(|field| field as _)
16193 }
16194 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
16196 self.extra_fields = Some(field.into().into());
16197 }
16198 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
16200 self.set_extra_fields(field.into());
16201 self
16202 }
16203 }
16204 impl super::Transaction {
16205 pub const fn const_default() -> Self {
16206 Self {
16207 bcs: None,
16208 digest: None,
16209 version: None,
16210 kind: None,
16211 sender: None,
16212 gas_payment: None,
16213 expiration: None,
16214 }
16215 }
16216 #[doc(hidden)]
16217 pub fn default_instance() -> &'static Self {
16218 static DEFAULT: super::Transaction = super::Transaction::const_default();
16219 &DEFAULT
16220 }
16221 pub fn bcs(&self) -> &super::Bcs {
16223 self.bcs
16224 .as_ref()
16225 .map(|field| field as _)
16226 .unwrap_or_else(|| super::Bcs::default_instance() as _)
16227 }
16228 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
16230 self.bcs.as_mut().map(|field| field as _)
16231 }
16232 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
16235 self.bcs.get_or_insert_default()
16236 }
16237 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
16239 self.bcs.as_ref().map(|field| field as _)
16240 }
16241 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
16243 self.bcs = Some(field.into().into());
16244 }
16245 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
16247 self.set_bcs(field.into());
16248 self
16249 }
16250 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
16252 self.digest.as_mut().map(|field| field as _)
16253 }
16254 pub fn digest_mut(&mut self) -> &mut String {
16257 self.digest.get_or_insert_default()
16258 }
16259 pub fn digest_opt(&self) -> Option<&str> {
16261 self.digest.as_ref().map(|field| field as _)
16262 }
16263 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
16265 self.digest = Some(field.into().into());
16266 }
16267 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
16269 self.set_digest(field.into());
16270 self
16271 }
16272 pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
16274 self.version.as_mut().map(|field| field as _)
16275 }
16276 pub fn version_mut(&mut self) -> &mut i32 {
16279 self.version.get_or_insert_default()
16280 }
16281 pub fn version_opt(&self) -> Option<i32> {
16283 self.version.as_ref().map(|field| *field)
16284 }
16285 pub fn set_version(&mut self, field: i32) {
16287 self.version = Some(field);
16288 }
16289 pub fn with_version(mut self, field: i32) -> Self {
16291 self.set_version(field);
16292 self
16293 }
16294 pub fn kind(&self) -> &super::TransactionKind {
16296 self.kind
16297 .as_ref()
16298 .map(|field| field as _)
16299 .unwrap_or_else(|| super::TransactionKind::default_instance() as _)
16300 }
16301 pub fn kind_opt_mut(&mut self) -> Option<&mut super::TransactionKind> {
16303 self.kind.as_mut().map(|field| field as _)
16304 }
16305 pub fn kind_mut(&mut self) -> &mut super::TransactionKind {
16308 self.kind.get_or_insert_default()
16309 }
16310 pub fn kind_opt(&self) -> Option<&super::TransactionKind> {
16312 self.kind.as_ref().map(|field| field as _)
16313 }
16314 pub fn set_kind<T: Into<super::TransactionKind>>(&mut self, field: T) {
16316 self.kind = Some(field.into().into());
16317 }
16318 pub fn with_kind<T: Into<super::TransactionKind>>(mut self, field: T) -> Self {
16320 self.set_kind(field.into());
16321 self
16322 }
16323 pub fn sender_opt_mut(&mut self) -> Option<&mut String> {
16325 self.sender.as_mut().map(|field| field as _)
16326 }
16327 pub fn sender_mut(&mut self) -> &mut String {
16330 self.sender.get_or_insert_default()
16331 }
16332 pub fn sender_opt(&self) -> Option<&str> {
16334 self.sender.as_ref().map(|field| field as _)
16335 }
16336 pub fn set_sender<T: Into<String>>(&mut self, field: T) {
16338 self.sender = Some(field.into().into());
16339 }
16340 pub fn with_sender<T: Into<String>>(mut self, field: T) -> Self {
16342 self.set_sender(field.into());
16343 self
16344 }
16345 pub fn gas_payment(&self) -> &super::GasPayment {
16347 self.gas_payment
16348 .as_ref()
16349 .map(|field| field as _)
16350 .unwrap_or_else(|| super::GasPayment::default_instance() as _)
16351 }
16352 pub fn gas_payment_opt_mut(&mut self) -> Option<&mut super::GasPayment> {
16354 self.gas_payment.as_mut().map(|field| field as _)
16355 }
16356 pub fn gas_payment_mut(&mut self) -> &mut super::GasPayment {
16359 self.gas_payment.get_or_insert_default()
16360 }
16361 pub fn gas_payment_opt(&self) -> Option<&super::GasPayment> {
16363 self.gas_payment.as_ref().map(|field| field as _)
16364 }
16365 pub fn set_gas_payment<T: Into<super::GasPayment>>(&mut self, field: T) {
16367 self.gas_payment = Some(field.into().into());
16368 }
16369 pub fn with_gas_payment<T: Into<super::GasPayment>>(mut self, field: T) -> Self {
16371 self.set_gas_payment(field.into());
16372 self
16373 }
16374 pub fn expiration(&self) -> &super::TransactionExpiration {
16376 self.expiration
16377 .as_ref()
16378 .map(|field| field as _)
16379 .unwrap_or_else(|| super::TransactionExpiration::default_instance() as _)
16380 }
16381 pub fn expiration_opt_mut(
16383 &mut self,
16384 ) -> Option<&mut super::TransactionExpiration> {
16385 self.expiration.as_mut().map(|field| field as _)
16386 }
16387 pub fn expiration_mut(&mut self) -> &mut super::TransactionExpiration {
16390 self.expiration.get_or_insert_default()
16391 }
16392 pub fn expiration_opt(&self) -> Option<&super::TransactionExpiration> {
16394 self.expiration.as_ref().map(|field| field as _)
16395 }
16396 pub fn set_expiration<T: Into<super::TransactionExpiration>>(
16398 &mut self,
16399 field: T,
16400 ) {
16401 self.expiration = Some(field.into().into());
16402 }
16403 pub fn with_expiration<T: Into<super::TransactionExpiration>>(
16405 mut self,
16406 field: T,
16407 ) -> Self {
16408 self.set_expiration(field.into());
16409 self
16410 }
16411 }
16412 impl super::TransactionEffects {
16413 pub const fn const_default() -> Self {
16414 Self {
16415 bcs: None,
16416 digest: None,
16417 version: None,
16418 status: None,
16419 epoch: None,
16420 gas_used: None,
16421 transaction_digest: None,
16422 gas_object: None,
16423 events_digest: None,
16424 dependencies: Vec::new(),
16425 lamport_version: None,
16426 changed_objects: Vec::new(),
16427 unchanged_consensus_objects: Vec::new(),
16428 auxiliary_data_digest: None,
16429 unchanged_loaded_runtime_objects: Vec::new(),
16430 }
16431 }
16432 #[doc(hidden)]
16433 pub fn default_instance() -> &'static Self {
16434 static DEFAULT: super::TransactionEffects = super::TransactionEffects::const_default();
16435 &DEFAULT
16436 }
16437 pub fn bcs(&self) -> &super::Bcs {
16439 self.bcs
16440 .as_ref()
16441 .map(|field| field as _)
16442 .unwrap_or_else(|| super::Bcs::default_instance() as _)
16443 }
16444 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
16446 self.bcs.as_mut().map(|field| field as _)
16447 }
16448 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
16451 self.bcs.get_or_insert_default()
16452 }
16453 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
16455 self.bcs.as_ref().map(|field| field as _)
16456 }
16457 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
16459 self.bcs = Some(field.into().into());
16460 }
16461 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
16463 self.set_bcs(field.into());
16464 self
16465 }
16466 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
16468 self.digest.as_mut().map(|field| field as _)
16469 }
16470 pub fn digest_mut(&mut self) -> &mut String {
16473 self.digest.get_or_insert_default()
16474 }
16475 pub fn digest_opt(&self) -> Option<&str> {
16477 self.digest.as_ref().map(|field| field as _)
16478 }
16479 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
16481 self.digest = Some(field.into().into());
16482 }
16483 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
16485 self.set_digest(field.into());
16486 self
16487 }
16488 pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
16490 self.version.as_mut().map(|field| field as _)
16491 }
16492 pub fn version_mut(&mut self) -> &mut i32 {
16495 self.version.get_or_insert_default()
16496 }
16497 pub fn version_opt(&self) -> Option<i32> {
16499 self.version.as_ref().map(|field| *field)
16500 }
16501 pub fn set_version(&mut self, field: i32) {
16503 self.version = Some(field);
16504 }
16505 pub fn with_version(mut self, field: i32) -> Self {
16507 self.set_version(field);
16508 self
16509 }
16510 pub fn status(&self) -> &super::ExecutionStatus {
16512 self.status
16513 .as_ref()
16514 .map(|field| field as _)
16515 .unwrap_or_else(|| super::ExecutionStatus::default_instance() as _)
16516 }
16517 pub fn status_opt_mut(&mut self) -> Option<&mut super::ExecutionStatus> {
16519 self.status.as_mut().map(|field| field as _)
16520 }
16521 pub fn status_mut(&mut self) -> &mut super::ExecutionStatus {
16524 self.status.get_or_insert_default()
16525 }
16526 pub fn status_opt(&self) -> Option<&super::ExecutionStatus> {
16528 self.status.as_ref().map(|field| field as _)
16529 }
16530 pub fn set_status<T: Into<super::ExecutionStatus>>(&mut self, field: T) {
16532 self.status = Some(field.into().into());
16533 }
16534 pub fn with_status<T: Into<super::ExecutionStatus>>(mut self, field: T) -> Self {
16536 self.set_status(field.into());
16537 self
16538 }
16539 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
16541 self.epoch.as_mut().map(|field| field as _)
16542 }
16543 pub fn epoch_mut(&mut self) -> &mut u64 {
16546 self.epoch.get_or_insert_default()
16547 }
16548 pub fn epoch_opt(&self) -> Option<u64> {
16550 self.epoch.as_ref().map(|field| *field)
16551 }
16552 pub fn set_epoch(&mut self, field: u64) {
16554 self.epoch = Some(field);
16555 }
16556 pub fn with_epoch(mut self, field: u64) -> Self {
16558 self.set_epoch(field);
16559 self
16560 }
16561 pub fn gas_used(&self) -> &super::GasCostSummary {
16563 self.gas_used
16564 .as_ref()
16565 .map(|field| field as _)
16566 .unwrap_or_else(|| super::GasCostSummary::default_instance() as _)
16567 }
16568 pub fn gas_used_opt_mut(&mut self) -> Option<&mut super::GasCostSummary> {
16570 self.gas_used.as_mut().map(|field| field as _)
16571 }
16572 pub fn gas_used_mut(&mut self) -> &mut super::GasCostSummary {
16575 self.gas_used.get_or_insert_default()
16576 }
16577 pub fn gas_used_opt(&self) -> Option<&super::GasCostSummary> {
16579 self.gas_used.as_ref().map(|field| field as _)
16580 }
16581 pub fn set_gas_used<T: Into<super::GasCostSummary>>(&mut self, field: T) {
16583 self.gas_used = Some(field.into().into());
16584 }
16585 pub fn with_gas_used<T: Into<super::GasCostSummary>>(
16587 mut self,
16588 field: T,
16589 ) -> Self {
16590 self.set_gas_used(field.into());
16591 self
16592 }
16593 pub fn transaction_digest_opt_mut(&mut self) -> Option<&mut String> {
16595 self.transaction_digest.as_mut().map(|field| field as _)
16596 }
16597 pub fn transaction_digest_mut(&mut self) -> &mut String {
16600 self.transaction_digest.get_or_insert_default()
16601 }
16602 pub fn transaction_digest_opt(&self) -> Option<&str> {
16604 self.transaction_digest.as_ref().map(|field| field as _)
16605 }
16606 pub fn set_transaction_digest<T: Into<String>>(&mut self, field: T) {
16608 self.transaction_digest = Some(field.into().into());
16609 }
16610 pub fn with_transaction_digest<T: Into<String>>(mut self, field: T) -> Self {
16612 self.set_transaction_digest(field.into());
16613 self
16614 }
16615 pub fn gas_object(&self) -> &super::ChangedObject {
16617 self.gas_object
16618 .as_ref()
16619 .map(|field| field as _)
16620 .unwrap_or_else(|| super::ChangedObject::default_instance() as _)
16621 }
16622 pub fn gas_object_opt_mut(&mut self) -> Option<&mut super::ChangedObject> {
16624 self.gas_object.as_mut().map(|field| field as _)
16625 }
16626 pub fn gas_object_mut(&mut self) -> &mut super::ChangedObject {
16629 self.gas_object.get_or_insert_default()
16630 }
16631 pub fn gas_object_opt(&self) -> Option<&super::ChangedObject> {
16633 self.gas_object.as_ref().map(|field| field as _)
16634 }
16635 pub fn set_gas_object<T: Into<super::ChangedObject>>(&mut self, field: T) {
16637 self.gas_object = Some(field.into().into());
16638 }
16639 pub fn with_gas_object<T: Into<super::ChangedObject>>(
16641 mut self,
16642 field: T,
16643 ) -> Self {
16644 self.set_gas_object(field.into());
16645 self
16646 }
16647 pub fn events_digest_opt_mut(&mut self) -> Option<&mut String> {
16649 self.events_digest.as_mut().map(|field| field as _)
16650 }
16651 pub fn events_digest_mut(&mut self) -> &mut String {
16654 self.events_digest.get_or_insert_default()
16655 }
16656 pub fn events_digest_opt(&self) -> Option<&str> {
16658 self.events_digest.as_ref().map(|field| field as _)
16659 }
16660 pub fn set_events_digest<T: Into<String>>(&mut self, field: T) {
16662 self.events_digest = Some(field.into().into());
16663 }
16664 pub fn with_events_digest<T: Into<String>>(mut self, field: T) -> Self {
16666 self.set_events_digest(field.into());
16667 self
16668 }
16669 pub fn dependencies(&self) -> &[String] {
16671 &self.dependencies
16672 }
16673 pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
16676 &mut self.dependencies
16677 }
16678 pub fn set_dependencies(&mut self, field: Vec<String>) {
16680 self.dependencies = field;
16681 }
16682 pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
16684 self.set_dependencies(field);
16685 self
16686 }
16687 pub fn lamport_version_opt_mut(&mut self) -> Option<&mut u64> {
16689 self.lamport_version.as_mut().map(|field| field as _)
16690 }
16691 pub fn lamport_version_mut(&mut self) -> &mut u64 {
16694 self.lamport_version.get_or_insert_default()
16695 }
16696 pub fn lamport_version_opt(&self) -> Option<u64> {
16698 self.lamport_version.as_ref().map(|field| *field)
16699 }
16700 pub fn set_lamport_version(&mut self, field: u64) {
16702 self.lamport_version = Some(field);
16703 }
16704 pub fn with_lamport_version(mut self, field: u64) -> Self {
16706 self.set_lamport_version(field);
16707 self
16708 }
16709 pub fn changed_objects(&self) -> &[super::ChangedObject] {
16711 &self.changed_objects
16712 }
16713 pub fn changed_objects_mut(&mut self) -> &mut Vec<super::ChangedObject> {
16716 &mut self.changed_objects
16717 }
16718 pub fn set_changed_objects(&mut self, field: Vec<super::ChangedObject>) {
16720 self.changed_objects = field;
16721 }
16722 pub fn with_changed_objects(mut self, field: Vec<super::ChangedObject>) -> Self {
16724 self.set_changed_objects(field);
16725 self
16726 }
16727 pub fn unchanged_consensus_objects(&self) -> &[super::UnchangedConsensusObject] {
16729 &self.unchanged_consensus_objects
16730 }
16731 pub fn unchanged_consensus_objects_mut(
16734 &mut self,
16735 ) -> &mut Vec<super::UnchangedConsensusObject> {
16736 &mut self.unchanged_consensus_objects
16737 }
16738 pub fn set_unchanged_consensus_objects(
16740 &mut self,
16741 field: Vec<super::UnchangedConsensusObject>,
16742 ) {
16743 self.unchanged_consensus_objects = field;
16744 }
16745 pub fn with_unchanged_consensus_objects(
16747 mut self,
16748 field: Vec<super::UnchangedConsensusObject>,
16749 ) -> Self {
16750 self.set_unchanged_consensus_objects(field);
16751 self
16752 }
16753 pub fn auxiliary_data_digest_opt_mut(&mut self) -> Option<&mut String> {
16755 self.auxiliary_data_digest.as_mut().map(|field| field as _)
16756 }
16757 pub fn auxiliary_data_digest_mut(&mut self) -> &mut String {
16760 self.auxiliary_data_digest.get_or_insert_default()
16761 }
16762 pub fn auxiliary_data_digest_opt(&self) -> Option<&str> {
16764 self.auxiliary_data_digest.as_ref().map(|field| field as _)
16765 }
16766 pub fn set_auxiliary_data_digest<T: Into<String>>(&mut self, field: T) {
16768 self.auxiliary_data_digest = Some(field.into().into());
16769 }
16770 pub fn with_auxiliary_data_digest<T: Into<String>>(mut self, field: T) -> Self {
16772 self.set_auxiliary_data_digest(field.into());
16773 self
16774 }
16775 pub fn unchanged_loaded_runtime_objects(&self) -> &[super::ObjectReference] {
16777 &self.unchanged_loaded_runtime_objects
16778 }
16779 pub fn unchanged_loaded_runtime_objects_mut(
16782 &mut self,
16783 ) -> &mut Vec<super::ObjectReference> {
16784 &mut self.unchanged_loaded_runtime_objects
16785 }
16786 pub fn set_unchanged_loaded_runtime_objects(
16788 &mut self,
16789 field: Vec<super::ObjectReference>,
16790 ) {
16791 self.unchanged_loaded_runtime_objects = field;
16792 }
16793 pub fn with_unchanged_loaded_runtime_objects(
16795 mut self,
16796 field: Vec<super::ObjectReference>,
16797 ) -> Self {
16798 self.set_unchanged_loaded_runtime_objects(field);
16799 self
16800 }
16801 }
16802 impl super::TransactionEvents {
16803 pub const fn const_default() -> Self {
16804 Self {
16805 bcs: None,
16806 digest: None,
16807 events: Vec::new(),
16808 }
16809 }
16810 #[doc(hidden)]
16811 pub fn default_instance() -> &'static Self {
16812 static DEFAULT: super::TransactionEvents = super::TransactionEvents::const_default();
16813 &DEFAULT
16814 }
16815 pub fn bcs(&self) -> &super::Bcs {
16817 self.bcs
16818 .as_ref()
16819 .map(|field| field as _)
16820 .unwrap_or_else(|| super::Bcs::default_instance() as _)
16821 }
16822 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
16824 self.bcs.as_mut().map(|field| field as _)
16825 }
16826 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
16829 self.bcs.get_or_insert_default()
16830 }
16831 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
16833 self.bcs.as_ref().map(|field| field as _)
16834 }
16835 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
16837 self.bcs = Some(field.into().into());
16838 }
16839 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
16841 self.set_bcs(field.into());
16842 self
16843 }
16844 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
16846 self.digest.as_mut().map(|field| field as _)
16847 }
16848 pub fn digest_mut(&mut self) -> &mut String {
16851 self.digest.get_or_insert_default()
16852 }
16853 pub fn digest_opt(&self) -> Option<&str> {
16855 self.digest.as_ref().map(|field| field as _)
16856 }
16857 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
16859 self.digest = Some(field.into().into());
16860 }
16861 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
16863 self.set_digest(field.into());
16864 self
16865 }
16866 pub fn events(&self) -> &[super::Event] {
16868 &self.events
16869 }
16870 pub fn events_mut(&mut self) -> &mut Vec<super::Event> {
16873 &mut self.events
16874 }
16875 pub fn set_events(&mut self, field: Vec<super::Event>) {
16877 self.events = field;
16878 }
16879 pub fn with_events(mut self, field: Vec<super::Event>) -> Self {
16881 self.set_events(field);
16882 self
16883 }
16884 }
16885 impl super::TransactionExpiration {
16886 pub const fn const_default() -> Self {
16887 Self {
16888 kind: None,
16889 epoch: None,
16890 min_epoch: None,
16891 min_timestamp: None,
16892 max_timestamp: None,
16893 chain: None,
16894 nonce: None,
16895 allowed_proposers: None,
16896 }
16897 }
16898 #[doc(hidden)]
16899 pub fn default_instance() -> &'static Self {
16900 static DEFAULT: super::TransactionExpiration = super::TransactionExpiration::const_default();
16901 &DEFAULT
16902 }
16903 pub fn with_kind<
16905 T: Into<super::transaction_expiration::TransactionExpirationKind>,
16906 >(mut self, field: T) -> Self {
16907 self.set_kind(field.into());
16908 self
16909 }
16910 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
16912 self.epoch.as_mut().map(|field| field as _)
16913 }
16914 pub fn epoch_mut(&mut self) -> &mut u64 {
16917 self.epoch.get_or_insert_default()
16918 }
16919 pub fn epoch_opt(&self) -> Option<u64> {
16921 self.epoch.as_ref().map(|field| *field)
16922 }
16923 pub fn set_epoch(&mut self, field: u64) {
16925 self.epoch = Some(field);
16926 }
16927 pub fn with_epoch(mut self, field: u64) -> Self {
16929 self.set_epoch(field);
16930 self
16931 }
16932 pub fn min_epoch_opt_mut(&mut self) -> Option<&mut u64> {
16934 self.min_epoch.as_mut().map(|field| field as _)
16935 }
16936 pub fn min_epoch_mut(&mut self) -> &mut u64 {
16939 self.min_epoch.get_or_insert_default()
16940 }
16941 pub fn min_epoch_opt(&self) -> Option<u64> {
16943 self.min_epoch.as_ref().map(|field| *field)
16944 }
16945 pub fn set_min_epoch(&mut self, field: u64) {
16947 self.min_epoch = Some(field);
16948 }
16949 pub fn with_min_epoch(mut self, field: u64) -> Self {
16951 self.set_min_epoch(field);
16952 self
16953 }
16954 pub fn min_timestamp_opt_mut(
16956 &mut self,
16957 ) -> Option<&mut ::prost_types::Timestamp> {
16958 self.min_timestamp.as_mut().map(|field| field as _)
16959 }
16960 pub fn min_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
16963 self.min_timestamp.get_or_insert_default()
16964 }
16965 pub fn min_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
16967 self.min_timestamp.as_ref().map(|field| field as _)
16968 }
16969 pub fn set_min_timestamp<T: Into<::prost_types::Timestamp>>(
16971 &mut self,
16972 field: T,
16973 ) {
16974 self.min_timestamp = Some(field.into().into());
16975 }
16976 pub fn with_min_timestamp<T: Into<::prost_types::Timestamp>>(
16978 mut self,
16979 field: T,
16980 ) -> Self {
16981 self.set_min_timestamp(field.into());
16982 self
16983 }
16984 pub fn max_timestamp_opt_mut(
16986 &mut self,
16987 ) -> Option<&mut ::prost_types::Timestamp> {
16988 self.max_timestamp.as_mut().map(|field| field as _)
16989 }
16990 pub fn max_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
16993 self.max_timestamp.get_or_insert_default()
16994 }
16995 pub fn max_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
16997 self.max_timestamp.as_ref().map(|field| field as _)
16998 }
16999 pub fn set_max_timestamp<T: Into<::prost_types::Timestamp>>(
17001 &mut self,
17002 field: T,
17003 ) {
17004 self.max_timestamp = Some(field.into().into());
17005 }
17006 pub fn with_max_timestamp<T: Into<::prost_types::Timestamp>>(
17008 mut self,
17009 field: T,
17010 ) -> Self {
17011 self.set_max_timestamp(field.into());
17012 self
17013 }
17014 pub fn chain_opt_mut(&mut self) -> Option<&mut String> {
17016 self.chain.as_mut().map(|field| field as _)
17017 }
17018 pub fn chain_mut(&mut self) -> &mut String {
17021 self.chain.get_or_insert_default()
17022 }
17023 pub fn chain_opt(&self) -> Option<&str> {
17025 self.chain.as_ref().map(|field| field as _)
17026 }
17027 pub fn set_chain<T: Into<String>>(&mut self, field: T) {
17029 self.chain = Some(field.into().into());
17030 }
17031 pub fn with_chain<T: Into<String>>(mut self, field: T) -> Self {
17033 self.set_chain(field.into());
17034 self
17035 }
17036 pub fn nonce_opt_mut(&mut self) -> Option<&mut u32> {
17038 self.nonce.as_mut().map(|field| field as _)
17039 }
17040 pub fn nonce_mut(&mut self) -> &mut u32 {
17043 self.nonce.get_or_insert_default()
17044 }
17045 pub fn nonce_opt(&self) -> Option<u32> {
17047 self.nonce.as_ref().map(|field| *field)
17048 }
17049 pub fn set_nonce(&mut self, field: u32) {
17051 self.nonce = Some(field);
17052 }
17053 pub fn with_nonce(mut self, field: u32) -> Self {
17055 self.set_nonce(field);
17056 self
17057 }
17058 pub fn allowed_proposers(&self) -> &super::AllowedProposers {
17060 self.allowed_proposers
17061 .as_ref()
17062 .map(|field| field as _)
17063 .unwrap_or_else(|| super::AllowedProposers::default_instance() as _)
17064 }
17065 pub fn allowed_proposers_opt_mut(
17067 &mut self,
17068 ) -> Option<&mut super::AllowedProposers> {
17069 self.allowed_proposers.as_mut().map(|field| field as _)
17070 }
17071 pub fn allowed_proposers_mut(&mut self) -> &mut super::AllowedProposers {
17074 self.allowed_proposers.get_or_insert_default()
17075 }
17076 pub fn allowed_proposers_opt(&self) -> Option<&super::AllowedProposers> {
17078 self.allowed_proposers.as_ref().map(|field| field as _)
17079 }
17080 pub fn set_allowed_proposers<T: Into<super::AllowedProposers>>(
17082 &mut self,
17083 field: T,
17084 ) {
17085 self.allowed_proposers = Some(field.into().into());
17086 }
17087 pub fn with_allowed_proposers<T: Into<super::AllowedProposers>>(
17089 mut self,
17090 field: T,
17091 ) -> Self {
17092 self.set_allowed_proposers(field.into());
17093 self
17094 }
17095 }
17096 impl super::TransactionFilter {
17097 pub const fn const_default() -> Self {
17098 Self { terms: Vec::new() }
17099 }
17100 #[doc(hidden)]
17101 pub fn default_instance() -> &'static Self {
17102 static DEFAULT: super::TransactionFilter = super::TransactionFilter::const_default();
17103 &DEFAULT
17104 }
17105 pub fn terms(&self) -> &[super::TransactionTerm] {
17107 &self.terms
17108 }
17109 pub fn terms_mut(&mut self) -> &mut Vec<super::TransactionTerm> {
17112 &mut self.terms
17113 }
17114 pub fn set_terms(&mut self, field: Vec<super::TransactionTerm>) {
17116 self.terms = field;
17117 }
17118 pub fn with_terms(mut self, field: Vec<super::TransactionTerm>) -> Self {
17120 self.set_terms(field);
17121 self
17122 }
17123 }
17124 impl super::TransactionKind {
17125 pub const fn const_default() -> Self {
17126 Self { kind: None, data: None }
17127 }
17128 #[doc(hidden)]
17129 pub fn default_instance() -> &'static Self {
17130 static DEFAULT: super::TransactionKind = super::TransactionKind::const_default();
17131 &DEFAULT
17132 }
17133 pub fn with_kind<T: Into<super::transaction_kind::Kind>>(
17135 mut self,
17136 field: T,
17137 ) -> Self {
17138 self.set_kind(field.into());
17139 self
17140 }
17141 pub fn programmable_transaction(&self) -> &super::ProgrammableTransaction {
17143 if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &self
17144 .data
17145 {
17146 field as _
17147 } else {
17148 super::ProgrammableTransaction::default_instance() as _
17149 }
17150 }
17151 pub fn programmable_transaction_opt(
17153 &self,
17154 ) -> Option<&super::ProgrammableTransaction> {
17155 if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &self
17156 .data
17157 {
17158 Some(field as _)
17159 } else {
17160 None
17161 }
17162 }
17163 pub fn programmable_transaction_opt_mut(
17165 &mut self,
17166 ) -> Option<&mut super::ProgrammableTransaction> {
17167 if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &mut self
17168 .data
17169 {
17170 Some(field as _)
17171 } else {
17172 None
17173 }
17174 }
17175 pub fn programmable_transaction_mut(
17179 &mut self,
17180 ) -> &mut super::ProgrammableTransaction {
17181 if self.programmable_transaction_opt_mut().is_none() {
17182 self.data = Some(
17183 super::transaction_kind::Data::ProgrammableTransaction(
17184 super::ProgrammableTransaction::default(),
17185 ),
17186 );
17187 }
17188 self.programmable_transaction_opt_mut().unwrap()
17189 }
17190 pub fn set_programmable_transaction<T: Into<super::ProgrammableTransaction>>(
17193 &mut self,
17194 field: T,
17195 ) {
17196 self.data = Some(
17197 super::transaction_kind::Data::ProgrammableTransaction(
17198 field.into().into(),
17199 ),
17200 );
17201 }
17202 pub fn with_programmable_transaction<T: Into<super::ProgrammableTransaction>>(
17205 mut self,
17206 field: T,
17207 ) -> Self {
17208 self.set_programmable_transaction(field.into());
17209 self
17210 }
17211 pub fn change_epoch(&self) -> &super::ChangeEpoch {
17213 if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &self.data {
17214 field as _
17215 } else {
17216 super::ChangeEpoch::default_instance() as _
17217 }
17218 }
17219 pub fn change_epoch_opt(&self) -> Option<&super::ChangeEpoch> {
17221 if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &self.data {
17222 Some(field as _)
17223 } else {
17224 None
17225 }
17226 }
17227 pub fn change_epoch_opt_mut(&mut self) -> Option<&mut super::ChangeEpoch> {
17229 if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &mut self
17230 .data
17231 {
17232 Some(field as _)
17233 } else {
17234 None
17235 }
17236 }
17237 pub fn change_epoch_mut(&mut self) -> &mut super::ChangeEpoch {
17241 if self.change_epoch_opt_mut().is_none() {
17242 self.data = Some(
17243 super::transaction_kind::Data::ChangeEpoch(
17244 super::ChangeEpoch::default(),
17245 ),
17246 );
17247 }
17248 self.change_epoch_opt_mut().unwrap()
17249 }
17250 pub fn set_change_epoch<T: Into<super::ChangeEpoch>>(&mut self, field: T) {
17253 self.data = Some(
17254 super::transaction_kind::Data::ChangeEpoch(field.into().into()),
17255 );
17256 }
17257 pub fn with_change_epoch<T: Into<super::ChangeEpoch>>(
17260 mut self,
17261 field: T,
17262 ) -> Self {
17263 self.set_change_epoch(field.into());
17264 self
17265 }
17266 pub fn genesis(&self) -> &super::GenesisTransaction {
17268 if let Some(super::transaction_kind::Data::Genesis(field)) = &self.data {
17269 field as _
17270 } else {
17271 super::GenesisTransaction::default_instance() as _
17272 }
17273 }
17274 pub fn genesis_opt(&self) -> Option<&super::GenesisTransaction> {
17276 if let Some(super::transaction_kind::Data::Genesis(field)) = &self.data {
17277 Some(field as _)
17278 } else {
17279 None
17280 }
17281 }
17282 pub fn genesis_opt_mut(&mut self) -> Option<&mut super::GenesisTransaction> {
17284 if let Some(super::transaction_kind::Data::Genesis(field)) = &mut self.data {
17285 Some(field as _)
17286 } else {
17287 None
17288 }
17289 }
17290 pub fn genesis_mut(&mut self) -> &mut super::GenesisTransaction {
17294 if self.genesis_opt_mut().is_none() {
17295 self.data = Some(
17296 super::transaction_kind::Data::Genesis(
17297 super::GenesisTransaction::default(),
17298 ),
17299 );
17300 }
17301 self.genesis_opt_mut().unwrap()
17302 }
17303 pub fn set_genesis<T: Into<super::GenesisTransaction>>(&mut self, field: T) {
17306 self.data = Some(
17307 super::transaction_kind::Data::Genesis(field.into().into()),
17308 );
17309 }
17310 pub fn with_genesis<T: Into<super::GenesisTransaction>>(
17313 mut self,
17314 field: T,
17315 ) -> Self {
17316 self.set_genesis(field.into());
17317 self
17318 }
17319 pub fn consensus_commit_prologue(&self) -> &super::ConsensusCommitPrologue {
17321 if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &self
17322 .data
17323 {
17324 field as _
17325 } else {
17326 super::ConsensusCommitPrologue::default_instance() as _
17327 }
17328 }
17329 pub fn consensus_commit_prologue_opt(
17331 &self,
17332 ) -> Option<&super::ConsensusCommitPrologue> {
17333 if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &self
17334 .data
17335 {
17336 Some(field as _)
17337 } else {
17338 None
17339 }
17340 }
17341 pub fn consensus_commit_prologue_opt_mut(
17343 &mut self,
17344 ) -> Option<&mut super::ConsensusCommitPrologue> {
17345 if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &mut self
17346 .data
17347 {
17348 Some(field as _)
17349 } else {
17350 None
17351 }
17352 }
17353 pub fn consensus_commit_prologue_mut(
17357 &mut self,
17358 ) -> &mut super::ConsensusCommitPrologue {
17359 if self.consensus_commit_prologue_opt_mut().is_none() {
17360 self.data = Some(
17361 super::transaction_kind::Data::ConsensusCommitPrologue(
17362 super::ConsensusCommitPrologue::default(),
17363 ),
17364 );
17365 }
17366 self.consensus_commit_prologue_opt_mut().unwrap()
17367 }
17368 pub fn set_consensus_commit_prologue<T: Into<super::ConsensusCommitPrologue>>(
17371 &mut self,
17372 field: T,
17373 ) {
17374 self.data = Some(
17375 super::transaction_kind::Data::ConsensusCommitPrologue(
17376 field.into().into(),
17377 ),
17378 );
17379 }
17380 pub fn with_consensus_commit_prologue<T: Into<super::ConsensusCommitPrologue>>(
17383 mut self,
17384 field: T,
17385 ) -> Self {
17386 self.set_consensus_commit_prologue(field.into());
17387 self
17388 }
17389 pub fn authenticator_state_update(&self) -> &super::AuthenticatorStateUpdate {
17391 if let Some(
17392 super::transaction_kind::Data::AuthenticatorStateUpdate(field),
17393 ) = &self.data
17394 {
17395 field as _
17396 } else {
17397 super::AuthenticatorStateUpdate::default_instance() as _
17398 }
17399 }
17400 pub fn authenticator_state_update_opt(
17402 &self,
17403 ) -> Option<&super::AuthenticatorStateUpdate> {
17404 if let Some(
17405 super::transaction_kind::Data::AuthenticatorStateUpdate(field),
17406 ) = &self.data
17407 {
17408 Some(field as _)
17409 } else {
17410 None
17411 }
17412 }
17413 pub fn authenticator_state_update_opt_mut(
17415 &mut self,
17416 ) -> Option<&mut super::AuthenticatorStateUpdate> {
17417 if let Some(
17418 super::transaction_kind::Data::AuthenticatorStateUpdate(field),
17419 ) = &mut self.data
17420 {
17421 Some(field as _)
17422 } else {
17423 None
17424 }
17425 }
17426 pub fn authenticator_state_update_mut(
17430 &mut self,
17431 ) -> &mut super::AuthenticatorStateUpdate {
17432 if self.authenticator_state_update_opt_mut().is_none() {
17433 self.data = Some(
17434 super::transaction_kind::Data::AuthenticatorStateUpdate(
17435 super::AuthenticatorStateUpdate::default(),
17436 ),
17437 );
17438 }
17439 self.authenticator_state_update_opt_mut().unwrap()
17440 }
17441 pub fn set_authenticator_state_update<T: Into<super::AuthenticatorStateUpdate>>(
17444 &mut self,
17445 field: T,
17446 ) {
17447 self.data = Some(
17448 super::transaction_kind::Data::AuthenticatorStateUpdate(
17449 field.into().into(),
17450 ),
17451 );
17452 }
17453 pub fn with_authenticator_state_update<T: Into<super::AuthenticatorStateUpdate>>(
17456 mut self,
17457 field: T,
17458 ) -> Self {
17459 self.set_authenticator_state_update(field.into());
17460 self
17461 }
17462 pub fn end_of_epoch(&self) -> &super::EndOfEpochTransaction {
17464 if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &self.data {
17465 field as _
17466 } else {
17467 super::EndOfEpochTransaction::default_instance() as _
17468 }
17469 }
17470 pub fn end_of_epoch_opt(&self) -> Option<&super::EndOfEpochTransaction> {
17472 if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &self.data {
17473 Some(field as _)
17474 } else {
17475 None
17476 }
17477 }
17478 pub fn end_of_epoch_opt_mut(
17480 &mut self,
17481 ) -> Option<&mut super::EndOfEpochTransaction> {
17482 if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &mut self
17483 .data
17484 {
17485 Some(field as _)
17486 } else {
17487 None
17488 }
17489 }
17490 pub fn end_of_epoch_mut(&mut self) -> &mut super::EndOfEpochTransaction {
17494 if self.end_of_epoch_opt_mut().is_none() {
17495 self.data = Some(
17496 super::transaction_kind::Data::EndOfEpoch(
17497 super::EndOfEpochTransaction::default(),
17498 ),
17499 );
17500 }
17501 self.end_of_epoch_opt_mut().unwrap()
17502 }
17503 pub fn set_end_of_epoch<T: Into<super::EndOfEpochTransaction>>(
17506 &mut self,
17507 field: T,
17508 ) {
17509 self.data = Some(
17510 super::transaction_kind::Data::EndOfEpoch(field.into().into()),
17511 );
17512 }
17513 pub fn with_end_of_epoch<T: Into<super::EndOfEpochTransaction>>(
17516 mut self,
17517 field: T,
17518 ) -> Self {
17519 self.set_end_of_epoch(field.into());
17520 self
17521 }
17522 pub fn randomness_state_update(&self) -> &super::RandomnessStateUpdate {
17524 if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &self
17525 .data
17526 {
17527 field as _
17528 } else {
17529 super::RandomnessStateUpdate::default_instance() as _
17530 }
17531 }
17532 pub fn randomness_state_update_opt(
17534 &self,
17535 ) -> Option<&super::RandomnessStateUpdate> {
17536 if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &self
17537 .data
17538 {
17539 Some(field as _)
17540 } else {
17541 None
17542 }
17543 }
17544 pub fn randomness_state_update_opt_mut(
17546 &mut self,
17547 ) -> Option<&mut super::RandomnessStateUpdate> {
17548 if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &mut self
17549 .data
17550 {
17551 Some(field as _)
17552 } else {
17553 None
17554 }
17555 }
17556 pub fn randomness_state_update_mut(
17560 &mut self,
17561 ) -> &mut super::RandomnessStateUpdate {
17562 if self.randomness_state_update_opt_mut().is_none() {
17563 self.data = Some(
17564 super::transaction_kind::Data::RandomnessStateUpdate(
17565 super::RandomnessStateUpdate::default(),
17566 ),
17567 );
17568 }
17569 self.randomness_state_update_opt_mut().unwrap()
17570 }
17571 pub fn set_randomness_state_update<T: Into<super::RandomnessStateUpdate>>(
17574 &mut self,
17575 field: T,
17576 ) {
17577 self.data = Some(
17578 super::transaction_kind::Data::RandomnessStateUpdate(field.into().into()),
17579 );
17580 }
17581 pub fn with_randomness_state_update<T: Into<super::RandomnessStateUpdate>>(
17584 mut self,
17585 field: T,
17586 ) -> Self {
17587 self.set_randomness_state_update(field.into());
17588 self
17589 }
17590 }
17591 impl super::TransactionLiteral {
17592 pub const fn const_default() -> Self {
17593 Self {
17594 negated: false,
17595 predicate: None,
17596 }
17597 }
17598 #[doc(hidden)]
17599 pub fn default_instance() -> &'static Self {
17600 static DEFAULT: super::TransactionLiteral = super::TransactionLiteral::const_default();
17601 &DEFAULT
17602 }
17603 pub fn negated_mut(&mut self) -> &mut bool {
17606 &mut self.negated
17607 }
17608 pub fn set_negated(&mut self, field: bool) {
17610 self.negated = field;
17611 }
17612 pub fn with_negated(mut self, field: bool) -> Self {
17614 self.set_negated(field);
17615 self
17616 }
17617 pub fn sender(&self) -> &super::SenderFilter {
17619 if let Some(super::transaction_literal::Predicate::Sender(field)) = &self
17620 .predicate
17621 {
17622 field as _
17623 } else {
17624 super::SenderFilter::default_instance() as _
17625 }
17626 }
17627 pub fn sender_opt(&self) -> Option<&super::SenderFilter> {
17629 if let Some(super::transaction_literal::Predicate::Sender(field)) = &self
17630 .predicate
17631 {
17632 Some(field as _)
17633 } else {
17634 None
17635 }
17636 }
17637 pub fn sender_opt_mut(&mut self) -> Option<&mut super::SenderFilter> {
17639 if let Some(super::transaction_literal::Predicate::Sender(field)) = &mut self
17640 .predicate
17641 {
17642 Some(field as _)
17643 } else {
17644 None
17645 }
17646 }
17647 pub fn sender_mut(&mut self) -> &mut super::SenderFilter {
17651 if self.sender_opt_mut().is_none() {
17652 self.predicate = Some(
17653 super::transaction_literal::Predicate::Sender(
17654 super::SenderFilter::default(),
17655 ),
17656 );
17657 }
17658 self.sender_opt_mut().unwrap()
17659 }
17660 pub fn set_sender<T: Into<super::SenderFilter>>(&mut self, field: T) {
17663 self.predicate = Some(
17664 super::transaction_literal::Predicate::Sender(field.into().into()),
17665 );
17666 }
17667 pub fn with_sender<T: Into<super::SenderFilter>>(mut self, field: T) -> Self {
17670 self.set_sender(field.into());
17671 self
17672 }
17673 pub fn affected_address(&self) -> &super::AffectedAddressFilter {
17675 if let Some(super::transaction_literal::Predicate::AffectedAddress(field)) = &self
17676 .predicate
17677 {
17678 field as _
17679 } else {
17680 super::AffectedAddressFilter::default_instance() as _
17681 }
17682 }
17683 pub fn affected_address_opt(&self) -> Option<&super::AffectedAddressFilter> {
17685 if let Some(super::transaction_literal::Predicate::AffectedAddress(field)) = &self
17686 .predicate
17687 {
17688 Some(field as _)
17689 } else {
17690 None
17691 }
17692 }
17693 pub fn affected_address_opt_mut(
17695 &mut self,
17696 ) -> Option<&mut super::AffectedAddressFilter> {
17697 if let Some(super::transaction_literal::Predicate::AffectedAddress(field)) = &mut self
17698 .predicate
17699 {
17700 Some(field as _)
17701 } else {
17702 None
17703 }
17704 }
17705 pub fn affected_address_mut(&mut self) -> &mut super::AffectedAddressFilter {
17709 if self.affected_address_opt_mut().is_none() {
17710 self.predicate = Some(
17711 super::transaction_literal::Predicate::AffectedAddress(
17712 super::AffectedAddressFilter::default(),
17713 ),
17714 );
17715 }
17716 self.affected_address_opt_mut().unwrap()
17717 }
17718 pub fn set_affected_address<T: Into<super::AffectedAddressFilter>>(
17721 &mut self,
17722 field: T,
17723 ) {
17724 self.predicate = Some(
17725 super::transaction_literal::Predicate::AffectedAddress(
17726 field.into().into(),
17727 ),
17728 );
17729 }
17730 pub fn with_affected_address<T: Into<super::AffectedAddressFilter>>(
17733 mut self,
17734 field: T,
17735 ) -> Self {
17736 self.set_affected_address(field.into());
17737 self
17738 }
17739 pub fn affected_object(&self) -> &super::AffectedObjectFilter {
17741 if let Some(super::transaction_literal::Predicate::AffectedObject(field)) = &self
17742 .predicate
17743 {
17744 field as _
17745 } else {
17746 super::AffectedObjectFilter::default_instance() as _
17747 }
17748 }
17749 pub fn affected_object_opt(&self) -> Option<&super::AffectedObjectFilter> {
17751 if let Some(super::transaction_literal::Predicate::AffectedObject(field)) = &self
17752 .predicate
17753 {
17754 Some(field as _)
17755 } else {
17756 None
17757 }
17758 }
17759 pub fn affected_object_opt_mut(
17761 &mut self,
17762 ) -> Option<&mut super::AffectedObjectFilter> {
17763 if let Some(super::transaction_literal::Predicate::AffectedObject(field)) = &mut self
17764 .predicate
17765 {
17766 Some(field as _)
17767 } else {
17768 None
17769 }
17770 }
17771 pub fn affected_object_mut(&mut self) -> &mut super::AffectedObjectFilter {
17775 if self.affected_object_opt_mut().is_none() {
17776 self.predicate = Some(
17777 super::transaction_literal::Predicate::AffectedObject(
17778 super::AffectedObjectFilter::default(),
17779 ),
17780 );
17781 }
17782 self.affected_object_opt_mut().unwrap()
17783 }
17784 pub fn set_affected_object<T: Into<super::AffectedObjectFilter>>(
17787 &mut self,
17788 field: T,
17789 ) {
17790 self.predicate = Some(
17791 super::transaction_literal::Predicate::AffectedObject(
17792 field.into().into(),
17793 ),
17794 );
17795 }
17796 pub fn with_affected_object<T: Into<super::AffectedObjectFilter>>(
17799 mut self,
17800 field: T,
17801 ) -> Self {
17802 self.set_affected_object(field.into());
17803 self
17804 }
17805 pub fn move_call(&self) -> &super::MoveCallFilter {
17807 if let Some(super::transaction_literal::Predicate::MoveCall(field)) = &self
17808 .predicate
17809 {
17810 field as _
17811 } else {
17812 super::MoveCallFilter::default_instance() as _
17813 }
17814 }
17815 pub fn move_call_opt(&self) -> Option<&super::MoveCallFilter> {
17817 if let Some(super::transaction_literal::Predicate::MoveCall(field)) = &self
17818 .predicate
17819 {
17820 Some(field as _)
17821 } else {
17822 None
17823 }
17824 }
17825 pub fn move_call_opt_mut(&mut self) -> Option<&mut super::MoveCallFilter> {
17827 if let Some(super::transaction_literal::Predicate::MoveCall(field)) = &mut self
17828 .predicate
17829 {
17830 Some(field as _)
17831 } else {
17832 None
17833 }
17834 }
17835 pub fn move_call_mut(&mut self) -> &mut super::MoveCallFilter {
17839 if self.move_call_opt_mut().is_none() {
17840 self.predicate = Some(
17841 super::transaction_literal::Predicate::MoveCall(
17842 super::MoveCallFilter::default(),
17843 ),
17844 );
17845 }
17846 self.move_call_opt_mut().unwrap()
17847 }
17848 pub fn set_move_call<T: Into<super::MoveCallFilter>>(&mut self, field: T) {
17851 self.predicate = Some(
17852 super::transaction_literal::Predicate::MoveCall(field.into().into()),
17853 );
17854 }
17855 pub fn with_move_call<T: Into<super::MoveCallFilter>>(
17858 mut self,
17859 field: T,
17860 ) -> Self {
17861 self.set_move_call(field.into());
17862 self
17863 }
17864 pub fn emit_module(&self) -> &super::EmitModuleFilter {
17866 if let Some(super::transaction_literal::Predicate::EmitModule(field)) = &self
17867 .predicate
17868 {
17869 field as _
17870 } else {
17871 super::EmitModuleFilter::default_instance() as _
17872 }
17873 }
17874 pub fn emit_module_opt(&self) -> Option<&super::EmitModuleFilter> {
17876 if let Some(super::transaction_literal::Predicate::EmitModule(field)) = &self
17877 .predicate
17878 {
17879 Some(field as _)
17880 } else {
17881 None
17882 }
17883 }
17884 pub fn emit_module_opt_mut(&mut self) -> Option<&mut super::EmitModuleFilter> {
17886 if let Some(super::transaction_literal::Predicate::EmitModule(field)) = &mut self
17887 .predicate
17888 {
17889 Some(field as _)
17890 } else {
17891 None
17892 }
17893 }
17894 pub fn emit_module_mut(&mut self) -> &mut super::EmitModuleFilter {
17898 if self.emit_module_opt_mut().is_none() {
17899 self.predicate = Some(
17900 super::transaction_literal::Predicate::EmitModule(
17901 super::EmitModuleFilter::default(),
17902 ),
17903 );
17904 }
17905 self.emit_module_opt_mut().unwrap()
17906 }
17907 pub fn set_emit_module<T: Into<super::EmitModuleFilter>>(&mut self, field: T) {
17910 self.predicate = Some(
17911 super::transaction_literal::Predicate::EmitModule(field.into().into()),
17912 );
17913 }
17914 pub fn with_emit_module<T: Into<super::EmitModuleFilter>>(
17917 mut self,
17918 field: T,
17919 ) -> Self {
17920 self.set_emit_module(field.into());
17921 self
17922 }
17923 pub fn event_type(&self) -> &super::EventTypeFilter {
17925 if let Some(super::transaction_literal::Predicate::EventType(field)) = &self
17926 .predicate
17927 {
17928 field as _
17929 } else {
17930 super::EventTypeFilter::default_instance() as _
17931 }
17932 }
17933 pub fn event_type_opt(&self) -> Option<&super::EventTypeFilter> {
17935 if let Some(super::transaction_literal::Predicate::EventType(field)) = &self
17936 .predicate
17937 {
17938 Some(field as _)
17939 } else {
17940 None
17941 }
17942 }
17943 pub fn event_type_opt_mut(&mut self) -> Option<&mut super::EventTypeFilter> {
17945 if let Some(super::transaction_literal::Predicate::EventType(field)) = &mut self
17946 .predicate
17947 {
17948 Some(field as _)
17949 } else {
17950 None
17951 }
17952 }
17953 pub fn event_type_mut(&mut self) -> &mut super::EventTypeFilter {
17957 if self.event_type_opt_mut().is_none() {
17958 self.predicate = Some(
17959 super::transaction_literal::Predicate::EventType(
17960 super::EventTypeFilter::default(),
17961 ),
17962 );
17963 }
17964 self.event_type_opt_mut().unwrap()
17965 }
17966 pub fn set_event_type<T: Into<super::EventTypeFilter>>(&mut self, field: T) {
17969 self.predicate = Some(
17970 super::transaction_literal::Predicate::EventType(field.into().into()),
17971 );
17972 }
17973 pub fn with_event_type<T: Into<super::EventTypeFilter>>(
17976 mut self,
17977 field: T,
17978 ) -> Self {
17979 self.set_event_type(field.into());
17980 self
17981 }
17982 pub fn event_stream_head(&self) -> &super::EventStreamHeadFilter {
17984 if let Some(super::transaction_literal::Predicate::EventStreamHead(field)) = &self
17985 .predicate
17986 {
17987 field as _
17988 } else {
17989 super::EventStreamHeadFilter::default_instance() as _
17990 }
17991 }
17992 pub fn event_stream_head_opt(&self) -> Option<&super::EventStreamHeadFilter> {
17994 if let Some(super::transaction_literal::Predicate::EventStreamHead(field)) = &self
17995 .predicate
17996 {
17997 Some(field as _)
17998 } else {
17999 None
18000 }
18001 }
18002 pub fn event_stream_head_opt_mut(
18004 &mut self,
18005 ) -> Option<&mut super::EventStreamHeadFilter> {
18006 if let Some(super::transaction_literal::Predicate::EventStreamHead(field)) = &mut self
18007 .predicate
18008 {
18009 Some(field as _)
18010 } else {
18011 None
18012 }
18013 }
18014 pub fn event_stream_head_mut(&mut self) -> &mut super::EventStreamHeadFilter {
18018 if self.event_stream_head_opt_mut().is_none() {
18019 self.predicate = Some(
18020 super::transaction_literal::Predicate::EventStreamHead(
18021 super::EventStreamHeadFilter::default(),
18022 ),
18023 );
18024 }
18025 self.event_stream_head_opt_mut().unwrap()
18026 }
18027 pub fn set_event_stream_head<T: Into<super::EventStreamHeadFilter>>(
18030 &mut self,
18031 field: T,
18032 ) {
18033 self.predicate = Some(
18034 super::transaction_literal::Predicate::EventStreamHead(
18035 field.into().into(),
18036 ),
18037 );
18038 }
18039 pub fn with_event_stream_head<T: Into<super::EventStreamHeadFilter>>(
18042 mut self,
18043 field: T,
18044 ) -> Self {
18045 self.set_event_stream_head(field.into());
18046 self
18047 }
18048 pub fn package_write(&self) -> &super::PackageWriteFilter {
18050 if let Some(super::transaction_literal::Predicate::PackageWrite(field)) = &self
18051 .predicate
18052 {
18053 field as _
18054 } else {
18055 super::PackageWriteFilter::default_instance() as _
18056 }
18057 }
18058 pub fn package_write_opt(&self) -> Option<&super::PackageWriteFilter> {
18060 if let Some(super::transaction_literal::Predicate::PackageWrite(field)) = &self
18061 .predicate
18062 {
18063 Some(field as _)
18064 } else {
18065 None
18066 }
18067 }
18068 pub fn package_write_opt_mut(
18070 &mut self,
18071 ) -> Option<&mut super::PackageWriteFilter> {
18072 if let Some(super::transaction_literal::Predicate::PackageWrite(field)) = &mut self
18073 .predicate
18074 {
18075 Some(field as _)
18076 } else {
18077 None
18078 }
18079 }
18080 pub fn package_write_mut(&mut self) -> &mut super::PackageWriteFilter {
18084 if self.package_write_opt_mut().is_none() {
18085 self.predicate = Some(
18086 super::transaction_literal::Predicate::PackageWrite(
18087 super::PackageWriteFilter::default(),
18088 ),
18089 );
18090 }
18091 self.package_write_opt_mut().unwrap()
18092 }
18093 pub fn set_package_write<T: Into<super::PackageWriteFilter>>(
18096 &mut self,
18097 field: T,
18098 ) {
18099 self.predicate = Some(
18100 super::transaction_literal::Predicate::PackageWrite(field.into().into()),
18101 );
18102 }
18103 pub fn with_package_write<T: Into<super::PackageWriteFilter>>(
18106 mut self,
18107 field: T,
18108 ) -> Self {
18109 self.set_package_write(field.into());
18110 self
18111 }
18112 }
18113 impl super::TransactionTerm {
18114 pub const fn const_default() -> Self {
18115 Self { literals: Vec::new() }
18116 }
18117 #[doc(hidden)]
18118 pub fn default_instance() -> &'static Self {
18119 static DEFAULT: super::TransactionTerm = super::TransactionTerm::const_default();
18120 &DEFAULT
18121 }
18122 pub fn literals(&self) -> &[super::TransactionLiteral] {
18124 &self.literals
18125 }
18126 pub fn literals_mut(&mut self) -> &mut Vec<super::TransactionLiteral> {
18129 &mut self.literals
18130 }
18131 pub fn set_literals(&mut self, field: Vec<super::TransactionLiteral>) {
18133 self.literals = field;
18134 }
18135 pub fn with_literals(mut self, field: Vec<super::TransactionLiteral>) -> Self {
18137 self.set_literals(field);
18138 self
18139 }
18140 }
18141 impl super::TransferObjects {
18142 pub const fn const_default() -> Self {
18143 Self {
18144 objects: Vec::new(),
18145 address: None,
18146 }
18147 }
18148 #[doc(hidden)]
18149 pub fn default_instance() -> &'static Self {
18150 static DEFAULT: super::TransferObjects = super::TransferObjects::const_default();
18151 &DEFAULT
18152 }
18153 pub fn objects(&self) -> &[super::Argument] {
18155 &self.objects
18156 }
18157 pub fn objects_mut(&mut self) -> &mut Vec<super::Argument> {
18160 &mut self.objects
18161 }
18162 pub fn set_objects(&mut self, field: Vec<super::Argument>) {
18164 self.objects = field;
18165 }
18166 pub fn with_objects(mut self, field: Vec<super::Argument>) -> Self {
18168 self.set_objects(field);
18169 self
18170 }
18171 pub fn address(&self) -> &super::Argument {
18173 self.address
18174 .as_ref()
18175 .map(|field| field as _)
18176 .unwrap_or_else(|| super::Argument::default_instance() as _)
18177 }
18178 pub fn address_opt_mut(&mut self) -> Option<&mut super::Argument> {
18180 self.address.as_mut().map(|field| field as _)
18181 }
18182 pub fn address_mut(&mut self) -> &mut super::Argument {
18185 self.address.get_or_insert_default()
18186 }
18187 pub fn address_opt(&self) -> Option<&super::Argument> {
18189 self.address.as_ref().map(|field| field as _)
18190 }
18191 pub fn set_address<T: Into<super::Argument>>(&mut self, field: T) {
18193 self.address = Some(field.into().into());
18194 }
18195 pub fn with_address<T: Into<super::Argument>>(mut self, field: T) -> Self {
18197 self.set_address(field.into());
18198 self
18199 }
18200 }
18201 impl super::TypeArgumentError {
18202 pub const fn const_default() -> Self {
18203 Self {
18204 type_argument: None,
18205 kind: None,
18206 }
18207 }
18208 #[doc(hidden)]
18209 pub fn default_instance() -> &'static Self {
18210 static DEFAULT: super::TypeArgumentError = super::TypeArgumentError::const_default();
18211 &DEFAULT
18212 }
18213 pub fn type_argument_opt_mut(&mut self) -> Option<&mut u32> {
18215 self.type_argument.as_mut().map(|field| field as _)
18216 }
18217 pub fn type_argument_mut(&mut self) -> &mut u32 {
18220 self.type_argument.get_or_insert_default()
18221 }
18222 pub fn type_argument_opt(&self) -> Option<u32> {
18224 self.type_argument.as_ref().map(|field| *field)
18225 }
18226 pub fn set_type_argument(&mut self, field: u32) {
18228 self.type_argument = Some(field);
18229 }
18230 pub fn with_type_argument(mut self, field: u32) -> Self {
18232 self.set_type_argument(field);
18233 self
18234 }
18235 pub fn with_kind<T: Into<super::type_argument_error::TypeArgumentErrorKind>>(
18237 mut self,
18238 field: T,
18239 ) -> Self {
18240 self.set_kind(field.into());
18241 self
18242 }
18243 }
18244 impl super::TypeOrigin {
18245 pub const fn const_default() -> Self {
18246 Self {
18247 module_name: None,
18248 datatype_name: None,
18249 package_id: None,
18250 }
18251 }
18252 #[doc(hidden)]
18253 pub fn default_instance() -> &'static Self {
18254 static DEFAULT: super::TypeOrigin = super::TypeOrigin::const_default();
18255 &DEFAULT
18256 }
18257 pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
18259 self.module_name.as_mut().map(|field| field as _)
18260 }
18261 pub fn module_name_mut(&mut self) -> &mut String {
18264 self.module_name.get_or_insert_default()
18265 }
18266 pub fn module_name_opt(&self) -> Option<&str> {
18268 self.module_name.as_ref().map(|field| field as _)
18269 }
18270 pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
18272 self.module_name = Some(field.into().into());
18273 }
18274 pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
18276 self.set_module_name(field.into());
18277 self
18278 }
18279 pub fn datatype_name_opt_mut(&mut self) -> Option<&mut String> {
18281 self.datatype_name.as_mut().map(|field| field as _)
18282 }
18283 pub fn datatype_name_mut(&mut self) -> &mut String {
18286 self.datatype_name.get_or_insert_default()
18287 }
18288 pub fn datatype_name_opt(&self) -> Option<&str> {
18290 self.datatype_name.as_ref().map(|field| field as _)
18291 }
18292 pub fn set_datatype_name<T: Into<String>>(&mut self, field: T) {
18294 self.datatype_name = Some(field.into().into());
18295 }
18296 pub fn with_datatype_name<T: Into<String>>(mut self, field: T) -> Self {
18298 self.set_datatype_name(field.into());
18299 self
18300 }
18301 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
18303 self.package_id.as_mut().map(|field| field as _)
18304 }
18305 pub fn package_id_mut(&mut self) -> &mut String {
18308 self.package_id.get_or_insert_default()
18309 }
18310 pub fn package_id_opt(&self) -> Option<&str> {
18312 self.package_id.as_ref().map(|field| field as _)
18313 }
18314 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
18316 self.package_id = Some(field.into().into());
18317 }
18318 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
18320 self.set_package_id(field.into());
18321 self
18322 }
18323 }
18324 impl super::TypeParameter {
18325 pub const fn const_default() -> Self {
18326 Self {
18327 constraints: Vec::new(),
18328 is_phantom: None,
18329 }
18330 }
18331 #[doc(hidden)]
18332 pub fn default_instance() -> &'static Self {
18333 static DEFAULT: super::TypeParameter = super::TypeParameter::const_default();
18334 &DEFAULT
18335 }
18336 pub fn is_phantom_opt_mut(&mut self) -> Option<&mut bool> {
18338 self.is_phantom.as_mut().map(|field| field as _)
18339 }
18340 pub fn is_phantom_mut(&mut self) -> &mut bool {
18343 self.is_phantom.get_or_insert_default()
18344 }
18345 pub fn is_phantom_opt(&self) -> Option<bool> {
18347 self.is_phantom.as_ref().map(|field| *field)
18348 }
18349 pub fn set_is_phantom(&mut self, field: bool) {
18351 self.is_phantom = Some(field);
18352 }
18353 pub fn with_is_phantom(mut self, field: bool) -> Self {
18355 self.set_is_phantom(field);
18356 self
18357 }
18358 }
18359 impl super::UnchangedConsensusObject {
18360 pub const fn const_default() -> Self {
18361 Self {
18362 kind: None,
18363 object_id: None,
18364 version: None,
18365 digest: None,
18366 object_type: None,
18367 }
18368 }
18369 #[doc(hidden)]
18370 pub fn default_instance() -> &'static Self {
18371 static DEFAULT: super::UnchangedConsensusObject = super::UnchangedConsensusObject::const_default();
18372 &DEFAULT
18373 }
18374 pub fn with_kind<
18376 T: Into<super::unchanged_consensus_object::UnchangedConsensusObjectKind>,
18377 >(mut self, field: T) -> Self {
18378 self.set_kind(field.into());
18379 self
18380 }
18381 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
18383 self.object_id.as_mut().map(|field| field as _)
18384 }
18385 pub fn object_id_mut(&mut self) -> &mut String {
18388 self.object_id.get_or_insert_default()
18389 }
18390 pub fn object_id_opt(&self) -> Option<&str> {
18392 self.object_id.as_ref().map(|field| field as _)
18393 }
18394 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
18396 self.object_id = Some(field.into().into());
18397 }
18398 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
18400 self.set_object_id(field.into());
18401 self
18402 }
18403 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
18405 self.version.as_mut().map(|field| field as _)
18406 }
18407 pub fn version_mut(&mut self) -> &mut u64 {
18410 self.version.get_or_insert_default()
18411 }
18412 pub fn version_opt(&self) -> Option<u64> {
18414 self.version.as_ref().map(|field| *field)
18415 }
18416 pub fn set_version(&mut self, field: u64) {
18418 self.version = Some(field);
18419 }
18420 pub fn with_version(mut self, field: u64) -> Self {
18422 self.set_version(field);
18423 self
18424 }
18425 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
18427 self.digest.as_mut().map(|field| field as _)
18428 }
18429 pub fn digest_mut(&mut self) -> &mut String {
18432 self.digest.get_or_insert_default()
18433 }
18434 pub fn digest_opt(&self) -> Option<&str> {
18436 self.digest.as_ref().map(|field| field as _)
18437 }
18438 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
18440 self.digest = Some(field.into().into());
18441 }
18442 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
18444 self.set_digest(field.into());
18445 self
18446 }
18447 pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
18449 self.object_type.as_mut().map(|field| field as _)
18450 }
18451 pub fn object_type_mut(&mut self) -> &mut String {
18454 self.object_type.get_or_insert_default()
18455 }
18456 pub fn object_type_opt(&self) -> Option<&str> {
18458 self.object_type.as_ref().map(|field| field as _)
18459 }
18460 pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
18462 self.object_type = Some(field.into().into());
18463 }
18464 pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
18466 self.set_object_type(field.into());
18467 self
18468 }
18469 }
18470 impl super::Upgrade {
18471 pub const fn const_default() -> Self {
18472 Self {
18473 modules: Vec::new(),
18474 dependencies: Vec::new(),
18475 package: None,
18476 ticket: None,
18477 }
18478 }
18479 #[doc(hidden)]
18480 pub fn default_instance() -> &'static Self {
18481 static DEFAULT: super::Upgrade = super::Upgrade::const_default();
18482 &DEFAULT
18483 }
18484 pub fn modules(&self) -> &[::prost::bytes::Bytes] {
18486 &self.modules
18487 }
18488 pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
18491 &mut self.modules
18492 }
18493 pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
18495 self.modules = field;
18496 }
18497 pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
18499 self.set_modules(field);
18500 self
18501 }
18502 pub fn dependencies(&self) -> &[String] {
18504 &self.dependencies
18505 }
18506 pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
18509 &mut self.dependencies
18510 }
18511 pub fn set_dependencies(&mut self, field: Vec<String>) {
18513 self.dependencies = field;
18514 }
18515 pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
18517 self.set_dependencies(field);
18518 self
18519 }
18520 pub fn package_opt_mut(&mut self) -> Option<&mut String> {
18522 self.package.as_mut().map(|field| field as _)
18523 }
18524 pub fn package_mut(&mut self) -> &mut String {
18527 self.package.get_or_insert_default()
18528 }
18529 pub fn package_opt(&self) -> Option<&str> {
18531 self.package.as_ref().map(|field| field as _)
18532 }
18533 pub fn set_package<T: Into<String>>(&mut self, field: T) {
18535 self.package = Some(field.into().into());
18536 }
18537 pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
18539 self.set_package(field.into());
18540 self
18541 }
18542 pub fn ticket(&self) -> &super::Argument {
18544 self.ticket
18545 .as_ref()
18546 .map(|field| field as _)
18547 .unwrap_or_else(|| super::Argument::default_instance() as _)
18548 }
18549 pub fn ticket_opt_mut(&mut self) -> Option<&mut super::Argument> {
18551 self.ticket.as_mut().map(|field| field as _)
18552 }
18553 pub fn ticket_mut(&mut self) -> &mut super::Argument {
18556 self.ticket.get_or_insert_default()
18557 }
18558 pub fn ticket_opt(&self) -> Option<&super::Argument> {
18560 self.ticket.as_ref().map(|field| field as _)
18561 }
18562 pub fn set_ticket<T: Into<super::Argument>>(&mut self, field: T) {
18564 self.ticket = Some(field.into().into());
18565 }
18566 pub fn with_ticket<T: Into<super::Argument>>(mut self, field: T) -> Self {
18568 self.set_ticket(field.into());
18569 self
18570 }
18571 }
18572 impl super::UserSignature {
18573 pub const fn const_default() -> Self {
18574 Self {
18575 bcs: None,
18576 scheme: None,
18577 signature: None,
18578 }
18579 }
18580 #[doc(hidden)]
18581 pub fn default_instance() -> &'static Self {
18582 static DEFAULT: super::UserSignature = super::UserSignature::const_default();
18583 &DEFAULT
18584 }
18585 pub fn bcs(&self) -> &super::Bcs {
18587 self.bcs
18588 .as_ref()
18589 .map(|field| field as _)
18590 .unwrap_or_else(|| super::Bcs::default_instance() as _)
18591 }
18592 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
18594 self.bcs.as_mut().map(|field| field as _)
18595 }
18596 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
18599 self.bcs.get_or_insert_default()
18600 }
18601 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
18603 self.bcs.as_ref().map(|field| field as _)
18604 }
18605 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
18607 self.bcs = Some(field.into().into());
18608 }
18609 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
18611 self.set_bcs(field.into());
18612 self
18613 }
18614 pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
18616 self.set_scheme(field.into());
18617 self
18618 }
18619 pub fn simple(&self) -> &super::SimpleSignature {
18621 if let Some(super::user_signature::Signature::Simple(field)) = &self
18622 .signature
18623 {
18624 field as _
18625 } else {
18626 super::SimpleSignature::default_instance() as _
18627 }
18628 }
18629 pub fn simple_opt(&self) -> Option<&super::SimpleSignature> {
18631 if let Some(super::user_signature::Signature::Simple(field)) = &self
18632 .signature
18633 {
18634 Some(field as _)
18635 } else {
18636 None
18637 }
18638 }
18639 pub fn simple_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
18641 if let Some(super::user_signature::Signature::Simple(field)) = &mut self
18642 .signature
18643 {
18644 Some(field as _)
18645 } else {
18646 None
18647 }
18648 }
18649 pub fn simple_mut(&mut self) -> &mut super::SimpleSignature {
18653 if self.simple_opt_mut().is_none() {
18654 self.signature = Some(
18655 super::user_signature::Signature::Simple(
18656 super::SimpleSignature::default(),
18657 ),
18658 );
18659 }
18660 self.simple_opt_mut().unwrap()
18661 }
18662 pub fn set_simple<T: Into<super::SimpleSignature>>(&mut self, field: T) {
18665 self.signature = Some(
18666 super::user_signature::Signature::Simple(field.into().into()),
18667 );
18668 }
18669 pub fn with_simple<T: Into<super::SimpleSignature>>(mut self, field: T) -> Self {
18672 self.set_simple(field.into());
18673 self
18674 }
18675 pub fn multisig(&self) -> &super::MultisigAggregatedSignature {
18677 if let Some(super::user_signature::Signature::Multisig(field)) = &self
18678 .signature
18679 {
18680 field as _
18681 } else {
18682 super::MultisigAggregatedSignature::default_instance() as _
18683 }
18684 }
18685 pub fn multisig_opt(&self) -> Option<&super::MultisigAggregatedSignature> {
18687 if let Some(super::user_signature::Signature::Multisig(field)) = &self
18688 .signature
18689 {
18690 Some(field as _)
18691 } else {
18692 None
18693 }
18694 }
18695 pub fn multisig_opt_mut(
18697 &mut self,
18698 ) -> Option<&mut super::MultisigAggregatedSignature> {
18699 if let Some(super::user_signature::Signature::Multisig(field)) = &mut self
18700 .signature
18701 {
18702 Some(field as _)
18703 } else {
18704 None
18705 }
18706 }
18707 pub fn multisig_mut(&mut self) -> &mut super::MultisigAggregatedSignature {
18711 if self.multisig_opt_mut().is_none() {
18712 self.signature = Some(
18713 super::user_signature::Signature::Multisig(
18714 super::MultisigAggregatedSignature::default(),
18715 ),
18716 );
18717 }
18718 self.multisig_opt_mut().unwrap()
18719 }
18720 pub fn set_multisig<T: Into<super::MultisigAggregatedSignature>>(
18723 &mut self,
18724 field: T,
18725 ) {
18726 self.signature = Some(
18727 super::user_signature::Signature::Multisig(field.into().into()),
18728 );
18729 }
18730 pub fn with_multisig<T: Into<super::MultisigAggregatedSignature>>(
18733 mut self,
18734 field: T,
18735 ) -> Self {
18736 self.set_multisig(field.into());
18737 self
18738 }
18739 pub fn zklogin(&self) -> &super::ZkLoginAuthenticator {
18741 if let Some(super::user_signature::Signature::Zklogin(field)) = &self
18742 .signature
18743 {
18744 field as _
18745 } else {
18746 super::ZkLoginAuthenticator::default_instance() as _
18747 }
18748 }
18749 pub fn zklogin_opt(&self) -> Option<&super::ZkLoginAuthenticator> {
18751 if let Some(super::user_signature::Signature::Zklogin(field)) = &self
18752 .signature
18753 {
18754 Some(field as _)
18755 } else {
18756 None
18757 }
18758 }
18759 pub fn zklogin_opt_mut(&mut self) -> Option<&mut super::ZkLoginAuthenticator> {
18761 if let Some(super::user_signature::Signature::Zklogin(field)) = &mut self
18762 .signature
18763 {
18764 Some(field as _)
18765 } else {
18766 None
18767 }
18768 }
18769 pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginAuthenticator {
18773 if self.zklogin_opt_mut().is_none() {
18774 self.signature = Some(
18775 super::user_signature::Signature::Zklogin(
18776 super::ZkLoginAuthenticator::default(),
18777 ),
18778 );
18779 }
18780 self.zklogin_opt_mut().unwrap()
18781 }
18782 pub fn set_zklogin<T: Into<super::ZkLoginAuthenticator>>(&mut self, field: T) {
18785 self.signature = Some(
18786 super::user_signature::Signature::Zklogin(field.into().into()),
18787 );
18788 }
18789 pub fn with_zklogin<T: Into<super::ZkLoginAuthenticator>>(
18792 mut self,
18793 field: T,
18794 ) -> Self {
18795 self.set_zklogin(field.into());
18796 self
18797 }
18798 pub fn passkey(&self) -> &super::PasskeyAuthenticator {
18800 if let Some(super::user_signature::Signature::Passkey(field)) = &self
18801 .signature
18802 {
18803 field as _
18804 } else {
18805 super::PasskeyAuthenticator::default_instance() as _
18806 }
18807 }
18808 pub fn passkey_opt(&self) -> Option<&super::PasskeyAuthenticator> {
18810 if let Some(super::user_signature::Signature::Passkey(field)) = &self
18811 .signature
18812 {
18813 Some(field as _)
18814 } else {
18815 None
18816 }
18817 }
18818 pub fn passkey_opt_mut(&mut self) -> Option<&mut super::PasskeyAuthenticator> {
18820 if let Some(super::user_signature::Signature::Passkey(field)) = &mut self
18821 .signature
18822 {
18823 Some(field as _)
18824 } else {
18825 None
18826 }
18827 }
18828 pub fn passkey_mut(&mut self) -> &mut super::PasskeyAuthenticator {
18832 if self.passkey_opt_mut().is_none() {
18833 self.signature = Some(
18834 super::user_signature::Signature::Passkey(
18835 super::PasskeyAuthenticator::default(),
18836 ),
18837 );
18838 }
18839 self.passkey_opt_mut().unwrap()
18840 }
18841 pub fn set_passkey<T: Into<super::PasskeyAuthenticator>>(&mut self, field: T) {
18844 self.signature = Some(
18845 super::user_signature::Signature::Passkey(field.into().into()),
18846 );
18847 }
18848 pub fn with_passkey<T: Into<super::PasskeyAuthenticator>>(
18851 mut self,
18852 field: T,
18853 ) -> Self {
18854 self.set_passkey(field.into());
18855 self
18856 }
18857 }
18858 impl super::Validator {
18859 pub const fn const_default() -> Self {
18860 Self {
18861 name: None,
18862 address: None,
18863 description: None,
18864 image_url: None,
18865 project_url: None,
18866 protocol_public_key: None,
18867 proof_of_possession: None,
18868 network_public_key: None,
18869 worker_public_key: None,
18870 network_address: None,
18871 p2p_address: None,
18872 primary_address: None,
18873 worker_address: None,
18874 next_epoch_protocol_public_key: None,
18875 next_epoch_proof_of_possession: None,
18876 next_epoch_network_public_key: None,
18877 next_epoch_worker_public_key: None,
18878 next_epoch_network_address: None,
18879 next_epoch_p2p_address: None,
18880 next_epoch_primary_address: None,
18881 next_epoch_worker_address: None,
18882 metadata_extra_fields: None,
18883 voting_power: None,
18884 operation_cap_id: None,
18885 gas_price: None,
18886 staking_pool: None,
18887 commission_rate: None,
18888 next_epoch_stake: None,
18889 next_epoch_gas_price: None,
18890 next_epoch_commission_rate: None,
18891 extra_fields: None,
18892 }
18893 }
18894 #[doc(hidden)]
18895 pub fn default_instance() -> &'static Self {
18896 static DEFAULT: super::Validator = super::Validator::const_default();
18897 &DEFAULT
18898 }
18899 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
18901 self.name.as_mut().map(|field| field as _)
18902 }
18903 pub fn name_mut(&mut self) -> &mut String {
18906 self.name.get_or_insert_default()
18907 }
18908 pub fn name_opt(&self) -> Option<&str> {
18910 self.name.as_ref().map(|field| field as _)
18911 }
18912 pub fn set_name<T: Into<String>>(&mut self, field: T) {
18914 self.name = Some(field.into().into());
18915 }
18916 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
18918 self.set_name(field.into());
18919 self
18920 }
18921 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
18923 self.address.as_mut().map(|field| field as _)
18924 }
18925 pub fn address_mut(&mut self) -> &mut String {
18928 self.address.get_or_insert_default()
18929 }
18930 pub fn address_opt(&self) -> Option<&str> {
18932 self.address.as_ref().map(|field| field as _)
18933 }
18934 pub fn set_address<T: Into<String>>(&mut self, field: T) {
18936 self.address = Some(field.into().into());
18937 }
18938 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
18940 self.set_address(field.into());
18941 self
18942 }
18943 pub fn description_opt_mut(&mut self) -> Option<&mut String> {
18945 self.description.as_mut().map(|field| field as _)
18946 }
18947 pub fn description_mut(&mut self) -> &mut String {
18950 self.description.get_or_insert_default()
18951 }
18952 pub fn description_opt(&self) -> Option<&str> {
18954 self.description.as_ref().map(|field| field as _)
18955 }
18956 pub fn set_description<T: Into<String>>(&mut self, field: T) {
18958 self.description = Some(field.into().into());
18959 }
18960 pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
18962 self.set_description(field.into());
18963 self
18964 }
18965 pub fn image_url_opt_mut(&mut self) -> Option<&mut String> {
18967 self.image_url.as_mut().map(|field| field as _)
18968 }
18969 pub fn image_url_mut(&mut self) -> &mut String {
18972 self.image_url.get_or_insert_default()
18973 }
18974 pub fn image_url_opt(&self) -> Option<&str> {
18976 self.image_url.as_ref().map(|field| field as _)
18977 }
18978 pub fn set_image_url<T: Into<String>>(&mut self, field: T) {
18980 self.image_url = Some(field.into().into());
18981 }
18982 pub fn with_image_url<T: Into<String>>(mut self, field: T) -> Self {
18984 self.set_image_url(field.into());
18985 self
18986 }
18987 pub fn project_url_opt_mut(&mut self) -> Option<&mut String> {
18989 self.project_url.as_mut().map(|field| field as _)
18990 }
18991 pub fn project_url_mut(&mut self) -> &mut String {
18994 self.project_url.get_or_insert_default()
18995 }
18996 pub fn project_url_opt(&self) -> Option<&str> {
18998 self.project_url.as_ref().map(|field| field as _)
18999 }
19000 pub fn set_project_url<T: Into<String>>(&mut self, field: T) {
19002 self.project_url = Some(field.into().into());
19003 }
19004 pub fn with_project_url<T: Into<String>>(mut self, field: T) -> Self {
19006 self.set_project_url(field.into());
19007 self
19008 }
19009 pub fn protocol_public_key_opt(&self) -> Option<&[u8]> {
19011 self.protocol_public_key.as_ref().map(|field| field as _)
19012 }
19013 pub fn set_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
19015 &mut self,
19016 field: T,
19017 ) {
19018 self.protocol_public_key = Some(field.into().into());
19019 }
19020 pub fn with_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
19022 mut self,
19023 field: T,
19024 ) -> Self {
19025 self.set_protocol_public_key(field.into());
19026 self
19027 }
19028 pub fn proof_of_possession_opt(&self) -> Option<&[u8]> {
19030 self.proof_of_possession.as_ref().map(|field| field as _)
19031 }
19032 pub fn set_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
19034 &mut self,
19035 field: T,
19036 ) {
19037 self.proof_of_possession = Some(field.into().into());
19038 }
19039 pub fn with_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
19041 mut self,
19042 field: T,
19043 ) -> Self {
19044 self.set_proof_of_possession(field.into());
19045 self
19046 }
19047 pub fn network_public_key_opt(&self) -> Option<&[u8]> {
19049 self.network_public_key.as_ref().map(|field| field as _)
19050 }
19051 pub fn set_network_public_key<T: Into<::prost::bytes::Bytes>>(
19053 &mut self,
19054 field: T,
19055 ) {
19056 self.network_public_key = Some(field.into().into());
19057 }
19058 pub fn with_network_public_key<T: Into<::prost::bytes::Bytes>>(
19060 mut self,
19061 field: T,
19062 ) -> Self {
19063 self.set_network_public_key(field.into());
19064 self
19065 }
19066 pub fn worker_public_key_opt(&self) -> Option<&[u8]> {
19068 self.worker_public_key.as_ref().map(|field| field as _)
19069 }
19070 pub fn set_worker_public_key<T: Into<::prost::bytes::Bytes>>(
19072 &mut self,
19073 field: T,
19074 ) {
19075 self.worker_public_key = Some(field.into().into());
19076 }
19077 pub fn with_worker_public_key<T: Into<::prost::bytes::Bytes>>(
19079 mut self,
19080 field: T,
19081 ) -> Self {
19082 self.set_worker_public_key(field.into());
19083 self
19084 }
19085 pub fn network_address_opt_mut(&mut self) -> Option<&mut String> {
19087 self.network_address.as_mut().map(|field| field as _)
19088 }
19089 pub fn network_address_mut(&mut self) -> &mut String {
19092 self.network_address.get_or_insert_default()
19093 }
19094 pub fn network_address_opt(&self) -> Option<&str> {
19096 self.network_address.as_ref().map(|field| field as _)
19097 }
19098 pub fn set_network_address<T: Into<String>>(&mut self, field: T) {
19100 self.network_address = Some(field.into().into());
19101 }
19102 pub fn with_network_address<T: Into<String>>(mut self, field: T) -> Self {
19104 self.set_network_address(field.into());
19105 self
19106 }
19107 pub fn p2p_address_opt_mut(&mut self) -> Option<&mut String> {
19109 self.p2p_address.as_mut().map(|field| field as _)
19110 }
19111 pub fn p2p_address_mut(&mut self) -> &mut String {
19114 self.p2p_address.get_or_insert_default()
19115 }
19116 pub fn p2p_address_opt(&self) -> Option<&str> {
19118 self.p2p_address.as_ref().map(|field| field as _)
19119 }
19120 pub fn set_p2p_address<T: Into<String>>(&mut self, field: T) {
19122 self.p2p_address = Some(field.into().into());
19123 }
19124 pub fn with_p2p_address<T: Into<String>>(mut self, field: T) -> Self {
19126 self.set_p2p_address(field.into());
19127 self
19128 }
19129 pub fn primary_address_opt_mut(&mut self) -> Option<&mut String> {
19131 self.primary_address.as_mut().map(|field| field as _)
19132 }
19133 pub fn primary_address_mut(&mut self) -> &mut String {
19136 self.primary_address.get_or_insert_default()
19137 }
19138 pub fn primary_address_opt(&self) -> Option<&str> {
19140 self.primary_address.as_ref().map(|field| field as _)
19141 }
19142 pub fn set_primary_address<T: Into<String>>(&mut self, field: T) {
19144 self.primary_address = Some(field.into().into());
19145 }
19146 pub fn with_primary_address<T: Into<String>>(mut self, field: T) -> Self {
19148 self.set_primary_address(field.into());
19149 self
19150 }
19151 pub fn worker_address_opt_mut(&mut self) -> Option<&mut String> {
19153 self.worker_address.as_mut().map(|field| field as _)
19154 }
19155 pub fn worker_address_mut(&mut self) -> &mut String {
19158 self.worker_address.get_or_insert_default()
19159 }
19160 pub fn worker_address_opt(&self) -> Option<&str> {
19162 self.worker_address.as_ref().map(|field| field as _)
19163 }
19164 pub fn set_worker_address<T: Into<String>>(&mut self, field: T) {
19166 self.worker_address = Some(field.into().into());
19167 }
19168 pub fn with_worker_address<T: Into<String>>(mut self, field: T) -> Self {
19170 self.set_worker_address(field.into());
19171 self
19172 }
19173 pub fn next_epoch_protocol_public_key_opt(&self) -> Option<&[u8]> {
19175 self.next_epoch_protocol_public_key.as_ref().map(|field| field as _)
19176 }
19177 pub fn set_next_epoch_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
19179 &mut self,
19180 field: T,
19181 ) {
19182 self.next_epoch_protocol_public_key = Some(field.into().into());
19183 }
19184 pub fn with_next_epoch_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
19186 mut self,
19187 field: T,
19188 ) -> Self {
19189 self.set_next_epoch_protocol_public_key(field.into());
19190 self
19191 }
19192 pub fn next_epoch_proof_of_possession_opt(&self) -> Option<&[u8]> {
19194 self.next_epoch_proof_of_possession.as_ref().map(|field| field as _)
19195 }
19196 pub fn set_next_epoch_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
19198 &mut self,
19199 field: T,
19200 ) {
19201 self.next_epoch_proof_of_possession = Some(field.into().into());
19202 }
19203 pub fn with_next_epoch_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
19205 mut self,
19206 field: T,
19207 ) -> Self {
19208 self.set_next_epoch_proof_of_possession(field.into());
19209 self
19210 }
19211 pub fn next_epoch_network_public_key_opt(&self) -> Option<&[u8]> {
19213 self.next_epoch_network_public_key.as_ref().map(|field| field as _)
19214 }
19215 pub fn set_next_epoch_network_public_key<T: Into<::prost::bytes::Bytes>>(
19217 &mut self,
19218 field: T,
19219 ) {
19220 self.next_epoch_network_public_key = Some(field.into().into());
19221 }
19222 pub fn with_next_epoch_network_public_key<T: Into<::prost::bytes::Bytes>>(
19224 mut self,
19225 field: T,
19226 ) -> Self {
19227 self.set_next_epoch_network_public_key(field.into());
19228 self
19229 }
19230 pub fn next_epoch_worker_public_key_opt(&self) -> Option<&[u8]> {
19232 self.next_epoch_worker_public_key.as_ref().map(|field| field as _)
19233 }
19234 pub fn set_next_epoch_worker_public_key<T: Into<::prost::bytes::Bytes>>(
19236 &mut self,
19237 field: T,
19238 ) {
19239 self.next_epoch_worker_public_key = Some(field.into().into());
19240 }
19241 pub fn with_next_epoch_worker_public_key<T: Into<::prost::bytes::Bytes>>(
19243 mut self,
19244 field: T,
19245 ) -> Self {
19246 self.set_next_epoch_worker_public_key(field.into());
19247 self
19248 }
19249 pub fn next_epoch_network_address_opt_mut(&mut self) -> Option<&mut String> {
19251 self.next_epoch_network_address.as_mut().map(|field| field as _)
19252 }
19253 pub fn next_epoch_network_address_mut(&mut self) -> &mut String {
19256 self.next_epoch_network_address.get_or_insert_default()
19257 }
19258 pub fn next_epoch_network_address_opt(&self) -> Option<&str> {
19260 self.next_epoch_network_address.as_ref().map(|field| field as _)
19261 }
19262 pub fn set_next_epoch_network_address<T: Into<String>>(&mut self, field: T) {
19264 self.next_epoch_network_address = Some(field.into().into());
19265 }
19266 pub fn with_next_epoch_network_address<T: Into<String>>(
19268 mut self,
19269 field: T,
19270 ) -> Self {
19271 self.set_next_epoch_network_address(field.into());
19272 self
19273 }
19274 pub fn next_epoch_p2p_address_opt_mut(&mut self) -> Option<&mut String> {
19276 self.next_epoch_p2p_address.as_mut().map(|field| field as _)
19277 }
19278 pub fn next_epoch_p2p_address_mut(&mut self) -> &mut String {
19281 self.next_epoch_p2p_address.get_or_insert_default()
19282 }
19283 pub fn next_epoch_p2p_address_opt(&self) -> Option<&str> {
19285 self.next_epoch_p2p_address.as_ref().map(|field| field as _)
19286 }
19287 pub fn set_next_epoch_p2p_address<T: Into<String>>(&mut self, field: T) {
19289 self.next_epoch_p2p_address = Some(field.into().into());
19290 }
19291 pub fn with_next_epoch_p2p_address<T: Into<String>>(mut self, field: T) -> Self {
19293 self.set_next_epoch_p2p_address(field.into());
19294 self
19295 }
19296 pub fn next_epoch_primary_address_opt_mut(&mut self) -> Option<&mut String> {
19298 self.next_epoch_primary_address.as_mut().map(|field| field as _)
19299 }
19300 pub fn next_epoch_primary_address_mut(&mut self) -> &mut String {
19303 self.next_epoch_primary_address.get_or_insert_default()
19304 }
19305 pub fn next_epoch_primary_address_opt(&self) -> Option<&str> {
19307 self.next_epoch_primary_address.as_ref().map(|field| field as _)
19308 }
19309 pub fn set_next_epoch_primary_address<T: Into<String>>(&mut self, field: T) {
19311 self.next_epoch_primary_address = Some(field.into().into());
19312 }
19313 pub fn with_next_epoch_primary_address<T: Into<String>>(
19315 mut self,
19316 field: T,
19317 ) -> Self {
19318 self.set_next_epoch_primary_address(field.into());
19319 self
19320 }
19321 pub fn next_epoch_worker_address_opt_mut(&mut self) -> Option<&mut String> {
19323 self.next_epoch_worker_address.as_mut().map(|field| field as _)
19324 }
19325 pub fn next_epoch_worker_address_mut(&mut self) -> &mut String {
19328 self.next_epoch_worker_address.get_or_insert_default()
19329 }
19330 pub fn next_epoch_worker_address_opt(&self) -> Option<&str> {
19332 self.next_epoch_worker_address.as_ref().map(|field| field as _)
19333 }
19334 pub fn set_next_epoch_worker_address<T: Into<String>>(&mut self, field: T) {
19336 self.next_epoch_worker_address = Some(field.into().into());
19337 }
19338 pub fn with_next_epoch_worker_address<T: Into<String>>(
19340 mut self,
19341 field: T,
19342 ) -> Self {
19343 self.set_next_epoch_worker_address(field.into());
19344 self
19345 }
19346 pub fn metadata_extra_fields(&self) -> &super::MoveTable {
19348 self.metadata_extra_fields
19349 .as_ref()
19350 .map(|field| field as _)
19351 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
19352 }
19353 pub fn metadata_extra_fields_opt_mut(
19355 &mut self,
19356 ) -> Option<&mut super::MoveTable> {
19357 self.metadata_extra_fields.as_mut().map(|field| field as _)
19358 }
19359 pub fn metadata_extra_fields_mut(&mut self) -> &mut super::MoveTable {
19362 self.metadata_extra_fields.get_or_insert_default()
19363 }
19364 pub fn metadata_extra_fields_opt(&self) -> Option<&super::MoveTable> {
19366 self.metadata_extra_fields.as_ref().map(|field| field as _)
19367 }
19368 pub fn set_metadata_extra_fields<T: Into<super::MoveTable>>(
19370 &mut self,
19371 field: T,
19372 ) {
19373 self.metadata_extra_fields = Some(field.into().into());
19374 }
19375 pub fn with_metadata_extra_fields<T: Into<super::MoveTable>>(
19377 mut self,
19378 field: T,
19379 ) -> Self {
19380 self.set_metadata_extra_fields(field.into());
19381 self
19382 }
19383 pub fn voting_power_opt_mut(&mut self) -> Option<&mut u64> {
19385 self.voting_power.as_mut().map(|field| field as _)
19386 }
19387 pub fn voting_power_mut(&mut self) -> &mut u64 {
19390 self.voting_power.get_or_insert_default()
19391 }
19392 pub fn voting_power_opt(&self) -> Option<u64> {
19394 self.voting_power.as_ref().map(|field| *field)
19395 }
19396 pub fn set_voting_power(&mut self, field: u64) {
19398 self.voting_power = Some(field);
19399 }
19400 pub fn with_voting_power(mut self, field: u64) -> Self {
19402 self.set_voting_power(field);
19403 self
19404 }
19405 pub fn operation_cap_id_opt_mut(&mut self) -> Option<&mut String> {
19407 self.operation_cap_id.as_mut().map(|field| field as _)
19408 }
19409 pub fn operation_cap_id_mut(&mut self) -> &mut String {
19412 self.operation_cap_id.get_or_insert_default()
19413 }
19414 pub fn operation_cap_id_opt(&self) -> Option<&str> {
19416 self.operation_cap_id.as_ref().map(|field| field as _)
19417 }
19418 pub fn set_operation_cap_id<T: Into<String>>(&mut self, field: T) {
19420 self.operation_cap_id = Some(field.into().into());
19421 }
19422 pub fn with_operation_cap_id<T: Into<String>>(mut self, field: T) -> Self {
19424 self.set_operation_cap_id(field.into());
19425 self
19426 }
19427 pub fn gas_price_opt_mut(&mut self) -> Option<&mut u64> {
19429 self.gas_price.as_mut().map(|field| field as _)
19430 }
19431 pub fn gas_price_mut(&mut self) -> &mut u64 {
19434 self.gas_price.get_or_insert_default()
19435 }
19436 pub fn gas_price_opt(&self) -> Option<u64> {
19438 self.gas_price.as_ref().map(|field| *field)
19439 }
19440 pub fn set_gas_price(&mut self, field: u64) {
19442 self.gas_price = Some(field);
19443 }
19444 pub fn with_gas_price(mut self, field: u64) -> Self {
19446 self.set_gas_price(field);
19447 self
19448 }
19449 pub fn staking_pool(&self) -> &super::StakingPool {
19451 self.staking_pool
19452 .as_ref()
19453 .map(|field| field as _)
19454 .unwrap_or_else(|| super::StakingPool::default_instance() as _)
19455 }
19456 pub fn staking_pool_opt_mut(&mut self) -> Option<&mut super::StakingPool> {
19458 self.staking_pool.as_mut().map(|field| field as _)
19459 }
19460 pub fn staking_pool_mut(&mut self) -> &mut super::StakingPool {
19463 self.staking_pool.get_or_insert_default()
19464 }
19465 pub fn staking_pool_opt(&self) -> Option<&super::StakingPool> {
19467 self.staking_pool.as_ref().map(|field| field as _)
19468 }
19469 pub fn set_staking_pool<T: Into<super::StakingPool>>(&mut self, field: T) {
19471 self.staking_pool = Some(field.into().into());
19472 }
19473 pub fn with_staking_pool<T: Into<super::StakingPool>>(
19475 mut self,
19476 field: T,
19477 ) -> Self {
19478 self.set_staking_pool(field.into());
19479 self
19480 }
19481 pub fn commission_rate_opt_mut(&mut self) -> Option<&mut u64> {
19483 self.commission_rate.as_mut().map(|field| field as _)
19484 }
19485 pub fn commission_rate_mut(&mut self) -> &mut u64 {
19488 self.commission_rate.get_or_insert_default()
19489 }
19490 pub fn commission_rate_opt(&self) -> Option<u64> {
19492 self.commission_rate.as_ref().map(|field| *field)
19493 }
19494 pub fn set_commission_rate(&mut self, field: u64) {
19496 self.commission_rate = Some(field);
19497 }
19498 pub fn with_commission_rate(mut self, field: u64) -> Self {
19500 self.set_commission_rate(field);
19501 self
19502 }
19503 pub fn next_epoch_stake_opt_mut(&mut self) -> Option<&mut u64> {
19505 self.next_epoch_stake.as_mut().map(|field| field as _)
19506 }
19507 pub fn next_epoch_stake_mut(&mut self) -> &mut u64 {
19510 self.next_epoch_stake.get_or_insert_default()
19511 }
19512 pub fn next_epoch_stake_opt(&self) -> Option<u64> {
19514 self.next_epoch_stake.as_ref().map(|field| *field)
19515 }
19516 pub fn set_next_epoch_stake(&mut self, field: u64) {
19518 self.next_epoch_stake = Some(field);
19519 }
19520 pub fn with_next_epoch_stake(mut self, field: u64) -> Self {
19522 self.set_next_epoch_stake(field);
19523 self
19524 }
19525 pub fn next_epoch_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
19527 self.next_epoch_gas_price.as_mut().map(|field| field as _)
19528 }
19529 pub fn next_epoch_gas_price_mut(&mut self) -> &mut u64 {
19532 self.next_epoch_gas_price.get_or_insert_default()
19533 }
19534 pub fn next_epoch_gas_price_opt(&self) -> Option<u64> {
19536 self.next_epoch_gas_price.as_ref().map(|field| *field)
19537 }
19538 pub fn set_next_epoch_gas_price(&mut self, field: u64) {
19540 self.next_epoch_gas_price = Some(field);
19541 }
19542 pub fn with_next_epoch_gas_price(mut self, field: u64) -> Self {
19544 self.set_next_epoch_gas_price(field);
19545 self
19546 }
19547 pub fn next_epoch_commission_rate_opt_mut(&mut self) -> Option<&mut u64> {
19549 self.next_epoch_commission_rate.as_mut().map(|field| field as _)
19550 }
19551 pub fn next_epoch_commission_rate_mut(&mut self) -> &mut u64 {
19554 self.next_epoch_commission_rate.get_or_insert_default()
19555 }
19556 pub fn next_epoch_commission_rate_opt(&self) -> Option<u64> {
19558 self.next_epoch_commission_rate.as_ref().map(|field| *field)
19559 }
19560 pub fn set_next_epoch_commission_rate(&mut self, field: u64) {
19562 self.next_epoch_commission_rate = Some(field);
19563 }
19564 pub fn with_next_epoch_commission_rate(mut self, field: u64) -> Self {
19566 self.set_next_epoch_commission_rate(field);
19567 self
19568 }
19569 pub fn extra_fields(&self) -> &super::MoveTable {
19571 self.extra_fields
19572 .as_ref()
19573 .map(|field| field as _)
19574 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
19575 }
19576 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
19578 self.extra_fields.as_mut().map(|field| field as _)
19579 }
19580 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
19583 self.extra_fields.get_or_insert_default()
19584 }
19585 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
19587 self.extra_fields.as_ref().map(|field| field as _)
19588 }
19589 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
19591 self.extra_fields = Some(field.into().into());
19592 }
19593 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
19595 self.set_extra_fields(field.into());
19596 self
19597 }
19598 }
19599 impl super::ValidatorAggregatedSignature {
19600 pub const fn const_default() -> Self {
19601 Self {
19602 epoch: None,
19603 signature: None,
19604 bitmap: None,
19605 }
19606 }
19607 #[doc(hidden)]
19608 pub fn default_instance() -> &'static Self {
19609 static DEFAULT: super::ValidatorAggregatedSignature = super::ValidatorAggregatedSignature::const_default();
19610 &DEFAULT
19611 }
19612 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
19614 self.epoch.as_mut().map(|field| field as _)
19615 }
19616 pub fn epoch_mut(&mut self) -> &mut u64 {
19619 self.epoch.get_or_insert_default()
19620 }
19621 pub fn epoch_opt(&self) -> Option<u64> {
19623 self.epoch.as_ref().map(|field| *field)
19624 }
19625 pub fn set_epoch(&mut self, field: u64) {
19627 self.epoch = Some(field);
19628 }
19629 pub fn with_epoch(mut self, field: u64) -> Self {
19631 self.set_epoch(field);
19632 self
19633 }
19634 pub fn signature_opt(&self) -> Option<&[u8]> {
19636 self.signature.as_ref().map(|field| field as _)
19637 }
19638 pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
19640 self.signature = Some(field.into().into());
19641 }
19642 pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
19644 mut self,
19645 field: T,
19646 ) -> Self {
19647 self.set_signature(field.into());
19648 self
19649 }
19650 pub fn bitmap_opt(&self) -> Option<&[u8]> {
19652 self.bitmap.as_ref().map(|field| field as _)
19653 }
19654 pub fn set_bitmap<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
19656 self.bitmap = Some(field.into().into());
19657 }
19658 pub fn with_bitmap<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
19660 self.set_bitmap(field.into());
19661 self
19662 }
19663 }
19664 impl super::ValidatorCommittee {
19665 pub const fn const_default() -> Self {
19666 Self {
19667 epoch: None,
19668 members: Vec::new(),
19669 }
19670 }
19671 #[doc(hidden)]
19672 pub fn default_instance() -> &'static Self {
19673 static DEFAULT: super::ValidatorCommittee = super::ValidatorCommittee::const_default();
19674 &DEFAULT
19675 }
19676 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
19678 self.epoch.as_mut().map(|field| field as _)
19679 }
19680 pub fn epoch_mut(&mut self) -> &mut u64 {
19683 self.epoch.get_or_insert_default()
19684 }
19685 pub fn epoch_opt(&self) -> Option<u64> {
19687 self.epoch.as_ref().map(|field| *field)
19688 }
19689 pub fn set_epoch(&mut self, field: u64) {
19691 self.epoch = Some(field);
19692 }
19693 pub fn with_epoch(mut self, field: u64) -> Self {
19695 self.set_epoch(field);
19696 self
19697 }
19698 pub fn members(&self) -> &[super::ValidatorCommitteeMember] {
19700 &self.members
19701 }
19702 pub fn members_mut(&mut self) -> &mut Vec<super::ValidatorCommitteeMember> {
19705 &mut self.members
19706 }
19707 pub fn set_members(&mut self, field: Vec<super::ValidatorCommitteeMember>) {
19709 self.members = field;
19710 }
19711 pub fn with_members(
19713 mut self,
19714 field: Vec<super::ValidatorCommitteeMember>,
19715 ) -> Self {
19716 self.set_members(field);
19717 self
19718 }
19719 }
19720 impl super::ValidatorCommitteeMember {
19721 pub const fn const_default() -> Self {
19722 Self {
19723 public_key: None,
19724 weight: None,
19725 }
19726 }
19727 #[doc(hidden)]
19728 pub fn default_instance() -> &'static Self {
19729 static DEFAULT: super::ValidatorCommitteeMember = super::ValidatorCommitteeMember::const_default();
19730 &DEFAULT
19731 }
19732 pub fn public_key_opt(&self) -> Option<&[u8]> {
19734 self.public_key.as_ref().map(|field| field as _)
19735 }
19736 pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
19738 self.public_key = Some(field.into().into());
19739 }
19740 pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
19742 mut self,
19743 field: T,
19744 ) -> Self {
19745 self.set_public_key(field.into());
19746 self
19747 }
19748 pub fn weight_opt_mut(&mut self) -> Option<&mut u64> {
19750 self.weight.as_mut().map(|field| field as _)
19751 }
19752 pub fn weight_mut(&mut self) -> &mut u64 {
19755 self.weight.get_or_insert_default()
19756 }
19757 pub fn weight_opt(&self) -> Option<u64> {
19759 self.weight.as_ref().map(|field| *field)
19760 }
19761 pub fn set_weight(&mut self, field: u64) {
19763 self.weight = Some(field);
19764 }
19765 pub fn with_weight(mut self, field: u64) -> Self {
19767 self.set_weight(field);
19768 self
19769 }
19770 }
19771 impl super::ValidatorExecutionTimeObservation {
19772 pub const fn const_default() -> Self {
19773 Self {
19774 validator: None,
19775 duration: None,
19776 }
19777 }
19778 #[doc(hidden)]
19779 pub fn default_instance() -> &'static Self {
19780 static DEFAULT: super::ValidatorExecutionTimeObservation = super::ValidatorExecutionTimeObservation::const_default();
19781 &DEFAULT
19782 }
19783 pub fn validator_opt(&self) -> Option<&[u8]> {
19785 self.validator.as_ref().map(|field| field as _)
19786 }
19787 pub fn set_validator<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
19789 self.validator = Some(field.into().into());
19790 }
19791 pub fn with_validator<T: Into<::prost::bytes::Bytes>>(
19793 mut self,
19794 field: T,
19795 ) -> Self {
19796 self.set_validator(field.into());
19797 self
19798 }
19799 pub fn duration_opt_mut(&mut self) -> Option<&mut ::prost_types::Duration> {
19801 self.duration.as_mut().map(|field| field as _)
19802 }
19803 pub fn duration_mut(&mut self) -> &mut ::prost_types::Duration {
19806 self.duration.get_or_insert_default()
19807 }
19808 pub fn duration_opt(&self) -> Option<&::prost_types::Duration> {
19810 self.duration.as_ref().map(|field| field as _)
19811 }
19812 pub fn set_duration<T: Into<::prost_types::Duration>>(&mut self, field: T) {
19814 self.duration = Some(field.into().into());
19815 }
19816 pub fn with_duration<T: Into<::prost_types::Duration>>(
19818 mut self,
19819 field: T,
19820 ) -> Self {
19821 self.set_duration(field.into());
19822 self
19823 }
19824 }
19825 impl super::ValidatorReportRecord {
19826 pub const fn const_default() -> Self {
19827 Self {
19828 reported: None,
19829 reporters: Vec::new(),
19830 }
19831 }
19832 #[doc(hidden)]
19833 pub fn default_instance() -> &'static Self {
19834 static DEFAULT: super::ValidatorReportRecord = super::ValidatorReportRecord::const_default();
19835 &DEFAULT
19836 }
19837 pub fn reported_opt_mut(&mut self) -> Option<&mut String> {
19839 self.reported.as_mut().map(|field| field as _)
19840 }
19841 pub fn reported_mut(&mut self) -> &mut String {
19844 self.reported.get_or_insert_default()
19845 }
19846 pub fn reported_opt(&self) -> Option<&str> {
19848 self.reported.as_ref().map(|field| field as _)
19849 }
19850 pub fn set_reported<T: Into<String>>(&mut self, field: T) {
19852 self.reported = Some(field.into().into());
19853 }
19854 pub fn with_reported<T: Into<String>>(mut self, field: T) -> Self {
19856 self.set_reported(field.into());
19857 self
19858 }
19859 pub fn reporters(&self) -> &[String] {
19861 &self.reporters
19862 }
19863 pub fn reporters_mut(&mut self) -> &mut Vec<String> {
19866 &mut self.reporters
19867 }
19868 pub fn set_reporters(&mut self, field: Vec<String>) {
19870 self.reporters = field;
19871 }
19872 pub fn with_reporters(mut self, field: Vec<String>) -> Self {
19874 self.set_reporters(field);
19875 self
19876 }
19877 }
19878 impl super::ValidatorSet {
19879 pub const fn const_default() -> Self {
19880 Self {
19881 total_stake: None,
19882 active_validators: Vec::new(),
19883 pending_active_validators: None,
19884 pending_removals: Vec::new(),
19885 staking_pool_mappings: None,
19886 inactive_validators: None,
19887 validator_candidates: None,
19888 at_risk_validators: std::collections::BTreeMap::new(),
19889 extra_fields: None,
19890 }
19891 }
19892 #[doc(hidden)]
19893 pub fn default_instance() -> &'static Self {
19894 static DEFAULT: super::ValidatorSet = super::ValidatorSet::const_default();
19895 &DEFAULT
19896 }
19897 pub fn total_stake_opt_mut(&mut self) -> Option<&mut u64> {
19899 self.total_stake.as_mut().map(|field| field as _)
19900 }
19901 pub fn total_stake_mut(&mut self) -> &mut u64 {
19904 self.total_stake.get_or_insert_default()
19905 }
19906 pub fn total_stake_opt(&self) -> Option<u64> {
19908 self.total_stake.as_ref().map(|field| *field)
19909 }
19910 pub fn set_total_stake(&mut self, field: u64) {
19912 self.total_stake = Some(field);
19913 }
19914 pub fn with_total_stake(mut self, field: u64) -> Self {
19916 self.set_total_stake(field);
19917 self
19918 }
19919 pub fn active_validators(&self) -> &[super::Validator] {
19921 &self.active_validators
19922 }
19923 pub fn active_validators_mut(&mut self) -> &mut Vec<super::Validator> {
19926 &mut self.active_validators
19927 }
19928 pub fn set_active_validators(&mut self, field: Vec<super::Validator>) {
19930 self.active_validators = field;
19931 }
19932 pub fn with_active_validators(mut self, field: Vec<super::Validator>) -> Self {
19934 self.set_active_validators(field);
19935 self
19936 }
19937 pub fn pending_active_validators(&self) -> &super::MoveTable {
19939 self.pending_active_validators
19940 .as_ref()
19941 .map(|field| field as _)
19942 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
19943 }
19944 pub fn pending_active_validators_opt_mut(
19946 &mut self,
19947 ) -> Option<&mut super::MoveTable> {
19948 self.pending_active_validators.as_mut().map(|field| field as _)
19949 }
19950 pub fn pending_active_validators_mut(&mut self) -> &mut super::MoveTable {
19953 self.pending_active_validators.get_or_insert_default()
19954 }
19955 pub fn pending_active_validators_opt(&self) -> Option<&super::MoveTable> {
19957 self.pending_active_validators.as_ref().map(|field| field as _)
19958 }
19959 pub fn set_pending_active_validators<T: Into<super::MoveTable>>(
19961 &mut self,
19962 field: T,
19963 ) {
19964 self.pending_active_validators = Some(field.into().into());
19965 }
19966 pub fn with_pending_active_validators<T: Into<super::MoveTable>>(
19968 mut self,
19969 field: T,
19970 ) -> Self {
19971 self.set_pending_active_validators(field.into());
19972 self
19973 }
19974 pub fn pending_removals(&self) -> &[u64] {
19976 &self.pending_removals
19977 }
19978 pub fn pending_removals_mut(&mut self) -> &mut Vec<u64> {
19981 &mut self.pending_removals
19982 }
19983 pub fn set_pending_removals(&mut self, field: Vec<u64>) {
19985 self.pending_removals = field;
19986 }
19987 pub fn with_pending_removals(mut self, field: Vec<u64>) -> Self {
19989 self.set_pending_removals(field);
19990 self
19991 }
19992 pub fn staking_pool_mappings(&self) -> &super::MoveTable {
19994 self.staking_pool_mappings
19995 .as_ref()
19996 .map(|field| field as _)
19997 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
19998 }
19999 pub fn staking_pool_mappings_opt_mut(
20001 &mut self,
20002 ) -> Option<&mut super::MoveTable> {
20003 self.staking_pool_mappings.as_mut().map(|field| field as _)
20004 }
20005 pub fn staking_pool_mappings_mut(&mut self) -> &mut super::MoveTable {
20008 self.staking_pool_mappings.get_or_insert_default()
20009 }
20010 pub fn staking_pool_mappings_opt(&self) -> Option<&super::MoveTable> {
20012 self.staking_pool_mappings.as_ref().map(|field| field as _)
20013 }
20014 pub fn set_staking_pool_mappings<T: Into<super::MoveTable>>(
20016 &mut self,
20017 field: T,
20018 ) {
20019 self.staking_pool_mappings = Some(field.into().into());
20020 }
20021 pub fn with_staking_pool_mappings<T: Into<super::MoveTable>>(
20023 mut self,
20024 field: T,
20025 ) -> Self {
20026 self.set_staking_pool_mappings(field.into());
20027 self
20028 }
20029 pub fn inactive_validators(&self) -> &super::MoveTable {
20031 self.inactive_validators
20032 .as_ref()
20033 .map(|field| field as _)
20034 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
20035 }
20036 pub fn inactive_validators_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
20038 self.inactive_validators.as_mut().map(|field| field as _)
20039 }
20040 pub fn inactive_validators_mut(&mut self) -> &mut super::MoveTable {
20043 self.inactive_validators.get_or_insert_default()
20044 }
20045 pub fn inactive_validators_opt(&self) -> Option<&super::MoveTable> {
20047 self.inactive_validators.as_ref().map(|field| field as _)
20048 }
20049 pub fn set_inactive_validators<T: Into<super::MoveTable>>(&mut self, field: T) {
20051 self.inactive_validators = Some(field.into().into());
20052 }
20053 pub fn with_inactive_validators<T: Into<super::MoveTable>>(
20055 mut self,
20056 field: T,
20057 ) -> Self {
20058 self.set_inactive_validators(field.into());
20059 self
20060 }
20061 pub fn validator_candidates(&self) -> &super::MoveTable {
20063 self.validator_candidates
20064 .as_ref()
20065 .map(|field| field as _)
20066 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
20067 }
20068 pub fn validator_candidates_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
20070 self.validator_candidates.as_mut().map(|field| field as _)
20071 }
20072 pub fn validator_candidates_mut(&mut self) -> &mut super::MoveTable {
20075 self.validator_candidates.get_or_insert_default()
20076 }
20077 pub fn validator_candidates_opt(&self) -> Option<&super::MoveTable> {
20079 self.validator_candidates.as_ref().map(|field| field as _)
20080 }
20081 pub fn set_validator_candidates<T: Into<super::MoveTable>>(&mut self, field: T) {
20083 self.validator_candidates = Some(field.into().into());
20084 }
20085 pub fn with_validator_candidates<T: Into<super::MoveTable>>(
20087 mut self,
20088 field: T,
20089 ) -> Self {
20090 self.set_validator_candidates(field.into());
20091 self
20092 }
20093 pub fn at_risk_validators(&self) -> &::std::collections::BTreeMap<String, u64> {
20095 &self.at_risk_validators
20096 }
20097 pub fn at_risk_validators_mut(
20100 &mut self,
20101 ) -> &mut ::std::collections::BTreeMap<String, u64> {
20102 &mut self.at_risk_validators
20103 }
20104 pub fn set_at_risk_validators(
20106 &mut self,
20107 field: ::std::collections::BTreeMap<String, u64>,
20108 ) {
20109 self.at_risk_validators = field;
20110 }
20111 pub fn with_at_risk_validators(
20113 mut self,
20114 field: ::std::collections::BTreeMap<String, u64>,
20115 ) -> Self {
20116 self.set_at_risk_validators(field);
20117 self
20118 }
20119 pub fn extra_fields(&self) -> &super::MoveTable {
20121 self.extra_fields
20122 .as_ref()
20123 .map(|field| field as _)
20124 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
20125 }
20126 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
20128 self.extra_fields.as_mut().map(|field| field as _)
20129 }
20130 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
20133 self.extra_fields.get_or_insert_default()
20134 }
20135 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
20137 self.extra_fields.as_ref().map(|field| field as _)
20138 }
20139 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
20141 self.extra_fields = Some(field.into().into());
20142 }
20143 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
20145 self.set_extra_fields(field.into());
20146 self
20147 }
20148 }
20149 impl super::VariantDescriptor {
20150 pub const fn const_default() -> Self {
20151 Self {
20152 name: None,
20153 position: None,
20154 fields: Vec::new(),
20155 }
20156 }
20157 #[doc(hidden)]
20158 pub fn default_instance() -> &'static Self {
20159 static DEFAULT: super::VariantDescriptor = super::VariantDescriptor::const_default();
20160 &DEFAULT
20161 }
20162 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
20164 self.name.as_mut().map(|field| field as _)
20165 }
20166 pub fn name_mut(&mut self) -> &mut String {
20169 self.name.get_or_insert_default()
20170 }
20171 pub fn name_opt(&self) -> Option<&str> {
20173 self.name.as_ref().map(|field| field as _)
20174 }
20175 pub fn set_name<T: Into<String>>(&mut self, field: T) {
20177 self.name = Some(field.into().into());
20178 }
20179 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
20181 self.set_name(field.into());
20182 self
20183 }
20184 pub fn position_opt_mut(&mut self) -> Option<&mut u32> {
20186 self.position.as_mut().map(|field| field as _)
20187 }
20188 pub fn position_mut(&mut self) -> &mut u32 {
20191 self.position.get_or_insert_default()
20192 }
20193 pub fn position_opt(&self) -> Option<u32> {
20195 self.position.as_ref().map(|field| *field)
20196 }
20197 pub fn set_position(&mut self, field: u32) {
20199 self.position = Some(field);
20200 }
20201 pub fn with_position(mut self, field: u32) -> Self {
20203 self.set_position(field);
20204 self
20205 }
20206 pub fn fields(&self) -> &[super::FieldDescriptor] {
20208 &self.fields
20209 }
20210 pub fn fields_mut(&mut self) -> &mut Vec<super::FieldDescriptor> {
20213 &mut self.fields
20214 }
20215 pub fn set_fields(&mut self, field: Vec<super::FieldDescriptor>) {
20217 self.fields = field;
20218 }
20219 pub fn with_fields(mut self, field: Vec<super::FieldDescriptor>) -> Self {
20221 self.set_fields(field);
20222 self
20223 }
20224 }
20225 impl super::VerifySignatureRequest {
20226 pub const fn const_default() -> Self {
20227 Self {
20228 message: None,
20229 signature: None,
20230 address: None,
20231 jwks: Vec::new(),
20232 }
20233 }
20234 #[doc(hidden)]
20235 pub fn default_instance() -> &'static Self {
20236 static DEFAULT: super::VerifySignatureRequest = super::VerifySignatureRequest::const_default();
20237 &DEFAULT
20238 }
20239 pub fn message(&self) -> &super::Bcs {
20241 self.message
20242 .as_ref()
20243 .map(|field| field as _)
20244 .unwrap_or_else(|| super::Bcs::default_instance() as _)
20245 }
20246 pub fn message_opt_mut(&mut self) -> Option<&mut super::Bcs> {
20248 self.message.as_mut().map(|field| field as _)
20249 }
20250 pub fn message_mut(&mut self) -> &mut super::Bcs {
20253 self.message.get_or_insert_default()
20254 }
20255 pub fn message_opt(&self) -> Option<&super::Bcs> {
20257 self.message.as_ref().map(|field| field as _)
20258 }
20259 pub fn set_message<T: Into<super::Bcs>>(&mut self, field: T) {
20261 self.message = Some(field.into().into());
20262 }
20263 pub fn with_message<T: Into<super::Bcs>>(mut self, field: T) -> Self {
20265 self.set_message(field.into());
20266 self
20267 }
20268 pub fn signature(&self) -> &super::UserSignature {
20270 self.signature
20271 .as_ref()
20272 .map(|field| field as _)
20273 .unwrap_or_else(|| super::UserSignature::default_instance() as _)
20274 }
20275 pub fn signature_opt_mut(&mut self) -> Option<&mut super::UserSignature> {
20277 self.signature.as_mut().map(|field| field as _)
20278 }
20279 pub fn signature_mut(&mut self) -> &mut super::UserSignature {
20282 self.signature.get_or_insert_default()
20283 }
20284 pub fn signature_opt(&self) -> Option<&super::UserSignature> {
20286 self.signature.as_ref().map(|field| field as _)
20287 }
20288 pub fn set_signature<T: Into<super::UserSignature>>(&mut self, field: T) {
20290 self.signature = Some(field.into().into());
20291 }
20292 pub fn with_signature<T: Into<super::UserSignature>>(
20294 mut self,
20295 field: T,
20296 ) -> Self {
20297 self.set_signature(field.into());
20298 self
20299 }
20300 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
20302 self.address.as_mut().map(|field| field as _)
20303 }
20304 pub fn address_mut(&mut self) -> &mut String {
20307 self.address.get_or_insert_default()
20308 }
20309 pub fn address_opt(&self) -> Option<&str> {
20311 self.address.as_ref().map(|field| field as _)
20312 }
20313 pub fn set_address<T: Into<String>>(&mut self, field: T) {
20315 self.address = Some(field.into().into());
20316 }
20317 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
20319 self.set_address(field.into());
20320 self
20321 }
20322 pub fn jwks(&self) -> &[super::ActiveJwk] {
20324 &self.jwks
20325 }
20326 pub fn jwks_mut(&mut self) -> &mut Vec<super::ActiveJwk> {
20329 &mut self.jwks
20330 }
20331 pub fn set_jwks(&mut self, field: Vec<super::ActiveJwk>) {
20333 self.jwks = field;
20334 }
20335 pub fn with_jwks(mut self, field: Vec<super::ActiveJwk>) -> Self {
20337 self.set_jwks(field);
20338 self
20339 }
20340 }
20341 impl super::VerifySignatureResponse {
20342 pub const fn const_default() -> Self {
20343 Self {
20344 is_valid: None,
20345 reason: None,
20346 }
20347 }
20348 #[doc(hidden)]
20349 pub fn default_instance() -> &'static Self {
20350 static DEFAULT: super::VerifySignatureResponse = super::VerifySignatureResponse::const_default();
20351 &DEFAULT
20352 }
20353 pub fn is_valid_opt_mut(&mut self) -> Option<&mut bool> {
20355 self.is_valid.as_mut().map(|field| field as _)
20356 }
20357 pub fn is_valid_mut(&mut self) -> &mut bool {
20360 self.is_valid.get_or_insert_default()
20361 }
20362 pub fn is_valid_opt(&self) -> Option<bool> {
20364 self.is_valid.as_ref().map(|field| *field)
20365 }
20366 pub fn set_is_valid(&mut self, field: bool) {
20368 self.is_valid = Some(field);
20369 }
20370 pub fn with_is_valid(mut self, field: bool) -> Self {
20372 self.set_is_valid(field);
20373 self
20374 }
20375 pub fn reason_opt_mut(&mut self) -> Option<&mut String> {
20377 self.reason.as_mut().map(|field| field as _)
20378 }
20379 pub fn reason_mut(&mut self) -> &mut String {
20382 self.reason.get_or_insert_default()
20383 }
20384 pub fn reason_opt(&self) -> Option<&str> {
20386 self.reason.as_ref().map(|field| field as _)
20387 }
20388 pub fn set_reason<T: Into<String>>(&mut self, field: T) {
20390 self.reason = Some(field.into().into());
20391 }
20392 pub fn with_reason<T: Into<String>>(mut self, field: T) -> Self {
20394 self.set_reason(field.into());
20395 self
20396 }
20397 }
20398 impl super::VersionAssignment {
20399 pub const fn const_default() -> Self {
20400 Self {
20401 object_id: None,
20402 start_version: None,
20403 version: None,
20404 }
20405 }
20406 #[doc(hidden)]
20407 pub fn default_instance() -> &'static Self {
20408 static DEFAULT: super::VersionAssignment = super::VersionAssignment::const_default();
20409 &DEFAULT
20410 }
20411 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
20413 self.object_id.as_mut().map(|field| field as _)
20414 }
20415 pub fn object_id_mut(&mut self) -> &mut String {
20418 self.object_id.get_or_insert_default()
20419 }
20420 pub fn object_id_opt(&self) -> Option<&str> {
20422 self.object_id.as_ref().map(|field| field as _)
20423 }
20424 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
20426 self.object_id = Some(field.into().into());
20427 }
20428 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
20430 self.set_object_id(field.into());
20431 self
20432 }
20433 pub fn start_version_opt_mut(&mut self) -> Option<&mut u64> {
20435 self.start_version.as_mut().map(|field| field as _)
20436 }
20437 pub fn start_version_mut(&mut self) -> &mut u64 {
20440 self.start_version.get_or_insert_default()
20441 }
20442 pub fn start_version_opt(&self) -> Option<u64> {
20444 self.start_version.as_ref().map(|field| *field)
20445 }
20446 pub fn set_start_version(&mut self, field: u64) {
20448 self.start_version = Some(field);
20449 }
20450 pub fn with_start_version(mut self, field: u64) -> Self {
20452 self.set_start_version(field);
20453 self
20454 }
20455 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
20457 self.version.as_mut().map(|field| field as _)
20458 }
20459 pub fn version_mut(&mut self) -> &mut u64 {
20462 self.version.get_or_insert_default()
20463 }
20464 pub fn version_opt(&self) -> Option<u64> {
20466 self.version.as_ref().map(|field| *field)
20467 }
20468 pub fn set_version(&mut self, field: u64) {
20470 self.version = Some(field);
20471 }
20472 pub fn with_version(mut self, field: u64) -> Self {
20474 self.set_version(field);
20475 self
20476 }
20477 }
20478 impl super::Watermark {
20479 pub const fn const_default() -> Self {
20480 Self {
20481 cursor: None,
20482 checkpoint: None,
20483 }
20484 }
20485 #[doc(hidden)]
20486 pub fn default_instance() -> &'static Self {
20487 static DEFAULT: super::Watermark = super::Watermark::const_default();
20488 &DEFAULT
20489 }
20490 pub fn cursor_opt(&self) -> Option<&[u8]> {
20492 self.cursor.as_ref().map(|field| field as _)
20493 }
20494 pub fn set_cursor<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
20496 self.cursor = Some(field.into().into());
20497 }
20498 pub fn with_cursor<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
20500 self.set_cursor(field.into());
20501 self
20502 }
20503 pub fn checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
20505 self.checkpoint.as_mut().map(|field| field as _)
20506 }
20507 pub fn checkpoint_mut(&mut self) -> &mut u64 {
20510 self.checkpoint.get_or_insert_default()
20511 }
20512 pub fn checkpoint_opt(&self) -> Option<u64> {
20514 self.checkpoint.as_ref().map(|field| *field)
20515 }
20516 pub fn set_checkpoint(&mut self, field: u64) {
20518 self.checkpoint = Some(field);
20519 }
20520 pub fn with_checkpoint(mut self, field: u64) -> Self {
20522 self.set_checkpoint(field);
20523 self
20524 }
20525 }
20526 impl super::ZkLoginAuthenticator {
20527 pub const fn const_default() -> Self {
20528 Self {
20529 inputs: None,
20530 max_epoch: None,
20531 signature: None,
20532 public_identifier: None,
20533 jwk_id: None,
20534 }
20535 }
20536 #[doc(hidden)]
20537 pub fn default_instance() -> &'static Self {
20538 static DEFAULT: super::ZkLoginAuthenticator = super::ZkLoginAuthenticator::const_default();
20539 &DEFAULT
20540 }
20541 pub fn inputs(&self) -> &super::ZkLoginInputs {
20543 self.inputs
20544 .as_ref()
20545 .map(|field| field as _)
20546 .unwrap_or_else(|| super::ZkLoginInputs::default_instance() as _)
20547 }
20548 pub fn inputs_opt_mut(&mut self) -> Option<&mut super::ZkLoginInputs> {
20550 self.inputs.as_mut().map(|field| field as _)
20551 }
20552 pub fn inputs_mut(&mut self) -> &mut super::ZkLoginInputs {
20555 self.inputs.get_or_insert_default()
20556 }
20557 pub fn inputs_opt(&self) -> Option<&super::ZkLoginInputs> {
20559 self.inputs.as_ref().map(|field| field as _)
20560 }
20561 pub fn set_inputs<T: Into<super::ZkLoginInputs>>(&mut self, field: T) {
20563 self.inputs = Some(field.into().into());
20564 }
20565 pub fn with_inputs<T: Into<super::ZkLoginInputs>>(mut self, field: T) -> Self {
20567 self.set_inputs(field.into());
20568 self
20569 }
20570 pub fn max_epoch_opt_mut(&mut self) -> Option<&mut u64> {
20572 self.max_epoch.as_mut().map(|field| field as _)
20573 }
20574 pub fn max_epoch_mut(&mut self) -> &mut u64 {
20577 self.max_epoch.get_or_insert_default()
20578 }
20579 pub fn max_epoch_opt(&self) -> Option<u64> {
20581 self.max_epoch.as_ref().map(|field| *field)
20582 }
20583 pub fn set_max_epoch(&mut self, field: u64) {
20585 self.max_epoch = Some(field);
20586 }
20587 pub fn with_max_epoch(mut self, field: u64) -> Self {
20589 self.set_max_epoch(field);
20590 self
20591 }
20592 pub fn signature(&self) -> &super::SimpleSignature {
20594 self.signature
20595 .as_ref()
20596 .map(|field| field as _)
20597 .unwrap_or_else(|| super::SimpleSignature::default_instance() as _)
20598 }
20599 pub fn signature_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
20601 self.signature.as_mut().map(|field| field as _)
20602 }
20603 pub fn signature_mut(&mut self) -> &mut super::SimpleSignature {
20606 self.signature.get_or_insert_default()
20607 }
20608 pub fn signature_opt(&self) -> Option<&super::SimpleSignature> {
20610 self.signature.as_ref().map(|field| field as _)
20611 }
20612 pub fn set_signature<T: Into<super::SimpleSignature>>(&mut self, field: T) {
20614 self.signature = Some(field.into().into());
20615 }
20616 pub fn with_signature<T: Into<super::SimpleSignature>>(
20618 mut self,
20619 field: T,
20620 ) -> Self {
20621 self.set_signature(field.into());
20622 self
20623 }
20624 pub fn public_identifier(&self) -> &super::ZkLoginPublicIdentifier {
20626 self.public_identifier
20627 .as_ref()
20628 .map(|field| field as _)
20629 .unwrap_or_else(|| {
20630 super::ZkLoginPublicIdentifier::default_instance() as _
20631 })
20632 }
20633 pub fn public_identifier_opt_mut(
20635 &mut self,
20636 ) -> Option<&mut super::ZkLoginPublicIdentifier> {
20637 self.public_identifier.as_mut().map(|field| field as _)
20638 }
20639 pub fn public_identifier_mut(&mut self) -> &mut super::ZkLoginPublicIdentifier {
20642 self.public_identifier.get_or_insert_default()
20643 }
20644 pub fn public_identifier_opt(&self) -> Option<&super::ZkLoginPublicIdentifier> {
20646 self.public_identifier.as_ref().map(|field| field as _)
20647 }
20648 pub fn set_public_identifier<T: Into<super::ZkLoginPublicIdentifier>>(
20650 &mut self,
20651 field: T,
20652 ) {
20653 self.public_identifier = Some(field.into().into());
20654 }
20655 pub fn with_public_identifier<T: Into<super::ZkLoginPublicIdentifier>>(
20657 mut self,
20658 field: T,
20659 ) -> Self {
20660 self.set_public_identifier(field.into());
20661 self
20662 }
20663 pub fn jwk_id(&self) -> &super::JwkId {
20665 self.jwk_id
20666 .as_ref()
20667 .map(|field| field as _)
20668 .unwrap_or_else(|| super::JwkId::default_instance() as _)
20669 }
20670 pub fn jwk_id_opt_mut(&mut self) -> Option<&mut super::JwkId> {
20672 self.jwk_id.as_mut().map(|field| field as _)
20673 }
20674 pub fn jwk_id_mut(&mut self) -> &mut super::JwkId {
20677 self.jwk_id.get_or_insert_default()
20678 }
20679 pub fn jwk_id_opt(&self) -> Option<&super::JwkId> {
20681 self.jwk_id.as_ref().map(|field| field as _)
20682 }
20683 pub fn set_jwk_id<T: Into<super::JwkId>>(&mut self, field: T) {
20685 self.jwk_id = Some(field.into().into());
20686 }
20687 pub fn with_jwk_id<T: Into<super::JwkId>>(mut self, field: T) -> Self {
20689 self.set_jwk_id(field.into());
20690 self
20691 }
20692 }
20693 impl super::ZkLoginClaim {
20694 pub const fn const_default() -> Self {
20695 Self {
20696 value: None,
20697 index_mod_4: None,
20698 }
20699 }
20700 #[doc(hidden)]
20701 pub fn default_instance() -> &'static Self {
20702 static DEFAULT: super::ZkLoginClaim = super::ZkLoginClaim::const_default();
20703 &DEFAULT
20704 }
20705 pub fn value_opt_mut(&mut self) -> Option<&mut String> {
20707 self.value.as_mut().map(|field| field as _)
20708 }
20709 pub fn value_mut(&mut self) -> &mut String {
20712 self.value.get_or_insert_default()
20713 }
20714 pub fn value_opt(&self) -> Option<&str> {
20716 self.value.as_ref().map(|field| field as _)
20717 }
20718 pub fn set_value<T: Into<String>>(&mut self, field: T) {
20720 self.value = Some(field.into().into());
20721 }
20722 pub fn with_value<T: Into<String>>(mut self, field: T) -> Self {
20724 self.set_value(field.into());
20725 self
20726 }
20727 pub fn index_mod_4_opt_mut(&mut self) -> Option<&mut u32> {
20729 self.index_mod_4.as_mut().map(|field| field as _)
20730 }
20731 pub fn index_mod_4_mut(&mut self) -> &mut u32 {
20734 self.index_mod_4.get_or_insert_default()
20735 }
20736 pub fn index_mod_4_opt(&self) -> Option<u32> {
20738 self.index_mod_4.as_ref().map(|field| *field)
20739 }
20740 pub fn set_index_mod_4(&mut self, field: u32) {
20742 self.index_mod_4 = Some(field);
20743 }
20744 pub fn with_index_mod_4(mut self, field: u32) -> Self {
20746 self.set_index_mod_4(field);
20747 self
20748 }
20749 }
20750 impl super::ZkLoginInputs {
20751 pub const fn const_default() -> Self {
20752 Self {
20753 proof_points: None,
20754 iss_base64_details: None,
20755 header_base64: None,
20756 address_seed: None,
20757 }
20758 }
20759 #[doc(hidden)]
20760 pub fn default_instance() -> &'static Self {
20761 static DEFAULT: super::ZkLoginInputs = super::ZkLoginInputs::const_default();
20762 &DEFAULT
20763 }
20764 pub fn proof_points(&self) -> &super::ZkLoginProof {
20766 self.proof_points
20767 .as_ref()
20768 .map(|field| field as _)
20769 .unwrap_or_else(|| super::ZkLoginProof::default_instance() as _)
20770 }
20771 pub fn proof_points_opt_mut(&mut self) -> Option<&mut super::ZkLoginProof> {
20773 self.proof_points.as_mut().map(|field| field as _)
20774 }
20775 pub fn proof_points_mut(&mut self) -> &mut super::ZkLoginProof {
20778 self.proof_points.get_or_insert_default()
20779 }
20780 pub fn proof_points_opt(&self) -> Option<&super::ZkLoginProof> {
20782 self.proof_points.as_ref().map(|field| field as _)
20783 }
20784 pub fn set_proof_points<T: Into<super::ZkLoginProof>>(&mut self, field: T) {
20786 self.proof_points = Some(field.into().into());
20787 }
20788 pub fn with_proof_points<T: Into<super::ZkLoginProof>>(
20790 mut self,
20791 field: T,
20792 ) -> Self {
20793 self.set_proof_points(field.into());
20794 self
20795 }
20796 pub fn iss_base64_details(&self) -> &super::ZkLoginClaim {
20798 self.iss_base64_details
20799 .as_ref()
20800 .map(|field| field as _)
20801 .unwrap_or_else(|| super::ZkLoginClaim::default_instance() as _)
20802 }
20803 pub fn iss_base64_details_opt_mut(
20805 &mut self,
20806 ) -> Option<&mut super::ZkLoginClaim> {
20807 self.iss_base64_details.as_mut().map(|field| field as _)
20808 }
20809 pub fn iss_base64_details_mut(&mut self) -> &mut super::ZkLoginClaim {
20812 self.iss_base64_details.get_or_insert_default()
20813 }
20814 pub fn iss_base64_details_opt(&self) -> Option<&super::ZkLoginClaim> {
20816 self.iss_base64_details.as_ref().map(|field| field as _)
20817 }
20818 pub fn set_iss_base64_details<T: Into<super::ZkLoginClaim>>(
20820 &mut self,
20821 field: T,
20822 ) {
20823 self.iss_base64_details = Some(field.into().into());
20824 }
20825 pub fn with_iss_base64_details<T: Into<super::ZkLoginClaim>>(
20827 mut self,
20828 field: T,
20829 ) -> Self {
20830 self.set_iss_base64_details(field.into());
20831 self
20832 }
20833 pub fn header_base64_opt_mut(&mut self) -> Option<&mut String> {
20835 self.header_base64.as_mut().map(|field| field as _)
20836 }
20837 pub fn header_base64_mut(&mut self) -> &mut String {
20840 self.header_base64.get_or_insert_default()
20841 }
20842 pub fn header_base64_opt(&self) -> Option<&str> {
20844 self.header_base64.as_ref().map(|field| field as _)
20845 }
20846 pub fn set_header_base64<T: Into<String>>(&mut self, field: T) {
20848 self.header_base64 = Some(field.into().into());
20849 }
20850 pub fn with_header_base64<T: Into<String>>(mut self, field: T) -> Self {
20852 self.set_header_base64(field.into());
20853 self
20854 }
20855 pub fn address_seed_opt_mut(&mut self) -> Option<&mut String> {
20857 self.address_seed.as_mut().map(|field| field as _)
20858 }
20859 pub fn address_seed_mut(&mut self) -> &mut String {
20862 self.address_seed.get_or_insert_default()
20863 }
20864 pub fn address_seed_opt(&self) -> Option<&str> {
20866 self.address_seed.as_ref().map(|field| field as _)
20867 }
20868 pub fn set_address_seed<T: Into<String>>(&mut self, field: T) {
20870 self.address_seed = Some(field.into().into());
20871 }
20872 pub fn with_address_seed<T: Into<String>>(mut self, field: T) -> Self {
20874 self.set_address_seed(field.into());
20875 self
20876 }
20877 }
20878 impl super::ZkLoginProof {
20879 pub const fn const_default() -> Self {
20880 Self { a: None, b: None, c: None }
20881 }
20882 #[doc(hidden)]
20883 pub fn default_instance() -> &'static Self {
20884 static DEFAULT: super::ZkLoginProof = super::ZkLoginProof::const_default();
20885 &DEFAULT
20886 }
20887 pub fn a(&self) -> &super::CircomG1 {
20889 self.a
20890 .as_ref()
20891 .map(|field| field as _)
20892 .unwrap_or_else(|| super::CircomG1::default_instance() as _)
20893 }
20894 pub fn a_opt_mut(&mut self) -> Option<&mut super::CircomG1> {
20896 self.a.as_mut().map(|field| field as _)
20897 }
20898 pub fn a_mut(&mut self) -> &mut super::CircomG1 {
20901 self.a.get_or_insert_default()
20902 }
20903 pub fn a_opt(&self) -> Option<&super::CircomG1> {
20905 self.a.as_ref().map(|field| field as _)
20906 }
20907 pub fn set_a<T: Into<super::CircomG1>>(&mut self, field: T) {
20909 self.a = Some(field.into().into());
20910 }
20911 pub fn with_a<T: Into<super::CircomG1>>(mut self, field: T) -> Self {
20913 self.set_a(field.into());
20914 self
20915 }
20916 pub fn b(&self) -> &super::CircomG2 {
20918 self.b
20919 .as_ref()
20920 .map(|field| field as _)
20921 .unwrap_or_else(|| super::CircomG2::default_instance() as _)
20922 }
20923 pub fn b_opt_mut(&mut self) -> Option<&mut super::CircomG2> {
20925 self.b.as_mut().map(|field| field as _)
20926 }
20927 pub fn b_mut(&mut self) -> &mut super::CircomG2 {
20930 self.b.get_or_insert_default()
20931 }
20932 pub fn b_opt(&self) -> Option<&super::CircomG2> {
20934 self.b.as_ref().map(|field| field as _)
20935 }
20936 pub fn set_b<T: Into<super::CircomG2>>(&mut self, field: T) {
20938 self.b = Some(field.into().into());
20939 }
20940 pub fn with_b<T: Into<super::CircomG2>>(mut self, field: T) -> Self {
20942 self.set_b(field.into());
20943 self
20944 }
20945 pub fn c(&self) -> &super::CircomG1 {
20947 self.c
20948 .as_ref()
20949 .map(|field| field as _)
20950 .unwrap_or_else(|| super::CircomG1::default_instance() as _)
20951 }
20952 pub fn c_opt_mut(&mut self) -> Option<&mut super::CircomG1> {
20954 self.c.as_mut().map(|field| field as _)
20955 }
20956 pub fn c_mut(&mut self) -> &mut super::CircomG1 {
20959 self.c.get_or_insert_default()
20960 }
20961 pub fn c_opt(&self) -> Option<&super::CircomG1> {
20963 self.c.as_ref().map(|field| field as _)
20964 }
20965 pub fn set_c<T: Into<super::CircomG1>>(&mut self, field: T) {
20967 self.c = Some(field.into().into());
20968 }
20969 pub fn with_c<T: Into<super::CircomG1>>(mut self, field: T) -> Self {
20971 self.set_c(field.into());
20972 self
20973 }
20974 }
20975 impl super::ZkLoginPublicIdentifier {
20976 pub const fn const_default() -> Self {
20977 Self {
20978 iss: None,
20979 address_seed: None,
20980 }
20981 }
20982 #[doc(hidden)]
20983 pub fn default_instance() -> &'static Self {
20984 static DEFAULT: super::ZkLoginPublicIdentifier = super::ZkLoginPublicIdentifier::const_default();
20985 &DEFAULT
20986 }
20987 pub fn iss_opt_mut(&mut self) -> Option<&mut String> {
20989 self.iss.as_mut().map(|field| field as _)
20990 }
20991 pub fn iss_mut(&mut self) -> &mut String {
20994 self.iss.get_or_insert_default()
20995 }
20996 pub fn iss_opt(&self) -> Option<&str> {
20998 self.iss.as_ref().map(|field| field as _)
20999 }
21000 pub fn set_iss<T: Into<String>>(&mut self, field: T) {
21002 self.iss = Some(field.into().into());
21003 }
21004 pub fn with_iss<T: Into<String>>(mut self, field: T) -> Self {
21006 self.set_iss(field.into());
21007 self
21008 }
21009 pub fn address_seed_opt_mut(&mut self) -> Option<&mut String> {
21011 self.address_seed.as_mut().map(|field| field as _)
21012 }
21013 pub fn address_seed_mut(&mut self) -> &mut String {
21016 self.address_seed.get_or_insert_default()
21017 }
21018 pub fn address_seed_opt(&self) -> Option<&str> {
21020 self.address_seed.as_ref().map(|field| field as _)
21021 }
21022 pub fn set_address_seed<T: Into<String>>(&mut self, field: T) {
21024 self.address_seed = Some(field.into().into());
21025 }
21026 pub fn with_address_seed<T: Into<String>>(mut self, field: T) -> Self {
21028 self.set_address_seed(field.into());
21029 self
21030 }
21031 }
21032}