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 transaction_start_inclusive: None,
5022 transaction_end_exclusive: None,
5023 ended_in_safe_mode: None,
5024 system_epoch_info: None,
5025 epoch_commitments: Vec::new(),
5026 }
5027 }
5028 #[doc(hidden)]
5029 pub fn default_instance() -> &'static Self {
5030 static DEFAULT: super::Epoch = super::Epoch::const_default();
5031 &DEFAULT
5032 }
5033 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
5035 self.epoch.as_mut().map(|field| field as _)
5036 }
5037 pub fn epoch_mut(&mut self) -> &mut u64 {
5040 self.epoch.get_or_insert_default()
5041 }
5042 pub fn epoch_opt(&self) -> Option<u64> {
5044 self.epoch.as_ref().map(|field| *field)
5045 }
5046 pub fn set_epoch(&mut self, field: u64) {
5048 self.epoch = Some(field);
5049 }
5050 pub fn with_epoch(mut self, field: u64) -> Self {
5052 self.set_epoch(field);
5053 self
5054 }
5055 pub fn committee(&self) -> &super::ValidatorCommittee {
5057 self.committee
5058 .as_ref()
5059 .map(|field| field as _)
5060 .unwrap_or_else(|| super::ValidatorCommittee::default_instance() as _)
5061 }
5062 pub fn committee_opt_mut(&mut self) -> Option<&mut super::ValidatorCommittee> {
5064 self.committee.as_mut().map(|field| field as _)
5065 }
5066 pub fn committee_mut(&mut self) -> &mut super::ValidatorCommittee {
5069 self.committee.get_or_insert_default()
5070 }
5071 pub fn committee_opt(&self) -> Option<&super::ValidatorCommittee> {
5073 self.committee.as_ref().map(|field| field as _)
5074 }
5075 pub fn set_committee<T: Into<super::ValidatorCommittee>>(&mut self, field: T) {
5077 self.committee = Some(field.into().into());
5078 }
5079 pub fn with_committee<T: Into<super::ValidatorCommittee>>(
5081 mut self,
5082 field: T,
5083 ) -> Self {
5084 self.set_committee(field.into());
5085 self
5086 }
5087 pub fn system_state(&self) -> &super::SystemState {
5089 self.system_state
5090 .as_ref()
5091 .map(|field| field as _)
5092 .unwrap_or_else(|| super::SystemState::default_instance() as _)
5093 }
5094 pub fn system_state_opt_mut(&mut self) -> Option<&mut super::SystemState> {
5096 self.system_state.as_mut().map(|field| field as _)
5097 }
5098 pub fn system_state_mut(&mut self) -> &mut super::SystemState {
5101 self.system_state.get_or_insert_default()
5102 }
5103 pub fn system_state_opt(&self) -> Option<&super::SystemState> {
5105 self.system_state.as_ref().map(|field| field as _)
5106 }
5107 pub fn set_system_state<T: Into<super::SystemState>>(&mut self, field: T) {
5109 self.system_state = Some(field.into().into());
5110 }
5111 pub fn with_system_state<T: Into<super::SystemState>>(
5113 mut self,
5114 field: T,
5115 ) -> Self {
5116 self.set_system_state(field.into());
5117 self
5118 }
5119 pub fn first_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
5121 self.first_checkpoint.as_mut().map(|field| field as _)
5122 }
5123 pub fn first_checkpoint_mut(&mut self) -> &mut u64 {
5126 self.first_checkpoint.get_or_insert_default()
5127 }
5128 pub fn first_checkpoint_opt(&self) -> Option<u64> {
5130 self.first_checkpoint.as_ref().map(|field| *field)
5131 }
5132 pub fn set_first_checkpoint(&mut self, field: u64) {
5134 self.first_checkpoint = Some(field);
5135 }
5136 pub fn with_first_checkpoint(mut self, field: u64) -> Self {
5138 self.set_first_checkpoint(field);
5139 self
5140 }
5141 pub fn last_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
5143 self.last_checkpoint.as_mut().map(|field| field as _)
5144 }
5145 pub fn last_checkpoint_mut(&mut self) -> &mut u64 {
5148 self.last_checkpoint.get_or_insert_default()
5149 }
5150 pub fn last_checkpoint_opt(&self) -> Option<u64> {
5152 self.last_checkpoint.as_ref().map(|field| *field)
5153 }
5154 pub fn set_last_checkpoint(&mut self, field: u64) {
5156 self.last_checkpoint = Some(field);
5157 }
5158 pub fn with_last_checkpoint(mut self, field: u64) -> Self {
5160 self.set_last_checkpoint(field);
5161 self
5162 }
5163 pub fn start_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
5165 self.start.as_mut().map(|field| field as _)
5166 }
5167 pub fn start_mut(&mut self) -> &mut ::prost_types::Timestamp {
5170 self.start.get_or_insert_default()
5171 }
5172 pub fn start_opt(&self) -> Option<&::prost_types::Timestamp> {
5174 self.start.as_ref().map(|field| field as _)
5175 }
5176 pub fn set_start<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
5178 self.start = Some(field.into().into());
5179 }
5180 pub fn with_start<T: Into<::prost_types::Timestamp>>(
5182 mut self,
5183 field: T,
5184 ) -> Self {
5185 self.set_start(field.into());
5186 self
5187 }
5188 pub fn end_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
5190 self.end.as_mut().map(|field| field as _)
5191 }
5192 pub fn end_mut(&mut self) -> &mut ::prost_types::Timestamp {
5195 self.end.get_or_insert_default()
5196 }
5197 pub fn end_opt(&self) -> Option<&::prost_types::Timestamp> {
5199 self.end.as_ref().map(|field| field as _)
5200 }
5201 pub fn set_end<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
5203 self.end = Some(field.into().into());
5204 }
5205 pub fn with_end<T: Into<::prost_types::Timestamp>>(mut self, field: T) -> Self {
5207 self.set_end(field.into());
5208 self
5209 }
5210 pub fn reference_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
5212 self.reference_gas_price.as_mut().map(|field| field as _)
5213 }
5214 pub fn reference_gas_price_mut(&mut self) -> &mut u64 {
5217 self.reference_gas_price.get_or_insert_default()
5218 }
5219 pub fn reference_gas_price_opt(&self) -> Option<u64> {
5221 self.reference_gas_price.as_ref().map(|field| *field)
5222 }
5223 pub fn set_reference_gas_price(&mut self, field: u64) {
5225 self.reference_gas_price = Some(field);
5226 }
5227 pub fn with_reference_gas_price(mut self, field: u64) -> Self {
5229 self.set_reference_gas_price(field);
5230 self
5231 }
5232 pub fn protocol_config(&self) -> &super::ProtocolConfig {
5234 self.protocol_config
5235 .as_ref()
5236 .map(|field| field as _)
5237 .unwrap_or_else(|| super::ProtocolConfig::default_instance() as _)
5238 }
5239 pub fn protocol_config_opt_mut(&mut self) -> Option<&mut super::ProtocolConfig> {
5241 self.protocol_config.as_mut().map(|field| field as _)
5242 }
5243 pub fn protocol_config_mut(&mut self) -> &mut super::ProtocolConfig {
5246 self.protocol_config.get_or_insert_default()
5247 }
5248 pub fn protocol_config_opt(&self) -> Option<&super::ProtocolConfig> {
5250 self.protocol_config.as_ref().map(|field| field as _)
5251 }
5252 pub fn set_protocol_config<T: Into<super::ProtocolConfig>>(&mut self, field: T) {
5254 self.protocol_config = Some(field.into().into());
5255 }
5256 pub fn with_protocol_config<T: Into<super::ProtocolConfig>>(
5258 mut self,
5259 field: T,
5260 ) -> Self {
5261 self.set_protocol_config(field.into());
5262 self
5263 }
5264 pub fn transaction_start_inclusive_opt_mut(&mut self) -> Option<&mut u64> {
5266 self.transaction_start_inclusive.as_mut().map(|field| field as _)
5267 }
5268 pub fn transaction_start_inclusive_mut(&mut self) -> &mut u64 {
5271 self.transaction_start_inclusive.get_or_insert_default()
5272 }
5273 pub fn transaction_start_inclusive_opt(&self) -> Option<u64> {
5275 self.transaction_start_inclusive.as_ref().map(|field| *field)
5276 }
5277 pub fn set_transaction_start_inclusive(&mut self, field: u64) {
5279 self.transaction_start_inclusive = Some(field);
5280 }
5281 pub fn with_transaction_start_inclusive(mut self, field: u64) -> Self {
5283 self.set_transaction_start_inclusive(field);
5284 self
5285 }
5286 pub fn transaction_end_exclusive_opt_mut(&mut self) -> Option<&mut u64> {
5288 self.transaction_end_exclusive.as_mut().map(|field| field as _)
5289 }
5290 pub fn transaction_end_exclusive_mut(&mut self) -> &mut u64 {
5293 self.transaction_end_exclusive.get_or_insert_default()
5294 }
5295 pub fn transaction_end_exclusive_opt(&self) -> Option<u64> {
5297 self.transaction_end_exclusive.as_ref().map(|field| *field)
5298 }
5299 pub fn set_transaction_end_exclusive(&mut self, field: u64) {
5301 self.transaction_end_exclusive = Some(field);
5302 }
5303 pub fn with_transaction_end_exclusive(mut self, field: u64) -> Self {
5305 self.set_transaction_end_exclusive(field);
5306 self
5307 }
5308 pub fn ended_in_safe_mode_opt_mut(&mut self) -> Option<&mut bool> {
5310 self.ended_in_safe_mode.as_mut().map(|field| field as _)
5311 }
5312 pub fn ended_in_safe_mode_mut(&mut self) -> &mut bool {
5315 self.ended_in_safe_mode.get_or_insert_default()
5316 }
5317 pub fn ended_in_safe_mode_opt(&self) -> Option<bool> {
5319 self.ended_in_safe_mode.as_ref().map(|field| *field)
5320 }
5321 pub fn set_ended_in_safe_mode(&mut self, field: bool) {
5323 self.ended_in_safe_mode = Some(field);
5324 }
5325 pub fn with_ended_in_safe_mode(mut self, field: bool) -> Self {
5327 self.set_ended_in_safe_mode(field);
5328 self
5329 }
5330 pub fn system_epoch_info(&self) -> &super::SystemEpochInfo {
5332 self.system_epoch_info
5333 .as_ref()
5334 .map(|field| field as _)
5335 .unwrap_or_else(|| super::SystemEpochInfo::default_instance() as _)
5336 }
5337 pub fn system_epoch_info_opt_mut(
5339 &mut self,
5340 ) -> Option<&mut super::SystemEpochInfo> {
5341 self.system_epoch_info.as_mut().map(|field| field as _)
5342 }
5343 pub fn system_epoch_info_mut(&mut self) -> &mut super::SystemEpochInfo {
5346 self.system_epoch_info.get_or_insert_default()
5347 }
5348 pub fn system_epoch_info_opt(&self) -> Option<&super::SystemEpochInfo> {
5350 self.system_epoch_info.as_ref().map(|field| field as _)
5351 }
5352 pub fn set_system_epoch_info<T: Into<super::SystemEpochInfo>>(
5354 &mut self,
5355 field: T,
5356 ) {
5357 self.system_epoch_info = Some(field.into().into());
5358 }
5359 pub fn with_system_epoch_info<T: Into<super::SystemEpochInfo>>(
5361 mut self,
5362 field: T,
5363 ) -> Self {
5364 self.set_system_epoch_info(field.into());
5365 self
5366 }
5367 pub fn epoch_commitments(&self) -> &[super::CheckpointCommitment] {
5369 &self.epoch_commitments
5370 }
5371 pub fn epoch_commitments_mut(
5374 &mut self,
5375 ) -> &mut Vec<super::CheckpointCommitment> {
5376 &mut self.epoch_commitments
5377 }
5378 pub fn set_epoch_commitments(
5380 &mut self,
5381 field: Vec<super::CheckpointCommitment>,
5382 ) {
5383 self.epoch_commitments = field;
5384 }
5385 pub fn with_epoch_commitments(
5387 mut self,
5388 field: Vec<super::CheckpointCommitment>,
5389 ) -> Self {
5390 self.set_epoch_commitments(field);
5391 self
5392 }
5393 }
5394 impl super::Event {
5395 pub const fn const_default() -> Self {
5396 Self {
5397 package_id: None,
5398 module: None,
5399 sender: None,
5400 event_type: None,
5401 contents: None,
5402 json: None,
5403 checkpoint: None,
5404 transaction_digest: None,
5405 transaction_index: None,
5406 event_index: None,
5407 }
5408 }
5409 #[doc(hidden)]
5410 pub fn default_instance() -> &'static Self {
5411 static DEFAULT: super::Event = super::Event::const_default();
5412 &DEFAULT
5413 }
5414 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
5416 self.package_id.as_mut().map(|field| field as _)
5417 }
5418 pub fn package_id_mut(&mut self) -> &mut String {
5421 self.package_id.get_or_insert_default()
5422 }
5423 pub fn package_id_opt(&self) -> Option<&str> {
5425 self.package_id.as_ref().map(|field| field as _)
5426 }
5427 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
5429 self.package_id = Some(field.into().into());
5430 }
5431 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
5433 self.set_package_id(field.into());
5434 self
5435 }
5436 pub fn module_opt_mut(&mut self) -> Option<&mut String> {
5438 self.module.as_mut().map(|field| field as _)
5439 }
5440 pub fn module_mut(&mut self) -> &mut String {
5443 self.module.get_or_insert_default()
5444 }
5445 pub fn module_opt(&self) -> Option<&str> {
5447 self.module.as_ref().map(|field| field as _)
5448 }
5449 pub fn set_module<T: Into<String>>(&mut self, field: T) {
5451 self.module = Some(field.into().into());
5452 }
5453 pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
5455 self.set_module(field.into());
5456 self
5457 }
5458 pub fn sender_opt_mut(&mut self) -> Option<&mut String> {
5460 self.sender.as_mut().map(|field| field as _)
5461 }
5462 pub fn sender_mut(&mut self) -> &mut String {
5465 self.sender.get_or_insert_default()
5466 }
5467 pub fn sender_opt(&self) -> Option<&str> {
5469 self.sender.as_ref().map(|field| field as _)
5470 }
5471 pub fn set_sender<T: Into<String>>(&mut self, field: T) {
5473 self.sender = Some(field.into().into());
5474 }
5475 pub fn with_sender<T: Into<String>>(mut self, field: T) -> Self {
5477 self.set_sender(field.into());
5478 self
5479 }
5480 pub fn event_type_opt_mut(&mut self) -> Option<&mut String> {
5482 self.event_type.as_mut().map(|field| field as _)
5483 }
5484 pub fn event_type_mut(&mut self) -> &mut String {
5487 self.event_type.get_or_insert_default()
5488 }
5489 pub fn event_type_opt(&self) -> Option<&str> {
5491 self.event_type.as_ref().map(|field| field as _)
5492 }
5493 pub fn set_event_type<T: Into<String>>(&mut self, field: T) {
5495 self.event_type = Some(field.into().into());
5496 }
5497 pub fn with_event_type<T: Into<String>>(mut self, field: T) -> Self {
5499 self.set_event_type(field.into());
5500 self
5501 }
5502 pub fn contents(&self) -> &super::Bcs {
5504 self.contents
5505 .as_ref()
5506 .map(|field| field as _)
5507 .unwrap_or_else(|| super::Bcs::default_instance() as _)
5508 }
5509 pub fn contents_opt_mut(&mut self) -> Option<&mut super::Bcs> {
5511 self.contents.as_mut().map(|field| field as _)
5512 }
5513 pub fn contents_mut(&mut self) -> &mut super::Bcs {
5516 self.contents.get_or_insert_default()
5517 }
5518 pub fn contents_opt(&self) -> Option<&super::Bcs> {
5520 self.contents.as_ref().map(|field| field as _)
5521 }
5522 pub fn set_contents<T: Into<super::Bcs>>(&mut self, field: T) {
5524 self.contents = Some(field.into().into());
5525 }
5526 pub fn with_contents<T: Into<super::Bcs>>(mut self, field: T) -> Self {
5528 self.set_contents(field.into());
5529 self
5530 }
5531 pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
5533 self.json.as_mut().map(|field| field as _)
5534 }
5535 pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
5538 self.json.get_or_insert_default()
5539 }
5540 pub fn json_opt(&self) -> Option<&::prost_types::Value> {
5542 self.json.as_ref().map(|field| field as _)
5543 }
5544 pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
5546 self.json = Some(field.into().into());
5547 }
5548 pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
5550 self.set_json(field.into());
5551 self
5552 }
5553 pub fn checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
5555 self.checkpoint.as_mut().map(|field| field as _)
5556 }
5557 pub fn checkpoint_mut(&mut self) -> &mut u64 {
5560 self.checkpoint.get_or_insert_default()
5561 }
5562 pub fn checkpoint_opt(&self) -> Option<u64> {
5564 self.checkpoint.as_ref().map(|field| *field)
5565 }
5566 pub fn set_checkpoint(&mut self, field: u64) {
5568 self.checkpoint = Some(field);
5569 }
5570 pub fn with_checkpoint(mut self, field: u64) -> Self {
5572 self.set_checkpoint(field);
5573 self
5574 }
5575 pub fn transaction_digest_opt_mut(&mut self) -> Option<&mut String> {
5577 self.transaction_digest.as_mut().map(|field| field as _)
5578 }
5579 pub fn transaction_digest_mut(&mut self) -> &mut String {
5582 self.transaction_digest.get_or_insert_default()
5583 }
5584 pub fn transaction_digest_opt(&self) -> Option<&str> {
5586 self.transaction_digest.as_ref().map(|field| field as _)
5587 }
5588 pub fn set_transaction_digest<T: Into<String>>(&mut self, field: T) {
5590 self.transaction_digest = Some(field.into().into());
5591 }
5592 pub fn with_transaction_digest<T: Into<String>>(mut self, field: T) -> Self {
5594 self.set_transaction_digest(field.into());
5595 self
5596 }
5597 pub fn transaction_index_opt_mut(&mut self) -> Option<&mut u64> {
5599 self.transaction_index.as_mut().map(|field| field as _)
5600 }
5601 pub fn transaction_index_mut(&mut self) -> &mut u64 {
5604 self.transaction_index.get_or_insert_default()
5605 }
5606 pub fn transaction_index_opt(&self) -> Option<u64> {
5608 self.transaction_index.as_ref().map(|field| *field)
5609 }
5610 pub fn set_transaction_index(&mut self, field: u64) {
5612 self.transaction_index = Some(field);
5613 }
5614 pub fn with_transaction_index(mut self, field: u64) -> Self {
5616 self.set_transaction_index(field);
5617 self
5618 }
5619 pub fn event_index_opt_mut(&mut self) -> Option<&mut u32> {
5621 self.event_index.as_mut().map(|field| field as _)
5622 }
5623 pub fn event_index_mut(&mut self) -> &mut u32 {
5626 self.event_index.get_or_insert_default()
5627 }
5628 pub fn event_index_opt(&self) -> Option<u32> {
5630 self.event_index.as_ref().map(|field| *field)
5631 }
5632 pub fn set_event_index(&mut self, field: u32) {
5634 self.event_index = Some(field);
5635 }
5636 pub fn with_event_index(mut self, field: u32) -> Self {
5638 self.set_event_index(field);
5639 self
5640 }
5641 }
5642 impl super::EventDigestEntry {
5643 pub const fn const_default() -> Self {
5644 Self {
5645 event_index: None,
5646 digest: None,
5647 }
5648 }
5649 #[doc(hidden)]
5650 pub fn default_instance() -> &'static Self {
5651 static DEFAULT: super::EventDigestEntry = super::EventDigestEntry::const_default();
5652 &DEFAULT
5653 }
5654 pub fn event_index_opt_mut(&mut self) -> Option<&mut u64> {
5656 self.event_index.as_mut().map(|field| field as _)
5657 }
5658 pub fn event_index_mut(&mut self) -> &mut u64 {
5661 self.event_index.get_or_insert_default()
5662 }
5663 pub fn event_index_opt(&self) -> Option<u64> {
5665 self.event_index.as_ref().map(|field| *field)
5666 }
5667 pub fn set_event_index(&mut self, field: u64) {
5669 self.event_index = Some(field);
5670 }
5671 pub fn with_event_index(mut self, field: u64) -> Self {
5673 self.set_event_index(field);
5674 self
5675 }
5676 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
5678 self.digest.as_mut().map(|field| field as _)
5679 }
5680 pub fn digest_mut(&mut self) -> &mut String {
5683 self.digest.get_or_insert_default()
5684 }
5685 pub fn digest_opt(&self) -> Option<&str> {
5687 self.digest.as_ref().map(|field| field as _)
5688 }
5689 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
5691 self.digest = Some(field.into().into());
5692 }
5693 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
5695 self.set_digest(field.into());
5696 self
5697 }
5698 }
5699 impl super::EventFilter {
5700 pub const fn const_default() -> Self {
5701 Self { terms: Vec::new() }
5702 }
5703 #[doc(hidden)]
5704 pub fn default_instance() -> &'static Self {
5705 static DEFAULT: super::EventFilter = super::EventFilter::const_default();
5706 &DEFAULT
5707 }
5708 pub fn terms(&self) -> &[super::EventTerm] {
5710 &self.terms
5711 }
5712 pub fn terms_mut(&mut self) -> &mut Vec<super::EventTerm> {
5715 &mut self.terms
5716 }
5717 pub fn set_terms(&mut self, field: Vec<super::EventTerm>) {
5719 self.terms = field;
5720 }
5721 pub fn with_terms(mut self, field: Vec<super::EventTerm>) -> Self {
5723 self.set_terms(field);
5724 self
5725 }
5726 }
5727 impl super::EventLiteral {
5728 pub const fn const_default() -> Self {
5729 Self {
5730 negated: false,
5731 predicate: None,
5732 }
5733 }
5734 #[doc(hidden)]
5735 pub fn default_instance() -> &'static Self {
5736 static DEFAULT: super::EventLiteral = super::EventLiteral::const_default();
5737 &DEFAULT
5738 }
5739 pub fn negated_mut(&mut self) -> &mut bool {
5742 &mut self.negated
5743 }
5744 pub fn set_negated(&mut self, field: bool) {
5746 self.negated = field;
5747 }
5748 pub fn with_negated(mut self, field: bool) -> Self {
5750 self.set_negated(field);
5751 self
5752 }
5753 pub fn sender(&self) -> &super::SenderFilter {
5755 if let Some(super::event_literal::Predicate::Sender(field)) = &self.predicate
5756 {
5757 field as _
5758 } else {
5759 super::SenderFilter::default_instance() as _
5760 }
5761 }
5762 pub fn sender_opt(&self) -> Option<&super::SenderFilter> {
5764 if let Some(super::event_literal::Predicate::Sender(field)) = &self.predicate
5765 {
5766 Some(field as _)
5767 } else {
5768 None
5769 }
5770 }
5771 pub fn sender_opt_mut(&mut self) -> Option<&mut super::SenderFilter> {
5773 if let Some(super::event_literal::Predicate::Sender(field)) = &mut self
5774 .predicate
5775 {
5776 Some(field as _)
5777 } else {
5778 None
5779 }
5780 }
5781 pub fn sender_mut(&mut self) -> &mut super::SenderFilter {
5785 if self.sender_opt_mut().is_none() {
5786 self.predicate = Some(
5787 super::event_literal::Predicate::Sender(
5788 super::SenderFilter::default(),
5789 ),
5790 );
5791 }
5792 self.sender_opt_mut().unwrap()
5793 }
5794 pub fn set_sender<T: Into<super::SenderFilter>>(&mut self, field: T) {
5797 self.predicate = Some(
5798 super::event_literal::Predicate::Sender(field.into().into()),
5799 );
5800 }
5801 pub fn with_sender<T: Into<super::SenderFilter>>(mut self, field: T) -> Self {
5804 self.set_sender(field.into());
5805 self
5806 }
5807 pub fn emit_module(&self) -> &super::EmitModuleFilter {
5809 if let Some(super::event_literal::Predicate::EmitModule(field)) = &self
5810 .predicate
5811 {
5812 field as _
5813 } else {
5814 super::EmitModuleFilter::default_instance() as _
5815 }
5816 }
5817 pub fn emit_module_opt(&self) -> Option<&super::EmitModuleFilter> {
5819 if let Some(super::event_literal::Predicate::EmitModule(field)) = &self
5820 .predicate
5821 {
5822 Some(field as _)
5823 } else {
5824 None
5825 }
5826 }
5827 pub fn emit_module_opt_mut(&mut self) -> Option<&mut super::EmitModuleFilter> {
5829 if let Some(super::event_literal::Predicate::EmitModule(field)) = &mut self
5830 .predicate
5831 {
5832 Some(field as _)
5833 } else {
5834 None
5835 }
5836 }
5837 pub fn emit_module_mut(&mut self) -> &mut super::EmitModuleFilter {
5841 if self.emit_module_opt_mut().is_none() {
5842 self.predicate = Some(
5843 super::event_literal::Predicate::EmitModule(
5844 super::EmitModuleFilter::default(),
5845 ),
5846 );
5847 }
5848 self.emit_module_opt_mut().unwrap()
5849 }
5850 pub fn set_emit_module<T: Into<super::EmitModuleFilter>>(&mut self, field: T) {
5853 self.predicate = Some(
5854 super::event_literal::Predicate::EmitModule(field.into().into()),
5855 );
5856 }
5857 pub fn with_emit_module<T: Into<super::EmitModuleFilter>>(
5860 mut self,
5861 field: T,
5862 ) -> Self {
5863 self.set_emit_module(field.into());
5864 self
5865 }
5866 pub fn event_type(&self) -> &super::EventTypeFilter {
5868 if let Some(super::event_literal::Predicate::EventType(field)) = &self
5869 .predicate
5870 {
5871 field as _
5872 } else {
5873 super::EventTypeFilter::default_instance() as _
5874 }
5875 }
5876 pub fn event_type_opt(&self) -> Option<&super::EventTypeFilter> {
5878 if let Some(super::event_literal::Predicate::EventType(field)) = &self
5879 .predicate
5880 {
5881 Some(field as _)
5882 } else {
5883 None
5884 }
5885 }
5886 pub fn event_type_opt_mut(&mut self) -> Option<&mut super::EventTypeFilter> {
5888 if let Some(super::event_literal::Predicate::EventType(field)) = &mut self
5889 .predicate
5890 {
5891 Some(field as _)
5892 } else {
5893 None
5894 }
5895 }
5896 pub fn event_type_mut(&mut self) -> &mut super::EventTypeFilter {
5900 if self.event_type_opt_mut().is_none() {
5901 self.predicate = Some(
5902 super::event_literal::Predicate::EventType(
5903 super::EventTypeFilter::default(),
5904 ),
5905 );
5906 }
5907 self.event_type_opt_mut().unwrap()
5908 }
5909 pub fn set_event_type<T: Into<super::EventTypeFilter>>(&mut self, field: T) {
5912 self.predicate = Some(
5913 super::event_literal::Predicate::EventType(field.into().into()),
5914 );
5915 }
5916 pub fn with_event_type<T: Into<super::EventTypeFilter>>(
5919 mut self,
5920 field: T,
5921 ) -> Self {
5922 self.set_event_type(field.into());
5923 self
5924 }
5925 pub fn event_stream_head(&self) -> &super::EventStreamHeadFilter {
5927 if let Some(super::event_literal::Predicate::EventStreamHead(field)) = &self
5928 .predicate
5929 {
5930 field as _
5931 } else {
5932 super::EventStreamHeadFilter::default_instance() as _
5933 }
5934 }
5935 pub fn event_stream_head_opt(&self) -> Option<&super::EventStreamHeadFilter> {
5937 if let Some(super::event_literal::Predicate::EventStreamHead(field)) = &self
5938 .predicate
5939 {
5940 Some(field as _)
5941 } else {
5942 None
5943 }
5944 }
5945 pub fn event_stream_head_opt_mut(
5947 &mut self,
5948 ) -> Option<&mut super::EventStreamHeadFilter> {
5949 if let Some(super::event_literal::Predicate::EventStreamHead(field)) = &mut self
5950 .predicate
5951 {
5952 Some(field as _)
5953 } else {
5954 None
5955 }
5956 }
5957 pub fn event_stream_head_mut(&mut self) -> &mut super::EventStreamHeadFilter {
5961 if self.event_stream_head_opt_mut().is_none() {
5962 self.predicate = Some(
5963 super::event_literal::Predicate::EventStreamHead(
5964 super::EventStreamHeadFilter::default(),
5965 ),
5966 );
5967 }
5968 self.event_stream_head_opt_mut().unwrap()
5969 }
5970 pub fn set_event_stream_head<T: Into<super::EventStreamHeadFilter>>(
5973 &mut self,
5974 field: T,
5975 ) {
5976 self.predicate = Some(
5977 super::event_literal::Predicate::EventStreamHead(field.into().into()),
5978 );
5979 }
5980 pub fn with_event_stream_head<T: Into<super::EventStreamHeadFilter>>(
5983 mut self,
5984 field: T,
5985 ) -> Self {
5986 self.set_event_stream_head(field.into());
5987 self
5988 }
5989 }
5990 impl super::EventStreamHeadFilter {
5991 pub const fn const_default() -> Self {
5992 Self { stream_id: None }
5993 }
5994 #[doc(hidden)]
5995 pub fn default_instance() -> &'static Self {
5996 static DEFAULT: super::EventStreamHeadFilter = super::EventStreamHeadFilter::const_default();
5997 &DEFAULT
5998 }
5999 pub fn stream_id_opt_mut(&mut self) -> Option<&mut String> {
6001 self.stream_id.as_mut().map(|field| field as _)
6002 }
6003 pub fn stream_id_mut(&mut self) -> &mut String {
6006 self.stream_id.get_or_insert_default()
6007 }
6008 pub fn stream_id_opt(&self) -> Option<&str> {
6010 self.stream_id.as_ref().map(|field| field as _)
6011 }
6012 pub fn set_stream_id<T: Into<String>>(&mut self, field: T) {
6014 self.stream_id = Some(field.into().into());
6015 }
6016 pub fn with_stream_id<T: Into<String>>(mut self, field: T) -> Self {
6018 self.set_stream_id(field.into());
6019 self
6020 }
6021 }
6022 impl super::EventTerm {
6023 pub const fn const_default() -> Self {
6024 Self { literals: Vec::new() }
6025 }
6026 #[doc(hidden)]
6027 pub fn default_instance() -> &'static Self {
6028 static DEFAULT: super::EventTerm = super::EventTerm::const_default();
6029 &DEFAULT
6030 }
6031 pub fn literals(&self) -> &[super::EventLiteral] {
6033 &self.literals
6034 }
6035 pub fn literals_mut(&mut self) -> &mut Vec<super::EventLiteral> {
6038 &mut self.literals
6039 }
6040 pub fn set_literals(&mut self, field: Vec<super::EventLiteral>) {
6042 self.literals = field;
6043 }
6044 pub fn with_literals(mut self, field: Vec<super::EventLiteral>) -> Self {
6046 self.set_literals(field);
6047 self
6048 }
6049 }
6050 impl super::EventTypeFilter {
6051 pub const fn const_default() -> Self {
6052 Self { event_type: None }
6053 }
6054 #[doc(hidden)]
6055 pub fn default_instance() -> &'static Self {
6056 static DEFAULT: super::EventTypeFilter = super::EventTypeFilter::const_default();
6057 &DEFAULT
6058 }
6059 pub fn event_type_opt_mut(&mut self) -> Option<&mut String> {
6061 self.event_type.as_mut().map(|field| field as _)
6062 }
6063 pub fn event_type_mut(&mut self) -> &mut String {
6066 self.event_type.get_or_insert_default()
6067 }
6068 pub fn event_type_opt(&self) -> Option<&str> {
6070 self.event_type.as_ref().map(|field| field as _)
6071 }
6072 pub fn set_event_type<T: Into<String>>(&mut self, field: T) {
6074 self.event_type = Some(field.into().into());
6075 }
6076 pub fn with_event_type<T: Into<String>>(mut self, field: T) -> Self {
6078 self.set_event_type(field.into());
6079 self
6080 }
6081 }
6082 impl super::ExecuteTransactionRequest {
6083 pub const fn const_default() -> Self {
6084 Self {
6085 transaction: None,
6086 signatures: Vec::new(),
6087 read_mask: None,
6088 }
6089 }
6090 #[doc(hidden)]
6091 pub fn default_instance() -> &'static Self {
6092 static DEFAULT: super::ExecuteTransactionRequest = super::ExecuteTransactionRequest::const_default();
6093 &DEFAULT
6094 }
6095 pub fn transaction(&self) -> &super::Transaction {
6097 self.transaction
6098 .as_ref()
6099 .map(|field| field as _)
6100 .unwrap_or_else(|| super::Transaction::default_instance() as _)
6101 }
6102 pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
6104 self.transaction.as_mut().map(|field| field as _)
6105 }
6106 pub fn transaction_mut(&mut self) -> &mut super::Transaction {
6109 self.transaction.get_or_insert_default()
6110 }
6111 pub fn transaction_opt(&self) -> Option<&super::Transaction> {
6113 self.transaction.as_ref().map(|field| field as _)
6114 }
6115 pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
6117 self.transaction = Some(field.into().into());
6118 }
6119 pub fn with_transaction<T: Into<super::Transaction>>(
6121 mut self,
6122 field: T,
6123 ) -> Self {
6124 self.set_transaction(field.into());
6125 self
6126 }
6127 pub fn signatures(&self) -> &[super::UserSignature] {
6129 &self.signatures
6130 }
6131 pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
6134 &mut self.signatures
6135 }
6136 pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
6138 self.signatures = field;
6139 }
6140 pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
6142 self.set_signatures(field);
6143 self
6144 }
6145 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
6147 self.read_mask.as_mut().map(|field| field as _)
6148 }
6149 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
6152 self.read_mask.get_or_insert_default()
6153 }
6154 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
6156 self.read_mask.as_ref().map(|field| field as _)
6157 }
6158 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
6160 self.read_mask = Some(field.into().into());
6161 }
6162 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
6164 mut self,
6165 field: T,
6166 ) -> Self {
6167 self.set_read_mask(field.into());
6168 self
6169 }
6170 }
6171 impl super::ExecuteTransactionResponse {
6172 pub const fn const_default() -> Self {
6173 Self { transaction: None }
6174 }
6175 #[doc(hidden)]
6176 pub fn default_instance() -> &'static Self {
6177 static DEFAULT: super::ExecuteTransactionResponse = super::ExecuteTransactionResponse::const_default();
6178 &DEFAULT
6179 }
6180 pub fn transaction(&self) -> &super::ExecutedTransaction {
6182 self.transaction
6183 .as_ref()
6184 .map(|field| field as _)
6185 .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
6186 }
6187 pub fn transaction_opt_mut(
6189 &mut self,
6190 ) -> Option<&mut super::ExecutedTransaction> {
6191 self.transaction.as_mut().map(|field| field as _)
6192 }
6193 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
6196 self.transaction.get_or_insert_default()
6197 }
6198 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
6200 self.transaction.as_ref().map(|field| field as _)
6201 }
6202 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
6204 &mut self,
6205 field: T,
6206 ) {
6207 self.transaction = Some(field.into().into());
6208 }
6209 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
6211 mut self,
6212 field: T,
6213 ) -> Self {
6214 self.set_transaction(field.into());
6215 self
6216 }
6217 }
6218 impl super::ExecutedTransaction {
6219 pub const fn const_default() -> Self {
6220 Self {
6221 digest: None,
6222 transaction: None,
6223 signatures: Vec::new(),
6224 effects: None,
6225 events: None,
6226 checkpoint: None,
6227 timestamp: None,
6228 balance_changes: Vec::new(),
6229 objects: None,
6230 transaction_index: None,
6231 }
6232 }
6233 #[doc(hidden)]
6234 pub fn default_instance() -> &'static Self {
6235 static DEFAULT: super::ExecutedTransaction = super::ExecutedTransaction::const_default();
6236 &DEFAULT
6237 }
6238 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
6240 self.digest.as_mut().map(|field| field as _)
6241 }
6242 pub fn digest_mut(&mut self) -> &mut String {
6245 self.digest.get_or_insert_default()
6246 }
6247 pub fn digest_opt(&self) -> Option<&str> {
6249 self.digest.as_ref().map(|field| field as _)
6250 }
6251 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
6253 self.digest = Some(field.into().into());
6254 }
6255 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
6257 self.set_digest(field.into());
6258 self
6259 }
6260 pub fn transaction(&self) -> &super::Transaction {
6262 self.transaction
6263 .as_ref()
6264 .map(|field| field as _)
6265 .unwrap_or_else(|| super::Transaction::default_instance() as _)
6266 }
6267 pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
6269 self.transaction.as_mut().map(|field| field as _)
6270 }
6271 pub fn transaction_mut(&mut self) -> &mut super::Transaction {
6274 self.transaction.get_or_insert_default()
6275 }
6276 pub fn transaction_opt(&self) -> Option<&super::Transaction> {
6278 self.transaction.as_ref().map(|field| field as _)
6279 }
6280 pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
6282 self.transaction = Some(field.into().into());
6283 }
6284 pub fn with_transaction<T: Into<super::Transaction>>(
6286 mut self,
6287 field: T,
6288 ) -> Self {
6289 self.set_transaction(field.into());
6290 self
6291 }
6292 pub fn signatures(&self) -> &[super::UserSignature] {
6294 &self.signatures
6295 }
6296 pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
6299 &mut self.signatures
6300 }
6301 pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
6303 self.signatures = field;
6304 }
6305 pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
6307 self.set_signatures(field);
6308 self
6309 }
6310 pub fn effects(&self) -> &super::TransactionEffects {
6312 self.effects
6313 .as_ref()
6314 .map(|field| field as _)
6315 .unwrap_or_else(|| super::TransactionEffects::default_instance() as _)
6316 }
6317 pub fn effects_opt_mut(&mut self) -> Option<&mut super::TransactionEffects> {
6319 self.effects.as_mut().map(|field| field as _)
6320 }
6321 pub fn effects_mut(&mut self) -> &mut super::TransactionEffects {
6324 self.effects.get_or_insert_default()
6325 }
6326 pub fn effects_opt(&self) -> Option<&super::TransactionEffects> {
6328 self.effects.as_ref().map(|field| field as _)
6329 }
6330 pub fn set_effects<T: Into<super::TransactionEffects>>(&mut self, field: T) {
6332 self.effects = Some(field.into().into());
6333 }
6334 pub fn with_effects<T: Into<super::TransactionEffects>>(
6336 mut self,
6337 field: T,
6338 ) -> Self {
6339 self.set_effects(field.into());
6340 self
6341 }
6342 pub fn events(&self) -> &super::TransactionEvents {
6344 self.events
6345 .as_ref()
6346 .map(|field| field as _)
6347 .unwrap_or_else(|| super::TransactionEvents::default_instance() as _)
6348 }
6349 pub fn events_opt_mut(&mut self) -> Option<&mut super::TransactionEvents> {
6351 self.events.as_mut().map(|field| field as _)
6352 }
6353 pub fn events_mut(&mut self) -> &mut super::TransactionEvents {
6356 self.events.get_or_insert_default()
6357 }
6358 pub fn events_opt(&self) -> Option<&super::TransactionEvents> {
6360 self.events.as_ref().map(|field| field as _)
6361 }
6362 pub fn set_events<T: Into<super::TransactionEvents>>(&mut self, field: T) {
6364 self.events = Some(field.into().into());
6365 }
6366 pub fn with_events<T: Into<super::TransactionEvents>>(
6368 mut self,
6369 field: T,
6370 ) -> Self {
6371 self.set_events(field.into());
6372 self
6373 }
6374 pub fn checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
6376 self.checkpoint.as_mut().map(|field| field as _)
6377 }
6378 pub fn checkpoint_mut(&mut self) -> &mut u64 {
6381 self.checkpoint.get_or_insert_default()
6382 }
6383 pub fn checkpoint_opt(&self) -> Option<u64> {
6385 self.checkpoint.as_ref().map(|field| *field)
6386 }
6387 pub fn set_checkpoint(&mut self, field: u64) {
6389 self.checkpoint = Some(field);
6390 }
6391 pub fn with_checkpoint(mut self, field: u64) -> Self {
6393 self.set_checkpoint(field);
6394 self
6395 }
6396 pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
6398 self.timestamp.as_mut().map(|field| field as _)
6399 }
6400 pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
6403 self.timestamp.get_or_insert_default()
6404 }
6405 pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
6407 self.timestamp.as_ref().map(|field| field as _)
6408 }
6409 pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
6411 self.timestamp = Some(field.into().into());
6412 }
6413 pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
6415 mut self,
6416 field: T,
6417 ) -> Self {
6418 self.set_timestamp(field.into());
6419 self
6420 }
6421 pub fn balance_changes(&self) -> &[super::BalanceChange] {
6423 &self.balance_changes
6424 }
6425 pub fn balance_changes_mut(&mut self) -> &mut Vec<super::BalanceChange> {
6428 &mut self.balance_changes
6429 }
6430 pub fn set_balance_changes(&mut self, field: Vec<super::BalanceChange>) {
6432 self.balance_changes = field;
6433 }
6434 pub fn with_balance_changes(mut self, field: Vec<super::BalanceChange>) -> Self {
6436 self.set_balance_changes(field);
6437 self
6438 }
6439 pub fn objects(&self) -> &super::ObjectSet {
6441 self.objects
6442 .as_ref()
6443 .map(|field| field as _)
6444 .unwrap_or_else(|| super::ObjectSet::default_instance() as _)
6445 }
6446 pub fn objects_opt_mut(&mut self) -> Option<&mut super::ObjectSet> {
6448 self.objects.as_mut().map(|field| field as _)
6449 }
6450 pub fn objects_mut(&mut self) -> &mut super::ObjectSet {
6453 self.objects.get_or_insert_default()
6454 }
6455 pub fn objects_opt(&self) -> Option<&super::ObjectSet> {
6457 self.objects.as_ref().map(|field| field as _)
6458 }
6459 pub fn set_objects<T: Into<super::ObjectSet>>(&mut self, field: T) {
6461 self.objects = Some(field.into().into());
6462 }
6463 pub fn with_objects<T: Into<super::ObjectSet>>(mut self, field: T) -> Self {
6465 self.set_objects(field.into());
6466 self
6467 }
6468 pub fn transaction_index_opt_mut(&mut self) -> Option<&mut u64> {
6470 self.transaction_index.as_mut().map(|field| field as _)
6471 }
6472 pub fn transaction_index_mut(&mut self) -> &mut u64 {
6475 self.transaction_index.get_or_insert_default()
6476 }
6477 pub fn transaction_index_opt(&self) -> Option<u64> {
6479 self.transaction_index.as_ref().map(|field| *field)
6480 }
6481 pub fn set_transaction_index(&mut self, field: u64) {
6483 self.transaction_index = Some(field);
6484 }
6485 pub fn with_transaction_index(mut self, field: u64) -> Self {
6487 self.set_transaction_index(field);
6488 self
6489 }
6490 }
6491 impl super::ExecutionError {
6492 pub const fn const_default() -> Self {
6493 Self {
6494 description: None,
6495 command: None,
6496 kind: None,
6497 error_details: None,
6498 }
6499 }
6500 #[doc(hidden)]
6501 pub fn default_instance() -> &'static Self {
6502 static DEFAULT: super::ExecutionError = super::ExecutionError::const_default();
6503 &DEFAULT
6504 }
6505 pub fn description_opt_mut(&mut self) -> Option<&mut String> {
6507 self.description.as_mut().map(|field| field as _)
6508 }
6509 pub fn description_mut(&mut self) -> &mut String {
6512 self.description.get_or_insert_default()
6513 }
6514 pub fn description_opt(&self) -> Option<&str> {
6516 self.description.as_ref().map(|field| field as _)
6517 }
6518 pub fn set_description<T: Into<String>>(&mut self, field: T) {
6520 self.description = Some(field.into().into());
6521 }
6522 pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
6524 self.set_description(field.into());
6525 self
6526 }
6527 pub fn command_opt_mut(&mut self) -> Option<&mut u64> {
6529 self.command.as_mut().map(|field| field as _)
6530 }
6531 pub fn command_mut(&mut self) -> &mut u64 {
6534 self.command.get_or_insert_default()
6535 }
6536 pub fn command_opt(&self) -> Option<u64> {
6538 self.command.as_ref().map(|field| *field)
6539 }
6540 pub fn set_command(&mut self, field: u64) {
6542 self.command = Some(field);
6543 }
6544 pub fn with_command(mut self, field: u64) -> Self {
6546 self.set_command(field);
6547 self
6548 }
6549 pub fn with_kind<T: Into<super::execution_error::ExecutionErrorKind>>(
6551 mut self,
6552 field: T,
6553 ) -> Self {
6554 self.set_kind(field.into());
6555 self
6556 }
6557 pub fn abort(&self) -> &super::MoveAbort {
6559 if let Some(super::execution_error::ErrorDetails::Abort(field)) = &self
6560 .error_details
6561 {
6562 field as _
6563 } else {
6564 super::MoveAbort::default_instance() as _
6565 }
6566 }
6567 pub fn abort_opt(&self) -> Option<&super::MoveAbort> {
6569 if let Some(super::execution_error::ErrorDetails::Abort(field)) = &self
6570 .error_details
6571 {
6572 Some(field as _)
6573 } else {
6574 None
6575 }
6576 }
6577 pub fn abort_opt_mut(&mut self) -> Option<&mut super::MoveAbort> {
6579 if let Some(super::execution_error::ErrorDetails::Abort(field)) = &mut self
6580 .error_details
6581 {
6582 Some(field as _)
6583 } else {
6584 None
6585 }
6586 }
6587 pub fn abort_mut(&mut self) -> &mut super::MoveAbort {
6591 if self.abort_opt_mut().is_none() {
6592 self.error_details = Some(
6593 super::execution_error::ErrorDetails::Abort(
6594 super::MoveAbort::default(),
6595 ),
6596 );
6597 }
6598 self.abort_opt_mut().unwrap()
6599 }
6600 pub fn set_abort<T: Into<super::MoveAbort>>(&mut self, field: T) {
6603 self.error_details = Some(
6604 super::execution_error::ErrorDetails::Abort(field.into().into()),
6605 );
6606 }
6607 pub fn with_abort<T: Into<super::MoveAbort>>(mut self, field: T) -> Self {
6610 self.set_abort(field.into());
6611 self
6612 }
6613 pub fn size_error(&self) -> &super::SizeError {
6615 if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &self
6616 .error_details
6617 {
6618 field as _
6619 } else {
6620 super::SizeError::default_instance() as _
6621 }
6622 }
6623 pub fn size_error_opt(&self) -> Option<&super::SizeError> {
6625 if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &self
6626 .error_details
6627 {
6628 Some(field as _)
6629 } else {
6630 None
6631 }
6632 }
6633 pub fn size_error_opt_mut(&mut self) -> Option<&mut super::SizeError> {
6635 if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &mut self
6636 .error_details
6637 {
6638 Some(field as _)
6639 } else {
6640 None
6641 }
6642 }
6643 pub fn size_error_mut(&mut self) -> &mut super::SizeError {
6647 if self.size_error_opt_mut().is_none() {
6648 self.error_details = Some(
6649 super::execution_error::ErrorDetails::SizeError(
6650 super::SizeError::default(),
6651 ),
6652 );
6653 }
6654 self.size_error_opt_mut().unwrap()
6655 }
6656 pub fn set_size_error<T: Into<super::SizeError>>(&mut self, field: T) {
6659 self.error_details = Some(
6660 super::execution_error::ErrorDetails::SizeError(field.into().into()),
6661 );
6662 }
6663 pub fn with_size_error<T: Into<super::SizeError>>(mut self, field: T) -> Self {
6666 self.set_size_error(field.into());
6667 self
6668 }
6669 pub fn command_argument_error(&self) -> &super::CommandArgumentError {
6671 if let Some(
6672 super::execution_error::ErrorDetails::CommandArgumentError(field),
6673 ) = &self.error_details
6674 {
6675 field as _
6676 } else {
6677 super::CommandArgumentError::default_instance() as _
6678 }
6679 }
6680 pub fn command_argument_error_opt(
6682 &self,
6683 ) -> Option<&super::CommandArgumentError> {
6684 if let Some(
6685 super::execution_error::ErrorDetails::CommandArgumentError(field),
6686 ) = &self.error_details
6687 {
6688 Some(field as _)
6689 } else {
6690 None
6691 }
6692 }
6693 pub fn command_argument_error_opt_mut(
6695 &mut self,
6696 ) -> Option<&mut super::CommandArgumentError> {
6697 if let Some(
6698 super::execution_error::ErrorDetails::CommandArgumentError(field),
6699 ) = &mut self.error_details
6700 {
6701 Some(field as _)
6702 } else {
6703 None
6704 }
6705 }
6706 pub fn command_argument_error_mut(
6710 &mut self,
6711 ) -> &mut super::CommandArgumentError {
6712 if self.command_argument_error_opt_mut().is_none() {
6713 self.error_details = Some(
6714 super::execution_error::ErrorDetails::CommandArgumentError(
6715 super::CommandArgumentError::default(),
6716 ),
6717 );
6718 }
6719 self.command_argument_error_opt_mut().unwrap()
6720 }
6721 pub fn set_command_argument_error<T: Into<super::CommandArgumentError>>(
6724 &mut self,
6725 field: T,
6726 ) {
6727 self.error_details = Some(
6728 super::execution_error::ErrorDetails::CommandArgumentError(
6729 field.into().into(),
6730 ),
6731 );
6732 }
6733 pub fn with_command_argument_error<T: Into<super::CommandArgumentError>>(
6736 mut self,
6737 field: T,
6738 ) -> Self {
6739 self.set_command_argument_error(field.into());
6740 self
6741 }
6742 pub fn type_argument_error(&self) -> &super::TypeArgumentError {
6744 if let Some(
6745 super::execution_error::ErrorDetails::TypeArgumentError(field),
6746 ) = &self.error_details
6747 {
6748 field as _
6749 } else {
6750 super::TypeArgumentError::default_instance() as _
6751 }
6752 }
6753 pub fn type_argument_error_opt(&self) -> Option<&super::TypeArgumentError> {
6755 if let Some(
6756 super::execution_error::ErrorDetails::TypeArgumentError(field),
6757 ) = &self.error_details
6758 {
6759 Some(field as _)
6760 } else {
6761 None
6762 }
6763 }
6764 pub fn type_argument_error_opt_mut(
6766 &mut self,
6767 ) -> Option<&mut super::TypeArgumentError> {
6768 if let Some(
6769 super::execution_error::ErrorDetails::TypeArgumentError(field),
6770 ) = &mut self.error_details
6771 {
6772 Some(field as _)
6773 } else {
6774 None
6775 }
6776 }
6777 pub fn type_argument_error_mut(&mut self) -> &mut super::TypeArgumentError {
6781 if self.type_argument_error_opt_mut().is_none() {
6782 self.error_details = Some(
6783 super::execution_error::ErrorDetails::TypeArgumentError(
6784 super::TypeArgumentError::default(),
6785 ),
6786 );
6787 }
6788 self.type_argument_error_opt_mut().unwrap()
6789 }
6790 pub fn set_type_argument_error<T: Into<super::TypeArgumentError>>(
6793 &mut self,
6794 field: T,
6795 ) {
6796 self.error_details = Some(
6797 super::execution_error::ErrorDetails::TypeArgumentError(
6798 field.into().into(),
6799 ),
6800 );
6801 }
6802 pub fn with_type_argument_error<T: Into<super::TypeArgumentError>>(
6805 mut self,
6806 field: T,
6807 ) -> Self {
6808 self.set_type_argument_error(field.into());
6809 self
6810 }
6811 pub fn package_upgrade_error(&self) -> &super::PackageUpgradeError {
6813 if let Some(
6814 super::execution_error::ErrorDetails::PackageUpgradeError(field),
6815 ) = &self.error_details
6816 {
6817 field as _
6818 } else {
6819 super::PackageUpgradeError::default_instance() as _
6820 }
6821 }
6822 pub fn package_upgrade_error_opt(&self) -> Option<&super::PackageUpgradeError> {
6824 if let Some(
6825 super::execution_error::ErrorDetails::PackageUpgradeError(field),
6826 ) = &self.error_details
6827 {
6828 Some(field as _)
6829 } else {
6830 None
6831 }
6832 }
6833 pub fn package_upgrade_error_opt_mut(
6835 &mut self,
6836 ) -> Option<&mut super::PackageUpgradeError> {
6837 if let Some(
6838 super::execution_error::ErrorDetails::PackageUpgradeError(field),
6839 ) = &mut self.error_details
6840 {
6841 Some(field as _)
6842 } else {
6843 None
6844 }
6845 }
6846 pub fn package_upgrade_error_mut(&mut self) -> &mut super::PackageUpgradeError {
6850 if self.package_upgrade_error_opt_mut().is_none() {
6851 self.error_details = Some(
6852 super::execution_error::ErrorDetails::PackageUpgradeError(
6853 super::PackageUpgradeError::default(),
6854 ),
6855 );
6856 }
6857 self.package_upgrade_error_opt_mut().unwrap()
6858 }
6859 pub fn set_package_upgrade_error<T: Into<super::PackageUpgradeError>>(
6862 &mut self,
6863 field: T,
6864 ) {
6865 self.error_details = Some(
6866 super::execution_error::ErrorDetails::PackageUpgradeError(
6867 field.into().into(),
6868 ),
6869 );
6870 }
6871 pub fn with_package_upgrade_error<T: Into<super::PackageUpgradeError>>(
6874 mut self,
6875 field: T,
6876 ) -> Self {
6877 self.set_package_upgrade_error(field.into());
6878 self
6879 }
6880 pub fn index_error(&self) -> &super::IndexError {
6882 if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &self
6883 .error_details
6884 {
6885 field as _
6886 } else {
6887 super::IndexError::default_instance() as _
6888 }
6889 }
6890 pub fn index_error_opt(&self) -> Option<&super::IndexError> {
6892 if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &self
6893 .error_details
6894 {
6895 Some(field as _)
6896 } else {
6897 None
6898 }
6899 }
6900 pub fn index_error_opt_mut(&mut self) -> Option<&mut super::IndexError> {
6902 if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &mut self
6903 .error_details
6904 {
6905 Some(field as _)
6906 } else {
6907 None
6908 }
6909 }
6910 pub fn index_error_mut(&mut self) -> &mut super::IndexError {
6914 if self.index_error_opt_mut().is_none() {
6915 self.error_details = Some(
6916 super::execution_error::ErrorDetails::IndexError(
6917 super::IndexError::default(),
6918 ),
6919 );
6920 }
6921 self.index_error_opt_mut().unwrap()
6922 }
6923 pub fn set_index_error<T: Into<super::IndexError>>(&mut self, field: T) {
6926 self.error_details = Some(
6927 super::execution_error::ErrorDetails::IndexError(field.into().into()),
6928 );
6929 }
6930 pub fn with_index_error<T: Into<super::IndexError>>(mut self, field: T) -> Self {
6933 self.set_index_error(field.into());
6934 self
6935 }
6936 pub fn object_id(&self) -> &str {
6938 if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &self
6939 .error_details
6940 {
6941 field as _
6942 } else {
6943 ""
6944 }
6945 }
6946 pub fn object_id_opt(&self) -> Option<&str> {
6948 if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &self
6949 .error_details
6950 {
6951 Some(field as _)
6952 } else {
6953 None
6954 }
6955 }
6956 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
6958 if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &mut self
6959 .error_details
6960 {
6961 Some(field as _)
6962 } else {
6963 None
6964 }
6965 }
6966 pub fn object_id_mut(&mut self) -> &mut String {
6970 if self.object_id_opt_mut().is_none() {
6971 self.error_details = Some(
6972 super::execution_error::ErrorDetails::ObjectId(String::default()),
6973 );
6974 }
6975 self.object_id_opt_mut().unwrap()
6976 }
6977 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
6980 self.error_details = Some(
6981 super::execution_error::ErrorDetails::ObjectId(field.into().into()),
6982 );
6983 }
6984 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
6987 self.set_object_id(field.into());
6988 self
6989 }
6990 pub fn coin_deny_list_error(&self) -> &super::CoinDenyListError {
6992 if let Some(
6993 super::execution_error::ErrorDetails::CoinDenyListError(field),
6994 ) = &self.error_details
6995 {
6996 field as _
6997 } else {
6998 super::CoinDenyListError::default_instance() as _
6999 }
7000 }
7001 pub fn coin_deny_list_error_opt(&self) -> Option<&super::CoinDenyListError> {
7003 if let Some(
7004 super::execution_error::ErrorDetails::CoinDenyListError(field),
7005 ) = &self.error_details
7006 {
7007 Some(field as _)
7008 } else {
7009 None
7010 }
7011 }
7012 pub fn coin_deny_list_error_opt_mut(
7014 &mut self,
7015 ) -> Option<&mut super::CoinDenyListError> {
7016 if let Some(
7017 super::execution_error::ErrorDetails::CoinDenyListError(field),
7018 ) = &mut self.error_details
7019 {
7020 Some(field as _)
7021 } else {
7022 None
7023 }
7024 }
7025 pub fn coin_deny_list_error_mut(&mut self) -> &mut super::CoinDenyListError {
7029 if self.coin_deny_list_error_opt_mut().is_none() {
7030 self.error_details = Some(
7031 super::execution_error::ErrorDetails::CoinDenyListError(
7032 super::CoinDenyListError::default(),
7033 ),
7034 );
7035 }
7036 self.coin_deny_list_error_opt_mut().unwrap()
7037 }
7038 pub fn set_coin_deny_list_error<T: Into<super::CoinDenyListError>>(
7041 &mut self,
7042 field: T,
7043 ) {
7044 self.error_details = Some(
7045 super::execution_error::ErrorDetails::CoinDenyListError(
7046 field.into().into(),
7047 ),
7048 );
7049 }
7050 pub fn with_coin_deny_list_error<T: Into<super::CoinDenyListError>>(
7053 mut self,
7054 field: T,
7055 ) -> Self {
7056 self.set_coin_deny_list_error(field.into());
7057 self
7058 }
7059 pub fn congested_objects(&self) -> &super::CongestedObjects {
7061 if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &self
7062 .error_details
7063 {
7064 field as _
7065 } else {
7066 super::CongestedObjects::default_instance() as _
7067 }
7068 }
7069 pub fn congested_objects_opt(&self) -> Option<&super::CongestedObjects> {
7071 if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &self
7072 .error_details
7073 {
7074 Some(field as _)
7075 } else {
7076 None
7077 }
7078 }
7079 pub fn congested_objects_opt_mut(
7081 &mut self,
7082 ) -> Option<&mut super::CongestedObjects> {
7083 if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &mut self
7084 .error_details
7085 {
7086 Some(field as _)
7087 } else {
7088 None
7089 }
7090 }
7091 pub fn congested_objects_mut(&mut self) -> &mut super::CongestedObjects {
7095 if self.congested_objects_opt_mut().is_none() {
7096 self.error_details = Some(
7097 super::execution_error::ErrorDetails::CongestedObjects(
7098 super::CongestedObjects::default(),
7099 ),
7100 );
7101 }
7102 self.congested_objects_opt_mut().unwrap()
7103 }
7104 pub fn set_congested_objects<T: Into<super::CongestedObjects>>(
7107 &mut self,
7108 field: T,
7109 ) {
7110 self.error_details = Some(
7111 super::execution_error::ErrorDetails::CongestedObjects(
7112 field.into().into(),
7113 ),
7114 );
7115 }
7116 pub fn with_congested_objects<T: Into<super::CongestedObjects>>(
7119 mut self,
7120 field: T,
7121 ) -> Self {
7122 self.set_congested_objects(field.into());
7123 self
7124 }
7125 }
7126 impl super::ExecutionStatus {
7127 pub const fn const_default() -> Self {
7128 Self { success: None, error: None }
7129 }
7130 #[doc(hidden)]
7131 pub fn default_instance() -> &'static Self {
7132 static DEFAULT: super::ExecutionStatus = super::ExecutionStatus::const_default();
7133 &DEFAULT
7134 }
7135 pub fn success_opt_mut(&mut self) -> Option<&mut bool> {
7137 self.success.as_mut().map(|field| field as _)
7138 }
7139 pub fn success_mut(&mut self) -> &mut bool {
7142 self.success.get_or_insert_default()
7143 }
7144 pub fn success_opt(&self) -> Option<bool> {
7146 self.success.as_ref().map(|field| *field)
7147 }
7148 pub fn set_success(&mut self, field: bool) {
7150 self.success = Some(field);
7151 }
7152 pub fn with_success(mut self, field: bool) -> Self {
7154 self.set_success(field);
7155 self
7156 }
7157 pub fn error(&self) -> &super::ExecutionError {
7159 self.error
7160 .as_ref()
7161 .map(|field| field as _)
7162 .unwrap_or_else(|| super::ExecutionError::default_instance() as _)
7163 }
7164 pub fn error_opt_mut(&mut self) -> Option<&mut super::ExecutionError> {
7166 self.error.as_mut().map(|field| field as _)
7167 }
7168 pub fn error_mut(&mut self) -> &mut super::ExecutionError {
7171 self.error.get_or_insert_default()
7172 }
7173 pub fn error_opt(&self) -> Option<&super::ExecutionError> {
7175 self.error.as_ref().map(|field| field as _)
7176 }
7177 pub fn set_error<T: Into<super::ExecutionError>>(&mut self, field: T) {
7179 self.error = Some(field.into().into());
7180 }
7181 pub fn with_error<T: Into<super::ExecutionError>>(mut self, field: T) -> Self {
7183 self.set_error(field.into());
7184 self
7185 }
7186 }
7187 impl super::ExecutionTimeObservation {
7188 pub const fn const_default() -> Self {
7189 Self {
7190 kind: None,
7191 move_entry_point: None,
7192 validator_observations: Vec::new(),
7193 }
7194 }
7195 #[doc(hidden)]
7196 pub fn default_instance() -> &'static Self {
7197 static DEFAULT: super::ExecutionTimeObservation = super::ExecutionTimeObservation::const_default();
7198 &DEFAULT
7199 }
7200 pub fn with_kind<
7202 T: Into<super::execution_time_observation::ExecutionTimeObservationKind>,
7203 >(mut self, field: T) -> Self {
7204 self.set_kind(field.into());
7205 self
7206 }
7207 pub fn move_entry_point(&self) -> &super::MoveCall {
7209 self.move_entry_point
7210 .as_ref()
7211 .map(|field| field as _)
7212 .unwrap_or_else(|| super::MoveCall::default_instance() as _)
7213 }
7214 pub fn move_entry_point_opt_mut(&mut self) -> Option<&mut super::MoveCall> {
7216 self.move_entry_point.as_mut().map(|field| field as _)
7217 }
7218 pub fn move_entry_point_mut(&mut self) -> &mut super::MoveCall {
7221 self.move_entry_point.get_or_insert_default()
7222 }
7223 pub fn move_entry_point_opt(&self) -> Option<&super::MoveCall> {
7225 self.move_entry_point.as_ref().map(|field| field as _)
7226 }
7227 pub fn set_move_entry_point<T: Into<super::MoveCall>>(&mut self, field: T) {
7229 self.move_entry_point = Some(field.into().into());
7230 }
7231 pub fn with_move_entry_point<T: Into<super::MoveCall>>(
7233 mut self,
7234 field: T,
7235 ) -> Self {
7236 self.set_move_entry_point(field.into());
7237 self
7238 }
7239 pub fn validator_observations(
7241 &self,
7242 ) -> &[super::ValidatorExecutionTimeObservation] {
7243 &self.validator_observations
7244 }
7245 pub fn validator_observations_mut(
7248 &mut self,
7249 ) -> &mut Vec<super::ValidatorExecutionTimeObservation> {
7250 &mut self.validator_observations
7251 }
7252 pub fn set_validator_observations(
7254 &mut self,
7255 field: Vec<super::ValidatorExecutionTimeObservation>,
7256 ) {
7257 self.validator_observations = field;
7258 }
7259 pub fn with_validator_observations(
7261 mut self,
7262 field: Vec<super::ValidatorExecutionTimeObservation>,
7263 ) -> Self {
7264 self.set_validator_observations(field);
7265 self
7266 }
7267 }
7268 impl super::ExecutionTimeObservations {
7269 pub const fn const_default() -> Self {
7270 Self {
7271 version: None,
7272 observations: Vec::new(),
7273 }
7274 }
7275 #[doc(hidden)]
7276 pub fn default_instance() -> &'static Self {
7277 static DEFAULT: super::ExecutionTimeObservations = super::ExecutionTimeObservations::const_default();
7278 &DEFAULT
7279 }
7280 pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
7282 self.version.as_mut().map(|field| field as _)
7283 }
7284 pub fn version_mut(&mut self) -> &mut i32 {
7287 self.version.get_or_insert_default()
7288 }
7289 pub fn version_opt(&self) -> Option<i32> {
7291 self.version.as_ref().map(|field| *field)
7292 }
7293 pub fn set_version(&mut self, field: i32) {
7295 self.version = Some(field);
7296 }
7297 pub fn with_version(mut self, field: i32) -> Self {
7299 self.set_version(field);
7300 self
7301 }
7302 pub fn observations(&self) -> &[super::ExecutionTimeObservation] {
7304 &self.observations
7305 }
7306 pub fn observations_mut(&mut self) -> &mut Vec<super::ExecutionTimeObservation> {
7309 &mut self.observations
7310 }
7311 pub fn set_observations(&mut self, field: Vec<super::ExecutionTimeObservation>) {
7313 self.observations = field;
7314 }
7315 pub fn with_observations(
7317 mut self,
7318 field: Vec<super::ExecutionTimeObservation>,
7319 ) -> Self {
7320 self.set_observations(field);
7321 self
7322 }
7323 }
7324 impl super::FieldDescriptor {
7325 pub const fn const_default() -> Self {
7326 Self {
7327 name: None,
7328 position: None,
7329 r#type: None,
7330 }
7331 }
7332 #[doc(hidden)]
7333 pub fn default_instance() -> &'static Self {
7334 static DEFAULT: super::FieldDescriptor = super::FieldDescriptor::const_default();
7335 &DEFAULT
7336 }
7337 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
7339 self.name.as_mut().map(|field| field as _)
7340 }
7341 pub fn name_mut(&mut self) -> &mut String {
7344 self.name.get_or_insert_default()
7345 }
7346 pub fn name_opt(&self) -> Option<&str> {
7348 self.name.as_ref().map(|field| field as _)
7349 }
7350 pub fn set_name<T: Into<String>>(&mut self, field: T) {
7352 self.name = Some(field.into().into());
7353 }
7354 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
7356 self.set_name(field.into());
7357 self
7358 }
7359 pub fn position_opt_mut(&mut self) -> Option<&mut u32> {
7361 self.position.as_mut().map(|field| field as _)
7362 }
7363 pub fn position_mut(&mut self) -> &mut u32 {
7366 self.position.get_or_insert_default()
7367 }
7368 pub fn position_opt(&self) -> Option<u32> {
7370 self.position.as_ref().map(|field| *field)
7371 }
7372 pub fn set_position(&mut self, field: u32) {
7374 self.position = Some(field);
7375 }
7376 pub fn with_position(mut self, field: u32) -> Self {
7378 self.set_position(field);
7379 self
7380 }
7381 pub fn r#type(&self) -> &super::OpenSignatureBody {
7383 self.r#type
7384 .as_ref()
7385 .map(|field| field as _)
7386 .unwrap_or_else(|| super::OpenSignatureBody::default_instance() as _)
7387 }
7388 pub fn type_opt_mut(&mut self) -> Option<&mut super::OpenSignatureBody> {
7390 self.r#type.as_mut().map(|field| field as _)
7391 }
7392 pub fn type_mut(&mut self) -> &mut super::OpenSignatureBody {
7395 self.r#type.get_or_insert_default()
7396 }
7397 pub fn type_opt(&self) -> Option<&super::OpenSignatureBody> {
7399 self.r#type.as_ref().map(|field| field as _)
7400 }
7401 pub fn set_type<T: Into<super::OpenSignatureBody>>(&mut self, field: T) {
7403 self.r#type = Some(field.into().into());
7404 }
7405 pub fn with_type<T: Into<super::OpenSignatureBody>>(mut self, field: T) -> Self {
7407 self.set_type(field.into());
7408 self
7409 }
7410 }
7411 impl super::FunctionDescriptor {
7412 pub const fn const_default() -> Self {
7413 Self {
7414 name: None,
7415 visibility: None,
7416 is_entry: None,
7417 type_parameters: Vec::new(),
7418 parameters: Vec::new(),
7419 returns: Vec::new(),
7420 }
7421 }
7422 #[doc(hidden)]
7423 pub fn default_instance() -> &'static Self {
7424 static DEFAULT: super::FunctionDescriptor = super::FunctionDescriptor::const_default();
7425 &DEFAULT
7426 }
7427 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
7429 self.name.as_mut().map(|field| field as _)
7430 }
7431 pub fn name_mut(&mut self) -> &mut String {
7434 self.name.get_or_insert_default()
7435 }
7436 pub fn name_opt(&self) -> Option<&str> {
7438 self.name.as_ref().map(|field| field as _)
7439 }
7440 pub fn set_name<T: Into<String>>(&mut self, field: T) {
7442 self.name = Some(field.into().into());
7443 }
7444 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
7446 self.set_name(field.into());
7447 self
7448 }
7449 pub fn with_visibility<T: Into<super::function_descriptor::Visibility>>(
7451 mut self,
7452 field: T,
7453 ) -> Self {
7454 self.set_visibility(field.into());
7455 self
7456 }
7457 pub fn is_entry_opt_mut(&mut self) -> Option<&mut bool> {
7459 self.is_entry.as_mut().map(|field| field as _)
7460 }
7461 pub fn is_entry_mut(&mut self) -> &mut bool {
7464 self.is_entry.get_or_insert_default()
7465 }
7466 pub fn is_entry_opt(&self) -> Option<bool> {
7468 self.is_entry.as_ref().map(|field| *field)
7469 }
7470 pub fn set_is_entry(&mut self, field: bool) {
7472 self.is_entry = Some(field);
7473 }
7474 pub fn with_is_entry(mut self, field: bool) -> Self {
7476 self.set_is_entry(field);
7477 self
7478 }
7479 pub fn type_parameters(&self) -> &[super::TypeParameter] {
7481 &self.type_parameters
7482 }
7483 pub fn type_parameters_mut(&mut self) -> &mut Vec<super::TypeParameter> {
7486 &mut self.type_parameters
7487 }
7488 pub fn set_type_parameters(&mut self, field: Vec<super::TypeParameter>) {
7490 self.type_parameters = field;
7491 }
7492 pub fn with_type_parameters(mut self, field: Vec<super::TypeParameter>) -> Self {
7494 self.set_type_parameters(field);
7495 self
7496 }
7497 pub fn parameters(&self) -> &[super::OpenSignature] {
7499 &self.parameters
7500 }
7501 pub fn parameters_mut(&mut self) -> &mut Vec<super::OpenSignature> {
7504 &mut self.parameters
7505 }
7506 pub fn set_parameters(&mut self, field: Vec<super::OpenSignature>) {
7508 self.parameters = field;
7509 }
7510 pub fn with_parameters(mut self, field: Vec<super::OpenSignature>) -> Self {
7512 self.set_parameters(field);
7513 self
7514 }
7515 pub fn returns(&self) -> &[super::OpenSignature] {
7517 &self.returns
7518 }
7519 pub fn returns_mut(&mut self) -> &mut Vec<super::OpenSignature> {
7522 &mut self.returns
7523 }
7524 pub fn set_returns(&mut self, field: Vec<super::OpenSignature>) {
7526 self.returns = field;
7527 }
7528 pub fn with_returns(mut self, field: Vec<super::OpenSignature>) -> Self {
7530 self.set_returns(field);
7531 self
7532 }
7533 }
7534 impl super::FundsWithdrawal {
7535 pub const fn const_default() -> Self {
7536 Self {
7537 amount: None,
7538 coin_type: None,
7539 source: None,
7540 funder: None,
7541 allowance: None,
7542 seized_from: None,
7543 seize_auth: None,
7544 }
7545 }
7546 #[doc(hidden)]
7547 pub fn default_instance() -> &'static Self {
7548 static DEFAULT: super::FundsWithdrawal = super::FundsWithdrawal::const_default();
7549 &DEFAULT
7550 }
7551 pub fn amount_opt_mut(&mut self) -> Option<&mut u64> {
7553 self.amount.as_mut().map(|field| field as _)
7554 }
7555 pub fn amount_mut(&mut self) -> &mut u64 {
7558 self.amount.get_or_insert_default()
7559 }
7560 pub fn amount_opt(&self) -> Option<u64> {
7562 self.amount.as_ref().map(|field| *field)
7563 }
7564 pub fn set_amount(&mut self, field: u64) {
7566 self.amount = Some(field);
7567 }
7568 pub fn with_amount(mut self, field: u64) -> Self {
7570 self.set_amount(field);
7571 self
7572 }
7573 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
7575 self.coin_type.as_mut().map(|field| field as _)
7576 }
7577 pub fn coin_type_mut(&mut self) -> &mut String {
7580 self.coin_type.get_or_insert_default()
7581 }
7582 pub fn coin_type_opt(&self) -> Option<&str> {
7584 self.coin_type.as_ref().map(|field| field as _)
7585 }
7586 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
7588 self.coin_type = Some(field.into().into());
7589 }
7590 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
7592 self.set_coin_type(field.into());
7593 self
7594 }
7595 pub fn with_source<T: Into<super::funds_withdrawal::Source>>(
7597 mut self,
7598 field: T,
7599 ) -> Self {
7600 self.set_source(field.into());
7601 self
7602 }
7603 pub fn funder_opt_mut(&mut self) -> Option<&mut String> {
7605 self.funder.as_mut().map(|field| field as _)
7606 }
7607 pub fn funder_mut(&mut self) -> &mut String {
7610 self.funder.get_or_insert_default()
7611 }
7612 pub fn funder_opt(&self) -> Option<&str> {
7614 self.funder.as_ref().map(|field| field as _)
7615 }
7616 pub fn set_funder<T: Into<String>>(&mut self, field: T) {
7618 self.funder = Some(field.into().into());
7619 }
7620 pub fn with_funder<T: Into<String>>(mut self, field: T) -> Self {
7622 self.set_funder(field.into());
7623 self
7624 }
7625 pub fn allowance_opt_mut(&mut self) -> Option<&mut String> {
7627 self.allowance.as_mut().map(|field| field as _)
7628 }
7629 pub fn allowance_mut(&mut self) -> &mut String {
7632 self.allowance.get_or_insert_default()
7633 }
7634 pub fn allowance_opt(&self) -> Option<&str> {
7636 self.allowance.as_ref().map(|field| field as _)
7637 }
7638 pub fn set_allowance<T: Into<String>>(&mut self, field: T) {
7640 self.allowance = Some(field.into().into());
7641 }
7642 pub fn with_allowance<T: Into<String>>(mut self, field: T) -> Self {
7644 self.set_allowance(field.into());
7645 self
7646 }
7647 pub fn seized_from_opt_mut(&mut self) -> Option<&mut String> {
7649 self.seized_from.as_mut().map(|field| field as _)
7650 }
7651 pub fn seized_from_mut(&mut self) -> &mut String {
7654 self.seized_from.get_or_insert_default()
7655 }
7656 pub fn seized_from_opt(&self) -> Option<&str> {
7658 self.seized_from.as_ref().map(|field| field as _)
7659 }
7660 pub fn set_seized_from<T: Into<String>>(&mut self, field: T) {
7662 self.seized_from = Some(field.into().into());
7663 }
7664 pub fn with_seized_from<T: Into<String>>(mut self, field: T) -> Self {
7666 self.set_seized_from(field.into());
7667 self
7668 }
7669 pub fn seize_auth_opt_mut(&mut self) -> Option<&mut String> {
7671 self.seize_auth.as_mut().map(|field| field as _)
7672 }
7673 pub fn seize_auth_mut(&mut self) -> &mut String {
7676 self.seize_auth.get_or_insert_default()
7677 }
7678 pub fn seize_auth_opt(&self) -> Option<&str> {
7680 self.seize_auth.as_ref().map(|field| field as _)
7681 }
7682 pub fn set_seize_auth<T: Into<String>>(&mut self, field: T) {
7684 self.seize_auth = Some(field.into().into());
7685 }
7686 pub fn with_seize_auth<T: Into<String>>(mut self, field: T) -> Self {
7688 self.set_seize_auth(field.into());
7689 self
7690 }
7691 }
7692 impl super::GasCostSummary {
7693 pub const fn const_default() -> Self {
7694 Self {
7695 computation_cost: None,
7696 storage_cost: None,
7697 storage_rebate: None,
7698 non_refundable_storage_fee: None,
7699 }
7700 }
7701 #[doc(hidden)]
7702 pub fn default_instance() -> &'static Self {
7703 static DEFAULT: super::GasCostSummary = super::GasCostSummary::const_default();
7704 &DEFAULT
7705 }
7706 pub fn computation_cost_opt_mut(&mut self) -> Option<&mut u64> {
7708 self.computation_cost.as_mut().map(|field| field as _)
7709 }
7710 pub fn computation_cost_mut(&mut self) -> &mut u64 {
7713 self.computation_cost.get_or_insert_default()
7714 }
7715 pub fn computation_cost_opt(&self) -> Option<u64> {
7717 self.computation_cost.as_ref().map(|field| *field)
7718 }
7719 pub fn set_computation_cost(&mut self, field: u64) {
7721 self.computation_cost = Some(field);
7722 }
7723 pub fn with_computation_cost(mut self, field: u64) -> Self {
7725 self.set_computation_cost(field);
7726 self
7727 }
7728 pub fn storage_cost_opt_mut(&mut self) -> Option<&mut u64> {
7730 self.storage_cost.as_mut().map(|field| field as _)
7731 }
7732 pub fn storage_cost_mut(&mut self) -> &mut u64 {
7735 self.storage_cost.get_or_insert_default()
7736 }
7737 pub fn storage_cost_opt(&self) -> Option<u64> {
7739 self.storage_cost.as_ref().map(|field| *field)
7740 }
7741 pub fn set_storage_cost(&mut self, field: u64) {
7743 self.storage_cost = Some(field);
7744 }
7745 pub fn with_storage_cost(mut self, field: u64) -> Self {
7747 self.set_storage_cost(field);
7748 self
7749 }
7750 pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
7752 self.storage_rebate.as_mut().map(|field| field as _)
7753 }
7754 pub fn storage_rebate_mut(&mut self) -> &mut u64 {
7757 self.storage_rebate.get_or_insert_default()
7758 }
7759 pub fn storage_rebate_opt(&self) -> Option<u64> {
7761 self.storage_rebate.as_ref().map(|field| *field)
7762 }
7763 pub fn set_storage_rebate(&mut self, field: u64) {
7765 self.storage_rebate = Some(field);
7766 }
7767 pub fn with_storage_rebate(mut self, field: u64) -> Self {
7769 self.set_storage_rebate(field);
7770 self
7771 }
7772 pub fn non_refundable_storage_fee_opt_mut(&mut self) -> Option<&mut u64> {
7774 self.non_refundable_storage_fee.as_mut().map(|field| field as _)
7775 }
7776 pub fn non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
7779 self.non_refundable_storage_fee.get_or_insert_default()
7780 }
7781 pub fn non_refundable_storage_fee_opt(&self) -> Option<u64> {
7783 self.non_refundable_storage_fee.as_ref().map(|field| *field)
7784 }
7785 pub fn set_non_refundable_storage_fee(&mut self, field: u64) {
7787 self.non_refundable_storage_fee = Some(field);
7788 }
7789 pub fn with_non_refundable_storage_fee(mut self, field: u64) -> Self {
7791 self.set_non_refundable_storage_fee(field);
7792 self
7793 }
7794 }
7795 impl super::GasPayment {
7796 pub const fn const_default() -> Self {
7797 Self {
7798 objects: Vec::new(),
7799 owner: None,
7800 price: None,
7801 budget: None,
7802 }
7803 }
7804 #[doc(hidden)]
7805 pub fn default_instance() -> &'static Self {
7806 static DEFAULT: super::GasPayment = super::GasPayment::const_default();
7807 &DEFAULT
7808 }
7809 pub fn objects(&self) -> &[super::ObjectReference] {
7811 &self.objects
7812 }
7813 pub fn objects_mut(&mut self) -> &mut Vec<super::ObjectReference> {
7816 &mut self.objects
7817 }
7818 pub fn set_objects(&mut self, field: Vec<super::ObjectReference>) {
7820 self.objects = field;
7821 }
7822 pub fn with_objects(mut self, field: Vec<super::ObjectReference>) -> Self {
7824 self.set_objects(field);
7825 self
7826 }
7827 pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
7829 self.owner.as_mut().map(|field| field as _)
7830 }
7831 pub fn owner_mut(&mut self) -> &mut String {
7834 self.owner.get_or_insert_default()
7835 }
7836 pub fn owner_opt(&self) -> Option<&str> {
7838 self.owner.as_ref().map(|field| field as _)
7839 }
7840 pub fn set_owner<T: Into<String>>(&mut self, field: T) {
7842 self.owner = Some(field.into().into());
7843 }
7844 pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
7846 self.set_owner(field.into());
7847 self
7848 }
7849 pub fn price_opt_mut(&mut self) -> Option<&mut u64> {
7851 self.price.as_mut().map(|field| field as _)
7852 }
7853 pub fn price_mut(&mut self) -> &mut u64 {
7856 self.price.get_or_insert_default()
7857 }
7858 pub fn price_opt(&self) -> Option<u64> {
7860 self.price.as_ref().map(|field| *field)
7861 }
7862 pub fn set_price(&mut self, field: u64) {
7864 self.price = Some(field);
7865 }
7866 pub fn with_price(mut self, field: u64) -> Self {
7868 self.set_price(field);
7869 self
7870 }
7871 pub fn budget_opt_mut(&mut self) -> Option<&mut u64> {
7873 self.budget.as_mut().map(|field| field as _)
7874 }
7875 pub fn budget_mut(&mut self) -> &mut u64 {
7878 self.budget.get_or_insert_default()
7879 }
7880 pub fn budget_opt(&self) -> Option<u64> {
7882 self.budget.as_ref().map(|field| *field)
7883 }
7884 pub fn set_budget(&mut self, field: u64) {
7886 self.budget = Some(field);
7887 }
7888 pub fn with_budget(mut self, field: u64) -> Self {
7890 self.set_budget(field);
7891 self
7892 }
7893 }
7894 impl super::GenesisTransaction {
7895 pub const fn const_default() -> Self {
7896 Self { objects: Vec::new() }
7897 }
7898 #[doc(hidden)]
7899 pub fn default_instance() -> &'static Self {
7900 static DEFAULT: super::GenesisTransaction = super::GenesisTransaction::const_default();
7901 &DEFAULT
7902 }
7903 pub fn objects(&self) -> &[super::Object] {
7905 &self.objects
7906 }
7907 pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
7910 &mut self.objects
7911 }
7912 pub fn set_objects(&mut self, field: Vec<super::Object>) {
7914 self.objects = field;
7915 }
7916 pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
7918 self.set_objects(field);
7919 self
7920 }
7921 }
7922 impl super::GetBalanceRequest {
7923 pub const fn const_default() -> Self {
7924 Self {
7925 owner: None,
7926 coin_type: None,
7927 }
7928 }
7929 #[doc(hidden)]
7930 pub fn default_instance() -> &'static Self {
7931 static DEFAULT: super::GetBalanceRequest = super::GetBalanceRequest::const_default();
7932 &DEFAULT
7933 }
7934 pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
7936 self.owner.as_mut().map(|field| field as _)
7937 }
7938 pub fn owner_mut(&mut self) -> &mut String {
7941 self.owner.get_or_insert_default()
7942 }
7943 pub fn owner_opt(&self) -> Option<&str> {
7945 self.owner.as_ref().map(|field| field as _)
7946 }
7947 pub fn set_owner<T: Into<String>>(&mut self, field: T) {
7949 self.owner = Some(field.into().into());
7950 }
7951 pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
7953 self.set_owner(field.into());
7954 self
7955 }
7956 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
7958 self.coin_type.as_mut().map(|field| field as _)
7959 }
7960 pub fn coin_type_mut(&mut self) -> &mut String {
7963 self.coin_type.get_or_insert_default()
7964 }
7965 pub fn coin_type_opt(&self) -> Option<&str> {
7967 self.coin_type.as_ref().map(|field| field as _)
7968 }
7969 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
7971 self.coin_type = Some(field.into().into());
7972 }
7973 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
7975 self.set_coin_type(field.into());
7976 self
7977 }
7978 }
7979 impl super::GetBalanceResponse {
7980 pub const fn const_default() -> Self {
7981 Self { balance: None }
7982 }
7983 #[doc(hidden)]
7984 pub fn default_instance() -> &'static Self {
7985 static DEFAULT: super::GetBalanceResponse = super::GetBalanceResponse::const_default();
7986 &DEFAULT
7987 }
7988 pub fn balance(&self) -> &super::Balance {
7990 self.balance
7991 .as_ref()
7992 .map(|field| field as _)
7993 .unwrap_or_else(|| super::Balance::default_instance() as _)
7994 }
7995 pub fn balance_opt_mut(&mut self) -> Option<&mut super::Balance> {
7997 self.balance.as_mut().map(|field| field as _)
7998 }
7999 pub fn balance_mut(&mut self) -> &mut super::Balance {
8002 self.balance.get_or_insert_default()
8003 }
8004 pub fn balance_opt(&self) -> Option<&super::Balance> {
8006 self.balance.as_ref().map(|field| field as _)
8007 }
8008 pub fn set_balance<T: Into<super::Balance>>(&mut self, field: T) {
8010 self.balance = Some(field.into().into());
8011 }
8012 pub fn with_balance<T: Into<super::Balance>>(mut self, field: T) -> Self {
8014 self.set_balance(field.into());
8015 self
8016 }
8017 }
8018 impl super::GetCheckpointRequest {
8019 pub const fn const_default() -> Self {
8020 Self {
8021 read_mask: None,
8022 checkpoint_id: None,
8023 }
8024 }
8025 #[doc(hidden)]
8026 pub fn default_instance() -> &'static Self {
8027 static DEFAULT: super::GetCheckpointRequest = super::GetCheckpointRequest::const_default();
8028 &DEFAULT
8029 }
8030 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
8032 self.read_mask.as_mut().map(|field| field as _)
8033 }
8034 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
8037 self.read_mask.get_or_insert_default()
8038 }
8039 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
8041 self.read_mask.as_ref().map(|field| field as _)
8042 }
8043 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
8045 self.read_mask = Some(field.into().into());
8046 }
8047 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
8049 mut self,
8050 field: T,
8051 ) -> Self {
8052 self.set_read_mask(field.into());
8053 self
8054 }
8055 pub fn sequence_number(&self) -> u64 {
8057 if let Some(
8058 super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
8059 ) = &self.checkpoint_id
8060 {
8061 *field
8062 } else {
8063 0u64
8064 }
8065 }
8066 pub fn sequence_number_opt(&self) -> Option<u64> {
8068 if let Some(
8069 super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
8070 ) = &self.checkpoint_id
8071 {
8072 Some(*field)
8073 } else {
8074 None
8075 }
8076 }
8077 pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
8079 if let Some(
8080 super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
8081 ) = &mut self.checkpoint_id
8082 {
8083 Some(field as _)
8084 } else {
8085 None
8086 }
8087 }
8088 pub fn sequence_number_mut(&mut self) -> &mut u64 {
8092 if self.sequence_number_opt_mut().is_none() {
8093 self.checkpoint_id = Some(
8094 super::get_checkpoint_request::CheckpointId::SequenceNumber(
8095 u64::default(),
8096 ),
8097 );
8098 }
8099 self.sequence_number_opt_mut().unwrap()
8100 }
8101 pub fn set_sequence_number(&mut self, field: u64) {
8104 self.checkpoint_id = Some(
8105 super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
8106 );
8107 }
8108 pub fn with_sequence_number(mut self, field: u64) -> Self {
8111 self.set_sequence_number(field);
8112 self
8113 }
8114 pub fn digest(&self) -> &str {
8116 if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &self
8117 .checkpoint_id
8118 {
8119 field as _
8120 } else {
8121 ""
8122 }
8123 }
8124 pub fn digest_opt(&self) -> Option<&str> {
8126 if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &self
8127 .checkpoint_id
8128 {
8129 Some(field as _)
8130 } else {
8131 None
8132 }
8133 }
8134 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
8136 if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &mut self
8137 .checkpoint_id
8138 {
8139 Some(field as _)
8140 } else {
8141 None
8142 }
8143 }
8144 pub fn digest_mut(&mut self) -> &mut String {
8148 if self.digest_opt_mut().is_none() {
8149 self.checkpoint_id = Some(
8150 super::get_checkpoint_request::CheckpointId::Digest(
8151 String::default(),
8152 ),
8153 );
8154 }
8155 self.digest_opt_mut().unwrap()
8156 }
8157 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
8160 self.checkpoint_id = Some(
8161 super::get_checkpoint_request::CheckpointId::Digest(field.into().into()),
8162 );
8163 }
8164 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
8167 self.set_digest(field.into());
8168 self
8169 }
8170 }
8171 impl super::GetCheckpointResponse {
8172 pub const fn const_default() -> Self {
8173 Self { checkpoint: None }
8174 }
8175 #[doc(hidden)]
8176 pub fn default_instance() -> &'static Self {
8177 static DEFAULT: super::GetCheckpointResponse = super::GetCheckpointResponse::const_default();
8178 &DEFAULT
8179 }
8180 pub fn checkpoint(&self) -> &super::Checkpoint {
8182 self.checkpoint
8183 .as_ref()
8184 .map(|field| field as _)
8185 .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
8186 }
8187 pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
8189 self.checkpoint.as_mut().map(|field| field as _)
8190 }
8191 pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
8194 self.checkpoint.get_or_insert_default()
8195 }
8196 pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
8198 self.checkpoint.as_ref().map(|field| field as _)
8199 }
8200 pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
8202 self.checkpoint = Some(field.into().into());
8203 }
8204 pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
8206 self.set_checkpoint(field.into());
8207 self
8208 }
8209 }
8210 impl super::GetCoinInfoRequest {
8211 pub const fn const_default() -> Self {
8212 Self { coin_type: None }
8213 }
8214 #[doc(hidden)]
8215 pub fn default_instance() -> &'static Self {
8216 static DEFAULT: super::GetCoinInfoRequest = super::GetCoinInfoRequest::const_default();
8217 &DEFAULT
8218 }
8219 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
8221 self.coin_type.as_mut().map(|field| field as _)
8222 }
8223 pub fn coin_type_mut(&mut self) -> &mut String {
8226 self.coin_type.get_or_insert_default()
8227 }
8228 pub fn coin_type_opt(&self) -> Option<&str> {
8230 self.coin_type.as_ref().map(|field| field as _)
8231 }
8232 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
8234 self.coin_type = Some(field.into().into());
8235 }
8236 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
8238 self.set_coin_type(field.into());
8239 self
8240 }
8241 }
8242 impl super::GetCoinInfoResponse {
8243 pub const fn const_default() -> Self {
8244 Self {
8245 coin_type: None,
8246 metadata: None,
8247 treasury: None,
8248 regulated_metadata: None,
8249 }
8250 }
8251 #[doc(hidden)]
8252 pub fn default_instance() -> &'static Self {
8253 static DEFAULT: super::GetCoinInfoResponse = super::GetCoinInfoResponse::const_default();
8254 &DEFAULT
8255 }
8256 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
8258 self.coin_type.as_mut().map(|field| field as _)
8259 }
8260 pub fn coin_type_mut(&mut self) -> &mut String {
8263 self.coin_type.get_or_insert_default()
8264 }
8265 pub fn coin_type_opt(&self) -> Option<&str> {
8267 self.coin_type.as_ref().map(|field| field as _)
8268 }
8269 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
8271 self.coin_type = Some(field.into().into());
8272 }
8273 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
8275 self.set_coin_type(field.into());
8276 self
8277 }
8278 pub fn metadata(&self) -> &super::CoinMetadata {
8280 self.metadata
8281 .as_ref()
8282 .map(|field| field as _)
8283 .unwrap_or_else(|| super::CoinMetadata::default_instance() as _)
8284 }
8285 pub fn metadata_opt_mut(&mut self) -> Option<&mut super::CoinMetadata> {
8287 self.metadata.as_mut().map(|field| field as _)
8288 }
8289 pub fn metadata_mut(&mut self) -> &mut super::CoinMetadata {
8292 self.metadata.get_or_insert_default()
8293 }
8294 pub fn metadata_opt(&self) -> Option<&super::CoinMetadata> {
8296 self.metadata.as_ref().map(|field| field as _)
8297 }
8298 pub fn set_metadata<T: Into<super::CoinMetadata>>(&mut self, field: T) {
8300 self.metadata = Some(field.into().into());
8301 }
8302 pub fn with_metadata<T: Into<super::CoinMetadata>>(mut self, field: T) -> Self {
8304 self.set_metadata(field.into());
8305 self
8306 }
8307 pub fn treasury(&self) -> &super::CoinTreasury {
8309 self.treasury
8310 .as_ref()
8311 .map(|field| field as _)
8312 .unwrap_or_else(|| super::CoinTreasury::default_instance() as _)
8313 }
8314 pub fn treasury_opt_mut(&mut self) -> Option<&mut super::CoinTreasury> {
8316 self.treasury.as_mut().map(|field| field as _)
8317 }
8318 pub fn treasury_mut(&mut self) -> &mut super::CoinTreasury {
8321 self.treasury.get_or_insert_default()
8322 }
8323 pub fn treasury_opt(&self) -> Option<&super::CoinTreasury> {
8325 self.treasury.as_ref().map(|field| field as _)
8326 }
8327 pub fn set_treasury<T: Into<super::CoinTreasury>>(&mut self, field: T) {
8329 self.treasury = Some(field.into().into());
8330 }
8331 pub fn with_treasury<T: Into<super::CoinTreasury>>(mut self, field: T) -> Self {
8333 self.set_treasury(field.into());
8334 self
8335 }
8336 pub fn regulated_metadata(&self) -> &super::RegulatedCoinMetadata {
8338 self.regulated_metadata
8339 .as_ref()
8340 .map(|field| field as _)
8341 .unwrap_or_else(|| super::RegulatedCoinMetadata::default_instance() as _)
8342 }
8343 pub fn regulated_metadata_opt_mut(
8345 &mut self,
8346 ) -> Option<&mut super::RegulatedCoinMetadata> {
8347 self.regulated_metadata.as_mut().map(|field| field as _)
8348 }
8349 pub fn regulated_metadata_mut(&mut self) -> &mut super::RegulatedCoinMetadata {
8352 self.regulated_metadata.get_or_insert_default()
8353 }
8354 pub fn regulated_metadata_opt(&self) -> Option<&super::RegulatedCoinMetadata> {
8356 self.regulated_metadata.as_ref().map(|field| field as _)
8357 }
8358 pub fn set_regulated_metadata<T: Into<super::RegulatedCoinMetadata>>(
8360 &mut self,
8361 field: T,
8362 ) {
8363 self.regulated_metadata = Some(field.into().into());
8364 }
8365 pub fn with_regulated_metadata<T: Into<super::RegulatedCoinMetadata>>(
8367 mut self,
8368 field: T,
8369 ) -> Self {
8370 self.set_regulated_metadata(field.into());
8371 self
8372 }
8373 }
8374 impl super::GetDatatypeRequest {
8375 pub const fn const_default() -> Self {
8376 Self {
8377 package_id: None,
8378 module_name: None,
8379 name: None,
8380 }
8381 }
8382 #[doc(hidden)]
8383 pub fn default_instance() -> &'static Self {
8384 static DEFAULT: super::GetDatatypeRequest = super::GetDatatypeRequest::const_default();
8385 &DEFAULT
8386 }
8387 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
8389 self.package_id.as_mut().map(|field| field as _)
8390 }
8391 pub fn package_id_mut(&mut self) -> &mut String {
8394 self.package_id.get_or_insert_default()
8395 }
8396 pub fn package_id_opt(&self) -> Option<&str> {
8398 self.package_id.as_ref().map(|field| field as _)
8399 }
8400 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
8402 self.package_id = Some(field.into().into());
8403 }
8404 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
8406 self.set_package_id(field.into());
8407 self
8408 }
8409 pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
8411 self.module_name.as_mut().map(|field| field as _)
8412 }
8413 pub fn module_name_mut(&mut self) -> &mut String {
8416 self.module_name.get_or_insert_default()
8417 }
8418 pub fn module_name_opt(&self) -> Option<&str> {
8420 self.module_name.as_ref().map(|field| field as _)
8421 }
8422 pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
8424 self.module_name = Some(field.into().into());
8425 }
8426 pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
8428 self.set_module_name(field.into());
8429 self
8430 }
8431 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
8433 self.name.as_mut().map(|field| field as _)
8434 }
8435 pub fn name_mut(&mut self) -> &mut String {
8438 self.name.get_or_insert_default()
8439 }
8440 pub fn name_opt(&self) -> Option<&str> {
8442 self.name.as_ref().map(|field| field as _)
8443 }
8444 pub fn set_name<T: Into<String>>(&mut self, field: T) {
8446 self.name = Some(field.into().into());
8447 }
8448 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
8450 self.set_name(field.into());
8451 self
8452 }
8453 }
8454 impl super::GetDatatypeResponse {
8455 pub const fn const_default() -> Self {
8456 Self { datatype: None }
8457 }
8458 #[doc(hidden)]
8459 pub fn default_instance() -> &'static Self {
8460 static DEFAULT: super::GetDatatypeResponse = super::GetDatatypeResponse::const_default();
8461 &DEFAULT
8462 }
8463 pub fn datatype(&self) -> &super::DatatypeDescriptor {
8465 self.datatype
8466 .as_ref()
8467 .map(|field| field as _)
8468 .unwrap_or_else(|| super::DatatypeDescriptor::default_instance() as _)
8469 }
8470 pub fn datatype_opt_mut(&mut self) -> Option<&mut super::DatatypeDescriptor> {
8472 self.datatype.as_mut().map(|field| field as _)
8473 }
8474 pub fn datatype_mut(&mut self) -> &mut super::DatatypeDescriptor {
8477 self.datatype.get_or_insert_default()
8478 }
8479 pub fn datatype_opt(&self) -> Option<&super::DatatypeDescriptor> {
8481 self.datatype.as_ref().map(|field| field as _)
8482 }
8483 pub fn set_datatype<T: Into<super::DatatypeDescriptor>>(&mut self, field: T) {
8485 self.datatype = Some(field.into().into());
8486 }
8487 pub fn with_datatype<T: Into<super::DatatypeDescriptor>>(
8489 mut self,
8490 field: T,
8491 ) -> Self {
8492 self.set_datatype(field.into());
8493 self
8494 }
8495 }
8496 impl super::GetEpochRequest {
8497 pub const fn const_default() -> Self {
8498 Self {
8499 epoch: None,
8500 read_mask: None,
8501 }
8502 }
8503 #[doc(hidden)]
8504 pub fn default_instance() -> &'static Self {
8505 static DEFAULT: super::GetEpochRequest = super::GetEpochRequest::const_default();
8506 &DEFAULT
8507 }
8508 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
8510 self.epoch.as_mut().map(|field| field as _)
8511 }
8512 pub fn epoch_mut(&mut self) -> &mut u64 {
8515 self.epoch.get_or_insert_default()
8516 }
8517 pub fn epoch_opt(&self) -> Option<u64> {
8519 self.epoch.as_ref().map(|field| *field)
8520 }
8521 pub fn set_epoch(&mut self, field: u64) {
8523 self.epoch = Some(field);
8524 }
8525 pub fn with_epoch(mut self, field: u64) -> Self {
8527 self.set_epoch(field);
8528 self
8529 }
8530 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
8532 self.read_mask.as_mut().map(|field| field as _)
8533 }
8534 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
8537 self.read_mask.get_or_insert_default()
8538 }
8539 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
8541 self.read_mask.as_ref().map(|field| field as _)
8542 }
8543 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
8545 self.read_mask = Some(field.into().into());
8546 }
8547 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
8549 mut self,
8550 field: T,
8551 ) -> Self {
8552 self.set_read_mask(field.into());
8553 self
8554 }
8555 }
8556 impl super::GetEpochResponse {
8557 pub const fn const_default() -> Self {
8558 Self { epoch: None }
8559 }
8560 #[doc(hidden)]
8561 pub fn default_instance() -> &'static Self {
8562 static DEFAULT: super::GetEpochResponse = super::GetEpochResponse::const_default();
8563 &DEFAULT
8564 }
8565 pub fn epoch(&self) -> &super::Epoch {
8567 self.epoch
8568 .as_ref()
8569 .map(|field| field as _)
8570 .unwrap_or_else(|| super::Epoch::default_instance() as _)
8571 }
8572 pub fn epoch_opt_mut(&mut self) -> Option<&mut super::Epoch> {
8574 self.epoch.as_mut().map(|field| field as _)
8575 }
8576 pub fn epoch_mut(&mut self) -> &mut super::Epoch {
8579 self.epoch.get_or_insert_default()
8580 }
8581 pub fn epoch_opt(&self) -> Option<&super::Epoch> {
8583 self.epoch.as_ref().map(|field| field as _)
8584 }
8585 pub fn set_epoch<T: Into<super::Epoch>>(&mut self, field: T) {
8587 self.epoch = Some(field.into().into());
8588 }
8589 pub fn with_epoch<T: Into<super::Epoch>>(mut self, field: T) -> Self {
8591 self.set_epoch(field.into());
8592 self
8593 }
8594 }
8595 impl super::GetFunctionRequest {
8596 pub const fn const_default() -> Self {
8597 Self {
8598 package_id: None,
8599 module_name: None,
8600 name: None,
8601 }
8602 }
8603 #[doc(hidden)]
8604 pub fn default_instance() -> &'static Self {
8605 static DEFAULT: super::GetFunctionRequest = super::GetFunctionRequest::const_default();
8606 &DEFAULT
8607 }
8608 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
8610 self.package_id.as_mut().map(|field| field as _)
8611 }
8612 pub fn package_id_mut(&mut self) -> &mut String {
8615 self.package_id.get_or_insert_default()
8616 }
8617 pub fn package_id_opt(&self) -> Option<&str> {
8619 self.package_id.as_ref().map(|field| field as _)
8620 }
8621 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
8623 self.package_id = Some(field.into().into());
8624 }
8625 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
8627 self.set_package_id(field.into());
8628 self
8629 }
8630 pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
8632 self.module_name.as_mut().map(|field| field as _)
8633 }
8634 pub fn module_name_mut(&mut self) -> &mut String {
8637 self.module_name.get_or_insert_default()
8638 }
8639 pub fn module_name_opt(&self) -> Option<&str> {
8641 self.module_name.as_ref().map(|field| field as _)
8642 }
8643 pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
8645 self.module_name = Some(field.into().into());
8646 }
8647 pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
8649 self.set_module_name(field.into());
8650 self
8651 }
8652 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
8654 self.name.as_mut().map(|field| field as _)
8655 }
8656 pub fn name_mut(&mut self) -> &mut String {
8659 self.name.get_or_insert_default()
8660 }
8661 pub fn name_opt(&self) -> Option<&str> {
8663 self.name.as_ref().map(|field| field as _)
8664 }
8665 pub fn set_name<T: Into<String>>(&mut self, field: T) {
8667 self.name = Some(field.into().into());
8668 }
8669 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
8671 self.set_name(field.into());
8672 self
8673 }
8674 }
8675 impl super::GetFunctionResponse {
8676 pub const fn const_default() -> Self {
8677 Self { function: None }
8678 }
8679 #[doc(hidden)]
8680 pub fn default_instance() -> &'static Self {
8681 static DEFAULT: super::GetFunctionResponse = super::GetFunctionResponse::const_default();
8682 &DEFAULT
8683 }
8684 pub fn function(&self) -> &super::FunctionDescriptor {
8686 self.function
8687 .as_ref()
8688 .map(|field| field as _)
8689 .unwrap_or_else(|| super::FunctionDescriptor::default_instance() as _)
8690 }
8691 pub fn function_opt_mut(&mut self) -> Option<&mut super::FunctionDescriptor> {
8693 self.function.as_mut().map(|field| field as _)
8694 }
8695 pub fn function_mut(&mut self) -> &mut super::FunctionDescriptor {
8698 self.function.get_or_insert_default()
8699 }
8700 pub fn function_opt(&self) -> Option<&super::FunctionDescriptor> {
8702 self.function.as_ref().map(|field| field as _)
8703 }
8704 pub fn set_function<T: Into<super::FunctionDescriptor>>(&mut self, field: T) {
8706 self.function = Some(field.into().into());
8707 }
8708 pub fn with_function<T: Into<super::FunctionDescriptor>>(
8710 mut self,
8711 field: T,
8712 ) -> Self {
8713 self.set_function(field.into());
8714 self
8715 }
8716 }
8717 impl super::GetObjectRequest {
8718 pub const fn const_default() -> Self {
8719 Self {
8720 object_id: None,
8721 version: None,
8722 read_mask: None,
8723 at_checkpoint: None,
8724 max_version: None,
8725 }
8726 }
8727 #[doc(hidden)]
8728 pub fn default_instance() -> &'static Self {
8729 static DEFAULT: super::GetObjectRequest = super::GetObjectRequest::const_default();
8730 &DEFAULT
8731 }
8732 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
8734 self.object_id.as_mut().map(|field| field as _)
8735 }
8736 pub fn object_id_mut(&mut self) -> &mut String {
8739 self.object_id.get_or_insert_default()
8740 }
8741 pub fn object_id_opt(&self) -> Option<&str> {
8743 self.object_id.as_ref().map(|field| field as _)
8744 }
8745 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
8747 self.object_id = Some(field.into().into());
8748 }
8749 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
8751 self.set_object_id(field.into());
8752 self
8753 }
8754 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
8756 self.version.as_mut().map(|field| field as _)
8757 }
8758 pub fn version_mut(&mut self) -> &mut u64 {
8761 self.version.get_or_insert_default()
8762 }
8763 pub fn version_opt(&self) -> Option<u64> {
8765 self.version.as_ref().map(|field| *field)
8766 }
8767 pub fn set_version(&mut self, field: u64) {
8769 self.version = Some(field);
8770 }
8771 pub fn with_version(mut self, field: u64) -> Self {
8773 self.set_version(field);
8774 self
8775 }
8776 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
8778 self.read_mask.as_mut().map(|field| field as _)
8779 }
8780 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
8783 self.read_mask.get_or_insert_default()
8784 }
8785 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
8787 self.read_mask.as_ref().map(|field| field as _)
8788 }
8789 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
8791 self.read_mask = Some(field.into().into());
8792 }
8793 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
8795 mut self,
8796 field: T,
8797 ) -> Self {
8798 self.set_read_mask(field.into());
8799 self
8800 }
8801 pub fn at_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
8803 self.at_checkpoint.as_mut().map(|field| field as _)
8804 }
8805 pub fn at_checkpoint_mut(&mut self) -> &mut u64 {
8808 self.at_checkpoint.get_or_insert_default()
8809 }
8810 pub fn at_checkpoint_opt(&self) -> Option<u64> {
8812 self.at_checkpoint.as_ref().map(|field| *field)
8813 }
8814 pub fn set_at_checkpoint(&mut self, field: u64) {
8816 self.at_checkpoint = Some(field);
8817 }
8818 pub fn with_at_checkpoint(mut self, field: u64) -> Self {
8820 self.set_at_checkpoint(field);
8821 self
8822 }
8823 pub fn max_version_opt_mut(&mut self) -> Option<&mut u64> {
8825 self.max_version.as_mut().map(|field| field as _)
8826 }
8827 pub fn max_version_mut(&mut self) -> &mut u64 {
8830 self.max_version.get_or_insert_default()
8831 }
8832 pub fn max_version_opt(&self) -> Option<u64> {
8834 self.max_version.as_ref().map(|field| *field)
8835 }
8836 pub fn set_max_version(&mut self, field: u64) {
8838 self.max_version = Some(field);
8839 }
8840 pub fn with_max_version(mut self, field: u64) -> Self {
8842 self.set_max_version(field);
8843 self
8844 }
8845 }
8846 impl super::GetObjectResponse {
8847 pub const fn const_default() -> Self {
8848 Self { object: None }
8849 }
8850 #[doc(hidden)]
8851 pub fn default_instance() -> &'static Self {
8852 static DEFAULT: super::GetObjectResponse = super::GetObjectResponse::const_default();
8853 &DEFAULT
8854 }
8855 pub fn object(&self) -> &super::Object {
8857 self.object
8858 .as_ref()
8859 .map(|field| field as _)
8860 .unwrap_or_else(|| super::Object::default_instance() as _)
8861 }
8862 pub fn object_opt_mut(&mut self) -> Option<&mut super::Object> {
8864 self.object.as_mut().map(|field| field as _)
8865 }
8866 pub fn object_mut(&mut self) -> &mut super::Object {
8869 self.object.get_or_insert_default()
8870 }
8871 pub fn object_opt(&self) -> Option<&super::Object> {
8873 self.object.as_ref().map(|field| field as _)
8874 }
8875 pub fn set_object<T: Into<super::Object>>(&mut self, field: T) {
8877 self.object = Some(field.into().into());
8878 }
8879 pub fn with_object<T: Into<super::Object>>(mut self, field: T) -> Self {
8881 self.set_object(field.into());
8882 self
8883 }
8884 }
8885 impl super::GetObjectResult {
8886 pub const fn const_default() -> Self {
8887 Self { result: None }
8888 }
8889 #[doc(hidden)]
8890 pub fn default_instance() -> &'static Self {
8891 static DEFAULT: super::GetObjectResult = super::GetObjectResult::const_default();
8892 &DEFAULT
8893 }
8894 pub fn object(&self) -> &super::Object {
8896 if let Some(super::get_object_result::Result::Object(field)) = &self.result {
8897 field as _
8898 } else {
8899 super::Object::default_instance() as _
8900 }
8901 }
8902 pub fn object_opt(&self) -> Option<&super::Object> {
8904 if let Some(super::get_object_result::Result::Object(field)) = &self.result {
8905 Some(field as _)
8906 } else {
8907 None
8908 }
8909 }
8910 pub fn object_opt_mut(&mut self) -> Option<&mut super::Object> {
8912 if let Some(super::get_object_result::Result::Object(field)) = &mut self
8913 .result
8914 {
8915 Some(field as _)
8916 } else {
8917 None
8918 }
8919 }
8920 pub fn object_mut(&mut self) -> &mut super::Object {
8924 if self.object_opt_mut().is_none() {
8925 self.result = Some(
8926 super::get_object_result::Result::Object(super::Object::default()),
8927 );
8928 }
8929 self.object_opt_mut().unwrap()
8930 }
8931 pub fn set_object<T: Into<super::Object>>(&mut self, field: T) {
8934 self.result = Some(
8935 super::get_object_result::Result::Object(field.into().into()),
8936 );
8937 }
8938 pub fn with_object<T: Into<super::Object>>(mut self, field: T) -> Self {
8941 self.set_object(field.into());
8942 self
8943 }
8944 pub fn error(&self) -> &super::super::super::super::google::rpc::Status {
8946 if let Some(super::get_object_result::Result::Error(field)) = &self.result {
8947 field as _
8948 } else {
8949 super::super::super::super::google::rpc::Status::default_instance() as _
8950 }
8951 }
8952 pub fn error_opt(
8954 &self,
8955 ) -> Option<&super::super::super::super::google::rpc::Status> {
8956 if let Some(super::get_object_result::Result::Error(field)) = &self.result {
8957 Some(field as _)
8958 } else {
8959 None
8960 }
8961 }
8962 pub fn error_opt_mut(
8964 &mut self,
8965 ) -> Option<&mut super::super::super::super::google::rpc::Status> {
8966 if let Some(super::get_object_result::Result::Error(field)) = &mut self
8967 .result
8968 {
8969 Some(field as _)
8970 } else {
8971 None
8972 }
8973 }
8974 pub fn error_mut(
8978 &mut self,
8979 ) -> &mut super::super::super::super::google::rpc::Status {
8980 if self.error_opt_mut().is_none() {
8981 self.result = Some(
8982 super::get_object_result::Result::Error(
8983 super::super::super::super::google::rpc::Status::default(),
8984 ),
8985 );
8986 }
8987 self.error_opt_mut().unwrap()
8988 }
8989 pub fn set_error<T: Into<super::super::super::super::google::rpc::Status>>(
8992 &mut self,
8993 field: T,
8994 ) {
8995 self.result = Some(
8996 super::get_object_result::Result::Error(field.into().into()),
8997 );
8998 }
8999 pub fn with_error<T: Into<super::super::super::super::google::rpc::Status>>(
9002 mut self,
9003 field: T,
9004 ) -> Self {
9005 self.set_error(field.into());
9006 self
9007 }
9008 }
9009 impl super::GetPackageRequest {
9010 pub const fn const_default() -> Self {
9011 Self {
9012 package_id: None,
9013 selector: None,
9014 }
9015 }
9016 #[doc(hidden)]
9017 pub fn default_instance() -> &'static Self {
9018 static DEFAULT: super::GetPackageRequest = super::GetPackageRequest::const_default();
9019 &DEFAULT
9020 }
9021 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
9023 self.package_id.as_mut().map(|field| field as _)
9024 }
9025 pub fn package_id_mut(&mut self) -> &mut String {
9028 self.package_id.get_or_insert_default()
9029 }
9030 pub fn package_id_opt(&self) -> Option<&str> {
9032 self.package_id.as_ref().map(|field| field as _)
9033 }
9034 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
9036 self.package_id = Some(field.into().into());
9037 }
9038 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
9040 self.set_package_id(field.into());
9041 self
9042 }
9043 pub fn version(&self) -> u64 {
9045 if let Some(super::get_package_request::Selector::Version(field)) = &self
9046 .selector
9047 {
9048 *field
9049 } else {
9050 0u64
9051 }
9052 }
9053 pub fn version_opt(&self) -> Option<u64> {
9055 if let Some(super::get_package_request::Selector::Version(field)) = &self
9056 .selector
9057 {
9058 Some(*field)
9059 } else {
9060 None
9061 }
9062 }
9063 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
9065 if let Some(super::get_package_request::Selector::Version(field)) = &mut self
9066 .selector
9067 {
9068 Some(field as _)
9069 } else {
9070 None
9071 }
9072 }
9073 pub fn version_mut(&mut self) -> &mut u64 {
9077 if self.version_opt_mut().is_none() {
9078 self.selector = Some(
9079 super::get_package_request::Selector::Version(u64::default()),
9080 );
9081 }
9082 self.version_opt_mut().unwrap()
9083 }
9084 pub fn set_version(&mut self, field: u64) {
9087 self.selector = Some(super::get_package_request::Selector::Version(field));
9088 }
9089 pub fn with_version(mut self, field: u64) -> Self {
9092 self.set_version(field);
9093 self
9094 }
9095 pub fn at_checkpoint(&self) -> u64 {
9097 if let Some(super::get_package_request::Selector::AtCheckpoint(field)) = &self
9098 .selector
9099 {
9100 *field
9101 } else {
9102 0u64
9103 }
9104 }
9105 pub fn at_checkpoint_opt(&self) -> Option<u64> {
9107 if let Some(super::get_package_request::Selector::AtCheckpoint(field)) = &self
9108 .selector
9109 {
9110 Some(*field)
9111 } else {
9112 None
9113 }
9114 }
9115 pub fn at_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
9117 if let Some(super::get_package_request::Selector::AtCheckpoint(field)) = &mut self
9118 .selector
9119 {
9120 Some(field as _)
9121 } else {
9122 None
9123 }
9124 }
9125 pub fn at_checkpoint_mut(&mut self) -> &mut u64 {
9129 if self.at_checkpoint_opt_mut().is_none() {
9130 self.selector = Some(
9131 super::get_package_request::Selector::AtCheckpoint(u64::default()),
9132 );
9133 }
9134 self.at_checkpoint_opt_mut().unwrap()
9135 }
9136 pub fn set_at_checkpoint(&mut self, field: u64) {
9139 self.selector = Some(
9140 super::get_package_request::Selector::AtCheckpoint(field),
9141 );
9142 }
9143 pub fn with_at_checkpoint(mut self, field: u64) -> Self {
9146 self.set_at_checkpoint(field);
9147 self
9148 }
9149 }
9150 impl super::GetPackageResponse {
9151 pub const fn const_default() -> Self {
9152 Self { package: None }
9153 }
9154 #[doc(hidden)]
9155 pub fn default_instance() -> &'static Self {
9156 static DEFAULT: super::GetPackageResponse = super::GetPackageResponse::const_default();
9157 &DEFAULT
9158 }
9159 pub fn package(&self) -> &super::Package {
9161 self.package
9162 .as_ref()
9163 .map(|field| field as _)
9164 .unwrap_or_else(|| super::Package::default_instance() as _)
9165 }
9166 pub fn package_opt_mut(&mut self) -> Option<&mut super::Package> {
9168 self.package.as_mut().map(|field| field as _)
9169 }
9170 pub fn package_mut(&mut self) -> &mut super::Package {
9173 self.package.get_or_insert_default()
9174 }
9175 pub fn package_opt(&self) -> Option<&super::Package> {
9177 self.package.as_ref().map(|field| field as _)
9178 }
9179 pub fn set_package<T: Into<super::Package>>(&mut self, field: T) {
9181 self.package = Some(field.into().into());
9182 }
9183 pub fn with_package<T: Into<super::Package>>(mut self, field: T) -> Self {
9185 self.set_package(field.into());
9186 self
9187 }
9188 }
9189 impl super::GetProtocolConfigRequest {
9190 pub const fn const_default() -> Self {
9191 Self {
9192 version: None,
9193 read_mask: None,
9194 }
9195 }
9196 #[doc(hidden)]
9197 pub fn default_instance() -> &'static Self {
9198 static DEFAULT: super::GetProtocolConfigRequest = super::GetProtocolConfigRequest::const_default();
9199 &DEFAULT
9200 }
9201 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
9203 self.version.as_mut().map(|field| field as _)
9204 }
9205 pub fn version_mut(&mut self) -> &mut u64 {
9208 self.version.get_or_insert_default()
9209 }
9210 pub fn version_opt(&self) -> Option<u64> {
9212 self.version.as_ref().map(|field| *field)
9213 }
9214 pub fn set_version(&mut self, field: u64) {
9216 self.version = Some(field);
9217 }
9218 pub fn with_version(mut self, field: u64) -> Self {
9220 self.set_version(field);
9221 self
9222 }
9223 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
9225 self.read_mask.as_mut().map(|field| field as _)
9226 }
9227 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
9230 self.read_mask.get_or_insert_default()
9231 }
9232 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
9234 self.read_mask.as_ref().map(|field| field as _)
9235 }
9236 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
9238 self.read_mask = Some(field.into().into());
9239 }
9240 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
9242 mut self,
9243 field: T,
9244 ) -> Self {
9245 self.set_read_mask(field.into());
9246 self
9247 }
9248 }
9249 impl super::GetProtocolConfigResponse {
9250 pub const fn const_default() -> Self {
9251 Self { protocol_config: None }
9252 }
9253 #[doc(hidden)]
9254 pub fn default_instance() -> &'static Self {
9255 static DEFAULT: super::GetProtocolConfigResponse = super::GetProtocolConfigResponse::const_default();
9256 &DEFAULT
9257 }
9258 pub fn protocol_config(&self) -> &super::ProtocolConfig {
9260 self.protocol_config
9261 .as_ref()
9262 .map(|field| field as _)
9263 .unwrap_or_else(|| super::ProtocolConfig::default_instance() as _)
9264 }
9265 pub fn protocol_config_opt_mut(&mut self) -> Option<&mut super::ProtocolConfig> {
9267 self.protocol_config.as_mut().map(|field| field as _)
9268 }
9269 pub fn protocol_config_mut(&mut self) -> &mut super::ProtocolConfig {
9272 self.protocol_config.get_or_insert_default()
9273 }
9274 pub fn protocol_config_opt(&self) -> Option<&super::ProtocolConfig> {
9276 self.protocol_config.as_ref().map(|field| field as _)
9277 }
9278 pub fn set_protocol_config<T: Into<super::ProtocolConfig>>(&mut self, field: T) {
9280 self.protocol_config = Some(field.into().into());
9281 }
9282 pub fn with_protocol_config<T: Into<super::ProtocolConfig>>(
9284 mut self,
9285 field: T,
9286 ) -> Self {
9287 self.set_protocol_config(field.into());
9288 self
9289 }
9290 }
9291 impl super::GetServiceInfoRequest {
9292 pub const fn const_default() -> Self {
9293 Self {}
9294 }
9295 #[doc(hidden)]
9296 pub fn default_instance() -> &'static Self {
9297 static DEFAULT: super::GetServiceInfoRequest = super::GetServiceInfoRequest::const_default();
9298 &DEFAULT
9299 }
9300 }
9301 impl super::GetServiceInfoResponse {
9302 pub const fn const_default() -> Self {
9303 Self {
9304 chain_id: None,
9305 chain: None,
9306 epoch: None,
9307 checkpoint_height: None,
9308 timestamp: None,
9309 lowest_available_checkpoint: None,
9310 lowest_available_checkpoint_objects: None,
9311 server: None,
9312 }
9313 }
9314 #[doc(hidden)]
9315 pub fn default_instance() -> &'static Self {
9316 static DEFAULT: super::GetServiceInfoResponse = super::GetServiceInfoResponse::const_default();
9317 &DEFAULT
9318 }
9319 pub fn chain_id_opt_mut(&mut self) -> Option<&mut String> {
9321 self.chain_id.as_mut().map(|field| field as _)
9322 }
9323 pub fn chain_id_mut(&mut self) -> &mut String {
9326 self.chain_id.get_or_insert_default()
9327 }
9328 pub fn chain_id_opt(&self) -> Option<&str> {
9330 self.chain_id.as_ref().map(|field| field as _)
9331 }
9332 pub fn set_chain_id<T: Into<String>>(&mut self, field: T) {
9334 self.chain_id = Some(field.into().into());
9335 }
9336 pub fn with_chain_id<T: Into<String>>(mut self, field: T) -> Self {
9338 self.set_chain_id(field.into());
9339 self
9340 }
9341 pub fn chain_opt_mut(&mut self) -> Option<&mut String> {
9343 self.chain.as_mut().map(|field| field as _)
9344 }
9345 pub fn chain_mut(&mut self) -> &mut String {
9348 self.chain.get_or_insert_default()
9349 }
9350 pub fn chain_opt(&self) -> Option<&str> {
9352 self.chain.as_ref().map(|field| field as _)
9353 }
9354 pub fn set_chain<T: Into<String>>(&mut self, field: T) {
9356 self.chain = Some(field.into().into());
9357 }
9358 pub fn with_chain<T: Into<String>>(mut self, field: T) -> Self {
9360 self.set_chain(field.into());
9361 self
9362 }
9363 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
9365 self.epoch.as_mut().map(|field| field as _)
9366 }
9367 pub fn epoch_mut(&mut self) -> &mut u64 {
9370 self.epoch.get_or_insert_default()
9371 }
9372 pub fn epoch_opt(&self) -> Option<u64> {
9374 self.epoch.as_ref().map(|field| *field)
9375 }
9376 pub fn set_epoch(&mut self, field: u64) {
9378 self.epoch = Some(field);
9379 }
9380 pub fn with_epoch(mut self, field: u64) -> Self {
9382 self.set_epoch(field);
9383 self
9384 }
9385 pub fn checkpoint_height_opt_mut(&mut self) -> Option<&mut u64> {
9387 self.checkpoint_height.as_mut().map(|field| field as _)
9388 }
9389 pub fn checkpoint_height_mut(&mut self) -> &mut u64 {
9392 self.checkpoint_height.get_or_insert_default()
9393 }
9394 pub fn checkpoint_height_opt(&self) -> Option<u64> {
9396 self.checkpoint_height.as_ref().map(|field| *field)
9397 }
9398 pub fn set_checkpoint_height(&mut self, field: u64) {
9400 self.checkpoint_height = Some(field);
9401 }
9402 pub fn with_checkpoint_height(mut self, field: u64) -> Self {
9404 self.set_checkpoint_height(field);
9405 self
9406 }
9407 pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
9409 self.timestamp.as_mut().map(|field| field as _)
9410 }
9411 pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
9414 self.timestamp.get_or_insert_default()
9415 }
9416 pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
9418 self.timestamp.as_ref().map(|field| field as _)
9419 }
9420 pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
9422 self.timestamp = Some(field.into().into());
9423 }
9424 pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
9426 mut self,
9427 field: T,
9428 ) -> Self {
9429 self.set_timestamp(field.into());
9430 self
9431 }
9432 pub fn lowest_available_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
9434 self.lowest_available_checkpoint.as_mut().map(|field| field as _)
9435 }
9436 pub fn lowest_available_checkpoint_mut(&mut self) -> &mut u64 {
9439 self.lowest_available_checkpoint.get_or_insert_default()
9440 }
9441 pub fn lowest_available_checkpoint_opt(&self) -> Option<u64> {
9443 self.lowest_available_checkpoint.as_ref().map(|field| *field)
9444 }
9445 pub fn set_lowest_available_checkpoint(&mut self, field: u64) {
9447 self.lowest_available_checkpoint = Some(field);
9448 }
9449 pub fn with_lowest_available_checkpoint(mut self, field: u64) -> Self {
9451 self.set_lowest_available_checkpoint(field);
9452 self
9453 }
9454 pub fn lowest_available_checkpoint_objects_opt_mut(
9456 &mut self,
9457 ) -> Option<&mut u64> {
9458 self.lowest_available_checkpoint_objects.as_mut().map(|field| field as _)
9459 }
9460 pub fn lowest_available_checkpoint_objects_mut(&mut self) -> &mut u64 {
9463 self.lowest_available_checkpoint_objects.get_or_insert_default()
9464 }
9465 pub fn lowest_available_checkpoint_objects_opt(&self) -> Option<u64> {
9467 self.lowest_available_checkpoint_objects.as_ref().map(|field| *field)
9468 }
9469 pub fn set_lowest_available_checkpoint_objects(&mut self, field: u64) {
9471 self.lowest_available_checkpoint_objects = Some(field);
9472 }
9473 pub fn with_lowest_available_checkpoint_objects(mut self, field: u64) -> Self {
9475 self.set_lowest_available_checkpoint_objects(field);
9476 self
9477 }
9478 pub fn server_opt_mut(&mut self) -> Option<&mut String> {
9480 self.server.as_mut().map(|field| field as _)
9481 }
9482 pub fn server_mut(&mut self) -> &mut String {
9485 self.server.get_or_insert_default()
9486 }
9487 pub fn server_opt(&self) -> Option<&str> {
9489 self.server.as_ref().map(|field| field as _)
9490 }
9491 pub fn set_server<T: Into<String>>(&mut self, field: T) {
9493 self.server = Some(field.into().into());
9494 }
9495 pub fn with_server<T: Into<String>>(mut self, field: T) -> Self {
9497 self.set_server(field.into());
9498 self
9499 }
9500 }
9501 impl super::GetTransactionRequest {
9502 pub const fn const_default() -> Self {
9503 Self {
9504 digest: None,
9505 read_mask: None,
9506 }
9507 }
9508 #[doc(hidden)]
9509 pub fn default_instance() -> &'static Self {
9510 static DEFAULT: super::GetTransactionRequest = super::GetTransactionRequest::const_default();
9511 &DEFAULT
9512 }
9513 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
9515 self.digest.as_mut().map(|field| field as _)
9516 }
9517 pub fn digest_mut(&mut self) -> &mut String {
9520 self.digest.get_or_insert_default()
9521 }
9522 pub fn digest_opt(&self) -> Option<&str> {
9524 self.digest.as_ref().map(|field| field as _)
9525 }
9526 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
9528 self.digest = Some(field.into().into());
9529 }
9530 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
9532 self.set_digest(field.into());
9533 self
9534 }
9535 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
9537 self.read_mask.as_mut().map(|field| field as _)
9538 }
9539 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
9542 self.read_mask.get_or_insert_default()
9543 }
9544 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
9546 self.read_mask.as_ref().map(|field| field as _)
9547 }
9548 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
9550 self.read_mask = Some(field.into().into());
9551 }
9552 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
9554 mut self,
9555 field: T,
9556 ) -> Self {
9557 self.set_read_mask(field.into());
9558 self
9559 }
9560 }
9561 impl super::GetTransactionResponse {
9562 pub const fn const_default() -> Self {
9563 Self { transaction: None }
9564 }
9565 #[doc(hidden)]
9566 pub fn default_instance() -> &'static Self {
9567 static DEFAULT: super::GetTransactionResponse = super::GetTransactionResponse::const_default();
9568 &DEFAULT
9569 }
9570 pub fn transaction(&self) -> &super::ExecutedTransaction {
9572 self.transaction
9573 .as_ref()
9574 .map(|field| field as _)
9575 .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
9576 }
9577 pub fn transaction_opt_mut(
9579 &mut self,
9580 ) -> Option<&mut super::ExecutedTransaction> {
9581 self.transaction.as_mut().map(|field| field as _)
9582 }
9583 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
9586 self.transaction.get_or_insert_default()
9587 }
9588 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
9590 self.transaction.as_ref().map(|field| field as _)
9591 }
9592 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
9594 &mut self,
9595 field: T,
9596 ) {
9597 self.transaction = Some(field.into().into());
9598 }
9599 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
9601 mut self,
9602 field: T,
9603 ) -> Self {
9604 self.set_transaction(field.into());
9605 self
9606 }
9607 }
9608 impl super::GetTransactionResult {
9609 pub const fn const_default() -> Self {
9610 Self { result: None }
9611 }
9612 #[doc(hidden)]
9613 pub fn default_instance() -> &'static Self {
9614 static DEFAULT: super::GetTransactionResult = super::GetTransactionResult::const_default();
9615 &DEFAULT
9616 }
9617 pub fn transaction(&self) -> &super::ExecutedTransaction {
9619 if let Some(super::get_transaction_result::Result::Transaction(field)) = &self
9620 .result
9621 {
9622 field as _
9623 } else {
9624 super::ExecutedTransaction::default_instance() as _
9625 }
9626 }
9627 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
9629 if let Some(super::get_transaction_result::Result::Transaction(field)) = &self
9630 .result
9631 {
9632 Some(field as _)
9633 } else {
9634 None
9635 }
9636 }
9637 pub fn transaction_opt_mut(
9639 &mut self,
9640 ) -> Option<&mut super::ExecutedTransaction> {
9641 if let Some(super::get_transaction_result::Result::Transaction(field)) = &mut self
9642 .result
9643 {
9644 Some(field as _)
9645 } else {
9646 None
9647 }
9648 }
9649 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
9653 if self.transaction_opt_mut().is_none() {
9654 self.result = Some(
9655 super::get_transaction_result::Result::Transaction(
9656 super::ExecutedTransaction::default(),
9657 ),
9658 );
9659 }
9660 self.transaction_opt_mut().unwrap()
9661 }
9662 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
9665 &mut self,
9666 field: T,
9667 ) {
9668 self.result = Some(
9669 super::get_transaction_result::Result::Transaction(field.into().into()),
9670 );
9671 }
9672 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
9675 mut self,
9676 field: T,
9677 ) -> Self {
9678 self.set_transaction(field.into());
9679 self
9680 }
9681 pub fn error(&self) -> &super::super::super::super::google::rpc::Status {
9683 if let Some(super::get_transaction_result::Result::Error(field)) = &self
9684 .result
9685 {
9686 field as _
9687 } else {
9688 super::super::super::super::google::rpc::Status::default_instance() as _
9689 }
9690 }
9691 pub fn error_opt(
9693 &self,
9694 ) -> Option<&super::super::super::super::google::rpc::Status> {
9695 if let Some(super::get_transaction_result::Result::Error(field)) = &self
9696 .result
9697 {
9698 Some(field as _)
9699 } else {
9700 None
9701 }
9702 }
9703 pub fn error_opt_mut(
9705 &mut self,
9706 ) -> Option<&mut super::super::super::super::google::rpc::Status> {
9707 if let Some(super::get_transaction_result::Result::Error(field)) = &mut self
9708 .result
9709 {
9710 Some(field as _)
9711 } else {
9712 None
9713 }
9714 }
9715 pub fn error_mut(
9719 &mut self,
9720 ) -> &mut super::super::super::super::google::rpc::Status {
9721 if self.error_opt_mut().is_none() {
9722 self.result = Some(
9723 super::get_transaction_result::Result::Error(
9724 super::super::super::super::google::rpc::Status::default(),
9725 ),
9726 );
9727 }
9728 self.error_opt_mut().unwrap()
9729 }
9730 pub fn set_error<T: Into<super::super::super::super::google::rpc::Status>>(
9733 &mut self,
9734 field: T,
9735 ) {
9736 self.result = Some(
9737 super::get_transaction_result::Result::Error(field.into().into()),
9738 );
9739 }
9740 pub fn with_error<T: Into<super::super::super::super::google::rpc::Status>>(
9743 mut self,
9744 field: T,
9745 ) -> Self {
9746 self.set_error(field.into());
9747 self
9748 }
9749 }
9750 impl super::IndexError {
9751 pub const fn const_default() -> Self {
9752 Self {
9753 index: None,
9754 subresult: None,
9755 }
9756 }
9757 #[doc(hidden)]
9758 pub fn default_instance() -> &'static Self {
9759 static DEFAULT: super::IndexError = super::IndexError::const_default();
9760 &DEFAULT
9761 }
9762 pub fn index_opt_mut(&mut self) -> Option<&mut u32> {
9764 self.index.as_mut().map(|field| field as _)
9765 }
9766 pub fn index_mut(&mut self) -> &mut u32 {
9769 self.index.get_or_insert_default()
9770 }
9771 pub fn index_opt(&self) -> Option<u32> {
9773 self.index.as_ref().map(|field| *field)
9774 }
9775 pub fn set_index(&mut self, field: u32) {
9777 self.index = Some(field);
9778 }
9779 pub fn with_index(mut self, field: u32) -> Self {
9781 self.set_index(field);
9782 self
9783 }
9784 pub fn subresult_opt_mut(&mut self) -> Option<&mut u32> {
9786 self.subresult.as_mut().map(|field| field as _)
9787 }
9788 pub fn subresult_mut(&mut self) -> &mut u32 {
9791 self.subresult.get_or_insert_default()
9792 }
9793 pub fn subresult_opt(&self) -> Option<u32> {
9795 self.subresult.as_ref().map(|field| *field)
9796 }
9797 pub fn set_subresult(&mut self, field: u32) {
9799 self.subresult = Some(field);
9800 }
9801 pub fn with_subresult(mut self, field: u32) -> Self {
9803 self.set_subresult(field);
9804 self
9805 }
9806 }
9807 impl super::Input {
9808 pub const fn const_default() -> Self {
9809 Self {
9810 kind: None,
9811 pure: None,
9812 object_id: None,
9813 version: None,
9814 digest: None,
9815 mutable: None,
9816 mutability: None,
9817 funds_withdrawal: None,
9818 literal: None,
9819 }
9820 }
9821 #[doc(hidden)]
9822 pub fn default_instance() -> &'static Self {
9823 static DEFAULT: super::Input = super::Input::const_default();
9824 &DEFAULT
9825 }
9826 pub fn with_kind<T: Into<super::input::InputKind>>(mut self, field: T) -> Self {
9828 self.set_kind(field.into());
9829 self
9830 }
9831 pub fn pure_opt(&self) -> Option<&[u8]> {
9833 self.pure.as_ref().map(|field| field as _)
9834 }
9835 pub fn set_pure<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9837 self.pure = Some(field.into().into());
9838 }
9839 pub fn with_pure<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
9841 self.set_pure(field.into());
9842 self
9843 }
9844 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
9846 self.object_id.as_mut().map(|field| field as _)
9847 }
9848 pub fn object_id_mut(&mut self) -> &mut String {
9851 self.object_id.get_or_insert_default()
9852 }
9853 pub fn object_id_opt(&self) -> Option<&str> {
9855 self.object_id.as_ref().map(|field| field as _)
9856 }
9857 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
9859 self.object_id = Some(field.into().into());
9860 }
9861 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
9863 self.set_object_id(field.into());
9864 self
9865 }
9866 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
9868 self.version.as_mut().map(|field| field as _)
9869 }
9870 pub fn version_mut(&mut self) -> &mut u64 {
9873 self.version.get_or_insert_default()
9874 }
9875 pub fn version_opt(&self) -> Option<u64> {
9877 self.version.as_ref().map(|field| *field)
9878 }
9879 pub fn set_version(&mut self, field: u64) {
9881 self.version = Some(field);
9882 }
9883 pub fn with_version(mut self, field: u64) -> Self {
9885 self.set_version(field);
9886 self
9887 }
9888 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
9890 self.digest.as_mut().map(|field| field as _)
9891 }
9892 pub fn digest_mut(&mut self) -> &mut String {
9895 self.digest.get_or_insert_default()
9896 }
9897 pub fn digest_opt(&self) -> Option<&str> {
9899 self.digest.as_ref().map(|field| field as _)
9900 }
9901 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
9903 self.digest = Some(field.into().into());
9904 }
9905 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
9907 self.set_digest(field.into());
9908 self
9909 }
9910 pub fn mutable_opt_mut(&mut self) -> Option<&mut bool> {
9912 self.mutable.as_mut().map(|field| field as _)
9913 }
9914 pub fn mutable_mut(&mut self) -> &mut bool {
9917 self.mutable.get_or_insert_default()
9918 }
9919 pub fn mutable_opt(&self) -> Option<bool> {
9921 self.mutable.as_ref().map(|field| *field)
9922 }
9923 pub fn set_mutable(&mut self, field: bool) {
9925 self.mutable = Some(field);
9926 }
9927 pub fn with_mutable(mut self, field: bool) -> Self {
9929 self.set_mutable(field);
9930 self
9931 }
9932 pub fn with_mutability<T: Into<super::input::Mutability>>(
9934 mut self,
9935 field: T,
9936 ) -> Self {
9937 self.set_mutability(field.into());
9938 self
9939 }
9940 pub fn funds_withdrawal(&self) -> &super::FundsWithdrawal {
9942 self.funds_withdrawal
9943 .as_ref()
9944 .map(|field| field as _)
9945 .unwrap_or_else(|| super::FundsWithdrawal::default_instance() as _)
9946 }
9947 pub fn funds_withdrawal_opt_mut(
9949 &mut self,
9950 ) -> Option<&mut super::FundsWithdrawal> {
9951 self.funds_withdrawal.as_mut().map(|field| field as _)
9952 }
9953 pub fn funds_withdrawal_mut(&mut self) -> &mut super::FundsWithdrawal {
9956 self.funds_withdrawal.get_or_insert_default()
9957 }
9958 pub fn funds_withdrawal_opt(&self) -> Option<&super::FundsWithdrawal> {
9960 self.funds_withdrawal.as_ref().map(|field| field as _)
9961 }
9962 pub fn set_funds_withdrawal<T: Into<super::FundsWithdrawal>>(
9964 &mut self,
9965 field: T,
9966 ) {
9967 self.funds_withdrawal = Some(field.into().into());
9968 }
9969 pub fn with_funds_withdrawal<T: Into<super::FundsWithdrawal>>(
9971 mut self,
9972 field: T,
9973 ) -> Self {
9974 self.set_funds_withdrawal(field.into());
9975 self
9976 }
9977 pub fn literal_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
9979 self.literal.as_mut().map(|field| field as _)
9980 }
9981 pub fn literal_mut(&mut self) -> &mut ::prost_types::Value {
9984 self.literal.get_or_insert_default()
9985 }
9986 pub fn literal_opt(&self) -> Option<&::prost_types::Value> {
9988 self.literal.as_ref().map(|field| field as _)
9989 }
9990 pub fn set_literal<T: Into<::prost_types::Value>>(&mut self, field: T) {
9992 self.literal = Some(field.into().into());
9993 }
9994 pub fn with_literal<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
9996 self.set_literal(field.into());
9997 self
9998 }
9999 }
10000 impl super::Jwk {
10001 pub const fn const_default() -> Self {
10002 Self {
10003 kty: None,
10004 e: None,
10005 n: None,
10006 alg: None,
10007 }
10008 }
10009 #[doc(hidden)]
10010 pub fn default_instance() -> &'static Self {
10011 static DEFAULT: super::Jwk = super::Jwk::const_default();
10012 &DEFAULT
10013 }
10014 pub fn kty_opt_mut(&mut self) -> Option<&mut String> {
10016 self.kty.as_mut().map(|field| field as _)
10017 }
10018 pub fn kty_mut(&mut self) -> &mut String {
10021 self.kty.get_or_insert_default()
10022 }
10023 pub fn kty_opt(&self) -> Option<&str> {
10025 self.kty.as_ref().map(|field| field as _)
10026 }
10027 pub fn set_kty<T: Into<String>>(&mut self, field: T) {
10029 self.kty = Some(field.into().into());
10030 }
10031 pub fn with_kty<T: Into<String>>(mut self, field: T) -> Self {
10033 self.set_kty(field.into());
10034 self
10035 }
10036 pub fn e_opt_mut(&mut self) -> Option<&mut String> {
10038 self.e.as_mut().map(|field| field as _)
10039 }
10040 pub fn e_mut(&mut self) -> &mut String {
10043 self.e.get_or_insert_default()
10044 }
10045 pub fn e_opt(&self) -> Option<&str> {
10047 self.e.as_ref().map(|field| field as _)
10048 }
10049 pub fn set_e<T: Into<String>>(&mut self, field: T) {
10051 self.e = Some(field.into().into());
10052 }
10053 pub fn with_e<T: Into<String>>(mut self, field: T) -> Self {
10055 self.set_e(field.into());
10056 self
10057 }
10058 pub fn n_opt_mut(&mut self) -> Option<&mut String> {
10060 self.n.as_mut().map(|field| field as _)
10061 }
10062 pub fn n_mut(&mut self) -> &mut String {
10065 self.n.get_or_insert_default()
10066 }
10067 pub fn n_opt(&self) -> Option<&str> {
10069 self.n.as_ref().map(|field| field as _)
10070 }
10071 pub fn set_n<T: Into<String>>(&mut self, field: T) {
10073 self.n = Some(field.into().into());
10074 }
10075 pub fn with_n<T: Into<String>>(mut self, field: T) -> Self {
10077 self.set_n(field.into());
10078 self
10079 }
10080 pub fn alg_opt_mut(&mut self) -> Option<&mut String> {
10082 self.alg.as_mut().map(|field| field as _)
10083 }
10084 pub fn alg_mut(&mut self) -> &mut String {
10087 self.alg.get_or_insert_default()
10088 }
10089 pub fn alg_opt(&self) -> Option<&str> {
10091 self.alg.as_ref().map(|field| field as _)
10092 }
10093 pub fn set_alg<T: Into<String>>(&mut self, field: T) {
10095 self.alg = Some(field.into().into());
10096 }
10097 pub fn with_alg<T: Into<String>>(mut self, field: T) -> Self {
10099 self.set_alg(field.into());
10100 self
10101 }
10102 }
10103 impl super::JwkId {
10104 pub const fn const_default() -> Self {
10105 Self { iss: None, kid: None }
10106 }
10107 #[doc(hidden)]
10108 pub fn default_instance() -> &'static Self {
10109 static DEFAULT: super::JwkId = super::JwkId::const_default();
10110 &DEFAULT
10111 }
10112 pub fn iss_opt_mut(&mut self) -> Option<&mut String> {
10114 self.iss.as_mut().map(|field| field as _)
10115 }
10116 pub fn iss_mut(&mut self) -> &mut String {
10119 self.iss.get_or_insert_default()
10120 }
10121 pub fn iss_opt(&self) -> Option<&str> {
10123 self.iss.as_ref().map(|field| field as _)
10124 }
10125 pub fn set_iss<T: Into<String>>(&mut self, field: T) {
10127 self.iss = Some(field.into().into());
10128 }
10129 pub fn with_iss<T: Into<String>>(mut self, field: T) -> Self {
10131 self.set_iss(field.into());
10132 self
10133 }
10134 pub fn kid_opt_mut(&mut self) -> Option<&mut String> {
10136 self.kid.as_mut().map(|field| field as _)
10137 }
10138 pub fn kid_mut(&mut self) -> &mut String {
10141 self.kid.get_or_insert_default()
10142 }
10143 pub fn kid_opt(&self) -> Option<&str> {
10145 self.kid.as_ref().map(|field| field as _)
10146 }
10147 pub fn set_kid<T: Into<String>>(&mut self, field: T) {
10149 self.kid = Some(field.into().into());
10150 }
10151 pub fn with_kid<T: Into<String>>(mut self, field: T) -> Self {
10153 self.set_kid(field.into());
10154 self
10155 }
10156 }
10157 impl super::LedgerPosition {
10158 pub const fn const_default() -> Self {
10159 Self {
10160 checkpoint: None,
10161 transaction_index: None,
10162 event_index: None,
10163 }
10164 }
10165 #[doc(hidden)]
10166 pub fn default_instance() -> &'static Self {
10167 static DEFAULT: super::LedgerPosition = super::LedgerPosition::const_default();
10168 &DEFAULT
10169 }
10170 pub fn checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
10172 self.checkpoint.as_mut().map(|field| field as _)
10173 }
10174 pub fn checkpoint_mut(&mut self) -> &mut u64 {
10177 self.checkpoint.get_or_insert_default()
10178 }
10179 pub fn checkpoint_opt(&self) -> Option<u64> {
10181 self.checkpoint.as_ref().map(|field| *field)
10182 }
10183 pub fn set_checkpoint(&mut self, field: u64) {
10185 self.checkpoint = Some(field);
10186 }
10187 pub fn with_checkpoint(mut self, field: u64) -> Self {
10189 self.set_checkpoint(field);
10190 self
10191 }
10192 pub fn transaction_index_opt_mut(&mut self) -> Option<&mut u64> {
10194 self.transaction_index.as_mut().map(|field| field as _)
10195 }
10196 pub fn transaction_index_mut(&mut self) -> &mut u64 {
10199 self.transaction_index.get_or_insert_default()
10200 }
10201 pub fn transaction_index_opt(&self) -> Option<u64> {
10203 self.transaction_index.as_ref().map(|field| *field)
10204 }
10205 pub fn set_transaction_index(&mut self, field: u64) {
10207 self.transaction_index = Some(field);
10208 }
10209 pub fn with_transaction_index(mut self, field: u64) -> Self {
10211 self.set_transaction_index(field);
10212 self
10213 }
10214 pub fn event_index_opt_mut(&mut self) -> Option<&mut u32> {
10216 self.event_index.as_mut().map(|field| field as _)
10217 }
10218 pub fn event_index_mut(&mut self) -> &mut u32 {
10221 self.event_index.get_or_insert_default()
10222 }
10223 pub fn event_index_opt(&self) -> Option<u32> {
10225 self.event_index.as_ref().map(|field| *field)
10226 }
10227 pub fn set_event_index(&mut self, field: u32) {
10229 self.event_index = Some(field);
10230 }
10231 pub fn with_event_index(mut self, field: u32) -> Self {
10233 self.set_event_index(field);
10234 self
10235 }
10236 }
10237 impl super::Linkage {
10238 pub const fn const_default() -> Self {
10239 Self {
10240 original_id: None,
10241 upgraded_id: None,
10242 upgraded_version: None,
10243 }
10244 }
10245 #[doc(hidden)]
10246 pub fn default_instance() -> &'static Self {
10247 static DEFAULT: super::Linkage = super::Linkage::const_default();
10248 &DEFAULT
10249 }
10250 pub fn original_id_opt_mut(&mut self) -> Option<&mut String> {
10252 self.original_id.as_mut().map(|field| field as _)
10253 }
10254 pub fn original_id_mut(&mut self) -> &mut String {
10257 self.original_id.get_or_insert_default()
10258 }
10259 pub fn original_id_opt(&self) -> Option<&str> {
10261 self.original_id.as_ref().map(|field| field as _)
10262 }
10263 pub fn set_original_id<T: Into<String>>(&mut self, field: T) {
10265 self.original_id = Some(field.into().into());
10266 }
10267 pub fn with_original_id<T: Into<String>>(mut self, field: T) -> Self {
10269 self.set_original_id(field.into());
10270 self
10271 }
10272 pub fn upgraded_id_opt_mut(&mut self) -> Option<&mut String> {
10274 self.upgraded_id.as_mut().map(|field| field as _)
10275 }
10276 pub fn upgraded_id_mut(&mut self) -> &mut String {
10279 self.upgraded_id.get_or_insert_default()
10280 }
10281 pub fn upgraded_id_opt(&self) -> Option<&str> {
10283 self.upgraded_id.as_ref().map(|field| field as _)
10284 }
10285 pub fn set_upgraded_id<T: Into<String>>(&mut self, field: T) {
10287 self.upgraded_id = Some(field.into().into());
10288 }
10289 pub fn with_upgraded_id<T: Into<String>>(mut self, field: T) -> Self {
10291 self.set_upgraded_id(field.into());
10292 self
10293 }
10294 pub fn upgraded_version_opt_mut(&mut self) -> Option<&mut u64> {
10296 self.upgraded_version.as_mut().map(|field| field as _)
10297 }
10298 pub fn upgraded_version_mut(&mut self) -> &mut u64 {
10301 self.upgraded_version.get_or_insert_default()
10302 }
10303 pub fn upgraded_version_opt(&self) -> Option<u64> {
10305 self.upgraded_version.as_ref().map(|field| *field)
10306 }
10307 pub fn set_upgraded_version(&mut self, field: u64) {
10309 self.upgraded_version = Some(field);
10310 }
10311 pub fn with_upgraded_version(mut self, field: u64) -> Self {
10313 self.set_upgraded_version(field);
10314 self
10315 }
10316 }
10317 impl super::ListBalancesRequest {
10318 pub const fn const_default() -> Self {
10319 Self {
10320 owner: None,
10321 page_size: None,
10322 page_token: None,
10323 }
10324 }
10325 #[doc(hidden)]
10326 pub fn default_instance() -> &'static Self {
10327 static DEFAULT: super::ListBalancesRequest = super::ListBalancesRequest::const_default();
10328 &DEFAULT
10329 }
10330 pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
10332 self.owner.as_mut().map(|field| field as _)
10333 }
10334 pub fn owner_mut(&mut self) -> &mut String {
10337 self.owner.get_or_insert_default()
10338 }
10339 pub fn owner_opt(&self) -> Option<&str> {
10341 self.owner.as_ref().map(|field| field as _)
10342 }
10343 pub fn set_owner<T: Into<String>>(&mut self, field: T) {
10345 self.owner = Some(field.into().into());
10346 }
10347 pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
10349 self.set_owner(field.into());
10350 self
10351 }
10352 pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
10354 self.page_size.as_mut().map(|field| field as _)
10355 }
10356 pub fn page_size_mut(&mut self) -> &mut u32 {
10359 self.page_size.get_or_insert_default()
10360 }
10361 pub fn page_size_opt(&self) -> Option<u32> {
10363 self.page_size.as_ref().map(|field| *field)
10364 }
10365 pub fn set_page_size(&mut self, field: u32) {
10367 self.page_size = Some(field);
10368 }
10369 pub fn with_page_size(mut self, field: u32) -> Self {
10371 self.set_page_size(field);
10372 self
10373 }
10374 pub fn page_token_opt(&self) -> Option<&[u8]> {
10376 self.page_token.as_ref().map(|field| field as _)
10377 }
10378 pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10380 self.page_token = Some(field.into().into());
10381 }
10382 pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
10384 mut self,
10385 field: T,
10386 ) -> Self {
10387 self.set_page_token(field.into());
10388 self
10389 }
10390 }
10391 impl super::ListBalancesResponse {
10392 pub const fn const_default() -> Self {
10393 Self {
10394 balances: Vec::new(),
10395 next_page_token: None,
10396 }
10397 }
10398 #[doc(hidden)]
10399 pub fn default_instance() -> &'static Self {
10400 static DEFAULT: super::ListBalancesResponse = super::ListBalancesResponse::const_default();
10401 &DEFAULT
10402 }
10403 pub fn balances(&self) -> &[super::Balance] {
10405 &self.balances
10406 }
10407 pub fn balances_mut(&mut self) -> &mut Vec<super::Balance> {
10410 &mut self.balances
10411 }
10412 pub fn set_balances(&mut self, field: Vec<super::Balance>) {
10414 self.balances = field;
10415 }
10416 pub fn with_balances(mut self, field: Vec<super::Balance>) -> Self {
10418 self.set_balances(field);
10419 self
10420 }
10421 pub fn next_page_token_opt(&self) -> Option<&[u8]> {
10423 self.next_page_token.as_ref().map(|field| field as _)
10424 }
10425 pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10427 self.next_page_token = Some(field.into().into());
10428 }
10429 pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
10431 mut self,
10432 field: T,
10433 ) -> Self {
10434 self.set_next_page_token(field.into());
10435 self
10436 }
10437 }
10438 impl super::ListCheckpointsRequest {
10439 pub const fn const_default() -> Self {
10440 Self {
10441 read_mask: None,
10442 start_checkpoint: None,
10443 end_checkpoint: None,
10444 filter: None,
10445 options: None,
10446 }
10447 }
10448 #[doc(hidden)]
10449 pub fn default_instance() -> &'static Self {
10450 static DEFAULT: super::ListCheckpointsRequest = super::ListCheckpointsRequest::const_default();
10451 &DEFAULT
10452 }
10453 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
10455 self.read_mask.as_mut().map(|field| field as _)
10456 }
10457 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
10460 self.read_mask.get_or_insert_default()
10461 }
10462 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
10464 self.read_mask.as_ref().map(|field| field as _)
10465 }
10466 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
10468 self.read_mask = Some(field.into().into());
10469 }
10470 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
10472 mut self,
10473 field: T,
10474 ) -> Self {
10475 self.set_read_mask(field.into());
10476 self
10477 }
10478 pub fn start_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
10480 self.start_checkpoint.as_mut().map(|field| field as _)
10481 }
10482 pub fn start_checkpoint_mut(&mut self) -> &mut u64 {
10485 self.start_checkpoint.get_or_insert_default()
10486 }
10487 pub fn start_checkpoint_opt(&self) -> Option<u64> {
10489 self.start_checkpoint.as_ref().map(|field| *field)
10490 }
10491 pub fn set_start_checkpoint(&mut self, field: u64) {
10493 self.start_checkpoint = Some(field);
10494 }
10495 pub fn with_start_checkpoint(mut self, field: u64) -> Self {
10497 self.set_start_checkpoint(field);
10498 self
10499 }
10500 pub fn end_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
10502 self.end_checkpoint.as_mut().map(|field| field as _)
10503 }
10504 pub fn end_checkpoint_mut(&mut self) -> &mut u64 {
10507 self.end_checkpoint.get_or_insert_default()
10508 }
10509 pub fn end_checkpoint_opt(&self) -> Option<u64> {
10511 self.end_checkpoint.as_ref().map(|field| *field)
10512 }
10513 pub fn set_end_checkpoint(&mut self, field: u64) {
10515 self.end_checkpoint = Some(field);
10516 }
10517 pub fn with_end_checkpoint(mut self, field: u64) -> Self {
10519 self.set_end_checkpoint(field);
10520 self
10521 }
10522 pub fn filter(&self) -> &super::TransactionFilter {
10524 self.filter
10525 .as_ref()
10526 .map(|field| field as _)
10527 .unwrap_or_else(|| super::TransactionFilter::default_instance() as _)
10528 }
10529 pub fn filter_opt_mut(&mut self) -> Option<&mut super::TransactionFilter> {
10531 self.filter.as_mut().map(|field| field as _)
10532 }
10533 pub fn filter_mut(&mut self) -> &mut super::TransactionFilter {
10536 self.filter.get_or_insert_default()
10537 }
10538 pub fn filter_opt(&self) -> Option<&super::TransactionFilter> {
10540 self.filter.as_ref().map(|field| field as _)
10541 }
10542 pub fn set_filter<T: Into<super::TransactionFilter>>(&mut self, field: T) {
10544 self.filter = Some(field.into().into());
10545 }
10546 pub fn with_filter<T: Into<super::TransactionFilter>>(
10548 mut self,
10549 field: T,
10550 ) -> Self {
10551 self.set_filter(field.into());
10552 self
10553 }
10554 pub fn options(&self) -> &super::QueryOptions {
10556 self.options
10557 .as_ref()
10558 .map(|field| field as _)
10559 .unwrap_or_else(|| super::QueryOptions::default_instance() as _)
10560 }
10561 pub fn options_opt_mut(&mut self) -> Option<&mut super::QueryOptions> {
10563 self.options.as_mut().map(|field| field as _)
10564 }
10565 pub fn options_mut(&mut self) -> &mut super::QueryOptions {
10568 self.options.get_or_insert_default()
10569 }
10570 pub fn options_opt(&self) -> Option<&super::QueryOptions> {
10572 self.options.as_ref().map(|field| field as _)
10573 }
10574 pub fn set_options<T: Into<super::QueryOptions>>(&mut self, field: T) {
10576 self.options = Some(field.into().into());
10577 }
10578 pub fn with_options<T: Into<super::QueryOptions>>(mut self, field: T) -> Self {
10580 self.set_options(field.into());
10581 self
10582 }
10583 }
10584 impl super::ListCheckpointsResponse {
10585 pub const fn const_default() -> Self {
10586 Self {
10587 checkpoint: None,
10588 watermark: None,
10589 end: None,
10590 }
10591 }
10592 #[doc(hidden)]
10593 pub fn default_instance() -> &'static Self {
10594 static DEFAULT: super::ListCheckpointsResponse = super::ListCheckpointsResponse::const_default();
10595 &DEFAULT
10596 }
10597 pub fn checkpoint(&self) -> &super::Checkpoint {
10599 self.checkpoint
10600 .as_ref()
10601 .map(|field| field as _)
10602 .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
10603 }
10604 pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
10606 self.checkpoint.as_mut().map(|field| field as _)
10607 }
10608 pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
10611 self.checkpoint.get_or_insert_default()
10612 }
10613 pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
10615 self.checkpoint.as_ref().map(|field| field as _)
10616 }
10617 pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
10619 self.checkpoint = Some(field.into().into());
10620 }
10621 pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
10623 self.set_checkpoint(field.into());
10624 self
10625 }
10626 pub fn watermark(&self) -> &super::Watermark {
10628 self.watermark
10629 .as_ref()
10630 .map(|field| field as _)
10631 .unwrap_or_else(|| super::Watermark::default_instance() as _)
10632 }
10633 pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
10635 self.watermark.as_mut().map(|field| field as _)
10636 }
10637 pub fn watermark_mut(&mut self) -> &mut super::Watermark {
10640 self.watermark.get_or_insert_default()
10641 }
10642 pub fn watermark_opt(&self) -> Option<&super::Watermark> {
10644 self.watermark.as_ref().map(|field| field as _)
10645 }
10646 pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
10648 self.watermark = Some(field.into().into());
10649 }
10650 pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
10652 self.set_watermark(field.into());
10653 self
10654 }
10655 pub fn end(&self) -> &super::QueryEnd {
10657 self.end
10658 .as_ref()
10659 .map(|field| field as _)
10660 .unwrap_or_else(|| super::QueryEnd::default_instance() as _)
10661 }
10662 pub fn end_opt_mut(&mut self) -> Option<&mut super::QueryEnd> {
10664 self.end.as_mut().map(|field| field as _)
10665 }
10666 pub fn end_mut(&mut self) -> &mut super::QueryEnd {
10669 self.end.get_or_insert_default()
10670 }
10671 pub fn end_opt(&self) -> Option<&super::QueryEnd> {
10673 self.end.as_ref().map(|field| field as _)
10674 }
10675 pub fn set_end<T: Into<super::QueryEnd>>(&mut self, field: T) {
10677 self.end = Some(field.into().into());
10678 }
10679 pub fn with_end<T: Into<super::QueryEnd>>(mut self, field: T) -> Self {
10681 self.set_end(field.into());
10682 self
10683 }
10684 }
10685 impl super::ListDynamicFieldsRequest {
10686 pub const fn const_default() -> Self {
10687 Self {
10688 parent: None,
10689 page_size: None,
10690 page_token: None,
10691 read_mask: None,
10692 }
10693 }
10694 #[doc(hidden)]
10695 pub fn default_instance() -> &'static Self {
10696 static DEFAULT: super::ListDynamicFieldsRequest = super::ListDynamicFieldsRequest::const_default();
10697 &DEFAULT
10698 }
10699 pub fn parent_opt_mut(&mut self) -> Option<&mut String> {
10701 self.parent.as_mut().map(|field| field as _)
10702 }
10703 pub fn parent_mut(&mut self) -> &mut String {
10706 self.parent.get_or_insert_default()
10707 }
10708 pub fn parent_opt(&self) -> Option<&str> {
10710 self.parent.as_ref().map(|field| field as _)
10711 }
10712 pub fn set_parent<T: Into<String>>(&mut self, field: T) {
10714 self.parent = Some(field.into().into());
10715 }
10716 pub fn with_parent<T: Into<String>>(mut self, field: T) -> Self {
10718 self.set_parent(field.into());
10719 self
10720 }
10721 pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
10723 self.page_size.as_mut().map(|field| field as _)
10724 }
10725 pub fn page_size_mut(&mut self) -> &mut u32 {
10728 self.page_size.get_or_insert_default()
10729 }
10730 pub fn page_size_opt(&self) -> Option<u32> {
10732 self.page_size.as_ref().map(|field| *field)
10733 }
10734 pub fn set_page_size(&mut self, field: u32) {
10736 self.page_size = Some(field);
10737 }
10738 pub fn with_page_size(mut self, field: u32) -> Self {
10740 self.set_page_size(field);
10741 self
10742 }
10743 pub fn page_token_opt(&self) -> Option<&[u8]> {
10745 self.page_token.as_ref().map(|field| field as _)
10746 }
10747 pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10749 self.page_token = Some(field.into().into());
10750 }
10751 pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
10753 mut self,
10754 field: T,
10755 ) -> Self {
10756 self.set_page_token(field.into());
10757 self
10758 }
10759 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
10761 self.read_mask.as_mut().map(|field| field as _)
10762 }
10763 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
10766 self.read_mask.get_or_insert_default()
10767 }
10768 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
10770 self.read_mask.as_ref().map(|field| field as _)
10771 }
10772 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
10774 self.read_mask = Some(field.into().into());
10775 }
10776 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
10778 mut self,
10779 field: T,
10780 ) -> Self {
10781 self.set_read_mask(field.into());
10782 self
10783 }
10784 }
10785 impl super::ListDynamicFieldsResponse {
10786 pub const fn const_default() -> Self {
10787 Self {
10788 dynamic_fields: Vec::new(),
10789 next_page_token: None,
10790 }
10791 }
10792 #[doc(hidden)]
10793 pub fn default_instance() -> &'static Self {
10794 static DEFAULT: super::ListDynamicFieldsResponse = super::ListDynamicFieldsResponse::const_default();
10795 &DEFAULT
10796 }
10797 pub fn dynamic_fields(&self) -> &[super::DynamicField] {
10799 &self.dynamic_fields
10800 }
10801 pub fn dynamic_fields_mut(&mut self) -> &mut Vec<super::DynamicField> {
10804 &mut self.dynamic_fields
10805 }
10806 pub fn set_dynamic_fields(&mut self, field: Vec<super::DynamicField>) {
10808 self.dynamic_fields = field;
10809 }
10810 pub fn with_dynamic_fields(mut self, field: Vec<super::DynamicField>) -> Self {
10812 self.set_dynamic_fields(field);
10813 self
10814 }
10815 pub fn next_page_token_opt(&self) -> Option<&[u8]> {
10817 self.next_page_token.as_ref().map(|field| field as _)
10818 }
10819 pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10821 self.next_page_token = Some(field.into().into());
10822 }
10823 pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
10825 mut self,
10826 field: T,
10827 ) -> Self {
10828 self.set_next_page_token(field.into());
10829 self
10830 }
10831 }
10832 impl super::ListEventsRequest {
10833 pub const fn const_default() -> Self {
10834 Self {
10835 read_mask: None,
10836 start_checkpoint: None,
10837 end_checkpoint: None,
10838 filter: None,
10839 options: None,
10840 start_transaction_index: None,
10841 start_event_index: None,
10842 end_transaction_index: None,
10843 end_event_index: None,
10844 }
10845 }
10846 #[doc(hidden)]
10847 pub fn default_instance() -> &'static Self {
10848 static DEFAULT: super::ListEventsRequest = super::ListEventsRequest::const_default();
10849 &DEFAULT
10850 }
10851 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
10853 self.read_mask.as_mut().map(|field| field as _)
10854 }
10855 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
10858 self.read_mask.get_or_insert_default()
10859 }
10860 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
10862 self.read_mask.as_ref().map(|field| field as _)
10863 }
10864 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
10866 self.read_mask = Some(field.into().into());
10867 }
10868 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
10870 mut self,
10871 field: T,
10872 ) -> Self {
10873 self.set_read_mask(field.into());
10874 self
10875 }
10876 pub fn start_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
10878 self.start_checkpoint.as_mut().map(|field| field as _)
10879 }
10880 pub fn start_checkpoint_mut(&mut self) -> &mut u64 {
10883 self.start_checkpoint.get_or_insert_default()
10884 }
10885 pub fn start_checkpoint_opt(&self) -> Option<u64> {
10887 self.start_checkpoint.as_ref().map(|field| *field)
10888 }
10889 pub fn set_start_checkpoint(&mut self, field: u64) {
10891 self.start_checkpoint = Some(field);
10892 }
10893 pub fn with_start_checkpoint(mut self, field: u64) -> Self {
10895 self.set_start_checkpoint(field);
10896 self
10897 }
10898 pub fn end_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
10900 self.end_checkpoint.as_mut().map(|field| field as _)
10901 }
10902 pub fn end_checkpoint_mut(&mut self) -> &mut u64 {
10905 self.end_checkpoint.get_or_insert_default()
10906 }
10907 pub fn end_checkpoint_opt(&self) -> Option<u64> {
10909 self.end_checkpoint.as_ref().map(|field| *field)
10910 }
10911 pub fn set_end_checkpoint(&mut self, field: u64) {
10913 self.end_checkpoint = Some(field);
10914 }
10915 pub fn with_end_checkpoint(mut self, field: u64) -> Self {
10917 self.set_end_checkpoint(field);
10918 self
10919 }
10920 pub fn filter(&self) -> &super::EventFilter {
10922 self.filter
10923 .as_ref()
10924 .map(|field| field as _)
10925 .unwrap_or_else(|| super::EventFilter::default_instance() as _)
10926 }
10927 pub fn filter_opt_mut(&mut self) -> Option<&mut super::EventFilter> {
10929 self.filter.as_mut().map(|field| field as _)
10930 }
10931 pub fn filter_mut(&mut self) -> &mut super::EventFilter {
10934 self.filter.get_or_insert_default()
10935 }
10936 pub fn filter_opt(&self) -> Option<&super::EventFilter> {
10938 self.filter.as_ref().map(|field| field as _)
10939 }
10940 pub fn set_filter<T: Into<super::EventFilter>>(&mut self, field: T) {
10942 self.filter = Some(field.into().into());
10943 }
10944 pub fn with_filter<T: Into<super::EventFilter>>(mut self, field: T) -> Self {
10946 self.set_filter(field.into());
10947 self
10948 }
10949 pub fn options(&self) -> &super::QueryOptions {
10951 self.options
10952 .as_ref()
10953 .map(|field| field as _)
10954 .unwrap_or_else(|| super::QueryOptions::default_instance() as _)
10955 }
10956 pub fn options_opt_mut(&mut self) -> Option<&mut super::QueryOptions> {
10958 self.options.as_mut().map(|field| field as _)
10959 }
10960 pub fn options_mut(&mut self) -> &mut super::QueryOptions {
10963 self.options.get_or_insert_default()
10964 }
10965 pub fn options_opt(&self) -> Option<&super::QueryOptions> {
10967 self.options.as_ref().map(|field| field as _)
10968 }
10969 pub fn set_options<T: Into<super::QueryOptions>>(&mut self, field: T) {
10971 self.options = Some(field.into().into());
10972 }
10973 pub fn with_options<T: Into<super::QueryOptions>>(mut self, field: T) -> Self {
10975 self.set_options(field.into());
10976 self
10977 }
10978 pub fn start_transaction_index_opt_mut(&mut self) -> Option<&mut u64> {
10980 self.start_transaction_index.as_mut().map(|field| field as _)
10981 }
10982 pub fn start_transaction_index_mut(&mut self) -> &mut u64 {
10985 self.start_transaction_index.get_or_insert_default()
10986 }
10987 pub fn start_transaction_index_opt(&self) -> Option<u64> {
10989 self.start_transaction_index.as_ref().map(|field| *field)
10990 }
10991 pub fn set_start_transaction_index(&mut self, field: u64) {
10993 self.start_transaction_index = Some(field);
10994 }
10995 pub fn with_start_transaction_index(mut self, field: u64) -> Self {
10997 self.set_start_transaction_index(field);
10998 self
10999 }
11000 pub fn start_event_index_opt_mut(&mut self) -> Option<&mut u32> {
11002 self.start_event_index.as_mut().map(|field| field as _)
11003 }
11004 pub fn start_event_index_mut(&mut self) -> &mut u32 {
11007 self.start_event_index.get_or_insert_default()
11008 }
11009 pub fn start_event_index_opt(&self) -> Option<u32> {
11011 self.start_event_index.as_ref().map(|field| *field)
11012 }
11013 pub fn set_start_event_index(&mut self, field: u32) {
11015 self.start_event_index = Some(field);
11016 }
11017 pub fn with_start_event_index(mut self, field: u32) -> Self {
11019 self.set_start_event_index(field);
11020 self
11021 }
11022 pub fn end_transaction_index_opt_mut(&mut self) -> Option<&mut u64> {
11024 self.end_transaction_index.as_mut().map(|field| field as _)
11025 }
11026 pub fn end_transaction_index_mut(&mut self) -> &mut u64 {
11029 self.end_transaction_index.get_or_insert_default()
11030 }
11031 pub fn end_transaction_index_opt(&self) -> Option<u64> {
11033 self.end_transaction_index.as_ref().map(|field| *field)
11034 }
11035 pub fn set_end_transaction_index(&mut self, field: u64) {
11037 self.end_transaction_index = Some(field);
11038 }
11039 pub fn with_end_transaction_index(mut self, field: u64) -> Self {
11041 self.set_end_transaction_index(field);
11042 self
11043 }
11044 pub fn end_event_index_opt_mut(&mut self) -> Option<&mut u32> {
11046 self.end_event_index.as_mut().map(|field| field as _)
11047 }
11048 pub fn end_event_index_mut(&mut self) -> &mut u32 {
11051 self.end_event_index.get_or_insert_default()
11052 }
11053 pub fn end_event_index_opt(&self) -> Option<u32> {
11055 self.end_event_index.as_ref().map(|field| *field)
11056 }
11057 pub fn set_end_event_index(&mut self, field: u32) {
11059 self.end_event_index = Some(field);
11060 }
11061 pub fn with_end_event_index(mut self, field: u32) -> Self {
11063 self.set_end_event_index(field);
11064 self
11065 }
11066 }
11067 impl super::ListEventsResponse {
11068 pub const fn const_default() -> Self {
11069 Self {
11070 event: None,
11071 watermark: None,
11072 end: None,
11073 }
11074 }
11075 #[doc(hidden)]
11076 pub fn default_instance() -> &'static Self {
11077 static DEFAULT: super::ListEventsResponse = super::ListEventsResponse::const_default();
11078 &DEFAULT
11079 }
11080 pub fn event(&self) -> &super::Event {
11082 self.event
11083 .as_ref()
11084 .map(|field| field as _)
11085 .unwrap_or_else(|| super::Event::default_instance() as _)
11086 }
11087 pub fn event_opt_mut(&mut self) -> Option<&mut super::Event> {
11089 self.event.as_mut().map(|field| field as _)
11090 }
11091 pub fn event_mut(&mut self) -> &mut super::Event {
11094 self.event.get_or_insert_default()
11095 }
11096 pub fn event_opt(&self) -> Option<&super::Event> {
11098 self.event.as_ref().map(|field| field as _)
11099 }
11100 pub fn set_event<T: Into<super::Event>>(&mut self, field: T) {
11102 self.event = Some(field.into().into());
11103 }
11104 pub fn with_event<T: Into<super::Event>>(mut self, field: T) -> Self {
11106 self.set_event(field.into());
11107 self
11108 }
11109 pub fn watermark(&self) -> &super::Watermark {
11111 self.watermark
11112 .as_ref()
11113 .map(|field| field as _)
11114 .unwrap_or_else(|| super::Watermark::default_instance() as _)
11115 }
11116 pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
11118 self.watermark.as_mut().map(|field| field as _)
11119 }
11120 pub fn watermark_mut(&mut self) -> &mut super::Watermark {
11123 self.watermark.get_or_insert_default()
11124 }
11125 pub fn watermark_opt(&self) -> Option<&super::Watermark> {
11127 self.watermark.as_ref().map(|field| field as _)
11128 }
11129 pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
11131 self.watermark = Some(field.into().into());
11132 }
11133 pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
11135 self.set_watermark(field.into());
11136 self
11137 }
11138 pub fn end(&self) -> &super::QueryEnd {
11140 self.end
11141 .as_ref()
11142 .map(|field| field as _)
11143 .unwrap_or_else(|| super::QueryEnd::default_instance() as _)
11144 }
11145 pub fn end_opt_mut(&mut self) -> Option<&mut super::QueryEnd> {
11147 self.end.as_mut().map(|field| field as _)
11148 }
11149 pub fn end_mut(&mut self) -> &mut super::QueryEnd {
11152 self.end.get_or_insert_default()
11153 }
11154 pub fn end_opt(&self) -> Option<&super::QueryEnd> {
11156 self.end.as_ref().map(|field| field as _)
11157 }
11158 pub fn set_end<T: Into<super::QueryEnd>>(&mut self, field: T) {
11160 self.end = Some(field.into().into());
11161 }
11162 pub fn with_end<T: Into<super::QueryEnd>>(mut self, field: T) -> Self {
11164 self.set_end(field.into());
11165 self
11166 }
11167 }
11168 impl super::ListObjectVersionsRequest {
11169 pub const fn const_default() -> Self {
11170 Self {
11171 object_id: None,
11172 read_mask: None,
11173 options: None,
11174 start_version: None,
11175 end_version: None,
11176 removal_read_mask: None,
11177 start_checkpoint: None,
11178 end_checkpoint: None,
11179 }
11180 }
11181 #[doc(hidden)]
11182 pub fn default_instance() -> &'static Self {
11183 static DEFAULT: super::ListObjectVersionsRequest = super::ListObjectVersionsRequest::const_default();
11184 &DEFAULT
11185 }
11186 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
11188 self.object_id.as_mut().map(|field| field as _)
11189 }
11190 pub fn object_id_mut(&mut self) -> &mut String {
11193 self.object_id.get_or_insert_default()
11194 }
11195 pub fn object_id_opt(&self) -> Option<&str> {
11197 self.object_id.as_ref().map(|field| field as _)
11198 }
11199 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
11201 self.object_id = Some(field.into().into());
11202 }
11203 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
11205 self.set_object_id(field.into());
11206 self
11207 }
11208 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
11210 self.read_mask.as_mut().map(|field| field as _)
11211 }
11212 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
11215 self.read_mask.get_or_insert_default()
11216 }
11217 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
11219 self.read_mask.as_ref().map(|field| field as _)
11220 }
11221 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
11223 self.read_mask = Some(field.into().into());
11224 }
11225 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
11227 mut self,
11228 field: T,
11229 ) -> Self {
11230 self.set_read_mask(field.into());
11231 self
11232 }
11233 pub fn options(&self) -> &super::QueryOptions {
11235 self.options
11236 .as_ref()
11237 .map(|field| field as _)
11238 .unwrap_or_else(|| super::QueryOptions::default_instance() as _)
11239 }
11240 pub fn options_opt_mut(&mut self) -> Option<&mut super::QueryOptions> {
11242 self.options.as_mut().map(|field| field as _)
11243 }
11244 pub fn options_mut(&mut self) -> &mut super::QueryOptions {
11247 self.options.get_or_insert_default()
11248 }
11249 pub fn options_opt(&self) -> Option<&super::QueryOptions> {
11251 self.options.as_ref().map(|field| field as _)
11252 }
11253 pub fn set_options<T: Into<super::QueryOptions>>(&mut self, field: T) {
11255 self.options = Some(field.into().into());
11256 }
11257 pub fn with_options<T: Into<super::QueryOptions>>(mut self, field: T) -> Self {
11259 self.set_options(field.into());
11260 self
11261 }
11262 pub fn start_version_opt_mut(&mut self) -> Option<&mut u64> {
11264 self.start_version.as_mut().map(|field| field as _)
11265 }
11266 pub fn start_version_mut(&mut self) -> &mut u64 {
11269 self.start_version.get_or_insert_default()
11270 }
11271 pub fn start_version_opt(&self) -> Option<u64> {
11273 self.start_version.as_ref().map(|field| *field)
11274 }
11275 pub fn set_start_version(&mut self, field: u64) {
11277 self.start_version = Some(field);
11278 }
11279 pub fn with_start_version(mut self, field: u64) -> Self {
11281 self.set_start_version(field);
11282 self
11283 }
11284 pub fn end_version_opt_mut(&mut self) -> Option<&mut u64> {
11286 self.end_version.as_mut().map(|field| field as _)
11287 }
11288 pub fn end_version_mut(&mut self) -> &mut u64 {
11291 self.end_version.get_or_insert_default()
11292 }
11293 pub fn end_version_opt(&self) -> Option<u64> {
11295 self.end_version.as_ref().map(|field| *field)
11296 }
11297 pub fn set_end_version(&mut self, field: u64) {
11299 self.end_version = Some(field);
11300 }
11301 pub fn with_end_version(mut self, field: u64) -> Self {
11303 self.set_end_version(field);
11304 self
11305 }
11306 pub fn removal_read_mask_opt_mut(
11308 &mut self,
11309 ) -> Option<&mut ::prost_types::FieldMask> {
11310 self.removal_read_mask.as_mut().map(|field| field as _)
11311 }
11312 pub fn removal_read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
11315 self.removal_read_mask.get_or_insert_default()
11316 }
11317 pub fn removal_read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
11319 self.removal_read_mask.as_ref().map(|field| field as _)
11320 }
11321 pub fn set_removal_read_mask<T: Into<::prost_types::FieldMask>>(
11323 &mut self,
11324 field: T,
11325 ) {
11326 self.removal_read_mask = Some(field.into().into());
11327 }
11328 pub fn with_removal_read_mask<T: Into<::prost_types::FieldMask>>(
11330 mut self,
11331 field: T,
11332 ) -> Self {
11333 self.set_removal_read_mask(field.into());
11334 self
11335 }
11336 pub fn start_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
11338 self.start_checkpoint.as_mut().map(|field| field as _)
11339 }
11340 pub fn start_checkpoint_mut(&mut self) -> &mut u64 {
11343 self.start_checkpoint.get_or_insert_default()
11344 }
11345 pub fn start_checkpoint_opt(&self) -> Option<u64> {
11347 self.start_checkpoint.as_ref().map(|field| *field)
11348 }
11349 pub fn set_start_checkpoint(&mut self, field: u64) {
11351 self.start_checkpoint = Some(field);
11352 }
11353 pub fn with_start_checkpoint(mut self, field: u64) -> Self {
11355 self.set_start_checkpoint(field);
11356 self
11357 }
11358 pub fn end_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
11360 self.end_checkpoint.as_mut().map(|field| field as _)
11361 }
11362 pub fn end_checkpoint_mut(&mut self) -> &mut u64 {
11365 self.end_checkpoint.get_or_insert_default()
11366 }
11367 pub fn end_checkpoint_opt(&self) -> Option<u64> {
11369 self.end_checkpoint.as_ref().map(|field| *field)
11370 }
11371 pub fn set_end_checkpoint(&mut self, field: u64) {
11373 self.end_checkpoint = Some(field);
11374 }
11375 pub fn with_end_checkpoint(mut self, field: u64) -> Self {
11377 self.set_end_checkpoint(field);
11378 self
11379 }
11380 }
11381 impl super::ListObjectVersionsResponse {
11382 pub const fn const_default() -> Self {
11383 Self {
11384 cursor: None,
11385 end: None,
11386 item: None,
11387 }
11388 }
11389 #[doc(hidden)]
11390 pub fn default_instance() -> &'static Self {
11391 static DEFAULT: super::ListObjectVersionsResponse = super::ListObjectVersionsResponse::const_default();
11392 &DEFAULT
11393 }
11394 pub fn cursor_opt(&self) -> Option<&[u8]> {
11396 self.cursor.as_ref().map(|field| field as _)
11397 }
11398 pub fn set_cursor<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
11400 self.cursor = Some(field.into().into());
11401 }
11402 pub fn with_cursor<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
11404 self.set_cursor(field.into());
11405 self
11406 }
11407 pub fn end(&self) -> &super::QueryEnd {
11409 self.end
11410 .as_ref()
11411 .map(|field| field as _)
11412 .unwrap_or_else(|| super::QueryEnd::default_instance() as _)
11413 }
11414 pub fn end_opt_mut(&mut self) -> Option<&mut super::QueryEnd> {
11416 self.end.as_mut().map(|field| field as _)
11417 }
11418 pub fn end_mut(&mut self) -> &mut super::QueryEnd {
11421 self.end.get_or_insert_default()
11422 }
11423 pub fn end_opt(&self) -> Option<&super::QueryEnd> {
11425 self.end.as_ref().map(|field| field as _)
11426 }
11427 pub fn set_end<T: Into<super::QueryEnd>>(&mut self, field: T) {
11429 self.end = Some(field.into().into());
11430 }
11431 pub fn with_end<T: Into<super::QueryEnd>>(mut self, field: T) -> Self {
11433 self.set_end(field.into());
11434 self
11435 }
11436 pub fn object(&self) -> &super::Object {
11438 if let Some(super::list_object_versions_response::Item::Object(field)) = &self
11439 .item
11440 {
11441 field as _
11442 } else {
11443 super::Object::default_instance() as _
11444 }
11445 }
11446 pub fn object_opt(&self) -> Option<&super::Object> {
11448 if let Some(super::list_object_versions_response::Item::Object(field)) = &self
11449 .item
11450 {
11451 Some(field as _)
11452 } else {
11453 None
11454 }
11455 }
11456 pub fn object_opt_mut(&mut self) -> Option<&mut super::Object> {
11458 if let Some(super::list_object_versions_response::Item::Object(field)) = &mut self
11459 .item
11460 {
11461 Some(field as _)
11462 } else {
11463 None
11464 }
11465 }
11466 pub fn object_mut(&mut self) -> &mut super::Object {
11470 if self.object_opt_mut().is_none() {
11471 self.item = Some(
11472 super::list_object_versions_response::Item::Object(
11473 super::Object::default(),
11474 ),
11475 );
11476 }
11477 self.object_opt_mut().unwrap()
11478 }
11479 pub fn set_object<T: Into<super::Object>>(&mut self, field: T) {
11482 self.item = Some(
11483 super::list_object_versions_response::Item::Object(field.into().into()),
11484 );
11485 }
11486 pub fn with_object<T: Into<super::Object>>(mut self, field: T) -> Self {
11489 self.set_object(field.into());
11490 self
11491 }
11492 pub fn removal(&self) -> &super::ObjectRemoval {
11494 if let Some(super::list_object_versions_response::Item::Removal(field)) = &self
11495 .item
11496 {
11497 field as _
11498 } else {
11499 super::ObjectRemoval::default_instance() as _
11500 }
11501 }
11502 pub fn removal_opt(&self) -> Option<&super::ObjectRemoval> {
11504 if let Some(super::list_object_versions_response::Item::Removal(field)) = &self
11505 .item
11506 {
11507 Some(field as _)
11508 } else {
11509 None
11510 }
11511 }
11512 pub fn removal_opt_mut(&mut self) -> Option<&mut super::ObjectRemoval> {
11514 if let Some(super::list_object_versions_response::Item::Removal(field)) = &mut self
11515 .item
11516 {
11517 Some(field as _)
11518 } else {
11519 None
11520 }
11521 }
11522 pub fn removal_mut(&mut self) -> &mut super::ObjectRemoval {
11526 if self.removal_opt_mut().is_none() {
11527 self.item = Some(
11528 super::list_object_versions_response::Item::Removal(
11529 super::ObjectRemoval::default(),
11530 ),
11531 );
11532 }
11533 self.removal_opt_mut().unwrap()
11534 }
11535 pub fn set_removal<T: Into<super::ObjectRemoval>>(&mut self, field: T) {
11538 self.item = Some(
11539 super::list_object_versions_response::Item::Removal(field.into().into()),
11540 );
11541 }
11542 pub fn with_removal<T: Into<super::ObjectRemoval>>(mut self, field: T) -> Self {
11545 self.set_removal(field.into());
11546 self
11547 }
11548 }
11549 impl super::ListOwnedObjectsRequest {
11550 pub const fn const_default() -> Self {
11551 Self {
11552 owner: None,
11553 page_size: None,
11554 page_token: None,
11555 read_mask: None,
11556 object_type: None,
11557 }
11558 }
11559 #[doc(hidden)]
11560 pub fn default_instance() -> &'static Self {
11561 static DEFAULT: super::ListOwnedObjectsRequest = super::ListOwnedObjectsRequest::const_default();
11562 &DEFAULT
11563 }
11564 pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
11566 self.owner.as_mut().map(|field| field as _)
11567 }
11568 pub fn owner_mut(&mut self) -> &mut String {
11571 self.owner.get_or_insert_default()
11572 }
11573 pub fn owner_opt(&self) -> Option<&str> {
11575 self.owner.as_ref().map(|field| field as _)
11576 }
11577 pub fn set_owner<T: Into<String>>(&mut self, field: T) {
11579 self.owner = Some(field.into().into());
11580 }
11581 pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
11583 self.set_owner(field.into());
11584 self
11585 }
11586 pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
11588 self.page_size.as_mut().map(|field| field as _)
11589 }
11590 pub fn page_size_mut(&mut self) -> &mut u32 {
11593 self.page_size.get_or_insert_default()
11594 }
11595 pub fn page_size_opt(&self) -> Option<u32> {
11597 self.page_size.as_ref().map(|field| *field)
11598 }
11599 pub fn set_page_size(&mut self, field: u32) {
11601 self.page_size = Some(field);
11602 }
11603 pub fn with_page_size(mut self, field: u32) -> Self {
11605 self.set_page_size(field);
11606 self
11607 }
11608 pub fn page_token_opt(&self) -> Option<&[u8]> {
11610 self.page_token.as_ref().map(|field| field as _)
11611 }
11612 pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
11614 self.page_token = Some(field.into().into());
11615 }
11616 pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
11618 mut self,
11619 field: T,
11620 ) -> Self {
11621 self.set_page_token(field.into());
11622 self
11623 }
11624 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
11626 self.read_mask.as_mut().map(|field| field as _)
11627 }
11628 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
11631 self.read_mask.get_or_insert_default()
11632 }
11633 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
11635 self.read_mask.as_ref().map(|field| field as _)
11636 }
11637 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
11639 self.read_mask = Some(field.into().into());
11640 }
11641 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
11643 mut self,
11644 field: T,
11645 ) -> Self {
11646 self.set_read_mask(field.into());
11647 self
11648 }
11649 pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
11651 self.object_type.as_mut().map(|field| field as _)
11652 }
11653 pub fn object_type_mut(&mut self) -> &mut String {
11656 self.object_type.get_or_insert_default()
11657 }
11658 pub fn object_type_opt(&self) -> Option<&str> {
11660 self.object_type.as_ref().map(|field| field as _)
11661 }
11662 pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
11664 self.object_type = Some(field.into().into());
11665 }
11666 pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
11668 self.set_object_type(field.into());
11669 self
11670 }
11671 }
11672 impl super::ListOwnedObjectsResponse {
11673 pub const fn const_default() -> Self {
11674 Self {
11675 objects: Vec::new(),
11676 next_page_token: None,
11677 }
11678 }
11679 #[doc(hidden)]
11680 pub fn default_instance() -> &'static Self {
11681 static DEFAULT: super::ListOwnedObjectsResponse = super::ListOwnedObjectsResponse::const_default();
11682 &DEFAULT
11683 }
11684 pub fn objects(&self) -> &[super::Object] {
11686 &self.objects
11687 }
11688 pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
11691 &mut self.objects
11692 }
11693 pub fn set_objects(&mut self, field: Vec<super::Object>) {
11695 self.objects = field;
11696 }
11697 pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
11699 self.set_objects(field);
11700 self
11701 }
11702 pub fn next_page_token_opt(&self) -> Option<&[u8]> {
11704 self.next_page_token.as_ref().map(|field| field as _)
11705 }
11706 pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
11708 self.next_page_token = Some(field.into().into());
11709 }
11710 pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
11712 mut self,
11713 field: T,
11714 ) -> Self {
11715 self.set_next_page_token(field.into());
11716 self
11717 }
11718 }
11719 impl super::ListPackageVersionsRequest {
11720 pub const fn const_default() -> Self {
11721 Self {
11722 package_id: None,
11723 page_size: None,
11724 page_token: None,
11725 options: None,
11726 start_version: None,
11727 end_version: None,
11728 start_checkpoint: None,
11729 end_checkpoint: None,
11730 }
11731 }
11732 #[doc(hidden)]
11733 pub fn default_instance() -> &'static Self {
11734 static DEFAULT: super::ListPackageVersionsRequest = super::ListPackageVersionsRequest::const_default();
11735 &DEFAULT
11736 }
11737 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
11739 self.package_id.as_mut().map(|field| field as _)
11740 }
11741 pub fn package_id_mut(&mut self) -> &mut String {
11744 self.package_id.get_or_insert_default()
11745 }
11746 pub fn package_id_opt(&self) -> Option<&str> {
11748 self.package_id.as_ref().map(|field| field as _)
11749 }
11750 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
11752 self.package_id = Some(field.into().into());
11753 }
11754 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
11756 self.set_package_id(field.into());
11757 self
11758 }
11759 pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
11761 self.page_size.as_mut().map(|field| field as _)
11762 }
11763 pub fn page_size_mut(&mut self) -> &mut u32 {
11766 self.page_size.get_or_insert_default()
11767 }
11768 pub fn page_size_opt(&self) -> Option<u32> {
11770 self.page_size.as_ref().map(|field| *field)
11771 }
11772 pub fn set_page_size(&mut self, field: u32) {
11774 self.page_size = Some(field);
11775 }
11776 pub fn with_page_size(mut self, field: u32) -> Self {
11778 self.set_page_size(field);
11779 self
11780 }
11781 pub fn page_token_opt(&self) -> Option<&[u8]> {
11783 self.page_token.as_ref().map(|field| field as _)
11784 }
11785 pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
11787 self.page_token = Some(field.into().into());
11788 }
11789 pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
11791 mut self,
11792 field: T,
11793 ) -> Self {
11794 self.set_page_token(field.into());
11795 self
11796 }
11797 pub fn options(&self) -> &super::QueryOptions {
11799 self.options
11800 .as_ref()
11801 .map(|field| field as _)
11802 .unwrap_or_else(|| super::QueryOptions::default_instance() as _)
11803 }
11804 pub fn options_opt_mut(&mut self) -> Option<&mut super::QueryOptions> {
11806 self.options.as_mut().map(|field| field as _)
11807 }
11808 pub fn options_mut(&mut self) -> &mut super::QueryOptions {
11811 self.options.get_or_insert_default()
11812 }
11813 pub fn options_opt(&self) -> Option<&super::QueryOptions> {
11815 self.options.as_ref().map(|field| field as _)
11816 }
11817 pub fn set_options<T: Into<super::QueryOptions>>(&mut self, field: T) {
11819 self.options = Some(field.into().into());
11820 }
11821 pub fn with_options<T: Into<super::QueryOptions>>(mut self, field: T) -> Self {
11823 self.set_options(field.into());
11824 self
11825 }
11826 pub fn start_version_opt_mut(&mut self) -> Option<&mut u64> {
11828 self.start_version.as_mut().map(|field| field as _)
11829 }
11830 pub fn start_version_mut(&mut self) -> &mut u64 {
11833 self.start_version.get_or_insert_default()
11834 }
11835 pub fn start_version_opt(&self) -> Option<u64> {
11837 self.start_version.as_ref().map(|field| *field)
11838 }
11839 pub fn set_start_version(&mut self, field: u64) {
11841 self.start_version = Some(field);
11842 }
11843 pub fn with_start_version(mut self, field: u64) -> Self {
11845 self.set_start_version(field);
11846 self
11847 }
11848 pub fn end_version_opt_mut(&mut self) -> Option<&mut u64> {
11850 self.end_version.as_mut().map(|field| field as _)
11851 }
11852 pub fn end_version_mut(&mut self) -> &mut u64 {
11855 self.end_version.get_or_insert_default()
11856 }
11857 pub fn end_version_opt(&self) -> Option<u64> {
11859 self.end_version.as_ref().map(|field| *field)
11860 }
11861 pub fn set_end_version(&mut self, field: u64) {
11863 self.end_version = Some(field);
11864 }
11865 pub fn with_end_version(mut self, field: u64) -> Self {
11867 self.set_end_version(field);
11868 self
11869 }
11870 pub fn start_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
11872 self.start_checkpoint.as_mut().map(|field| field as _)
11873 }
11874 pub fn start_checkpoint_mut(&mut self) -> &mut u64 {
11877 self.start_checkpoint.get_or_insert_default()
11878 }
11879 pub fn start_checkpoint_opt(&self) -> Option<u64> {
11881 self.start_checkpoint.as_ref().map(|field| *field)
11882 }
11883 pub fn set_start_checkpoint(&mut self, field: u64) {
11885 self.start_checkpoint = Some(field);
11886 }
11887 pub fn with_start_checkpoint(mut self, field: u64) -> Self {
11889 self.set_start_checkpoint(field);
11890 self
11891 }
11892 pub fn end_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
11894 self.end_checkpoint.as_mut().map(|field| field as _)
11895 }
11896 pub fn end_checkpoint_mut(&mut self) -> &mut u64 {
11899 self.end_checkpoint.get_or_insert_default()
11900 }
11901 pub fn end_checkpoint_opt(&self) -> Option<u64> {
11903 self.end_checkpoint.as_ref().map(|field| *field)
11904 }
11905 pub fn set_end_checkpoint(&mut self, field: u64) {
11907 self.end_checkpoint = Some(field);
11908 }
11909 pub fn with_end_checkpoint(mut self, field: u64) -> Self {
11911 self.set_end_checkpoint(field);
11912 self
11913 }
11914 }
11915 impl super::ListPackageVersionsResponse {
11916 pub const fn const_default() -> Self {
11917 Self {
11918 versions: Vec::new(),
11919 next_page_token: None,
11920 end: None,
11921 }
11922 }
11923 #[doc(hidden)]
11924 pub fn default_instance() -> &'static Self {
11925 static DEFAULT: super::ListPackageVersionsResponse = super::ListPackageVersionsResponse::const_default();
11926 &DEFAULT
11927 }
11928 pub fn versions(&self) -> &[super::PackageVersion] {
11930 &self.versions
11931 }
11932 pub fn versions_mut(&mut self) -> &mut Vec<super::PackageVersion> {
11935 &mut self.versions
11936 }
11937 pub fn set_versions(&mut self, field: Vec<super::PackageVersion>) {
11939 self.versions = field;
11940 }
11941 pub fn with_versions(mut self, field: Vec<super::PackageVersion>) -> Self {
11943 self.set_versions(field);
11944 self
11945 }
11946 pub fn next_page_token_opt(&self) -> Option<&[u8]> {
11948 self.next_page_token.as_ref().map(|field| field as _)
11949 }
11950 pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
11952 self.next_page_token = Some(field.into().into());
11953 }
11954 pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
11956 mut self,
11957 field: T,
11958 ) -> Self {
11959 self.set_next_page_token(field.into());
11960 self
11961 }
11962 pub fn end(&self) -> &super::QueryEnd {
11964 self.end
11965 .as_ref()
11966 .map(|field| field as _)
11967 .unwrap_or_else(|| super::QueryEnd::default_instance() as _)
11968 }
11969 pub fn end_opt_mut(&mut self) -> Option<&mut super::QueryEnd> {
11971 self.end.as_mut().map(|field| field as _)
11972 }
11973 pub fn end_mut(&mut self) -> &mut super::QueryEnd {
11976 self.end.get_or_insert_default()
11977 }
11978 pub fn end_opt(&self) -> Option<&super::QueryEnd> {
11980 self.end.as_ref().map(|field| field as _)
11981 }
11982 pub fn set_end<T: Into<super::QueryEnd>>(&mut self, field: T) {
11984 self.end = Some(field.into().into());
11985 }
11986 pub fn with_end<T: Into<super::QueryEnd>>(mut self, field: T) -> Self {
11988 self.set_end(field.into());
11989 self
11990 }
11991 }
11992 impl super::ListSystemPackagesRequest {
11993 pub const fn const_default() -> Self {
11994 Self { at_checkpoint: None }
11995 }
11996 #[doc(hidden)]
11997 pub fn default_instance() -> &'static Self {
11998 static DEFAULT: super::ListSystemPackagesRequest = super::ListSystemPackagesRequest::const_default();
11999 &DEFAULT
12000 }
12001 pub fn at_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
12003 self.at_checkpoint.as_mut().map(|field| field as _)
12004 }
12005 pub fn at_checkpoint_mut(&mut self) -> &mut u64 {
12008 self.at_checkpoint.get_or_insert_default()
12009 }
12010 pub fn at_checkpoint_opt(&self) -> Option<u64> {
12012 self.at_checkpoint.as_ref().map(|field| *field)
12013 }
12014 pub fn set_at_checkpoint(&mut self, field: u64) {
12016 self.at_checkpoint = Some(field);
12017 }
12018 pub fn with_at_checkpoint(mut self, field: u64) -> Self {
12020 self.set_at_checkpoint(field);
12021 self
12022 }
12023 }
12024 impl super::ListSystemPackagesResponse {
12025 pub const fn const_default() -> Self {
12026 Self {
12027 system_packages: Vec::new(),
12028 }
12029 }
12030 #[doc(hidden)]
12031 pub fn default_instance() -> &'static Self {
12032 static DEFAULT: super::ListSystemPackagesResponse = super::ListSystemPackagesResponse::const_default();
12033 &DEFAULT
12034 }
12035 pub fn system_packages(&self) -> &[super::PackageVersion] {
12037 &self.system_packages
12038 }
12039 pub fn system_packages_mut(&mut self) -> &mut Vec<super::PackageVersion> {
12042 &mut self.system_packages
12043 }
12044 pub fn set_system_packages(&mut self, field: Vec<super::PackageVersion>) {
12046 self.system_packages = field;
12047 }
12048 pub fn with_system_packages(
12050 mut self,
12051 field: Vec<super::PackageVersion>,
12052 ) -> Self {
12053 self.set_system_packages(field);
12054 self
12055 }
12056 }
12057 impl super::ListTransactionsRequest {
12058 pub const fn const_default() -> Self {
12059 Self {
12060 read_mask: None,
12061 start_checkpoint: None,
12062 end_checkpoint: None,
12063 filter: None,
12064 options: None,
12065 start_transaction_index: None,
12066 end_transaction_index: None,
12067 }
12068 }
12069 #[doc(hidden)]
12070 pub fn default_instance() -> &'static Self {
12071 static DEFAULT: super::ListTransactionsRequest = super::ListTransactionsRequest::const_default();
12072 &DEFAULT
12073 }
12074 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
12076 self.read_mask.as_mut().map(|field| field as _)
12077 }
12078 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
12081 self.read_mask.get_or_insert_default()
12082 }
12083 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
12085 self.read_mask.as_ref().map(|field| field as _)
12086 }
12087 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
12089 self.read_mask = Some(field.into().into());
12090 }
12091 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
12093 mut self,
12094 field: T,
12095 ) -> Self {
12096 self.set_read_mask(field.into());
12097 self
12098 }
12099 pub fn start_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
12101 self.start_checkpoint.as_mut().map(|field| field as _)
12102 }
12103 pub fn start_checkpoint_mut(&mut self) -> &mut u64 {
12106 self.start_checkpoint.get_or_insert_default()
12107 }
12108 pub fn start_checkpoint_opt(&self) -> Option<u64> {
12110 self.start_checkpoint.as_ref().map(|field| *field)
12111 }
12112 pub fn set_start_checkpoint(&mut self, field: u64) {
12114 self.start_checkpoint = Some(field);
12115 }
12116 pub fn with_start_checkpoint(mut self, field: u64) -> Self {
12118 self.set_start_checkpoint(field);
12119 self
12120 }
12121 pub fn end_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
12123 self.end_checkpoint.as_mut().map(|field| field as _)
12124 }
12125 pub fn end_checkpoint_mut(&mut self) -> &mut u64 {
12128 self.end_checkpoint.get_or_insert_default()
12129 }
12130 pub fn end_checkpoint_opt(&self) -> Option<u64> {
12132 self.end_checkpoint.as_ref().map(|field| *field)
12133 }
12134 pub fn set_end_checkpoint(&mut self, field: u64) {
12136 self.end_checkpoint = Some(field);
12137 }
12138 pub fn with_end_checkpoint(mut self, field: u64) -> Self {
12140 self.set_end_checkpoint(field);
12141 self
12142 }
12143 pub fn filter(&self) -> &super::TransactionFilter {
12145 self.filter
12146 .as_ref()
12147 .map(|field| field as _)
12148 .unwrap_or_else(|| super::TransactionFilter::default_instance() as _)
12149 }
12150 pub fn filter_opt_mut(&mut self) -> Option<&mut super::TransactionFilter> {
12152 self.filter.as_mut().map(|field| field as _)
12153 }
12154 pub fn filter_mut(&mut self) -> &mut super::TransactionFilter {
12157 self.filter.get_or_insert_default()
12158 }
12159 pub fn filter_opt(&self) -> Option<&super::TransactionFilter> {
12161 self.filter.as_ref().map(|field| field as _)
12162 }
12163 pub fn set_filter<T: Into<super::TransactionFilter>>(&mut self, field: T) {
12165 self.filter = Some(field.into().into());
12166 }
12167 pub fn with_filter<T: Into<super::TransactionFilter>>(
12169 mut self,
12170 field: T,
12171 ) -> Self {
12172 self.set_filter(field.into());
12173 self
12174 }
12175 pub fn options(&self) -> &super::QueryOptions {
12177 self.options
12178 .as_ref()
12179 .map(|field| field as _)
12180 .unwrap_or_else(|| super::QueryOptions::default_instance() as _)
12181 }
12182 pub fn options_opt_mut(&mut self) -> Option<&mut super::QueryOptions> {
12184 self.options.as_mut().map(|field| field as _)
12185 }
12186 pub fn options_mut(&mut self) -> &mut super::QueryOptions {
12189 self.options.get_or_insert_default()
12190 }
12191 pub fn options_opt(&self) -> Option<&super::QueryOptions> {
12193 self.options.as_ref().map(|field| field as _)
12194 }
12195 pub fn set_options<T: Into<super::QueryOptions>>(&mut self, field: T) {
12197 self.options = Some(field.into().into());
12198 }
12199 pub fn with_options<T: Into<super::QueryOptions>>(mut self, field: T) -> Self {
12201 self.set_options(field.into());
12202 self
12203 }
12204 pub fn start_transaction_index_opt_mut(&mut self) -> Option<&mut u64> {
12206 self.start_transaction_index.as_mut().map(|field| field as _)
12207 }
12208 pub fn start_transaction_index_mut(&mut self) -> &mut u64 {
12211 self.start_transaction_index.get_or_insert_default()
12212 }
12213 pub fn start_transaction_index_opt(&self) -> Option<u64> {
12215 self.start_transaction_index.as_ref().map(|field| *field)
12216 }
12217 pub fn set_start_transaction_index(&mut self, field: u64) {
12219 self.start_transaction_index = Some(field);
12220 }
12221 pub fn with_start_transaction_index(mut self, field: u64) -> Self {
12223 self.set_start_transaction_index(field);
12224 self
12225 }
12226 pub fn end_transaction_index_opt_mut(&mut self) -> Option<&mut u64> {
12228 self.end_transaction_index.as_mut().map(|field| field as _)
12229 }
12230 pub fn end_transaction_index_mut(&mut self) -> &mut u64 {
12233 self.end_transaction_index.get_or_insert_default()
12234 }
12235 pub fn end_transaction_index_opt(&self) -> Option<u64> {
12237 self.end_transaction_index.as_ref().map(|field| *field)
12238 }
12239 pub fn set_end_transaction_index(&mut self, field: u64) {
12241 self.end_transaction_index = Some(field);
12242 }
12243 pub fn with_end_transaction_index(mut self, field: u64) -> Self {
12245 self.set_end_transaction_index(field);
12246 self
12247 }
12248 }
12249 impl super::ListTransactionsResponse {
12250 pub const fn const_default() -> Self {
12251 Self {
12252 transaction: None,
12253 watermark: None,
12254 end: None,
12255 }
12256 }
12257 #[doc(hidden)]
12258 pub fn default_instance() -> &'static Self {
12259 static DEFAULT: super::ListTransactionsResponse = super::ListTransactionsResponse::const_default();
12260 &DEFAULT
12261 }
12262 pub fn transaction(&self) -> &super::ExecutedTransaction {
12264 self.transaction
12265 .as_ref()
12266 .map(|field| field as _)
12267 .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
12268 }
12269 pub fn transaction_opt_mut(
12271 &mut self,
12272 ) -> Option<&mut super::ExecutedTransaction> {
12273 self.transaction.as_mut().map(|field| field as _)
12274 }
12275 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
12278 self.transaction.get_or_insert_default()
12279 }
12280 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
12282 self.transaction.as_ref().map(|field| field as _)
12283 }
12284 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
12286 &mut self,
12287 field: T,
12288 ) {
12289 self.transaction = Some(field.into().into());
12290 }
12291 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
12293 mut self,
12294 field: T,
12295 ) -> Self {
12296 self.set_transaction(field.into());
12297 self
12298 }
12299 pub fn watermark(&self) -> &super::Watermark {
12301 self.watermark
12302 .as_ref()
12303 .map(|field| field as _)
12304 .unwrap_or_else(|| super::Watermark::default_instance() as _)
12305 }
12306 pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
12308 self.watermark.as_mut().map(|field| field as _)
12309 }
12310 pub fn watermark_mut(&mut self) -> &mut super::Watermark {
12313 self.watermark.get_or_insert_default()
12314 }
12315 pub fn watermark_opt(&self) -> Option<&super::Watermark> {
12317 self.watermark.as_ref().map(|field| field as _)
12318 }
12319 pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
12321 self.watermark = Some(field.into().into());
12322 }
12323 pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
12325 self.set_watermark(field.into());
12326 self
12327 }
12328 pub fn end(&self) -> &super::QueryEnd {
12330 self.end
12331 .as_ref()
12332 .map(|field| field as _)
12333 .unwrap_or_else(|| super::QueryEnd::default_instance() as _)
12334 }
12335 pub fn end_opt_mut(&mut self) -> Option<&mut super::QueryEnd> {
12337 self.end.as_mut().map(|field| field as _)
12338 }
12339 pub fn end_mut(&mut self) -> &mut super::QueryEnd {
12342 self.end.get_or_insert_default()
12343 }
12344 pub fn end_opt(&self) -> Option<&super::QueryEnd> {
12346 self.end.as_ref().map(|field| field as _)
12347 }
12348 pub fn set_end<T: Into<super::QueryEnd>>(&mut self, field: T) {
12350 self.end = Some(field.into().into());
12351 }
12352 pub fn with_end<T: Into<super::QueryEnd>>(mut self, field: T) -> Self {
12354 self.set_end(field.into());
12355 self
12356 }
12357 }
12358 impl super::LookupNameRequest {
12359 pub const fn const_default() -> Self {
12360 Self { name: None }
12361 }
12362 #[doc(hidden)]
12363 pub fn default_instance() -> &'static Self {
12364 static DEFAULT: super::LookupNameRequest = super::LookupNameRequest::const_default();
12365 &DEFAULT
12366 }
12367 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
12369 self.name.as_mut().map(|field| field as _)
12370 }
12371 pub fn name_mut(&mut self) -> &mut String {
12374 self.name.get_or_insert_default()
12375 }
12376 pub fn name_opt(&self) -> Option<&str> {
12378 self.name.as_ref().map(|field| field as _)
12379 }
12380 pub fn set_name<T: Into<String>>(&mut self, field: T) {
12382 self.name = Some(field.into().into());
12383 }
12384 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
12386 self.set_name(field.into());
12387 self
12388 }
12389 }
12390 impl super::LookupNameResponse {
12391 pub const fn const_default() -> Self {
12392 Self { record: None }
12393 }
12394 #[doc(hidden)]
12395 pub fn default_instance() -> &'static Self {
12396 static DEFAULT: super::LookupNameResponse = super::LookupNameResponse::const_default();
12397 &DEFAULT
12398 }
12399 pub fn record(&self) -> &super::NameRecord {
12401 self.record
12402 .as_ref()
12403 .map(|field| field as _)
12404 .unwrap_or_else(|| super::NameRecord::default_instance() as _)
12405 }
12406 pub fn record_opt_mut(&mut self) -> Option<&mut super::NameRecord> {
12408 self.record.as_mut().map(|field| field as _)
12409 }
12410 pub fn record_mut(&mut self) -> &mut super::NameRecord {
12413 self.record.get_or_insert_default()
12414 }
12415 pub fn record_opt(&self) -> Option<&super::NameRecord> {
12417 self.record.as_ref().map(|field| field as _)
12418 }
12419 pub fn set_record<T: Into<super::NameRecord>>(&mut self, field: T) {
12421 self.record = Some(field.into().into());
12422 }
12423 pub fn with_record<T: Into<super::NameRecord>>(mut self, field: T) -> Self {
12425 self.set_record(field.into());
12426 self
12427 }
12428 }
12429 impl super::MakeMoveVector {
12430 pub const fn const_default() -> Self {
12431 Self {
12432 element_type: None,
12433 elements: Vec::new(),
12434 }
12435 }
12436 #[doc(hidden)]
12437 pub fn default_instance() -> &'static Self {
12438 static DEFAULT: super::MakeMoveVector = super::MakeMoveVector::const_default();
12439 &DEFAULT
12440 }
12441 pub fn element_type_opt_mut(&mut self) -> Option<&mut String> {
12443 self.element_type.as_mut().map(|field| field as _)
12444 }
12445 pub fn element_type_mut(&mut self) -> &mut String {
12448 self.element_type.get_or_insert_default()
12449 }
12450 pub fn element_type_opt(&self) -> Option<&str> {
12452 self.element_type.as_ref().map(|field| field as _)
12453 }
12454 pub fn set_element_type<T: Into<String>>(&mut self, field: T) {
12456 self.element_type = Some(field.into().into());
12457 }
12458 pub fn with_element_type<T: Into<String>>(mut self, field: T) -> Self {
12460 self.set_element_type(field.into());
12461 self
12462 }
12463 pub fn elements(&self) -> &[super::Argument] {
12465 &self.elements
12466 }
12467 pub fn elements_mut(&mut self) -> &mut Vec<super::Argument> {
12470 &mut self.elements
12471 }
12472 pub fn set_elements(&mut self, field: Vec<super::Argument>) {
12474 self.elements = field;
12475 }
12476 pub fn with_elements(mut self, field: Vec<super::Argument>) -> Self {
12478 self.set_elements(field);
12479 self
12480 }
12481 }
12482 impl super::MergeCoins {
12483 pub const fn const_default() -> Self {
12484 Self {
12485 coin: None,
12486 coins_to_merge: Vec::new(),
12487 }
12488 }
12489 #[doc(hidden)]
12490 pub fn default_instance() -> &'static Self {
12491 static DEFAULT: super::MergeCoins = super::MergeCoins::const_default();
12492 &DEFAULT
12493 }
12494 pub fn coin(&self) -> &super::Argument {
12496 self.coin
12497 .as_ref()
12498 .map(|field| field as _)
12499 .unwrap_or_else(|| super::Argument::default_instance() as _)
12500 }
12501 pub fn coin_opt_mut(&mut self) -> Option<&mut super::Argument> {
12503 self.coin.as_mut().map(|field| field as _)
12504 }
12505 pub fn coin_mut(&mut self) -> &mut super::Argument {
12508 self.coin.get_or_insert_default()
12509 }
12510 pub fn coin_opt(&self) -> Option<&super::Argument> {
12512 self.coin.as_ref().map(|field| field as _)
12513 }
12514 pub fn set_coin<T: Into<super::Argument>>(&mut self, field: T) {
12516 self.coin = Some(field.into().into());
12517 }
12518 pub fn with_coin<T: Into<super::Argument>>(mut self, field: T) -> Self {
12520 self.set_coin(field.into());
12521 self
12522 }
12523 pub fn coins_to_merge(&self) -> &[super::Argument] {
12525 &self.coins_to_merge
12526 }
12527 pub fn coins_to_merge_mut(&mut self) -> &mut Vec<super::Argument> {
12530 &mut self.coins_to_merge
12531 }
12532 pub fn set_coins_to_merge(&mut self, field: Vec<super::Argument>) {
12534 self.coins_to_merge = field;
12535 }
12536 pub fn with_coins_to_merge(mut self, field: Vec<super::Argument>) -> Self {
12538 self.set_coins_to_merge(field);
12539 self
12540 }
12541 }
12542 impl super::Module {
12543 pub const fn const_default() -> Self {
12544 Self {
12545 name: None,
12546 contents: None,
12547 datatypes: Vec::new(),
12548 functions: Vec::new(),
12549 }
12550 }
12551 #[doc(hidden)]
12552 pub fn default_instance() -> &'static Self {
12553 static DEFAULT: super::Module = super::Module::const_default();
12554 &DEFAULT
12555 }
12556 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
12558 self.name.as_mut().map(|field| field as _)
12559 }
12560 pub fn name_mut(&mut self) -> &mut String {
12563 self.name.get_or_insert_default()
12564 }
12565 pub fn name_opt(&self) -> Option<&str> {
12567 self.name.as_ref().map(|field| field as _)
12568 }
12569 pub fn set_name<T: Into<String>>(&mut self, field: T) {
12571 self.name = Some(field.into().into());
12572 }
12573 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
12575 self.set_name(field.into());
12576 self
12577 }
12578 pub fn contents_opt(&self) -> Option<&[u8]> {
12580 self.contents.as_ref().map(|field| field as _)
12581 }
12582 pub fn set_contents<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
12584 self.contents = Some(field.into().into());
12585 }
12586 pub fn with_contents<T: Into<::prost::bytes::Bytes>>(
12588 mut self,
12589 field: T,
12590 ) -> Self {
12591 self.set_contents(field.into());
12592 self
12593 }
12594 pub fn datatypes(&self) -> &[super::DatatypeDescriptor] {
12596 &self.datatypes
12597 }
12598 pub fn datatypes_mut(&mut self) -> &mut Vec<super::DatatypeDescriptor> {
12601 &mut self.datatypes
12602 }
12603 pub fn set_datatypes(&mut self, field: Vec<super::DatatypeDescriptor>) {
12605 self.datatypes = field;
12606 }
12607 pub fn with_datatypes(mut self, field: Vec<super::DatatypeDescriptor>) -> Self {
12609 self.set_datatypes(field);
12610 self
12611 }
12612 pub fn functions(&self) -> &[super::FunctionDescriptor] {
12614 &self.functions
12615 }
12616 pub fn functions_mut(&mut self) -> &mut Vec<super::FunctionDescriptor> {
12619 &mut self.functions
12620 }
12621 pub fn set_functions(&mut self, field: Vec<super::FunctionDescriptor>) {
12623 self.functions = field;
12624 }
12625 pub fn with_functions(mut self, field: Vec<super::FunctionDescriptor>) -> Self {
12627 self.set_functions(field);
12628 self
12629 }
12630 }
12631 impl super::MoveAbort {
12632 pub const fn const_default() -> Self {
12633 Self {
12634 abort_code: None,
12635 location: None,
12636 clever_error: None,
12637 }
12638 }
12639 #[doc(hidden)]
12640 pub fn default_instance() -> &'static Self {
12641 static DEFAULT: super::MoveAbort = super::MoveAbort::const_default();
12642 &DEFAULT
12643 }
12644 pub fn abort_code_opt_mut(&mut self) -> Option<&mut u64> {
12646 self.abort_code.as_mut().map(|field| field as _)
12647 }
12648 pub fn abort_code_mut(&mut self) -> &mut u64 {
12651 self.abort_code.get_or_insert_default()
12652 }
12653 pub fn abort_code_opt(&self) -> Option<u64> {
12655 self.abort_code.as_ref().map(|field| *field)
12656 }
12657 pub fn set_abort_code(&mut self, field: u64) {
12659 self.abort_code = Some(field);
12660 }
12661 pub fn with_abort_code(mut self, field: u64) -> Self {
12663 self.set_abort_code(field);
12664 self
12665 }
12666 pub fn location(&self) -> &super::MoveLocation {
12668 self.location
12669 .as_ref()
12670 .map(|field| field as _)
12671 .unwrap_or_else(|| super::MoveLocation::default_instance() as _)
12672 }
12673 pub fn location_opt_mut(&mut self) -> Option<&mut super::MoveLocation> {
12675 self.location.as_mut().map(|field| field as _)
12676 }
12677 pub fn location_mut(&mut self) -> &mut super::MoveLocation {
12680 self.location.get_or_insert_default()
12681 }
12682 pub fn location_opt(&self) -> Option<&super::MoveLocation> {
12684 self.location.as_ref().map(|field| field as _)
12685 }
12686 pub fn set_location<T: Into<super::MoveLocation>>(&mut self, field: T) {
12688 self.location = Some(field.into().into());
12689 }
12690 pub fn with_location<T: Into<super::MoveLocation>>(mut self, field: T) -> Self {
12692 self.set_location(field.into());
12693 self
12694 }
12695 pub fn clever_error(&self) -> &super::CleverError {
12697 self.clever_error
12698 .as_ref()
12699 .map(|field| field as _)
12700 .unwrap_or_else(|| super::CleverError::default_instance() as _)
12701 }
12702 pub fn clever_error_opt_mut(&mut self) -> Option<&mut super::CleverError> {
12704 self.clever_error.as_mut().map(|field| field as _)
12705 }
12706 pub fn clever_error_mut(&mut self) -> &mut super::CleverError {
12709 self.clever_error.get_or_insert_default()
12710 }
12711 pub fn clever_error_opt(&self) -> Option<&super::CleverError> {
12713 self.clever_error.as_ref().map(|field| field as _)
12714 }
12715 pub fn set_clever_error<T: Into<super::CleverError>>(&mut self, field: T) {
12717 self.clever_error = Some(field.into().into());
12718 }
12719 pub fn with_clever_error<T: Into<super::CleverError>>(
12721 mut self,
12722 field: T,
12723 ) -> Self {
12724 self.set_clever_error(field.into());
12725 self
12726 }
12727 }
12728 impl super::MoveCall {
12729 pub const fn const_default() -> Self {
12730 Self {
12731 package: None,
12732 module: None,
12733 function: None,
12734 type_arguments: Vec::new(),
12735 arguments: Vec::new(),
12736 }
12737 }
12738 #[doc(hidden)]
12739 pub fn default_instance() -> &'static Self {
12740 static DEFAULT: super::MoveCall = super::MoveCall::const_default();
12741 &DEFAULT
12742 }
12743 pub fn package_opt_mut(&mut self) -> Option<&mut String> {
12745 self.package.as_mut().map(|field| field as _)
12746 }
12747 pub fn package_mut(&mut self) -> &mut String {
12750 self.package.get_or_insert_default()
12751 }
12752 pub fn package_opt(&self) -> Option<&str> {
12754 self.package.as_ref().map(|field| field as _)
12755 }
12756 pub fn set_package<T: Into<String>>(&mut self, field: T) {
12758 self.package = Some(field.into().into());
12759 }
12760 pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
12762 self.set_package(field.into());
12763 self
12764 }
12765 pub fn module_opt_mut(&mut self) -> Option<&mut String> {
12767 self.module.as_mut().map(|field| field as _)
12768 }
12769 pub fn module_mut(&mut self) -> &mut String {
12772 self.module.get_or_insert_default()
12773 }
12774 pub fn module_opt(&self) -> Option<&str> {
12776 self.module.as_ref().map(|field| field as _)
12777 }
12778 pub fn set_module<T: Into<String>>(&mut self, field: T) {
12780 self.module = Some(field.into().into());
12781 }
12782 pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
12784 self.set_module(field.into());
12785 self
12786 }
12787 pub fn function_opt_mut(&mut self) -> Option<&mut String> {
12789 self.function.as_mut().map(|field| field as _)
12790 }
12791 pub fn function_mut(&mut self) -> &mut String {
12794 self.function.get_or_insert_default()
12795 }
12796 pub fn function_opt(&self) -> Option<&str> {
12798 self.function.as_ref().map(|field| field as _)
12799 }
12800 pub fn set_function<T: Into<String>>(&mut self, field: T) {
12802 self.function = Some(field.into().into());
12803 }
12804 pub fn with_function<T: Into<String>>(mut self, field: T) -> Self {
12806 self.set_function(field.into());
12807 self
12808 }
12809 pub fn type_arguments(&self) -> &[String] {
12811 &self.type_arguments
12812 }
12813 pub fn type_arguments_mut(&mut self) -> &mut Vec<String> {
12816 &mut self.type_arguments
12817 }
12818 pub fn set_type_arguments(&mut self, field: Vec<String>) {
12820 self.type_arguments = field;
12821 }
12822 pub fn with_type_arguments(mut self, field: Vec<String>) -> Self {
12824 self.set_type_arguments(field);
12825 self
12826 }
12827 pub fn arguments(&self) -> &[super::Argument] {
12829 &self.arguments
12830 }
12831 pub fn arguments_mut(&mut self) -> &mut Vec<super::Argument> {
12834 &mut self.arguments
12835 }
12836 pub fn set_arguments(&mut self, field: Vec<super::Argument>) {
12838 self.arguments = field;
12839 }
12840 pub fn with_arguments(mut self, field: Vec<super::Argument>) -> Self {
12842 self.set_arguments(field);
12843 self
12844 }
12845 }
12846 impl super::MoveCallFilter {
12847 pub const fn const_default() -> Self {
12848 Self { function: None }
12849 }
12850 #[doc(hidden)]
12851 pub fn default_instance() -> &'static Self {
12852 static DEFAULT: super::MoveCallFilter = super::MoveCallFilter::const_default();
12853 &DEFAULT
12854 }
12855 pub fn function_opt_mut(&mut self) -> Option<&mut String> {
12857 self.function.as_mut().map(|field| field as _)
12858 }
12859 pub fn function_mut(&mut self) -> &mut String {
12862 self.function.get_or_insert_default()
12863 }
12864 pub fn function_opt(&self) -> Option<&str> {
12866 self.function.as_ref().map(|field| field as _)
12867 }
12868 pub fn set_function<T: Into<String>>(&mut self, field: T) {
12870 self.function = Some(field.into().into());
12871 }
12872 pub fn with_function<T: Into<String>>(mut self, field: T) -> Self {
12874 self.set_function(field.into());
12875 self
12876 }
12877 }
12878 impl super::MoveLocation {
12879 pub const fn const_default() -> Self {
12880 Self {
12881 package: None,
12882 module: None,
12883 function: None,
12884 instruction: None,
12885 function_name: None,
12886 }
12887 }
12888 #[doc(hidden)]
12889 pub fn default_instance() -> &'static Self {
12890 static DEFAULT: super::MoveLocation = super::MoveLocation::const_default();
12891 &DEFAULT
12892 }
12893 pub fn package_opt_mut(&mut self) -> Option<&mut String> {
12895 self.package.as_mut().map(|field| field as _)
12896 }
12897 pub fn package_mut(&mut self) -> &mut String {
12900 self.package.get_or_insert_default()
12901 }
12902 pub fn package_opt(&self) -> Option<&str> {
12904 self.package.as_ref().map(|field| field as _)
12905 }
12906 pub fn set_package<T: Into<String>>(&mut self, field: T) {
12908 self.package = Some(field.into().into());
12909 }
12910 pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
12912 self.set_package(field.into());
12913 self
12914 }
12915 pub fn module_opt_mut(&mut self) -> Option<&mut String> {
12917 self.module.as_mut().map(|field| field as _)
12918 }
12919 pub fn module_mut(&mut self) -> &mut String {
12922 self.module.get_or_insert_default()
12923 }
12924 pub fn module_opt(&self) -> Option<&str> {
12926 self.module.as_ref().map(|field| field as _)
12927 }
12928 pub fn set_module<T: Into<String>>(&mut self, field: T) {
12930 self.module = Some(field.into().into());
12931 }
12932 pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
12934 self.set_module(field.into());
12935 self
12936 }
12937 pub fn function_opt_mut(&mut self) -> Option<&mut u32> {
12939 self.function.as_mut().map(|field| field as _)
12940 }
12941 pub fn function_mut(&mut self) -> &mut u32 {
12944 self.function.get_or_insert_default()
12945 }
12946 pub fn function_opt(&self) -> Option<u32> {
12948 self.function.as_ref().map(|field| *field)
12949 }
12950 pub fn set_function(&mut self, field: u32) {
12952 self.function = Some(field);
12953 }
12954 pub fn with_function(mut self, field: u32) -> Self {
12956 self.set_function(field);
12957 self
12958 }
12959 pub fn instruction_opt_mut(&mut self) -> Option<&mut u32> {
12961 self.instruction.as_mut().map(|field| field as _)
12962 }
12963 pub fn instruction_mut(&mut self) -> &mut u32 {
12966 self.instruction.get_or_insert_default()
12967 }
12968 pub fn instruction_opt(&self) -> Option<u32> {
12970 self.instruction.as_ref().map(|field| *field)
12971 }
12972 pub fn set_instruction(&mut self, field: u32) {
12974 self.instruction = Some(field);
12975 }
12976 pub fn with_instruction(mut self, field: u32) -> Self {
12978 self.set_instruction(field);
12979 self
12980 }
12981 pub fn function_name_opt_mut(&mut self) -> Option<&mut String> {
12983 self.function_name.as_mut().map(|field| field as _)
12984 }
12985 pub fn function_name_mut(&mut self) -> &mut String {
12988 self.function_name.get_or_insert_default()
12989 }
12990 pub fn function_name_opt(&self) -> Option<&str> {
12992 self.function_name.as_ref().map(|field| field as _)
12993 }
12994 pub fn set_function_name<T: Into<String>>(&mut self, field: T) {
12996 self.function_name = Some(field.into().into());
12997 }
12998 pub fn with_function_name<T: Into<String>>(mut self, field: T) -> Self {
13000 self.set_function_name(field.into());
13001 self
13002 }
13003 }
13004 impl super::MoveTable {
13005 pub const fn const_default() -> Self {
13006 Self { id: None, size: None }
13007 }
13008 #[doc(hidden)]
13009 pub fn default_instance() -> &'static Self {
13010 static DEFAULT: super::MoveTable = super::MoveTable::const_default();
13011 &DEFAULT
13012 }
13013 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
13015 self.id.as_mut().map(|field| field as _)
13016 }
13017 pub fn id_mut(&mut self) -> &mut String {
13020 self.id.get_or_insert_default()
13021 }
13022 pub fn id_opt(&self) -> Option<&str> {
13024 self.id.as_ref().map(|field| field as _)
13025 }
13026 pub fn set_id<T: Into<String>>(&mut self, field: T) {
13028 self.id = Some(field.into().into());
13029 }
13030 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
13032 self.set_id(field.into());
13033 self
13034 }
13035 pub fn size_opt_mut(&mut self) -> Option<&mut u64> {
13037 self.size.as_mut().map(|field| field as _)
13038 }
13039 pub fn size_mut(&mut self) -> &mut u64 {
13042 self.size.get_or_insert_default()
13043 }
13044 pub fn size_opt(&self) -> Option<u64> {
13046 self.size.as_ref().map(|field| *field)
13047 }
13048 pub fn set_size(&mut self, field: u64) {
13050 self.size = Some(field);
13051 }
13052 pub fn with_size(mut self, field: u64) -> Self {
13054 self.set_size(field);
13055 self
13056 }
13057 }
13058 impl super::MultisigAggregatedSignature {
13059 pub const fn const_default() -> Self {
13060 Self {
13061 signatures: Vec::new(),
13062 bitmap: None,
13063 legacy_bitmap: None,
13064 committee: None,
13065 }
13066 }
13067 #[doc(hidden)]
13068 pub fn default_instance() -> &'static Self {
13069 static DEFAULT: super::MultisigAggregatedSignature = super::MultisigAggregatedSignature::const_default();
13070 &DEFAULT
13071 }
13072 pub fn signatures(&self) -> &[super::MultisigMemberSignature] {
13074 &self.signatures
13075 }
13076 pub fn signatures_mut(&mut self) -> &mut Vec<super::MultisigMemberSignature> {
13079 &mut self.signatures
13080 }
13081 pub fn set_signatures(&mut self, field: Vec<super::MultisigMemberSignature>) {
13083 self.signatures = field;
13084 }
13085 pub fn with_signatures(
13087 mut self,
13088 field: Vec<super::MultisigMemberSignature>,
13089 ) -> Self {
13090 self.set_signatures(field);
13091 self
13092 }
13093 pub fn bitmap_opt_mut(&mut self) -> Option<&mut u32> {
13095 self.bitmap.as_mut().map(|field| field as _)
13096 }
13097 pub fn bitmap_mut(&mut self) -> &mut u32 {
13100 self.bitmap.get_or_insert_default()
13101 }
13102 pub fn bitmap_opt(&self) -> Option<u32> {
13104 self.bitmap.as_ref().map(|field| *field)
13105 }
13106 pub fn set_bitmap(&mut self, field: u32) {
13108 self.bitmap = Some(field);
13109 }
13110 pub fn with_bitmap(mut self, field: u32) -> Self {
13112 self.set_bitmap(field);
13113 self
13114 }
13115 pub fn legacy_bitmap_opt(&self) -> Option<&[u8]> {
13117 self.legacy_bitmap.as_ref().map(|field| field as _)
13118 }
13119 pub fn set_legacy_bitmap<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
13121 self.legacy_bitmap = Some(field.into().into());
13122 }
13123 pub fn with_legacy_bitmap<T: Into<::prost::bytes::Bytes>>(
13125 mut self,
13126 field: T,
13127 ) -> Self {
13128 self.set_legacy_bitmap(field.into());
13129 self
13130 }
13131 pub fn committee(&self) -> &super::MultisigCommittee {
13133 self.committee
13134 .as_ref()
13135 .map(|field| field as _)
13136 .unwrap_or_else(|| super::MultisigCommittee::default_instance() as _)
13137 }
13138 pub fn committee_opt_mut(&mut self) -> Option<&mut super::MultisigCommittee> {
13140 self.committee.as_mut().map(|field| field as _)
13141 }
13142 pub fn committee_mut(&mut self) -> &mut super::MultisigCommittee {
13145 self.committee.get_or_insert_default()
13146 }
13147 pub fn committee_opt(&self) -> Option<&super::MultisigCommittee> {
13149 self.committee.as_ref().map(|field| field as _)
13150 }
13151 pub fn set_committee<T: Into<super::MultisigCommittee>>(&mut self, field: T) {
13153 self.committee = Some(field.into().into());
13154 }
13155 pub fn with_committee<T: Into<super::MultisigCommittee>>(
13157 mut self,
13158 field: T,
13159 ) -> Self {
13160 self.set_committee(field.into());
13161 self
13162 }
13163 }
13164 impl super::MultisigCommittee {
13165 pub const fn const_default() -> Self {
13166 Self {
13167 members: Vec::new(),
13168 threshold: None,
13169 }
13170 }
13171 #[doc(hidden)]
13172 pub fn default_instance() -> &'static Self {
13173 static DEFAULT: super::MultisigCommittee = super::MultisigCommittee::const_default();
13174 &DEFAULT
13175 }
13176 pub fn members(&self) -> &[super::MultisigMember] {
13178 &self.members
13179 }
13180 pub fn members_mut(&mut self) -> &mut Vec<super::MultisigMember> {
13183 &mut self.members
13184 }
13185 pub fn set_members(&mut self, field: Vec<super::MultisigMember>) {
13187 self.members = field;
13188 }
13189 pub fn with_members(mut self, field: Vec<super::MultisigMember>) -> Self {
13191 self.set_members(field);
13192 self
13193 }
13194 pub fn threshold_opt_mut(&mut self) -> Option<&mut u32> {
13196 self.threshold.as_mut().map(|field| field as _)
13197 }
13198 pub fn threshold_mut(&mut self) -> &mut u32 {
13201 self.threshold.get_or_insert_default()
13202 }
13203 pub fn threshold_opt(&self) -> Option<u32> {
13205 self.threshold.as_ref().map(|field| *field)
13206 }
13207 pub fn set_threshold(&mut self, field: u32) {
13209 self.threshold = Some(field);
13210 }
13211 pub fn with_threshold(mut self, field: u32) -> Self {
13213 self.set_threshold(field);
13214 self
13215 }
13216 }
13217 impl super::MultisigMember {
13218 pub const fn const_default() -> Self {
13219 Self {
13220 public_key: None,
13221 weight: None,
13222 }
13223 }
13224 #[doc(hidden)]
13225 pub fn default_instance() -> &'static Self {
13226 static DEFAULT: super::MultisigMember = super::MultisigMember::const_default();
13227 &DEFAULT
13228 }
13229 pub fn public_key(&self) -> &super::MultisigMemberPublicKey {
13231 self.public_key
13232 .as_ref()
13233 .map(|field| field as _)
13234 .unwrap_or_else(|| {
13235 super::MultisigMemberPublicKey::default_instance() as _
13236 })
13237 }
13238 pub fn public_key_opt_mut(
13240 &mut self,
13241 ) -> Option<&mut super::MultisigMemberPublicKey> {
13242 self.public_key.as_mut().map(|field| field as _)
13243 }
13244 pub fn public_key_mut(&mut self) -> &mut super::MultisigMemberPublicKey {
13247 self.public_key.get_or_insert_default()
13248 }
13249 pub fn public_key_opt(&self) -> Option<&super::MultisigMemberPublicKey> {
13251 self.public_key.as_ref().map(|field| field as _)
13252 }
13253 pub fn set_public_key<T: Into<super::MultisigMemberPublicKey>>(
13255 &mut self,
13256 field: T,
13257 ) {
13258 self.public_key = Some(field.into().into());
13259 }
13260 pub fn with_public_key<T: Into<super::MultisigMemberPublicKey>>(
13262 mut self,
13263 field: T,
13264 ) -> Self {
13265 self.set_public_key(field.into());
13266 self
13267 }
13268 pub fn weight_opt_mut(&mut self) -> Option<&mut u32> {
13270 self.weight.as_mut().map(|field| field as _)
13271 }
13272 pub fn weight_mut(&mut self) -> &mut u32 {
13275 self.weight.get_or_insert_default()
13276 }
13277 pub fn weight_opt(&self) -> Option<u32> {
13279 self.weight.as_ref().map(|field| *field)
13280 }
13281 pub fn set_weight(&mut self, field: u32) {
13283 self.weight = Some(field);
13284 }
13285 pub fn with_weight(mut self, field: u32) -> Self {
13287 self.set_weight(field);
13288 self
13289 }
13290 }
13291 impl super::MultisigMemberPublicKey {
13292 pub const fn const_default() -> Self {
13293 Self {
13294 scheme: None,
13295 public_key: None,
13296 zklogin: None,
13297 }
13298 }
13299 #[doc(hidden)]
13300 pub fn default_instance() -> &'static Self {
13301 static DEFAULT: super::MultisigMemberPublicKey = super::MultisigMemberPublicKey::const_default();
13302 &DEFAULT
13303 }
13304 pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
13306 self.set_scheme(field.into());
13307 self
13308 }
13309 pub fn public_key_opt(&self) -> Option<&[u8]> {
13311 self.public_key.as_ref().map(|field| field as _)
13312 }
13313 pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
13315 self.public_key = Some(field.into().into());
13316 }
13317 pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
13319 mut self,
13320 field: T,
13321 ) -> Self {
13322 self.set_public_key(field.into());
13323 self
13324 }
13325 pub fn zklogin(&self) -> &super::ZkLoginPublicIdentifier {
13327 self.zklogin
13328 .as_ref()
13329 .map(|field| field as _)
13330 .unwrap_or_else(|| {
13331 super::ZkLoginPublicIdentifier::default_instance() as _
13332 })
13333 }
13334 pub fn zklogin_opt_mut(
13336 &mut self,
13337 ) -> Option<&mut super::ZkLoginPublicIdentifier> {
13338 self.zklogin.as_mut().map(|field| field as _)
13339 }
13340 pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginPublicIdentifier {
13343 self.zklogin.get_or_insert_default()
13344 }
13345 pub fn zklogin_opt(&self) -> Option<&super::ZkLoginPublicIdentifier> {
13347 self.zklogin.as_ref().map(|field| field as _)
13348 }
13349 pub fn set_zklogin<T: Into<super::ZkLoginPublicIdentifier>>(
13351 &mut self,
13352 field: T,
13353 ) {
13354 self.zklogin = Some(field.into().into());
13355 }
13356 pub fn with_zklogin<T: Into<super::ZkLoginPublicIdentifier>>(
13358 mut self,
13359 field: T,
13360 ) -> Self {
13361 self.set_zklogin(field.into());
13362 self
13363 }
13364 }
13365 impl super::MultisigMemberSignature {
13366 pub const fn const_default() -> Self {
13367 Self {
13368 scheme: None,
13369 signature: None,
13370 zklogin: None,
13371 passkey: None,
13372 }
13373 }
13374 #[doc(hidden)]
13375 pub fn default_instance() -> &'static Self {
13376 static DEFAULT: super::MultisigMemberSignature = super::MultisigMemberSignature::const_default();
13377 &DEFAULT
13378 }
13379 pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
13381 self.set_scheme(field.into());
13382 self
13383 }
13384 pub fn signature_opt(&self) -> Option<&[u8]> {
13386 self.signature.as_ref().map(|field| field as _)
13387 }
13388 pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
13390 self.signature = Some(field.into().into());
13391 }
13392 pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
13394 mut self,
13395 field: T,
13396 ) -> Self {
13397 self.set_signature(field.into());
13398 self
13399 }
13400 pub fn zklogin(&self) -> &super::ZkLoginAuthenticator {
13402 self.zklogin
13403 .as_ref()
13404 .map(|field| field as _)
13405 .unwrap_or_else(|| super::ZkLoginAuthenticator::default_instance() as _)
13406 }
13407 pub fn zklogin_opt_mut(&mut self) -> Option<&mut super::ZkLoginAuthenticator> {
13409 self.zklogin.as_mut().map(|field| field as _)
13410 }
13411 pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginAuthenticator {
13414 self.zklogin.get_or_insert_default()
13415 }
13416 pub fn zklogin_opt(&self) -> Option<&super::ZkLoginAuthenticator> {
13418 self.zklogin.as_ref().map(|field| field as _)
13419 }
13420 pub fn set_zklogin<T: Into<super::ZkLoginAuthenticator>>(&mut self, field: T) {
13422 self.zklogin = Some(field.into().into());
13423 }
13424 pub fn with_zklogin<T: Into<super::ZkLoginAuthenticator>>(
13426 mut self,
13427 field: T,
13428 ) -> Self {
13429 self.set_zklogin(field.into());
13430 self
13431 }
13432 pub fn passkey(&self) -> &super::PasskeyAuthenticator {
13434 self.passkey
13435 .as_ref()
13436 .map(|field| field as _)
13437 .unwrap_or_else(|| super::PasskeyAuthenticator::default_instance() as _)
13438 }
13439 pub fn passkey_opt_mut(&mut self) -> Option<&mut super::PasskeyAuthenticator> {
13441 self.passkey.as_mut().map(|field| field as _)
13442 }
13443 pub fn passkey_mut(&mut self) -> &mut super::PasskeyAuthenticator {
13446 self.passkey.get_or_insert_default()
13447 }
13448 pub fn passkey_opt(&self) -> Option<&super::PasskeyAuthenticator> {
13450 self.passkey.as_ref().map(|field| field as _)
13451 }
13452 pub fn set_passkey<T: Into<super::PasskeyAuthenticator>>(&mut self, field: T) {
13454 self.passkey = Some(field.into().into());
13455 }
13456 pub fn with_passkey<T: Into<super::PasskeyAuthenticator>>(
13458 mut self,
13459 field: T,
13460 ) -> Self {
13461 self.set_passkey(field.into());
13462 self
13463 }
13464 }
13465 impl super::NameRecord {
13466 pub const fn const_default() -> Self {
13467 Self {
13468 id: None,
13469 name: None,
13470 registration_nft_id: None,
13471 expiration_timestamp: None,
13472 target_address: None,
13473 data: std::collections::BTreeMap::new(),
13474 }
13475 }
13476 #[doc(hidden)]
13477 pub fn default_instance() -> &'static Self {
13478 static DEFAULT: super::NameRecord = super::NameRecord::const_default();
13479 &DEFAULT
13480 }
13481 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
13483 self.id.as_mut().map(|field| field as _)
13484 }
13485 pub fn id_mut(&mut self) -> &mut String {
13488 self.id.get_or_insert_default()
13489 }
13490 pub fn id_opt(&self) -> Option<&str> {
13492 self.id.as_ref().map(|field| field as _)
13493 }
13494 pub fn set_id<T: Into<String>>(&mut self, field: T) {
13496 self.id = Some(field.into().into());
13497 }
13498 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
13500 self.set_id(field.into());
13501 self
13502 }
13503 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
13505 self.name.as_mut().map(|field| field as _)
13506 }
13507 pub fn name_mut(&mut self) -> &mut String {
13510 self.name.get_or_insert_default()
13511 }
13512 pub fn name_opt(&self) -> Option<&str> {
13514 self.name.as_ref().map(|field| field as _)
13515 }
13516 pub fn set_name<T: Into<String>>(&mut self, field: T) {
13518 self.name = Some(field.into().into());
13519 }
13520 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
13522 self.set_name(field.into());
13523 self
13524 }
13525 pub fn registration_nft_id_opt_mut(&mut self) -> Option<&mut String> {
13527 self.registration_nft_id.as_mut().map(|field| field as _)
13528 }
13529 pub fn registration_nft_id_mut(&mut self) -> &mut String {
13532 self.registration_nft_id.get_or_insert_default()
13533 }
13534 pub fn registration_nft_id_opt(&self) -> Option<&str> {
13536 self.registration_nft_id.as_ref().map(|field| field as _)
13537 }
13538 pub fn set_registration_nft_id<T: Into<String>>(&mut self, field: T) {
13540 self.registration_nft_id = Some(field.into().into());
13541 }
13542 pub fn with_registration_nft_id<T: Into<String>>(mut self, field: T) -> Self {
13544 self.set_registration_nft_id(field.into());
13545 self
13546 }
13547 pub fn expiration_timestamp_opt_mut(
13549 &mut self,
13550 ) -> Option<&mut ::prost_types::Timestamp> {
13551 self.expiration_timestamp.as_mut().map(|field| field as _)
13552 }
13553 pub fn expiration_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
13556 self.expiration_timestamp.get_or_insert_default()
13557 }
13558 pub fn expiration_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
13560 self.expiration_timestamp.as_ref().map(|field| field as _)
13561 }
13562 pub fn set_expiration_timestamp<T: Into<::prost_types::Timestamp>>(
13564 &mut self,
13565 field: T,
13566 ) {
13567 self.expiration_timestamp = Some(field.into().into());
13568 }
13569 pub fn with_expiration_timestamp<T: Into<::prost_types::Timestamp>>(
13571 mut self,
13572 field: T,
13573 ) -> Self {
13574 self.set_expiration_timestamp(field.into());
13575 self
13576 }
13577 pub fn target_address_opt_mut(&mut self) -> Option<&mut String> {
13579 self.target_address.as_mut().map(|field| field as _)
13580 }
13581 pub fn target_address_mut(&mut self) -> &mut String {
13584 self.target_address.get_or_insert_default()
13585 }
13586 pub fn target_address_opt(&self) -> Option<&str> {
13588 self.target_address.as_ref().map(|field| field as _)
13589 }
13590 pub fn set_target_address<T: Into<String>>(&mut self, field: T) {
13592 self.target_address = Some(field.into().into());
13593 }
13594 pub fn with_target_address<T: Into<String>>(mut self, field: T) -> Self {
13596 self.set_target_address(field.into());
13597 self
13598 }
13599 pub fn data(&self) -> &::std::collections::BTreeMap<String, String> {
13601 &self.data
13602 }
13603 pub fn data_mut(&mut self) -> &mut ::std::collections::BTreeMap<String, String> {
13606 &mut self.data
13607 }
13608 pub fn set_data(&mut self, field: ::std::collections::BTreeMap<String, String>) {
13610 self.data = field;
13611 }
13612 pub fn with_data(
13614 mut self,
13615 field: ::std::collections::BTreeMap<String, String>,
13616 ) -> Self {
13617 self.set_data(field);
13618 self
13619 }
13620 }
13621 impl super::Object {
13622 pub const fn const_default() -> Self {
13623 Self {
13624 bcs: None,
13625 object_id: None,
13626 version: None,
13627 digest: None,
13628 owner: None,
13629 object_type: None,
13630 has_public_transfer: None,
13631 contents: None,
13632 package: None,
13633 previous_transaction: None,
13634 storage_rebate: None,
13635 json: None,
13636 balance: None,
13637 display: None,
13638 }
13639 }
13640 #[doc(hidden)]
13641 pub fn default_instance() -> &'static Self {
13642 static DEFAULT: super::Object = super::Object::const_default();
13643 &DEFAULT
13644 }
13645 pub fn bcs(&self) -> &super::Bcs {
13647 self.bcs
13648 .as_ref()
13649 .map(|field| field as _)
13650 .unwrap_or_else(|| super::Bcs::default_instance() as _)
13651 }
13652 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
13654 self.bcs.as_mut().map(|field| field as _)
13655 }
13656 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
13659 self.bcs.get_or_insert_default()
13660 }
13661 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
13663 self.bcs.as_ref().map(|field| field as _)
13664 }
13665 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
13667 self.bcs = Some(field.into().into());
13668 }
13669 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
13671 self.set_bcs(field.into());
13672 self
13673 }
13674 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
13676 self.object_id.as_mut().map(|field| field as _)
13677 }
13678 pub fn object_id_mut(&mut self) -> &mut String {
13681 self.object_id.get_or_insert_default()
13682 }
13683 pub fn object_id_opt(&self) -> Option<&str> {
13685 self.object_id.as_ref().map(|field| field as _)
13686 }
13687 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
13689 self.object_id = Some(field.into().into());
13690 }
13691 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
13693 self.set_object_id(field.into());
13694 self
13695 }
13696 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
13698 self.version.as_mut().map(|field| field as _)
13699 }
13700 pub fn version_mut(&mut self) -> &mut u64 {
13703 self.version.get_or_insert_default()
13704 }
13705 pub fn version_opt(&self) -> Option<u64> {
13707 self.version.as_ref().map(|field| *field)
13708 }
13709 pub fn set_version(&mut self, field: u64) {
13711 self.version = Some(field);
13712 }
13713 pub fn with_version(mut self, field: u64) -> Self {
13715 self.set_version(field);
13716 self
13717 }
13718 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
13720 self.digest.as_mut().map(|field| field as _)
13721 }
13722 pub fn digest_mut(&mut self) -> &mut String {
13725 self.digest.get_or_insert_default()
13726 }
13727 pub fn digest_opt(&self) -> Option<&str> {
13729 self.digest.as_ref().map(|field| field as _)
13730 }
13731 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
13733 self.digest = Some(field.into().into());
13734 }
13735 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
13737 self.set_digest(field.into());
13738 self
13739 }
13740 pub fn owner(&self) -> &super::Owner {
13742 self.owner
13743 .as_ref()
13744 .map(|field| field as _)
13745 .unwrap_or_else(|| super::Owner::default_instance() as _)
13746 }
13747 pub fn owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
13749 self.owner.as_mut().map(|field| field as _)
13750 }
13751 pub fn owner_mut(&mut self) -> &mut super::Owner {
13754 self.owner.get_or_insert_default()
13755 }
13756 pub fn owner_opt(&self) -> Option<&super::Owner> {
13758 self.owner.as_ref().map(|field| field as _)
13759 }
13760 pub fn set_owner<T: Into<super::Owner>>(&mut self, field: T) {
13762 self.owner = Some(field.into().into());
13763 }
13764 pub fn with_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
13766 self.set_owner(field.into());
13767 self
13768 }
13769 pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
13771 self.object_type.as_mut().map(|field| field as _)
13772 }
13773 pub fn object_type_mut(&mut self) -> &mut String {
13776 self.object_type.get_or_insert_default()
13777 }
13778 pub fn object_type_opt(&self) -> Option<&str> {
13780 self.object_type.as_ref().map(|field| field as _)
13781 }
13782 pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
13784 self.object_type = Some(field.into().into());
13785 }
13786 pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
13788 self.set_object_type(field.into());
13789 self
13790 }
13791 pub fn has_public_transfer_opt_mut(&mut self) -> Option<&mut bool> {
13793 self.has_public_transfer.as_mut().map(|field| field as _)
13794 }
13795 pub fn has_public_transfer_mut(&mut self) -> &mut bool {
13798 self.has_public_transfer.get_or_insert_default()
13799 }
13800 pub fn has_public_transfer_opt(&self) -> Option<bool> {
13802 self.has_public_transfer.as_ref().map(|field| *field)
13803 }
13804 pub fn set_has_public_transfer(&mut self, field: bool) {
13806 self.has_public_transfer = Some(field);
13807 }
13808 pub fn with_has_public_transfer(mut self, field: bool) -> Self {
13810 self.set_has_public_transfer(field);
13811 self
13812 }
13813 pub fn contents(&self) -> &super::Bcs {
13815 self.contents
13816 .as_ref()
13817 .map(|field| field as _)
13818 .unwrap_or_else(|| super::Bcs::default_instance() as _)
13819 }
13820 pub fn contents_opt_mut(&mut self) -> Option<&mut super::Bcs> {
13822 self.contents.as_mut().map(|field| field as _)
13823 }
13824 pub fn contents_mut(&mut self) -> &mut super::Bcs {
13827 self.contents.get_or_insert_default()
13828 }
13829 pub fn contents_opt(&self) -> Option<&super::Bcs> {
13831 self.contents.as_ref().map(|field| field as _)
13832 }
13833 pub fn set_contents<T: Into<super::Bcs>>(&mut self, field: T) {
13835 self.contents = Some(field.into().into());
13836 }
13837 pub fn with_contents<T: Into<super::Bcs>>(mut self, field: T) -> Self {
13839 self.set_contents(field.into());
13840 self
13841 }
13842 pub fn package(&self) -> &super::Package {
13844 self.package
13845 .as_ref()
13846 .map(|field| field as _)
13847 .unwrap_or_else(|| super::Package::default_instance() as _)
13848 }
13849 pub fn package_opt_mut(&mut self) -> Option<&mut super::Package> {
13851 self.package.as_mut().map(|field| field as _)
13852 }
13853 pub fn package_mut(&mut self) -> &mut super::Package {
13856 self.package.get_or_insert_default()
13857 }
13858 pub fn package_opt(&self) -> Option<&super::Package> {
13860 self.package.as_ref().map(|field| field as _)
13861 }
13862 pub fn set_package<T: Into<super::Package>>(&mut self, field: T) {
13864 self.package = Some(field.into().into());
13865 }
13866 pub fn with_package<T: Into<super::Package>>(mut self, field: T) -> Self {
13868 self.set_package(field.into());
13869 self
13870 }
13871 pub fn previous_transaction_opt_mut(&mut self) -> Option<&mut String> {
13873 self.previous_transaction.as_mut().map(|field| field as _)
13874 }
13875 pub fn previous_transaction_mut(&mut self) -> &mut String {
13878 self.previous_transaction.get_or_insert_default()
13879 }
13880 pub fn previous_transaction_opt(&self) -> Option<&str> {
13882 self.previous_transaction.as_ref().map(|field| field as _)
13883 }
13884 pub fn set_previous_transaction<T: Into<String>>(&mut self, field: T) {
13886 self.previous_transaction = Some(field.into().into());
13887 }
13888 pub fn with_previous_transaction<T: Into<String>>(mut self, field: T) -> Self {
13890 self.set_previous_transaction(field.into());
13891 self
13892 }
13893 pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
13895 self.storage_rebate.as_mut().map(|field| field as _)
13896 }
13897 pub fn storage_rebate_mut(&mut self) -> &mut u64 {
13900 self.storage_rebate.get_or_insert_default()
13901 }
13902 pub fn storage_rebate_opt(&self) -> Option<u64> {
13904 self.storage_rebate.as_ref().map(|field| *field)
13905 }
13906 pub fn set_storage_rebate(&mut self, field: u64) {
13908 self.storage_rebate = Some(field);
13909 }
13910 pub fn with_storage_rebate(mut self, field: u64) -> Self {
13912 self.set_storage_rebate(field);
13913 self
13914 }
13915 pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
13917 self.json.as_mut().map(|field| field as _)
13918 }
13919 pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
13922 self.json.get_or_insert_default()
13923 }
13924 pub fn json_opt(&self) -> Option<&::prost_types::Value> {
13926 self.json.as_ref().map(|field| field as _)
13927 }
13928 pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
13930 self.json = Some(field.into().into());
13931 }
13932 pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
13934 self.set_json(field.into());
13935 self
13936 }
13937 pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
13939 self.balance.as_mut().map(|field| field as _)
13940 }
13941 pub fn balance_mut(&mut self) -> &mut u64 {
13944 self.balance.get_or_insert_default()
13945 }
13946 pub fn balance_opt(&self) -> Option<u64> {
13948 self.balance.as_ref().map(|field| *field)
13949 }
13950 pub fn set_balance(&mut self, field: u64) {
13952 self.balance = Some(field);
13953 }
13954 pub fn with_balance(mut self, field: u64) -> Self {
13956 self.set_balance(field);
13957 self
13958 }
13959 pub fn display(&self) -> &super::Display {
13961 self.display
13962 .as_ref()
13963 .map(|field| field as _)
13964 .unwrap_or_else(|| super::Display::default_instance() as _)
13965 }
13966 pub fn display_opt_mut(&mut self) -> Option<&mut super::Display> {
13968 self.display.as_mut().map(|field| field as _)
13969 }
13970 pub fn display_mut(&mut self) -> &mut super::Display {
13973 self.display.get_or_insert_default()
13974 }
13975 pub fn display_opt(&self) -> Option<&super::Display> {
13977 self.display.as_ref().map(|field| field as _)
13978 }
13979 pub fn set_display<T: Into<super::Display>>(&mut self, field: T) {
13981 self.display = Some(field.into().into());
13982 }
13983 pub fn with_display<T: Into<super::Display>>(mut self, field: T) -> Self {
13985 self.set_display(field.into());
13986 self
13987 }
13988 }
13989 impl super::ObjectReference {
13990 pub const fn const_default() -> Self {
13991 Self {
13992 object_id: None,
13993 version: None,
13994 digest: None,
13995 }
13996 }
13997 #[doc(hidden)]
13998 pub fn default_instance() -> &'static Self {
13999 static DEFAULT: super::ObjectReference = super::ObjectReference::const_default();
14000 &DEFAULT
14001 }
14002 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
14004 self.object_id.as_mut().map(|field| field as _)
14005 }
14006 pub fn object_id_mut(&mut self) -> &mut String {
14009 self.object_id.get_or_insert_default()
14010 }
14011 pub fn object_id_opt(&self) -> Option<&str> {
14013 self.object_id.as_ref().map(|field| field as _)
14014 }
14015 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
14017 self.object_id = Some(field.into().into());
14018 }
14019 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
14021 self.set_object_id(field.into());
14022 self
14023 }
14024 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
14026 self.version.as_mut().map(|field| field as _)
14027 }
14028 pub fn version_mut(&mut self) -> &mut u64 {
14031 self.version.get_or_insert_default()
14032 }
14033 pub fn version_opt(&self) -> Option<u64> {
14035 self.version.as_ref().map(|field| *field)
14036 }
14037 pub fn set_version(&mut self, field: u64) {
14039 self.version = Some(field);
14040 }
14041 pub fn with_version(mut self, field: u64) -> Self {
14043 self.set_version(field);
14044 self
14045 }
14046 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
14048 self.digest.as_mut().map(|field| field as _)
14049 }
14050 pub fn digest_mut(&mut self) -> &mut String {
14053 self.digest.get_or_insert_default()
14054 }
14055 pub fn digest_opt(&self) -> Option<&str> {
14057 self.digest.as_ref().map(|field| field as _)
14058 }
14059 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
14061 self.digest = Some(field.into().into());
14062 }
14063 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
14065 self.set_digest(field.into());
14066 self
14067 }
14068 }
14069 impl super::ObjectRemoval {
14070 pub const fn const_default() -> Self {
14071 Self {
14072 version: None,
14073 kind: None,
14074 transaction: None,
14075 }
14076 }
14077 #[doc(hidden)]
14078 pub fn default_instance() -> &'static Self {
14079 static DEFAULT: super::ObjectRemoval = super::ObjectRemoval::const_default();
14080 &DEFAULT
14081 }
14082 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
14084 self.version.as_mut().map(|field| field as _)
14085 }
14086 pub fn version_mut(&mut self) -> &mut u64 {
14089 self.version.get_or_insert_default()
14090 }
14091 pub fn version_opt(&self) -> Option<u64> {
14093 self.version.as_ref().map(|field| *field)
14094 }
14095 pub fn set_version(&mut self, field: u64) {
14097 self.version = Some(field);
14098 }
14099 pub fn with_version(mut self, field: u64) -> Self {
14101 self.set_version(field);
14102 self
14103 }
14104 pub fn with_kind<T: Into<super::object_removal::Kind>>(
14106 mut self,
14107 field: T,
14108 ) -> Self {
14109 self.set_kind(field.into());
14110 self
14111 }
14112 pub fn transaction_opt_mut(&mut self) -> Option<&mut String> {
14114 self.transaction.as_mut().map(|field| field as _)
14115 }
14116 pub fn transaction_mut(&mut self) -> &mut String {
14119 self.transaction.get_or_insert_default()
14120 }
14121 pub fn transaction_opt(&self) -> Option<&str> {
14123 self.transaction.as_ref().map(|field| field as _)
14124 }
14125 pub fn set_transaction<T: Into<String>>(&mut self, field: T) {
14127 self.transaction = Some(field.into().into());
14128 }
14129 pub fn with_transaction<T: Into<String>>(mut self, field: T) -> Self {
14131 self.set_transaction(field.into());
14132 self
14133 }
14134 }
14135 impl super::ObjectSet {
14136 pub const fn const_default() -> Self {
14137 Self { objects: Vec::new() }
14138 }
14139 #[doc(hidden)]
14140 pub fn default_instance() -> &'static Self {
14141 static DEFAULT: super::ObjectSet = super::ObjectSet::const_default();
14142 &DEFAULT
14143 }
14144 pub fn objects(&self) -> &[super::Object] {
14146 &self.objects
14147 }
14148 pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
14151 &mut self.objects
14152 }
14153 pub fn set_objects(&mut self, field: Vec<super::Object>) {
14155 self.objects = field;
14156 }
14157 pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
14159 self.set_objects(field);
14160 self
14161 }
14162 }
14163 impl super::OpenSignature {
14164 pub const fn const_default() -> Self {
14165 Self {
14166 reference: None,
14167 body: None,
14168 }
14169 }
14170 #[doc(hidden)]
14171 pub fn default_instance() -> &'static Self {
14172 static DEFAULT: super::OpenSignature = super::OpenSignature::const_default();
14173 &DEFAULT
14174 }
14175 pub fn with_reference<T: Into<super::open_signature::Reference>>(
14177 mut self,
14178 field: T,
14179 ) -> Self {
14180 self.set_reference(field.into());
14181 self
14182 }
14183 pub fn body(&self) -> &super::OpenSignatureBody {
14185 self.body
14186 .as_ref()
14187 .map(|field| field as _)
14188 .unwrap_or_else(|| super::OpenSignatureBody::default_instance() as _)
14189 }
14190 pub fn body_opt_mut(&mut self) -> Option<&mut super::OpenSignatureBody> {
14192 self.body.as_mut().map(|field| field as _)
14193 }
14194 pub fn body_mut(&mut self) -> &mut super::OpenSignatureBody {
14197 self.body.get_or_insert_default()
14198 }
14199 pub fn body_opt(&self) -> Option<&super::OpenSignatureBody> {
14201 self.body.as_ref().map(|field| field as _)
14202 }
14203 pub fn set_body<T: Into<super::OpenSignatureBody>>(&mut self, field: T) {
14205 self.body = Some(field.into().into());
14206 }
14207 pub fn with_body<T: Into<super::OpenSignatureBody>>(mut self, field: T) -> Self {
14209 self.set_body(field.into());
14210 self
14211 }
14212 }
14213 impl super::OpenSignatureBody {
14214 pub const fn const_default() -> Self {
14215 Self {
14216 r#type: None,
14217 type_name: None,
14218 type_parameter_instantiation: Vec::new(),
14219 type_parameter: None,
14220 }
14221 }
14222 #[doc(hidden)]
14223 pub fn default_instance() -> &'static Self {
14224 static DEFAULT: super::OpenSignatureBody = super::OpenSignatureBody::const_default();
14225 &DEFAULT
14226 }
14227 pub fn with_type<T: Into<super::open_signature_body::Type>>(
14229 mut self,
14230 field: T,
14231 ) -> Self {
14232 self.set_type(field.into());
14233 self
14234 }
14235 pub fn type_name_opt_mut(&mut self) -> Option<&mut String> {
14237 self.type_name.as_mut().map(|field| field as _)
14238 }
14239 pub fn type_name_mut(&mut self) -> &mut String {
14242 self.type_name.get_or_insert_default()
14243 }
14244 pub fn type_name_opt(&self) -> Option<&str> {
14246 self.type_name.as_ref().map(|field| field as _)
14247 }
14248 pub fn set_type_name<T: Into<String>>(&mut self, field: T) {
14250 self.type_name = Some(field.into().into());
14251 }
14252 pub fn with_type_name<T: Into<String>>(mut self, field: T) -> Self {
14254 self.set_type_name(field.into());
14255 self
14256 }
14257 pub fn type_parameter_instantiation(&self) -> &[super::OpenSignatureBody] {
14259 &self.type_parameter_instantiation
14260 }
14261 pub fn type_parameter_instantiation_mut(
14264 &mut self,
14265 ) -> &mut Vec<super::OpenSignatureBody> {
14266 &mut self.type_parameter_instantiation
14267 }
14268 pub fn set_type_parameter_instantiation(
14270 &mut self,
14271 field: Vec<super::OpenSignatureBody>,
14272 ) {
14273 self.type_parameter_instantiation = field;
14274 }
14275 pub fn with_type_parameter_instantiation(
14277 mut self,
14278 field: Vec<super::OpenSignatureBody>,
14279 ) -> Self {
14280 self.set_type_parameter_instantiation(field);
14281 self
14282 }
14283 pub fn type_parameter_opt_mut(&mut self) -> Option<&mut u32> {
14285 self.type_parameter.as_mut().map(|field| field as _)
14286 }
14287 pub fn type_parameter_mut(&mut self) -> &mut u32 {
14290 self.type_parameter.get_or_insert_default()
14291 }
14292 pub fn type_parameter_opt(&self) -> Option<u32> {
14294 self.type_parameter.as_ref().map(|field| *field)
14295 }
14296 pub fn set_type_parameter(&mut self, field: u32) {
14298 self.type_parameter = Some(field);
14299 }
14300 pub fn with_type_parameter(mut self, field: u32) -> Self {
14302 self.set_type_parameter(field);
14303 self
14304 }
14305 }
14306 impl super::Owner {
14307 pub const fn const_default() -> Self {
14308 Self {
14309 kind: None,
14310 address: None,
14311 version: None,
14312 }
14313 }
14314 #[doc(hidden)]
14315 pub fn default_instance() -> &'static Self {
14316 static DEFAULT: super::Owner = super::Owner::const_default();
14317 &DEFAULT
14318 }
14319 pub fn with_kind<T: Into<super::owner::OwnerKind>>(mut self, field: T) -> Self {
14321 self.set_kind(field.into());
14322 self
14323 }
14324 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
14326 self.address.as_mut().map(|field| field as _)
14327 }
14328 pub fn address_mut(&mut self) -> &mut String {
14331 self.address.get_or_insert_default()
14332 }
14333 pub fn address_opt(&self) -> Option<&str> {
14335 self.address.as_ref().map(|field| field as _)
14336 }
14337 pub fn set_address<T: Into<String>>(&mut self, field: T) {
14339 self.address = Some(field.into().into());
14340 }
14341 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
14343 self.set_address(field.into());
14344 self
14345 }
14346 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
14348 self.version.as_mut().map(|field| field as _)
14349 }
14350 pub fn version_mut(&mut self) -> &mut u64 {
14353 self.version.get_or_insert_default()
14354 }
14355 pub fn version_opt(&self) -> Option<u64> {
14357 self.version.as_ref().map(|field| *field)
14358 }
14359 pub fn set_version(&mut self, field: u64) {
14361 self.version = Some(field);
14362 }
14363 pub fn with_version(mut self, field: u64) -> Self {
14365 self.set_version(field);
14366 self
14367 }
14368 }
14369 impl super::Package {
14370 pub const fn const_default() -> Self {
14371 Self {
14372 storage_id: None,
14373 original_id: None,
14374 version: None,
14375 modules: Vec::new(),
14376 type_origins: Vec::new(),
14377 linkage: Vec::new(),
14378 }
14379 }
14380 #[doc(hidden)]
14381 pub fn default_instance() -> &'static Self {
14382 static DEFAULT: super::Package = super::Package::const_default();
14383 &DEFAULT
14384 }
14385 pub fn storage_id_opt_mut(&mut self) -> Option<&mut String> {
14387 self.storage_id.as_mut().map(|field| field as _)
14388 }
14389 pub fn storage_id_mut(&mut self) -> &mut String {
14392 self.storage_id.get_or_insert_default()
14393 }
14394 pub fn storage_id_opt(&self) -> Option<&str> {
14396 self.storage_id.as_ref().map(|field| field as _)
14397 }
14398 pub fn set_storage_id<T: Into<String>>(&mut self, field: T) {
14400 self.storage_id = Some(field.into().into());
14401 }
14402 pub fn with_storage_id<T: Into<String>>(mut self, field: T) -> Self {
14404 self.set_storage_id(field.into());
14405 self
14406 }
14407 pub fn original_id_opt_mut(&mut self) -> Option<&mut String> {
14409 self.original_id.as_mut().map(|field| field as _)
14410 }
14411 pub fn original_id_mut(&mut self) -> &mut String {
14414 self.original_id.get_or_insert_default()
14415 }
14416 pub fn original_id_opt(&self) -> Option<&str> {
14418 self.original_id.as_ref().map(|field| field as _)
14419 }
14420 pub fn set_original_id<T: Into<String>>(&mut self, field: T) {
14422 self.original_id = Some(field.into().into());
14423 }
14424 pub fn with_original_id<T: Into<String>>(mut self, field: T) -> Self {
14426 self.set_original_id(field.into());
14427 self
14428 }
14429 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
14431 self.version.as_mut().map(|field| field as _)
14432 }
14433 pub fn version_mut(&mut self) -> &mut u64 {
14436 self.version.get_or_insert_default()
14437 }
14438 pub fn version_opt(&self) -> Option<u64> {
14440 self.version.as_ref().map(|field| *field)
14441 }
14442 pub fn set_version(&mut self, field: u64) {
14444 self.version = Some(field);
14445 }
14446 pub fn with_version(mut self, field: u64) -> Self {
14448 self.set_version(field);
14449 self
14450 }
14451 pub fn modules(&self) -> &[super::Module] {
14453 &self.modules
14454 }
14455 pub fn modules_mut(&mut self) -> &mut Vec<super::Module> {
14458 &mut self.modules
14459 }
14460 pub fn set_modules(&mut self, field: Vec<super::Module>) {
14462 self.modules = field;
14463 }
14464 pub fn with_modules(mut self, field: Vec<super::Module>) -> Self {
14466 self.set_modules(field);
14467 self
14468 }
14469 pub fn type_origins(&self) -> &[super::TypeOrigin] {
14471 &self.type_origins
14472 }
14473 pub fn type_origins_mut(&mut self) -> &mut Vec<super::TypeOrigin> {
14476 &mut self.type_origins
14477 }
14478 pub fn set_type_origins(&mut self, field: Vec<super::TypeOrigin>) {
14480 self.type_origins = field;
14481 }
14482 pub fn with_type_origins(mut self, field: Vec<super::TypeOrigin>) -> Self {
14484 self.set_type_origins(field);
14485 self
14486 }
14487 pub fn linkage(&self) -> &[super::Linkage] {
14489 &self.linkage
14490 }
14491 pub fn linkage_mut(&mut self) -> &mut Vec<super::Linkage> {
14494 &mut self.linkage
14495 }
14496 pub fn set_linkage(&mut self, field: Vec<super::Linkage>) {
14498 self.linkage = field;
14499 }
14500 pub fn with_linkage(mut self, field: Vec<super::Linkage>) -> Self {
14502 self.set_linkage(field);
14503 self
14504 }
14505 }
14506 impl super::PackageUpgradeError {
14507 pub const fn const_default() -> Self {
14508 Self {
14509 kind: None,
14510 package_id: None,
14511 digest: None,
14512 policy: None,
14513 ticket_id: None,
14514 }
14515 }
14516 #[doc(hidden)]
14517 pub fn default_instance() -> &'static Self {
14518 static DEFAULT: super::PackageUpgradeError = super::PackageUpgradeError::const_default();
14519 &DEFAULT
14520 }
14521 pub fn with_kind<T: Into<super::package_upgrade_error::PackageUpgradeErrorKind>>(
14523 mut self,
14524 field: T,
14525 ) -> Self {
14526 self.set_kind(field.into());
14527 self
14528 }
14529 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
14531 self.package_id.as_mut().map(|field| field as _)
14532 }
14533 pub fn package_id_mut(&mut self) -> &mut String {
14536 self.package_id.get_or_insert_default()
14537 }
14538 pub fn package_id_opt(&self) -> Option<&str> {
14540 self.package_id.as_ref().map(|field| field as _)
14541 }
14542 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
14544 self.package_id = Some(field.into().into());
14545 }
14546 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
14548 self.set_package_id(field.into());
14549 self
14550 }
14551 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
14553 self.digest.as_mut().map(|field| field as _)
14554 }
14555 pub fn digest_mut(&mut self) -> &mut String {
14558 self.digest.get_or_insert_default()
14559 }
14560 pub fn digest_opt(&self) -> Option<&str> {
14562 self.digest.as_ref().map(|field| field as _)
14563 }
14564 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
14566 self.digest = Some(field.into().into());
14567 }
14568 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
14570 self.set_digest(field.into());
14571 self
14572 }
14573 pub fn policy_opt_mut(&mut self) -> Option<&mut u32> {
14575 self.policy.as_mut().map(|field| field as _)
14576 }
14577 pub fn policy_mut(&mut self) -> &mut u32 {
14580 self.policy.get_or_insert_default()
14581 }
14582 pub fn policy_opt(&self) -> Option<u32> {
14584 self.policy.as_ref().map(|field| *field)
14585 }
14586 pub fn set_policy(&mut self, field: u32) {
14588 self.policy = Some(field);
14589 }
14590 pub fn with_policy(mut self, field: u32) -> Self {
14592 self.set_policy(field);
14593 self
14594 }
14595 pub fn ticket_id_opt_mut(&mut self) -> Option<&mut String> {
14597 self.ticket_id.as_mut().map(|field| field as _)
14598 }
14599 pub fn ticket_id_mut(&mut self) -> &mut String {
14602 self.ticket_id.get_or_insert_default()
14603 }
14604 pub fn ticket_id_opt(&self) -> Option<&str> {
14606 self.ticket_id.as_ref().map(|field| field as _)
14607 }
14608 pub fn set_ticket_id<T: Into<String>>(&mut self, field: T) {
14610 self.ticket_id = Some(field.into().into());
14611 }
14612 pub fn with_ticket_id<T: Into<String>>(mut self, field: T) -> Self {
14614 self.set_ticket_id(field.into());
14615 self
14616 }
14617 }
14618 impl super::PackageVersion {
14619 pub const fn const_default() -> Self {
14620 Self {
14621 package_id: None,
14622 version: None,
14623 checkpoint: None,
14624 cursor: None,
14625 original_id: None,
14626 }
14627 }
14628 #[doc(hidden)]
14629 pub fn default_instance() -> &'static Self {
14630 static DEFAULT: super::PackageVersion = super::PackageVersion::const_default();
14631 &DEFAULT
14632 }
14633 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
14635 self.package_id.as_mut().map(|field| field as _)
14636 }
14637 pub fn package_id_mut(&mut self) -> &mut String {
14640 self.package_id.get_or_insert_default()
14641 }
14642 pub fn package_id_opt(&self) -> Option<&str> {
14644 self.package_id.as_ref().map(|field| field as _)
14645 }
14646 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
14648 self.package_id = Some(field.into().into());
14649 }
14650 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
14652 self.set_package_id(field.into());
14653 self
14654 }
14655 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
14657 self.version.as_mut().map(|field| field as _)
14658 }
14659 pub fn version_mut(&mut self) -> &mut u64 {
14662 self.version.get_or_insert_default()
14663 }
14664 pub fn version_opt(&self) -> Option<u64> {
14666 self.version.as_ref().map(|field| *field)
14667 }
14668 pub fn set_version(&mut self, field: u64) {
14670 self.version = Some(field);
14671 }
14672 pub fn with_version(mut self, field: u64) -> Self {
14674 self.set_version(field);
14675 self
14676 }
14677 pub fn checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
14679 self.checkpoint.as_mut().map(|field| field as _)
14680 }
14681 pub fn checkpoint_mut(&mut self) -> &mut u64 {
14684 self.checkpoint.get_or_insert_default()
14685 }
14686 pub fn checkpoint_opt(&self) -> Option<u64> {
14688 self.checkpoint.as_ref().map(|field| *field)
14689 }
14690 pub fn set_checkpoint(&mut self, field: u64) {
14692 self.checkpoint = Some(field);
14693 }
14694 pub fn with_checkpoint(mut self, field: u64) -> Self {
14696 self.set_checkpoint(field);
14697 self
14698 }
14699 pub fn cursor_opt(&self) -> Option<&[u8]> {
14701 self.cursor.as_ref().map(|field| field as _)
14702 }
14703 pub fn set_cursor<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
14705 self.cursor = Some(field.into().into());
14706 }
14707 pub fn with_cursor<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
14709 self.set_cursor(field.into());
14710 self
14711 }
14712 pub fn original_id_opt_mut(&mut self) -> Option<&mut String> {
14714 self.original_id.as_mut().map(|field| field as _)
14715 }
14716 pub fn original_id_mut(&mut self) -> &mut String {
14719 self.original_id.get_or_insert_default()
14720 }
14721 pub fn original_id_opt(&self) -> Option<&str> {
14723 self.original_id.as_ref().map(|field| field as _)
14724 }
14725 pub fn set_original_id<T: Into<String>>(&mut self, field: T) {
14727 self.original_id = Some(field.into().into());
14728 }
14729 pub fn with_original_id<T: Into<String>>(mut self, field: T) -> Self {
14731 self.set_original_id(field.into());
14732 self
14733 }
14734 }
14735 impl super::PackageWriteFilter {
14736 pub const fn const_default() -> Self {
14737 Self {}
14738 }
14739 #[doc(hidden)]
14740 pub fn default_instance() -> &'static Self {
14741 static DEFAULT: super::PackageWriteFilter = super::PackageWriteFilter::const_default();
14742 &DEFAULT
14743 }
14744 }
14745 impl super::PasskeyAuthenticator {
14746 pub const fn const_default() -> Self {
14747 Self {
14748 authenticator_data: None,
14749 client_data_json: None,
14750 signature: None,
14751 }
14752 }
14753 #[doc(hidden)]
14754 pub fn default_instance() -> &'static Self {
14755 static DEFAULT: super::PasskeyAuthenticator = super::PasskeyAuthenticator::const_default();
14756 &DEFAULT
14757 }
14758 pub fn authenticator_data_opt(&self) -> Option<&[u8]> {
14760 self.authenticator_data.as_ref().map(|field| field as _)
14761 }
14762 pub fn set_authenticator_data<T: Into<::prost::bytes::Bytes>>(
14764 &mut self,
14765 field: T,
14766 ) {
14767 self.authenticator_data = Some(field.into().into());
14768 }
14769 pub fn with_authenticator_data<T: Into<::prost::bytes::Bytes>>(
14771 mut self,
14772 field: T,
14773 ) -> Self {
14774 self.set_authenticator_data(field.into());
14775 self
14776 }
14777 pub fn client_data_json_opt_mut(&mut self) -> Option<&mut String> {
14779 self.client_data_json.as_mut().map(|field| field as _)
14780 }
14781 pub fn client_data_json_mut(&mut self) -> &mut String {
14784 self.client_data_json.get_or_insert_default()
14785 }
14786 pub fn client_data_json_opt(&self) -> Option<&str> {
14788 self.client_data_json.as_ref().map(|field| field as _)
14789 }
14790 pub fn set_client_data_json<T: Into<String>>(&mut self, field: T) {
14792 self.client_data_json = Some(field.into().into());
14793 }
14794 pub fn with_client_data_json<T: Into<String>>(mut self, field: T) -> Self {
14796 self.set_client_data_json(field.into());
14797 self
14798 }
14799 pub fn signature(&self) -> &super::SimpleSignature {
14801 self.signature
14802 .as_ref()
14803 .map(|field| field as _)
14804 .unwrap_or_else(|| super::SimpleSignature::default_instance() as _)
14805 }
14806 pub fn signature_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
14808 self.signature.as_mut().map(|field| field as _)
14809 }
14810 pub fn signature_mut(&mut self) -> &mut super::SimpleSignature {
14813 self.signature.get_or_insert_default()
14814 }
14815 pub fn signature_opt(&self) -> Option<&super::SimpleSignature> {
14817 self.signature.as_ref().map(|field| field as _)
14818 }
14819 pub fn set_signature<T: Into<super::SimpleSignature>>(&mut self, field: T) {
14821 self.signature = Some(field.into().into());
14822 }
14823 pub fn with_signature<T: Into<super::SimpleSignature>>(
14825 mut self,
14826 field: T,
14827 ) -> Self {
14828 self.set_signature(field.into());
14829 self
14830 }
14831 }
14832 impl super::ProgrammableTransaction {
14833 pub const fn const_default() -> Self {
14834 Self {
14835 inputs: Vec::new(),
14836 commands: Vec::new(),
14837 }
14838 }
14839 #[doc(hidden)]
14840 pub fn default_instance() -> &'static Self {
14841 static DEFAULT: super::ProgrammableTransaction = super::ProgrammableTransaction::const_default();
14842 &DEFAULT
14843 }
14844 pub fn inputs(&self) -> &[super::Input] {
14846 &self.inputs
14847 }
14848 pub fn inputs_mut(&mut self) -> &mut Vec<super::Input> {
14851 &mut self.inputs
14852 }
14853 pub fn set_inputs(&mut self, field: Vec<super::Input>) {
14855 self.inputs = field;
14856 }
14857 pub fn with_inputs(mut self, field: Vec<super::Input>) -> Self {
14859 self.set_inputs(field);
14860 self
14861 }
14862 pub fn commands(&self) -> &[super::Command] {
14864 &self.commands
14865 }
14866 pub fn commands_mut(&mut self) -> &mut Vec<super::Command> {
14869 &mut self.commands
14870 }
14871 pub fn set_commands(&mut self, field: Vec<super::Command>) {
14873 self.commands = field;
14874 }
14875 pub fn with_commands(mut self, field: Vec<super::Command>) -> Self {
14877 self.set_commands(field);
14878 self
14879 }
14880 }
14881 impl super::ProtocolConfig {
14882 pub const fn const_default() -> Self {
14883 Self {
14884 protocol_version: None,
14885 feature_flags: std::collections::BTreeMap::new(),
14886 attributes: std::collections::BTreeMap::new(),
14887 configs: std::collections::BTreeMap::new(),
14888 }
14889 }
14890 #[doc(hidden)]
14891 pub fn default_instance() -> &'static Self {
14892 static DEFAULT: super::ProtocolConfig = super::ProtocolConfig::const_default();
14893 &DEFAULT
14894 }
14895 pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
14897 self.protocol_version.as_mut().map(|field| field as _)
14898 }
14899 pub fn protocol_version_mut(&mut self) -> &mut u64 {
14902 self.protocol_version.get_or_insert_default()
14903 }
14904 pub fn protocol_version_opt(&self) -> Option<u64> {
14906 self.protocol_version.as_ref().map(|field| *field)
14907 }
14908 pub fn set_protocol_version(&mut self, field: u64) {
14910 self.protocol_version = Some(field);
14911 }
14912 pub fn with_protocol_version(mut self, field: u64) -> Self {
14914 self.set_protocol_version(field);
14915 self
14916 }
14917 pub fn feature_flags(&self) -> &::std::collections::BTreeMap<String, bool> {
14919 &self.feature_flags
14920 }
14921 pub fn feature_flags_mut(
14924 &mut self,
14925 ) -> &mut ::std::collections::BTreeMap<String, bool> {
14926 &mut self.feature_flags
14927 }
14928 pub fn set_feature_flags(
14930 &mut self,
14931 field: ::std::collections::BTreeMap<String, bool>,
14932 ) {
14933 self.feature_flags = field;
14934 }
14935 pub fn with_feature_flags(
14937 mut self,
14938 field: ::std::collections::BTreeMap<String, bool>,
14939 ) -> Self {
14940 self.set_feature_flags(field);
14941 self
14942 }
14943 pub fn attributes(&self) -> &::std::collections::BTreeMap<String, String> {
14945 &self.attributes
14946 }
14947 pub fn attributes_mut(
14950 &mut self,
14951 ) -> &mut ::std::collections::BTreeMap<String, String> {
14952 &mut self.attributes
14953 }
14954 pub fn set_attributes(
14956 &mut self,
14957 field: ::std::collections::BTreeMap<String, String>,
14958 ) {
14959 self.attributes = field;
14960 }
14961 pub fn with_attributes(
14963 mut self,
14964 field: ::std::collections::BTreeMap<String, String>,
14965 ) -> Self {
14966 self.set_attributes(field);
14967 self
14968 }
14969 pub fn configs(
14971 &self,
14972 ) -> &::std::collections::BTreeMap<String, ::prost_types::Value> {
14973 &self.configs
14974 }
14975 pub fn configs_mut(
14978 &mut self,
14979 ) -> &mut ::std::collections::BTreeMap<String, ::prost_types::Value> {
14980 &mut self.configs
14981 }
14982 pub fn set_configs(
14984 &mut self,
14985 field: ::std::collections::BTreeMap<String, ::prost_types::Value>,
14986 ) {
14987 self.configs = field;
14988 }
14989 pub fn with_configs(
14991 mut self,
14992 field: ::std::collections::BTreeMap<String, ::prost_types::Value>,
14993 ) -> Self {
14994 self.set_configs(field);
14995 self
14996 }
14997 }
14998 impl super::Publish {
14999 pub const fn const_default() -> Self {
15000 Self {
15001 modules: Vec::new(),
15002 dependencies: Vec::new(),
15003 }
15004 }
15005 #[doc(hidden)]
15006 pub fn default_instance() -> &'static Self {
15007 static DEFAULT: super::Publish = super::Publish::const_default();
15008 &DEFAULT
15009 }
15010 pub fn modules(&self) -> &[::prost::bytes::Bytes] {
15012 &self.modules
15013 }
15014 pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
15017 &mut self.modules
15018 }
15019 pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
15021 self.modules = field;
15022 }
15023 pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
15025 self.set_modules(field);
15026 self
15027 }
15028 pub fn dependencies(&self) -> &[String] {
15030 &self.dependencies
15031 }
15032 pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
15035 &mut self.dependencies
15036 }
15037 pub fn set_dependencies(&mut self, field: Vec<String>) {
15039 self.dependencies = field;
15040 }
15041 pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
15043 self.set_dependencies(field);
15044 self
15045 }
15046 }
15047 impl super::QueryEnd {
15048 pub const fn const_default() -> Self {
15049 Self { reason: None }
15050 }
15051 #[doc(hidden)]
15052 pub fn default_instance() -> &'static Self {
15053 static DEFAULT: super::QueryEnd = super::QueryEnd::const_default();
15054 &DEFAULT
15055 }
15056 pub fn with_reason<T: Into<super::QueryEndReason>>(mut self, field: T) -> Self {
15058 self.set_reason(field.into());
15059 self
15060 }
15061 }
15062 impl super::QueryOptions {
15063 pub const fn const_default() -> Self {
15064 Self {
15065 limit: None,
15066 after: None,
15067 before: None,
15068 ordering: None,
15069 }
15070 }
15071 #[doc(hidden)]
15072 pub fn default_instance() -> &'static Self {
15073 static DEFAULT: super::QueryOptions = super::QueryOptions::const_default();
15074 &DEFAULT
15075 }
15076 pub fn limit_opt_mut(&mut self) -> Option<&mut u32> {
15078 self.limit.as_mut().map(|field| field as _)
15079 }
15080 pub fn limit_mut(&mut self) -> &mut u32 {
15083 self.limit.get_or_insert_default()
15084 }
15085 pub fn limit_opt(&self) -> Option<u32> {
15087 self.limit.as_ref().map(|field| *field)
15088 }
15089 pub fn set_limit(&mut self, field: u32) {
15091 self.limit = Some(field);
15092 }
15093 pub fn with_limit(mut self, field: u32) -> Self {
15095 self.set_limit(field);
15096 self
15097 }
15098 pub fn after_opt(&self) -> Option<&[u8]> {
15100 self.after.as_ref().map(|field| field as _)
15101 }
15102 pub fn set_after<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
15104 self.after = Some(field.into().into());
15105 }
15106 pub fn with_after<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
15108 self.set_after(field.into());
15109 self
15110 }
15111 pub fn before_opt(&self) -> Option<&[u8]> {
15113 self.before.as_ref().map(|field| field as _)
15114 }
15115 pub fn set_before<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
15117 self.before = Some(field.into().into());
15118 }
15119 pub fn with_before<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
15121 self.set_before(field.into());
15122 self
15123 }
15124 pub fn with_ordering<T: Into<super::Ordering>>(mut self, field: T) -> Self {
15126 self.set_ordering(field.into());
15127 self
15128 }
15129 }
15130 impl super::RandomnessStateUpdate {
15131 pub const fn const_default() -> Self {
15132 Self {
15133 epoch: None,
15134 randomness_round: None,
15135 random_bytes: None,
15136 randomness_object_initial_shared_version: None,
15137 }
15138 }
15139 #[doc(hidden)]
15140 pub fn default_instance() -> &'static Self {
15141 static DEFAULT: super::RandomnessStateUpdate = super::RandomnessStateUpdate::const_default();
15142 &DEFAULT
15143 }
15144 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
15146 self.epoch.as_mut().map(|field| field as _)
15147 }
15148 pub fn epoch_mut(&mut self) -> &mut u64 {
15151 self.epoch.get_or_insert_default()
15152 }
15153 pub fn epoch_opt(&self) -> Option<u64> {
15155 self.epoch.as_ref().map(|field| *field)
15156 }
15157 pub fn set_epoch(&mut self, field: u64) {
15159 self.epoch = Some(field);
15160 }
15161 pub fn with_epoch(mut self, field: u64) -> Self {
15163 self.set_epoch(field);
15164 self
15165 }
15166 pub fn randomness_round_opt_mut(&mut self) -> Option<&mut u64> {
15168 self.randomness_round.as_mut().map(|field| field as _)
15169 }
15170 pub fn randomness_round_mut(&mut self) -> &mut u64 {
15173 self.randomness_round.get_or_insert_default()
15174 }
15175 pub fn randomness_round_opt(&self) -> Option<u64> {
15177 self.randomness_round.as_ref().map(|field| *field)
15178 }
15179 pub fn set_randomness_round(&mut self, field: u64) {
15181 self.randomness_round = Some(field);
15182 }
15183 pub fn with_randomness_round(mut self, field: u64) -> Self {
15185 self.set_randomness_round(field);
15186 self
15187 }
15188 pub fn random_bytes_opt(&self) -> Option<&[u8]> {
15190 self.random_bytes.as_ref().map(|field| field as _)
15191 }
15192 pub fn set_random_bytes<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
15194 self.random_bytes = Some(field.into().into());
15195 }
15196 pub fn with_random_bytes<T: Into<::prost::bytes::Bytes>>(
15198 mut self,
15199 field: T,
15200 ) -> Self {
15201 self.set_random_bytes(field.into());
15202 self
15203 }
15204 pub fn randomness_object_initial_shared_version_opt_mut(
15206 &mut self,
15207 ) -> Option<&mut u64> {
15208 self.randomness_object_initial_shared_version
15209 .as_mut()
15210 .map(|field| field as _)
15211 }
15212 pub fn randomness_object_initial_shared_version_mut(&mut self) -> &mut u64 {
15215 self.randomness_object_initial_shared_version.get_or_insert_default()
15216 }
15217 pub fn randomness_object_initial_shared_version_opt(&self) -> Option<u64> {
15219 self.randomness_object_initial_shared_version.as_ref().map(|field| *field)
15220 }
15221 pub fn set_randomness_object_initial_shared_version(&mut self, field: u64) {
15223 self.randomness_object_initial_shared_version = Some(field);
15224 }
15225 pub fn with_randomness_object_initial_shared_version(
15227 mut self,
15228 field: u64,
15229 ) -> Self {
15230 self.set_randomness_object_initial_shared_version(field);
15231 self
15232 }
15233 }
15234 impl super::RegulatedCoinMetadata {
15235 pub const fn const_default() -> Self {
15236 Self {
15237 id: None,
15238 coin_metadata_object: None,
15239 deny_cap_object: None,
15240 allow_global_pause: None,
15241 variant: None,
15242 coin_regulated_state: None,
15243 }
15244 }
15245 #[doc(hidden)]
15246 pub fn default_instance() -> &'static Self {
15247 static DEFAULT: super::RegulatedCoinMetadata = super::RegulatedCoinMetadata::const_default();
15248 &DEFAULT
15249 }
15250 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
15252 self.id.as_mut().map(|field| field as _)
15253 }
15254 pub fn id_mut(&mut self) -> &mut String {
15257 self.id.get_or_insert_default()
15258 }
15259 pub fn id_opt(&self) -> Option<&str> {
15261 self.id.as_ref().map(|field| field as _)
15262 }
15263 pub fn set_id<T: Into<String>>(&mut self, field: T) {
15265 self.id = Some(field.into().into());
15266 }
15267 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
15269 self.set_id(field.into());
15270 self
15271 }
15272 pub fn coin_metadata_object_opt_mut(&mut self) -> Option<&mut String> {
15274 self.coin_metadata_object.as_mut().map(|field| field as _)
15275 }
15276 pub fn coin_metadata_object_mut(&mut self) -> &mut String {
15279 self.coin_metadata_object.get_or_insert_default()
15280 }
15281 pub fn coin_metadata_object_opt(&self) -> Option<&str> {
15283 self.coin_metadata_object.as_ref().map(|field| field as _)
15284 }
15285 pub fn set_coin_metadata_object<T: Into<String>>(&mut self, field: T) {
15287 self.coin_metadata_object = Some(field.into().into());
15288 }
15289 pub fn with_coin_metadata_object<T: Into<String>>(mut self, field: T) -> Self {
15291 self.set_coin_metadata_object(field.into());
15292 self
15293 }
15294 pub fn deny_cap_object_opt_mut(&mut self) -> Option<&mut String> {
15296 self.deny_cap_object.as_mut().map(|field| field as _)
15297 }
15298 pub fn deny_cap_object_mut(&mut self) -> &mut String {
15301 self.deny_cap_object.get_or_insert_default()
15302 }
15303 pub fn deny_cap_object_opt(&self) -> Option<&str> {
15305 self.deny_cap_object.as_ref().map(|field| field as _)
15306 }
15307 pub fn set_deny_cap_object<T: Into<String>>(&mut self, field: T) {
15309 self.deny_cap_object = Some(field.into().into());
15310 }
15311 pub fn with_deny_cap_object<T: Into<String>>(mut self, field: T) -> Self {
15313 self.set_deny_cap_object(field.into());
15314 self
15315 }
15316 pub fn allow_global_pause_opt_mut(&mut self) -> Option<&mut bool> {
15318 self.allow_global_pause.as_mut().map(|field| field as _)
15319 }
15320 pub fn allow_global_pause_mut(&mut self) -> &mut bool {
15323 self.allow_global_pause.get_or_insert_default()
15324 }
15325 pub fn allow_global_pause_opt(&self) -> Option<bool> {
15327 self.allow_global_pause.as_ref().map(|field| *field)
15328 }
15329 pub fn set_allow_global_pause(&mut self, field: bool) {
15331 self.allow_global_pause = Some(field);
15332 }
15333 pub fn with_allow_global_pause(mut self, field: bool) -> Self {
15335 self.set_allow_global_pause(field);
15336 self
15337 }
15338 pub fn variant_opt_mut(&mut self) -> Option<&mut u32> {
15340 self.variant.as_mut().map(|field| field as _)
15341 }
15342 pub fn variant_mut(&mut self) -> &mut u32 {
15345 self.variant.get_or_insert_default()
15346 }
15347 pub fn variant_opt(&self) -> Option<u32> {
15349 self.variant.as_ref().map(|field| *field)
15350 }
15351 pub fn set_variant(&mut self, field: u32) {
15353 self.variant = Some(field);
15354 }
15355 pub fn with_variant(mut self, field: u32) -> Self {
15357 self.set_variant(field);
15358 self
15359 }
15360 pub fn with_coin_regulated_state<
15362 T: Into<super::regulated_coin_metadata::CoinRegulatedState>,
15363 >(mut self, field: T) -> Self {
15364 self.set_coin_regulated_state(field.into());
15365 self
15366 }
15367 }
15368 impl super::ReverseLookupNameRequest {
15369 pub const fn const_default() -> Self {
15370 Self { address: None }
15371 }
15372 #[doc(hidden)]
15373 pub fn default_instance() -> &'static Self {
15374 static DEFAULT: super::ReverseLookupNameRequest = super::ReverseLookupNameRequest::const_default();
15375 &DEFAULT
15376 }
15377 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
15379 self.address.as_mut().map(|field| field as _)
15380 }
15381 pub fn address_mut(&mut self) -> &mut String {
15384 self.address.get_or_insert_default()
15385 }
15386 pub fn address_opt(&self) -> Option<&str> {
15388 self.address.as_ref().map(|field| field as _)
15389 }
15390 pub fn set_address<T: Into<String>>(&mut self, field: T) {
15392 self.address = Some(field.into().into());
15393 }
15394 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
15396 self.set_address(field.into());
15397 self
15398 }
15399 }
15400 impl super::ReverseLookupNameResponse {
15401 pub const fn const_default() -> Self {
15402 Self { record: None }
15403 }
15404 #[doc(hidden)]
15405 pub fn default_instance() -> &'static Self {
15406 static DEFAULT: super::ReverseLookupNameResponse = super::ReverseLookupNameResponse::const_default();
15407 &DEFAULT
15408 }
15409 pub fn record(&self) -> &super::NameRecord {
15411 self.record
15412 .as_ref()
15413 .map(|field| field as _)
15414 .unwrap_or_else(|| super::NameRecord::default_instance() as _)
15415 }
15416 pub fn record_opt_mut(&mut self) -> Option<&mut super::NameRecord> {
15418 self.record.as_mut().map(|field| field as _)
15419 }
15420 pub fn record_mut(&mut self) -> &mut super::NameRecord {
15423 self.record.get_or_insert_default()
15424 }
15425 pub fn record_opt(&self) -> Option<&super::NameRecord> {
15427 self.record.as_ref().map(|field| field as _)
15428 }
15429 pub fn set_record<T: Into<super::NameRecord>>(&mut self, field: T) {
15431 self.record = Some(field.into().into());
15432 }
15433 pub fn with_record<T: Into<super::NameRecord>>(mut self, field: T) -> Self {
15435 self.set_record(field.into());
15436 self
15437 }
15438 }
15439 impl super::SenderFilter {
15440 pub const fn const_default() -> Self {
15441 Self { address: None }
15442 }
15443 #[doc(hidden)]
15444 pub fn default_instance() -> &'static Self {
15445 static DEFAULT: super::SenderFilter = super::SenderFilter::const_default();
15446 &DEFAULT
15447 }
15448 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
15450 self.address.as_mut().map(|field| field as _)
15451 }
15452 pub fn address_mut(&mut self) -> &mut String {
15455 self.address.get_or_insert_default()
15456 }
15457 pub fn address_opt(&self) -> Option<&str> {
15459 self.address.as_ref().map(|field| field as _)
15460 }
15461 pub fn set_address<T: Into<String>>(&mut self, field: T) {
15463 self.address = Some(field.into().into());
15464 }
15465 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
15467 self.set_address(field.into());
15468 self
15469 }
15470 }
15471 impl super::SimpleSignature {
15472 pub const fn const_default() -> Self {
15473 Self {
15474 scheme: None,
15475 signature: None,
15476 public_key: None,
15477 }
15478 }
15479 #[doc(hidden)]
15480 pub fn default_instance() -> &'static Self {
15481 static DEFAULT: super::SimpleSignature = super::SimpleSignature::const_default();
15482 &DEFAULT
15483 }
15484 pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
15486 self.set_scheme(field.into());
15487 self
15488 }
15489 pub fn signature_opt(&self) -> Option<&[u8]> {
15491 self.signature.as_ref().map(|field| field as _)
15492 }
15493 pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
15495 self.signature = Some(field.into().into());
15496 }
15497 pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
15499 mut self,
15500 field: T,
15501 ) -> Self {
15502 self.set_signature(field.into());
15503 self
15504 }
15505 pub fn public_key_opt(&self) -> Option<&[u8]> {
15507 self.public_key.as_ref().map(|field| field as _)
15508 }
15509 pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
15511 self.public_key = Some(field.into().into());
15512 }
15513 pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
15515 mut self,
15516 field: T,
15517 ) -> Self {
15518 self.set_public_key(field.into());
15519 self
15520 }
15521 }
15522 impl super::SimulateTransactionRequest {
15523 pub const fn const_default() -> Self {
15524 Self {
15525 transaction: None,
15526 read_mask: None,
15527 checks: None,
15528 do_gas_selection: None,
15529 }
15530 }
15531 #[doc(hidden)]
15532 pub fn default_instance() -> &'static Self {
15533 static DEFAULT: super::SimulateTransactionRequest = super::SimulateTransactionRequest::const_default();
15534 &DEFAULT
15535 }
15536 pub fn transaction(&self) -> &super::Transaction {
15538 self.transaction
15539 .as_ref()
15540 .map(|field| field as _)
15541 .unwrap_or_else(|| super::Transaction::default_instance() as _)
15542 }
15543 pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
15545 self.transaction.as_mut().map(|field| field as _)
15546 }
15547 pub fn transaction_mut(&mut self) -> &mut super::Transaction {
15550 self.transaction.get_or_insert_default()
15551 }
15552 pub fn transaction_opt(&self) -> Option<&super::Transaction> {
15554 self.transaction.as_ref().map(|field| field as _)
15555 }
15556 pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
15558 self.transaction = Some(field.into().into());
15559 }
15560 pub fn with_transaction<T: Into<super::Transaction>>(
15562 mut self,
15563 field: T,
15564 ) -> Self {
15565 self.set_transaction(field.into());
15566 self
15567 }
15568 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
15570 self.read_mask.as_mut().map(|field| field as _)
15571 }
15572 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
15575 self.read_mask.get_or_insert_default()
15576 }
15577 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
15579 self.read_mask.as_ref().map(|field| field as _)
15580 }
15581 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
15583 self.read_mask = Some(field.into().into());
15584 }
15585 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
15587 mut self,
15588 field: T,
15589 ) -> Self {
15590 self.set_read_mask(field.into());
15591 self
15592 }
15593 pub fn with_checks<
15595 T: Into<super::simulate_transaction_request::TransactionChecks>,
15596 >(mut self, field: T) -> Self {
15597 self.set_checks(field.into());
15598 self
15599 }
15600 pub fn do_gas_selection_opt_mut(&mut self) -> Option<&mut bool> {
15602 self.do_gas_selection.as_mut().map(|field| field as _)
15603 }
15604 pub fn do_gas_selection_mut(&mut self) -> &mut bool {
15607 self.do_gas_selection.get_or_insert_default()
15608 }
15609 pub fn do_gas_selection_opt(&self) -> Option<bool> {
15611 self.do_gas_selection.as_ref().map(|field| *field)
15612 }
15613 pub fn set_do_gas_selection(&mut self, field: bool) {
15615 self.do_gas_selection = Some(field);
15616 }
15617 pub fn with_do_gas_selection(mut self, field: bool) -> Self {
15619 self.set_do_gas_selection(field);
15620 self
15621 }
15622 }
15623 impl super::SimulateTransactionResponse {
15624 pub const fn const_default() -> Self {
15625 Self {
15626 transaction: None,
15627 command_outputs: Vec::new(),
15628 suggested_gas_price: None,
15629 }
15630 }
15631 #[doc(hidden)]
15632 pub fn default_instance() -> &'static Self {
15633 static DEFAULT: super::SimulateTransactionResponse = super::SimulateTransactionResponse::const_default();
15634 &DEFAULT
15635 }
15636 pub fn transaction(&self) -> &super::ExecutedTransaction {
15638 self.transaction
15639 .as_ref()
15640 .map(|field| field as _)
15641 .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
15642 }
15643 pub fn transaction_opt_mut(
15645 &mut self,
15646 ) -> Option<&mut super::ExecutedTransaction> {
15647 self.transaction.as_mut().map(|field| field as _)
15648 }
15649 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
15652 self.transaction.get_or_insert_default()
15653 }
15654 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
15656 self.transaction.as_ref().map(|field| field as _)
15657 }
15658 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
15660 &mut self,
15661 field: T,
15662 ) {
15663 self.transaction = Some(field.into().into());
15664 }
15665 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
15667 mut self,
15668 field: T,
15669 ) -> Self {
15670 self.set_transaction(field.into());
15671 self
15672 }
15673 pub fn command_outputs(&self) -> &[super::CommandResult] {
15675 &self.command_outputs
15676 }
15677 pub fn command_outputs_mut(&mut self) -> &mut Vec<super::CommandResult> {
15680 &mut self.command_outputs
15681 }
15682 pub fn set_command_outputs(&mut self, field: Vec<super::CommandResult>) {
15684 self.command_outputs = field;
15685 }
15686 pub fn with_command_outputs(mut self, field: Vec<super::CommandResult>) -> Self {
15688 self.set_command_outputs(field);
15689 self
15690 }
15691 pub fn suggested_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
15693 self.suggested_gas_price.as_mut().map(|field| field as _)
15694 }
15695 pub fn suggested_gas_price_mut(&mut self) -> &mut u64 {
15698 self.suggested_gas_price.get_or_insert_default()
15699 }
15700 pub fn suggested_gas_price_opt(&self) -> Option<u64> {
15702 self.suggested_gas_price.as_ref().map(|field| *field)
15703 }
15704 pub fn set_suggested_gas_price(&mut self, field: u64) {
15706 self.suggested_gas_price = Some(field);
15707 }
15708 pub fn with_suggested_gas_price(mut self, field: u64) -> Self {
15710 self.set_suggested_gas_price(field);
15711 self
15712 }
15713 }
15714 impl super::SizeError {
15715 pub const fn const_default() -> Self {
15716 Self { size: None, max_size: None }
15717 }
15718 #[doc(hidden)]
15719 pub fn default_instance() -> &'static Self {
15720 static DEFAULT: super::SizeError = super::SizeError::const_default();
15721 &DEFAULT
15722 }
15723 pub fn size_opt_mut(&mut self) -> Option<&mut u64> {
15725 self.size.as_mut().map(|field| field as _)
15726 }
15727 pub fn size_mut(&mut self) -> &mut u64 {
15730 self.size.get_or_insert_default()
15731 }
15732 pub fn size_opt(&self) -> Option<u64> {
15734 self.size.as_ref().map(|field| *field)
15735 }
15736 pub fn set_size(&mut self, field: u64) {
15738 self.size = Some(field);
15739 }
15740 pub fn with_size(mut self, field: u64) -> Self {
15742 self.set_size(field);
15743 self
15744 }
15745 pub fn max_size_opt_mut(&mut self) -> Option<&mut u64> {
15747 self.max_size.as_mut().map(|field| field as _)
15748 }
15749 pub fn max_size_mut(&mut self) -> &mut u64 {
15752 self.max_size.get_or_insert_default()
15753 }
15754 pub fn max_size_opt(&self) -> Option<u64> {
15756 self.max_size.as_ref().map(|field| *field)
15757 }
15758 pub fn set_max_size(&mut self, field: u64) {
15760 self.max_size = Some(field);
15761 }
15762 pub fn with_max_size(mut self, field: u64) -> Self {
15764 self.set_max_size(field);
15765 self
15766 }
15767 }
15768 impl super::SplitCoins {
15769 pub const fn const_default() -> Self {
15770 Self {
15771 coin: None,
15772 amounts: Vec::new(),
15773 }
15774 }
15775 #[doc(hidden)]
15776 pub fn default_instance() -> &'static Self {
15777 static DEFAULT: super::SplitCoins = super::SplitCoins::const_default();
15778 &DEFAULT
15779 }
15780 pub fn coin(&self) -> &super::Argument {
15782 self.coin
15783 .as_ref()
15784 .map(|field| field as _)
15785 .unwrap_or_else(|| super::Argument::default_instance() as _)
15786 }
15787 pub fn coin_opt_mut(&mut self) -> Option<&mut super::Argument> {
15789 self.coin.as_mut().map(|field| field as _)
15790 }
15791 pub fn coin_mut(&mut self) -> &mut super::Argument {
15794 self.coin.get_or_insert_default()
15795 }
15796 pub fn coin_opt(&self) -> Option<&super::Argument> {
15798 self.coin.as_ref().map(|field| field as _)
15799 }
15800 pub fn set_coin<T: Into<super::Argument>>(&mut self, field: T) {
15802 self.coin = Some(field.into().into());
15803 }
15804 pub fn with_coin<T: Into<super::Argument>>(mut self, field: T) -> Self {
15806 self.set_coin(field.into());
15807 self
15808 }
15809 pub fn amounts(&self) -> &[super::Argument] {
15811 &self.amounts
15812 }
15813 pub fn amounts_mut(&mut self) -> &mut Vec<super::Argument> {
15816 &mut self.amounts
15817 }
15818 pub fn set_amounts(&mut self, field: Vec<super::Argument>) {
15820 self.amounts = field;
15821 }
15822 pub fn with_amounts(mut self, field: Vec<super::Argument>) -> Self {
15824 self.set_amounts(field);
15825 self
15826 }
15827 }
15828 impl super::StakeSubsidy {
15829 pub const fn const_default() -> Self {
15830 Self {
15831 balance: None,
15832 distribution_counter: None,
15833 current_distribution_amount: None,
15834 stake_subsidy_period_length: None,
15835 stake_subsidy_decrease_rate: None,
15836 extra_fields: None,
15837 }
15838 }
15839 #[doc(hidden)]
15840 pub fn default_instance() -> &'static Self {
15841 static DEFAULT: super::StakeSubsidy = super::StakeSubsidy::const_default();
15842 &DEFAULT
15843 }
15844 pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
15846 self.balance.as_mut().map(|field| field as _)
15847 }
15848 pub fn balance_mut(&mut self) -> &mut u64 {
15851 self.balance.get_or_insert_default()
15852 }
15853 pub fn balance_opt(&self) -> Option<u64> {
15855 self.balance.as_ref().map(|field| *field)
15856 }
15857 pub fn set_balance(&mut self, field: u64) {
15859 self.balance = Some(field);
15860 }
15861 pub fn with_balance(mut self, field: u64) -> Self {
15863 self.set_balance(field);
15864 self
15865 }
15866 pub fn distribution_counter_opt_mut(&mut self) -> Option<&mut u64> {
15868 self.distribution_counter.as_mut().map(|field| field as _)
15869 }
15870 pub fn distribution_counter_mut(&mut self) -> &mut u64 {
15873 self.distribution_counter.get_or_insert_default()
15874 }
15875 pub fn distribution_counter_opt(&self) -> Option<u64> {
15877 self.distribution_counter.as_ref().map(|field| *field)
15878 }
15879 pub fn set_distribution_counter(&mut self, field: u64) {
15881 self.distribution_counter = Some(field);
15882 }
15883 pub fn with_distribution_counter(mut self, field: u64) -> Self {
15885 self.set_distribution_counter(field);
15886 self
15887 }
15888 pub fn current_distribution_amount_opt_mut(&mut self) -> Option<&mut u64> {
15890 self.current_distribution_amount.as_mut().map(|field| field as _)
15891 }
15892 pub fn current_distribution_amount_mut(&mut self) -> &mut u64 {
15895 self.current_distribution_amount.get_or_insert_default()
15896 }
15897 pub fn current_distribution_amount_opt(&self) -> Option<u64> {
15899 self.current_distribution_amount.as_ref().map(|field| *field)
15900 }
15901 pub fn set_current_distribution_amount(&mut self, field: u64) {
15903 self.current_distribution_amount = Some(field);
15904 }
15905 pub fn with_current_distribution_amount(mut self, field: u64) -> Self {
15907 self.set_current_distribution_amount(field);
15908 self
15909 }
15910 pub fn stake_subsidy_period_length_opt_mut(&mut self) -> Option<&mut u64> {
15912 self.stake_subsidy_period_length.as_mut().map(|field| field as _)
15913 }
15914 pub fn stake_subsidy_period_length_mut(&mut self) -> &mut u64 {
15917 self.stake_subsidy_period_length.get_or_insert_default()
15918 }
15919 pub fn stake_subsidy_period_length_opt(&self) -> Option<u64> {
15921 self.stake_subsidy_period_length.as_ref().map(|field| *field)
15922 }
15923 pub fn set_stake_subsidy_period_length(&mut self, field: u64) {
15925 self.stake_subsidy_period_length = Some(field);
15926 }
15927 pub fn with_stake_subsidy_period_length(mut self, field: u64) -> Self {
15929 self.set_stake_subsidy_period_length(field);
15930 self
15931 }
15932 pub fn stake_subsidy_decrease_rate_opt_mut(&mut self) -> Option<&mut u32> {
15934 self.stake_subsidy_decrease_rate.as_mut().map(|field| field as _)
15935 }
15936 pub fn stake_subsidy_decrease_rate_mut(&mut self) -> &mut u32 {
15939 self.stake_subsidy_decrease_rate.get_or_insert_default()
15940 }
15941 pub fn stake_subsidy_decrease_rate_opt(&self) -> Option<u32> {
15943 self.stake_subsidy_decrease_rate.as_ref().map(|field| *field)
15944 }
15945 pub fn set_stake_subsidy_decrease_rate(&mut self, field: u32) {
15947 self.stake_subsidy_decrease_rate = Some(field);
15948 }
15949 pub fn with_stake_subsidy_decrease_rate(mut self, field: u32) -> Self {
15951 self.set_stake_subsidy_decrease_rate(field);
15952 self
15953 }
15954 pub fn extra_fields(&self) -> &super::MoveTable {
15956 self.extra_fields
15957 .as_ref()
15958 .map(|field| field as _)
15959 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
15960 }
15961 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
15963 self.extra_fields.as_mut().map(|field| field as _)
15964 }
15965 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
15968 self.extra_fields.get_or_insert_default()
15969 }
15970 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
15972 self.extra_fields.as_ref().map(|field| field as _)
15973 }
15974 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
15976 self.extra_fields = Some(field.into().into());
15977 }
15978 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
15980 self.set_extra_fields(field.into());
15981 self
15982 }
15983 }
15984 impl super::StakingPool {
15985 pub const fn const_default() -> Self {
15986 Self {
15987 id: None,
15988 activation_epoch: None,
15989 deactivation_epoch: None,
15990 sui_balance: None,
15991 rewards_pool: None,
15992 pool_token_balance: None,
15993 exchange_rates: None,
15994 pending_stake: None,
15995 pending_total_sui_withdraw: None,
15996 pending_pool_token_withdraw: None,
15997 extra_fields: None,
15998 }
15999 }
16000 #[doc(hidden)]
16001 pub fn default_instance() -> &'static Self {
16002 static DEFAULT: super::StakingPool = super::StakingPool::const_default();
16003 &DEFAULT
16004 }
16005 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
16007 self.id.as_mut().map(|field| field as _)
16008 }
16009 pub fn id_mut(&mut self) -> &mut String {
16012 self.id.get_or_insert_default()
16013 }
16014 pub fn id_opt(&self) -> Option<&str> {
16016 self.id.as_ref().map(|field| field as _)
16017 }
16018 pub fn set_id<T: Into<String>>(&mut self, field: T) {
16020 self.id = Some(field.into().into());
16021 }
16022 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
16024 self.set_id(field.into());
16025 self
16026 }
16027 pub fn activation_epoch_opt_mut(&mut self) -> Option<&mut u64> {
16029 self.activation_epoch.as_mut().map(|field| field as _)
16030 }
16031 pub fn activation_epoch_mut(&mut self) -> &mut u64 {
16034 self.activation_epoch.get_or_insert_default()
16035 }
16036 pub fn activation_epoch_opt(&self) -> Option<u64> {
16038 self.activation_epoch.as_ref().map(|field| *field)
16039 }
16040 pub fn set_activation_epoch(&mut self, field: u64) {
16042 self.activation_epoch = Some(field);
16043 }
16044 pub fn with_activation_epoch(mut self, field: u64) -> Self {
16046 self.set_activation_epoch(field);
16047 self
16048 }
16049 pub fn deactivation_epoch_opt_mut(&mut self) -> Option<&mut u64> {
16051 self.deactivation_epoch.as_mut().map(|field| field as _)
16052 }
16053 pub fn deactivation_epoch_mut(&mut self) -> &mut u64 {
16056 self.deactivation_epoch.get_or_insert_default()
16057 }
16058 pub fn deactivation_epoch_opt(&self) -> Option<u64> {
16060 self.deactivation_epoch.as_ref().map(|field| *field)
16061 }
16062 pub fn set_deactivation_epoch(&mut self, field: u64) {
16064 self.deactivation_epoch = Some(field);
16065 }
16066 pub fn with_deactivation_epoch(mut self, field: u64) -> Self {
16068 self.set_deactivation_epoch(field);
16069 self
16070 }
16071 pub fn sui_balance_opt_mut(&mut self) -> Option<&mut u64> {
16073 self.sui_balance.as_mut().map(|field| field as _)
16074 }
16075 pub fn sui_balance_mut(&mut self) -> &mut u64 {
16078 self.sui_balance.get_or_insert_default()
16079 }
16080 pub fn sui_balance_opt(&self) -> Option<u64> {
16082 self.sui_balance.as_ref().map(|field| *field)
16083 }
16084 pub fn set_sui_balance(&mut self, field: u64) {
16086 self.sui_balance = Some(field);
16087 }
16088 pub fn with_sui_balance(mut self, field: u64) -> Self {
16090 self.set_sui_balance(field);
16091 self
16092 }
16093 pub fn rewards_pool_opt_mut(&mut self) -> Option<&mut u64> {
16095 self.rewards_pool.as_mut().map(|field| field as _)
16096 }
16097 pub fn rewards_pool_mut(&mut self) -> &mut u64 {
16100 self.rewards_pool.get_or_insert_default()
16101 }
16102 pub fn rewards_pool_opt(&self) -> Option<u64> {
16104 self.rewards_pool.as_ref().map(|field| *field)
16105 }
16106 pub fn set_rewards_pool(&mut self, field: u64) {
16108 self.rewards_pool = Some(field);
16109 }
16110 pub fn with_rewards_pool(mut self, field: u64) -> Self {
16112 self.set_rewards_pool(field);
16113 self
16114 }
16115 pub fn pool_token_balance_opt_mut(&mut self) -> Option<&mut u64> {
16117 self.pool_token_balance.as_mut().map(|field| field as _)
16118 }
16119 pub fn pool_token_balance_mut(&mut self) -> &mut u64 {
16122 self.pool_token_balance.get_or_insert_default()
16123 }
16124 pub fn pool_token_balance_opt(&self) -> Option<u64> {
16126 self.pool_token_balance.as_ref().map(|field| *field)
16127 }
16128 pub fn set_pool_token_balance(&mut self, field: u64) {
16130 self.pool_token_balance = Some(field);
16131 }
16132 pub fn with_pool_token_balance(mut self, field: u64) -> Self {
16134 self.set_pool_token_balance(field);
16135 self
16136 }
16137 pub fn exchange_rates(&self) -> &super::MoveTable {
16139 self.exchange_rates
16140 .as_ref()
16141 .map(|field| field as _)
16142 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16143 }
16144 pub fn exchange_rates_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
16146 self.exchange_rates.as_mut().map(|field| field as _)
16147 }
16148 pub fn exchange_rates_mut(&mut self) -> &mut super::MoveTable {
16151 self.exchange_rates.get_or_insert_default()
16152 }
16153 pub fn exchange_rates_opt(&self) -> Option<&super::MoveTable> {
16155 self.exchange_rates.as_ref().map(|field| field as _)
16156 }
16157 pub fn set_exchange_rates<T: Into<super::MoveTable>>(&mut self, field: T) {
16159 self.exchange_rates = Some(field.into().into());
16160 }
16161 pub fn with_exchange_rates<T: Into<super::MoveTable>>(
16163 mut self,
16164 field: T,
16165 ) -> Self {
16166 self.set_exchange_rates(field.into());
16167 self
16168 }
16169 pub fn pending_stake_opt_mut(&mut self) -> Option<&mut u64> {
16171 self.pending_stake.as_mut().map(|field| field as _)
16172 }
16173 pub fn pending_stake_mut(&mut self) -> &mut u64 {
16176 self.pending_stake.get_or_insert_default()
16177 }
16178 pub fn pending_stake_opt(&self) -> Option<u64> {
16180 self.pending_stake.as_ref().map(|field| *field)
16181 }
16182 pub fn set_pending_stake(&mut self, field: u64) {
16184 self.pending_stake = Some(field);
16185 }
16186 pub fn with_pending_stake(mut self, field: u64) -> Self {
16188 self.set_pending_stake(field);
16189 self
16190 }
16191 pub fn pending_total_sui_withdraw_opt_mut(&mut self) -> Option<&mut u64> {
16193 self.pending_total_sui_withdraw.as_mut().map(|field| field as _)
16194 }
16195 pub fn pending_total_sui_withdraw_mut(&mut self) -> &mut u64 {
16198 self.pending_total_sui_withdraw.get_or_insert_default()
16199 }
16200 pub fn pending_total_sui_withdraw_opt(&self) -> Option<u64> {
16202 self.pending_total_sui_withdraw.as_ref().map(|field| *field)
16203 }
16204 pub fn set_pending_total_sui_withdraw(&mut self, field: u64) {
16206 self.pending_total_sui_withdraw = Some(field);
16207 }
16208 pub fn with_pending_total_sui_withdraw(mut self, field: u64) -> Self {
16210 self.set_pending_total_sui_withdraw(field);
16211 self
16212 }
16213 pub fn pending_pool_token_withdraw_opt_mut(&mut self) -> Option<&mut u64> {
16215 self.pending_pool_token_withdraw.as_mut().map(|field| field as _)
16216 }
16217 pub fn pending_pool_token_withdraw_mut(&mut self) -> &mut u64 {
16220 self.pending_pool_token_withdraw.get_or_insert_default()
16221 }
16222 pub fn pending_pool_token_withdraw_opt(&self) -> Option<u64> {
16224 self.pending_pool_token_withdraw.as_ref().map(|field| *field)
16225 }
16226 pub fn set_pending_pool_token_withdraw(&mut self, field: u64) {
16228 self.pending_pool_token_withdraw = Some(field);
16229 }
16230 pub fn with_pending_pool_token_withdraw(mut self, field: u64) -> Self {
16232 self.set_pending_pool_token_withdraw(field);
16233 self
16234 }
16235 pub fn extra_fields(&self) -> &super::MoveTable {
16237 self.extra_fields
16238 .as_ref()
16239 .map(|field| field as _)
16240 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16241 }
16242 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
16244 self.extra_fields.as_mut().map(|field| field as _)
16245 }
16246 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
16249 self.extra_fields.get_or_insert_default()
16250 }
16251 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
16253 self.extra_fields.as_ref().map(|field| field as _)
16254 }
16255 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
16257 self.extra_fields = Some(field.into().into());
16258 }
16259 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
16261 self.set_extra_fields(field.into());
16262 self
16263 }
16264 }
16265 impl super::StorageFund {
16266 pub const fn const_default() -> Self {
16267 Self {
16268 total_object_storage_rebates: None,
16269 non_refundable_balance: None,
16270 }
16271 }
16272 #[doc(hidden)]
16273 pub fn default_instance() -> &'static Self {
16274 static DEFAULT: super::StorageFund = super::StorageFund::const_default();
16275 &DEFAULT
16276 }
16277 pub fn total_object_storage_rebates_opt_mut(&mut self) -> Option<&mut u64> {
16279 self.total_object_storage_rebates.as_mut().map(|field| field as _)
16280 }
16281 pub fn total_object_storage_rebates_mut(&mut self) -> &mut u64 {
16284 self.total_object_storage_rebates.get_or_insert_default()
16285 }
16286 pub fn total_object_storage_rebates_opt(&self) -> Option<u64> {
16288 self.total_object_storage_rebates.as_ref().map(|field| *field)
16289 }
16290 pub fn set_total_object_storage_rebates(&mut self, field: u64) {
16292 self.total_object_storage_rebates = Some(field);
16293 }
16294 pub fn with_total_object_storage_rebates(mut self, field: u64) -> Self {
16296 self.set_total_object_storage_rebates(field);
16297 self
16298 }
16299 pub fn non_refundable_balance_opt_mut(&mut self) -> Option<&mut u64> {
16301 self.non_refundable_balance.as_mut().map(|field| field as _)
16302 }
16303 pub fn non_refundable_balance_mut(&mut self) -> &mut u64 {
16306 self.non_refundable_balance.get_or_insert_default()
16307 }
16308 pub fn non_refundable_balance_opt(&self) -> Option<u64> {
16310 self.non_refundable_balance.as_ref().map(|field| *field)
16311 }
16312 pub fn set_non_refundable_balance(&mut self, field: u64) {
16314 self.non_refundable_balance = Some(field);
16315 }
16316 pub fn with_non_refundable_balance(mut self, field: u64) -> Self {
16318 self.set_non_refundable_balance(field);
16319 self
16320 }
16321 }
16322 impl super::SubscribeCheckpointsRequest {
16323 pub const fn const_default() -> Self {
16324 Self {
16325 read_mask: None,
16326 filter: None,
16327 }
16328 }
16329 #[doc(hidden)]
16330 pub fn default_instance() -> &'static Self {
16331 static DEFAULT: super::SubscribeCheckpointsRequest = super::SubscribeCheckpointsRequest::const_default();
16332 &DEFAULT
16333 }
16334 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
16336 self.read_mask.as_mut().map(|field| field as _)
16337 }
16338 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
16341 self.read_mask.get_or_insert_default()
16342 }
16343 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
16345 self.read_mask.as_ref().map(|field| field as _)
16346 }
16347 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
16349 self.read_mask = Some(field.into().into());
16350 }
16351 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
16353 mut self,
16354 field: T,
16355 ) -> Self {
16356 self.set_read_mask(field.into());
16357 self
16358 }
16359 pub fn filter(&self) -> &super::TransactionFilter {
16361 self.filter
16362 .as_ref()
16363 .map(|field| field as _)
16364 .unwrap_or_else(|| super::TransactionFilter::default_instance() as _)
16365 }
16366 pub fn filter_opt_mut(&mut self) -> Option<&mut super::TransactionFilter> {
16368 self.filter.as_mut().map(|field| field as _)
16369 }
16370 pub fn filter_mut(&mut self) -> &mut super::TransactionFilter {
16373 self.filter.get_or_insert_default()
16374 }
16375 pub fn filter_opt(&self) -> Option<&super::TransactionFilter> {
16377 self.filter.as_ref().map(|field| field as _)
16378 }
16379 pub fn set_filter<T: Into<super::TransactionFilter>>(&mut self, field: T) {
16381 self.filter = Some(field.into().into());
16382 }
16383 pub fn with_filter<T: Into<super::TransactionFilter>>(
16385 mut self,
16386 field: T,
16387 ) -> Self {
16388 self.set_filter(field.into());
16389 self
16390 }
16391 }
16392 impl super::SubscribeCheckpointsResponse {
16393 pub const fn const_default() -> Self {
16394 Self {
16395 cursor: None,
16396 checkpoint: None,
16397 }
16398 }
16399 #[doc(hidden)]
16400 pub fn default_instance() -> &'static Self {
16401 static DEFAULT: super::SubscribeCheckpointsResponse = super::SubscribeCheckpointsResponse::const_default();
16402 &DEFAULT
16403 }
16404 pub fn cursor_opt_mut(&mut self) -> Option<&mut u64> {
16406 self.cursor.as_mut().map(|field| field as _)
16407 }
16408 pub fn cursor_mut(&mut self) -> &mut u64 {
16411 self.cursor.get_or_insert_default()
16412 }
16413 pub fn cursor_opt(&self) -> Option<u64> {
16415 self.cursor.as_ref().map(|field| *field)
16416 }
16417 pub fn set_cursor(&mut self, field: u64) {
16419 self.cursor = Some(field);
16420 }
16421 pub fn with_cursor(mut self, field: u64) -> Self {
16423 self.set_cursor(field);
16424 self
16425 }
16426 pub fn checkpoint(&self) -> &super::Checkpoint {
16428 self.checkpoint
16429 .as_ref()
16430 .map(|field| field as _)
16431 .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
16432 }
16433 pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
16435 self.checkpoint.as_mut().map(|field| field as _)
16436 }
16437 pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
16440 self.checkpoint.get_or_insert_default()
16441 }
16442 pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
16444 self.checkpoint.as_ref().map(|field| field as _)
16445 }
16446 pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
16448 self.checkpoint = Some(field.into().into());
16449 }
16450 pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
16452 self.set_checkpoint(field.into());
16453 self
16454 }
16455 }
16456 impl super::SubscribeEventsRequest {
16457 pub const fn const_default() -> Self {
16458 Self {
16459 read_mask: None,
16460 filter: None,
16461 }
16462 }
16463 #[doc(hidden)]
16464 pub fn default_instance() -> &'static Self {
16465 static DEFAULT: super::SubscribeEventsRequest = super::SubscribeEventsRequest::const_default();
16466 &DEFAULT
16467 }
16468 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
16470 self.read_mask.as_mut().map(|field| field as _)
16471 }
16472 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
16475 self.read_mask.get_or_insert_default()
16476 }
16477 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
16479 self.read_mask.as_ref().map(|field| field as _)
16480 }
16481 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
16483 self.read_mask = Some(field.into().into());
16484 }
16485 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
16487 mut self,
16488 field: T,
16489 ) -> Self {
16490 self.set_read_mask(field.into());
16491 self
16492 }
16493 pub fn filter(&self) -> &super::EventFilter {
16495 self.filter
16496 .as_ref()
16497 .map(|field| field as _)
16498 .unwrap_or_else(|| super::EventFilter::default_instance() as _)
16499 }
16500 pub fn filter_opt_mut(&mut self) -> Option<&mut super::EventFilter> {
16502 self.filter.as_mut().map(|field| field as _)
16503 }
16504 pub fn filter_mut(&mut self) -> &mut super::EventFilter {
16507 self.filter.get_or_insert_default()
16508 }
16509 pub fn filter_opt(&self) -> Option<&super::EventFilter> {
16511 self.filter.as_ref().map(|field| field as _)
16512 }
16513 pub fn set_filter<T: Into<super::EventFilter>>(&mut self, field: T) {
16515 self.filter = Some(field.into().into());
16516 }
16517 pub fn with_filter<T: Into<super::EventFilter>>(mut self, field: T) -> Self {
16519 self.set_filter(field.into());
16520 self
16521 }
16522 }
16523 impl super::SubscribeEventsResponse {
16524 pub const fn const_default() -> Self {
16525 Self {
16526 event: None,
16527 watermark: None,
16528 }
16529 }
16530 #[doc(hidden)]
16531 pub fn default_instance() -> &'static Self {
16532 static DEFAULT: super::SubscribeEventsResponse = super::SubscribeEventsResponse::const_default();
16533 &DEFAULT
16534 }
16535 pub fn event(&self) -> &super::Event {
16537 self.event
16538 .as_ref()
16539 .map(|field| field as _)
16540 .unwrap_or_else(|| super::Event::default_instance() as _)
16541 }
16542 pub fn event_opt_mut(&mut self) -> Option<&mut super::Event> {
16544 self.event.as_mut().map(|field| field as _)
16545 }
16546 pub fn event_mut(&mut self) -> &mut super::Event {
16549 self.event.get_or_insert_default()
16550 }
16551 pub fn event_opt(&self) -> Option<&super::Event> {
16553 self.event.as_ref().map(|field| field as _)
16554 }
16555 pub fn set_event<T: Into<super::Event>>(&mut self, field: T) {
16557 self.event = Some(field.into().into());
16558 }
16559 pub fn with_event<T: Into<super::Event>>(mut self, field: T) -> Self {
16561 self.set_event(field.into());
16562 self
16563 }
16564 pub fn watermark(&self) -> &super::Watermark {
16566 self.watermark
16567 .as_ref()
16568 .map(|field| field as _)
16569 .unwrap_or_else(|| super::Watermark::default_instance() as _)
16570 }
16571 pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
16573 self.watermark.as_mut().map(|field| field as _)
16574 }
16575 pub fn watermark_mut(&mut self) -> &mut super::Watermark {
16578 self.watermark.get_or_insert_default()
16579 }
16580 pub fn watermark_opt(&self) -> Option<&super::Watermark> {
16582 self.watermark.as_ref().map(|field| field as _)
16583 }
16584 pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
16586 self.watermark = Some(field.into().into());
16587 }
16588 pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
16590 self.set_watermark(field.into());
16591 self
16592 }
16593 }
16594 impl super::SubscribeTransactionsRequest {
16595 pub const fn const_default() -> Self {
16596 Self {
16597 read_mask: None,
16598 filter: None,
16599 }
16600 }
16601 #[doc(hidden)]
16602 pub fn default_instance() -> &'static Self {
16603 static DEFAULT: super::SubscribeTransactionsRequest = super::SubscribeTransactionsRequest::const_default();
16604 &DEFAULT
16605 }
16606 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
16608 self.read_mask.as_mut().map(|field| field as _)
16609 }
16610 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
16613 self.read_mask.get_or_insert_default()
16614 }
16615 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
16617 self.read_mask.as_ref().map(|field| field as _)
16618 }
16619 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
16621 self.read_mask = Some(field.into().into());
16622 }
16623 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
16625 mut self,
16626 field: T,
16627 ) -> Self {
16628 self.set_read_mask(field.into());
16629 self
16630 }
16631 pub fn filter(&self) -> &super::TransactionFilter {
16633 self.filter
16634 .as_ref()
16635 .map(|field| field as _)
16636 .unwrap_or_else(|| super::TransactionFilter::default_instance() as _)
16637 }
16638 pub fn filter_opt_mut(&mut self) -> Option<&mut super::TransactionFilter> {
16640 self.filter.as_mut().map(|field| field as _)
16641 }
16642 pub fn filter_mut(&mut self) -> &mut super::TransactionFilter {
16645 self.filter.get_or_insert_default()
16646 }
16647 pub fn filter_opt(&self) -> Option<&super::TransactionFilter> {
16649 self.filter.as_ref().map(|field| field as _)
16650 }
16651 pub fn set_filter<T: Into<super::TransactionFilter>>(&mut self, field: T) {
16653 self.filter = Some(field.into().into());
16654 }
16655 pub fn with_filter<T: Into<super::TransactionFilter>>(
16657 mut self,
16658 field: T,
16659 ) -> Self {
16660 self.set_filter(field.into());
16661 self
16662 }
16663 }
16664 impl super::SubscribeTransactionsResponse {
16665 pub const fn const_default() -> Self {
16666 Self {
16667 transaction: None,
16668 watermark: None,
16669 }
16670 }
16671 #[doc(hidden)]
16672 pub fn default_instance() -> &'static Self {
16673 static DEFAULT: super::SubscribeTransactionsResponse = super::SubscribeTransactionsResponse::const_default();
16674 &DEFAULT
16675 }
16676 pub fn transaction(&self) -> &super::ExecutedTransaction {
16678 self.transaction
16679 .as_ref()
16680 .map(|field| field as _)
16681 .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
16682 }
16683 pub fn transaction_opt_mut(
16685 &mut self,
16686 ) -> Option<&mut super::ExecutedTransaction> {
16687 self.transaction.as_mut().map(|field| field as _)
16688 }
16689 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
16692 self.transaction.get_or_insert_default()
16693 }
16694 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
16696 self.transaction.as_ref().map(|field| field as _)
16697 }
16698 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
16700 &mut self,
16701 field: T,
16702 ) {
16703 self.transaction = Some(field.into().into());
16704 }
16705 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
16707 mut self,
16708 field: T,
16709 ) -> Self {
16710 self.set_transaction(field.into());
16711 self
16712 }
16713 pub fn watermark(&self) -> &super::Watermark {
16715 self.watermark
16716 .as_ref()
16717 .map(|field| field as _)
16718 .unwrap_or_else(|| super::Watermark::default_instance() as _)
16719 }
16720 pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
16722 self.watermark.as_mut().map(|field| field as _)
16723 }
16724 pub fn watermark_mut(&mut self) -> &mut super::Watermark {
16727 self.watermark.get_or_insert_default()
16728 }
16729 pub fn watermark_opt(&self) -> Option<&super::Watermark> {
16731 self.watermark.as_ref().map(|field| field as _)
16732 }
16733 pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
16735 self.watermark = Some(field.into().into());
16736 }
16737 pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
16739 self.set_watermark(field.into());
16740 self
16741 }
16742 }
16743 impl super::SystemEpochInfo {
16744 pub const fn const_default() -> Self {
16745 Self {
16746 total_stake: None,
16747 storage_fund_reinvestment: None,
16748 storage_charge: None,
16749 storage_rebate: None,
16750 storage_fund_balance: None,
16751 stake_subsidy_amount: None,
16752 total_gas_fees: None,
16753 total_stake_rewards_distributed: None,
16754 leftover_storage_fund_inflow: None,
16755 }
16756 }
16757 #[doc(hidden)]
16758 pub fn default_instance() -> &'static Self {
16759 static DEFAULT: super::SystemEpochInfo = super::SystemEpochInfo::const_default();
16760 &DEFAULT
16761 }
16762 pub fn total_stake_opt_mut(&mut self) -> Option<&mut u64> {
16764 self.total_stake.as_mut().map(|field| field as _)
16765 }
16766 pub fn total_stake_mut(&mut self) -> &mut u64 {
16769 self.total_stake.get_or_insert_default()
16770 }
16771 pub fn total_stake_opt(&self) -> Option<u64> {
16773 self.total_stake.as_ref().map(|field| *field)
16774 }
16775 pub fn set_total_stake(&mut self, field: u64) {
16777 self.total_stake = Some(field);
16778 }
16779 pub fn with_total_stake(mut self, field: u64) -> Self {
16781 self.set_total_stake(field);
16782 self
16783 }
16784 pub fn storage_fund_reinvestment_opt_mut(&mut self) -> Option<&mut u64> {
16786 self.storage_fund_reinvestment.as_mut().map(|field| field as _)
16787 }
16788 pub fn storage_fund_reinvestment_mut(&mut self) -> &mut u64 {
16791 self.storage_fund_reinvestment.get_or_insert_default()
16792 }
16793 pub fn storage_fund_reinvestment_opt(&self) -> Option<u64> {
16795 self.storage_fund_reinvestment.as_ref().map(|field| *field)
16796 }
16797 pub fn set_storage_fund_reinvestment(&mut self, field: u64) {
16799 self.storage_fund_reinvestment = Some(field);
16800 }
16801 pub fn with_storage_fund_reinvestment(mut self, field: u64) -> Self {
16803 self.set_storage_fund_reinvestment(field);
16804 self
16805 }
16806 pub fn storage_charge_opt_mut(&mut self) -> Option<&mut u64> {
16808 self.storage_charge.as_mut().map(|field| field as _)
16809 }
16810 pub fn storage_charge_mut(&mut self) -> &mut u64 {
16813 self.storage_charge.get_or_insert_default()
16814 }
16815 pub fn storage_charge_opt(&self) -> Option<u64> {
16817 self.storage_charge.as_ref().map(|field| *field)
16818 }
16819 pub fn set_storage_charge(&mut self, field: u64) {
16821 self.storage_charge = Some(field);
16822 }
16823 pub fn with_storage_charge(mut self, field: u64) -> Self {
16825 self.set_storage_charge(field);
16826 self
16827 }
16828 pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
16830 self.storage_rebate.as_mut().map(|field| field as _)
16831 }
16832 pub fn storage_rebate_mut(&mut self) -> &mut u64 {
16835 self.storage_rebate.get_or_insert_default()
16836 }
16837 pub fn storage_rebate_opt(&self) -> Option<u64> {
16839 self.storage_rebate.as_ref().map(|field| *field)
16840 }
16841 pub fn set_storage_rebate(&mut self, field: u64) {
16843 self.storage_rebate = Some(field);
16844 }
16845 pub fn with_storage_rebate(mut self, field: u64) -> Self {
16847 self.set_storage_rebate(field);
16848 self
16849 }
16850 pub fn storage_fund_balance_opt_mut(&mut self) -> Option<&mut u64> {
16852 self.storage_fund_balance.as_mut().map(|field| field as _)
16853 }
16854 pub fn storage_fund_balance_mut(&mut self) -> &mut u64 {
16857 self.storage_fund_balance.get_or_insert_default()
16858 }
16859 pub fn storage_fund_balance_opt(&self) -> Option<u64> {
16861 self.storage_fund_balance.as_ref().map(|field| *field)
16862 }
16863 pub fn set_storage_fund_balance(&mut self, field: u64) {
16865 self.storage_fund_balance = Some(field);
16866 }
16867 pub fn with_storage_fund_balance(mut self, field: u64) -> Self {
16869 self.set_storage_fund_balance(field);
16870 self
16871 }
16872 pub fn stake_subsidy_amount_opt_mut(&mut self) -> Option<&mut u64> {
16874 self.stake_subsidy_amount.as_mut().map(|field| field as _)
16875 }
16876 pub fn stake_subsidy_amount_mut(&mut self) -> &mut u64 {
16879 self.stake_subsidy_amount.get_or_insert_default()
16880 }
16881 pub fn stake_subsidy_amount_opt(&self) -> Option<u64> {
16883 self.stake_subsidy_amount.as_ref().map(|field| *field)
16884 }
16885 pub fn set_stake_subsidy_amount(&mut self, field: u64) {
16887 self.stake_subsidy_amount = Some(field);
16888 }
16889 pub fn with_stake_subsidy_amount(mut self, field: u64) -> Self {
16891 self.set_stake_subsidy_amount(field);
16892 self
16893 }
16894 pub fn total_gas_fees_opt_mut(&mut self) -> Option<&mut u64> {
16896 self.total_gas_fees.as_mut().map(|field| field as _)
16897 }
16898 pub fn total_gas_fees_mut(&mut self) -> &mut u64 {
16901 self.total_gas_fees.get_or_insert_default()
16902 }
16903 pub fn total_gas_fees_opt(&self) -> Option<u64> {
16905 self.total_gas_fees.as_ref().map(|field| *field)
16906 }
16907 pub fn set_total_gas_fees(&mut self, field: u64) {
16909 self.total_gas_fees = Some(field);
16910 }
16911 pub fn with_total_gas_fees(mut self, field: u64) -> Self {
16913 self.set_total_gas_fees(field);
16914 self
16915 }
16916 pub fn total_stake_rewards_distributed_opt_mut(&mut self) -> Option<&mut u64> {
16918 self.total_stake_rewards_distributed.as_mut().map(|field| field as _)
16919 }
16920 pub fn total_stake_rewards_distributed_mut(&mut self) -> &mut u64 {
16923 self.total_stake_rewards_distributed.get_or_insert_default()
16924 }
16925 pub fn total_stake_rewards_distributed_opt(&self) -> Option<u64> {
16927 self.total_stake_rewards_distributed.as_ref().map(|field| *field)
16928 }
16929 pub fn set_total_stake_rewards_distributed(&mut self, field: u64) {
16931 self.total_stake_rewards_distributed = Some(field);
16932 }
16933 pub fn with_total_stake_rewards_distributed(mut self, field: u64) -> Self {
16935 self.set_total_stake_rewards_distributed(field);
16936 self
16937 }
16938 pub fn leftover_storage_fund_inflow_opt_mut(&mut self) -> Option<&mut u64> {
16940 self.leftover_storage_fund_inflow.as_mut().map(|field| field as _)
16941 }
16942 pub fn leftover_storage_fund_inflow_mut(&mut self) -> &mut u64 {
16945 self.leftover_storage_fund_inflow.get_or_insert_default()
16946 }
16947 pub fn leftover_storage_fund_inflow_opt(&self) -> Option<u64> {
16949 self.leftover_storage_fund_inflow.as_ref().map(|field| *field)
16950 }
16951 pub fn set_leftover_storage_fund_inflow(&mut self, field: u64) {
16953 self.leftover_storage_fund_inflow = Some(field);
16954 }
16955 pub fn with_leftover_storage_fund_inflow(mut self, field: u64) -> Self {
16957 self.set_leftover_storage_fund_inflow(field);
16958 self
16959 }
16960 }
16961 impl super::SystemPackage {
16962 pub const fn const_default() -> Self {
16963 Self {
16964 version: None,
16965 modules: Vec::new(),
16966 dependencies: Vec::new(),
16967 }
16968 }
16969 #[doc(hidden)]
16970 pub fn default_instance() -> &'static Self {
16971 static DEFAULT: super::SystemPackage = super::SystemPackage::const_default();
16972 &DEFAULT
16973 }
16974 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
16976 self.version.as_mut().map(|field| field as _)
16977 }
16978 pub fn version_mut(&mut self) -> &mut u64 {
16981 self.version.get_or_insert_default()
16982 }
16983 pub fn version_opt(&self) -> Option<u64> {
16985 self.version.as_ref().map(|field| *field)
16986 }
16987 pub fn set_version(&mut self, field: u64) {
16989 self.version = Some(field);
16990 }
16991 pub fn with_version(mut self, field: u64) -> Self {
16993 self.set_version(field);
16994 self
16995 }
16996 pub fn modules(&self) -> &[::prost::bytes::Bytes] {
16998 &self.modules
16999 }
17000 pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
17003 &mut self.modules
17004 }
17005 pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
17007 self.modules = field;
17008 }
17009 pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
17011 self.set_modules(field);
17012 self
17013 }
17014 pub fn dependencies(&self) -> &[String] {
17016 &self.dependencies
17017 }
17018 pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
17021 &mut self.dependencies
17022 }
17023 pub fn set_dependencies(&mut self, field: Vec<String>) {
17025 self.dependencies = field;
17026 }
17027 pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
17029 self.set_dependencies(field);
17030 self
17031 }
17032 }
17033 impl super::SystemParameters {
17034 pub const fn const_default() -> Self {
17035 Self {
17036 epoch_duration_ms: None,
17037 stake_subsidy_start_epoch: None,
17038 min_validator_count: None,
17039 max_validator_count: None,
17040 min_validator_joining_stake: None,
17041 validator_low_stake_threshold: None,
17042 validator_very_low_stake_threshold: None,
17043 validator_low_stake_grace_period: None,
17044 extra_fields: None,
17045 }
17046 }
17047 #[doc(hidden)]
17048 pub fn default_instance() -> &'static Self {
17049 static DEFAULT: super::SystemParameters = super::SystemParameters::const_default();
17050 &DEFAULT
17051 }
17052 pub fn epoch_duration_ms_opt_mut(&mut self) -> Option<&mut u64> {
17054 self.epoch_duration_ms.as_mut().map(|field| field as _)
17055 }
17056 pub fn epoch_duration_ms_mut(&mut self) -> &mut u64 {
17059 self.epoch_duration_ms.get_or_insert_default()
17060 }
17061 pub fn epoch_duration_ms_opt(&self) -> Option<u64> {
17063 self.epoch_duration_ms.as_ref().map(|field| *field)
17064 }
17065 pub fn set_epoch_duration_ms(&mut self, field: u64) {
17067 self.epoch_duration_ms = Some(field);
17068 }
17069 pub fn with_epoch_duration_ms(mut self, field: u64) -> Self {
17071 self.set_epoch_duration_ms(field);
17072 self
17073 }
17074 pub fn stake_subsidy_start_epoch_opt_mut(&mut self) -> Option<&mut u64> {
17076 self.stake_subsidy_start_epoch.as_mut().map(|field| field as _)
17077 }
17078 pub fn stake_subsidy_start_epoch_mut(&mut self) -> &mut u64 {
17081 self.stake_subsidy_start_epoch.get_or_insert_default()
17082 }
17083 pub fn stake_subsidy_start_epoch_opt(&self) -> Option<u64> {
17085 self.stake_subsidy_start_epoch.as_ref().map(|field| *field)
17086 }
17087 pub fn set_stake_subsidy_start_epoch(&mut self, field: u64) {
17089 self.stake_subsidy_start_epoch = Some(field);
17090 }
17091 pub fn with_stake_subsidy_start_epoch(mut self, field: u64) -> Self {
17093 self.set_stake_subsidy_start_epoch(field);
17094 self
17095 }
17096 pub fn min_validator_count_opt_mut(&mut self) -> Option<&mut u64> {
17098 self.min_validator_count.as_mut().map(|field| field as _)
17099 }
17100 pub fn min_validator_count_mut(&mut self) -> &mut u64 {
17103 self.min_validator_count.get_or_insert_default()
17104 }
17105 pub fn min_validator_count_opt(&self) -> Option<u64> {
17107 self.min_validator_count.as_ref().map(|field| *field)
17108 }
17109 pub fn set_min_validator_count(&mut self, field: u64) {
17111 self.min_validator_count = Some(field);
17112 }
17113 pub fn with_min_validator_count(mut self, field: u64) -> Self {
17115 self.set_min_validator_count(field);
17116 self
17117 }
17118 pub fn max_validator_count_opt_mut(&mut self) -> Option<&mut u64> {
17120 self.max_validator_count.as_mut().map(|field| field as _)
17121 }
17122 pub fn max_validator_count_mut(&mut self) -> &mut u64 {
17125 self.max_validator_count.get_or_insert_default()
17126 }
17127 pub fn max_validator_count_opt(&self) -> Option<u64> {
17129 self.max_validator_count.as_ref().map(|field| *field)
17130 }
17131 pub fn set_max_validator_count(&mut self, field: u64) {
17133 self.max_validator_count = Some(field);
17134 }
17135 pub fn with_max_validator_count(mut self, field: u64) -> Self {
17137 self.set_max_validator_count(field);
17138 self
17139 }
17140 pub fn min_validator_joining_stake_opt_mut(&mut self) -> Option<&mut u64> {
17142 self.min_validator_joining_stake.as_mut().map(|field| field as _)
17143 }
17144 pub fn min_validator_joining_stake_mut(&mut self) -> &mut u64 {
17147 self.min_validator_joining_stake.get_or_insert_default()
17148 }
17149 pub fn min_validator_joining_stake_opt(&self) -> Option<u64> {
17151 self.min_validator_joining_stake.as_ref().map(|field| *field)
17152 }
17153 pub fn set_min_validator_joining_stake(&mut self, field: u64) {
17155 self.min_validator_joining_stake = Some(field);
17156 }
17157 pub fn with_min_validator_joining_stake(mut self, field: u64) -> Self {
17159 self.set_min_validator_joining_stake(field);
17160 self
17161 }
17162 pub fn validator_low_stake_threshold_opt_mut(&mut self) -> Option<&mut u64> {
17164 self.validator_low_stake_threshold.as_mut().map(|field| field as _)
17165 }
17166 pub fn validator_low_stake_threshold_mut(&mut self) -> &mut u64 {
17169 self.validator_low_stake_threshold.get_or_insert_default()
17170 }
17171 pub fn validator_low_stake_threshold_opt(&self) -> Option<u64> {
17173 self.validator_low_stake_threshold.as_ref().map(|field| *field)
17174 }
17175 pub fn set_validator_low_stake_threshold(&mut self, field: u64) {
17177 self.validator_low_stake_threshold = Some(field);
17178 }
17179 pub fn with_validator_low_stake_threshold(mut self, field: u64) -> Self {
17181 self.set_validator_low_stake_threshold(field);
17182 self
17183 }
17184 pub fn validator_very_low_stake_threshold_opt_mut(
17186 &mut self,
17187 ) -> Option<&mut u64> {
17188 self.validator_very_low_stake_threshold.as_mut().map(|field| field as _)
17189 }
17190 pub fn validator_very_low_stake_threshold_mut(&mut self) -> &mut u64 {
17193 self.validator_very_low_stake_threshold.get_or_insert_default()
17194 }
17195 pub fn validator_very_low_stake_threshold_opt(&self) -> Option<u64> {
17197 self.validator_very_low_stake_threshold.as_ref().map(|field| *field)
17198 }
17199 pub fn set_validator_very_low_stake_threshold(&mut self, field: u64) {
17201 self.validator_very_low_stake_threshold = Some(field);
17202 }
17203 pub fn with_validator_very_low_stake_threshold(mut self, field: u64) -> Self {
17205 self.set_validator_very_low_stake_threshold(field);
17206 self
17207 }
17208 pub fn validator_low_stake_grace_period_opt_mut(&mut self) -> Option<&mut u64> {
17210 self.validator_low_stake_grace_period.as_mut().map(|field| field as _)
17211 }
17212 pub fn validator_low_stake_grace_period_mut(&mut self) -> &mut u64 {
17215 self.validator_low_stake_grace_period.get_or_insert_default()
17216 }
17217 pub fn validator_low_stake_grace_period_opt(&self) -> Option<u64> {
17219 self.validator_low_stake_grace_period.as_ref().map(|field| *field)
17220 }
17221 pub fn set_validator_low_stake_grace_period(&mut self, field: u64) {
17223 self.validator_low_stake_grace_period = Some(field);
17224 }
17225 pub fn with_validator_low_stake_grace_period(mut self, field: u64) -> Self {
17227 self.set_validator_low_stake_grace_period(field);
17228 self
17229 }
17230 pub fn extra_fields(&self) -> &super::MoveTable {
17232 self.extra_fields
17233 .as_ref()
17234 .map(|field| field as _)
17235 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17236 }
17237 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
17239 self.extra_fields.as_mut().map(|field| field as _)
17240 }
17241 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
17244 self.extra_fields.get_or_insert_default()
17245 }
17246 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
17248 self.extra_fields.as_ref().map(|field| field as _)
17249 }
17250 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
17252 self.extra_fields = Some(field.into().into());
17253 }
17254 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
17256 self.set_extra_fields(field.into());
17257 self
17258 }
17259 }
17260 impl super::SystemState {
17261 pub const fn const_default() -> Self {
17262 Self {
17263 version: None,
17264 epoch: None,
17265 protocol_version: None,
17266 validators: None,
17267 storage_fund: None,
17268 parameters: None,
17269 reference_gas_price: None,
17270 validator_report_records: Vec::new(),
17271 stake_subsidy: None,
17272 safe_mode: None,
17273 safe_mode_storage_rewards: None,
17274 safe_mode_computation_rewards: None,
17275 safe_mode_storage_rebates: None,
17276 safe_mode_non_refundable_storage_fee: None,
17277 epoch_start_timestamp_ms: None,
17278 extra_fields: None,
17279 }
17280 }
17281 #[doc(hidden)]
17282 pub fn default_instance() -> &'static Self {
17283 static DEFAULT: super::SystemState = super::SystemState::const_default();
17284 &DEFAULT
17285 }
17286 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
17288 self.version.as_mut().map(|field| field as _)
17289 }
17290 pub fn version_mut(&mut self) -> &mut u64 {
17293 self.version.get_or_insert_default()
17294 }
17295 pub fn version_opt(&self) -> Option<u64> {
17297 self.version.as_ref().map(|field| *field)
17298 }
17299 pub fn set_version(&mut self, field: u64) {
17301 self.version = Some(field);
17302 }
17303 pub fn with_version(mut self, field: u64) -> Self {
17305 self.set_version(field);
17306 self
17307 }
17308 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
17310 self.epoch.as_mut().map(|field| field as _)
17311 }
17312 pub fn epoch_mut(&mut self) -> &mut u64 {
17315 self.epoch.get_or_insert_default()
17316 }
17317 pub fn epoch_opt(&self) -> Option<u64> {
17319 self.epoch.as_ref().map(|field| *field)
17320 }
17321 pub fn set_epoch(&mut self, field: u64) {
17323 self.epoch = Some(field);
17324 }
17325 pub fn with_epoch(mut self, field: u64) -> Self {
17327 self.set_epoch(field);
17328 self
17329 }
17330 pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
17332 self.protocol_version.as_mut().map(|field| field as _)
17333 }
17334 pub fn protocol_version_mut(&mut self) -> &mut u64 {
17337 self.protocol_version.get_or_insert_default()
17338 }
17339 pub fn protocol_version_opt(&self) -> Option<u64> {
17341 self.protocol_version.as_ref().map(|field| *field)
17342 }
17343 pub fn set_protocol_version(&mut self, field: u64) {
17345 self.protocol_version = Some(field);
17346 }
17347 pub fn with_protocol_version(mut self, field: u64) -> Self {
17349 self.set_protocol_version(field);
17350 self
17351 }
17352 pub fn validators(&self) -> &super::ValidatorSet {
17354 self.validators
17355 .as_ref()
17356 .map(|field| field as _)
17357 .unwrap_or_else(|| super::ValidatorSet::default_instance() as _)
17358 }
17359 pub fn validators_opt_mut(&mut self) -> Option<&mut super::ValidatorSet> {
17361 self.validators.as_mut().map(|field| field as _)
17362 }
17363 pub fn validators_mut(&mut self) -> &mut super::ValidatorSet {
17366 self.validators.get_or_insert_default()
17367 }
17368 pub fn validators_opt(&self) -> Option<&super::ValidatorSet> {
17370 self.validators.as_ref().map(|field| field as _)
17371 }
17372 pub fn set_validators<T: Into<super::ValidatorSet>>(&mut self, field: T) {
17374 self.validators = Some(field.into().into());
17375 }
17376 pub fn with_validators<T: Into<super::ValidatorSet>>(
17378 mut self,
17379 field: T,
17380 ) -> Self {
17381 self.set_validators(field.into());
17382 self
17383 }
17384 pub fn storage_fund(&self) -> &super::StorageFund {
17386 self.storage_fund
17387 .as_ref()
17388 .map(|field| field as _)
17389 .unwrap_or_else(|| super::StorageFund::default_instance() as _)
17390 }
17391 pub fn storage_fund_opt_mut(&mut self) -> Option<&mut super::StorageFund> {
17393 self.storage_fund.as_mut().map(|field| field as _)
17394 }
17395 pub fn storage_fund_mut(&mut self) -> &mut super::StorageFund {
17398 self.storage_fund.get_or_insert_default()
17399 }
17400 pub fn storage_fund_opt(&self) -> Option<&super::StorageFund> {
17402 self.storage_fund.as_ref().map(|field| field as _)
17403 }
17404 pub fn set_storage_fund<T: Into<super::StorageFund>>(&mut self, field: T) {
17406 self.storage_fund = Some(field.into().into());
17407 }
17408 pub fn with_storage_fund<T: Into<super::StorageFund>>(
17410 mut self,
17411 field: T,
17412 ) -> Self {
17413 self.set_storage_fund(field.into());
17414 self
17415 }
17416 pub fn parameters(&self) -> &super::SystemParameters {
17418 self.parameters
17419 .as_ref()
17420 .map(|field| field as _)
17421 .unwrap_or_else(|| super::SystemParameters::default_instance() as _)
17422 }
17423 pub fn parameters_opt_mut(&mut self) -> Option<&mut super::SystemParameters> {
17425 self.parameters.as_mut().map(|field| field as _)
17426 }
17427 pub fn parameters_mut(&mut self) -> &mut super::SystemParameters {
17430 self.parameters.get_or_insert_default()
17431 }
17432 pub fn parameters_opt(&self) -> Option<&super::SystemParameters> {
17434 self.parameters.as_ref().map(|field| field as _)
17435 }
17436 pub fn set_parameters<T: Into<super::SystemParameters>>(&mut self, field: T) {
17438 self.parameters = Some(field.into().into());
17439 }
17440 pub fn with_parameters<T: Into<super::SystemParameters>>(
17442 mut self,
17443 field: T,
17444 ) -> Self {
17445 self.set_parameters(field.into());
17446 self
17447 }
17448 pub fn reference_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
17450 self.reference_gas_price.as_mut().map(|field| field as _)
17451 }
17452 pub fn reference_gas_price_mut(&mut self) -> &mut u64 {
17455 self.reference_gas_price.get_or_insert_default()
17456 }
17457 pub fn reference_gas_price_opt(&self) -> Option<u64> {
17459 self.reference_gas_price.as_ref().map(|field| *field)
17460 }
17461 pub fn set_reference_gas_price(&mut self, field: u64) {
17463 self.reference_gas_price = Some(field);
17464 }
17465 pub fn with_reference_gas_price(mut self, field: u64) -> Self {
17467 self.set_reference_gas_price(field);
17468 self
17469 }
17470 pub fn validator_report_records(&self) -> &[super::ValidatorReportRecord] {
17472 &self.validator_report_records
17473 }
17474 pub fn validator_report_records_mut(
17477 &mut self,
17478 ) -> &mut Vec<super::ValidatorReportRecord> {
17479 &mut self.validator_report_records
17480 }
17481 pub fn set_validator_report_records(
17483 &mut self,
17484 field: Vec<super::ValidatorReportRecord>,
17485 ) {
17486 self.validator_report_records = field;
17487 }
17488 pub fn with_validator_report_records(
17490 mut self,
17491 field: Vec<super::ValidatorReportRecord>,
17492 ) -> Self {
17493 self.set_validator_report_records(field);
17494 self
17495 }
17496 pub fn stake_subsidy(&self) -> &super::StakeSubsidy {
17498 self.stake_subsidy
17499 .as_ref()
17500 .map(|field| field as _)
17501 .unwrap_or_else(|| super::StakeSubsidy::default_instance() as _)
17502 }
17503 pub fn stake_subsidy_opt_mut(&mut self) -> Option<&mut super::StakeSubsidy> {
17505 self.stake_subsidy.as_mut().map(|field| field as _)
17506 }
17507 pub fn stake_subsidy_mut(&mut self) -> &mut super::StakeSubsidy {
17510 self.stake_subsidy.get_or_insert_default()
17511 }
17512 pub fn stake_subsidy_opt(&self) -> Option<&super::StakeSubsidy> {
17514 self.stake_subsidy.as_ref().map(|field| field as _)
17515 }
17516 pub fn set_stake_subsidy<T: Into<super::StakeSubsidy>>(&mut self, field: T) {
17518 self.stake_subsidy = Some(field.into().into());
17519 }
17520 pub fn with_stake_subsidy<T: Into<super::StakeSubsidy>>(
17522 mut self,
17523 field: T,
17524 ) -> Self {
17525 self.set_stake_subsidy(field.into());
17526 self
17527 }
17528 pub fn safe_mode_opt_mut(&mut self) -> Option<&mut bool> {
17530 self.safe_mode.as_mut().map(|field| field as _)
17531 }
17532 pub fn safe_mode_mut(&mut self) -> &mut bool {
17535 self.safe_mode.get_or_insert_default()
17536 }
17537 pub fn safe_mode_opt(&self) -> Option<bool> {
17539 self.safe_mode.as_ref().map(|field| *field)
17540 }
17541 pub fn set_safe_mode(&mut self, field: bool) {
17543 self.safe_mode = Some(field);
17544 }
17545 pub fn with_safe_mode(mut self, field: bool) -> Self {
17547 self.set_safe_mode(field);
17548 self
17549 }
17550 pub fn safe_mode_storage_rewards_opt_mut(&mut self) -> Option<&mut u64> {
17552 self.safe_mode_storage_rewards.as_mut().map(|field| field as _)
17553 }
17554 pub fn safe_mode_storage_rewards_mut(&mut self) -> &mut u64 {
17557 self.safe_mode_storage_rewards.get_or_insert_default()
17558 }
17559 pub fn safe_mode_storage_rewards_opt(&self) -> Option<u64> {
17561 self.safe_mode_storage_rewards.as_ref().map(|field| *field)
17562 }
17563 pub fn set_safe_mode_storage_rewards(&mut self, field: u64) {
17565 self.safe_mode_storage_rewards = Some(field);
17566 }
17567 pub fn with_safe_mode_storage_rewards(mut self, field: u64) -> Self {
17569 self.set_safe_mode_storage_rewards(field);
17570 self
17571 }
17572 pub fn safe_mode_computation_rewards_opt_mut(&mut self) -> Option<&mut u64> {
17574 self.safe_mode_computation_rewards.as_mut().map(|field| field as _)
17575 }
17576 pub fn safe_mode_computation_rewards_mut(&mut self) -> &mut u64 {
17579 self.safe_mode_computation_rewards.get_or_insert_default()
17580 }
17581 pub fn safe_mode_computation_rewards_opt(&self) -> Option<u64> {
17583 self.safe_mode_computation_rewards.as_ref().map(|field| *field)
17584 }
17585 pub fn set_safe_mode_computation_rewards(&mut self, field: u64) {
17587 self.safe_mode_computation_rewards = Some(field);
17588 }
17589 pub fn with_safe_mode_computation_rewards(mut self, field: u64) -> Self {
17591 self.set_safe_mode_computation_rewards(field);
17592 self
17593 }
17594 pub fn safe_mode_storage_rebates_opt_mut(&mut self) -> Option<&mut u64> {
17596 self.safe_mode_storage_rebates.as_mut().map(|field| field as _)
17597 }
17598 pub fn safe_mode_storage_rebates_mut(&mut self) -> &mut u64 {
17601 self.safe_mode_storage_rebates.get_or_insert_default()
17602 }
17603 pub fn safe_mode_storage_rebates_opt(&self) -> Option<u64> {
17605 self.safe_mode_storage_rebates.as_ref().map(|field| *field)
17606 }
17607 pub fn set_safe_mode_storage_rebates(&mut self, field: u64) {
17609 self.safe_mode_storage_rebates = Some(field);
17610 }
17611 pub fn with_safe_mode_storage_rebates(mut self, field: u64) -> Self {
17613 self.set_safe_mode_storage_rebates(field);
17614 self
17615 }
17616 pub fn safe_mode_non_refundable_storage_fee_opt_mut(
17618 &mut self,
17619 ) -> Option<&mut u64> {
17620 self.safe_mode_non_refundable_storage_fee.as_mut().map(|field| field as _)
17621 }
17622 pub fn safe_mode_non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
17625 self.safe_mode_non_refundable_storage_fee.get_or_insert_default()
17626 }
17627 pub fn safe_mode_non_refundable_storage_fee_opt(&self) -> Option<u64> {
17629 self.safe_mode_non_refundable_storage_fee.as_ref().map(|field| *field)
17630 }
17631 pub fn set_safe_mode_non_refundable_storage_fee(&mut self, field: u64) {
17633 self.safe_mode_non_refundable_storage_fee = Some(field);
17634 }
17635 pub fn with_safe_mode_non_refundable_storage_fee(mut self, field: u64) -> Self {
17637 self.set_safe_mode_non_refundable_storage_fee(field);
17638 self
17639 }
17640 pub fn epoch_start_timestamp_ms_opt_mut(&mut self) -> Option<&mut u64> {
17642 self.epoch_start_timestamp_ms.as_mut().map(|field| field as _)
17643 }
17644 pub fn epoch_start_timestamp_ms_mut(&mut self) -> &mut u64 {
17647 self.epoch_start_timestamp_ms.get_or_insert_default()
17648 }
17649 pub fn epoch_start_timestamp_ms_opt(&self) -> Option<u64> {
17651 self.epoch_start_timestamp_ms.as_ref().map(|field| *field)
17652 }
17653 pub fn set_epoch_start_timestamp_ms(&mut self, field: u64) {
17655 self.epoch_start_timestamp_ms = Some(field);
17656 }
17657 pub fn with_epoch_start_timestamp_ms(mut self, field: u64) -> Self {
17659 self.set_epoch_start_timestamp_ms(field);
17660 self
17661 }
17662 pub fn extra_fields(&self) -> &super::MoveTable {
17664 self.extra_fields
17665 .as_ref()
17666 .map(|field| field as _)
17667 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17668 }
17669 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
17671 self.extra_fields.as_mut().map(|field| field as _)
17672 }
17673 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
17676 self.extra_fields.get_or_insert_default()
17677 }
17678 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
17680 self.extra_fields.as_ref().map(|field| field as _)
17681 }
17682 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
17684 self.extra_fields = Some(field.into().into());
17685 }
17686 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
17688 self.set_extra_fields(field.into());
17689 self
17690 }
17691 }
17692 impl super::Transaction {
17693 pub const fn const_default() -> Self {
17694 Self {
17695 bcs: None,
17696 digest: None,
17697 version: None,
17698 kind: None,
17699 sender: None,
17700 gas_payment: None,
17701 expiration: None,
17702 }
17703 }
17704 #[doc(hidden)]
17705 pub fn default_instance() -> &'static Self {
17706 static DEFAULT: super::Transaction = super::Transaction::const_default();
17707 &DEFAULT
17708 }
17709 pub fn bcs(&self) -> &super::Bcs {
17711 self.bcs
17712 .as_ref()
17713 .map(|field| field as _)
17714 .unwrap_or_else(|| super::Bcs::default_instance() as _)
17715 }
17716 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
17718 self.bcs.as_mut().map(|field| field as _)
17719 }
17720 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
17723 self.bcs.get_or_insert_default()
17724 }
17725 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
17727 self.bcs.as_ref().map(|field| field as _)
17728 }
17729 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
17731 self.bcs = Some(field.into().into());
17732 }
17733 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
17735 self.set_bcs(field.into());
17736 self
17737 }
17738 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
17740 self.digest.as_mut().map(|field| field as _)
17741 }
17742 pub fn digest_mut(&mut self) -> &mut String {
17745 self.digest.get_or_insert_default()
17746 }
17747 pub fn digest_opt(&self) -> Option<&str> {
17749 self.digest.as_ref().map(|field| field as _)
17750 }
17751 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
17753 self.digest = Some(field.into().into());
17754 }
17755 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
17757 self.set_digest(field.into());
17758 self
17759 }
17760 pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
17762 self.version.as_mut().map(|field| field as _)
17763 }
17764 pub fn version_mut(&mut self) -> &mut i32 {
17767 self.version.get_or_insert_default()
17768 }
17769 pub fn version_opt(&self) -> Option<i32> {
17771 self.version.as_ref().map(|field| *field)
17772 }
17773 pub fn set_version(&mut self, field: i32) {
17775 self.version = Some(field);
17776 }
17777 pub fn with_version(mut self, field: i32) -> Self {
17779 self.set_version(field);
17780 self
17781 }
17782 pub fn kind(&self) -> &super::TransactionKind {
17784 self.kind
17785 .as_ref()
17786 .map(|field| field as _)
17787 .unwrap_or_else(|| super::TransactionKind::default_instance() as _)
17788 }
17789 pub fn kind_opt_mut(&mut self) -> Option<&mut super::TransactionKind> {
17791 self.kind.as_mut().map(|field| field as _)
17792 }
17793 pub fn kind_mut(&mut self) -> &mut super::TransactionKind {
17796 self.kind.get_or_insert_default()
17797 }
17798 pub fn kind_opt(&self) -> Option<&super::TransactionKind> {
17800 self.kind.as_ref().map(|field| field as _)
17801 }
17802 pub fn set_kind<T: Into<super::TransactionKind>>(&mut self, field: T) {
17804 self.kind = Some(field.into().into());
17805 }
17806 pub fn with_kind<T: Into<super::TransactionKind>>(mut self, field: T) -> Self {
17808 self.set_kind(field.into());
17809 self
17810 }
17811 pub fn sender_opt_mut(&mut self) -> Option<&mut String> {
17813 self.sender.as_mut().map(|field| field as _)
17814 }
17815 pub fn sender_mut(&mut self) -> &mut String {
17818 self.sender.get_or_insert_default()
17819 }
17820 pub fn sender_opt(&self) -> Option<&str> {
17822 self.sender.as_ref().map(|field| field as _)
17823 }
17824 pub fn set_sender<T: Into<String>>(&mut self, field: T) {
17826 self.sender = Some(field.into().into());
17827 }
17828 pub fn with_sender<T: Into<String>>(mut self, field: T) -> Self {
17830 self.set_sender(field.into());
17831 self
17832 }
17833 pub fn gas_payment(&self) -> &super::GasPayment {
17835 self.gas_payment
17836 .as_ref()
17837 .map(|field| field as _)
17838 .unwrap_or_else(|| super::GasPayment::default_instance() as _)
17839 }
17840 pub fn gas_payment_opt_mut(&mut self) -> Option<&mut super::GasPayment> {
17842 self.gas_payment.as_mut().map(|field| field as _)
17843 }
17844 pub fn gas_payment_mut(&mut self) -> &mut super::GasPayment {
17847 self.gas_payment.get_or_insert_default()
17848 }
17849 pub fn gas_payment_opt(&self) -> Option<&super::GasPayment> {
17851 self.gas_payment.as_ref().map(|field| field as _)
17852 }
17853 pub fn set_gas_payment<T: Into<super::GasPayment>>(&mut self, field: T) {
17855 self.gas_payment = Some(field.into().into());
17856 }
17857 pub fn with_gas_payment<T: Into<super::GasPayment>>(mut self, field: T) -> Self {
17859 self.set_gas_payment(field.into());
17860 self
17861 }
17862 pub fn expiration(&self) -> &super::TransactionExpiration {
17864 self.expiration
17865 .as_ref()
17866 .map(|field| field as _)
17867 .unwrap_or_else(|| super::TransactionExpiration::default_instance() as _)
17868 }
17869 pub fn expiration_opt_mut(
17871 &mut self,
17872 ) -> Option<&mut super::TransactionExpiration> {
17873 self.expiration.as_mut().map(|field| field as _)
17874 }
17875 pub fn expiration_mut(&mut self) -> &mut super::TransactionExpiration {
17878 self.expiration.get_or_insert_default()
17879 }
17880 pub fn expiration_opt(&self) -> Option<&super::TransactionExpiration> {
17882 self.expiration.as_ref().map(|field| field as _)
17883 }
17884 pub fn set_expiration<T: Into<super::TransactionExpiration>>(
17886 &mut self,
17887 field: T,
17888 ) {
17889 self.expiration = Some(field.into().into());
17890 }
17891 pub fn with_expiration<T: Into<super::TransactionExpiration>>(
17893 mut self,
17894 field: T,
17895 ) -> Self {
17896 self.set_expiration(field.into());
17897 self
17898 }
17899 }
17900 impl super::TransactionEffects {
17901 pub const fn const_default() -> Self {
17902 Self {
17903 bcs: None,
17904 digest: None,
17905 version: None,
17906 status: None,
17907 epoch: None,
17908 gas_used: None,
17909 transaction_digest: None,
17910 gas_object: None,
17911 events_digest: None,
17912 dependencies: Vec::new(),
17913 lamport_version: None,
17914 changed_objects: Vec::new(),
17915 unchanged_consensus_objects: Vec::new(),
17916 auxiliary_data_digest: None,
17917 unchanged_loaded_runtime_objects: Vec::new(),
17918 }
17919 }
17920 #[doc(hidden)]
17921 pub fn default_instance() -> &'static Self {
17922 static DEFAULT: super::TransactionEffects = super::TransactionEffects::const_default();
17923 &DEFAULT
17924 }
17925 pub fn bcs(&self) -> &super::Bcs {
17927 self.bcs
17928 .as_ref()
17929 .map(|field| field as _)
17930 .unwrap_or_else(|| super::Bcs::default_instance() as _)
17931 }
17932 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
17934 self.bcs.as_mut().map(|field| field as _)
17935 }
17936 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
17939 self.bcs.get_or_insert_default()
17940 }
17941 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
17943 self.bcs.as_ref().map(|field| field as _)
17944 }
17945 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
17947 self.bcs = Some(field.into().into());
17948 }
17949 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
17951 self.set_bcs(field.into());
17952 self
17953 }
17954 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
17956 self.digest.as_mut().map(|field| field as _)
17957 }
17958 pub fn digest_mut(&mut self) -> &mut String {
17961 self.digest.get_or_insert_default()
17962 }
17963 pub fn digest_opt(&self) -> Option<&str> {
17965 self.digest.as_ref().map(|field| field as _)
17966 }
17967 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
17969 self.digest = Some(field.into().into());
17970 }
17971 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
17973 self.set_digest(field.into());
17974 self
17975 }
17976 pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
17978 self.version.as_mut().map(|field| field as _)
17979 }
17980 pub fn version_mut(&mut self) -> &mut i32 {
17983 self.version.get_or_insert_default()
17984 }
17985 pub fn version_opt(&self) -> Option<i32> {
17987 self.version.as_ref().map(|field| *field)
17988 }
17989 pub fn set_version(&mut self, field: i32) {
17991 self.version = Some(field);
17992 }
17993 pub fn with_version(mut self, field: i32) -> Self {
17995 self.set_version(field);
17996 self
17997 }
17998 pub fn status(&self) -> &super::ExecutionStatus {
18000 self.status
18001 .as_ref()
18002 .map(|field| field as _)
18003 .unwrap_or_else(|| super::ExecutionStatus::default_instance() as _)
18004 }
18005 pub fn status_opt_mut(&mut self) -> Option<&mut super::ExecutionStatus> {
18007 self.status.as_mut().map(|field| field as _)
18008 }
18009 pub fn status_mut(&mut self) -> &mut super::ExecutionStatus {
18012 self.status.get_or_insert_default()
18013 }
18014 pub fn status_opt(&self) -> Option<&super::ExecutionStatus> {
18016 self.status.as_ref().map(|field| field as _)
18017 }
18018 pub fn set_status<T: Into<super::ExecutionStatus>>(&mut self, field: T) {
18020 self.status = Some(field.into().into());
18021 }
18022 pub fn with_status<T: Into<super::ExecutionStatus>>(mut self, field: T) -> Self {
18024 self.set_status(field.into());
18025 self
18026 }
18027 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
18029 self.epoch.as_mut().map(|field| field as _)
18030 }
18031 pub fn epoch_mut(&mut self) -> &mut u64 {
18034 self.epoch.get_or_insert_default()
18035 }
18036 pub fn epoch_opt(&self) -> Option<u64> {
18038 self.epoch.as_ref().map(|field| *field)
18039 }
18040 pub fn set_epoch(&mut self, field: u64) {
18042 self.epoch = Some(field);
18043 }
18044 pub fn with_epoch(mut self, field: u64) -> Self {
18046 self.set_epoch(field);
18047 self
18048 }
18049 pub fn gas_used(&self) -> &super::GasCostSummary {
18051 self.gas_used
18052 .as_ref()
18053 .map(|field| field as _)
18054 .unwrap_or_else(|| super::GasCostSummary::default_instance() as _)
18055 }
18056 pub fn gas_used_opt_mut(&mut self) -> Option<&mut super::GasCostSummary> {
18058 self.gas_used.as_mut().map(|field| field as _)
18059 }
18060 pub fn gas_used_mut(&mut self) -> &mut super::GasCostSummary {
18063 self.gas_used.get_or_insert_default()
18064 }
18065 pub fn gas_used_opt(&self) -> Option<&super::GasCostSummary> {
18067 self.gas_used.as_ref().map(|field| field as _)
18068 }
18069 pub fn set_gas_used<T: Into<super::GasCostSummary>>(&mut self, field: T) {
18071 self.gas_used = Some(field.into().into());
18072 }
18073 pub fn with_gas_used<T: Into<super::GasCostSummary>>(
18075 mut self,
18076 field: T,
18077 ) -> Self {
18078 self.set_gas_used(field.into());
18079 self
18080 }
18081 pub fn transaction_digest_opt_mut(&mut self) -> Option<&mut String> {
18083 self.transaction_digest.as_mut().map(|field| field as _)
18084 }
18085 pub fn transaction_digest_mut(&mut self) -> &mut String {
18088 self.transaction_digest.get_or_insert_default()
18089 }
18090 pub fn transaction_digest_opt(&self) -> Option<&str> {
18092 self.transaction_digest.as_ref().map(|field| field as _)
18093 }
18094 pub fn set_transaction_digest<T: Into<String>>(&mut self, field: T) {
18096 self.transaction_digest = Some(field.into().into());
18097 }
18098 pub fn with_transaction_digest<T: Into<String>>(mut self, field: T) -> Self {
18100 self.set_transaction_digest(field.into());
18101 self
18102 }
18103 pub fn gas_object(&self) -> &super::ChangedObject {
18105 self.gas_object
18106 .as_ref()
18107 .map(|field| field as _)
18108 .unwrap_or_else(|| super::ChangedObject::default_instance() as _)
18109 }
18110 pub fn gas_object_opt_mut(&mut self) -> Option<&mut super::ChangedObject> {
18112 self.gas_object.as_mut().map(|field| field as _)
18113 }
18114 pub fn gas_object_mut(&mut self) -> &mut super::ChangedObject {
18117 self.gas_object.get_or_insert_default()
18118 }
18119 pub fn gas_object_opt(&self) -> Option<&super::ChangedObject> {
18121 self.gas_object.as_ref().map(|field| field as _)
18122 }
18123 pub fn set_gas_object<T: Into<super::ChangedObject>>(&mut self, field: T) {
18125 self.gas_object = Some(field.into().into());
18126 }
18127 pub fn with_gas_object<T: Into<super::ChangedObject>>(
18129 mut self,
18130 field: T,
18131 ) -> Self {
18132 self.set_gas_object(field.into());
18133 self
18134 }
18135 pub fn events_digest_opt_mut(&mut self) -> Option<&mut String> {
18137 self.events_digest.as_mut().map(|field| field as _)
18138 }
18139 pub fn events_digest_mut(&mut self) -> &mut String {
18142 self.events_digest.get_or_insert_default()
18143 }
18144 pub fn events_digest_opt(&self) -> Option<&str> {
18146 self.events_digest.as_ref().map(|field| field as _)
18147 }
18148 pub fn set_events_digest<T: Into<String>>(&mut self, field: T) {
18150 self.events_digest = Some(field.into().into());
18151 }
18152 pub fn with_events_digest<T: Into<String>>(mut self, field: T) -> Self {
18154 self.set_events_digest(field.into());
18155 self
18156 }
18157 pub fn dependencies(&self) -> &[String] {
18159 &self.dependencies
18160 }
18161 pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
18164 &mut self.dependencies
18165 }
18166 pub fn set_dependencies(&mut self, field: Vec<String>) {
18168 self.dependencies = field;
18169 }
18170 pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
18172 self.set_dependencies(field);
18173 self
18174 }
18175 pub fn lamport_version_opt_mut(&mut self) -> Option<&mut u64> {
18177 self.lamport_version.as_mut().map(|field| field as _)
18178 }
18179 pub fn lamport_version_mut(&mut self) -> &mut u64 {
18182 self.lamport_version.get_or_insert_default()
18183 }
18184 pub fn lamport_version_opt(&self) -> Option<u64> {
18186 self.lamport_version.as_ref().map(|field| *field)
18187 }
18188 pub fn set_lamport_version(&mut self, field: u64) {
18190 self.lamport_version = Some(field);
18191 }
18192 pub fn with_lamport_version(mut self, field: u64) -> Self {
18194 self.set_lamport_version(field);
18195 self
18196 }
18197 pub fn changed_objects(&self) -> &[super::ChangedObject] {
18199 &self.changed_objects
18200 }
18201 pub fn changed_objects_mut(&mut self) -> &mut Vec<super::ChangedObject> {
18204 &mut self.changed_objects
18205 }
18206 pub fn set_changed_objects(&mut self, field: Vec<super::ChangedObject>) {
18208 self.changed_objects = field;
18209 }
18210 pub fn with_changed_objects(mut self, field: Vec<super::ChangedObject>) -> Self {
18212 self.set_changed_objects(field);
18213 self
18214 }
18215 pub fn unchanged_consensus_objects(&self) -> &[super::UnchangedConsensusObject] {
18217 &self.unchanged_consensus_objects
18218 }
18219 pub fn unchanged_consensus_objects_mut(
18222 &mut self,
18223 ) -> &mut Vec<super::UnchangedConsensusObject> {
18224 &mut self.unchanged_consensus_objects
18225 }
18226 pub fn set_unchanged_consensus_objects(
18228 &mut self,
18229 field: Vec<super::UnchangedConsensusObject>,
18230 ) {
18231 self.unchanged_consensus_objects = field;
18232 }
18233 pub fn with_unchanged_consensus_objects(
18235 mut self,
18236 field: Vec<super::UnchangedConsensusObject>,
18237 ) -> Self {
18238 self.set_unchanged_consensus_objects(field);
18239 self
18240 }
18241 pub fn auxiliary_data_digest_opt_mut(&mut self) -> Option<&mut String> {
18243 self.auxiliary_data_digest.as_mut().map(|field| field as _)
18244 }
18245 pub fn auxiliary_data_digest_mut(&mut self) -> &mut String {
18248 self.auxiliary_data_digest.get_or_insert_default()
18249 }
18250 pub fn auxiliary_data_digest_opt(&self) -> Option<&str> {
18252 self.auxiliary_data_digest.as_ref().map(|field| field as _)
18253 }
18254 pub fn set_auxiliary_data_digest<T: Into<String>>(&mut self, field: T) {
18256 self.auxiliary_data_digest = Some(field.into().into());
18257 }
18258 pub fn with_auxiliary_data_digest<T: Into<String>>(mut self, field: T) -> Self {
18260 self.set_auxiliary_data_digest(field.into());
18261 self
18262 }
18263 pub fn unchanged_loaded_runtime_objects(&self) -> &[super::ObjectReference] {
18265 &self.unchanged_loaded_runtime_objects
18266 }
18267 pub fn unchanged_loaded_runtime_objects_mut(
18270 &mut self,
18271 ) -> &mut Vec<super::ObjectReference> {
18272 &mut self.unchanged_loaded_runtime_objects
18273 }
18274 pub fn set_unchanged_loaded_runtime_objects(
18276 &mut self,
18277 field: Vec<super::ObjectReference>,
18278 ) {
18279 self.unchanged_loaded_runtime_objects = field;
18280 }
18281 pub fn with_unchanged_loaded_runtime_objects(
18283 mut self,
18284 field: Vec<super::ObjectReference>,
18285 ) -> Self {
18286 self.set_unchanged_loaded_runtime_objects(field);
18287 self
18288 }
18289 }
18290 impl super::TransactionEvents {
18291 pub const fn const_default() -> Self {
18292 Self {
18293 bcs: None,
18294 digest: None,
18295 events: Vec::new(),
18296 }
18297 }
18298 #[doc(hidden)]
18299 pub fn default_instance() -> &'static Self {
18300 static DEFAULT: super::TransactionEvents = super::TransactionEvents::const_default();
18301 &DEFAULT
18302 }
18303 pub fn bcs(&self) -> &super::Bcs {
18305 self.bcs
18306 .as_ref()
18307 .map(|field| field as _)
18308 .unwrap_or_else(|| super::Bcs::default_instance() as _)
18309 }
18310 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
18312 self.bcs.as_mut().map(|field| field as _)
18313 }
18314 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
18317 self.bcs.get_or_insert_default()
18318 }
18319 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
18321 self.bcs.as_ref().map(|field| field as _)
18322 }
18323 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
18325 self.bcs = Some(field.into().into());
18326 }
18327 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
18329 self.set_bcs(field.into());
18330 self
18331 }
18332 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
18334 self.digest.as_mut().map(|field| field as _)
18335 }
18336 pub fn digest_mut(&mut self) -> &mut String {
18339 self.digest.get_or_insert_default()
18340 }
18341 pub fn digest_opt(&self) -> Option<&str> {
18343 self.digest.as_ref().map(|field| field as _)
18344 }
18345 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
18347 self.digest = Some(field.into().into());
18348 }
18349 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
18351 self.set_digest(field.into());
18352 self
18353 }
18354 pub fn events(&self) -> &[super::Event] {
18356 &self.events
18357 }
18358 pub fn events_mut(&mut self) -> &mut Vec<super::Event> {
18361 &mut self.events
18362 }
18363 pub fn set_events(&mut self, field: Vec<super::Event>) {
18365 self.events = field;
18366 }
18367 pub fn with_events(mut self, field: Vec<super::Event>) -> Self {
18369 self.set_events(field);
18370 self
18371 }
18372 }
18373 impl super::TransactionExpiration {
18374 pub const fn const_default() -> Self {
18375 Self {
18376 kind: None,
18377 epoch: None,
18378 min_epoch: None,
18379 min_timestamp: None,
18380 max_timestamp: None,
18381 chain: None,
18382 nonce: None,
18383 allowed_proposers: None,
18384 }
18385 }
18386 #[doc(hidden)]
18387 pub fn default_instance() -> &'static Self {
18388 static DEFAULT: super::TransactionExpiration = super::TransactionExpiration::const_default();
18389 &DEFAULT
18390 }
18391 pub fn with_kind<
18393 T: Into<super::transaction_expiration::TransactionExpirationKind>,
18394 >(mut self, field: T) -> Self {
18395 self.set_kind(field.into());
18396 self
18397 }
18398 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
18400 self.epoch.as_mut().map(|field| field as _)
18401 }
18402 pub fn epoch_mut(&mut self) -> &mut u64 {
18405 self.epoch.get_or_insert_default()
18406 }
18407 pub fn epoch_opt(&self) -> Option<u64> {
18409 self.epoch.as_ref().map(|field| *field)
18410 }
18411 pub fn set_epoch(&mut self, field: u64) {
18413 self.epoch = Some(field);
18414 }
18415 pub fn with_epoch(mut self, field: u64) -> Self {
18417 self.set_epoch(field);
18418 self
18419 }
18420 pub fn min_epoch_opt_mut(&mut self) -> Option<&mut u64> {
18422 self.min_epoch.as_mut().map(|field| field as _)
18423 }
18424 pub fn min_epoch_mut(&mut self) -> &mut u64 {
18427 self.min_epoch.get_or_insert_default()
18428 }
18429 pub fn min_epoch_opt(&self) -> Option<u64> {
18431 self.min_epoch.as_ref().map(|field| *field)
18432 }
18433 pub fn set_min_epoch(&mut self, field: u64) {
18435 self.min_epoch = Some(field);
18436 }
18437 pub fn with_min_epoch(mut self, field: u64) -> Self {
18439 self.set_min_epoch(field);
18440 self
18441 }
18442 pub fn min_timestamp_opt_mut(
18444 &mut self,
18445 ) -> Option<&mut ::prost_types::Timestamp> {
18446 self.min_timestamp.as_mut().map(|field| field as _)
18447 }
18448 pub fn min_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
18451 self.min_timestamp.get_or_insert_default()
18452 }
18453 pub fn min_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
18455 self.min_timestamp.as_ref().map(|field| field as _)
18456 }
18457 pub fn set_min_timestamp<T: Into<::prost_types::Timestamp>>(
18459 &mut self,
18460 field: T,
18461 ) {
18462 self.min_timestamp = Some(field.into().into());
18463 }
18464 pub fn with_min_timestamp<T: Into<::prost_types::Timestamp>>(
18466 mut self,
18467 field: T,
18468 ) -> Self {
18469 self.set_min_timestamp(field.into());
18470 self
18471 }
18472 pub fn max_timestamp_opt_mut(
18474 &mut self,
18475 ) -> Option<&mut ::prost_types::Timestamp> {
18476 self.max_timestamp.as_mut().map(|field| field as _)
18477 }
18478 pub fn max_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
18481 self.max_timestamp.get_or_insert_default()
18482 }
18483 pub fn max_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
18485 self.max_timestamp.as_ref().map(|field| field as _)
18486 }
18487 pub fn set_max_timestamp<T: Into<::prost_types::Timestamp>>(
18489 &mut self,
18490 field: T,
18491 ) {
18492 self.max_timestamp = Some(field.into().into());
18493 }
18494 pub fn with_max_timestamp<T: Into<::prost_types::Timestamp>>(
18496 mut self,
18497 field: T,
18498 ) -> Self {
18499 self.set_max_timestamp(field.into());
18500 self
18501 }
18502 pub fn chain_opt_mut(&mut self) -> Option<&mut String> {
18504 self.chain.as_mut().map(|field| field as _)
18505 }
18506 pub fn chain_mut(&mut self) -> &mut String {
18509 self.chain.get_or_insert_default()
18510 }
18511 pub fn chain_opt(&self) -> Option<&str> {
18513 self.chain.as_ref().map(|field| field as _)
18514 }
18515 pub fn set_chain<T: Into<String>>(&mut self, field: T) {
18517 self.chain = Some(field.into().into());
18518 }
18519 pub fn with_chain<T: Into<String>>(mut self, field: T) -> Self {
18521 self.set_chain(field.into());
18522 self
18523 }
18524 pub fn nonce_opt_mut(&mut self) -> Option<&mut u32> {
18526 self.nonce.as_mut().map(|field| field as _)
18527 }
18528 pub fn nonce_mut(&mut self) -> &mut u32 {
18531 self.nonce.get_or_insert_default()
18532 }
18533 pub fn nonce_opt(&self) -> Option<u32> {
18535 self.nonce.as_ref().map(|field| *field)
18536 }
18537 pub fn set_nonce(&mut self, field: u32) {
18539 self.nonce = Some(field);
18540 }
18541 pub fn with_nonce(mut self, field: u32) -> Self {
18543 self.set_nonce(field);
18544 self
18545 }
18546 pub fn allowed_proposers(&self) -> &super::AllowedProposers {
18548 self.allowed_proposers
18549 .as_ref()
18550 .map(|field| field as _)
18551 .unwrap_or_else(|| super::AllowedProposers::default_instance() as _)
18552 }
18553 pub fn allowed_proposers_opt_mut(
18555 &mut self,
18556 ) -> Option<&mut super::AllowedProposers> {
18557 self.allowed_proposers.as_mut().map(|field| field as _)
18558 }
18559 pub fn allowed_proposers_mut(&mut self) -> &mut super::AllowedProposers {
18562 self.allowed_proposers.get_or_insert_default()
18563 }
18564 pub fn allowed_proposers_opt(&self) -> Option<&super::AllowedProposers> {
18566 self.allowed_proposers.as_ref().map(|field| field as _)
18567 }
18568 pub fn set_allowed_proposers<T: Into<super::AllowedProposers>>(
18570 &mut self,
18571 field: T,
18572 ) {
18573 self.allowed_proposers = Some(field.into().into());
18574 }
18575 pub fn with_allowed_proposers<T: Into<super::AllowedProposers>>(
18577 mut self,
18578 field: T,
18579 ) -> Self {
18580 self.set_allowed_proposers(field.into());
18581 self
18582 }
18583 }
18584 impl super::TransactionFilter {
18585 pub const fn const_default() -> Self {
18586 Self { terms: Vec::new() }
18587 }
18588 #[doc(hidden)]
18589 pub fn default_instance() -> &'static Self {
18590 static DEFAULT: super::TransactionFilter = super::TransactionFilter::const_default();
18591 &DEFAULT
18592 }
18593 pub fn terms(&self) -> &[super::TransactionTerm] {
18595 &self.terms
18596 }
18597 pub fn terms_mut(&mut self) -> &mut Vec<super::TransactionTerm> {
18600 &mut self.terms
18601 }
18602 pub fn set_terms(&mut self, field: Vec<super::TransactionTerm>) {
18604 self.terms = field;
18605 }
18606 pub fn with_terms(mut self, field: Vec<super::TransactionTerm>) -> Self {
18608 self.set_terms(field);
18609 self
18610 }
18611 }
18612 impl super::TransactionKind {
18613 pub const fn const_default() -> Self {
18614 Self { kind: None, data: None }
18615 }
18616 #[doc(hidden)]
18617 pub fn default_instance() -> &'static Self {
18618 static DEFAULT: super::TransactionKind = super::TransactionKind::const_default();
18619 &DEFAULT
18620 }
18621 pub fn with_kind<T: Into<super::transaction_kind::Kind>>(
18623 mut self,
18624 field: T,
18625 ) -> Self {
18626 self.set_kind(field.into());
18627 self
18628 }
18629 pub fn programmable_transaction(&self) -> &super::ProgrammableTransaction {
18631 if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &self
18632 .data
18633 {
18634 field as _
18635 } else {
18636 super::ProgrammableTransaction::default_instance() as _
18637 }
18638 }
18639 pub fn programmable_transaction_opt(
18641 &self,
18642 ) -> Option<&super::ProgrammableTransaction> {
18643 if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &self
18644 .data
18645 {
18646 Some(field as _)
18647 } else {
18648 None
18649 }
18650 }
18651 pub fn programmable_transaction_opt_mut(
18653 &mut self,
18654 ) -> Option<&mut super::ProgrammableTransaction> {
18655 if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &mut self
18656 .data
18657 {
18658 Some(field as _)
18659 } else {
18660 None
18661 }
18662 }
18663 pub fn programmable_transaction_mut(
18667 &mut self,
18668 ) -> &mut super::ProgrammableTransaction {
18669 if self.programmable_transaction_opt_mut().is_none() {
18670 self.data = Some(
18671 super::transaction_kind::Data::ProgrammableTransaction(
18672 super::ProgrammableTransaction::default(),
18673 ),
18674 );
18675 }
18676 self.programmable_transaction_opt_mut().unwrap()
18677 }
18678 pub fn set_programmable_transaction<T: Into<super::ProgrammableTransaction>>(
18681 &mut self,
18682 field: T,
18683 ) {
18684 self.data = Some(
18685 super::transaction_kind::Data::ProgrammableTransaction(
18686 field.into().into(),
18687 ),
18688 );
18689 }
18690 pub fn with_programmable_transaction<T: Into<super::ProgrammableTransaction>>(
18693 mut self,
18694 field: T,
18695 ) -> Self {
18696 self.set_programmable_transaction(field.into());
18697 self
18698 }
18699 pub fn change_epoch(&self) -> &super::ChangeEpoch {
18701 if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &self.data {
18702 field as _
18703 } else {
18704 super::ChangeEpoch::default_instance() as _
18705 }
18706 }
18707 pub fn change_epoch_opt(&self) -> Option<&super::ChangeEpoch> {
18709 if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &self.data {
18710 Some(field as _)
18711 } else {
18712 None
18713 }
18714 }
18715 pub fn change_epoch_opt_mut(&mut self) -> Option<&mut super::ChangeEpoch> {
18717 if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &mut self
18718 .data
18719 {
18720 Some(field as _)
18721 } else {
18722 None
18723 }
18724 }
18725 pub fn change_epoch_mut(&mut self) -> &mut super::ChangeEpoch {
18729 if self.change_epoch_opt_mut().is_none() {
18730 self.data = Some(
18731 super::transaction_kind::Data::ChangeEpoch(
18732 super::ChangeEpoch::default(),
18733 ),
18734 );
18735 }
18736 self.change_epoch_opt_mut().unwrap()
18737 }
18738 pub fn set_change_epoch<T: Into<super::ChangeEpoch>>(&mut self, field: T) {
18741 self.data = Some(
18742 super::transaction_kind::Data::ChangeEpoch(field.into().into()),
18743 );
18744 }
18745 pub fn with_change_epoch<T: Into<super::ChangeEpoch>>(
18748 mut self,
18749 field: T,
18750 ) -> Self {
18751 self.set_change_epoch(field.into());
18752 self
18753 }
18754 pub fn genesis(&self) -> &super::GenesisTransaction {
18756 if let Some(super::transaction_kind::Data::Genesis(field)) = &self.data {
18757 field as _
18758 } else {
18759 super::GenesisTransaction::default_instance() as _
18760 }
18761 }
18762 pub fn genesis_opt(&self) -> Option<&super::GenesisTransaction> {
18764 if let Some(super::transaction_kind::Data::Genesis(field)) = &self.data {
18765 Some(field as _)
18766 } else {
18767 None
18768 }
18769 }
18770 pub fn genesis_opt_mut(&mut self) -> Option<&mut super::GenesisTransaction> {
18772 if let Some(super::transaction_kind::Data::Genesis(field)) = &mut self.data {
18773 Some(field as _)
18774 } else {
18775 None
18776 }
18777 }
18778 pub fn genesis_mut(&mut self) -> &mut super::GenesisTransaction {
18782 if self.genesis_opt_mut().is_none() {
18783 self.data = Some(
18784 super::transaction_kind::Data::Genesis(
18785 super::GenesisTransaction::default(),
18786 ),
18787 );
18788 }
18789 self.genesis_opt_mut().unwrap()
18790 }
18791 pub fn set_genesis<T: Into<super::GenesisTransaction>>(&mut self, field: T) {
18794 self.data = Some(
18795 super::transaction_kind::Data::Genesis(field.into().into()),
18796 );
18797 }
18798 pub fn with_genesis<T: Into<super::GenesisTransaction>>(
18801 mut self,
18802 field: T,
18803 ) -> Self {
18804 self.set_genesis(field.into());
18805 self
18806 }
18807 pub fn consensus_commit_prologue(&self) -> &super::ConsensusCommitPrologue {
18809 if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &self
18810 .data
18811 {
18812 field as _
18813 } else {
18814 super::ConsensusCommitPrologue::default_instance() as _
18815 }
18816 }
18817 pub fn consensus_commit_prologue_opt(
18819 &self,
18820 ) -> Option<&super::ConsensusCommitPrologue> {
18821 if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &self
18822 .data
18823 {
18824 Some(field as _)
18825 } else {
18826 None
18827 }
18828 }
18829 pub fn consensus_commit_prologue_opt_mut(
18831 &mut self,
18832 ) -> Option<&mut super::ConsensusCommitPrologue> {
18833 if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &mut self
18834 .data
18835 {
18836 Some(field as _)
18837 } else {
18838 None
18839 }
18840 }
18841 pub fn consensus_commit_prologue_mut(
18845 &mut self,
18846 ) -> &mut super::ConsensusCommitPrologue {
18847 if self.consensus_commit_prologue_opt_mut().is_none() {
18848 self.data = Some(
18849 super::transaction_kind::Data::ConsensusCommitPrologue(
18850 super::ConsensusCommitPrologue::default(),
18851 ),
18852 );
18853 }
18854 self.consensus_commit_prologue_opt_mut().unwrap()
18855 }
18856 pub fn set_consensus_commit_prologue<T: Into<super::ConsensusCommitPrologue>>(
18859 &mut self,
18860 field: T,
18861 ) {
18862 self.data = Some(
18863 super::transaction_kind::Data::ConsensusCommitPrologue(
18864 field.into().into(),
18865 ),
18866 );
18867 }
18868 pub fn with_consensus_commit_prologue<T: Into<super::ConsensusCommitPrologue>>(
18871 mut self,
18872 field: T,
18873 ) -> Self {
18874 self.set_consensus_commit_prologue(field.into());
18875 self
18876 }
18877 pub fn authenticator_state_update(&self) -> &super::AuthenticatorStateUpdate {
18879 if let Some(
18880 super::transaction_kind::Data::AuthenticatorStateUpdate(field),
18881 ) = &self.data
18882 {
18883 field as _
18884 } else {
18885 super::AuthenticatorStateUpdate::default_instance() as _
18886 }
18887 }
18888 pub fn authenticator_state_update_opt(
18890 &self,
18891 ) -> Option<&super::AuthenticatorStateUpdate> {
18892 if let Some(
18893 super::transaction_kind::Data::AuthenticatorStateUpdate(field),
18894 ) = &self.data
18895 {
18896 Some(field as _)
18897 } else {
18898 None
18899 }
18900 }
18901 pub fn authenticator_state_update_opt_mut(
18903 &mut self,
18904 ) -> Option<&mut super::AuthenticatorStateUpdate> {
18905 if let Some(
18906 super::transaction_kind::Data::AuthenticatorStateUpdate(field),
18907 ) = &mut self.data
18908 {
18909 Some(field as _)
18910 } else {
18911 None
18912 }
18913 }
18914 pub fn authenticator_state_update_mut(
18918 &mut self,
18919 ) -> &mut super::AuthenticatorStateUpdate {
18920 if self.authenticator_state_update_opt_mut().is_none() {
18921 self.data = Some(
18922 super::transaction_kind::Data::AuthenticatorStateUpdate(
18923 super::AuthenticatorStateUpdate::default(),
18924 ),
18925 );
18926 }
18927 self.authenticator_state_update_opt_mut().unwrap()
18928 }
18929 pub fn set_authenticator_state_update<T: Into<super::AuthenticatorStateUpdate>>(
18932 &mut self,
18933 field: T,
18934 ) {
18935 self.data = Some(
18936 super::transaction_kind::Data::AuthenticatorStateUpdate(
18937 field.into().into(),
18938 ),
18939 );
18940 }
18941 pub fn with_authenticator_state_update<T: Into<super::AuthenticatorStateUpdate>>(
18944 mut self,
18945 field: T,
18946 ) -> Self {
18947 self.set_authenticator_state_update(field.into());
18948 self
18949 }
18950 pub fn end_of_epoch(&self) -> &super::EndOfEpochTransaction {
18952 if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &self.data {
18953 field as _
18954 } else {
18955 super::EndOfEpochTransaction::default_instance() as _
18956 }
18957 }
18958 pub fn end_of_epoch_opt(&self) -> Option<&super::EndOfEpochTransaction> {
18960 if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &self.data {
18961 Some(field as _)
18962 } else {
18963 None
18964 }
18965 }
18966 pub fn end_of_epoch_opt_mut(
18968 &mut self,
18969 ) -> Option<&mut super::EndOfEpochTransaction> {
18970 if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &mut self
18971 .data
18972 {
18973 Some(field as _)
18974 } else {
18975 None
18976 }
18977 }
18978 pub fn end_of_epoch_mut(&mut self) -> &mut super::EndOfEpochTransaction {
18982 if self.end_of_epoch_opt_mut().is_none() {
18983 self.data = Some(
18984 super::transaction_kind::Data::EndOfEpoch(
18985 super::EndOfEpochTransaction::default(),
18986 ),
18987 );
18988 }
18989 self.end_of_epoch_opt_mut().unwrap()
18990 }
18991 pub fn set_end_of_epoch<T: Into<super::EndOfEpochTransaction>>(
18994 &mut self,
18995 field: T,
18996 ) {
18997 self.data = Some(
18998 super::transaction_kind::Data::EndOfEpoch(field.into().into()),
18999 );
19000 }
19001 pub fn with_end_of_epoch<T: Into<super::EndOfEpochTransaction>>(
19004 mut self,
19005 field: T,
19006 ) -> Self {
19007 self.set_end_of_epoch(field.into());
19008 self
19009 }
19010 pub fn randomness_state_update(&self) -> &super::RandomnessStateUpdate {
19012 if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &self
19013 .data
19014 {
19015 field as _
19016 } else {
19017 super::RandomnessStateUpdate::default_instance() as _
19018 }
19019 }
19020 pub fn randomness_state_update_opt(
19022 &self,
19023 ) -> Option<&super::RandomnessStateUpdate> {
19024 if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &self
19025 .data
19026 {
19027 Some(field as _)
19028 } else {
19029 None
19030 }
19031 }
19032 pub fn randomness_state_update_opt_mut(
19034 &mut self,
19035 ) -> Option<&mut super::RandomnessStateUpdate> {
19036 if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &mut self
19037 .data
19038 {
19039 Some(field as _)
19040 } else {
19041 None
19042 }
19043 }
19044 pub fn randomness_state_update_mut(
19048 &mut self,
19049 ) -> &mut super::RandomnessStateUpdate {
19050 if self.randomness_state_update_opt_mut().is_none() {
19051 self.data = Some(
19052 super::transaction_kind::Data::RandomnessStateUpdate(
19053 super::RandomnessStateUpdate::default(),
19054 ),
19055 );
19056 }
19057 self.randomness_state_update_opt_mut().unwrap()
19058 }
19059 pub fn set_randomness_state_update<T: Into<super::RandomnessStateUpdate>>(
19062 &mut self,
19063 field: T,
19064 ) {
19065 self.data = Some(
19066 super::transaction_kind::Data::RandomnessStateUpdate(field.into().into()),
19067 );
19068 }
19069 pub fn with_randomness_state_update<T: Into<super::RandomnessStateUpdate>>(
19072 mut self,
19073 field: T,
19074 ) -> Self {
19075 self.set_randomness_state_update(field.into());
19076 self
19077 }
19078 }
19079 impl super::TransactionLiteral {
19080 pub const fn const_default() -> Self {
19081 Self {
19082 negated: false,
19083 predicate: None,
19084 }
19085 }
19086 #[doc(hidden)]
19087 pub fn default_instance() -> &'static Self {
19088 static DEFAULT: super::TransactionLiteral = super::TransactionLiteral::const_default();
19089 &DEFAULT
19090 }
19091 pub fn negated_mut(&mut self) -> &mut bool {
19094 &mut self.negated
19095 }
19096 pub fn set_negated(&mut self, field: bool) {
19098 self.negated = field;
19099 }
19100 pub fn with_negated(mut self, field: bool) -> Self {
19102 self.set_negated(field);
19103 self
19104 }
19105 pub fn sender(&self) -> &super::SenderFilter {
19107 if let Some(super::transaction_literal::Predicate::Sender(field)) = &self
19108 .predicate
19109 {
19110 field as _
19111 } else {
19112 super::SenderFilter::default_instance() as _
19113 }
19114 }
19115 pub fn sender_opt(&self) -> Option<&super::SenderFilter> {
19117 if let Some(super::transaction_literal::Predicate::Sender(field)) = &self
19118 .predicate
19119 {
19120 Some(field as _)
19121 } else {
19122 None
19123 }
19124 }
19125 pub fn sender_opt_mut(&mut self) -> Option<&mut super::SenderFilter> {
19127 if let Some(super::transaction_literal::Predicate::Sender(field)) = &mut self
19128 .predicate
19129 {
19130 Some(field as _)
19131 } else {
19132 None
19133 }
19134 }
19135 pub fn sender_mut(&mut self) -> &mut super::SenderFilter {
19139 if self.sender_opt_mut().is_none() {
19140 self.predicate = Some(
19141 super::transaction_literal::Predicate::Sender(
19142 super::SenderFilter::default(),
19143 ),
19144 );
19145 }
19146 self.sender_opt_mut().unwrap()
19147 }
19148 pub fn set_sender<T: Into<super::SenderFilter>>(&mut self, field: T) {
19151 self.predicate = Some(
19152 super::transaction_literal::Predicate::Sender(field.into().into()),
19153 );
19154 }
19155 pub fn with_sender<T: Into<super::SenderFilter>>(mut self, field: T) -> Self {
19158 self.set_sender(field.into());
19159 self
19160 }
19161 pub fn affected_address(&self) -> &super::AffectedAddressFilter {
19163 if let Some(super::transaction_literal::Predicate::AffectedAddress(field)) = &self
19164 .predicate
19165 {
19166 field as _
19167 } else {
19168 super::AffectedAddressFilter::default_instance() as _
19169 }
19170 }
19171 pub fn affected_address_opt(&self) -> Option<&super::AffectedAddressFilter> {
19173 if let Some(super::transaction_literal::Predicate::AffectedAddress(field)) = &self
19174 .predicate
19175 {
19176 Some(field as _)
19177 } else {
19178 None
19179 }
19180 }
19181 pub fn affected_address_opt_mut(
19183 &mut self,
19184 ) -> Option<&mut super::AffectedAddressFilter> {
19185 if let Some(super::transaction_literal::Predicate::AffectedAddress(field)) = &mut self
19186 .predicate
19187 {
19188 Some(field as _)
19189 } else {
19190 None
19191 }
19192 }
19193 pub fn affected_address_mut(&mut self) -> &mut super::AffectedAddressFilter {
19197 if self.affected_address_opt_mut().is_none() {
19198 self.predicate = Some(
19199 super::transaction_literal::Predicate::AffectedAddress(
19200 super::AffectedAddressFilter::default(),
19201 ),
19202 );
19203 }
19204 self.affected_address_opt_mut().unwrap()
19205 }
19206 pub fn set_affected_address<T: Into<super::AffectedAddressFilter>>(
19209 &mut self,
19210 field: T,
19211 ) {
19212 self.predicate = Some(
19213 super::transaction_literal::Predicate::AffectedAddress(
19214 field.into().into(),
19215 ),
19216 );
19217 }
19218 pub fn with_affected_address<T: Into<super::AffectedAddressFilter>>(
19221 mut self,
19222 field: T,
19223 ) -> Self {
19224 self.set_affected_address(field.into());
19225 self
19226 }
19227 pub fn affected_object(&self) -> &super::AffectedObjectFilter {
19229 if let Some(super::transaction_literal::Predicate::AffectedObject(field)) = &self
19230 .predicate
19231 {
19232 field as _
19233 } else {
19234 super::AffectedObjectFilter::default_instance() as _
19235 }
19236 }
19237 pub fn affected_object_opt(&self) -> Option<&super::AffectedObjectFilter> {
19239 if let Some(super::transaction_literal::Predicate::AffectedObject(field)) = &self
19240 .predicate
19241 {
19242 Some(field as _)
19243 } else {
19244 None
19245 }
19246 }
19247 pub fn affected_object_opt_mut(
19249 &mut self,
19250 ) -> Option<&mut super::AffectedObjectFilter> {
19251 if let Some(super::transaction_literal::Predicate::AffectedObject(field)) = &mut self
19252 .predicate
19253 {
19254 Some(field as _)
19255 } else {
19256 None
19257 }
19258 }
19259 pub fn affected_object_mut(&mut self) -> &mut super::AffectedObjectFilter {
19263 if self.affected_object_opt_mut().is_none() {
19264 self.predicate = Some(
19265 super::transaction_literal::Predicate::AffectedObject(
19266 super::AffectedObjectFilter::default(),
19267 ),
19268 );
19269 }
19270 self.affected_object_opt_mut().unwrap()
19271 }
19272 pub fn set_affected_object<T: Into<super::AffectedObjectFilter>>(
19275 &mut self,
19276 field: T,
19277 ) {
19278 self.predicate = Some(
19279 super::transaction_literal::Predicate::AffectedObject(
19280 field.into().into(),
19281 ),
19282 );
19283 }
19284 pub fn with_affected_object<T: Into<super::AffectedObjectFilter>>(
19287 mut self,
19288 field: T,
19289 ) -> Self {
19290 self.set_affected_object(field.into());
19291 self
19292 }
19293 pub fn move_call(&self) -> &super::MoveCallFilter {
19295 if let Some(super::transaction_literal::Predicate::MoveCall(field)) = &self
19296 .predicate
19297 {
19298 field as _
19299 } else {
19300 super::MoveCallFilter::default_instance() as _
19301 }
19302 }
19303 pub fn move_call_opt(&self) -> Option<&super::MoveCallFilter> {
19305 if let Some(super::transaction_literal::Predicate::MoveCall(field)) = &self
19306 .predicate
19307 {
19308 Some(field as _)
19309 } else {
19310 None
19311 }
19312 }
19313 pub fn move_call_opt_mut(&mut self) -> Option<&mut super::MoveCallFilter> {
19315 if let Some(super::transaction_literal::Predicate::MoveCall(field)) = &mut self
19316 .predicate
19317 {
19318 Some(field as _)
19319 } else {
19320 None
19321 }
19322 }
19323 pub fn move_call_mut(&mut self) -> &mut super::MoveCallFilter {
19327 if self.move_call_opt_mut().is_none() {
19328 self.predicate = Some(
19329 super::transaction_literal::Predicate::MoveCall(
19330 super::MoveCallFilter::default(),
19331 ),
19332 );
19333 }
19334 self.move_call_opt_mut().unwrap()
19335 }
19336 pub fn set_move_call<T: Into<super::MoveCallFilter>>(&mut self, field: T) {
19339 self.predicate = Some(
19340 super::transaction_literal::Predicate::MoveCall(field.into().into()),
19341 );
19342 }
19343 pub fn with_move_call<T: Into<super::MoveCallFilter>>(
19346 mut self,
19347 field: T,
19348 ) -> Self {
19349 self.set_move_call(field.into());
19350 self
19351 }
19352 pub fn emit_module(&self) -> &super::EmitModuleFilter {
19354 if let Some(super::transaction_literal::Predicate::EmitModule(field)) = &self
19355 .predicate
19356 {
19357 field as _
19358 } else {
19359 super::EmitModuleFilter::default_instance() as _
19360 }
19361 }
19362 pub fn emit_module_opt(&self) -> Option<&super::EmitModuleFilter> {
19364 if let Some(super::transaction_literal::Predicate::EmitModule(field)) = &self
19365 .predicate
19366 {
19367 Some(field as _)
19368 } else {
19369 None
19370 }
19371 }
19372 pub fn emit_module_opt_mut(&mut self) -> Option<&mut super::EmitModuleFilter> {
19374 if let Some(super::transaction_literal::Predicate::EmitModule(field)) = &mut self
19375 .predicate
19376 {
19377 Some(field as _)
19378 } else {
19379 None
19380 }
19381 }
19382 pub fn emit_module_mut(&mut self) -> &mut super::EmitModuleFilter {
19386 if self.emit_module_opt_mut().is_none() {
19387 self.predicate = Some(
19388 super::transaction_literal::Predicate::EmitModule(
19389 super::EmitModuleFilter::default(),
19390 ),
19391 );
19392 }
19393 self.emit_module_opt_mut().unwrap()
19394 }
19395 pub fn set_emit_module<T: Into<super::EmitModuleFilter>>(&mut self, field: T) {
19398 self.predicate = Some(
19399 super::transaction_literal::Predicate::EmitModule(field.into().into()),
19400 );
19401 }
19402 pub fn with_emit_module<T: Into<super::EmitModuleFilter>>(
19405 mut self,
19406 field: T,
19407 ) -> Self {
19408 self.set_emit_module(field.into());
19409 self
19410 }
19411 pub fn event_type(&self) -> &super::EventTypeFilter {
19413 if let Some(super::transaction_literal::Predicate::EventType(field)) = &self
19414 .predicate
19415 {
19416 field as _
19417 } else {
19418 super::EventTypeFilter::default_instance() as _
19419 }
19420 }
19421 pub fn event_type_opt(&self) -> Option<&super::EventTypeFilter> {
19423 if let Some(super::transaction_literal::Predicate::EventType(field)) = &self
19424 .predicate
19425 {
19426 Some(field as _)
19427 } else {
19428 None
19429 }
19430 }
19431 pub fn event_type_opt_mut(&mut self) -> Option<&mut super::EventTypeFilter> {
19433 if let Some(super::transaction_literal::Predicate::EventType(field)) = &mut self
19434 .predicate
19435 {
19436 Some(field as _)
19437 } else {
19438 None
19439 }
19440 }
19441 pub fn event_type_mut(&mut self) -> &mut super::EventTypeFilter {
19445 if self.event_type_opt_mut().is_none() {
19446 self.predicate = Some(
19447 super::transaction_literal::Predicate::EventType(
19448 super::EventTypeFilter::default(),
19449 ),
19450 );
19451 }
19452 self.event_type_opt_mut().unwrap()
19453 }
19454 pub fn set_event_type<T: Into<super::EventTypeFilter>>(&mut self, field: T) {
19457 self.predicate = Some(
19458 super::transaction_literal::Predicate::EventType(field.into().into()),
19459 );
19460 }
19461 pub fn with_event_type<T: Into<super::EventTypeFilter>>(
19464 mut self,
19465 field: T,
19466 ) -> Self {
19467 self.set_event_type(field.into());
19468 self
19469 }
19470 pub fn event_stream_head(&self) -> &super::EventStreamHeadFilter {
19472 if let Some(super::transaction_literal::Predicate::EventStreamHead(field)) = &self
19473 .predicate
19474 {
19475 field as _
19476 } else {
19477 super::EventStreamHeadFilter::default_instance() as _
19478 }
19479 }
19480 pub fn event_stream_head_opt(&self) -> Option<&super::EventStreamHeadFilter> {
19482 if let Some(super::transaction_literal::Predicate::EventStreamHead(field)) = &self
19483 .predicate
19484 {
19485 Some(field as _)
19486 } else {
19487 None
19488 }
19489 }
19490 pub fn event_stream_head_opt_mut(
19492 &mut self,
19493 ) -> Option<&mut super::EventStreamHeadFilter> {
19494 if let Some(super::transaction_literal::Predicate::EventStreamHead(field)) = &mut self
19495 .predicate
19496 {
19497 Some(field as _)
19498 } else {
19499 None
19500 }
19501 }
19502 pub fn event_stream_head_mut(&mut self) -> &mut super::EventStreamHeadFilter {
19506 if self.event_stream_head_opt_mut().is_none() {
19507 self.predicate = Some(
19508 super::transaction_literal::Predicate::EventStreamHead(
19509 super::EventStreamHeadFilter::default(),
19510 ),
19511 );
19512 }
19513 self.event_stream_head_opt_mut().unwrap()
19514 }
19515 pub fn set_event_stream_head<T: Into<super::EventStreamHeadFilter>>(
19518 &mut self,
19519 field: T,
19520 ) {
19521 self.predicate = Some(
19522 super::transaction_literal::Predicate::EventStreamHead(
19523 field.into().into(),
19524 ),
19525 );
19526 }
19527 pub fn with_event_stream_head<T: Into<super::EventStreamHeadFilter>>(
19530 mut self,
19531 field: T,
19532 ) -> Self {
19533 self.set_event_stream_head(field.into());
19534 self
19535 }
19536 pub fn package_write(&self) -> &super::PackageWriteFilter {
19538 if let Some(super::transaction_literal::Predicate::PackageWrite(field)) = &self
19539 .predicate
19540 {
19541 field as _
19542 } else {
19543 super::PackageWriteFilter::default_instance() as _
19544 }
19545 }
19546 pub fn package_write_opt(&self) -> Option<&super::PackageWriteFilter> {
19548 if let Some(super::transaction_literal::Predicate::PackageWrite(field)) = &self
19549 .predicate
19550 {
19551 Some(field as _)
19552 } else {
19553 None
19554 }
19555 }
19556 pub fn package_write_opt_mut(
19558 &mut self,
19559 ) -> Option<&mut super::PackageWriteFilter> {
19560 if let Some(super::transaction_literal::Predicate::PackageWrite(field)) = &mut self
19561 .predicate
19562 {
19563 Some(field as _)
19564 } else {
19565 None
19566 }
19567 }
19568 pub fn package_write_mut(&mut self) -> &mut super::PackageWriteFilter {
19572 if self.package_write_opt_mut().is_none() {
19573 self.predicate = Some(
19574 super::transaction_literal::Predicate::PackageWrite(
19575 super::PackageWriteFilter::default(),
19576 ),
19577 );
19578 }
19579 self.package_write_opt_mut().unwrap()
19580 }
19581 pub fn set_package_write<T: Into<super::PackageWriteFilter>>(
19584 &mut self,
19585 field: T,
19586 ) {
19587 self.predicate = Some(
19588 super::transaction_literal::Predicate::PackageWrite(field.into().into()),
19589 );
19590 }
19591 pub fn with_package_write<T: Into<super::PackageWriteFilter>>(
19594 mut self,
19595 field: T,
19596 ) -> Self {
19597 self.set_package_write(field.into());
19598 self
19599 }
19600 }
19601 impl super::TransactionTerm {
19602 pub const fn const_default() -> Self {
19603 Self { literals: Vec::new() }
19604 }
19605 #[doc(hidden)]
19606 pub fn default_instance() -> &'static Self {
19607 static DEFAULT: super::TransactionTerm = super::TransactionTerm::const_default();
19608 &DEFAULT
19609 }
19610 pub fn literals(&self) -> &[super::TransactionLiteral] {
19612 &self.literals
19613 }
19614 pub fn literals_mut(&mut self) -> &mut Vec<super::TransactionLiteral> {
19617 &mut self.literals
19618 }
19619 pub fn set_literals(&mut self, field: Vec<super::TransactionLiteral>) {
19621 self.literals = field;
19622 }
19623 pub fn with_literals(mut self, field: Vec<super::TransactionLiteral>) -> Self {
19625 self.set_literals(field);
19626 self
19627 }
19628 }
19629 impl super::TransferObjects {
19630 pub const fn const_default() -> Self {
19631 Self {
19632 objects: Vec::new(),
19633 address: None,
19634 }
19635 }
19636 #[doc(hidden)]
19637 pub fn default_instance() -> &'static Self {
19638 static DEFAULT: super::TransferObjects = super::TransferObjects::const_default();
19639 &DEFAULT
19640 }
19641 pub fn objects(&self) -> &[super::Argument] {
19643 &self.objects
19644 }
19645 pub fn objects_mut(&mut self) -> &mut Vec<super::Argument> {
19648 &mut self.objects
19649 }
19650 pub fn set_objects(&mut self, field: Vec<super::Argument>) {
19652 self.objects = field;
19653 }
19654 pub fn with_objects(mut self, field: Vec<super::Argument>) -> Self {
19656 self.set_objects(field);
19657 self
19658 }
19659 pub fn address(&self) -> &super::Argument {
19661 self.address
19662 .as_ref()
19663 .map(|field| field as _)
19664 .unwrap_or_else(|| super::Argument::default_instance() as _)
19665 }
19666 pub fn address_opt_mut(&mut self) -> Option<&mut super::Argument> {
19668 self.address.as_mut().map(|field| field as _)
19669 }
19670 pub fn address_mut(&mut self) -> &mut super::Argument {
19673 self.address.get_or_insert_default()
19674 }
19675 pub fn address_opt(&self) -> Option<&super::Argument> {
19677 self.address.as_ref().map(|field| field as _)
19678 }
19679 pub fn set_address<T: Into<super::Argument>>(&mut self, field: T) {
19681 self.address = Some(field.into().into());
19682 }
19683 pub fn with_address<T: Into<super::Argument>>(mut self, field: T) -> Self {
19685 self.set_address(field.into());
19686 self
19687 }
19688 }
19689 impl super::TypeArgumentError {
19690 pub const fn const_default() -> Self {
19691 Self {
19692 type_argument: None,
19693 kind: None,
19694 }
19695 }
19696 #[doc(hidden)]
19697 pub fn default_instance() -> &'static Self {
19698 static DEFAULT: super::TypeArgumentError = super::TypeArgumentError::const_default();
19699 &DEFAULT
19700 }
19701 pub fn type_argument_opt_mut(&mut self) -> Option<&mut u32> {
19703 self.type_argument.as_mut().map(|field| field as _)
19704 }
19705 pub fn type_argument_mut(&mut self) -> &mut u32 {
19708 self.type_argument.get_or_insert_default()
19709 }
19710 pub fn type_argument_opt(&self) -> Option<u32> {
19712 self.type_argument.as_ref().map(|field| *field)
19713 }
19714 pub fn set_type_argument(&mut self, field: u32) {
19716 self.type_argument = Some(field);
19717 }
19718 pub fn with_type_argument(mut self, field: u32) -> Self {
19720 self.set_type_argument(field);
19721 self
19722 }
19723 pub fn with_kind<T: Into<super::type_argument_error::TypeArgumentErrorKind>>(
19725 mut self,
19726 field: T,
19727 ) -> Self {
19728 self.set_kind(field.into());
19729 self
19730 }
19731 }
19732 impl super::TypeOrigin {
19733 pub const fn const_default() -> Self {
19734 Self {
19735 module_name: None,
19736 datatype_name: None,
19737 package_id: None,
19738 }
19739 }
19740 #[doc(hidden)]
19741 pub fn default_instance() -> &'static Self {
19742 static DEFAULT: super::TypeOrigin = super::TypeOrigin::const_default();
19743 &DEFAULT
19744 }
19745 pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
19747 self.module_name.as_mut().map(|field| field as _)
19748 }
19749 pub fn module_name_mut(&mut self) -> &mut String {
19752 self.module_name.get_or_insert_default()
19753 }
19754 pub fn module_name_opt(&self) -> Option<&str> {
19756 self.module_name.as_ref().map(|field| field as _)
19757 }
19758 pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
19760 self.module_name = Some(field.into().into());
19761 }
19762 pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
19764 self.set_module_name(field.into());
19765 self
19766 }
19767 pub fn datatype_name_opt_mut(&mut self) -> Option<&mut String> {
19769 self.datatype_name.as_mut().map(|field| field as _)
19770 }
19771 pub fn datatype_name_mut(&mut self) -> &mut String {
19774 self.datatype_name.get_or_insert_default()
19775 }
19776 pub fn datatype_name_opt(&self) -> Option<&str> {
19778 self.datatype_name.as_ref().map(|field| field as _)
19779 }
19780 pub fn set_datatype_name<T: Into<String>>(&mut self, field: T) {
19782 self.datatype_name = Some(field.into().into());
19783 }
19784 pub fn with_datatype_name<T: Into<String>>(mut self, field: T) -> Self {
19786 self.set_datatype_name(field.into());
19787 self
19788 }
19789 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
19791 self.package_id.as_mut().map(|field| field as _)
19792 }
19793 pub fn package_id_mut(&mut self) -> &mut String {
19796 self.package_id.get_or_insert_default()
19797 }
19798 pub fn package_id_opt(&self) -> Option<&str> {
19800 self.package_id.as_ref().map(|field| field as _)
19801 }
19802 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
19804 self.package_id = Some(field.into().into());
19805 }
19806 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
19808 self.set_package_id(field.into());
19809 self
19810 }
19811 }
19812 impl super::TypeParameter {
19813 pub const fn const_default() -> Self {
19814 Self {
19815 constraints: Vec::new(),
19816 is_phantom: None,
19817 }
19818 }
19819 #[doc(hidden)]
19820 pub fn default_instance() -> &'static Self {
19821 static DEFAULT: super::TypeParameter = super::TypeParameter::const_default();
19822 &DEFAULT
19823 }
19824 pub fn is_phantom_opt_mut(&mut self) -> Option<&mut bool> {
19826 self.is_phantom.as_mut().map(|field| field as _)
19827 }
19828 pub fn is_phantom_mut(&mut self) -> &mut bool {
19831 self.is_phantom.get_or_insert_default()
19832 }
19833 pub fn is_phantom_opt(&self) -> Option<bool> {
19835 self.is_phantom.as_ref().map(|field| *field)
19836 }
19837 pub fn set_is_phantom(&mut self, field: bool) {
19839 self.is_phantom = Some(field);
19840 }
19841 pub fn with_is_phantom(mut self, field: bool) -> Self {
19843 self.set_is_phantom(field);
19844 self
19845 }
19846 }
19847 impl super::UnchangedConsensusObject {
19848 pub const fn const_default() -> Self {
19849 Self {
19850 kind: None,
19851 object_id: None,
19852 version: None,
19853 digest: None,
19854 object_type: None,
19855 }
19856 }
19857 #[doc(hidden)]
19858 pub fn default_instance() -> &'static Self {
19859 static DEFAULT: super::UnchangedConsensusObject = super::UnchangedConsensusObject::const_default();
19860 &DEFAULT
19861 }
19862 pub fn with_kind<
19864 T: Into<super::unchanged_consensus_object::UnchangedConsensusObjectKind>,
19865 >(mut self, field: T) -> Self {
19866 self.set_kind(field.into());
19867 self
19868 }
19869 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
19871 self.object_id.as_mut().map(|field| field as _)
19872 }
19873 pub fn object_id_mut(&mut self) -> &mut String {
19876 self.object_id.get_or_insert_default()
19877 }
19878 pub fn object_id_opt(&self) -> Option<&str> {
19880 self.object_id.as_ref().map(|field| field as _)
19881 }
19882 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
19884 self.object_id = Some(field.into().into());
19885 }
19886 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
19888 self.set_object_id(field.into());
19889 self
19890 }
19891 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
19893 self.version.as_mut().map(|field| field as _)
19894 }
19895 pub fn version_mut(&mut self) -> &mut u64 {
19898 self.version.get_or_insert_default()
19899 }
19900 pub fn version_opt(&self) -> Option<u64> {
19902 self.version.as_ref().map(|field| *field)
19903 }
19904 pub fn set_version(&mut self, field: u64) {
19906 self.version = Some(field);
19907 }
19908 pub fn with_version(mut self, field: u64) -> Self {
19910 self.set_version(field);
19911 self
19912 }
19913 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
19915 self.digest.as_mut().map(|field| field as _)
19916 }
19917 pub fn digest_mut(&mut self) -> &mut String {
19920 self.digest.get_or_insert_default()
19921 }
19922 pub fn digest_opt(&self) -> Option<&str> {
19924 self.digest.as_ref().map(|field| field as _)
19925 }
19926 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
19928 self.digest = Some(field.into().into());
19929 }
19930 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
19932 self.set_digest(field.into());
19933 self
19934 }
19935 pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
19937 self.object_type.as_mut().map(|field| field as _)
19938 }
19939 pub fn object_type_mut(&mut self) -> &mut String {
19942 self.object_type.get_or_insert_default()
19943 }
19944 pub fn object_type_opt(&self) -> Option<&str> {
19946 self.object_type.as_ref().map(|field| field as _)
19947 }
19948 pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
19950 self.object_type = Some(field.into().into());
19951 }
19952 pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
19954 self.set_object_type(field.into());
19955 self
19956 }
19957 }
19958 impl super::Upgrade {
19959 pub const fn const_default() -> Self {
19960 Self {
19961 modules: Vec::new(),
19962 dependencies: Vec::new(),
19963 package: None,
19964 ticket: None,
19965 }
19966 }
19967 #[doc(hidden)]
19968 pub fn default_instance() -> &'static Self {
19969 static DEFAULT: super::Upgrade = super::Upgrade::const_default();
19970 &DEFAULT
19971 }
19972 pub fn modules(&self) -> &[::prost::bytes::Bytes] {
19974 &self.modules
19975 }
19976 pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
19979 &mut self.modules
19980 }
19981 pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
19983 self.modules = field;
19984 }
19985 pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
19987 self.set_modules(field);
19988 self
19989 }
19990 pub fn dependencies(&self) -> &[String] {
19992 &self.dependencies
19993 }
19994 pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
19997 &mut self.dependencies
19998 }
19999 pub fn set_dependencies(&mut self, field: Vec<String>) {
20001 self.dependencies = field;
20002 }
20003 pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
20005 self.set_dependencies(field);
20006 self
20007 }
20008 pub fn package_opt_mut(&mut self) -> Option<&mut String> {
20010 self.package.as_mut().map(|field| field as _)
20011 }
20012 pub fn package_mut(&mut self) -> &mut String {
20015 self.package.get_or_insert_default()
20016 }
20017 pub fn package_opt(&self) -> Option<&str> {
20019 self.package.as_ref().map(|field| field as _)
20020 }
20021 pub fn set_package<T: Into<String>>(&mut self, field: T) {
20023 self.package = Some(field.into().into());
20024 }
20025 pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
20027 self.set_package(field.into());
20028 self
20029 }
20030 pub fn ticket(&self) -> &super::Argument {
20032 self.ticket
20033 .as_ref()
20034 .map(|field| field as _)
20035 .unwrap_or_else(|| super::Argument::default_instance() as _)
20036 }
20037 pub fn ticket_opt_mut(&mut self) -> Option<&mut super::Argument> {
20039 self.ticket.as_mut().map(|field| field as _)
20040 }
20041 pub fn ticket_mut(&mut self) -> &mut super::Argument {
20044 self.ticket.get_or_insert_default()
20045 }
20046 pub fn ticket_opt(&self) -> Option<&super::Argument> {
20048 self.ticket.as_ref().map(|field| field as _)
20049 }
20050 pub fn set_ticket<T: Into<super::Argument>>(&mut self, field: T) {
20052 self.ticket = Some(field.into().into());
20053 }
20054 pub fn with_ticket<T: Into<super::Argument>>(mut self, field: T) -> Self {
20056 self.set_ticket(field.into());
20057 self
20058 }
20059 }
20060 impl super::UserSignature {
20061 pub const fn const_default() -> Self {
20062 Self {
20063 bcs: None,
20064 scheme: None,
20065 signature: None,
20066 }
20067 }
20068 #[doc(hidden)]
20069 pub fn default_instance() -> &'static Self {
20070 static DEFAULT: super::UserSignature = super::UserSignature::const_default();
20071 &DEFAULT
20072 }
20073 pub fn bcs(&self) -> &super::Bcs {
20075 self.bcs
20076 .as_ref()
20077 .map(|field| field as _)
20078 .unwrap_or_else(|| super::Bcs::default_instance() as _)
20079 }
20080 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
20082 self.bcs.as_mut().map(|field| field as _)
20083 }
20084 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
20087 self.bcs.get_or_insert_default()
20088 }
20089 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
20091 self.bcs.as_ref().map(|field| field as _)
20092 }
20093 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
20095 self.bcs = Some(field.into().into());
20096 }
20097 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
20099 self.set_bcs(field.into());
20100 self
20101 }
20102 pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
20104 self.set_scheme(field.into());
20105 self
20106 }
20107 pub fn simple(&self) -> &super::SimpleSignature {
20109 if let Some(super::user_signature::Signature::Simple(field)) = &self
20110 .signature
20111 {
20112 field as _
20113 } else {
20114 super::SimpleSignature::default_instance() as _
20115 }
20116 }
20117 pub fn simple_opt(&self) -> Option<&super::SimpleSignature> {
20119 if let Some(super::user_signature::Signature::Simple(field)) = &self
20120 .signature
20121 {
20122 Some(field as _)
20123 } else {
20124 None
20125 }
20126 }
20127 pub fn simple_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
20129 if let Some(super::user_signature::Signature::Simple(field)) = &mut self
20130 .signature
20131 {
20132 Some(field as _)
20133 } else {
20134 None
20135 }
20136 }
20137 pub fn simple_mut(&mut self) -> &mut super::SimpleSignature {
20141 if self.simple_opt_mut().is_none() {
20142 self.signature = Some(
20143 super::user_signature::Signature::Simple(
20144 super::SimpleSignature::default(),
20145 ),
20146 );
20147 }
20148 self.simple_opt_mut().unwrap()
20149 }
20150 pub fn set_simple<T: Into<super::SimpleSignature>>(&mut self, field: T) {
20153 self.signature = Some(
20154 super::user_signature::Signature::Simple(field.into().into()),
20155 );
20156 }
20157 pub fn with_simple<T: Into<super::SimpleSignature>>(mut self, field: T) -> Self {
20160 self.set_simple(field.into());
20161 self
20162 }
20163 pub fn multisig(&self) -> &super::MultisigAggregatedSignature {
20165 if let Some(super::user_signature::Signature::Multisig(field)) = &self
20166 .signature
20167 {
20168 field as _
20169 } else {
20170 super::MultisigAggregatedSignature::default_instance() as _
20171 }
20172 }
20173 pub fn multisig_opt(&self) -> Option<&super::MultisigAggregatedSignature> {
20175 if let Some(super::user_signature::Signature::Multisig(field)) = &self
20176 .signature
20177 {
20178 Some(field as _)
20179 } else {
20180 None
20181 }
20182 }
20183 pub fn multisig_opt_mut(
20185 &mut self,
20186 ) -> Option<&mut super::MultisigAggregatedSignature> {
20187 if let Some(super::user_signature::Signature::Multisig(field)) = &mut self
20188 .signature
20189 {
20190 Some(field as _)
20191 } else {
20192 None
20193 }
20194 }
20195 pub fn multisig_mut(&mut self) -> &mut super::MultisigAggregatedSignature {
20199 if self.multisig_opt_mut().is_none() {
20200 self.signature = Some(
20201 super::user_signature::Signature::Multisig(
20202 super::MultisigAggregatedSignature::default(),
20203 ),
20204 );
20205 }
20206 self.multisig_opt_mut().unwrap()
20207 }
20208 pub fn set_multisig<T: Into<super::MultisigAggregatedSignature>>(
20211 &mut self,
20212 field: T,
20213 ) {
20214 self.signature = Some(
20215 super::user_signature::Signature::Multisig(field.into().into()),
20216 );
20217 }
20218 pub fn with_multisig<T: Into<super::MultisigAggregatedSignature>>(
20221 mut self,
20222 field: T,
20223 ) -> Self {
20224 self.set_multisig(field.into());
20225 self
20226 }
20227 pub fn zklogin(&self) -> &super::ZkLoginAuthenticator {
20229 if let Some(super::user_signature::Signature::Zklogin(field)) = &self
20230 .signature
20231 {
20232 field as _
20233 } else {
20234 super::ZkLoginAuthenticator::default_instance() as _
20235 }
20236 }
20237 pub fn zklogin_opt(&self) -> Option<&super::ZkLoginAuthenticator> {
20239 if let Some(super::user_signature::Signature::Zklogin(field)) = &self
20240 .signature
20241 {
20242 Some(field as _)
20243 } else {
20244 None
20245 }
20246 }
20247 pub fn zklogin_opt_mut(&mut self) -> Option<&mut super::ZkLoginAuthenticator> {
20249 if let Some(super::user_signature::Signature::Zklogin(field)) = &mut self
20250 .signature
20251 {
20252 Some(field as _)
20253 } else {
20254 None
20255 }
20256 }
20257 pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginAuthenticator {
20261 if self.zklogin_opt_mut().is_none() {
20262 self.signature = Some(
20263 super::user_signature::Signature::Zklogin(
20264 super::ZkLoginAuthenticator::default(),
20265 ),
20266 );
20267 }
20268 self.zklogin_opt_mut().unwrap()
20269 }
20270 pub fn set_zklogin<T: Into<super::ZkLoginAuthenticator>>(&mut self, field: T) {
20273 self.signature = Some(
20274 super::user_signature::Signature::Zklogin(field.into().into()),
20275 );
20276 }
20277 pub fn with_zklogin<T: Into<super::ZkLoginAuthenticator>>(
20280 mut self,
20281 field: T,
20282 ) -> Self {
20283 self.set_zklogin(field.into());
20284 self
20285 }
20286 pub fn passkey(&self) -> &super::PasskeyAuthenticator {
20288 if let Some(super::user_signature::Signature::Passkey(field)) = &self
20289 .signature
20290 {
20291 field as _
20292 } else {
20293 super::PasskeyAuthenticator::default_instance() as _
20294 }
20295 }
20296 pub fn passkey_opt(&self) -> Option<&super::PasskeyAuthenticator> {
20298 if let Some(super::user_signature::Signature::Passkey(field)) = &self
20299 .signature
20300 {
20301 Some(field as _)
20302 } else {
20303 None
20304 }
20305 }
20306 pub fn passkey_opt_mut(&mut self) -> Option<&mut super::PasskeyAuthenticator> {
20308 if let Some(super::user_signature::Signature::Passkey(field)) = &mut self
20309 .signature
20310 {
20311 Some(field as _)
20312 } else {
20313 None
20314 }
20315 }
20316 pub fn passkey_mut(&mut self) -> &mut super::PasskeyAuthenticator {
20320 if self.passkey_opt_mut().is_none() {
20321 self.signature = Some(
20322 super::user_signature::Signature::Passkey(
20323 super::PasskeyAuthenticator::default(),
20324 ),
20325 );
20326 }
20327 self.passkey_opt_mut().unwrap()
20328 }
20329 pub fn set_passkey<T: Into<super::PasskeyAuthenticator>>(&mut self, field: T) {
20332 self.signature = Some(
20333 super::user_signature::Signature::Passkey(field.into().into()),
20334 );
20335 }
20336 pub fn with_passkey<T: Into<super::PasskeyAuthenticator>>(
20339 mut self,
20340 field: T,
20341 ) -> Self {
20342 self.set_passkey(field.into());
20343 self
20344 }
20345 }
20346 impl super::Validator {
20347 pub const fn const_default() -> Self {
20348 Self {
20349 name: None,
20350 address: None,
20351 description: None,
20352 image_url: None,
20353 project_url: None,
20354 protocol_public_key: None,
20355 proof_of_possession: None,
20356 network_public_key: None,
20357 worker_public_key: None,
20358 network_address: None,
20359 p2p_address: None,
20360 primary_address: None,
20361 worker_address: None,
20362 next_epoch_protocol_public_key: None,
20363 next_epoch_proof_of_possession: None,
20364 next_epoch_network_public_key: None,
20365 next_epoch_worker_public_key: None,
20366 next_epoch_network_address: None,
20367 next_epoch_p2p_address: None,
20368 next_epoch_primary_address: None,
20369 next_epoch_worker_address: None,
20370 metadata_extra_fields: None,
20371 voting_power: None,
20372 operation_cap_id: None,
20373 gas_price: None,
20374 staking_pool: None,
20375 commission_rate: None,
20376 next_epoch_stake: None,
20377 next_epoch_gas_price: None,
20378 next_epoch_commission_rate: None,
20379 extra_fields: None,
20380 }
20381 }
20382 #[doc(hidden)]
20383 pub fn default_instance() -> &'static Self {
20384 static DEFAULT: super::Validator = super::Validator::const_default();
20385 &DEFAULT
20386 }
20387 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
20389 self.name.as_mut().map(|field| field as _)
20390 }
20391 pub fn name_mut(&mut self) -> &mut String {
20394 self.name.get_or_insert_default()
20395 }
20396 pub fn name_opt(&self) -> Option<&str> {
20398 self.name.as_ref().map(|field| field as _)
20399 }
20400 pub fn set_name<T: Into<String>>(&mut self, field: T) {
20402 self.name = Some(field.into().into());
20403 }
20404 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
20406 self.set_name(field.into());
20407 self
20408 }
20409 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
20411 self.address.as_mut().map(|field| field as _)
20412 }
20413 pub fn address_mut(&mut self) -> &mut String {
20416 self.address.get_or_insert_default()
20417 }
20418 pub fn address_opt(&self) -> Option<&str> {
20420 self.address.as_ref().map(|field| field as _)
20421 }
20422 pub fn set_address<T: Into<String>>(&mut self, field: T) {
20424 self.address = Some(field.into().into());
20425 }
20426 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
20428 self.set_address(field.into());
20429 self
20430 }
20431 pub fn description_opt_mut(&mut self) -> Option<&mut String> {
20433 self.description.as_mut().map(|field| field as _)
20434 }
20435 pub fn description_mut(&mut self) -> &mut String {
20438 self.description.get_or_insert_default()
20439 }
20440 pub fn description_opt(&self) -> Option<&str> {
20442 self.description.as_ref().map(|field| field as _)
20443 }
20444 pub fn set_description<T: Into<String>>(&mut self, field: T) {
20446 self.description = Some(field.into().into());
20447 }
20448 pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
20450 self.set_description(field.into());
20451 self
20452 }
20453 pub fn image_url_opt_mut(&mut self) -> Option<&mut String> {
20455 self.image_url.as_mut().map(|field| field as _)
20456 }
20457 pub fn image_url_mut(&mut self) -> &mut String {
20460 self.image_url.get_or_insert_default()
20461 }
20462 pub fn image_url_opt(&self) -> Option<&str> {
20464 self.image_url.as_ref().map(|field| field as _)
20465 }
20466 pub fn set_image_url<T: Into<String>>(&mut self, field: T) {
20468 self.image_url = Some(field.into().into());
20469 }
20470 pub fn with_image_url<T: Into<String>>(mut self, field: T) -> Self {
20472 self.set_image_url(field.into());
20473 self
20474 }
20475 pub fn project_url_opt_mut(&mut self) -> Option<&mut String> {
20477 self.project_url.as_mut().map(|field| field as _)
20478 }
20479 pub fn project_url_mut(&mut self) -> &mut String {
20482 self.project_url.get_or_insert_default()
20483 }
20484 pub fn project_url_opt(&self) -> Option<&str> {
20486 self.project_url.as_ref().map(|field| field as _)
20487 }
20488 pub fn set_project_url<T: Into<String>>(&mut self, field: T) {
20490 self.project_url = Some(field.into().into());
20491 }
20492 pub fn with_project_url<T: Into<String>>(mut self, field: T) -> Self {
20494 self.set_project_url(field.into());
20495 self
20496 }
20497 pub fn protocol_public_key_opt(&self) -> Option<&[u8]> {
20499 self.protocol_public_key.as_ref().map(|field| field as _)
20500 }
20501 pub fn set_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
20503 &mut self,
20504 field: T,
20505 ) {
20506 self.protocol_public_key = Some(field.into().into());
20507 }
20508 pub fn with_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
20510 mut self,
20511 field: T,
20512 ) -> Self {
20513 self.set_protocol_public_key(field.into());
20514 self
20515 }
20516 pub fn proof_of_possession_opt(&self) -> Option<&[u8]> {
20518 self.proof_of_possession.as_ref().map(|field| field as _)
20519 }
20520 pub fn set_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
20522 &mut self,
20523 field: T,
20524 ) {
20525 self.proof_of_possession = Some(field.into().into());
20526 }
20527 pub fn with_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
20529 mut self,
20530 field: T,
20531 ) -> Self {
20532 self.set_proof_of_possession(field.into());
20533 self
20534 }
20535 pub fn network_public_key_opt(&self) -> Option<&[u8]> {
20537 self.network_public_key.as_ref().map(|field| field as _)
20538 }
20539 pub fn set_network_public_key<T: Into<::prost::bytes::Bytes>>(
20541 &mut self,
20542 field: T,
20543 ) {
20544 self.network_public_key = Some(field.into().into());
20545 }
20546 pub fn with_network_public_key<T: Into<::prost::bytes::Bytes>>(
20548 mut self,
20549 field: T,
20550 ) -> Self {
20551 self.set_network_public_key(field.into());
20552 self
20553 }
20554 pub fn worker_public_key_opt(&self) -> Option<&[u8]> {
20556 self.worker_public_key.as_ref().map(|field| field as _)
20557 }
20558 pub fn set_worker_public_key<T: Into<::prost::bytes::Bytes>>(
20560 &mut self,
20561 field: T,
20562 ) {
20563 self.worker_public_key = Some(field.into().into());
20564 }
20565 pub fn with_worker_public_key<T: Into<::prost::bytes::Bytes>>(
20567 mut self,
20568 field: T,
20569 ) -> Self {
20570 self.set_worker_public_key(field.into());
20571 self
20572 }
20573 pub fn network_address_opt_mut(&mut self) -> Option<&mut String> {
20575 self.network_address.as_mut().map(|field| field as _)
20576 }
20577 pub fn network_address_mut(&mut self) -> &mut String {
20580 self.network_address.get_or_insert_default()
20581 }
20582 pub fn network_address_opt(&self) -> Option<&str> {
20584 self.network_address.as_ref().map(|field| field as _)
20585 }
20586 pub fn set_network_address<T: Into<String>>(&mut self, field: T) {
20588 self.network_address = Some(field.into().into());
20589 }
20590 pub fn with_network_address<T: Into<String>>(mut self, field: T) -> Self {
20592 self.set_network_address(field.into());
20593 self
20594 }
20595 pub fn p2p_address_opt_mut(&mut self) -> Option<&mut String> {
20597 self.p2p_address.as_mut().map(|field| field as _)
20598 }
20599 pub fn p2p_address_mut(&mut self) -> &mut String {
20602 self.p2p_address.get_or_insert_default()
20603 }
20604 pub fn p2p_address_opt(&self) -> Option<&str> {
20606 self.p2p_address.as_ref().map(|field| field as _)
20607 }
20608 pub fn set_p2p_address<T: Into<String>>(&mut self, field: T) {
20610 self.p2p_address = Some(field.into().into());
20611 }
20612 pub fn with_p2p_address<T: Into<String>>(mut self, field: T) -> Self {
20614 self.set_p2p_address(field.into());
20615 self
20616 }
20617 pub fn primary_address_opt_mut(&mut self) -> Option<&mut String> {
20619 self.primary_address.as_mut().map(|field| field as _)
20620 }
20621 pub fn primary_address_mut(&mut self) -> &mut String {
20624 self.primary_address.get_or_insert_default()
20625 }
20626 pub fn primary_address_opt(&self) -> Option<&str> {
20628 self.primary_address.as_ref().map(|field| field as _)
20629 }
20630 pub fn set_primary_address<T: Into<String>>(&mut self, field: T) {
20632 self.primary_address = Some(field.into().into());
20633 }
20634 pub fn with_primary_address<T: Into<String>>(mut self, field: T) -> Self {
20636 self.set_primary_address(field.into());
20637 self
20638 }
20639 pub fn worker_address_opt_mut(&mut self) -> Option<&mut String> {
20641 self.worker_address.as_mut().map(|field| field as _)
20642 }
20643 pub fn worker_address_mut(&mut self) -> &mut String {
20646 self.worker_address.get_or_insert_default()
20647 }
20648 pub fn worker_address_opt(&self) -> Option<&str> {
20650 self.worker_address.as_ref().map(|field| field as _)
20651 }
20652 pub fn set_worker_address<T: Into<String>>(&mut self, field: T) {
20654 self.worker_address = Some(field.into().into());
20655 }
20656 pub fn with_worker_address<T: Into<String>>(mut self, field: T) -> Self {
20658 self.set_worker_address(field.into());
20659 self
20660 }
20661 pub fn next_epoch_protocol_public_key_opt(&self) -> Option<&[u8]> {
20663 self.next_epoch_protocol_public_key.as_ref().map(|field| field as _)
20664 }
20665 pub fn set_next_epoch_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
20667 &mut self,
20668 field: T,
20669 ) {
20670 self.next_epoch_protocol_public_key = Some(field.into().into());
20671 }
20672 pub fn with_next_epoch_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
20674 mut self,
20675 field: T,
20676 ) -> Self {
20677 self.set_next_epoch_protocol_public_key(field.into());
20678 self
20679 }
20680 pub fn next_epoch_proof_of_possession_opt(&self) -> Option<&[u8]> {
20682 self.next_epoch_proof_of_possession.as_ref().map(|field| field as _)
20683 }
20684 pub fn set_next_epoch_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
20686 &mut self,
20687 field: T,
20688 ) {
20689 self.next_epoch_proof_of_possession = Some(field.into().into());
20690 }
20691 pub fn with_next_epoch_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
20693 mut self,
20694 field: T,
20695 ) -> Self {
20696 self.set_next_epoch_proof_of_possession(field.into());
20697 self
20698 }
20699 pub fn next_epoch_network_public_key_opt(&self) -> Option<&[u8]> {
20701 self.next_epoch_network_public_key.as_ref().map(|field| field as _)
20702 }
20703 pub fn set_next_epoch_network_public_key<T: Into<::prost::bytes::Bytes>>(
20705 &mut self,
20706 field: T,
20707 ) {
20708 self.next_epoch_network_public_key = Some(field.into().into());
20709 }
20710 pub fn with_next_epoch_network_public_key<T: Into<::prost::bytes::Bytes>>(
20712 mut self,
20713 field: T,
20714 ) -> Self {
20715 self.set_next_epoch_network_public_key(field.into());
20716 self
20717 }
20718 pub fn next_epoch_worker_public_key_opt(&self) -> Option<&[u8]> {
20720 self.next_epoch_worker_public_key.as_ref().map(|field| field as _)
20721 }
20722 pub fn set_next_epoch_worker_public_key<T: Into<::prost::bytes::Bytes>>(
20724 &mut self,
20725 field: T,
20726 ) {
20727 self.next_epoch_worker_public_key = Some(field.into().into());
20728 }
20729 pub fn with_next_epoch_worker_public_key<T: Into<::prost::bytes::Bytes>>(
20731 mut self,
20732 field: T,
20733 ) -> Self {
20734 self.set_next_epoch_worker_public_key(field.into());
20735 self
20736 }
20737 pub fn next_epoch_network_address_opt_mut(&mut self) -> Option<&mut String> {
20739 self.next_epoch_network_address.as_mut().map(|field| field as _)
20740 }
20741 pub fn next_epoch_network_address_mut(&mut self) -> &mut String {
20744 self.next_epoch_network_address.get_or_insert_default()
20745 }
20746 pub fn next_epoch_network_address_opt(&self) -> Option<&str> {
20748 self.next_epoch_network_address.as_ref().map(|field| field as _)
20749 }
20750 pub fn set_next_epoch_network_address<T: Into<String>>(&mut self, field: T) {
20752 self.next_epoch_network_address = Some(field.into().into());
20753 }
20754 pub fn with_next_epoch_network_address<T: Into<String>>(
20756 mut self,
20757 field: T,
20758 ) -> Self {
20759 self.set_next_epoch_network_address(field.into());
20760 self
20761 }
20762 pub fn next_epoch_p2p_address_opt_mut(&mut self) -> Option<&mut String> {
20764 self.next_epoch_p2p_address.as_mut().map(|field| field as _)
20765 }
20766 pub fn next_epoch_p2p_address_mut(&mut self) -> &mut String {
20769 self.next_epoch_p2p_address.get_or_insert_default()
20770 }
20771 pub fn next_epoch_p2p_address_opt(&self) -> Option<&str> {
20773 self.next_epoch_p2p_address.as_ref().map(|field| field as _)
20774 }
20775 pub fn set_next_epoch_p2p_address<T: Into<String>>(&mut self, field: T) {
20777 self.next_epoch_p2p_address = Some(field.into().into());
20778 }
20779 pub fn with_next_epoch_p2p_address<T: Into<String>>(mut self, field: T) -> Self {
20781 self.set_next_epoch_p2p_address(field.into());
20782 self
20783 }
20784 pub fn next_epoch_primary_address_opt_mut(&mut self) -> Option<&mut String> {
20786 self.next_epoch_primary_address.as_mut().map(|field| field as _)
20787 }
20788 pub fn next_epoch_primary_address_mut(&mut self) -> &mut String {
20791 self.next_epoch_primary_address.get_or_insert_default()
20792 }
20793 pub fn next_epoch_primary_address_opt(&self) -> Option<&str> {
20795 self.next_epoch_primary_address.as_ref().map(|field| field as _)
20796 }
20797 pub fn set_next_epoch_primary_address<T: Into<String>>(&mut self, field: T) {
20799 self.next_epoch_primary_address = Some(field.into().into());
20800 }
20801 pub fn with_next_epoch_primary_address<T: Into<String>>(
20803 mut self,
20804 field: T,
20805 ) -> Self {
20806 self.set_next_epoch_primary_address(field.into());
20807 self
20808 }
20809 pub fn next_epoch_worker_address_opt_mut(&mut self) -> Option<&mut String> {
20811 self.next_epoch_worker_address.as_mut().map(|field| field as _)
20812 }
20813 pub fn next_epoch_worker_address_mut(&mut self) -> &mut String {
20816 self.next_epoch_worker_address.get_or_insert_default()
20817 }
20818 pub fn next_epoch_worker_address_opt(&self) -> Option<&str> {
20820 self.next_epoch_worker_address.as_ref().map(|field| field as _)
20821 }
20822 pub fn set_next_epoch_worker_address<T: Into<String>>(&mut self, field: T) {
20824 self.next_epoch_worker_address = Some(field.into().into());
20825 }
20826 pub fn with_next_epoch_worker_address<T: Into<String>>(
20828 mut self,
20829 field: T,
20830 ) -> Self {
20831 self.set_next_epoch_worker_address(field.into());
20832 self
20833 }
20834 pub fn metadata_extra_fields(&self) -> &super::MoveTable {
20836 self.metadata_extra_fields
20837 .as_ref()
20838 .map(|field| field as _)
20839 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
20840 }
20841 pub fn metadata_extra_fields_opt_mut(
20843 &mut self,
20844 ) -> Option<&mut super::MoveTable> {
20845 self.metadata_extra_fields.as_mut().map(|field| field as _)
20846 }
20847 pub fn metadata_extra_fields_mut(&mut self) -> &mut super::MoveTable {
20850 self.metadata_extra_fields.get_or_insert_default()
20851 }
20852 pub fn metadata_extra_fields_opt(&self) -> Option<&super::MoveTable> {
20854 self.metadata_extra_fields.as_ref().map(|field| field as _)
20855 }
20856 pub fn set_metadata_extra_fields<T: Into<super::MoveTable>>(
20858 &mut self,
20859 field: T,
20860 ) {
20861 self.metadata_extra_fields = Some(field.into().into());
20862 }
20863 pub fn with_metadata_extra_fields<T: Into<super::MoveTable>>(
20865 mut self,
20866 field: T,
20867 ) -> Self {
20868 self.set_metadata_extra_fields(field.into());
20869 self
20870 }
20871 pub fn voting_power_opt_mut(&mut self) -> Option<&mut u64> {
20873 self.voting_power.as_mut().map(|field| field as _)
20874 }
20875 pub fn voting_power_mut(&mut self) -> &mut u64 {
20878 self.voting_power.get_or_insert_default()
20879 }
20880 pub fn voting_power_opt(&self) -> Option<u64> {
20882 self.voting_power.as_ref().map(|field| *field)
20883 }
20884 pub fn set_voting_power(&mut self, field: u64) {
20886 self.voting_power = Some(field);
20887 }
20888 pub fn with_voting_power(mut self, field: u64) -> Self {
20890 self.set_voting_power(field);
20891 self
20892 }
20893 pub fn operation_cap_id_opt_mut(&mut self) -> Option<&mut String> {
20895 self.operation_cap_id.as_mut().map(|field| field as _)
20896 }
20897 pub fn operation_cap_id_mut(&mut self) -> &mut String {
20900 self.operation_cap_id.get_or_insert_default()
20901 }
20902 pub fn operation_cap_id_opt(&self) -> Option<&str> {
20904 self.operation_cap_id.as_ref().map(|field| field as _)
20905 }
20906 pub fn set_operation_cap_id<T: Into<String>>(&mut self, field: T) {
20908 self.operation_cap_id = Some(field.into().into());
20909 }
20910 pub fn with_operation_cap_id<T: Into<String>>(mut self, field: T) -> Self {
20912 self.set_operation_cap_id(field.into());
20913 self
20914 }
20915 pub fn gas_price_opt_mut(&mut self) -> Option<&mut u64> {
20917 self.gas_price.as_mut().map(|field| field as _)
20918 }
20919 pub fn gas_price_mut(&mut self) -> &mut u64 {
20922 self.gas_price.get_or_insert_default()
20923 }
20924 pub fn gas_price_opt(&self) -> Option<u64> {
20926 self.gas_price.as_ref().map(|field| *field)
20927 }
20928 pub fn set_gas_price(&mut self, field: u64) {
20930 self.gas_price = Some(field);
20931 }
20932 pub fn with_gas_price(mut self, field: u64) -> Self {
20934 self.set_gas_price(field);
20935 self
20936 }
20937 pub fn staking_pool(&self) -> &super::StakingPool {
20939 self.staking_pool
20940 .as_ref()
20941 .map(|field| field as _)
20942 .unwrap_or_else(|| super::StakingPool::default_instance() as _)
20943 }
20944 pub fn staking_pool_opt_mut(&mut self) -> Option<&mut super::StakingPool> {
20946 self.staking_pool.as_mut().map(|field| field as _)
20947 }
20948 pub fn staking_pool_mut(&mut self) -> &mut super::StakingPool {
20951 self.staking_pool.get_or_insert_default()
20952 }
20953 pub fn staking_pool_opt(&self) -> Option<&super::StakingPool> {
20955 self.staking_pool.as_ref().map(|field| field as _)
20956 }
20957 pub fn set_staking_pool<T: Into<super::StakingPool>>(&mut self, field: T) {
20959 self.staking_pool = Some(field.into().into());
20960 }
20961 pub fn with_staking_pool<T: Into<super::StakingPool>>(
20963 mut self,
20964 field: T,
20965 ) -> Self {
20966 self.set_staking_pool(field.into());
20967 self
20968 }
20969 pub fn commission_rate_opt_mut(&mut self) -> Option<&mut u64> {
20971 self.commission_rate.as_mut().map(|field| field as _)
20972 }
20973 pub fn commission_rate_mut(&mut self) -> &mut u64 {
20976 self.commission_rate.get_or_insert_default()
20977 }
20978 pub fn commission_rate_opt(&self) -> Option<u64> {
20980 self.commission_rate.as_ref().map(|field| *field)
20981 }
20982 pub fn set_commission_rate(&mut self, field: u64) {
20984 self.commission_rate = Some(field);
20985 }
20986 pub fn with_commission_rate(mut self, field: u64) -> Self {
20988 self.set_commission_rate(field);
20989 self
20990 }
20991 pub fn next_epoch_stake_opt_mut(&mut self) -> Option<&mut u64> {
20993 self.next_epoch_stake.as_mut().map(|field| field as _)
20994 }
20995 pub fn next_epoch_stake_mut(&mut self) -> &mut u64 {
20998 self.next_epoch_stake.get_or_insert_default()
20999 }
21000 pub fn next_epoch_stake_opt(&self) -> Option<u64> {
21002 self.next_epoch_stake.as_ref().map(|field| *field)
21003 }
21004 pub fn set_next_epoch_stake(&mut self, field: u64) {
21006 self.next_epoch_stake = Some(field);
21007 }
21008 pub fn with_next_epoch_stake(mut self, field: u64) -> Self {
21010 self.set_next_epoch_stake(field);
21011 self
21012 }
21013 pub fn next_epoch_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
21015 self.next_epoch_gas_price.as_mut().map(|field| field as _)
21016 }
21017 pub fn next_epoch_gas_price_mut(&mut self) -> &mut u64 {
21020 self.next_epoch_gas_price.get_or_insert_default()
21021 }
21022 pub fn next_epoch_gas_price_opt(&self) -> Option<u64> {
21024 self.next_epoch_gas_price.as_ref().map(|field| *field)
21025 }
21026 pub fn set_next_epoch_gas_price(&mut self, field: u64) {
21028 self.next_epoch_gas_price = Some(field);
21029 }
21030 pub fn with_next_epoch_gas_price(mut self, field: u64) -> Self {
21032 self.set_next_epoch_gas_price(field);
21033 self
21034 }
21035 pub fn next_epoch_commission_rate_opt_mut(&mut self) -> Option<&mut u64> {
21037 self.next_epoch_commission_rate.as_mut().map(|field| field as _)
21038 }
21039 pub fn next_epoch_commission_rate_mut(&mut self) -> &mut u64 {
21042 self.next_epoch_commission_rate.get_or_insert_default()
21043 }
21044 pub fn next_epoch_commission_rate_opt(&self) -> Option<u64> {
21046 self.next_epoch_commission_rate.as_ref().map(|field| *field)
21047 }
21048 pub fn set_next_epoch_commission_rate(&mut self, field: u64) {
21050 self.next_epoch_commission_rate = Some(field);
21051 }
21052 pub fn with_next_epoch_commission_rate(mut self, field: u64) -> Self {
21054 self.set_next_epoch_commission_rate(field);
21055 self
21056 }
21057 pub fn extra_fields(&self) -> &super::MoveTable {
21059 self.extra_fields
21060 .as_ref()
21061 .map(|field| field as _)
21062 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
21063 }
21064 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
21066 self.extra_fields.as_mut().map(|field| field as _)
21067 }
21068 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
21071 self.extra_fields.get_or_insert_default()
21072 }
21073 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
21075 self.extra_fields.as_ref().map(|field| field as _)
21076 }
21077 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
21079 self.extra_fields = Some(field.into().into());
21080 }
21081 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
21083 self.set_extra_fields(field.into());
21084 self
21085 }
21086 }
21087 impl super::ValidatorAggregatedSignature {
21088 pub const fn const_default() -> Self {
21089 Self {
21090 epoch: None,
21091 signature: None,
21092 bitmap: None,
21093 }
21094 }
21095 #[doc(hidden)]
21096 pub fn default_instance() -> &'static Self {
21097 static DEFAULT: super::ValidatorAggregatedSignature = super::ValidatorAggregatedSignature::const_default();
21098 &DEFAULT
21099 }
21100 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
21102 self.epoch.as_mut().map(|field| field as _)
21103 }
21104 pub fn epoch_mut(&mut self) -> &mut u64 {
21107 self.epoch.get_or_insert_default()
21108 }
21109 pub fn epoch_opt(&self) -> Option<u64> {
21111 self.epoch.as_ref().map(|field| *field)
21112 }
21113 pub fn set_epoch(&mut self, field: u64) {
21115 self.epoch = Some(field);
21116 }
21117 pub fn with_epoch(mut self, field: u64) -> Self {
21119 self.set_epoch(field);
21120 self
21121 }
21122 pub fn signature_opt(&self) -> Option<&[u8]> {
21124 self.signature.as_ref().map(|field| field as _)
21125 }
21126 pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
21128 self.signature = Some(field.into().into());
21129 }
21130 pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
21132 mut self,
21133 field: T,
21134 ) -> Self {
21135 self.set_signature(field.into());
21136 self
21137 }
21138 pub fn bitmap_opt(&self) -> Option<&[u8]> {
21140 self.bitmap.as_ref().map(|field| field as _)
21141 }
21142 pub fn set_bitmap<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
21144 self.bitmap = Some(field.into().into());
21145 }
21146 pub fn with_bitmap<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
21148 self.set_bitmap(field.into());
21149 self
21150 }
21151 }
21152 impl super::ValidatorCommittee {
21153 pub const fn const_default() -> Self {
21154 Self {
21155 epoch: None,
21156 members: Vec::new(),
21157 }
21158 }
21159 #[doc(hidden)]
21160 pub fn default_instance() -> &'static Self {
21161 static DEFAULT: super::ValidatorCommittee = super::ValidatorCommittee::const_default();
21162 &DEFAULT
21163 }
21164 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
21166 self.epoch.as_mut().map(|field| field as _)
21167 }
21168 pub fn epoch_mut(&mut self) -> &mut u64 {
21171 self.epoch.get_or_insert_default()
21172 }
21173 pub fn epoch_opt(&self) -> Option<u64> {
21175 self.epoch.as_ref().map(|field| *field)
21176 }
21177 pub fn set_epoch(&mut self, field: u64) {
21179 self.epoch = Some(field);
21180 }
21181 pub fn with_epoch(mut self, field: u64) -> Self {
21183 self.set_epoch(field);
21184 self
21185 }
21186 pub fn members(&self) -> &[super::ValidatorCommitteeMember] {
21188 &self.members
21189 }
21190 pub fn members_mut(&mut self) -> &mut Vec<super::ValidatorCommitteeMember> {
21193 &mut self.members
21194 }
21195 pub fn set_members(&mut self, field: Vec<super::ValidatorCommitteeMember>) {
21197 self.members = field;
21198 }
21199 pub fn with_members(
21201 mut self,
21202 field: Vec<super::ValidatorCommitteeMember>,
21203 ) -> Self {
21204 self.set_members(field);
21205 self
21206 }
21207 }
21208 impl super::ValidatorCommitteeMember {
21209 pub const fn const_default() -> Self {
21210 Self {
21211 public_key: None,
21212 weight: None,
21213 }
21214 }
21215 #[doc(hidden)]
21216 pub fn default_instance() -> &'static Self {
21217 static DEFAULT: super::ValidatorCommitteeMember = super::ValidatorCommitteeMember::const_default();
21218 &DEFAULT
21219 }
21220 pub fn public_key_opt(&self) -> Option<&[u8]> {
21222 self.public_key.as_ref().map(|field| field as _)
21223 }
21224 pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
21226 self.public_key = Some(field.into().into());
21227 }
21228 pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
21230 mut self,
21231 field: T,
21232 ) -> Self {
21233 self.set_public_key(field.into());
21234 self
21235 }
21236 pub fn weight_opt_mut(&mut self) -> Option<&mut u64> {
21238 self.weight.as_mut().map(|field| field as _)
21239 }
21240 pub fn weight_mut(&mut self) -> &mut u64 {
21243 self.weight.get_or_insert_default()
21244 }
21245 pub fn weight_opt(&self) -> Option<u64> {
21247 self.weight.as_ref().map(|field| *field)
21248 }
21249 pub fn set_weight(&mut self, field: u64) {
21251 self.weight = Some(field);
21252 }
21253 pub fn with_weight(mut self, field: u64) -> Self {
21255 self.set_weight(field);
21256 self
21257 }
21258 }
21259 impl super::ValidatorExecutionTimeObservation {
21260 pub const fn const_default() -> Self {
21261 Self {
21262 validator: None,
21263 duration: None,
21264 }
21265 }
21266 #[doc(hidden)]
21267 pub fn default_instance() -> &'static Self {
21268 static DEFAULT: super::ValidatorExecutionTimeObservation = super::ValidatorExecutionTimeObservation::const_default();
21269 &DEFAULT
21270 }
21271 pub fn validator_opt(&self) -> Option<&[u8]> {
21273 self.validator.as_ref().map(|field| field as _)
21274 }
21275 pub fn set_validator<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
21277 self.validator = Some(field.into().into());
21278 }
21279 pub fn with_validator<T: Into<::prost::bytes::Bytes>>(
21281 mut self,
21282 field: T,
21283 ) -> Self {
21284 self.set_validator(field.into());
21285 self
21286 }
21287 pub fn duration_opt_mut(&mut self) -> Option<&mut ::prost_types::Duration> {
21289 self.duration.as_mut().map(|field| field as _)
21290 }
21291 pub fn duration_mut(&mut self) -> &mut ::prost_types::Duration {
21294 self.duration.get_or_insert_default()
21295 }
21296 pub fn duration_opt(&self) -> Option<&::prost_types::Duration> {
21298 self.duration.as_ref().map(|field| field as _)
21299 }
21300 pub fn set_duration<T: Into<::prost_types::Duration>>(&mut self, field: T) {
21302 self.duration = Some(field.into().into());
21303 }
21304 pub fn with_duration<T: Into<::prost_types::Duration>>(
21306 mut self,
21307 field: T,
21308 ) -> Self {
21309 self.set_duration(field.into());
21310 self
21311 }
21312 }
21313 impl super::ValidatorReportRecord {
21314 pub const fn const_default() -> Self {
21315 Self {
21316 reported: None,
21317 reporters: Vec::new(),
21318 }
21319 }
21320 #[doc(hidden)]
21321 pub fn default_instance() -> &'static Self {
21322 static DEFAULT: super::ValidatorReportRecord = super::ValidatorReportRecord::const_default();
21323 &DEFAULT
21324 }
21325 pub fn reported_opt_mut(&mut self) -> Option<&mut String> {
21327 self.reported.as_mut().map(|field| field as _)
21328 }
21329 pub fn reported_mut(&mut self) -> &mut String {
21332 self.reported.get_or_insert_default()
21333 }
21334 pub fn reported_opt(&self) -> Option<&str> {
21336 self.reported.as_ref().map(|field| field as _)
21337 }
21338 pub fn set_reported<T: Into<String>>(&mut self, field: T) {
21340 self.reported = Some(field.into().into());
21341 }
21342 pub fn with_reported<T: Into<String>>(mut self, field: T) -> Self {
21344 self.set_reported(field.into());
21345 self
21346 }
21347 pub fn reporters(&self) -> &[String] {
21349 &self.reporters
21350 }
21351 pub fn reporters_mut(&mut self) -> &mut Vec<String> {
21354 &mut self.reporters
21355 }
21356 pub fn set_reporters(&mut self, field: Vec<String>) {
21358 self.reporters = field;
21359 }
21360 pub fn with_reporters(mut self, field: Vec<String>) -> Self {
21362 self.set_reporters(field);
21363 self
21364 }
21365 }
21366 impl super::ValidatorSet {
21367 pub const fn const_default() -> Self {
21368 Self {
21369 total_stake: None,
21370 active_validators: Vec::new(),
21371 pending_active_validators: None,
21372 pending_removals: Vec::new(),
21373 staking_pool_mappings: None,
21374 inactive_validators: None,
21375 validator_candidates: None,
21376 at_risk_validators: std::collections::BTreeMap::new(),
21377 extra_fields: None,
21378 }
21379 }
21380 #[doc(hidden)]
21381 pub fn default_instance() -> &'static Self {
21382 static DEFAULT: super::ValidatorSet = super::ValidatorSet::const_default();
21383 &DEFAULT
21384 }
21385 pub fn total_stake_opt_mut(&mut self) -> Option<&mut u64> {
21387 self.total_stake.as_mut().map(|field| field as _)
21388 }
21389 pub fn total_stake_mut(&mut self) -> &mut u64 {
21392 self.total_stake.get_or_insert_default()
21393 }
21394 pub fn total_stake_opt(&self) -> Option<u64> {
21396 self.total_stake.as_ref().map(|field| *field)
21397 }
21398 pub fn set_total_stake(&mut self, field: u64) {
21400 self.total_stake = Some(field);
21401 }
21402 pub fn with_total_stake(mut self, field: u64) -> Self {
21404 self.set_total_stake(field);
21405 self
21406 }
21407 pub fn active_validators(&self) -> &[super::Validator] {
21409 &self.active_validators
21410 }
21411 pub fn active_validators_mut(&mut self) -> &mut Vec<super::Validator> {
21414 &mut self.active_validators
21415 }
21416 pub fn set_active_validators(&mut self, field: Vec<super::Validator>) {
21418 self.active_validators = field;
21419 }
21420 pub fn with_active_validators(mut self, field: Vec<super::Validator>) -> Self {
21422 self.set_active_validators(field);
21423 self
21424 }
21425 pub fn pending_active_validators(&self) -> &super::MoveTable {
21427 self.pending_active_validators
21428 .as_ref()
21429 .map(|field| field as _)
21430 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
21431 }
21432 pub fn pending_active_validators_opt_mut(
21434 &mut self,
21435 ) -> Option<&mut super::MoveTable> {
21436 self.pending_active_validators.as_mut().map(|field| field as _)
21437 }
21438 pub fn pending_active_validators_mut(&mut self) -> &mut super::MoveTable {
21441 self.pending_active_validators.get_or_insert_default()
21442 }
21443 pub fn pending_active_validators_opt(&self) -> Option<&super::MoveTable> {
21445 self.pending_active_validators.as_ref().map(|field| field as _)
21446 }
21447 pub fn set_pending_active_validators<T: Into<super::MoveTable>>(
21449 &mut self,
21450 field: T,
21451 ) {
21452 self.pending_active_validators = Some(field.into().into());
21453 }
21454 pub fn with_pending_active_validators<T: Into<super::MoveTable>>(
21456 mut self,
21457 field: T,
21458 ) -> Self {
21459 self.set_pending_active_validators(field.into());
21460 self
21461 }
21462 pub fn pending_removals(&self) -> &[u64] {
21464 &self.pending_removals
21465 }
21466 pub fn pending_removals_mut(&mut self) -> &mut Vec<u64> {
21469 &mut self.pending_removals
21470 }
21471 pub fn set_pending_removals(&mut self, field: Vec<u64>) {
21473 self.pending_removals = field;
21474 }
21475 pub fn with_pending_removals(mut self, field: Vec<u64>) -> Self {
21477 self.set_pending_removals(field);
21478 self
21479 }
21480 pub fn staking_pool_mappings(&self) -> &super::MoveTable {
21482 self.staking_pool_mappings
21483 .as_ref()
21484 .map(|field| field as _)
21485 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
21486 }
21487 pub fn staking_pool_mappings_opt_mut(
21489 &mut self,
21490 ) -> Option<&mut super::MoveTable> {
21491 self.staking_pool_mappings.as_mut().map(|field| field as _)
21492 }
21493 pub fn staking_pool_mappings_mut(&mut self) -> &mut super::MoveTable {
21496 self.staking_pool_mappings.get_or_insert_default()
21497 }
21498 pub fn staking_pool_mappings_opt(&self) -> Option<&super::MoveTable> {
21500 self.staking_pool_mappings.as_ref().map(|field| field as _)
21501 }
21502 pub fn set_staking_pool_mappings<T: Into<super::MoveTable>>(
21504 &mut self,
21505 field: T,
21506 ) {
21507 self.staking_pool_mappings = Some(field.into().into());
21508 }
21509 pub fn with_staking_pool_mappings<T: Into<super::MoveTable>>(
21511 mut self,
21512 field: T,
21513 ) -> Self {
21514 self.set_staking_pool_mappings(field.into());
21515 self
21516 }
21517 pub fn inactive_validators(&self) -> &super::MoveTable {
21519 self.inactive_validators
21520 .as_ref()
21521 .map(|field| field as _)
21522 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
21523 }
21524 pub fn inactive_validators_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
21526 self.inactive_validators.as_mut().map(|field| field as _)
21527 }
21528 pub fn inactive_validators_mut(&mut self) -> &mut super::MoveTable {
21531 self.inactive_validators.get_or_insert_default()
21532 }
21533 pub fn inactive_validators_opt(&self) -> Option<&super::MoveTable> {
21535 self.inactive_validators.as_ref().map(|field| field as _)
21536 }
21537 pub fn set_inactive_validators<T: Into<super::MoveTable>>(&mut self, field: T) {
21539 self.inactive_validators = Some(field.into().into());
21540 }
21541 pub fn with_inactive_validators<T: Into<super::MoveTable>>(
21543 mut self,
21544 field: T,
21545 ) -> Self {
21546 self.set_inactive_validators(field.into());
21547 self
21548 }
21549 pub fn validator_candidates(&self) -> &super::MoveTable {
21551 self.validator_candidates
21552 .as_ref()
21553 .map(|field| field as _)
21554 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
21555 }
21556 pub fn validator_candidates_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
21558 self.validator_candidates.as_mut().map(|field| field as _)
21559 }
21560 pub fn validator_candidates_mut(&mut self) -> &mut super::MoveTable {
21563 self.validator_candidates.get_or_insert_default()
21564 }
21565 pub fn validator_candidates_opt(&self) -> Option<&super::MoveTable> {
21567 self.validator_candidates.as_ref().map(|field| field as _)
21568 }
21569 pub fn set_validator_candidates<T: Into<super::MoveTable>>(&mut self, field: T) {
21571 self.validator_candidates = Some(field.into().into());
21572 }
21573 pub fn with_validator_candidates<T: Into<super::MoveTable>>(
21575 mut self,
21576 field: T,
21577 ) -> Self {
21578 self.set_validator_candidates(field.into());
21579 self
21580 }
21581 pub fn at_risk_validators(&self) -> &::std::collections::BTreeMap<String, u64> {
21583 &self.at_risk_validators
21584 }
21585 pub fn at_risk_validators_mut(
21588 &mut self,
21589 ) -> &mut ::std::collections::BTreeMap<String, u64> {
21590 &mut self.at_risk_validators
21591 }
21592 pub fn set_at_risk_validators(
21594 &mut self,
21595 field: ::std::collections::BTreeMap<String, u64>,
21596 ) {
21597 self.at_risk_validators = field;
21598 }
21599 pub fn with_at_risk_validators(
21601 mut self,
21602 field: ::std::collections::BTreeMap<String, u64>,
21603 ) -> Self {
21604 self.set_at_risk_validators(field);
21605 self
21606 }
21607 pub fn extra_fields(&self) -> &super::MoveTable {
21609 self.extra_fields
21610 .as_ref()
21611 .map(|field| field as _)
21612 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
21613 }
21614 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
21616 self.extra_fields.as_mut().map(|field| field as _)
21617 }
21618 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
21621 self.extra_fields.get_or_insert_default()
21622 }
21623 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
21625 self.extra_fields.as_ref().map(|field| field as _)
21626 }
21627 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
21629 self.extra_fields = Some(field.into().into());
21630 }
21631 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
21633 self.set_extra_fields(field.into());
21634 self
21635 }
21636 }
21637 impl super::VariantDescriptor {
21638 pub const fn const_default() -> Self {
21639 Self {
21640 name: None,
21641 position: None,
21642 fields: Vec::new(),
21643 }
21644 }
21645 #[doc(hidden)]
21646 pub fn default_instance() -> &'static Self {
21647 static DEFAULT: super::VariantDescriptor = super::VariantDescriptor::const_default();
21648 &DEFAULT
21649 }
21650 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
21652 self.name.as_mut().map(|field| field as _)
21653 }
21654 pub fn name_mut(&mut self) -> &mut String {
21657 self.name.get_or_insert_default()
21658 }
21659 pub fn name_opt(&self) -> Option<&str> {
21661 self.name.as_ref().map(|field| field as _)
21662 }
21663 pub fn set_name<T: Into<String>>(&mut self, field: T) {
21665 self.name = Some(field.into().into());
21666 }
21667 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
21669 self.set_name(field.into());
21670 self
21671 }
21672 pub fn position_opt_mut(&mut self) -> Option<&mut u32> {
21674 self.position.as_mut().map(|field| field as _)
21675 }
21676 pub fn position_mut(&mut self) -> &mut u32 {
21679 self.position.get_or_insert_default()
21680 }
21681 pub fn position_opt(&self) -> Option<u32> {
21683 self.position.as_ref().map(|field| *field)
21684 }
21685 pub fn set_position(&mut self, field: u32) {
21687 self.position = Some(field);
21688 }
21689 pub fn with_position(mut self, field: u32) -> Self {
21691 self.set_position(field);
21692 self
21693 }
21694 pub fn fields(&self) -> &[super::FieldDescriptor] {
21696 &self.fields
21697 }
21698 pub fn fields_mut(&mut self) -> &mut Vec<super::FieldDescriptor> {
21701 &mut self.fields
21702 }
21703 pub fn set_fields(&mut self, field: Vec<super::FieldDescriptor>) {
21705 self.fields = field;
21706 }
21707 pub fn with_fields(mut self, field: Vec<super::FieldDescriptor>) -> Self {
21709 self.set_fields(field);
21710 self
21711 }
21712 }
21713 impl super::VerifySignatureRequest {
21714 pub const fn const_default() -> Self {
21715 Self {
21716 message: None,
21717 signature: None,
21718 address: None,
21719 jwks: Vec::new(),
21720 check_address_aliases: None,
21721 }
21722 }
21723 #[doc(hidden)]
21724 pub fn default_instance() -> &'static Self {
21725 static DEFAULT: super::VerifySignatureRequest = super::VerifySignatureRequest::const_default();
21726 &DEFAULT
21727 }
21728 pub fn message(&self) -> &super::Bcs {
21730 self.message
21731 .as_ref()
21732 .map(|field| field as _)
21733 .unwrap_or_else(|| super::Bcs::default_instance() as _)
21734 }
21735 pub fn message_opt_mut(&mut self) -> Option<&mut super::Bcs> {
21737 self.message.as_mut().map(|field| field as _)
21738 }
21739 pub fn message_mut(&mut self) -> &mut super::Bcs {
21742 self.message.get_or_insert_default()
21743 }
21744 pub fn message_opt(&self) -> Option<&super::Bcs> {
21746 self.message.as_ref().map(|field| field as _)
21747 }
21748 pub fn set_message<T: Into<super::Bcs>>(&mut self, field: T) {
21750 self.message = Some(field.into().into());
21751 }
21752 pub fn with_message<T: Into<super::Bcs>>(mut self, field: T) -> Self {
21754 self.set_message(field.into());
21755 self
21756 }
21757 pub fn signature(&self) -> &super::UserSignature {
21759 self.signature
21760 .as_ref()
21761 .map(|field| field as _)
21762 .unwrap_or_else(|| super::UserSignature::default_instance() as _)
21763 }
21764 pub fn signature_opt_mut(&mut self) -> Option<&mut super::UserSignature> {
21766 self.signature.as_mut().map(|field| field as _)
21767 }
21768 pub fn signature_mut(&mut self) -> &mut super::UserSignature {
21771 self.signature.get_or_insert_default()
21772 }
21773 pub fn signature_opt(&self) -> Option<&super::UserSignature> {
21775 self.signature.as_ref().map(|field| field as _)
21776 }
21777 pub fn set_signature<T: Into<super::UserSignature>>(&mut self, field: T) {
21779 self.signature = Some(field.into().into());
21780 }
21781 pub fn with_signature<T: Into<super::UserSignature>>(
21783 mut self,
21784 field: T,
21785 ) -> Self {
21786 self.set_signature(field.into());
21787 self
21788 }
21789 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
21791 self.address.as_mut().map(|field| field as _)
21792 }
21793 pub fn address_mut(&mut self) -> &mut String {
21796 self.address.get_or_insert_default()
21797 }
21798 pub fn address_opt(&self) -> Option<&str> {
21800 self.address.as_ref().map(|field| field as _)
21801 }
21802 pub fn set_address<T: Into<String>>(&mut self, field: T) {
21804 self.address = Some(field.into().into());
21805 }
21806 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
21808 self.set_address(field.into());
21809 self
21810 }
21811 pub fn jwks(&self) -> &[super::ActiveJwk] {
21813 &self.jwks
21814 }
21815 pub fn jwks_mut(&mut self) -> &mut Vec<super::ActiveJwk> {
21818 &mut self.jwks
21819 }
21820 pub fn set_jwks(&mut self, field: Vec<super::ActiveJwk>) {
21822 self.jwks = field;
21823 }
21824 pub fn with_jwks(mut self, field: Vec<super::ActiveJwk>) -> Self {
21826 self.set_jwks(field);
21827 self
21828 }
21829 pub fn check_address_aliases_opt_mut(&mut self) -> Option<&mut bool> {
21831 self.check_address_aliases.as_mut().map(|field| field as _)
21832 }
21833 pub fn check_address_aliases_mut(&mut self) -> &mut bool {
21836 self.check_address_aliases.get_or_insert_default()
21837 }
21838 pub fn check_address_aliases_opt(&self) -> Option<bool> {
21840 self.check_address_aliases.as_ref().map(|field| *field)
21841 }
21842 pub fn set_check_address_aliases(&mut self, field: bool) {
21844 self.check_address_aliases = Some(field);
21845 }
21846 pub fn with_check_address_aliases(mut self, field: bool) -> Self {
21848 self.set_check_address_aliases(field);
21849 self
21850 }
21851 }
21852 impl super::VerifySignatureResponse {
21853 pub const fn const_default() -> Self {
21854 Self {
21855 is_valid: None,
21856 reason: None,
21857 address_aliases_checked: None,
21858 }
21859 }
21860 #[doc(hidden)]
21861 pub fn default_instance() -> &'static Self {
21862 static DEFAULT: super::VerifySignatureResponse = super::VerifySignatureResponse::const_default();
21863 &DEFAULT
21864 }
21865 pub fn is_valid_opt_mut(&mut self) -> Option<&mut bool> {
21867 self.is_valid.as_mut().map(|field| field as _)
21868 }
21869 pub fn is_valid_mut(&mut self) -> &mut bool {
21872 self.is_valid.get_or_insert_default()
21873 }
21874 pub fn is_valid_opt(&self) -> Option<bool> {
21876 self.is_valid.as_ref().map(|field| *field)
21877 }
21878 pub fn set_is_valid(&mut self, field: bool) {
21880 self.is_valid = Some(field);
21881 }
21882 pub fn with_is_valid(mut self, field: bool) -> Self {
21884 self.set_is_valid(field);
21885 self
21886 }
21887 pub fn reason_opt_mut(&mut self) -> Option<&mut String> {
21889 self.reason.as_mut().map(|field| field as _)
21890 }
21891 pub fn reason_mut(&mut self) -> &mut String {
21894 self.reason.get_or_insert_default()
21895 }
21896 pub fn reason_opt(&self) -> Option<&str> {
21898 self.reason.as_ref().map(|field| field as _)
21899 }
21900 pub fn set_reason<T: Into<String>>(&mut self, field: T) {
21902 self.reason = Some(field.into().into());
21903 }
21904 pub fn with_reason<T: Into<String>>(mut self, field: T) -> Self {
21906 self.set_reason(field.into());
21907 self
21908 }
21909 pub fn address_aliases_checked_opt_mut(&mut self) -> Option<&mut bool> {
21911 self.address_aliases_checked.as_mut().map(|field| field as _)
21912 }
21913 pub fn address_aliases_checked_mut(&mut self) -> &mut bool {
21916 self.address_aliases_checked.get_or_insert_default()
21917 }
21918 pub fn address_aliases_checked_opt(&self) -> Option<bool> {
21920 self.address_aliases_checked.as_ref().map(|field| *field)
21921 }
21922 pub fn set_address_aliases_checked(&mut self, field: bool) {
21924 self.address_aliases_checked = Some(field);
21925 }
21926 pub fn with_address_aliases_checked(mut self, field: bool) -> Self {
21928 self.set_address_aliases_checked(field);
21929 self
21930 }
21931 }
21932 impl super::VersionAssignment {
21933 pub const fn const_default() -> Self {
21934 Self {
21935 object_id: None,
21936 start_version: None,
21937 version: None,
21938 }
21939 }
21940 #[doc(hidden)]
21941 pub fn default_instance() -> &'static Self {
21942 static DEFAULT: super::VersionAssignment = super::VersionAssignment::const_default();
21943 &DEFAULT
21944 }
21945 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
21947 self.object_id.as_mut().map(|field| field as _)
21948 }
21949 pub fn object_id_mut(&mut self) -> &mut String {
21952 self.object_id.get_or_insert_default()
21953 }
21954 pub fn object_id_opt(&self) -> Option<&str> {
21956 self.object_id.as_ref().map(|field| field as _)
21957 }
21958 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
21960 self.object_id = Some(field.into().into());
21961 }
21962 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
21964 self.set_object_id(field.into());
21965 self
21966 }
21967 pub fn start_version_opt_mut(&mut self) -> Option<&mut u64> {
21969 self.start_version.as_mut().map(|field| field as _)
21970 }
21971 pub fn start_version_mut(&mut self) -> &mut u64 {
21974 self.start_version.get_or_insert_default()
21975 }
21976 pub fn start_version_opt(&self) -> Option<u64> {
21978 self.start_version.as_ref().map(|field| *field)
21979 }
21980 pub fn set_start_version(&mut self, field: u64) {
21982 self.start_version = Some(field);
21983 }
21984 pub fn with_start_version(mut self, field: u64) -> Self {
21986 self.set_start_version(field);
21987 self
21988 }
21989 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
21991 self.version.as_mut().map(|field| field as _)
21992 }
21993 pub fn version_mut(&mut self) -> &mut u64 {
21996 self.version.get_or_insert_default()
21997 }
21998 pub fn version_opt(&self) -> Option<u64> {
22000 self.version.as_ref().map(|field| *field)
22001 }
22002 pub fn set_version(&mut self, field: u64) {
22004 self.version = Some(field);
22005 }
22006 pub fn with_version(mut self, field: u64) -> Self {
22008 self.set_version(field);
22009 self
22010 }
22011 }
22012 impl super::Watermark {
22013 pub const fn const_default() -> Self {
22014 Self {
22015 cursor: None,
22016 checkpoint: None,
22017 cursor_position: None,
22018 }
22019 }
22020 #[doc(hidden)]
22021 pub fn default_instance() -> &'static Self {
22022 static DEFAULT: super::Watermark = super::Watermark::const_default();
22023 &DEFAULT
22024 }
22025 pub fn cursor_opt(&self) -> Option<&[u8]> {
22027 self.cursor.as_ref().map(|field| field as _)
22028 }
22029 pub fn set_cursor<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
22031 self.cursor = Some(field.into().into());
22032 }
22033 pub fn with_cursor<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
22035 self.set_cursor(field.into());
22036 self
22037 }
22038 pub fn checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
22040 self.checkpoint.as_mut().map(|field| field as _)
22041 }
22042 pub fn checkpoint_mut(&mut self) -> &mut u64 {
22045 self.checkpoint.get_or_insert_default()
22046 }
22047 pub fn checkpoint_opt(&self) -> Option<u64> {
22049 self.checkpoint.as_ref().map(|field| *field)
22050 }
22051 pub fn set_checkpoint(&mut self, field: u64) {
22053 self.checkpoint = Some(field);
22054 }
22055 pub fn with_checkpoint(mut self, field: u64) -> Self {
22057 self.set_checkpoint(field);
22058 self
22059 }
22060 pub fn cursor_position(&self) -> &super::LedgerPosition {
22062 self.cursor_position
22063 .as_ref()
22064 .map(|field| field as _)
22065 .unwrap_or_else(|| super::LedgerPosition::default_instance() as _)
22066 }
22067 pub fn cursor_position_opt_mut(&mut self) -> Option<&mut super::LedgerPosition> {
22069 self.cursor_position.as_mut().map(|field| field as _)
22070 }
22071 pub fn cursor_position_mut(&mut self) -> &mut super::LedgerPosition {
22074 self.cursor_position.get_or_insert_default()
22075 }
22076 pub fn cursor_position_opt(&self) -> Option<&super::LedgerPosition> {
22078 self.cursor_position.as_ref().map(|field| field as _)
22079 }
22080 pub fn set_cursor_position<T: Into<super::LedgerPosition>>(&mut self, field: T) {
22082 self.cursor_position = Some(field.into().into());
22083 }
22084 pub fn with_cursor_position<T: Into<super::LedgerPosition>>(
22086 mut self,
22087 field: T,
22088 ) -> Self {
22089 self.set_cursor_position(field.into());
22090 self
22091 }
22092 }
22093 impl super::ZkLoginAuthenticator {
22094 pub const fn const_default() -> Self {
22095 Self {
22096 inputs: None,
22097 max_epoch: None,
22098 signature: None,
22099 public_identifier: None,
22100 jwk_id: None,
22101 }
22102 }
22103 #[doc(hidden)]
22104 pub fn default_instance() -> &'static Self {
22105 static DEFAULT: super::ZkLoginAuthenticator = super::ZkLoginAuthenticator::const_default();
22106 &DEFAULT
22107 }
22108 pub fn inputs(&self) -> &super::ZkLoginInputs {
22110 self.inputs
22111 .as_ref()
22112 .map(|field| field as _)
22113 .unwrap_or_else(|| super::ZkLoginInputs::default_instance() as _)
22114 }
22115 pub fn inputs_opt_mut(&mut self) -> Option<&mut super::ZkLoginInputs> {
22117 self.inputs.as_mut().map(|field| field as _)
22118 }
22119 pub fn inputs_mut(&mut self) -> &mut super::ZkLoginInputs {
22122 self.inputs.get_or_insert_default()
22123 }
22124 pub fn inputs_opt(&self) -> Option<&super::ZkLoginInputs> {
22126 self.inputs.as_ref().map(|field| field as _)
22127 }
22128 pub fn set_inputs<T: Into<super::ZkLoginInputs>>(&mut self, field: T) {
22130 self.inputs = Some(field.into().into());
22131 }
22132 pub fn with_inputs<T: Into<super::ZkLoginInputs>>(mut self, field: T) -> Self {
22134 self.set_inputs(field.into());
22135 self
22136 }
22137 pub fn max_epoch_opt_mut(&mut self) -> Option<&mut u64> {
22139 self.max_epoch.as_mut().map(|field| field as _)
22140 }
22141 pub fn max_epoch_mut(&mut self) -> &mut u64 {
22144 self.max_epoch.get_or_insert_default()
22145 }
22146 pub fn max_epoch_opt(&self) -> Option<u64> {
22148 self.max_epoch.as_ref().map(|field| *field)
22149 }
22150 pub fn set_max_epoch(&mut self, field: u64) {
22152 self.max_epoch = Some(field);
22153 }
22154 pub fn with_max_epoch(mut self, field: u64) -> Self {
22156 self.set_max_epoch(field);
22157 self
22158 }
22159 pub fn signature(&self) -> &super::SimpleSignature {
22161 self.signature
22162 .as_ref()
22163 .map(|field| field as _)
22164 .unwrap_or_else(|| super::SimpleSignature::default_instance() as _)
22165 }
22166 pub fn signature_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
22168 self.signature.as_mut().map(|field| field as _)
22169 }
22170 pub fn signature_mut(&mut self) -> &mut super::SimpleSignature {
22173 self.signature.get_or_insert_default()
22174 }
22175 pub fn signature_opt(&self) -> Option<&super::SimpleSignature> {
22177 self.signature.as_ref().map(|field| field as _)
22178 }
22179 pub fn set_signature<T: Into<super::SimpleSignature>>(&mut self, field: T) {
22181 self.signature = Some(field.into().into());
22182 }
22183 pub fn with_signature<T: Into<super::SimpleSignature>>(
22185 mut self,
22186 field: T,
22187 ) -> Self {
22188 self.set_signature(field.into());
22189 self
22190 }
22191 pub fn public_identifier(&self) -> &super::ZkLoginPublicIdentifier {
22193 self.public_identifier
22194 .as_ref()
22195 .map(|field| field as _)
22196 .unwrap_or_else(|| {
22197 super::ZkLoginPublicIdentifier::default_instance() as _
22198 })
22199 }
22200 pub fn public_identifier_opt_mut(
22202 &mut self,
22203 ) -> Option<&mut super::ZkLoginPublicIdentifier> {
22204 self.public_identifier.as_mut().map(|field| field as _)
22205 }
22206 pub fn public_identifier_mut(&mut self) -> &mut super::ZkLoginPublicIdentifier {
22209 self.public_identifier.get_or_insert_default()
22210 }
22211 pub fn public_identifier_opt(&self) -> Option<&super::ZkLoginPublicIdentifier> {
22213 self.public_identifier.as_ref().map(|field| field as _)
22214 }
22215 pub fn set_public_identifier<T: Into<super::ZkLoginPublicIdentifier>>(
22217 &mut self,
22218 field: T,
22219 ) {
22220 self.public_identifier = Some(field.into().into());
22221 }
22222 pub fn with_public_identifier<T: Into<super::ZkLoginPublicIdentifier>>(
22224 mut self,
22225 field: T,
22226 ) -> Self {
22227 self.set_public_identifier(field.into());
22228 self
22229 }
22230 pub fn jwk_id(&self) -> &super::JwkId {
22232 self.jwk_id
22233 .as_ref()
22234 .map(|field| field as _)
22235 .unwrap_or_else(|| super::JwkId::default_instance() as _)
22236 }
22237 pub fn jwk_id_opt_mut(&mut self) -> Option<&mut super::JwkId> {
22239 self.jwk_id.as_mut().map(|field| field as _)
22240 }
22241 pub fn jwk_id_mut(&mut self) -> &mut super::JwkId {
22244 self.jwk_id.get_or_insert_default()
22245 }
22246 pub fn jwk_id_opt(&self) -> Option<&super::JwkId> {
22248 self.jwk_id.as_ref().map(|field| field as _)
22249 }
22250 pub fn set_jwk_id<T: Into<super::JwkId>>(&mut self, field: T) {
22252 self.jwk_id = Some(field.into().into());
22253 }
22254 pub fn with_jwk_id<T: Into<super::JwkId>>(mut self, field: T) -> Self {
22256 self.set_jwk_id(field.into());
22257 self
22258 }
22259 }
22260 impl super::ZkLoginClaim {
22261 pub const fn const_default() -> Self {
22262 Self {
22263 value: None,
22264 index_mod_4: None,
22265 }
22266 }
22267 #[doc(hidden)]
22268 pub fn default_instance() -> &'static Self {
22269 static DEFAULT: super::ZkLoginClaim = super::ZkLoginClaim::const_default();
22270 &DEFAULT
22271 }
22272 pub fn value_opt_mut(&mut self) -> Option<&mut String> {
22274 self.value.as_mut().map(|field| field as _)
22275 }
22276 pub fn value_mut(&mut self) -> &mut String {
22279 self.value.get_or_insert_default()
22280 }
22281 pub fn value_opt(&self) -> Option<&str> {
22283 self.value.as_ref().map(|field| field as _)
22284 }
22285 pub fn set_value<T: Into<String>>(&mut self, field: T) {
22287 self.value = Some(field.into().into());
22288 }
22289 pub fn with_value<T: Into<String>>(mut self, field: T) -> Self {
22291 self.set_value(field.into());
22292 self
22293 }
22294 pub fn index_mod_4_opt_mut(&mut self) -> Option<&mut u32> {
22296 self.index_mod_4.as_mut().map(|field| field as _)
22297 }
22298 pub fn index_mod_4_mut(&mut self) -> &mut u32 {
22301 self.index_mod_4.get_or_insert_default()
22302 }
22303 pub fn index_mod_4_opt(&self) -> Option<u32> {
22305 self.index_mod_4.as_ref().map(|field| *field)
22306 }
22307 pub fn set_index_mod_4(&mut self, field: u32) {
22309 self.index_mod_4 = Some(field);
22310 }
22311 pub fn with_index_mod_4(mut self, field: u32) -> Self {
22313 self.set_index_mod_4(field);
22314 self
22315 }
22316 }
22317 impl super::ZkLoginInputs {
22318 pub const fn const_default() -> Self {
22319 Self {
22320 proof_points: None,
22321 iss_base64_details: None,
22322 header_base64: None,
22323 address_seed: None,
22324 }
22325 }
22326 #[doc(hidden)]
22327 pub fn default_instance() -> &'static Self {
22328 static DEFAULT: super::ZkLoginInputs = super::ZkLoginInputs::const_default();
22329 &DEFAULT
22330 }
22331 pub fn proof_points(&self) -> &super::ZkLoginProof {
22333 self.proof_points
22334 .as_ref()
22335 .map(|field| field as _)
22336 .unwrap_or_else(|| super::ZkLoginProof::default_instance() as _)
22337 }
22338 pub fn proof_points_opt_mut(&mut self) -> Option<&mut super::ZkLoginProof> {
22340 self.proof_points.as_mut().map(|field| field as _)
22341 }
22342 pub fn proof_points_mut(&mut self) -> &mut super::ZkLoginProof {
22345 self.proof_points.get_or_insert_default()
22346 }
22347 pub fn proof_points_opt(&self) -> Option<&super::ZkLoginProof> {
22349 self.proof_points.as_ref().map(|field| field as _)
22350 }
22351 pub fn set_proof_points<T: Into<super::ZkLoginProof>>(&mut self, field: T) {
22353 self.proof_points = Some(field.into().into());
22354 }
22355 pub fn with_proof_points<T: Into<super::ZkLoginProof>>(
22357 mut self,
22358 field: T,
22359 ) -> Self {
22360 self.set_proof_points(field.into());
22361 self
22362 }
22363 pub fn iss_base64_details(&self) -> &super::ZkLoginClaim {
22365 self.iss_base64_details
22366 .as_ref()
22367 .map(|field| field as _)
22368 .unwrap_or_else(|| super::ZkLoginClaim::default_instance() as _)
22369 }
22370 pub fn iss_base64_details_opt_mut(
22372 &mut self,
22373 ) -> Option<&mut super::ZkLoginClaim> {
22374 self.iss_base64_details.as_mut().map(|field| field as _)
22375 }
22376 pub fn iss_base64_details_mut(&mut self) -> &mut super::ZkLoginClaim {
22379 self.iss_base64_details.get_or_insert_default()
22380 }
22381 pub fn iss_base64_details_opt(&self) -> Option<&super::ZkLoginClaim> {
22383 self.iss_base64_details.as_ref().map(|field| field as _)
22384 }
22385 pub fn set_iss_base64_details<T: Into<super::ZkLoginClaim>>(
22387 &mut self,
22388 field: T,
22389 ) {
22390 self.iss_base64_details = Some(field.into().into());
22391 }
22392 pub fn with_iss_base64_details<T: Into<super::ZkLoginClaim>>(
22394 mut self,
22395 field: T,
22396 ) -> Self {
22397 self.set_iss_base64_details(field.into());
22398 self
22399 }
22400 pub fn header_base64_opt_mut(&mut self) -> Option<&mut String> {
22402 self.header_base64.as_mut().map(|field| field as _)
22403 }
22404 pub fn header_base64_mut(&mut self) -> &mut String {
22407 self.header_base64.get_or_insert_default()
22408 }
22409 pub fn header_base64_opt(&self) -> Option<&str> {
22411 self.header_base64.as_ref().map(|field| field as _)
22412 }
22413 pub fn set_header_base64<T: Into<String>>(&mut self, field: T) {
22415 self.header_base64 = Some(field.into().into());
22416 }
22417 pub fn with_header_base64<T: Into<String>>(mut self, field: T) -> Self {
22419 self.set_header_base64(field.into());
22420 self
22421 }
22422 pub fn address_seed_opt_mut(&mut self) -> Option<&mut String> {
22424 self.address_seed.as_mut().map(|field| field as _)
22425 }
22426 pub fn address_seed_mut(&mut self) -> &mut String {
22429 self.address_seed.get_or_insert_default()
22430 }
22431 pub fn address_seed_opt(&self) -> Option<&str> {
22433 self.address_seed.as_ref().map(|field| field as _)
22434 }
22435 pub fn set_address_seed<T: Into<String>>(&mut self, field: T) {
22437 self.address_seed = Some(field.into().into());
22438 }
22439 pub fn with_address_seed<T: Into<String>>(mut self, field: T) -> Self {
22441 self.set_address_seed(field.into());
22442 self
22443 }
22444 }
22445 impl super::ZkLoginProof {
22446 pub const fn const_default() -> Self {
22447 Self { a: None, b: None, c: None }
22448 }
22449 #[doc(hidden)]
22450 pub fn default_instance() -> &'static Self {
22451 static DEFAULT: super::ZkLoginProof = super::ZkLoginProof::const_default();
22452 &DEFAULT
22453 }
22454 pub fn a(&self) -> &super::CircomG1 {
22456 self.a
22457 .as_ref()
22458 .map(|field| field as _)
22459 .unwrap_or_else(|| super::CircomG1::default_instance() as _)
22460 }
22461 pub fn a_opt_mut(&mut self) -> Option<&mut super::CircomG1> {
22463 self.a.as_mut().map(|field| field as _)
22464 }
22465 pub fn a_mut(&mut self) -> &mut super::CircomG1 {
22468 self.a.get_or_insert_default()
22469 }
22470 pub fn a_opt(&self) -> Option<&super::CircomG1> {
22472 self.a.as_ref().map(|field| field as _)
22473 }
22474 pub fn set_a<T: Into<super::CircomG1>>(&mut self, field: T) {
22476 self.a = Some(field.into().into());
22477 }
22478 pub fn with_a<T: Into<super::CircomG1>>(mut self, field: T) -> Self {
22480 self.set_a(field.into());
22481 self
22482 }
22483 pub fn b(&self) -> &super::CircomG2 {
22485 self.b
22486 .as_ref()
22487 .map(|field| field as _)
22488 .unwrap_or_else(|| super::CircomG2::default_instance() as _)
22489 }
22490 pub fn b_opt_mut(&mut self) -> Option<&mut super::CircomG2> {
22492 self.b.as_mut().map(|field| field as _)
22493 }
22494 pub fn b_mut(&mut self) -> &mut super::CircomG2 {
22497 self.b.get_or_insert_default()
22498 }
22499 pub fn b_opt(&self) -> Option<&super::CircomG2> {
22501 self.b.as_ref().map(|field| field as _)
22502 }
22503 pub fn set_b<T: Into<super::CircomG2>>(&mut self, field: T) {
22505 self.b = Some(field.into().into());
22506 }
22507 pub fn with_b<T: Into<super::CircomG2>>(mut self, field: T) -> Self {
22509 self.set_b(field.into());
22510 self
22511 }
22512 pub fn c(&self) -> &super::CircomG1 {
22514 self.c
22515 .as_ref()
22516 .map(|field| field as _)
22517 .unwrap_or_else(|| super::CircomG1::default_instance() as _)
22518 }
22519 pub fn c_opt_mut(&mut self) -> Option<&mut super::CircomG1> {
22521 self.c.as_mut().map(|field| field as _)
22522 }
22523 pub fn c_mut(&mut self) -> &mut super::CircomG1 {
22526 self.c.get_or_insert_default()
22527 }
22528 pub fn c_opt(&self) -> Option<&super::CircomG1> {
22530 self.c.as_ref().map(|field| field as _)
22531 }
22532 pub fn set_c<T: Into<super::CircomG1>>(&mut self, field: T) {
22534 self.c = Some(field.into().into());
22535 }
22536 pub fn with_c<T: Into<super::CircomG1>>(mut self, field: T) -> Self {
22538 self.set_c(field.into());
22539 self
22540 }
22541 }
22542 impl super::ZkLoginPublicIdentifier {
22543 pub const fn const_default() -> Self {
22544 Self {
22545 iss: None,
22546 address_seed: None,
22547 }
22548 }
22549 #[doc(hidden)]
22550 pub fn default_instance() -> &'static Self {
22551 static DEFAULT: super::ZkLoginPublicIdentifier = super::ZkLoginPublicIdentifier::const_default();
22552 &DEFAULT
22553 }
22554 pub fn iss_opt_mut(&mut self) -> Option<&mut String> {
22556 self.iss.as_mut().map(|field| field as _)
22557 }
22558 pub fn iss_mut(&mut self) -> &mut String {
22561 self.iss.get_or_insert_default()
22562 }
22563 pub fn iss_opt(&self) -> Option<&str> {
22565 self.iss.as_ref().map(|field| field as _)
22566 }
22567 pub fn set_iss<T: Into<String>>(&mut self, field: T) {
22569 self.iss = Some(field.into().into());
22570 }
22571 pub fn with_iss<T: Into<String>>(mut self, field: T) -> Self {
22573 self.set_iss(field.into());
22574 self
22575 }
22576 pub fn address_seed_opt_mut(&mut self) -> Option<&mut String> {
22578 self.address_seed.as_mut().map(|field| field as _)
22579 }
22580 pub fn address_seed_mut(&mut self) -> &mut String {
22583 self.address_seed.get_or_insert_default()
22584 }
22585 pub fn address_seed_opt(&self) -> Option<&str> {
22587 self.address_seed.as_ref().map(|field| field as _)
22588 }
22589 pub fn set_address_seed<T: Into<String>>(&mut self, field: T) {
22591 self.address_seed = Some(field.into().into());
22592 }
22593 pub fn with_address_seed<T: Into<String>>(mut self, field: T) -> Self {
22595 self.set_address_seed(field.into());
22596 self
22597 }
22598 }
22599}