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::Argument {
333 pub const fn const_default() -> Self {
334 Self {
335 kind: None,
336 input: None,
337 result: None,
338 subresult: None,
339 }
340 }
341 #[doc(hidden)]
342 pub fn default_instance() -> &'static Self {
343 static DEFAULT: super::Argument = super::Argument::const_default();
344 &DEFAULT
345 }
346 pub fn with_kind<T: Into<super::argument::ArgumentKind>>(
348 mut self,
349 field: T,
350 ) -> Self {
351 self.set_kind(field.into());
352 self
353 }
354 pub fn input_opt_mut(&mut self) -> Option<&mut u32> {
356 self.input.as_mut().map(|field| field as _)
357 }
358 pub fn input_mut(&mut self) -> &mut u32 {
361 self.input.get_or_insert_default()
362 }
363 pub fn input_opt(&self) -> Option<u32> {
365 self.input.as_ref().map(|field| *field)
366 }
367 pub fn set_input(&mut self, field: u32) {
369 self.input = Some(field);
370 }
371 pub fn with_input(mut self, field: u32) -> Self {
373 self.set_input(field);
374 self
375 }
376 pub fn result_opt_mut(&mut self) -> Option<&mut u32> {
378 self.result.as_mut().map(|field| field as _)
379 }
380 pub fn result_mut(&mut self) -> &mut u32 {
383 self.result.get_or_insert_default()
384 }
385 pub fn result_opt(&self) -> Option<u32> {
387 self.result.as_ref().map(|field| *field)
388 }
389 pub fn set_result(&mut self, field: u32) {
391 self.result = Some(field);
392 }
393 pub fn with_result(mut self, field: u32) -> Self {
395 self.set_result(field);
396 self
397 }
398 pub fn subresult_opt_mut(&mut self) -> Option<&mut u32> {
400 self.subresult.as_mut().map(|field| field as _)
401 }
402 pub fn subresult_mut(&mut self) -> &mut u32 {
405 self.subresult.get_or_insert_default()
406 }
407 pub fn subresult_opt(&self) -> Option<u32> {
409 self.subresult.as_ref().map(|field| *field)
410 }
411 pub fn set_subresult(&mut self, field: u32) {
413 self.subresult = Some(field);
414 }
415 pub fn with_subresult(mut self, field: u32) -> Self {
417 self.set_subresult(field);
418 self
419 }
420 }
421 impl super::AuthenticatorStateExpire {
422 pub const fn const_default() -> Self {
423 Self {
424 min_epoch: None,
425 authenticator_object_initial_shared_version: None,
426 }
427 }
428 #[doc(hidden)]
429 pub fn default_instance() -> &'static Self {
430 static DEFAULT: super::AuthenticatorStateExpire = super::AuthenticatorStateExpire::const_default();
431 &DEFAULT
432 }
433 pub fn min_epoch_opt_mut(&mut self) -> Option<&mut u64> {
435 self.min_epoch.as_mut().map(|field| field as _)
436 }
437 pub fn min_epoch_mut(&mut self) -> &mut u64 {
440 self.min_epoch.get_or_insert_default()
441 }
442 pub fn min_epoch_opt(&self) -> Option<u64> {
444 self.min_epoch.as_ref().map(|field| *field)
445 }
446 pub fn set_min_epoch(&mut self, field: u64) {
448 self.min_epoch = Some(field);
449 }
450 pub fn with_min_epoch(mut self, field: u64) -> Self {
452 self.set_min_epoch(field);
453 self
454 }
455 pub fn authenticator_object_initial_shared_version_opt_mut(
457 &mut self,
458 ) -> Option<&mut u64> {
459 self.authenticator_object_initial_shared_version
460 .as_mut()
461 .map(|field| field as _)
462 }
463 pub fn authenticator_object_initial_shared_version_mut(&mut self) -> &mut u64 {
466 self.authenticator_object_initial_shared_version.get_or_insert_default()
467 }
468 pub fn authenticator_object_initial_shared_version_opt(&self) -> Option<u64> {
470 self.authenticator_object_initial_shared_version.as_ref().map(|field| *field)
471 }
472 pub fn set_authenticator_object_initial_shared_version(&mut self, field: u64) {
474 self.authenticator_object_initial_shared_version = Some(field);
475 }
476 pub fn with_authenticator_object_initial_shared_version(
478 mut self,
479 field: u64,
480 ) -> Self {
481 self.set_authenticator_object_initial_shared_version(field);
482 self
483 }
484 }
485 impl super::AuthenticatorStateUpdate {
486 pub const fn const_default() -> Self {
487 Self {
488 epoch: None,
489 round: None,
490 new_active_jwks: Vec::new(),
491 authenticator_object_initial_shared_version: None,
492 }
493 }
494 #[doc(hidden)]
495 pub fn default_instance() -> &'static Self {
496 static DEFAULT: super::AuthenticatorStateUpdate = super::AuthenticatorStateUpdate::const_default();
497 &DEFAULT
498 }
499 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
501 self.epoch.as_mut().map(|field| field as _)
502 }
503 pub fn epoch_mut(&mut self) -> &mut u64 {
506 self.epoch.get_or_insert_default()
507 }
508 pub fn epoch_opt(&self) -> Option<u64> {
510 self.epoch.as_ref().map(|field| *field)
511 }
512 pub fn set_epoch(&mut self, field: u64) {
514 self.epoch = Some(field);
515 }
516 pub fn with_epoch(mut self, field: u64) -> Self {
518 self.set_epoch(field);
519 self
520 }
521 pub fn round_opt_mut(&mut self) -> Option<&mut u64> {
523 self.round.as_mut().map(|field| field as _)
524 }
525 pub fn round_mut(&mut self) -> &mut u64 {
528 self.round.get_or_insert_default()
529 }
530 pub fn round_opt(&self) -> Option<u64> {
532 self.round.as_ref().map(|field| *field)
533 }
534 pub fn set_round(&mut self, field: u64) {
536 self.round = Some(field);
537 }
538 pub fn with_round(mut self, field: u64) -> Self {
540 self.set_round(field);
541 self
542 }
543 pub fn new_active_jwks(&self) -> &[super::ActiveJwk] {
545 &self.new_active_jwks
546 }
547 pub fn new_active_jwks_mut(&mut self) -> &mut Vec<super::ActiveJwk> {
550 &mut self.new_active_jwks
551 }
552 pub fn set_new_active_jwks(&mut self, field: Vec<super::ActiveJwk>) {
554 self.new_active_jwks = field;
555 }
556 pub fn with_new_active_jwks(mut self, field: Vec<super::ActiveJwk>) -> Self {
558 self.set_new_active_jwks(field);
559 self
560 }
561 pub fn authenticator_object_initial_shared_version_opt_mut(
563 &mut self,
564 ) -> Option<&mut u64> {
565 self.authenticator_object_initial_shared_version
566 .as_mut()
567 .map(|field| field as _)
568 }
569 pub fn authenticator_object_initial_shared_version_mut(&mut self) -> &mut u64 {
572 self.authenticator_object_initial_shared_version.get_or_insert_default()
573 }
574 pub fn authenticator_object_initial_shared_version_opt(&self) -> Option<u64> {
576 self.authenticator_object_initial_shared_version.as_ref().map(|field| *field)
577 }
578 pub fn set_authenticator_object_initial_shared_version(&mut self, field: u64) {
580 self.authenticator_object_initial_shared_version = Some(field);
581 }
582 pub fn with_authenticator_object_initial_shared_version(
584 mut self,
585 field: u64,
586 ) -> Self {
587 self.set_authenticator_object_initial_shared_version(field);
588 self
589 }
590 }
591 impl super::Balance {
592 pub const fn const_default() -> Self {
593 Self {
594 coin_type: None,
595 balance: None,
596 address_balance: None,
597 coin_balance: None,
598 }
599 }
600 #[doc(hidden)]
601 pub fn default_instance() -> &'static Self {
602 static DEFAULT: super::Balance = super::Balance::const_default();
603 &DEFAULT
604 }
605 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
607 self.coin_type.as_mut().map(|field| field as _)
608 }
609 pub fn coin_type_mut(&mut self) -> &mut String {
612 self.coin_type.get_or_insert_default()
613 }
614 pub fn coin_type_opt(&self) -> Option<&str> {
616 self.coin_type.as_ref().map(|field| field as _)
617 }
618 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
620 self.coin_type = Some(field.into().into());
621 }
622 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
624 self.set_coin_type(field.into());
625 self
626 }
627 pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
629 self.balance.as_mut().map(|field| field as _)
630 }
631 pub fn balance_mut(&mut self) -> &mut u64 {
634 self.balance.get_or_insert_default()
635 }
636 pub fn balance_opt(&self) -> Option<u64> {
638 self.balance.as_ref().map(|field| *field)
639 }
640 pub fn set_balance(&mut self, field: u64) {
642 self.balance = Some(field);
643 }
644 pub fn with_balance(mut self, field: u64) -> Self {
646 self.set_balance(field);
647 self
648 }
649 pub fn address_balance_opt_mut(&mut self) -> Option<&mut u64> {
651 self.address_balance.as_mut().map(|field| field as _)
652 }
653 pub fn address_balance_mut(&mut self) -> &mut u64 {
656 self.address_balance.get_or_insert_default()
657 }
658 pub fn address_balance_opt(&self) -> Option<u64> {
660 self.address_balance.as_ref().map(|field| *field)
661 }
662 pub fn set_address_balance(&mut self, field: u64) {
664 self.address_balance = Some(field);
665 }
666 pub fn with_address_balance(mut self, field: u64) -> Self {
668 self.set_address_balance(field);
669 self
670 }
671 pub fn coin_balance_opt_mut(&mut self) -> Option<&mut u64> {
673 self.coin_balance.as_mut().map(|field| field as _)
674 }
675 pub fn coin_balance_mut(&mut self) -> &mut u64 {
678 self.coin_balance.get_or_insert_default()
679 }
680 pub fn coin_balance_opt(&self) -> Option<u64> {
682 self.coin_balance.as_ref().map(|field| *field)
683 }
684 pub fn set_coin_balance(&mut self, field: u64) {
686 self.coin_balance = Some(field);
687 }
688 pub fn with_coin_balance(mut self, field: u64) -> Self {
690 self.set_coin_balance(field);
691 self
692 }
693 }
694 impl super::BalanceChange {
695 pub const fn const_default() -> Self {
696 Self {
697 address: None,
698 coin_type: None,
699 amount: None,
700 }
701 }
702 #[doc(hidden)]
703 pub fn default_instance() -> &'static Self {
704 static DEFAULT: super::BalanceChange = super::BalanceChange::const_default();
705 &DEFAULT
706 }
707 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
709 self.address.as_mut().map(|field| field as _)
710 }
711 pub fn address_mut(&mut self) -> &mut String {
714 self.address.get_or_insert_default()
715 }
716 pub fn address_opt(&self) -> Option<&str> {
718 self.address.as_ref().map(|field| field as _)
719 }
720 pub fn set_address<T: Into<String>>(&mut self, field: T) {
722 self.address = Some(field.into().into());
723 }
724 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
726 self.set_address(field.into());
727 self
728 }
729 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
731 self.coin_type.as_mut().map(|field| field as _)
732 }
733 pub fn coin_type_mut(&mut self) -> &mut String {
736 self.coin_type.get_or_insert_default()
737 }
738 pub fn coin_type_opt(&self) -> Option<&str> {
740 self.coin_type.as_ref().map(|field| field as _)
741 }
742 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
744 self.coin_type = Some(field.into().into());
745 }
746 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
748 self.set_coin_type(field.into());
749 self
750 }
751 pub fn amount_opt_mut(&mut self) -> Option<&mut String> {
753 self.amount.as_mut().map(|field| field as _)
754 }
755 pub fn amount_mut(&mut self) -> &mut String {
758 self.amount.get_or_insert_default()
759 }
760 pub fn amount_opt(&self) -> Option<&str> {
762 self.amount.as_ref().map(|field| field as _)
763 }
764 pub fn set_amount<T: Into<String>>(&mut self, field: T) {
766 self.amount = Some(field.into().into());
767 }
768 pub fn with_amount<T: Into<String>>(mut self, field: T) -> Self {
770 self.set_amount(field.into());
771 self
772 }
773 }
774 impl super::BatchGetObjectsRequest {
775 pub const fn const_default() -> Self {
776 Self {
777 requests: Vec::new(),
778 read_mask: None,
779 }
780 }
781 #[doc(hidden)]
782 pub fn default_instance() -> &'static Self {
783 static DEFAULT: super::BatchGetObjectsRequest = super::BatchGetObjectsRequest::const_default();
784 &DEFAULT
785 }
786 pub fn requests(&self) -> &[super::GetObjectRequest] {
788 &self.requests
789 }
790 pub fn requests_mut(&mut self) -> &mut Vec<super::GetObjectRequest> {
793 &mut self.requests
794 }
795 pub fn set_requests(&mut self, field: Vec<super::GetObjectRequest>) {
797 self.requests = field;
798 }
799 pub fn with_requests(mut self, field: Vec<super::GetObjectRequest>) -> Self {
801 self.set_requests(field);
802 self
803 }
804 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
806 self.read_mask.as_mut().map(|field| field as _)
807 }
808 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
811 self.read_mask.get_or_insert_default()
812 }
813 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
815 self.read_mask.as_ref().map(|field| field as _)
816 }
817 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
819 self.read_mask = Some(field.into().into());
820 }
821 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
823 mut self,
824 field: T,
825 ) -> Self {
826 self.set_read_mask(field.into());
827 self
828 }
829 }
830 impl super::BatchGetObjectsResponse {
831 pub const fn const_default() -> Self {
832 Self { objects: Vec::new() }
833 }
834 #[doc(hidden)]
835 pub fn default_instance() -> &'static Self {
836 static DEFAULT: super::BatchGetObjectsResponse = super::BatchGetObjectsResponse::const_default();
837 &DEFAULT
838 }
839 pub fn objects(&self) -> &[super::GetObjectResult] {
841 &self.objects
842 }
843 pub fn objects_mut(&mut self) -> &mut Vec<super::GetObjectResult> {
846 &mut self.objects
847 }
848 pub fn set_objects(&mut self, field: Vec<super::GetObjectResult>) {
850 self.objects = field;
851 }
852 pub fn with_objects(mut self, field: Vec<super::GetObjectResult>) -> Self {
854 self.set_objects(field);
855 self
856 }
857 }
858 impl super::BatchGetTransactionsRequest {
859 pub const fn const_default() -> Self {
860 Self {
861 digests: Vec::new(),
862 read_mask: None,
863 }
864 }
865 #[doc(hidden)]
866 pub fn default_instance() -> &'static Self {
867 static DEFAULT: super::BatchGetTransactionsRequest = super::BatchGetTransactionsRequest::const_default();
868 &DEFAULT
869 }
870 pub fn digests(&self) -> &[String] {
872 &self.digests
873 }
874 pub fn digests_mut(&mut self) -> &mut Vec<String> {
877 &mut self.digests
878 }
879 pub fn set_digests(&mut self, field: Vec<String>) {
881 self.digests = field;
882 }
883 pub fn with_digests(mut self, field: Vec<String>) -> Self {
885 self.set_digests(field);
886 self
887 }
888 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
890 self.read_mask.as_mut().map(|field| field as _)
891 }
892 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
895 self.read_mask.get_or_insert_default()
896 }
897 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
899 self.read_mask.as_ref().map(|field| field as _)
900 }
901 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
903 self.read_mask = Some(field.into().into());
904 }
905 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
907 mut self,
908 field: T,
909 ) -> Self {
910 self.set_read_mask(field.into());
911 self
912 }
913 }
914 impl super::BatchGetTransactionsResponse {
915 pub const fn const_default() -> Self {
916 Self { transactions: Vec::new() }
917 }
918 #[doc(hidden)]
919 pub fn default_instance() -> &'static Self {
920 static DEFAULT: super::BatchGetTransactionsResponse = super::BatchGetTransactionsResponse::const_default();
921 &DEFAULT
922 }
923 pub fn transactions(&self) -> &[super::GetTransactionResult] {
925 &self.transactions
926 }
927 pub fn transactions_mut(&mut self) -> &mut Vec<super::GetTransactionResult> {
930 &mut self.transactions
931 }
932 pub fn set_transactions(&mut self, field: Vec<super::GetTransactionResult>) {
934 self.transactions = field;
935 }
936 pub fn with_transactions(
938 mut self,
939 field: Vec<super::GetTransactionResult>,
940 ) -> Self {
941 self.set_transactions(field);
942 self
943 }
944 }
945 impl super::Bcs {
946 pub const fn const_default() -> Self {
947 Self { name: None, value: None }
948 }
949 #[doc(hidden)]
950 pub fn default_instance() -> &'static Self {
951 static DEFAULT: super::Bcs = super::Bcs::const_default();
952 &DEFAULT
953 }
954 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
956 self.name.as_mut().map(|field| field as _)
957 }
958 pub fn name_mut(&mut self) -> &mut String {
961 self.name.get_or_insert_default()
962 }
963 pub fn name_opt(&self) -> Option<&str> {
965 self.name.as_ref().map(|field| field as _)
966 }
967 pub fn set_name<T: Into<String>>(&mut self, field: T) {
969 self.name = Some(field.into().into());
970 }
971 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
973 self.set_name(field.into());
974 self
975 }
976 pub fn value_opt(&self) -> Option<&[u8]> {
978 self.value.as_ref().map(|field| field as _)
979 }
980 pub fn set_value<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
982 self.value = Some(field.into().into());
983 }
984 pub fn with_value<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
986 self.set_value(field.into());
987 self
988 }
989 }
990 impl super::CanceledTransaction {
991 pub const fn const_default() -> Self {
992 Self {
993 digest: None,
994 version_assignments: Vec::new(),
995 }
996 }
997 #[doc(hidden)]
998 pub fn default_instance() -> &'static Self {
999 static DEFAULT: super::CanceledTransaction = super::CanceledTransaction::const_default();
1000 &DEFAULT
1001 }
1002 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1004 self.digest.as_mut().map(|field| field as _)
1005 }
1006 pub fn digest_mut(&mut self) -> &mut String {
1009 self.digest.get_or_insert_default()
1010 }
1011 pub fn digest_opt(&self) -> Option<&str> {
1013 self.digest.as_ref().map(|field| field as _)
1014 }
1015 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1017 self.digest = Some(field.into().into());
1018 }
1019 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1021 self.set_digest(field.into());
1022 self
1023 }
1024 pub fn version_assignments(&self) -> &[super::VersionAssignment] {
1026 &self.version_assignments
1027 }
1028 pub fn version_assignments_mut(&mut self) -> &mut Vec<super::VersionAssignment> {
1031 &mut self.version_assignments
1032 }
1033 pub fn set_version_assignments(&mut self, field: Vec<super::VersionAssignment>) {
1035 self.version_assignments = field;
1036 }
1037 pub fn with_version_assignments(
1039 mut self,
1040 field: Vec<super::VersionAssignment>,
1041 ) -> Self {
1042 self.set_version_assignments(field);
1043 self
1044 }
1045 }
1046 impl super::ChangeEpoch {
1047 pub const fn const_default() -> Self {
1048 Self {
1049 epoch: None,
1050 protocol_version: None,
1051 storage_charge: None,
1052 computation_charge: None,
1053 storage_rebate: None,
1054 non_refundable_storage_fee: None,
1055 epoch_start_timestamp: None,
1056 system_packages: Vec::new(),
1057 }
1058 }
1059 #[doc(hidden)]
1060 pub fn default_instance() -> &'static Self {
1061 static DEFAULT: super::ChangeEpoch = super::ChangeEpoch::const_default();
1062 &DEFAULT
1063 }
1064 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
1066 self.epoch.as_mut().map(|field| field as _)
1067 }
1068 pub fn epoch_mut(&mut self) -> &mut u64 {
1071 self.epoch.get_or_insert_default()
1072 }
1073 pub fn epoch_opt(&self) -> Option<u64> {
1075 self.epoch.as_ref().map(|field| *field)
1076 }
1077 pub fn set_epoch(&mut self, field: u64) {
1079 self.epoch = Some(field);
1080 }
1081 pub fn with_epoch(mut self, field: u64) -> Self {
1083 self.set_epoch(field);
1084 self
1085 }
1086 pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
1088 self.protocol_version.as_mut().map(|field| field as _)
1089 }
1090 pub fn protocol_version_mut(&mut self) -> &mut u64 {
1093 self.protocol_version.get_or_insert_default()
1094 }
1095 pub fn protocol_version_opt(&self) -> Option<u64> {
1097 self.protocol_version.as_ref().map(|field| *field)
1098 }
1099 pub fn set_protocol_version(&mut self, field: u64) {
1101 self.protocol_version = Some(field);
1102 }
1103 pub fn with_protocol_version(mut self, field: u64) -> Self {
1105 self.set_protocol_version(field);
1106 self
1107 }
1108 pub fn storage_charge_opt_mut(&mut self) -> Option<&mut u64> {
1110 self.storage_charge.as_mut().map(|field| field as _)
1111 }
1112 pub fn storage_charge_mut(&mut self) -> &mut u64 {
1115 self.storage_charge.get_or_insert_default()
1116 }
1117 pub fn storage_charge_opt(&self) -> Option<u64> {
1119 self.storage_charge.as_ref().map(|field| *field)
1120 }
1121 pub fn set_storage_charge(&mut self, field: u64) {
1123 self.storage_charge = Some(field);
1124 }
1125 pub fn with_storage_charge(mut self, field: u64) -> Self {
1127 self.set_storage_charge(field);
1128 self
1129 }
1130 pub fn computation_charge_opt_mut(&mut self) -> Option<&mut u64> {
1132 self.computation_charge.as_mut().map(|field| field as _)
1133 }
1134 pub fn computation_charge_mut(&mut self) -> &mut u64 {
1137 self.computation_charge.get_or_insert_default()
1138 }
1139 pub fn computation_charge_opt(&self) -> Option<u64> {
1141 self.computation_charge.as_ref().map(|field| *field)
1142 }
1143 pub fn set_computation_charge(&mut self, field: u64) {
1145 self.computation_charge = Some(field);
1146 }
1147 pub fn with_computation_charge(mut self, field: u64) -> Self {
1149 self.set_computation_charge(field);
1150 self
1151 }
1152 pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
1154 self.storage_rebate.as_mut().map(|field| field as _)
1155 }
1156 pub fn storage_rebate_mut(&mut self) -> &mut u64 {
1159 self.storage_rebate.get_or_insert_default()
1160 }
1161 pub fn storage_rebate_opt(&self) -> Option<u64> {
1163 self.storage_rebate.as_ref().map(|field| *field)
1164 }
1165 pub fn set_storage_rebate(&mut self, field: u64) {
1167 self.storage_rebate = Some(field);
1168 }
1169 pub fn with_storage_rebate(mut self, field: u64) -> Self {
1171 self.set_storage_rebate(field);
1172 self
1173 }
1174 pub fn non_refundable_storage_fee_opt_mut(&mut self) -> Option<&mut u64> {
1176 self.non_refundable_storage_fee.as_mut().map(|field| field as _)
1177 }
1178 pub fn non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
1181 self.non_refundable_storage_fee.get_or_insert_default()
1182 }
1183 pub fn non_refundable_storage_fee_opt(&self) -> Option<u64> {
1185 self.non_refundable_storage_fee.as_ref().map(|field| *field)
1186 }
1187 pub fn set_non_refundable_storage_fee(&mut self, field: u64) {
1189 self.non_refundable_storage_fee = Some(field);
1190 }
1191 pub fn with_non_refundable_storage_fee(mut self, field: u64) -> Self {
1193 self.set_non_refundable_storage_fee(field);
1194 self
1195 }
1196 pub fn epoch_start_timestamp_opt_mut(
1198 &mut self,
1199 ) -> Option<&mut ::prost_types::Timestamp> {
1200 self.epoch_start_timestamp.as_mut().map(|field| field as _)
1201 }
1202 pub fn epoch_start_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
1205 self.epoch_start_timestamp.get_or_insert_default()
1206 }
1207 pub fn epoch_start_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
1209 self.epoch_start_timestamp.as_ref().map(|field| field as _)
1210 }
1211 pub fn set_epoch_start_timestamp<T: Into<::prost_types::Timestamp>>(
1213 &mut self,
1214 field: T,
1215 ) {
1216 self.epoch_start_timestamp = Some(field.into().into());
1217 }
1218 pub fn with_epoch_start_timestamp<T: Into<::prost_types::Timestamp>>(
1220 mut self,
1221 field: T,
1222 ) -> Self {
1223 self.set_epoch_start_timestamp(field.into());
1224 self
1225 }
1226 pub fn system_packages(&self) -> &[super::SystemPackage] {
1228 &self.system_packages
1229 }
1230 pub fn system_packages_mut(&mut self) -> &mut Vec<super::SystemPackage> {
1233 &mut self.system_packages
1234 }
1235 pub fn set_system_packages(&mut self, field: Vec<super::SystemPackage>) {
1237 self.system_packages = field;
1238 }
1239 pub fn with_system_packages(mut self, field: Vec<super::SystemPackage>) -> Self {
1241 self.set_system_packages(field);
1242 self
1243 }
1244 }
1245 impl super::ChangedObject {
1246 pub const fn const_default() -> Self {
1247 Self {
1248 object_id: None,
1249 input_state: None,
1250 input_version: None,
1251 input_digest: None,
1252 input_owner: None,
1253 output_state: None,
1254 output_version: None,
1255 output_digest: None,
1256 output_owner: None,
1257 accumulator_write: None,
1258 id_operation: None,
1259 object_type: None,
1260 }
1261 }
1262 #[doc(hidden)]
1263 pub fn default_instance() -> &'static Self {
1264 static DEFAULT: super::ChangedObject = super::ChangedObject::const_default();
1265 &DEFAULT
1266 }
1267 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
1269 self.object_id.as_mut().map(|field| field as _)
1270 }
1271 pub fn object_id_mut(&mut self) -> &mut String {
1274 self.object_id.get_or_insert_default()
1275 }
1276 pub fn object_id_opt(&self) -> Option<&str> {
1278 self.object_id.as_ref().map(|field| field as _)
1279 }
1280 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
1282 self.object_id = Some(field.into().into());
1283 }
1284 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
1286 self.set_object_id(field.into());
1287 self
1288 }
1289 pub fn with_input_state<T: Into<super::changed_object::InputObjectState>>(
1291 mut self,
1292 field: T,
1293 ) -> Self {
1294 self.set_input_state(field.into());
1295 self
1296 }
1297 pub fn input_version_opt_mut(&mut self) -> Option<&mut u64> {
1299 self.input_version.as_mut().map(|field| field as _)
1300 }
1301 pub fn input_version_mut(&mut self) -> &mut u64 {
1304 self.input_version.get_or_insert_default()
1305 }
1306 pub fn input_version_opt(&self) -> Option<u64> {
1308 self.input_version.as_ref().map(|field| *field)
1309 }
1310 pub fn set_input_version(&mut self, field: u64) {
1312 self.input_version = Some(field);
1313 }
1314 pub fn with_input_version(mut self, field: u64) -> Self {
1316 self.set_input_version(field);
1317 self
1318 }
1319 pub fn input_digest_opt_mut(&mut self) -> Option<&mut String> {
1321 self.input_digest.as_mut().map(|field| field as _)
1322 }
1323 pub fn input_digest_mut(&mut self) -> &mut String {
1326 self.input_digest.get_or_insert_default()
1327 }
1328 pub fn input_digest_opt(&self) -> Option<&str> {
1330 self.input_digest.as_ref().map(|field| field as _)
1331 }
1332 pub fn set_input_digest<T: Into<String>>(&mut self, field: T) {
1334 self.input_digest = Some(field.into().into());
1335 }
1336 pub fn with_input_digest<T: Into<String>>(mut self, field: T) -> Self {
1338 self.set_input_digest(field.into());
1339 self
1340 }
1341 pub fn input_owner(&self) -> &super::Owner {
1343 self.input_owner
1344 .as_ref()
1345 .map(|field| field as _)
1346 .unwrap_or_else(|| super::Owner::default_instance() as _)
1347 }
1348 pub fn input_owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
1350 self.input_owner.as_mut().map(|field| field as _)
1351 }
1352 pub fn input_owner_mut(&mut self) -> &mut super::Owner {
1355 self.input_owner.get_or_insert_default()
1356 }
1357 pub fn input_owner_opt(&self) -> Option<&super::Owner> {
1359 self.input_owner.as_ref().map(|field| field as _)
1360 }
1361 pub fn set_input_owner<T: Into<super::Owner>>(&mut self, field: T) {
1363 self.input_owner = Some(field.into().into());
1364 }
1365 pub fn with_input_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
1367 self.set_input_owner(field.into());
1368 self
1369 }
1370 pub fn with_output_state<T: Into<super::changed_object::OutputObjectState>>(
1372 mut self,
1373 field: T,
1374 ) -> Self {
1375 self.set_output_state(field.into());
1376 self
1377 }
1378 pub fn output_version_opt_mut(&mut self) -> Option<&mut u64> {
1380 self.output_version.as_mut().map(|field| field as _)
1381 }
1382 pub fn output_version_mut(&mut self) -> &mut u64 {
1385 self.output_version.get_or_insert_default()
1386 }
1387 pub fn output_version_opt(&self) -> Option<u64> {
1389 self.output_version.as_ref().map(|field| *field)
1390 }
1391 pub fn set_output_version(&mut self, field: u64) {
1393 self.output_version = Some(field);
1394 }
1395 pub fn with_output_version(mut self, field: u64) -> Self {
1397 self.set_output_version(field);
1398 self
1399 }
1400 pub fn output_digest_opt_mut(&mut self) -> Option<&mut String> {
1402 self.output_digest.as_mut().map(|field| field as _)
1403 }
1404 pub fn output_digest_mut(&mut self) -> &mut String {
1407 self.output_digest.get_or_insert_default()
1408 }
1409 pub fn output_digest_opt(&self) -> Option<&str> {
1411 self.output_digest.as_ref().map(|field| field as _)
1412 }
1413 pub fn set_output_digest<T: Into<String>>(&mut self, field: T) {
1415 self.output_digest = Some(field.into().into());
1416 }
1417 pub fn with_output_digest<T: Into<String>>(mut self, field: T) -> Self {
1419 self.set_output_digest(field.into());
1420 self
1421 }
1422 pub fn output_owner(&self) -> &super::Owner {
1424 self.output_owner
1425 .as_ref()
1426 .map(|field| field as _)
1427 .unwrap_or_else(|| super::Owner::default_instance() as _)
1428 }
1429 pub fn output_owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
1431 self.output_owner.as_mut().map(|field| field as _)
1432 }
1433 pub fn output_owner_mut(&mut self) -> &mut super::Owner {
1436 self.output_owner.get_or_insert_default()
1437 }
1438 pub fn output_owner_opt(&self) -> Option<&super::Owner> {
1440 self.output_owner.as_ref().map(|field| field as _)
1441 }
1442 pub fn set_output_owner<T: Into<super::Owner>>(&mut self, field: T) {
1444 self.output_owner = Some(field.into().into());
1445 }
1446 pub fn with_output_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
1448 self.set_output_owner(field.into());
1449 self
1450 }
1451 pub fn accumulator_write(&self) -> &super::AccumulatorWrite {
1453 self.accumulator_write
1454 .as_ref()
1455 .map(|field| field as _)
1456 .unwrap_or_else(|| super::AccumulatorWrite::default_instance() as _)
1457 }
1458 pub fn accumulator_write_opt_mut(
1460 &mut self,
1461 ) -> Option<&mut super::AccumulatorWrite> {
1462 self.accumulator_write.as_mut().map(|field| field as _)
1463 }
1464 pub fn accumulator_write_mut(&mut self) -> &mut super::AccumulatorWrite {
1467 self.accumulator_write.get_or_insert_default()
1468 }
1469 pub fn accumulator_write_opt(&self) -> Option<&super::AccumulatorWrite> {
1471 self.accumulator_write.as_ref().map(|field| field as _)
1472 }
1473 pub fn set_accumulator_write<T: Into<super::AccumulatorWrite>>(
1475 &mut self,
1476 field: T,
1477 ) {
1478 self.accumulator_write = Some(field.into().into());
1479 }
1480 pub fn with_accumulator_write<T: Into<super::AccumulatorWrite>>(
1482 mut self,
1483 field: T,
1484 ) -> Self {
1485 self.set_accumulator_write(field.into());
1486 self
1487 }
1488 pub fn with_id_operation<T: Into<super::changed_object::IdOperation>>(
1490 mut self,
1491 field: T,
1492 ) -> Self {
1493 self.set_id_operation(field.into());
1494 self
1495 }
1496 pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
1498 self.object_type.as_mut().map(|field| field as _)
1499 }
1500 pub fn object_type_mut(&mut self) -> &mut String {
1503 self.object_type.get_or_insert_default()
1504 }
1505 pub fn object_type_opt(&self) -> Option<&str> {
1507 self.object_type.as_ref().map(|field| field as _)
1508 }
1509 pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
1511 self.object_type = Some(field.into().into());
1512 }
1513 pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
1515 self.set_object_type(field.into());
1516 self
1517 }
1518 }
1519 impl super::Checkpoint {
1520 pub const fn const_default() -> Self {
1521 Self {
1522 sequence_number: None,
1523 digest: None,
1524 summary: None,
1525 signature: None,
1526 contents: None,
1527 transactions: Vec::new(),
1528 objects: None,
1529 }
1530 }
1531 #[doc(hidden)]
1532 pub fn default_instance() -> &'static Self {
1533 static DEFAULT: super::Checkpoint = super::Checkpoint::const_default();
1534 &DEFAULT
1535 }
1536 pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
1538 self.sequence_number.as_mut().map(|field| field as _)
1539 }
1540 pub fn sequence_number_mut(&mut self) -> &mut u64 {
1543 self.sequence_number.get_or_insert_default()
1544 }
1545 pub fn sequence_number_opt(&self) -> Option<u64> {
1547 self.sequence_number.as_ref().map(|field| *field)
1548 }
1549 pub fn set_sequence_number(&mut self, field: u64) {
1551 self.sequence_number = Some(field);
1552 }
1553 pub fn with_sequence_number(mut self, field: u64) -> Self {
1555 self.set_sequence_number(field);
1556 self
1557 }
1558 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1560 self.digest.as_mut().map(|field| field as _)
1561 }
1562 pub fn digest_mut(&mut self) -> &mut String {
1565 self.digest.get_or_insert_default()
1566 }
1567 pub fn digest_opt(&self) -> Option<&str> {
1569 self.digest.as_ref().map(|field| field as _)
1570 }
1571 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1573 self.digest = Some(field.into().into());
1574 }
1575 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1577 self.set_digest(field.into());
1578 self
1579 }
1580 pub fn summary(&self) -> &super::CheckpointSummary {
1582 self.summary
1583 .as_ref()
1584 .map(|field| field as _)
1585 .unwrap_or_else(|| super::CheckpointSummary::default_instance() as _)
1586 }
1587 pub fn summary_opt_mut(&mut self) -> Option<&mut super::CheckpointSummary> {
1589 self.summary.as_mut().map(|field| field as _)
1590 }
1591 pub fn summary_mut(&mut self) -> &mut super::CheckpointSummary {
1594 self.summary.get_or_insert_default()
1595 }
1596 pub fn summary_opt(&self) -> Option<&super::CheckpointSummary> {
1598 self.summary.as_ref().map(|field| field as _)
1599 }
1600 pub fn set_summary<T: Into<super::CheckpointSummary>>(&mut self, field: T) {
1602 self.summary = Some(field.into().into());
1603 }
1604 pub fn with_summary<T: Into<super::CheckpointSummary>>(
1606 mut self,
1607 field: T,
1608 ) -> Self {
1609 self.set_summary(field.into());
1610 self
1611 }
1612 pub fn signature(&self) -> &super::ValidatorAggregatedSignature {
1614 self.signature
1615 .as_ref()
1616 .map(|field| field as _)
1617 .unwrap_or_else(|| {
1618 super::ValidatorAggregatedSignature::default_instance() as _
1619 })
1620 }
1621 pub fn signature_opt_mut(
1623 &mut self,
1624 ) -> Option<&mut super::ValidatorAggregatedSignature> {
1625 self.signature.as_mut().map(|field| field as _)
1626 }
1627 pub fn signature_mut(&mut self) -> &mut super::ValidatorAggregatedSignature {
1630 self.signature.get_or_insert_default()
1631 }
1632 pub fn signature_opt(&self) -> Option<&super::ValidatorAggregatedSignature> {
1634 self.signature.as_ref().map(|field| field as _)
1635 }
1636 pub fn set_signature<T: Into<super::ValidatorAggregatedSignature>>(
1638 &mut self,
1639 field: T,
1640 ) {
1641 self.signature = Some(field.into().into());
1642 }
1643 pub fn with_signature<T: Into<super::ValidatorAggregatedSignature>>(
1645 mut self,
1646 field: T,
1647 ) -> Self {
1648 self.set_signature(field.into());
1649 self
1650 }
1651 pub fn contents(&self) -> &super::CheckpointContents {
1653 self.contents
1654 .as_ref()
1655 .map(|field| field as _)
1656 .unwrap_or_else(|| super::CheckpointContents::default_instance() as _)
1657 }
1658 pub fn contents_opt_mut(&mut self) -> Option<&mut super::CheckpointContents> {
1660 self.contents.as_mut().map(|field| field as _)
1661 }
1662 pub fn contents_mut(&mut self) -> &mut super::CheckpointContents {
1665 self.contents.get_or_insert_default()
1666 }
1667 pub fn contents_opt(&self) -> Option<&super::CheckpointContents> {
1669 self.contents.as_ref().map(|field| field as _)
1670 }
1671 pub fn set_contents<T: Into<super::CheckpointContents>>(&mut self, field: T) {
1673 self.contents = Some(field.into().into());
1674 }
1675 pub fn with_contents<T: Into<super::CheckpointContents>>(
1677 mut self,
1678 field: T,
1679 ) -> Self {
1680 self.set_contents(field.into());
1681 self
1682 }
1683 pub fn transactions(&self) -> &[super::ExecutedTransaction] {
1685 &self.transactions
1686 }
1687 pub fn transactions_mut(&mut self) -> &mut Vec<super::ExecutedTransaction> {
1690 &mut self.transactions
1691 }
1692 pub fn set_transactions(&mut self, field: Vec<super::ExecutedTransaction>) {
1694 self.transactions = field;
1695 }
1696 pub fn with_transactions(
1698 mut self,
1699 field: Vec<super::ExecutedTransaction>,
1700 ) -> Self {
1701 self.set_transactions(field);
1702 self
1703 }
1704 pub fn objects(&self) -> &super::ObjectSet {
1706 self.objects
1707 .as_ref()
1708 .map(|field| field as _)
1709 .unwrap_or_else(|| super::ObjectSet::default_instance() as _)
1710 }
1711 pub fn objects_opt_mut(&mut self) -> Option<&mut super::ObjectSet> {
1713 self.objects.as_mut().map(|field| field as _)
1714 }
1715 pub fn objects_mut(&mut self) -> &mut super::ObjectSet {
1718 self.objects.get_or_insert_default()
1719 }
1720 pub fn objects_opt(&self) -> Option<&super::ObjectSet> {
1722 self.objects.as_ref().map(|field| field as _)
1723 }
1724 pub fn set_objects<T: Into<super::ObjectSet>>(&mut self, field: T) {
1726 self.objects = Some(field.into().into());
1727 }
1728 pub fn with_objects<T: Into<super::ObjectSet>>(mut self, field: T) -> Self {
1730 self.set_objects(field.into());
1731 self
1732 }
1733 }
1734 impl super::CheckpointCommitment {
1735 pub const fn const_default() -> Self {
1736 Self { kind: None, digest: None }
1737 }
1738 #[doc(hidden)]
1739 pub fn default_instance() -> &'static Self {
1740 static DEFAULT: super::CheckpointCommitment = super::CheckpointCommitment::const_default();
1741 &DEFAULT
1742 }
1743 pub fn with_kind<
1745 T: Into<super::checkpoint_commitment::CheckpointCommitmentKind>,
1746 >(mut self, field: T) -> Self {
1747 self.set_kind(field.into());
1748 self
1749 }
1750 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1752 self.digest.as_mut().map(|field| field as _)
1753 }
1754 pub fn digest_mut(&mut self) -> &mut String {
1757 self.digest.get_or_insert_default()
1758 }
1759 pub fn digest_opt(&self) -> Option<&str> {
1761 self.digest.as_ref().map(|field| field as _)
1762 }
1763 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1765 self.digest = Some(field.into().into());
1766 }
1767 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1769 self.set_digest(field.into());
1770 self
1771 }
1772 }
1773 impl super::CheckpointContents {
1774 pub const fn const_default() -> Self {
1775 Self {
1776 bcs: None,
1777 digest: None,
1778 version: None,
1779 transactions: Vec::new(),
1780 }
1781 }
1782 #[doc(hidden)]
1783 pub fn default_instance() -> &'static Self {
1784 static DEFAULT: super::CheckpointContents = super::CheckpointContents::const_default();
1785 &DEFAULT
1786 }
1787 pub fn bcs(&self) -> &super::Bcs {
1789 self.bcs
1790 .as_ref()
1791 .map(|field| field as _)
1792 .unwrap_or_else(|| super::Bcs::default_instance() as _)
1793 }
1794 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
1796 self.bcs.as_mut().map(|field| field as _)
1797 }
1798 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
1801 self.bcs.get_or_insert_default()
1802 }
1803 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
1805 self.bcs.as_ref().map(|field| field as _)
1806 }
1807 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
1809 self.bcs = Some(field.into().into());
1810 }
1811 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
1813 self.set_bcs(field.into());
1814 self
1815 }
1816 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1818 self.digest.as_mut().map(|field| field as _)
1819 }
1820 pub fn digest_mut(&mut self) -> &mut String {
1823 self.digest.get_or_insert_default()
1824 }
1825 pub fn digest_opt(&self) -> Option<&str> {
1827 self.digest.as_ref().map(|field| field as _)
1828 }
1829 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1831 self.digest = Some(field.into().into());
1832 }
1833 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1835 self.set_digest(field.into());
1836 self
1837 }
1838 pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
1840 self.version.as_mut().map(|field| field as _)
1841 }
1842 pub fn version_mut(&mut self) -> &mut i32 {
1845 self.version.get_or_insert_default()
1846 }
1847 pub fn version_opt(&self) -> Option<i32> {
1849 self.version.as_ref().map(|field| *field)
1850 }
1851 pub fn set_version(&mut self, field: i32) {
1853 self.version = Some(field);
1854 }
1855 pub fn with_version(mut self, field: i32) -> Self {
1857 self.set_version(field);
1858 self
1859 }
1860 pub fn transactions(&self) -> &[super::CheckpointedTransactionInfo] {
1862 &self.transactions
1863 }
1864 pub fn transactions_mut(
1867 &mut self,
1868 ) -> &mut Vec<super::CheckpointedTransactionInfo> {
1869 &mut self.transactions
1870 }
1871 pub fn set_transactions(
1873 &mut self,
1874 field: Vec<super::CheckpointedTransactionInfo>,
1875 ) {
1876 self.transactions = field;
1877 }
1878 pub fn with_transactions(
1880 mut self,
1881 field: Vec<super::CheckpointedTransactionInfo>,
1882 ) -> Self {
1883 self.set_transactions(field);
1884 self
1885 }
1886 }
1887 impl super::CheckpointSummary {
1888 pub const fn const_default() -> Self {
1889 Self {
1890 bcs: None,
1891 digest: None,
1892 epoch: None,
1893 sequence_number: None,
1894 total_network_transactions: None,
1895 content_digest: None,
1896 previous_digest: None,
1897 epoch_rolling_gas_cost_summary: None,
1898 timestamp: None,
1899 commitments: Vec::new(),
1900 end_of_epoch_data: None,
1901 version_specific_data: None,
1902 }
1903 }
1904 #[doc(hidden)]
1905 pub fn default_instance() -> &'static Self {
1906 static DEFAULT: super::CheckpointSummary = super::CheckpointSummary::const_default();
1907 &DEFAULT
1908 }
1909 pub fn bcs(&self) -> &super::Bcs {
1911 self.bcs
1912 .as_ref()
1913 .map(|field| field as _)
1914 .unwrap_or_else(|| super::Bcs::default_instance() as _)
1915 }
1916 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
1918 self.bcs.as_mut().map(|field| field as _)
1919 }
1920 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
1923 self.bcs.get_or_insert_default()
1924 }
1925 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
1927 self.bcs.as_ref().map(|field| field as _)
1928 }
1929 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
1931 self.bcs = Some(field.into().into());
1932 }
1933 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
1935 self.set_bcs(field.into());
1936 self
1937 }
1938 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1940 self.digest.as_mut().map(|field| field as _)
1941 }
1942 pub fn digest_mut(&mut self) -> &mut String {
1945 self.digest.get_or_insert_default()
1946 }
1947 pub fn digest_opt(&self) -> Option<&str> {
1949 self.digest.as_ref().map(|field| field as _)
1950 }
1951 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1953 self.digest = Some(field.into().into());
1954 }
1955 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1957 self.set_digest(field.into());
1958 self
1959 }
1960 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
1962 self.epoch.as_mut().map(|field| field as _)
1963 }
1964 pub fn epoch_mut(&mut self) -> &mut u64 {
1967 self.epoch.get_or_insert_default()
1968 }
1969 pub fn epoch_opt(&self) -> Option<u64> {
1971 self.epoch.as_ref().map(|field| *field)
1972 }
1973 pub fn set_epoch(&mut self, field: u64) {
1975 self.epoch = Some(field);
1976 }
1977 pub fn with_epoch(mut self, field: u64) -> Self {
1979 self.set_epoch(field);
1980 self
1981 }
1982 pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
1984 self.sequence_number.as_mut().map(|field| field as _)
1985 }
1986 pub fn sequence_number_mut(&mut self) -> &mut u64 {
1989 self.sequence_number.get_or_insert_default()
1990 }
1991 pub fn sequence_number_opt(&self) -> Option<u64> {
1993 self.sequence_number.as_ref().map(|field| *field)
1994 }
1995 pub fn set_sequence_number(&mut self, field: u64) {
1997 self.sequence_number = Some(field);
1998 }
1999 pub fn with_sequence_number(mut self, field: u64) -> Self {
2001 self.set_sequence_number(field);
2002 self
2003 }
2004 pub fn total_network_transactions_opt_mut(&mut self) -> Option<&mut u64> {
2006 self.total_network_transactions.as_mut().map(|field| field as _)
2007 }
2008 pub fn total_network_transactions_mut(&mut self) -> &mut u64 {
2011 self.total_network_transactions.get_or_insert_default()
2012 }
2013 pub fn total_network_transactions_opt(&self) -> Option<u64> {
2015 self.total_network_transactions.as_ref().map(|field| *field)
2016 }
2017 pub fn set_total_network_transactions(&mut self, field: u64) {
2019 self.total_network_transactions = Some(field);
2020 }
2021 pub fn with_total_network_transactions(mut self, field: u64) -> Self {
2023 self.set_total_network_transactions(field);
2024 self
2025 }
2026 pub fn content_digest_opt_mut(&mut self) -> Option<&mut String> {
2028 self.content_digest.as_mut().map(|field| field as _)
2029 }
2030 pub fn content_digest_mut(&mut self) -> &mut String {
2033 self.content_digest.get_or_insert_default()
2034 }
2035 pub fn content_digest_opt(&self) -> Option<&str> {
2037 self.content_digest.as_ref().map(|field| field as _)
2038 }
2039 pub fn set_content_digest<T: Into<String>>(&mut self, field: T) {
2041 self.content_digest = Some(field.into().into());
2042 }
2043 pub fn with_content_digest<T: Into<String>>(mut self, field: T) -> Self {
2045 self.set_content_digest(field.into());
2046 self
2047 }
2048 pub fn previous_digest_opt_mut(&mut self) -> Option<&mut String> {
2050 self.previous_digest.as_mut().map(|field| field as _)
2051 }
2052 pub fn previous_digest_mut(&mut self) -> &mut String {
2055 self.previous_digest.get_or_insert_default()
2056 }
2057 pub fn previous_digest_opt(&self) -> Option<&str> {
2059 self.previous_digest.as_ref().map(|field| field as _)
2060 }
2061 pub fn set_previous_digest<T: Into<String>>(&mut self, field: T) {
2063 self.previous_digest = Some(field.into().into());
2064 }
2065 pub fn with_previous_digest<T: Into<String>>(mut self, field: T) -> Self {
2067 self.set_previous_digest(field.into());
2068 self
2069 }
2070 pub fn epoch_rolling_gas_cost_summary(&self) -> &super::GasCostSummary {
2072 self.epoch_rolling_gas_cost_summary
2073 .as_ref()
2074 .map(|field| field as _)
2075 .unwrap_or_else(|| super::GasCostSummary::default_instance() as _)
2076 }
2077 pub fn epoch_rolling_gas_cost_summary_opt_mut(
2079 &mut self,
2080 ) -> Option<&mut super::GasCostSummary> {
2081 self.epoch_rolling_gas_cost_summary.as_mut().map(|field| field as _)
2082 }
2083 pub fn epoch_rolling_gas_cost_summary_mut(
2086 &mut self,
2087 ) -> &mut super::GasCostSummary {
2088 self.epoch_rolling_gas_cost_summary.get_or_insert_default()
2089 }
2090 pub fn epoch_rolling_gas_cost_summary_opt(
2092 &self,
2093 ) -> Option<&super::GasCostSummary> {
2094 self.epoch_rolling_gas_cost_summary.as_ref().map(|field| field as _)
2095 }
2096 pub fn set_epoch_rolling_gas_cost_summary<T: Into<super::GasCostSummary>>(
2098 &mut self,
2099 field: T,
2100 ) {
2101 self.epoch_rolling_gas_cost_summary = Some(field.into().into());
2102 }
2103 pub fn with_epoch_rolling_gas_cost_summary<T: Into<super::GasCostSummary>>(
2105 mut self,
2106 field: T,
2107 ) -> Self {
2108 self.set_epoch_rolling_gas_cost_summary(field.into());
2109 self
2110 }
2111 pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
2113 self.timestamp.as_mut().map(|field| field as _)
2114 }
2115 pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
2118 self.timestamp.get_or_insert_default()
2119 }
2120 pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
2122 self.timestamp.as_ref().map(|field| field as _)
2123 }
2124 pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
2126 self.timestamp = Some(field.into().into());
2127 }
2128 pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
2130 mut self,
2131 field: T,
2132 ) -> Self {
2133 self.set_timestamp(field.into());
2134 self
2135 }
2136 pub fn commitments(&self) -> &[super::CheckpointCommitment] {
2138 &self.commitments
2139 }
2140 pub fn commitments_mut(&mut self) -> &mut Vec<super::CheckpointCommitment> {
2143 &mut self.commitments
2144 }
2145 pub fn set_commitments(&mut self, field: Vec<super::CheckpointCommitment>) {
2147 self.commitments = field;
2148 }
2149 pub fn with_commitments(
2151 mut self,
2152 field: Vec<super::CheckpointCommitment>,
2153 ) -> Self {
2154 self.set_commitments(field);
2155 self
2156 }
2157 pub fn end_of_epoch_data(&self) -> &super::EndOfEpochData {
2159 self.end_of_epoch_data
2160 .as_ref()
2161 .map(|field| field as _)
2162 .unwrap_or_else(|| super::EndOfEpochData::default_instance() as _)
2163 }
2164 pub fn end_of_epoch_data_opt_mut(
2166 &mut self,
2167 ) -> Option<&mut super::EndOfEpochData> {
2168 self.end_of_epoch_data.as_mut().map(|field| field as _)
2169 }
2170 pub fn end_of_epoch_data_mut(&mut self) -> &mut super::EndOfEpochData {
2173 self.end_of_epoch_data.get_or_insert_default()
2174 }
2175 pub fn end_of_epoch_data_opt(&self) -> Option<&super::EndOfEpochData> {
2177 self.end_of_epoch_data.as_ref().map(|field| field as _)
2178 }
2179 pub fn set_end_of_epoch_data<T: Into<super::EndOfEpochData>>(
2181 &mut self,
2182 field: T,
2183 ) {
2184 self.end_of_epoch_data = Some(field.into().into());
2185 }
2186 pub fn with_end_of_epoch_data<T: Into<super::EndOfEpochData>>(
2188 mut self,
2189 field: T,
2190 ) -> Self {
2191 self.set_end_of_epoch_data(field.into());
2192 self
2193 }
2194 pub fn version_specific_data_opt(&self) -> Option<&[u8]> {
2196 self.version_specific_data.as_ref().map(|field| field as _)
2197 }
2198 pub fn set_version_specific_data<T: Into<::prost::bytes::Bytes>>(
2200 &mut self,
2201 field: T,
2202 ) {
2203 self.version_specific_data = Some(field.into().into());
2204 }
2205 pub fn with_version_specific_data<T: Into<::prost::bytes::Bytes>>(
2207 mut self,
2208 field: T,
2209 ) -> Self {
2210 self.set_version_specific_data(field.into());
2211 self
2212 }
2213 }
2214 impl super::CheckpointedTransactionInfo {
2215 pub const fn const_default() -> Self {
2216 Self {
2217 transaction: None,
2218 effects: None,
2219 signatures: Vec::new(),
2220 address_aliases_versions: Vec::new(),
2221 }
2222 }
2223 #[doc(hidden)]
2224 pub fn default_instance() -> &'static Self {
2225 static DEFAULT: super::CheckpointedTransactionInfo = super::CheckpointedTransactionInfo::const_default();
2226 &DEFAULT
2227 }
2228 pub fn transaction_opt_mut(&mut self) -> Option<&mut String> {
2230 self.transaction.as_mut().map(|field| field as _)
2231 }
2232 pub fn transaction_mut(&mut self) -> &mut String {
2235 self.transaction.get_or_insert_default()
2236 }
2237 pub fn transaction_opt(&self) -> Option<&str> {
2239 self.transaction.as_ref().map(|field| field as _)
2240 }
2241 pub fn set_transaction<T: Into<String>>(&mut self, field: T) {
2243 self.transaction = Some(field.into().into());
2244 }
2245 pub fn with_transaction<T: Into<String>>(mut self, field: T) -> Self {
2247 self.set_transaction(field.into());
2248 self
2249 }
2250 pub fn effects_opt_mut(&mut self) -> Option<&mut String> {
2252 self.effects.as_mut().map(|field| field as _)
2253 }
2254 pub fn effects_mut(&mut self) -> &mut String {
2257 self.effects.get_or_insert_default()
2258 }
2259 pub fn effects_opt(&self) -> Option<&str> {
2261 self.effects.as_ref().map(|field| field as _)
2262 }
2263 pub fn set_effects<T: Into<String>>(&mut self, field: T) {
2265 self.effects = Some(field.into().into());
2266 }
2267 pub fn with_effects<T: Into<String>>(mut self, field: T) -> Self {
2269 self.set_effects(field.into());
2270 self
2271 }
2272 pub fn signatures(&self) -> &[super::UserSignature] {
2274 &self.signatures
2275 }
2276 pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
2279 &mut self.signatures
2280 }
2281 pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
2283 self.signatures = field;
2284 }
2285 pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
2287 self.set_signatures(field);
2288 self
2289 }
2290 pub fn address_aliases_versions(&self) -> &[super::AddressAliasesVersion] {
2292 &self.address_aliases_versions
2293 }
2294 pub fn address_aliases_versions_mut(
2297 &mut self,
2298 ) -> &mut Vec<super::AddressAliasesVersion> {
2299 &mut self.address_aliases_versions
2300 }
2301 pub fn set_address_aliases_versions(
2303 &mut self,
2304 field: Vec<super::AddressAliasesVersion>,
2305 ) {
2306 self.address_aliases_versions = field;
2307 }
2308 pub fn with_address_aliases_versions(
2310 mut self,
2311 field: Vec<super::AddressAliasesVersion>,
2312 ) -> Self {
2313 self.set_address_aliases_versions(field);
2314 self
2315 }
2316 }
2317 impl super::CircomG1 {
2318 pub const fn const_default() -> Self {
2319 Self {
2320 e0: None,
2321 e1: None,
2322 e2: None,
2323 }
2324 }
2325 #[doc(hidden)]
2326 pub fn default_instance() -> &'static Self {
2327 static DEFAULT: super::CircomG1 = super::CircomG1::const_default();
2328 &DEFAULT
2329 }
2330 pub fn e0_opt_mut(&mut self) -> Option<&mut String> {
2332 self.e0.as_mut().map(|field| field as _)
2333 }
2334 pub fn e0_mut(&mut self) -> &mut String {
2337 self.e0.get_or_insert_default()
2338 }
2339 pub fn e0_opt(&self) -> Option<&str> {
2341 self.e0.as_ref().map(|field| field as _)
2342 }
2343 pub fn set_e0<T: Into<String>>(&mut self, field: T) {
2345 self.e0 = Some(field.into().into());
2346 }
2347 pub fn with_e0<T: Into<String>>(mut self, field: T) -> Self {
2349 self.set_e0(field.into());
2350 self
2351 }
2352 pub fn e1_opt_mut(&mut self) -> Option<&mut String> {
2354 self.e1.as_mut().map(|field| field as _)
2355 }
2356 pub fn e1_mut(&mut self) -> &mut String {
2359 self.e1.get_or_insert_default()
2360 }
2361 pub fn e1_opt(&self) -> Option<&str> {
2363 self.e1.as_ref().map(|field| field as _)
2364 }
2365 pub fn set_e1<T: Into<String>>(&mut self, field: T) {
2367 self.e1 = Some(field.into().into());
2368 }
2369 pub fn with_e1<T: Into<String>>(mut self, field: T) -> Self {
2371 self.set_e1(field.into());
2372 self
2373 }
2374 pub fn e2_opt_mut(&mut self) -> Option<&mut String> {
2376 self.e2.as_mut().map(|field| field as _)
2377 }
2378 pub fn e2_mut(&mut self) -> &mut String {
2381 self.e2.get_or_insert_default()
2382 }
2383 pub fn e2_opt(&self) -> Option<&str> {
2385 self.e2.as_ref().map(|field| field as _)
2386 }
2387 pub fn set_e2<T: Into<String>>(&mut self, field: T) {
2389 self.e2 = Some(field.into().into());
2390 }
2391 pub fn with_e2<T: Into<String>>(mut self, field: T) -> Self {
2393 self.set_e2(field.into());
2394 self
2395 }
2396 }
2397 impl super::CircomG2 {
2398 pub const fn const_default() -> Self {
2399 Self {
2400 e00: None,
2401 e01: None,
2402 e10: None,
2403 e11: None,
2404 e20: None,
2405 e21: None,
2406 }
2407 }
2408 #[doc(hidden)]
2409 pub fn default_instance() -> &'static Self {
2410 static DEFAULT: super::CircomG2 = super::CircomG2::const_default();
2411 &DEFAULT
2412 }
2413 pub fn e00_opt_mut(&mut self) -> Option<&mut String> {
2415 self.e00.as_mut().map(|field| field as _)
2416 }
2417 pub fn e00_mut(&mut self) -> &mut String {
2420 self.e00.get_or_insert_default()
2421 }
2422 pub fn e00_opt(&self) -> Option<&str> {
2424 self.e00.as_ref().map(|field| field as _)
2425 }
2426 pub fn set_e00<T: Into<String>>(&mut self, field: T) {
2428 self.e00 = Some(field.into().into());
2429 }
2430 pub fn with_e00<T: Into<String>>(mut self, field: T) -> Self {
2432 self.set_e00(field.into());
2433 self
2434 }
2435 pub fn e01_opt_mut(&mut self) -> Option<&mut String> {
2437 self.e01.as_mut().map(|field| field as _)
2438 }
2439 pub fn e01_mut(&mut self) -> &mut String {
2442 self.e01.get_or_insert_default()
2443 }
2444 pub fn e01_opt(&self) -> Option<&str> {
2446 self.e01.as_ref().map(|field| field as _)
2447 }
2448 pub fn set_e01<T: Into<String>>(&mut self, field: T) {
2450 self.e01 = Some(field.into().into());
2451 }
2452 pub fn with_e01<T: Into<String>>(mut self, field: T) -> Self {
2454 self.set_e01(field.into());
2455 self
2456 }
2457 pub fn e10_opt_mut(&mut self) -> Option<&mut String> {
2459 self.e10.as_mut().map(|field| field as _)
2460 }
2461 pub fn e10_mut(&mut self) -> &mut String {
2464 self.e10.get_or_insert_default()
2465 }
2466 pub fn e10_opt(&self) -> Option<&str> {
2468 self.e10.as_ref().map(|field| field as _)
2469 }
2470 pub fn set_e10<T: Into<String>>(&mut self, field: T) {
2472 self.e10 = Some(field.into().into());
2473 }
2474 pub fn with_e10<T: Into<String>>(mut self, field: T) -> Self {
2476 self.set_e10(field.into());
2477 self
2478 }
2479 pub fn e11_opt_mut(&mut self) -> Option<&mut String> {
2481 self.e11.as_mut().map(|field| field as _)
2482 }
2483 pub fn e11_mut(&mut self) -> &mut String {
2486 self.e11.get_or_insert_default()
2487 }
2488 pub fn e11_opt(&self) -> Option<&str> {
2490 self.e11.as_ref().map(|field| field as _)
2491 }
2492 pub fn set_e11<T: Into<String>>(&mut self, field: T) {
2494 self.e11 = Some(field.into().into());
2495 }
2496 pub fn with_e11<T: Into<String>>(mut self, field: T) -> Self {
2498 self.set_e11(field.into());
2499 self
2500 }
2501 pub fn e20_opt_mut(&mut self) -> Option<&mut String> {
2503 self.e20.as_mut().map(|field| field as _)
2504 }
2505 pub fn e20_mut(&mut self) -> &mut String {
2508 self.e20.get_or_insert_default()
2509 }
2510 pub fn e20_opt(&self) -> Option<&str> {
2512 self.e20.as_ref().map(|field| field as _)
2513 }
2514 pub fn set_e20<T: Into<String>>(&mut self, field: T) {
2516 self.e20 = Some(field.into().into());
2517 }
2518 pub fn with_e20<T: Into<String>>(mut self, field: T) -> Self {
2520 self.set_e20(field.into());
2521 self
2522 }
2523 pub fn e21_opt_mut(&mut self) -> Option<&mut String> {
2525 self.e21.as_mut().map(|field| field as _)
2526 }
2527 pub fn e21_mut(&mut self) -> &mut String {
2530 self.e21.get_or_insert_default()
2531 }
2532 pub fn e21_opt(&self) -> Option<&str> {
2534 self.e21.as_ref().map(|field| field as _)
2535 }
2536 pub fn set_e21<T: Into<String>>(&mut self, field: T) {
2538 self.e21 = Some(field.into().into());
2539 }
2540 pub fn with_e21<T: Into<String>>(mut self, field: T) -> Self {
2542 self.set_e21(field.into());
2543 self
2544 }
2545 }
2546 impl super::CleverError {
2547 pub const fn const_default() -> Self {
2548 Self {
2549 error_code: None,
2550 line_number: None,
2551 constant_name: None,
2552 constant_type: None,
2553 value: None,
2554 }
2555 }
2556 #[doc(hidden)]
2557 pub fn default_instance() -> &'static Self {
2558 static DEFAULT: super::CleverError = super::CleverError::const_default();
2559 &DEFAULT
2560 }
2561 pub fn error_code_opt_mut(&mut self) -> Option<&mut u64> {
2563 self.error_code.as_mut().map(|field| field as _)
2564 }
2565 pub fn error_code_mut(&mut self) -> &mut u64 {
2568 self.error_code.get_or_insert_default()
2569 }
2570 pub fn error_code_opt(&self) -> Option<u64> {
2572 self.error_code.as_ref().map(|field| *field)
2573 }
2574 pub fn set_error_code(&mut self, field: u64) {
2576 self.error_code = Some(field);
2577 }
2578 pub fn with_error_code(mut self, field: u64) -> Self {
2580 self.set_error_code(field);
2581 self
2582 }
2583 pub fn line_number_opt_mut(&mut self) -> Option<&mut u64> {
2585 self.line_number.as_mut().map(|field| field as _)
2586 }
2587 pub fn line_number_mut(&mut self) -> &mut u64 {
2590 self.line_number.get_or_insert_default()
2591 }
2592 pub fn line_number_opt(&self) -> Option<u64> {
2594 self.line_number.as_ref().map(|field| *field)
2595 }
2596 pub fn set_line_number(&mut self, field: u64) {
2598 self.line_number = Some(field);
2599 }
2600 pub fn with_line_number(mut self, field: u64) -> Self {
2602 self.set_line_number(field);
2603 self
2604 }
2605 pub fn constant_name_opt_mut(&mut self) -> Option<&mut String> {
2607 self.constant_name.as_mut().map(|field| field as _)
2608 }
2609 pub fn constant_name_mut(&mut self) -> &mut String {
2612 self.constant_name.get_or_insert_default()
2613 }
2614 pub fn constant_name_opt(&self) -> Option<&str> {
2616 self.constant_name.as_ref().map(|field| field as _)
2617 }
2618 pub fn set_constant_name<T: Into<String>>(&mut self, field: T) {
2620 self.constant_name = Some(field.into().into());
2621 }
2622 pub fn with_constant_name<T: Into<String>>(mut self, field: T) -> Self {
2624 self.set_constant_name(field.into());
2625 self
2626 }
2627 pub fn constant_type_opt_mut(&mut self) -> Option<&mut String> {
2629 self.constant_type.as_mut().map(|field| field as _)
2630 }
2631 pub fn constant_type_mut(&mut self) -> &mut String {
2634 self.constant_type.get_or_insert_default()
2635 }
2636 pub fn constant_type_opt(&self) -> Option<&str> {
2638 self.constant_type.as_ref().map(|field| field as _)
2639 }
2640 pub fn set_constant_type<T: Into<String>>(&mut self, field: T) {
2642 self.constant_type = Some(field.into().into());
2643 }
2644 pub fn with_constant_type<T: Into<String>>(mut self, field: T) -> Self {
2646 self.set_constant_type(field.into());
2647 self
2648 }
2649 pub fn rendered(&self) -> &str {
2651 if let Some(super::clever_error::Value::Rendered(field)) = &self.value {
2652 field as _
2653 } else {
2654 ""
2655 }
2656 }
2657 pub fn rendered_opt(&self) -> Option<&str> {
2659 if let Some(super::clever_error::Value::Rendered(field)) = &self.value {
2660 Some(field as _)
2661 } else {
2662 None
2663 }
2664 }
2665 pub fn rendered_opt_mut(&mut self) -> Option<&mut String> {
2667 if let Some(super::clever_error::Value::Rendered(field)) = &mut self.value {
2668 Some(field as _)
2669 } else {
2670 None
2671 }
2672 }
2673 pub fn rendered_mut(&mut self) -> &mut String {
2677 if self.rendered_opt_mut().is_none() {
2678 self.value = Some(
2679 super::clever_error::Value::Rendered(String::default()),
2680 );
2681 }
2682 self.rendered_opt_mut().unwrap()
2683 }
2684 pub fn set_rendered<T: Into<String>>(&mut self, field: T) {
2687 self.value = Some(super::clever_error::Value::Rendered(field.into().into()));
2688 }
2689 pub fn with_rendered<T: Into<String>>(mut self, field: T) -> Self {
2692 self.set_rendered(field.into());
2693 self
2694 }
2695 pub fn raw(&self) -> &[u8] {
2697 if let Some(super::clever_error::Value::Raw(field)) = &self.value {
2698 field as _
2699 } else {
2700 &[]
2701 }
2702 }
2703 pub fn raw_opt(&self) -> Option<&[u8]> {
2705 if let Some(super::clever_error::Value::Raw(field)) = &self.value {
2706 Some(field as _)
2707 } else {
2708 None
2709 }
2710 }
2711 pub fn raw_opt_mut(&mut self) -> Option<&mut ::prost::bytes::Bytes> {
2713 if let Some(super::clever_error::Value::Raw(field)) = &mut self.value {
2714 Some(field as _)
2715 } else {
2716 None
2717 }
2718 }
2719 pub fn raw_mut(&mut self) -> &mut ::prost::bytes::Bytes {
2723 if self.raw_opt_mut().is_none() {
2724 self.value = Some(
2725 super::clever_error::Value::Raw(::prost::bytes::Bytes::default()),
2726 );
2727 }
2728 self.raw_opt_mut().unwrap()
2729 }
2730 pub fn set_raw<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
2733 self.value = Some(super::clever_error::Value::Raw(field.into().into()));
2734 }
2735 pub fn with_raw<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
2738 self.set_raw(field.into());
2739 self
2740 }
2741 }
2742 impl super::CoinDenyListError {
2743 pub const fn const_default() -> Self {
2744 Self {
2745 address: None,
2746 coin_type: None,
2747 }
2748 }
2749 #[doc(hidden)]
2750 pub fn default_instance() -> &'static Self {
2751 static DEFAULT: super::CoinDenyListError = super::CoinDenyListError::const_default();
2752 &DEFAULT
2753 }
2754 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
2756 self.address.as_mut().map(|field| field as _)
2757 }
2758 pub fn address_mut(&mut self) -> &mut String {
2761 self.address.get_or_insert_default()
2762 }
2763 pub fn address_opt(&self) -> Option<&str> {
2765 self.address.as_ref().map(|field| field as _)
2766 }
2767 pub fn set_address<T: Into<String>>(&mut self, field: T) {
2769 self.address = Some(field.into().into());
2770 }
2771 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
2773 self.set_address(field.into());
2774 self
2775 }
2776 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
2778 self.coin_type.as_mut().map(|field| field as _)
2779 }
2780 pub fn coin_type_mut(&mut self) -> &mut String {
2783 self.coin_type.get_or_insert_default()
2784 }
2785 pub fn coin_type_opt(&self) -> Option<&str> {
2787 self.coin_type.as_ref().map(|field| field as _)
2788 }
2789 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
2791 self.coin_type = Some(field.into().into());
2792 }
2793 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
2795 self.set_coin_type(field.into());
2796 self
2797 }
2798 }
2799 impl super::CoinMetadata {
2800 pub const fn const_default() -> Self {
2801 Self {
2802 id: None,
2803 decimals: None,
2804 name: None,
2805 symbol: None,
2806 description: None,
2807 icon_url: None,
2808 metadata_cap_id: None,
2809 metadata_cap_state: None,
2810 }
2811 }
2812 #[doc(hidden)]
2813 pub fn default_instance() -> &'static Self {
2814 static DEFAULT: super::CoinMetadata = super::CoinMetadata::const_default();
2815 &DEFAULT
2816 }
2817 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
2819 self.id.as_mut().map(|field| field as _)
2820 }
2821 pub fn id_mut(&mut self) -> &mut String {
2824 self.id.get_or_insert_default()
2825 }
2826 pub fn id_opt(&self) -> Option<&str> {
2828 self.id.as_ref().map(|field| field as _)
2829 }
2830 pub fn set_id<T: Into<String>>(&mut self, field: T) {
2832 self.id = Some(field.into().into());
2833 }
2834 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
2836 self.set_id(field.into());
2837 self
2838 }
2839 pub fn decimals_opt_mut(&mut self) -> Option<&mut u32> {
2841 self.decimals.as_mut().map(|field| field as _)
2842 }
2843 pub fn decimals_mut(&mut self) -> &mut u32 {
2846 self.decimals.get_or_insert_default()
2847 }
2848 pub fn decimals_opt(&self) -> Option<u32> {
2850 self.decimals.as_ref().map(|field| *field)
2851 }
2852 pub fn set_decimals(&mut self, field: u32) {
2854 self.decimals = Some(field);
2855 }
2856 pub fn with_decimals(mut self, field: u32) -> Self {
2858 self.set_decimals(field);
2859 self
2860 }
2861 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
2863 self.name.as_mut().map(|field| field as _)
2864 }
2865 pub fn name_mut(&mut self) -> &mut String {
2868 self.name.get_or_insert_default()
2869 }
2870 pub fn name_opt(&self) -> Option<&str> {
2872 self.name.as_ref().map(|field| field as _)
2873 }
2874 pub fn set_name<T: Into<String>>(&mut self, field: T) {
2876 self.name = Some(field.into().into());
2877 }
2878 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
2880 self.set_name(field.into());
2881 self
2882 }
2883 pub fn symbol_opt_mut(&mut self) -> Option<&mut String> {
2885 self.symbol.as_mut().map(|field| field as _)
2886 }
2887 pub fn symbol_mut(&mut self) -> &mut String {
2890 self.symbol.get_or_insert_default()
2891 }
2892 pub fn symbol_opt(&self) -> Option<&str> {
2894 self.symbol.as_ref().map(|field| field as _)
2895 }
2896 pub fn set_symbol<T: Into<String>>(&mut self, field: T) {
2898 self.symbol = Some(field.into().into());
2899 }
2900 pub fn with_symbol<T: Into<String>>(mut self, field: T) -> Self {
2902 self.set_symbol(field.into());
2903 self
2904 }
2905 pub fn description_opt_mut(&mut self) -> Option<&mut String> {
2907 self.description.as_mut().map(|field| field as _)
2908 }
2909 pub fn description_mut(&mut self) -> &mut String {
2912 self.description.get_or_insert_default()
2913 }
2914 pub fn description_opt(&self) -> Option<&str> {
2916 self.description.as_ref().map(|field| field as _)
2917 }
2918 pub fn set_description<T: Into<String>>(&mut self, field: T) {
2920 self.description = Some(field.into().into());
2921 }
2922 pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
2924 self.set_description(field.into());
2925 self
2926 }
2927 pub fn icon_url_opt_mut(&mut self) -> Option<&mut String> {
2929 self.icon_url.as_mut().map(|field| field as _)
2930 }
2931 pub fn icon_url_mut(&mut self) -> &mut String {
2934 self.icon_url.get_or_insert_default()
2935 }
2936 pub fn icon_url_opt(&self) -> Option<&str> {
2938 self.icon_url.as_ref().map(|field| field as _)
2939 }
2940 pub fn set_icon_url<T: Into<String>>(&mut self, field: T) {
2942 self.icon_url = Some(field.into().into());
2943 }
2944 pub fn with_icon_url<T: Into<String>>(mut self, field: T) -> Self {
2946 self.set_icon_url(field.into());
2947 self
2948 }
2949 pub fn metadata_cap_id_opt_mut(&mut self) -> Option<&mut String> {
2951 self.metadata_cap_id.as_mut().map(|field| field as _)
2952 }
2953 pub fn metadata_cap_id_mut(&mut self) -> &mut String {
2956 self.metadata_cap_id.get_or_insert_default()
2957 }
2958 pub fn metadata_cap_id_opt(&self) -> Option<&str> {
2960 self.metadata_cap_id.as_ref().map(|field| field as _)
2961 }
2962 pub fn set_metadata_cap_id<T: Into<String>>(&mut self, field: T) {
2964 self.metadata_cap_id = Some(field.into().into());
2965 }
2966 pub fn with_metadata_cap_id<T: Into<String>>(mut self, field: T) -> Self {
2968 self.set_metadata_cap_id(field.into());
2969 self
2970 }
2971 pub fn with_metadata_cap_state<T: Into<super::coin_metadata::MetadataCapState>>(
2973 mut self,
2974 field: T,
2975 ) -> Self {
2976 self.set_metadata_cap_state(field.into());
2977 self
2978 }
2979 }
2980 impl super::CoinTreasury {
2981 pub const fn const_default() -> Self {
2982 Self {
2983 id: None,
2984 total_supply: None,
2985 supply_state: None,
2986 }
2987 }
2988 #[doc(hidden)]
2989 pub fn default_instance() -> &'static Self {
2990 static DEFAULT: super::CoinTreasury = super::CoinTreasury::const_default();
2991 &DEFAULT
2992 }
2993 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
2995 self.id.as_mut().map(|field| field as _)
2996 }
2997 pub fn id_mut(&mut self) -> &mut String {
3000 self.id.get_or_insert_default()
3001 }
3002 pub fn id_opt(&self) -> Option<&str> {
3004 self.id.as_ref().map(|field| field as _)
3005 }
3006 pub fn set_id<T: Into<String>>(&mut self, field: T) {
3008 self.id = Some(field.into().into());
3009 }
3010 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
3012 self.set_id(field.into());
3013 self
3014 }
3015 pub fn total_supply_opt_mut(&mut self) -> Option<&mut u64> {
3017 self.total_supply.as_mut().map(|field| field as _)
3018 }
3019 pub fn total_supply_mut(&mut self) -> &mut u64 {
3022 self.total_supply.get_or_insert_default()
3023 }
3024 pub fn total_supply_opt(&self) -> Option<u64> {
3026 self.total_supply.as_ref().map(|field| *field)
3027 }
3028 pub fn set_total_supply(&mut self, field: u64) {
3030 self.total_supply = Some(field);
3031 }
3032 pub fn with_total_supply(mut self, field: u64) -> Self {
3034 self.set_total_supply(field);
3035 self
3036 }
3037 pub fn with_supply_state<T: Into<super::coin_treasury::SupplyState>>(
3039 mut self,
3040 field: T,
3041 ) -> Self {
3042 self.set_supply_state(field.into());
3043 self
3044 }
3045 }
3046 impl super::Command {
3047 pub const fn const_default() -> Self {
3048 Self { command: None }
3049 }
3050 #[doc(hidden)]
3051 pub fn default_instance() -> &'static Self {
3052 static DEFAULT: super::Command = super::Command::const_default();
3053 &DEFAULT
3054 }
3055 pub fn move_call(&self) -> &super::MoveCall {
3057 if let Some(super::command::Command::MoveCall(field)) = &self.command {
3058 field as _
3059 } else {
3060 super::MoveCall::default_instance() as _
3061 }
3062 }
3063 pub fn move_call_opt(&self) -> Option<&super::MoveCall> {
3065 if let Some(super::command::Command::MoveCall(field)) = &self.command {
3066 Some(field as _)
3067 } else {
3068 None
3069 }
3070 }
3071 pub fn move_call_opt_mut(&mut self) -> Option<&mut super::MoveCall> {
3073 if let Some(super::command::Command::MoveCall(field)) = &mut self.command {
3074 Some(field as _)
3075 } else {
3076 None
3077 }
3078 }
3079 pub fn move_call_mut(&mut self) -> &mut super::MoveCall {
3083 if self.move_call_opt_mut().is_none() {
3084 self.command = Some(
3085 super::command::Command::MoveCall(super::MoveCall::default()),
3086 );
3087 }
3088 self.move_call_opt_mut().unwrap()
3089 }
3090 pub fn set_move_call<T: Into<super::MoveCall>>(&mut self, field: T) {
3093 self.command = Some(super::command::Command::MoveCall(field.into().into()));
3094 }
3095 pub fn with_move_call<T: Into<super::MoveCall>>(mut self, field: T) -> Self {
3098 self.set_move_call(field.into());
3099 self
3100 }
3101 pub fn transfer_objects(&self) -> &super::TransferObjects {
3103 if let Some(super::command::Command::TransferObjects(field)) = &self.command
3104 {
3105 field as _
3106 } else {
3107 super::TransferObjects::default_instance() as _
3108 }
3109 }
3110 pub fn transfer_objects_opt(&self) -> Option<&super::TransferObjects> {
3112 if let Some(super::command::Command::TransferObjects(field)) = &self.command
3113 {
3114 Some(field as _)
3115 } else {
3116 None
3117 }
3118 }
3119 pub fn transfer_objects_opt_mut(
3121 &mut self,
3122 ) -> Option<&mut super::TransferObjects> {
3123 if let Some(super::command::Command::TransferObjects(field)) = &mut self
3124 .command
3125 {
3126 Some(field as _)
3127 } else {
3128 None
3129 }
3130 }
3131 pub fn transfer_objects_mut(&mut self) -> &mut super::TransferObjects {
3135 if self.transfer_objects_opt_mut().is_none() {
3136 self.command = Some(
3137 super::command::Command::TransferObjects(
3138 super::TransferObjects::default(),
3139 ),
3140 );
3141 }
3142 self.transfer_objects_opt_mut().unwrap()
3143 }
3144 pub fn set_transfer_objects<T: Into<super::TransferObjects>>(
3147 &mut self,
3148 field: T,
3149 ) {
3150 self.command = Some(
3151 super::command::Command::TransferObjects(field.into().into()),
3152 );
3153 }
3154 pub fn with_transfer_objects<T: Into<super::TransferObjects>>(
3157 mut self,
3158 field: T,
3159 ) -> Self {
3160 self.set_transfer_objects(field.into());
3161 self
3162 }
3163 pub fn split_coins(&self) -> &super::SplitCoins {
3165 if let Some(super::command::Command::SplitCoins(field)) = &self.command {
3166 field as _
3167 } else {
3168 super::SplitCoins::default_instance() as _
3169 }
3170 }
3171 pub fn split_coins_opt(&self) -> Option<&super::SplitCoins> {
3173 if let Some(super::command::Command::SplitCoins(field)) = &self.command {
3174 Some(field as _)
3175 } else {
3176 None
3177 }
3178 }
3179 pub fn split_coins_opt_mut(&mut self) -> Option<&mut super::SplitCoins> {
3181 if let Some(super::command::Command::SplitCoins(field)) = &mut self.command {
3182 Some(field as _)
3183 } else {
3184 None
3185 }
3186 }
3187 pub fn split_coins_mut(&mut self) -> &mut super::SplitCoins {
3191 if self.split_coins_opt_mut().is_none() {
3192 self.command = Some(
3193 super::command::Command::SplitCoins(super::SplitCoins::default()),
3194 );
3195 }
3196 self.split_coins_opt_mut().unwrap()
3197 }
3198 pub fn set_split_coins<T: Into<super::SplitCoins>>(&mut self, field: T) {
3201 self.command = Some(
3202 super::command::Command::SplitCoins(field.into().into()),
3203 );
3204 }
3205 pub fn with_split_coins<T: Into<super::SplitCoins>>(mut self, field: T) -> Self {
3208 self.set_split_coins(field.into());
3209 self
3210 }
3211 pub fn merge_coins(&self) -> &super::MergeCoins {
3213 if let Some(super::command::Command::MergeCoins(field)) = &self.command {
3214 field as _
3215 } else {
3216 super::MergeCoins::default_instance() as _
3217 }
3218 }
3219 pub fn merge_coins_opt(&self) -> Option<&super::MergeCoins> {
3221 if let Some(super::command::Command::MergeCoins(field)) = &self.command {
3222 Some(field as _)
3223 } else {
3224 None
3225 }
3226 }
3227 pub fn merge_coins_opt_mut(&mut self) -> Option<&mut super::MergeCoins> {
3229 if let Some(super::command::Command::MergeCoins(field)) = &mut self.command {
3230 Some(field as _)
3231 } else {
3232 None
3233 }
3234 }
3235 pub fn merge_coins_mut(&mut self) -> &mut super::MergeCoins {
3239 if self.merge_coins_opt_mut().is_none() {
3240 self.command = Some(
3241 super::command::Command::MergeCoins(super::MergeCoins::default()),
3242 );
3243 }
3244 self.merge_coins_opt_mut().unwrap()
3245 }
3246 pub fn set_merge_coins<T: Into<super::MergeCoins>>(&mut self, field: T) {
3249 self.command = Some(
3250 super::command::Command::MergeCoins(field.into().into()),
3251 );
3252 }
3253 pub fn with_merge_coins<T: Into<super::MergeCoins>>(mut self, field: T) -> Self {
3256 self.set_merge_coins(field.into());
3257 self
3258 }
3259 pub fn publish(&self) -> &super::Publish {
3261 if let Some(super::command::Command::Publish(field)) = &self.command {
3262 field as _
3263 } else {
3264 super::Publish::default_instance() as _
3265 }
3266 }
3267 pub fn publish_opt(&self) -> Option<&super::Publish> {
3269 if let Some(super::command::Command::Publish(field)) = &self.command {
3270 Some(field as _)
3271 } else {
3272 None
3273 }
3274 }
3275 pub fn publish_opt_mut(&mut self) -> Option<&mut super::Publish> {
3277 if let Some(super::command::Command::Publish(field)) = &mut self.command {
3278 Some(field as _)
3279 } else {
3280 None
3281 }
3282 }
3283 pub fn publish_mut(&mut self) -> &mut super::Publish {
3287 if self.publish_opt_mut().is_none() {
3288 self.command = Some(
3289 super::command::Command::Publish(super::Publish::default()),
3290 );
3291 }
3292 self.publish_opt_mut().unwrap()
3293 }
3294 pub fn set_publish<T: Into<super::Publish>>(&mut self, field: T) {
3297 self.command = Some(super::command::Command::Publish(field.into().into()));
3298 }
3299 pub fn with_publish<T: Into<super::Publish>>(mut self, field: T) -> Self {
3302 self.set_publish(field.into());
3303 self
3304 }
3305 pub fn make_move_vector(&self) -> &super::MakeMoveVector {
3307 if let Some(super::command::Command::MakeMoveVector(field)) = &self.command {
3308 field as _
3309 } else {
3310 super::MakeMoveVector::default_instance() as _
3311 }
3312 }
3313 pub fn make_move_vector_opt(&self) -> Option<&super::MakeMoveVector> {
3315 if let Some(super::command::Command::MakeMoveVector(field)) = &self.command {
3316 Some(field as _)
3317 } else {
3318 None
3319 }
3320 }
3321 pub fn make_move_vector_opt_mut(
3323 &mut self,
3324 ) -> Option<&mut super::MakeMoveVector> {
3325 if let Some(super::command::Command::MakeMoveVector(field)) = &mut self
3326 .command
3327 {
3328 Some(field as _)
3329 } else {
3330 None
3331 }
3332 }
3333 pub fn make_move_vector_mut(&mut self) -> &mut super::MakeMoveVector {
3337 if self.make_move_vector_opt_mut().is_none() {
3338 self.command = Some(
3339 super::command::Command::MakeMoveVector(
3340 super::MakeMoveVector::default(),
3341 ),
3342 );
3343 }
3344 self.make_move_vector_opt_mut().unwrap()
3345 }
3346 pub fn set_make_move_vector<T: Into<super::MakeMoveVector>>(
3349 &mut self,
3350 field: T,
3351 ) {
3352 self.command = Some(
3353 super::command::Command::MakeMoveVector(field.into().into()),
3354 );
3355 }
3356 pub fn with_make_move_vector<T: Into<super::MakeMoveVector>>(
3359 mut self,
3360 field: T,
3361 ) -> Self {
3362 self.set_make_move_vector(field.into());
3363 self
3364 }
3365 pub fn upgrade(&self) -> &super::Upgrade {
3367 if let Some(super::command::Command::Upgrade(field)) = &self.command {
3368 field as _
3369 } else {
3370 super::Upgrade::default_instance() as _
3371 }
3372 }
3373 pub fn upgrade_opt(&self) -> Option<&super::Upgrade> {
3375 if let Some(super::command::Command::Upgrade(field)) = &self.command {
3376 Some(field as _)
3377 } else {
3378 None
3379 }
3380 }
3381 pub fn upgrade_opt_mut(&mut self) -> Option<&mut super::Upgrade> {
3383 if let Some(super::command::Command::Upgrade(field)) = &mut self.command {
3384 Some(field as _)
3385 } else {
3386 None
3387 }
3388 }
3389 pub fn upgrade_mut(&mut self) -> &mut super::Upgrade {
3393 if self.upgrade_opt_mut().is_none() {
3394 self.command = Some(
3395 super::command::Command::Upgrade(super::Upgrade::default()),
3396 );
3397 }
3398 self.upgrade_opt_mut().unwrap()
3399 }
3400 pub fn set_upgrade<T: Into<super::Upgrade>>(&mut self, field: T) {
3403 self.command = Some(super::command::Command::Upgrade(field.into().into()));
3404 }
3405 pub fn with_upgrade<T: Into<super::Upgrade>>(mut self, field: T) -> Self {
3408 self.set_upgrade(field.into());
3409 self
3410 }
3411 }
3412 impl super::CommandArgumentError {
3413 pub const fn const_default() -> Self {
3414 Self {
3415 argument: None,
3416 kind: None,
3417 index_error: None,
3418 }
3419 }
3420 #[doc(hidden)]
3421 pub fn default_instance() -> &'static Self {
3422 static DEFAULT: super::CommandArgumentError = super::CommandArgumentError::const_default();
3423 &DEFAULT
3424 }
3425 pub fn argument_opt_mut(&mut self) -> Option<&mut u32> {
3427 self.argument.as_mut().map(|field| field as _)
3428 }
3429 pub fn argument_mut(&mut self) -> &mut u32 {
3432 self.argument.get_or_insert_default()
3433 }
3434 pub fn argument_opt(&self) -> Option<u32> {
3436 self.argument.as_ref().map(|field| *field)
3437 }
3438 pub fn set_argument(&mut self, field: u32) {
3440 self.argument = Some(field);
3441 }
3442 pub fn with_argument(mut self, field: u32) -> Self {
3444 self.set_argument(field);
3445 self
3446 }
3447 pub fn with_kind<
3449 T: Into<super::command_argument_error::CommandArgumentErrorKind>,
3450 >(mut self, field: T) -> Self {
3451 self.set_kind(field.into());
3452 self
3453 }
3454 pub fn index_error(&self) -> &super::IndexError {
3456 self.index_error
3457 .as_ref()
3458 .map(|field| field as _)
3459 .unwrap_or_else(|| super::IndexError::default_instance() as _)
3460 }
3461 pub fn index_error_opt_mut(&mut self) -> Option<&mut super::IndexError> {
3463 self.index_error.as_mut().map(|field| field as _)
3464 }
3465 pub fn index_error_mut(&mut self) -> &mut super::IndexError {
3468 self.index_error.get_or_insert_default()
3469 }
3470 pub fn index_error_opt(&self) -> Option<&super::IndexError> {
3472 self.index_error.as_ref().map(|field| field as _)
3473 }
3474 pub fn set_index_error<T: Into<super::IndexError>>(&mut self, field: T) {
3476 self.index_error = Some(field.into().into());
3477 }
3478 pub fn with_index_error<T: Into<super::IndexError>>(mut self, field: T) -> Self {
3480 self.set_index_error(field.into());
3481 self
3482 }
3483 }
3484 impl super::CommandOutput {
3485 pub const fn const_default() -> Self {
3486 Self {
3487 argument: None,
3488 value: None,
3489 json: None,
3490 }
3491 }
3492 #[doc(hidden)]
3493 pub fn default_instance() -> &'static Self {
3494 static DEFAULT: super::CommandOutput = super::CommandOutput::const_default();
3495 &DEFAULT
3496 }
3497 pub fn argument(&self) -> &super::Argument {
3499 self.argument
3500 .as_ref()
3501 .map(|field| field as _)
3502 .unwrap_or_else(|| super::Argument::default_instance() as _)
3503 }
3504 pub fn argument_opt_mut(&mut self) -> Option<&mut super::Argument> {
3506 self.argument.as_mut().map(|field| field as _)
3507 }
3508 pub fn argument_mut(&mut self) -> &mut super::Argument {
3511 self.argument.get_or_insert_default()
3512 }
3513 pub fn argument_opt(&self) -> Option<&super::Argument> {
3515 self.argument.as_ref().map(|field| field as _)
3516 }
3517 pub fn set_argument<T: Into<super::Argument>>(&mut self, field: T) {
3519 self.argument = Some(field.into().into());
3520 }
3521 pub fn with_argument<T: Into<super::Argument>>(mut self, field: T) -> Self {
3523 self.set_argument(field.into());
3524 self
3525 }
3526 pub fn value(&self) -> &super::Bcs {
3528 self.value
3529 .as_ref()
3530 .map(|field| field as _)
3531 .unwrap_or_else(|| super::Bcs::default_instance() as _)
3532 }
3533 pub fn value_opt_mut(&mut self) -> Option<&mut super::Bcs> {
3535 self.value.as_mut().map(|field| field as _)
3536 }
3537 pub fn value_mut(&mut self) -> &mut super::Bcs {
3540 self.value.get_or_insert_default()
3541 }
3542 pub fn value_opt(&self) -> Option<&super::Bcs> {
3544 self.value.as_ref().map(|field| field as _)
3545 }
3546 pub fn set_value<T: Into<super::Bcs>>(&mut self, field: T) {
3548 self.value = Some(field.into().into());
3549 }
3550 pub fn with_value<T: Into<super::Bcs>>(mut self, field: T) -> Self {
3552 self.set_value(field.into());
3553 self
3554 }
3555 pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
3557 self.json.as_mut().map(|field| field as _)
3558 }
3559 pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
3562 self.json.get_or_insert_default()
3563 }
3564 pub fn json_opt(&self) -> Option<&::prost_types::Value> {
3566 self.json.as_ref().map(|field| field as _)
3567 }
3568 pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
3570 self.json = Some(field.into().into());
3571 }
3572 pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
3574 self.set_json(field.into());
3575 self
3576 }
3577 }
3578 impl super::CommandResult {
3579 pub const fn const_default() -> Self {
3580 Self {
3581 return_values: Vec::new(),
3582 mutated_by_ref: Vec::new(),
3583 }
3584 }
3585 #[doc(hidden)]
3586 pub fn default_instance() -> &'static Self {
3587 static DEFAULT: super::CommandResult = super::CommandResult::const_default();
3588 &DEFAULT
3589 }
3590 pub fn return_values(&self) -> &[super::CommandOutput] {
3592 &self.return_values
3593 }
3594 pub fn return_values_mut(&mut self) -> &mut Vec<super::CommandOutput> {
3597 &mut self.return_values
3598 }
3599 pub fn set_return_values(&mut self, field: Vec<super::CommandOutput>) {
3601 self.return_values = field;
3602 }
3603 pub fn with_return_values(mut self, field: Vec<super::CommandOutput>) -> Self {
3605 self.set_return_values(field);
3606 self
3607 }
3608 pub fn mutated_by_ref(&self) -> &[super::CommandOutput] {
3610 &self.mutated_by_ref
3611 }
3612 pub fn mutated_by_ref_mut(&mut self) -> &mut Vec<super::CommandOutput> {
3615 &mut self.mutated_by_ref
3616 }
3617 pub fn set_mutated_by_ref(&mut self, field: Vec<super::CommandOutput>) {
3619 self.mutated_by_ref = field;
3620 }
3621 pub fn with_mutated_by_ref(mut self, field: Vec<super::CommandOutput>) -> Self {
3623 self.set_mutated_by_ref(field);
3624 self
3625 }
3626 }
3627 impl super::CongestedObjects {
3628 pub const fn const_default() -> Self {
3629 Self { objects: Vec::new() }
3630 }
3631 #[doc(hidden)]
3632 pub fn default_instance() -> &'static Self {
3633 static DEFAULT: super::CongestedObjects = super::CongestedObjects::const_default();
3634 &DEFAULT
3635 }
3636 pub fn objects(&self) -> &[String] {
3638 &self.objects
3639 }
3640 pub fn objects_mut(&mut self) -> &mut Vec<String> {
3643 &mut self.objects
3644 }
3645 pub fn set_objects(&mut self, field: Vec<String>) {
3647 self.objects = field;
3648 }
3649 pub fn with_objects(mut self, field: Vec<String>) -> Self {
3651 self.set_objects(field);
3652 self
3653 }
3654 }
3655 impl super::ConsensusCommitPrologue {
3656 pub const fn const_default() -> Self {
3657 Self {
3658 epoch: None,
3659 round: None,
3660 commit_timestamp: None,
3661 consensus_commit_digest: None,
3662 sub_dag_index: None,
3663 consensus_determined_version_assignments: None,
3664 additional_state_digest: None,
3665 }
3666 }
3667 #[doc(hidden)]
3668 pub fn default_instance() -> &'static Self {
3669 static DEFAULT: super::ConsensusCommitPrologue = super::ConsensusCommitPrologue::const_default();
3670 &DEFAULT
3671 }
3672 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
3674 self.epoch.as_mut().map(|field| field as _)
3675 }
3676 pub fn epoch_mut(&mut self) -> &mut u64 {
3679 self.epoch.get_or_insert_default()
3680 }
3681 pub fn epoch_opt(&self) -> Option<u64> {
3683 self.epoch.as_ref().map(|field| *field)
3684 }
3685 pub fn set_epoch(&mut self, field: u64) {
3687 self.epoch = Some(field);
3688 }
3689 pub fn with_epoch(mut self, field: u64) -> Self {
3691 self.set_epoch(field);
3692 self
3693 }
3694 pub fn round_opt_mut(&mut self) -> Option<&mut u64> {
3696 self.round.as_mut().map(|field| field as _)
3697 }
3698 pub fn round_mut(&mut self) -> &mut u64 {
3701 self.round.get_or_insert_default()
3702 }
3703 pub fn round_opt(&self) -> Option<u64> {
3705 self.round.as_ref().map(|field| *field)
3706 }
3707 pub fn set_round(&mut self, field: u64) {
3709 self.round = Some(field);
3710 }
3711 pub fn with_round(mut self, field: u64) -> Self {
3713 self.set_round(field);
3714 self
3715 }
3716 pub fn commit_timestamp_opt_mut(
3718 &mut self,
3719 ) -> Option<&mut ::prost_types::Timestamp> {
3720 self.commit_timestamp.as_mut().map(|field| field as _)
3721 }
3722 pub fn commit_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
3725 self.commit_timestamp.get_or_insert_default()
3726 }
3727 pub fn commit_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
3729 self.commit_timestamp.as_ref().map(|field| field as _)
3730 }
3731 pub fn set_commit_timestamp<T: Into<::prost_types::Timestamp>>(
3733 &mut self,
3734 field: T,
3735 ) {
3736 self.commit_timestamp = Some(field.into().into());
3737 }
3738 pub fn with_commit_timestamp<T: Into<::prost_types::Timestamp>>(
3740 mut self,
3741 field: T,
3742 ) -> Self {
3743 self.set_commit_timestamp(field.into());
3744 self
3745 }
3746 pub fn consensus_commit_digest_opt_mut(&mut self) -> Option<&mut String> {
3748 self.consensus_commit_digest.as_mut().map(|field| field as _)
3749 }
3750 pub fn consensus_commit_digest_mut(&mut self) -> &mut String {
3753 self.consensus_commit_digest.get_or_insert_default()
3754 }
3755 pub fn consensus_commit_digest_opt(&self) -> Option<&str> {
3757 self.consensus_commit_digest.as_ref().map(|field| field as _)
3758 }
3759 pub fn set_consensus_commit_digest<T: Into<String>>(&mut self, field: T) {
3761 self.consensus_commit_digest = Some(field.into().into());
3762 }
3763 pub fn with_consensus_commit_digest<T: Into<String>>(
3765 mut self,
3766 field: T,
3767 ) -> Self {
3768 self.set_consensus_commit_digest(field.into());
3769 self
3770 }
3771 pub fn sub_dag_index_opt_mut(&mut self) -> Option<&mut u64> {
3773 self.sub_dag_index.as_mut().map(|field| field as _)
3774 }
3775 pub fn sub_dag_index_mut(&mut self) -> &mut u64 {
3778 self.sub_dag_index.get_or_insert_default()
3779 }
3780 pub fn sub_dag_index_opt(&self) -> Option<u64> {
3782 self.sub_dag_index.as_ref().map(|field| *field)
3783 }
3784 pub fn set_sub_dag_index(&mut self, field: u64) {
3786 self.sub_dag_index = Some(field);
3787 }
3788 pub fn with_sub_dag_index(mut self, field: u64) -> Self {
3790 self.set_sub_dag_index(field);
3791 self
3792 }
3793 pub fn consensus_determined_version_assignments(
3795 &self,
3796 ) -> &super::ConsensusDeterminedVersionAssignments {
3797 self.consensus_determined_version_assignments
3798 .as_ref()
3799 .map(|field| field as _)
3800 .unwrap_or_else(|| {
3801 super::ConsensusDeterminedVersionAssignments::default_instance() as _
3802 })
3803 }
3804 pub fn consensus_determined_version_assignments_opt_mut(
3806 &mut self,
3807 ) -> Option<&mut super::ConsensusDeterminedVersionAssignments> {
3808 self.consensus_determined_version_assignments
3809 .as_mut()
3810 .map(|field| field as _)
3811 }
3812 pub fn consensus_determined_version_assignments_mut(
3815 &mut self,
3816 ) -> &mut super::ConsensusDeterminedVersionAssignments {
3817 self.consensus_determined_version_assignments.get_or_insert_default()
3818 }
3819 pub fn consensus_determined_version_assignments_opt(
3821 &self,
3822 ) -> Option<&super::ConsensusDeterminedVersionAssignments> {
3823 self.consensus_determined_version_assignments
3824 .as_ref()
3825 .map(|field| field as _)
3826 }
3827 pub fn set_consensus_determined_version_assignments<
3829 T: Into<super::ConsensusDeterminedVersionAssignments>,
3830 >(&mut self, field: T) {
3831 self.consensus_determined_version_assignments = Some(field.into().into());
3832 }
3833 pub fn with_consensus_determined_version_assignments<
3835 T: Into<super::ConsensusDeterminedVersionAssignments>,
3836 >(mut self, field: T) -> Self {
3837 self.set_consensus_determined_version_assignments(field.into());
3838 self
3839 }
3840 pub fn additional_state_digest_opt_mut(&mut self) -> Option<&mut String> {
3842 self.additional_state_digest.as_mut().map(|field| field as _)
3843 }
3844 pub fn additional_state_digest_mut(&mut self) -> &mut String {
3847 self.additional_state_digest.get_or_insert_default()
3848 }
3849 pub fn additional_state_digest_opt(&self) -> Option<&str> {
3851 self.additional_state_digest.as_ref().map(|field| field as _)
3852 }
3853 pub fn set_additional_state_digest<T: Into<String>>(&mut self, field: T) {
3855 self.additional_state_digest = Some(field.into().into());
3856 }
3857 pub fn with_additional_state_digest<T: Into<String>>(
3859 mut self,
3860 field: T,
3861 ) -> Self {
3862 self.set_additional_state_digest(field.into());
3863 self
3864 }
3865 }
3866 impl super::ConsensusDeterminedVersionAssignments {
3867 pub const fn const_default() -> Self {
3868 Self {
3869 version: None,
3870 canceled_transactions: Vec::new(),
3871 }
3872 }
3873 #[doc(hidden)]
3874 pub fn default_instance() -> &'static Self {
3875 static DEFAULT: super::ConsensusDeterminedVersionAssignments = super::ConsensusDeterminedVersionAssignments::const_default();
3876 &DEFAULT
3877 }
3878 pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
3880 self.version.as_mut().map(|field| field as _)
3881 }
3882 pub fn version_mut(&mut self) -> &mut i32 {
3885 self.version.get_or_insert_default()
3886 }
3887 pub fn version_opt(&self) -> Option<i32> {
3889 self.version.as_ref().map(|field| *field)
3890 }
3891 pub fn set_version(&mut self, field: i32) {
3893 self.version = Some(field);
3894 }
3895 pub fn with_version(mut self, field: i32) -> Self {
3897 self.set_version(field);
3898 self
3899 }
3900 pub fn canceled_transactions(&self) -> &[super::CanceledTransaction] {
3902 &self.canceled_transactions
3903 }
3904 pub fn canceled_transactions_mut(
3907 &mut self,
3908 ) -> &mut Vec<super::CanceledTransaction> {
3909 &mut self.canceled_transactions
3910 }
3911 pub fn set_canceled_transactions(
3913 &mut self,
3914 field: Vec<super::CanceledTransaction>,
3915 ) {
3916 self.canceled_transactions = field;
3917 }
3918 pub fn with_canceled_transactions(
3920 mut self,
3921 field: Vec<super::CanceledTransaction>,
3922 ) -> Self {
3923 self.set_canceled_transactions(field);
3924 self
3925 }
3926 }
3927 impl super::DatatypeDescriptor {
3928 pub const fn const_default() -> Self {
3929 Self {
3930 type_name: None,
3931 defining_id: None,
3932 module: None,
3933 name: None,
3934 abilities: Vec::new(),
3935 type_parameters: Vec::new(),
3936 kind: None,
3937 fields: Vec::new(),
3938 variants: Vec::new(),
3939 }
3940 }
3941 #[doc(hidden)]
3942 pub fn default_instance() -> &'static Self {
3943 static DEFAULT: super::DatatypeDescriptor = super::DatatypeDescriptor::const_default();
3944 &DEFAULT
3945 }
3946 pub fn type_name_opt_mut(&mut self) -> Option<&mut String> {
3948 self.type_name.as_mut().map(|field| field as _)
3949 }
3950 pub fn type_name_mut(&mut self) -> &mut String {
3953 self.type_name.get_or_insert_default()
3954 }
3955 pub fn type_name_opt(&self) -> Option<&str> {
3957 self.type_name.as_ref().map(|field| field as _)
3958 }
3959 pub fn set_type_name<T: Into<String>>(&mut self, field: T) {
3961 self.type_name = Some(field.into().into());
3962 }
3963 pub fn with_type_name<T: Into<String>>(mut self, field: T) -> Self {
3965 self.set_type_name(field.into());
3966 self
3967 }
3968 pub fn defining_id_opt_mut(&mut self) -> Option<&mut String> {
3970 self.defining_id.as_mut().map(|field| field as _)
3971 }
3972 pub fn defining_id_mut(&mut self) -> &mut String {
3975 self.defining_id.get_or_insert_default()
3976 }
3977 pub fn defining_id_opt(&self) -> Option<&str> {
3979 self.defining_id.as_ref().map(|field| field as _)
3980 }
3981 pub fn set_defining_id<T: Into<String>>(&mut self, field: T) {
3983 self.defining_id = Some(field.into().into());
3984 }
3985 pub fn with_defining_id<T: Into<String>>(mut self, field: T) -> Self {
3987 self.set_defining_id(field.into());
3988 self
3989 }
3990 pub fn module_opt_mut(&mut self) -> Option<&mut String> {
3992 self.module.as_mut().map(|field| field as _)
3993 }
3994 pub fn module_mut(&mut self) -> &mut String {
3997 self.module.get_or_insert_default()
3998 }
3999 pub fn module_opt(&self) -> Option<&str> {
4001 self.module.as_ref().map(|field| field as _)
4002 }
4003 pub fn set_module<T: Into<String>>(&mut self, field: T) {
4005 self.module = Some(field.into().into());
4006 }
4007 pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
4009 self.set_module(field.into());
4010 self
4011 }
4012 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
4014 self.name.as_mut().map(|field| field as _)
4015 }
4016 pub fn name_mut(&mut self) -> &mut String {
4019 self.name.get_or_insert_default()
4020 }
4021 pub fn name_opt(&self) -> Option<&str> {
4023 self.name.as_ref().map(|field| field as _)
4024 }
4025 pub fn set_name<T: Into<String>>(&mut self, field: T) {
4027 self.name = Some(field.into().into());
4028 }
4029 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
4031 self.set_name(field.into());
4032 self
4033 }
4034 pub fn type_parameters(&self) -> &[super::TypeParameter] {
4036 &self.type_parameters
4037 }
4038 pub fn type_parameters_mut(&mut self) -> &mut Vec<super::TypeParameter> {
4041 &mut self.type_parameters
4042 }
4043 pub fn set_type_parameters(&mut self, field: Vec<super::TypeParameter>) {
4045 self.type_parameters = field;
4046 }
4047 pub fn with_type_parameters(mut self, field: Vec<super::TypeParameter>) -> Self {
4049 self.set_type_parameters(field);
4050 self
4051 }
4052 pub fn with_kind<T: Into<super::datatype_descriptor::DatatypeKind>>(
4054 mut self,
4055 field: T,
4056 ) -> Self {
4057 self.set_kind(field.into());
4058 self
4059 }
4060 pub fn fields(&self) -> &[super::FieldDescriptor] {
4062 &self.fields
4063 }
4064 pub fn fields_mut(&mut self) -> &mut Vec<super::FieldDescriptor> {
4067 &mut self.fields
4068 }
4069 pub fn set_fields(&mut self, field: Vec<super::FieldDescriptor>) {
4071 self.fields = field;
4072 }
4073 pub fn with_fields(mut self, field: Vec<super::FieldDescriptor>) -> Self {
4075 self.set_fields(field);
4076 self
4077 }
4078 pub fn variants(&self) -> &[super::VariantDescriptor] {
4080 &self.variants
4081 }
4082 pub fn variants_mut(&mut self) -> &mut Vec<super::VariantDescriptor> {
4085 &mut self.variants
4086 }
4087 pub fn set_variants(&mut self, field: Vec<super::VariantDescriptor>) {
4089 self.variants = field;
4090 }
4091 pub fn with_variants(mut self, field: Vec<super::VariantDescriptor>) -> Self {
4093 self.set_variants(field);
4094 self
4095 }
4096 }
4097 impl super::Display {
4098 pub const fn const_default() -> Self {
4099 Self { output: None, errors: None }
4100 }
4101 #[doc(hidden)]
4102 pub fn default_instance() -> &'static Self {
4103 static DEFAULT: super::Display = super::Display::const_default();
4104 &DEFAULT
4105 }
4106 pub fn output_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
4108 self.output.as_mut().map(|field| field as _)
4109 }
4110 pub fn output_mut(&mut self) -> &mut ::prost_types::Value {
4113 self.output.get_or_insert_default()
4114 }
4115 pub fn output_opt(&self) -> Option<&::prost_types::Value> {
4117 self.output.as_ref().map(|field| field as _)
4118 }
4119 pub fn set_output<T: Into<::prost_types::Value>>(&mut self, field: T) {
4121 self.output = Some(field.into().into());
4122 }
4123 pub fn with_output<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
4125 self.set_output(field.into());
4126 self
4127 }
4128 pub fn errors_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
4130 self.errors.as_mut().map(|field| field as _)
4131 }
4132 pub fn errors_mut(&mut self) -> &mut ::prost_types::Value {
4135 self.errors.get_or_insert_default()
4136 }
4137 pub fn errors_opt(&self) -> Option<&::prost_types::Value> {
4139 self.errors.as_ref().map(|field| field as _)
4140 }
4141 pub fn set_errors<T: Into<::prost_types::Value>>(&mut self, field: T) {
4143 self.errors = Some(field.into().into());
4144 }
4145 pub fn with_errors<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
4147 self.set_errors(field.into());
4148 self
4149 }
4150 }
4151 impl super::DynamicField {
4152 pub const fn const_default() -> Self {
4153 Self {
4154 kind: None,
4155 parent: None,
4156 field_id: None,
4157 field_object: None,
4158 name: None,
4159 value: None,
4160 value_type: None,
4161 child_id: None,
4162 child_object: None,
4163 }
4164 }
4165 #[doc(hidden)]
4166 pub fn default_instance() -> &'static Self {
4167 static DEFAULT: super::DynamicField = super::DynamicField::const_default();
4168 &DEFAULT
4169 }
4170 pub fn with_kind<T: Into<super::dynamic_field::DynamicFieldKind>>(
4172 mut self,
4173 field: T,
4174 ) -> Self {
4175 self.set_kind(field.into());
4176 self
4177 }
4178 pub fn parent_opt_mut(&mut self) -> Option<&mut String> {
4180 self.parent.as_mut().map(|field| field as _)
4181 }
4182 pub fn parent_mut(&mut self) -> &mut String {
4185 self.parent.get_or_insert_default()
4186 }
4187 pub fn parent_opt(&self) -> Option<&str> {
4189 self.parent.as_ref().map(|field| field as _)
4190 }
4191 pub fn set_parent<T: Into<String>>(&mut self, field: T) {
4193 self.parent = Some(field.into().into());
4194 }
4195 pub fn with_parent<T: Into<String>>(mut self, field: T) -> Self {
4197 self.set_parent(field.into());
4198 self
4199 }
4200 pub fn field_id_opt_mut(&mut self) -> Option<&mut String> {
4202 self.field_id.as_mut().map(|field| field as _)
4203 }
4204 pub fn field_id_mut(&mut self) -> &mut String {
4207 self.field_id.get_or_insert_default()
4208 }
4209 pub fn field_id_opt(&self) -> Option<&str> {
4211 self.field_id.as_ref().map(|field| field as _)
4212 }
4213 pub fn set_field_id<T: Into<String>>(&mut self, field: T) {
4215 self.field_id = Some(field.into().into());
4216 }
4217 pub fn with_field_id<T: Into<String>>(mut self, field: T) -> Self {
4219 self.set_field_id(field.into());
4220 self
4221 }
4222 pub fn field_object(&self) -> &super::Object {
4224 self.field_object
4225 .as_ref()
4226 .map(|field| field as _)
4227 .unwrap_or_else(|| super::Object::default_instance() as _)
4228 }
4229 pub fn field_object_opt_mut(&mut self) -> Option<&mut super::Object> {
4231 self.field_object.as_mut().map(|field| field as _)
4232 }
4233 pub fn field_object_mut(&mut self) -> &mut super::Object {
4236 self.field_object.get_or_insert_default()
4237 }
4238 pub fn field_object_opt(&self) -> Option<&super::Object> {
4240 self.field_object.as_ref().map(|field| field as _)
4241 }
4242 pub fn set_field_object<T: Into<super::Object>>(&mut self, field: T) {
4244 self.field_object = Some(field.into().into());
4245 }
4246 pub fn with_field_object<T: Into<super::Object>>(mut self, field: T) -> Self {
4248 self.set_field_object(field.into());
4249 self
4250 }
4251 pub fn name(&self) -> &super::Bcs {
4253 self.name
4254 .as_ref()
4255 .map(|field| field as _)
4256 .unwrap_or_else(|| super::Bcs::default_instance() as _)
4257 }
4258 pub fn name_opt_mut(&mut self) -> Option<&mut super::Bcs> {
4260 self.name.as_mut().map(|field| field as _)
4261 }
4262 pub fn name_mut(&mut self) -> &mut super::Bcs {
4265 self.name.get_or_insert_default()
4266 }
4267 pub fn name_opt(&self) -> Option<&super::Bcs> {
4269 self.name.as_ref().map(|field| field as _)
4270 }
4271 pub fn set_name<T: Into<super::Bcs>>(&mut self, field: T) {
4273 self.name = Some(field.into().into());
4274 }
4275 pub fn with_name<T: Into<super::Bcs>>(mut self, field: T) -> Self {
4277 self.set_name(field.into());
4278 self
4279 }
4280 pub fn value(&self) -> &super::Bcs {
4282 self.value
4283 .as_ref()
4284 .map(|field| field as _)
4285 .unwrap_or_else(|| super::Bcs::default_instance() as _)
4286 }
4287 pub fn value_opt_mut(&mut self) -> Option<&mut super::Bcs> {
4289 self.value.as_mut().map(|field| field as _)
4290 }
4291 pub fn value_mut(&mut self) -> &mut super::Bcs {
4294 self.value.get_or_insert_default()
4295 }
4296 pub fn value_opt(&self) -> Option<&super::Bcs> {
4298 self.value.as_ref().map(|field| field as _)
4299 }
4300 pub fn set_value<T: Into<super::Bcs>>(&mut self, field: T) {
4302 self.value = Some(field.into().into());
4303 }
4304 pub fn with_value<T: Into<super::Bcs>>(mut self, field: T) -> Self {
4306 self.set_value(field.into());
4307 self
4308 }
4309 pub fn value_type_opt_mut(&mut self) -> Option<&mut String> {
4311 self.value_type.as_mut().map(|field| field as _)
4312 }
4313 pub fn value_type_mut(&mut self) -> &mut String {
4316 self.value_type.get_or_insert_default()
4317 }
4318 pub fn value_type_opt(&self) -> Option<&str> {
4320 self.value_type.as_ref().map(|field| field as _)
4321 }
4322 pub fn set_value_type<T: Into<String>>(&mut self, field: T) {
4324 self.value_type = Some(field.into().into());
4325 }
4326 pub fn with_value_type<T: Into<String>>(mut self, field: T) -> Self {
4328 self.set_value_type(field.into());
4329 self
4330 }
4331 pub fn child_id_opt_mut(&mut self) -> Option<&mut String> {
4333 self.child_id.as_mut().map(|field| field as _)
4334 }
4335 pub fn child_id_mut(&mut self) -> &mut String {
4338 self.child_id.get_or_insert_default()
4339 }
4340 pub fn child_id_opt(&self) -> Option<&str> {
4342 self.child_id.as_ref().map(|field| field as _)
4343 }
4344 pub fn set_child_id<T: Into<String>>(&mut self, field: T) {
4346 self.child_id = Some(field.into().into());
4347 }
4348 pub fn with_child_id<T: Into<String>>(mut self, field: T) -> Self {
4350 self.set_child_id(field.into());
4351 self
4352 }
4353 pub fn child_object(&self) -> &super::Object {
4355 self.child_object
4356 .as_ref()
4357 .map(|field| field as _)
4358 .unwrap_or_else(|| super::Object::default_instance() as _)
4359 }
4360 pub fn child_object_opt_mut(&mut self) -> Option<&mut super::Object> {
4362 self.child_object.as_mut().map(|field| field as _)
4363 }
4364 pub fn child_object_mut(&mut self) -> &mut super::Object {
4367 self.child_object.get_or_insert_default()
4368 }
4369 pub fn child_object_opt(&self) -> Option<&super::Object> {
4371 self.child_object.as_ref().map(|field| field as _)
4372 }
4373 pub fn set_child_object<T: Into<super::Object>>(&mut self, field: T) {
4375 self.child_object = Some(field.into().into());
4376 }
4377 pub fn with_child_object<T: Into<super::Object>>(mut self, field: T) -> Self {
4379 self.set_child_object(field.into());
4380 self
4381 }
4382 }
4383 impl super::EmitModuleFilter {
4384 pub const fn const_default() -> Self {
4385 Self { module: None }
4386 }
4387 #[doc(hidden)]
4388 pub fn default_instance() -> &'static Self {
4389 static DEFAULT: super::EmitModuleFilter = super::EmitModuleFilter::const_default();
4390 &DEFAULT
4391 }
4392 pub fn module_opt_mut(&mut self) -> Option<&mut String> {
4394 self.module.as_mut().map(|field| field as _)
4395 }
4396 pub fn module_mut(&mut self) -> &mut String {
4399 self.module.get_or_insert_default()
4400 }
4401 pub fn module_opt(&self) -> Option<&str> {
4403 self.module.as_ref().map(|field| field as _)
4404 }
4405 pub fn set_module<T: Into<String>>(&mut self, field: T) {
4407 self.module = Some(field.into().into());
4408 }
4409 pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
4411 self.set_module(field.into());
4412 self
4413 }
4414 }
4415 impl super::EndOfEpochData {
4416 pub const fn const_default() -> Self {
4417 Self {
4418 next_epoch_committee: Vec::new(),
4419 next_epoch_protocol_version: None,
4420 epoch_commitments: Vec::new(),
4421 }
4422 }
4423 #[doc(hidden)]
4424 pub fn default_instance() -> &'static Self {
4425 static DEFAULT: super::EndOfEpochData = super::EndOfEpochData::const_default();
4426 &DEFAULT
4427 }
4428 pub fn next_epoch_committee(&self) -> &[super::ValidatorCommitteeMember] {
4430 &self.next_epoch_committee
4431 }
4432 pub fn next_epoch_committee_mut(
4435 &mut self,
4436 ) -> &mut Vec<super::ValidatorCommitteeMember> {
4437 &mut self.next_epoch_committee
4438 }
4439 pub fn set_next_epoch_committee(
4441 &mut self,
4442 field: Vec<super::ValidatorCommitteeMember>,
4443 ) {
4444 self.next_epoch_committee = field;
4445 }
4446 pub fn with_next_epoch_committee(
4448 mut self,
4449 field: Vec<super::ValidatorCommitteeMember>,
4450 ) -> Self {
4451 self.set_next_epoch_committee(field);
4452 self
4453 }
4454 pub fn next_epoch_protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
4456 self.next_epoch_protocol_version.as_mut().map(|field| field as _)
4457 }
4458 pub fn next_epoch_protocol_version_mut(&mut self) -> &mut u64 {
4461 self.next_epoch_protocol_version.get_or_insert_default()
4462 }
4463 pub fn next_epoch_protocol_version_opt(&self) -> Option<u64> {
4465 self.next_epoch_protocol_version.as_ref().map(|field| *field)
4466 }
4467 pub fn set_next_epoch_protocol_version(&mut self, field: u64) {
4469 self.next_epoch_protocol_version = Some(field);
4470 }
4471 pub fn with_next_epoch_protocol_version(mut self, field: u64) -> Self {
4473 self.set_next_epoch_protocol_version(field);
4474 self
4475 }
4476 pub fn epoch_commitments(&self) -> &[super::CheckpointCommitment] {
4478 &self.epoch_commitments
4479 }
4480 pub fn epoch_commitments_mut(
4483 &mut self,
4484 ) -> &mut Vec<super::CheckpointCommitment> {
4485 &mut self.epoch_commitments
4486 }
4487 pub fn set_epoch_commitments(
4489 &mut self,
4490 field: Vec<super::CheckpointCommitment>,
4491 ) {
4492 self.epoch_commitments = field;
4493 }
4494 pub fn with_epoch_commitments(
4496 mut self,
4497 field: Vec<super::CheckpointCommitment>,
4498 ) -> Self {
4499 self.set_epoch_commitments(field);
4500 self
4501 }
4502 }
4503 impl super::EndOfEpochTransaction {
4504 pub const fn const_default() -> Self {
4505 Self { transactions: Vec::new() }
4506 }
4507 #[doc(hidden)]
4508 pub fn default_instance() -> &'static Self {
4509 static DEFAULT: super::EndOfEpochTransaction = super::EndOfEpochTransaction::const_default();
4510 &DEFAULT
4511 }
4512 pub fn transactions(&self) -> &[super::EndOfEpochTransactionKind] {
4514 &self.transactions
4515 }
4516 pub fn transactions_mut(
4519 &mut self,
4520 ) -> &mut Vec<super::EndOfEpochTransactionKind> {
4521 &mut self.transactions
4522 }
4523 pub fn set_transactions(
4525 &mut self,
4526 field: Vec<super::EndOfEpochTransactionKind>,
4527 ) {
4528 self.transactions = field;
4529 }
4530 pub fn with_transactions(
4532 mut self,
4533 field: Vec<super::EndOfEpochTransactionKind>,
4534 ) -> Self {
4535 self.set_transactions(field);
4536 self
4537 }
4538 }
4539 impl super::EndOfEpochTransactionKind {
4540 pub const fn const_default() -> Self {
4541 Self { kind: None, data: None }
4542 }
4543 #[doc(hidden)]
4544 pub fn default_instance() -> &'static Self {
4545 static DEFAULT: super::EndOfEpochTransactionKind = super::EndOfEpochTransactionKind::const_default();
4546 &DEFAULT
4547 }
4548 pub fn with_kind<T: Into<super::end_of_epoch_transaction_kind::Kind>>(
4550 mut self,
4551 field: T,
4552 ) -> Self {
4553 self.set_kind(field.into());
4554 self
4555 }
4556 pub fn change_epoch(&self) -> &super::ChangeEpoch {
4558 if let Some(
4559 super::end_of_epoch_transaction_kind::Data::ChangeEpoch(field),
4560 ) = &self.data
4561 {
4562 field as _
4563 } else {
4564 super::ChangeEpoch::default_instance() as _
4565 }
4566 }
4567 pub fn change_epoch_opt(&self) -> Option<&super::ChangeEpoch> {
4569 if let Some(
4570 super::end_of_epoch_transaction_kind::Data::ChangeEpoch(field),
4571 ) = &self.data
4572 {
4573 Some(field as _)
4574 } else {
4575 None
4576 }
4577 }
4578 pub fn change_epoch_opt_mut(&mut self) -> Option<&mut super::ChangeEpoch> {
4580 if let Some(
4581 super::end_of_epoch_transaction_kind::Data::ChangeEpoch(field),
4582 ) = &mut self.data
4583 {
4584 Some(field as _)
4585 } else {
4586 None
4587 }
4588 }
4589 pub fn change_epoch_mut(&mut self) -> &mut super::ChangeEpoch {
4593 if self.change_epoch_opt_mut().is_none() {
4594 self.data = Some(
4595 super::end_of_epoch_transaction_kind::Data::ChangeEpoch(
4596 super::ChangeEpoch::default(),
4597 ),
4598 );
4599 }
4600 self.change_epoch_opt_mut().unwrap()
4601 }
4602 pub fn set_change_epoch<T: Into<super::ChangeEpoch>>(&mut self, field: T) {
4605 self.data = Some(
4606 super::end_of_epoch_transaction_kind::Data::ChangeEpoch(
4607 field.into().into(),
4608 ),
4609 );
4610 }
4611 pub fn with_change_epoch<T: Into<super::ChangeEpoch>>(
4614 mut self,
4615 field: T,
4616 ) -> Self {
4617 self.set_change_epoch(field.into());
4618 self
4619 }
4620 pub fn authenticator_state_expire(&self) -> &super::AuthenticatorStateExpire {
4622 if let Some(
4623 super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4624 field,
4625 ),
4626 ) = &self.data
4627 {
4628 field as _
4629 } else {
4630 super::AuthenticatorStateExpire::default_instance() as _
4631 }
4632 }
4633 pub fn authenticator_state_expire_opt(
4635 &self,
4636 ) -> Option<&super::AuthenticatorStateExpire> {
4637 if let Some(
4638 super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4639 field,
4640 ),
4641 ) = &self.data
4642 {
4643 Some(field as _)
4644 } else {
4645 None
4646 }
4647 }
4648 pub fn authenticator_state_expire_opt_mut(
4650 &mut self,
4651 ) -> Option<&mut super::AuthenticatorStateExpire> {
4652 if let Some(
4653 super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4654 field,
4655 ),
4656 ) = &mut self.data
4657 {
4658 Some(field as _)
4659 } else {
4660 None
4661 }
4662 }
4663 pub fn authenticator_state_expire_mut(
4667 &mut self,
4668 ) -> &mut super::AuthenticatorStateExpire {
4669 if self.authenticator_state_expire_opt_mut().is_none() {
4670 self.data = Some(
4671 super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4672 super::AuthenticatorStateExpire::default(),
4673 ),
4674 );
4675 }
4676 self.authenticator_state_expire_opt_mut().unwrap()
4677 }
4678 pub fn set_authenticator_state_expire<T: Into<super::AuthenticatorStateExpire>>(
4681 &mut self,
4682 field: T,
4683 ) {
4684 self.data = Some(
4685 super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4686 field.into().into(),
4687 ),
4688 );
4689 }
4690 pub fn with_authenticator_state_expire<T: Into<super::AuthenticatorStateExpire>>(
4693 mut self,
4694 field: T,
4695 ) -> Self {
4696 self.set_authenticator_state_expire(field.into());
4697 self
4698 }
4699 pub fn execution_time_observations(&self) -> &super::ExecutionTimeObservations {
4701 if let Some(
4702 super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4703 field,
4704 ),
4705 ) = &self.data
4706 {
4707 field as _
4708 } else {
4709 super::ExecutionTimeObservations::default_instance() as _
4710 }
4711 }
4712 pub fn execution_time_observations_opt(
4714 &self,
4715 ) -> Option<&super::ExecutionTimeObservations> {
4716 if let Some(
4717 super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4718 field,
4719 ),
4720 ) = &self.data
4721 {
4722 Some(field as _)
4723 } else {
4724 None
4725 }
4726 }
4727 pub fn execution_time_observations_opt_mut(
4729 &mut self,
4730 ) -> Option<&mut super::ExecutionTimeObservations> {
4731 if let Some(
4732 super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4733 field,
4734 ),
4735 ) = &mut self.data
4736 {
4737 Some(field as _)
4738 } else {
4739 None
4740 }
4741 }
4742 pub fn execution_time_observations_mut(
4746 &mut self,
4747 ) -> &mut super::ExecutionTimeObservations {
4748 if self.execution_time_observations_opt_mut().is_none() {
4749 self.data = Some(
4750 super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4751 super::ExecutionTimeObservations::default(),
4752 ),
4753 );
4754 }
4755 self.execution_time_observations_opt_mut().unwrap()
4756 }
4757 pub fn set_execution_time_observations<
4760 T: Into<super::ExecutionTimeObservations>,
4761 >(&mut self, field: T) {
4762 self.data = Some(
4763 super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4764 field.into().into(),
4765 ),
4766 );
4767 }
4768 pub fn with_execution_time_observations<
4771 T: Into<super::ExecutionTimeObservations>,
4772 >(mut self, field: T) -> Self {
4773 self.set_execution_time_observations(field.into());
4774 self
4775 }
4776 pub fn bridge_chain_id(&self) -> &str {
4778 if let Some(
4779 super::end_of_epoch_transaction_kind::Data::BridgeChainId(field),
4780 ) = &self.data
4781 {
4782 field as _
4783 } else {
4784 ""
4785 }
4786 }
4787 pub fn bridge_chain_id_opt(&self) -> Option<&str> {
4789 if let Some(
4790 super::end_of_epoch_transaction_kind::Data::BridgeChainId(field),
4791 ) = &self.data
4792 {
4793 Some(field as _)
4794 } else {
4795 None
4796 }
4797 }
4798 pub fn bridge_chain_id_opt_mut(&mut self) -> Option<&mut String> {
4800 if let Some(
4801 super::end_of_epoch_transaction_kind::Data::BridgeChainId(field),
4802 ) = &mut self.data
4803 {
4804 Some(field as _)
4805 } else {
4806 None
4807 }
4808 }
4809 pub fn bridge_chain_id_mut(&mut self) -> &mut String {
4813 if self.bridge_chain_id_opt_mut().is_none() {
4814 self.data = Some(
4815 super::end_of_epoch_transaction_kind::Data::BridgeChainId(
4816 String::default(),
4817 ),
4818 );
4819 }
4820 self.bridge_chain_id_opt_mut().unwrap()
4821 }
4822 pub fn set_bridge_chain_id<T: Into<String>>(&mut self, field: T) {
4825 self.data = Some(
4826 super::end_of_epoch_transaction_kind::Data::BridgeChainId(
4827 field.into().into(),
4828 ),
4829 );
4830 }
4831 pub fn with_bridge_chain_id<T: Into<String>>(mut self, field: T) -> Self {
4834 self.set_bridge_chain_id(field.into());
4835 self
4836 }
4837 pub fn bridge_object_version(&self) -> u64 {
4839 if let Some(
4840 super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4841 ) = &self.data
4842 {
4843 *field
4844 } else {
4845 0u64
4846 }
4847 }
4848 pub fn bridge_object_version_opt(&self) -> Option<u64> {
4850 if let Some(
4851 super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4852 ) = &self.data
4853 {
4854 Some(*field)
4855 } else {
4856 None
4857 }
4858 }
4859 pub fn bridge_object_version_opt_mut(&mut self) -> Option<&mut u64> {
4861 if let Some(
4862 super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4863 ) = &mut self.data
4864 {
4865 Some(field as _)
4866 } else {
4867 None
4868 }
4869 }
4870 pub fn bridge_object_version_mut(&mut self) -> &mut u64 {
4874 if self.bridge_object_version_opt_mut().is_none() {
4875 self.data = Some(
4876 super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(
4877 u64::default(),
4878 ),
4879 );
4880 }
4881 self.bridge_object_version_opt_mut().unwrap()
4882 }
4883 pub fn set_bridge_object_version(&mut self, field: u64) {
4886 self.data = Some(
4887 super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4888 );
4889 }
4890 pub fn with_bridge_object_version(mut self, field: u64) -> Self {
4893 self.set_bridge_object_version(field);
4894 self
4895 }
4896 pub fn storage_cost(&self) -> u64 {
4898 if let Some(
4899 super::end_of_epoch_transaction_kind::Data::StorageCost(field),
4900 ) = &self.data
4901 {
4902 *field
4903 } else {
4904 0u64
4905 }
4906 }
4907 pub fn storage_cost_opt(&self) -> Option<u64> {
4909 if let Some(
4910 super::end_of_epoch_transaction_kind::Data::StorageCost(field),
4911 ) = &self.data
4912 {
4913 Some(*field)
4914 } else {
4915 None
4916 }
4917 }
4918 pub fn storage_cost_opt_mut(&mut self) -> Option<&mut u64> {
4920 if let Some(
4921 super::end_of_epoch_transaction_kind::Data::StorageCost(field),
4922 ) = &mut self.data
4923 {
4924 Some(field as _)
4925 } else {
4926 None
4927 }
4928 }
4929 pub fn storage_cost_mut(&mut self) -> &mut u64 {
4933 if self.storage_cost_opt_mut().is_none() {
4934 self.data = Some(
4935 super::end_of_epoch_transaction_kind::Data::StorageCost(
4936 u64::default(),
4937 ),
4938 );
4939 }
4940 self.storage_cost_opt_mut().unwrap()
4941 }
4942 pub fn set_storage_cost(&mut self, field: u64) {
4945 self.data = Some(
4946 super::end_of_epoch_transaction_kind::Data::StorageCost(field),
4947 );
4948 }
4949 pub fn with_storage_cost(mut self, field: u64) -> Self {
4952 self.set_storage_cost(field);
4953 self
4954 }
4955 }
4956 impl super::Epoch {
4957 pub const fn const_default() -> Self {
4958 Self {
4959 epoch: None,
4960 committee: None,
4961 system_state: None,
4962 first_checkpoint: None,
4963 last_checkpoint: None,
4964 start: None,
4965 end: None,
4966 reference_gas_price: None,
4967 protocol_config: None,
4968 }
4969 }
4970 #[doc(hidden)]
4971 pub fn default_instance() -> &'static Self {
4972 static DEFAULT: super::Epoch = super::Epoch::const_default();
4973 &DEFAULT
4974 }
4975 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
4977 self.epoch.as_mut().map(|field| field as _)
4978 }
4979 pub fn epoch_mut(&mut self) -> &mut u64 {
4982 self.epoch.get_or_insert_default()
4983 }
4984 pub fn epoch_opt(&self) -> Option<u64> {
4986 self.epoch.as_ref().map(|field| *field)
4987 }
4988 pub fn set_epoch(&mut self, field: u64) {
4990 self.epoch = Some(field);
4991 }
4992 pub fn with_epoch(mut self, field: u64) -> Self {
4994 self.set_epoch(field);
4995 self
4996 }
4997 pub fn committee(&self) -> &super::ValidatorCommittee {
4999 self.committee
5000 .as_ref()
5001 .map(|field| field as _)
5002 .unwrap_or_else(|| super::ValidatorCommittee::default_instance() as _)
5003 }
5004 pub fn committee_opt_mut(&mut self) -> Option<&mut super::ValidatorCommittee> {
5006 self.committee.as_mut().map(|field| field as _)
5007 }
5008 pub fn committee_mut(&mut self) -> &mut super::ValidatorCommittee {
5011 self.committee.get_or_insert_default()
5012 }
5013 pub fn committee_opt(&self) -> Option<&super::ValidatorCommittee> {
5015 self.committee.as_ref().map(|field| field as _)
5016 }
5017 pub fn set_committee<T: Into<super::ValidatorCommittee>>(&mut self, field: T) {
5019 self.committee = Some(field.into().into());
5020 }
5021 pub fn with_committee<T: Into<super::ValidatorCommittee>>(
5023 mut self,
5024 field: T,
5025 ) -> Self {
5026 self.set_committee(field.into());
5027 self
5028 }
5029 pub fn system_state(&self) -> &super::SystemState {
5031 self.system_state
5032 .as_ref()
5033 .map(|field| field as _)
5034 .unwrap_or_else(|| super::SystemState::default_instance() as _)
5035 }
5036 pub fn system_state_opt_mut(&mut self) -> Option<&mut super::SystemState> {
5038 self.system_state.as_mut().map(|field| field as _)
5039 }
5040 pub fn system_state_mut(&mut self) -> &mut super::SystemState {
5043 self.system_state.get_or_insert_default()
5044 }
5045 pub fn system_state_opt(&self) -> Option<&super::SystemState> {
5047 self.system_state.as_ref().map(|field| field as _)
5048 }
5049 pub fn set_system_state<T: Into<super::SystemState>>(&mut self, field: T) {
5051 self.system_state = Some(field.into().into());
5052 }
5053 pub fn with_system_state<T: Into<super::SystemState>>(
5055 mut self,
5056 field: T,
5057 ) -> Self {
5058 self.set_system_state(field.into());
5059 self
5060 }
5061 pub fn first_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
5063 self.first_checkpoint.as_mut().map(|field| field as _)
5064 }
5065 pub fn first_checkpoint_mut(&mut self) -> &mut u64 {
5068 self.first_checkpoint.get_or_insert_default()
5069 }
5070 pub fn first_checkpoint_opt(&self) -> Option<u64> {
5072 self.first_checkpoint.as_ref().map(|field| *field)
5073 }
5074 pub fn set_first_checkpoint(&mut self, field: u64) {
5076 self.first_checkpoint = Some(field);
5077 }
5078 pub fn with_first_checkpoint(mut self, field: u64) -> Self {
5080 self.set_first_checkpoint(field);
5081 self
5082 }
5083 pub fn last_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
5085 self.last_checkpoint.as_mut().map(|field| field as _)
5086 }
5087 pub fn last_checkpoint_mut(&mut self) -> &mut u64 {
5090 self.last_checkpoint.get_or_insert_default()
5091 }
5092 pub fn last_checkpoint_opt(&self) -> Option<u64> {
5094 self.last_checkpoint.as_ref().map(|field| *field)
5095 }
5096 pub fn set_last_checkpoint(&mut self, field: u64) {
5098 self.last_checkpoint = Some(field);
5099 }
5100 pub fn with_last_checkpoint(mut self, field: u64) -> Self {
5102 self.set_last_checkpoint(field);
5103 self
5104 }
5105 pub fn start_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
5107 self.start.as_mut().map(|field| field as _)
5108 }
5109 pub fn start_mut(&mut self) -> &mut ::prost_types::Timestamp {
5112 self.start.get_or_insert_default()
5113 }
5114 pub fn start_opt(&self) -> Option<&::prost_types::Timestamp> {
5116 self.start.as_ref().map(|field| field as _)
5117 }
5118 pub fn set_start<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
5120 self.start = Some(field.into().into());
5121 }
5122 pub fn with_start<T: Into<::prost_types::Timestamp>>(
5124 mut self,
5125 field: T,
5126 ) -> Self {
5127 self.set_start(field.into());
5128 self
5129 }
5130 pub fn end_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
5132 self.end.as_mut().map(|field| field as _)
5133 }
5134 pub fn end_mut(&mut self) -> &mut ::prost_types::Timestamp {
5137 self.end.get_or_insert_default()
5138 }
5139 pub fn end_opt(&self) -> Option<&::prost_types::Timestamp> {
5141 self.end.as_ref().map(|field| field as _)
5142 }
5143 pub fn set_end<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
5145 self.end = Some(field.into().into());
5146 }
5147 pub fn with_end<T: Into<::prost_types::Timestamp>>(mut self, field: T) -> Self {
5149 self.set_end(field.into());
5150 self
5151 }
5152 pub fn reference_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
5154 self.reference_gas_price.as_mut().map(|field| field as _)
5155 }
5156 pub fn reference_gas_price_mut(&mut self) -> &mut u64 {
5159 self.reference_gas_price.get_or_insert_default()
5160 }
5161 pub fn reference_gas_price_opt(&self) -> Option<u64> {
5163 self.reference_gas_price.as_ref().map(|field| *field)
5164 }
5165 pub fn set_reference_gas_price(&mut self, field: u64) {
5167 self.reference_gas_price = Some(field);
5168 }
5169 pub fn with_reference_gas_price(mut self, field: u64) -> Self {
5171 self.set_reference_gas_price(field);
5172 self
5173 }
5174 pub fn protocol_config(&self) -> &super::ProtocolConfig {
5176 self.protocol_config
5177 .as_ref()
5178 .map(|field| field as _)
5179 .unwrap_or_else(|| super::ProtocolConfig::default_instance() as _)
5180 }
5181 pub fn protocol_config_opt_mut(&mut self) -> Option<&mut super::ProtocolConfig> {
5183 self.protocol_config.as_mut().map(|field| field as _)
5184 }
5185 pub fn protocol_config_mut(&mut self) -> &mut super::ProtocolConfig {
5188 self.protocol_config.get_or_insert_default()
5189 }
5190 pub fn protocol_config_opt(&self) -> Option<&super::ProtocolConfig> {
5192 self.protocol_config.as_ref().map(|field| field as _)
5193 }
5194 pub fn set_protocol_config<T: Into<super::ProtocolConfig>>(&mut self, field: T) {
5196 self.protocol_config = Some(field.into().into());
5197 }
5198 pub fn with_protocol_config<T: Into<super::ProtocolConfig>>(
5200 mut self,
5201 field: T,
5202 ) -> Self {
5203 self.set_protocol_config(field.into());
5204 self
5205 }
5206 }
5207 impl super::Event {
5208 pub const fn const_default() -> Self {
5209 Self {
5210 package_id: None,
5211 module: None,
5212 sender: None,
5213 event_type: None,
5214 contents: None,
5215 json: None,
5216 checkpoint: None,
5217 transaction_digest: None,
5218 transaction_index: None,
5219 event_index: None,
5220 }
5221 }
5222 #[doc(hidden)]
5223 pub fn default_instance() -> &'static Self {
5224 static DEFAULT: super::Event = super::Event::const_default();
5225 &DEFAULT
5226 }
5227 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
5229 self.package_id.as_mut().map(|field| field as _)
5230 }
5231 pub fn package_id_mut(&mut self) -> &mut String {
5234 self.package_id.get_or_insert_default()
5235 }
5236 pub fn package_id_opt(&self) -> Option<&str> {
5238 self.package_id.as_ref().map(|field| field as _)
5239 }
5240 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
5242 self.package_id = Some(field.into().into());
5243 }
5244 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
5246 self.set_package_id(field.into());
5247 self
5248 }
5249 pub fn module_opt_mut(&mut self) -> Option<&mut String> {
5251 self.module.as_mut().map(|field| field as _)
5252 }
5253 pub fn module_mut(&mut self) -> &mut String {
5256 self.module.get_or_insert_default()
5257 }
5258 pub fn module_opt(&self) -> Option<&str> {
5260 self.module.as_ref().map(|field| field as _)
5261 }
5262 pub fn set_module<T: Into<String>>(&mut self, field: T) {
5264 self.module = Some(field.into().into());
5265 }
5266 pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
5268 self.set_module(field.into());
5269 self
5270 }
5271 pub fn sender_opt_mut(&mut self) -> Option<&mut String> {
5273 self.sender.as_mut().map(|field| field as _)
5274 }
5275 pub fn sender_mut(&mut self) -> &mut String {
5278 self.sender.get_or_insert_default()
5279 }
5280 pub fn sender_opt(&self) -> Option<&str> {
5282 self.sender.as_ref().map(|field| field as _)
5283 }
5284 pub fn set_sender<T: Into<String>>(&mut self, field: T) {
5286 self.sender = Some(field.into().into());
5287 }
5288 pub fn with_sender<T: Into<String>>(mut self, field: T) -> Self {
5290 self.set_sender(field.into());
5291 self
5292 }
5293 pub fn event_type_opt_mut(&mut self) -> Option<&mut String> {
5295 self.event_type.as_mut().map(|field| field as _)
5296 }
5297 pub fn event_type_mut(&mut self) -> &mut String {
5300 self.event_type.get_or_insert_default()
5301 }
5302 pub fn event_type_opt(&self) -> Option<&str> {
5304 self.event_type.as_ref().map(|field| field as _)
5305 }
5306 pub fn set_event_type<T: Into<String>>(&mut self, field: T) {
5308 self.event_type = Some(field.into().into());
5309 }
5310 pub fn with_event_type<T: Into<String>>(mut self, field: T) -> Self {
5312 self.set_event_type(field.into());
5313 self
5314 }
5315 pub fn contents(&self) -> &super::Bcs {
5317 self.contents
5318 .as_ref()
5319 .map(|field| field as _)
5320 .unwrap_or_else(|| super::Bcs::default_instance() as _)
5321 }
5322 pub fn contents_opt_mut(&mut self) -> Option<&mut super::Bcs> {
5324 self.contents.as_mut().map(|field| field as _)
5325 }
5326 pub fn contents_mut(&mut self) -> &mut super::Bcs {
5329 self.contents.get_or_insert_default()
5330 }
5331 pub fn contents_opt(&self) -> Option<&super::Bcs> {
5333 self.contents.as_ref().map(|field| field as _)
5334 }
5335 pub fn set_contents<T: Into<super::Bcs>>(&mut self, field: T) {
5337 self.contents = Some(field.into().into());
5338 }
5339 pub fn with_contents<T: Into<super::Bcs>>(mut self, field: T) -> Self {
5341 self.set_contents(field.into());
5342 self
5343 }
5344 pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
5346 self.json.as_mut().map(|field| field as _)
5347 }
5348 pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
5351 self.json.get_or_insert_default()
5352 }
5353 pub fn json_opt(&self) -> Option<&::prost_types::Value> {
5355 self.json.as_ref().map(|field| field as _)
5356 }
5357 pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
5359 self.json = Some(field.into().into());
5360 }
5361 pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
5363 self.set_json(field.into());
5364 self
5365 }
5366 pub fn checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
5368 self.checkpoint.as_mut().map(|field| field as _)
5369 }
5370 pub fn checkpoint_mut(&mut self) -> &mut u64 {
5373 self.checkpoint.get_or_insert_default()
5374 }
5375 pub fn checkpoint_opt(&self) -> Option<u64> {
5377 self.checkpoint.as_ref().map(|field| *field)
5378 }
5379 pub fn set_checkpoint(&mut self, field: u64) {
5381 self.checkpoint = Some(field);
5382 }
5383 pub fn with_checkpoint(mut self, field: u64) -> Self {
5385 self.set_checkpoint(field);
5386 self
5387 }
5388 pub fn transaction_digest_opt_mut(&mut self) -> Option<&mut String> {
5390 self.transaction_digest.as_mut().map(|field| field as _)
5391 }
5392 pub fn transaction_digest_mut(&mut self) -> &mut String {
5395 self.transaction_digest.get_or_insert_default()
5396 }
5397 pub fn transaction_digest_opt(&self) -> Option<&str> {
5399 self.transaction_digest.as_ref().map(|field| field as _)
5400 }
5401 pub fn set_transaction_digest<T: Into<String>>(&mut self, field: T) {
5403 self.transaction_digest = Some(field.into().into());
5404 }
5405 pub fn with_transaction_digest<T: Into<String>>(mut self, field: T) -> Self {
5407 self.set_transaction_digest(field.into());
5408 self
5409 }
5410 pub fn transaction_index_opt_mut(&mut self) -> Option<&mut u64> {
5412 self.transaction_index.as_mut().map(|field| field as _)
5413 }
5414 pub fn transaction_index_mut(&mut self) -> &mut u64 {
5417 self.transaction_index.get_or_insert_default()
5418 }
5419 pub fn transaction_index_opt(&self) -> Option<u64> {
5421 self.transaction_index.as_ref().map(|field| *field)
5422 }
5423 pub fn set_transaction_index(&mut self, field: u64) {
5425 self.transaction_index = Some(field);
5426 }
5427 pub fn with_transaction_index(mut self, field: u64) -> Self {
5429 self.set_transaction_index(field);
5430 self
5431 }
5432 pub fn event_index_opt_mut(&mut self) -> Option<&mut u32> {
5434 self.event_index.as_mut().map(|field| field as _)
5435 }
5436 pub fn event_index_mut(&mut self) -> &mut u32 {
5439 self.event_index.get_or_insert_default()
5440 }
5441 pub fn event_index_opt(&self) -> Option<u32> {
5443 self.event_index.as_ref().map(|field| *field)
5444 }
5445 pub fn set_event_index(&mut self, field: u32) {
5447 self.event_index = Some(field);
5448 }
5449 pub fn with_event_index(mut self, field: u32) -> Self {
5451 self.set_event_index(field);
5452 self
5453 }
5454 }
5455 impl super::EventDigestEntry {
5456 pub const fn const_default() -> Self {
5457 Self {
5458 event_index: None,
5459 digest: None,
5460 }
5461 }
5462 #[doc(hidden)]
5463 pub fn default_instance() -> &'static Self {
5464 static DEFAULT: super::EventDigestEntry = super::EventDigestEntry::const_default();
5465 &DEFAULT
5466 }
5467 pub fn event_index_opt_mut(&mut self) -> Option<&mut u64> {
5469 self.event_index.as_mut().map(|field| field as _)
5470 }
5471 pub fn event_index_mut(&mut self) -> &mut u64 {
5474 self.event_index.get_or_insert_default()
5475 }
5476 pub fn event_index_opt(&self) -> Option<u64> {
5478 self.event_index.as_ref().map(|field| *field)
5479 }
5480 pub fn set_event_index(&mut self, field: u64) {
5482 self.event_index = Some(field);
5483 }
5484 pub fn with_event_index(mut self, field: u64) -> Self {
5486 self.set_event_index(field);
5487 self
5488 }
5489 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
5491 self.digest.as_mut().map(|field| field as _)
5492 }
5493 pub fn digest_mut(&mut self) -> &mut String {
5496 self.digest.get_or_insert_default()
5497 }
5498 pub fn digest_opt(&self) -> Option<&str> {
5500 self.digest.as_ref().map(|field| field as _)
5501 }
5502 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
5504 self.digest = Some(field.into().into());
5505 }
5506 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
5508 self.set_digest(field.into());
5509 self
5510 }
5511 }
5512 impl super::EventFilter {
5513 pub const fn const_default() -> Self {
5514 Self { terms: Vec::new() }
5515 }
5516 #[doc(hidden)]
5517 pub fn default_instance() -> &'static Self {
5518 static DEFAULT: super::EventFilter = super::EventFilter::const_default();
5519 &DEFAULT
5520 }
5521 pub fn terms(&self) -> &[super::EventTerm] {
5523 &self.terms
5524 }
5525 pub fn terms_mut(&mut self) -> &mut Vec<super::EventTerm> {
5528 &mut self.terms
5529 }
5530 pub fn set_terms(&mut self, field: Vec<super::EventTerm>) {
5532 self.terms = field;
5533 }
5534 pub fn with_terms(mut self, field: Vec<super::EventTerm>) -> Self {
5536 self.set_terms(field);
5537 self
5538 }
5539 }
5540 impl super::EventLiteral {
5541 pub const fn const_default() -> Self {
5542 Self {
5543 negated: false,
5544 predicate: None,
5545 }
5546 }
5547 #[doc(hidden)]
5548 pub fn default_instance() -> &'static Self {
5549 static DEFAULT: super::EventLiteral = super::EventLiteral::const_default();
5550 &DEFAULT
5551 }
5552 pub fn negated_mut(&mut self) -> &mut bool {
5555 &mut self.negated
5556 }
5557 pub fn set_negated(&mut self, field: bool) {
5559 self.negated = field;
5560 }
5561 pub fn with_negated(mut self, field: bool) -> Self {
5563 self.set_negated(field);
5564 self
5565 }
5566 pub fn sender(&self) -> &super::SenderFilter {
5568 if let Some(super::event_literal::Predicate::Sender(field)) = &self.predicate
5569 {
5570 field as _
5571 } else {
5572 super::SenderFilter::default_instance() as _
5573 }
5574 }
5575 pub fn sender_opt(&self) -> Option<&super::SenderFilter> {
5577 if let Some(super::event_literal::Predicate::Sender(field)) = &self.predicate
5578 {
5579 Some(field as _)
5580 } else {
5581 None
5582 }
5583 }
5584 pub fn sender_opt_mut(&mut self) -> Option<&mut super::SenderFilter> {
5586 if let Some(super::event_literal::Predicate::Sender(field)) = &mut self
5587 .predicate
5588 {
5589 Some(field as _)
5590 } else {
5591 None
5592 }
5593 }
5594 pub fn sender_mut(&mut self) -> &mut super::SenderFilter {
5598 if self.sender_opt_mut().is_none() {
5599 self.predicate = Some(
5600 super::event_literal::Predicate::Sender(
5601 super::SenderFilter::default(),
5602 ),
5603 );
5604 }
5605 self.sender_opt_mut().unwrap()
5606 }
5607 pub fn set_sender<T: Into<super::SenderFilter>>(&mut self, field: T) {
5610 self.predicate = Some(
5611 super::event_literal::Predicate::Sender(field.into().into()),
5612 );
5613 }
5614 pub fn with_sender<T: Into<super::SenderFilter>>(mut self, field: T) -> Self {
5617 self.set_sender(field.into());
5618 self
5619 }
5620 pub fn emit_module(&self) -> &super::EmitModuleFilter {
5622 if let Some(super::event_literal::Predicate::EmitModule(field)) = &self
5623 .predicate
5624 {
5625 field as _
5626 } else {
5627 super::EmitModuleFilter::default_instance() as _
5628 }
5629 }
5630 pub fn emit_module_opt(&self) -> Option<&super::EmitModuleFilter> {
5632 if let Some(super::event_literal::Predicate::EmitModule(field)) = &self
5633 .predicate
5634 {
5635 Some(field as _)
5636 } else {
5637 None
5638 }
5639 }
5640 pub fn emit_module_opt_mut(&mut self) -> Option<&mut super::EmitModuleFilter> {
5642 if let Some(super::event_literal::Predicate::EmitModule(field)) = &mut self
5643 .predicate
5644 {
5645 Some(field as _)
5646 } else {
5647 None
5648 }
5649 }
5650 pub fn emit_module_mut(&mut self) -> &mut super::EmitModuleFilter {
5654 if self.emit_module_opt_mut().is_none() {
5655 self.predicate = Some(
5656 super::event_literal::Predicate::EmitModule(
5657 super::EmitModuleFilter::default(),
5658 ),
5659 );
5660 }
5661 self.emit_module_opt_mut().unwrap()
5662 }
5663 pub fn set_emit_module<T: Into<super::EmitModuleFilter>>(&mut self, field: T) {
5666 self.predicate = Some(
5667 super::event_literal::Predicate::EmitModule(field.into().into()),
5668 );
5669 }
5670 pub fn with_emit_module<T: Into<super::EmitModuleFilter>>(
5673 mut self,
5674 field: T,
5675 ) -> Self {
5676 self.set_emit_module(field.into());
5677 self
5678 }
5679 pub fn event_type(&self) -> &super::EventTypeFilter {
5681 if let Some(super::event_literal::Predicate::EventType(field)) = &self
5682 .predicate
5683 {
5684 field as _
5685 } else {
5686 super::EventTypeFilter::default_instance() as _
5687 }
5688 }
5689 pub fn event_type_opt(&self) -> Option<&super::EventTypeFilter> {
5691 if let Some(super::event_literal::Predicate::EventType(field)) = &self
5692 .predicate
5693 {
5694 Some(field as _)
5695 } else {
5696 None
5697 }
5698 }
5699 pub fn event_type_opt_mut(&mut self) -> Option<&mut super::EventTypeFilter> {
5701 if let Some(super::event_literal::Predicate::EventType(field)) = &mut self
5702 .predicate
5703 {
5704 Some(field as _)
5705 } else {
5706 None
5707 }
5708 }
5709 pub fn event_type_mut(&mut self) -> &mut super::EventTypeFilter {
5713 if self.event_type_opt_mut().is_none() {
5714 self.predicate = Some(
5715 super::event_literal::Predicate::EventType(
5716 super::EventTypeFilter::default(),
5717 ),
5718 );
5719 }
5720 self.event_type_opt_mut().unwrap()
5721 }
5722 pub fn set_event_type<T: Into<super::EventTypeFilter>>(&mut self, field: T) {
5725 self.predicate = Some(
5726 super::event_literal::Predicate::EventType(field.into().into()),
5727 );
5728 }
5729 pub fn with_event_type<T: Into<super::EventTypeFilter>>(
5732 mut self,
5733 field: T,
5734 ) -> Self {
5735 self.set_event_type(field.into());
5736 self
5737 }
5738 pub fn event_stream_head(&self) -> &super::EventStreamHeadFilter {
5740 if let Some(super::event_literal::Predicate::EventStreamHead(field)) = &self
5741 .predicate
5742 {
5743 field as _
5744 } else {
5745 super::EventStreamHeadFilter::default_instance() as _
5746 }
5747 }
5748 pub fn event_stream_head_opt(&self) -> Option<&super::EventStreamHeadFilter> {
5750 if let Some(super::event_literal::Predicate::EventStreamHead(field)) = &self
5751 .predicate
5752 {
5753 Some(field as _)
5754 } else {
5755 None
5756 }
5757 }
5758 pub fn event_stream_head_opt_mut(
5760 &mut self,
5761 ) -> Option<&mut super::EventStreamHeadFilter> {
5762 if let Some(super::event_literal::Predicate::EventStreamHead(field)) = &mut self
5763 .predicate
5764 {
5765 Some(field as _)
5766 } else {
5767 None
5768 }
5769 }
5770 pub fn event_stream_head_mut(&mut self) -> &mut super::EventStreamHeadFilter {
5774 if self.event_stream_head_opt_mut().is_none() {
5775 self.predicate = Some(
5776 super::event_literal::Predicate::EventStreamHead(
5777 super::EventStreamHeadFilter::default(),
5778 ),
5779 );
5780 }
5781 self.event_stream_head_opt_mut().unwrap()
5782 }
5783 pub fn set_event_stream_head<T: Into<super::EventStreamHeadFilter>>(
5786 &mut self,
5787 field: T,
5788 ) {
5789 self.predicate = Some(
5790 super::event_literal::Predicate::EventStreamHead(field.into().into()),
5791 );
5792 }
5793 pub fn with_event_stream_head<T: Into<super::EventStreamHeadFilter>>(
5796 mut self,
5797 field: T,
5798 ) -> Self {
5799 self.set_event_stream_head(field.into());
5800 self
5801 }
5802 }
5803 impl super::EventStreamHeadFilter {
5804 pub const fn const_default() -> Self {
5805 Self { stream_id: None }
5806 }
5807 #[doc(hidden)]
5808 pub fn default_instance() -> &'static Self {
5809 static DEFAULT: super::EventStreamHeadFilter = super::EventStreamHeadFilter::const_default();
5810 &DEFAULT
5811 }
5812 pub fn stream_id_opt_mut(&mut self) -> Option<&mut String> {
5814 self.stream_id.as_mut().map(|field| field as _)
5815 }
5816 pub fn stream_id_mut(&mut self) -> &mut String {
5819 self.stream_id.get_or_insert_default()
5820 }
5821 pub fn stream_id_opt(&self) -> Option<&str> {
5823 self.stream_id.as_ref().map(|field| field as _)
5824 }
5825 pub fn set_stream_id<T: Into<String>>(&mut self, field: T) {
5827 self.stream_id = Some(field.into().into());
5828 }
5829 pub fn with_stream_id<T: Into<String>>(mut self, field: T) -> Self {
5831 self.set_stream_id(field.into());
5832 self
5833 }
5834 }
5835 impl super::EventTerm {
5836 pub const fn const_default() -> Self {
5837 Self { literals: Vec::new() }
5838 }
5839 #[doc(hidden)]
5840 pub fn default_instance() -> &'static Self {
5841 static DEFAULT: super::EventTerm = super::EventTerm::const_default();
5842 &DEFAULT
5843 }
5844 pub fn literals(&self) -> &[super::EventLiteral] {
5846 &self.literals
5847 }
5848 pub fn literals_mut(&mut self) -> &mut Vec<super::EventLiteral> {
5851 &mut self.literals
5852 }
5853 pub fn set_literals(&mut self, field: Vec<super::EventLiteral>) {
5855 self.literals = field;
5856 }
5857 pub fn with_literals(mut self, field: Vec<super::EventLiteral>) -> Self {
5859 self.set_literals(field);
5860 self
5861 }
5862 }
5863 impl super::EventTypeFilter {
5864 pub const fn const_default() -> Self {
5865 Self { event_type: None }
5866 }
5867 #[doc(hidden)]
5868 pub fn default_instance() -> &'static Self {
5869 static DEFAULT: super::EventTypeFilter = super::EventTypeFilter::const_default();
5870 &DEFAULT
5871 }
5872 pub fn event_type_opt_mut(&mut self) -> Option<&mut String> {
5874 self.event_type.as_mut().map(|field| field as _)
5875 }
5876 pub fn event_type_mut(&mut self) -> &mut String {
5879 self.event_type.get_or_insert_default()
5880 }
5881 pub fn event_type_opt(&self) -> Option<&str> {
5883 self.event_type.as_ref().map(|field| field as _)
5884 }
5885 pub fn set_event_type<T: Into<String>>(&mut self, field: T) {
5887 self.event_type = Some(field.into().into());
5888 }
5889 pub fn with_event_type<T: Into<String>>(mut self, field: T) -> Self {
5891 self.set_event_type(field.into());
5892 self
5893 }
5894 }
5895 impl super::ExecuteTransactionRequest {
5896 pub const fn const_default() -> Self {
5897 Self {
5898 transaction: None,
5899 signatures: Vec::new(),
5900 read_mask: None,
5901 }
5902 }
5903 #[doc(hidden)]
5904 pub fn default_instance() -> &'static Self {
5905 static DEFAULT: super::ExecuteTransactionRequest = super::ExecuteTransactionRequest::const_default();
5906 &DEFAULT
5907 }
5908 pub fn transaction(&self) -> &super::Transaction {
5910 self.transaction
5911 .as_ref()
5912 .map(|field| field as _)
5913 .unwrap_or_else(|| super::Transaction::default_instance() as _)
5914 }
5915 pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
5917 self.transaction.as_mut().map(|field| field as _)
5918 }
5919 pub fn transaction_mut(&mut self) -> &mut super::Transaction {
5922 self.transaction.get_or_insert_default()
5923 }
5924 pub fn transaction_opt(&self) -> Option<&super::Transaction> {
5926 self.transaction.as_ref().map(|field| field as _)
5927 }
5928 pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
5930 self.transaction = Some(field.into().into());
5931 }
5932 pub fn with_transaction<T: Into<super::Transaction>>(
5934 mut self,
5935 field: T,
5936 ) -> Self {
5937 self.set_transaction(field.into());
5938 self
5939 }
5940 pub fn signatures(&self) -> &[super::UserSignature] {
5942 &self.signatures
5943 }
5944 pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
5947 &mut self.signatures
5948 }
5949 pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
5951 self.signatures = field;
5952 }
5953 pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
5955 self.set_signatures(field);
5956 self
5957 }
5958 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
5960 self.read_mask.as_mut().map(|field| field as _)
5961 }
5962 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
5965 self.read_mask.get_or_insert_default()
5966 }
5967 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
5969 self.read_mask.as_ref().map(|field| field as _)
5970 }
5971 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
5973 self.read_mask = Some(field.into().into());
5974 }
5975 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
5977 mut self,
5978 field: T,
5979 ) -> Self {
5980 self.set_read_mask(field.into());
5981 self
5982 }
5983 }
5984 impl super::ExecuteTransactionResponse {
5985 pub const fn const_default() -> Self {
5986 Self { transaction: None }
5987 }
5988 #[doc(hidden)]
5989 pub fn default_instance() -> &'static Self {
5990 static DEFAULT: super::ExecuteTransactionResponse = super::ExecuteTransactionResponse::const_default();
5991 &DEFAULT
5992 }
5993 pub fn transaction(&self) -> &super::ExecutedTransaction {
5995 self.transaction
5996 .as_ref()
5997 .map(|field| field as _)
5998 .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
5999 }
6000 pub fn transaction_opt_mut(
6002 &mut self,
6003 ) -> Option<&mut super::ExecutedTransaction> {
6004 self.transaction.as_mut().map(|field| field as _)
6005 }
6006 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
6009 self.transaction.get_or_insert_default()
6010 }
6011 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
6013 self.transaction.as_ref().map(|field| field as _)
6014 }
6015 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
6017 &mut self,
6018 field: T,
6019 ) {
6020 self.transaction = Some(field.into().into());
6021 }
6022 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
6024 mut self,
6025 field: T,
6026 ) -> Self {
6027 self.set_transaction(field.into());
6028 self
6029 }
6030 }
6031 impl super::ExecutedTransaction {
6032 pub const fn const_default() -> Self {
6033 Self {
6034 digest: None,
6035 transaction: None,
6036 signatures: Vec::new(),
6037 effects: None,
6038 events: None,
6039 checkpoint: None,
6040 timestamp: None,
6041 balance_changes: Vec::new(),
6042 objects: None,
6043 transaction_index: None,
6044 }
6045 }
6046 #[doc(hidden)]
6047 pub fn default_instance() -> &'static Self {
6048 static DEFAULT: super::ExecutedTransaction = super::ExecutedTransaction::const_default();
6049 &DEFAULT
6050 }
6051 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
6053 self.digest.as_mut().map(|field| field as _)
6054 }
6055 pub fn digest_mut(&mut self) -> &mut String {
6058 self.digest.get_or_insert_default()
6059 }
6060 pub fn digest_opt(&self) -> Option<&str> {
6062 self.digest.as_ref().map(|field| field as _)
6063 }
6064 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
6066 self.digest = Some(field.into().into());
6067 }
6068 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
6070 self.set_digest(field.into());
6071 self
6072 }
6073 pub fn transaction(&self) -> &super::Transaction {
6075 self.transaction
6076 .as_ref()
6077 .map(|field| field as _)
6078 .unwrap_or_else(|| super::Transaction::default_instance() as _)
6079 }
6080 pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
6082 self.transaction.as_mut().map(|field| field as _)
6083 }
6084 pub fn transaction_mut(&mut self) -> &mut super::Transaction {
6087 self.transaction.get_or_insert_default()
6088 }
6089 pub fn transaction_opt(&self) -> Option<&super::Transaction> {
6091 self.transaction.as_ref().map(|field| field as _)
6092 }
6093 pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
6095 self.transaction = Some(field.into().into());
6096 }
6097 pub fn with_transaction<T: Into<super::Transaction>>(
6099 mut self,
6100 field: T,
6101 ) -> Self {
6102 self.set_transaction(field.into());
6103 self
6104 }
6105 pub fn signatures(&self) -> &[super::UserSignature] {
6107 &self.signatures
6108 }
6109 pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
6112 &mut self.signatures
6113 }
6114 pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
6116 self.signatures = field;
6117 }
6118 pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
6120 self.set_signatures(field);
6121 self
6122 }
6123 pub fn effects(&self) -> &super::TransactionEffects {
6125 self.effects
6126 .as_ref()
6127 .map(|field| field as _)
6128 .unwrap_or_else(|| super::TransactionEffects::default_instance() as _)
6129 }
6130 pub fn effects_opt_mut(&mut self) -> Option<&mut super::TransactionEffects> {
6132 self.effects.as_mut().map(|field| field as _)
6133 }
6134 pub fn effects_mut(&mut self) -> &mut super::TransactionEffects {
6137 self.effects.get_or_insert_default()
6138 }
6139 pub fn effects_opt(&self) -> Option<&super::TransactionEffects> {
6141 self.effects.as_ref().map(|field| field as _)
6142 }
6143 pub fn set_effects<T: Into<super::TransactionEffects>>(&mut self, field: T) {
6145 self.effects = Some(field.into().into());
6146 }
6147 pub fn with_effects<T: Into<super::TransactionEffects>>(
6149 mut self,
6150 field: T,
6151 ) -> Self {
6152 self.set_effects(field.into());
6153 self
6154 }
6155 pub fn events(&self) -> &super::TransactionEvents {
6157 self.events
6158 .as_ref()
6159 .map(|field| field as _)
6160 .unwrap_or_else(|| super::TransactionEvents::default_instance() as _)
6161 }
6162 pub fn events_opt_mut(&mut self) -> Option<&mut super::TransactionEvents> {
6164 self.events.as_mut().map(|field| field as _)
6165 }
6166 pub fn events_mut(&mut self) -> &mut super::TransactionEvents {
6169 self.events.get_or_insert_default()
6170 }
6171 pub fn events_opt(&self) -> Option<&super::TransactionEvents> {
6173 self.events.as_ref().map(|field| field as _)
6174 }
6175 pub fn set_events<T: Into<super::TransactionEvents>>(&mut self, field: T) {
6177 self.events = Some(field.into().into());
6178 }
6179 pub fn with_events<T: Into<super::TransactionEvents>>(
6181 mut self,
6182 field: T,
6183 ) -> Self {
6184 self.set_events(field.into());
6185 self
6186 }
6187 pub fn checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
6189 self.checkpoint.as_mut().map(|field| field as _)
6190 }
6191 pub fn checkpoint_mut(&mut self) -> &mut u64 {
6194 self.checkpoint.get_or_insert_default()
6195 }
6196 pub fn checkpoint_opt(&self) -> Option<u64> {
6198 self.checkpoint.as_ref().map(|field| *field)
6199 }
6200 pub fn set_checkpoint(&mut self, field: u64) {
6202 self.checkpoint = Some(field);
6203 }
6204 pub fn with_checkpoint(mut self, field: u64) -> Self {
6206 self.set_checkpoint(field);
6207 self
6208 }
6209 pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
6211 self.timestamp.as_mut().map(|field| field as _)
6212 }
6213 pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
6216 self.timestamp.get_or_insert_default()
6217 }
6218 pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
6220 self.timestamp.as_ref().map(|field| field as _)
6221 }
6222 pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
6224 self.timestamp = Some(field.into().into());
6225 }
6226 pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
6228 mut self,
6229 field: T,
6230 ) -> Self {
6231 self.set_timestamp(field.into());
6232 self
6233 }
6234 pub fn balance_changes(&self) -> &[super::BalanceChange] {
6236 &self.balance_changes
6237 }
6238 pub fn balance_changes_mut(&mut self) -> &mut Vec<super::BalanceChange> {
6241 &mut self.balance_changes
6242 }
6243 pub fn set_balance_changes(&mut self, field: Vec<super::BalanceChange>) {
6245 self.balance_changes = field;
6246 }
6247 pub fn with_balance_changes(mut self, field: Vec<super::BalanceChange>) -> Self {
6249 self.set_balance_changes(field);
6250 self
6251 }
6252 pub fn objects(&self) -> &super::ObjectSet {
6254 self.objects
6255 .as_ref()
6256 .map(|field| field as _)
6257 .unwrap_or_else(|| super::ObjectSet::default_instance() as _)
6258 }
6259 pub fn objects_opt_mut(&mut self) -> Option<&mut super::ObjectSet> {
6261 self.objects.as_mut().map(|field| field as _)
6262 }
6263 pub fn objects_mut(&mut self) -> &mut super::ObjectSet {
6266 self.objects.get_or_insert_default()
6267 }
6268 pub fn objects_opt(&self) -> Option<&super::ObjectSet> {
6270 self.objects.as_ref().map(|field| field as _)
6271 }
6272 pub fn set_objects<T: Into<super::ObjectSet>>(&mut self, field: T) {
6274 self.objects = Some(field.into().into());
6275 }
6276 pub fn with_objects<T: Into<super::ObjectSet>>(mut self, field: T) -> Self {
6278 self.set_objects(field.into());
6279 self
6280 }
6281 pub fn transaction_index_opt_mut(&mut self) -> Option<&mut u64> {
6283 self.transaction_index.as_mut().map(|field| field as _)
6284 }
6285 pub fn transaction_index_mut(&mut self) -> &mut u64 {
6288 self.transaction_index.get_or_insert_default()
6289 }
6290 pub fn transaction_index_opt(&self) -> Option<u64> {
6292 self.transaction_index.as_ref().map(|field| *field)
6293 }
6294 pub fn set_transaction_index(&mut self, field: u64) {
6296 self.transaction_index = Some(field);
6297 }
6298 pub fn with_transaction_index(mut self, field: u64) -> Self {
6300 self.set_transaction_index(field);
6301 self
6302 }
6303 }
6304 impl super::ExecutionError {
6305 pub const fn const_default() -> Self {
6306 Self {
6307 description: None,
6308 command: None,
6309 kind: None,
6310 error_details: None,
6311 }
6312 }
6313 #[doc(hidden)]
6314 pub fn default_instance() -> &'static Self {
6315 static DEFAULT: super::ExecutionError = super::ExecutionError::const_default();
6316 &DEFAULT
6317 }
6318 pub fn description_opt_mut(&mut self) -> Option<&mut String> {
6320 self.description.as_mut().map(|field| field as _)
6321 }
6322 pub fn description_mut(&mut self) -> &mut String {
6325 self.description.get_or_insert_default()
6326 }
6327 pub fn description_opt(&self) -> Option<&str> {
6329 self.description.as_ref().map(|field| field as _)
6330 }
6331 pub fn set_description<T: Into<String>>(&mut self, field: T) {
6333 self.description = Some(field.into().into());
6334 }
6335 pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
6337 self.set_description(field.into());
6338 self
6339 }
6340 pub fn command_opt_mut(&mut self) -> Option<&mut u64> {
6342 self.command.as_mut().map(|field| field as _)
6343 }
6344 pub fn command_mut(&mut self) -> &mut u64 {
6347 self.command.get_or_insert_default()
6348 }
6349 pub fn command_opt(&self) -> Option<u64> {
6351 self.command.as_ref().map(|field| *field)
6352 }
6353 pub fn set_command(&mut self, field: u64) {
6355 self.command = Some(field);
6356 }
6357 pub fn with_command(mut self, field: u64) -> Self {
6359 self.set_command(field);
6360 self
6361 }
6362 pub fn with_kind<T: Into<super::execution_error::ExecutionErrorKind>>(
6364 mut self,
6365 field: T,
6366 ) -> Self {
6367 self.set_kind(field.into());
6368 self
6369 }
6370 pub fn abort(&self) -> &super::MoveAbort {
6372 if let Some(super::execution_error::ErrorDetails::Abort(field)) = &self
6373 .error_details
6374 {
6375 field as _
6376 } else {
6377 super::MoveAbort::default_instance() as _
6378 }
6379 }
6380 pub fn abort_opt(&self) -> Option<&super::MoveAbort> {
6382 if let Some(super::execution_error::ErrorDetails::Abort(field)) = &self
6383 .error_details
6384 {
6385 Some(field as _)
6386 } else {
6387 None
6388 }
6389 }
6390 pub fn abort_opt_mut(&mut self) -> Option<&mut super::MoveAbort> {
6392 if let Some(super::execution_error::ErrorDetails::Abort(field)) = &mut self
6393 .error_details
6394 {
6395 Some(field as _)
6396 } else {
6397 None
6398 }
6399 }
6400 pub fn abort_mut(&mut self) -> &mut super::MoveAbort {
6404 if self.abort_opt_mut().is_none() {
6405 self.error_details = Some(
6406 super::execution_error::ErrorDetails::Abort(
6407 super::MoveAbort::default(),
6408 ),
6409 );
6410 }
6411 self.abort_opt_mut().unwrap()
6412 }
6413 pub fn set_abort<T: Into<super::MoveAbort>>(&mut self, field: T) {
6416 self.error_details = Some(
6417 super::execution_error::ErrorDetails::Abort(field.into().into()),
6418 );
6419 }
6420 pub fn with_abort<T: Into<super::MoveAbort>>(mut self, field: T) -> Self {
6423 self.set_abort(field.into());
6424 self
6425 }
6426 pub fn size_error(&self) -> &super::SizeError {
6428 if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &self
6429 .error_details
6430 {
6431 field as _
6432 } else {
6433 super::SizeError::default_instance() as _
6434 }
6435 }
6436 pub fn size_error_opt(&self) -> Option<&super::SizeError> {
6438 if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &self
6439 .error_details
6440 {
6441 Some(field as _)
6442 } else {
6443 None
6444 }
6445 }
6446 pub fn size_error_opt_mut(&mut self) -> Option<&mut super::SizeError> {
6448 if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &mut self
6449 .error_details
6450 {
6451 Some(field as _)
6452 } else {
6453 None
6454 }
6455 }
6456 pub fn size_error_mut(&mut self) -> &mut super::SizeError {
6460 if self.size_error_opt_mut().is_none() {
6461 self.error_details = Some(
6462 super::execution_error::ErrorDetails::SizeError(
6463 super::SizeError::default(),
6464 ),
6465 );
6466 }
6467 self.size_error_opt_mut().unwrap()
6468 }
6469 pub fn set_size_error<T: Into<super::SizeError>>(&mut self, field: T) {
6472 self.error_details = Some(
6473 super::execution_error::ErrorDetails::SizeError(field.into().into()),
6474 );
6475 }
6476 pub fn with_size_error<T: Into<super::SizeError>>(mut self, field: T) -> Self {
6479 self.set_size_error(field.into());
6480 self
6481 }
6482 pub fn command_argument_error(&self) -> &super::CommandArgumentError {
6484 if let Some(
6485 super::execution_error::ErrorDetails::CommandArgumentError(field),
6486 ) = &self.error_details
6487 {
6488 field as _
6489 } else {
6490 super::CommandArgumentError::default_instance() as _
6491 }
6492 }
6493 pub fn command_argument_error_opt(
6495 &self,
6496 ) -> Option<&super::CommandArgumentError> {
6497 if let Some(
6498 super::execution_error::ErrorDetails::CommandArgumentError(field),
6499 ) = &self.error_details
6500 {
6501 Some(field as _)
6502 } else {
6503 None
6504 }
6505 }
6506 pub fn command_argument_error_opt_mut(
6508 &mut self,
6509 ) -> Option<&mut super::CommandArgumentError> {
6510 if let Some(
6511 super::execution_error::ErrorDetails::CommandArgumentError(field),
6512 ) = &mut self.error_details
6513 {
6514 Some(field as _)
6515 } else {
6516 None
6517 }
6518 }
6519 pub fn command_argument_error_mut(
6523 &mut self,
6524 ) -> &mut super::CommandArgumentError {
6525 if self.command_argument_error_opt_mut().is_none() {
6526 self.error_details = Some(
6527 super::execution_error::ErrorDetails::CommandArgumentError(
6528 super::CommandArgumentError::default(),
6529 ),
6530 );
6531 }
6532 self.command_argument_error_opt_mut().unwrap()
6533 }
6534 pub fn set_command_argument_error<T: Into<super::CommandArgumentError>>(
6537 &mut self,
6538 field: T,
6539 ) {
6540 self.error_details = Some(
6541 super::execution_error::ErrorDetails::CommandArgumentError(
6542 field.into().into(),
6543 ),
6544 );
6545 }
6546 pub fn with_command_argument_error<T: Into<super::CommandArgumentError>>(
6549 mut self,
6550 field: T,
6551 ) -> Self {
6552 self.set_command_argument_error(field.into());
6553 self
6554 }
6555 pub fn type_argument_error(&self) -> &super::TypeArgumentError {
6557 if let Some(
6558 super::execution_error::ErrorDetails::TypeArgumentError(field),
6559 ) = &self.error_details
6560 {
6561 field as _
6562 } else {
6563 super::TypeArgumentError::default_instance() as _
6564 }
6565 }
6566 pub fn type_argument_error_opt(&self) -> Option<&super::TypeArgumentError> {
6568 if let Some(
6569 super::execution_error::ErrorDetails::TypeArgumentError(field),
6570 ) = &self.error_details
6571 {
6572 Some(field as _)
6573 } else {
6574 None
6575 }
6576 }
6577 pub fn type_argument_error_opt_mut(
6579 &mut self,
6580 ) -> Option<&mut super::TypeArgumentError> {
6581 if let Some(
6582 super::execution_error::ErrorDetails::TypeArgumentError(field),
6583 ) = &mut self.error_details
6584 {
6585 Some(field as _)
6586 } else {
6587 None
6588 }
6589 }
6590 pub fn type_argument_error_mut(&mut self) -> &mut super::TypeArgumentError {
6594 if self.type_argument_error_opt_mut().is_none() {
6595 self.error_details = Some(
6596 super::execution_error::ErrorDetails::TypeArgumentError(
6597 super::TypeArgumentError::default(),
6598 ),
6599 );
6600 }
6601 self.type_argument_error_opt_mut().unwrap()
6602 }
6603 pub fn set_type_argument_error<T: Into<super::TypeArgumentError>>(
6606 &mut self,
6607 field: T,
6608 ) {
6609 self.error_details = Some(
6610 super::execution_error::ErrorDetails::TypeArgumentError(
6611 field.into().into(),
6612 ),
6613 );
6614 }
6615 pub fn with_type_argument_error<T: Into<super::TypeArgumentError>>(
6618 mut self,
6619 field: T,
6620 ) -> Self {
6621 self.set_type_argument_error(field.into());
6622 self
6623 }
6624 pub fn package_upgrade_error(&self) -> &super::PackageUpgradeError {
6626 if let Some(
6627 super::execution_error::ErrorDetails::PackageUpgradeError(field),
6628 ) = &self.error_details
6629 {
6630 field as _
6631 } else {
6632 super::PackageUpgradeError::default_instance() as _
6633 }
6634 }
6635 pub fn package_upgrade_error_opt(&self) -> Option<&super::PackageUpgradeError> {
6637 if let Some(
6638 super::execution_error::ErrorDetails::PackageUpgradeError(field),
6639 ) = &self.error_details
6640 {
6641 Some(field as _)
6642 } else {
6643 None
6644 }
6645 }
6646 pub fn package_upgrade_error_opt_mut(
6648 &mut self,
6649 ) -> Option<&mut super::PackageUpgradeError> {
6650 if let Some(
6651 super::execution_error::ErrorDetails::PackageUpgradeError(field),
6652 ) = &mut self.error_details
6653 {
6654 Some(field as _)
6655 } else {
6656 None
6657 }
6658 }
6659 pub fn package_upgrade_error_mut(&mut self) -> &mut super::PackageUpgradeError {
6663 if self.package_upgrade_error_opt_mut().is_none() {
6664 self.error_details = Some(
6665 super::execution_error::ErrorDetails::PackageUpgradeError(
6666 super::PackageUpgradeError::default(),
6667 ),
6668 );
6669 }
6670 self.package_upgrade_error_opt_mut().unwrap()
6671 }
6672 pub fn set_package_upgrade_error<T: Into<super::PackageUpgradeError>>(
6675 &mut self,
6676 field: T,
6677 ) {
6678 self.error_details = Some(
6679 super::execution_error::ErrorDetails::PackageUpgradeError(
6680 field.into().into(),
6681 ),
6682 );
6683 }
6684 pub fn with_package_upgrade_error<T: Into<super::PackageUpgradeError>>(
6687 mut self,
6688 field: T,
6689 ) -> Self {
6690 self.set_package_upgrade_error(field.into());
6691 self
6692 }
6693 pub fn index_error(&self) -> &super::IndexError {
6695 if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &self
6696 .error_details
6697 {
6698 field as _
6699 } else {
6700 super::IndexError::default_instance() as _
6701 }
6702 }
6703 pub fn index_error_opt(&self) -> Option<&super::IndexError> {
6705 if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &self
6706 .error_details
6707 {
6708 Some(field as _)
6709 } else {
6710 None
6711 }
6712 }
6713 pub fn index_error_opt_mut(&mut self) -> Option<&mut super::IndexError> {
6715 if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &mut self
6716 .error_details
6717 {
6718 Some(field as _)
6719 } else {
6720 None
6721 }
6722 }
6723 pub fn index_error_mut(&mut self) -> &mut super::IndexError {
6727 if self.index_error_opt_mut().is_none() {
6728 self.error_details = Some(
6729 super::execution_error::ErrorDetails::IndexError(
6730 super::IndexError::default(),
6731 ),
6732 );
6733 }
6734 self.index_error_opt_mut().unwrap()
6735 }
6736 pub fn set_index_error<T: Into<super::IndexError>>(&mut self, field: T) {
6739 self.error_details = Some(
6740 super::execution_error::ErrorDetails::IndexError(field.into().into()),
6741 );
6742 }
6743 pub fn with_index_error<T: Into<super::IndexError>>(mut self, field: T) -> Self {
6746 self.set_index_error(field.into());
6747 self
6748 }
6749 pub fn object_id(&self) -> &str {
6751 if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &self
6752 .error_details
6753 {
6754 field as _
6755 } else {
6756 ""
6757 }
6758 }
6759 pub fn object_id_opt(&self) -> Option<&str> {
6761 if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &self
6762 .error_details
6763 {
6764 Some(field as _)
6765 } else {
6766 None
6767 }
6768 }
6769 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
6771 if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &mut self
6772 .error_details
6773 {
6774 Some(field as _)
6775 } else {
6776 None
6777 }
6778 }
6779 pub fn object_id_mut(&mut self) -> &mut String {
6783 if self.object_id_opt_mut().is_none() {
6784 self.error_details = Some(
6785 super::execution_error::ErrorDetails::ObjectId(String::default()),
6786 );
6787 }
6788 self.object_id_opt_mut().unwrap()
6789 }
6790 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
6793 self.error_details = Some(
6794 super::execution_error::ErrorDetails::ObjectId(field.into().into()),
6795 );
6796 }
6797 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
6800 self.set_object_id(field.into());
6801 self
6802 }
6803 pub fn coin_deny_list_error(&self) -> &super::CoinDenyListError {
6805 if let Some(
6806 super::execution_error::ErrorDetails::CoinDenyListError(field),
6807 ) = &self.error_details
6808 {
6809 field as _
6810 } else {
6811 super::CoinDenyListError::default_instance() as _
6812 }
6813 }
6814 pub fn coin_deny_list_error_opt(&self) -> Option<&super::CoinDenyListError> {
6816 if let Some(
6817 super::execution_error::ErrorDetails::CoinDenyListError(field),
6818 ) = &self.error_details
6819 {
6820 Some(field as _)
6821 } else {
6822 None
6823 }
6824 }
6825 pub fn coin_deny_list_error_opt_mut(
6827 &mut self,
6828 ) -> Option<&mut super::CoinDenyListError> {
6829 if let Some(
6830 super::execution_error::ErrorDetails::CoinDenyListError(field),
6831 ) = &mut self.error_details
6832 {
6833 Some(field as _)
6834 } else {
6835 None
6836 }
6837 }
6838 pub fn coin_deny_list_error_mut(&mut self) -> &mut super::CoinDenyListError {
6842 if self.coin_deny_list_error_opt_mut().is_none() {
6843 self.error_details = Some(
6844 super::execution_error::ErrorDetails::CoinDenyListError(
6845 super::CoinDenyListError::default(),
6846 ),
6847 );
6848 }
6849 self.coin_deny_list_error_opt_mut().unwrap()
6850 }
6851 pub fn set_coin_deny_list_error<T: Into<super::CoinDenyListError>>(
6854 &mut self,
6855 field: T,
6856 ) {
6857 self.error_details = Some(
6858 super::execution_error::ErrorDetails::CoinDenyListError(
6859 field.into().into(),
6860 ),
6861 );
6862 }
6863 pub fn with_coin_deny_list_error<T: Into<super::CoinDenyListError>>(
6866 mut self,
6867 field: T,
6868 ) -> Self {
6869 self.set_coin_deny_list_error(field.into());
6870 self
6871 }
6872 pub fn congested_objects(&self) -> &super::CongestedObjects {
6874 if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &self
6875 .error_details
6876 {
6877 field as _
6878 } else {
6879 super::CongestedObjects::default_instance() as _
6880 }
6881 }
6882 pub fn congested_objects_opt(&self) -> Option<&super::CongestedObjects> {
6884 if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &self
6885 .error_details
6886 {
6887 Some(field as _)
6888 } else {
6889 None
6890 }
6891 }
6892 pub fn congested_objects_opt_mut(
6894 &mut self,
6895 ) -> Option<&mut super::CongestedObjects> {
6896 if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &mut self
6897 .error_details
6898 {
6899 Some(field as _)
6900 } else {
6901 None
6902 }
6903 }
6904 pub fn congested_objects_mut(&mut self) -> &mut super::CongestedObjects {
6908 if self.congested_objects_opt_mut().is_none() {
6909 self.error_details = Some(
6910 super::execution_error::ErrorDetails::CongestedObjects(
6911 super::CongestedObjects::default(),
6912 ),
6913 );
6914 }
6915 self.congested_objects_opt_mut().unwrap()
6916 }
6917 pub fn set_congested_objects<T: Into<super::CongestedObjects>>(
6920 &mut self,
6921 field: T,
6922 ) {
6923 self.error_details = Some(
6924 super::execution_error::ErrorDetails::CongestedObjects(
6925 field.into().into(),
6926 ),
6927 );
6928 }
6929 pub fn with_congested_objects<T: Into<super::CongestedObjects>>(
6932 mut self,
6933 field: T,
6934 ) -> Self {
6935 self.set_congested_objects(field.into());
6936 self
6937 }
6938 }
6939 impl super::ExecutionStatus {
6940 pub const fn const_default() -> Self {
6941 Self { success: None, error: None }
6942 }
6943 #[doc(hidden)]
6944 pub fn default_instance() -> &'static Self {
6945 static DEFAULT: super::ExecutionStatus = super::ExecutionStatus::const_default();
6946 &DEFAULT
6947 }
6948 pub fn success_opt_mut(&mut self) -> Option<&mut bool> {
6950 self.success.as_mut().map(|field| field as _)
6951 }
6952 pub fn success_mut(&mut self) -> &mut bool {
6955 self.success.get_or_insert_default()
6956 }
6957 pub fn success_opt(&self) -> Option<bool> {
6959 self.success.as_ref().map(|field| *field)
6960 }
6961 pub fn set_success(&mut self, field: bool) {
6963 self.success = Some(field);
6964 }
6965 pub fn with_success(mut self, field: bool) -> Self {
6967 self.set_success(field);
6968 self
6969 }
6970 pub fn error(&self) -> &super::ExecutionError {
6972 self.error
6973 .as_ref()
6974 .map(|field| field as _)
6975 .unwrap_or_else(|| super::ExecutionError::default_instance() as _)
6976 }
6977 pub fn error_opt_mut(&mut self) -> Option<&mut super::ExecutionError> {
6979 self.error.as_mut().map(|field| field as _)
6980 }
6981 pub fn error_mut(&mut self) -> &mut super::ExecutionError {
6984 self.error.get_or_insert_default()
6985 }
6986 pub fn error_opt(&self) -> Option<&super::ExecutionError> {
6988 self.error.as_ref().map(|field| field as _)
6989 }
6990 pub fn set_error<T: Into<super::ExecutionError>>(&mut self, field: T) {
6992 self.error = Some(field.into().into());
6993 }
6994 pub fn with_error<T: Into<super::ExecutionError>>(mut self, field: T) -> Self {
6996 self.set_error(field.into());
6997 self
6998 }
6999 }
7000 impl super::ExecutionTimeObservation {
7001 pub const fn const_default() -> Self {
7002 Self {
7003 kind: None,
7004 move_entry_point: None,
7005 validator_observations: Vec::new(),
7006 }
7007 }
7008 #[doc(hidden)]
7009 pub fn default_instance() -> &'static Self {
7010 static DEFAULT: super::ExecutionTimeObservation = super::ExecutionTimeObservation::const_default();
7011 &DEFAULT
7012 }
7013 pub fn with_kind<
7015 T: Into<super::execution_time_observation::ExecutionTimeObservationKind>,
7016 >(mut self, field: T) -> Self {
7017 self.set_kind(field.into());
7018 self
7019 }
7020 pub fn move_entry_point(&self) -> &super::MoveCall {
7022 self.move_entry_point
7023 .as_ref()
7024 .map(|field| field as _)
7025 .unwrap_or_else(|| super::MoveCall::default_instance() as _)
7026 }
7027 pub fn move_entry_point_opt_mut(&mut self) -> Option<&mut super::MoveCall> {
7029 self.move_entry_point.as_mut().map(|field| field as _)
7030 }
7031 pub fn move_entry_point_mut(&mut self) -> &mut super::MoveCall {
7034 self.move_entry_point.get_or_insert_default()
7035 }
7036 pub fn move_entry_point_opt(&self) -> Option<&super::MoveCall> {
7038 self.move_entry_point.as_ref().map(|field| field as _)
7039 }
7040 pub fn set_move_entry_point<T: Into<super::MoveCall>>(&mut self, field: T) {
7042 self.move_entry_point = Some(field.into().into());
7043 }
7044 pub fn with_move_entry_point<T: Into<super::MoveCall>>(
7046 mut self,
7047 field: T,
7048 ) -> Self {
7049 self.set_move_entry_point(field.into());
7050 self
7051 }
7052 pub fn validator_observations(
7054 &self,
7055 ) -> &[super::ValidatorExecutionTimeObservation] {
7056 &self.validator_observations
7057 }
7058 pub fn validator_observations_mut(
7061 &mut self,
7062 ) -> &mut Vec<super::ValidatorExecutionTimeObservation> {
7063 &mut self.validator_observations
7064 }
7065 pub fn set_validator_observations(
7067 &mut self,
7068 field: Vec<super::ValidatorExecutionTimeObservation>,
7069 ) {
7070 self.validator_observations = field;
7071 }
7072 pub fn with_validator_observations(
7074 mut self,
7075 field: Vec<super::ValidatorExecutionTimeObservation>,
7076 ) -> Self {
7077 self.set_validator_observations(field);
7078 self
7079 }
7080 }
7081 impl super::ExecutionTimeObservations {
7082 pub const fn const_default() -> Self {
7083 Self {
7084 version: None,
7085 observations: Vec::new(),
7086 }
7087 }
7088 #[doc(hidden)]
7089 pub fn default_instance() -> &'static Self {
7090 static DEFAULT: super::ExecutionTimeObservations = super::ExecutionTimeObservations::const_default();
7091 &DEFAULT
7092 }
7093 pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
7095 self.version.as_mut().map(|field| field as _)
7096 }
7097 pub fn version_mut(&mut self) -> &mut i32 {
7100 self.version.get_or_insert_default()
7101 }
7102 pub fn version_opt(&self) -> Option<i32> {
7104 self.version.as_ref().map(|field| *field)
7105 }
7106 pub fn set_version(&mut self, field: i32) {
7108 self.version = Some(field);
7109 }
7110 pub fn with_version(mut self, field: i32) -> Self {
7112 self.set_version(field);
7113 self
7114 }
7115 pub fn observations(&self) -> &[super::ExecutionTimeObservation] {
7117 &self.observations
7118 }
7119 pub fn observations_mut(&mut self) -> &mut Vec<super::ExecutionTimeObservation> {
7122 &mut self.observations
7123 }
7124 pub fn set_observations(&mut self, field: Vec<super::ExecutionTimeObservation>) {
7126 self.observations = field;
7127 }
7128 pub fn with_observations(
7130 mut self,
7131 field: Vec<super::ExecutionTimeObservation>,
7132 ) -> Self {
7133 self.set_observations(field);
7134 self
7135 }
7136 }
7137 impl super::FieldDescriptor {
7138 pub const fn const_default() -> Self {
7139 Self {
7140 name: None,
7141 position: None,
7142 r#type: None,
7143 }
7144 }
7145 #[doc(hidden)]
7146 pub fn default_instance() -> &'static Self {
7147 static DEFAULT: super::FieldDescriptor = super::FieldDescriptor::const_default();
7148 &DEFAULT
7149 }
7150 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
7152 self.name.as_mut().map(|field| field as _)
7153 }
7154 pub fn name_mut(&mut self) -> &mut String {
7157 self.name.get_or_insert_default()
7158 }
7159 pub fn name_opt(&self) -> Option<&str> {
7161 self.name.as_ref().map(|field| field as _)
7162 }
7163 pub fn set_name<T: Into<String>>(&mut self, field: T) {
7165 self.name = Some(field.into().into());
7166 }
7167 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
7169 self.set_name(field.into());
7170 self
7171 }
7172 pub fn position_opt_mut(&mut self) -> Option<&mut u32> {
7174 self.position.as_mut().map(|field| field as _)
7175 }
7176 pub fn position_mut(&mut self) -> &mut u32 {
7179 self.position.get_or_insert_default()
7180 }
7181 pub fn position_opt(&self) -> Option<u32> {
7183 self.position.as_ref().map(|field| *field)
7184 }
7185 pub fn set_position(&mut self, field: u32) {
7187 self.position = Some(field);
7188 }
7189 pub fn with_position(mut self, field: u32) -> Self {
7191 self.set_position(field);
7192 self
7193 }
7194 pub fn r#type(&self) -> &super::OpenSignatureBody {
7196 self.r#type
7197 .as_ref()
7198 .map(|field| field as _)
7199 .unwrap_or_else(|| super::OpenSignatureBody::default_instance() as _)
7200 }
7201 pub fn type_opt_mut(&mut self) -> Option<&mut super::OpenSignatureBody> {
7203 self.r#type.as_mut().map(|field| field as _)
7204 }
7205 pub fn type_mut(&mut self) -> &mut super::OpenSignatureBody {
7208 self.r#type.get_or_insert_default()
7209 }
7210 pub fn type_opt(&self) -> Option<&super::OpenSignatureBody> {
7212 self.r#type.as_ref().map(|field| field as _)
7213 }
7214 pub fn set_type<T: Into<super::OpenSignatureBody>>(&mut self, field: T) {
7216 self.r#type = Some(field.into().into());
7217 }
7218 pub fn with_type<T: Into<super::OpenSignatureBody>>(mut self, field: T) -> Self {
7220 self.set_type(field.into());
7221 self
7222 }
7223 }
7224 impl super::FunctionDescriptor {
7225 pub const fn const_default() -> Self {
7226 Self {
7227 name: None,
7228 visibility: None,
7229 is_entry: None,
7230 type_parameters: Vec::new(),
7231 parameters: Vec::new(),
7232 returns: Vec::new(),
7233 }
7234 }
7235 #[doc(hidden)]
7236 pub fn default_instance() -> &'static Self {
7237 static DEFAULT: super::FunctionDescriptor = super::FunctionDescriptor::const_default();
7238 &DEFAULT
7239 }
7240 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
7242 self.name.as_mut().map(|field| field as _)
7243 }
7244 pub fn name_mut(&mut self) -> &mut String {
7247 self.name.get_or_insert_default()
7248 }
7249 pub fn name_opt(&self) -> Option<&str> {
7251 self.name.as_ref().map(|field| field as _)
7252 }
7253 pub fn set_name<T: Into<String>>(&mut self, field: T) {
7255 self.name = Some(field.into().into());
7256 }
7257 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
7259 self.set_name(field.into());
7260 self
7261 }
7262 pub fn with_visibility<T: Into<super::function_descriptor::Visibility>>(
7264 mut self,
7265 field: T,
7266 ) -> Self {
7267 self.set_visibility(field.into());
7268 self
7269 }
7270 pub fn is_entry_opt_mut(&mut self) -> Option<&mut bool> {
7272 self.is_entry.as_mut().map(|field| field as _)
7273 }
7274 pub fn is_entry_mut(&mut self) -> &mut bool {
7277 self.is_entry.get_or_insert_default()
7278 }
7279 pub fn is_entry_opt(&self) -> Option<bool> {
7281 self.is_entry.as_ref().map(|field| *field)
7282 }
7283 pub fn set_is_entry(&mut self, field: bool) {
7285 self.is_entry = Some(field);
7286 }
7287 pub fn with_is_entry(mut self, field: bool) -> Self {
7289 self.set_is_entry(field);
7290 self
7291 }
7292 pub fn type_parameters(&self) -> &[super::TypeParameter] {
7294 &self.type_parameters
7295 }
7296 pub fn type_parameters_mut(&mut self) -> &mut Vec<super::TypeParameter> {
7299 &mut self.type_parameters
7300 }
7301 pub fn set_type_parameters(&mut self, field: Vec<super::TypeParameter>) {
7303 self.type_parameters = field;
7304 }
7305 pub fn with_type_parameters(mut self, field: Vec<super::TypeParameter>) -> Self {
7307 self.set_type_parameters(field);
7308 self
7309 }
7310 pub fn parameters(&self) -> &[super::OpenSignature] {
7312 &self.parameters
7313 }
7314 pub fn parameters_mut(&mut self) -> &mut Vec<super::OpenSignature> {
7317 &mut self.parameters
7318 }
7319 pub fn set_parameters(&mut self, field: Vec<super::OpenSignature>) {
7321 self.parameters = field;
7322 }
7323 pub fn with_parameters(mut self, field: Vec<super::OpenSignature>) -> Self {
7325 self.set_parameters(field);
7326 self
7327 }
7328 pub fn returns(&self) -> &[super::OpenSignature] {
7330 &self.returns
7331 }
7332 pub fn returns_mut(&mut self) -> &mut Vec<super::OpenSignature> {
7335 &mut self.returns
7336 }
7337 pub fn set_returns(&mut self, field: Vec<super::OpenSignature>) {
7339 self.returns = field;
7340 }
7341 pub fn with_returns(mut self, field: Vec<super::OpenSignature>) -> Self {
7343 self.set_returns(field);
7344 self
7345 }
7346 }
7347 impl super::FundsWithdrawal {
7348 pub const fn const_default() -> Self {
7349 Self {
7350 amount: None,
7351 coin_type: None,
7352 source: None,
7353 funder: None,
7354 allowance: None,
7355 }
7356 }
7357 #[doc(hidden)]
7358 pub fn default_instance() -> &'static Self {
7359 static DEFAULT: super::FundsWithdrawal = super::FundsWithdrawal::const_default();
7360 &DEFAULT
7361 }
7362 pub fn amount_opt_mut(&mut self) -> Option<&mut u64> {
7364 self.amount.as_mut().map(|field| field as _)
7365 }
7366 pub fn amount_mut(&mut self) -> &mut u64 {
7369 self.amount.get_or_insert_default()
7370 }
7371 pub fn amount_opt(&self) -> Option<u64> {
7373 self.amount.as_ref().map(|field| *field)
7374 }
7375 pub fn set_amount(&mut self, field: u64) {
7377 self.amount = Some(field);
7378 }
7379 pub fn with_amount(mut self, field: u64) -> Self {
7381 self.set_amount(field);
7382 self
7383 }
7384 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
7386 self.coin_type.as_mut().map(|field| field as _)
7387 }
7388 pub fn coin_type_mut(&mut self) -> &mut String {
7391 self.coin_type.get_or_insert_default()
7392 }
7393 pub fn coin_type_opt(&self) -> Option<&str> {
7395 self.coin_type.as_ref().map(|field| field as _)
7396 }
7397 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
7399 self.coin_type = Some(field.into().into());
7400 }
7401 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
7403 self.set_coin_type(field.into());
7404 self
7405 }
7406 pub fn with_source<T: Into<super::funds_withdrawal::Source>>(
7408 mut self,
7409 field: T,
7410 ) -> Self {
7411 self.set_source(field.into());
7412 self
7413 }
7414 pub fn funder_opt_mut(&mut self) -> Option<&mut String> {
7416 self.funder.as_mut().map(|field| field as _)
7417 }
7418 pub fn funder_mut(&mut self) -> &mut String {
7421 self.funder.get_or_insert_default()
7422 }
7423 pub fn funder_opt(&self) -> Option<&str> {
7425 self.funder.as_ref().map(|field| field as _)
7426 }
7427 pub fn set_funder<T: Into<String>>(&mut self, field: T) {
7429 self.funder = Some(field.into().into());
7430 }
7431 pub fn with_funder<T: Into<String>>(mut self, field: T) -> Self {
7433 self.set_funder(field.into());
7434 self
7435 }
7436 pub fn allowance_opt_mut(&mut self) -> Option<&mut String> {
7438 self.allowance.as_mut().map(|field| field as _)
7439 }
7440 pub fn allowance_mut(&mut self) -> &mut String {
7443 self.allowance.get_or_insert_default()
7444 }
7445 pub fn allowance_opt(&self) -> Option<&str> {
7447 self.allowance.as_ref().map(|field| field as _)
7448 }
7449 pub fn set_allowance<T: Into<String>>(&mut self, field: T) {
7451 self.allowance = Some(field.into().into());
7452 }
7453 pub fn with_allowance<T: Into<String>>(mut self, field: T) -> Self {
7455 self.set_allowance(field.into());
7456 self
7457 }
7458 }
7459 impl super::GasCostSummary {
7460 pub const fn const_default() -> Self {
7461 Self {
7462 computation_cost: None,
7463 storage_cost: None,
7464 storage_rebate: None,
7465 non_refundable_storage_fee: None,
7466 }
7467 }
7468 #[doc(hidden)]
7469 pub fn default_instance() -> &'static Self {
7470 static DEFAULT: super::GasCostSummary = super::GasCostSummary::const_default();
7471 &DEFAULT
7472 }
7473 pub fn computation_cost_opt_mut(&mut self) -> Option<&mut u64> {
7475 self.computation_cost.as_mut().map(|field| field as _)
7476 }
7477 pub fn computation_cost_mut(&mut self) -> &mut u64 {
7480 self.computation_cost.get_or_insert_default()
7481 }
7482 pub fn computation_cost_opt(&self) -> Option<u64> {
7484 self.computation_cost.as_ref().map(|field| *field)
7485 }
7486 pub fn set_computation_cost(&mut self, field: u64) {
7488 self.computation_cost = Some(field);
7489 }
7490 pub fn with_computation_cost(mut self, field: u64) -> Self {
7492 self.set_computation_cost(field);
7493 self
7494 }
7495 pub fn storage_cost_opt_mut(&mut self) -> Option<&mut u64> {
7497 self.storage_cost.as_mut().map(|field| field as _)
7498 }
7499 pub fn storage_cost_mut(&mut self) -> &mut u64 {
7502 self.storage_cost.get_or_insert_default()
7503 }
7504 pub fn storage_cost_opt(&self) -> Option<u64> {
7506 self.storage_cost.as_ref().map(|field| *field)
7507 }
7508 pub fn set_storage_cost(&mut self, field: u64) {
7510 self.storage_cost = Some(field);
7511 }
7512 pub fn with_storage_cost(mut self, field: u64) -> Self {
7514 self.set_storage_cost(field);
7515 self
7516 }
7517 pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
7519 self.storage_rebate.as_mut().map(|field| field as _)
7520 }
7521 pub fn storage_rebate_mut(&mut self) -> &mut u64 {
7524 self.storage_rebate.get_or_insert_default()
7525 }
7526 pub fn storage_rebate_opt(&self) -> Option<u64> {
7528 self.storage_rebate.as_ref().map(|field| *field)
7529 }
7530 pub fn set_storage_rebate(&mut self, field: u64) {
7532 self.storage_rebate = Some(field);
7533 }
7534 pub fn with_storage_rebate(mut self, field: u64) -> Self {
7536 self.set_storage_rebate(field);
7537 self
7538 }
7539 pub fn non_refundable_storage_fee_opt_mut(&mut self) -> Option<&mut u64> {
7541 self.non_refundable_storage_fee.as_mut().map(|field| field as _)
7542 }
7543 pub fn non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
7546 self.non_refundable_storage_fee.get_or_insert_default()
7547 }
7548 pub fn non_refundable_storage_fee_opt(&self) -> Option<u64> {
7550 self.non_refundable_storage_fee.as_ref().map(|field| *field)
7551 }
7552 pub fn set_non_refundable_storage_fee(&mut self, field: u64) {
7554 self.non_refundable_storage_fee = Some(field);
7555 }
7556 pub fn with_non_refundable_storage_fee(mut self, field: u64) -> Self {
7558 self.set_non_refundable_storage_fee(field);
7559 self
7560 }
7561 }
7562 impl super::GasPayment {
7563 pub const fn const_default() -> Self {
7564 Self {
7565 objects: Vec::new(),
7566 owner: None,
7567 price: None,
7568 budget: None,
7569 }
7570 }
7571 #[doc(hidden)]
7572 pub fn default_instance() -> &'static Self {
7573 static DEFAULT: super::GasPayment = super::GasPayment::const_default();
7574 &DEFAULT
7575 }
7576 pub fn objects(&self) -> &[super::ObjectReference] {
7578 &self.objects
7579 }
7580 pub fn objects_mut(&mut self) -> &mut Vec<super::ObjectReference> {
7583 &mut self.objects
7584 }
7585 pub fn set_objects(&mut self, field: Vec<super::ObjectReference>) {
7587 self.objects = field;
7588 }
7589 pub fn with_objects(mut self, field: Vec<super::ObjectReference>) -> Self {
7591 self.set_objects(field);
7592 self
7593 }
7594 pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
7596 self.owner.as_mut().map(|field| field as _)
7597 }
7598 pub fn owner_mut(&mut self) -> &mut String {
7601 self.owner.get_or_insert_default()
7602 }
7603 pub fn owner_opt(&self) -> Option<&str> {
7605 self.owner.as_ref().map(|field| field as _)
7606 }
7607 pub fn set_owner<T: Into<String>>(&mut self, field: T) {
7609 self.owner = Some(field.into().into());
7610 }
7611 pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
7613 self.set_owner(field.into());
7614 self
7615 }
7616 pub fn price_opt_mut(&mut self) -> Option<&mut u64> {
7618 self.price.as_mut().map(|field| field as _)
7619 }
7620 pub fn price_mut(&mut self) -> &mut u64 {
7623 self.price.get_or_insert_default()
7624 }
7625 pub fn price_opt(&self) -> Option<u64> {
7627 self.price.as_ref().map(|field| *field)
7628 }
7629 pub fn set_price(&mut self, field: u64) {
7631 self.price = Some(field);
7632 }
7633 pub fn with_price(mut self, field: u64) -> Self {
7635 self.set_price(field);
7636 self
7637 }
7638 pub fn budget_opt_mut(&mut self) -> Option<&mut u64> {
7640 self.budget.as_mut().map(|field| field as _)
7641 }
7642 pub fn budget_mut(&mut self) -> &mut u64 {
7645 self.budget.get_or_insert_default()
7646 }
7647 pub fn budget_opt(&self) -> Option<u64> {
7649 self.budget.as_ref().map(|field| *field)
7650 }
7651 pub fn set_budget(&mut self, field: u64) {
7653 self.budget = Some(field);
7654 }
7655 pub fn with_budget(mut self, field: u64) -> Self {
7657 self.set_budget(field);
7658 self
7659 }
7660 }
7661 impl super::GenesisTransaction {
7662 pub const fn const_default() -> Self {
7663 Self { objects: Vec::new() }
7664 }
7665 #[doc(hidden)]
7666 pub fn default_instance() -> &'static Self {
7667 static DEFAULT: super::GenesisTransaction = super::GenesisTransaction::const_default();
7668 &DEFAULT
7669 }
7670 pub fn objects(&self) -> &[super::Object] {
7672 &self.objects
7673 }
7674 pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
7677 &mut self.objects
7678 }
7679 pub fn set_objects(&mut self, field: Vec<super::Object>) {
7681 self.objects = field;
7682 }
7683 pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
7685 self.set_objects(field);
7686 self
7687 }
7688 }
7689 impl super::GetBalanceRequest {
7690 pub const fn const_default() -> Self {
7691 Self {
7692 owner: None,
7693 coin_type: None,
7694 }
7695 }
7696 #[doc(hidden)]
7697 pub fn default_instance() -> &'static Self {
7698 static DEFAULT: super::GetBalanceRequest = super::GetBalanceRequest::const_default();
7699 &DEFAULT
7700 }
7701 pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
7703 self.owner.as_mut().map(|field| field as _)
7704 }
7705 pub fn owner_mut(&mut self) -> &mut String {
7708 self.owner.get_or_insert_default()
7709 }
7710 pub fn owner_opt(&self) -> Option<&str> {
7712 self.owner.as_ref().map(|field| field as _)
7713 }
7714 pub fn set_owner<T: Into<String>>(&mut self, field: T) {
7716 self.owner = Some(field.into().into());
7717 }
7718 pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
7720 self.set_owner(field.into());
7721 self
7722 }
7723 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
7725 self.coin_type.as_mut().map(|field| field as _)
7726 }
7727 pub fn coin_type_mut(&mut self) -> &mut String {
7730 self.coin_type.get_or_insert_default()
7731 }
7732 pub fn coin_type_opt(&self) -> Option<&str> {
7734 self.coin_type.as_ref().map(|field| field as _)
7735 }
7736 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
7738 self.coin_type = Some(field.into().into());
7739 }
7740 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
7742 self.set_coin_type(field.into());
7743 self
7744 }
7745 }
7746 impl super::GetBalanceResponse {
7747 pub const fn const_default() -> Self {
7748 Self { balance: None }
7749 }
7750 #[doc(hidden)]
7751 pub fn default_instance() -> &'static Self {
7752 static DEFAULT: super::GetBalanceResponse = super::GetBalanceResponse::const_default();
7753 &DEFAULT
7754 }
7755 pub fn balance(&self) -> &super::Balance {
7757 self.balance
7758 .as_ref()
7759 .map(|field| field as _)
7760 .unwrap_or_else(|| super::Balance::default_instance() as _)
7761 }
7762 pub fn balance_opt_mut(&mut self) -> Option<&mut super::Balance> {
7764 self.balance.as_mut().map(|field| field as _)
7765 }
7766 pub fn balance_mut(&mut self) -> &mut super::Balance {
7769 self.balance.get_or_insert_default()
7770 }
7771 pub fn balance_opt(&self) -> Option<&super::Balance> {
7773 self.balance.as_ref().map(|field| field as _)
7774 }
7775 pub fn set_balance<T: Into<super::Balance>>(&mut self, field: T) {
7777 self.balance = Some(field.into().into());
7778 }
7779 pub fn with_balance<T: Into<super::Balance>>(mut self, field: T) -> Self {
7781 self.set_balance(field.into());
7782 self
7783 }
7784 }
7785 impl super::GetCheckpointRequest {
7786 pub const fn const_default() -> Self {
7787 Self {
7788 read_mask: None,
7789 checkpoint_id: None,
7790 }
7791 }
7792 #[doc(hidden)]
7793 pub fn default_instance() -> &'static Self {
7794 static DEFAULT: super::GetCheckpointRequest = super::GetCheckpointRequest::const_default();
7795 &DEFAULT
7796 }
7797 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
7799 self.read_mask.as_mut().map(|field| field as _)
7800 }
7801 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
7804 self.read_mask.get_or_insert_default()
7805 }
7806 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
7808 self.read_mask.as_ref().map(|field| field as _)
7809 }
7810 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
7812 self.read_mask = Some(field.into().into());
7813 }
7814 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
7816 mut self,
7817 field: T,
7818 ) -> Self {
7819 self.set_read_mask(field.into());
7820 self
7821 }
7822 pub fn sequence_number(&self) -> u64 {
7824 if let Some(
7825 super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
7826 ) = &self.checkpoint_id
7827 {
7828 *field
7829 } else {
7830 0u64
7831 }
7832 }
7833 pub fn sequence_number_opt(&self) -> Option<u64> {
7835 if let Some(
7836 super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
7837 ) = &self.checkpoint_id
7838 {
7839 Some(*field)
7840 } else {
7841 None
7842 }
7843 }
7844 pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
7846 if let Some(
7847 super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
7848 ) = &mut self.checkpoint_id
7849 {
7850 Some(field as _)
7851 } else {
7852 None
7853 }
7854 }
7855 pub fn sequence_number_mut(&mut self) -> &mut u64 {
7859 if self.sequence_number_opt_mut().is_none() {
7860 self.checkpoint_id = Some(
7861 super::get_checkpoint_request::CheckpointId::SequenceNumber(
7862 u64::default(),
7863 ),
7864 );
7865 }
7866 self.sequence_number_opt_mut().unwrap()
7867 }
7868 pub fn set_sequence_number(&mut self, field: u64) {
7871 self.checkpoint_id = Some(
7872 super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
7873 );
7874 }
7875 pub fn with_sequence_number(mut self, field: u64) -> Self {
7878 self.set_sequence_number(field);
7879 self
7880 }
7881 pub fn digest(&self) -> &str {
7883 if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &self
7884 .checkpoint_id
7885 {
7886 field as _
7887 } else {
7888 ""
7889 }
7890 }
7891 pub fn digest_opt(&self) -> Option<&str> {
7893 if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &self
7894 .checkpoint_id
7895 {
7896 Some(field as _)
7897 } else {
7898 None
7899 }
7900 }
7901 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
7903 if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &mut self
7904 .checkpoint_id
7905 {
7906 Some(field as _)
7907 } else {
7908 None
7909 }
7910 }
7911 pub fn digest_mut(&mut self) -> &mut String {
7915 if self.digest_opt_mut().is_none() {
7916 self.checkpoint_id = Some(
7917 super::get_checkpoint_request::CheckpointId::Digest(
7918 String::default(),
7919 ),
7920 );
7921 }
7922 self.digest_opt_mut().unwrap()
7923 }
7924 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
7927 self.checkpoint_id = Some(
7928 super::get_checkpoint_request::CheckpointId::Digest(field.into().into()),
7929 );
7930 }
7931 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
7934 self.set_digest(field.into());
7935 self
7936 }
7937 }
7938 impl super::GetCheckpointResponse {
7939 pub const fn const_default() -> Self {
7940 Self { checkpoint: None }
7941 }
7942 #[doc(hidden)]
7943 pub fn default_instance() -> &'static Self {
7944 static DEFAULT: super::GetCheckpointResponse = super::GetCheckpointResponse::const_default();
7945 &DEFAULT
7946 }
7947 pub fn checkpoint(&self) -> &super::Checkpoint {
7949 self.checkpoint
7950 .as_ref()
7951 .map(|field| field as _)
7952 .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
7953 }
7954 pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
7956 self.checkpoint.as_mut().map(|field| field as _)
7957 }
7958 pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
7961 self.checkpoint.get_or_insert_default()
7962 }
7963 pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
7965 self.checkpoint.as_ref().map(|field| field as _)
7966 }
7967 pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
7969 self.checkpoint = Some(field.into().into());
7970 }
7971 pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
7973 self.set_checkpoint(field.into());
7974 self
7975 }
7976 }
7977 impl super::GetCoinInfoRequest {
7978 pub const fn const_default() -> Self {
7979 Self { coin_type: None }
7980 }
7981 #[doc(hidden)]
7982 pub fn default_instance() -> &'static Self {
7983 static DEFAULT: super::GetCoinInfoRequest = super::GetCoinInfoRequest::const_default();
7984 &DEFAULT
7985 }
7986 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
7988 self.coin_type.as_mut().map(|field| field as _)
7989 }
7990 pub fn coin_type_mut(&mut self) -> &mut String {
7993 self.coin_type.get_or_insert_default()
7994 }
7995 pub fn coin_type_opt(&self) -> Option<&str> {
7997 self.coin_type.as_ref().map(|field| field as _)
7998 }
7999 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
8001 self.coin_type = Some(field.into().into());
8002 }
8003 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
8005 self.set_coin_type(field.into());
8006 self
8007 }
8008 }
8009 impl super::GetCoinInfoResponse {
8010 pub const fn const_default() -> Self {
8011 Self {
8012 coin_type: None,
8013 metadata: None,
8014 treasury: None,
8015 regulated_metadata: None,
8016 }
8017 }
8018 #[doc(hidden)]
8019 pub fn default_instance() -> &'static Self {
8020 static DEFAULT: super::GetCoinInfoResponse = super::GetCoinInfoResponse::const_default();
8021 &DEFAULT
8022 }
8023 pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
8025 self.coin_type.as_mut().map(|field| field as _)
8026 }
8027 pub fn coin_type_mut(&mut self) -> &mut String {
8030 self.coin_type.get_or_insert_default()
8031 }
8032 pub fn coin_type_opt(&self) -> Option<&str> {
8034 self.coin_type.as_ref().map(|field| field as _)
8035 }
8036 pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
8038 self.coin_type = Some(field.into().into());
8039 }
8040 pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
8042 self.set_coin_type(field.into());
8043 self
8044 }
8045 pub fn metadata(&self) -> &super::CoinMetadata {
8047 self.metadata
8048 .as_ref()
8049 .map(|field| field as _)
8050 .unwrap_or_else(|| super::CoinMetadata::default_instance() as _)
8051 }
8052 pub fn metadata_opt_mut(&mut self) -> Option<&mut super::CoinMetadata> {
8054 self.metadata.as_mut().map(|field| field as _)
8055 }
8056 pub fn metadata_mut(&mut self) -> &mut super::CoinMetadata {
8059 self.metadata.get_or_insert_default()
8060 }
8061 pub fn metadata_opt(&self) -> Option<&super::CoinMetadata> {
8063 self.metadata.as_ref().map(|field| field as _)
8064 }
8065 pub fn set_metadata<T: Into<super::CoinMetadata>>(&mut self, field: T) {
8067 self.metadata = Some(field.into().into());
8068 }
8069 pub fn with_metadata<T: Into<super::CoinMetadata>>(mut self, field: T) -> Self {
8071 self.set_metadata(field.into());
8072 self
8073 }
8074 pub fn treasury(&self) -> &super::CoinTreasury {
8076 self.treasury
8077 .as_ref()
8078 .map(|field| field as _)
8079 .unwrap_or_else(|| super::CoinTreasury::default_instance() as _)
8080 }
8081 pub fn treasury_opt_mut(&mut self) -> Option<&mut super::CoinTreasury> {
8083 self.treasury.as_mut().map(|field| field as _)
8084 }
8085 pub fn treasury_mut(&mut self) -> &mut super::CoinTreasury {
8088 self.treasury.get_or_insert_default()
8089 }
8090 pub fn treasury_opt(&self) -> Option<&super::CoinTreasury> {
8092 self.treasury.as_ref().map(|field| field as _)
8093 }
8094 pub fn set_treasury<T: Into<super::CoinTreasury>>(&mut self, field: T) {
8096 self.treasury = Some(field.into().into());
8097 }
8098 pub fn with_treasury<T: Into<super::CoinTreasury>>(mut self, field: T) -> Self {
8100 self.set_treasury(field.into());
8101 self
8102 }
8103 pub fn regulated_metadata(&self) -> &super::RegulatedCoinMetadata {
8105 self.regulated_metadata
8106 .as_ref()
8107 .map(|field| field as _)
8108 .unwrap_or_else(|| super::RegulatedCoinMetadata::default_instance() as _)
8109 }
8110 pub fn regulated_metadata_opt_mut(
8112 &mut self,
8113 ) -> Option<&mut super::RegulatedCoinMetadata> {
8114 self.regulated_metadata.as_mut().map(|field| field as _)
8115 }
8116 pub fn regulated_metadata_mut(&mut self) -> &mut super::RegulatedCoinMetadata {
8119 self.regulated_metadata.get_or_insert_default()
8120 }
8121 pub fn regulated_metadata_opt(&self) -> Option<&super::RegulatedCoinMetadata> {
8123 self.regulated_metadata.as_ref().map(|field| field as _)
8124 }
8125 pub fn set_regulated_metadata<T: Into<super::RegulatedCoinMetadata>>(
8127 &mut self,
8128 field: T,
8129 ) {
8130 self.regulated_metadata = Some(field.into().into());
8131 }
8132 pub fn with_regulated_metadata<T: Into<super::RegulatedCoinMetadata>>(
8134 mut self,
8135 field: T,
8136 ) -> Self {
8137 self.set_regulated_metadata(field.into());
8138 self
8139 }
8140 }
8141 impl super::GetDatatypeRequest {
8142 pub const fn const_default() -> Self {
8143 Self {
8144 package_id: None,
8145 module_name: None,
8146 name: None,
8147 }
8148 }
8149 #[doc(hidden)]
8150 pub fn default_instance() -> &'static Self {
8151 static DEFAULT: super::GetDatatypeRequest = super::GetDatatypeRequest::const_default();
8152 &DEFAULT
8153 }
8154 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
8156 self.package_id.as_mut().map(|field| field as _)
8157 }
8158 pub fn package_id_mut(&mut self) -> &mut String {
8161 self.package_id.get_or_insert_default()
8162 }
8163 pub fn package_id_opt(&self) -> Option<&str> {
8165 self.package_id.as_ref().map(|field| field as _)
8166 }
8167 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
8169 self.package_id = Some(field.into().into());
8170 }
8171 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
8173 self.set_package_id(field.into());
8174 self
8175 }
8176 pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
8178 self.module_name.as_mut().map(|field| field as _)
8179 }
8180 pub fn module_name_mut(&mut self) -> &mut String {
8183 self.module_name.get_or_insert_default()
8184 }
8185 pub fn module_name_opt(&self) -> Option<&str> {
8187 self.module_name.as_ref().map(|field| field as _)
8188 }
8189 pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
8191 self.module_name = Some(field.into().into());
8192 }
8193 pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
8195 self.set_module_name(field.into());
8196 self
8197 }
8198 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
8200 self.name.as_mut().map(|field| field as _)
8201 }
8202 pub fn name_mut(&mut self) -> &mut String {
8205 self.name.get_or_insert_default()
8206 }
8207 pub fn name_opt(&self) -> Option<&str> {
8209 self.name.as_ref().map(|field| field as _)
8210 }
8211 pub fn set_name<T: Into<String>>(&mut self, field: T) {
8213 self.name = Some(field.into().into());
8214 }
8215 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
8217 self.set_name(field.into());
8218 self
8219 }
8220 }
8221 impl super::GetDatatypeResponse {
8222 pub const fn const_default() -> Self {
8223 Self { datatype: None }
8224 }
8225 #[doc(hidden)]
8226 pub fn default_instance() -> &'static Self {
8227 static DEFAULT: super::GetDatatypeResponse = super::GetDatatypeResponse::const_default();
8228 &DEFAULT
8229 }
8230 pub fn datatype(&self) -> &super::DatatypeDescriptor {
8232 self.datatype
8233 .as_ref()
8234 .map(|field| field as _)
8235 .unwrap_or_else(|| super::DatatypeDescriptor::default_instance() as _)
8236 }
8237 pub fn datatype_opt_mut(&mut self) -> Option<&mut super::DatatypeDescriptor> {
8239 self.datatype.as_mut().map(|field| field as _)
8240 }
8241 pub fn datatype_mut(&mut self) -> &mut super::DatatypeDescriptor {
8244 self.datatype.get_or_insert_default()
8245 }
8246 pub fn datatype_opt(&self) -> Option<&super::DatatypeDescriptor> {
8248 self.datatype.as_ref().map(|field| field as _)
8249 }
8250 pub fn set_datatype<T: Into<super::DatatypeDescriptor>>(&mut self, field: T) {
8252 self.datatype = Some(field.into().into());
8253 }
8254 pub fn with_datatype<T: Into<super::DatatypeDescriptor>>(
8256 mut self,
8257 field: T,
8258 ) -> Self {
8259 self.set_datatype(field.into());
8260 self
8261 }
8262 }
8263 impl super::GetEpochRequest {
8264 pub const fn const_default() -> Self {
8265 Self {
8266 epoch: None,
8267 read_mask: None,
8268 }
8269 }
8270 #[doc(hidden)]
8271 pub fn default_instance() -> &'static Self {
8272 static DEFAULT: super::GetEpochRequest = super::GetEpochRequest::const_default();
8273 &DEFAULT
8274 }
8275 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
8277 self.epoch.as_mut().map(|field| field as _)
8278 }
8279 pub fn epoch_mut(&mut self) -> &mut u64 {
8282 self.epoch.get_or_insert_default()
8283 }
8284 pub fn epoch_opt(&self) -> Option<u64> {
8286 self.epoch.as_ref().map(|field| *field)
8287 }
8288 pub fn set_epoch(&mut self, field: u64) {
8290 self.epoch = Some(field);
8291 }
8292 pub fn with_epoch(mut self, field: u64) -> Self {
8294 self.set_epoch(field);
8295 self
8296 }
8297 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
8299 self.read_mask.as_mut().map(|field| field as _)
8300 }
8301 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
8304 self.read_mask.get_or_insert_default()
8305 }
8306 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
8308 self.read_mask.as_ref().map(|field| field as _)
8309 }
8310 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
8312 self.read_mask = Some(field.into().into());
8313 }
8314 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
8316 mut self,
8317 field: T,
8318 ) -> Self {
8319 self.set_read_mask(field.into());
8320 self
8321 }
8322 }
8323 impl super::GetEpochResponse {
8324 pub const fn const_default() -> Self {
8325 Self { epoch: None }
8326 }
8327 #[doc(hidden)]
8328 pub fn default_instance() -> &'static Self {
8329 static DEFAULT: super::GetEpochResponse = super::GetEpochResponse::const_default();
8330 &DEFAULT
8331 }
8332 pub fn epoch(&self) -> &super::Epoch {
8334 self.epoch
8335 .as_ref()
8336 .map(|field| field as _)
8337 .unwrap_or_else(|| super::Epoch::default_instance() as _)
8338 }
8339 pub fn epoch_opt_mut(&mut self) -> Option<&mut super::Epoch> {
8341 self.epoch.as_mut().map(|field| field as _)
8342 }
8343 pub fn epoch_mut(&mut self) -> &mut super::Epoch {
8346 self.epoch.get_or_insert_default()
8347 }
8348 pub fn epoch_opt(&self) -> Option<&super::Epoch> {
8350 self.epoch.as_ref().map(|field| field as _)
8351 }
8352 pub fn set_epoch<T: Into<super::Epoch>>(&mut self, field: T) {
8354 self.epoch = Some(field.into().into());
8355 }
8356 pub fn with_epoch<T: Into<super::Epoch>>(mut self, field: T) -> Self {
8358 self.set_epoch(field.into());
8359 self
8360 }
8361 }
8362 impl super::GetFunctionRequest {
8363 pub const fn const_default() -> Self {
8364 Self {
8365 package_id: None,
8366 module_name: None,
8367 name: None,
8368 }
8369 }
8370 #[doc(hidden)]
8371 pub fn default_instance() -> &'static Self {
8372 static DEFAULT: super::GetFunctionRequest = super::GetFunctionRequest::const_default();
8373 &DEFAULT
8374 }
8375 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
8377 self.package_id.as_mut().map(|field| field as _)
8378 }
8379 pub fn package_id_mut(&mut self) -> &mut String {
8382 self.package_id.get_or_insert_default()
8383 }
8384 pub fn package_id_opt(&self) -> Option<&str> {
8386 self.package_id.as_ref().map(|field| field as _)
8387 }
8388 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
8390 self.package_id = Some(field.into().into());
8391 }
8392 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
8394 self.set_package_id(field.into());
8395 self
8396 }
8397 pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
8399 self.module_name.as_mut().map(|field| field as _)
8400 }
8401 pub fn module_name_mut(&mut self) -> &mut String {
8404 self.module_name.get_or_insert_default()
8405 }
8406 pub fn module_name_opt(&self) -> Option<&str> {
8408 self.module_name.as_ref().map(|field| field as _)
8409 }
8410 pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
8412 self.module_name = Some(field.into().into());
8413 }
8414 pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
8416 self.set_module_name(field.into());
8417 self
8418 }
8419 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
8421 self.name.as_mut().map(|field| field as _)
8422 }
8423 pub fn name_mut(&mut self) -> &mut String {
8426 self.name.get_or_insert_default()
8427 }
8428 pub fn name_opt(&self) -> Option<&str> {
8430 self.name.as_ref().map(|field| field as _)
8431 }
8432 pub fn set_name<T: Into<String>>(&mut self, field: T) {
8434 self.name = Some(field.into().into());
8435 }
8436 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
8438 self.set_name(field.into());
8439 self
8440 }
8441 }
8442 impl super::GetFunctionResponse {
8443 pub const fn const_default() -> Self {
8444 Self { function: None }
8445 }
8446 #[doc(hidden)]
8447 pub fn default_instance() -> &'static Self {
8448 static DEFAULT: super::GetFunctionResponse = super::GetFunctionResponse::const_default();
8449 &DEFAULT
8450 }
8451 pub fn function(&self) -> &super::FunctionDescriptor {
8453 self.function
8454 .as_ref()
8455 .map(|field| field as _)
8456 .unwrap_or_else(|| super::FunctionDescriptor::default_instance() as _)
8457 }
8458 pub fn function_opt_mut(&mut self) -> Option<&mut super::FunctionDescriptor> {
8460 self.function.as_mut().map(|field| field as _)
8461 }
8462 pub fn function_mut(&mut self) -> &mut super::FunctionDescriptor {
8465 self.function.get_or_insert_default()
8466 }
8467 pub fn function_opt(&self) -> Option<&super::FunctionDescriptor> {
8469 self.function.as_ref().map(|field| field as _)
8470 }
8471 pub fn set_function<T: Into<super::FunctionDescriptor>>(&mut self, field: T) {
8473 self.function = Some(field.into().into());
8474 }
8475 pub fn with_function<T: Into<super::FunctionDescriptor>>(
8477 mut self,
8478 field: T,
8479 ) -> Self {
8480 self.set_function(field.into());
8481 self
8482 }
8483 }
8484 impl super::GetObjectRequest {
8485 pub const fn const_default() -> Self {
8486 Self {
8487 object_id: None,
8488 version: None,
8489 read_mask: None,
8490 }
8491 }
8492 #[doc(hidden)]
8493 pub fn default_instance() -> &'static Self {
8494 static DEFAULT: super::GetObjectRequest = super::GetObjectRequest::const_default();
8495 &DEFAULT
8496 }
8497 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
8499 self.object_id.as_mut().map(|field| field as _)
8500 }
8501 pub fn object_id_mut(&mut self) -> &mut String {
8504 self.object_id.get_or_insert_default()
8505 }
8506 pub fn object_id_opt(&self) -> Option<&str> {
8508 self.object_id.as_ref().map(|field| field as _)
8509 }
8510 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
8512 self.object_id = Some(field.into().into());
8513 }
8514 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
8516 self.set_object_id(field.into());
8517 self
8518 }
8519 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
8521 self.version.as_mut().map(|field| field as _)
8522 }
8523 pub fn version_mut(&mut self) -> &mut u64 {
8526 self.version.get_or_insert_default()
8527 }
8528 pub fn version_opt(&self) -> Option<u64> {
8530 self.version.as_ref().map(|field| *field)
8531 }
8532 pub fn set_version(&mut self, field: u64) {
8534 self.version = Some(field);
8535 }
8536 pub fn with_version(mut self, field: u64) -> Self {
8538 self.set_version(field);
8539 self
8540 }
8541 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
8543 self.read_mask.as_mut().map(|field| field as _)
8544 }
8545 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
8548 self.read_mask.get_or_insert_default()
8549 }
8550 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
8552 self.read_mask.as_ref().map(|field| field as _)
8553 }
8554 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
8556 self.read_mask = Some(field.into().into());
8557 }
8558 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
8560 mut self,
8561 field: T,
8562 ) -> Self {
8563 self.set_read_mask(field.into());
8564 self
8565 }
8566 }
8567 impl super::GetObjectResponse {
8568 pub const fn const_default() -> Self {
8569 Self { object: None }
8570 }
8571 #[doc(hidden)]
8572 pub fn default_instance() -> &'static Self {
8573 static DEFAULT: super::GetObjectResponse = super::GetObjectResponse::const_default();
8574 &DEFAULT
8575 }
8576 pub fn object(&self) -> &super::Object {
8578 self.object
8579 .as_ref()
8580 .map(|field| field as _)
8581 .unwrap_or_else(|| super::Object::default_instance() as _)
8582 }
8583 pub fn object_opt_mut(&mut self) -> Option<&mut super::Object> {
8585 self.object.as_mut().map(|field| field as _)
8586 }
8587 pub fn object_mut(&mut self) -> &mut super::Object {
8590 self.object.get_or_insert_default()
8591 }
8592 pub fn object_opt(&self) -> Option<&super::Object> {
8594 self.object.as_ref().map(|field| field as _)
8595 }
8596 pub fn set_object<T: Into<super::Object>>(&mut self, field: T) {
8598 self.object = Some(field.into().into());
8599 }
8600 pub fn with_object<T: Into<super::Object>>(mut self, field: T) -> Self {
8602 self.set_object(field.into());
8603 self
8604 }
8605 }
8606 impl super::GetObjectResult {
8607 pub const fn const_default() -> Self {
8608 Self { result: None }
8609 }
8610 #[doc(hidden)]
8611 pub fn default_instance() -> &'static Self {
8612 static DEFAULT: super::GetObjectResult = super::GetObjectResult::const_default();
8613 &DEFAULT
8614 }
8615 pub fn object(&self) -> &super::Object {
8617 if let Some(super::get_object_result::Result::Object(field)) = &self.result {
8618 field as _
8619 } else {
8620 super::Object::default_instance() as _
8621 }
8622 }
8623 pub fn object_opt(&self) -> Option<&super::Object> {
8625 if let Some(super::get_object_result::Result::Object(field)) = &self.result {
8626 Some(field as _)
8627 } else {
8628 None
8629 }
8630 }
8631 pub fn object_opt_mut(&mut self) -> Option<&mut super::Object> {
8633 if let Some(super::get_object_result::Result::Object(field)) = &mut self
8634 .result
8635 {
8636 Some(field as _)
8637 } else {
8638 None
8639 }
8640 }
8641 pub fn object_mut(&mut self) -> &mut super::Object {
8645 if self.object_opt_mut().is_none() {
8646 self.result = Some(
8647 super::get_object_result::Result::Object(super::Object::default()),
8648 );
8649 }
8650 self.object_opt_mut().unwrap()
8651 }
8652 pub fn set_object<T: Into<super::Object>>(&mut self, field: T) {
8655 self.result = Some(
8656 super::get_object_result::Result::Object(field.into().into()),
8657 );
8658 }
8659 pub fn with_object<T: Into<super::Object>>(mut self, field: T) -> Self {
8662 self.set_object(field.into());
8663 self
8664 }
8665 pub fn error(&self) -> &super::super::super::super::google::rpc::Status {
8667 if let Some(super::get_object_result::Result::Error(field)) = &self.result {
8668 field as _
8669 } else {
8670 super::super::super::super::google::rpc::Status::default_instance() as _
8671 }
8672 }
8673 pub fn error_opt(
8675 &self,
8676 ) -> Option<&super::super::super::super::google::rpc::Status> {
8677 if let Some(super::get_object_result::Result::Error(field)) = &self.result {
8678 Some(field as _)
8679 } else {
8680 None
8681 }
8682 }
8683 pub fn error_opt_mut(
8685 &mut self,
8686 ) -> Option<&mut super::super::super::super::google::rpc::Status> {
8687 if let Some(super::get_object_result::Result::Error(field)) = &mut self
8688 .result
8689 {
8690 Some(field as _)
8691 } else {
8692 None
8693 }
8694 }
8695 pub fn error_mut(
8699 &mut self,
8700 ) -> &mut super::super::super::super::google::rpc::Status {
8701 if self.error_opt_mut().is_none() {
8702 self.result = Some(
8703 super::get_object_result::Result::Error(
8704 super::super::super::super::google::rpc::Status::default(),
8705 ),
8706 );
8707 }
8708 self.error_opt_mut().unwrap()
8709 }
8710 pub fn set_error<T: Into<super::super::super::super::google::rpc::Status>>(
8713 &mut self,
8714 field: T,
8715 ) {
8716 self.result = Some(
8717 super::get_object_result::Result::Error(field.into().into()),
8718 );
8719 }
8720 pub fn with_error<T: Into<super::super::super::super::google::rpc::Status>>(
8723 mut self,
8724 field: T,
8725 ) -> Self {
8726 self.set_error(field.into());
8727 self
8728 }
8729 }
8730 impl super::GetPackageRequest {
8731 pub const fn const_default() -> Self {
8732 Self { package_id: None }
8733 }
8734 #[doc(hidden)]
8735 pub fn default_instance() -> &'static Self {
8736 static DEFAULT: super::GetPackageRequest = super::GetPackageRequest::const_default();
8737 &DEFAULT
8738 }
8739 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
8741 self.package_id.as_mut().map(|field| field as _)
8742 }
8743 pub fn package_id_mut(&mut self) -> &mut String {
8746 self.package_id.get_or_insert_default()
8747 }
8748 pub fn package_id_opt(&self) -> Option<&str> {
8750 self.package_id.as_ref().map(|field| field as _)
8751 }
8752 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
8754 self.package_id = Some(field.into().into());
8755 }
8756 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
8758 self.set_package_id(field.into());
8759 self
8760 }
8761 }
8762 impl super::GetPackageResponse {
8763 pub const fn const_default() -> Self {
8764 Self { package: None }
8765 }
8766 #[doc(hidden)]
8767 pub fn default_instance() -> &'static Self {
8768 static DEFAULT: super::GetPackageResponse = super::GetPackageResponse::const_default();
8769 &DEFAULT
8770 }
8771 pub fn package(&self) -> &super::Package {
8773 self.package
8774 .as_ref()
8775 .map(|field| field as _)
8776 .unwrap_or_else(|| super::Package::default_instance() as _)
8777 }
8778 pub fn package_opt_mut(&mut self) -> Option<&mut super::Package> {
8780 self.package.as_mut().map(|field| field as _)
8781 }
8782 pub fn package_mut(&mut self) -> &mut super::Package {
8785 self.package.get_or_insert_default()
8786 }
8787 pub fn package_opt(&self) -> Option<&super::Package> {
8789 self.package.as_ref().map(|field| field as _)
8790 }
8791 pub fn set_package<T: Into<super::Package>>(&mut self, field: T) {
8793 self.package = Some(field.into().into());
8794 }
8795 pub fn with_package<T: Into<super::Package>>(mut self, field: T) -> Self {
8797 self.set_package(field.into());
8798 self
8799 }
8800 }
8801 impl super::GetServiceInfoRequest {
8802 pub const fn const_default() -> Self {
8803 Self {}
8804 }
8805 #[doc(hidden)]
8806 pub fn default_instance() -> &'static Self {
8807 static DEFAULT: super::GetServiceInfoRequest = super::GetServiceInfoRequest::const_default();
8808 &DEFAULT
8809 }
8810 }
8811 impl super::GetServiceInfoResponse {
8812 pub const fn const_default() -> Self {
8813 Self {
8814 chain_id: None,
8815 chain: None,
8816 epoch: None,
8817 checkpoint_height: None,
8818 timestamp: None,
8819 lowest_available_checkpoint: None,
8820 lowest_available_checkpoint_objects: None,
8821 server: None,
8822 }
8823 }
8824 #[doc(hidden)]
8825 pub fn default_instance() -> &'static Self {
8826 static DEFAULT: super::GetServiceInfoResponse = super::GetServiceInfoResponse::const_default();
8827 &DEFAULT
8828 }
8829 pub fn chain_id_opt_mut(&mut self) -> Option<&mut String> {
8831 self.chain_id.as_mut().map(|field| field as _)
8832 }
8833 pub fn chain_id_mut(&mut self) -> &mut String {
8836 self.chain_id.get_or_insert_default()
8837 }
8838 pub fn chain_id_opt(&self) -> Option<&str> {
8840 self.chain_id.as_ref().map(|field| field as _)
8841 }
8842 pub fn set_chain_id<T: Into<String>>(&mut self, field: T) {
8844 self.chain_id = Some(field.into().into());
8845 }
8846 pub fn with_chain_id<T: Into<String>>(mut self, field: T) -> Self {
8848 self.set_chain_id(field.into());
8849 self
8850 }
8851 pub fn chain_opt_mut(&mut self) -> Option<&mut String> {
8853 self.chain.as_mut().map(|field| field as _)
8854 }
8855 pub fn chain_mut(&mut self) -> &mut String {
8858 self.chain.get_or_insert_default()
8859 }
8860 pub fn chain_opt(&self) -> Option<&str> {
8862 self.chain.as_ref().map(|field| field as _)
8863 }
8864 pub fn set_chain<T: Into<String>>(&mut self, field: T) {
8866 self.chain = Some(field.into().into());
8867 }
8868 pub fn with_chain<T: Into<String>>(mut self, field: T) -> Self {
8870 self.set_chain(field.into());
8871 self
8872 }
8873 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
8875 self.epoch.as_mut().map(|field| field as _)
8876 }
8877 pub fn epoch_mut(&mut self) -> &mut u64 {
8880 self.epoch.get_or_insert_default()
8881 }
8882 pub fn epoch_opt(&self) -> Option<u64> {
8884 self.epoch.as_ref().map(|field| *field)
8885 }
8886 pub fn set_epoch(&mut self, field: u64) {
8888 self.epoch = Some(field);
8889 }
8890 pub fn with_epoch(mut self, field: u64) -> Self {
8892 self.set_epoch(field);
8893 self
8894 }
8895 pub fn checkpoint_height_opt_mut(&mut self) -> Option<&mut u64> {
8897 self.checkpoint_height.as_mut().map(|field| field as _)
8898 }
8899 pub fn checkpoint_height_mut(&mut self) -> &mut u64 {
8902 self.checkpoint_height.get_or_insert_default()
8903 }
8904 pub fn checkpoint_height_opt(&self) -> Option<u64> {
8906 self.checkpoint_height.as_ref().map(|field| *field)
8907 }
8908 pub fn set_checkpoint_height(&mut self, field: u64) {
8910 self.checkpoint_height = Some(field);
8911 }
8912 pub fn with_checkpoint_height(mut self, field: u64) -> Self {
8914 self.set_checkpoint_height(field);
8915 self
8916 }
8917 pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
8919 self.timestamp.as_mut().map(|field| field as _)
8920 }
8921 pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
8924 self.timestamp.get_or_insert_default()
8925 }
8926 pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
8928 self.timestamp.as_ref().map(|field| field as _)
8929 }
8930 pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
8932 self.timestamp = Some(field.into().into());
8933 }
8934 pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
8936 mut self,
8937 field: T,
8938 ) -> Self {
8939 self.set_timestamp(field.into());
8940 self
8941 }
8942 pub fn lowest_available_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
8944 self.lowest_available_checkpoint.as_mut().map(|field| field as _)
8945 }
8946 pub fn lowest_available_checkpoint_mut(&mut self) -> &mut u64 {
8949 self.lowest_available_checkpoint.get_or_insert_default()
8950 }
8951 pub fn lowest_available_checkpoint_opt(&self) -> Option<u64> {
8953 self.lowest_available_checkpoint.as_ref().map(|field| *field)
8954 }
8955 pub fn set_lowest_available_checkpoint(&mut self, field: u64) {
8957 self.lowest_available_checkpoint = Some(field);
8958 }
8959 pub fn with_lowest_available_checkpoint(mut self, field: u64) -> Self {
8961 self.set_lowest_available_checkpoint(field);
8962 self
8963 }
8964 pub fn lowest_available_checkpoint_objects_opt_mut(
8966 &mut self,
8967 ) -> Option<&mut u64> {
8968 self.lowest_available_checkpoint_objects.as_mut().map(|field| field as _)
8969 }
8970 pub fn lowest_available_checkpoint_objects_mut(&mut self) -> &mut u64 {
8973 self.lowest_available_checkpoint_objects.get_or_insert_default()
8974 }
8975 pub fn lowest_available_checkpoint_objects_opt(&self) -> Option<u64> {
8977 self.lowest_available_checkpoint_objects.as_ref().map(|field| *field)
8978 }
8979 pub fn set_lowest_available_checkpoint_objects(&mut self, field: u64) {
8981 self.lowest_available_checkpoint_objects = Some(field);
8982 }
8983 pub fn with_lowest_available_checkpoint_objects(mut self, field: u64) -> Self {
8985 self.set_lowest_available_checkpoint_objects(field);
8986 self
8987 }
8988 pub fn server_opt_mut(&mut self) -> Option<&mut String> {
8990 self.server.as_mut().map(|field| field as _)
8991 }
8992 pub fn server_mut(&mut self) -> &mut String {
8995 self.server.get_or_insert_default()
8996 }
8997 pub fn server_opt(&self) -> Option<&str> {
8999 self.server.as_ref().map(|field| field as _)
9000 }
9001 pub fn set_server<T: Into<String>>(&mut self, field: T) {
9003 self.server = Some(field.into().into());
9004 }
9005 pub fn with_server<T: Into<String>>(mut self, field: T) -> Self {
9007 self.set_server(field.into());
9008 self
9009 }
9010 }
9011 impl super::GetTransactionRequest {
9012 pub const fn const_default() -> Self {
9013 Self {
9014 digest: None,
9015 read_mask: None,
9016 }
9017 }
9018 #[doc(hidden)]
9019 pub fn default_instance() -> &'static Self {
9020 static DEFAULT: super::GetTransactionRequest = super::GetTransactionRequest::const_default();
9021 &DEFAULT
9022 }
9023 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
9025 self.digest.as_mut().map(|field| field as _)
9026 }
9027 pub fn digest_mut(&mut self) -> &mut String {
9030 self.digest.get_or_insert_default()
9031 }
9032 pub fn digest_opt(&self) -> Option<&str> {
9034 self.digest.as_ref().map(|field| field as _)
9035 }
9036 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
9038 self.digest = Some(field.into().into());
9039 }
9040 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
9042 self.set_digest(field.into());
9043 self
9044 }
9045 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
9047 self.read_mask.as_mut().map(|field| field as _)
9048 }
9049 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
9052 self.read_mask.get_or_insert_default()
9053 }
9054 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
9056 self.read_mask.as_ref().map(|field| field as _)
9057 }
9058 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
9060 self.read_mask = Some(field.into().into());
9061 }
9062 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
9064 mut self,
9065 field: T,
9066 ) -> Self {
9067 self.set_read_mask(field.into());
9068 self
9069 }
9070 }
9071 impl super::GetTransactionResponse {
9072 pub const fn const_default() -> Self {
9073 Self { transaction: None }
9074 }
9075 #[doc(hidden)]
9076 pub fn default_instance() -> &'static Self {
9077 static DEFAULT: super::GetTransactionResponse = super::GetTransactionResponse::const_default();
9078 &DEFAULT
9079 }
9080 pub fn transaction(&self) -> &super::ExecutedTransaction {
9082 self.transaction
9083 .as_ref()
9084 .map(|field| field as _)
9085 .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
9086 }
9087 pub fn transaction_opt_mut(
9089 &mut self,
9090 ) -> Option<&mut super::ExecutedTransaction> {
9091 self.transaction.as_mut().map(|field| field as _)
9092 }
9093 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
9096 self.transaction.get_or_insert_default()
9097 }
9098 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
9100 self.transaction.as_ref().map(|field| field as _)
9101 }
9102 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
9104 &mut self,
9105 field: T,
9106 ) {
9107 self.transaction = Some(field.into().into());
9108 }
9109 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
9111 mut self,
9112 field: T,
9113 ) -> Self {
9114 self.set_transaction(field.into());
9115 self
9116 }
9117 }
9118 impl super::GetTransactionResult {
9119 pub const fn const_default() -> Self {
9120 Self { result: None }
9121 }
9122 #[doc(hidden)]
9123 pub fn default_instance() -> &'static Self {
9124 static DEFAULT: super::GetTransactionResult = super::GetTransactionResult::const_default();
9125 &DEFAULT
9126 }
9127 pub fn transaction(&self) -> &super::ExecutedTransaction {
9129 if let Some(super::get_transaction_result::Result::Transaction(field)) = &self
9130 .result
9131 {
9132 field as _
9133 } else {
9134 super::ExecutedTransaction::default_instance() as _
9135 }
9136 }
9137 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
9139 if let Some(super::get_transaction_result::Result::Transaction(field)) = &self
9140 .result
9141 {
9142 Some(field as _)
9143 } else {
9144 None
9145 }
9146 }
9147 pub fn transaction_opt_mut(
9149 &mut self,
9150 ) -> Option<&mut super::ExecutedTransaction> {
9151 if let Some(super::get_transaction_result::Result::Transaction(field)) = &mut self
9152 .result
9153 {
9154 Some(field as _)
9155 } else {
9156 None
9157 }
9158 }
9159 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
9163 if self.transaction_opt_mut().is_none() {
9164 self.result = Some(
9165 super::get_transaction_result::Result::Transaction(
9166 super::ExecutedTransaction::default(),
9167 ),
9168 );
9169 }
9170 self.transaction_opt_mut().unwrap()
9171 }
9172 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
9175 &mut self,
9176 field: T,
9177 ) {
9178 self.result = Some(
9179 super::get_transaction_result::Result::Transaction(field.into().into()),
9180 );
9181 }
9182 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
9185 mut self,
9186 field: T,
9187 ) -> Self {
9188 self.set_transaction(field.into());
9189 self
9190 }
9191 pub fn error(&self) -> &super::super::super::super::google::rpc::Status {
9193 if let Some(super::get_transaction_result::Result::Error(field)) = &self
9194 .result
9195 {
9196 field as _
9197 } else {
9198 super::super::super::super::google::rpc::Status::default_instance() as _
9199 }
9200 }
9201 pub fn error_opt(
9203 &self,
9204 ) -> Option<&super::super::super::super::google::rpc::Status> {
9205 if let Some(super::get_transaction_result::Result::Error(field)) = &self
9206 .result
9207 {
9208 Some(field as _)
9209 } else {
9210 None
9211 }
9212 }
9213 pub fn error_opt_mut(
9215 &mut self,
9216 ) -> Option<&mut super::super::super::super::google::rpc::Status> {
9217 if let Some(super::get_transaction_result::Result::Error(field)) = &mut self
9218 .result
9219 {
9220 Some(field as _)
9221 } else {
9222 None
9223 }
9224 }
9225 pub fn error_mut(
9229 &mut self,
9230 ) -> &mut super::super::super::super::google::rpc::Status {
9231 if self.error_opt_mut().is_none() {
9232 self.result = Some(
9233 super::get_transaction_result::Result::Error(
9234 super::super::super::super::google::rpc::Status::default(),
9235 ),
9236 );
9237 }
9238 self.error_opt_mut().unwrap()
9239 }
9240 pub fn set_error<T: Into<super::super::super::super::google::rpc::Status>>(
9243 &mut self,
9244 field: T,
9245 ) {
9246 self.result = Some(
9247 super::get_transaction_result::Result::Error(field.into().into()),
9248 );
9249 }
9250 pub fn with_error<T: Into<super::super::super::super::google::rpc::Status>>(
9253 mut self,
9254 field: T,
9255 ) -> Self {
9256 self.set_error(field.into());
9257 self
9258 }
9259 }
9260 impl super::IndexError {
9261 pub const fn const_default() -> Self {
9262 Self {
9263 index: None,
9264 subresult: None,
9265 }
9266 }
9267 #[doc(hidden)]
9268 pub fn default_instance() -> &'static Self {
9269 static DEFAULT: super::IndexError = super::IndexError::const_default();
9270 &DEFAULT
9271 }
9272 pub fn index_opt_mut(&mut self) -> Option<&mut u32> {
9274 self.index.as_mut().map(|field| field as _)
9275 }
9276 pub fn index_mut(&mut self) -> &mut u32 {
9279 self.index.get_or_insert_default()
9280 }
9281 pub fn index_opt(&self) -> Option<u32> {
9283 self.index.as_ref().map(|field| *field)
9284 }
9285 pub fn set_index(&mut self, field: u32) {
9287 self.index = Some(field);
9288 }
9289 pub fn with_index(mut self, field: u32) -> Self {
9291 self.set_index(field);
9292 self
9293 }
9294 pub fn subresult_opt_mut(&mut self) -> Option<&mut u32> {
9296 self.subresult.as_mut().map(|field| field as _)
9297 }
9298 pub fn subresult_mut(&mut self) -> &mut u32 {
9301 self.subresult.get_or_insert_default()
9302 }
9303 pub fn subresult_opt(&self) -> Option<u32> {
9305 self.subresult.as_ref().map(|field| *field)
9306 }
9307 pub fn set_subresult(&mut self, field: u32) {
9309 self.subresult = Some(field);
9310 }
9311 pub fn with_subresult(mut self, field: u32) -> Self {
9313 self.set_subresult(field);
9314 self
9315 }
9316 }
9317 impl super::Input {
9318 pub const fn const_default() -> Self {
9319 Self {
9320 kind: None,
9321 pure: None,
9322 object_id: None,
9323 version: None,
9324 digest: None,
9325 mutable: None,
9326 mutability: None,
9327 funds_withdrawal: None,
9328 literal: None,
9329 }
9330 }
9331 #[doc(hidden)]
9332 pub fn default_instance() -> &'static Self {
9333 static DEFAULT: super::Input = super::Input::const_default();
9334 &DEFAULT
9335 }
9336 pub fn with_kind<T: Into<super::input::InputKind>>(mut self, field: T) -> Self {
9338 self.set_kind(field.into());
9339 self
9340 }
9341 pub fn pure_opt(&self) -> Option<&[u8]> {
9343 self.pure.as_ref().map(|field| field as _)
9344 }
9345 pub fn set_pure<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9347 self.pure = Some(field.into().into());
9348 }
9349 pub fn with_pure<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
9351 self.set_pure(field.into());
9352 self
9353 }
9354 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
9356 self.object_id.as_mut().map(|field| field as _)
9357 }
9358 pub fn object_id_mut(&mut self) -> &mut String {
9361 self.object_id.get_or_insert_default()
9362 }
9363 pub fn object_id_opt(&self) -> Option<&str> {
9365 self.object_id.as_ref().map(|field| field as _)
9366 }
9367 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
9369 self.object_id = Some(field.into().into());
9370 }
9371 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
9373 self.set_object_id(field.into());
9374 self
9375 }
9376 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
9378 self.version.as_mut().map(|field| field as _)
9379 }
9380 pub fn version_mut(&mut self) -> &mut u64 {
9383 self.version.get_or_insert_default()
9384 }
9385 pub fn version_opt(&self) -> Option<u64> {
9387 self.version.as_ref().map(|field| *field)
9388 }
9389 pub fn set_version(&mut self, field: u64) {
9391 self.version = Some(field);
9392 }
9393 pub fn with_version(mut self, field: u64) -> Self {
9395 self.set_version(field);
9396 self
9397 }
9398 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
9400 self.digest.as_mut().map(|field| field as _)
9401 }
9402 pub fn digest_mut(&mut self) -> &mut String {
9405 self.digest.get_or_insert_default()
9406 }
9407 pub fn digest_opt(&self) -> Option<&str> {
9409 self.digest.as_ref().map(|field| field as _)
9410 }
9411 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
9413 self.digest = Some(field.into().into());
9414 }
9415 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
9417 self.set_digest(field.into());
9418 self
9419 }
9420 pub fn mutable_opt_mut(&mut self) -> Option<&mut bool> {
9422 self.mutable.as_mut().map(|field| field as _)
9423 }
9424 pub fn mutable_mut(&mut self) -> &mut bool {
9427 self.mutable.get_or_insert_default()
9428 }
9429 pub fn mutable_opt(&self) -> Option<bool> {
9431 self.mutable.as_ref().map(|field| *field)
9432 }
9433 pub fn set_mutable(&mut self, field: bool) {
9435 self.mutable = Some(field);
9436 }
9437 pub fn with_mutable(mut self, field: bool) -> Self {
9439 self.set_mutable(field);
9440 self
9441 }
9442 pub fn with_mutability<T: Into<super::input::Mutability>>(
9444 mut self,
9445 field: T,
9446 ) -> Self {
9447 self.set_mutability(field.into());
9448 self
9449 }
9450 pub fn funds_withdrawal(&self) -> &super::FundsWithdrawal {
9452 self.funds_withdrawal
9453 .as_ref()
9454 .map(|field| field as _)
9455 .unwrap_or_else(|| super::FundsWithdrawal::default_instance() as _)
9456 }
9457 pub fn funds_withdrawal_opt_mut(
9459 &mut self,
9460 ) -> Option<&mut super::FundsWithdrawal> {
9461 self.funds_withdrawal.as_mut().map(|field| field as _)
9462 }
9463 pub fn funds_withdrawal_mut(&mut self) -> &mut super::FundsWithdrawal {
9466 self.funds_withdrawal.get_or_insert_default()
9467 }
9468 pub fn funds_withdrawal_opt(&self) -> Option<&super::FundsWithdrawal> {
9470 self.funds_withdrawal.as_ref().map(|field| field as _)
9471 }
9472 pub fn set_funds_withdrawal<T: Into<super::FundsWithdrawal>>(
9474 &mut self,
9475 field: T,
9476 ) {
9477 self.funds_withdrawal = Some(field.into().into());
9478 }
9479 pub fn with_funds_withdrawal<T: Into<super::FundsWithdrawal>>(
9481 mut self,
9482 field: T,
9483 ) -> Self {
9484 self.set_funds_withdrawal(field.into());
9485 self
9486 }
9487 pub fn literal_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
9489 self.literal.as_mut().map(|field| field as _)
9490 }
9491 pub fn literal_mut(&mut self) -> &mut ::prost_types::Value {
9494 self.literal.get_or_insert_default()
9495 }
9496 pub fn literal_opt(&self) -> Option<&::prost_types::Value> {
9498 self.literal.as_ref().map(|field| field as _)
9499 }
9500 pub fn set_literal<T: Into<::prost_types::Value>>(&mut self, field: T) {
9502 self.literal = Some(field.into().into());
9503 }
9504 pub fn with_literal<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
9506 self.set_literal(field.into());
9507 self
9508 }
9509 }
9510 impl super::Jwk {
9511 pub const fn const_default() -> Self {
9512 Self {
9513 kty: None,
9514 e: None,
9515 n: None,
9516 alg: None,
9517 }
9518 }
9519 #[doc(hidden)]
9520 pub fn default_instance() -> &'static Self {
9521 static DEFAULT: super::Jwk = super::Jwk::const_default();
9522 &DEFAULT
9523 }
9524 pub fn kty_opt_mut(&mut self) -> Option<&mut String> {
9526 self.kty.as_mut().map(|field| field as _)
9527 }
9528 pub fn kty_mut(&mut self) -> &mut String {
9531 self.kty.get_or_insert_default()
9532 }
9533 pub fn kty_opt(&self) -> Option<&str> {
9535 self.kty.as_ref().map(|field| field as _)
9536 }
9537 pub fn set_kty<T: Into<String>>(&mut self, field: T) {
9539 self.kty = Some(field.into().into());
9540 }
9541 pub fn with_kty<T: Into<String>>(mut self, field: T) -> Self {
9543 self.set_kty(field.into());
9544 self
9545 }
9546 pub fn e_opt_mut(&mut self) -> Option<&mut String> {
9548 self.e.as_mut().map(|field| field as _)
9549 }
9550 pub fn e_mut(&mut self) -> &mut String {
9553 self.e.get_or_insert_default()
9554 }
9555 pub fn e_opt(&self) -> Option<&str> {
9557 self.e.as_ref().map(|field| field as _)
9558 }
9559 pub fn set_e<T: Into<String>>(&mut self, field: T) {
9561 self.e = Some(field.into().into());
9562 }
9563 pub fn with_e<T: Into<String>>(mut self, field: T) -> Self {
9565 self.set_e(field.into());
9566 self
9567 }
9568 pub fn n_opt_mut(&mut self) -> Option<&mut String> {
9570 self.n.as_mut().map(|field| field as _)
9571 }
9572 pub fn n_mut(&mut self) -> &mut String {
9575 self.n.get_or_insert_default()
9576 }
9577 pub fn n_opt(&self) -> Option<&str> {
9579 self.n.as_ref().map(|field| field as _)
9580 }
9581 pub fn set_n<T: Into<String>>(&mut self, field: T) {
9583 self.n = Some(field.into().into());
9584 }
9585 pub fn with_n<T: Into<String>>(mut self, field: T) -> Self {
9587 self.set_n(field.into());
9588 self
9589 }
9590 pub fn alg_opt_mut(&mut self) -> Option<&mut String> {
9592 self.alg.as_mut().map(|field| field as _)
9593 }
9594 pub fn alg_mut(&mut self) -> &mut String {
9597 self.alg.get_or_insert_default()
9598 }
9599 pub fn alg_opt(&self) -> Option<&str> {
9601 self.alg.as_ref().map(|field| field as _)
9602 }
9603 pub fn set_alg<T: Into<String>>(&mut self, field: T) {
9605 self.alg = Some(field.into().into());
9606 }
9607 pub fn with_alg<T: Into<String>>(mut self, field: T) -> Self {
9609 self.set_alg(field.into());
9610 self
9611 }
9612 }
9613 impl super::JwkId {
9614 pub const fn const_default() -> Self {
9615 Self { iss: None, kid: None }
9616 }
9617 #[doc(hidden)]
9618 pub fn default_instance() -> &'static Self {
9619 static DEFAULT: super::JwkId = super::JwkId::const_default();
9620 &DEFAULT
9621 }
9622 pub fn iss_opt_mut(&mut self) -> Option<&mut String> {
9624 self.iss.as_mut().map(|field| field as _)
9625 }
9626 pub fn iss_mut(&mut self) -> &mut String {
9629 self.iss.get_or_insert_default()
9630 }
9631 pub fn iss_opt(&self) -> Option<&str> {
9633 self.iss.as_ref().map(|field| field as _)
9634 }
9635 pub fn set_iss<T: Into<String>>(&mut self, field: T) {
9637 self.iss = Some(field.into().into());
9638 }
9639 pub fn with_iss<T: Into<String>>(mut self, field: T) -> Self {
9641 self.set_iss(field.into());
9642 self
9643 }
9644 pub fn kid_opt_mut(&mut self) -> Option<&mut String> {
9646 self.kid.as_mut().map(|field| field as _)
9647 }
9648 pub fn kid_mut(&mut self) -> &mut String {
9651 self.kid.get_or_insert_default()
9652 }
9653 pub fn kid_opt(&self) -> Option<&str> {
9655 self.kid.as_ref().map(|field| field as _)
9656 }
9657 pub fn set_kid<T: Into<String>>(&mut self, field: T) {
9659 self.kid = Some(field.into().into());
9660 }
9661 pub fn with_kid<T: Into<String>>(mut self, field: T) -> Self {
9663 self.set_kid(field.into());
9664 self
9665 }
9666 }
9667 impl super::Linkage {
9668 pub const fn const_default() -> Self {
9669 Self {
9670 original_id: None,
9671 upgraded_id: None,
9672 upgraded_version: None,
9673 }
9674 }
9675 #[doc(hidden)]
9676 pub fn default_instance() -> &'static Self {
9677 static DEFAULT: super::Linkage = super::Linkage::const_default();
9678 &DEFAULT
9679 }
9680 pub fn original_id_opt_mut(&mut self) -> Option<&mut String> {
9682 self.original_id.as_mut().map(|field| field as _)
9683 }
9684 pub fn original_id_mut(&mut self) -> &mut String {
9687 self.original_id.get_or_insert_default()
9688 }
9689 pub fn original_id_opt(&self) -> Option<&str> {
9691 self.original_id.as_ref().map(|field| field as _)
9692 }
9693 pub fn set_original_id<T: Into<String>>(&mut self, field: T) {
9695 self.original_id = Some(field.into().into());
9696 }
9697 pub fn with_original_id<T: Into<String>>(mut self, field: T) -> Self {
9699 self.set_original_id(field.into());
9700 self
9701 }
9702 pub fn upgraded_id_opt_mut(&mut self) -> Option<&mut String> {
9704 self.upgraded_id.as_mut().map(|field| field as _)
9705 }
9706 pub fn upgraded_id_mut(&mut self) -> &mut String {
9709 self.upgraded_id.get_or_insert_default()
9710 }
9711 pub fn upgraded_id_opt(&self) -> Option<&str> {
9713 self.upgraded_id.as_ref().map(|field| field as _)
9714 }
9715 pub fn set_upgraded_id<T: Into<String>>(&mut self, field: T) {
9717 self.upgraded_id = Some(field.into().into());
9718 }
9719 pub fn with_upgraded_id<T: Into<String>>(mut self, field: T) -> Self {
9721 self.set_upgraded_id(field.into());
9722 self
9723 }
9724 pub fn upgraded_version_opt_mut(&mut self) -> Option<&mut u64> {
9726 self.upgraded_version.as_mut().map(|field| field as _)
9727 }
9728 pub fn upgraded_version_mut(&mut self) -> &mut u64 {
9731 self.upgraded_version.get_or_insert_default()
9732 }
9733 pub fn upgraded_version_opt(&self) -> Option<u64> {
9735 self.upgraded_version.as_ref().map(|field| *field)
9736 }
9737 pub fn set_upgraded_version(&mut self, field: u64) {
9739 self.upgraded_version = Some(field);
9740 }
9741 pub fn with_upgraded_version(mut self, field: u64) -> Self {
9743 self.set_upgraded_version(field);
9744 self
9745 }
9746 }
9747 impl super::ListBalancesRequest {
9748 pub const fn const_default() -> Self {
9749 Self {
9750 owner: None,
9751 page_size: None,
9752 page_token: None,
9753 }
9754 }
9755 #[doc(hidden)]
9756 pub fn default_instance() -> &'static Self {
9757 static DEFAULT: super::ListBalancesRequest = super::ListBalancesRequest::const_default();
9758 &DEFAULT
9759 }
9760 pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
9762 self.owner.as_mut().map(|field| field as _)
9763 }
9764 pub fn owner_mut(&mut self) -> &mut String {
9767 self.owner.get_or_insert_default()
9768 }
9769 pub fn owner_opt(&self) -> Option<&str> {
9771 self.owner.as_ref().map(|field| field as _)
9772 }
9773 pub fn set_owner<T: Into<String>>(&mut self, field: T) {
9775 self.owner = Some(field.into().into());
9776 }
9777 pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
9779 self.set_owner(field.into());
9780 self
9781 }
9782 pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
9784 self.page_size.as_mut().map(|field| field as _)
9785 }
9786 pub fn page_size_mut(&mut self) -> &mut u32 {
9789 self.page_size.get_or_insert_default()
9790 }
9791 pub fn page_size_opt(&self) -> Option<u32> {
9793 self.page_size.as_ref().map(|field| *field)
9794 }
9795 pub fn set_page_size(&mut self, field: u32) {
9797 self.page_size = Some(field);
9798 }
9799 pub fn with_page_size(mut self, field: u32) -> Self {
9801 self.set_page_size(field);
9802 self
9803 }
9804 pub fn page_token_opt(&self) -> Option<&[u8]> {
9806 self.page_token.as_ref().map(|field| field as _)
9807 }
9808 pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9810 self.page_token = Some(field.into().into());
9811 }
9812 pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
9814 mut self,
9815 field: T,
9816 ) -> Self {
9817 self.set_page_token(field.into());
9818 self
9819 }
9820 }
9821 impl super::ListBalancesResponse {
9822 pub const fn const_default() -> Self {
9823 Self {
9824 balances: Vec::new(),
9825 next_page_token: None,
9826 }
9827 }
9828 #[doc(hidden)]
9829 pub fn default_instance() -> &'static Self {
9830 static DEFAULT: super::ListBalancesResponse = super::ListBalancesResponse::const_default();
9831 &DEFAULT
9832 }
9833 pub fn balances(&self) -> &[super::Balance] {
9835 &self.balances
9836 }
9837 pub fn balances_mut(&mut self) -> &mut Vec<super::Balance> {
9840 &mut self.balances
9841 }
9842 pub fn set_balances(&mut self, field: Vec<super::Balance>) {
9844 self.balances = field;
9845 }
9846 pub fn with_balances(mut self, field: Vec<super::Balance>) -> Self {
9848 self.set_balances(field);
9849 self
9850 }
9851 pub fn next_page_token_opt(&self) -> Option<&[u8]> {
9853 self.next_page_token.as_ref().map(|field| field as _)
9854 }
9855 pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9857 self.next_page_token = Some(field.into().into());
9858 }
9859 pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
9861 mut self,
9862 field: T,
9863 ) -> Self {
9864 self.set_next_page_token(field.into());
9865 self
9866 }
9867 }
9868 impl super::ListCheckpointsRequest {
9869 pub const fn const_default() -> Self {
9870 Self {
9871 read_mask: None,
9872 start_checkpoint: None,
9873 end_checkpoint: None,
9874 filter: None,
9875 options: None,
9876 }
9877 }
9878 #[doc(hidden)]
9879 pub fn default_instance() -> &'static Self {
9880 static DEFAULT: super::ListCheckpointsRequest = super::ListCheckpointsRequest::const_default();
9881 &DEFAULT
9882 }
9883 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
9885 self.read_mask.as_mut().map(|field| field as _)
9886 }
9887 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
9890 self.read_mask.get_or_insert_default()
9891 }
9892 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
9894 self.read_mask.as_ref().map(|field| field as _)
9895 }
9896 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
9898 self.read_mask = Some(field.into().into());
9899 }
9900 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
9902 mut self,
9903 field: T,
9904 ) -> Self {
9905 self.set_read_mask(field.into());
9906 self
9907 }
9908 pub fn start_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
9910 self.start_checkpoint.as_mut().map(|field| field as _)
9911 }
9912 pub fn start_checkpoint_mut(&mut self) -> &mut u64 {
9915 self.start_checkpoint.get_or_insert_default()
9916 }
9917 pub fn start_checkpoint_opt(&self) -> Option<u64> {
9919 self.start_checkpoint.as_ref().map(|field| *field)
9920 }
9921 pub fn set_start_checkpoint(&mut self, field: u64) {
9923 self.start_checkpoint = Some(field);
9924 }
9925 pub fn with_start_checkpoint(mut self, field: u64) -> Self {
9927 self.set_start_checkpoint(field);
9928 self
9929 }
9930 pub fn end_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
9932 self.end_checkpoint.as_mut().map(|field| field as _)
9933 }
9934 pub fn end_checkpoint_mut(&mut self) -> &mut u64 {
9937 self.end_checkpoint.get_or_insert_default()
9938 }
9939 pub fn end_checkpoint_opt(&self) -> Option<u64> {
9941 self.end_checkpoint.as_ref().map(|field| *field)
9942 }
9943 pub fn set_end_checkpoint(&mut self, field: u64) {
9945 self.end_checkpoint = Some(field);
9946 }
9947 pub fn with_end_checkpoint(mut self, field: u64) -> Self {
9949 self.set_end_checkpoint(field);
9950 self
9951 }
9952 pub fn filter(&self) -> &super::TransactionFilter {
9954 self.filter
9955 .as_ref()
9956 .map(|field| field as _)
9957 .unwrap_or_else(|| super::TransactionFilter::default_instance() as _)
9958 }
9959 pub fn filter_opt_mut(&mut self) -> Option<&mut super::TransactionFilter> {
9961 self.filter.as_mut().map(|field| field as _)
9962 }
9963 pub fn filter_mut(&mut self) -> &mut super::TransactionFilter {
9966 self.filter.get_or_insert_default()
9967 }
9968 pub fn filter_opt(&self) -> Option<&super::TransactionFilter> {
9970 self.filter.as_ref().map(|field| field as _)
9971 }
9972 pub fn set_filter<T: Into<super::TransactionFilter>>(&mut self, field: T) {
9974 self.filter = Some(field.into().into());
9975 }
9976 pub fn with_filter<T: Into<super::TransactionFilter>>(
9978 mut self,
9979 field: T,
9980 ) -> Self {
9981 self.set_filter(field.into());
9982 self
9983 }
9984 pub fn options(&self) -> &super::QueryOptions {
9986 self.options
9987 .as_ref()
9988 .map(|field| field as _)
9989 .unwrap_or_else(|| super::QueryOptions::default_instance() as _)
9990 }
9991 pub fn options_opt_mut(&mut self) -> Option<&mut super::QueryOptions> {
9993 self.options.as_mut().map(|field| field as _)
9994 }
9995 pub fn options_mut(&mut self) -> &mut super::QueryOptions {
9998 self.options.get_or_insert_default()
9999 }
10000 pub fn options_opt(&self) -> Option<&super::QueryOptions> {
10002 self.options.as_ref().map(|field| field as _)
10003 }
10004 pub fn set_options<T: Into<super::QueryOptions>>(&mut self, field: T) {
10006 self.options = Some(field.into().into());
10007 }
10008 pub fn with_options<T: Into<super::QueryOptions>>(mut self, field: T) -> Self {
10010 self.set_options(field.into());
10011 self
10012 }
10013 }
10014 impl super::ListCheckpointsResponse {
10015 pub const fn const_default() -> Self {
10016 Self {
10017 checkpoint: None,
10018 watermark: None,
10019 end: None,
10020 }
10021 }
10022 #[doc(hidden)]
10023 pub fn default_instance() -> &'static Self {
10024 static DEFAULT: super::ListCheckpointsResponse = super::ListCheckpointsResponse::const_default();
10025 &DEFAULT
10026 }
10027 pub fn checkpoint(&self) -> &super::Checkpoint {
10029 self.checkpoint
10030 .as_ref()
10031 .map(|field| field as _)
10032 .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
10033 }
10034 pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
10036 self.checkpoint.as_mut().map(|field| field as _)
10037 }
10038 pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
10041 self.checkpoint.get_or_insert_default()
10042 }
10043 pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
10045 self.checkpoint.as_ref().map(|field| field as _)
10046 }
10047 pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
10049 self.checkpoint = Some(field.into().into());
10050 }
10051 pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
10053 self.set_checkpoint(field.into());
10054 self
10055 }
10056 pub fn watermark(&self) -> &super::Watermark {
10058 self.watermark
10059 .as_ref()
10060 .map(|field| field as _)
10061 .unwrap_or_else(|| super::Watermark::default_instance() as _)
10062 }
10063 pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
10065 self.watermark.as_mut().map(|field| field as _)
10066 }
10067 pub fn watermark_mut(&mut self) -> &mut super::Watermark {
10070 self.watermark.get_or_insert_default()
10071 }
10072 pub fn watermark_opt(&self) -> Option<&super::Watermark> {
10074 self.watermark.as_ref().map(|field| field as _)
10075 }
10076 pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
10078 self.watermark = Some(field.into().into());
10079 }
10080 pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
10082 self.set_watermark(field.into());
10083 self
10084 }
10085 pub fn end(&self) -> &super::QueryEnd {
10087 self.end
10088 .as_ref()
10089 .map(|field| field as _)
10090 .unwrap_or_else(|| super::QueryEnd::default_instance() as _)
10091 }
10092 pub fn end_opt_mut(&mut self) -> Option<&mut super::QueryEnd> {
10094 self.end.as_mut().map(|field| field as _)
10095 }
10096 pub fn end_mut(&mut self) -> &mut super::QueryEnd {
10099 self.end.get_or_insert_default()
10100 }
10101 pub fn end_opt(&self) -> Option<&super::QueryEnd> {
10103 self.end.as_ref().map(|field| field as _)
10104 }
10105 pub fn set_end<T: Into<super::QueryEnd>>(&mut self, field: T) {
10107 self.end = Some(field.into().into());
10108 }
10109 pub fn with_end<T: Into<super::QueryEnd>>(mut self, field: T) -> Self {
10111 self.set_end(field.into());
10112 self
10113 }
10114 }
10115 impl super::ListDynamicFieldsRequest {
10116 pub const fn const_default() -> Self {
10117 Self {
10118 parent: None,
10119 page_size: None,
10120 page_token: None,
10121 read_mask: None,
10122 }
10123 }
10124 #[doc(hidden)]
10125 pub fn default_instance() -> &'static Self {
10126 static DEFAULT: super::ListDynamicFieldsRequest = super::ListDynamicFieldsRequest::const_default();
10127 &DEFAULT
10128 }
10129 pub fn parent_opt_mut(&mut self) -> Option<&mut String> {
10131 self.parent.as_mut().map(|field| field as _)
10132 }
10133 pub fn parent_mut(&mut self) -> &mut String {
10136 self.parent.get_or_insert_default()
10137 }
10138 pub fn parent_opt(&self) -> Option<&str> {
10140 self.parent.as_ref().map(|field| field as _)
10141 }
10142 pub fn set_parent<T: Into<String>>(&mut self, field: T) {
10144 self.parent = Some(field.into().into());
10145 }
10146 pub fn with_parent<T: Into<String>>(mut self, field: T) -> Self {
10148 self.set_parent(field.into());
10149 self
10150 }
10151 pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
10153 self.page_size.as_mut().map(|field| field as _)
10154 }
10155 pub fn page_size_mut(&mut self) -> &mut u32 {
10158 self.page_size.get_or_insert_default()
10159 }
10160 pub fn page_size_opt(&self) -> Option<u32> {
10162 self.page_size.as_ref().map(|field| *field)
10163 }
10164 pub fn set_page_size(&mut self, field: u32) {
10166 self.page_size = Some(field);
10167 }
10168 pub fn with_page_size(mut self, field: u32) -> Self {
10170 self.set_page_size(field);
10171 self
10172 }
10173 pub fn page_token_opt(&self) -> Option<&[u8]> {
10175 self.page_token.as_ref().map(|field| field as _)
10176 }
10177 pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10179 self.page_token = Some(field.into().into());
10180 }
10181 pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
10183 mut self,
10184 field: T,
10185 ) -> Self {
10186 self.set_page_token(field.into());
10187 self
10188 }
10189 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
10191 self.read_mask.as_mut().map(|field| field as _)
10192 }
10193 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
10196 self.read_mask.get_or_insert_default()
10197 }
10198 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
10200 self.read_mask.as_ref().map(|field| field as _)
10201 }
10202 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
10204 self.read_mask = Some(field.into().into());
10205 }
10206 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
10208 mut self,
10209 field: T,
10210 ) -> Self {
10211 self.set_read_mask(field.into());
10212 self
10213 }
10214 }
10215 impl super::ListDynamicFieldsResponse {
10216 pub const fn const_default() -> Self {
10217 Self {
10218 dynamic_fields: Vec::new(),
10219 next_page_token: None,
10220 }
10221 }
10222 #[doc(hidden)]
10223 pub fn default_instance() -> &'static Self {
10224 static DEFAULT: super::ListDynamicFieldsResponse = super::ListDynamicFieldsResponse::const_default();
10225 &DEFAULT
10226 }
10227 pub fn dynamic_fields(&self) -> &[super::DynamicField] {
10229 &self.dynamic_fields
10230 }
10231 pub fn dynamic_fields_mut(&mut self) -> &mut Vec<super::DynamicField> {
10234 &mut self.dynamic_fields
10235 }
10236 pub fn set_dynamic_fields(&mut self, field: Vec<super::DynamicField>) {
10238 self.dynamic_fields = field;
10239 }
10240 pub fn with_dynamic_fields(mut self, field: Vec<super::DynamicField>) -> Self {
10242 self.set_dynamic_fields(field);
10243 self
10244 }
10245 pub fn next_page_token_opt(&self) -> Option<&[u8]> {
10247 self.next_page_token.as_ref().map(|field| field as _)
10248 }
10249 pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10251 self.next_page_token = Some(field.into().into());
10252 }
10253 pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
10255 mut self,
10256 field: T,
10257 ) -> Self {
10258 self.set_next_page_token(field.into());
10259 self
10260 }
10261 }
10262 impl super::ListEventsRequest {
10263 pub const fn const_default() -> Self {
10264 Self {
10265 read_mask: None,
10266 start_checkpoint: None,
10267 end_checkpoint: None,
10268 filter: None,
10269 options: None,
10270 }
10271 }
10272 #[doc(hidden)]
10273 pub fn default_instance() -> &'static Self {
10274 static DEFAULT: super::ListEventsRequest = super::ListEventsRequest::const_default();
10275 &DEFAULT
10276 }
10277 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
10279 self.read_mask.as_mut().map(|field| field as _)
10280 }
10281 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
10284 self.read_mask.get_or_insert_default()
10285 }
10286 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
10288 self.read_mask.as_ref().map(|field| field as _)
10289 }
10290 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
10292 self.read_mask = Some(field.into().into());
10293 }
10294 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
10296 mut self,
10297 field: T,
10298 ) -> Self {
10299 self.set_read_mask(field.into());
10300 self
10301 }
10302 pub fn start_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
10304 self.start_checkpoint.as_mut().map(|field| field as _)
10305 }
10306 pub fn start_checkpoint_mut(&mut self) -> &mut u64 {
10309 self.start_checkpoint.get_or_insert_default()
10310 }
10311 pub fn start_checkpoint_opt(&self) -> Option<u64> {
10313 self.start_checkpoint.as_ref().map(|field| *field)
10314 }
10315 pub fn set_start_checkpoint(&mut self, field: u64) {
10317 self.start_checkpoint = Some(field);
10318 }
10319 pub fn with_start_checkpoint(mut self, field: u64) -> Self {
10321 self.set_start_checkpoint(field);
10322 self
10323 }
10324 pub fn end_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
10326 self.end_checkpoint.as_mut().map(|field| field as _)
10327 }
10328 pub fn end_checkpoint_mut(&mut self) -> &mut u64 {
10331 self.end_checkpoint.get_or_insert_default()
10332 }
10333 pub fn end_checkpoint_opt(&self) -> Option<u64> {
10335 self.end_checkpoint.as_ref().map(|field| *field)
10336 }
10337 pub fn set_end_checkpoint(&mut self, field: u64) {
10339 self.end_checkpoint = Some(field);
10340 }
10341 pub fn with_end_checkpoint(mut self, field: u64) -> Self {
10343 self.set_end_checkpoint(field);
10344 self
10345 }
10346 pub fn filter(&self) -> &super::EventFilter {
10348 self.filter
10349 .as_ref()
10350 .map(|field| field as _)
10351 .unwrap_or_else(|| super::EventFilter::default_instance() as _)
10352 }
10353 pub fn filter_opt_mut(&mut self) -> Option<&mut super::EventFilter> {
10355 self.filter.as_mut().map(|field| field as _)
10356 }
10357 pub fn filter_mut(&mut self) -> &mut super::EventFilter {
10360 self.filter.get_or_insert_default()
10361 }
10362 pub fn filter_opt(&self) -> Option<&super::EventFilter> {
10364 self.filter.as_ref().map(|field| field as _)
10365 }
10366 pub fn set_filter<T: Into<super::EventFilter>>(&mut self, field: T) {
10368 self.filter = Some(field.into().into());
10369 }
10370 pub fn with_filter<T: Into<super::EventFilter>>(mut self, field: T) -> Self {
10372 self.set_filter(field.into());
10373 self
10374 }
10375 pub fn options(&self) -> &super::QueryOptions {
10377 self.options
10378 .as_ref()
10379 .map(|field| field as _)
10380 .unwrap_or_else(|| super::QueryOptions::default_instance() as _)
10381 }
10382 pub fn options_opt_mut(&mut self) -> Option<&mut super::QueryOptions> {
10384 self.options.as_mut().map(|field| field as _)
10385 }
10386 pub fn options_mut(&mut self) -> &mut super::QueryOptions {
10389 self.options.get_or_insert_default()
10390 }
10391 pub fn options_opt(&self) -> Option<&super::QueryOptions> {
10393 self.options.as_ref().map(|field| field as _)
10394 }
10395 pub fn set_options<T: Into<super::QueryOptions>>(&mut self, field: T) {
10397 self.options = Some(field.into().into());
10398 }
10399 pub fn with_options<T: Into<super::QueryOptions>>(mut self, field: T) -> Self {
10401 self.set_options(field.into());
10402 self
10403 }
10404 }
10405 impl super::ListEventsResponse {
10406 pub const fn const_default() -> Self {
10407 Self {
10408 event: None,
10409 watermark: None,
10410 end: None,
10411 }
10412 }
10413 #[doc(hidden)]
10414 pub fn default_instance() -> &'static Self {
10415 static DEFAULT: super::ListEventsResponse = super::ListEventsResponse::const_default();
10416 &DEFAULT
10417 }
10418 pub fn event(&self) -> &super::Event {
10420 self.event
10421 .as_ref()
10422 .map(|field| field as _)
10423 .unwrap_or_else(|| super::Event::default_instance() as _)
10424 }
10425 pub fn event_opt_mut(&mut self) -> Option<&mut super::Event> {
10427 self.event.as_mut().map(|field| field as _)
10428 }
10429 pub fn event_mut(&mut self) -> &mut super::Event {
10432 self.event.get_or_insert_default()
10433 }
10434 pub fn event_opt(&self) -> Option<&super::Event> {
10436 self.event.as_ref().map(|field| field as _)
10437 }
10438 pub fn set_event<T: Into<super::Event>>(&mut self, field: T) {
10440 self.event = Some(field.into().into());
10441 }
10442 pub fn with_event<T: Into<super::Event>>(mut self, field: T) -> Self {
10444 self.set_event(field.into());
10445 self
10446 }
10447 pub fn watermark(&self) -> &super::Watermark {
10449 self.watermark
10450 .as_ref()
10451 .map(|field| field as _)
10452 .unwrap_or_else(|| super::Watermark::default_instance() as _)
10453 }
10454 pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
10456 self.watermark.as_mut().map(|field| field as _)
10457 }
10458 pub fn watermark_mut(&mut self) -> &mut super::Watermark {
10461 self.watermark.get_or_insert_default()
10462 }
10463 pub fn watermark_opt(&self) -> Option<&super::Watermark> {
10465 self.watermark.as_ref().map(|field| field as _)
10466 }
10467 pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
10469 self.watermark = Some(field.into().into());
10470 }
10471 pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
10473 self.set_watermark(field.into());
10474 self
10475 }
10476 pub fn end(&self) -> &super::QueryEnd {
10478 self.end
10479 .as_ref()
10480 .map(|field| field as _)
10481 .unwrap_or_else(|| super::QueryEnd::default_instance() as _)
10482 }
10483 pub fn end_opt_mut(&mut self) -> Option<&mut super::QueryEnd> {
10485 self.end.as_mut().map(|field| field as _)
10486 }
10487 pub fn end_mut(&mut self) -> &mut super::QueryEnd {
10490 self.end.get_or_insert_default()
10491 }
10492 pub fn end_opt(&self) -> Option<&super::QueryEnd> {
10494 self.end.as_ref().map(|field| field as _)
10495 }
10496 pub fn set_end<T: Into<super::QueryEnd>>(&mut self, field: T) {
10498 self.end = Some(field.into().into());
10499 }
10500 pub fn with_end<T: Into<super::QueryEnd>>(mut self, field: T) -> Self {
10502 self.set_end(field.into());
10503 self
10504 }
10505 }
10506 impl super::ListOwnedObjectsRequest {
10507 pub const fn const_default() -> Self {
10508 Self {
10509 owner: None,
10510 page_size: None,
10511 page_token: None,
10512 read_mask: None,
10513 object_type: None,
10514 }
10515 }
10516 #[doc(hidden)]
10517 pub fn default_instance() -> &'static Self {
10518 static DEFAULT: super::ListOwnedObjectsRequest = super::ListOwnedObjectsRequest::const_default();
10519 &DEFAULT
10520 }
10521 pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
10523 self.owner.as_mut().map(|field| field as _)
10524 }
10525 pub fn owner_mut(&mut self) -> &mut String {
10528 self.owner.get_or_insert_default()
10529 }
10530 pub fn owner_opt(&self) -> Option<&str> {
10532 self.owner.as_ref().map(|field| field as _)
10533 }
10534 pub fn set_owner<T: Into<String>>(&mut self, field: T) {
10536 self.owner = Some(field.into().into());
10537 }
10538 pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
10540 self.set_owner(field.into());
10541 self
10542 }
10543 pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
10545 self.page_size.as_mut().map(|field| field as _)
10546 }
10547 pub fn page_size_mut(&mut self) -> &mut u32 {
10550 self.page_size.get_or_insert_default()
10551 }
10552 pub fn page_size_opt(&self) -> Option<u32> {
10554 self.page_size.as_ref().map(|field| *field)
10555 }
10556 pub fn set_page_size(&mut self, field: u32) {
10558 self.page_size = Some(field);
10559 }
10560 pub fn with_page_size(mut self, field: u32) -> Self {
10562 self.set_page_size(field);
10563 self
10564 }
10565 pub fn page_token_opt(&self) -> Option<&[u8]> {
10567 self.page_token.as_ref().map(|field| field as _)
10568 }
10569 pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10571 self.page_token = Some(field.into().into());
10572 }
10573 pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
10575 mut self,
10576 field: T,
10577 ) -> Self {
10578 self.set_page_token(field.into());
10579 self
10580 }
10581 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
10583 self.read_mask.as_mut().map(|field| field as _)
10584 }
10585 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
10588 self.read_mask.get_or_insert_default()
10589 }
10590 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
10592 self.read_mask.as_ref().map(|field| field as _)
10593 }
10594 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
10596 self.read_mask = Some(field.into().into());
10597 }
10598 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
10600 mut self,
10601 field: T,
10602 ) -> Self {
10603 self.set_read_mask(field.into());
10604 self
10605 }
10606 pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
10608 self.object_type.as_mut().map(|field| field as _)
10609 }
10610 pub fn object_type_mut(&mut self) -> &mut String {
10613 self.object_type.get_or_insert_default()
10614 }
10615 pub fn object_type_opt(&self) -> Option<&str> {
10617 self.object_type.as_ref().map(|field| field as _)
10618 }
10619 pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
10621 self.object_type = Some(field.into().into());
10622 }
10623 pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
10625 self.set_object_type(field.into());
10626 self
10627 }
10628 }
10629 impl super::ListOwnedObjectsResponse {
10630 pub const fn const_default() -> Self {
10631 Self {
10632 objects: Vec::new(),
10633 next_page_token: None,
10634 }
10635 }
10636 #[doc(hidden)]
10637 pub fn default_instance() -> &'static Self {
10638 static DEFAULT: super::ListOwnedObjectsResponse = super::ListOwnedObjectsResponse::const_default();
10639 &DEFAULT
10640 }
10641 pub fn objects(&self) -> &[super::Object] {
10643 &self.objects
10644 }
10645 pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
10648 &mut self.objects
10649 }
10650 pub fn set_objects(&mut self, field: Vec<super::Object>) {
10652 self.objects = field;
10653 }
10654 pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
10656 self.set_objects(field);
10657 self
10658 }
10659 pub fn next_page_token_opt(&self) -> Option<&[u8]> {
10661 self.next_page_token.as_ref().map(|field| field as _)
10662 }
10663 pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10665 self.next_page_token = Some(field.into().into());
10666 }
10667 pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
10669 mut self,
10670 field: T,
10671 ) -> Self {
10672 self.set_next_page_token(field.into());
10673 self
10674 }
10675 }
10676 impl super::ListPackageVersionsRequest {
10677 pub const fn const_default() -> Self {
10678 Self {
10679 package_id: None,
10680 page_size: None,
10681 page_token: None,
10682 }
10683 }
10684 #[doc(hidden)]
10685 pub fn default_instance() -> &'static Self {
10686 static DEFAULT: super::ListPackageVersionsRequest = super::ListPackageVersionsRequest::const_default();
10687 &DEFAULT
10688 }
10689 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
10691 self.package_id.as_mut().map(|field| field as _)
10692 }
10693 pub fn package_id_mut(&mut self) -> &mut String {
10696 self.package_id.get_or_insert_default()
10697 }
10698 pub fn package_id_opt(&self) -> Option<&str> {
10700 self.package_id.as_ref().map(|field| field as _)
10701 }
10702 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
10704 self.package_id = Some(field.into().into());
10705 }
10706 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
10708 self.set_package_id(field.into());
10709 self
10710 }
10711 pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
10713 self.page_size.as_mut().map(|field| field as _)
10714 }
10715 pub fn page_size_mut(&mut self) -> &mut u32 {
10718 self.page_size.get_or_insert_default()
10719 }
10720 pub fn page_size_opt(&self) -> Option<u32> {
10722 self.page_size.as_ref().map(|field| *field)
10723 }
10724 pub fn set_page_size(&mut self, field: u32) {
10726 self.page_size = Some(field);
10727 }
10728 pub fn with_page_size(mut self, field: u32) -> Self {
10730 self.set_page_size(field);
10731 self
10732 }
10733 pub fn page_token_opt(&self) -> Option<&[u8]> {
10735 self.page_token.as_ref().map(|field| field as _)
10736 }
10737 pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10739 self.page_token = Some(field.into().into());
10740 }
10741 pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
10743 mut self,
10744 field: T,
10745 ) -> Self {
10746 self.set_page_token(field.into());
10747 self
10748 }
10749 }
10750 impl super::ListPackageVersionsResponse {
10751 pub const fn const_default() -> Self {
10752 Self {
10753 versions: Vec::new(),
10754 next_page_token: None,
10755 }
10756 }
10757 #[doc(hidden)]
10758 pub fn default_instance() -> &'static Self {
10759 static DEFAULT: super::ListPackageVersionsResponse = super::ListPackageVersionsResponse::const_default();
10760 &DEFAULT
10761 }
10762 pub fn versions(&self) -> &[super::PackageVersion] {
10764 &self.versions
10765 }
10766 pub fn versions_mut(&mut self) -> &mut Vec<super::PackageVersion> {
10769 &mut self.versions
10770 }
10771 pub fn set_versions(&mut self, field: Vec<super::PackageVersion>) {
10773 self.versions = field;
10774 }
10775 pub fn with_versions(mut self, field: Vec<super::PackageVersion>) -> Self {
10777 self.set_versions(field);
10778 self
10779 }
10780 pub fn next_page_token_opt(&self) -> Option<&[u8]> {
10782 self.next_page_token.as_ref().map(|field| field as _)
10783 }
10784 pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10786 self.next_page_token = Some(field.into().into());
10787 }
10788 pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
10790 mut self,
10791 field: T,
10792 ) -> Self {
10793 self.set_next_page_token(field.into());
10794 self
10795 }
10796 }
10797 impl super::ListTransactionsRequest {
10798 pub const fn const_default() -> Self {
10799 Self {
10800 read_mask: None,
10801 start_checkpoint: None,
10802 end_checkpoint: None,
10803 filter: None,
10804 options: None,
10805 }
10806 }
10807 #[doc(hidden)]
10808 pub fn default_instance() -> &'static Self {
10809 static DEFAULT: super::ListTransactionsRequest = super::ListTransactionsRequest::const_default();
10810 &DEFAULT
10811 }
10812 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
10814 self.read_mask.as_mut().map(|field| field as _)
10815 }
10816 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
10819 self.read_mask.get_or_insert_default()
10820 }
10821 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
10823 self.read_mask.as_ref().map(|field| field as _)
10824 }
10825 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
10827 self.read_mask = Some(field.into().into());
10828 }
10829 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
10831 mut self,
10832 field: T,
10833 ) -> Self {
10834 self.set_read_mask(field.into());
10835 self
10836 }
10837 pub fn start_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
10839 self.start_checkpoint.as_mut().map(|field| field as _)
10840 }
10841 pub fn start_checkpoint_mut(&mut self) -> &mut u64 {
10844 self.start_checkpoint.get_or_insert_default()
10845 }
10846 pub fn start_checkpoint_opt(&self) -> Option<u64> {
10848 self.start_checkpoint.as_ref().map(|field| *field)
10849 }
10850 pub fn set_start_checkpoint(&mut self, field: u64) {
10852 self.start_checkpoint = Some(field);
10853 }
10854 pub fn with_start_checkpoint(mut self, field: u64) -> Self {
10856 self.set_start_checkpoint(field);
10857 self
10858 }
10859 pub fn end_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
10861 self.end_checkpoint.as_mut().map(|field| field as _)
10862 }
10863 pub fn end_checkpoint_mut(&mut self) -> &mut u64 {
10866 self.end_checkpoint.get_or_insert_default()
10867 }
10868 pub fn end_checkpoint_opt(&self) -> Option<u64> {
10870 self.end_checkpoint.as_ref().map(|field| *field)
10871 }
10872 pub fn set_end_checkpoint(&mut self, field: u64) {
10874 self.end_checkpoint = Some(field);
10875 }
10876 pub fn with_end_checkpoint(mut self, field: u64) -> Self {
10878 self.set_end_checkpoint(field);
10879 self
10880 }
10881 pub fn filter(&self) -> &super::TransactionFilter {
10883 self.filter
10884 .as_ref()
10885 .map(|field| field as _)
10886 .unwrap_or_else(|| super::TransactionFilter::default_instance() as _)
10887 }
10888 pub fn filter_opt_mut(&mut self) -> Option<&mut super::TransactionFilter> {
10890 self.filter.as_mut().map(|field| field as _)
10891 }
10892 pub fn filter_mut(&mut self) -> &mut super::TransactionFilter {
10895 self.filter.get_or_insert_default()
10896 }
10897 pub fn filter_opt(&self) -> Option<&super::TransactionFilter> {
10899 self.filter.as_ref().map(|field| field as _)
10900 }
10901 pub fn set_filter<T: Into<super::TransactionFilter>>(&mut self, field: T) {
10903 self.filter = Some(field.into().into());
10904 }
10905 pub fn with_filter<T: Into<super::TransactionFilter>>(
10907 mut self,
10908 field: T,
10909 ) -> Self {
10910 self.set_filter(field.into());
10911 self
10912 }
10913 pub fn options(&self) -> &super::QueryOptions {
10915 self.options
10916 .as_ref()
10917 .map(|field| field as _)
10918 .unwrap_or_else(|| super::QueryOptions::default_instance() as _)
10919 }
10920 pub fn options_opt_mut(&mut self) -> Option<&mut super::QueryOptions> {
10922 self.options.as_mut().map(|field| field as _)
10923 }
10924 pub fn options_mut(&mut self) -> &mut super::QueryOptions {
10927 self.options.get_or_insert_default()
10928 }
10929 pub fn options_opt(&self) -> Option<&super::QueryOptions> {
10931 self.options.as_ref().map(|field| field as _)
10932 }
10933 pub fn set_options<T: Into<super::QueryOptions>>(&mut self, field: T) {
10935 self.options = Some(field.into().into());
10936 }
10937 pub fn with_options<T: Into<super::QueryOptions>>(mut self, field: T) -> Self {
10939 self.set_options(field.into());
10940 self
10941 }
10942 }
10943 impl super::ListTransactionsResponse {
10944 pub const fn const_default() -> Self {
10945 Self {
10946 transaction: None,
10947 watermark: None,
10948 end: None,
10949 }
10950 }
10951 #[doc(hidden)]
10952 pub fn default_instance() -> &'static Self {
10953 static DEFAULT: super::ListTransactionsResponse = super::ListTransactionsResponse::const_default();
10954 &DEFAULT
10955 }
10956 pub fn transaction(&self) -> &super::ExecutedTransaction {
10958 self.transaction
10959 .as_ref()
10960 .map(|field| field as _)
10961 .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
10962 }
10963 pub fn transaction_opt_mut(
10965 &mut self,
10966 ) -> Option<&mut super::ExecutedTransaction> {
10967 self.transaction.as_mut().map(|field| field as _)
10968 }
10969 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
10972 self.transaction.get_or_insert_default()
10973 }
10974 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
10976 self.transaction.as_ref().map(|field| field as _)
10977 }
10978 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
10980 &mut self,
10981 field: T,
10982 ) {
10983 self.transaction = Some(field.into().into());
10984 }
10985 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
10987 mut self,
10988 field: T,
10989 ) -> Self {
10990 self.set_transaction(field.into());
10991 self
10992 }
10993 pub fn watermark(&self) -> &super::Watermark {
10995 self.watermark
10996 .as_ref()
10997 .map(|field| field as _)
10998 .unwrap_or_else(|| super::Watermark::default_instance() as _)
10999 }
11000 pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
11002 self.watermark.as_mut().map(|field| field as _)
11003 }
11004 pub fn watermark_mut(&mut self) -> &mut super::Watermark {
11007 self.watermark.get_or_insert_default()
11008 }
11009 pub fn watermark_opt(&self) -> Option<&super::Watermark> {
11011 self.watermark.as_ref().map(|field| field as _)
11012 }
11013 pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
11015 self.watermark = Some(field.into().into());
11016 }
11017 pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
11019 self.set_watermark(field.into());
11020 self
11021 }
11022 pub fn end(&self) -> &super::QueryEnd {
11024 self.end
11025 .as_ref()
11026 .map(|field| field as _)
11027 .unwrap_or_else(|| super::QueryEnd::default_instance() as _)
11028 }
11029 pub fn end_opt_mut(&mut self) -> Option<&mut super::QueryEnd> {
11031 self.end.as_mut().map(|field| field as _)
11032 }
11033 pub fn end_mut(&mut self) -> &mut super::QueryEnd {
11036 self.end.get_or_insert_default()
11037 }
11038 pub fn end_opt(&self) -> Option<&super::QueryEnd> {
11040 self.end.as_ref().map(|field| field as _)
11041 }
11042 pub fn set_end<T: Into<super::QueryEnd>>(&mut self, field: T) {
11044 self.end = Some(field.into().into());
11045 }
11046 pub fn with_end<T: Into<super::QueryEnd>>(mut self, field: T) -> Self {
11048 self.set_end(field.into());
11049 self
11050 }
11051 }
11052 impl super::LookupNameRequest {
11053 pub const fn const_default() -> Self {
11054 Self { name: None }
11055 }
11056 #[doc(hidden)]
11057 pub fn default_instance() -> &'static Self {
11058 static DEFAULT: super::LookupNameRequest = super::LookupNameRequest::const_default();
11059 &DEFAULT
11060 }
11061 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
11063 self.name.as_mut().map(|field| field as _)
11064 }
11065 pub fn name_mut(&mut self) -> &mut String {
11068 self.name.get_or_insert_default()
11069 }
11070 pub fn name_opt(&self) -> Option<&str> {
11072 self.name.as_ref().map(|field| field as _)
11073 }
11074 pub fn set_name<T: Into<String>>(&mut self, field: T) {
11076 self.name = Some(field.into().into());
11077 }
11078 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
11080 self.set_name(field.into());
11081 self
11082 }
11083 }
11084 impl super::LookupNameResponse {
11085 pub const fn const_default() -> Self {
11086 Self { record: None }
11087 }
11088 #[doc(hidden)]
11089 pub fn default_instance() -> &'static Self {
11090 static DEFAULT: super::LookupNameResponse = super::LookupNameResponse::const_default();
11091 &DEFAULT
11092 }
11093 pub fn record(&self) -> &super::NameRecord {
11095 self.record
11096 .as_ref()
11097 .map(|field| field as _)
11098 .unwrap_or_else(|| super::NameRecord::default_instance() as _)
11099 }
11100 pub fn record_opt_mut(&mut self) -> Option<&mut super::NameRecord> {
11102 self.record.as_mut().map(|field| field as _)
11103 }
11104 pub fn record_mut(&mut self) -> &mut super::NameRecord {
11107 self.record.get_or_insert_default()
11108 }
11109 pub fn record_opt(&self) -> Option<&super::NameRecord> {
11111 self.record.as_ref().map(|field| field as _)
11112 }
11113 pub fn set_record<T: Into<super::NameRecord>>(&mut self, field: T) {
11115 self.record = Some(field.into().into());
11116 }
11117 pub fn with_record<T: Into<super::NameRecord>>(mut self, field: T) -> Self {
11119 self.set_record(field.into());
11120 self
11121 }
11122 }
11123 impl super::MakeMoveVector {
11124 pub const fn const_default() -> Self {
11125 Self {
11126 element_type: None,
11127 elements: Vec::new(),
11128 }
11129 }
11130 #[doc(hidden)]
11131 pub fn default_instance() -> &'static Self {
11132 static DEFAULT: super::MakeMoveVector = super::MakeMoveVector::const_default();
11133 &DEFAULT
11134 }
11135 pub fn element_type_opt_mut(&mut self) -> Option<&mut String> {
11137 self.element_type.as_mut().map(|field| field as _)
11138 }
11139 pub fn element_type_mut(&mut self) -> &mut String {
11142 self.element_type.get_or_insert_default()
11143 }
11144 pub fn element_type_opt(&self) -> Option<&str> {
11146 self.element_type.as_ref().map(|field| field as _)
11147 }
11148 pub fn set_element_type<T: Into<String>>(&mut self, field: T) {
11150 self.element_type = Some(field.into().into());
11151 }
11152 pub fn with_element_type<T: Into<String>>(mut self, field: T) -> Self {
11154 self.set_element_type(field.into());
11155 self
11156 }
11157 pub fn elements(&self) -> &[super::Argument] {
11159 &self.elements
11160 }
11161 pub fn elements_mut(&mut self) -> &mut Vec<super::Argument> {
11164 &mut self.elements
11165 }
11166 pub fn set_elements(&mut self, field: Vec<super::Argument>) {
11168 self.elements = field;
11169 }
11170 pub fn with_elements(mut self, field: Vec<super::Argument>) -> Self {
11172 self.set_elements(field);
11173 self
11174 }
11175 }
11176 impl super::MergeCoins {
11177 pub const fn const_default() -> Self {
11178 Self {
11179 coin: None,
11180 coins_to_merge: Vec::new(),
11181 }
11182 }
11183 #[doc(hidden)]
11184 pub fn default_instance() -> &'static Self {
11185 static DEFAULT: super::MergeCoins = super::MergeCoins::const_default();
11186 &DEFAULT
11187 }
11188 pub fn coin(&self) -> &super::Argument {
11190 self.coin
11191 .as_ref()
11192 .map(|field| field as _)
11193 .unwrap_or_else(|| super::Argument::default_instance() as _)
11194 }
11195 pub fn coin_opt_mut(&mut self) -> Option<&mut super::Argument> {
11197 self.coin.as_mut().map(|field| field as _)
11198 }
11199 pub fn coin_mut(&mut self) -> &mut super::Argument {
11202 self.coin.get_or_insert_default()
11203 }
11204 pub fn coin_opt(&self) -> Option<&super::Argument> {
11206 self.coin.as_ref().map(|field| field as _)
11207 }
11208 pub fn set_coin<T: Into<super::Argument>>(&mut self, field: T) {
11210 self.coin = Some(field.into().into());
11211 }
11212 pub fn with_coin<T: Into<super::Argument>>(mut self, field: T) -> Self {
11214 self.set_coin(field.into());
11215 self
11216 }
11217 pub fn coins_to_merge(&self) -> &[super::Argument] {
11219 &self.coins_to_merge
11220 }
11221 pub fn coins_to_merge_mut(&mut self) -> &mut Vec<super::Argument> {
11224 &mut self.coins_to_merge
11225 }
11226 pub fn set_coins_to_merge(&mut self, field: Vec<super::Argument>) {
11228 self.coins_to_merge = field;
11229 }
11230 pub fn with_coins_to_merge(mut self, field: Vec<super::Argument>) -> Self {
11232 self.set_coins_to_merge(field);
11233 self
11234 }
11235 }
11236 impl super::Module {
11237 pub const fn const_default() -> Self {
11238 Self {
11239 name: None,
11240 contents: None,
11241 datatypes: Vec::new(),
11242 functions: Vec::new(),
11243 }
11244 }
11245 #[doc(hidden)]
11246 pub fn default_instance() -> &'static Self {
11247 static DEFAULT: super::Module = super::Module::const_default();
11248 &DEFAULT
11249 }
11250 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
11252 self.name.as_mut().map(|field| field as _)
11253 }
11254 pub fn name_mut(&mut self) -> &mut String {
11257 self.name.get_or_insert_default()
11258 }
11259 pub fn name_opt(&self) -> Option<&str> {
11261 self.name.as_ref().map(|field| field as _)
11262 }
11263 pub fn set_name<T: Into<String>>(&mut self, field: T) {
11265 self.name = Some(field.into().into());
11266 }
11267 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
11269 self.set_name(field.into());
11270 self
11271 }
11272 pub fn contents_opt(&self) -> Option<&[u8]> {
11274 self.contents.as_ref().map(|field| field as _)
11275 }
11276 pub fn set_contents<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
11278 self.contents = Some(field.into().into());
11279 }
11280 pub fn with_contents<T: Into<::prost::bytes::Bytes>>(
11282 mut self,
11283 field: T,
11284 ) -> Self {
11285 self.set_contents(field.into());
11286 self
11287 }
11288 pub fn datatypes(&self) -> &[super::DatatypeDescriptor] {
11290 &self.datatypes
11291 }
11292 pub fn datatypes_mut(&mut self) -> &mut Vec<super::DatatypeDescriptor> {
11295 &mut self.datatypes
11296 }
11297 pub fn set_datatypes(&mut self, field: Vec<super::DatatypeDescriptor>) {
11299 self.datatypes = field;
11300 }
11301 pub fn with_datatypes(mut self, field: Vec<super::DatatypeDescriptor>) -> Self {
11303 self.set_datatypes(field);
11304 self
11305 }
11306 pub fn functions(&self) -> &[super::FunctionDescriptor] {
11308 &self.functions
11309 }
11310 pub fn functions_mut(&mut self) -> &mut Vec<super::FunctionDescriptor> {
11313 &mut self.functions
11314 }
11315 pub fn set_functions(&mut self, field: Vec<super::FunctionDescriptor>) {
11317 self.functions = field;
11318 }
11319 pub fn with_functions(mut self, field: Vec<super::FunctionDescriptor>) -> Self {
11321 self.set_functions(field);
11322 self
11323 }
11324 }
11325 impl super::MoveAbort {
11326 pub const fn const_default() -> Self {
11327 Self {
11328 abort_code: None,
11329 location: None,
11330 clever_error: None,
11331 }
11332 }
11333 #[doc(hidden)]
11334 pub fn default_instance() -> &'static Self {
11335 static DEFAULT: super::MoveAbort = super::MoveAbort::const_default();
11336 &DEFAULT
11337 }
11338 pub fn abort_code_opt_mut(&mut self) -> Option<&mut u64> {
11340 self.abort_code.as_mut().map(|field| field as _)
11341 }
11342 pub fn abort_code_mut(&mut self) -> &mut u64 {
11345 self.abort_code.get_or_insert_default()
11346 }
11347 pub fn abort_code_opt(&self) -> Option<u64> {
11349 self.abort_code.as_ref().map(|field| *field)
11350 }
11351 pub fn set_abort_code(&mut self, field: u64) {
11353 self.abort_code = Some(field);
11354 }
11355 pub fn with_abort_code(mut self, field: u64) -> Self {
11357 self.set_abort_code(field);
11358 self
11359 }
11360 pub fn location(&self) -> &super::MoveLocation {
11362 self.location
11363 .as_ref()
11364 .map(|field| field as _)
11365 .unwrap_or_else(|| super::MoveLocation::default_instance() as _)
11366 }
11367 pub fn location_opt_mut(&mut self) -> Option<&mut super::MoveLocation> {
11369 self.location.as_mut().map(|field| field as _)
11370 }
11371 pub fn location_mut(&mut self) -> &mut super::MoveLocation {
11374 self.location.get_or_insert_default()
11375 }
11376 pub fn location_opt(&self) -> Option<&super::MoveLocation> {
11378 self.location.as_ref().map(|field| field as _)
11379 }
11380 pub fn set_location<T: Into<super::MoveLocation>>(&mut self, field: T) {
11382 self.location = Some(field.into().into());
11383 }
11384 pub fn with_location<T: Into<super::MoveLocation>>(mut self, field: T) -> Self {
11386 self.set_location(field.into());
11387 self
11388 }
11389 pub fn clever_error(&self) -> &super::CleverError {
11391 self.clever_error
11392 .as_ref()
11393 .map(|field| field as _)
11394 .unwrap_or_else(|| super::CleverError::default_instance() as _)
11395 }
11396 pub fn clever_error_opt_mut(&mut self) -> Option<&mut super::CleverError> {
11398 self.clever_error.as_mut().map(|field| field as _)
11399 }
11400 pub fn clever_error_mut(&mut self) -> &mut super::CleverError {
11403 self.clever_error.get_or_insert_default()
11404 }
11405 pub fn clever_error_opt(&self) -> Option<&super::CleverError> {
11407 self.clever_error.as_ref().map(|field| field as _)
11408 }
11409 pub fn set_clever_error<T: Into<super::CleverError>>(&mut self, field: T) {
11411 self.clever_error = Some(field.into().into());
11412 }
11413 pub fn with_clever_error<T: Into<super::CleverError>>(
11415 mut self,
11416 field: T,
11417 ) -> Self {
11418 self.set_clever_error(field.into());
11419 self
11420 }
11421 }
11422 impl super::MoveCall {
11423 pub const fn const_default() -> Self {
11424 Self {
11425 package: None,
11426 module: None,
11427 function: None,
11428 type_arguments: Vec::new(),
11429 arguments: Vec::new(),
11430 }
11431 }
11432 #[doc(hidden)]
11433 pub fn default_instance() -> &'static Self {
11434 static DEFAULT: super::MoveCall = super::MoveCall::const_default();
11435 &DEFAULT
11436 }
11437 pub fn package_opt_mut(&mut self) -> Option<&mut String> {
11439 self.package.as_mut().map(|field| field as _)
11440 }
11441 pub fn package_mut(&mut self) -> &mut String {
11444 self.package.get_or_insert_default()
11445 }
11446 pub fn package_opt(&self) -> Option<&str> {
11448 self.package.as_ref().map(|field| field as _)
11449 }
11450 pub fn set_package<T: Into<String>>(&mut self, field: T) {
11452 self.package = Some(field.into().into());
11453 }
11454 pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
11456 self.set_package(field.into());
11457 self
11458 }
11459 pub fn module_opt_mut(&mut self) -> Option<&mut String> {
11461 self.module.as_mut().map(|field| field as _)
11462 }
11463 pub fn module_mut(&mut self) -> &mut String {
11466 self.module.get_or_insert_default()
11467 }
11468 pub fn module_opt(&self) -> Option<&str> {
11470 self.module.as_ref().map(|field| field as _)
11471 }
11472 pub fn set_module<T: Into<String>>(&mut self, field: T) {
11474 self.module = Some(field.into().into());
11475 }
11476 pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
11478 self.set_module(field.into());
11479 self
11480 }
11481 pub fn function_opt_mut(&mut self) -> Option<&mut String> {
11483 self.function.as_mut().map(|field| field as _)
11484 }
11485 pub fn function_mut(&mut self) -> &mut String {
11488 self.function.get_or_insert_default()
11489 }
11490 pub fn function_opt(&self) -> Option<&str> {
11492 self.function.as_ref().map(|field| field as _)
11493 }
11494 pub fn set_function<T: Into<String>>(&mut self, field: T) {
11496 self.function = Some(field.into().into());
11497 }
11498 pub fn with_function<T: Into<String>>(mut self, field: T) -> Self {
11500 self.set_function(field.into());
11501 self
11502 }
11503 pub fn type_arguments(&self) -> &[String] {
11505 &self.type_arguments
11506 }
11507 pub fn type_arguments_mut(&mut self) -> &mut Vec<String> {
11510 &mut self.type_arguments
11511 }
11512 pub fn set_type_arguments(&mut self, field: Vec<String>) {
11514 self.type_arguments = field;
11515 }
11516 pub fn with_type_arguments(mut self, field: Vec<String>) -> Self {
11518 self.set_type_arguments(field);
11519 self
11520 }
11521 pub fn arguments(&self) -> &[super::Argument] {
11523 &self.arguments
11524 }
11525 pub fn arguments_mut(&mut self) -> &mut Vec<super::Argument> {
11528 &mut self.arguments
11529 }
11530 pub fn set_arguments(&mut self, field: Vec<super::Argument>) {
11532 self.arguments = field;
11533 }
11534 pub fn with_arguments(mut self, field: Vec<super::Argument>) -> Self {
11536 self.set_arguments(field);
11537 self
11538 }
11539 }
11540 impl super::MoveCallFilter {
11541 pub const fn const_default() -> Self {
11542 Self { function: None }
11543 }
11544 #[doc(hidden)]
11545 pub fn default_instance() -> &'static Self {
11546 static DEFAULT: super::MoveCallFilter = super::MoveCallFilter::const_default();
11547 &DEFAULT
11548 }
11549 pub fn function_opt_mut(&mut self) -> Option<&mut String> {
11551 self.function.as_mut().map(|field| field as _)
11552 }
11553 pub fn function_mut(&mut self) -> &mut String {
11556 self.function.get_or_insert_default()
11557 }
11558 pub fn function_opt(&self) -> Option<&str> {
11560 self.function.as_ref().map(|field| field as _)
11561 }
11562 pub fn set_function<T: Into<String>>(&mut self, field: T) {
11564 self.function = Some(field.into().into());
11565 }
11566 pub fn with_function<T: Into<String>>(mut self, field: T) -> Self {
11568 self.set_function(field.into());
11569 self
11570 }
11571 }
11572 impl super::MoveLocation {
11573 pub const fn const_default() -> Self {
11574 Self {
11575 package: None,
11576 module: None,
11577 function: None,
11578 instruction: None,
11579 function_name: None,
11580 }
11581 }
11582 #[doc(hidden)]
11583 pub fn default_instance() -> &'static Self {
11584 static DEFAULT: super::MoveLocation = super::MoveLocation::const_default();
11585 &DEFAULT
11586 }
11587 pub fn package_opt_mut(&mut self) -> Option<&mut String> {
11589 self.package.as_mut().map(|field| field as _)
11590 }
11591 pub fn package_mut(&mut self) -> &mut String {
11594 self.package.get_or_insert_default()
11595 }
11596 pub fn package_opt(&self) -> Option<&str> {
11598 self.package.as_ref().map(|field| field as _)
11599 }
11600 pub fn set_package<T: Into<String>>(&mut self, field: T) {
11602 self.package = Some(field.into().into());
11603 }
11604 pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
11606 self.set_package(field.into());
11607 self
11608 }
11609 pub fn module_opt_mut(&mut self) -> Option<&mut String> {
11611 self.module.as_mut().map(|field| field as _)
11612 }
11613 pub fn module_mut(&mut self) -> &mut String {
11616 self.module.get_or_insert_default()
11617 }
11618 pub fn module_opt(&self) -> Option<&str> {
11620 self.module.as_ref().map(|field| field as _)
11621 }
11622 pub fn set_module<T: Into<String>>(&mut self, field: T) {
11624 self.module = Some(field.into().into());
11625 }
11626 pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
11628 self.set_module(field.into());
11629 self
11630 }
11631 pub fn function_opt_mut(&mut self) -> Option<&mut u32> {
11633 self.function.as_mut().map(|field| field as _)
11634 }
11635 pub fn function_mut(&mut self) -> &mut u32 {
11638 self.function.get_or_insert_default()
11639 }
11640 pub fn function_opt(&self) -> Option<u32> {
11642 self.function.as_ref().map(|field| *field)
11643 }
11644 pub fn set_function(&mut self, field: u32) {
11646 self.function = Some(field);
11647 }
11648 pub fn with_function(mut self, field: u32) -> Self {
11650 self.set_function(field);
11651 self
11652 }
11653 pub fn instruction_opt_mut(&mut self) -> Option<&mut u32> {
11655 self.instruction.as_mut().map(|field| field as _)
11656 }
11657 pub fn instruction_mut(&mut self) -> &mut u32 {
11660 self.instruction.get_or_insert_default()
11661 }
11662 pub fn instruction_opt(&self) -> Option<u32> {
11664 self.instruction.as_ref().map(|field| *field)
11665 }
11666 pub fn set_instruction(&mut self, field: u32) {
11668 self.instruction = Some(field);
11669 }
11670 pub fn with_instruction(mut self, field: u32) -> Self {
11672 self.set_instruction(field);
11673 self
11674 }
11675 pub fn function_name_opt_mut(&mut self) -> Option<&mut String> {
11677 self.function_name.as_mut().map(|field| field as _)
11678 }
11679 pub fn function_name_mut(&mut self) -> &mut String {
11682 self.function_name.get_or_insert_default()
11683 }
11684 pub fn function_name_opt(&self) -> Option<&str> {
11686 self.function_name.as_ref().map(|field| field as _)
11687 }
11688 pub fn set_function_name<T: Into<String>>(&mut self, field: T) {
11690 self.function_name = Some(field.into().into());
11691 }
11692 pub fn with_function_name<T: Into<String>>(mut self, field: T) -> Self {
11694 self.set_function_name(field.into());
11695 self
11696 }
11697 }
11698 impl super::MoveTable {
11699 pub const fn const_default() -> Self {
11700 Self { id: None, size: None }
11701 }
11702 #[doc(hidden)]
11703 pub fn default_instance() -> &'static Self {
11704 static DEFAULT: super::MoveTable = super::MoveTable::const_default();
11705 &DEFAULT
11706 }
11707 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
11709 self.id.as_mut().map(|field| field as _)
11710 }
11711 pub fn id_mut(&mut self) -> &mut String {
11714 self.id.get_or_insert_default()
11715 }
11716 pub fn id_opt(&self) -> Option<&str> {
11718 self.id.as_ref().map(|field| field as _)
11719 }
11720 pub fn set_id<T: Into<String>>(&mut self, field: T) {
11722 self.id = Some(field.into().into());
11723 }
11724 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
11726 self.set_id(field.into());
11727 self
11728 }
11729 pub fn size_opt_mut(&mut self) -> Option<&mut u64> {
11731 self.size.as_mut().map(|field| field as _)
11732 }
11733 pub fn size_mut(&mut self) -> &mut u64 {
11736 self.size.get_or_insert_default()
11737 }
11738 pub fn size_opt(&self) -> Option<u64> {
11740 self.size.as_ref().map(|field| *field)
11741 }
11742 pub fn set_size(&mut self, field: u64) {
11744 self.size = Some(field);
11745 }
11746 pub fn with_size(mut self, field: u64) -> Self {
11748 self.set_size(field);
11749 self
11750 }
11751 }
11752 impl super::MultisigAggregatedSignature {
11753 pub const fn const_default() -> Self {
11754 Self {
11755 signatures: Vec::new(),
11756 bitmap: None,
11757 legacy_bitmap: None,
11758 committee: None,
11759 }
11760 }
11761 #[doc(hidden)]
11762 pub fn default_instance() -> &'static Self {
11763 static DEFAULT: super::MultisigAggregatedSignature = super::MultisigAggregatedSignature::const_default();
11764 &DEFAULT
11765 }
11766 pub fn signatures(&self) -> &[super::MultisigMemberSignature] {
11768 &self.signatures
11769 }
11770 pub fn signatures_mut(&mut self) -> &mut Vec<super::MultisigMemberSignature> {
11773 &mut self.signatures
11774 }
11775 pub fn set_signatures(&mut self, field: Vec<super::MultisigMemberSignature>) {
11777 self.signatures = field;
11778 }
11779 pub fn with_signatures(
11781 mut self,
11782 field: Vec<super::MultisigMemberSignature>,
11783 ) -> Self {
11784 self.set_signatures(field);
11785 self
11786 }
11787 pub fn bitmap_opt_mut(&mut self) -> Option<&mut u32> {
11789 self.bitmap.as_mut().map(|field| field as _)
11790 }
11791 pub fn bitmap_mut(&mut self) -> &mut u32 {
11794 self.bitmap.get_or_insert_default()
11795 }
11796 pub fn bitmap_opt(&self) -> Option<u32> {
11798 self.bitmap.as_ref().map(|field| *field)
11799 }
11800 pub fn set_bitmap(&mut self, field: u32) {
11802 self.bitmap = Some(field);
11803 }
11804 pub fn with_bitmap(mut self, field: u32) -> Self {
11806 self.set_bitmap(field);
11807 self
11808 }
11809 pub fn legacy_bitmap_opt(&self) -> Option<&[u8]> {
11811 self.legacy_bitmap.as_ref().map(|field| field as _)
11812 }
11813 pub fn set_legacy_bitmap<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
11815 self.legacy_bitmap = Some(field.into().into());
11816 }
11817 pub fn with_legacy_bitmap<T: Into<::prost::bytes::Bytes>>(
11819 mut self,
11820 field: T,
11821 ) -> Self {
11822 self.set_legacy_bitmap(field.into());
11823 self
11824 }
11825 pub fn committee(&self) -> &super::MultisigCommittee {
11827 self.committee
11828 .as_ref()
11829 .map(|field| field as _)
11830 .unwrap_or_else(|| super::MultisigCommittee::default_instance() as _)
11831 }
11832 pub fn committee_opt_mut(&mut self) -> Option<&mut super::MultisigCommittee> {
11834 self.committee.as_mut().map(|field| field as _)
11835 }
11836 pub fn committee_mut(&mut self) -> &mut super::MultisigCommittee {
11839 self.committee.get_or_insert_default()
11840 }
11841 pub fn committee_opt(&self) -> Option<&super::MultisigCommittee> {
11843 self.committee.as_ref().map(|field| field as _)
11844 }
11845 pub fn set_committee<T: Into<super::MultisigCommittee>>(&mut self, field: T) {
11847 self.committee = Some(field.into().into());
11848 }
11849 pub fn with_committee<T: Into<super::MultisigCommittee>>(
11851 mut self,
11852 field: T,
11853 ) -> Self {
11854 self.set_committee(field.into());
11855 self
11856 }
11857 }
11858 impl super::MultisigCommittee {
11859 pub const fn const_default() -> Self {
11860 Self {
11861 members: Vec::new(),
11862 threshold: None,
11863 }
11864 }
11865 #[doc(hidden)]
11866 pub fn default_instance() -> &'static Self {
11867 static DEFAULT: super::MultisigCommittee = super::MultisigCommittee::const_default();
11868 &DEFAULT
11869 }
11870 pub fn members(&self) -> &[super::MultisigMember] {
11872 &self.members
11873 }
11874 pub fn members_mut(&mut self) -> &mut Vec<super::MultisigMember> {
11877 &mut self.members
11878 }
11879 pub fn set_members(&mut self, field: Vec<super::MultisigMember>) {
11881 self.members = field;
11882 }
11883 pub fn with_members(mut self, field: Vec<super::MultisigMember>) -> Self {
11885 self.set_members(field);
11886 self
11887 }
11888 pub fn threshold_opt_mut(&mut self) -> Option<&mut u32> {
11890 self.threshold.as_mut().map(|field| field as _)
11891 }
11892 pub fn threshold_mut(&mut self) -> &mut u32 {
11895 self.threshold.get_or_insert_default()
11896 }
11897 pub fn threshold_opt(&self) -> Option<u32> {
11899 self.threshold.as_ref().map(|field| *field)
11900 }
11901 pub fn set_threshold(&mut self, field: u32) {
11903 self.threshold = Some(field);
11904 }
11905 pub fn with_threshold(mut self, field: u32) -> Self {
11907 self.set_threshold(field);
11908 self
11909 }
11910 }
11911 impl super::MultisigMember {
11912 pub const fn const_default() -> Self {
11913 Self {
11914 public_key: None,
11915 weight: None,
11916 }
11917 }
11918 #[doc(hidden)]
11919 pub fn default_instance() -> &'static Self {
11920 static DEFAULT: super::MultisigMember = super::MultisigMember::const_default();
11921 &DEFAULT
11922 }
11923 pub fn public_key(&self) -> &super::MultisigMemberPublicKey {
11925 self.public_key
11926 .as_ref()
11927 .map(|field| field as _)
11928 .unwrap_or_else(|| {
11929 super::MultisigMemberPublicKey::default_instance() as _
11930 })
11931 }
11932 pub fn public_key_opt_mut(
11934 &mut self,
11935 ) -> Option<&mut super::MultisigMemberPublicKey> {
11936 self.public_key.as_mut().map(|field| field as _)
11937 }
11938 pub fn public_key_mut(&mut self) -> &mut super::MultisigMemberPublicKey {
11941 self.public_key.get_or_insert_default()
11942 }
11943 pub fn public_key_opt(&self) -> Option<&super::MultisigMemberPublicKey> {
11945 self.public_key.as_ref().map(|field| field as _)
11946 }
11947 pub fn set_public_key<T: Into<super::MultisigMemberPublicKey>>(
11949 &mut self,
11950 field: T,
11951 ) {
11952 self.public_key = Some(field.into().into());
11953 }
11954 pub fn with_public_key<T: Into<super::MultisigMemberPublicKey>>(
11956 mut self,
11957 field: T,
11958 ) -> Self {
11959 self.set_public_key(field.into());
11960 self
11961 }
11962 pub fn weight_opt_mut(&mut self) -> Option<&mut u32> {
11964 self.weight.as_mut().map(|field| field as _)
11965 }
11966 pub fn weight_mut(&mut self) -> &mut u32 {
11969 self.weight.get_or_insert_default()
11970 }
11971 pub fn weight_opt(&self) -> Option<u32> {
11973 self.weight.as_ref().map(|field| *field)
11974 }
11975 pub fn set_weight(&mut self, field: u32) {
11977 self.weight = Some(field);
11978 }
11979 pub fn with_weight(mut self, field: u32) -> Self {
11981 self.set_weight(field);
11982 self
11983 }
11984 }
11985 impl super::MultisigMemberPublicKey {
11986 pub const fn const_default() -> Self {
11987 Self {
11988 scheme: None,
11989 public_key: None,
11990 zklogin: None,
11991 }
11992 }
11993 #[doc(hidden)]
11994 pub fn default_instance() -> &'static Self {
11995 static DEFAULT: super::MultisigMemberPublicKey = super::MultisigMemberPublicKey::const_default();
11996 &DEFAULT
11997 }
11998 pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
12000 self.set_scheme(field.into());
12001 self
12002 }
12003 pub fn public_key_opt(&self) -> Option<&[u8]> {
12005 self.public_key.as_ref().map(|field| field as _)
12006 }
12007 pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
12009 self.public_key = Some(field.into().into());
12010 }
12011 pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
12013 mut self,
12014 field: T,
12015 ) -> Self {
12016 self.set_public_key(field.into());
12017 self
12018 }
12019 pub fn zklogin(&self) -> &super::ZkLoginPublicIdentifier {
12021 self.zklogin
12022 .as_ref()
12023 .map(|field| field as _)
12024 .unwrap_or_else(|| {
12025 super::ZkLoginPublicIdentifier::default_instance() as _
12026 })
12027 }
12028 pub fn zklogin_opt_mut(
12030 &mut self,
12031 ) -> Option<&mut super::ZkLoginPublicIdentifier> {
12032 self.zklogin.as_mut().map(|field| field as _)
12033 }
12034 pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginPublicIdentifier {
12037 self.zklogin.get_or_insert_default()
12038 }
12039 pub fn zklogin_opt(&self) -> Option<&super::ZkLoginPublicIdentifier> {
12041 self.zklogin.as_ref().map(|field| field as _)
12042 }
12043 pub fn set_zklogin<T: Into<super::ZkLoginPublicIdentifier>>(
12045 &mut self,
12046 field: T,
12047 ) {
12048 self.zklogin = Some(field.into().into());
12049 }
12050 pub fn with_zklogin<T: Into<super::ZkLoginPublicIdentifier>>(
12052 mut self,
12053 field: T,
12054 ) -> Self {
12055 self.set_zklogin(field.into());
12056 self
12057 }
12058 }
12059 impl super::MultisigMemberSignature {
12060 pub const fn const_default() -> Self {
12061 Self {
12062 scheme: None,
12063 signature: None,
12064 zklogin: None,
12065 passkey: None,
12066 }
12067 }
12068 #[doc(hidden)]
12069 pub fn default_instance() -> &'static Self {
12070 static DEFAULT: super::MultisigMemberSignature = super::MultisigMemberSignature::const_default();
12071 &DEFAULT
12072 }
12073 pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
12075 self.set_scheme(field.into());
12076 self
12077 }
12078 pub fn signature_opt(&self) -> Option<&[u8]> {
12080 self.signature.as_ref().map(|field| field as _)
12081 }
12082 pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
12084 self.signature = Some(field.into().into());
12085 }
12086 pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
12088 mut self,
12089 field: T,
12090 ) -> Self {
12091 self.set_signature(field.into());
12092 self
12093 }
12094 pub fn zklogin(&self) -> &super::ZkLoginAuthenticator {
12096 self.zklogin
12097 .as_ref()
12098 .map(|field| field as _)
12099 .unwrap_or_else(|| super::ZkLoginAuthenticator::default_instance() as _)
12100 }
12101 pub fn zklogin_opt_mut(&mut self) -> Option<&mut super::ZkLoginAuthenticator> {
12103 self.zklogin.as_mut().map(|field| field as _)
12104 }
12105 pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginAuthenticator {
12108 self.zklogin.get_or_insert_default()
12109 }
12110 pub fn zklogin_opt(&self) -> Option<&super::ZkLoginAuthenticator> {
12112 self.zklogin.as_ref().map(|field| field as _)
12113 }
12114 pub fn set_zklogin<T: Into<super::ZkLoginAuthenticator>>(&mut self, field: T) {
12116 self.zklogin = Some(field.into().into());
12117 }
12118 pub fn with_zklogin<T: Into<super::ZkLoginAuthenticator>>(
12120 mut self,
12121 field: T,
12122 ) -> Self {
12123 self.set_zklogin(field.into());
12124 self
12125 }
12126 pub fn passkey(&self) -> &super::PasskeyAuthenticator {
12128 self.passkey
12129 .as_ref()
12130 .map(|field| field as _)
12131 .unwrap_or_else(|| super::PasskeyAuthenticator::default_instance() as _)
12132 }
12133 pub fn passkey_opt_mut(&mut self) -> Option<&mut super::PasskeyAuthenticator> {
12135 self.passkey.as_mut().map(|field| field as _)
12136 }
12137 pub fn passkey_mut(&mut self) -> &mut super::PasskeyAuthenticator {
12140 self.passkey.get_or_insert_default()
12141 }
12142 pub fn passkey_opt(&self) -> Option<&super::PasskeyAuthenticator> {
12144 self.passkey.as_ref().map(|field| field as _)
12145 }
12146 pub fn set_passkey<T: Into<super::PasskeyAuthenticator>>(&mut self, field: T) {
12148 self.passkey = Some(field.into().into());
12149 }
12150 pub fn with_passkey<T: Into<super::PasskeyAuthenticator>>(
12152 mut self,
12153 field: T,
12154 ) -> Self {
12155 self.set_passkey(field.into());
12156 self
12157 }
12158 }
12159 impl super::NameRecord {
12160 pub const fn const_default() -> Self {
12161 Self {
12162 id: None,
12163 name: None,
12164 registration_nft_id: None,
12165 expiration_timestamp: None,
12166 target_address: None,
12167 data: std::collections::BTreeMap::new(),
12168 }
12169 }
12170 #[doc(hidden)]
12171 pub fn default_instance() -> &'static Self {
12172 static DEFAULT: super::NameRecord = super::NameRecord::const_default();
12173 &DEFAULT
12174 }
12175 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
12177 self.id.as_mut().map(|field| field as _)
12178 }
12179 pub fn id_mut(&mut self) -> &mut String {
12182 self.id.get_or_insert_default()
12183 }
12184 pub fn id_opt(&self) -> Option<&str> {
12186 self.id.as_ref().map(|field| field as _)
12187 }
12188 pub fn set_id<T: Into<String>>(&mut self, field: T) {
12190 self.id = Some(field.into().into());
12191 }
12192 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
12194 self.set_id(field.into());
12195 self
12196 }
12197 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
12199 self.name.as_mut().map(|field| field as _)
12200 }
12201 pub fn name_mut(&mut self) -> &mut String {
12204 self.name.get_or_insert_default()
12205 }
12206 pub fn name_opt(&self) -> Option<&str> {
12208 self.name.as_ref().map(|field| field as _)
12209 }
12210 pub fn set_name<T: Into<String>>(&mut self, field: T) {
12212 self.name = Some(field.into().into());
12213 }
12214 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
12216 self.set_name(field.into());
12217 self
12218 }
12219 pub fn registration_nft_id_opt_mut(&mut self) -> Option<&mut String> {
12221 self.registration_nft_id.as_mut().map(|field| field as _)
12222 }
12223 pub fn registration_nft_id_mut(&mut self) -> &mut String {
12226 self.registration_nft_id.get_or_insert_default()
12227 }
12228 pub fn registration_nft_id_opt(&self) -> Option<&str> {
12230 self.registration_nft_id.as_ref().map(|field| field as _)
12231 }
12232 pub fn set_registration_nft_id<T: Into<String>>(&mut self, field: T) {
12234 self.registration_nft_id = Some(field.into().into());
12235 }
12236 pub fn with_registration_nft_id<T: Into<String>>(mut self, field: T) -> Self {
12238 self.set_registration_nft_id(field.into());
12239 self
12240 }
12241 pub fn expiration_timestamp_opt_mut(
12243 &mut self,
12244 ) -> Option<&mut ::prost_types::Timestamp> {
12245 self.expiration_timestamp.as_mut().map(|field| field as _)
12246 }
12247 pub fn expiration_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
12250 self.expiration_timestamp.get_or_insert_default()
12251 }
12252 pub fn expiration_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
12254 self.expiration_timestamp.as_ref().map(|field| field as _)
12255 }
12256 pub fn set_expiration_timestamp<T: Into<::prost_types::Timestamp>>(
12258 &mut self,
12259 field: T,
12260 ) {
12261 self.expiration_timestamp = Some(field.into().into());
12262 }
12263 pub fn with_expiration_timestamp<T: Into<::prost_types::Timestamp>>(
12265 mut self,
12266 field: T,
12267 ) -> Self {
12268 self.set_expiration_timestamp(field.into());
12269 self
12270 }
12271 pub fn target_address_opt_mut(&mut self) -> Option<&mut String> {
12273 self.target_address.as_mut().map(|field| field as _)
12274 }
12275 pub fn target_address_mut(&mut self) -> &mut String {
12278 self.target_address.get_or_insert_default()
12279 }
12280 pub fn target_address_opt(&self) -> Option<&str> {
12282 self.target_address.as_ref().map(|field| field as _)
12283 }
12284 pub fn set_target_address<T: Into<String>>(&mut self, field: T) {
12286 self.target_address = Some(field.into().into());
12287 }
12288 pub fn with_target_address<T: Into<String>>(mut self, field: T) -> Self {
12290 self.set_target_address(field.into());
12291 self
12292 }
12293 pub fn data(&self) -> &::std::collections::BTreeMap<String, String> {
12295 &self.data
12296 }
12297 pub fn data_mut(&mut self) -> &mut ::std::collections::BTreeMap<String, String> {
12300 &mut self.data
12301 }
12302 pub fn set_data(&mut self, field: ::std::collections::BTreeMap<String, String>) {
12304 self.data = field;
12305 }
12306 pub fn with_data(
12308 mut self,
12309 field: ::std::collections::BTreeMap<String, String>,
12310 ) -> Self {
12311 self.set_data(field);
12312 self
12313 }
12314 }
12315 impl super::Object {
12316 pub const fn const_default() -> Self {
12317 Self {
12318 bcs: None,
12319 object_id: None,
12320 version: None,
12321 digest: None,
12322 owner: None,
12323 object_type: None,
12324 has_public_transfer: None,
12325 contents: None,
12326 package: None,
12327 previous_transaction: None,
12328 storage_rebate: None,
12329 json: None,
12330 balance: None,
12331 display: None,
12332 }
12333 }
12334 #[doc(hidden)]
12335 pub fn default_instance() -> &'static Self {
12336 static DEFAULT: super::Object = super::Object::const_default();
12337 &DEFAULT
12338 }
12339 pub fn bcs(&self) -> &super::Bcs {
12341 self.bcs
12342 .as_ref()
12343 .map(|field| field as _)
12344 .unwrap_or_else(|| super::Bcs::default_instance() as _)
12345 }
12346 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
12348 self.bcs.as_mut().map(|field| field as _)
12349 }
12350 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
12353 self.bcs.get_or_insert_default()
12354 }
12355 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
12357 self.bcs.as_ref().map(|field| field as _)
12358 }
12359 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
12361 self.bcs = Some(field.into().into());
12362 }
12363 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
12365 self.set_bcs(field.into());
12366 self
12367 }
12368 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
12370 self.object_id.as_mut().map(|field| field as _)
12371 }
12372 pub fn object_id_mut(&mut self) -> &mut String {
12375 self.object_id.get_or_insert_default()
12376 }
12377 pub fn object_id_opt(&self) -> Option<&str> {
12379 self.object_id.as_ref().map(|field| field as _)
12380 }
12381 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
12383 self.object_id = Some(field.into().into());
12384 }
12385 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
12387 self.set_object_id(field.into());
12388 self
12389 }
12390 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
12392 self.version.as_mut().map(|field| field as _)
12393 }
12394 pub fn version_mut(&mut self) -> &mut u64 {
12397 self.version.get_or_insert_default()
12398 }
12399 pub fn version_opt(&self) -> Option<u64> {
12401 self.version.as_ref().map(|field| *field)
12402 }
12403 pub fn set_version(&mut self, field: u64) {
12405 self.version = Some(field);
12406 }
12407 pub fn with_version(mut self, field: u64) -> Self {
12409 self.set_version(field);
12410 self
12411 }
12412 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
12414 self.digest.as_mut().map(|field| field as _)
12415 }
12416 pub fn digest_mut(&mut self) -> &mut String {
12419 self.digest.get_or_insert_default()
12420 }
12421 pub fn digest_opt(&self) -> Option<&str> {
12423 self.digest.as_ref().map(|field| field as _)
12424 }
12425 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
12427 self.digest = Some(field.into().into());
12428 }
12429 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
12431 self.set_digest(field.into());
12432 self
12433 }
12434 pub fn owner(&self) -> &super::Owner {
12436 self.owner
12437 .as_ref()
12438 .map(|field| field as _)
12439 .unwrap_or_else(|| super::Owner::default_instance() as _)
12440 }
12441 pub fn owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
12443 self.owner.as_mut().map(|field| field as _)
12444 }
12445 pub fn owner_mut(&mut self) -> &mut super::Owner {
12448 self.owner.get_or_insert_default()
12449 }
12450 pub fn owner_opt(&self) -> Option<&super::Owner> {
12452 self.owner.as_ref().map(|field| field as _)
12453 }
12454 pub fn set_owner<T: Into<super::Owner>>(&mut self, field: T) {
12456 self.owner = Some(field.into().into());
12457 }
12458 pub fn with_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
12460 self.set_owner(field.into());
12461 self
12462 }
12463 pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
12465 self.object_type.as_mut().map(|field| field as _)
12466 }
12467 pub fn object_type_mut(&mut self) -> &mut String {
12470 self.object_type.get_or_insert_default()
12471 }
12472 pub fn object_type_opt(&self) -> Option<&str> {
12474 self.object_type.as_ref().map(|field| field as _)
12475 }
12476 pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
12478 self.object_type = Some(field.into().into());
12479 }
12480 pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
12482 self.set_object_type(field.into());
12483 self
12484 }
12485 pub fn has_public_transfer_opt_mut(&mut self) -> Option<&mut bool> {
12487 self.has_public_transfer.as_mut().map(|field| field as _)
12488 }
12489 pub fn has_public_transfer_mut(&mut self) -> &mut bool {
12492 self.has_public_transfer.get_or_insert_default()
12493 }
12494 pub fn has_public_transfer_opt(&self) -> Option<bool> {
12496 self.has_public_transfer.as_ref().map(|field| *field)
12497 }
12498 pub fn set_has_public_transfer(&mut self, field: bool) {
12500 self.has_public_transfer = Some(field);
12501 }
12502 pub fn with_has_public_transfer(mut self, field: bool) -> Self {
12504 self.set_has_public_transfer(field);
12505 self
12506 }
12507 pub fn contents(&self) -> &super::Bcs {
12509 self.contents
12510 .as_ref()
12511 .map(|field| field as _)
12512 .unwrap_or_else(|| super::Bcs::default_instance() as _)
12513 }
12514 pub fn contents_opt_mut(&mut self) -> Option<&mut super::Bcs> {
12516 self.contents.as_mut().map(|field| field as _)
12517 }
12518 pub fn contents_mut(&mut self) -> &mut super::Bcs {
12521 self.contents.get_or_insert_default()
12522 }
12523 pub fn contents_opt(&self) -> Option<&super::Bcs> {
12525 self.contents.as_ref().map(|field| field as _)
12526 }
12527 pub fn set_contents<T: Into<super::Bcs>>(&mut self, field: T) {
12529 self.contents = Some(field.into().into());
12530 }
12531 pub fn with_contents<T: Into<super::Bcs>>(mut self, field: T) -> Self {
12533 self.set_contents(field.into());
12534 self
12535 }
12536 pub fn package(&self) -> &super::Package {
12538 self.package
12539 .as_ref()
12540 .map(|field| field as _)
12541 .unwrap_or_else(|| super::Package::default_instance() as _)
12542 }
12543 pub fn package_opt_mut(&mut self) -> Option<&mut super::Package> {
12545 self.package.as_mut().map(|field| field as _)
12546 }
12547 pub fn package_mut(&mut self) -> &mut super::Package {
12550 self.package.get_or_insert_default()
12551 }
12552 pub fn package_opt(&self) -> Option<&super::Package> {
12554 self.package.as_ref().map(|field| field as _)
12555 }
12556 pub fn set_package<T: Into<super::Package>>(&mut self, field: T) {
12558 self.package = Some(field.into().into());
12559 }
12560 pub fn with_package<T: Into<super::Package>>(mut self, field: T) -> Self {
12562 self.set_package(field.into());
12563 self
12564 }
12565 pub fn previous_transaction_opt_mut(&mut self) -> Option<&mut String> {
12567 self.previous_transaction.as_mut().map(|field| field as _)
12568 }
12569 pub fn previous_transaction_mut(&mut self) -> &mut String {
12572 self.previous_transaction.get_or_insert_default()
12573 }
12574 pub fn previous_transaction_opt(&self) -> Option<&str> {
12576 self.previous_transaction.as_ref().map(|field| field as _)
12577 }
12578 pub fn set_previous_transaction<T: Into<String>>(&mut self, field: T) {
12580 self.previous_transaction = Some(field.into().into());
12581 }
12582 pub fn with_previous_transaction<T: Into<String>>(mut self, field: T) -> Self {
12584 self.set_previous_transaction(field.into());
12585 self
12586 }
12587 pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
12589 self.storage_rebate.as_mut().map(|field| field as _)
12590 }
12591 pub fn storage_rebate_mut(&mut self) -> &mut u64 {
12594 self.storage_rebate.get_or_insert_default()
12595 }
12596 pub fn storage_rebate_opt(&self) -> Option<u64> {
12598 self.storage_rebate.as_ref().map(|field| *field)
12599 }
12600 pub fn set_storage_rebate(&mut self, field: u64) {
12602 self.storage_rebate = Some(field);
12603 }
12604 pub fn with_storage_rebate(mut self, field: u64) -> Self {
12606 self.set_storage_rebate(field);
12607 self
12608 }
12609 pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
12611 self.json.as_mut().map(|field| field as _)
12612 }
12613 pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
12616 self.json.get_or_insert_default()
12617 }
12618 pub fn json_opt(&self) -> Option<&::prost_types::Value> {
12620 self.json.as_ref().map(|field| field as _)
12621 }
12622 pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
12624 self.json = Some(field.into().into());
12625 }
12626 pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
12628 self.set_json(field.into());
12629 self
12630 }
12631 pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
12633 self.balance.as_mut().map(|field| field as _)
12634 }
12635 pub fn balance_mut(&mut self) -> &mut u64 {
12638 self.balance.get_or_insert_default()
12639 }
12640 pub fn balance_opt(&self) -> Option<u64> {
12642 self.balance.as_ref().map(|field| *field)
12643 }
12644 pub fn set_balance(&mut self, field: u64) {
12646 self.balance = Some(field);
12647 }
12648 pub fn with_balance(mut self, field: u64) -> Self {
12650 self.set_balance(field);
12651 self
12652 }
12653 pub fn display(&self) -> &super::Display {
12655 self.display
12656 .as_ref()
12657 .map(|field| field as _)
12658 .unwrap_or_else(|| super::Display::default_instance() as _)
12659 }
12660 pub fn display_opt_mut(&mut self) -> Option<&mut super::Display> {
12662 self.display.as_mut().map(|field| field as _)
12663 }
12664 pub fn display_mut(&mut self) -> &mut super::Display {
12667 self.display.get_or_insert_default()
12668 }
12669 pub fn display_opt(&self) -> Option<&super::Display> {
12671 self.display.as_ref().map(|field| field as _)
12672 }
12673 pub fn set_display<T: Into<super::Display>>(&mut self, field: T) {
12675 self.display = Some(field.into().into());
12676 }
12677 pub fn with_display<T: Into<super::Display>>(mut self, field: T) -> Self {
12679 self.set_display(field.into());
12680 self
12681 }
12682 }
12683 impl super::ObjectReference {
12684 pub const fn const_default() -> Self {
12685 Self {
12686 object_id: None,
12687 version: None,
12688 digest: None,
12689 }
12690 }
12691 #[doc(hidden)]
12692 pub fn default_instance() -> &'static Self {
12693 static DEFAULT: super::ObjectReference = super::ObjectReference::const_default();
12694 &DEFAULT
12695 }
12696 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
12698 self.object_id.as_mut().map(|field| field as _)
12699 }
12700 pub fn object_id_mut(&mut self) -> &mut String {
12703 self.object_id.get_or_insert_default()
12704 }
12705 pub fn object_id_opt(&self) -> Option<&str> {
12707 self.object_id.as_ref().map(|field| field as _)
12708 }
12709 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
12711 self.object_id = Some(field.into().into());
12712 }
12713 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
12715 self.set_object_id(field.into());
12716 self
12717 }
12718 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
12720 self.version.as_mut().map(|field| field as _)
12721 }
12722 pub fn version_mut(&mut self) -> &mut u64 {
12725 self.version.get_or_insert_default()
12726 }
12727 pub fn version_opt(&self) -> Option<u64> {
12729 self.version.as_ref().map(|field| *field)
12730 }
12731 pub fn set_version(&mut self, field: u64) {
12733 self.version = Some(field);
12734 }
12735 pub fn with_version(mut self, field: u64) -> Self {
12737 self.set_version(field);
12738 self
12739 }
12740 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
12742 self.digest.as_mut().map(|field| field as _)
12743 }
12744 pub fn digest_mut(&mut self) -> &mut String {
12747 self.digest.get_or_insert_default()
12748 }
12749 pub fn digest_opt(&self) -> Option<&str> {
12751 self.digest.as_ref().map(|field| field as _)
12752 }
12753 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
12755 self.digest = Some(field.into().into());
12756 }
12757 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
12759 self.set_digest(field.into());
12760 self
12761 }
12762 }
12763 impl super::ObjectSet {
12764 pub const fn const_default() -> Self {
12765 Self { objects: Vec::new() }
12766 }
12767 #[doc(hidden)]
12768 pub fn default_instance() -> &'static Self {
12769 static DEFAULT: super::ObjectSet = super::ObjectSet::const_default();
12770 &DEFAULT
12771 }
12772 pub fn objects(&self) -> &[super::Object] {
12774 &self.objects
12775 }
12776 pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
12779 &mut self.objects
12780 }
12781 pub fn set_objects(&mut self, field: Vec<super::Object>) {
12783 self.objects = field;
12784 }
12785 pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
12787 self.set_objects(field);
12788 self
12789 }
12790 }
12791 impl super::OpenSignature {
12792 pub const fn const_default() -> Self {
12793 Self {
12794 reference: None,
12795 body: None,
12796 }
12797 }
12798 #[doc(hidden)]
12799 pub fn default_instance() -> &'static Self {
12800 static DEFAULT: super::OpenSignature = super::OpenSignature::const_default();
12801 &DEFAULT
12802 }
12803 pub fn with_reference<T: Into<super::open_signature::Reference>>(
12805 mut self,
12806 field: T,
12807 ) -> Self {
12808 self.set_reference(field.into());
12809 self
12810 }
12811 pub fn body(&self) -> &super::OpenSignatureBody {
12813 self.body
12814 .as_ref()
12815 .map(|field| field as _)
12816 .unwrap_or_else(|| super::OpenSignatureBody::default_instance() as _)
12817 }
12818 pub fn body_opt_mut(&mut self) -> Option<&mut super::OpenSignatureBody> {
12820 self.body.as_mut().map(|field| field as _)
12821 }
12822 pub fn body_mut(&mut self) -> &mut super::OpenSignatureBody {
12825 self.body.get_or_insert_default()
12826 }
12827 pub fn body_opt(&self) -> Option<&super::OpenSignatureBody> {
12829 self.body.as_ref().map(|field| field as _)
12830 }
12831 pub fn set_body<T: Into<super::OpenSignatureBody>>(&mut self, field: T) {
12833 self.body = Some(field.into().into());
12834 }
12835 pub fn with_body<T: Into<super::OpenSignatureBody>>(mut self, field: T) -> Self {
12837 self.set_body(field.into());
12838 self
12839 }
12840 }
12841 impl super::OpenSignatureBody {
12842 pub const fn const_default() -> Self {
12843 Self {
12844 r#type: None,
12845 type_name: None,
12846 type_parameter_instantiation: Vec::new(),
12847 type_parameter: None,
12848 }
12849 }
12850 #[doc(hidden)]
12851 pub fn default_instance() -> &'static Self {
12852 static DEFAULT: super::OpenSignatureBody = super::OpenSignatureBody::const_default();
12853 &DEFAULT
12854 }
12855 pub fn with_type<T: Into<super::open_signature_body::Type>>(
12857 mut self,
12858 field: T,
12859 ) -> Self {
12860 self.set_type(field.into());
12861 self
12862 }
12863 pub fn type_name_opt_mut(&mut self) -> Option<&mut String> {
12865 self.type_name.as_mut().map(|field| field as _)
12866 }
12867 pub fn type_name_mut(&mut self) -> &mut String {
12870 self.type_name.get_or_insert_default()
12871 }
12872 pub fn type_name_opt(&self) -> Option<&str> {
12874 self.type_name.as_ref().map(|field| field as _)
12875 }
12876 pub fn set_type_name<T: Into<String>>(&mut self, field: T) {
12878 self.type_name = Some(field.into().into());
12879 }
12880 pub fn with_type_name<T: Into<String>>(mut self, field: T) -> Self {
12882 self.set_type_name(field.into());
12883 self
12884 }
12885 pub fn type_parameter_instantiation(&self) -> &[super::OpenSignatureBody] {
12887 &self.type_parameter_instantiation
12888 }
12889 pub fn type_parameter_instantiation_mut(
12892 &mut self,
12893 ) -> &mut Vec<super::OpenSignatureBody> {
12894 &mut self.type_parameter_instantiation
12895 }
12896 pub fn set_type_parameter_instantiation(
12898 &mut self,
12899 field: Vec<super::OpenSignatureBody>,
12900 ) {
12901 self.type_parameter_instantiation = field;
12902 }
12903 pub fn with_type_parameter_instantiation(
12905 mut self,
12906 field: Vec<super::OpenSignatureBody>,
12907 ) -> Self {
12908 self.set_type_parameter_instantiation(field);
12909 self
12910 }
12911 pub fn type_parameter_opt_mut(&mut self) -> Option<&mut u32> {
12913 self.type_parameter.as_mut().map(|field| field as _)
12914 }
12915 pub fn type_parameter_mut(&mut self) -> &mut u32 {
12918 self.type_parameter.get_or_insert_default()
12919 }
12920 pub fn type_parameter_opt(&self) -> Option<u32> {
12922 self.type_parameter.as_ref().map(|field| *field)
12923 }
12924 pub fn set_type_parameter(&mut self, field: u32) {
12926 self.type_parameter = Some(field);
12927 }
12928 pub fn with_type_parameter(mut self, field: u32) -> Self {
12930 self.set_type_parameter(field);
12931 self
12932 }
12933 }
12934 impl super::Owner {
12935 pub const fn const_default() -> Self {
12936 Self {
12937 kind: None,
12938 address: None,
12939 version: None,
12940 }
12941 }
12942 #[doc(hidden)]
12943 pub fn default_instance() -> &'static Self {
12944 static DEFAULT: super::Owner = super::Owner::const_default();
12945 &DEFAULT
12946 }
12947 pub fn with_kind<T: Into<super::owner::OwnerKind>>(mut self, field: T) -> Self {
12949 self.set_kind(field.into());
12950 self
12951 }
12952 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
12954 self.address.as_mut().map(|field| field as _)
12955 }
12956 pub fn address_mut(&mut self) -> &mut String {
12959 self.address.get_or_insert_default()
12960 }
12961 pub fn address_opt(&self) -> Option<&str> {
12963 self.address.as_ref().map(|field| field as _)
12964 }
12965 pub fn set_address<T: Into<String>>(&mut self, field: T) {
12967 self.address = Some(field.into().into());
12968 }
12969 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
12971 self.set_address(field.into());
12972 self
12973 }
12974 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
12976 self.version.as_mut().map(|field| field as _)
12977 }
12978 pub fn version_mut(&mut self) -> &mut u64 {
12981 self.version.get_or_insert_default()
12982 }
12983 pub fn version_opt(&self) -> Option<u64> {
12985 self.version.as_ref().map(|field| *field)
12986 }
12987 pub fn set_version(&mut self, field: u64) {
12989 self.version = Some(field);
12990 }
12991 pub fn with_version(mut self, field: u64) -> Self {
12993 self.set_version(field);
12994 self
12995 }
12996 }
12997 impl super::Package {
12998 pub const fn const_default() -> Self {
12999 Self {
13000 storage_id: None,
13001 original_id: None,
13002 version: None,
13003 modules: Vec::new(),
13004 type_origins: Vec::new(),
13005 linkage: Vec::new(),
13006 }
13007 }
13008 #[doc(hidden)]
13009 pub fn default_instance() -> &'static Self {
13010 static DEFAULT: super::Package = super::Package::const_default();
13011 &DEFAULT
13012 }
13013 pub fn storage_id_opt_mut(&mut self) -> Option<&mut String> {
13015 self.storage_id.as_mut().map(|field| field as _)
13016 }
13017 pub fn storage_id_mut(&mut self) -> &mut String {
13020 self.storage_id.get_or_insert_default()
13021 }
13022 pub fn storage_id_opt(&self) -> Option<&str> {
13024 self.storage_id.as_ref().map(|field| field as _)
13025 }
13026 pub fn set_storage_id<T: Into<String>>(&mut self, field: T) {
13028 self.storage_id = Some(field.into().into());
13029 }
13030 pub fn with_storage_id<T: Into<String>>(mut self, field: T) -> Self {
13032 self.set_storage_id(field.into());
13033 self
13034 }
13035 pub fn original_id_opt_mut(&mut self) -> Option<&mut String> {
13037 self.original_id.as_mut().map(|field| field as _)
13038 }
13039 pub fn original_id_mut(&mut self) -> &mut String {
13042 self.original_id.get_or_insert_default()
13043 }
13044 pub fn original_id_opt(&self) -> Option<&str> {
13046 self.original_id.as_ref().map(|field| field as _)
13047 }
13048 pub fn set_original_id<T: Into<String>>(&mut self, field: T) {
13050 self.original_id = Some(field.into().into());
13051 }
13052 pub fn with_original_id<T: Into<String>>(mut self, field: T) -> Self {
13054 self.set_original_id(field.into());
13055 self
13056 }
13057 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
13059 self.version.as_mut().map(|field| field as _)
13060 }
13061 pub fn version_mut(&mut self) -> &mut u64 {
13064 self.version.get_or_insert_default()
13065 }
13066 pub fn version_opt(&self) -> Option<u64> {
13068 self.version.as_ref().map(|field| *field)
13069 }
13070 pub fn set_version(&mut self, field: u64) {
13072 self.version = Some(field);
13073 }
13074 pub fn with_version(mut self, field: u64) -> Self {
13076 self.set_version(field);
13077 self
13078 }
13079 pub fn modules(&self) -> &[super::Module] {
13081 &self.modules
13082 }
13083 pub fn modules_mut(&mut self) -> &mut Vec<super::Module> {
13086 &mut self.modules
13087 }
13088 pub fn set_modules(&mut self, field: Vec<super::Module>) {
13090 self.modules = field;
13091 }
13092 pub fn with_modules(mut self, field: Vec<super::Module>) -> Self {
13094 self.set_modules(field);
13095 self
13096 }
13097 pub fn type_origins(&self) -> &[super::TypeOrigin] {
13099 &self.type_origins
13100 }
13101 pub fn type_origins_mut(&mut self) -> &mut Vec<super::TypeOrigin> {
13104 &mut self.type_origins
13105 }
13106 pub fn set_type_origins(&mut self, field: Vec<super::TypeOrigin>) {
13108 self.type_origins = field;
13109 }
13110 pub fn with_type_origins(mut self, field: Vec<super::TypeOrigin>) -> Self {
13112 self.set_type_origins(field);
13113 self
13114 }
13115 pub fn linkage(&self) -> &[super::Linkage] {
13117 &self.linkage
13118 }
13119 pub fn linkage_mut(&mut self) -> &mut Vec<super::Linkage> {
13122 &mut self.linkage
13123 }
13124 pub fn set_linkage(&mut self, field: Vec<super::Linkage>) {
13126 self.linkage = field;
13127 }
13128 pub fn with_linkage(mut self, field: Vec<super::Linkage>) -> Self {
13130 self.set_linkage(field);
13131 self
13132 }
13133 }
13134 impl super::PackageUpgradeError {
13135 pub const fn const_default() -> Self {
13136 Self {
13137 kind: None,
13138 package_id: None,
13139 digest: None,
13140 policy: None,
13141 ticket_id: None,
13142 }
13143 }
13144 #[doc(hidden)]
13145 pub fn default_instance() -> &'static Self {
13146 static DEFAULT: super::PackageUpgradeError = super::PackageUpgradeError::const_default();
13147 &DEFAULT
13148 }
13149 pub fn with_kind<T: Into<super::package_upgrade_error::PackageUpgradeErrorKind>>(
13151 mut self,
13152 field: T,
13153 ) -> Self {
13154 self.set_kind(field.into());
13155 self
13156 }
13157 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
13159 self.package_id.as_mut().map(|field| field as _)
13160 }
13161 pub fn package_id_mut(&mut self) -> &mut String {
13164 self.package_id.get_or_insert_default()
13165 }
13166 pub fn package_id_opt(&self) -> Option<&str> {
13168 self.package_id.as_ref().map(|field| field as _)
13169 }
13170 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
13172 self.package_id = Some(field.into().into());
13173 }
13174 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
13176 self.set_package_id(field.into());
13177 self
13178 }
13179 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
13181 self.digest.as_mut().map(|field| field as _)
13182 }
13183 pub fn digest_mut(&mut self) -> &mut String {
13186 self.digest.get_or_insert_default()
13187 }
13188 pub fn digest_opt(&self) -> Option<&str> {
13190 self.digest.as_ref().map(|field| field as _)
13191 }
13192 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
13194 self.digest = Some(field.into().into());
13195 }
13196 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
13198 self.set_digest(field.into());
13199 self
13200 }
13201 pub fn policy_opt_mut(&mut self) -> Option<&mut u32> {
13203 self.policy.as_mut().map(|field| field as _)
13204 }
13205 pub fn policy_mut(&mut self) -> &mut u32 {
13208 self.policy.get_or_insert_default()
13209 }
13210 pub fn policy_opt(&self) -> Option<u32> {
13212 self.policy.as_ref().map(|field| *field)
13213 }
13214 pub fn set_policy(&mut self, field: u32) {
13216 self.policy = Some(field);
13217 }
13218 pub fn with_policy(mut self, field: u32) -> Self {
13220 self.set_policy(field);
13221 self
13222 }
13223 pub fn ticket_id_opt_mut(&mut self) -> Option<&mut String> {
13225 self.ticket_id.as_mut().map(|field| field as _)
13226 }
13227 pub fn ticket_id_mut(&mut self) -> &mut String {
13230 self.ticket_id.get_or_insert_default()
13231 }
13232 pub fn ticket_id_opt(&self) -> Option<&str> {
13234 self.ticket_id.as_ref().map(|field| field as _)
13235 }
13236 pub fn set_ticket_id<T: Into<String>>(&mut self, field: T) {
13238 self.ticket_id = Some(field.into().into());
13239 }
13240 pub fn with_ticket_id<T: Into<String>>(mut self, field: T) -> Self {
13242 self.set_ticket_id(field.into());
13243 self
13244 }
13245 }
13246 impl super::PackageVersion {
13247 pub const fn const_default() -> Self {
13248 Self {
13249 package_id: None,
13250 version: None,
13251 }
13252 }
13253 #[doc(hidden)]
13254 pub fn default_instance() -> &'static Self {
13255 static DEFAULT: super::PackageVersion = super::PackageVersion::const_default();
13256 &DEFAULT
13257 }
13258 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
13260 self.package_id.as_mut().map(|field| field as _)
13261 }
13262 pub fn package_id_mut(&mut self) -> &mut String {
13265 self.package_id.get_or_insert_default()
13266 }
13267 pub fn package_id_opt(&self) -> Option<&str> {
13269 self.package_id.as_ref().map(|field| field as _)
13270 }
13271 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
13273 self.package_id = Some(field.into().into());
13274 }
13275 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
13277 self.set_package_id(field.into());
13278 self
13279 }
13280 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
13282 self.version.as_mut().map(|field| field as _)
13283 }
13284 pub fn version_mut(&mut self) -> &mut u64 {
13287 self.version.get_or_insert_default()
13288 }
13289 pub fn version_opt(&self) -> Option<u64> {
13291 self.version.as_ref().map(|field| *field)
13292 }
13293 pub fn set_version(&mut self, field: u64) {
13295 self.version = Some(field);
13296 }
13297 pub fn with_version(mut self, field: u64) -> Self {
13299 self.set_version(field);
13300 self
13301 }
13302 }
13303 impl super::PackageWriteFilter {
13304 pub const fn const_default() -> Self {
13305 Self {}
13306 }
13307 #[doc(hidden)]
13308 pub fn default_instance() -> &'static Self {
13309 static DEFAULT: super::PackageWriteFilter = super::PackageWriteFilter::const_default();
13310 &DEFAULT
13311 }
13312 }
13313 impl super::PasskeyAuthenticator {
13314 pub const fn const_default() -> Self {
13315 Self {
13316 authenticator_data: None,
13317 client_data_json: None,
13318 signature: None,
13319 }
13320 }
13321 #[doc(hidden)]
13322 pub fn default_instance() -> &'static Self {
13323 static DEFAULT: super::PasskeyAuthenticator = super::PasskeyAuthenticator::const_default();
13324 &DEFAULT
13325 }
13326 pub fn authenticator_data_opt(&self) -> Option<&[u8]> {
13328 self.authenticator_data.as_ref().map(|field| field as _)
13329 }
13330 pub fn set_authenticator_data<T: Into<::prost::bytes::Bytes>>(
13332 &mut self,
13333 field: T,
13334 ) {
13335 self.authenticator_data = Some(field.into().into());
13336 }
13337 pub fn with_authenticator_data<T: Into<::prost::bytes::Bytes>>(
13339 mut self,
13340 field: T,
13341 ) -> Self {
13342 self.set_authenticator_data(field.into());
13343 self
13344 }
13345 pub fn client_data_json_opt_mut(&mut self) -> Option<&mut String> {
13347 self.client_data_json.as_mut().map(|field| field as _)
13348 }
13349 pub fn client_data_json_mut(&mut self) -> &mut String {
13352 self.client_data_json.get_or_insert_default()
13353 }
13354 pub fn client_data_json_opt(&self) -> Option<&str> {
13356 self.client_data_json.as_ref().map(|field| field as _)
13357 }
13358 pub fn set_client_data_json<T: Into<String>>(&mut self, field: T) {
13360 self.client_data_json = Some(field.into().into());
13361 }
13362 pub fn with_client_data_json<T: Into<String>>(mut self, field: T) -> Self {
13364 self.set_client_data_json(field.into());
13365 self
13366 }
13367 pub fn signature(&self) -> &super::SimpleSignature {
13369 self.signature
13370 .as_ref()
13371 .map(|field| field as _)
13372 .unwrap_or_else(|| super::SimpleSignature::default_instance() as _)
13373 }
13374 pub fn signature_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
13376 self.signature.as_mut().map(|field| field as _)
13377 }
13378 pub fn signature_mut(&mut self) -> &mut super::SimpleSignature {
13381 self.signature.get_or_insert_default()
13382 }
13383 pub fn signature_opt(&self) -> Option<&super::SimpleSignature> {
13385 self.signature.as_ref().map(|field| field as _)
13386 }
13387 pub fn set_signature<T: Into<super::SimpleSignature>>(&mut self, field: T) {
13389 self.signature = Some(field.into().into());
13390 }
13391 pub fn with_signature<T: Into<super::SimpleSignature>>(
13393 mut self,
13394 field: T,
13395 ) -> Self {
13396 self.set_signature(field.into());
13397 self
13398 }
13399 }
13400 impl super::ProgrammableTransaction {
13401 pub const fn const_default() -> Self {
13402 Self {
13403 inputs: Vec::new(),
13404 commands: Vec::new(),
13405 }
13406 }
13407 #[doc(hidden)]
13408 pub fn default_instance() -> &'static Self {
13409 static DEFAULT: super::ProgrammableTransaction = super::ProgrammableTransaction::const_default();
13410 &DEFAULT
13411 }
13412 pub fn inputs(&self) -> &[super::Input] {
13414 &self.inputs
13415 }
13416 pub fn inputs_mut(&mut self) -> &mut Vec<super::Input> {
13419 &mut self.inputs
13420 }
13421 pub fn set_inputs(&mut self, field: Vec<super::Input>) {
13423 self.inputs = field;
13424 }
13425 pub fn with_inputs(mut self, field: Vec<super::Input>) -> Self {
13427 self.set_inputs(field);
13428 self
13429 }
13430 pub fn commands(&self) -> &[super::Command] {
13432 &self.commands
13433 }
13434 pub fn commands_mut(&mut self) -> &mut Vec<super::Command> {
13437 &mut self.commands
13438 }
13439 pub fn set_commands(&mut self, field: Vec<super::Command>) {
13441 self.commands = field;
13442 }
13443 pub fn with_commands(mut self, field: Vec<super::Command>) -> Self {
13445 self.set_commands(field);
13446 self
13447 }
13448 }
13449 impl super::ProtocolConfig {
13450 pub const fn const_default() -> Self {
13451 Self {
13452 protocol_version: None,
13453 feature_flags: std::collections::BTreeMap::new(),
13454 attributes: std::collections::BTreeMap::new(),
13455 configs: std::collections::BTreeMap::new(),
13456 }
13457 }
13458 #[doc(hidden)]
13459 pub fn default_instance() -> &'static Self {
13460 static DEFAULT: super::ProtocolConfig = super::ProtocolConfig::const_default();
13461 &DEFAULT
13462 }
13463 pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
13465 self.protocol_version.as_mut().map(|field| field as _)
13466 }
13467 pub fn protocol_version_mut(&mut self) -> &mut u64 {
13470 self.protocol_version.get_or_insert_default()
13471 }
13472 pub fn protocol_version_opt(&self) -> Option<u64> {
13474 self.protocol_version.as_ref().map(|field| *field)
13475 }
13476 pub fn set_protocol_version(&mut self, field: u64) {
13478 self.protocol_version = Some(field);
13479 }
13480 pub fn with_protocol_version(mut self, field: u64) -> Self {
13482 self.set_protocol_version(field);
13483 self
13484 }
13485 pub fn feature_flags(&self) -> &::std::collections::BTreeMap<String, bool> {
13487 &self.feature_flags
13488 }
13489 pub fn feature_flags_mut(
13492 &mut self,
13493 ) -> &mut ::std::collections::BTreeMap<String, bool> {
13494 &mut self.feature_flags
13495 }
13496 pub fn set_feature_flags(
13498 &mut self,
13499 field: ::std::collections::BTreeMap<String, bool>,
13500 ) {
13501 self.feature_flags = field;
13502 }
13503 pub fn with_feature_flags(
13505 mut self,
13506 field: ::std::collections::BTreeMap<String, bool>,
13507 ) -> Self {
13508 self.set_feature_flags(field);
13509 self
13510 }
13511 pub fn attributes(&self) -> &::std::collections::BTreeMap<String, String> {
13513 &self.attributes
13514 }
13515 pub fn attributes_mut(
13518 &mut self,
13519 ) -> &mut ::std::collections::BTreeMap<String, String> {
13520 &mut self.attributes
13521 }
13522 pub fn set_attributes(
13524 &mut self,
13525 field: ::std::collections::BTreeMap<String, String>,
13526 ) {
13527 self.attributes = field;
13528 }
13529 pub fn with_attributes(
13531 mut self,
13532 field: ::std::collections::BTreeMap<String, String>,
13533 ) -> Self {
13534 self.set_attributes(field);
13535 self
13536 }
13537 pub fn configs(
13539 &self,
13540 ) -> &::std::collections::BTreeMap<String, ::prost_types::Value> {
13541 &self.configs
13542 }
13543 pub fn configs_mut(
13546 &mut self,
13547 ) -> &mut ::std::collections::BTreeMap<String, ::prost_types::Value> {
13548 &mut self.configs
13549 }
13550 pub fn set_configs(
13552 &mut self,
13553 field: ::std::collections::BTreeMap<String, ::prost_types::Value>,
13554 ) {
13555 self.configs = field;
13556 }
13557 pub fn with_configs(
13559 mut self,
13560 field: ::std::collections::BTreeMap<String, ::prost_types::Value>,
13561 ) -> Self {
13562 self.set_configs(field);
13563 self
13564 }
13565 }
13566 impl super::Publish {
13567 pub const fn const_default() -> Self {
13568 Self {
13569 modules: Vec::new(),
13570 dependencies: Vec::new(),
13571 }
13572 }
13573 #[doc(hidden)]
13574 pub fn default_instance() -> &'static Self {
13575 static DEFAULT: super::Publish = super::Publish::const_default();
13576 &DEFAULT
13577 }
13578 pub fn modules(&self) -> &[::prost::bytes::Bytes] {
13580 &self.modules
13581 }
13582 pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
13585 &mut self.modules
13586 }
13587 pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
13589 self.modules = field;
13590 }
13591 pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
13593 self.set_modules(field);
13594 self
13595 }
13596 pub fn dependencies(&self) -> &[String] {
13598 &self.dependencies
13599 }
13600 pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
13603 &mut self.dependencies
13604 }
13605 pub fn set_dependencies(&mut self, field: Vec<String>) {
13607 self.dependencies = field;
13608 }
13609 pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
13611 self.set_dependencies(field);
13612 self
13613 }
13614 }
13615 impl super::QueryEnd {
13616 pub const fn const_default() -> Self {
13617 Self { reason: None }
13618 }
13619 #[doc(hidden)]
13620 pub fn default_instance() -> &'static Self {
13621 static DEFAULT: super::QueryEnd = super::QueryEnd::const_default();
13622 &DEFAULT
13623 }
13624 pub fn with_reason<T: Into<super::QueryEndReason>>(mut self, field: T) -> Self {
13626 self.set_reason(field.into());
13627 self
13628 }
13629 }
13630 impl super::QueryOptions {
13631 pub const fn const_default() -> Self {
13632 Self {
13633 limit: None,
13634 after: None,
13635 before: None,
13636 ordering: None,
13637 }
13638 }
13639 #[doc(hidden)]
13640 pub fn default_instance() -> &'static Self {
13641 static DEFAULT: super::QueryOptions = super::QueryOptions::const_default();
13642 &DEFAULT
13643 }
13644 pub fn limit_opt_mut(&mut self) -> Option<&mut u32> {
13646 self.limit.as_mut().map(|field| field as _)
13647 }
13648 pub fn limit_mut(&mut self) -> &mut u32 {
13651 self.limit.get_or_insert_default()
13652 }
13653 pub fn limit_opt(&self) -> Option<u32> {
13655 self.limit.as_ref().map(|field| *field)
13656 }
13657 pub fn set_limit(&mut self, field: u32) {
13659 self.limit = Some(field);
13660 }
13661 pub fn with_limit(mut self, field: u32) -> Self {
13663 self.set_limit(field);
13664 self
13665 }
13666 pub fn after_opt(&self) -> Option<&[u8]> {
13668 self.after.as_ref().map(|field| field as _)
13669 }
13670 pub fn set_after<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
13672 self.after = Some(field.into().into());
13673 }
13674 pub fn with_after<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
13676 self.set_after(field.into());
13677 self
13678 }
13679 pub fn before_opt(&self) -> Option<&[u8]> {
13681 self.before.as_ref().map(|field| field as _)
13682 }
13683 pub fn set_before<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
13685 self.before = Some(field.into().into());
13686 }
13687 pub fn with_before<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
13689 self.set_before(field.into());
13690 self
13691 }
13692 pub fn with_ordering<T: Into<super::Ordering>>(mut self, field: T) -> Self {
13694 self.set_ordering(field.into());
13695 self
13696 }
13697 }
13698 impl super::RandomnessStateUpdate {
13699 pub const fn const_default() -> Self {
13700 Self {
13701 epoch: None,
13702 randomness_round: None,
13703 random_bytes: None,
13704 randomness_object_initial_shared_version: None,
13705 }
13706 }
13707 #[doc(hidden)]
13708 pub fn default_instance() -> &'static Self {
13709 static DEFAULT: super::RandomnessStateUpdate = super::RandomnessStateUpdate::const_default();
13710 &DEFAULT
13711 }
13712 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
13714 self.epoch.as_mut().map(|field| field as _)
13715 }
13716 pub fn epoch_mut(&mut self) -> &mut u64 {
13719 self.epoch.get_or_insert_default()
13720 }
13721 pub fn epoch_opt(&self) -> Option<u64> {
13723 self.epoch.as_ref().map(|field| *field)
13724 }
13725 pub fn set_epoch(&mut self, field: u64) {
13727 self.epoch = Some(field);
13728 }
13729 pub fn with_epoch(mut self, field: u64) -> Self {
13731 self.set_epoch(field);
13732 self
13733 }
13734 pub fn randomness_round_opt_mut(&mut self) -> Option<&mut u64> {
13736 self.randomness_round.as_mut().map(|field| field as _)
13737 }
13738 pub fn randomness_round_mut(&mut self) -> &mut u64 {
13741 self.randomness_round.get_or_insert_default()
13742 }
13743 pub fn randomness_round_opt(&self) -> Option<u64> {
13745 self.randomness_round.as_ref().map(|field| *field)
13746 }
13747 pub fn set_randomness_round(&mut self, field: u64) {
13749 self.randomness_round = Some(field);
13750 }
13751 pub fn with_randomness_round(mut self, field: u64) -> Self {
13753 self.set_randomness_round(field);
13754 self
13755 }
13756 pub fn random_bytes_opt(&self) -> Option<&[u8]> {
13758 self.random_bytes.as_ref().map(|field| field as _)
13759 }
13760 pub fn set_random_bytes<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
13762 self.random_bytes = Some(field.into().into());
13763 }
13764 pub fn with_random_bytes<T: Into<::prost::bytes::Bytes>>(
13766 mut self,
13767 field: T,
13768 ) -> Self {
13769 self.set_random_bytes(field.into());
13770 self
13771 }
13772 pub fn randomness_object_initial_shared_version_opt_mut(
13774 &mut self,
13775 ) -> Option<&mut u64> {
13776 self.randomness_object_initial_shared_version
13777 .as_mut()
13778 .map(|field| field as _)
13779 }
13780 pub fn randomness_object_initial_shared_version_mut(&mut self) -> &mut u64 {
13783 self.randomness_object_initial_shared_version.get_or_insert_default()
13784 }
13785 pub fn randomness_object_initial_shared_version_opt(&self) -> Option<u64> {
13787 self.randomness_object_initial_shared_version.as_ref().map(|field| *field)
13788 }
13789 pub fn set_randomness_object_initial_shared_version(&mut self, field: u64) {
13791 self.randomness_object_initial_shared_version = Some(field);
13792 }
13793 pub fn with_randomness_object_initial_shared_version(
13795 mut self,
13796 field: u64,
13797 ) -> Self {
13798 self.set_randomness_object_initial_shared_version(field);
13799 self
13800 }
13801 }
13802 impl super::RegulatedCoinMetadata {
13803 pub const fn const_default() -> Self {
13804 Self {
13805 id: None,
13806 coin_metadata_object: None,
13807 deny_cap_object: None,
13808 allow_global_pause: None,
13809 variant: None,
13810 coin_regulated_state: None,
13811 }
13812 }
13813 #[doc(hidden)]
13814 pub fn default_instance() -> &'static Self {
13815 static DEFAULT: super::RegulatedCoinMetadata = super::RegulatedCoinMetadata::const_default();
13816 &DEFAULT
13817 }
13818 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
13820 self.id.as_mut().map(|field| field as _)
13821 }
13822 pub fn id_mut(&mut self) -> &mut String {
13825 self.id.get_or_insert_default()
13826 }
13827 pub fn id_opt(&self) -> Option<&str> {
13829 self.id.as_ref().map(|field| field as _)
13830 }
13831 pub fn set_id<T: Into<String>>(&mut self, field: T) {
13833 self.id = Some(field.into().into());
13834 }
13835 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
13837 self.set_id(field.into());
13838 self
13839 }
13840 pub fn coin_metadata_object_opt_mut(&mut self) -> Option<&mut String> {
13842 self.coin_metadata_object.as_mut().map(|field| field as _)
13843 }
13844 pub fn coin_metadata_object_mut(&mut self) -> &mut String {
13847 self.coin_metadata_object.get_or_insert_default()
13848 }
13849 pub fn coin_metadata_object_opt(&self) -> Option<&str> {
13851 self.coin_metadata_object.as_ref().map(|field| field as _)
13852 }
13853 pub fn set_coin_metadata_object<T: Into<String>>(&mut self, field: T) {
13855 self.coin_metadata_object = Some(field.into().into());
13856 }
13857 pub fn with_coin_metadata_object<T: Into<String>>(mut self, field: T) -> Self {
13859 self.set_coin_metadata_object(field.into());
13860 self
13861 }
13862 pub fn deny_cap_object_opt_mut(&mut self) -> Option<&mut String> {
13864 self.deny_cap_object.as_mut().map(|field| field as _)
13865 }
13866 pub fn deny_cap_object_mut(&mut self) -> &mut String {
13869 self.deny_cap_object.get_or_insert_default()
13870 }
13871 pub fn deny_cap_object_opt(&self) -> Option<&str> {
13873 self.deny_cap_object.as_ref().map(|field| field as _)
13874 }
13875 pub fn set_deny_cap_object<T: Into<String>>(&mut self, field: T) {
13877 self.deny_cap_object = Some(field.into().into());
13878 }
13879 pub fn with_deny_cap_object<T: Into<String>>(mut self, field: T) -> Self {
13881 self.set_deny_cap_object(field.into());
13882 self
13883 }
13884 pub fn allow_global_pause_opt_mut(&mut self) -> Option<&mut bool> {
13886 self.allow_global_pause.as_mut().map(|field| field as _)
13887 }
13888 pub fn allow_global_pause_mut(&mut self) -> &mut bool {
13891 self.allow_global_pause.get_or_insert_default()
13892 }
13893 pub fn allow_global_pause_opt(&self) -> Option<bool> {
13895 self.allow_global_pause.as_ref().map(|field| *field)
13896 }
13897 pub fn set_allow_global_pause(&mut self, field: bool) {
13899 self.allow_global_pause = Some(field);
13900 }
13901 pub fn with_allow_global_pause(mut self, field: bool) -> Self {
13903 self.set_allow_global_pause(field);
13904 self
13905 }
13906 pub fn variant_opt_mut(&mut self) -> Option<&mut u32> {
13908 self.variant.as_mut().map(|field| field as _)
13909 }
13910 pub fn variant_mut(&mut self) -> &mut u32 {
13913 self.variant.get_or_insert_default()
13914 }
13915 pub fn variant_opt(&self) -> Option<u32> {
13917 self.variant.as_ref().map(|field| *field)
13918 }
13919 pub fn set_variant(&mut self, field: u32) {
13921 self.variant = Some(field);
13922 }
13923 pub fn with_variant(mut self, field: u32) -> Self {
13925 self.set_variant(field);
13926 self
13927 }
13928 pub fn with_coin_regulated_state<
13930 T: Into<super::regulated_coin_metadata::CoinRegulatedState>,
13931 >(mut self, field: T) -> Self {
13932 self.set_coin_regulated_state(field.into());
13933 self
13934 }
13935 }
13936 impl super::ReverseLookupNameRequest {
13937 pub const fn const_default() -> Self {
13938 Self { address: None }
13939 }
13940 #[doc(hidden)]
13941 pub fn default_instance() -> &'static Self {
13942 static DEFAULT: super::ReverseLookupNameRequest = super::ReverseLookupNameRequest::const_default();
13943 &DEFAULT
13944 }
13945 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
13947 self.address.as_mut().map(|field| field as _)
13948 }
13949 pub fn address_mut(&mut self) -> &mut String {
13952 self.address.get_or_insert_default()
13953 }
13954 pub fn address_opt(&self) -> Option<&str> {
13956 self.address.as_ref().map(|field| field as _)
13957 }
13958 pub fn set_address<T: Into<String>>(&mut self, field: T) {
13960 self.address = Some(field.into().into());
13961 }
13962 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
13964 self.set_address(field.into());
13965 self
13966 }
13967 }
13968 impl super::ReverseLookupNameResponse {
13969 pub const fn const_default() -> Self {
13970 Self { record: None }
13971 }
13972 #[doc(hidden)]
13973 pub fn default_instance() -> &'static Self {
13974 static DEFAULT: super::ReverseLookupNameResponse = super::ReverseLookupNameResponse::const_default();
13975 &DEFAULT
13976 }
13977 pub fn record(&self) -> &super::NameRecord {
13979 self.record
13980 .as_ref()
13981 .map(|field| field as _)
13982 .unwrap_or_else(|| super::NameRecord::default_instance() as _)
13983 }
13984 pub fn record_opt_mut(&mut self) -> Option<&mut super::NameRecord> {
13986 self.record.as_mut().map(|field| field as _)
13987 }
13988 pub fn record_mut(&mut self) -> &mut super::NameRecord {
13991 self.record.get_or_insert_default()
13992 }
13993 pub fn record_opt(&self) -> Option<&super::NameRecord> {
13995 self.record.as_ref().map(|field| field as _)
13996 }
13997 pub fn set_record<T: Into<super::NameRecord>>(&mut self, field: T) {
13999 self.record = Some(field.into().into());
14000 }
14001 pub fn with_record<T: Into<super::NameRecord>>(mut self, field: T) -> Self {
14003 self.set_record(field.into());
14004 self
14005 }
14006 }
14007 impl super::SenderFilter {
14008 pub const fn const_default() -> Self {
14009 Self { address: None }
14010 }
14011 #[doc(hidden)]
14012 pub fn default_instance() -> &'static Self {
14013 static DEFAULT: super::SenderFilter = super::SenderFilter::const_default();
14014 &DEFAULT
14015 }
14016 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
14018 self.address.as_mut().map(|field| field as _)
14019 }
14020 pub fn address_mut(&mut self) -> &mut String {
14023 self.address.get_or_insert_default()
14024 }
14025 pub fn address_opt(&self) -> Option<&str> {
14027 self.address.as_ref().map(|field| field as _)
14028 }
14029 pub fn set_address<T: Into<String>>(&mut self, field: T) {
14031 self.address = Some(field.into().into());
14032 }
14033 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
14035 self.set_address(field.into());
14036 self
14037 }
14038 }
14039 impl super::SimpleSignature {
14040 pub const fn const_default() -> Self {
14041 Self {
14042 scheme: None,
14043 signature: None,
14044 public_key: None,
14045 }
14046 }
14047 #[doc(hidden)]
14048 pub fn default_instance() -> &'static Self {
14049 static DEFAULT: super::SimpleSignature = super::SimpleSignature::const_default();
14050 &DEFAULT
14051 }
14052 pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
14054 self.set_scheme(field.into());
14055 self
14056 }
14057 pub fn signature_opt(&self) -> Option<&[u8]> {
14059 self.signature.as_ref().map(|field| field as _)
14060 }
14061 pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
14063 self.signature = Some(field.into().into());
14064 }
14065 pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
14067 mut self,
14068 field: T,
14069 ) -> Self {
14070 self.set_signature(field.into());
14071 self
14072 }
14073 pub fn public_key_opt(&self) -> Option<&[u8]> {
14075 self.public_key.as_ref().map(|field| field as _)
14076 }
14077 pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
14079 self.public_key = Some(field.into().into());
14080 }
14081 pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
14083 mut self,
14084 field: T,
14085 ) -> Self {
14086 self.set_public_key(field.into());
14087 self
14088 }
14089 }
14090 impl super::SimulateTransactionRequest {
14091 pub const fn const_default() -> Self {
14092 Self {
14093 transaction: None,
14094 read_mask: None,
14095 checks: None,
14096 do_gas_selection: None,
14097 }
14098 }
14099 #[doc(hidden)]
14100 pub fn default_instance() -> &'static Self {
14101 static DEFAULT: super::SimulateTransactionRequest = super::SimulateTransactionRequest::const_default();
14102 &DEFAULT
14103 }
14104 pub fn transaction(&self) -> &super::Transaction {
14106 self.transaction
14107 .as_ref()
14108 .map(|field| field as _)
14109 .unwrap_or_else(|| super::Transaction::default_instance() as _)
14110 }
14111 pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
14113 self.transaction.as_mut().map(|field| field as _)
14114 }
14115 pub fn transaction_mut(&mut self) -> &mut super::Transaction {
14118 self.transaction.get_or_insert_default()
14119 }
14120 pub fn transaction_opt(&self) -> Option<&super::Transaction> {
14122 self.transaction.as_ref().map(|field| field as _)
14123 }
14124 pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
14126 self.transaction = Some(field.into().into());
14127 }
14128 pub fn with_transaction<T: Into<super::Transaction>>(
14130 mut self,
14131 field: T,
14132 ) -> Self {
14133 self.set_transaction(field.into());
14134 self
14135 }
14136 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
14138 self.read_mask.as_mut().map(|field| field as _)
14139 }
14140 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
14143 self.read_mask.get_or_insert_default()
14144 }
14145 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
14147 self.read_mask.as_ref().map(|field| field as _)
14148 }
14149 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
14151 self.read_mask = Some(field.into().into());
14152 }
14153 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
14155 mut self,
14156 field: T,
14157 ) -> Self {
14158 self.set_read_mask(field.into());
14159 self
14160 }
14161 pub fn with_checks<
14163 T: Into<super::simulate_transaction_request::TransactionChecks>,
14164 >(mut self, field: T) -> Self {
14165 self.set_checks(field.into());
14166 self
14167 }
14168 pub fn do_gas_selection_opt_mut(&mut self) -> Option<&mut bool> {
14170 self.do_gas_selection.as_mut().map(|field| field as _)
14171 }
14172 pub fn do_gas_selection_mut(&mut self) -> &mut bool {
14175 self.do_gas_selection.get_or_insert_default()
14176 }
14177 pub fn do_gas_selection_opt(&self) -> Option<bool> {
14179 self.do_gas_selection.as_ref().map(|field| *field)
14180 }
14181 pub fn set_do_gas_selection(&mut self, field: bool) {
14183 self.do_gas_selection = Some(field);
14184 }
14185 pub fn with_do_gas_selection(mut self, field: bool) -> Self {
14187 self.set_do_gas_selection(field);
14188 self
14189 }
14190 }
14191 impl super::SimulateTransactionResponse {
14192 pub const fn const_default() -> Self {
14193 Self {
14194 transaction: None,
14195 command_outputs: Vec::new(),
14196 suggested_gas_price: None,
14197 }
14198 }
14199 #[doc(hidden)]
14200 pub fn default_instance() -> &'static Self {
14201 static DEFAULT: super::SimulateTransactionResponse = super::SimulateTransactionResponse::const_default();
14202 &DEFAULT
14203 }
14204 pub fn transaction(&self) -> &super::ExecutedTransaction {
14206 self.transaction
14207 .as_ref()
14208 .map(|field| field as _)
14209 .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
14210 }
14211 pub fn transaction_opt_mut(
14213 &mut self,
14214 ) -> Option<&mut super::ExecutedTransaction> {
14215 self.transaction.as_mut().map(|field| field as _)
14216 }
14217 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
14220 self.transaction.get_or_insert_default()
14221 }
14222 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
14224 self.transaction.as_ref().map(|field| field as _)
14225 }
14226 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
14228 &mut self,
14229 field: T,
14230 ) {
14231 self.transaction = Some(field.into().into());
14232 }
14233 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
14235 mut self,
14236 field: T,
14237 ) -> Self {
14238 self.set_transaction(field.into());
14239 self
14240 }
14241 pub fn command_outputs(&self) -> &[super::CommandResult] {
14243 &self.command_outputs
14244 }
14245 pub fn command_outputs_mut(&mut self) -> &mut Vec<super::CommandResult> {
14248 &mut self.command_outputs
14249 }
14250 pub fn set_command_outputs(&mut self, field: Vec<super::CommandResult>) {
14252 self.command_outputs = field;
14253 }
14254 pub fn with_command_outputs(mut self, field: Vec<super::CommandResult>) -> Self {
14256 self.set_command_outputs(field);
14257 self
14258 }
14259 pub fn suggested_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
14261 self.suggested_gas_price.as_mut().map(|field| field as _)
14262 }
14263 pub fn suggested_gas_price_mut(&mut self) -> &mut u64 {
14266 self.suggested_gas_price.get_or_insert_default()
14267 }
14268 pub fn suggested_gas_price_opt(&self) -> Option<u64> {
14270 self.suggested_gas_price.as_ref().map(|field| *field)
14271 }
14272 pub fn set_suggested_gas_price(&mut self, field: u64) {
14274 self.suggested_gas_price = Some(field);
14275 }
14276 pub fn with_suggested_gas_price(mut self, field: u64) -> Self {
14278 self.set_suggested_gas_price(field);
14279 self
14280 }
14281 }
14282 impl super::SizeError {
14283 pub const fn const_default() -> Self {
14284 Self { size: None, max_size: None }
14285 }
14286 #[doc(hidden)]
14287 pub fn default_instance() -> &'static Self {
14288 static DEFAULT: super::SizeError = super::SizeError::const_default();
14289 &DEFAULT
14290 }
14291 pub fn size_opt_mut(&mut self) -> Option<&mut u64> {
14293 self.size.as_mut().map(|field| field as _)
14294 }
14295 pub fn size_mut(&mut self) -> &mut u64 {
14298 self.size.get_or_insert_default()
14299 }
14300 pub fn size_opt(&self) -> Option<u64> {
14302 self.size.as_ref().map(|field| *field)
14303 }
14304 pub fn set_size(&mut self, field: u64) {
14306 self.size = Some(field);
14307 }
14308 pub fn with_size(mut self, field: u64) -> Self {
14310 self.set_size(field);
14311 self
14312 }
14313 pub fn max_size_opt_mut(&mut self) -> Option<&mut u64> {
14315 self.max_size.as_mut().map(|field| field as _)
14316 }
14317 pub fn max_size_mut(&mut self) -> &mut u64 {
14320 self.max_size.get_or_insert_default()
14321 }
14322 pub fn max_size_opt(&self) -> Option<u64> {
14324 self.max_size.as_ref().map(|field| *field)
14325 }
14326 pub fn set_max_size(&mut self, field: u64) {
14328 self.max_size = Some(field);
14329 }
14330 pub fn with_max_size(mut self, field: u64) -> Self {
14332 self.set_max_size(field);
14333 self
14334 }
14335 }
14336 impl super::SplitCoins {
14337 pub const fn const_default() -> Self {
14338 Self {
14339 coin: None,
14340 amounts: Vec::new(),
14341 }
14342 }
14343 #[doc(hidden)]
14344 pub fn default_instance() -> &'static Self {
14345 static DEFAULT: super::SplitCoins = super::SplitCoins::const_default();
14346 &DEFAULT
14347 }
14348 pub fn coin(&self) -> &super::Argument {
14350 self.coin
14351 .as_ref()
14352 .map(|field| field as _)
14353 .unwrap_or_else(|| super::Argument::default_instance() as _)
14354 }
14355 pub fn coin_opt_mut(&mut self) -> Option<&mut super::Argument> {
14357 self.coin.as_mut().map(|field| field as _)
14358 }
14359 pub fn coin_mut(&mut self) -> &mut super::Argument {
14362 self.coin.get_or_insert_default()
14363 }
14364 pub fn coin_opt(&self) -> Option<&super::Argument> {
14366 self.coin.as_ref().map(|field| field as _)
14367 }
14368 pub fn set_coin<T: Into<super::Argument>>(&mut self, field: T) {
14370 self.coin = Some(field.into().into());
14371 }
14372 pub fn with_coin<T: Into<super::Argument>>(mut self, field: T) -> Self {
14374 self.set_coin(field.into());
14375 self
14376 }
14377 pub fn amounts(&self) -> &[super::Argument] {
14379 &self.amounts
14380 }
14381 pub fn amounts_mut(&mut self) -> &mut Vec<super::Argument> {
14384 &mut self.amounts
14385 }
14386 pub fn set_amounts(&mut self, field: Vec<super::Argument>) {
14388 self.amounts = field;
14389 }
14390 pub fn with_amounts(mut self, field: Vec<super::Argument>) -> Self {
14392 self.set_amounts(field);
14393 self
14394 }
14395 }
14396 impl super::StakeSubsidy {
14397 pub const fn const_default() -> Self {
14398 Self {
14399 balance: None,
14400 distribution_counter: None,
14401 current_distribution_amount: None,
14402 stake_subsidy_period_length: None,
14403 stake_subsidy_decrease_rate: None,
14404 extra_fields: None,
14405 }
14406 }
14407 #[doc(hidden)]
14408 pub fn default_instance() -> &'static Self {
14409 static DEFAULT: super::StakeSubsidy = super::StakeSubsidy::const_default();
14410 &DEFAULT
14411 }
14412 pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
14414 self.balance.as_mut().map(|field| field as _)
14415 }
14416 pub fn balance_mut(&mut self) -> &mut u64 {
14419 self.balance.get_or_insert_default()
14420 }
14421 pub fn balance_opt(&self) -> Option<u64> {
14423 self.balance.as_ref().map(|field| *field)
14424 }
14425 pub fn set_balance(&mut self, field: u64) {
14427 self.balance = Some(field);
14428 }
14429 pub fn with_balance(mut self, field: u64) -> Self {
14431 self.set_balance(field);
14432 self
14433 }
14434 pub fn distribution_counter_opt_mut(&mut self) -> Option<&mut u64> {
14436 self.distribution_counter.as_mut().map(|field| field as _)
14437 }
14438 pub fn distribution_counter_mut(&mut self) -> &mut u64 {
14441 self.distribution_counter.get_or_insert_default()
14442 }
14443 pub fn distribution_counter_opt(&self) -> Option<u64> {
14445 self.distribution_counter.as_ref().map(|field| *field)
14446 }
14447 pub fn set_distribution_counter(&mut self, field: u64) {
14449 self.distribution_counter = Some(field);
14450 }
14451 pub fn with_distribution_counter(mut self, field: u64) -> Self {
14453 self.set_distribution_counter(field);
14454 self
14455 }
14456 pub fn current_distribution_amount_opt_mut(&mut self) -> Option<&mut u64> {
14458 self.current_distribution_amount.as_mut().map(|field| field as _)
14459 }
14460 pub fn current_distribution_amount_mut(&mut self) -> &mut u64 {
14463 self.current_distribution_amount.get_or_insert_default()
14464 }
14465 pub fn current_distribution_amount_opt(&self) -> Option<u64> {
14467 self.current_distribution_amount.as_ref().map(|field| *field)
14468 }
14469 pub fn set_current_distribution_amount(&mut self, field: u64) {
14471 self.current_distribution_amount = Some(field);
14472 }
14473 pub fn with_current_distribution_amount(mut self, field: u64) -> Self {
14475 self.set_current_distribution_amount(field);
14476 self
14477 }
14478 pub fn stake_subsidy_period_length_opt_mut(&mut self) -> Option<&mut u64> {
14480 self.stake_subsidy_period_length.as_mut().map(|field| field as _)
14481 }
14482 pub fn stake_subsidy_period_length_mut(&mut self) -> &mut u64 {
14485 self.stake_subsidy_period_length.get_or_insert_default()
14486 }
14487 pub fn stake_subsidy_period_length_opt(&self) -> Option<u64> {
14489 self.stake_subsidy_period_length.as_ref().map(|field| *field)
14490 }
14491 pub fn set_stake_subsidy_period_length(&mut self, field: u64) {
14493 self.stake_subsidy_period_length = Some(field);
14494 }
14495 pub fn with_stake_subsidy_period_length(mut self, field: u64) -> Self {
14497 self.set_stake_subsidy_period_length(field);
14498 self
14499 }
14500 pub fn stake_subsidy_decrease_rate_opt_mut(&mut self) -> Option<&mut u32> {
14502 self.stake_subsidy_decrease_rate.as_mut().map(|field| field as _)
14503 }
14504 pub fn stake_subsidy_decrease_rate_mut(&mut self) -> &mut u32 {
14507 self.stake_subsidy_decrease_rate.get_or_insert_default()
14508 }
14509 pub fn stake_subsidy_decrease_rate_opt(&self) -> Option<u32> {
14511 self.stake_subsidy_decrease_rate.as_ref().map(|field| *field)
14512 }
14513 pub fn set_stake_subsidy_decrease_rate(&mut self, field: u32) {
14515 self.stake_subsidy_decrease_rate = Some(field);
14516 }
14517 pub fn with_stake_subsidy_decrease_rate(mut self, field: u32) -> Self {
14519 self.set_stake_subsidy_decrease_rate(field);
14520 self
14521 }
14522 pub fn extra_fields(&self) -> &super::MoveTable {
14524 self.extra_fields
14525 .as_ref()
14526 .map(|field| field as _)
14527 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
14528 }
14529 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
14531 self.extra_fields.as_mut().map(|field| field as _)
14532 }
14533 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
14536 self.extra_fields.get_or_insert_default()
14537 }
14538 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
14540 self.extra_fields.as_ref().map(|field| field as _)
14541 }
14542 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
14544 self.extra_fields = Some(field.into().into());
14545 }
14546 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
14548 self.set_extra_fields(field.into());
14549 self
14550 }
14551 }
14552 impl super::StakingPool {
14553 pub const fn const_default() -> Self {
14554 Self {
14555 id: None,
14556 activation_epoch: None,
14557 deactivation_epoch: None,
14558 sui_balance: None,
14559 rewards_pool: None,
14560 pool_token_balance: None,
14561 exchange_rates: None,
14562 pending_stake: None,
14563 pending_total_sui_withdraw: None,
14564 pending_pool_token_withdraw: None,
14565 extra_fields: None,
14566 }
14567 }
14568 #[doc(hidden)]
14569 pub fn default_instance() -> &'static Self {
14570 static DEFAULT: super::StakingPool = super::StakingPool::const_default();
14571 &DEFAULT
14572 }
14573 pub fn id_opt_mut(&mut self) -> Option<&mut String> {
14575 self.id.as_mut().map(|field| field as _)
14576 }
14577 pub fn id_mut(&mut self) -> &mut String {
14580 self.id.get_or_insert_default()
14581 }
14582 pub fn id_opt(&self) -> Option<&str> {
14584 self.id.as_ref().map(|field| field as _)
14585 }
14586 pub fn set_id<T: Into<String>>(&mut self, field: T) {
14588 self.id = Some(field.into().into());
14589 }
14590 pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
14592 self.set_id(field.into());
14593 self
14594 }
14595 pub fn activation_epoch_opt_mut(&mut self) -> Option<&mut u64> {
14597 self.activation_epoch.as_mut().map(|field| field as _)
14598 }
14599 pub fn activation_epoch_mut(&mut self) -> &mut u64 {
14602 self.activation_epoch.get_or_insert_default()
14603 }
14604 pub fn activation_epoch_opt(&self) -> Option<u64> {
14606 self.activation_epoch.as_ref().map(|field| *field)
14607 }
14608 pub fn set_activation_epoch(&mut self, field: u64) {
14610 self.activation_epoch = Some(field);
14611 }
14612 pub fn with_activation_epoch(mut self, field: u64) -> Self {
14614 self.set_activation_epoch(field);
14615 self
14616 }
14617 pub fn deactivation_epoch_opt_mut(&mut self) -> Option<&mut u64> {
14619 self.deactivation_epoch.as_mut().map(|field| field as _)
14620 }
14621 pub fn deactivation_epoch_mut(&mut self) -> &mut u64 {
14624 self.deactivation_epoch.get_or_insert_default()
14625 }
14626 pub fn deactivation_epoch_opt(&self) -> Option<u64> {
14628 self.deactivation_epoch.as_ref().map(|field| *field)
14629 }
14630 pub fn set_deactivation_epoch(&mut self, field: u64) {
14632 self.deactivation_epoch = Some(field);
14633 }
14634 pub fn with_deactivation_epoch(mut self, field: u64) -> Self {
14636 self.set_deactivation_epoch(field);
14637 self
14638 }
14639 pub fn sui_balance_opt_mut(&mut self) -> Option<&mut u64> {
14641 self.sui_balance.as_mut().map(|field| field as _)
14642 }
14643 pub fn sui_balance_mut(&mut self) -> &mut u64 {
14646 self.sui_balance.get_or_insert_default()
14647 }
14648 pub fn sui_balance_opt(&self) -> Option<u64> {
14650 self.sui_balance.as_ref().map(|field| *field)
14651 }
14652 pub fn set_sui_balance(&mut self, field: u64) {
14654 self.sui_balance = Some(field);
14655 }
14656 pub fn with_sui_balance(mut self, field: u64) -> Self {
14658 self.set_sui_balance(field);
14659 self
14660 }
14661 pub fn rewards_pool_opt_mut(&mut self) -> Option<&mut u64> {
14663 self.rewards_pool.as_mut().map(|field| field as _)
14664 }
14665 pub fn rewards_pool_mut(&mut self) -> &mut u64 {
14668 self.rewards_pool.get_or_insert_default()
14669 }
14670 pub fn rewards_pool_opt(&self) -> Option<u64> {
14672 self.rewards_pool.as_ref().map(|field| *field)
14673 }
14674 pub fn set_rewards_pool(&mut self, field: u64) {
14676 self.rewards_pool = Some(field);
14677 }
14678 pub fn with_rewards_pool(mut self, field: u64) -> Self {
14680 self.set_rewards_pool(field);
14681 self
14682 }
14683 pub fn pool_token_balance_opt_mut(&mut self) -> Option<&mut u64> {
14685 self.pool_token_balance.as_mut().map(|field| field as _)
14686 }
14687 pub fn pool_token_balance_mut(&mut self) -> &mut u64 {
14690 self.pool_token_balance.get_or_insert_default()
14691 }
14692 pub fn pool_token_balance_opt(&self) -> Option<u64> {
14694 self.pool_token_balance.as_ref().map(|field| *field)
14695 }
14696 pub fn set_pool_token_balance(&mut self, field: u64) {
14698 self.pool_token_balance = Some(field);
14699 }
14700 pub fn with_pool_token_balance(mut self, field: u64) -> Self {
14702 self.set_pool_token_balance(field);
14703 self
14704 }
14705 pub fn exchange_rates(&self) -> &super::MoveTable {
14707 self.exchange_rates
14708 .as_ref()
14709 .map(|field| field as _)
14710 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
14711 }
14712 pub fn exchange_rates_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
14714 self.exchange_rates.as_mut().map(|field| field as _)
14715 }
14716 pub fn exchange_rates_mut(&mut self) -> &mut super::MoveTable {
14719 self.exchange_rates.get_or_insert_default()
14720 }
14721 pub fn exchange_rates_opt(&self) -> Option<&super::MoveTable> {
14723 self.exchange_rates.as_ref().map(|field| field as _)
14724 }
14725 pub fn set_exchange_rates<T: Into<super::MoveTable>>(&mut self, field: T) {
14727 self.exchange_rates = Some(field.into().into());
14728 }
14729 pub fn with_exchange_rates<T: Into<super::MoveTable>>(
14731 mut self,
14732 field: T,
14733 ) -> Self {
14734 self.set_exchange_rates(field.into());
14735 self
14736 }
14737 pub fn pending_stake_opt_mut(&mut self) -> Option<&mut u64> {
14739 self.pending_stake.as_mut().map(|field| field as _)
14740 }
14741 pub fn pending_stake_mut(&mut self) -> &mut u64 {
14744 self.pending_stake.get_or_insert_default()
14745 }
14746 pub fn pending_stake_opt(&self) -> Option<u64> {
14748 self.pending_stake.as_ref().map(|field| *field)
14749 }
14750 pub fn set_pending_stake(&mut self, field: u64) {
14752 self.pending_stake = Some(field);
14753 }
14754 pub fn with_pending_stake(mut self, field: u64) -> Self {
14756 self.set_pending_stake(field);
14757 self
14758 }
14759 pub fn pending_total_sui_withdraw_opt_mut(&mut self) -> Option<&mut u64> {
14761 self.pending_total_sui_withdraw.as_mut().map(|field| field as _)
14762 }
14763 pub fn pending_total_sui_withdraw_mut(&mut self) -> &mut u64 {
14766 self.pending_total_sui_withdraw.get_or_insert_default()
14767 }
14768 pub fn pending_total_sui_withdraw_opt(&self) -> Option<u64> {
14770 self.pending_total_sui_withdraw.as_ref().map(|field| *field)
14771 }
14772 pub fn set_pending_total_sui_withdraw(&mut self, field: u64) {
14774 self.pending_total_sui_withdraw = Some(field);
14775 }
14776 pub fn with_pending_total_sui_withdraw(mut self, field: u64) -> Self {
14778 self.set_pending_total_sui_withdraw(field);
14779 self
14780 }
14781 pub fn pending_pool_token_withdraw_opt_mut(&mut self) -> Option<&mut u64> {
14783 self.pending_pool_token_withdraw.as_mut().map(|field| field as _)
14784 }
14785 pub fn pending_pool_token_withdraw_mut(&mut self) -> &mut u64 {
14788 self.pending_pool_token_withdraw.get_or_insert_default()
14789 }
14790 pub fn pending_pool_token_withdraw_opt(&self) -> Option<u64> {
14792 self.pending_pool_token_withdraw.as_ref().map(|field| *field)
14793 }
14794 pub fn set_pending_pool_token_withdraw(&mut self, field: u64) {
14796 self.pending_pool_token_withdraw = Some(field);
14797 }
14798 pub fn with_pending_pool_token_withdraw(mut self, field: u64) -> Self {
14800 self.set_pending_pool_token_withdraw(field);
14801 self
14802 }
14803 pub fn extra_fields(&self) -> &super::MoveTable {
14805 self.extra_fields
14806 .as_ref()
14807 .map(|field| field as _)
14808 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
14809 }
14810 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
14812 self.extra_fields.as_mut().map(|field| field as _)
14813 }
14814 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
14817 self.extra_fields.get_or_insert_default()
14818 }
14819 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
14821 self.extra_fields.as_ref().map(|field| field as _)
14822 }
14823 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
14825 self.extra_fields = Some(field.into().into());
14826 }
14827 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
14829 self.set_extra_fields(field.into());
14830 self
14831 }
14832 }
14833 impl super::StorageFund {
14834 pub const fn const_default() -> Self {
14835 Self {
14836 total_object_storage_rebates: None,
14837 non_refundable_balance: None,
14838 }
14839 }
14840 #[doc(hidden)]
14841 pub fn default_instance() -> &'static Self {
14842 static DEFAULT: super::StorageFund = super::StorageFund::const_default();
14843 &DEFAULT
14844 }
14845 pub fn total_object_storage_rebates_opt_mut(&mut self) -> Option<&mut u64> {
14847 self.total_object_storage_rebates.as_mut().map(|field| field as _)
14848 }
14849 pub fn total_object_storage_rebates_mut(&mut self) -> &mut u64 {
14852 self.total_object_storage_rebates.get_or_insert_default()
14853 }
14854 pub fn total_object_storage_rebates_opt(&self) -> Option<u64> {
14856 self.total_object_storage_rebates.as_ref().map(|field| *field)
14857 }
14858 pub fn set_total_object_storage_rebates(&mut self, field: u64) {
14860 self.total_object_storage_rebates = Some(field);
14861 }
14862 pub fn with_total_object_storage_rebates(mut self, field: u64) -> Self {
14864 self.set_total_object_storage_rebates(field);
14865 self
14866 }
14867 pub fn non_refundable_balance_opt_mut(&mut self) -> Option<&mut u64> {
14869 self.non_refundable_balance.as_mut().map(|field| field as _)
14870 }
14871 pub fn non_refundable_balance_mut(&mut self) -> &mut u64 {
14874 self.non_refundable_balance.get_or_insert_default()
14875 }
14876 pub fn non_refundable_balance_opt(&self) -> Option<u64> {
14878 self.non_refundable_balance.as_ref().map(|field| *field)
14879 }
14880 pub fn set_non_refundable_balance(&mut self, field: u64) {
14882 self.non_refundable_balance = Some(field);
14883 }
14884 pub fn with_non_refundable_balance(mut self, field: u64) -> Self {
14886 self.set_non_refundable_balance(field);
14887 self
14888 }
14889 }
14890 impl super::SubscribeCheckpointsRequest {
14891 pub const fn const_default() -> Self {
14892 Self {
14893 read_mask: None,
14894 filter: None,
14895 }
14896 }
14897 #[doc(hidden)]
14898 pub fn default_instance() -> &'static Self {
14899 static DEFAULT: super::SubscribeCheckpointsRequest = super::SubscribeCheckpointsRequest::const_default();
14900 &DEFAULT
14901 }
14902 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
14904 self.read_mask.as_mut().map(|field| field as _)
14905 }
14906 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
14909 self.read_mask.get_or_insert_default()
14910 }
14911 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
14913 self.read_mask.as_ref().map(|field| field as _)
14914 }
14915 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
14917 self.read_mask = Some(field.into().into());
14918 }
14919 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
14921 mut self,
14922 field: T,
14923 ) -> Self {
14924 self.set_read_mask(field.into());
14925 self
14926 }
14927 pub fn filter(&self) -> &super::TransactionFilter {
14929 self.filter
14930 .as_ref()
14931 .map(|field| field as _)
14932 .unwrap_or_else(|| super::TransactionFilter::default_instance() as _)
14933 }
14934 pub fn filter_opt_mut(&mut self) -> Option<&mut super::TransactionFilter> {
14936 self.filter.as_mut().map(|field| field as _)
14937 }
14938 pub fn filter_mut(&mut self) -> &mut super::TransactionFilter {
14941 self.filter.get_or_insert_default()
14942 }
14943 pub fn filter_opt(&self) -> Option<&super::TransactionFilter> {
14945 self.filter.as_ref().map(|field| field as _)
14946 }
14947 pub fn set_filter<T: Into<super::TransactionFilter>>(&mut self, field: T) {
14949 self.filter = Some(field.into().into());
14950 }
14951 pub fn with_filter<T: Into<super::TransactionFilter>>(
14953 mut self,
14954 field: T,
14955 ) -> Self {
14956 self.set_filter(field.into());
14957 self
14958 }
14959 }
14960 impl super::SubscribeCheckpointsResponse {
14961 pub const fn const_default() -> Self {
14962 Self {
14963 cursor: None,
14964 checkpoint: None,
14965 }
14966 }
14967 #[doc(hidden)]
14968 pub fn default_instance() -> &'static Self {
14969 static DEFAULT: super::SubscribeCheckpointsResponse = super::SubscribeCheckpointsResponse::const_default();
14970 &DEFAULT
14971 }
14972 pub fn cursor_opt_mut(&mut self) -> Option<&mut u64> {
14974 self.cursor.as_mut().map(|field| field as _)
14975 }
14976 pub fn cursor_mut(&mut self) -> &mut u64 {
14979 self.cursor.get_or_insert_default()
14980 }
14981 pub fn cursor_opt(&self) -> Option<u64> {
14983 self.cursor.as_ref().map(|field| *field)
14984 }
14985 pub fn set_cursor(&mut self, field: u64) {
14987 self.cursor = Some(field);
14988 }
14989 pub fn with_cursor(mut self, field: u64) -> Self {
14991 self.set_cursor(field);
14992 self
14993 }
14994 pub fn checkpoint(&self) -> &super::Checkpoint {
14996 self.checkpoint
14997 .as_ref()
14998 .map(|field| field as _)
14999 .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
15000 }
15001 pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
15003 self.checkpoint.as_mut().map(|field| field as _)
15004 }
15005 pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
15008 self.checkpoint.get_or_insert_default()
15009 }
15010 pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
15012 self.checkpoint.as_ref().map(|field| field as _)
15013 }
15014 pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
15016 self.checkpoint = Some(field.into().into());
15017 }
15018 pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
15020 self.set_checkpoint(field.into());
15021 self
15022 }
15023 }
15024 impl super::SubscribeEventsRequest {
15025 pub const fn const_default() -> Self {
15026 Self {
15027 read_mask: None,
15028 filter: None,
15029 }
15030 }
15031 #[doc(hidden)]
15032 pub fn default_instance() -> &'static Self {
15033 static DEFAULT: super::SubscribeEventsRequest = super::SubscribeEventsRequest::const_default();
15034 &DEFAULT
15035 }
15036 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
15038 self.read_mask.as_mut().map(|field| field as _)
15039 }
15040 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
15043 self.read_mask.get_or_insert_default()
15044 }
15045 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
15047 self.read_mask.as_ref().map(|field| field as _)
15048 }
15049 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
15051 self.read_mask = Some(field.into().into());
15052 }
15053 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
15055 mut self,
15056 field: T,
15057 ) -> Self {
15058 self.set_read_mask(field.into());
15059 self
15060 }
15061 pub fn filter(&self) -> &super::EventFilter {
15063 self.filter
15064 .as_ref()
15065 .map(|field| field as _)
15066 .unwrap_or_else(|| super::EventFilter::default_instance() as _)
15067 }
15068 pub fn filter_opt_mut(&mut self) -> Option<&mut super::EventFilter> {
15070 self.filter.as_mut().map(|field| field as _)
15071 }
15072 pub fn filter_mut(&mut self) -> &mut super::EventFilter {
15075 self.filter.get_or_insert_default()
15076 }
15077 pub fn filter_opt(&self) -> Option<&super::EventFilter> {
15079 self.filter.as_ref().map(|field| field as _)
15080 }
15081 pub fn set_filter<T: Into<super::EventFilter>>(&mut self, field: T) {
15083 self.filter = Some(field.into().into());
15084 }
15085 pub fn with_filter<T: Into<super::EventFilter>>(mut self, field: T) -> Self {
15087 self.set_filter(field.into());
15088 self
15089 }
15090 }
15091 impl super::SubscribeEventsResponse {
15092 pub const fn const_default() -> Self {
15093 Self {
15094 event: None,
15095 watermark: None,
15096 }
15097 }
15098 #[doc(hidden)]
15099 pub fn default_instance() -> &'static Self {
15100 static DEFAULT: super::SubscribeEventsResponse = super::SubscribeEventsResponse::const_default();
15101 &DEFAULT
15102 }
15103 pub fn event(&self) -> &super::Event {
15105 self.event
15106 .as_ref()
15107 .map(|field| field as _)
15108 .unwrap_or_else(|| super::Event::default_instance() as _)
15109 }
15110 pub fn event_opt_mut(&mut self) -> Option<&mut super::Event> {
15112 self.event.as_mut().map(|field| field as _)
15113 }
15114 pub fn event_mut(&mut self) -> &mut super::Event {
15117 self.event.get_or_insert_default()
15118 }
15119 pub fn event_opt(&self) -> Option<&super::Event> {
15121 self.event.as_ref().map(|field| field as _)
15122 }
15123 pub fn set_event<T: Into<super::Event>>(&mut self, field: T) {
15125 self.event = Some(field.into().into());
15126 }
15127 pub fn with_event<T: Into<super::Event>>(mut self, field: T) -> Self {
15129 self.set_event(field.into());
15130 self
15131 }
15132 pub fn watermark(&self) -> &super::Watermark {
15134 self.watermark
15135 .as_ref()
15136 .map(|field| field as _)
15137 .unwrap_or_else(|| super::Watermark::default_instance() as _)
15138 }
15139 pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
15141 self.watermark.as_mut().map(|field| field as _)
15142 }
15143 pub fn watermark_mut(&mut self) -> &mut super::Watermark {
15146 self.watermark.get_or_insert_default()
15147 }
15148 pub fn watermark_opt(&self) -> Option<&super::Watermark> {
15150 self.watermark.as_ref().map(|field| field as _)
15151 }
15152 pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
15154 self.watermark = Some(field.into().into());
15155 }
15156 pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
15158 self.set_watermark(field.into());
15159 self
15160 }
15161 }
15162 impl super::SubscribeTransactionsRequest {
15163 pub const fn const_default() -> Self {
15164 Self {
15165 read_mask: None,
15166 filter: None,
15167 }
15168 }
15169 #[doc(hidden)]
15170 pub fn default_instance() -> &'static Self {
15171 static DEFAULT: super::SubscribeTransactionsRequest = super::SubscribeTransactionsRequest::const_default();
15172 &DEFAULT
15173 }
15174 pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
15176 self.read_mask.as_mut().map(|field| field as _)
15177 }
15178 pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
15181 self.read_mask.get_or_insert_default()
15182 }
15183 pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
15185 self.read_mask.as_ref().map(|field| field as _)
15186 }
15187 pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
15189 self.read_mask = Some(field.into().into());
15190 }
15191 pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
15193 mut self,
15194 field: T,
15195 ) -> Self {
15196 self.set_read_mask(field.into());
15197 self
15198 }
15199 pub fn filter(&self) -> &super::TransactionFilter {
15201 self.filter
15202 .as_ref()
15203 .map(|field| field as _)
15204 .unwrap_or_else(|| super::TransactionFilter::default_instance() as _)
15205 }
15206 pub fn filter_opt_mut(&mut self) -> Option<&mut super::TransactionFilter> {
15208 self.filter.as_mut().map(|field| field as _)
15209 }
15210 pub fn filter_mut(&mut self) -> &mut super::TransactionFilter {
15213 self.filter.get_or_insert_default()
15214 }
15215 pub fn filter_opt(&self) -> Option<&super::TransactionFilter> {
15217 self.filter.as_ref().map(|field| field as _)
15218 }
15219 pub fn set_filter<T: Into<super::TransactionFilter>>(&mut self, field: T) {
15221 self.filter = Some(field.into().into());
15222 }
15223 pub fn with_filter<T: Into<super::TransactionFilter>>(
15225 mut self,
15226 field: T,
15227 ) -> Self {
15228 self.set_filter(field.into());
15229 self
15230 }
15231 }
15232 impl super::SubscribeTransactionsResponse {
15233 pub const fn const_default() -> Self {
15234 Self {
15235 transaction: None,
15236 watermark: None,
15237 }
15238 }
15239 #[doc(hidden)]
15240 pub fn default_instance() -> &'static Self {
15241 static DEFAULT: super::SubscribeTransactionsResponse = super::SubscribeTransactionsResponse::const_default();
15242 &DEFAULT
15243 }
15244 pub fn transaction(&self) -> &super::ExecutedTransaction {
15246 self.transaction
15247 .as_ref()
15248 .map(|field| field as _)
15249 .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
15250 }
15251 pub fn transaction_opt_mut(
15253 &mut self,
15254 ) -> Option<&mut super::ExecutedTransaction> {
15255 self.transaction.as_mut().map(|field| field as _)
15256 }
15257 pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
15260 self.transaction.get_or_insert_default()
15261 }
15262 pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
15264 self.transaction.as_ref().map(|field| field as _)
15265 }
15266 pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
15268 &mut self,
15269 field: T,
15270 ) {
15271 self.transaction = Some(field.into().into());
15272 }
15273 pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
15275 mut self,
15276 field: T,
15277 ) -> Self {
15278 self.set_transaction(field.into());
15279 self
15280 }
15281 pub fn watermark(&self) -> &super::Watermark {
15283 self.watermark
15284 .as_ref()
15285 .map(|field| field as _)
15286 .unwrap_or_else(|| super::Watermark::default_instance() as _)
15287 }
15288 pub fn watermark_opt_mut(&mut self) -> Option<&mut super::Watermark> {
15290 self.watermark.as_mut().map(|field| field as _)
15291 }
15292 pub fn watermark_mut(&mut self) -> &mut super::Watermark {
15295 self.watermark.get_or_insert_default()
15296 }
15297 pub fn watermark_opt(&self) -> Option<&super::Watermark> {
15299 self.watermark.as_ref().map(|field| field as _)
15300 }
15301 pub fn set_watermark<T: Into<super::Watermark>>(&mut self, field: T) {
15303 self.watermark = Some(field.into().into());
15304 }
15305 pub fn with_watermark<T: Into<super::Watermark>>(mut self, field: T) -> Self {
15307 self.set_watermark(field.into());
15308 self
15309 }
15310 }
15311 impl super::SystemPackage {
15312 pub const fn const_default() -> Self {
15313 Self {
15314 version: None,
15315 modules: Vec::new(),
15316 dependencies: Vec::new(),
15317 }
15318 }
15319 #[doc(hidden)]
15320 pub fn default_instance() -> &'static Self {
15321 static DEFAULT: super::SystemPackage = super::SystemPackage::const_default();
15322 &DEFAULT
15323 }
15324 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
15326 self.version.as_mut().map(|field| field as _)
15327 }
15328 pub fn version_mut(&mut self) -> &mut u64 {
15331 self.version.get_or_insert_default()
15332 }
15333 pub fn version_opt(&self) -> Option<u64> {
15335 self.version.as_ref().map(|field| *field)
15336 }
15337 pub fn set_version(&mut self, field: u64) {
15339 self.version = Some(field);
15340 }
15341 pub fn with_version(mut self, field: u64) -> Self {
15343 self.set_version(field);
15344 self
15345 }
15346 pub fn modules(&self) -> &[::prost::bytes::Bytes] {
15348 &self.modules
15349 }
15350 pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
15353 &mut self.modules
15354 }
15355 pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
15357 self.modules = field;
15358 }
15359 pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
15361 self.set_modules(field);
15362 self
15363 }
15364 pub fn dependencies(&self) -> &[String] {
15366 &self.dependencies
15367 }
15368 pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
15371 &mut self.dependencies
15372 }
15373 pub fn set_dependencies(&mut self, field: Vec<String>) {
15375 self.dependencies = field;
15376 }
15377 pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
15379 self.set_dependencies(field);
15380 self
15381 }
15382 }
15383 impl super::SystemParameters {
15384 pub const fn const_default() -> Self {
15385 Self {
15386 epoch_duration_ms: None,
15387 stake_subsidy_start_epoch: None,
15388 min_validator_count: None,
15389 max_validator_count: None,
15390 min_validator_joining_stake: None,
15391 validator_low_stake_threshold: None,
15392 validator_very_low_stake_threshold: None,
15393 validator_low_stake_grace_period: None,
15394 extra_fields: None,
15395 }
15396 }
15397 #[doc(hidden)]
15398 pub fn default_instance() -> &'static Self {
15399 static DEFAULT: super::SystemParameters = super::SystemParameters::const_default();
15400 &DEFAULT
15401 }
15402 pub fn epoch_duration_ms_opt_mut(&mut self) -> Option<&mut u64> {
15404 self.epoch_duration_ms.as_mut().map(|field| field as _)
15405 }
15406 pub fn epoch_duration_ms_mut(&mut self) -> &mut u64 {
15409 self.epoch_duration_ms.get_or_insert_default()
15410 }
15411 pub fn epoch_duration_ms_opt(&self) -> Option<u64> {
15413 self.epoch_duration_ms.as_ref().map(|field| *field)
15414 }
15415 pub fn set_epoch_duration_ms(&mut self, field: u64) {
15417 self.epoch_duration_ms = Some(field);
15418 }
15419 pub fn with_epoch_duration_ms(mut self, field: u64) -> Self {
15421 self.set_epoch_duration_ms(field);
15422 self
15423 }
15424 pub fn stake_subsidy_start_epoch_opt_mut(&mut self) -> Option<&mut u64> {
15426 self.stake_subsidy_start_epoch.as_mut().map(|field| field as _)
15427 }
15428 pub fn stake_subsidy_start_epoch_mut(&mut self) -> &mut u64 {
15431 self.stake_subsidy_start_epoch.get_or_insert_default()
15432 }
15433 pub fn stake_subsidy_start_epoch_opt(&self) -> Option<u64> {
15435 self.stake_subsidy_start_epoch.as_ref().map(|field| *field)
15436 }
15437 pub fn set_stake_subsidy_start_epoch(&mut self, field: u64) {
15439 self.stake_subsidy_start_epoch = Some(field);
15440 }
15441 pub fn with_stake_subsidy_start_epoch(mut self, field: u64) -> Self {
15443 self.set_stake_subsidy_start_epoch(field);
15444 self
15445 }
15446 pub fn min_validator_count_opt_mut(&mut self) -> Option<&mut u64> {
15448 self.min_validator_count.as_mut().map(|field| field as _)
15449 }
15450 pub fn min_validator_count_mut(&mut self) -> &mut u64 {
15453 self.min_validator_count.get_or_insert_default()
15454 }
15455 pub fn min_validator_count_opt(&self) -> Option<u64> {
15457 self.min_validator_count.as_ref().map(|field| *field)
15458 }
15459 pub fn set_min_validator_count(&mut self, field: u64) {
15461 self.min_validator_count = Some(field);
15462 }
15463 pub fn with_min_validator_count(mut self, field: u64) -> Self {
15465 self.set_min_validator_count(field);
15466 self
15467 }
15468 pub fn max_validator_count_opt_mut(&mut self) -> Option<&mut u64> {
15470 self.max_validator_count.as_mut().map(|field| field as _)
15471 }
15472 pub fn max_validator_count_mut(&mut self) -> &mut u64 {
15475 self.max_validator_count.get_or_insert_default()
15476 }
15477 pub fn max_validator_count_opt(&self) -> Option<u64> {
15479 self.max_validator_count.as_ref().map(|field| *field)
15480 }
15481 pub fn set_max_validator_count(&mut self, field: u64) {
15483 self.max_validator_count = Some(field);
15484 }
15485 pub fn with_max_validator_count(mut self, field: u64) -> Self {
15487 self.set_max_validator_count(field);
15488 self
15489 }
15490 pub fn min_validator_joining_stake_opt_mut(&mut self) -> Option<&mut u64> {
15492 self.min_validator_joining_stake.as_mut().map(|field| field as _)
15493 }
15494 pub fn min_validator_joining_stake_mut(&mut self) -> &mut u64 {
15497 self.min_validator_joining_stake.get_or_insert_default()
15498 }
15499 pub fn min_validator_joining_stake_opt(&self) -> Option<u64> {
15501 self.min_validator_joining_stake.as_ref().map(|field| *field)
15502 }
15503 pub fn set_min_validator_joining_stake(&mut self, field: u64) {
15505 self.min_validator_joining_stake = Some(field);
15506 }
15507 pub fn with_min_validator_joining_stake(mut self, field: u64) -> Self {
15509 self.set_min_validator_joining_stake(field);
15510 self
15511 }
15512 pub fn validator_low_stake_threshold_opt_mut(&mut self) -> Option<&mut u64> {
15514 self.validator_low_stake_threshold.as_mut().map(|field| field as _)
15515 }
15516 pub fn validator_low_stake_threshold_mut(&mut self) -> &mut u64 {
15519 self.validator_low_stake_threshold.get_or_insert_default()
15520 }
15521 pub fn validator_low_stake_threshold_opt(&self) -> Option<u64> {
15523 self.validator_low_stake_threshold.as_ref().map(|field| *field)
15524 }
15525 pub fn set_validator_low_stake_threshold(&mut self, field: u64) {
15527 self.validator_low_stake_threshold = Some(field);
15528 }
15529 pub fn with_validator_low_stake_threshold(mut self, field: u64) -> Self {
15531 self.set_validator_low_stake_threshold(field);
15532 self
15533 }
15534 pub fn validator_very_low_stake_threshold_opt_mut(
15536 &mut self,
15537 ) -> Option<&mut u64> {
15538 self.validator_very_low_stake_threshold.as_mut().map(|field| field as _)
15539 }
15540 pub fn validator_very_low_stake_threshold_mut(&mut self) -> &mut u64 {
15543 self.validator_very_low_stake_threshold.get_or_insert_default()
15544 }
15545 pub fn validator_very_low_stake_threshold_opt(&self) -> Option<u64> {
15547 self.validator_very_low_stake_threshold.as_ref().map(|field| *field)
15548 }
15549 pub fn set_validator_very_low_stake_threshold(&mut self, field: u64) {
15551 self.validator_very_low_stake_threshold = Some(field);
15552 }
15553 pub fn with_validator_very_low_stake_threshold(mut self, field: u64) -> Self {
15555 self.set_validator_very_low_stake_threshold(field);
15556 self
15557 }
15558 pub fn validator_low_stake_grace_period_opt_mut(&mut self) -> Option<&mut u64> {
15560 self.validator_low_stake_grace_period.as_mut().map(|field| field as _)
15561 }
15562 pub fn validator_low_stake_grace_period_mut(&mut self) -> &mut u64 {
15565 self.validator_low_stake_grace_period.get_or_insert_default()
15566 }
15567 pub fn validator_low_stake_grace_period_opt(&self) -> Option<u64> {
15569 self.validator_low_stake_grace_period.as_ref().map(|field| *field)
15570 }
15571 pub fn set_validator_low_stake_grace_period(&mut self, field: u64) {
15573 self.validator_low_stake_grace_period = Some(field);
15574 }
15575 pub fn with_validator_low_stake_grace_period(mut self, field: u64) -> Self {
15577 self.set_validator_low_stake_grace_period(field);
15578 self
15579 }
15580 pub fn extra_fields(&self) -> &super::MoveTable {
15582 self.extra_fields
15583 .as_ref()
15584 .map(|field| field as _)
15585 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
15586 }
15587 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
15589 self.extra_fields.as_mut().map(|field| field as _)
15590 }
15591 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
15594 self.extra_fields.get_or_insert_default()
15595 }
15596 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
15598 self.extra_fields.as_ref().map(|field| field as _)
15599 }
15600 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
15602 self.extra_fields = Some(field.into().into());
15603 }
15604 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
15606 self.set_extra_fields(field.into());
15607 self
15608 }
15609 }
15610 impl super::SystemState {
15611 pub const fn const_default() -> Self {
15612 Self {
15613 version: None,
15614 epoch: None,
15615 protocol_version: None,
15616 validators: None,
15617 storage_fund: None,
15618 parameters: None,
15619 reference_gas_price: None,
15620 validator_report_records: Vec::new(),
15621 stake_subsidy: None,
15622 safe_mode: None,
15623 safe_mode_storage_rewards: None,
15624 safe_mode_computation_rewards: None,
15625 safe_mode_storage_rebates: None,
15626 safe_mode_non_refundable_storage_fee: None,
15627 epoch_start_timestamp_ms: None,
15628 extra_fields: None,
15629 }
15630 }
15631 #[doc(hidden)]
15632 pub fn default_instance() -> &'static Self {
15633 static DEFAULT: super::SystemState = super::SystemState::const_default();
15634 &DEFAULT
15635 }
15636 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
15638 self.version.as_mut().map(|field| field as _)
15639 }
15640 pub fn version_mut(&mut self) -> &mut u64 {
15643 self.version.get_or_insert_default()
15644 }
15645 pub fn version_opt(&self) -> Option<u64> {
15647 self.version.as_ref().map(|field| *field)
15648 }
15649 pub fn set_version(&mut self, field: u64) {
15651 self.version = Some(field);
15652 }
15653 pub fn with_version(mut self, field: u64) -> Self {
15655 self.set_version(field);
15656 self
15657 }
15658 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
15660 self.epoch.as_mut().map(|field| field as _)
15661 }
15662 pub fn epoch_mut(&mut self) -> &mut u64 {
15665 self.epoch.get_or_insert_default()
15666 }
15667 pub fn epoch_opt(&self) -> Option<u64> {
15669 self.epoch.as_ref().map(|field| *field)
15670 }
15671 pub fn set_epoch(&mut self, field: u64) {
15673 self.epoch = Some(field);
15674 }
15675 pub fn with_epoch(mut self, field: u64) -> Self {
15677 self.set_epoch(field);
15678 self
15679 }
15680 pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
15682 self.protocol_version.as_mut().map(|field| field as _)
15683 }
15684 pub fn protocol_version_mut(&mut self) -> &mut u64 {
15687 self.protocol_version.get_or_insert_default()
15688 }
15689 pub fn protocol_version_opt(&self) -> Option<u64> {
15691 self.protocol_version.as_ref().map(|field| *field)
15692 }
15693 pub fn set_protocol_version(&mut self, field: u64) {
15695 self.protocol_version = Some(field);
15696 }
15697 pub fn with_protocol_version(mut self, field: u64) -> Self {
15699 self.set_protocol_version(field);
15700 self
15701 }
15702 pub fn validators(&self) -> &super::ValidatorSet {
15704 self.validators
15705 .as_ref()
15706 .map(|field| field as _)
15707 .unwrap_or_else(|| super::ValidatorSet::default_instance() as _)
15708 }
15709 pub fn validators_opt_mut(&mut self) -> Option<&mut super::ValidatorSet> {
15711 self.validators.as_mut().map(|field| field as _)
15712 }
15713 pub fn validators_mut(&mut self) -> &mut super::ValidatorSet {
15716 self.validators.get_or_insert_default()
15717 }
15718 pub fn validators_opt(&self) -> Option<&super::ValidatorSet> {
15720 self.validators.as_ref().map(|field| field as _)
15721 }
15722 pub fn set_validators<T: Into<super::ValidatorSet>>(&mut self, field: T) {
15724 self.validators = Some(field.into().into());
15725 }
15726 pub fn with_validators<T: Into<super::ValidatorSet>>(
15728 mut self,
15729 field: T,
15730 ) -> Self {
15731 self.set_validators(field.into());
15732 self
15733 }
15734 pub fn storage_fund(&self) -> &super::StorageFund {
15736 self.storage_fund
15737 .as_ref()
15738 .map(|field| field as _)
15739 .unwrap_or_else(|| super::StorageFund::default_instance() as _)
15740 }
15741 pub fn storage_fund_opt_mut(&mut self) -> Option<&mut super::StorageFund> {
15743 self.storage_fund.as_mut().map(|field| field as _)
15744 }
15745 pub fn storage_fund_mut(&mut self) -> &mut super::StorageFund {
15748 self.storage_fund.get_or_insert_default()
15749 }
15750 pub fn storage_fund_opt(&self) -> Option<&super::StorageFund> {
15752 self.storage_fund.as_ref().map(|field| field as _)
15753 }
15754 pub fn set_storage_fund<T: Into<super::StorageFund>>(&mut self, field: T) {
15756 self.storage_fund = Some(field.into().into());
15757 }
15758 pub fn with_storage_fund<T: Into<super::StorageFund>>(
15760 mut self,
15761 field: T,
15762 ) -> Self {
15763 self.set_storage_fund(field.into());
15764 self
15765 }
15766 pub fn parameters(&self) -> &super::SystemParameters {
15768 self.parameters
15769 .as_ref()
15770 .map(|field| field as _)
15771 .unwrap_or_else(|| super::SystemParameters::default_instance() as _)
15772 }
15773 pub fn parameters_opt_mut(&mut self) -> Option<&mut super::SystemParameters> {
15775 self.parameters.as_mut().map(|field| field as _)
15776 }
15777 pub fn parameters_mut(&mut self) -> &mut super::SystemParameters {
15780 self.parameters.get_or_insert_default()
15781 }
15782 pub fn parameters_opt(&self) -> Option<&super::SystemParameters> {
15784 self.parameters.as_ref().map(|field| field as _)
15785 }
15786 pub fn set_parameters<T: Into<super::SystemParameters>>(&mut self, field: T) {
15788 self.parameters = Some(field.into().into());
15789 }
15790 pub fn with_parameters<T: Into<super::SystemParameters>>(
15792 mut self,
15793 field: T,
15794 ) -> Self {
15795 self.set_parameters(field.into());
15796 self
15797 }
15798 pub fn reference_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
15800 self.reference_gas_price.as_mut().map(|field| field as _)
15801 }
15802 pub fn reference_gas_price_mut(&mut self) -> &mut u64 {
15805 self.reference_gas_price.get_or_insert_default()
15806 }
15807 pub fn reference_gas_price_opt(&self) -> Option<u64> {
15809 self.reference_gas_price.as_ref().map(|field| *field)
15810 }
15811 pub fn set_reference_gas_price(&mut self, field: u64) {
15813 self.reference_gas_price = Some(field);
15814 }
15815 pub fn with_reference_gas_price(mut self, field: u64) -> Self {
15817 self.set_reference_gas_price(field);
15818 self
15819 }
15820 pub fn validator_report_records(&self) -> &[super::ValidatorReportRecord] {
15822 &self.validator_report_records
15823 }
15824 pub fn validator_report_records_mut(
15827 &mut self,
15828 ) -> &mut Vec<super::ValidatorReportRecord> {
15829 &mut self.validator_report_records
15830 }
15831 pub fn set_validator_report_records(
15833 &mut self,
15834 field: Vec<super::ValidatorReportRecord>,
15835 ) {
15836 self.validator_report_records = field;
15837 }
15838 pub fn with_validator_report_records(
15840 mut self,
15841 field: Vec<super::ValidatorReportRecord>,
15842 ) -> Self {
15843 self.set_validator_report_records(field);
15844 self
15845 }
15846 pub fn stake_subsidy(&self) -> &super::StakeSubsidy {
15848 self.stake_subsidy
15849 .as_ref()
15850 .map(|field| field as _)
15851 .unwrap_or_else(|| super::StakeSubsidy::default_instance() as _)
15852 }
15853 pub fn stake_subsidy_opt_mut(&mut self) -> Option<&mut super::StakeSubsidy> {
15855 self.stake_subsidy.as_mut().map(|field| field as _)
15856 }
15857 pub fn stake_subsidy_mut(&mut self) -> &mut super::StakeSubsidy {
15860 self.stake_subsidy.get_or_insert_default()
15861 }
15862 pub fn stake_subsidy_opt(&self) -> Option<&super::StakeSubsidy> {
15864 self.stake_subsidy.as_ref().map(|field| field as _)
15865 }
15866 pub fn set_stake_subsidy<T: Into<super::StakeSubsidy>>(&mut self, field: T) {
15868 self.stake_subsidy = Some(field.into().into());
15869 }
15870 pub fn with_stake_subsidy<T: Into<super::StakeSubsidy>>(
15872 mut self,
15873 field: T,
15874 ) -> Self {
15875 self.set_stake_subsidy(field.into());
15876 self
15877 }
15878 pub fn safe_mode_opt_mut(&mut self) -> Option<&mut bool> {
15880 self.safe_mode.as_mut().map(|field| field as _)
15881 }
15882 pub fn safe_mode_mut(&mut self) -> &mut bool {
15885 self.safe_mode.get_or_insert_default()
15886 }
15887 pub fn safe_mode_opt(&self) -> Option<bool> {
15889 self.safe_mode.as_ref().map(|field| *field)
15890 }
15891 pub fn set_safe_mode(&mut self, field: bool) {
15893 self.safe_mode = Some(field);
15894 }
15895 pub fn with_safe_mode(mut self, field: bool) -> Self {
15897 self.set_safe_mode(field);
15898 self
15899 }
15900 pub fn safe_mode_storage_rewards_opt_mut(&mut self) -> Option<&mut u64> {
15902 self.safe_mode_storage_rewards.as_mut().map(|field| field as _)
15903 }
15904 pub fn safe_mode_storage_rewards_mut(&mut self) -> &mut u64 {
15907 self.safe_mode_storage_rewards.get_or_insert_default()
15908 }
15909 pub fn safe_mode_storage_rewards_opt(&self) -> Option<u64> {
15911 self.safe_mode_storage_rewards.as_ref().map(|field| *field)
15912 }
15913 pub fn set_safe_mode_storage_rewards(&mut self, field: u64) {
15915 self.safe_mode_storage_rewards = Some(field);
15916 }
15917 pub fn with_safe_mode_storage_rewards(mut self, field: u64) -> Self {
15919 self.set_safe_mode_storage_rewards(field);
15920 self
15921 }
15922 pub fn safe_mode_computation_rewards_opt_mut(&mut self) -> Option<&mut u64> {
15924 self.safe_mode_computation_rewards.as_mut().map(|field| field as _)
15925 }
15926 pub fn safe_mode_computation_rewards_mut(&mut self) -> &mut u64 {
15929 self.safe_mode_computation_rewards.get_or_insert_default()
15930 }
15931 pub fn safe_mode_computation_rewards_opt(&self) -> Option<u64> {
15933 self.safe_mode_computation_rewards.as_ref().map(|field| *field)
15934 }
15935 pub fn set_safe_mode_computation_rewards(&mut self, field: u64) {
15937 self.safe_mode_computation_rewards = Some(field);
15938 }
15939 pub fn with_safe_mode_computation_rewards(mut self, field: u64) -> Self {
15941 self.set_safe_mode_computation_rewards(field);
15942 self
15943 }
15944 pub fn safe_mode_storage_rebates_opt_mut(&mut self) -> Option<&mut u64> {
15946 self.safe_mode_storage_rebates.as_mut().map(|field| field as _)
15947 }
15948 pub fn safe_mode_storage_rebates_mut(&mut self) -> &mut u64 {
15951 self.safe_mode_storage_rebates.get_or_insert_default()
15952 }
15953 pub fn safe_mode_storage_rebates_opt(&self) -> Option<u64> {
15955 self.safe_mode_storage_rebates.as_ref().map(|field| *field)
15956 }
15957 pub fn set_safe_mode_storage_rebates(&mut self, field: u64) {
15959 self.safe_mode_storage_rebates = Some(field);
15960 }
15961 pub fn with_safe_mode_storage_rebates(mut self, field: u64) -> Self {
15963 self.set_safe_mode_storage_rebates(field);
15964 self
15965 }
15966 pub fn safe_mode_non_refundable_storage_fee_opt_mut(
15968 &mut self,
15969 ) -> Option<&mut u64> {
15970 self.safe_mode_non_refundable_storage_fee.as_mut().map(|field| field as _)
15971 }
15972 pub fn safe_mode_non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
15975 self.safe_mode_non_refundable_storage_fee.get_or_insert_default()
15976 }
15977 pub fn safe_mode_non_refundable_storage_fee_opt(&self) -> Option<u64> {
15979 self.safe_mode_non_refundable_storage_fee.as_ref().map(|field| *field)
15980 }
15981 pub fn set_safe_mode_non_refundable_storage_fee(&mut self, field: u64) {
15983 self.safe_mode_non_refundable_storage_fee = Some(field);
15984 }
15985 pub fn with_safe_mode_non_refundable_storage_fee(mut self, field: u64) -> Self {
15987 self.set_safe_mode_non_refundable_storage_fee(field);
15988 self
15989 }
15990 pub fn epoch_start_timestamp_ms_opt_mut(&mut self) -> Option<&mut u64> {
15992 self.epoch_start_timestamp_ms.as_mut().map(|field| field as _)
15993 }
15994 pub fn epoch_start_timestamp_ms_mut(&mut self) -> &mut u64 {
15997 self.epoch_start_timestamp_ms.get_or_insert_default()
15998 }
15999 pub fn epoch_start_timestamp_ms_opt(&self) -> Option<u64> {
16001 self.epoch_start_timestamp_ms.as_ref().map(|field| *field)
16002 }
16003 pub fn set_epoch_start_timestamp_ms(&mut self, field: u64) {
16005 self.epoch_start_timestamp_ms = Some(field);
16006 }
16007 pub fn with_epoch_start_timestamp_ms(mut self, field: u64) -> Self {
16009 self.set_epoch_start_timestamp_ms(field);
16010 self
16011 }
16012 pub fn extra_fields(&self) -> &super::MoveTable {
16014 self.extra_fields
16015 .as_ref()
16016 .map(|field| field as _)
16017 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16018 }
16019 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
16021 self.extra_fields.as_mut().map(|field| field as _)
16022 }
16023 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
16026 self.extra_fields.get_or_insert_default()
16027 }
16028 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
16030 self.extra_fields.as_ref().map(|field| field as _)
16031 }
16032 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
16034 self.extra_fields = Some(field.into().into());
16035 }
16036 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
16038 self.set_extra_fields(field.into());
16039 self
16040 }
16041 }
16042 impl super::Transaction {
16043 pub const fn const_default() -> Self {
16044 Self {
16045 bcs: None,
16046 digest: None,
16047 version: None,
16048 kind: None,
16049 sender: None,
16050 gas_payment: None,
16051 expiration: None,
16052 }
16053 }
16054 #[doc(hidden)]
16055 pub fn default_instance() -> &'static Self {
16056 static DEFAULT: super::Transaction = super::Transaction::const_default();
16057 &DEFAULT
16058 }
16059 pub fn bcs(&self) -> &super::Bcs {
16061 self.bcs
16062 .as_ref()
16063 .map(|field| field as _)
16064 .unwrap_or_else(|| super::Bcs::default_instance() as _)
16065 }
16066 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
16068 self.bcs.as_mut().map(|field| field as _)
16069 }
16070 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
16073 self.bcs.get_or_insert_default()
16074 }
16075 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
16077 self.bcs.as_ref().map(|field| field as _)
16078 }
16079 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
16081 self.bcs = Some(field.into().into());
16082 }
16083 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
16085 self.set_bcs(field.into());
16086 self
16087 }
16088 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
16090 self.digest.as_mut().map(|field| field as _)
16091 }
16092 pub fn digest_mut(&mut self) -> &mut String {
16095 self.digest.get_or_insert_default()
16096 }
16097 pub fn digest_opt(&self) -> Option<&str> {
16099 self.digest.as_ref().map(|field| field as _)
16100 }
16101 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
16103 self.digest = Some(field.into().into());
16104 }
16105 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
16107 self.set_digest(field.into());
16108 self
16109 }
16110 pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
16112 self.version.as_mut().map(|field| field as _)
16113 }
16114 pub fn version_mut(&mut self) -> &mut i32 {
16117 self.version.get_or_insert_default()
16118 }
16119 pub fn version_opt(&self) -> Option<i32> {
16121 self.version.as_ref().map(|field| *field)
16122 }
16123 pub fn set_version(&mut self, field: i32) {
16125 self.version = Some(field);
16126 }
16127 pub fn with_version(mut self, field: i32) -> Self {
16129 self.set_version(field);
16130 self
16131 }
16132 pub fn kind(&self) -> &super::TransactionKind {
16134 self.kind
16135 .as_ref()
16136 .map(|field| field as _)
16137 .unwrap_or_else(|| super::TransactionKind::default_instance() as _)
16138 }
16139 pub fn kind_opt_mut(&mut self) -> Option<&mut super::TransactionKind> {
16141 self.kind.as_mut().map(|field| field as _)
16142 }
16143 pub fn kind_mut(&mut self) -> &mut super::TransactionKind {
16146 self.kind.get_or_insert_default()
16147 }
16148 pub fn kind_opt(&self) -> Option<&super::TransactionKind> {
16150 self.kind.as_ref().map(|field| field as _)
16151 }
16152 pub fn set_kind<T: Into<super::TransactionKind>>(&mut self, field: T) {
16154 self.kind = Some(field.into().into());
16155 }
16156 pub fn with_kind<T: Into<super::TransactionKind>>(mut self, field: T) -> Self {
16158 self.set_kind(field.into());
16159 self
16160 }
16161 pub fn sender_opt_mut(&mut self) -> Option<&mut String> {
16163 self.sender.as_mut().map(|field| field as _)
16164 }
16165 pub fn sender_mut(&mut self) -> &mut String {
16168 self.sender.get_or_insert_default()
16169 }
16170 pub fn sender_opt(&self) -> Option<&str> {
16172 self.sender.as_ref().map(|field| field as _)
16173 }
16174 pub fn set_sender<T: Into<String>>(&mut self, field: T) {
16176 self.sender = Some(field.into().into());
16177 }
16178 pub fn with_sender<T: Into<String>>(mut self, field: T) -> Self {
16180 self.set_sender(field.into());
16181 self
16182 }
16183 pub fn gas_payment(&self) -> &super::GasPayment {
16185 self.gas_payment
16186 .as_ref()
16187 .map(|field| field as _)
16188 .unwrap_or_else(|| super::GasPayment::default_instance() as _)
16189 }
16190 pub fn gas_payment_opt_mut(&mut self) -> Option<&mut super::GasPayment> {
16192 self.gas_payment.as_mut().map(|field| field as _)
16193 }
16194 pub fn gas_payment_mut(&mut self) -> &mut super::GasPayment {
16197 self.gas_payment.get_or_insert_default()
16198 }
16199 pub fn gas_payment_opt(&self) -> Option<&super::GasPayment> {
16201 self.gas_payment.as_ref().map(|field| field as _)
16202 }
16203 pub fn set_gas_payment<T: Into<super::GasPayment>>(&mut self, field: T) {
16205 self.gas_payment = Some(field.into().into());
16206 }
16207 pub fn with_gas_payment<T: Into<super::GasPayment>>(mut self, field: T) -> Self {
16209 self.set_gas_payment(field.into());
16210 self
16211 }
16212 pub fn expiration(&self) -> &super::TransactionExpiration {
16214 self.expiration
16215 .as_ref()
16216 .map(|field| field as _)
16217 .unwrap_or_else(|| super::TransactionExpiration::default_instance() as _)
16218 }
16219 pub fn expiration_opt_mut(
16221 &mut self,
16222 ) -> Option<&mut super::TransactionExpiration> {
16223 self.expiration.as_mut().map(|field| field as _)
16224 }
16225 pub fn expiration_mut(&mut self) -> &mut super::TransactionExpiration {
16228 self.expiration.get_or_insert_default()
16229 }
16230 pub fn expiration_opt(&self) -> Option<&super::TransactionExpiration> {
16232 self.expiration.as_ref().map(|field| field as _)
16233 }
16234 pub fn set_expiration<T: Into<super::TransactionExpiration>>(
16236 &mut self,
16237 field: T,
16238 ) {
16239 self.expiration = Some(field.into().into());
16240 }
16241 pub fn with_expiration<T: Into<super::TransactionExpiration>>(
16243 mut self,
16244 field: T,
16245 ) -> Self {
16246 self.set_expiration(field.into());
16247 self
16248 }
16249 }
16250 impl super::TransactionEffects {
16251 pub const fn const_default() -> Self {
16252 Self {
16253 bcs: None,
16254 digest: None,
16255 version: None,
16256 status: None,
16257 epoch: None,
16258 gas_used: None,
16259 transaction_digest: None,
16260 gas_object: None,
16261 events_digest: None,
16262 dependencies: Vec::new(),
16263 lamport_version: None,
16264 changed_objects: Vec::new(),
16265 unchanged_consensus_objects: Vec::new(),
16266 auxiliary_data_digest: None,
16267 unchanged_loaded_runtime_objects: Vec::new(),
16268 }
16269 }
16270 #[doc(hidden)]
16271 pub fn default_instance() -> &'static Self {
16272 static DEFAULT: super::TransactionEffects = super::TransactionEffects::const_default();
16273 &DEFAULT
16274 }
16275 pub fn bcs(&self) -> &super::Bcs {
16277 self.bcs
16278 .as_ref()
16279 .map(|field| field as _)
16280 .unwrap_or_else(|| super::Bcs::default_instance() as _)
16281 }
16282 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
16284 self.bcs.as_mut().map(|field| field as _)
16285 }
16286 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
16289 self.bcs.get_or_insert_default()
16290 }
16291 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
16293 self.bcs.as_ref().map(|field| field as _)
16294 }
16295 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
16297 self.bcs = Some(field.into().into());
16298 }
16299 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
16301 self.set_bcs(field.into());
16302 self
16303 }
16304 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
16306 self.digest.as_mut().map(|field| field as _)
16307 }
16308 pub fn digest_mut(&mut self) -> &mut String {
16311 self.digest.get_or_insert_default()
16312 }
16313 pub fn digest_opt(&self) -> Option<&str> {
16315 self.digest.as_ref().map(|field| field as _)
16316 }
16317 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
16319 self.digest = Some(field.into().into());
16320 }
16321 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
16323 self.set_digest(field.into());
16324 self
16325 }
16326 pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
16328 self.version.as_mut().map(|field| field as _)
16329 }
16330 pub fn version_mut(&mut self) -> &mut i32 {
16333 self.version.get_or_insert_default()
16334 }
16335 pub fn version_opt(&self) -> Option<i32> {
16337 self.version.as_ref().map(|field| *field)
16338 }
16339 pub fn set_version(&mut self, field: i32) {
16341 self.version = Some(field);
16342 }
16343 pub fn with_version(mut self, field: i32) -> Self {
16345 self.set_version(field);
16346 self
16347 }
16348 pub fn status(&self) -> &super::ExecutionStatus {
16350 self.status
16351 .as_ref()
16352 .map(|field| field as _)
16353 .unwrap_or_else(|| super::ExecutionStatus::default_instance() as _)
16354 }
16355 pub fn status_opt_mut(&mut self) -> Option<&mut super::ExecutionStatus> {
16357 self.status.as_mut().map(|field| field as _)
16358 }
16359 pub fn status_mut(&mut self) -> &mut super::ExecutionStatus {
16362 self.status.get_or_insert_default()
16363 }
16364 pub fn status_opt(&self) -> Option<&super::ExecutionStatus> {
16366 self.status.as_ref().map(|field| field as _)
16367 }
16368 pub fn set_status<T: Into<super::ExecutionStatus>>(&mut self, field: T) {
16370 self.status = Some(field.into().into());
16371 }
16372 pub fn with_status<T: Into<super::ExecutionStatus>>(mut self, field: T) -> Self {
16374 self.set_status(field.into());
16375 self
16376 }
16377 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
16379 self.epoch.as_mut().map(|field| field as _)
16380 }
16381 pub fn epoch_mut(&mut self) -> &mut u64 {
16384 self.epoch.get_or_insert_default()
16385 }
16386 pub fn epoch_opt(&self) -> Option<u64> {
16388 self.epoch.as_ref().map(|field| *field)
16389 }
16390 pub fn set_epoch(&mut self, field: u64) {
16392 self.epoch = Some(field);
16393 }
16394 pub fn with_epoch(mut self, field: u64) -> Self {
16396 self.set_epoch(field);
16397 self
16398 }
16399 pub fn gas_used(&self) -> &super::GasCostSummary {
16401 self.gas_used
16402 .as_ref()
16403 .map(|field| field as _)
16404 .unwrap_or_else(|| super::GasCostSummary::default_instance() as _)
16405 }
16406 pub fn gas_used_opt_mut(&mut self) -> Option<&mut super::GasCostSummary> {
16408 self.gas_used.as_mut().map(|field| field as _)
16409 }
16410 pub fn gas_used_mut(&mut self) -> &mut super::GasCostSummary {
16413 self.gas_used.get_or_insert_default()
16414 }
16415 pub fn gas_used_opt(&self) -> Option<&super::GasCostSummary> {
16417 self.gas_used.as_ref().map(|field| field as _)
16418 }
16419 pub fn set_gas_used<T: Into<super::GasCostSummary>>(&mut self, field: T) {
16421 self.gas_used = Some(field.into().into());
16422 }
16423 pub fn with_gas_used<T: Into<super::GasCostSummary>>(
16425 mut self,
16426 field: T,
16427 ) -> Self {
16428 self.set_gas_used(field.into());
16429 self
16430 }
16431 pub fn transaction_digest_opt_mut(&mut self) -> Option<&mut String> {
16433 self.transaction_digest.as_mut().map(|field| field as _)
16434 }
16435 pub fn transaction_digest_mut(&mut self) -> &mut String {
16438 self.transaction_digest.get_or_insert_default()
16439 }
16440 pub fn transaction_digest_opt(&self) -> Option<&str> {
16442 self.transaction_digest.as_ref().map(|field| field as _)
16443 }
16444 pub fn set_transaction_digest<T: Into<String>>(&mut self, field: T) {
16446 self.transaction_digest = Some(field.into().into());
16447 }
16448 pub fn with_transaction_digest<T: Into<String>>(mut self, field: T) -> Self {
16450 self.set_transaction_digest(field.into());
16451 self
16452 }
16453 pub fn gas_object(&self) -> &super::ChangedObject {
16455 self.gas_object
16456 .as_ref()
16457 .map(|field| field as _)
16458 .unwrap_or_else(|| super::ChangedObject::default_instance() as _)
16459 }
16460 pub fn gas_object_opt_mut(&mut self) -> Option<&mut super::ChangedObject> {
16462 self.gas_object.as_mut().map(|field| field as _)
16463 }
16464 pub fn gas_object_mut(&mut self) -> &mut super::ChangedObject {
16467 self.gas_object.get_or_insert_default()
16468 }
16469 pub fn gas_object_opt(&self) -> Option<&super::ChangedObject> {
16471 self.gas_object.as_ref().map(|field| field as _)
16472 }
16473 pub fn set_gas_object<T: Into<super::ChangedObject>>(&mut self, field: T) {
16475 self.gas_object = Some(field.into().into());
16476 }
16477 pub fn with_gas_object<T: Into<super::ChangedObject>>(
16479 mut self,
16480 field: T,
16481 ) -> Self {
16482 self.set_gas_object(field.into());
16483 self
16484 }
16485 pub fn events_digest_opt_mut(&mut self) -> Option<&mut String> {
16487 self.events_digest.as_mut().map(|field| field as _)
16488 }
16489 pub fn events_digest_mut(&mut self) -> &mut String {
16492 self.events_digest.get_or_insert_default()
16493 }
16494 pub fn events_digest_opt(&self) -> Option<&str> {
16496 self.events_digest.as_ref().map(|field| field as _)
16497 }
16498 pub fn set_events_digest<T: Into<String>>(&mut self, field: T) {
16500 self.events_digest = Some(field.into().into());
16501 }
16502 pub fn with_events_digest<T: Into<String>>(mut self, field: T) -> Self {
16504 self.set_events_digest(field.into());
16505 self
16506 }
16507 pub fn dependencies(&self) -> &[String] {
16509 &self.dependencies
16510 }
16511 pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
16514 &mut self.dependencies
16515 }
16516 pub fn set_dependencies(&mut self, field: Vec<String>) {
16518 self.dependencies = field;
16519 }
16520 pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
16522 self.set_dependencies(field);
16523 self
16524 }
16525 pub fn lamport_version_opt_mut(&mut self) -> Option<&mut u64> {
16527 self.lamport_version.as_mut().map(|field| field as _)
16528 }
16529 pub fn lamport_version_mut(&mut self) -> &mut u64 {
16532 self.lamport_version.get_or_insert_default()
16533 }
16534 pub fn lamport_version_opt(&self) -> Option<u64> {
16536 self.lamport_version.as_ref().map(|field| *field)
16537 }
16538 pub fn set_lamport_version(&mut self, field: u64) {
16540 self.lamport_version = Some(field);
16541 }
16542 pub fn with_lamport_version(mut self, field: u64) -> Self {
16544 self.set_lamport_version(field);
16545 self
16546 }
16547 pub fn changed_objects(&self) -> &[super::ChangedObject] {
16549 &self.changed_objects
16550 }
16551 pub fn changed_objects_mut(&mut self) -> &mut Vec<super::ChangedObject> {
16554 &mut self.changed_objects
16555 }
16556 pub fn set_changed_objects(&mut self, field: Vec<super::ChangedObject>) {
16558 self.changed_objects = field;
16559 }
16560 pub fn with_changed_objects(mut self, field: Vec<super::ChangedObject>) -> Self {
16562 self.set_changed_objects(field);
16563 self
16564 }
16565 pub fn unchanged_consensus_objects(&self) -> &[super::UnchangedConsensusObject] {
16567 &self.unchanged_consensus_objects
16568 }
16569 pub fn unchanged_consensus_objects_mut(
16572 &mut self,
16573 ) -> &mut Vec<super::UnchangedConsensusObject> {
16574 &mut self.unchanged_consensus_objects
16575 }
16576 pub fn set_unchanged_consensus_objects(
16578 &mut self,
16579 field: Vec<super::UnchangedConsensusObject>,
16580 ) {
16581 self.unchanged_consensus_objects = field;
16582 }
16583 pub fn with_unchanged_consensus_objects(
16585 mut self,
16586 field: Vec<super::UnchangedConsensusObject>,
16587 ) -> Self {
16588 self.set_unchanged_consensus_objects(field);
16589 self
16590 }
16591 pub fn auxiliary_data_digest_opt_mut(&mut self) -> Option<&mut String> {
16593 self.auxiliary_data_digest.as_mut().map(|field| field as _)
16594 }
16595 pub fn auxiliary_data_digest_mut(&mut self) -> &mut String {
16598 self.auxiliary_data_digest.get_or_insert_default()
16599 }
16600 pub fn auxiliary_data_digest_opt(&self) -> Option<&str> {
16602 self.auxiliary_data_digest.as_ref().map(|field| field as _)
16603 }
16604 pub fn set_auxiliary_data_digest<T: Into<String>>(&mut self, field: T) {
16606 self.auxiliary_data_digest = Some(field.into().into());
16607 }
16608 pub fn with_auxiliary_data_digest<T: Into<String>>(mut self, field: T) -> Self {
16610 self.set_auxiliary_data_digest(field.into());
16611 self
16612 }
16613 pub fn unchanged_loaded_runtime_objects(&self) -> &[super::ObjectReference] {
16615 &self.unchanged_loaded_runtime_objects
16616 }
16617 pub fn unchanged_loaded_runtime_objects_mut(
16620 &mut self,
16621 ) -> &mut Vec<super::ObjectReference> {
16622 &mut self.unchanged_loaded_runtime_objects
16623 }
16624 pub fn set_unchanged_loaded_runtime_objects(
16626 &mut self,
16627 field: Vec<super::ObjectReference>,
16628 ) {
16629 self.unchanged_loaded_runtime_objects = field;
16630 }
16631 pub fn with_unchanged_loaded_runtime_objects(
16633 mut self,
16634 field: Vec<super::ObjectReference>,
16635 ) -> Self {
16636 self.set_unchanged_loaded_runtime_objects(field);
16637 self
16638 }
16639 }
16640 impl super::TransactionEvents {
16641 pub const fn const_default() -> Self {
16642 Self {
16643 bcs: None,
16644 digest: None,
16645 events: Vec::new(),
16646 }
16647 }
16648 #[doc(hidden)]
16649 pub fn default_instance() -> &'static Self {
16650 static DEFAULT: super::TransactionEvents = super::TransactionEvents::const_default();
16651 &DEFAULT
16652 }
16653 pub fn bcs(&self) -> &super::Bcs {
16655 self.bcs
16656 .as_ref()
16657 .map(|field| field as _)
16658 .unwrap_or_else(|| super::Bcs::default_instance() as _)
16659 }
16660 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
16662 self.bcs.as_mut().map(|field| field as _)
16663 }
16664 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
16667 self.bcs.get_or_insert_default()
16668 }
16669 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
16671 self.bcs.as_ref().map(|field| field as _)
16672 }
16673 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
16675 self.bcs = Some(field.into().into());
16676 }
16677 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
16679 self.set_bcs(field.into());
16680 self
16681 }
16682 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
16684 self.digest.as_mut().map(|field| field as _)
16685 }
16686 pub fn digest_mut(&mut self) -> &mut String {
16689 self.digest.get_or_insert_default()
16690 }
16691 pub fn digest_opt(&self) -> Option<&str> {
16693 self.digest.as_ref().map(|field| field as _)
16694 }
16695 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
16697 self.digest = Some(field.into().into());
16698 }
16699 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
16701 self.set_digest(field.into());
16702 self
16703 }
16704 pub fn events(&self) -> &[super::Event] {
16706 &self.events
16707 }
16708 pub fn events_mut(&mut self) -> &mut Vec<super::Event> {
16711 &mut self.events
16712 }
16713 pub fn set_events(&mut self, field: Vec<super::Event>) {
16715 self.events = field;
16716 }
16717 pub fn with_events(mut self, field: Vec<super::Event>) -> Self {
16719 self.set_events(field);
16720 self
16721 }
16722 }
16723 impl super::TransactionExpiration {
16724 pub const fn const_default() -> Self {
16725 Self {
16726 kind: None,
16727 epoch: None,
16728 min_epoch: None,
16729 min_timestamp: None,
16730 max_timestamp: None,
16731 chain: None,
16732 nonce: None,
16733 }
16734 }
16735 #[doc(hidden)]
16736 pub fn default_instance() -> &'static Self {
16737 static DEFAULT: super::TransactionExpiration = super::TransactionExpiration::const_default();
16738 &DEFAULT
16739 }
16740 pub fn with_kind<
16742 T: Into<super::transaction_expiration::TransactionExpirationKind>,
16743 >(mut self, field: T) -> Self {
16744 self.set_kind(field.into());
16745 self
16746 }
16747 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
16749 self.epoch.as_mut().map(|field| field as _)
16750 }
16751 pub fn epoch_mut(&mut self) -> &mut u64 {
16754 self.epoch.get_or_insert_default()
16755 }
16756 pub fn epoch_opt(&self) -> Option<u64> {
16758 self.epoch.as_ref().map(|field| *field)
16759 }
16760 pub fn set_epoch(&mut self, field: u64) {
16762 self.epoch = Some(field);
16763 }
16764 pub fn with_epoch(mut self, field: u64) -> Self {
16766 self.set_epoch(field);
16767 self
16768 }
16769 pub fn min_epoch_opt_mut(&mut self) -> Option<&mut u64> {
16771 self.min_epoch.as_mut().map(|field| field as _)
16772 }
16773 pub fn min_epoch_mut(&mut self) -> &mut u64 {
16776 self.min_epoch.get_or_insert_default()
16777 }
16778 pub fn min_epoch_opt(&self) -> Option<u64> {
16780 self.min_epoch.as_ref().map(|field| *field)
16781 }
16782 pub fn set_min_epoch(&mut self, field: u64) {
16784 self.min_epoch = Some(field);
16785 }
16786 pub fn with_min_epoch(mut self, field: u64) -> Self {
16788 self.set_min_epoch(field);
16789 self
16790 }
16791 pub fn min_timestamp_opt_mut(
16793 &mut self,
16794 ) -> Option<&mut ::prost_types::Timestamp> {
16795 self.min_timestamp.as_mut().map(|field| field as _)
16796 }
16797 pub fn min_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
16800 self.min_timestamp.get_or_insert_default()
16801 }
16802 pub fn min_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
16804 self.min_timestamp.as_ref().map(|field| field as _)
16805 }
16806 pub fn set_min_timestamp<T: Into<::prost_types::Timestamp>>(
16808 &mut self,
16809 field: T,
16810 ) {
16811 self.min_timestamp = Some(field.into().into());
16812 }
16813 pub fn with_min_timestamp<T: Into<::prost_types::Timestamp>>(
16815 mut self,
16816 field: T,
16817 ) -> Self {
16818 self.set_min_timestamp(field.into());
16819 self
16820 }
16821 pub fn max_timestamp_opt_mut(
16823 &mut self,
16824 ) -> Option<&mut ::prost_types::Timestamp> {
16825 self.max_timestamp.as_mut().map(|field| field as _)
16826 }
16827 pub fn max_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
16830 self.max_timestamp.get_or_insert_default()
16831 }
16832 pub fn max_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
16834 self.max_timestamp.as_ref().map(|field| field as _)
16835 }
16836 pub fn set_max_timestamp<T: Into<::prost_types::Timestamp>>(
16838 &mut self,
16839 field: T,
16840 ) {
16841 self.max_timestamp = Some(field.into().into());
16842 }
16843 pub fn with_max_timestamp<T: Into<::prost_types::Timestamp>>(
16845 mut self,
16846 field: T,
16847 ) -> Self {
16848 self.set_max_timestamp(field.into());
16849 self
16850 }
16851 pub fn chain_opt_mut(&mut self) -> Option<&mut String> {
16853 self.chain.as_mut().map(|field| field as _)
16854 }
16855 pub fn chain_mut(&mut self) -> &mut String {
16858 self.chain.get_or_insert_default()
16859 }
16860 pub fn chain_opt(&self) -> Option<&str> {
16862 self.chain.as_ref().map(|field| field as _)
16863 }
16864 pub fn set_chain<T: Into<String>>(&mut self, field: T) {
16866 self.chain = Some(field.into().into());
16867 }
16868 pub fn with_chain<T: Into<String>>(mut self, field: T) -> Self {
16870 self.set_chain(field.into());
16871 self
16872 }
16873 pub fn nonce_opt_mut(&mut self) -> Option<&mut u32> {
16875 self.nonce.as_mut().map(|field| field as _)
16876 }
16877 pub fn nonce_mut(&mut self) -> &mut u32 {
16880 self.nonce.get_or_insert_default()
16881 }
16882 pub fn nonce_opt(&self) -> Option<u32> {
16884 self.nonce.as_ref().map(|field| *field)
16885 }
16886 pub fn set_nonce(&mut self, field: u32) {
16888 self.nonce = Some(field);
16889 }
16890 pub fn with_nonce(mut self, field: u32) -> Self {
16892 self.set_nonce(field);
16893 self
16894 }
16895 }
16896 impl super::TransactionFilter {
16897 pub const fn const_default() -> Self {
16898 Self { terms: Vec::new() }
16899 }
16900 #[doc(hidden)]
16901 pub fn default_instance() -> &'static Self {
16902 static DEFAULT: super::TransactionFilter = super::TransactionFilter::const_default();
16903 &DEFAULT
16904 }
16905 pub fn terms(&self) -> &[super::TransactionTerm] {
16907 &self.terms
16908 }
16909 pub fn terms_mut(&mut self) -> &mut Vec<super::TransactionTerm> {
16912 &mut self.terms
16913 }
16914 pub fn set_terms(&mut self, field: Vec<super::TransactionTerm>) {
16916 self.terms = field;
16917 }
16918 pub fn with_terms(mut self, field: Vec<super::TransactionTerm>) -> Self {
16920 self.set_terms(field);
16921 self
16922 }
16923 }
16924 impl super::TransactionKind {
16925 pub const fn const_default() -> Self {
16926 Self { kind: None, data: None }
16927 }
16928 #[doc(hidden)]
16929 pub fn default_instance() -> &'static Self {
16930 static DEFAULT: super::TransactionKind = super::TransactionKind::const_default();
16931 &DEFAULT
16932 }
16933 pub fn with_kind<T: Into<super::transaction_kind::Kind>>(
16935 mut self,
16936 field: T,
16937 ) -> Self {
16938 self.set_kind(field.into());
16939 self
16940 }
16941 pub fn programmable_transaction(&self) -> &super::ProgrammableTransaction {
16943 if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &self
16944 .data
16945 {
16946 field as _
16947 } else {
16948 super::ProgrammableTransaction::default_instance() as _
16949 }
16950 }
16951 pub fn programmable_transaction_opt(
16953 &self,
16954 ) -> Option<&super::ProgrammableTransaction> {
16955 if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &self
16956 .data
16957 {
16958 Some(field as _)
16959 } else {
16960 None
16961 }
16962 }
16963 pub fn programmable_transaction_opt_mut(
16965 &mut self,
16966 ) -> Option<&mut super::ProgrammableTransaction> {
16967 if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &mut self
16968 .data
16969 {
16970 Some(field as _)
16971 } else {
16972 None
16973 }
16974 }
16975 pub fn programmable_transaction_mut(
16979 &mut self,
16980 ) -> &mut super::ProgrammableTransaction {
16981 if self.programmable_transaction_opt_mut().is_none() {
16982 self.data = Some(
16983 super::transaction_kind::Data::ProgrammableTransaction(
16984 super::ProgrammableTransaction::default(),
16985 ),
16986 );
16987 }
16988 self.programmable_transaction_opt_mut().unwrap()
16989 }
16990 pub fn set_programmable_transaction<T: Into<super::ProgrammableTransaction>>(
16993 &mut self,
16994 field: T,
16995 ) {
16996 self.data = Some(
16997 super::transaction_kind::Data::ProgrammableTransaction(
16998 field.into().into(),
16999 ),
17000 );
17001 }
17002 pub fn with_programmable_transaction<T: Into<super::ProgrammableTransaction>>(
17005 mut self,
17006 field: T,
17007 ) -> Self {
17008 self.set_programmable_transaction(field.into());
17009 self
17010 }
17011 pub fn change_epoch(&self) -> &super::ChangeEpoch {
17013 if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &self.data {
17014 field as _
17015 } else {
17016 super::ChangeEpoch::default_instance() as _
17017 }
17018 }
17019 pub fn change_epoch_opt(&self) -> Option<&super::ChangeEpoch> {
17021 if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &self.data {
17022 Some(field as _)
17023 } else {
17024 None
17025 }
17026 }
17027 pub fn change_epoch_opt_mut(&mut self) -> Option<&mut super::ChangeEpoch> {
17029 if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &mut self
17030 .data
17031 {
17032 Some(field as _)
17033 } else {
17034 None
17035 }
17036 }
17037 pub fn change_epoch_mut(&mut self) -> &mut super::ChangeEpoch {
17041 if self.change_epoch_opt_mut().is_none() {
17042 self.data = Some(
17043 super::transaction_kind::Data::ChangeEpoch(
17044 super::ChangeEpoch::default(),
17045 ),
17046 );
17047 }
17048 self.change_epoch_opt_mut().unwrap()
17049 }
17050 pub fn set_change_epoch<T: Into<super::ChangeEpoch>>(&mut self, field: T) {
17053 self.data = Some(
17054 super::transaction_kind::Data::ChangeEpoch(field.into().into()),
17055 );
17056 }
17057 pub fn with_change_epoch<T: Into<super::ChangeEpoch>>(
17060 mut self,
17061 field: T,
17062 ) -> Self {
17063 self.set_change_epoch(field.into());
17064 self
17065 }
17066 pub fn genesis(&self) -> &super::GenesisTransaction {
17068 if let Some(super::transaction_kind::Data::Genesis(field)) = &self.data {
17069 field as _
17070 } else {
17071 super::GenesisTransaction::default_instance() as _
17072 }
17073 }
17074 pub fn genesis_opt(&self) -> Option<&super::GenesisTransaction> {
17076 if let Some(super::transaction_kind::Data::Genesis(field)) = &self.data {
17077 Some(field as _)
17078 } else {
17079 None
17080 }
17081 }
17082 pub fn genesis_opt_mut(&mut self) -> Option<&mut super::GenesisTransaction> {
17084 if let Some(super::transaction_kind::Data::Genesis(field)) = &mut self.data {
17085 Some(field as _)
17086 } else {
17087 None
17088 }
17089 }
17090 pub fn genesis_mut(&mut self) -> &mut super::GenesisTransaction {
17094 if self.genesis_opt_mut().is_none() {
17095 self.data = Some(
17096 super::transaction_kind::Data::Genesis(
17097 super::GenesisTransaction::default(),
17098 ),
17099 );
17100 }
17101 self.genesis_opt_mut().unwrap()
17102 }
17103 pub fn set_genesis<T: Into<super::GenesisTransaction>>(&mut self, field: T) {
17106 self.data = Some(
17107 super::transaction_kind::Data::Genesis(field.into().into()),
17108 );
17109 }
17110 pub fn with_genesis<T: Into<super::GenesisTransaction>>(
17113 mut self,
17114 field: T,
17115 ) -> Self {
17116 self.set_genesis(field.into());
17117 self
17118 }
17119 pub fn consensus_commit_prologue(&self) -> &super::ConsensusCommitPrologue {
17121 if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &self
17122 .data
17123 {
17124 field as _
17125 } else {
17126 super::ConsensusCommitPrologue::default_instance() as _
17127 }
17128 }
17129 pub fn consensus_commit_prologue_opt(
17131 &self,
17132 ) -> Option<&super::ConsensusCommitPrologue> {
17133 if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &self
17134 .data
17135 {
17136 Some(field as _)
17137 } else {
17138 None
17139 }
17140 }
17141 pub fn consensus_commit_prologue_opt_mut(
17143 &mut self,
17144 ) -> Option<&mut super::ConsensusCommitPrologue> {
17145 if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &mut self
17146 .data
17147 {
17148 Some(field as _)
17149 } else {
17150 None
17151 }
17152 }
17153 pub fn consensus_commit_prologue_mut(
17157 &mut self,
17158 ) -> &mut super::ConsensusCommitPrologue {
17159 if self.consensus_commit_prologue_opt_mut().is_none() {
17160 self.data = Some(
17161 super::transaction_kind::Data::ConsensusCommitPrologue(
17162 super::ConsensusCommitPrologue::default(),
17163 ),
17164 );
17165 }
17166 self.consensus_commit_prologue_opt_mut().unwrap()
17167 }
17168 pub fn set_consensus_commit_prologue<T: Into<super::ConsensusCommitPrologue>>(
17171 &mut self,
17172 field: T,
17173 ) {
17174 self.data = Some(
17175 super::transaction_kind::Data::ConsensusCommitPrologue(
17176 field.into().into(),
17177 ),
17178 );
17179 }
17180 pub fn with_consensus_commit_prologue<T: Into<super::ConsensusCommitPrologue>>(
17183 mut self,
17184 field: T,
17185 ) -> Self {
17186 self.set_consensus_commit_prologue(field.into());
17187 self
17188 }
17189 pub fn authenticator_state_update(&self) -> &super::AuthenticatorStateUpdate {
17191 if let Some(
17192 super::transaction_kind::Data::AuthenticatorStateUpdate(field),
17193 ) = &self.data
17194 {
17195 field as _
17196 } else {
17197 super::AuthenticatorStateUpdate::default_instance() as _
17198 }
17199 }
17200 pub fn authenticator_state_update_opt(
17202 &self,
17203 ) -> Option<&super::AuthenticatorStateUpdate> {
17204 if let Some(
17205 super::transaction_kind::Data::AuthenticatorStateUpdate(field),
17206 ) = &self.data
17207 {
17208 Some(field as _)
17209 } else {
17210 None
17211 }
17212 }
17213 pub fn authenticator_state_update_opt_mut(
17215 &mut self,
17216 ) -> Option<&mut super::AuthenticatorStateUpdate> {
17217 if let Some(
17218 super::transaction_kind::Data::AuthenticatorStateUpdate(field),
17219 ) = &mut self.data
17220 {
17221 Some(field as _)
17222 } else {
17223 None
17224 }
17225 }
17226 pub fn authenticator_state_update_mut(
17230 &mut self,
17231 ) -> &mut super::AuthenticatorStateUpdate {
17232 if self.authenticator_state_update_opt_mut().is_none() {
17233 self.data = Some(
17234 super::transaction_kind::Data::AuthenticatorStateUpdate(
17235 super::AuthenticatorStateUpdate::default(),
17236 ),
17237 );
17238 }
17239 self.authenticator_state_update_opt_mut().unwrap()
17240 }
17241 pub fn set_authenticator_state_update<T: Into<super::AuthenticatorStateUpdate>>(
17244 &mut self,
17245 field: T,
17246 ) {
17247 self.data = Some(
17248 super::transaction_kind::Data::AuthenticatorStateUpdate(
17249 field.into().into(),
17250 ),
17251 );
17252 }
17253 pub fn with_authenticator_state_update<T: Into<super::AuthenticatorStateUpdate>>(
17256 mut self,
17257 field: T,
17258 ) -> Self {
17259 self.set_authenticator_state_update(field.into());
17260 self
17261 }
17262 pub fn end_of_epoch(&self) -> &super::EndOfEpochTransaction {
17264 if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &self.data {
17265 field as _
17266 } else {
17267 super::EndOfEpochTransaction::default_instance() as _
17268 }
17269 }
17270 pub fn end_of_epoch_opt(&self) -> Option<&super::EndOfEpochTransaction> {
17272 if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &self.data {
17273 Some(field as _)
17274 } else {
17275 None
17276 }
17277 }
17278 pub fn end_of_epoch_opt_mut(
17280 &mut self,
17281 ) -> Option<&mut super::EndOfEpochTransaction> {
17282 if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &mut self
17283 .data
17284 {
17285 Some(field as _)
17286 } else {
17287 None
17288 }
17289 }
17290 pub fn end_of_epoch_mut(&mut self) -> &mut super::EndOfEpochTransaction {
17294 if self.end_of_epoch_opt_mut().is_none() {
17295 self.data = Some(
17296 super::transaction_kind::Data::EndOfEpoch(
17297 super::EndOfEpochTransaction::default(),
17298 ),
17299 );
17300 }
17301 self.end_of_epoch_opt_mut().unwrap()
17302 }
17303 pub fn set_end_of_epoch<T: Into<super::EndOfEpochTransaction>>(
17306 &mut self,
17307 field: T,
17308 ) {
17309 self.data = Some(
17310 super::transaction_kind::Data::EndOfEpoch(field.into().into()),
17311 );
17312 }
17313 pub fn with_end_of_epoch<T: Into<super::EndOfEpochTransaction>>(
17316 mut self,
17317 field: T,
17318 ) -> Self {
17319 self.set_end_of_epoch(field.into());
17320 self
17321 }
17322 pub fn randomness_state_update(&self) -> &super::RandomnessStateUpdate {
17324 if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &self
17325 .data
17326 {
17327 field as _
17328 } else {
17329 super::RandomnessStateUpdate::default_instance() as _
17330 }
17331 }
17332 pub fn randomness_state_update_opt(
17334 &self,
17335 ) -> Option<&super::RandomnessStateUpdate> {
17336 if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &self
17337 .data
17338 {
17339 Some(field as _)
17340 } else {
17341 None
17342 }
17343 }
17344 pub fn randomness_state_update_opt_mut(
17346 &mut self,
17347 ) -> Option<&mut super::RandomnessStateUpdate> {
17348 if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &mut self
17349 .data
17350 {
17351 Some(field as _)
17352 } else {
17353 None
17354 }
17355 }
17356 pub fn randomness_state_update_mut(
17360 &mut self,
17361 ) -> &mut super::RandomnessStateUpdate {
17362 if self.randomness_state_update_opt_mut().is_none() {
17363 self.data = Some(
17364 super::transaction_kind::Data::RandomnessStateUpdate(
17365 super::RandomnessStateUpdate::default(),
17366 ),
17367 );
17368 }
17369 self.randomness_state_update_opt_mut().unwrap()
17370 }
17371 pub fn set_randomness_state_update<T: Into<super::RandomnessStateUpdate>>(
17374 &mut self,
17375 field: T,
17376 ) {
17377 self.data = Some(
17378 super::transaction_kind::Data::RandomnessStateUpdate(field.into().into()),
17379 );
17380 }
17381 pub fn with_randomness_state_update<T: Into<super::RandomnessStateUpdate>>(
17384 mut self,
17385 field: T,
17386 ) -> Self {
17387 self.set_randomness_state_update(field.into());
17388 self
17389 }
17390 }
17391 impl super::TransactionLiteral {
17392 pub const fn const_default() -> Self {
17393 Self {
17394 negated: false,
17395 predicate: None,
17396 }
17397 }
17398 #[doc(hidden)]
17399 pub fn default_instance() -> &'static Self {
17400 static DEFAULT: super::TransactionLiteral = super::TransactionLiteral::const_default();
17401 &DEFAULT
17402 }
17403 pub fn negated_mut(&mut self) -> &mut bool {
17406 &mut self.negated
17407 }
17408 pub fn set_negated(&mut self, field: bool) {
17410 self.negated = field;
17411 }
17412 pub fn with_negated(mut self, field: bool) -> Self {
17414 self.set_negated(field);
17415 self
17416 }
17417 pub fn sender(&self) -> &super::SenderFilter {
17419 if let Some(super::transaction_literal::Predicate::Sender(field)) = &self
17420 .predicate
17421 {
17422 field as _
17423 } else {
17424 super::SenderFilter::default_instance() as _
17425 }
17426 }
17427 pub fn sender_opt(&self) -> Option<&super::SenderFilter> {
17429 if let Some(super::transaction_literal::Predicate::Sender(field)) = &self
17430 .predicate
17431 {
17432 Some(field as _)
17433 } else {
17434 None
17435 }
17436 }
17437 pub fn sender_opt_mut(&mut self) -> Option<&mut super::SenderFilter> {
17439 if let Some(super::transaction_literal::Predicate::Sender(field)) = &mut self
17440 .predicate
17441 {
17442 Some(field as _)
17443 } else {
17444 None
17445 }
17446 }
17447 pub fn sender_mut(&mut self) -> &mut super::SenderFilter {
17451 if self.sender_opt_mut().is_none() {
17452 self.predicate = Some(
17453 super::transaction_literal::Predicate::Sender(
17454 super::SenderFilter::default(),
17455 ),
17456 );
17457 }
17458 self.sender_opt_mut().unwrap()
17459 }
17460 pub fn set_sender<T: Into<super::SenderFilter>>(&mut self, field: T) {
17463 self.predicate = Some(
17464 super::transaction_literal::Predicate::Sender(field.into().into()),
17465 );
17466 }
17467 pub fn with_sender<T: Into<super::SenderFilter>>(mut self, field: T) -> Self {
17470 self.set_sender(field.into());
17471 self
17472 }
17473 pub fn affected_address(&self) -> &super::AffectedAddressFilter {
17475 if let Some(super::transaction_literal::Predicate::AffectedAddress(field)) = &self
17476 .predicate
17477 {
17478 field as _
17479 } else {
17480 super::AffectedAddressFilter::default_instance() as _
17481 }
17482 }
17483 pub fn affected_address_opt(&self) -> Option<&super::AffectedAddressFilter> {
17485 if let Some(super::transaction_literal::Predicate::AffectedAddress(field)) = &self
17486 .predicate
17487 {
17488 Some(field as _)
17489 } else {
17490 None
17491 }
17492 }
17493 pub fn affected_address_opt_mut(
17495 &mut self,
17496 ) -> Option<&mut super::AffectedAddressFilter> {
17497 if let Some(super::transaction_literal::Predicate::AffectedAddress(field)) = &mut self
17498 .predicate
17499 {
17500 Some(field as _)
17501 } else {
17502 None
17503 }
17504 }
17505 pub fn affected_address_mut(&mut self) -> &mut super::AffectedAddressFilter {
17509 if self.affected_address_opt_mut().is_none() {
17510 self.predicate = Some(
17511 super::transaction_literal::Predicate::AffectedAddress(
17512 super::AffectedAddressFilter::default(),
17513 ),
17514 );
17515 }
17516 self.affected_address_opt_mut().unwrap()
17517 }
17518 pub fn set_affected_address<T: Into<super::AffectedAddressFilter>>(
17521 &mut self,
17522 field: T,
17523 ) {
17524 self.predicate = Some(
17525 super::transaction_literal::Predicate::AffectedAddress(
17526 field.into().into(),
17527 ),
17528 );
17529 }
17530 pub fn with_affected_address<T: Into<super::AffectedAddressFilter>>(
17533 mut self,
17534 field: T,
17535 ) -> Self {
17536 self.set_affected_address(field.into());
17537 self
17538 }
17539 pub fn affected_object(&self) -> &super::AffectedObjectFilter {
17541 if let Some(super::transaction_literal::Predicate::AffectedObject(field)) = &self
17542 .predicate
17543 {
17544 field as _
17545 } else {
17546 super::AffectedObjectFilter::default_instance() as _
17547 }
17548 }
17549 pub fn affected_object_opt(&self) -> Option<&super::AffectedObjectFilter> {
17551 if let Some(super::transaction_literal::Predicate::AffectedObject(field)) = &self
17552 .predicate
17553 {
17554 Some(field as _)
17555 } else {
17556 None
17557 }
17558 }
17559 pub fn affected_object_opt_mut(
17561 &mut self,
17562 ) -> Option<&mut super::AffectedObjectFilter> {
17563 if let Some(super::transaction_literal::Predicate::AffectedObject(field)) = &mut self
17564 .predicate
17565 {
17566 Some(field as _)
17567 } else {
17568 None
17569 }
17570 }
17571 pub fn affected_object_mut(&mut self) -> &mut super::AffectedObjectFilter {
17575 if self.affected_object_opt_mut().is_none() {
17576 self.predicate = Some(
17577 super::transaction_literal::Predicate::AffectedObject(
17578 super::AffectedObjectFilter::default(),
17579 ),
17580 );
17581 }
17582 self.affected_object_opt_mut().unwrap()
17583 }
17584 pub fn set_affected_object<T: Into<super::AffectedObjectFilter>>(
17587 &mut self,
17588 field: T,
17589 ) {
17590 self.predicate = Some(
17591 super::transaction_literal::Predicate::AffectedObject(
17592 field.into().into(),
17593 ),
17594 );
17595 }
17596 pub fn with_affected_object<T: Into<super::AffectedObjectFilter>>(
17599 mut self,
17600 field: T,
17601 ) -> Self {
17602 self.set_affected_object(field.into());
17603 self
17604 }
17605 pub fn move_call(&self) -> &super::MoveCallFilter {
17607 if let Some(super::transaction_literal::Predicate::MoveCall(field)) = &self
17608 .predicate
17609 {
17610 field as _
17611 } else {
17612 super::MoveCallFilter::default_instance() as _
17613 }
17614 }
17615 pub fn move_call_opt(&self) -> Option<&super::MoveCallFilter> {
17617 if let Some(super::transaction_literal::Predicate::MoveCall(field)) = &self
17618 .predicate
17619 {
17620 Some(field as _)
17621 } else {
17622 None
17623 }
17624 }
17625 pub fn move_call_opt_mut(&mut self) -> Option<&mut super::MoveCallFilter> {
17627 if let Some(super::transaction_literal::Predicate::MoveCall(field)) = &mut self
17628 .predicate
17629 {
17630 Some(field as _)
17631 } else {
17632 None
17633 }
17634 }
17635 pub fn move_call_mut(&mut self) -> &mut super::MoveCallFilter {
17639 if self.move_call_opt_mut().is_none() {
17640 self.predicate = Some(
17641 super::transaction_literal::Predicate::MoveCall(
17642 super::MoveCallFilter::default(),
17643 ),
17644 );
17645 }
17646 self.move_call_opt_mut().unwrap()
17647 }
17648 pub fn set_move_call<T: Into<super::MoveCallFilter>>(&mut self, field: T) {
17651 self.predicate = Some(
17652 super::transaction_literal::Predicate::MoveCall(field.into().into()),
17653 );
17654 }
17655 pub fn with_move_call<T: Into<super::MoveCallFilter>>(
17658 mut self,
17659 field: T,
17660 ) -> Self {
17661 self.set_move_call(field.into());
17662 self
17663 }
17664 pub fn emit_module(&self) -> &super::EmitModuleFilter {
17666 if let Some(super::transaction_literal::Predicate::EmitModule(field)) = &self
17667 .predicate
17668 {
17669 field as _
17670 } else {
17671 super::EmitModuleFilter::default_instance() as _
17672 }
17673 }
17674 pub fn emit_module_opt(&self) -> Option<&super::EmitModuleFilter> {
17676 if let Some(super::transaction_literal::Predicate::EmitModule(field)) = &self
17677 .predicate
17678 {
17679 Some(field as _)
17680 } else {
17681 None
17682 }
17683 }
17684 pub fn emit_module_opt_mut(&mut self) -> Option<&mut super::EmitModuleFilter> {
17686 if let Some(super::transaction_literal::Predicate::EmitModule(field)) = &mut self
17687 .predicate
17688 {
17689 Some(field as _)
17690 } else {
17691 None
17692 }
17693 }
17694 pub fn emit_module_mut(&mut self) -> &mut super::EmitModuleFilter {
17698 if self.emit_module_opt_mut().is_none() {
17699 self.predicate = Some(
17700 super::transaction_literal::Predicate::EmitModule(
17701 super::EmitModuleFilter::default(),
17702 ),
17703 );
17704 }
17705 self.emit_module_opt_mut().unwrap()
17706 }
17707 pub fn set_emit_module<T: Into<super::EmitModuleFilter>>(&mut self, field: T) {
17710 self.predicate = Some(
17711 super::transaction_literal::Predicate::EmitModule(field.into().into()),
17712 );
17713 }
17714 pub fn with_emit_module<T: Into<super::EmitModuleFilter>>(
17717 mut self,
17718 field: T,
17719 ) -> Self {
17720 self.set_emit_module(field.into());
17721 self
17722 }
17723 pub fn event_type(&self) -> &super::EventTypeFilter {
17725 if let Some(super::transaction_literal::Predicate::EventType(field)) = &self
17726 .predicate
17727 {
17728 field as _
17729 } else {
17730 super::EventTypeFilter::default_instance() as _
17731 }
17732 }
17733 pub fn event_type_opt(&self) -> Option<&super::EventTypeFilter> {
17735 if let Some(super::transaction_literal::Predicate::EventType(field)) = &self
17736 .predicate
17737 {
17738 Some(field as _)
17739 } else {
17740 None
17741 }
17742 }
17743 pub fn event_type_opt_mut(&mut self) -> Option<&mut super::EventTypeFilter> {
17745 if let Some(super::transaction_literal::Predicate::EventType(field)) = &mut self
17746 .predicate
17747 {
17748 Some(field as _)
17749 } else {
17750 None
17751 }
17752 }
17753 pub fn event_type_mut(&mut self) -> &mut super::EventTypeFilter {
17757 if self.event_type_opt_mut().is_none() {
17758 self.predicate = Some(
17759 super::transaction_literal::Predicate::EventType(
17760 super::EventTypeFilter::default(),
17761 ),
17762 );
17763 }
17764 self.event_type_opt_mut().unwrap()
17765 }
17766 pub fn set_event_type<T: Into<super::EventTypeFilter>>(&mut self, field: T) {
17769 self.predicate = Some(
17770 super::transaction_literal::Predicate::EventType(field.into().into()),
17771 );
17772 }
17773 pub fn with_event_type<T: Into<super::EventTypeFilter>>(
17776 mut self,
17777 field: T,
17778 ) -> Self {
17779 self.set_event_type(field.into());
17780 self
17781 }
17782 pub fn event_stream_head(&self) -> &super::EventStreamHeadFilter {
17784 if let Some(super::transaction_literal::Predicate::EventStreamHead(field)) = &self
17785 .predicate
17786 {
17787 field as _
17788 } else {
17789 super::EventStreamHeadFilter::default_instance() as _
17790 }
17791 }
17792 pub fn event_stream_head_opt(&self) -> Option<&super::EventStreamHeadFilter> {
17794 if let Some(super::transaction_literal::Predicate::EventStreamHead(field)) = &self
17795 .predicate
17796 {
17797 Some(field as _)
17798 } else {
17799 None
17800 }
17801 }
17802 pub fn event_stream_head_opt_mut(
17804 &mut self,
17805 ) -> Option<&mut super::EventStreamHeadFilter> {
17806 if let Some(super::transaction_literal::Predicate::EventStreamHead(field)) = &mut self
17807 .predicate
17808 {
17809 Some(field as _)
17810 } else {
17811 None
17812 }
17813 }
17814 pub fn event_stream_head_mut(&mut self) -> &mut super::EventStreamHeadFilter {
17818 if self.event_stream_head_opt_mut().is_none() {
17819 self.predicate = Some(
17820 super::transaction_literal::Predicate::EventStreamHead(
17821 super::EventStreamHeadFilter::default(),
17822 ),
17823 );
17824 }
17825 self.event_stream_head_opt_mut().unwrap()
17826 }
17827 pub fn set_event_stream_head<T: Into<super::EventStreamHeadFilter>>(
17830 &mut self,
17831 field: T,
17832 ) {
17833 self.predicate = Some(
17834 super::transaction_literal::Predicate::EventStreamHead(
17835 field.into().into(),
17836 ),
17837 );
17838 }
17839 pub fn with_event_stream_head<T: Into<super::EventStreamHeadFilter>>(
17842 mut self,
17843 field: T,
17844 ) -> Self {
17845 self.set_event_stream_head(field.into());
17846 self
17847 }
17848 pub fn package_write(&self) -> &super::PackageWriteFilter {
17850 if let Some(super::transaction_literal::Predicate::PackageWrite(field)) = &self
17851 .predicate
17852 {
17853 field as _
17854 } else {
17855 super::PackageWriteFilter::default_instance() as _
17856 }
17857 }
17858 pub fn package_write_opt(&self) -> Option<&super::PackageWriteFilter> {
17860 if let Some(super::transaction_literal::Predicate::PackageWrite(field)) = &self
17861 .predicate
17862 {
17863 Some(field as _)
17864 } else {
17865 None
17866 }
17867 }
17868 pub fn package_write_opt_mut(
17870 &mut self,
17871 ) -> Option<&mut super::PackageWriteFilter> {
17872 if let Some(super::transaction_literal::Predicate::PackageWrite(field)) = &mut self
17873 .predicate
17874 {
17875 Some(field as _)
17876 } else {
17877 None
17878 }
17879 }
17880 pub fn package_write_mut(&mut self) -> &mut super::PackageWriteFilter {
17884 if self.package_write_opt_mut().is_none() {
17885 self.predicate = Some(
17886 super::transaction_literal::Predicate::PackageWrite(
17887 super::PackageWriteFilter::default(),
17888 ),
17889 );
17890 }
17891 self.package_write_opt_mut().unwrap()
17892 }
17893 pub fn set_package_write<T: Into<super::PackageWriteFilter>>(
17896 &mut self,
17897 field: T,
17898 ) {
17899 self.predicate = Some(
17900 super::transaction_literal::Predicate::PackageWrite(field.into().into()),
17901 );
17902 }
17903 pub fn with_package_write<T: Into<super::PackageWriteFilter>>(
17906 mut self,
17907 field: T,
17908 ) -> Self {
17909 self.set_package_write(field.into());
17910 self
17911 }
17912 }
17913 impl super::TransactionTerm {
17914 pub const fn const_default() -> Self {
17915 Self { literals: Vec::new() }
17916 }
17917 #[doc(hidden)]
17918 pub fn default_instance() -> &'static Self {
17919 static DEFAULT: super::TransactionTerm = super::TransactionTerm::const_default();
17920 &DEFAULT
17921 }
17922 pub fn literals(&self) -> &[super::TransactionLiteral] {
17924 &self.literals
17925 }
17926 pub fn literals_mut(&mut self) -> &mut Vec<super::TransactionLiteral> {
17929 &mut self.literals
17930 }
17931 pub fn set_literals(&mut self, field: Vec<super::TransactionLiteral>) {
17933 self.literals = field;
17934 }
17935 pub fn with_literals(mut self, field: Vec<super::TransactionLiteral>) -> Self {
17937 self.set_literals(field);
17938 self
17939 }
17940 }
17941 impl super::TransferObjects {
17942 pub const fn const_default() -> Self {
17943 Self {
17944 objects: Vec::new(),
17945 address: None,
17946 }
17947 }
17948 #[doc(hidden)]
17949 pub fn default_instance() -> &'static Self {
17950 static DEFAULT: super::TransferObjects = super::TransferObjects::const_default();
17951 &DEFAULT
17952 }
17953 pub fn objects(&self) -> &[super::Argument] {
17955 &self.objects
17956 }
17957 pub fn objects_mut(&mut self) -> &mut Vec<super::Argument> {
17960 &mut self.objects
17961 }
17962 pub fn set_objects(&mut self, field: Vec<super::Argument>) {
17964 self.objects = field;
17965 }
17966 pub fn with_objects(mut self, field: Vec<super::Argument>) -> Self {
17968 self.set_objects(field);
17969 self
17970 }
17971 pub fn address(&self) -> &super::Argument {
17973 self.address
17974 .as_ref()
17975 .map(|field| field as _)
17976 .unwrap_or_else(|| super::Argument::default_instance() as _)
17977 }
17978 pub fn address_opt_mut(&mut self) -> Option<&mut super::Argument> {
17980 self.address.as_mut().map(|field| field as _)
17981 }
17982 pub fn address_mut(&mut self) -> &mut super::Argument {
17985 self.address.get_or_insert_default()
17986 }
17987 pub fn address_opt(&self) -> Option<&super::Argument> {
17989 self.address.as_ref().map(|field| field as _)
17990 }
17991 pub fn set_address<T: Into<super::Argument>>(&mut self, field: T) {
17993 self.address = Some(field.into().into());
17994 }
17995 pub fn with_address<T: Into<super::Argument>>(mut self, field: T) -> Self {
17997 self.set_address(field.into());
17998 self
17999 }
18000 }
18001 impl super::TypeArgumentError {
18002 pub const fn const_default() -> Self {
18003 Self {
18004 type_argument: None,
18005 kind: None,
18006 }
18007 }
18008 #[doc(hidden)]
18009 pub fn default_instance() -> &'static Self {
18010 static DEFAULT: super::TypeArgumentError = super::TypeArgumentError::const_default();
18011 &DEFAULT
18012 }
18013 pub fn type_argument_opt_mut(&mut self) -> Option<&mut u32> {
18015 self.type_argument.as_mut().map(|field| field as _)
18016 }
18017 pub fn type_argument_mut(&mut self) -> &mut u32 {
18020 self.type_argument.get_or_insert_default()
18021 }
18022 pub fn type_argument_opt(&self) -> Option<u32> {
18024 self.type_argument.as_ref().map(|field| *field)
18025 }
18026 pub fn set_type_argument(&mut self, field: u32) {
18028 self.type_argument = Some(field);
18029 }
18030 pub fn with_type_argument(mut self, field: u32) -> Self {
18032 self.set_type_argument(field);
18033 self
18034 }
18035 pub fn with_kind<T: Into<super::type_argument_error::TypeArgumentErrorKind>>(
18037 mut self,
18038 field: T,
18039 ) -> Self {
18040 self.set_kind(field.into());
18041 self
18042 }
18043 }
18044 impl super::TypeOrigin {
18045 pub const fn const_default() -> Self {
18046 Self {
18047 module_name: None,
18048 datatype_name: None,
18049 package_id: None,
18050 }
18051 }
18052 #[doc(hidden)]
18053 pub fn default_instance() -> &'static Self {
18054 static DEFAULT: super::TypeOrigin = super::TypeOrigin::const_default();
18055 &DEFAULT
18056 }
18057 pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
18059 self.module_name.as_mut().map(|field| field as _)
18060 }
18061 pub fn module_name_mut(&mut self) -> &mut String {
18064 self.module_name.get_or_insert_default()
18065 }
18066 pub fn module_name_opt(&self) -> Option<&str> {
18068 self.module_name.as_ref().map(|field| field as _)
18069 }
18070 pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
18072 self.module_name = Some(field.into().into());
18073 }
18074 pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
18076 self.set_module_name(field.into());
18077 self
18078 }
18079 pub fn datatype_name_opt_mut(&mut self) -> Option<&mut String> {
18081 self.datatype_name.as_mut().map(|field| field as _)
18082 }
18083 pub fn datatype_name_mut(&mut self) -> &mut String {
18086 self.datatype_name.get_or_insert_default()
18087 }
18088 pub fn datatype_name_opt(&self) -> Option<&str> {
18090 self.datatype_name.as_ref().map(|field| field as _)
18091 }
18092 pub fn set_datatype_name<T: Into<String>>(&mut self, field: T) {
18094 self.datatype_name = Some(field.into().into());
18095 }
18096 pub fn with_datatype_name<T: Into<String>>(mut self, field: T) -> Self {
18098 self.set_datatype_name(field.into());
18099 self
18100 }
18101 pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
18103 self.package_id.as_mut().map(|field| field as _)
18104 }
18105 pub fn package_id_mut(&mut self) -> &mut String {
18108 self.package_id.get_or_insert_default()
18109 }
18110 pub fn package_id_opt(&self) -> Option<&str> {
18112 self.package_id.as_ref().map(|field| field as _)
18113 }
18114 pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
18116 self.package_id = Some(field.into().into());
18117 }
18118 pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
18120 self.set_package_id(field.into());
18121 self
18122 }
18123 }
18124 impl super::TypeParameter {
18125 pub const fn const_default() -> Self {
18126 Self {
18127 constraints: Vec::new(),
18128 is_phantom: None,
18129 }
18130 }
18131 #[doc(hidden)]
18132 pub fn default_instance() -> &'static Self {
18133 static DEFAULT: super::TypeParameter = super::TypeParameter::const_default();
18134 &DEFAULT
18135 }
18136 pub fn is_phantom_opt_mut(&mut self) -> Option<&mut bool> {
18138 self.is_phantom.as_mut().map(|field| field as _)
18139 }
18140 pub fn is_phantom_mut(&mut self) -> &mut bool {
18143 self.is_phantom.get_or_insert_default()
18144 }
18145 pub fn is_phantom_opt(&self) -> Option<bool> {
18147 self.is_phantom.as_ref().map(|field| *field)
18148 }
18149 pub fn set_is_phantom(&mut self, field: bool) {
18151 self.is_phantom = Some(field);
18152 }
18153 pub fn with_is_phantom(mut self, field: bool) -> Self {
18155 self.set_is_phantom(field);
18156 self
18157 }
18158 }
18159 impl super::UnchangedConsensusObject {
18160 pub const fn const_default() -> Self {
18161 Self {
18162 kind: None,
18163 object_id: None,
18164 version: None,
18165 digest: None,
18166 object_type: None,
18167 }
18168 }
18169 #[doc(hidden)]
18170 pub fn default_instance() -> &'static Self {
18171 static DEFAULT: super::UnchangedConsensusObject = super::UnchangedConsensusObject::const_default();
18172 &DEFAULT
18173 }
18174 pub fn with_kind<
18176 T: Into<super::unchanged_consensus_object::UnchangedConsensusObjectKind>,
18177 >(mut self, field: T) -> Self {
18178 self.set_kind(field.into());
18179 self
18180 }
18181 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
18183 self.object_id.as_mut().map(|field| field as _)
18184 }
18185 pub fn object_id_mut(&mut self) -> &mut String {
18188 self.object_id.get_or_insert_default()
18189 }
18190 pub fn object_id_opt(&self) -> Option<&str> {
18192 self.object_id.as_ref().map(|field| field as _)
18193 }
18194 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
18196 self.object_id = Some(field.into().into());
18197 }
18198 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
18200 self.set_object_id(field.into());
18201 self
18202 }
18203 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
18205 self.version.as_mut().map(|field| field as _)
18206 }
18207 pub fn version_mut(&mut self) -> &mut u64 {
18210 self.version.get_or_insert_default()
18211 }
18212 pub fn version_opt(&self) -> Option<u64> {
18214 self.version.as_ref().map(|field| *field)
18215 }
18216 pub fn set_version(&mut self, field: u64) {
18218 self.version = Some(field);
18219 }
18220 pub fn with_version(mut self, field: u64) -> Self {
18222 self.set_version(field);
18223 self
18224 }
18225 pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
18227 self.digest.as_mut().map(|field| field as _)
18228 }
18229 pub fn digest_mut(&mut self) -> &mut String {
18232 self.digest.get_or_insert_default()
18233 }
18234 pub fn digest_opt(&self) -> Option<&str> {
18236 self.digest.as_ref().map(|field| field as _)
18237 }
18238 pub fn set_digest<T: Into<String>>(&mut self, field: T) {
18240 self.digest = Some(field.into().into());
18241 }
18242 pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
18244 self.set_digest(field.into());
18245 self
18246 }
18247 pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
18249 self.object_type.as_mut().map(|field| field as _)
18250 }
18251 pub fn object_type_mut(&mut self) -> &mut String {
18254 self.object_type.get_or_insert_default()
18255 }
18256 pub fn object_type_opt(&self) -> Option<&str> {
18258 self.object_type.as_ref().map(|field| field as _)
18259 }
18260 pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
18262 self.object_type = Some(field.into().into());
18263 }
18264 pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
18266 self.set_object_type(field.into());
18267 self
18268 }
18269 }
18270 impl super::Upgrade {
18271 pub const fn const_default() -> Self {
18272 Self {
18273 modules: Vec::new(),
18274 dependencies: Vec::new(),
18275 package: None,
18276 ticket: None,
18277 }
18278 }
18279 #[doc(hidden)]
18280 pub fn default_instance() -> &'static Self {
18281 static DEFAULT: super::Upgrade = super::Upgrade::const_default();
18282 &DEFAULT
18283 }
18284 pub fn modules(&self) -> &[::prost::bytes::Bytes] {
18286 &self.modules
18287 }
18288 pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
18291 &mut self.modules
18292 }
18293 pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
18295 self.modules = field;
18296 }
18297 pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
18299 self.set_modules(field);
18300 self
18301 }
18302 pub fn dependencies(&self) -> &[String] {
18304 &self.dependencies
18305 }
18306 pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
18309 &mut self.dependencies
18310 }
18311 pub fn set_dependencies(&mut self, field: Vec<String>) {
18313 self.dependencies = field;
18314 }
18315 pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
18317 self.set_dependencies(field);
18318 self
18319 }
18320 pub fn package_opt_mut(&mut self) -> Option<&mut String> {
18322 self.package.as_mut().map(|field| field as _)
18323 }
18324 pub fn package_mut(&mut self) -> &mut String {
18327 self.package.get_or_insert_default()
18328 }
18329 pub fn package_opt(&self) -> Option<&str> {
18331 self.package.as_ref().map(|field| field as _)
18332 }
18333 pub fn set_package<T: Into<String>>(&mut self, field: T) {
18335 self.package = Some(field.into().into());
18336 }
18337 pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
18339 self.set_package(field.into());
18340 self
18341 }
18342 pub fn ticket(&self) -> &super::Argument {
18344 self.ticket
18345 .as_ref()
18346 .map(|field| field as _)
18347 .unwrap_or_else(|| super::Argument::default_instance() as _)
18348 }
18349 pub fn ticket_opt_mut(&mut self) -> Option<&mut super::Argument> {
18351 self.ticket.as_mut().map(|field| field as _)
18352 }
18353 pub fn ticket_mut(&mut self) -> &mut super::Argument {
18356 self.ticket.get_or_insert_default()
18357 }
18358 pub fn ticket_opt(&self) -> Option<&super::Argument> {
18360 self.ticket.as_ref().map(|field| field as _)
18361 }
18362 pub fn set_ticket<T: Into<super::Argument>>(&mut self, field: T) {
18364 self.ticket = Some(field.into().into());
18365 }
18366 pub fn with_ticket<T: Into<super::Argument>>(mut self, field: T) -> Self {
18368 self.set_ticket(field.into());
18369 self
18370 }
18371 }
18372 impl super::UserSignature {
18373 pub const fn const_default() -> Self {
18374 Self {
18375 bcs: None,
18376 scheme: None,
18377 signature: None,
18378 }
18379 }
18380 #[doc(hidden)]
18381 pub fn default_instance() -> &'static Self {
18382 static DEFAULT: super::UserSignature = super::UserSignature::const_default();
18383 &DEFAULT
18384 }
18385 pub fn bcs(&self) -> &super::Bcs {
18387 self.bcs
18388 .as_ref()
18389 .map(|field| field as _)
18390 .unwrap_or_else(|| super::Bcs::default_instance() as _)
18391 }
18392 pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
18394 self.bcs.as_mut().map(|field| field as _)
18395 }
18396 pub fn bcs_mut(&mut self) -> &mut super::Bcs {
18399 self.bcs.get_or_insert_default()
18400 }
18401 pub fn bcs_opt(&self) -> Option<&super::Bcs> {
18403 self.bcs.as_ref().map(|field| field as _)
18404 }
18405 pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
18407 self.bcs = Some(field.into().into());
18408 }
18409 pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
18411 self.set_bcs(field.into());
18412 self
18413 }
18414 pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
18416 self.set_scheme(field.into());
18417 self
18418 }
18419 pub fn simple(&self) -> &super::SimpleSignature {
18421 if let Some(super::user_signature::Signature::Simple(field)) = &self
18422 .signature
18423 {
18424 field as _
18425 } else {
18426 super::SimpleSignature::default_instance() as _
18427 }
18428 }
18429 pub fn simple_opt(&self) -> Option<&super::SimpleSignature> {
18431 if let Some(super::user_signature::Signature::Simple(field)) = &self
18432 .signature
18433 {
18434 Some(field as _)
18435 } else {
18436 None
18437 }
18438 }
18439 pub fn simple_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
18441 if let Some(super::user_signature::Signature::Simple(field)) = &mut self
18442 .signature
18443 {
18444 Some(field as _)
18445 } else {
18446 None
18447 }
18448 }
18449 pub fn simple_mut(&mut self) -> &mut super::SimpleSignature {
18453 if self.simple_opt_mut().is_none() {
18454 self.signature = Some(
18455 super::user_signature::Signature::Simple(
18456 super::SimpleSignature::default(),
18457 ),
18458 );
18459 }
18460 self.simple_opt_mut().unwrap()
18461 }
18462 pub fn set_simple<T: Into<super::SimpleSignature>>(&mut self, field: T) {
18465 self.signature = Some(
18466 super::user_signature::Signature::Simple(field.into().into()),
18467 );
18468 }
18469 pub fn with_simple<T: Into<super::SimpleSignature>>(mut self, field: T) -> Self {
18472 self.set_simple(field.into());
18473 self
18474 }
18475 pub fn multisig(&self) -> &super::MultisigAggregatedSignature {
18477 if let Some(super::user_signature::Signature::Multisig(field)) = &self
18478 .signature
18479 {
18480 field as _
18481 } else {
18482 super::MultisigAggregatedSignature::default_instance() as _
18483 }
18484 }
18485 pub fn multisig_opt(&self) -> Option<&super::MultisigAggregatedSignature> {
18487 if let Some(super::user_signature::Signature::Multisig(field)) = &self
18488 .signature
18489 {
18490 Some(field as _)
18491 } else {
18492 None
18493 }
18494 }
18495 pub fn multisig_opt_mut(
18497 &mut self,
18498 ) -> Option<&mut super::MultisigAggregatedSignature> {
18499 if let Some(super::user_signature::Signature::Multisig(field)) = &mut self
18500 .signature
18501 {
18502 Some(field as _)
18503 } else {
18504 None
18505 }
18506 }
18507 pub fn multisig_mut(&mut self) -> &mut super::MultisigAggregatedSignature {
18511 if self.multisig_opt_mut().is_none() {
18512 self.signature = Some(
18513 super::user_signature::Signature::Multisig(
18514 super::MultisigAggregatedSignature::default(),
18515 ),
18516 );
18517 }
18518 self.multisig_opt_mut().unwrap()
18519 }
18520 pub fn set_multisig<T: Into<super::MultisigAggregatedSignature>>(
18523 &mut self,
18524 field: T,
18525 ) {
18526 self.signature = Some(
18527 super::user_signature::Signature::Multisig(field.into().into()),
18528 );
18529 }
18530 pub fn with_multisig<T: Into<super::MultisigAggregatedSignature>>(
18533 mut self,
18534 field: T,
18535 ) -> Self {
18536 self.set_multisig(field.into());
18537 self
18538 }
18539 pub fn zklogin(&self) -> &super::ZkLoginAuthenticator {
18541 if let Some(super::user_signature::Signature::Zklogin(field)) = &self
18542 .signature
18543 {
18544 field as _
18545 } else {
18546 super::ZkLoginAuthenticator::default_instance() as _
18547 }
18548 }
18549 pub fn zklogin_opt(&self) -> Option<&super::ZkLoginAuthenticator> {
18551 if let Some(super::user_signature::Signature::Zklogin(field)) = &self
18552 .signature
18553 {
18554 Some(field as _)
18555 } else {
18556 None
18557 }
18558 }
18559 pub fn zklogin_opt_mut(&mut self) -> Option<&mut super::ZkLoginAuthenticator> {
18561 if let Some(super::user_signature::Signature::Zklogin(field)) = &mut self
18562 .signature
18563 {
18564 Some(field as _)
18565 } else {
18566 None
18567 }
18568 }
18569 pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginAuthenticator {
18573 if self.zklogin_opt_mut().is_none() {
18574 self.signature = Some(
18575 super::user_signature::Signature::Zklogin(
18576 super::ZkLoginAuthenticator::default(),
18577 ),
18578 );
18579 }
18580 self.zklogin_opt_mut().unwrap()
18581 }
18582 pub fn set_zklogin<T: Into<super::ZkLoginAuthenticator>>(&mut self, field: T) {
18585 self.signature = Some(
18586 super::user_signature::Signature::Zklogin(field.into().into()),
18587 );
18588 }
18589 pub fn with_zklogin<T: Into<super::ZkLoginAuthenticator>>(
18592 mut self,
18593 field: T,
18594 ) -> Self {
18595 self.set_zklogin(field.into());
18596 self
18597 }
18598 pub fn passkey(&self) -> &super::PasskeyAuthenticator {
18600 if let Some(super::user_signature::Signature::Passkey(field)) = &self
18601 .signature
18602 {
18603 field as _
18604 } else {
18605 super::PasskeyAuthenticator::default_instance() as _
18606 }
18607 }
18608 pub fn passkey_opt(&self) -> Option<&super::PasskeyAuthenticator> {
18610 if let Some(super::user_signature::Signature::Passkey(field)) = &self
18611 .signature
18612 {
18613 Some(field as _)
18614 } else {
18615 None
18616 }
18617 }
18618 pub fn passkey_opt_mut(&mut self) -> Option<&mut super::PasskeyAuthenticator> {
18620 if let Some(super::user_signature::Signature::Passkey(field)) = &mut self
18621 .signature
18622 {
18623 Some(field as _)
18624 } else {
18625 None
18626 }
18627 }
18628 pub fn passkey_mut(&mut self) -> &mut super::PasskeyAuthenticator {
18632 if self.passkey_opt_mut().is_none() {
18633 self.signature = Some(
18634 super::user_signature::Signature::Passkey(
18635 super::PasskeyAuthenticator::default(),
18636 ),
18637 );
18638 }
18639 self.passkey_opt_mut().unwrap()
18640 }
18641 pub fn set_passkey<T: Into<super::PasskeyAuthenticator>>(&mut self, field: T) {
18644 self.signature = Some(
18645 super::user_signature::Signature::Passkey(field.into().into()),
18646 );
18647 }
18648 pub fn with_passkey<T: Into<super::PasskeyAuthenticator>>(
18651 mut self,
18652 field: T,
18653 ) -> Self {
18654 self.set_passkey(field.into());
18655 self
18656 }
18657 }
18658 impl super::Validator {
18659 pub const fn const_default() -> Self {
18660 Self {
18661 name: None,
18662 address: None,
18663 description: None,
18664 image_url: None,
18665 project_url: None,
18666 protocol_public_key: None,
18667 proof_of_possession: None,
18668 network_public_key: None,
18669 worker_public_key: None,
18670 network_address: None,
18671 p2p_address: None,
18672 primary_address: None,
18673 worker_address: None,
18674 next_epoch_protocol_public_key: None,
18675 next_epoch_proof_of_possession: None,
18676 next_epoch_network_public_key: None,
18677 next_epoch_worker_public_key: None,
18678 next_epoch_network_address: None,
18679 next_epoch_p2p_address: None,
18680 next_epoch_primary_address: None,
18681 next_epoch_worker_address: None,
18682 metadata_extra_fields: None,
18683 voting_power: None,
18684 operation_cap_id: None,
18685 gas_price: None,
18686 staking_pool: None,
18687 commission_rate: None,
18688 next_epoch_stake: None,
18689 next_epoch_gas_price: None,
18690 next_epoch_commission_rate: None,
18691 extra_fields: None,
18692 }
18693 }
18694 #[doc(hidden)]
18695 pub fn default_instance() -> &'static Self {
18696 static DEFAULT: super::Validator = super::Validator::const_default();
18697 &DEFAULT
18698 }
18699 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
18701 self.name.as_mut().map(|field| field as _)
18702 }
18703 pub fn name_mut(&mut self) -> &mut String {
18706 self.name.get_or_insert_default()
18707 }
18708 pub fn name_opt(&self) -> Option<&str> {
18710 self.name.as_ref().map(|field| field as _)
18711 }
18712 pub fn set_name<T: Into<String>>(&mut self, field: T) {
18714 self.name = Some(field.into().into());
18715 }
18716 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
18718 self.set_name(field.into());
18719 self
18720 }
18721 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
18723 self.address.as_mut().map(|field| field as _)
18724 }
18725 pub fn address_mut(&mut self) -> &mut String {
18728 self.address.get_or_insert_default()
18729 }
18730 pub fn address_opt(&self) -> Option<&str> {
18732 self.address.as_ref().map(|field| field as _)
18733 }
18734 pub fn set_address<T: Into<String>>(&mut self, field: T) {
18736 self.address = Some(field.into().into());
18737 }
18738 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
18740 self.set_address(field.into());
18741 self
18742 }
18743 pub fn description_opt_mut(&mut self) -> Option<&mut String> {
18745 self.description.as_mut().map(|field| field as _)
18746 }
18747 pub fn description_mut(&mut self) -> &mut String {
18750 self.description.get_or_insert_default()
18751 }
18752 pub fn description_opt(&self) -> Option<&str> {
18754 self.description.as_ref().map(|field| field as _)
18755 }
18756 pub fn set_description<T: Into<String>>(&mut self, field: T) {
18758 self.description = Some(field.into().into());
18759 }
18760 pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
18762 self.set_description(field.into());
18763 self
18764 }
18765 pub fn image_url_opt_mut(&mut self) -> Option<&mut String> {
18767 self.image_url.as_mut().map(|field| field as _)
18768 }
18769 pub fn image_url_mut(&mut self) -> &mut String {
18772 self.image_url.get_or_insert_default()
18773 }
18774 pub fn image_url_opt(&self) -> Option<&str> {
18776 self.image_url.as_ref().map(|field| field as _)
18777 }
18778 pub fn set_image_url<T: Into<String>>(&mut self, field: T) {
18780 self.image_url = Some(field.into().into());
18781 }
18782 pub fn with_image_url<T: Into<String>>(mut self, field: T) -> Self {
18784 self.set_image_url(field.into());
18785 self
18786 }
18787 pub fn project_url_opt_mut(&mut self) -> Option<&mut String> {
18789 self.project_url.as_mut().map(|field| field as _)
18790 }
18791 pub fn project_url_mut(&mut self) -> &mut String {
18794 self.project_url.get_or_insert_default()
18795 }
18796 pub fn project_url_opt(&self) -> Option<&str> {
18798 self.project_url.as_ref().map(|field| field as _)
18799 }
18800 pub fn set_project_url<T: Into<String>>(&mut self, field: T) {
18802 self.project_url = Some(field.into().into());
18803 }
18804 pub fn with_project_url<T: Into<String>>(mut self, field: T) -> Self {
18806 self.set_project_url(field.into());
18807 self
18808 }
18809 pub fn protocol_public_key_opt(&self) -> Option<&[u8]> {
18811 self.protocol_public_key.as_ref().map(|field| field as _)
18812 }
18813 pub fn set_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
18815 &mut self,
18816 field: T,
18817 ) {
18818 self.protocol_public_key = Some(field.into().into());
18819 }
18820 pub fn with_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
18822 mut self,
18823 field: T,
18824 ) -> Self {
18825 self.set_protocol_public_key(field.into());
18826 self
18827 }
18828 pub fn proof_of_possession_opt(&self) -> Option<&[u8]> {
18830 self.proof_of_possession.as_ref().map(|field| field as _)
18831 }
18832 pub fn set_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
18834 &mut self,
18835 field: T,
18836 ) {
18837 self.proof_of_possession = Some(field.into().into());
18838 }
18839 pub fn with_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
18841 mut self,
18842 field: T,
18843 ) -> Self {
18844 self.set_proof_of_possession(field.into());
18845 self
18846 }
18847 pub fn network_public_key_opt(&self) -> Option<&[u8]> {
18849 self.network_public_key.as_ref().map(|field| field as _)
18850 }
18851 pub fn set_network_public_key<T: Into<::prost::bytes::Bytes>>(
18853 &mut self,
18854 field: T,
18855 ) {
18856 self.network_public_key = Some(field.into().into());
18857 }
18858 pub fn with_network_public_key<T: Into<::prost::bytes::Bytes>>(
18860 mut self,
18861 field: T,
18862 ) -> Self {
18863 self.set_network_public_key(field.into());
18864 self
18865 }
18866 pub fn worker_public_key_opt(&self) -> Option<&[u8]> {
18868 self.worker_public_key.as_ref().map(|field| field as _)
18869 }
18870 pub fn set_worker_public_key<T: Into<::prost::bytes::Bytes>>(
18872 &mut self,
18873 field: T,
18874 ) {
18875 self.worker_public_key = Some(field.into().into());
18876 }
18877 pub fn with_worker_public_key<T: Into<::prost::bytes::Bytes>>(
18879 mut self,
18880 field: T,
18881 ) -> Self {
18882 self.set_worker_public_key(field.into());
18883 self
18884 }
18885 pub fn network_address_opt_mut(&mut self) -> Option<&mut String> {
18887 self.network_address.as_mut().map(|field| field as _)
18888 }
18889 pub fn network_address_mut(&mut self) -> &mut String {
18892 self.network_address.get_or_insert_default()
18893 }
18894 pub fn network_address_opt(&self) -> Option<&str> {
18896 self.network_address.as_ref().map(|field| field as _)
18897 }
18898 pub fn set_network_address<T: Into<String>>(&mut self, field: T) {
18900 self.network_address = Some(field.into().into());
18901 }
18902 pub fn with_network_address<T: Into<String>>(mut self, field: T) -> Self {
18904 self.set_network_address(field.into());
18905 self
18906 }
18907 pub fn p2p_address_opt_mut(&mut self) -> Option<&mut String> {
18909 self.p2p_address.as_mut().map(|field| field as _)
18910 }
18911 pub fn p2p_address_mut(&mut self) -> &mut String {
18914 self.p2p_address.get_or_insert_default()
18915 }
18916 pub fn p2p_address_opt(&self) -> Option<&str> {
18918 self.p2p_address.as_ref().map(|field| field as _)
18919 }
18920 pub fn set_p2p_address<T: Into<String>>(&mut self, field: T) {
18922 self.p2p_address = Some(field.into().into());
18923 }
18924 pub fn with_p2p_address<T: Into<String>>(mut self, field: T) -> Self {
18926 self.set_p2p_address(field.into());
18927 self
18928 }
18929 pub fn primary_address_opt_mut(&mut self) -> Option<&mut String> {
18931 self.primary_address.as_mut().map(|field| field as _)
18932 }
18933 pub fn primary_address_mut(&mut self) -> &mut String {
18936 self.primary_address.get_or_insert_default()
18937 }
18938 pub fn primary_address_opt(&self) -> Option<&str> {
18940 self.primary_address.as_ref().map(|field| field as _)
18941 }
18942 pub fn set_primary_address<T: Into<String>>(&mut self, field: T) {
18944 self.primary_address = Some(field.into().into());
18945 }
18946 pub fn with_primary_address<T: Into<String>>(mut self, field: T) -> Self {
18948 self.set_primary_address(field.into());
18949 self
18950 }
18951 pub fn worker_address_opt_mut(&mut self) -> Option<&mut String> {
18953 self.worker_address.as_mut().map(|field| field as _)
18954 }
18955 pub fn worker_address_mut(&mut self) -> &mut String {
18958 self.worker_address.get_or_insert_default()
18959 }
18960 pub fn worker_address_opt(&self) -> Option<&str> {
18962 self.worker_address.as_ref().map(|field| field as _)
18963 }
18964 pub fn set_worker_address<T: Into<String>>(&mut self, field: T) {
18966 self.worker_address = Some(field.into().into());
18967 }
18968 pub fn with_worker_address<T: Into<String>>(mut self, field: T) -> Self {
18970 self.set_worker_address(field.into());
18971 self
18972 }
18973 pub fn next_epoch_protocol_public_key_opt(&self) -> Option<&[u8]> {
18975 self.next_epoch_protocol_public_key.as_ref().map(|field| field as _)
18976 }
18977 pub fn set_next_epoch_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
18979 &mut self,
18980 field: T,
18981 ) {
18982 self.next_epoch_protocol_public_key = Some(field.into().into());
18983 }
18984 pub fn with_next_epoch_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
18986 mut self,
18987 field: T,
18988 ) -> Self {
18989 self.set_next_epoch_protocol_public_key(field.into());
18990 self
18991 }
18992 pub fn next_epoch_proof_of_possession_opt(&self) -> Option<&[u8]> {
18994 self.next_epoch_proof_of_possession.as_ref().map(|field| field as _)
18995 }
18996 pub fn set_next_epoch_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
18998 &mut self,
18999 field: T,
19000 ) {
19001 self.next_epoch_proof_of_possession = Some(field.into().into());
19002 }
19003 pub fn with_next_epoch_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
19005 mut self,
19006 field: T,
19007 ) -> Self {
19008 self.set_next_epoch_proof_of_possession(field.into());
19009 self
19010 }
19011 pub fn next_epoch_network_public_key_opt(&self) -> Option<&[u8]> {
19013 self.next_epoch_network_public_key.as_ref().map(|field| field as _)
19014 }
19015 pub fn set_next_epoch_network_public_key<T: Into<::prost::bytes::Bytes>>(
19017 &mut self,
19018 field: T,
19019 ) {
19020 self.next_epoch_network_public_key = Some(field.into().into());
19021 }
19022 pub fn with_next_epoch_network_public_key<T: Into<::prost::bytes::Bytes>>(
19024 mut self,
19025 field: T,
19026 ) -> Self {
19027 self.set_next_epoch_network_public_key(field.into());
19028 self
19029 }
19030 pub fn next_epoch_worker_public_key_opt(&self) -> Option<&[u8]> {
19032 self.next_epoch_worker_public_key.as_ref().map(|field| field as _)
19033 }
19034 pub fn set_next_epoch_worker_public_key<T: Into<::prost::bytes::Bytes>>(
19036 &mut self,
19037 field: T,
19038 ) {
19039 self.next_epoch_worker_public_key = Some(field.into().into());
19040 }
19041 pub fn with_next_epoch_worker_public_key<T: Into<::prost::bytes::Bytes>>(
19043 mut self,
19044 field: T,
19045 ) -> Self {
19046 self.set_next_epoch_worker_public_key(field.into());
19047 self
19048 }
19049 pub fn next_epoch_network_address_opt_mut(&mut self) -> Option<&mut String> {
19051 self.next_epoch_network_address.as_mut().map(|field| field as _)
19052 }
19053 pub fn next_epoch_network_address_mut(&mut self) -> &mut String {
19056 self.next_epoch_network_address.get_or_insert_default()
19057 }
19058 pub fn next_epoch_network_address_opt(&self) -> Option<&str> {
19060 self.next_epoch_network_address.as_ref().map(|field| field as _)
19061 }
19062 pub fn set_next_epoch_network_address<T: Into<String>>(&mut self, field: T) {
19064 self.next_epoch_network_address = Some(field.into().into());
19065 }
19066 pub fn with_next_epoch_network_address<T: Into<String>>(
19068 mut self,
19069 field: T,
19070 ) -> Self {
19071 self.set_next_epoch_network_address(field.into());
19072 self
19073 }
19074 pub fn next_epoch_p2p_address_opt_mut(&mut self) -> Option<&mut String> {
19076 self.next_epoch_p2p_address.as_mut().map(|field| field as _)
19077 }
19078 pub fn next_epoch_p2p_address_mut(&mut self) -> &mut String {
19081 self.next_epoch_p2p_address.get_or_insert_default()
19082 }
19083 pub fn next_epoch_p2p_address_opt(&self) -> Option<&str> {
19085 self.next_epoch_p2p_address.as_ref().map(|field| field as _)
19086 }
19087 pub fn set_next_epoch_p2p_address<T: Into<String>>(&mut self, field: T) {
19089 self.next_epoch_p2p_address = Some(field.into().into());
19090 }
19091 pub fn with_next_epoch_p2p_address<T: Into<String>>(mut self, field: T) -> Self {
19093 self.set_next_epoch_p2p_address(field.into());
19094 self
19095 }
19096 pub fn next_epoch_primary_address_opt_mut(&mut self) -> Option<&mut String> {
19098 self.next_epoch_primary_address.as_mut().map(|field| field as _)
19099 }
19100 pub fn next_epoch_primary_address_mut(&mut self) -> &mut String {
19103 self.next_epoch_primary_address.get_or_insert_default()
19104 }
19105 pub fn next_epoch_primary_address_opt(&self) -> Option<&str> {
19107 self.next_epoch_primary_address.as_ref().map(|field| field as _)
19108 }
19109 pub fn set_next_epoch_primary_address<T: Into<String>>(&mut self, field: T) {
19111 self.next_epoch_primary_address = Some(field.into().into());
19112 }
19113 pub fn with_next_epoch_primary_address<T: Into<String>>(
19115 mut self,
19116 field: T,
19117 ) -> Self {
19118 self.set_next_epoch_primary_address(field.into());
19119 self
19120 }
19121 pub fn next_epoch_worker_address_opt_mut(&mut self) -> Option<&mut String> {
19123 self.next_epoch_worker_address.as_mut().map(|field| field as _)
19124 }
19125 pub fn next_epoch_worker_address_mut(&mut self) -> &mut String {
19128 self.next_epoch_worker_address.get_or_insert_default()
19129 }
19130 pub fn next_epoch_worker_address_opt(&self) -> Option<&str> {
19132 self.next_epoch_worker_address.as_ref().map(|field| field as _)
19133 }
19134 pub fn set_next_epoch_worker_address<T: Into<String>>(&mut self, field: T) {
19136 self.next_epoch_worker_address = Some(field.into().into());
19137 }
19138 pub fn with_next_epoch_worker_address<T: Into<String>>(
19140 mut self,
19141 field: T,
19142 ) -> Self {
19143 self.set_next_epoch_worker_address(field.into());
19144 self
19145 }
19146 pub fn metadata_extra_fields(&self) -> &super::MoveTable {
19148 self.metadata_extra_fields
19149 .as_ref()
19150 .map(|field| field as _)
19151 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
19152 }
19153 pub fn metadata_extra_fields_opt_mut(
19155 &mut self,
19156 ) -> Option<&mut super::MoveTable> {
19157 self.metadata_extra_fields.as_mut().map(|field| field as _)
19158 }
19159 pub fn metadata_extra_fields_mut(&mut self) -> &mut super::MoveTable {
19162 self.metadata_extra_fields.get_or_insert_default()
19163 }
19164 pub fn metadata_extra_fields_opt(&self) -> Option<&super::MoveTable> {
19166 self.metadata_extra_fields.as_ref().map(|field| field as _)
19167 }
19168 pub fn set_metadata_extra_fields<T: Into<super::MoveTable>>(
19170 &mut self,
19171 field: T,
19172 ) {
19173 self.metadata_extra_fields = Some(field.into().into());
19174 }
19175 pub fn with_metadata_extra_fields<T: Into<super::MoveTable>>(
19177 mut self,
19178 field: T,
19179 ) -> Self {
19180 self.set_metadata_extra_fields(field.into());
19181 self
19182 }
19183 pub fn voting_power_opt_mut(&mut self) -> Option<&mut u64> {
19185 self.voting_power.as_mut().map(|field| field as _)
19186 }
19187 pub fn voting_power_mut(&mut self) -> &mut u64 {
19190 self.voting_power.get_or_insert_default()
19191 }
19192 pub fn voting_power_opt(&self) -> Option<u64> {
19194 self.voting_power.as_ref().map(|field| *field)
19195 }
19196 pub fn set_voting_power(&mut self, field: u64) {
19198 self.voting_power = Some(field);
19199 }
19200 pub fn with_voting_power(mut self, field: u64) -> Self {
19202 self.set_voting_power(field);
19203 self
19204 }
19205 pub fn operation_cap_id_opt_mut(&mut self) -> Option<&mut String> {
19207 self.operation_cap_id.as_mut().map(|field| field as _)
19208 }
19209 pub fn operation_cap_id_mut(&mut self) -> &mut String {
19212 self.operation_cap_id.get_or_insert_default()
19213 }
19214 pub fn operation_cap_id_opt(&self) -> Option<&str> {
19216 self.operation_cap_id.as_ref().map(|field| field as _)
19217 }
19218 pub fn set_operation_cap_id<T: Into<String>>(&mut self, field: T) {
19220 self.operation_cap_id = Some(field.into().into());
19221 }
19222 pub fn with_operation_cap_id<T: Into<String>>(mut self, field: T) -> Self {
19224 self.set_operation_cap_id(field.into());
19225 self
19226 }
19227 pub fn gas_price_opt_mut(&mut self) -> Option<&mut u64> {
19229 self.gas_price.as_mut().map(|field| field as _)
19230 }
19231 pub fn gas_price_mut(&mut self) -> &mut u64 {
19234 self.gas_price.get_or_insert_default()
19235 }
19236 pub fn gas_price_opt(&self) -> Option<u64> {
19238 self.gas_price.as_ref().map(|field| *field)
19239 }
19240 pub fn set_gas_price(&mut self, field: u64) {
19242 self.gas_price = Some(field);
19243 }
19244 pub fn with_gas_price(mut self, field: u64) -> Self {
19246 self.set_gas_price(field);
19247 self
19248 }
19249 pub fn staking_pool(&self) -> &super::StakingPool {
19251 self.staking_pool
19252 .as_ref()
19253 .map(|field| field as _)
19254 .unwrap_or_else(|| super::StakingPool::default_instance() as _)
19255 }
19256 pub fn staking_pool_opt_mut(&mut self) -> Option<&mut super::StakingPool> {
19258 self.staking_pool.as_mut().map(|field| field as _)
19259 }
19260 pub fn staking_pool_mut(&mut self) -> &mut super::StakingPool {
19263 self.staking_pool.get_or_insert_default()
19264 }
19265 pub fn staking_pool_opt(&self) -> Option<&super::StakingPool> {
19267 self.staking_pool.as_ref().map(|field| field as _)
19268 }
19269 pub fn set_staking_pool<T: Into<super::StakingPool>>(&mut self, field: T) {
19271 self.staking_pool = Some(field.into().into());
19272 }
19273 pub fn with_staking_pool<T: Into<super::StakingPool>>(
19275 mut self,
19276 field: T,
19277 ) -> Self {
19278 self.set_staking_pool(field.into());
19279 self
19280 }
19281 pub fn commission_rate_opt_mut(&mut self) -> Option<&mut u64> {
19283 self.commission_rate.as_mut().map(|field| field as _)
19284 }
19285 pub fn commission_rate_mut(&mut self) -> &mut u64 {
19288 self.commission_rate.get_or_insert_default()
19289 }
19290 pub fn commission_rate_opt(&self) -> Option<u64> {
19292 self.commission_rate.as_ref().map(|field| *field)
19293 }
19294 pub fn set_commission_rate(&mut self, field: u64) {
19296 self.commission_rate = Some(field);
19297 }
19298 pub fn with_commission_rate(mut self, field: u64) -> Self {
19300 self.set_commission_rate(field);
19301 self
19302 }
19303 pub fn next_epoch_stake_opt_mut(&mut self) -> Option<&mut u64> {
19305 self.next_epoch_stake.as_mut().map(|field| field as _)
19306 }
19307 pub fn next_epoch_stake_mut(&mut self) -> &mut u64 {
19310 self.next_epoch_stake.get_or_insert_default()
19311 }
19312 pub fn next_epoch_stake_opt(&self) -> Option<u64> {
19314 self.next_epoch_stake.as_ref().map(|field| *field)
19315 }
19316 pub fn set_next_epoch_stake(&mut self, field: u64) {
19318 self.next_epoch_stake = Some(field);
19319 }
19320 pub fn with_next_epoch_stake(mut self, field: u64) -> Self {
19322 self.set_next_epoch_stake(field);
19323 self
19324 }
19325 pub fn next_epoch_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
19327 self.next_epoch_gas_price.as_mut().map(|field| field as _)
19328 }
19329 pub fn next_epoch_gas_price_mut(&mut self) -> &mut u64 {
19332 self.next_epoch_gas_price.get_or_insert_default()
19333 }
19334 pub fn next_epoch_gas_price_opt(&self) -> Option<u64> {
19336 self.next_epoch_gas_price.as_ref().map(|field| *field)
19337 }
19338 pub fn set_next_epoch_gas_price(&mut self, field: u64) {
19340 self.next_epoch_gas_price = Some(field);
19341 }
19342 pub fn with_next_epoch_gas_price(mut self, field: u64) -> Self {
19344 self.set_next_epoch_gas_price(field);
19345 self
19346 }
19347 pub fn next_epoch_commission_rate_opt_mut(&mut self) -> Option<&mut u64> {
19349 self.next_epoch_commission_rate.as_mut().map(|field| field as _)
19350 }
19351 pub fn next_epoch_commission_rate_mut(&mut self) -> &mut u64 {
19354 self.next_epoch_commission_rate.get_or_insert_default()
19355 }
19356 pub fn next_epoch_commission_rate_opt(&self) -> Option<u64> {
19358 self.next_epoch_commission_rate.as_ref().map(|field| *field)
19359 }
19360 pub fn set_next_epoch_commission_rate(&mut self, field: u64) {
19362 self.next_epoch_commission_rate = Some(field);
19363 }
19364 pub fn with_next_epoch_commission_rate(mut self, field: u64) -> Self {
19366 self.set_next_epoch_commission_rate(field);
19367 self
19368 }
19369 pub fn extra_fields(&self) -> &super::MoveTable {
19371 self.extra_fields
19372 .as_ref()
19373 .map(|field| field as _)
19374 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
19375 }
19376 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
19378 self.extra_fields.as_mut().map(|field| field as _)
19379 }
19380 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
19383 self.extra_fields.get_or_insert_default()
19384 }
19385 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
19387 self.extra_fields.as_ref().map(|field| field as _)
19388 }
19389 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
19391 self.extra_fields = Some(field.into().into());
19392 }
19393 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
19395 self.set_extra_fields(field.into());
19396 self
19397 }
19398 }
19399 impl super::ValidatorAggregatedSignature {
19400 pub const fn const_default() -> Self {
19401 Self {
19402 epoch: None,
19403 signature: None,
19404 bitmap: None,
19405 }
19406 }
19407 #[doc(hidden)]
19408 pub fn default_instance() -> &'static Self {
19409 static DEFAULT: super::ValidatorAggregatedSignature = super::ValidatorAggregatedSignature::const_default();
19410 &DEFAULT
19411 }
19412 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
19414 self.epoch.as_mut().map(|field| field as _)
19415 }
19416 pub fn epoch_mut(&mut self) -> &mut u64 {
19419 self.epoch.get_or_insert_default()
19420 }
19421 pub fn epoch_opt(&self) -> Option<u64> {
19423 self.epoch.as_ref().map(|field| *field)
19424 }
19425 pub fn set_epoch(&mut self, field: u64) {
19427 self.epoch = Some(field);
19428 }
19429 pub fn with_epoch(mut self, field: u64) -> Self {
19431 self.set_epoch(field);
19432 self
19433 }
19434 pub fn signature_opt(&self) -> Option<&[u8]> {
19436 self.signature.as_ref().map(|field| field as _)
19437 }
19438 pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
19440 self.signature = Some(field.into().into());
19441 }
19442 pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
19444 mut self,
19445 field: T,
19446 ) -> Self {
19447 self.set_signature(field.into());
19448 self
19449 }
19450 pub fn bitmap_opt(&self) -> Option<&[u8]> {
19452 self.bitmap.as_ref().map(|field| field as _)
19453 }
19454 pub fn set_bitmap<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
19456 self.bitmap = Some(field.into().into());
19457 }
19458 pub fn with_bitmap<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
19460 self.set_bitmap(field.into());
19461 self
19462 }
19463 }
19464 impl super::ValidatorCommittee {
19465 pub const fn const_default() -> Self {
19466 Self {
19467 epoch: None,
19468 members: Vec::new(),
19469 }
19470 }
19471 #[doc(hidden)]
19472 pub fn default_instance() -> &'static Self {
19473 static DEFAULT: super::ValidatorCommittee = super::ValidatorCommittee::const_default();
19474 &DEFAULT
19475 }
19476 pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
19478 self.epoch.as_mut().map(|field| field as _)
19479 }
19480 pub fn epoch_mut(&mut self) -> &mut u64 {
19483 self.epoch.get_or_insert_default()
19484 }
19485 pub fn epoch_opt(&self) -> Option<u64> {
19487 self.epoch.as_ref().map(|field| *field)
19488 }
19489 pub fn set_epoch(&mut self, field: u64) {
19491 self.epoch = Some(field);
19492 }
19493 pub fn with_epoch(mut self, field: u64) -> Self {
19495 self.set_epoch(field);
19496 self
19497 }
19498 pub fn members(&self) -> &[super::ValidatorCommitteeMember] {
19500 &self.members
19501 }
19502 pub fn members_mut(&mut self) -> &mut Vec<super::ValidatorCommitteeMember> {
19505 &mut self.members
19506 }
19507 pub fn set_members(&mut self, field: Vec<super::ValidatorCommitteeMember>) {
19509 self.members = field;
19510 }
19511 pub fn with_members(
19513 mut self,
19514 field: Vec<super::ValidatorCommitteeMember>,
19515 ) -> Self {
19516 self.set_members(field);
19517 self
19518 }
19519 }
19520 impl super::ValidatorCommitteeMember {
19521 pub const fn const_default() -> Self {
19522 Self {
19523 public_key: None,
19524 weight: None,
19525 }
19526 }
19527 #[doc(hidden)]
19528 pub fn default_instance() -> &'static Self {
19529 static DEFAULT: super::ValidatorCommitteeMember = super::ValidatorCommitteeMember::const_default();
19530 &DEFAULT
19531 }
19532 pub fn public_key_opt(&self) -> Option<&[u8]> {
19534 self.public_key.as_ref().map(|field| field as _)
19535 }
19536 pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
19538 self.public_key = Some(field.into().into());
19539 }
19540 pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
19542 mut self,
19543 field: T,
19544 ) -> Self {
19545 self.set_public_key(field.into());
19546 self
19547 }
19548 pub fn weight_opt_mut(&mut self) -> Option<&mut u64> {
19550 self.weight.as_mut().map(|field| field as _)
19551 }
19552 pub fn weight_mut(&mut self) -> &mut u64 {
19555 self.weight.get_or_insert_default()
19556 }
19557 pub fn weight_opt(&self) -> Option<u64> {
19559 self.weight.as_ref().map(|field| *field)
19560 }
19561 pub fn set_weight(&mut self, field: u64) {
19563 self.weight = Some(field);
19564 }
19565 pub fn with_weight(mut self, field: u64) -> Self {
19567 self.set_weight(field);
19568 self
19569 }
19570 }
19571 impl super::ValidatorExecutionTimeObservation {
19572 pub const fn const_default() -> Self {
19573 Self {
19574 validator: None,
19575 duration: None,
19576 }
19577 }
19578 #[doc(hidden)]
19579 pub fn default_instance() -> &'static Self {
19580 static DEFAULT: super::ValidatorExecutionTimeObservation = super::ValidatorExecutionTimeObservation::const_default();
19581 &DEFAULT
19582 }
19583 pub fn validator_opt(&self) -> Option<&[u8]> {
19585 self.validator.as_ref().map(|field| field as _)
19586 }
19587 pub fn set_validator<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
19589 self.validator = Some(field.into().into());
19590 }
19591 pub fn with_validator<T: Into<::prost::bytes::Bytes>>(
19593 mut self,
19594 field: T,
19595 ) -> Self {
19596 self.set_validator(field.into());
19597 self
19598 }
19599 pub fn duration_opt_mut(&mut self) -> Option<&mut ::prost_types::Duration> {
19601 self.duration.as_mut().map(|field| field as _)
19602 }
19603 pub fn duration_mut(&mut self) -> &mut ::prost_types::Duration {
19606 self.duration.get_or_insert_default()
19607 }
19608 pub fn duration_opt(&self) -> Option<&::prost_types::Duration> {
19610 self.duration.as_ref().map(|field| field as _)
19611 }
19612 pub fn set_duration<T: Into<::prost_types::Duration>>(&mut self, field: T) {
19614 self.duration = Some(field.into().into());
19615 }
19616 pub fn with_duration<T: Into<::prost_types::Duration>>(
19618 mut self,
19619 field: T,
19620 ) -> Self {
19621 self.set_duration(field.into());
19622 self
19623 }
19624 }
19625 impl super::ValidatorReportRecord {
19626 pub const fn const_default() -> Self {
19627 Self {
19628 reported: None,
19629 reporters: Vec::new(),
19630 }
19631 }
19632 #[doc(hidden)]
19633 pub fn default_instance() -> &'static Self {
19634 static DEFAULT: super::ValidatorReportRecord = super::ValidatorReportRecord::const_default();
19635 &DEFAULT
19636 }
19637 pub fn reported_opt_mut(&mut self) -> Option<&mut String> {
19639 self.reported.as_mut().map(|field| field as _)
19640 }
19641 pub fn reported_mut(&mut self) -> &mut String {
19644 self.reported.get_or_insert_default()
19645 }
19646 pub fn reported_opt(&self) -> Option<&str> {
19648 self.reported.as_ref().map(|field| field as _)
19649 }
19650 pub fn set_reported<T: Into<String>>(&mut self, field: T) {
19652 self.reported = Some(field.into().into());
19653 }
19654 pub fn with_reported<T: Into<String>>(mut self, field: T) -> Self {
19656 self.set_reported(field.into());
19657 self
19658 }
19659 pub fn reporters(&self) -> &[String] {
19661 &self.reporters
19662 }
19663 pub fn reporters_mut(&mut self) -> &mut Vec<String> {
19666 &mut self.reporters
19667 }
19668 pub fn set_reporters(&mut self, field: Vec<String>) {
19670 self.reporters = field;
19671 }
19672 pub fn with_reporters(mut self, field: Vec<String>) -> Self {
19674 self.set_reporters(field);
19675 self
19676 }
19677 }
19678 impl super::ValidatorSet {
19679 pub const fn const_default() -> Self {
19680 Self {
19681 total_stake: None,
19682 active_validators: Vec::new(),
19683 pending_active_validators: None,
19684 pending_removals: Vec::new(),
19685 staking_pool_mappings: None,
19686 inactive_validators: None,
19687 validator_candidates: None,
19688 at_risk_validators: std::collections::BTreeMap::new(),
19689 extra_fields: None,
19690 }
19691 }
19692 #[doc(hidden)]
19693 pub fn default_instance() -> &'static Self {
19694 static DEFAULT: super::ValidatorSet = super::ValidatorSet::const_default();
19695 &DEFAULT
19696 }
19697 pub fn total_stake_opt_mut(&mut self) -> Option<&mut u64> {
19699 self.total_stake.as_mut().map(|field| field as _)
19700 }
19701 pub fn total_stake_mut(&mut self) -> &mut u64 {
19704 self.total_stake.get_or_insert_default()
19705 }
19706 pub fn total_stake_opt(&self) -> Option<u64> {
19708 self.total_stake.as_ref().map(|field| *field)
19709 }
19710 pub fn set_total_stake(&mut self, field: u64) {
19712 self.total_stake = Some(field);
19713 }
19714 pub fn with_total_stake(mut self, field: u64) -> Self {
19716 self.set_total_stake(field);
19717 self
19718 }
19719 pub fn active_validators(&self) -> &[super::Validator] {
19721 &self.active_validators
19722 }
19723 pub fn active_validators_mut(&mut self) -> &mut Vec<super::Validator> {
19726 &mut self.active_validators
19727 }
19728 pub fn set_active_validators(&mut self, field: Vec<super::Validator>) {
19730 self.active_validators = field;
19731 }
19732 pub fn with_active_validators(mut self, field: Vec<super::Validator>) -> Self {
19734 self.set_active_validators(field);
19735 self
19736 }
19737 pub fn pending_active_validators(&self) -> &super::MoveTable {
19739 self.pending_active_validators
19740 .as_ref()
19741 .map(|field| field as _)
19742 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
19743 }
19744 pub fn pending_active_validators_opt_mut(
19746 &mut self,
19747 ) -> Option<&mut super::MoveTable> {
19748 self.pending_active_validators.as_mut().map(|field| field as _)
19749 }
19750 pub fn pending_active_validators_mut(&mut self) -> &mut super::MoveTable {
19753 self.pending_active_validators.get_or_insert_default()
19754 }
19755 pub fn pending_active_validators_opt(&self) -> Option<&super::MoveTable> {
19757 self.pending_active_validators.as_ref().map(|field| field as _)
19758 }
19759 pub fn set_pending_active_validators<T: Into<super::MoveTable>>(
19761 &mut self,
19762 field: T,
19763 ) {
19764 self.pending_active_validators = Some(field.into().into());
19765 }
19766 pub fn with_pending_active_validators<T: Into<super::MoveTable>>(
19768 mut self,
19769 field: T,
19770 ) -> Self {
19771 self.set_pending_active_validators(field.into());
19772 self
19773 }
19774 pub fn pending_removals(&self) -> &[u64] {
19776 &self.pending_removals
19777 }
19778 pub fn pending_removals_mut(&mut self) -> &mut Vec<u64> {
19781 &mut self.pending_removals
19782 }
19783 pub fn set_pending_removals(&mut self, field: Vec<u64>) {
19785 self.pending_removals = field;
19786 }
19787 pub fn with_pending_removals(mut self, field: Vec<u64>) -> Self {
19789 self.set_pending_removals(field);
19790 self
19791 }
19792 pub fn staking_pool_mappings(&self) -> &super::MoveTable {
19794 self.staking_pool_mappings
19795 .as_ref()
19796 .map(|field| field as _)
19797 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
19798 }
19799 pub fn staking_pool_mappings_opt_mut(
19801 &mut self,
19802 ) -> Option<&mut super::MoveTable> {
19803 self.staking_pool_mappings.as_mut().map(|field| field as _)
19804 }
19805 pub fn staking_pool_mappings_mut(&mut self) -> &mut super::MoveTable {
19808 self.staking_pool_mappings.get_or_insert_default()
19809 }
19810 pub fn staking_pool_mappings_opt(&self) -> Option<&super::MoveTable> {
19812 self.staking_pool_mappings.as_ref().map(|field| field as _)
19813 }
19814 pub fn set_staking_pool_mappings<T: Into<super::MoveTable>>(
19816 &mut self,
19817 field: T,
19818 ) {
19819 self.staking_pool_mappings = Some(field.into().into());
19820 }
19821 pub fn with_staking_pool_mappings<T: Into<super::MoveTable>>(
19823 mut self,
19824 field: T,
19825 ) -> Self {
19826 self.set_staking_pool_mappings(field.into());
19827 self
19828 }
19829 pub fn inactive_validators(&self) -> &super::MoveTable {
19831 self.inactive_validators
19832 .as_ref()
19833 .map(|field| field as _)
19834 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
19835 }
19836 pub fn inactive_validators_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
19838 self.inactive_validators.as_mut().map(|field| field as _)
19839 }
19840 pub fn inactive_validators_mut(&mut self) -> &mut super::MoveTable {
19843 self.inactive_validators.get_or_insert_default()
19844 }
19845 pub fn inactive_validators_opt(&self) -> Option<&super::MoveTable> {
19847 self.inactive_validators.as_ref().map(|field| field as _)
19848 }
19849 pub fn set_inactive_validators<T: Into<super::MoveTable>>(&mut self, field: T) {
19851 self.inactive_validators = Some(field.into().into());
19852 }
19853 pub fn with_inactive_validators<T: Into<super::MoveTable>>(
19855 mut self,
19856 field: T,
19857 ) -> Self {
19858 self.set_inactive_validators(field.into());
19859 self
19860 }
19861 pub fn validator_candidates(&self) -> &super::MoveTable {
19863 self.validator_candidates
19864 .as_ref()
19865 .map(|field| field as _)
19866 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
19867 }
19868 pub fn validator_candidates_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
19870 self.validator_candidates.as_mut().map(|field| field as _)
19871 }
19872 pub fn validator_candidates_mut(&mut self) -> &mut super::MoveTable {
19875 self.validator_candidates.get_or_insert_default()
19876 }
19877 pub fn validator_candidates_opt(&self) -> Option<&super::MoveTable> {
19879 self.validator_candidates.as_ref().map(|field| field as _)
19880 }
19881 pub fn set_validator_candidates<T: Into<super::MoveTable>>(&mut self, field: T) {
19883 self.validator_candidates = Some(field.into().into());
19884 }
19885 pub fn with_validator_candidates<T: Into<super::MoveTable>>(
19887 mut self,
19888 field: T,
19889 ) -> Self {
19890 self.set_validator_candidates(field.into());
19891 self
19892 }
19893 pub fn at_risk_validators(&self) -> &::std::collections::BTreeMap<String, u64> {
19895 &self.at_risk_validators
19896 }
19897 pub fn at_risk_validators_mut(
19900 &mut self,
19901 ) -> &mut ::std::collections::BTreeMap<String, u64> {
19902 &mut self.at_risk_validators
19903 }
19904 pub fn set_at_risk_validators(
19906 &mut self,
19907 field: ::std::collections::BTreeMap<String, u64>,
19908 ) {
19909 self.at_risk_validators = field;
19910 }
19911 pub fn with_at_risk_validators(
19913 mut self,
19914 field: ::std::collections::BTreeMap<String, u64>,
19915 ) -> Self {
19916 self.set_at_risk_validators(field);
19917 self
19918 }
19919 pub fn extra_fields(&self) -> &super::MoveTable {
19921 self.extra_fields
19922 .as_ref()
19923 .map(|field| field as _)
19924 .unwrap_or_else(|| super::MoveTable::default_instance() as _)
19925 }
19926 pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
19928 self.extra_fields.as_mut().map(|field| field as _)
19929 }
19930 pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
19933 self.extra_fields.get_or_insert_default()
19934 }
19935 pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
19937 self.extra_fields.as_ref().map(|field| field as _)
19938 }
19939 pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
19941 self.extra_fields = Some(field.into().into());
19942 }
19943 pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
19945 self.set_extra_fields(field.into());
19946 self
19947 }
19948 }
19949 impl super::VariantDescriptor {
19950 pub const fn const_default() -> Self {
19951 Self {
19952 name: None,
19953 position: None,
19954 fields: Vec::new(),
19955 }
19956 }
19957 #[doc(hidden)]
19958 pub fn default_instance() -> &'static Self {
19959 static DEFAULT: super::VariantDescriptor = super::VariantDescriptor::const_default();
19960 &DEFAULT
19961 }
19962 pub fn name_opt_mut(&mut self) -> Option<&mut String> {
19964 self.name.as_mut().map(|field| field as _)
19965 }
19966 pub fn name_mut(&mut self) -> &mut String {
19969 self.name.get_or_insert_default()
19970 }
19971 pub fn name_opt(&self) -> Option<&str> {
19973 self.name.as_ref().map(|field| field as _)
19974 }
19975 pub fn set_name<T: Into<String>>(&mut self, field: T) {
19977 self.name = Some(field.into().into());
19978 }
19979 pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
19981 self.set_name(field.into());
19982 self
19983 }
19984 pub fn position_opt_mut(&mut self) -> Option<&mut u32> {
19986 self.position.as_mut().map(|field| field as _)
19987 }
19988 pub fn position_mut(&mut self) -> &mut u32 {
19991 self.position.get_or_insert_default()
19992 }
19993 pub fn position_opt(&self) -> Option<u32> {
19995 self.position.as_ref().map(|field| *field)
19996 }
19997 pub fn set_position(&mut self, field: u32) {
19999 self.position = Some(field);
20000 }
20001 pub fn with_position(mut self, field: u32) -> Self {
20003 self.set_position(field);
20004 self
20005 }
20006 pub fn fields(&self) -> &[super::FieldDescriptor] {
20008 &self.fields
20009 }
20010 pub fn fields_mut(&mut self) -> &mut Vec<super::FieldDescriptor> {
20013 &mut self.fields
20014 }
20015 pub fn set_fields(&mut self, field: Vec<super::FieldDescriptor>) {
20017 self.fields = field;
20018 }
20019 pub fn with_fields(mut self, field: Vec<super::FieldDescriptor>) -> Self {
20021 self.set_fields(field);
20022 self
20023 }
20024 }
20025 impl super::VerifySignatureRequest {
20026 pub const fn const_default() -> Self {
20027 Self {
20028 message: None,
20029 signature: None,
20030 address: None,
20031 jwks: Vec::new(),
20032 }
20033 }
20034 #[doc(hidden)]
20035 pub fn default_instance() -> &'static Self {
20036 static DEFAULT: super::VerifySignatureRequest = super::VerifySignatureRequest::const_default();
20037 &DEFAULT
20038 }
20039 pub fn message(&self) -> &super::Bcs {
20041 self.message
20042 .as_ref()
20043 .map(|field| field as _)
20044 .unwrap_or_else(|| super::Bcs::default_instance() as _)
20045 }
20046 pub fn message_opt_mut(&mut self) -> Option<&mut super::Bcs> {
20048 self.message.as_mut().map(|field| field as _)
20049 }
20050 pub fn message_mut(&mut self) -> &mut super::Bcs {
20053 self.message.get_or_insert_default()
20054 }
20055 pub fn message_opt(&self) -> Option<&super::Bcs> {
20057 self.message.as_ref().map(|field| field as _)
20058 }
20059 pub fn set_message<T: Into<super::Bcs>>(&mut self, field: T) {
20061 self.message = Some(field.into().into());
20062 }
20063 pub fn with_message<T: Into<super::Bcs>>(mut self, field: T) -> Self {
20065 self.set_message(field.into());
20066 self
20067 }
20068 pub fn signature(&self) -> &super::UserSignature {
20070 self.signature
20071 .as_ref()
20072 .map(|field| field as _)
20073 .unwrap_or_else(|| super::UserSignature::default_instance() as _)
20074 }
20075 pub fn signature_opt_mut(&mut self) -> Option<&mut super::UserSignature> {
20077 self.signature.as_mut().map(|field| field as _)
20078 }
20079 pub fn signature_mut(&mut self) -> &mut super::UserSignature {
20082 self.signature.get_or_insert_default()
20083 }
20084 pub fn signature_opt(&self) -> Option<&super::UserSignature> {
20086 self.signature.as_ref().map(|field| field as _)
20087 }
20088 pub fn set_signature<T: Into<super::UserSignature>>(&mut self, field: T) {
20090 self.signature = Some(field.into().into());
20091 }
20092 pub fn with_signature<T: Into<super::UserSignature>>(
20094 mut self,
20095 field: T,
20096 ) -> Self {
20097 self.set_signature(field.into());
20098 self
20099 }
20100 pub fn address_opt_mut(&mut self) -> Option<&mut String> {
20102 self.address.as_mut().map(|field| field as _)
20103 }
20104 pub fn address_mut(&mut self) -> &mut String {
20107 self.address.get_or_insert_default()
20108 }
20109 pub fn address_opt(&self) -> Option<&str> {
20111 self.address.as_ref().map(|field| field as _)
20112 }
20113 pub fn set_address<T: Into<String>>(&mut self, field: T) {
20115 self.address = Some(field.into().into());
20116 }
20117 pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
20119 self.set_address(field.into());
20120 self
20121 }
20122 pub fn jwks(&self) -> &[super::ActiveJwk] {
20124 &self.jwks
20125 }
20126 pub fn jwks_mut(&mut self) -> &mut Vec<super::ActiveJwk> {
20129 &mut self.jwks
20130 }
20131 pub fn set_jwks(&mut self, field: Vec<super::ActiveJwk>) {
20133 self.jwks = field;
20134 }
20135 pub fn with_jwks(mut self, field: Vec<super::ActiveJwk>) -> Self {
20137 self.set_jwks(field);
20138 self
20139 }
20140 }
20141 impl super::VerifySignatureResponse {
20142 pub const fn const_default() -> Self {
20143 Self {
20144 is_valid: None,
20145 reason: None,
20146 }
20147 }
20148 #[doc(hidden)]
20149 pub fn default_instance() -> &'static Self {
20150 static DEFAULT: super::VerifySignatureResponse = super::VerifySignatureResponse::const_default();
20151 &DEFAULT
20152 }
20153 pub fn is_valid_opt_mut(&mut self) -> Option<&mut bool> {
20155 self.is_valid.as_mut().map(|field| field as _)
20156 }
20157 pub fn is_valid_mut(&mut self) -> &mut bool {
20160 self.is_valid.get_or_insert_default()
20161 }
20162 pub fn is_valid_opt(&self) -> Option<bool> {
20164 self.is_valid.as_ref().map(|field| *field)
20165 }
20166 pub fn set_is_valid(&mut self, field: bool) {
20168 self.is_valid = Some(field);
20169 }
20170 pub fn with_is_valid(mut self, field: bool) -> Self {
20172 self.set_is_valid(field);
20173 self
20174 }
20175 pub fn reason_opt_mut(&mut self) -> Option<&mut String> {
20177 self.reason.as_mut().map(|field| field as _)
20178 }
20179 pub fn reason_mut(&mut self) -> &mut String {
20182 self.reason.get_or_insert_default()
20183 }
20184 pub fn reason_opt(&self) -> Option<&str> {
20186 self.reason.as_ref().map(|field| field as _)
20187 }
20188 pub fn set_reason<T: Into<String>>(&mut self, field: T) {
20190 self.reason = Some(field.into().into());
20191 }
20192 pub fn with_reason<T: Into<String>>(mut self, field: T) -> Self {
20194 self.set_reason(field.into());
20195 self
20196 }
20197 }
20198 impl super::VersionAssignment {
20199 pub const fn const_default() -> Self {
20200 Self {
20201 object_id: None,
20202 start_version: None,
20203 version: None,
20204 }
20205 }
20206 #[doc(hidden)]
20207 pub fn default_instance() -> &'static Self {
20208 static DEFAULT: super::VersionAssignment = super::VersionAssignment::const_default();
20209 &DEFAULT
20210 }
20211 pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
20213 self.object_id.as_mut().map(|field| field as _)
20214 }
20215 pub fn object_id_mut(&mut self) -> &mut String {
20218 self.object_id.get_or_insert_default()
20219 }
20220 pub fn object_id_opt(&self) -> Option<&str> {
20222 self.object_id.as_ref().map(|field| field as _)
20223 }
20224 pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
20226 self.object_id = Some(field.into().into());
20227 }
20228 pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
20230 self.set_object_id(field.into());
20231 self
20232 }
20233 pub fn start_version_opt_mut(&mut self) -> Option<&mut u64> {
20235 self.start_version.as_mut().map(|field| field as _)
20236 }
20237 pub fn start_version_mut(&mut self) -> &mut u64 {
20240 self.start_version.get_or_insert_default()
20241 }
20242 pub fn start_version_opt(&self) -> Option<u64> {
20244 self.start_version.as_ref().map(|field| *field)
20245 }
20246 pub fn set_start_version(&mut self, field: u64) {
20248 self.start_version = Some(field);
20249 }
20250 pub fn with_start_version(mut self, field: u64) -> Self {
20252 self.set_start_version(field);
20253 self
20254 }
20255 pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
20257 self.version.as_mut().map(|field| field as _)
20258 }
20259 pub fn version_mut(&mut self) -> &mut u64 {
20262 self.version.get_or_insert_default()
20263 }
20264 pub fn version_opt(&self) -> Option<u64> {
20266 self.version.as_ref().map(|field| *field)
20267 }
20268 pub fn set_version(&mut self, field: u64) {
20270 self.version = Some(field);
20271 }
20272 pub fn with_version(mut self, field: u64) -> Self {
20274 self.set_version(field);
20275 self
20276 }
20277 }
20278 impl super::Watermark {
20279 pub const fn const_default() -> Self {
20280 Self {
20281 cursor: None,
20282 checkpoint: None,
20283 }
20284 }
20285 #[doc(hidden)]
20286 pub fn default_instance() -> &'static Self {
20287 static DEFAULT: super::Watermark = super::Watermark::const_default();
20288 &DEFAULT
20289 }
20290 pub fn cursor_opt(&self) -> Option<&[u8]> {
20292 self.cursor.as_ref().map(|field| field as _)
20293 }
20294 pub fn set_cursor<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
20296 self.cursor = Some(field.into().into());
20297 }
20298 pub fn with_cursor<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
20300 self.set_cursor(field.into());
20301 self
20302 }
20303 pub fn checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
20305 self.checkpoint.as_mut().map(|field| field as _)
20306 }
20307 pub fn checkpoint_mut(&mut self) -> &mut u64 {
20310 self.checkpoint.get_or_insert_default()
20311 }
20312 pub fn checkpoint_opt(&self) -> Option<u64> {
20314 self.checkpoint.as_ref().map(|field| *field)
20315 }
20316 pub fn set_checkpoint(&mut self, field: u64) {
20318 self.checkpoint = Some(field);
20319 }
20320 pub fn with_checkpoint(mut self, field: u64) -> Self {
20322 self.set_checkpoint(field);
20323 self
20324 }
20325 }
20326 impl super::ZkLoginAuthenticator {
20327 pub const fn const_default() -> Self {
20328 Self {
20329 inputs: None,
20330 max_epoch: None,
20331 signature: None,
20332 public_identifier: None,
20333 jwk_id: None,
20334 }
20335 }
20336 #[doc(hidden)]
20337 pub fn default_instance() -> &'static Self {
20338 static DEFAULT: super::ZkLoginAuthenticator = super::ZkLoginAuthenticator::const_default();
20339 &DEFAULT
20340 }
20341 pub fn inputs(&self) -> &super::ZkLoginInputs {
20343 self.inputs
20344 .as_ref()
20345 .map(|field| field as _)
20346 .unwrap_or_else(|| super::ZkLoginInputs::default_instance() as _)
20347 }
20348 pub fn inputs_opt_mut(&mut self) -> Option<&mut super::ZkLoginInputs> {
20350 self.inputs.as_mut().map(|field| field as _)
20351 }
20352 pub fn inputs_mut(&mut self) -> &mut super::ZkLoginInputs {
20355 self.inputs.get_or_insert_default()
20356 }
20357 pub fn inputs_opt(&self) -> Option<&super::ZkLoginInputs> {
20359 self.inputs.as_ref().map(|field| field as _)
20360 }
20361 pub fn set_inputs<T: Into<super::ZkLoginInputs>>(&mut self, field: T) {
20363 self.inputs = Some(field.into().into());
20364 }
20365 pub fn with_inputs<T: Into<super::ZkLoginInputs>>(mut self, field: T) -> Self {
20367 self.set_inputs(field.into());
20368 self
20369 }
20370 pub fn max_epoch_opt_mut(&mut self) -> Option<&mut u64> {
20372 self.max_epoch.as_mut().map(|field| field as _)
20373 }
20374 pub fn max_epoch_mut(&mut self) -> &mut u64 {
20377 self.max_epoch.get_or_insert_default()
20378 }
20379 pub fn max_epoch_opt(&self) -> Option<u64> {
20381 self.max_epoch.as_ref().map(|field| *field)
20382 }
20383 pub fn set_max_epoch(&mut self, field: u64) {
20385 self.max_epoch = Some(field);
20386 }
20387 pub fn with_max_epoch(mut self, field: u64) -> Self {
20389 self.set_max_epoch(field);
20390 self
20391 }
20392 pub fn signature(&self) -> &super::SimpleSignature {
20394 self.signature
20395 .as_ref()
20396 .map(|field| field as _)
20397 .unwrap_or_else(|| super::SimpleSignature::default_instance() as _)
20398 }
20399 pub fn signature_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
20401 self.signature.as_mut().map(|field| field as _)
20402 }
20403 pub fn signature_mut(&mut self) -> &mut super::SimpleSignature {
20406 self.signature.get_or_insert_default()
20407 }
20408 pub fn signature_opt(&self) -> Option<&super::SimpleSignature> {
20410 self.signature.as_ref().map(|field| field as _)
20411 }
20412 pub fn set_signature<T: Into<super::SimpleSignature>>(&mut self, field: T) {
20414 self.signature = Some(field.into().into());
20415 }
20416 pub fn with_signature<T: Into<super::SimpleSignature>>(
20418 mut self,
20419 field: T,
20420 ) -> Self {
20421 self.set_signature(field.into());
20422 self
20423 }
20424 pub fn public_identifier(&self) -> &super::ZkLoginPublicIdentifier {
20426 self.public_identifier
20427 .as_ref()
20428 .map(|field| field as _)
20429 .unwrap_or_else(|| {
20430 super::ZkLoginPublicIdentifier::default_instance() as _
20431 })
20432 }
20433 pub fn public_identifier_opt_mut(
20435 &mut self,
20436 ) -> Option<&mut super::ZkLoginPublicIdentifier> {
20437 self.public_identifier.as_mut().map(|field| field as _)
20438 }
20439 pub fn public_identifier_mut(&mut self) -> &mut super::ZkLoginPublicIdentifier {
20442 self.public_identifier.get_or_insert_default()
20443 }
20444 pub fn public_identifier_opt(&self) -> Option<&super::ZkLoginPublicIdentifier> {
20446 self.public_identifier.as_ref().map(|field| field as _)
20447 }
20448 pub fn set_public_identifier<T: Into<super::ZkLoginPublicIdentifier>>(
20450 &mut self,
20451 field: T,
20452 ) {
20453 self.public_identifier = Some(field.into().into());
20454 }
20455 pub fn with_public_identifier<T: Into<super::ZkLoginPublicIdentifier>>(
20457 mut self,
20458 field: T,
20459 ) -> Self {
20460 self.set_public_identifier(field.into());
20461 self
20462 }
20463 pub fn jwk_id(&self) -> &super::JwkId {
20465 self.jwk_id
20466 .as_ref()
20467 .map(|field| field as _)
20468 .unwrap_or_else(|| super::JwkId::default_instance() as _)
20469 }
20470 pub fn jwk_id_opt_mut(&mut self) -> Option<&mut super::JwkId> {
20472 self.jwk_id.as_mut().map(|field| field as _)
20473 }
20474 pub fn jwk_id_mut(&mut self) -> &mut super::JwkId {
20477 self.jwk_id.get_or_insert_default()
20478 }
20479 pub fn jwk_id_opt(&self) -> Option<&super::JwkId> {
20481 self.jwk_id.as_ref().map(|field| field as _)
20482 }
20483 pub fn set_jwk_id<T: Into<super::JwkId>>(&mut self, field: T) {
20485 self.jwk_id = Some(field.into().into());
20486 }
20487 pub fn with_jwk_id<T: Into<super::JwkId>>(mut self, field: T) -> Self {
20489 self.set_jwk_id(field.into());
20490 self
20491 }
20492 }
20493 impl super::ZkLoginClaim {
20494 pub const fn const_default() -> Self {
20495 Self {
20496 value: None,
20497 index_mod_4: None,
20498 }
20499 }
20500 #[doc(hidden)]
20501 pub fn default_instance() -> &'static Self {
20502 static DEFAULT: super::ZkLoginClaim = super::ZkLoginClaim::const_default();
20503 &DEFAULT
20504 }
20505 pub fn value_opt_mut(&mut self) -> Option<&mut String> {
20507 self.value.as_mut().map(|field| field as _)
20508 }
20509 pub fn value_mut(&mut self) -> &mut String {
20512 self.value.get_or_insert_default()
20513 }
20514 pub fn value_opt(&self) -> Option<&str> {
20516 self.value.as_ref().map(|field| field as _)
20517 }
20518 pub fn set_value<T: Into<String>>(&mut self, field: T) {
20520 self.value = Some(field.into().into());
20521 }
20522 pub fn with_value<T: Into<String>>(mut self, field: T) -> Self {
20524 self.set_value(field.into());
20525 self
20526 }
20527 pub fn index_mod_4_opt_mut(&mut self) -> Option<&mut u32> {
20529 self.index_mod_4.as_mut().map(|field| field as _)
20530 }
20531 pub fn index_mod_4_mut(&mut self) -> &mut u32 {
20534 self.index_mod_4.get_or_insert_default()
20535 }
20536 pub fn index_mod_4_opt(&self) -> Option<u32> {
20538 self.index_mod_4.as_ref().map(|field| *field)
20539 }
20540 pub fn set_index_mod_4(&mut self, field: u32) {
20542 self.index_mod_4 = Some(field);
20543 }
20544 pub fn with_index_mod_4(mut self, field: u32) -> Self {
20546 self.set_index_mod_4(field);
20547 self
20548 }
20549 }
20550 impl super::ZkLoginInputs {
20551 pub const fn const_default() -> Self {
20552 Self {
20553 proof_points: None,
20554 iss_base64_details: None,
20555 header_base64: None,
20556 address_seed: None,
20557 }
20558 }
20559 #[doc(hidden)]
20560 pub fn default_instance() -> &'static Self {
20561 static DEFAULT: super::ZkLoginInputs = super::ZkLoginInputs::const_default();
20562 &DEFAULT
20563 }
20564 pub fn proof_points(&self) -> &super::ZkLoginProof {
20566 self.proof_points
20567 .as_ref()
20568 .map(|field| field as _)
20569 .unwrap_or_else(|| super::ZkLoginProof::default_instance() as _)
20570 }
20571 pub fn proof_points_opt_mut(&mut self) -> Option<&mut super::ZkLoginProof> {
20573 self.proof_points.as_mut().map(|field| field as _)
20574 }
20575 pub fn proof_points_mut(&mut self) -> &mut super::ZkLoginProof {
20578 self.proof_points.get_or_insert_default()
20579 }
20580 pub fn proof_points_opt(&self) -> Option<&super::ZkLoginProof> {
20582 self.proof_points.as_ref().map(|field| field as _)
20583 }
20584 pub fn set_proof_points<T: Into<super::ZkLoginProof>>(&mut self, field: T) {
20586 self.proof_points = Some(field.into().into());
20587 }
20588 pub fn with_proof_points<T: Into<super::ZkLoginProof>>(
20590 mut self,
20591 field: T,
20592 ) -> Self {
20593 self.set_proof_points(field.into());
20594 self
20595 }
20596 pub fn iss_base64_details(&self) -> &super::ZkLoginClaim {
20598 self.iss_base64_details
20599 .as_ref()
20600 .map(|field| field as _)
20601 .unwrap_or_else(|| super::ZkLoginClaim::default_instance() as _)
20602 }
20603 pub fn iss_base64_details_opt_mut(
20605 &mut self,
20606 ) -> Option<&mut super::ZkLoginClaim> {
20607 self.iss_base64_details.as_mut().map(|field| field as _)
20608 }
20609 pub fn iss_base64_details_mut(&mut self) -> &mut super::ZkLoginClaim {
20612 self.iss_base64_details.get_or_insert_default()
20613 }
20614 pub fn iss_base64_details_opt(&self) -> Option<&super::ZkLoginClaim> {
20616 self.iss_base64_details.as_ref().map(|field| field as _)
20617 }
20618 pub fn set_iss_base64_details<T: Into<super::ZkLoginClaim>>(
20620 &mut self,
20621 field: T,
20622 ) {
20623 self.iss_base64_details = Some(field.into().into());
20624 }
20625 pub fn with_iss_base64_details<T: Into<super::ZkLoginClaim>>(
20627 mut self,
20628 field: T,
20629 ) -> Self {
20630 self.set_iss_base64_details(field.into());
20631 self
20632 }
20633 pub fn header_base64_opt_mut(&mut self) -> Option<&mut String> {
20635 self.header_base64.as_mut().map(|field| field as _)
20636 }
20637 pub fn header_base64_mut(&mut self) -> &mut String {
20640 self.header_base64.get_or_insert_default()
20641 }
20642 pub fn header_base64_opt(&self) -> Option<&str> {
20644 self.header_base64.as_ref().map(|field| field as _)
20645 }
20646 pub fn set_header_base64<T: Into<String>>(&mut self, field: T) {
20648 self.header_base64 = Some(field.into().into());
20649 }
20650 pub fn with_header_base64<T: Into<String>>(mut self, field: T) -> Self {
20652 self.set_header_base64(field.into());
20653 self
20654 }
20655 pub fn address_seed_opt_mut(&mut self) -> Option<&mut String> {
20657 self.address_seed.as_mut().map(|field| field as _)
20658 }
20659 pub fn address_seed_mut(&mut self) -> &mut String {
20662 self.address_seed.get_or_insert_default()
20663 }
20664 pub fn address_seed_opt(&self) -> Option<&str> {
20666 self.address_seed.as_ref().map(|field| field as _)
20667 }
20668 pub fn set_address_seed<T: Into<String>>(&mut self, field: T) {
20670 self.address_seed = Some(field.into().into());
20671 }
20672 pub fn with_address_seed<T: Into<String>>(mut self, field: T) -> Self {
20674 self.set_address_seed(field.into());
20675 self
20676 }
20677 }
20678 impl super::ZkLoginProof {
20679 pub const fn const_default() -> Self {
20680 Self { a: None, b: None, c: None }
20681 }
20682 #[doc(hidden)]
20683 pub fn default_instance() -> &'static Self {
20684 static DEFAULT: super::ZkLoginProof = super::ZkLoginProof::const_default();
20685 &DEFAULT
20686 }
20687 pub fn a(&self) -> &super::CircomG1 {
20689 self.a
20690 .as_ref()
20691 .map(|field| field as _)
20692 .unwrap_or_else(|| super::CircomG1::default_instance() as _)
20693 }
20694 pub fn a_opt_mut(&mut self) -> Option<&mut super::CircomG1> {
20696 self.a.as_mut().map(|field| field as _)
20697 }
20698 pub fn a_mut(&mut self) -> &mut super::CircomG1 {
20701 self.a.get_or_insert_default()
20702 }
20703 pub fn a_opt(&self) -> Option<&super::CircomG1> {
20705 self.a.as_ref().map(|field| field as _)
20706 }
20707 pub fn set_a<T: Into<super::CircomG1>>(&mut self, field: T) {
20709 self.a = Some(field.into().into());
20710 }
20711 pub fn with_a<T: Into<super::CircomG1>>(mut self, field: T) -> Self {
20713 self.set_a(field.into());
20714 self
20715 }
20716 pub fn b(&self) -> &super::CircomG2 {
20718 self.b
20719 .as_ref()
20720 .map(|field| field as _)
20721 .unwrap_or_else(|| super::CircomG2::default_instance() as _)
20722 }
20723 pub fn b_opt_mut(&mut self) -> Option<&mut super::CircomG2> {
20725 self.b.as_mut().map(|field| field as _)
20726 }
20727 pub fn b_mut(&mut self) -> &mut super::CircomG2 {
20730 self.b.get_or_insert_default()
20731 }
20732 pub fn b_opt(&self) -> Option<&super::CircomG2> {
20734 self.b.as_ref().map(|field| field as _)
20735 }
20736 pub fn set_b<T: Into<super::CircomG2>>(&mut self, field: T) {
20738 self.b = Some(field.into().into());
20739 }
20740 pub fn with_b<T: Into<super::CircomG2>>(mut self, field: T) -> Self {
20742 self.set_b(field.into());
20743 self
20744 }
20745 pub fn c(&self) -> &super::CircomG1 {
20747 self.c
20748 .as_ref()
20749 .map(|field| field as _)
20750 .unwrap_or_else(|| super::CircomG1::default_instance() as _)
20751 }
20752 pub fn c_opt_mut(&mut self) -> Option<&mut super::CircomG1> {
20754 self.c.as_mut().map(|field| field as _)
20755 }
20756 pub fn c_mut(&mut self) -> &mut super::CircomG1 {
20759 self.c.get_or_insert_default()
20760 }
20761 pub fn c_opt(&self) -> Option<&super::CircomG1> {
20763 self.c.as_ref().map(|field| field as _)
20764 }
20765 pub fn set_c<T: Into<super::CircomG1>>(&mut self, field: T) {
20767 self.c = Some(field.into().into());
20768 }
20769 pub fn with_c<T: Into<super::CircomG1>>(mut self, field: T) -> Self {
20771 self.set_c(field.into());
20772 self
20773 }
20774 }
20775 impl super::ZkLoginPublicIdentifier {
20776 pub const fn const_default() -> Self {
20777 Self {
20778 iss: None,
20779 address_seed: None,
20780 }
20781 }
20782 #[doc(hidden)]
20783 pub fn default_instance() -> &'static Self {
20784 static DEFAULT: super::ZkLoginPublicIdentifier = super::ZkLoginPublicIdentifier::const_default();
20785 &DEFAULT
20786 }
20787 pub fn iss_opt_mut(&mut self) -> Option<&mut String> {
20789 self.iss.as_mut().map(|field| field as _)
20790 }
20791 pub fn iss_mut(&mut self) -> &mut String {
20794 self.iss.get_or_insert_default()
20795 }
20796 pub fn iss_opt(&self) -> Option<&str> {
20798 self.iss.as_ref().map(|field| field as _)
20799 }
20800 pub fn set_iss<T: Into<String>>(&mut self, field: T) {
20802 self.iss = Some(field.into().into());
20803 }
20804 pub fn with_iss<T: Into<String>>(mut self, field: T) -> Self {
20806 self.set_iss(field.into());
20807 self
20808 }
20809 pub fn address_seed_opt_mut(&mut self) -> Option<&mut String> {
20811 self.address_seed.as_mut().map(|field| field as _)
20812 }
20813 pub fn address_seed_mut(&mut self) -> &mut String {
20816 self.address_seed.get_or_insert_default()
20817 }
20818 pub fn address_seed_opt(&self) -> Option<&str> {
20820 self.address_seed.as_ref().map(|field| field as _)
20821 }
20822 pub fn set_address_seed<T: Into<String>>(&mut self, field: T) {
20824 self.address_seed = Some(field.into().into());
20825 }
20826 pub fn with_address_seed<T: Into<String>>(mut self, field: T) -> Self {
20828 self.set_address_seed(field.into());
20829 self
20830 }
20831 }
20832}