sui_rpc/proto/generated/
sui.rpc.v2.accessors.rs

1mod _accessor_impls {
2    #![allow(clippy::useless_conversion)]
3    impl super::ActiveJwk {
4        pub const fn const_default() -> Self {
5            Self {
6                id: None,
7                jwk: None,
8                epoch: None,
9            }
10        }
11        #[doc(hidden)]
12        pub fn default_instance() -> &'static Self {
13            static DEFAULT: super::ActiveJwk = super::ActiveJwk::const_default();
14            &DEFAULT
15        }
16        ///Returns the value of `id`, or the default value if `id` is unset.
17        pub fn id(&self) -> &super::JwkId {
18            self.id
19                .as_ref()
20                .map(|field| field as _)
21                .unwrap_or_else(|| super::JwkId::default_instance() as _)
22        }
23        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
24        pub fn id_opt_mut(&mut self) -> Option<&mut super::JwkId> {
25            self.id.as_mut().map(|field| field as _)
26        }
27        ///Returns a mutable reference to `id`.
28        ///If the field is unset, it is first initialized with the default value.
29        pub fn id_mut(&mut self) -> &mut super::JwkId {
30            self.id.get_or_insert_default()
31        }
32        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
33        pub fn id_opt(&self) -> Option<&super::JwkId> {
34            self.id.as_ref().map(|field| field as _)
35        }
36        ///Sets `id` with the provided value.
37        pub fn set_id<T: Into<super::JwkId>>(&mut self, field: T) {
38            self.id = Some(field.into().into());
39        }
40        ///Sets `id` with the provided value.
41        pub fn with_id<T: Into<super::JwkId>>(mut self, field: T) -> Self {
42            self.set_id(field.into());
43            self
44        }
45        ///Returns the value of `jwk`, or the default value if `jwk` is unset.
46        pub fn jwk(&self) -> &super::Jwk {
47            self.jwk
48                .as_ref()
49                .map(|field| field as _)
50                .unwrap_or_else(|| super::Jwk::default_instance() as _)
51        }
52        ///If `jwk` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
53        pub fn jwk_opt_mut(&mut self) -> Option<&mut super::Jwk> {
54            self.jwk.as_mut().map(|field| field as _)
55        }
56        ///Returns a mutable reference to `jwk`.
57        ///If the field is unset, it is first initialized with the default value.
58        pub fn jwk_mut(&mut self) -> &mut super::Jwk {
59            self.jwk.get_or_insert_default()
60        }
61        ///If `jwk` is set, returns [`Some`] with the value; otherwise returns [`None`].
62        pub fn jwk_opt(&self) -> Option<&super::Jwk> {
63            self.jwk.as_ref().map(|field| field as _)
64        }
65        ///Sets `jwk` with the provided value.
66        pub fn set_jwk<T: Into<super::Jwk>>(&mut self, field: T) {
67            self.jwk = Some(field.into().into());
68        }
69        ///Sets `jwk` with the provided value.
70        pub fn with_jwk<T: Into<super::Jwk>>(mut self, field: T) -> Self {
71            self.set_jwk(field.into());
72            self
73        }
74        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
75        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
76            self.epoch.as_mut().map(|field| field as _)
77        }
78        ///Returns a mutable reference to `epoch`.
79        ///If the field is unset, it is first initialized with the default value.
80        pub fn epoch_mut(&mut self) -> &mut u64 {
81            self.epoch.get_or_insert_default()
82        }
83        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
84        pub fn epoch_opt(&self) -> Option<u64> {
85            self.epoch.as_ref().map(|field| *field)
86        }
87        ///Sets `epoch` with the provided value.
88        pub fn set_epoch<T: Into<u64>>(&mut self, field: T) {
89            self.epoch = Some(field.into().into());
90        }
91        ///Sets `epoch` with the provided value.
92        pub fn with_epoch<T: Into<u64>>(mut self, field: T) -> Self {
93            self.set_epoch(field.into());
94            self
95        }
96    }
97    impl super::Argument {
98        pub const fn const_default() -> Self {
99            Self {
100                kind: None,
101                input: None,
102                result: None,
103                subresult: None,
104            }
105        }
106        #[doc(hidden)]
107        pub fn default_instance() -> &'static Self {
108            static DEFAULT: super::Argument = super::Argument::const_default();
109            &DEFAULT
110        }
111        ///Sets `kind` with the provided value.
112        pub fn with_kind<T: Into<super::argument::ArgumentKind>>(
113            mut self,
114            field: T,
115        ) -> Self {
116            self.set_kind(field.into());
117            self
118        }
119        ///If `input` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
120        pub fn input_opt_mut(&mut self) -> Option<&mut u32> {
121            self.input.as_mut().map(|field| field as _)
122        }
123        ///Returns a mutable reference to `input`.
124        ///If the field is unset, it is first initialized with the default value.
125        pub fn input_mut(&mut self) -> &mut u32 {
126            self.input.get_or_insert_default()
127        }
128        ///If `input` is set, returns [`Some`] with the value; otherwise returns [`None`].
129        pub fn input_opt(&self) -> Option<u32> {
130            self.input.as_ref().map(|field| *field)
131        }
132        ///Sets `input` with the provided value.
133        pub fn set_input<T: Into<u32>>(&mut self, field: T) {
134            self.input = Some(field.into().into());
135        }
136        ///Sets `input` with the provided value.
137        pub fn with_input<T: Into<u32>>(mut self, field: T) -> Self {
138            self.set_input(field.into());
139            self
140        }
141        ///If `result` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
142        pub fn result_opt_mut(&mut self) -> Option<&mut u32> {
143            self.result.as_mut().map(|field| field as _)
144        }
145        ///Returns a mutable reference to `result`.
146        ///If the field is unset, it is first initialized with the default value.
147        pub fn result_mut(&mut self) -> &mut u32 {
148            self.result.get_or_insert_default()
149        }
150        ///If `result` is set, returns [`Some`] with the value; otherwise returns [`None`].
151        pub fn result_opt(&self) -> Option<u32> {
152            self.result.as_ref().map(|field| *field)
153        }
154        ///Sets `result` with the provided value.
155        pub fn set_result<T: Into<u32>>(&mut self, field: T) {
156            self.result = Some(field.into().into());
157        }
158        ///Sets `result` with the provided value.
159        pub fn with_result<T: Into<u32>>(mut self, field: T) -> Self {
160            self.set_result(field.into());
161            self
162        }
163        ///If `subresult` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
164        pub fn subresult_opt_mut(&mut self) -> Option<&mut u32> {
165            self.subresult.as_mut().map(|field| field as _)
166        }
167        ///Returns a mutable reference to `subresult`.
168        ///If the field is unset, it is first initialized with the default value.
169        pub fn subresult_mut(&mut self) -> &mut u32 {
170            self.subresult.get_or_insert_default()
171        }
172        ///If `subresult` is set, returns [`Some`] with the value; otherwise returns [`None`].
173        pub fn subresult_opt(&self) -> Option<u32> {
174            self.subresult.as_ref().map(|field| *field)
175        }
176        ///Sets `subresult` with the provided value.
177        pub fn set_subresult<T: Into<u32>>(&mut self, field: T) {
178            self.subresult = Some(field.into().into());
179        }
180        ///Sets `subresult` with the provided value.
181        pub fn with_subresult<T: Into<u32>>(mut self, field: T) -> Self {
182            self.set_subresult(field.into());
183            self
184        }
185    }
186    impl super::AuthenticatorStateExpire {
187        pub const fn const_default() -> Self {
188            Self {
189                min_epoch: None,
190                authenticator_object_initial_shared_version: None,
191            }
192        }
193        #[doc(hidden)]
194        pub fn default_instance() -> &'static Self {
195            static DEFAULT: super::AuthenticatorStateExpire = super::AuthenticatorStateExpire::const_default();
196            &DEFAULT
197        }
198        ///If `min_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
199        pub fn min_epoch_opt_mut(&mut self) -> Option<&mut u64> {
200            self.min_epoch.as_mut().map(|field| field as _)
201        }
202        ///Returns a mutable reference to `min_epoch`.
203        ///If the field is unset, it is first initialized with the default value.
204        pub fn min_epoch_mut(&mut self) -> &mut u64 {
205            self.min_epoch.get_or_insert_default()
206        }
207        ///If `min_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
208        pub fn min_epoch_opt(&self) -> Option<u64> {
209            self.min_epoch.as_ref().map(|field| *field)
210        }
211        ///Sets `min_epoch` with the provided value.
212        pub fn set_min_epoch<T: Into<u64>>(&mut self, field: T) {
213            self.min_epoch = Some(field.into().into());
214        }
215        ///Sets `min_epoch` with the provided value.
216        pub fn with_min_epoch<T: Into<u64>>(mut self, field: T) -> Self {
217            self.set_min_epoch(field.into());
218            self
219        }
220        ///If `authenticator_object_initial_shared_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
221        pub fn authenticator_object_initial_shared_version_opt_mut(
222            &mut self,
223        ) -> Option<&mut u64> {
224            self.authenticator_object_initial_shared_version
225                .as_mut()
226                .map(|field| field as _)
227        }
228        ///Returns a mutable reference to `authenticator_object_initial_shared_version`.
229        ///If the field is unset, it is first initialized with the default value.
230        pub fn authenticator_object_initial_shared_version_mut(&mut self) -> &mut u64 {
231            self.authenticator_object_initial_shared_version.get_or_insert_default()
232        }
233        ///If `authenticator_object_initial_shared_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
234        pub fn authenticator_object_initial_shared_version_opt(&self) -> Option<u64> {
235            self.authenticator_object_initial_shared_version.as_ref().map(|field| *field)
236        }
237        ///Sets `authenticator_object_initial_shared_version` with the provided value.
238        pub fn set_authenticator_object_initial_shared_version<T: Into<u64>>(
239            &mut self,
240            field: T,
241        ) {
242            self.authenticator_object_initial_shared_version = Some(field.into().into());
243        }
244        ///Sets `authenticator_object_initial_shared_version` with the provided value.
245        pub fn with_authenticator_object_initial_shared_version<T: Into<u64>>(
246            mut self,
247            field: T,
248        ) -> Self {
249            self.set_authenticator_object_initial_shared_version(field.into());
250            self
251        }
252    }
253    impl super::AuthenticatorStateUpdate {
254        pub const fn const_default() -> Self {
255            Self {
256                epoch: None,
257                round: None,
258                new_active_jwks: Vec::new(),
259                authenticator_object_initial_shared_version: None,
260            }
261        }
262        #[doc(hidden)]
263        pub fn default_instance() -> &'static Self {
264            static DEFAULT: super::AuthenticatorStateUpdate = super::AuthenticatorStateUpdate::const_default();
265            &DEFAULT
266        }
267        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
268        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
269            self.epoch.as_mut().map(|field| field as _)
270        }
271        ///Returns a mutable reference to `epoch`.
272        ///If the field is unset, it is first initialized with the default value.
273        pub fn epoch_mut(&mut self) -> &mut u64 {
274            self.epoch.get_or_insert_default()
275        }
276        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
277        pub fn epoch_opt(&self) -> Option<u64> {
278            self.epoch.as_ref().map(|field| *field)
279        }
280        ///Sets `epoch` with the provided value.
281        pub fn set_epoch<T: Into<u64>>(&mut self, field: T) {
282            self.epoch = Some(field.into().into());
283        }
284        ///Sets `epoch` with the provided value.
285        pub fn with_epoch<T: Into<u64>>(mut self, field: T) -> Self {
286            self.set_epoch(field.into());
287            self
288        }
289        ///If `round` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
290        pub fn round_opt_mut(&mut self) -> Option<&mut u64> {
291            self.round.as_mut().map(|field| field as _)
292        }
293        ///Returns a mutable reference to `round`.
294        ///If the field is unset, it is first initialized with the default value.
295        pub fn round_mut(&mut self) -> &mut u64 {
296            self.round.get_or_insert_default()
297        }
298        ///If `round` is set, returns [`Some`] with the value; otherwise returns [`None`].
299        pub fn round_opt(&self) -> Option<u64> {
300            self.round.as_ref().map(|field| *field)
301        }
302        ///Sets `round` with the provided value.
303        pub fn set_round<T: Into<u64>>(&mut self, field: T) {
304            self.round = Some(field.into().into());
305        }
306        ///Sets `round` with the provided value.
307        pub fn with_round<T: Into<u64>>(mut self, field: T) -> Self {
308            self.set_round(field.into());
309            self
310        }
311        ///Returns the value of `new_active_jwks`, or the default value if `new_active_jwks` is unset.
312        pub fn new_active_jwks(&self) -> &[super::ActiveJwk] {
313            &self.new_active_jwks
314        }
315        ///Returns a mutable reference to `new_active_jwks`.
316        ///If the field is unset, it is first initialized with the default value.
317        pub fn new_active_jwks_mut(&mut self) -> &mut Vec<super::ActiveJwk> {
318            &mut self.new_active_jwks
319        }
320        ///Sets `new_active_jwks` with the provided value.
321        pub fn set_new_active_jwks(&mut self, field: Vec<super::ActiveJwk>) {
322            self.new_active_jwks = field;
323        }
324        ///Sets `new_active_jwks` with the provided value.
325        pub fn with_new_active_jwks(mut self, field: Vec<super::ActiveJwk>) -> Self {
326            self.set_new_active_jwks(field);
327            self
328        }
329        ///If `authenticator_object_initial_shared_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
330        pub fn authenticator_object_initial_shared_version_opt_mut(
331            &mut self,
332        ) -> Option<&mut u64> {
333            self.authenticator_object_initial_shared_version
334                .as_mut()
335                .map(|field| field as _)
336        }
337        ///Returns a mutable reference to `authenticator_object_initial_shared_version`.
338        ///If the field is unset, it is first initialized with the default value.
339        pub fn authenticator_object_initial_shared_version_mut(&mut self) -> &mut u64 {
340            self.authenticator_object_initial_shared_version.get_or_insert_default()
341        }
342        ///If `authenticator_object_initial_shared_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
343        pub fn authenticator_object_initial_shared_version_opt(&self) -> Option<u64> {
344            self.authenticator_object_initial_shared_version.as_ref().map(|field| *field)
345        }
346        ///Sets `authenticator_object_initial_shared_version` with the provided value.
347        pub fn set_authenticator_object_initial_shared_version<T: Into<u64>>(
348            &mut self,
349            field: T,
350        ) {
351            self.authenticator_object_initial_shared_version = Some(field.into().into());
352        }
353        ///Sets `authenticator_object_initial_shared_version` with the provided value.
354        pub fn with_authenticator_object_initial_shared_version<T: Into<u64>>(
355            mut self,
356            field: T,
357        ) -> Self {
358            self.set_authenticator_object_initial_shared_version(field.into());
359            self
360        }
361    }
362    impl super::Balance {
363        pub const fn const_default() -> Self {
364            Self {
365                coin_type: None,
366                balance: None,
367            }
368        }
369        #[doc(hidden)]
370        pub fn default_instance() -> &'static Self {
371            static DEFAULT: super::Balance = super::Balance::const_default();
372            &DEFAULT
373        }
374        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
375        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
376            self.coin_type.as_mut().map(|field| field as _)
377        }
378        ///Returns a mutable reference to `coin_type`.
379        ///If the field is unset, it is first initialized with the default value.
380        pub fn coin_type_mut(&mut self) -> &mut String {
381            self.coin_type.get_or_insert_default()
382        }
383        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
384        pub fn coin_type_opt(&self) -> Option<&str> {
385            self.coin_type.as_ref().map(|field| field as _)
386        }
387        ///Sets `coin_type` with the provided value.
388        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
389            self.coin_type = Some(field.into().into());
390        }
391        ///Sets `coin_type` with the provided value.
392        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
393            self.set_coin_type(field.into());
394            self
395        }
396        ///If `balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
397        pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
398            self.balance.as_mut().map(|field| field as _)
399        }
400        ///Returns a mutable reference to `balance`.
401        ///If the field is unset, it is first initialized with the default value.
402        pub fn balance_mut(&mut self) -> &mut u64 {
403            self.balance.get_or_insert_default()
404        }
405        ///If `balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
406        pub fn balance_opt(&self) -> Option<u64> {
407            self.balance.as_ref().map(|field| *field)
408        }
409        ///Sets `balance` with the provided value.
410        pub fn set_balance<T: Into<u64>>(&mut self, field: T) {
411            self.balance = Some(field.into().into());
412        }
413        ///Sets `balance` with the provided value.
414        pub fn with_balance<T: Into<u64>>(mut self, field: T) -> Self {
415            self.set_balance(field.into());
416            self
417        }
418    }
419    impl super::BalanceChange {
420        pub const fn const_default() -> Self {
421            Self {
422                address: None,
423                coin_type: None,
424                amount: None,
425            }
426        }
427        #[doc(hidden)]
428        pub fn default_instance() -> &'static Self {
429            static DEFAULT: super::BalanceChange = super::BalanceChange::const_default();
430            &DEFAULT
431        }
432        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
433        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
434            self.address.as_mut().map(|field| field as _)
435        }
436        ///Returns a mutable reference to `address`.
437        ///If the field is unset, it is first initialized with the default value.
438        pub fn address_mut(&mut self) -> &mut String {
439            self.address.get_or_insert_default()
440        }
441        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
442        pub fn address_opt(&self) -> Option<&str> {
443            self.address.as_ref().map(|field| field as _)
444        }
445        ///Sets `address` with the provided value.
446        pub fn set_address<T: Into<String>>(&mut self, field: T) {
447            self.address = Some(field.into().into());
448        }
449        ///Sets `address` with the provided value.
450        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
451            self.set_address(field.into());
452            self
453        }
454        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
455        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
456            self.coin_type.as_mut().map(|field| field as _)
457        }
458        ///Returns a mutable reference to `coin_type`.
459        ///If the field is unset, it is first initialized with the default value.
460        pub fn coin_type_mut(&mut self) -> &mut String {
461            self.coin_type.get_or_insert_default()
462        }
463        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
464        pub fn coin_type_opt(&self) -> Option<&str> {
465            self.coin_type.as_ref().map(|field| field as _)
466        }
467        ///Sets `coin_type` with the provided value.
468        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
469            self.coin_type = Some(field.into().into());
470        }
471        ///Sets `coin_type` with the provided value.
472        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
473            self.set_coin_type(field.into());
474            self
475        }
476        ///If `amount` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
477        pub fn amount_opt_mut(&mut self) -> Option<&mut String> {
478            self.amount.as_mut().map(|field| field as _)
479        }
480        ///Returns a mutable reference to `amount`.
481        ///If the field is unset, it is first initialized with the default value.
482        pub fn amount_mut(&mut self) -> &mut String {
483            self.amount.get_or_insert_default()
484        }
485        ///If `amount` is set, returns [`Some`] with the value; otherwise returns [`None`].
486        pub fn amount_opt(&self) -> Option<&str> {
487            self.amount.as_ref().map(|field| field as _)
488        }
489        ///Sets `amount` with the provided value.
490        pub fn set_amount<T: Into<String>>(&mut self, field: T) {
491            self.amount = Some(field.into().into());
492        }
493        ///Sets `amount` with the provided value.
494        pub fn with_amount<T: Into<String>>(mut self, field: T) -> Self {
495            self.set_amount(field.into());
496            self
497        }
498    }
499    impl super::BatchGetObjectsRequest {
500        pub const fn const_default() -> Self {
501            Self {
502                requests: Vec::new(),
503                read_mask: None,
504            }
505        }
506        #[doc(hidden)]
507        pub fn default_instance() -> &'static Self {
508            static DEFAULT: super::BatchGetObjectsRequest = super::BatchGetObjectsRequest::const_default();
509            &DEFAULT
510        }
511        ///Returns the value of `requests`, or the default value if `requests` is unset.
512        pub fn requests(&self) -> &[super::GetObjectRequest] {
513            &self.requests
514        }
515        ///Returns a mutable reference to `requests`.
516        ///If the field is unset, it is first initialized with the default value.
517        pub fn requests_mut(&mut self) -> &mut Vec<super::GetObjectRequest> {
518            &mut self.requests
519        }
520        ///Sets `requests` with the provided value.
521        pub fn set_requests(&mut self, field: Vec<super::GetObjectRequest>) {
522            self.requests = field;
523        }
524        ///Sets `requests` with the provided value.
525        pub fn with_requests(mut self, field: Vec<super::GetObjectRequest>) -> Self {
526            self.set_requests(field);
527            self
528        }
529        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
530        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
531            self.read_mask.as_mut().map(|field| field as _)
532        }
533        ///Returns a mutable reference to `read_mask`.
534        ///If the field is unset, it is first initialized with the default value.
535        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
536            self.read_mask.get_or_insert_default()
537        }
538        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
539        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
540            self.read_mask.as_ref().map(|field| field as _)
541        }
542        ///Sets `read_mask` with the provided value.
543        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
544            self.read_mask = Some(field.into().into());
545        }
546        ///Sets `read_mask` with the provided value.
547        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
548            mut self,
549            field: T,
550        ) -> Self {
551            self.set_read_mask(field.into());
552            self
553        }
554    }
555    impl super::BatchGetObjectsResponse {
556        pub const fn const_default() -> Self {
557            Self { objects: Vec::new() }
558        }
559        #[doc(hidden)]
560        pub fn default_instance() -> &'static Self {
561            static DEFAULT: super::BatchGetObjectsResponse = super::BatchGetObjectsResponse::const_default();
562            &DEFAULT
563        }
564        ///Returns the value of `objects`, or the default value if `objects` is unset.
565        pub fn objects(&self) -> &[super::GetObjectResult] {
566            &self.objects
567        }
568        ///Returns a mutable reference to `objects`.
569        ///If the field is unset, it is first initialized with the default value.
570        pub fn objects_mut(&mut self) -> &mut Vec<super::GetObjectResult> {
571            &mut self.objects
572        }
573        ///Sets `objects` with the provided value.
574        pub fn set_objects(&mut self, field: Vec<super::GetObjectResult>) {
575            self.objects = field;
576        }
577        ///Sets `objects` with the provided value.
578        pub fn with_objects(mut self, field: Vec<super::GetObjectResult>) -> Self {
579            self.set_objects(field);
580            self
581        }
582    }
583    impl super::BatchGetTransactionsRequest {
584        pub const fn const_default() -> Self {
585            Self {
586                digests: Vec::new(),
587                read_mask: None,
588            }
589        }
590        #[doc(hidden)]
591        pub fn default_instance() -> &'static Self {
592            static DEFAULT: super::BatchGetTransactionsRequest = super::BatchGetTransactionsRequest::const_default();
593            &DEFAULT
594        }
595        ///Returns the value of `digests`, or the default value if `digests` is unset.
596        pub fn digests(&self) -> &[String] {
597            &self.digests
598        }
599        ///Returns a mutable reference to `digests`.
600        ///If the field is unset, it is first initialized with the default value.
601        pub fn digests_mut(&mut self) -> &mut Vec<String> {
602            &mut self.digests
603        }
604        ///Sets `digests` with the provided value.
605        pub fn set_digests(&mut self, field: Vec<String>) {
606            self.digests = field;
607        }
608        ///Sets `digests` with the provided value.
609        pub fn with_digests(mut self, field: Vec<String>) -> Self {
610            self.set_digests(field);
611            self
612        }
613        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
614        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
615            self.read_mask.as_mut().map(|field| field as _)
616        }
617        ///Returns a mutable reference to `read_mask`.
618        ///If the field is unset, it is first initialized with the default value.
619        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
620            self.read_mask.get_or_insert_default()
621        }
622        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
623        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
624            self.read_mask.as_ref().map(|field| field as _)
625        }
626        ///Sets `read_mask` with the provided value.
627        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
628            self.read_mask = Some(field.into().into());
629        }
630        ///Sets `read_mask` with the provided value.
631        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
632            mut self,
633            field: T,
634        ) -> Self {
635            self.set_read_mask(field.into());
636            self
637        }
638    }
639    impl super::BatchGetTransactionsResponse {
640        pub const fn const_default() -> Self {
641            Self { transactions: Vec::new() }
642        }
643        #[doc(hidden)]
644        pub fn default_instance() -> &'static Self {
645            static DEFAULT: super::BatchGetTransactionsResponse = super::BatchGetTransactionsResponse::const_default();
646            &DEFAULT
647        }
648        ///Returns the value of `transactions`, or the default value if `transactions` is unset.
649        pub fn transactions(&self) -> &[super::GetTransactionResult] {
650            &self.transactions
651        }
652        ///Returns a mutable reference to `transactions`.
653        ///If the field is unset, it is first initialized with the default value.
654        pub fn transactions_mut(&mut self) -> &mut Vec<super::GetTransactionResult> {
655            &mut self.transactions
656        }
657        ///Sets `transactions` with the provided value.
658        pub fn set_transactions(&mut self, field: Vec<super::GetTransactionResult>) {
659            self.transactions = field;
660        }
661        ///Sets `transactions` with the provided value.
662        pub fn with_transactions(
663            mut self,
664            field: Vec<super::GetTransactionResult>,
665        ) -> Self {
666            self.set_transactions(field);
667            self
668        }
669    }
670    impl super::Bcs {
671        pub const fn const_default() -> Self {
672            Self { name: None, value: None }
673        }
674        #[doc(hidden)]
675        pub fn default_instance() -> &'static Self {
676            static DEFAULT: super::Bcs = super::Bcs::const_default();
677            &DEFAULT
678        }
679        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
680        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
681            self.name.as_mut().map(|field| field as _)
682        }
683        ///Returns a mutable reference to `name`.
684        ///If the field is unset, it is first initialized with the default value.
685        pub fn name_mut(&mut self) -> &mut String {
686            self.name.get_or_insert_default()
687        }
688        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
689        pub fn name_opt(&self) -> Option<&str> {
690            self.name.as_ref().map(|field| field as _)
691        }
692        ///Sets `name` with the provided value.
693        pub fn set_name<T: Into<String>>(&mut self, field: T) {
694            self.name = Some(field.into().into());
695        }
696        ///Sets `name` with the provided value.
697        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
698            self.set_name(field.into());
699            self
700        }
701        ///If `value` is set, returns [`Some`] with the value; otherwise returns [`None`].
702        pub fn value_opt(&self) -> Option<&[u8]> {
703            self.value.as_ref().map(|field| field as _)
704        }
705        ///Sets `value` with the provided value.
706        pub fn set_value<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
707            self.value = Some(field.into().into());
708        }
709        ///Sets `value` with the provided value.
710        pub fn with_value<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
711            self.set_value(field.into());
712            self
713        }
714    }
715    impl super::CanceledTransaction {
716        pub const fn const_default() -> Self {
717            Self {
718                digest: None,
719                version_assignments: Vec::new(),
720            }
721        }
722        #[doc(hidden)]
723        pub fn default_instance() -> &'static Self {
724            static DEFAULT: super::CanceledTransaction = super::CanceledTransaction::const_default();
725            &DEFAULT
726        }
727        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
728        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
729            self.digest.as_mut().map(|field| field as _)
730        }
731        ///Returns a mutable reference to `digest`.
732        ///If the field is unset, it is first initialized with the default value.
733        pub fn digest_mut(&mut self) -> &mut String {
734            self.digest.get_or_insert_default()
735        }
736        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
737        pub fn digest_opt(&self) -> Option<&str> {
738            self.digest.as_ref().map(|field| field as _)
739        }
740        ///Sets `digest` with the provided value.
741        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
742            self.digest = Some(field.into().into());
743        }
744        ///Sets `digest` with the provided value.
745        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
746            self.set_digest(field.into());
747            self
748        }
749        ///Returns the value of `version_assignments`, or the default value if `version_assignments` is unset.
750        pub fn version_assignments(&self) -> &[super::VersionAssignment] {
751            &self.version_assignments
752        }
753        ///Returns a mutable reference to `version_assignments`.
754        ///If the field is unset, it is first initialized with the default value.
755        pub fn version_assignments_mut(&mut self) -> &mut Vec<super::VersionAssignment> {
756            &mut self.version_assignments
757        }
758        ///Sets `version_assignments` with the provided value.
759        pub fn set_version_assignments(&mut self, field: Vec<super::VersionAssignment>) {
760            self.version_assignments = field;
761        }
762        ///Sets `version_assignments` with the provided value.
763        pub fn with_version_assignments(
764            mut self,
765            field: Vec<super::VersionAssignment>,
766        ) -> Self {
767            self.set_version_assignments(field);
768            self
769        }
770    }
771    impl super::ChangeEpoch {
772        pub const fn const_default() -> Self {
773            Self {
774                epoch: None,
775                protocol_version: None,
776                storage_charge: None,
777                computation_charge: None,
778                storage_rebate: None,
779                non_refundable_storage_fee: None,
780                epoch_start_timestamp: None,
781                system_packages: Vec::new(),
782            }
783        }
784        #[doc(hidden)]
785        pub fn default_instance() -> &'static Self {
786            static DEFAULT: super::ChangeEpoch = super::ChangeEpoch::const_default();
787            &DEFAULT
788        }
789        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
790        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
791            self.epoch.as_mut().map(|field| field as _)
792        }
793        ///Returns a mutable reference to `epoch`.
794        ///If the field is unset, it is first initialized with the default value.
795        pub fn epoch_mut(&mut self) -> &mut u64 {
796            self.epoch.get_or_insert_default()
797        }
798        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
799        pub fn epoch_opt(&self) -> Option<u64> {
800            self.epoch.as_ref().map(|field| *field)
801        }
802        ///Sets `epoch` with the provided value.
803        pub fn set_epoch<T: Into<u64>>(&mut self, field: T) {
804            self.epoch = Some(field.into().into());
805        }
806        ///Sets `epoch` with the provided value.
807        pub fn with_epoch<T: Into<u64>>(mut self, field: T) -> Self {
808            self.set_epoch(field.into());
809            self
810        }
811        ///If `protocol_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
812        pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
813            self.protocol_version.as_mut().map(|field| field as _)
814        }
815        ///Returns a mutable reference to `protocol_version`.
816        ///If the field is unset, it is first initialized with the default value.
817        pub fn protocol_version_mut(&mut self) -> &mut u64 {
818            self.protocol_version.get_or_insert_default()
819        }
820        ///If `protocol_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
821        pub fn protocol_version_opt(&self) -> Option<u64> {
822            self.protocol_version.as_ref().map(|field| *field)
823        }
824        ///Sets `protocol_version` with the provided value.
825        pub fn set_protocol_version<T: Into<u64>>(&mut self, field: T) {
826            self.protocol_version = Some(field.into().into());
827        }
828        ///Sets `protocol_version` with the provided value.
829        pub fn with_protocol_version<T: Into<u64>>(mut self, field: T) -> Self {
830            self.set_protocol_version(field.into());
831            self
832        }
833        ///If `storage_charge` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
834        pub fn storage_charge_opt_mut(&mut self) -> Option<&mut u64> {
835            self.storage_charge.as_mut().map(|field| field as _)
836        }
837        ///Returns a mutable reference to `storage_charge`.
838        ///If the field is unset, it is first initialized with the default value.
839        pub fn storage_charge_mut(&mut self) -> &mut u64 {
840            self.storage_charge.get_or_insert_default()
841        }
842        ///If `storage_charge` is set, returns [`Some`] with the value; otherwise returns [`None`].
843        pub fn storage_charge_opt(&self) -> Option<u64> {
844            self.storage_charge.as_ref().map(|field| *field)
845        }
846        ///Sets `storage_charge` with the provided value.
847        pub fn set_storage_charge<T: Into<u64>>(&mut self, field: T) {
848            self.storage_charge = Some(field.into().into());
849        }
850        ///Sets `storage_charge` with the provided value.
851        pub fn with_storage_charge<T: Into<u64>>(mut self, field: T) -> Self {
852            self.set_storage_charge(field.into());
853            self
854        }
855        ///If `computation_charge` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
856        pub fn computation_charge_opt_mut(&mut self) -> Option<&mut u64> {
857            self.computation_charge.as_mut().map(|field| field as _)
858        }
859        ///Returns a mutable reference to `computation_charge`.
860        ///If the field is unset, it is first initialized with the default value.
861        pub fn computation_charge_mut(&mut self) -> &mut u64 {
862            self.computation_charge.get_or_insert_default()
863        }
864        ///If `computation_charge` is set, returns [`Some`] with the value; otherwise returns [`None`].
865        pub fn computation_charge_opt(&self) -> Option<u64> {
866            self.computation_charge.as_ref().map(|field| *field)
867        }
868        ///Sets `computation_charge` with the provided value.
869        pub fn set_computation_charge<T: Into<u64>>(&mut self, field: T) {
870            self.computation_charge = Some(field.into().into());
871        }
872        ///Sets `computation_charge` with the provided value.
873        pub fn with_computation_charge<T: Into<u64>>(mut self, field: T) -> Self {
874            self.set_computation_charge(field.into());
875            self
876        }
877        ///If `storage_rebate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
878        pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
879            self.storage_rebate.as_mut().map(|field| field as _)
880        }
881        ///Returns a mutable reference to `storage_rebate`.
882        ///If the field is unset, it is first initialized with the default value.
883        pub fn storage_rebate_mut(&mut self) -> &mut u64 {
884            self.storage_rebate.get_or_insert_default()
885        }
886        ///If `storage_rebate` is set, returns [`Some`] with the value; otherwise returns [`None`].
887        pub fn storage_rebate_opt(&self) -> Option<u64> {
888            self.storage_rebate.as_ref().map(|field| *field)
889        }
890        ///Sets `storage_rebate` with the provided value.
891        pub fn set_storage_rebate<T: Into<u64>>(&mut self, field: T) {
892            self.storage_rebate = Some(field.into().into());
893        }
894        ///Sets `storage_rebate` with the provided value.
895        pub fn with_storage_rebate<T: Into<u64>>(mut self, field: T) -> Self {
896            self.set_storage_rebate(field.into());
897            self
898        }
899        ///If `non_refundable_storage_fee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
900        pub fn non_refundable_storage_fee_opt_mut(&mut self) -> Option<&mut u64> {
901            self.non_refundable_storage_fee.as_mut().map(|field| field as _)
902        }
903        ///Returns a mutable reference to `non_refundable_storage_fee`.
904        ///If the field is unset, it is first initialized with the default value.
905        pub fn non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
906            self.non_refundable_storage_fee.get_or_insert_default()
907        }
908        ///If `non_refundable_storage_fee` is set, returns [`Some`] with the value; otherwise returns [`None`].
909        pub fn non_refundable_storage_fee_opt(&self) -> Option<u64> {
910            self.non_refundable_storage_fee.as_ref().map(|field| *field)
911        }
912        ///Sets `non_refundable_storage_fee` with the provided value.
913        pub fn set_non_refundable_storage_fee<T: Into<u64>>(&mut self, field: T) {
914            self.non_refundable_storage_fee = Some(field.into().into());
915        }
916        ///Sets `non_refundable_storage_fee` with the provided value.
917        pub fn with_non_refundable_storage_fee<T: Into<u64>>(
918            mut self,
919            field: T,
920        ) -> Self {
921            self.set_non_refundable_storage_fee(field.into());
922            self
923        }
924        ///If `epoch_start_timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
925        pub fn epoch_start_timestamp_opt_mut(
926            &mut self,
927        ) -> Option<&mut ::prost_types::Timestamp> {
928            self.epoch_start_timestamp.as_mut().map(|field| field as _)
929        }
930        ///Returns a mutable reference to `epoch_start_timestamp`.
931        ///If the field is unset, it is first initialized with the default value.
932        pub fn epoch_start_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
933            self.epoch_start_timestamp.get_or_insert_default()
934        }
935        ///If `epoch_start_timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
936        pub fn epoch_start_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
937            self.epoch_start_timestamp.as_ref().map(|field| field as _)
938        }
939        ///Sets `epoch_start_timestamp` with the provided value.
940        pub fn set_epoch_start_timestamp<T: Into<::prost_types::Timestamp>>(
941            &mut self,
942            field: T,
943        ) {
944            self.epoch_start_timestamp = Some(field.into().into());
945        }
946        ///Sets `epoch_start_timestamp` with the provided value.
947        pub fn with_epoch_start_timestamp<T: Into<::prost_types::Timestamp>>(
948            mut self,
949            field: T,
950        ) -> Self {
951            self.set_epoch_start_timestamp(field.into());
952            self
953        }
954        ///Returns the value of `system_packages`, or the default value if `system_packages` is unset.
955        pub fn system_packages(&self) -> &[super::SystemPackage] {
956            &self.system_packages
957        }
958        ///Returns a mutable reference to `system_packages`.
959        ///If the field is unset, it is first initialized with the default value.
960        pub fn system_packages_mut(&mut self) -> &mut Vec<super::SystemPackage> {
961            &mut self.system_packages
962        }
963        ///Sets `system_packages` with the provided value.
964        pub fn set_system_packages(&mut self, field: Vec<super::SystemPackage>) {
965            self.system_packages = field;
966        }
967        ///Sets `system_packages` with the provided value.
968        pub fn with_system_packages(mut self, field: Vec<super::SystemPackage>) -> Self {
969            self.set_system_packages(field);
970            self
971        }
972    }
973    impl super::ChangedObject {
974        pub const fn const_default() -> Self {
975            Self {
976                object_id: None,
977                input_state: None,
978                input_version: None,
979                input_digest: None,
980                input_owner: None,
981                output_state: None,
982                output_version: None,
983                output_digest: None,
984                output_owner: None,
985                id_operation: None,
986                object_type: None,
987            }
988        }
989        #[doc(hidden)]
990        pub fn default_instance() -> &'static Self {
991            static DEFAULT: super::ChangedObject = super::ChangedObject::const_default();
992            &DEFAULT
993        }
994        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
995        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
996            self.object_id.as_mut().map(|field| field as _)
997        }
998        ///Returns a mutable reference to `object_id`.
999        ///If the field is unset, it is first initialized with the default value.
1000        pub fn object_id_mut(&mut self) -> &mut String {
1001            self.object_id.get_or_insert_default()
1002        }
1003        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
1004        pub fn object_id_opt(&self) -> Option<&str> {
1005            self.object_id.as_ref().map(|field| field as _)
1006        }
1007        ///Sets `object_id` with the provided value.
1008        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
1009            self.object_id = Some(field.into().into());
1010        }
1011        ///Sets `object_id` with the provided value.
1012        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
1013            self.set_object_id(field.into());
1014            self
1015        }
1016        ///Sets `input_state` with the provided value.
1017        pub fn with_input_state<T: Into<super::changed_object::InputObjectState>>(
1018            mut self,
1019            field: T,
1020        ) -> Self {
1021            self.set_input_state(field.into());
1022            self
1023        }
1024        ///If `input_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1025        pub fn input_version_opt_mut(&mut self) -> Option<&mut u64> {
1026            self.input_version.as_mut().map(|field| field as _)
1027        }
1028        ///Returns a mutable reference to `input_version`.
1029        ///If the field is unset, it is first initialized with the default value.
1030        pub fn input_version_mut(&mut self) -> &mut u64 {
1031            self.input_version.get_or_insert_default()
1032        }
1033        ///If `input_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
1034        pub fn input_version_opt(&self) -> Option<u64> {
1035            self.input_version.as_ref().map(|field| *field)
1036        }
1037        ///Sets `input_version` with the provided value.
1038        pub fn set_input_version<T: Into<u64>>(&mut self, field: T) {
1039            self.input_version = Some(field.into().into());
1040        }
1041        ///Sets `input_version` with the provided value.
1042        pub fn with_input_version<T: Into<u64>>(mut self, field: T) -> Self {
1043            self.set_input_version(field.into());
1044            self
1045        }
1046        ///If `input_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1047        pub fn input_digest_opt_mut(&mut self) -> Option<&mut String> {
1048            self.input_digest.as_mut().map(|field| field as _)
1049        }
1050        ///Returns a mutable reference to `input_digest`.
1051        ///If the field is unset, it is first initialized with the default value.
1052        pub fn input_digest_mut(&mut self) -> &mut String {
1053            self.input_digest.get_or_insert_default()
1054        }
1055        ///If `input_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1056        pub fn input_digest_opt(&self) -> Option<&str> {
1057            self.input_digest.as_ref().map(|field| field as _)
1058        }
1059        ///Sets `input_digest` with the provided value.
1060        pub fn set_input_digest<T: Into<String>>(&mut self, field: T) {
1061            self.input_digest = Some(field.into().into());
1062        }
1063        ///Sets `input_digest` with the provided value.
1064        pub fn with_input_digest<T: Into<String>>(mut self, field: T) -> Self {
1065            self.set_input_digest(field.into());
1066            self
1067        }
1068        ///Returns the value of `input_owner`, or the default value if `input_owner` is unset.
1069        pub fn input_owner(&self) -> &super::Owner {
1070            self.input_owner
1071                .as_ref()
1072                .map(|field| field as _)
1073                .unwrap_or_else(|| super::Owner::default_instance() as _)
1074        }
1075        ///If `input_owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1076        pub fn input_owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
1077            self.input_owner.as_mut().map(|field| field as _)
1078        }
1079        ///Returns a mutable reference to `input_owner`.
1080        ///If the field is unset, it is first initialized with the default value.
1081        pub fn input_owner_mut(&mut self) -> &mut super::Owner {
1082            self.input_owner.get_or_insert_default()
1083        }
1084        ///If `input_owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
1085        pub fn input_owner_opt(&self) -> Option<&super::Owner> {
1086            self.input_owner.as_ref().map(|field| field as _)
1087        }
1088        ///Sets `input_owner` with the provided value.
1089        pub fn set_input_owner<T: Into<super::Owner>>(&mut self, field: T) {
1090            self.input_owner = Some(field.into().into());
1091        }
1092        ///Sets `input_owner` with the provided value.
1093        pub fn with_input_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
1094            self.set_input_owner(field.into());
1095            self
1096        }
1097        ///Sets `output_state` with the provided value.
1098        pub fn with_output_state<T: Into<super::changed_object::OutputObjectState>>(
1099            mut self,
1100            field: T,
1101        ) -> Self {
1102            self.set_output_state(field.into());
1103            self
1104        }
1105        ///If `output_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1106        pub fn output_version_opt_mut(&mut self) -> Option<&mut u64> {
1107            self.output_version.as_mut().map(|field| field as _)
1108        }
1109        ///Returns a mutable reference to `output_version`.
1110        ///If the field is unset, it is first initialized with the default value.
1111        pub fn output_version_mut(&mut self) -> &mut u64 {
1112            self.output_version.get_or_insert_default()
1113        }
1114        ///If `output_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
1115        pub fn output_version_opt(&self) -> Option<u64> {
1116            self.output_version.as_ref().map(|field| *field)
1117        }
1118        ///Sets `output_version` with the provided value.
1119        pub fn set_output_version<T: Into<u64>>(&mut self, field: T) {
1120            self.output_version = Some(field.into().into());
1121        }
1122        ///Sets `output_version` with the provided value.
1123        pub fn with_output_version<T: Into<u64>>(mut self, field: T) -> Self {
1124            self.set_output_version(field.into());
1125            self
1126        }
1127        ///If `output_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1128        pub fn output_digest_opt_mut(&mut self) -> Option<&mut String> {
1129            self.output_digest.as_mut().map(|field| field as _)
1130        }
1131        ///Returns a mutable reference to `output_digest`.
1132        ///If the field is unset, it is first initialized with the default value.
1133        pub fn output_digest_mut(&mut self) -> &mut String {
1134            self.output_digest.get_or_insert_default()
1135        }
1136        ///If `output_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1137        pub fn output_digest_opt(&self) -> Option<&str> {
1138            self.output_digest.as_ref().map(|field| field as _)
1139        }
1140        ///Sets `output_digest` with the provided value.
1141        pub fn set_output_digest<T: Into<String>>(&mut self, field: T) {
1142            self.output_digest = Some(field.into().into());
1143        }
1144        ///Sets `output_digest` with the provided value.
1145        pub fn with_output_digest<T: Into<String>>(mut self, field: T) -> Self {
1146            self.set_output_digest(field.into());
1147            self
1148        }
1149        ///Returns the value of `output_owner`, or the default value if `output_owner` is unset.
1150        pub fn output_owner(&self) -> &super::Owner {
1151            self.output_owner
1152                .as_ref()
1153                .map(|field| field as _)
1154                .unwrap_or_else(|| super::Owner::default_instance() as _)
1155        }
1156        ///If `output_owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1157        pub fn output_owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
1158            self.output_owner.as_mut().map(|field| field as _)
1159        }
1160        ///Returns a mutable reference to `output_owner`.
1161        ///If the field is unset, it is first initialized with the default value.
1162        pub fn output_owner_mut(&mut self) -> &mut super::Owner {
1163            self.output_owner.get_or_insert_default()
1164        }
1165        ///If `output_owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
1166        pub fn output_owner_opt(&self) -> Option<&super::Owner> {
1167            self.output_owner.as_ref().map(|field| field as _)
1168        }
1169        ///Sets `output_owner` with the provided value.
1170        pub fn set_output_owner<T: Into<super::Owner>>(&mut self, field: T) {
1171            self.output_owner = Some(field.into().into());
1172        }
1173        ///Sets `output_owner` with the provided value.
1174        pub fn with_output_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
1175            self.set_output_owner(field.into());
1176            self
1177        }
1178        ///Sets `id_operation` with the provided value.
1179        pub fn with_id_operation<T: Into<super::changed_object::IdOperation>>(
1180            mut self,
1181            field: T,
1182        ) -> Self {
1183            self.set_id_operation(field.into());
1184            self
1185        }
1186        ///If `object_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1187        pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
1188            self.object_type.as_mut().map(|field| field as _)
1189        }
1190        ///Returns a mutable reference to `object_type`.
1191        ///If the field is unset, it is first initialized with the default value.
1192        pub fn object_type_mut(&mut self) -> &mut String {
1193            self.object_type.get_or_insert_default()
1194        }
1195        ///If `object_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
1196        pub fn object_type_opt(&self) -> Option<&str> {
1197            self.object_type.as_ref().map(|field| field as _)
1198        }
1199        ///Sets `object_type` with the provided value.
1200        pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
1201            self.object_type = Some(field.into().into());
1202        }
1203        ///Sets `object_type` with the provided value.
1204        pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
1205            self.set_object_type(field.into());
1206            self
1207        }
1208    }
1209    impl super::Checkpoint {
1210        pub const fn const_default() -> Self {
1211            Self {
1212                sequence_number: None,
1213                digest: None,
1214                summary: None,
1215                signature: None,
1216                contents: None,
1217                transactions: Vec::new(),
1218                objects: None,
1219            }
1220        }
1221        #[doc(hidden)]
1222        pub fn default_instance() -> &'static Self {
1223            static DEFAULT: super::Checkpoint = super::Checkpoint::const_default();
1224            &DEFAULT
1225        }
1226        ///If `sequence_number` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1227        pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
1228            self.sequence_number.as_mut().map(|field| field as _)
1229        }
1230        ///Returns a mutable reference to `sequence_number`.
1231        ///If the field is unset, it is first initialized with the default value.
1232        pub fn sequence_number_mut(&mut self) -> &mut u64 {
1233            self.sequence_number.get_or_insert_default()
1234        }
1235        ///If `sequence_number` is set, returns [`Some`] with the value; otherwise returns [`None`].
1236        pub fn sequence_number_opt(&self) -> Option<u64> {
1237            self.sequence_number.as_ref().map(|field| *field)
1238        }
1239        ///Sets `sequence_number` with the provided value.
1240        pub fn set_sequence_number<T: Into<u64>>(&mut self, field: T) {
1241            self.sequence_number = Some(field.into().into());
1242        }
1243        ///Sets `sequence_number` with the provided value.
1244        pub fn with_sequence_number<T: Into<u64>>(mut self, field: T) -> Self {
1245            self.set_sequence_number(field.into());
1246            self
1247        }
1248        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1249        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1250            self.digest.as_mut().map(|field| field as _)
1251        }
1252        ///Returns a mutable reference to `digest`.
1253        ///If the field is unset, it is first initialized with the default value.
1254        pub fn digest_mut(&mut self) -> &mut String {
1255            self.digest.get_or_insert_default()
1256        }
1257        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1258        pub fn digest_opt(&self) -> Option<&str> {
1259            self.digest.as_ref().map(|field| field as _)
1260        }
1261        ///Sets `digest` with the provided value.
1262        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1263            self.digest = Some(field.into().into());
1264        }
1265        ///Sets `digest` with the provided value.
1266        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1267            self.set_digest(field.into());
1268            self
1269        }
1270        ///Returns the value of `summary`, or the default value if `summary` is unset.
1271        pub fn summary(&self) -> &super::CheckpointSummary {
1272            self.summary
1273                .as_ref()
1274                .map(|field| field as _)
1275                .unwrap_or_else(|| super::CheckpointSummary::default_instance() as _)
1276        }
1277        ///If `summary` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1278        pub fn summary_opt_mut(&mut self) -> Option<&mut super::CheckpointSummary> {
1279            self.summary.as_mut().map(|field| field as _)
1280        }
1281        ///Returns a mutable reference to `summary`.
1282        ///If the field is unset, it is first initialized with the default value.
1283        pub fn summary_mut(&mut self) -> &mut super::CheckpointSummary {
1284            self.summary.get_or_insert_default()
1285        }
1286        ///If `summary` is set, returns [`Some`] with the value; otherwise returns [`None`].
1287        pub fn summary_opt(&self) -> Option<&super::CheckpointSummary> {
1288            self.summary.as_ref().map(|field| field as _)
1289        }
1290        ///Sets `summary` with the provided value.
1291        pub fn set_summary<T: Into<super::CheckpointSummary>>(&mut self, field: T) {
1292            self.summary = Some(field.into().into());
1293        }
1294        ///Sets `summary` with the provided value.
1295        pub fn with_summary<T: Into<super::CheckpointSummary>>(
1296            mut self,
1297            field: T,
1298        ) -> Self {
1299            self.set_summary(field.into());
1300            self
1301        }
1302        ///Returns the value of `signature`, or the default value if `signature` is unset.
1303        pub fn signature(&self) -> &super::ValidatorAggregatedSignature {
1304            self.signature
1305                .as_ref()
1306                .map(|field| field as _)
1307                .unwrap_or_else(|| {
1308                    super::ValidatorAggregatedSignature::default_instance() as _
1309                })
1310        }
1311        ///If `signature` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1312        pub fn signature_opt_mut(
1313            &mut self,
1314        ) -> Option<&mut super::ValidatorAggregatedSignature> {
1315            self.signature.as_mut().map(|field| field as _)
1316        }
1317        ///Returns a mutable reference to `signature`.
1318        ///If the field is unset, it is first initialized with the default value.
1319        pub fn signature_mut(&mut self) -> &mut super::ValidatorAggregatedSignature {
1320            self.signature.get_or_insert_default()
1321        }
1322        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
1323        pub fn signature_opt(&self) -> Option<&super::ValidatorAggregatedSignature> {
1324            self.signature.as_ref().map(|field| field as _)
1325        }
1326        ///Sets `signature` with the provided value.
1327        pub fn set_signature<T: Into<super::ValidatorAggregatedSignature>>(
1328            &mut self,
1329            field: T,
1330        ) {
1331            self.signature = Some(field.into().into());
1332        }
1333        ///Sets `signature` with the provided value.
1334        pub fn with_signature<T: Into<super::ValidatorAggregatedSignature>>(
1335            mut self,
1336            field: T,
1337        ) -> Self {
1338            self.set_signature(field.into());
1339            self
1340        }
1341        ///Returns the value of `contents`, or the default value if `contents` is unset.
1342        pub fn contents(&self) -> &super::CheckpointContents {
1343            self.contents
1344                .as_ref()
1345                .map(|field| field as _)
1346                .unwrap_or_else(|| super::CheckpointContents::default_instance() as _)
1347        }
1348        ///If `contents` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1349        pub fn contents_opt_mut(&mut self) -> Option<&mut super::CheckpointContents> {
1350            self.contents.as_mut().map(|field| field as _)
1351        }
1352        ///Returns a mutable reference to `contents`.
1353        ///If the field is unset, it is first initialized with the default value.
1354        pub fn contents_mut(&mut self) -> &mut super::CheckpointContents {
1355            self.contents.get_or_insert_default()
1356        }
1357        ///If `contents` is set, returns [`Some`] with the value; otherwise returns [`None`].
1358        pub fn contents_opt(&self) -> Option<&super::CheckpointContents> {
1359            self.contents.as_ref().map(|field| field as _)
1360        }
1361        ///Sets `contents` with the provided value.
1362        pub fn set_contents<T: Into<super::CheckpointContents>>(&mut self, field: T) {
1363            self.contents = Some(field.into().into());
1364        }
1365        ///Sets `contents` with the provided value.
1366        pub fn with_contents<T: Into<super::CheckpointContents>>(
1367            mut self,
1368            field: T,
1369        ) -> Self {
1370            self.set_contents(field.into());
1371            self
1372        }
1373        ///Returns the value of `transactions`, or the default value if `transactions` is unset.
1374        pub fn transactions(&self) -> &[super::ExecutedTransaction] {
1375            &self.transactions
1376        }
1377        ///Returns a mutable reference to `transactions`.
1378        ///If the field is unset, it is first initialized with the default value.
1379        pub fn transactions_mut(&mut self) -> &mut Vec<super::ExecutedTransaction> {
1380            &mut self.transactions
1381        }
1382        ///Sets `transactions` with the provided value.
1383        pub fn set_transactions(&mut self, field: Vec<super::ExecutedTransaction>) {
1384            self.transactions = field;
1385        }
1386        ///Sets `transactions` with the provided value.
1387        pub fn with_transactions(
1388            mut self,
1389            field: Vec<super::ExecutedTransaction>,
1390        ) -> Self {
1391            self.set_transactions(field);
1392            self
1393        }
1394        ///Returns the value of `objects`, or the default value if `objects` is unset.
1395        pub fn objects(&self) -> &super::ObjectSet {
1396            self.objects
1397                .as_ref()
1398                .map(|field| field as _)
1399                .unwrap_or_else(|| super::ObjectSet::default_instance() as _)
1400        }
1401        ///If `objects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1402        pub fn objects_opt_mut(&mut self) -> Option<&mut super::ObjectSet> {
1403            self.objects.as_mut().map(|field| field as _)
1404        }
1405        ///Returns a mutable reference to `objects`.
1406        ///If the field is unset, it is first initialized with the default value.
1407        pub fn objects_mut(&mut self) -> &mut super::ObjectSet {
1408            self.objects.get_or_insert_default()
1409        }
1410        ///If `objects` is set, returns [`Some`] with the value; otherwise returns [`None`].
1411        pub fn objects_opt(&self) -> Option<&super::ObjectSet> {
1412            self.objects.as_ref().map(|field| field as _)
1413        }
1414        ///Sets `objects` with the provided value.
1415        pub fn set_objects<T: Into<super::ObjectSet>>(&mut self, field: T) {
1416            self.objects = Some(field.into().into());
1417        }
1418        ///Sets `objects` with the provided value.
1419        pub fn with_objects<T: Into<super::ObjectSet>>(mut self, field: T) -> Self {
1420            self.set_objects(field.into());
1421            self
1422        }
1423    }
1424    impl super::CheckpointCommitment {
1425        pub const fn const_default() -> Self {
1426            Self { kind: None, digest: None }
1427        }
1428        #[doc(hidden)]
1429        pub fn default_instance() -> &'static Self {
1430            static DEFAULT: super::CheckpointCommitment = super::CheckpointCommitment::const_default();
1431            &DEFAULT
1432        }
1433        ///Sets `kind` with the provided value.
1434        pub fn with_kind<
1435            T: Into<super::checkpoint_commitment::CheckpointCommitmentKind>,
1436        >(mut self, field: T) -> Self {
1437            self.set_kind(field.into());
1438            self
1439        }
1440        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1441        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1442            self.digest.as_mut().map(|field| field as _)
1443        }
1444        ///Returns a mutable reference to `digest`.
1445        ///If the field is unset, it is first initialized with the default value.
1446        pub fn digest_mut(&mut self) -> &mut String {
1447            self.digest.get_or_insert_default()
1448        }
1449        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1450        pub fn digest_opt(&self) -> Option<&str> {
1451            self.digest.as_ref().map(|field| field as _)
1452        }
1453        ///Sets `digest` with the provided value.
1454        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1455            self.digest = Some(field.into().into());
1456        }
1457        ///Sets `digest` with the provided value.
1458        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1459            self.set_digest(field.into());
1460            self
1461        }
1462    }
1463    impl super::CheckpointContents {
1464        pub const fn const_default() -> Self {
1465            Self {
1466                bcs: None,
1467                digest: None,
1468                version: None,
1469                transactions: Vec::new(),
1470            }
1471        }
1472        #[doc(hidden)]
1473        pub fn default_instance() -> &'static Self {
1474            static DEFAULT: super::CheckpointContents = super::CheckpointContents::const_default();
1475            &DEFAULT
1476        }
1477        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
1478        pub fn bcs(&self) -> &super::Bcs {
1479            self.bcs
1480                .as_ref()
1481                .map(|field| field as _)
1482                .unwrap_or_else(|| super::Bcs::default_instance() as _)
1483        }
1484        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1485        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
1486            self.bcs.as_mut().map(|field| field as _)
1487        }
1488        ///Returns a mutable reference to `bcs`.
1489        ///If the field is unset, it is first initialized with the default value.
1490        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
1491            self.bcs.get_or_insert_default()
1492        }
1493        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
1494        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
1495            self.bcs.as_ref().map(|field| field as _)
1496        }
1497        ///Sets `bcs` with the provided value.
1498        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
1499            self.bcs = Some(field.into().into());
1500        }
1501        ///Sets `bcs` with the provided value.
1502        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
1503            self.set_bcs(field.into());
1504            self
1505        }
1506        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1507        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1508            self.digest.as_mut().map(|field| field as _)
1509        }
1510        ///Returns a mutable reference to `digest`.
1511        ///If the field is unset, it is first initialized with the default value.
1512        pub fn digest_mut(&mut self) -> &mut String {
1513            self.digest.get_or_insert_default()
1514        }
1515        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1516        pub fn digest_opt(&self) -> Option<&str> {
1517            self.digest.as_ref().map(|field| field as _)
1518        }
1519        ///Sets `digest` with the provided value.
1520        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1521            self.digest = Some(field.into().into());
1522        }
1523        ///Sets `digest` with the provided value.
1524        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1525            self.set_digest(field.into());
1526            self
1527        }
1528        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1529        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
1530            self.version.as_mut().map(|field| field as _)
1531        }
1532        ///Returns a mutable reference to `version`.
1533        ///If the field is unset, it is first initialized with the default value.
1534        pub fn version_mut(&mut self) -> &mut i32 {
1535            self.version.get_or_insert_default()
1536        }
1537        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
1538        pub fn version_opt(&self) -> Option<i32> {
1539            self.version.as_ref().map(|field| *field)
1540        }
1541        ///Sets `version` with the provided value.
1542        pub fn set_version<T: Into<i32>>(&mut self, field: T) {
1543            self.version = Some(field.into().into());
1544        }
1545        ///Sets `version` with the provided value.
1546        pub fn with_version<T: Into<i32>>(mut self, field: T) -> Self {
1547            self.set_version(field.into());
1548            self
1549        }
1550        ///Returns the value of `transactions`, or the default value if `transactions` is unset.
1551        pub fn transactions(&self) -> &[super::CheckpointedTransactionInfo] {
1552            &self.transactions
1553        }
1554        ///Returns a mutable reference to `transactions`.
1555        ///If the field is unset, it is first initialized with the default value.
1556        pub fn transactions_mut(
1557            &mut self,
1558        ) -> &mut Vec<super::CheckpointedTransactionInfo> {
1559            &mut self.transactions
1560        }
1561        ///Sets `transactions` with the provided value.
1562        pub fn set_transactions(
1563            &mut self,
1564            field: Vec<super::CheckpointedTransactionInfo>,
1565        ) {
1566            self.transactions = field;
1567        }
1568        ///Sets `transactions` with the provided value.
1569        pub fn with_transactions(
1570            mut self,
1571            field: Vec<super::CheckpointedTransactionInfo>,
1572        ) -> Self {
1573            self.set_transactions(field);
1574            self
1575        }
1576    }
1577    impl super::CheckpointSummary {
1578        pub const fn const_default() -> Self {
1579            Self {
1580                bcs: None,
1581                digest: None,
1582                epoch: None,
1583                sequence_number: None,
1584                total_network_transactions: None,
1585                content_digest: None,
1586                previous_digest: None,
1587                epoch_rolling_gas_cost_summary: None,
1588                timestamp: None,
1589                commitments: Vec::new(),
1590                end_of_epoch_data: None,
1591                version_specific_data: None,
1592            }
1593        }
1594        #[doc(hidden)]
1595        pub fn default_instance() -> &'static Self {
1596            static DEFAULT: super::CheckpointSummary = super::CheckpointSummary::const_default();
1597            &DEFAULT
1598        }
1599        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
1600        pub fn bcs(&self) -> &super::Bcs {
1601            self.bcs
1602                .as_ref()
1603                .map(|field| field as _)
1604                .unwrap_or_else(|| super::Bcs::default_instance() as _)
1605        }
1606        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1607        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
1608            self.bcs.as_mut().map(|field| field as _)
1609        }
1610        ///Returns a mutable reference to `bcs`.
1611        ///If the field is unset, it is first initialized with the default value.
1612        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
1613            self.bcs.get_or_insert_default()
1614        }
1615        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
1616        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
1617            self.bcs.as_ref().map(|field| field as _)
1618        }
1619        ///Sets `bcs` with the provided value.
1620        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
1621            self.bcs = Some(field.into().into());
1622        }
1623        ///Sets `bcs` with the provided value.
1624        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
1625            self.set_bcs(field.into());
1626            self
1627        }
1628        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1629        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1630            self.digest.as_mut().map(|field| field as _)
1631        }
1632        ///Returns a mutable reference to `digest`.
1633        ///If the field is unset, it is first initialized with the default value.
1634        pub fn digest_mut(&mut self) -> &mut String {
1635            self.digest.get_or_insert_default()
1636        }
1637        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1638        pub fn digest_opt(&self) -> Option<&str> {
1639            self.digest.as_ref().map(|field| field as _)
1640        }
1641        ///Sets `digest` with the provided value.
1642        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1643            self.digest = Some(field.into().into());
1644        }
1645        ///Sets `digest` with the provided value.
1646        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1647            self.set_digest(field.into());
1648            self
1649        }
1650        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1651        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
1652            self.epoch.as_mut().map(|field| field as _)
1653        }
1654        ///Returns a mutable reference to `epoch`.
1655        ///If the field is unset, it is first initialized with the default value.
1656        pub fn epoch_mut(&mut self) -> &mut u64 {
1657            self.epoch.get_or_insert_default()
1658        }
1659        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
1660        pub fn epoch_opt(&self) -> Option<u64> {
1661            self.epoch.as_ref().map(|field| *field)
1662        }
1663        ///Sets `epoch` with the provided value.
1664        pub fn set_epoch<T: Into<u64>>(&mut self, field: T) {
1665            self.epoch = Some(field.into().into());
1666        }
1667        ///Sets `epoch` with the provided value.
1668        pub fn with_epoch<T: Into<u64>>(mut self, field: T) -> Self {
1669            self.set_epoch(field.into());
1670            self
1671        }
1672        ///If `sequence_number` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1673        pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
1674            self.sequence_number.as_mut().map(|field| field as _)
1675        }
1676        ///Returns a mutable reference to `sequence_number`.
1677        ///If the field is unset, it is first initialized with the default value.
1678        pub fn sequence_number_mut(&mut self) -> &mut u64 {
1679            self.sequence_number.get_or_insert_default()
1680        }
1681        ///If `sequence_number` is set, returns [`Some`] with the value; otherwise returns [`None`].
1682        pub fn sequence_number_opt(&self) -> Option<u64> {
1683            self.sequence_number.as_ref().map(|field| *field)
1684        }
1685        ///Sets `sequence_number` with the provided value.
1686        pub fn set_sequence_number<T: Into<u64>>(&mut self, field: T) {
1687            self.sequence_number = Some(field.into().into());
1688        }
1689        ///Sets `sequence_number` with the provided value.
1690        pub fn with_sequence_number<T: Into<u64>>(mut self, field: T) -> Self {
1691            self.set_sequence_number(field.into());
1692            self
1693        }
1694        ///If `total_network_transactions` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1695        pub fn total_network_transactions_opt_mut(&mut self) -> Option<&mut u64> {
1696            self.total_network_transactions.as_mut().map(|field| field as _)
1697        }
1698        ///Returns a mutable reference to `total_network_transactions`.
1699        ///If the field is unset, it is first initialized with the default value.
1700        pub fn total_network_transactions_mut(&mut self) -> &mut u64 {
1701            self.total_network_transactions.get_or_insert_default()
1702        }
1703        ///If `total_network_transactions` is set, returns [`Some`] with the value; otherwise returns [`None`].
1704        pub fn total_network_transactions_opt(&self) -> Option<u64> {
1705            self.total_network_transactions.as_ref().map(|field| *field)
1706        }
1707        ///Sets `total_network_transactions` with the provided value.
1708        pub fn set_total_network_transactions<T: Into<u64>>(&mut self, field: T) {
1709            self.total_network_transactions = Some(field.into().into());
1710        }
1711        ///Sets `total_network_transactions` with the provided value.
1712        pub fn with_total_network_transactions<T: Into<u64>>(
1713            mut self,
1714            field: T,
1715        ) -> Self {
1716            self.set_total_network_transactions(field.into());
1717            self
1718        }
1719        ///If `content_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1720        pub fn content_digest_opt_mut(&mut self) -> Option<&mut String> {
1721            self.content_digest.as_mut().map(|field| field as _)
1722        }
1723        ///Returns a mutable reference to `content_digest`.
1724        ///If the field is unset, it is first initialized with the default value.
1725        pub fn content_digest_mut(&mut self) -> &mut String {
1726            self.content_digest.get_or_insert_default()
1727        }
1728        ///If `content_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1729        pub fn content_digest_opt(&self) -> Option<&str> {
1730            self.content_digest.as_ref().map(|field| field as _)
1731        }
1732        ///Sets `content_digest` with the provided value.
1733        pub fn set_content_digest<T: Into<String>>(&mut self, field: T) {
1734            self.content_digest = Some(field.into().into());
1735        }
1736        ///Sets `content_digest` with the provided value.
1737        pub fn with_content_digest<T: Into<String>>(mut self, field: T) -> Self {
1738            self.set_content_digest(field.into());
1739            self
1740        }
1741        ///If `previous_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1742        pub fn previous_digest_opt_mut(&mut self) -> Option<&mut String> {
1743            self.previous_digest.as_mut().map(|field| field as _)
1744        }
1745        ///Returns a mutable reference to `previous_digest`.
1746        ///If the field is unset, it is first initialized with the default value.
1747        pub fn previous_digest_mut(&mut self) -> &mut String {
1748            self.previous_digest.get_or_insert_default()
1749        }
1750        ///If `previous_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1751        pub fn previous_digest_opt(&self) -> Option<&str> {
1752            self.previous_digest.as_ref().map(|field| field as _)
1753        }
1754        ///Sets `previous_digest` with the provided value.
1755        pub fn set_previous_digest<T: Into<String>>(&mut self, field: T) {
1756            self.previous_digest = Some(field.into().into());
1757        }
1758        ///Sets `previous_digest` with the provided value.
1759        pub fn with_previous_digest<T: Into<String>>(mut self, field: T) -> Self {
1760            self.set_previous_digest(field.into());
1761            self
1762        }
1763        ///Returns the value of `epoch_rolling_gas_cost_summary`, or the default value if `epoch_rolling_gas_cost_summary` is unset.
1764        pub fn epoch_rolling_gas_cost_summary(&self) -> &super::GasCostSummary {
1765            self.epoch_rolling_gas_cost_summary
1766                .as_ref()
1767                .map(|field| field as _)
1768                .unwrap_or_else(|| super::GasCostSummary::default_instance() as _)
1769        }
1770        ///If `epoch_rolling_gas_cost_summary` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1771        pub fn epoch_rolling_gas_cost_summary_opt_mut(
1772            &mut self,
1773        ) -> Option<&mut super::GasCostSummary> {
1774            self.epoch_rolling_gas_cost_summary.as_mut().map(|field| field as _)
1775        }
1776        ///Returns a mutable reference to `epoch_rolling_gas_cost_summary`.
1777        ///If the field is unset, it is first initialized with the default value.
1778        pub fn epoch_rolling_gas_cost_summary_mut(
1779            &mut self,
1780        ) -> &mut super::GasCostSummary {
1781            self.epoch_rolling_gas_cost_summary.get_or_insert_default()
1782        }
1783        ///If `epoch_rolling_gas_cost_summary` is set, returns [`Some`] with the value; otherwise returns [`None`].
1784        pub fn epoch_rolling_gas_cost_summary_opt(
1785            &self,
1786        ) -> Option<&super::GasCostSummary> {
1787            self.epoch_rolling_gas_cost_summary.as_ref().map(|field| field as _)
1788        }
1789        ///Sets `epoch_rolling_gas_cost_summary` with the provided value.
1790        pub fn set_epoch_rolling_gas_cost_summary<T: Into<super::GasCostSummary>>(
1791            &mut self,
1792            field: T,
1793        ) {
1794            self.epoch_rolling_gas_cost_summary = Some(field.into().into());
1795        }
1796        ///Sets `epoch_rolling_gas_cost_summary` with the provided value.
1797        pub fn with_epoch_rolling_gas_cost_summary<T: Into<super::GasCostSummary>>(
1798            mut self,
1799            field: T,
1800        ) -> Self {
1801            self.set_epoch_rolling_gas_cost_summary(field.into());
1802            self
1803        }
1804        ///If `timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1805        pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
1806            self.timestamp.as_mut().map(|field| field as _)
1807        }
1808        ///Returns a mutable reference to `timestamp`.
1809        ///If the field is unset, it is first initialized with the default value.
1810        pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
1811            self.timestamp.get_or_insert_default()
1812        }
1813        ///If `timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
1814        pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
1815            self.timestamp.as_ref().map(|field| field as _)
1816        }
1817        ///Sets `timestamp` with the provided value.
1818        pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
1819            self.timestamp = Some(field.into().into());
1820        }
1821        ///Sets `timestamp` with the provided value.
1822        pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
1823            mut self,
1824            field: T,
1825        ) -> Self {
1826            self.set_timestamp(field.into());
1827            self
1828        }
1829        ///Returns the value of `commitments`, or the default value if `commitments` is unset.
1830        pub fn commitments(&self) -> &[super::CheckpointCommitment] {
1831            &self.commitments
1832        }
1833        ///Returns a mutable reference to `commitments`.
1834        ///If the field is unset, it is first initialized with the default value.
1835        pub fn commitments_mut(&mut self) -> &mut Vec<super::CheckpointCommitment> {
1836            &mut self.commitments
1837        }
1838        ///Sets `commitments` with the provided value.
1839        pub fn set_commitments(&mut self, field: Vec<super::CheckpointCommitment>) {
1840            self.commitments = field;
1841        }
1842        ///Sets `commitments` with the provided value.
1843        pub fn with_commitments(
1844            mut self,
1845            field: Vec<super::CheckpointCommitment>,
1846        ) -> Self {
1847            self.set_commitments(field);
1848            self
1849        }
1850        ///Returns the value of `end_of_epoch_data`, or the default value if `end_of_epoch_data` is unset.
1851        pub fn end_of_epoch_data(&self) -> &super::EndOfEpochData {
1852            self.end_of_epoch_data
1853                .as_ref()
1854                .map(|field| field as _)
1855                .unwrap_or_else(|| super::EndOfEpochData::default_instance() as _)
1856        }
1857        ///If `end_of_epoch_data` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1858        pub fn end_of_epoch_data_opt_mut(
1859            &mut self,
1860        ) -> Option<&mut super::EndOfEpochData> {
1861            self.end_of_epoch_data.as_mut().map(|field| field as _)
1862        }
1863        ///Returns a mutable reference to `end_of_epoch_data`.
1864        ///If the field is unset, it is first initialized with the default value.
1865        pub fn end_of_epoch_data_mut(&mut self) -> &mut super::EndOfEpochData {
1866            self.end_of_epoch_data.get_or_insert_default()
1867        }
1868        ///If `end_of_epoch_data` is set, returns [`Some`] with the value; otherwise returns [`None`].
1869        pub fn end_of_epoch_data_opt(&self) -> Option<&super::EndOfEpochData> {
1870            self.end_of_epoch_data.as_ref().map(|field| field as _)
1871        }
1872        ///Sets `end_of_epoch_data` with the provided value.
1873        pub fn set_end_of_epoch_data<T: Into<super::EndOfEpochData>>(
1874            &mut self,
1875            field: T,
1876        ) {
1877            self.end_of_epoch_data = Some(field.into().into());
1878        }
1879        ///Sets `end_of_epoch_data` with the provided value.
1880        pub fn with_end_of_epoch_data<T: Into<super::EndOfEpochData>>(
1881            mut self,
1882            field: T,
1883        ) -> Self {
1884            self.set_end_of_epoch_data(field.into());
1885            self
1886        }
1887        ///If `version_specific_data` is set, returns [`Some`] with the value; otherwise returns [`None`].
1888        pub fn version_specific_data_opt(&self) -> Option<&[u8]> {
1889            self.version_specific_data.as_ref().map(|field| field as _)
1890        }
1891        ///Sets `version_specific_data` with the provided value.
1892        pub fn set_version_specific_data<T: Into<::prost::bytes::Bytes>>(
1893            &mut self,
1894            field: T,
1895        ) {
1896            self.version_specific_data = Some(field.into().into());
1897        }
1898        ///Sets `version_specific_data` with the provided value.
1899        pub fn with_version_specific_data<T: Into<::prost::bytes::Bytes>>(
1900            mut self,
1901            field: T,
1902        ) -> Self {
1903            self.set_version_specific_data(field.into());
1904            self
1905        }
1906    }
1907    impl super::CheckpointedTransactionInfo {
1908        pub const fn const_default() -> Self {
1909            Self {
1910                transaction: None,
1911                effects: None,
1912                signatures: Vec::new(),
1913            }
1914        }
1915        #[doc(hidden)]
1916        pub fn default_instance() -> &'static Self {
1917            static DEFAULT: super::CheckpointedTransactionInfo = super::CheckpointedTransactionInfo::const_default();
1918            &DEFAULT
1919        }
1920        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1921        pub fn transaction_opt_mut(&mut self) -> Option<&mut String> {
1922            self.transaction.as_mut().map(|field| field as _)
1923        }
1924        ///Returns a mutable reference to `transaction`.
1925        ///If the field is unset, it is first initialized with the default value.
1926        pub fn transaction_mut(&mut self) -> &mut String {
1927            self.transaction.get_or_insert_default()
1928        }
1929        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
1930        pub fn transaction_opt(&self) -> Option<&str> {
1931            self.transaction.as_ref().map(|field| field as _)
1932        }
1933        ///Sets `transaction` with the provided value.
1934        pub fn set_transaction<T: Into<String>>(&mut self, field: T) {
1935            self.transaction = Some(field.into().into());
1936        }
1937        ///Sets `transaction` with the provided value.
1938        pub fn with_transaction<T: Into<String>>(mut self, field: T) -> Self {
1939            self.set_transaction(field.into());
1940            self
1941        }
1942        ///If `effects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1943        pub fn effects_opt_mut(&mut self) -> Option<&mut String> {
1944            self.effects.as_mut().map(|field| field as _)
1945        }
1946        ///Returns a mutable reference to `effects`.
1947        ///If the field is unset, it is first initialized with the default value.
1948        pub fn effects_mut(&mut self) -> &mut String {
1949            self.effects.get_or_insert_default()
1950        }
1951        ///If `effects` is set, returns [`Some`] with the value; otherwise returns [`None`].
1952        pub fn effects_opt(&self) -> Option<&str> {
1953            self.effects.as_ref().map(|field| field as _)
1954        }
1955        ///Sets `effects` with the provided value.
1956        pub fn set_effects<T: Into<String>>(&mut self, field: T) {
1957            self.effects = Some(field.into().into());
1958        }
1959        ///Sets `effects` with the provided value.
1960        pub fn with_effects<T: Into<String>>(mut self, field: T) -> Self {
1961            self.set_effects(field.into());
1962            self
1963        }
1964        ///Returns the value of `signatures`, or the default value if `signatures` is unset.
1965        pub fn signatures(&self) -> &[super::UserSignature] {
1966            &self.signatures
1967        }
1968        ///Returns a mutable reference to `signatures`.
1969        ///If the field is unset, it is first initialized with the default value.
1970        pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
1971            &mut self.signatures
1972        }
1973        ///Sets `signatures` with the provided value.
1974        pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
1975            self.signatures = field;
1976        }
1977        ///Sets `signatures` with the provided value.
1978        pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
1979            self.set_signatures(field);
1980            self
1981        }
1982    }
1983    impl super::CircomG1 {
1984        pub const fn const_default() -> Self {
1985            Self {
1986                e0: None,
1987                e1: None,
1988                e2: None,
1989            }
1990        }
1991        #[doc(hidden)]
1992        pub fn default_instance() -> &'static Self {
1993            static DEFAULT: super::CircomG1 = super::CircomG1::const_default();
1994            &DEFAULT
1995        }
1996        ///If `e0` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1997        pub fn e0_opt_mut(&mut self) -> Option<&mut String> {
1998            self.e0.as_mut().map(|field| field as _)
1999        }
2000        ///Returns a mutable reference to `e0`.
2001        ///If the field is unset, it is first initialized with the default value.
2002        pub fn e0_mut(&mut self) -> &mut String {
2003            self.e0.get_or_insert_default()
2004        }
2005        ///If `e0` is set, returns [`Some`] with the value; otherwise returns [`None`].
2006        pub fn e0_opt(&self) -> Option<&str> {
2007            self.e0.as_ref().map(|field| field as _)
2008        }
2009        ///Sets `e0` with the provided value.
2010        pub fn set_e0<T: Into<String>>(&mut self, field: T) {
2011            self.e0 = Some(field.into().into());
2012        }
2013        ///Sets `e0` with the provided value.
2014        pub fn with_e0<T: Into<String>>(mut self, field: T) -> Self {
2015            self.set_e0(field.into());
2016            self
2017        }
2018        ///If `e1` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2019        pub fn e1_opt_mut(&mut self) -> Option<&mut String> {
2020            self.e1.as_mut().map(|field| field as _)
2021        }
2022        ///Returns a mutable reference to `e1`.
2023        ///If the field is unset, it is first initialized with the default value.
2024        pub fn e1_mut(&mut self) -> &mut String {
2025            self.e1.get_or_insert_default()
2026        }
2027        ///If `e1` is set, returns [`Some`] with the value; otherwise returns [`None`].
2028        pub fn e1_opt(&self) -> Option<&str> {
2029            self.e1.as_ref().map(|field| field as _)
2030        }
2031        ///Sets `e1` with the provided value.
2032        pub fn set_e1<T: Into<String>>(&mut self, field: T) {
2033            self.e1 = Some(field.into().into());
2034        }
2035        ///Sets `e1` with the provided value.
2036        pub fn with_e1<T: Into<String>>(mut self, field: T) -> Self {
2037            self.set_e1(field.into());
2038            self
2039        }
2040        ///If `e2` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2041        pub fn e2_opt_mut(&mut self) -> Option<&mut String> {
2042            self.e2.as_mut().map(|field| field as _)
2043        }
2044        ///Returns a mutable reference to `e2`.
2045        ///If the field is unset, it is first initialized with the default value.
2046        pub fn e2_mut(&mut self) -> &mut String {
2047            self.e2.get_or_insert_default()
2048        }
2049        ///If `e2` is set, returns [`Some`] with the value; otherwise returns [`None`].
2050        pub fn e2_opt(&self) -> Option<&str> {
2051            self.e2.as_ref().map(|field| field as _)
2052        }
2053        ///Sets `e2` with the provided value.
2054        pub fn set_e2<T: Into<String>>(&mut self, field: T) {
2055            self.e2 = Some(field.into().into());
2056        }
2057        ///Sets `e2` with the provided value.
2058        pub fn with_e2<T: Into<String>>(mut self, field: T) -> Self {
2059            self.set_e2(field.into());
2060            self
2061        }
2062    }
2063    impl super::CircomG2 {
2064        pub const fn const_default() -> Self {
2065            Self {
2066                e00: None,
2067                e01: None,
2068                e10: None,
2069                e11: None,
2070                e20: None,
2071                e21: None,
2072            }
2073        }
2074        #[doc(hidden)]
2075        pub fn default_instance() -> &'static Self {
2076            static DEFAULT: super::CircomG2 = super::CircomG2::const_default();
2077            &DEFAULT
2078        }
2079        ///If `e00` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2080        pub fn e00_opt_mut(&mut self) -> Option<&mut String> {
2081            self.e00.as_mut().map(|field| field as _)
2082        }
2083        ///Returns a mutable reference to `e00`.
2084        ///If the field is unset, it is first initialized with the default value.
2085        pub fn e00_mut(&mut self) -> &mut String {
2086            self.e00.get_or_insert_default()
2087        }
2088        ///If `e00` is set, returns [`Some`] with the value; otherwise returns [`None`].
2089        pub fn e00_opt(&self) -> Option<&str> {
2090            self.e00.as_ref().map(|field| field as _)
2091        }
2092        ///Sets `e00` with the provided value.
2093        pub fn set_e00<T: Into<String>>(&mut self, field: T) {
2094            self.e00 = Some(field.into().into());
2095        }
2096        ///Sets `e00` with the provided value.
2097        pub fn with_e00<T: Into<String>>(mut self, field: T) -> Self {
2098            self.set_e00(field.into());
2099            self
2100        }
2101        ///If `e01` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2102        pub fn e01_opt_mut(&mut self) -> Option<&mut String> {
2103            self.e01.as_mut().map(|field| field as _)
2104        }
2105        ///Returns a mutable reference to `e01`.
2106        ///If the field is unset, it is first initialized with the default value.
2107        pub fn e01_mut(&mut self) -> &mut String {
2108            self.e01.get_or_insert_default()
2109        }
2110        ///If `e01` is set, returns [`Some`] with the value; otherwise returns [`None`].
2111        pub fn e01_opt(&self) -> Option<&str> {
2112            self.e01.as_ref().map(|field| field as _)
2113        }
2114        ///Sets `e01` with the provided value.
2115        pub fn set_e01<T: Into<String>>(&mut self, field: T) {
2116            self.e01 = Some(field.into().into());
2117        }
2118        ///Sets `e01` with the provided value.
2119        pub fn with_e01<T: Into<String>>(mut self, field: T) -> Self {
2120            self.set_e01(field.into());
2121            self
2122        }
2123        ///If `e10` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2124        pub fn e10_opt_mut(&mut self) -> Option<&mut String> {
2125            self.e10.as_mut().map(|field| field as _)
2126        }
2127        ///Returns a mutable reference to `e10`.
2128        ///If the field is unset, it is first initialized with the default value.
2129        pub fn e10_mut(&mut self) -> &mut String {
2130            self.e10.get_or_insert_default()
2131        }
2132        ///If `e10` is set, returns [`Some`] with the value; otherwise returns [`None`].
2133        pub fn e10_opt(&self) -> Option<&str> {
2134            self.e10.as_ref().map(|field| field as _)
2135        }
2136        ///Sets `e10` with the provided value.
2137        pub fn set_e10<T: Into<String>>(&mut self, field: T) {
2138            self.e10 = Some(field.into().into());
2139        }
2140        ///Sets `e10` with the provided value.
2141        pub fn with_e10<T: Into<String>>(mut self, field: T) -> Self {
2142            self.set_e10(field.into());
2143            self
2144        }
2145        ///If `e11` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2146        pub fn e11_opt_mut(&mut self) -> Option<&mut String> {
2147            self.e11.as_mut().map(|field| field as _)
2148        }
2149        ///Returns a mutable reference to `e11`.
2150        ///If the field is unset, it is first initialized with the default value.
2151        pub fn e11_mut(&mut self) -> &mut String {
2152            self.e11.get_or_insert_default()
2153        }
2154        ///If `e11` is set, returns [`Some`] with the value; otherwise returns [`None`].
2155        pub fn e11_opt(&self) -> Option<&str> {
2156            self.e11.as_ref().map(|field| field as _)
2157        }
2158        ///Sets `e11` with the provided value.
2159        pub fn set_e11<T: Into<String>>(&mut self, field: T) {
2160            self.e11 = Some(field.into().into());
2161        }
2162        ///Sets `e11` with the provided value.
2163        pub fn with_e11<T: Into<String>>(mut self, field: T) -> Self {
2164            self.set_e11(field.into());
2165            self
2166        }
2167        ///If `e20` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2168        pub fn e20_opt_mut(&mut self) -> Option<&mut String> {
2169            self.e20.as_mut().map(|field| field as _)
2170        }
2171        ///Returns a mutable reference to `e20`.
2172        ///If the field is unset, it is first initialized with the default value.
2173        pub fn e20_mut(&mut self) -> &mut String {
2174            self.e20.get_or_insert_default()
2175        }
2176        ///If `e20` is set, returns [`Some`] with the value; otherwise returns [`None`].
2177        pub fn e20_opt(&self) -> Option<&str> {
2178            self.e20.as_ref().map(|field| field as _)
2179        }
2180        ///Sets `e20` with the provided value.
2181        pub fn set_e20<T: Into<String>>(&mut self, field: T) {
2182            self.e20 = Some(field.into().into());
2183        }
2184        ///Sets `e20` with the provided value.
2185        pub fn with_e20<T: Into<String>>(mut self, field: T) -> Self {
2186            self.set_e20(field.into());
2187            self
2188        }
2189        ///If `e21` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2190        pub fn e21_opt_mut(&mut self) -> Option<&mut String> {
2191            self.e21.as_mut().map(|field| field as _)
2192        }
2193        ///Returns a mutable reference to `e21`.
2194        ///If the field is unset, it is first initialized with the default value.
2195        pub fn e21_mut(&mut self) -> &mut String {
2196            self.e21.get_or_insert_default()
2197        }
2198        ///If `e21` is set, returns [`Some`] with the value; otherwise returns [`None`].
2199        pub fn e21_opt(&self) -> Option<&str> {
2200            self.e21.as_ref().map(|field| field as _)
2201        }
2202        ///Sets `e21` with the provided value.
2203        pub fn set_e21<T: Into<String>>(&mut self, field: T) {
2204            self.e21 = Some(field.into().into());
2205        }
2206        ///Sets `e21` with the provided value.
2207        pub fn with_e21<T: Into<String>>(mut self, field: T) -> Self {
2208            self.set_e21(field.into());
2209            self
2210        }
2211    }
2212    impl super::CleverError {
2213        pub const fn const_default() -> Self {
2214            Self {
2215                error_code: None,
2216                line_number: None,
2217                constant_name: None,
2218                constant_type: None,
2219                value: None,
2220            }
2221        }
2222        #[doc(hidden)]
2223        pub fn default_instance() -> &'static Self {
2224            static DEFAULT: super::CleverError = super::CleverError::const_default();
2225            &DEFAULT
2226        }
2227        ///If `error_code` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2228        pub fn error_code_opt_mut(&mut self) -> Option<&mut u64> {
2229            self.error_code.as_mut().map(|field| field as _)
2230        }
2231        ///Returns a mutable reference to `error_code`.
2232        ///If the field is unset, it is first initialized with the default value.
2233        pub fn error_code_mut(&mut self) -> &mut u64 {
2234            self.error_code.get_or_insert_default()
2235        }
2236        ///If `error_code` is set, returns [`Some`] with the value; otherwise returns [`None`].
2237        pub fn error_code_opt(&self) -> Option<u64> {
2238            self.error_code.as_ref().map(|field| *field)
2239        }
2240        ///Sets `error_code` with the provided value.
2241        pub fn set_error_code<T: Into<u64>>(&mut self, field: T) {
2242            self.error_code = Some(field.into().into());
2243        }
2244        ///Sets `error_code` with the provided value.
2245        pub fn with_error_code<T: Into<u64>>(mut self, field: T) -> Self {
2246            self.set_error_code(field.into());
2247            self
2248        }
2249        ///If `line_number` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2250        pub fn line_number_opt_mut(&mut self) -> Option<&mut u64> {
2251            self.line_number.as_mut().map(|field| field as _)
2252        }
2253        ///Returns a mutable reference to `line_number`.
2254        ///If the field is unset, it is first initialized with the default value.
2255        pub fn line_number_mut(&mut self) -> &mut u64 {
2256            self.line_number.get_or_insert_default()
2257        }
2258        ///If `line_number` is set, returns [`Some`] with the value; otherwise returns [`None`].
2259        pub fn line_number_opt(&self) -> Option<u64> {
2260            self.line_number.as_ref().map(|field| *field)
2261        }
2262        ///Sets `line_number` with the provided value.
2263        pub fn set_line_number<T: Into<u64>>(&mut self, field: T) {
2264            self.line_number = Some(field.into().into());
2265        }
2266        ///Sets `line_number` with the provided value.
2267        pub fn with_line_number<T: Into<u64>>(mut self, field: T) -> Self {
2268            self.set_line_number(field.into());
2269            self
2270        }
2271        ///If `constant_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2272        pub fn constant_name_opt_mut(&mut self) -> Option<&mut String> {
2273            self.constant_name.as_mut().map(|field| field as _)
2274        }
2275        ///Returns a mutable reference to `constant_name`.
2276        ///If the field is unset, it is first initialized with the default value.
2277        pub fn constant_name_mut(&mut self) -> &mut String {
2278            self.constant_name.get_or_insert_default()
2279        }
2280        ///If `constant_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
2281        pub fn constant_name_opt(&self) -> Option<&str> {
2282            self.constant_name.as_ref().map(|field| field as _)
2283        }
2284        ///Sets `constant_name` with the provided value.
2285        pub fn set_constant_name<T: Into<String>>(&mut self, field: T) {
2286            self.constant_name = Some(field.into().into());
2287        }
2288        ///Sets `constant_name` with the provided value.
2289        pub fn with_constant_name<T: Into<String>>(mut self, field: T) -> Self {
2290            self.set_constant_name(field.into());
2291            self
2292        }
2293        ///If `constant_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2294        pub fn constant_type_opt_mut(&mut self) -> Option<&mut String> {
2295            self.constant_type.as_mut().map(|field| field as _)
2296        }
2297        ///Returns a mutable reference to `constant_type`.
2298        ///If the field is unset, it is first initialized with the default value.
2299        pub fn constant_type_mut(&mut self) -> &mut String {
2300            self.constant_type.get_or_insert_default()
2301        }
2302        ///If `constant_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
2303        pub fn constant_type_opt(&self) -> Option<&str> {
2304            self.constant_type.as_ref().map(|field| field as _)
2305        }
2306        ///Sets `constant_type` with the provided value.
2307        pub fn set_constant_type<T: Into<String>>(&mut self, field: T) {
2308            self.constant_type = Some(field.into().into());
2309        }
2310        ///Sets `constant_type` with the provided value.
2311        pub fn with_constant_type<T: Into<String>>(mut self, field: T) -> Self {
2312            self.set_constant_type(field.into());
2313            self
2314        }
2315        ///Returns the value of `rendered`, or the default value if `rendered` is unset.
2316        pub fn rendered(&self) -> &str {
2317            if let Some(super::clever_error::Value::Rendered(field)) = &self.value {
2318                field as _
2319            } else {
2320                ""
2321            }
2322        }
2323        ///If `rendered` is set, returns [`Some`] with the value; otherwise returns [`None`].
2324        pub fn rendered_opt(&self) -> Option<&str> {
2325            if let Some(super::clever_error::Value::Rendered(field)) = &self.value {
2326                Some(field as _)
2327            } else {
2328                None
2329            }
2330        }
2331        ///If `rendered` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2332        pub fn rendered_opt_mut(&mut self) -> Option<&mut String> {
2333            if let Some(super::clever_error::Value::Rendered(field)) = &mut self.value {
2334                Some(field as _)
2335            } else {
2336                None
2337            }
2338        }
2339        ///Returns a mutable reference to `rendered`.
2340        ///If the field is unset, it is first initialized with the default value.
2341        ///If any other oneof field in the same oneof is set, it will be cleared.
2342        pub fn rendered_mut(&mut self) -> &mut String {
2343            if self.rendered_opt_mut().is_none() {
2344                self.value = Some(
2345                    super::clever_error::Value::Rendered(String::default()),
2346                );
2347            }
2348            self.rendered_opt_mut().unwrap()
2349        }
2350        ///Sets `rendered` with the provided value.
2351        ///If any other oneof field in the same oneof is set, it will be cleared.
2352        pub fn set_rendered<T: Into<String>>(&mut self, field: T) {
2353            self.value = Some(super::clever_error::Value::Rendered(field.into().into()));
2354        }
2355        ///Sets `rendered` with the provided value.
2356        ///If any other oneof field in the same oneof is set, it will be cleared.
2357        pub fn with_rendered<T: Into<String>>(mut self, field: T) -> Self {
2358            self.set_rendered(field.into());
2359            self
2360        }
2361        ///Returns the value of `raw`, or the default value if `raw` is unset.
2362        pub fn raw(&self) -> &[u8] {
2363            if let Some(super::clever_error::Value::Raw(field)) = &self.value {
2364                field as _
2365            } else {
2366                &[]
2367            }
2368        }
2369        ///If `raw` is set, returns [`Some`] with the value; otherwise returns [`None`].
2370        pub fn raw_opt(&self) -> Option<&[u8]> {
2371            if let Some(super::clever_error::Value::Raw(field)) = &self.value {
2372                Some(field as _)
2373            } else {
2374                None
2375            }
2376        }
2377        ///If `raw` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2378        pub fn raw_opt_mut(&mut self) -> Option<&mut ::prost::bytes::Bytes> {
2379            if let Some(super::clever_error::Value::Raw(field)) = &mut self.value {
2380                Some(field as _)
2381            } else {
2382                None
2383            }
2384        }
2385        ///Returns a mutable reference to `raw`.
2386        ///If the field is unset, it is first initialized with the default value.
2387        ///If any other oneof field in the same oneof is set, it will be cleared.
2388        pub fn raw_mut(&mut self) -> &mut ::prost::bytes::Bytes {
2389            if self.raw_opt_mut().is_none() {
2390                self.value = Some(
2391                    super::clever_error::Value::Raw(::prost::bytes::Bytes::default()),
2392                );
2393            }
2394            self.raw_opt_mut().unwrap()
2395        }
2396        ///Sets `raw` with the provided value.
2397        ///If any other oneof field in the same oneof is set, it will be cleared.
2398        pub fn set_raw<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
2399            self.value = Some(super::clever_error::Value::Raw(field.into().into()));
2400        }
2401        ///Sets `raw` with the provided value.
2402        ///If any other oneof field in the same oneof is set, it will be cleared.
2403        pub fn with_raw<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
2404            self.set_raw(field.into());
2405            self
2406        }
2407    }
2408    impl super::CoinDenyListError {
2409        pub const fn const_default() -> Self {
2410            Self {
2411                address: None,
2412                coin_type: None,
2413            }
2414        }
2415        #[doc(hidden)]
2416        pub fn default_instance() -> &'static Self {
2417            static DEFAULT: super::CoinDenyListError = super::CoinDenyListError::const_default();
2418            &DEFAULT
2419        }
2420        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2421        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
2422            self.address.as_mut().map(|field| field as _)
2423        }
2424        ///Returns a mutable reference to `address`.
2425        ///If the field is unset, it is first initialized with the default value.
2426        pub fn address_mut(&mut self) -> &mut String {
2427            self.address.get_or_insert_default()
2428        }
2429        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
2430        pub fn address_opt(&self) -> Option<&str> {
2431            self.address.as_ref().map(|field| field as _)
2432        }
2433        ///Sets `address` with the provided value.
2434        pub fn set_address<T: Into<String>>(&mut self, field: T) {
2435            self.address = Some(field.into().into());
2436        }
2437        ///Sets `address` with the provided value.
2438        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
2439            self.set_address(field.into());
2440            self
2441        }
2442        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2443        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
2444            self.coin_type.as_mut().map(|field| field as _)
2445        }
2446        ///Returns a mutable reference to `coin_type`.
2447        ///If the field is unset, it is first initialized with the default value.
2448        pub fn coin_type_mut(&mut self) -> &mut String {
2449            self.coin_type.get_or_insert_default()
2450        }
2451        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
2452        pub fn coin_type_opt(&self) -> Option<&str> {
2453            self.coin_type.as_ref().map(|field| field as _)
2454        }
2455        ///Sets `coin_type` with the provided value.
2456        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
2457            self.coin_type = Some(field.into().into());
2458        }
2459        ///Sets `coin_type` with the provided value.
2460        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
2461            self.set_coin_type(field.into());
2462            self
2463        }
2464    }
2465    impl super::CoinMetadata {
2466        pub const fn const_default() -> Self {
2467            Self {
2468                id: None,
2469                decimals: None,
2470                name: None,
2471                symbol: None,
2472                description: None,
2473                icon_url: None,
2474                metadata_cap_id: None,
2475                metadata_cap_state: None,
2476            }
2477        }
2478        #[doc(hidden)]
2479        pub fn default_instance() -> &'static Self {
2480            static DEFAULT: super::CoinMetadata = super::CoinMetadata::const_default();
2481            &DEFAULT
2482        }
2483        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2484        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
2485            self.id.as_mut().map(|field| field as _)
2486        }
2487        ///Returns a mutable reference to `id`.
2488        ///If the field is unset, it is first initialized with the default value.
2489        pub fn id_mut(&mut self) -> &mut String {
2490            self.id.get_or_insert_default()
2491        }
2492        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
2493        pub fn id_opt(&self) -> Option<&str> {
2494            self.id.as_ref().map(|field| field as _)
2495        }
2496        ///Sets `id` with the provided value.
2497        pub fn set_id<T: Into<String>>(&mut self, field: T) {
2498            self.id = Some(field.into().into());
2499        }
2500        ///Sets `id` with the provided value.
2501        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
2502            self.set_id(field.into());
2503            self
2504        }
2505        ///If `decimals` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2506        pub fn decimals_opt_mut(&mut self) -> Option<&mut u32> {
2507            self.decimals.as_mut().map(|field| field as _)
2508        }
2509        ///Returns a mutable reference to `decimals`.
2510        ///If the field is unset, it is first initialized with the default value.
2511        pub fn decimals_mut(&mut self) -> &mut u32 {
2512            self.decimals.get_or_insert_default()
2513        }
2514        ///If `decimals` is set, returns [`Some`] with the value; otherwise returns [`None`].
2515        pub fn decimals_opt(&self) -> Option<u32> {
2516            self.decimals.as_ref().map(|field| *field)
2517        }
2518        ///Sets `decimals` with the provided value.
2519        pub fn set_decimals<T: Into<u32>>(&mut self, field: T) {
2520            self.decimals = Some(field.into().into());
2521        }
2522        ///Sets `decimals` with the provided value.
2523        pub fn with_decimals<T: Into<u32>>(mut self, field: T) -> Self {
2524            self.set_decimals(field.into());
2525            self
2526        }
2527        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2528        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
2529            self.name.as_mut().map(|field| field as _)
2530        }
2531        ///Returns a mutable reference to `name`.
2532        ///If the field is unset, it is first initialized with the default value.
2533        pub fn name_mut(&mut self) -> &mut String {
2534            self.name.get_or_insert_default()
2535        }
2536        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
2537        pub fn name_opt(&self) -> Option<&str> {
2538            self.name.as_ref().map(|field| field as _)
2539        }
2540        ///Sets `name` with the provided value.
2541        pub fn set_name<T: Into<String>>(&mut self, field: T) {
2542            self.name = Some(field.into().into());
2543        }
2544        ///Sets `name` with the provided value.
2545        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
2546            self.set_name(field.into());
2547            self
2548        }
2549        ///If `symbol` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2550        pub fn symbol_opt_mut(&mut self) -> Option<&mut String> {
2551            self.symbol.as_mut().map(|field| field as _)
2552        }
2553        ///Returns a mutable reference to `symbol`.
2554        ///If the field is unset, it is first initialized with the default value.
2555        pub fn symbol_mut(&mut self) -> &mut String {
2556            self.symbol.get_or_insert_default()
2557        }
2558        ///If `symbol` is set, returns [`Some`] with the value; otherwise returns [`None`].
2559        pub fn symbol_opt(&self) -> Option<&str> {
2560            self.symbol.as_ref().map(|field| field as _)
2561        }
2562        ///Sets `symbol` with the provided value.
2563        pub fn set_symbol<T: Into<String>>(&mut self, field: T) {
2564            self.symbol = Some(field.into().into());
2565        }
2566        ///Sets `symbol` with the provided value.
2567        pub fn with_symbol<T: Into<String>>(mut self, field: T) -> Self {
2568            self.set_symbol(field.into());
2569            self
2570        }
2571        ///If `description` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2572        pub fn description_opt_mut(&mut self) -> Option<&mut String> {
2573            self.description.as_mut().map(|field| field as _)
2574        }
2575        ///Returns a mutable reference to `description`.
2576        ///If the field is unset, it is first initialized with the default value.
2577        pub fn description_mut(&mut self) -> &mut String {
2578            self.description.get_or_insert_default()
2579        }
2580        ///If `description` is set, returns [`Some`] with the value; otherwise returns [`None`].
2581        pub fn description_opt(&self) -> Option<&str> {
2582            self.description.as_ref().map(|field| field as _)
2583        }
2584        ///Sets `description` with the provided value.
2585        pub fn set_description<T: Into<String>>(&mut self, field: T) {
2586            self.description = Some(field.into().into());
2587        }
2588        ///Sets `description` with the provided value.
2589        pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
2590            self.set_description(field.into());
2591            self
2592        }
2593        ///If `icon_url` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2594        pub fn icon_url_opt_mut(&mut self) -> Option<&mut String> {
2595            self.icon_url.as_mut().map(|field| field as _)
2596        }
2597        ///Returns a mutable reference to `icon_url`.
2598        ///If the field is unset, it is first initialized with the default value.
2599        pub fn icon_url_mut(&mut self) -> &mut String {
2600            self.icon_url.get_or_insert_default()
2601        }
2602        ///If `icon_url` is set, returns [`Some`] with the value; otherwise returns [`None`].
2603        pub fn icon_url_opt(&self) -> Option<&str> {
2604            self.icon_url.as_ref().map(|field| field as _)
2605        }
2606        ///Sets `icon_url` with the provided value.
2607        pub fn set_icon_url<T: Into<String>>(&mut self, field: T) {
2608            self.icon_url = Some(field.into().into());
2609        }
2610        ///Sets `icon_url` with the provided value.
2611        pub fn with_icon_url<T: Into<String>>(mut self, field: T) -> Self {
2612            self.set_icon_url(field.into());
2613            self
2614        }
2615        ///If `metadata_cap_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2616        pub fn metadata_cap_id_opt_mut(&mut self) -> Option<&mut String> {
2617            self.metadata_cap_id.as_mut().map(|field| field as _)
2618        }
2619        ///Returns a mutable reference to `metadata_cap_id`.
2620        ///If the field is unset, it is first initialized with the default value.
2621        pub fn metadata_cap_id_mut(&mut self) -> &mut String {
2622            self.metadata_cap_id.get_or_insert_default()
2623        }
2624        ///If `metadata_cap_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
2625        pub fn metadata_cap_id_opt(&self) -> Option<&str> {
2626            self.metadata_cap_id.as_ref().map(|field| field as _)
2627        }
2628        ///Sets `metadata_cap_id` with the provided value.
2629        pub fn set_metadata_cap_id<T: Into<String>>(&mut self, field: T) {
2630            self.metadata_cap_id = Some(field.into().into());
2631        }
2632        ///Sets `metadata_cap_id` with the provided value.
2633        pub fn with_metadata_cap_id<T: Into<String>>(mut self, field: T) -> Self {
2634            self.set_metadata_cap_id(field.into());
2635            self
2636        }
2637        ///Sets `metadata_cap_state` with the provided value.
2638        pub fn with_metadata_cap_state<T: Into<super::coin_metadata::MetadataCapState>>(
2639            mut self,
2640            field: T,
2641        ) -> Self {
2642            self.set_metadata_cap_state(field.into());
2643            self
2644        }
2645    }
2646    impl super::CoinTreasury {
2647        pub const fn const_default() -> Self {
2648            Self {
2649                id: None,
2650                total_supply: None,
2651                supply_state: None,
2652            }
2653        }
2654        #[doc(hidden)]
2655        pub fn default_instance() -> &'static Self {
2656            static DEFAULT: super::CoinTreasury = super::CoinTreasury::const_default();
2657            &DEFAULT
2658        }
2659        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2660        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
2661            self.id.as_mut().map(|field| field as _)
2662        }
2663        ///Returns a mutable reference to `id`.
2664        ///If the field is unset, it is first initialized with the default value.
2665        pub fn id_mut(&mut self) -> &mut String {
2666            self.id.get_or_insert_default()
2667        }
2668        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
2669        pub fn id_opt(&self) -> Option<&str> {
2670            self.id.as_ref().map(|field| field as _)
2671        }
2672        ///Sets `id` with the provided value.
2673        pub fn set_id<T: Into<String>>(&mut self, field: T) {
2674            self.id = Some(field.into().into());
2675        }
2676        ///Sets `id` with the provided value.
2677        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
2678            self.set_id(field.into());
2679            self
2680        }
2681        ///If `total_supply` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2682        pub fn total_supply_opt_mut(&mut self) -> Option<&mut u64> {
2683            self.total_supply.as_mut().map(|field| field as _)
2684        }
2685        ///Returns a mutable reference to `total_supply`.
2686        ///If the field is unset, it is first initialized with the default value.
2687        pub fn total_supply_mut(&mut self) -> &mut u64 {
2688            self.total_supply.get_or_insert_default()
2689        }
2690        ///If `total_supply` is set, returns [`Some`] with the value; otherwise returns [`None`].
2691        pub fn total_supply_opt(&self) -> Option<u64> {
2692            self.total_supply.as_ref().map(|field| *field)
2693        }
2694        ///Sets `total_supply` with the provided value.
2695        pub fn set_total_supply<T: Into<u64>>(&mut self, field: T) {
2696            self.total_supply = Some(field.into().into());
2697        }
2698        ///Sets `total_supply` with the provided value.
2699        pub fn with_total_supply<T: Into<u64>>(mut self, field: T) -> Self {
2700            self.set_total_supply(field.into());
2701            self
2702        }
2703        ///Sets `supply_state` with the provided value.
2704        pub fn with_supply_state<T: Into<super::coin_treasury::SupplyState>>(
2705            mut self,
2706            field: T,
2707        ) -> Self {
2708            self.set_supply_state(field.into());
2709            self
2710        }
2711    }
2712    impl super::Command {
2713        pub const fn const_default() -> Self {
2714            Self { command: None }
2715        }
2716        #[doc(hidden)]
2717        pub fn default_instance() -> &'static Self {
2718            static DEFAULT: super::Command = super::Command::const_default();
2719            &DEFAULT
2720        }
2721        ///Returns the value of `move_call`, or the default value if `move_call` is unset.
2722        pub fn move_call(&self) -> &super::MoveCall {
2723            if let Some(super::command::Command::MoveCall(field)) = &self.command {
2724                field as _
2725            } else {
2726                super::MoveCall::default_instance() as _
2727            }
2728        }
2729        ///If `move_call` is set, returns [`Some`] with the value; otherwise returns [`None`].
2730        pub fn move_call_opt(&self) -> Option<&super::MoveCall> {
2731            if let Some(super::command::Command::MoveCall(field)) = &self.command {
2732                Some(field as _)
2733            } else {
2734                None
2735            }
2736        }
2737        ///If `move_call` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2738        pub fn move_call_opt_mut(&mut self) -> Option<&mut super::MoveCall> {
2739            if let Some(super::command::Command::MoveCall(field)) = &mut self.command {
2740                Some(field as _)
2741            } else {
2742                None
2743            }
2744        }
2745        ///Returns a mutable reference to `move_call`.
2746        ///If the field is unset, it is first initialized with the default value.
2747        ///If any other oneof field in the same oneof is set, it will be cleared.
2748        pub fn move_call_mut(&mut self) -> &mut super::MoveCall {
2749            if self.move_call_opt_mut().is_none() {
2750                self.command = Some(
2751                    super::command::Command::MoveCall(super::MoveCall::default()),
2752                );
2753            }
2754            self.move_call_opt_mut().unwrap()
2755        }
2756        ///Sets `move_call` with the provided value.
2757        ///If any other oneof field in the same oneof is set, it will be cleared.
2758        pub fn set_move_call<T: Into<super::MoveCall>>(&mut self, field: T) {
2759            self.command = Some(super::command::Command::MoveCall(field.into().into()));
2760        }
2761        ///Sets `move_call` with the provided value.
2762        ///If any other oneof field in the same oneof is set, it will be cleared.
2763        pub fn with_move_call<T: Into<super::MoveCall>>(mut self, field: T) -> Self {
2764            self.set_move_call(field.into());
2765            self
2766        }
2767        ///Returns the value of `transfer_objects`, or the default value if `transfer_objects` is unset.
2768        pub fn transfer_objects(&self) -> &super::TransferObjects {
2769            if let Some(super::command::Command::TransferObjects(field)) = &self.command
2770            {
2771                field as _
2772            } else {
2773                super::TransferObjects::default_instance() as _
2774            }
2775        }
2776        ///If `transfer_objects` is set, returns [`Some`] with the value; otherwise returns [`None`].
2777        pub fn transfer_objects_opt(&self) -> Option<&super::TransferObjects> {
2778            if let Some(super::command::Command::TransferObjects(field)) = &self.command
2779            {
2780                Some(field as _)
2781            } else {
2782                None
2783            }
2784        }
2785        ///If `transfer_objects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2786        pub fn transfer_objects_opt_mut(
2787            &mut self,
2788        ) -> Option<&mut super::TransferObjects> {
2789            if let Some(super::command::Command::TransferObjects(field)) = &mut self
2790                .command
2791            {
2792                Some(field as _)
2793            } else {
2794                None
2795            }
2796        }
2797        ///Returns a mutable reference to `transfer_objects`.
2798        ///If the field is unset, it is first initialized with the default value.
2799        ///If any other oneof field in the same oneof is set, it will be cleared.
2800        pub fn transfer_objects_mut(&mut self) -> &mut super::TransferObjects {
2801            if self.transfer_objects_opt_mut().is_none() {
2802                self.command = Some(
2803                    super::command::Command::TransferObjects(
2804                        super::TransferObjects::default(),
2805                    ),
2806                );
2807            }
2808            self.transfer_objects_opt_mut().unwrap()
2809        }
2810        ///Sets `transfer_objects` with the provided value.
2811        ///If any other oneof field in the same oneof is set, it will be cleared.
2812        pub fn set_transfer_objects<T: Into<super::TransferObjects>>(
2813            &mut self,
2814            field: T,
2815        ) {
2816            self.command = Some(
2817                super::command::Command::TransferObjects(field.into().into()),
2818            );
2819        }
2820        ///Sets `transfer_objects` with the provided value.
2821        ///If any other oneof field in the same oneof is set, it will be cleared.
2822        pub fn with_transfer_objects<T: Into<super::TransferObjects>>(
2823            mut self,
2824            field: T,
2825        ) -> Self {
2826            self.set_transfer_objects(field.into());
2827            self
2828        }
2829        ///Returns the value of `split_coins`, or the default value if `split_coins` is unset.
2830        pub fn split_coins(&self) -> &super::SplitCoins {
2831            if let Some(super::command::Command::SplitCoins(field)) = &self.command {
2832                field as _
2833            } else {
2834                super::SplitCoins::default_instance() as _
2835            }
2836        }
2837        ///If `split_coins` is set, returns [`Some`] with the value; otherwise returns [`None`].
2838        pub fn split_coins_opt(&self) -> Option<&super::SplitCoins> {
2839            if let Some(super::command::Command::SplitCoins(field)) = &self.command {
2840                Some(field as _)
2841            } else {
2842                None
2843            }
2844        }
2845        ///If `split_coins` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2846        pub fn split_coins_opt_mut(&mut self) -> Option<&mut super::SplitCoins> {
2847            if let Some(super::command::Command::SplitCoins(field)) = &mut self.command {
2848                Some(field as _)
2849            } else {
2850                None
2851            }
2852        }
2853        ///Returns a mutable reference to `split_coins`.
2854        ///If the field is unset, it is first initialized with the default value.
2855        ///If any other oneof field in the same oneof is set, it will be cleared.
2856        pub fn split_coins_mut(&mut self) -> &mut super::SplitCoins {
2857            if self.split_coins_opt_mut().is_none() {
2858                self.command = Some(
2859                    super::command::Command::SplitCoins(super::SplitCoins::default()),
2860                );
2861            }
2862            self.split_coins_opt_mut().unwrap()
2863        }
2864        ///Sets `split_coins` with the provided value.
2865        ///If any other oneof field in the same oneof is set, it will be cleared.
2866        pub fn set_split_coins<T: Into<super::SplitCoins>>(&mut self, field: T) {
2867            self.command = Some(
2868                super::command::Command::SplitCoins(field.into().into()),
2869            );
2870        }
2871        ///Sets `split_coins` with the provided value.
2872        ///If any other oneof field in the same oneof is set, it will be cleared.
2873        pub fn with_split_coins<T: Into<super::SplitCoins>>(mut self, field: T) -> Self {
2874            self.set_split_coins(field.into());
2875            self
2876        }
2877        ///Returns the value of `merge_coins`, or the default value if `merge_coins` is unset.
2878        pub fn merge_coins(&self) -> &super::MergeCoins {
2879            if let Some(super::command::Command::MergeCoins(field)) = &self.command {
2880                field as _
2881            } else {
2882                super::MergeCoins::default_instance() as _
2883            }
2884        }
2885        ///If `merge_coins` is set, returns [`Some`] with the value; otherwise returns [`None`].
2886        pub fn merge_coins_opt(&self) -> Option<&super::MergeCoins> {
2887            if let Some(super::command::Command::MergeCoins(field)) = &self.command {
2888                Some(field as _)
2889            } else {
2890                None
2891            }
2892        }
2893        ///If `merge_coins` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2894        pub fn merge_coins_opt_mut(&mut self) -> Option<&mut super::MergeCoins> {
2895            if let Some(super::command::Command::MergeCoins(field)) = &mut self.command {
2896                Some(field as _)
2897            } else {
2898                None
2899            }
2900        }
2901        ///Returns a mutable reference to `merge_coins`.
2902        ///If the field is unset, it is first initialized with the default value.
2903        ///If any other oneof field in the same oneof is set, it will be cleared.
2904        pub fn merge_coins_mut(&mut self) -> &mut super::MergeCoins {
2905            if self.merge_coins_opt_mut().is_none() {
2906                self.command = Some(
2907                    super::command::Command::MergeCoins(super::MergeCoins::default()),
2908                );
2909            }
2910            self.merge_coins_opt_mut().unwrap()
2911        }
2912        ///Sets `merge_coins` with the provided value.
2913        ///If any other oneof field in the same oneof is set, it will be cleared.
2914        pub fn set_merge_coins<T: Into<super::MergeCoins>>(&mut self, field: T) {
2915            self.command = Some(
2916                super::command::Command::MergeCoins(field.into().into()),
2917            );
2918        }
2919        ///Sets `merge_coins` with the provided value.
2920        ///If any other oneof field in the same oneof is set, it will be cleared.
2921        pub fn with_merge_coins<T: Into<super::MergeCoins>>(mut self, field: T) -> Self {
2922            self.set_merge_coins(field.into());
2923            self
2924        }
2925        ///Returns the value of `publish`, or the default value if `publish` is unset.
2926        pub fn publish(&self) -> &super::Publish {
2927            if let Some(super::command::Command::Publish(field)) = &self.command {
2928                field as _
2929            } else {
2930                super::Publish::default_instance() as _
2931            }
2932        }
2933        ///If `publish` is set, returns [`Some`] with the value; otherwise returns [`None`].
2934        pub fn publish_opt(&self) -> Option<&super::Publish> {
2935            if let Some(super::command::Command::Publish(field)) = &self.command {
2936                Some(field as _)
2937            } else {
2938                None
2939            }
2940        }
2941        ///If `publish` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2942        pub fn publish_opt_mut(&mut self) -> Option<&mut super::Publish> {
2943            if let Some(super::command::Command::Publish(field)) = &mut self.command {
2944                Some(field as _)
2945            } else {
2946                None
2947            }
2948        }
2949        ///Returns a mutable reference to `publish`.
2950        ///If the field is unset, it is first initialized with the default value.
2951        ///If any other oneof field in the same oneof is set, it will be cleared.
2952        pub fn publish_mut(&mut self) -> &mut super::Publish {
2953            if self.publish_opt_mut().is_none() {
2954                self.command = Some(
2955                    super::command::Command::Publish(super::Publish::default()),
2956                );
2957            }
2958            self.publish_opt_mut().unwrap()
2959        }
2960        ///Sets `publish` with the provided value.
2961        ///If any other oneof field in the same oneof is set, it will be cleared.
2962        pub fn set_publish<T: Into<super::Publish>>(&mut self, field: T) {
2963            self.command = Some(super::command::Command::Publish(field.into().into()));
2964        }
2965        ///Sets `publish` with the provided value.
2966        ///If any other oneof field in the same oneof is set, it will be cleared.
2967        pub fn with_publish<T: Into<super::Publish>>(mut self, field: T) -> Self {
2968            self.set_publish(field.into());
2969            self
2970        }
2971        ///Returns the value of `make_move_vector`, or the default value if `make_move_vector` is unset.
2972        pub fn make_move_vector(&self) -> &super::MakeMoveVector {
2973            if let Some(super::command::Command::MakeMoveVector(field)) = &self.command {
2974                field as _
2975            } else {
2976                super::MakeMoveVector::default_instance() as _
2977            }
2978        }
2979        ///If `make_move_vector` is set, returns [`Some`] with the value; otherwise returns [`None`].
2980        pub fn make_move_vector_opt(&self) -> Option<&super::MakeMoveVector> {
2981            if let Some(super::command::Command::MakeMoveVector(field)) = &self.command {
2982                Some(field as _)
2983            } else {
2984                None
2985            }
2986        }
2987        ///If `make_move_vector` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2988        pub fn make_move_vector_opt_mut(
2989            &mut self,
2990        ) -> Option<&mut super::MakeMoveVector> {
2991            if let Some(super::command::Command::MakeMoveVector(field)) = &mut self
2992                .command
2993            {
2994                Some(field as _)
2995            } else {
2996                None
2997            }
2998        }
2999        ///Returns a mutable reference to `make_move_vector`.
3000        ///If the field is unset, it is first initialized with the default value.
3001        ///If any other oneof field in the same oneof is set, it will be cleared.
3002        pub fn make_move_vector_mut(&mut self) -> &mut super::MakeMoveVector {
3003            if self.make_move_vector_opt_mut().is_none() {
3004                self.command = Some(
3005                    super::command::Command::MakeMoveVector(
3006                        super::MakeMoveVector::default(),
3007                    ),
3008                );
3009            }
3010            self.make_move_vector_opt_mut().unwrap()
3011        }
3012        ///Sets `make_move_vector` with the provided value.
3013        ///If any other oneof field in the same oneof is set, it will be cleared.
3014        pub fn set_make_move_vector<T: Into<super::MakeMoveVector>>(
3015            &mut self,
3016            field: T,
3017        ) {
3018            self.command = Some(
3019                super::command::Command::MakeMoveVector(field.into().into()),
3020            );
3021        }
3022        ///Sets `make_move_vector` with the provided value.
3023        ///If any other oneof field in the same oneof is set, it will be cleared.
3024        pub fn with_make_move_vector<T: Into<super::MakeMoveVector>>(
3025            mut self,
3026            field: T,
3027        ) -> Self {
3028            self.set_make_move_vector(field.into());
3029            self
3030        }
3031        ///Returns the value of `upgrade`, or the default value if `upgrade` is unset.
3032        pub fn upgrade(&self) -> &super::Upgrade {
3033            if let Some(super::command::Command::Upgrade(field)) = &self.command {
3034                field as _
3035            } else {
3036                super::Upgrade::default_instance() as _
3037            }
3038        }
3039        ///If `upgrade` is set, returns [`Some`] with the value; otherwise returns [`None`].
3040        pub fn upgrade_opt(&self) -> Option<&super::Upgrade> {
3041            if let Some(super::command::Command::Upgrade(field)) = &self.command {
3042                Some(field as _)
3043            } else {
3044                None
3045            }
3046        }
3047        ///If `upgrade` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3048        pub fn upgrade_opt_mut(&mut self) -> Option<&mut super::Upgrade> {
3049            if let Some(super::command::Command::Upgrade(field)) = &mut self.command {
3050                Some(field as _)
3051            } else {
3052                None
3053            }
3054        }
3055        ///Returns a mutable reference to `upgrade`.
3056        ///If the field is unset, it is first initialized with the default value.
3057        ///If any other oneof field in the same oneof is set, it will be cleared.
3058        pub fn upgrade_mut(&mut self) -> &mut super::Upgrade {
3059            if self.upgrade_opt_mut().is_none() {
3060                self.command = Some(
3061                    super::command::Command::Upgrade(super::Upgrade::default()),
3062                );
3063            }
3064            self.upgrade_opt_mut().unwrap()
3065        }
3066        ///Sets `upgrade` with the provided value.
3067        ///If any other oneof field in the same oneof is set, it will be cleared.
3068        pub fn set_upgrade<T: Into<super::Upgrade>>(&mut self, field: T) {
3069            self.command = Some(super::command::Command::Upgrade(field.into().into()));
3070        }
3071        ///Sets `upgrade` with the provided value.
3072        ///If any other oneof field in the same oneof is set, it will be cleared.
3073        pub fn with_upgrade<T: Into<super::Upgrade>>(mut self, field: T) -> Self {
3074            self.set_upgrade(field.into());
3075            self
3076        }
3077    }
3078    impl super::CommandArgumentError {
3079        pub const fn const_default() -> Self {
3080            Self {
3081                argument: None,
3082                kind: None,
3083                index_error: None,
3084            }
3085        }
3086        #[doc(hidden)]
3087        pub fn default_instance() -> &'static Self {
3088            static DEFAULT: super::CommandArgumentError = super::CommandArgumentError::const_default();
3089            &DEFAULT
3090        }
3091        ///If `argument` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3092        pub fn argument_opt_mut(&mut self) -> Option<&mut u32> {
3093            self.argument.as_mut().map(|field| field as _)
3094        }
3095        ///Returns a mutable reference to `argument`.
3096        ///If the field is unset, it is first initialized with the default value.
3097        pub fn argument_mut(&mut self) -> &mut u32 {
3098            self.argument.get_or_insert_default()
3099        }
3100        ///If `argument` is set, returns [`Some`] with the value; otherwise returns [`None`].
3101        pub fn argument_opt(&self) -> Option<u32> {
3102            self.argument.as_ref().map(|field| *field)
3103        }
3104        ///Sets `argument` with the provided value.
3105        pub fn set_argument<T: Into<u32>>(&mut self, field: T) {
3106            self.argument = Some(field.into().into());
3107        }
3108        ///Sets `argument` with the provided value.
3109        pub fn with_argument<T: Into<u32>>(mut self, field: T) -> Self {
3110            self.set_argument(field.into());
3111            self
3112        }
3113        ///Sets `kind` with the provided value.
3114        pub fn with_kind<
3115            T: Into<super::command_argument_error::CommandArgumentErrorKind>,
3116        >(mut self, field: T) -> Self {
3117            self.set_kind(field.into());
3118            self
3119        }
3120        ///Returns the value of `index_error`, or the default value if `index_error` is unset.
3121        pub fn index_error(&self) -> &super::IndexError {
3122            self.index_error
3123                .as_ref()
3124                .map(|field| field as _)
3125                .unwrap_or_else(|| super::IndexError::default_instance() as _)
3126        }
3127        ///If `index_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3128        pub fn index_error_opt_mut(&mut self) -> Option<&mut super::IndexError> {
3129            self.index_error.as_mut().map(|field| field as _)
3130        }
3131        ///Returns a mutable reference to `index_error`.
3132        ///If the field is unset, it is first initialized with the default value.
3133        pub fn index_error_mut(&mut self) -> &mut super::IndexError {
3134            self.index_error.get_or_insert_default()
3135        }
3136        ///If `index_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
3137        pub fn index_error_opt(&self) -> Option<&super::IndexError> {
3138            self.index_error.as_ref().map(|field| field as _)
3139        }
3140        ///Sets `index_error` with the provided value.
3141        pub fn set_index_error<T: Into<super::IndexError>>(&mut self, field: T) {
3142            self.index_error = Some(field.into().into());
3143        }
3144        ///Sets `index_error` with the provided value.
3145        pub fn with_index_error<T: Into<super::IndexError>>(mut self, field: T) -> Self {
3146            self.set_index_error(field.into());
3147            self
3148        }
3149    }
3150    impl super::CommandOutput {
3151        pub const fn const_default() -> Self {
3152            Self {
3153                argument: None,
3154                value: None,
3155                json: None,
3156            }
3157        }
3158        #[doc(hidden)]
3159        pub fn default_instance() -> &'static Self {
3160            static DEFAULT: super::CommandOutput = super::CommandOutput::const_default();
3161            &DEFAULT
3162        }
3163        ///Returns the value of `argument`, or the default value if `argument` is unset.
3164        pub fn argument(&self) -> &super::Argument {
3165            self.argument
3166                .as_ref()
3167                .map(|field| field as _)
3168                .unwrap_or_else(|| super::Argument::default_instance() as _)
3169        }
3170        ///If `argument` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3171        pub fn argument_opt_mut(&mut self) -> Option<&mut super::Argument> {
3172            self.argument.as_mut().map(|field| field as _)
3173        }
3174        ///Returns a mutable reference to `argument`.
3175        ///If the field is unset, it is first initialized with the default value.
3176        pub fn argument_mut(&mut self) -> &mut super::Argument {
3177            self.argument.get_or_insert_default()
3178        }
3179        ///If `argument` is set, returns [`Some`] with the value; otherwise returns [`None`].
3180        pub fn argument_opt(&self) -> Option<&super::Argument> {
3181            self.argument.as_ref().map(|field| field as _)
3182        }
3183        ///Sets `argument` with the provided value.
3184        pub fn set_argument<T: Into<super::Argument>>(&mut self, field: T) {
3185            self.argument = Some(field.into().into());
3186        }
3187        ///Sets `argument` with the provided value.
3188        pub fn with_argument<T: Into<super::Argument>>(mut self, field: T) -> Self {
3189            self.set_argument(field.into());
3190            self
3191        }
3192        ///Returns the value of `value`, or the default value if `value` is unset.
3193        pub fn value(&self) -> &super::Bcs {
3194            self.value
3195                .as_ref()
3196                .map(|field| field as _)
3197                .unwrap_or_else(|| super::Bcs::default_instance() as _)
3198        }
3199        ///If `value` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3200        pub fn value_opt_mut(&mut self) -> Option<&mut super::Bcs> {
3201            self.value.as_mut().map(|field| field as _)
3202        }
3203        ///Returns a mutable reference to `value`.
3204        ///If the field is unset, it is first initialized with the default value.
3205        pub fn value_mut(&mut self) -> &mut super::Bcs {
3206            self.value.get_or_insert_default()
3207        }
3208        ///If `value` is set, returns [`Some`] with the value; otherwise returns [`None`].
3209        pub fn value_opt(&self) -> Option<&super::Bcs> {
3210            self.value.as_ref().map(|field| field as _)
3211        }
3212        ///Sets `value` with the provided value.
3213        pub fn set_value<T: Into<super::Bcs>>(&mut self, field: T) {
3214            self.value = Some(field.into().into());
3215        }
3216        ///Sets `value` with the provided value.
3217        pub fn with_value<T: Into<super::Bcs>>(mut self, field: T) -> Self {
3218            self.set_value(field.into());
3219            self
3220        }
3221        ///If `json` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3222        pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
3223            self.json.as_mut().map(|field| field as _)
3224        }
3225        ///Returns a mutable reference to `json`.
3226        ///If the field is unset, it is first initialized with the default value.
3227        pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
3228            self.json.get_or_insert_default()
3229        }
3230        ///If `json` is set, returns [`Some`] with the value; otherwise returns [`None`].
3231        pub fn json_opt(&self) -> Option<&::prost_types::Value> {
3232            self.json.as_ref().map(|field| field as _)
3233        }
3234        ///Sets `json` with the provided value.
3235        pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
3236            self.json = Some(field.into().into());
3237        }
3238        ///Sets `json` with the provided value.
3239        pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
3240            self.set_json(field.into());
3241            self
3242        }
3243    }
3244    impl super::CommandResult {
3245        pub const fn const_default() -> Self {
3246            Self {
3247                return_values: Vec::new(),
3248                mutated_by_ref: Vec::new(),
3249            }
3250        }
3251        #[doc(hidden)]
3252        pub fn default_instance() -> &'static Self {
3253            static DEFAULT: super::CommandResult = super::CommandResult::const_default();
3254            &DEFAULT
3255        }
3256        ///Returns the value of `return_values`, or the default value if `return_values` is unset.
3257        pub fn return_values(&self) -> &[super::CommandOutput] {
3258            &self.return_values
3259        }
3260        ///Returns a mutable reference to `return_values`.
3261        ///If the field is unset, it is first initialized with the default value.
3262        pub fn return_values_mut(&mut self) -> &mut Vec<super::CommandOutput> {
3263            &mut self.return_values
3264        }
3265        ///Sets `return_values` with the provided value.
3266        pub fn set_return_values(&mut self, field: Vec<super::CommandOutput>) {
3267            self.return_values = field;
3268        }
3269        ///Sets `return_values` with the provided value.
3270        pub fn with_return_values(mut self, field: Vec<super::CommandOutput>) -> Self {
3271            self.set_return_values(field);
3272            self
3273        }
3274        ///Returns the value of `mutated_by_ref`, or the default value if `mutated_by_ref` is unset.
3275        pub fn mutated_by_ref(&self) -> &[super::CommandOutput] {
3276            &self.mutated_by_ref
3277        }
3278        ///Returns a mutable reference to `mutated_by_ref`.
3279        ///If the field is unset, it is first initialized with the default value.
3280        pub fn mutated_by_ref_mut(&mut self) -> &mut Vec<super::CommandOutput> {
3281            &mut self.mutated_by_ref
3282        }
3283        ///Sets `mutated_by_ref` with the provided value.
3284        pub fn set_mutated_by_ref(&mut self, field: Vec<super::CommandOutput>) {
3285            self.mutated_by_ref = field;
3286        }
3287        ///Sets `mutated_by_ref` with the provided value.
3288        pub fn with_mutated_by_ref(mut self, field: Vec<super::CommandOutput>) -> Self {
3289            self.set_mutated_by_ref(field);
3290            self
3291        }
3292    }
3293    impl super::CongestedObjects {
3294        pub const fn const_default() -> Self {
3295            Self { objects: Vec::new() }
3296        }
3297        #[doc(hidden)]
3298        pub fn default_instance() -> &'static Self {
3299            static DEFAULT: super::CongestedObjects = super::CongestedObjects::const_default();
3300            &DEFAULT
3301        }
3302        ///Returns the value of `objects`, or the default value if `objects` is unset.
3303        pub fn objects(&self) -> &[String] {
3304            &self.objects
3305        }
3306        ///Returns a mutable reference to `objects`.
3307        ///If the field is unset, it is first initialized with the default value.
3308        pub fn objects_mut(&mut self) -> &mut Vec<String> {
3309            &mut self.objects
3310        }
3311        ///Sets `objects` with the provided value.
3312        pub fn set_objects(&mut self, field: Vec<String>) {
3313            self.objects = field;
3314        }
3315        ///Sets `objects` with the provided value.
3316        pub fn with_objects(mut self, field: Vec<String>) -> Self {
3317            self.set_objects(field);
3318            self
3319        }
3320    }
3321    impl super::ConsensusCommitPrologue {
3322        pub const fn const_default() -> Self {
3323            Self {
3324                epoch: None,
3325                round: None,
3326                commit_timestamp: None,
3327                consensus_commit_digest: None,
3328                sub_dag_index: None,
3329                consensus_determined_version_assignments: None,
3330                additional_state_digest: None,
3331            }
3332        }
3333        #[doc(hidden)]
3334        pub fn default_instance() -> &'static Self {
3335            static DEFAULT: super::ConsensusCommitPrologue = super::ConsensusCommitPrologue::const_default();
3336            &DEFAULT
3337        }
3338        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3339        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
3340            self.epoch.as_mut().map(|field| field as _)
3341        }
3342        ///Returns a mutable reference to `epoch`.
3343        ///If the field is unset, it is first initialized with the default value.
3344        pub fn epoch_mut(&mut self) -> &mut u64 {
3345            self.epoch.get_or_insert_default()
3346        }
3347        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
3348        pub fn epoch_opt(&self) -> Option<u64> {
3349            self.epoch.as_ref().map(|field| *field)
3350        }
3351        ///Sets `epoch` with the provided value.
3352        pub fn set_epoch<T: Into<u64>>(&mut self, field: T) {
3353            self.epoch = Some(field.into().into());
3354        }
3355        ///Sets `epoch` with the provided value.
3356        pub fn with_epoch<T: Into<u64>>(mut self, field: T) -> Self {
3357            self.set_epoch(field.into());
3358            self
3359        }
3360        ///If `round` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3361        pub fn round_opt_mut(&mut self) -> Option<&mut u64> {
3362            self.round.as_mut().map(|field| field as _)
3363        }
3364        ///Returns a mutable reference to `round`.
3365        ///If the field is unset, it is first initialized with the default value.
3366        pub fn round_mut(&mut self) -> &mut u64 {
3367            self.round.get_or_insert_default()
3368        }
3369        ///If `round` is set, returns [`Some`] with the value; otherwise returns [`None`].
3370        pub fn round_opt(&self) -> Option<u64> {
3371            self.round.as_ref().map(|field| *field)
3372        }
3373        ///Sets `round` with the provided value.
3374        pub fn set_round<T: Into<u64>>(&mut self, field: T) {
3375            self.round = Some(field.into().into());
3376        }
3377        ///Sets `round` with the provided value.
3378        pub fn with_round<T: Into<u64>>(mut self, field: T) -> Self {
3379            self.set_round(field.into());
3380            self
3381        }
3382        ///If `commit_timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3383        pub fn commit_timestamp_opt_mut(
3384            &mut self,
3385        ) -> Option<&mut ::prost_types::Timestamp> {
3386            self.commit_timestamp.as_mut().map(|field| field as _)
3387        }
3388        ///Returns a mutable reference to `commit_timestamp`.
3389        ///If the field is unset, it is first initialized with the default value.
3390        pub fn commit_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
3391            self.commit_timestamp.get_or_insert_default()
3392        }
3393        ///If `commit_timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
3394        pub fn commit_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
3395            self.commit_timestamp.as_ref().map(|field| field as _)
3396        }
3397        ///Sets `commit_timestamp` with the provided value.
3398        pub fn set_commit_timestamp<T: Into<::prost_types::Timestamp>>(
3399            &mut self,
3400            field: T,
3401        ) {
3402            self.commit_timestamp = Some(field.into().into());
3403        }
3404        ///Sets `commit_timestamp` with the provided value.
3405        pub fn with_commit_timestamp<T: Into<::prost_types::Timestamp>>(
3406            mut self,
3407            field: T,
3408        ) -> Self {
3409            self.set_commit_timestamp(field.into());
3410            self
3411        }
3412        ///If `consensus_commit_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3413        pub fn consensus_commit_digest_opt_mut(&mut self) -> Option<&mut String> {
3414            self.consensus_commit_digest.as_mut().map(|field| field as _)
3415        }
3416        ///Returns a mutable reference to `consensus_commit_digest`.
3417        ///If the field is unset, it is first initialized with the default value.
3418        pub fn consensus_commit_digest_mut(&mut self) -> &mut String {
3419            self.consensus_commit_digest.get_or_insert_default()
3420        }
3421        ///If `consensus_commit_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
3422        pub fn consensus_commit_digest_opt(&self) -> Option<&str> {
3423            self.consensus_commit_digest.as_ref().map(|field| field as _)
3424        }
3425        ///Sets `consensus_commit_digest` with the provided value.
3426        pub fn set_consensus_commit_digest<T: Into<String>>(&mut self, field: T) {
3427            self.consensus_commit_digest = Some(field.into().into());
3428        }
3429        ///Sets `consensus_commit_digest` with the provided value.
3430        pub fn with_consensus_commit_digest<T: Into<String>>(
3431            mut self,
3432            field: T,
3433        ) -> Self {
3434            self.set_consensus_commit_digest(field.into());
3435            self
3436        }
3437        ///If `sub_dag_index` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3438        pub fn sub_dag_index_opt_mut(&mut self) -> Option<&mut u64> {
3439            self.sub_dag_index.as_mut().map(|field| field as _)
3440        }
3441        ///Returns a mutable reference to `sub_dag_index`.
3442        ///If the field is unset, it is first initialized with the default value.
3443        pub fn sub_dag_index_mut(&mut self) -> &mut u64 {
3444            self.sub_dag_index.get_or_insert_default()
3445        }
3446        ///If `sub_dag_index` is set, returns [`Some`] with the value; otherwise returns [`None`].
3447        pub fn sub_dag_index_opt(&self) -> Option<u64> {
3448            self.sub_dag_index.as_ref().map(|field| *field)
3449        }
3450        ///Sets `sub_dag_index` with the provided value.
3451        pub fn set_sub_dag_index<T: Into<u64>>(&mut self, field: T) {
3452            self.sub_dag_index = Some(field.into().into());
3453        }
3454        ///Sets `sub_dag_index` with the provided value.
3455        pub fn with_sub_dag_index<T: Into<u64>>(mut self, field: T) -> Self {
3456            self.set_sub_dag_index(field.into());
3457            self
3458        }
3459        ///Returns the value of `consensus_determined_version_assignments`, or the default value if `consensus_determined_version_assignments` is unset.
3460        pub fn consensus_determined_version_assignments(
3461            &self,
3462        ) -> &super::ConsensusDeterminedVersionAssignments {
3463            self.consensus_determined_version_assignments
3464                .as_ref()
3465                .map(|field| field as _)
3466                .unwrap_or_else(|| {
3467                    super::ConsensusDeterminedVersionAssignments::default_instance() as _
3468                })
3469        }
3470        ///If `consensus_determined_version_assignments` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3471        pub fn consensus_determined_version_assignments_opt_mut(
3472            &mut self,
3473        ) -> Option<&mut super::ConsensusDeterminedVersionAssignments> {
3474            self.consensus_determined_version_assignments
3475                .as_mut()
3476                .map(|field| field as _)
3477        }
3478        ///Returns a mutable reference to `consensus_determined_version_assignments`.
3479        ///If the field is unset, it is first initialized with the default value.
3480        pub fn consensus_determined_version_assignments_mut(
3481            &mut self,
3482        ) -> &mut super::ConsensusDeterminedVersionAssignments {
3483            self.consensus_determined_version_assignments.get_or_insert_default()
3484        }
3485        ///If `consensus_determined_version_assignments` is set, returns [`Some`] with the value; otherwise returns [`None`].
3486        pub fn consensus_determined_version_assignments_opt(
3487            &self,
3488        ) -> Option<&super::ConsensusDeterminedVersionAssignments> {
3489            self.consensus_determined_version_assignments
3490                .as_ref()
3491                .map(|field| field as _)
3492        }
3493        ///Sets `consensus_determined_version_assignments` with the provided value.
3494        pub fn set_consensus_determined_version_assignments<
3495            T: Into<super::ConsensusDeterminedVersionAssignments>,
3496        >(&mut self, field: T) {
3497            self.consensus_determined_version_assignments = Some(field.into().into());
3498        }
3499        ///Sets `consensus_determined_version_assignments` with the provided value.
3500        pub fn with_consensus_determined_version_assignments<
3501            T: Into<super::ConsensusDeterminedVersionAssignments>,
3502        >(mut self, field: T) -> Self {
3503            self.set_consensus_determined_version_assignments(field.into());
3504            self
3505        }
3506        ///If `additional_state_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3507        pub fn additional_state_digest_opt_mut(&mut self) -> Option<&mut String> {
3508            self.additional_state_digest.as_mut().map(|field| field as _)
3509        }
3510        ///Returns a mutable reference to `additional_state_digest`.
3511        ///If the field is unset, it is first initialized with the default value.
3512        pub fn additional_state_digest_mut(&mut self) -> &mut String {
3513            self.additional_state_digest.get_or_insert_default()
3514        }
3515        ///If `additional_state_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
3516        pub fn additional_state_digest_opt(&self) -> Option<&str> {
3517            self.additional_state_digest.as_ref().map(|field| field as _)
3518        }
3519        ///Sets `additional_state_digest` with the provided value.
3520        pub fn set_additional_state_digest<T: Into<String>>(&mut self, field: T) {
3521            self.additional_state_digest = Some(field.into().into());
3522        }
3523        ///Sets `additional_state_digest` with the provided value.
3524        pub fn with_additional_state_digest<T: Into<String>>(
3525            mut self,
3526            field: T,
3527        ) -> Self {
3528            self.set_additional_state_digest(field.into());
3529            self
3530        }
3531    }
3532    impl super::ConsensusDeterminedVersionAssignments {
3533        pub const fn const_default() -> Self {
3534            Self {
3535                version: None,
3536                canceled_transactions: Vec::new(),
3537            }
3538        }
3539        #[doc(hidden)]
3540        pub fn default_instance() -> &'static Self {
3541            static DEFAULT: super::ConsensusDeterminedVersionAssignments = super::ConsensusDeterminedVersionAssignments::const_default();
3542            &DEFAULT
3543        }
3544        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3545        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
3546            self.version.as_mut().map(|field| field as _)
3547        }
3548        ///Returns a mutable reference to `version`.
3549        ///If the field is unset, it is first initialized with the default value.
3550        pub fn version_mut(&mut self) -> &mut i32 {
3551            self.version.get_or_insert_default()
3552        }
3553        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
3554        pub fn version_opt(&self) -> Option<i32> {
3555            self.version.as_ref().map(|field| *field)
3556        }
3557        ///Sets `version` with the provided value.
3558        pub fn set_version<T: Into<i32>>(&mut self, field: T) {
3559            self.version = Some(field.into().into());
3560        }
3561        ///Sets `version` with the provided value.
3562        pub fn with_version<T: Into<i32>>(mut self, field: T) -> Self {
3563            self.set_version(field.into());
3564            self
3565        }
3566        ///Returns the value of `canceled_transactions`, or the default value if `canceled_transactions` is unset.
3567        pub fn canceled_transactions(&self) -> &[super::CanceledTransaction] {
3568            &self.canceled_transactions
3569        }
3570        ///Returns a mutable reference to `canceled_transactions`.
3571        ///If the field is unset, it is first initialized with the default value.
3572        pub fn canceled_transactions_mut(
3573            &mut self,
3574        ) -> &mut Vec<super::CanceledTransaction> {
3575            &mut self.canceled_transactions
3576        }
3577        ///Sets `canceled_transactions` with the provided value.
3578        pub fn set_canceled_transactions(
3579            &mut self,
3580            field: Vec<super::CanceledTransaction>,
3581        ) {
3582            self.canceled_transactions = field;
3583        }
3584        ///Sets `canceled_transactions` with the provided value.
3585        pub fn with_canceled_transactions(
3586            mut self,
3587            field: Vec<super::CanceledTransaction>,
3588        ) -> Self {
3589            self.set_canceled_transactions(field);
3590            self
3591        }
3592    }
3593    impl super::DatatypeDescriptor {
3594        pub const fn const_default() -> Self {
3595            Self {
3596                type_name: None,
3597                defining_id: None,
3598                module: None,
3599                name: None,
3600                abilities: Vec::new(),
3601                type_parameters: Vec::new(),
3602                kind: None,
3603                fields: Vec::new(),
3604                variants: Vec::new(),
3605            }
3606        }
3607        #[doc(hidden)]
3608        pub fn default_instance() -> &'static Self {
3609            static DEFAULT: super::DatatypeDescriptor = super::DatatypeDescriptor::const_default();
3610            &DEFAULT
3611        }
3612        ///If `type_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3613        pub fn type_name_opt_mut(&mut self) -> Option<&mut String> {
3614            self.type_name.as_mut().map(|field| field as _)
3615        }
3616        ///Returns a mutable reference to `type_name`.
3617        ///If the field is unset, it is first initialized with the default value.
3618        pub fn type_name_mut(&mut self) -> &mut String {
3619            self.type_name.get_or_insert_default()
3620        }
3621        ///If `type_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
3622        pub fn type_name_opt(&self) -> Option<&str> {
3623            self.type_name.as_ref().map(|field| field as _)
3624        }
3625        ///Sets `type_name` with the provided value.
3626        pub fn set_type_name<T: Into<String>>(&mut self, field: T) {
3627            self.type_name = Some(field.into().into());
3628        }
3629        ///Sets `type_name` with the provided value.
3630        pub fn with_type_name<T: Into<String>>(mut self, field: T) -> Self {
3631            self.set_type_name(field.into());
3632            self
3633        }
3634        ///If `defining_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3635        pub fn defining_id_opt_mut(&mut self) -> Option<&mut String> {
3636            self.defining_id.as_mut().map(|field| field as _)
3637        }
3638        ///Returns a mutable reference to `defining_id`.
3639        ///If the field is unset, it is first initialized with the default value.
3640        pub fn defining_id_mut(&mut self) -> &mut String {
3641            self.defining_id.get_or_insert_default()
3642        }
3643        ///If `defining_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
3644        pub fn defining_id_opt(&self) -> Option<&str> {
3645            self.defining_id.as_ref().map(|field| field as _)
3646        }
3647        ///Sets `defining_id` with the provided value.
3648        pub fn set_defining_id<T: Into<String>>(&mut self, field: T) {
3649            self.defining_id = Some(field.into().into());
3650        }
3651        ///Sets `defining_id` with the provided value.
3652        pub fn with_defining_id<T: Into<String>>(mut self, field: T) -> Self {
3653            self.set_defining_id(field.into());
3654            self
3655        }
3656        ///If `module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3657        pub fn module_opt_mut(&mut self) -> Option<&mut String> {
3658            self.module.as_mut().map(|field| field as _)
3659        }
3660        ///Returns a mutable reference to `module`.
3661        ///If the field is unset, it is first initialized with the default value.
3662        pub fn module_mut(&mut self) -> &mut String {
3663            self.module.get_or_insert_default()
3664        }
3665        ///If `module` is set, returns [`Some`] with the value; otherwise returns [`None`].
3666        pub fn module_opt(&self) -> Option<&str> {
3667            self.module.as_ref().map(|field| field as _)
3668        }
3669        ///Sets `module` with the provided value.
3670        pub fn set_module<T: Into<String>>(&mut self, field: T) {
3671            self.module = Some(field.into().into());
3672        }
3673        ///Sets `module` with the provided value.
3674        pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
3675            self.set_module(field.into());
3676            self
3677        }
3678        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3679        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
3680            self.name.as_mut().map(|field| field as _)
3681        }
3682        ///Returns a mutable reference to `name`.
3683        ///If the field is unset, it is first initialized with the default value.
3684        pub fn name_mut(&mut self) -> &mut String {
3685            self.name.get_or_insert_default()
3686        }
3687        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
3688        pub fn name_opt(&self) -> Option<&str> {
3689            self.name.as_ref().map(|field| field as _)
3690        }
3691        ///Sets `name` with the provided value.
3692        pub fn set_name<T: Into<String>>(&mut self, field: T) {
3693            self.name = Some(field.into().into());
3694        }
3695        ///Sets `name` with the provided value.
3696        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
3697            self.set_name(field.into());
3698            self
3699        }
3700        ///Returns the value of `type_parameters`, or the default value if `type_parameters` is unset.
3701        pub fn type_parameters(&self) -> &[super::TypeParameter] {
3702            &self.type_parameters
3703        }
3704        ///Returns a mutable reference to `type_parameters`.
3705        ///If the field is unset, it is first initialized with the default value.
3706        pub fn type_parameters_mut(&mut self) -> &mut Vec<super::TypeParameter> {
3707            &mut self.type_parameters
3708        }
3709        ///Sets `type_parameters` with the provided value.
3710        pub fn set_type_parameters(&mut self, field: Vec<super::TypeParameter>) {
3711            self.type_parameters = field;
3712        }
3713        ///Sets `type_parameters` with the provided value.
3714        pub fn with_type_parameters(mut self, field: Vec<super::TypeParameter>) -> Self {
3715            self.set_type_parameters(field);
3716            self
3717        }
3718        ///Sets `kind` with the provided value.
3719        pub fn with_kind<T: Into<super::datatype_descriptor::DatatypeKind>>(
3720            mut self,
3721            field: T,
3722        ) -> Self {
3723            self.set_kind(field.into());
3724            self
3725        }
3726        ///Returns the value of `fields`, or the default value if `fields` is unset.
3727        pub fn fields(&self) -> &[super::FieldDescriptor] {
3728            &self.fields
3729        }
3730        ///Returns a mutable reference to `fields`.
3731        ///If the field is unset, it is first initialized with the default value.
3732        pub fn fields_mut(&mut self) -> &mut Vec<super::FieldDescriptor> {
3733            &mut self.fields
3734        }
3735        ///Sets `fields` with the provided value.
3736        pub fn set_fields(&mut self, field: Vec<super::FieldDescriptor>) {
3737            self.fields = field;
3738        }
3739        ///Sets `fields` with the provided value.
3740        pub fn with_fields(mut self, field: Vec<super::FieldDescriptor>) -> Self {
3741            self.set_fields(field);
3742            self
3743        }
3744        ///Returns the value of `variants`, or the default value if `variants` is unset.
3745        pub fn variants(&self) -> &[super::VariantDescriptor] {
3746            &self.variants
3747        }
3748        ///Returns a mutable reference to `variants`.
3749        ///If the field is unset, it is first initialized with the default value.
3750        pub fn variants_mut(&mut self) -> &mut Vec<super::VariantDescriptor> {
3751            &mut self.variants
3752        }
3753        ///Sets `variants` with the provided value.
3754        pub fn set_variants(&mut self, field: Vec<super::VariantDescriptor>) {
3755            self.variants = field;
3756        }
3757        ///Sets `variants` with the provided value.
3758        pub fn with_variants(mut self, field: Vec<super::VariantDescriptor>) -> Self {
3759            self.set_variants(field);
3760            self
3761        }
3762    }
3763    impl super::DynamicField {
3764        pub const fn const_default() -> Self {
3765            Self {
3766                kind: None,
3767                parent: None,
3768                field_id: None,
3769                field_object: None,
3770                name: None,
3771                value: None,
3772                value_type: None,
3773                child_id: None,
3774                child_object: None,
3775            }
3776        }
3777        #[doc(hidden)]
3778        pub fn default_instance() -> &'static Self {
3779            static DEFAULT: super::DynamicField = super::DynamicField::const_default();
3780            &DEFAULT
3781        }
3782        ///Sets `kind` with the provided value.
3783        pub fn with_kind<T: Into<super::dynamic_field::DynamicFieldKind>>(
3784            mut self,
3785            field: T,
3786        ) -> Self {
3787            self.set_kind(field.into());
3788            self
3789        }
3790        ///If `parent` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3791        pub fn parent_opt_mut(&mut self) -> Option<&mut String> {
3792            self.parent.as_mut().map(|field| field as _)
3793        }
3794        ///Returns a mutable reference to `parent`.
3795        ///If the field is unset, it is first initialized with the default value.
3796        pub fn parent_mut(&mut self) -> &mut String {
3797            self.parent.get_or_insert_default()
3798        }
3799        ///If `parent` is set, returns [`Some`] with the value; otherwise returns [`None`].
3800        pub fn parent_opt(&self) -> Option<&str> {
3801            self.parent.as_ref().map(|field| field as _)
3802        }
3803        ///Sets `parent` with the provided value.
3804        pub fn set_parent<T: Into<String>>(&mut self, field: T) {
3805            self.parent = Some(field.into().into());
3806        }
3807        ///Sets `parent` with the provided value.
3808        pub fn with_parent<T: Into<String>>(mut self, field: T) -> Self {
3809            self.set_parent(field.into());
3810            self
3811        }
3812        ///If `field_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3813        pub fn field_id_opt_mut(&mut self) -> Option<&mut String> {
3814            self.field_id.as_mut().map(|field| field as _)
3815        }
3816        ///Returns a mutable reference to `field_id`.
3817        ///If the field is unset, it is first initialized with the default value.
3818        pub fn field_id_mut(&mut self) -> &mut String {
3819            self.field_id.get_or_insert_default()
3820        }
3821        ///If `field_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
3822        pub fn field_id_opt(&self) -> Option<&str> {
3823            self.field_id.as_ref().map(|field| field as _)
3824        }
3825        ///Sets `field_id` with the provided value.
3826        pub fn set_field_id<T: Into<String>>(&mut self, field: T) {
3827            self.field_id = Some(field.into().into());
3828        }
3829        ///Sets `field_id` with the provided value.
3830        pub fn with_field_id<T: Into<String>>(mut self, field: T) -> Self {
3831            self.set_field_id(field.into());
3832            self
3833        }
3834        ///Returns the value of `field_object`, or the default value if `field_object` is unset.
3835        pub fn field_object(&self) -> &super::Object {
3836            self.field_object
3837                .as_ref()
3838                .map(|field| field as _)
3839                .unwrap_or_else(|| super::Object::default_instance() as _)
3840        }
3841        ///If `field_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3842        pub fn field_object_opt_mut(&mut self) -> Option<&mut super::Object> {
3843            self.field_object.as_mut().map(|field| field as _)
3844        }
3845        ///Returns a mutable reference to `field_object`.
3846        ///If the field is unset, it is first initialized with the default value.
3847        pub fn field_object_mut(&mut self) -> &mut super::Object {
3848            self.field_object.get_or_insert_default()
3849        }
3850        ///If `field_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
3851        pub fn field_object_opt(&self) -> Option<&super::Object> {
3852            self.field_object.as_ref().map(|field| field as _)
3853        }
3854        ///Sets `field_object` with the provided value.
3855        pub fn set_field_object<T: Into<super::Object>>(&mut self, field: T) {
3856            self.field_object = Some(field.into().into());
3857        }
3858        ///Sets `field_object` with the provided value.
3859        pub fn with_field_object<T: Into<super::Object>>(mut self, field: T) -> Self {
3860            self.set_field_object(field.into());
3861            self
3862        }
3863        ///Returns the value of `name`, or the default value if `name` is unset.
3864        pub fn name(&self) -> &super::Bcs {
3865            self.name
3866                .as_ref()
3867                .map(|field| field as _)
3868                .unwrap_or_else(|| super::Bcs::default_instance() as _)
3869        }
3870        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3871        pub fn name_opt_mut(&mut self) -> Option<&mut super::Bcs> {
3872            self.name.as_mut().map(|field| field as _)
3873        }
3874        ///Returns a mutable reference to `name`.
3875        ///If the field is unset, it is first initialized with the default value.
3876        pub fn name_mut(&mut self) -> &mut super::Bcs {
3877            self.name.get_or_insert_default()
3878        }
3879        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
3880        pub fn name_opt(&self) -> Option<&super::Bcs> {
3881            self.name.as_ref().map(|field| field as _)
3882        }
3883        ///Sets `name` with the provided value.
3884        pub fn set_name<T: Into<super::Bcs>>(&mut self, field: T) {
3885            self.name = Some(field.into().into());
3886        }
3887        ///Sets `name` with the provided value.
3888        pub fn with_name<T: Into<super::Bcs>>(mut self, field: T) -> Self {
3889            self.set_name(field.into());
3890            self
3891        }
3892        ///Returns the value of `value`, or the default value if `value` is unset.
3893        pub fn value(&self) -> &super::Bcs {
3894            self.value
3895                .as_ref()
3896                .map(|field| field as _)
3897                .unwrap_or_else(|| super::Bcs::default_instance() as _)
3898        }
3899        ///If `value` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3900        pub fn value_opt_mut(&mut self) -> Option<&mut super::Bcs> {
3901            self.value.as_mut().map(|field| field as _)
3902        }
3903        ///Returns a mutable reference to `value`.
3904        ///If the field is unset, it is first initialized with the default value.
3905        pub fn value_mut(&mut self) -> &mut super::Bcs {
3906            self.value.get_or_insert_default()
3907        }
3908        ///If `value` is set, returns [`Some`] with the value; otherwise returns [`None`].
3909        pub fn value_opt(&self) -> Option<&super::Bcs> {
3910            self.value.as_ref().map(|field| field as _)
3911        }
3912        ///Sets `value` with the provided value.
3913        pub fn set_value<T: Into<super::Bcs>>(&mut self, field: T) {
3914            self.value = Some(field.into().into());
3915        }
3916        ///Sets `value` with the provided value.
3917        pub fn with_value<T: Into<super::Bcs>>(mut self, field: T) -> Self {
3918            self.set_value(field.into());
3919            self
3920        }
3921        ///If `value_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3922        pub fn value_type_opt_mut(&mut self) -> Option<&mut String> {
3923            self.value_type.as_mut().map(|field| field as _)
3924        }
3925        ///Returns a mutable reference to `value_type`.
3926        ///If the field is unset, it is first initialized with the default value.
3927        pub fn value_type_mut(&mut self) -> &mut String {
3928            self.value_type.get_or_insert_default()
3929        }
3930        ///If `value_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
3931        pub fn value_type_opt(&self) -> Option<&str> {
3932            self.value_type.as_ref().map(|field| field as _)
3933        }
3934        ///Sets `value_type` with the provided value.
3935        pub fn set_value_type<T: Into<String>>(&mut self, field: T) {
3936            self.value_type = Some(field.into().into());
3937        }
3938        ///Sets `value_type` with the provided value.
3939        pub fn with_value_type<T: Into<String>>(mut self, field: T) -> Self {
3940            self.set_value_type(field.into());
3941            self
3942        }
3943        ///If `child_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3944        pub fn child_id_opt_mut(&mut self) -> Option<&mut String> {
3945            self.child_id.as_mut().map(|field| field as _)
3946        }
3947        ///Returns a mutable reference to `child_id`.
3948        ///If the field is unset, it is first initialized with the default value.
3949        pub fn child_id_mut(&mut self) -> &mut String {
3950            self.child_id.get_or_insert_default()
3951        }
3952        ///If `child_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
3953        pub fn child_id_opt(&self) -> Option<&str> {
3954            self.child_id.as_ref().map(|field| field as _)
3955        }
3956        ///Sets `child_id` with the provided value.
3957        pub fn set_child_id<T: Into<String>>(&mut self, field: T) {
3958            self.child_id = Some(field.into().into());
3959        }
3960        ///Sets `child_id` with the provided value.
3961        pub fn with_child_id<T: Into<String>>(mut self, field: T) -> Self {
3962            self.set_child_id(field.into());
3963            self
3964        }
3965        ///Returns the value of `child_object`, or the default value if `child_object` is unset.
3966        pub fn child_object(&self) -> &super::Object {
3967            self.child_object
3968                .as_ref()
3969                .map(|field| field as _)
3970                .unwrap_or_else(|| super::Object::default_instance() as _)
3971        }
3972        ///If `child_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3973        pub fn child_object_opt_mut(&mut self) -> Option<&mut super::Object> {
3974            self.child_object.as_mut().map(|field| field as _)
3975        }
3976        ///Returns a mutable reference to `child_object`.
3977        ///If the field is unset, it is first initialized with the default value.
3978        pub fn child_object_mut(&mut self) -> &mut super::Object {
3979            self.child_object.get_or_insert_default()
3980        }
3981        ///If `child_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
3982        pub fn child_object_opt(&self) -> Option<&super::Object> {
3983            self.child_object.as_ref().map(|field| field as _)
3984        }
3985        ///Sets `child_object` with the provided value.
3986        pub fn set_child_object<T: Into<super::Object>>(&mut self, field: T) {
3987            self.child_object = Some(field.into().into());
3988        }
3989        ///Sets `child_object` with the provided value.
3990        pub fn with_child_object<T: Into<super::Object>>(mut self, field: T) -> Self {
3991            self.set_child_object(field.into());
3992            self
3993        }
3994    }
3995    impl super::EndOfEpochData {
3996        pub const fn const_default() -> Self {
3997            Self {
3998                next_epoch_committee: Vec::new(),
3999                next_epoch_protocol_version: None,
4000                epoch_commitments: Vec::new(),
4001            }
4002        }
4003        #[doc(hidden)]
4004        pub fn default_instance() -> &'static Self {
4005            static DEFAULT: super::EndOfEpochData = super::EndOfEpochData::const_default();
4006            &DEFAULT
4007        }
4008        ///Returns the value of `next_epoch_committee`, or the default value if `next_epoch_committee` is unset.
4009        pub fn next_epoch_committee(&self) -> &[super::ValidatorCommitteeMember] {
4010            &self.next_epoch_committee
4011        }
4012        ///Returns a mutable reference to `next_epoch_committee`.
4013        ///If the field is unset, it is first initialized with the default value.
4014        pub fn next_epoch_committee_mut(
4015            &mut self,
4016        ) -> &mut Vec<super::ValidatorCommitteeMember> {
4017            &mut self.next_epoch_committee
4018        }
4019        ///Sets `next_epoch_committee` with the provided value.
4020        pub fn set_next_epoch_committee(
4021            &mut self,
4022            field: Vec<super::ValidatorCommitteeMember>,
4023        ) {
4024            self.next_epoch_committee = field;
4025        }
4026        ///Sets `next_epoch_committee` with the provided value.
4027        pub fn with_next_epoch_committee(
4028            mut self,
4029            field: Vec<super::ValidatorCommitteeMember>,
4030        ) -> Self {
4031            self.set_next_epoch_committee(field);
4032            self
4033        }
4034        ///If `next_epoch_protocol_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4035        pub fn next_epoch_protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
4036            self.next_epoch_protocol_version.as_mut().map(|field| field as _)
4037        }
4038        ///Returns a mutable reference to `next_epoch_protocol_version`.
4039        ///If the field is unset, it is first initialized with the default value.
4040        pub fn next_epoch_protocol_version_mut(&mut self) -> &mut u64 {
4041            self.next_epoch_protocol_version.get_or_insert_default()
4042        }
4043        ///If `next_epoch_protocol_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
4044        pub fn next_epoch_protocol_version_opt(&self) -> Option<u64> {
4045            self.next_epoch_protocol_version.as_ref().map(|field| *field)
4046        }
4047        ///Sets `next_epoch_protocol_version` with the provided value.
4048        pub fn set_next_epoch_protocol_version<T: Into<u64>>(&mut self, field: T) {
4049            self.next_epoch_protocol_version = Some(field.into().into());
4050        }
4051        ///Sets `next_epoch_protocol_version` with the provided value.
4052        pub fn with_next_epoch_protocol_version<T: Into<u64>>(
4053            mut self,
4054            field: T,
4055        ) -> Self {
4056            self.set_next_epoch_protocol_version(field.into());
4057            self
4058        }
4059        ///Returns the value of `epoch_commitments`, or the default value if `epoch_commitments` is unset.
4060        pub fn epoch_commitments(&self) -> &[super::CheckpointCommitment] {
4061            &self.epoch_commitments
4062        }
4063        ///Returns a mutable reference to `epoch_commitments`.
4064        ///If the field is unset, it is first initialized with the default value.
4065        pub fn epoch_commitments_mut(
4066            &mut self,
4067        ) -> &mut Vec<super::CheckpointCommitment> {
4068            &mut self.epoch_commitments
4069        }
4070        ///Sets `epoch_commitments` with the provided value.
4071        pub fn set_epoch_commitments(
4072            &mut self,
4073            field: Vec<super::CheckpointCommitment>,
4074        ) {
4075            self.epoch_commitments = field;
4076        }
4077        ///Sets `epoch_commitments` with the provided value.
4078        pub fn with_epoch_commitments(
4079            mut self,
4080            field: Vec<super::CheckpointCommitment>,
4081        ) -> Self {
4082            self.set_epoch_commitments(field);
4083            self
4084        }
4085    }
4086    impl super::EndOfEpochTransaction {
4087        pub const fn const_default() -> Self {
4088            Self { transactions: Vec::new() }
4089        }
4090        #[doc(hidden)]
4091        pub fn default_instance() -> &'static Self {
4092            static DEFAULT: super::EndOfEpochTransaction = super::EndOfEpochTransaction::const_default();
4093            &DEFAULT
4094        }
4095        ///Returns the value of `transactions`, or the default value if `transactions` is unset.
4096        pub fn transactions(&self) -> &[super::EndOfEpochTransactionKind] {
4097            &self.transactions
4098        }
4099        ///Returns a mutable reference to `transactions`.
4100        ///If the field is unset, it is first initialized with the default value.
4101        pub fn transactions_mut(
4102            &mut self,
4103        ) -> &mut Vec<super::EndOfEpochTransactionKind> {
4104            &mut self.transactions
4105        }
4106        ///Sets `transactions` with the provided value.
4107        pub fn set_transactions(
4108            &mut self,
4109            field: Vec<super::EndOfEpochTransactionKind>,
4110        ) {
4111            self.transactions = field;
4112        }
4113        ///Sets `transactions` with the provided value.
4114        pub fn with_transactions(
4115            mut self,
4116            field: Vec<super::EndOfEpochTransactionKind>,
4117        ) -> Self {
4118            self.set_transactions(field);
4119            self
4120        }
4121    }
4122    impl super::EndOfEpochTransactionKind {
4123        pub const fn const_default() -> Self {
4124            Self { kind: None, data: None }
4125        }
4126        #[doc(hidden)]
4127        pub fn default_instance() -> &'static Self {
4128            static DEFAULT: super::EndOfEpochTransactionKind = super::EndOfEpochTransactionKind::const_default();
4129            &DEFAULT
4130        }
4131        ///Sets `kind` with the provided value.
4132        pub fn with_kind<T: Into<super::end_of_epoch_transaction_kind::Kind>>(
4133            mut self,
4134            field: T,
4135        ) -> Self {
4136            self.set_kind(field.into());
4137            self
4138        }
4139        ///Returns the value of `change_epoch`, or the default value if `change_epoch` is unset.
4140        pub fn change_epoch(&self) -> &super::ChangeEpoch {
4141            if let Some(
4142                super::end_of_epoch_transaction_kind::Data::ChangeEpoch(field),
4143            ) = &self.data
4144            {
4145                field as _
4146            } else {
4147                super::ChangeEpoch::default_instance() as _
4148            }
4149        }
4150        ///If `change_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
4151        pub fn change_epoch_opt(&self) -> Option<&super::ChangeEpoch> {
4152            if let Some(
4153                super::end_of_epoch_transaction_kind::Data::ChangeEpoch(field),
4154            ) = &self.data
4155            {
4156                Some(field as _)
4157            } else {
4158                None
4159            }
4160        }
4161        ///If `change_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4162        pub fn change_epoch_opt_mut(&mut self) -> Option<&mut super::ChangeEpoch> {
4163            if let Some(
4164                super::end_of_epoch_transaction_kind::Data::ChangeEpoch(field),
4165            ) = &mut self.data
4166            {
4167                Some(field as _)
4168            } else {
4169                None
4170            }
4171        }
4172        ///Returns a mutable reference to `change_epoch`.
4173        ///If the field is unset, it is first initialized with the default value.
4174        ///If any other oneof field in the same oneof is set, it will be cleared.
4175        pub fn change_epoch_mut(&mut self) -> &mut super::ChangeEpoch {
4176            if self.change_epoch_opt_mut().is_none() {
4177                self.data = Some(
4178                    super::end_of_epoch_transaction_kind::Data::ChangeEpoch(
4179                        super::ChangeEpoch::default(),
4180                    ),
4181                );
4182            }
4183            self.change_epoch_opt_mut().unwrap()
4184        }
4185        ///Sets `change_epoch` with the provided value.
4186        ///If any other oneof field in the same oneof is set, it will be cleared.
4187        pub fn set_change_epoch<T: Into<super::ChangeEpoch>>(&mut self, field: T) {
4188            self.data = Some(
4189                super::end_of_epoch_transaction_kind::Data::ChangeEpoch(
4190                    field.into().into(),
4191                ),
4192            );
4193        }
4194        ///Sets `change_epoch` with the provided value.
4195        ///If any other oneof field in the same oneof is set, it will be cleared.
4196        pub fn with_change_epoch<T: Into<super::ChangeEpoch>>(
4197            mut self,
4198            field: T,
4199        ) -> Self {
4200            self.set_change_epoch(field.into());
4201            self
4202        }
4203        ///Returns the value of `authenticator_state_expire`, or the default value if `authenticator_state_expire` is unset.
4204        pub fn authenticator_state_expire(&self) -> &super::AuthenticatorStateExpire {
4205            if let Some(
4206                super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4207                    field,
4208                ),
4209            ) = &self.data
4210            {
4211                field as _
4212            } else {
4213                super::AuthenticatorStateExpire::default_instance() as _
4214            }
4215        }
4216        ///If `authenticator_state_expire` is set, returns [`Some`] with the value; otherwise returns [`None`].
4217        pub fn authenticator_state_expire_opt(
4218            &self,
4219        ) -> Option<&super::AuthenticatorStateExpire> {
4220            if let Some(
4221                super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4222                    field,
4223                ),
4224            ) = &self.data
4225            {
4226                Some(field as _)
4227            } else {
4228                None
4229            }
4230        }
4231        ///If `authenticator_state_expire` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4232        pub fn authenticator_state_expire_opt_mut(
4233            &mut self,
4234        ) -> Option<&mut super::AuthenticatorStateExpire> {
4235            if let Some(
4236                super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4237                    field,
4238                ),
4239            ) = &mut self.data
4240            {
4241                Some(field as _)
4242            } else {
4243                None
4244            }
4245        }
4246        ///Returns a mutable reference to `authenticator_state_expire`.
4247        ///If the field is unset, it is first initialized with the default value.
4248        ///If any other oneof field in the same oneof is set, it will be cleared.
4249        pub fn authenticator_state_expire_mut(
4250            &mut self,
4251        ) -> &mut super::AuthenticatorStateExpire {
4252            if self.authenticator_state_expire_opt_mut().is_none() {
4253                self.data = Some(
4254                    super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4255                        super::AuthenticatorStateExpire::default(),
4256                    ),
4257                );
4258            }
4259            self.authenticator_state_expire_opt_mut().unwrap()
4260        }
4261        ///Sets `authenticator_state_expire` with the provided value.
4262        ///If any other oneof field in the same oneof is set, it will be cleared.
4263        pub fn set_authenticator_state_expire<T: Into<super::AuthenticatorStateExpire>>(
4264            &mut self,
4265            field: T,
4266        ) {
4267            self.data = Some(
4268                super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4269                    field.into().into(),
4270                ),
4271            );
4272        }
4273        ///Sets `authenticator_state_expire` with the provided value.
4274        ///If any other oneof field in the same oneof is set, it will be cleared.
4275        pub fn with_authenticator_state_expire<T: Into<super::AuthenticatorStateExpire>>(
4276            mut self,
4277            field: T,
4278        ) -> Self {
4279            self.set_authenticator_state_expire(field.into());
4280            self
4281        }
4282        ///Returns the value of `execution_time_observations`, or the default value if `execution_time_observations` is unset.
4283        pub fn execution_time_observations(&self) -> &super::ExecutionTimeObservations {
4284            if let Some(
4285                super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4286                    field,
4287                ),
4288            ) = &self.data
4289            {
4290                field as _
4291            } else {
4292                super::ExecutionTimeObservations::default_instance() as _
4293            }
4294        }
4295        ///If `execution_time_observations` is set, returns [`Some`] with the value; otherwise returns [`None`].
4296        pub fn execution_time_observations_opt(
4297            &self,
4298        ) -> Option<&super::ExecutionTimeObservations> {
4299            if let Some(
4300                super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4301                    field,
4302                ),
4303            ) = &self.data
4304            {
4305                Some(field as _)
4306            } else {
4307                None
4308            }
4309        }
4310        ///If `execution_time_observations` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4311        pub fn execution_time_observations_opt_mut(
4312            &mut self,
4313        ) -> Option<&mut super::ExecutionTimeObservations> {
4314            if let Some(
4315                super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4316                    field,
4317                ),
4318            ) = &mut self.data
4319            {
4320                Some(field as _)
4321            } else {
4322                None
4323            }
4324        }
4325        ///Returns a mutable reference to `execution_time_observations`.
4326        ///If the field is unset, it is first initialized with the default value.
4327        ///If any other oneof field in the same oneof is set, it will be cleared.
4328        pub fn execution_time_observations_mut(
4329            &mut self,
4330        ) -> &mut super::ExecutionTimeObservations {
4331            if self.execution_time_observations_opt_mut().is_none() {
4332                self.data = Some(
4333                    super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4334                        super::ExecutionTimeObservations::default(),
4335                    ),
4336                );
4337            }
4338            self.execution_time_observations_opt_mut().unwrap()
4339        }
4340        ///Sets `execution_time_observations` with the provided value.
4341        ///If any other oneof field in the same oneof is set, it will be cleared.
4342        pub fn set_execution_time_observations<
4343            T: Into<super::ExecutionTimeObservations>,
4344        >(&mut self, field: T) {
4345            self.data = Some(
4346                super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4347                    field.into().into(),
4348                ),
4349            );
4350        }
4351        ///Sets `execution_time_observations` with the provided value.
4352        ///If any other oneof field in the same oneof is set, it will be cleared.
4353        pub fn with_execution_time_observations<
4354            T: Into<super::ExecutionTimeObservations>,
4355        >(mut self, field: T) -> Self {
4356            self.set_execution_time_observations(field.into());
4357            self
4358        }
4359        ///Returns the value of `bridge_chain_id`, or the default value if `bridge_chain_id` is unset.
4360        pub fn bridge_chain_id(&self) -> &str {
4361            if let Some(
4362                super::end_of_epoch_transaction_kind::Data::BridgeChainId(field),
4363            ) = &self.data
4364            {
4365                field as _
4366            } else {
4367                ""
4368            }
4369        }
4370        ///If `bridge_chain_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
4371        pub fn bridge_chain_id_opt(&self) -> Option<&str> {
4372            if let Some(
4373                super::end_of_epoch_transaction_kind::Data::BridgeChainId(field),
4374            ) = &self.data
4375            {
4376                Some(field as _)
4377            } else {
4378                None
4379            }
4380        }
4381        ///If `bridge_chain_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4382        pub fn bridge_chain_id_opt_mut(&mut self) -> Option<&mut String> {
4383            if let Some(
4384                super::end_of_epoch_transaction_kind::Data::BridgeChainId(field),
4385            ) = &mut self.data
4386            {
4387                Some(field as _)
4388            } else {
4389                None
4390            }
4391        }
4392        ///Returns a mutable reference to `bridge_chain_id`.
4393        ///If the field is unset, it is first initialized with the default value.
4394        ///If any other oneof field in the same oneof is set, it will be cleared.
4395        pub fn bridge_chain_id_mut(&mut self) -> &mut String {
4396            if self.bridge_chain_id_opt_mut().is_none() {
4397                self.data = Some(
4398                    super::end_of_epoch_transaction_kind::Data::BridgeChainId(
4399                        String::default(),
4400                    ),
4401                );
4402            }
4403            self.bridge_chain_id_opt_mut().unwrap()
4404        }
4405        ///Sets `bridge_chain_id` with the provided value.
4406        ///If any other oneof field in the same oneof is set, it will be cleared.
4407        pub fn set_bridge_chain_id<T: Into<String>>(&mut self, field: T) {
4408            self.data = Some(
4409                super::end_of_epoch_transaction_kind::Data::BridgeChainId(
4410                    field.into().into(),
4411                ),
4412            );
4413        }
4414        ///Sets `bridge_chain_id` with the provided value.
4415        ///If any other oneof field in the same oneof is set, it will be cleared.
4416        pub fn with_bridge_chain_id<T: Into<String>>(mut self, field: T) -> Self {
4417            self.set_bridge_chain_id(field.into());
4418            self
4419        }
4420        ///Returns the value of `bridge_object_version`, or the default value if `bridge_object_version` is unset.
4421        pub fn bridge_object_version(&self) -> u64 {
4422            if let Some(
4423                super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4424            ) = &self.data
4425            {
4426                *field
4427            } else {
4428                0u64
4429            }
4430        }
4431        ///If `bridge_object_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
4432        pub fn bridge_object_version_opt(&self) -> Option<u64> {
4433            if let Some(
4434                super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4435            ) = &self.data
4436            {
4437                Some(*field)
4438            } else {
4439                None
4440            }
4441        }
4442        ///If `bridge_object_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4443        pub fn bridge_object_version_opt_mut(&mut self) -> Option<&mut u64> {
4444            if let Some(
4445                super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4446            ) = &mut self.data
4447            {
4448                Some(field as _)
4449            } else {
4450                None
4451            }
4452        }
4453        ///Returns a mutable reference to `bridge_object_version`.
4454        ///If the field is unset, it is first initialized with the default value.
4455        ///If any other oneof field in the same oneof is set, it will be cleared.
4456        pub fn bridge_object_version_mut(&mut self) -> &mut u64 {
4457            if self.bridge_object_version_opt_mut().is_none() {
4458                self.data = Some(
4459                    super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(
4460                        u64::default(),
4461                    ),
4462                );
4463            }
4464            self.bridge_object_version_opt_mut().unwrap()
4465        }
4466        ///Sets `bridge_object_version` with the provided value.
4467        ///If any other oneof field in the same oneof is set, it will be cleared.
4468        pub fn set_bridge_object_version<T: Into<u64>>(&mut self, field: T) {
4469            self.data = Some(
4470                super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(
4471                    field.into().into(),
4472                ),
4473            );
4474        }
4475        ///Sets `bridge_object_version` with the provided value.
4476        ///If any other oneof field in the same oneof is set, it will be cleared.
4477        pub fn with_bridge_object_version<T: Into<u64>>(mut self, field: T) -> Self {
4478            self.set_bridge_object_version(field.into());
4479            self
4480        }
4481    }
4482    impl super::Epoch {
4483        pub const fn const_default() -> Self {
4484            Self {
4485                epoch: None,
4486                committee: None,
4487                system_state: None,
4488                first_checkpoint: None,
4489                last_checkpoint: None,
4490                start: None,
4491                end: None,
4492                reference_gas_price: None,
4493                protocol_config: None,
4494            }
4495        }
4496        #[doc(hidden)]
4497        pub fn default_instance() -> &'static Self {
4498            static DEFAULT: super::Epoch = super::Epoch::const_default();
4499            &DEFAULT
4500        }
4501        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4502        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
4503            self.epoch.as_mut().map(|field| field as _)
4504        }
4505        ///Returns a mutable reference to `epoch`.
4506        ///If the field is unset, it is first initialized with the default value.
4507        pub fn epoch_mut(&mut self) -> &mut u64 {
4508            self.epoch.get_or_insert_default()
4509        }
4510        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
4511        pub fn epoch_opt(&self) -> Option<u64> {
4512            self.epoch.as_ref().map(|field| *field)
4513        }
4514        ///Sets `epoch` with the provided value.
4515        pub fn set_epoch<T: Into<u64>>(&mut self, field: T) {
4516            self.epoch = Some(field.into().into());
4517        }
4518        ///Sets `epoch` with the provided value.
4519        pub fn with_epoch<T: Into<u64>>(mut self, field: T) -> Self {
4520            self.set_epoch(field.into());
4521            self
4522        }
4523        ///Returns the value of `committee`, or the default value if `committee` is unset.
4524        pub fn committee(&self) -> &super::ValidatorCommittee {
4525            self.committee
4526                .as_ref()
4527                .map(|field| field as _)
4528                .unwrap_or_else(|| super::ValidatorCommittee::default_instance() as _)
4529        }
4530        ///If `committee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4531        pub fn committee_opt_mut(&mut self) -> Option<&mut super::ValidatorCommittee> {
4532            self.committee.as_mut().map(|field| field as _)
4533        }
4534        ///Returns a mutable reference to `committee`.
4535        ///If the field is unset, it is first initialized with the default value.
4536        pub fn committee_mut(&mut self) -> &mut super::ValidatorCommittee {
4537            self.committee.get_or_insert_default()
4538        }
4539        ///If `committee` is set, returns [`Some`] with the value; otherwise returns [`None`].
4540        pub fn committee_opt(&self) -> Option<&super::ValidatorCommittee> {
4541            self.committee.as_ref().map(|field| field as _)
4542        }
4543        ///Sets `committee` with the provided value.
4544        pub fn set_committee<T: Into<super::ValidatorCommittee>>(&mut self, field: T) {
4545            self.committee = Some(field.into().into());
4546        }
4547        ///Sets `committee` with the provided value.
4548        pub fn with_committee<T: Into<super::ValidatorCommittee>>(
4549            mut self,
4550            field: T,
4551        ) -> Self {
4552            self.set_committee(field.into());
4553            self
4554        }
4555        ///Returns the value of `system_state`, or the default value if `system_state` is unset.
4556        pub fn system_state(&self) -> &super::SystemState {
4557            self.system_state
4558                .as_ref()
4559                .map(|field| field as _)
4560                .unwrap_or_else(|| super::SystemState::default_instance() as _)
4561        }
4562        ///If `system_state` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4563        pub fn system_state_opt_mut(&mut self) -> Option<&mut super::SystemState> {
4564            self.system_state.as_mut().map(|field| field as _)
4565        }
4566        ///Returns a mutable reference to `system_state`.
4567        ///If the field is unset, it is first initialized with the default value.
4568        pub fn system_state_mut(&mut self) -> &mut super::SystemState {
4569            self.system_state.get_or_insert_default()
4570        }
4571        ///If `system_state` is set, returns [`Some`] with the value; otherwise returns [`None`].
4572        pub fn system_state_opt(&self) -> Option<&super::SystemState> {
4573            self.system_state.as_ref().map(|field| field as _)
4574        }
4575        ///Sets `system_state` with the provided value.
4576        pub fn set_system_state<T: Into<super::SystemState>>(&mut self, field: T) {
4577            self.system_state = Some(field.into().into());
4578        }
4579        ///Sets `system_state` with the provided value.
4580        pub fn with_system_state<T: Into<super::SystemState>>(
4581            mut self,
4582            field: T,
4583        ) -> Self {
4584            self.set_system_state(field.into());
4585            self
4586        }
4587        ///If `first_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4588        pub fn first_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
4589            self.first_checkpoint.as_mut().map(|field| field as _)
4590        }
4591        ///Returns a mutable reference to `first_checkpoint`.
4592        ///If the field is unset, it is first initialized with the default value.
4593        pub fn first_checkpoint_mut(&mut self) -> &mut u64 {
4594            self.first_checkpoint.get_or_insert_default()
4595        }
4596        ///If `first_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
4597        pub fn first_checkpoint_opt(&self) -> Option<u64> {
4598            self.first_checkpoint.as_ref().map(|field| *field)
4599        }
4600        ///Sets `first_checkpoint` with the provided value.
4601        pub fn set_first_checkpoint<T: Into<u64>>(&mut self, field: T) {
4602            self.first_checkpoint = Some(field.into().into());
4603        }
4604        ///Sets `first_checkpoint` with the provided value.
4605        pub fn with_first_checkpoint<T: Into<u64>>(mut self, field: T) -> Self {
4606            self.set_first_checkpoint(field.into());
4607            self
4608        }
4609        ///If `last_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4610        pub fn last_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
4611            self.last_checkpoint.as_mut().map(|field| field as _)
4612        }
4613        ///Returns a mutable reference to `last_checkpoint`.
4614        ///If the field is unset, it is first initialized with the default value.
4615        pub fn last_checkpoint_mut(&mut self) -> &mut u64 {
4616            self.last_checkpoint.get_or_insert_default()
4617        }
4618        ///If `last_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
4619        pub fn last_checkpoint_opt(&self) -> Option<u64> {
4620            self.last_checkpoint.as_ref().map(|field| *field)
4621        }
4622        ///Sets `last_checkpoint` with the provided value.
4623        pub fn set_last_checkpoint<T: Into<u64>>(&mut self, field: T) {
4624            self.last_checkpoint = Some(field.into().into());
4625        }
4626        ///Sets `last_checkpoint` with the provided value.
4627        pub fn with_last_checkpoint<T: Into<u64>>(mut self, field: T) -> Self {
4628            self.set_last_checkpoint(field.into());
4629            self
4630        }
4631        ///If `start` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4632        pub fn start_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
4633            self.start.as_mut().map(|field| field as _)
4634        }
4635        ///Returns a mutable reference to `start`.
4636        ///If the field is unset, it is first initialized with the default value.
4637        pub fn start_mut(&mut self) -> &mut ::prost_types::Timestamp {
4638            self.start.get_or_insert_default()
4639        }
4640        ///If `start` is set, returns [`Some`] with the value; otherwise returns [`None`].
4641        pub fn start_opt(&self) -> Option<&::prost_types::Timestamp> {
4642            self.start.as_ref().map(|field| field as _)
4643        }
4644        ///Sets `start` with the provided value.
4645        pub fn set_start<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
4646            self.start = Some(field.into().into());
4647        }
4648        ///Sets `start` with the provided value.
4649        pub fn with_start<T: Into<::prost_types::Timestamp>>(
4650            mut self,
4651            field: T,
4652        ) -> Self {
4653            self.set_start(field.into());
4654            self
4655        }
4656        ///If `end` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4657        pub fn end_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
4658            self.end.as_mut().map(|field| field as _)
4659        }
4660        ///Returns a mutable reference to `end`.
4661        ///If the field is unset, it is first initialized with the default value.
4662        pub fn end_mut(&mut self) -> &mut ::prost_types::Timestamp {
4663            self.end.get_or_insert_default()
4664        }
4665        ///If `end` is set, returns [`Some`] with the value; otherwise returns [`None`].
4666        pub fn end_opt(&self) -> Option<&::prost_types::Timestamp> {
4667            self.end.as_ref().map(|field| field as _)
4668        }
4669        ///Sets `end` with the provided value.
4670        pub fn set_end<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
4671            self.end = Some(field.into().into());
4672        }
4673        ///Sets `end` with the provided value.
4674        pub fn with_end<T: Into<::prost_types::Timestamp>>(mut self, field: T) -> Self {
4675            self.set_end(field.into());
4676            self
4677        }
4678        ///If `reference_gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4679        pub fn reference_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
4680            self.reference_gas_price.as_mut().map(|field| field as _)
4681        }
4682        ///Returns a mutable reference to `reference_gas_price`.
4683        ///If the field is unset, it is first initialized with the default value.
4684        pub fn reference_gas_price_mut(&mut self) -> &mut u64 {
4685            self.reference_gas_price.get_or_insert_default()
4686        }
4687        ///If `reference_gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
4688        pub fn reference_gas_price_opt(&self) -> Option<u64> {
4689            self.reference_gas_price.as_ref().map(|field| *field)
4690        }
4691        ///Sets `reference_gas_price` with the provided value.
4692        pub fn set_reference_gas_price<T: Into<u64>>(&mut self, field: T) {
4693            self.reference_gas_price = Some(field.into().into());
4694        }
4695        ///Sets `reference_gas_price` with the provided value.
4696        pub fn with_reference_gas_price<T: Into<u64>>(mut self, field: T) -> Self {
4697            self.set_reference_gas_price(field.into());
4698            self
4699        }
4700        ///Returns the value of `protocol_config`, or the default value if `protocol_config` is unset.
4701        pub fn protocol_config(&self) -> &super::ProtocolConfig {
4702            self.protocol_config
4703                .as_ref()
4704                .map(|field| field as _)
4705                .unwrap_or_else(|| super::ProtocolConfig::default_instance() as _)
4706        }
4707        ///If `protocol_config` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4708        pub fn protocol_config_opt_mut(&mut self) -> Option<&mut super::ProtocolConfig> {
4709            self.protocol_config.as_mut().map(|field| field as _)
4710        }
4711        ///Returns a mutable reference to `protocol_config`.
4712        ///If the field is unset, it is first initialized with the default value.
4713        pub fn protocol_config_mut(&mut self) -> &mut super::ProtocolConfig {
4714            self.protocol_config.get_or_insert_default()
4715        }
4716        ///If `protocol_config` is set, returns [`Some`] with the value; otherwise returns [`None`].
4717        pub fn protocol_config_opt(&self) -> Option<&super::ProtocolConfig> {
4718            self.protocol_config.as_ref().map(|field| field as _)
4719        }
4720        ///Sets `protocol_config` with the provided value.
4721        pub fn set_protocol_config<T: Into<super::ProtocolConfig>>(&mut self, field: T) {
4722            self.protocol_config = Some(field.into().into());
4723        }
4724        ///Sets `protocol_config` with the provided value.
4725        pub fn with_protocol_config<T: Into<super::ProtocolConfig>>(
4726            mut self,
4727            field: T,
4728        ) -> Self {
4729            self.set_protocol_config(field.into());
4730            self
4731        }
4732    }
4733    impl super::Event {
4734        pub const fn const_default() -> Self {
4735            Self {
4736                package_id: None,
4737                module: None,
4738                sender: None,
4739                event_type: None,
4740                contents: None,
4741                json: None,
4742            }
4743        }
4744        #[doc(hidden)]
4745        pub fn default_instance() -> &'static Self {
4746            static DEFAULT: super::Event = super::Event::const_default();
4747            &DEFAULT
4748        }
4749        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4750        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
4751            self.package_id.as_mut().map(|field| field as _)
4752        }
4753        ///Returns a mutable reference to `package_id`.
4754        ///If the field is unset, it is first initialized with the default value.
4755        pub fn package_id_mut(&mut self) -> &mut String {
4756            self.package_id.get_or_insert_default()
4757        }
4758        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
4759        pub fn package_id_opt(&self) -> Option<&str> {
4760            self.package_id.as_ref().map(|field| field as _)
4761        }
4762        ///Sets `package_id` with the provided value.
4763        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
4764            self.package_id = Some(field.into().into());
4765        }
4766        ///Sets `package_id` with the provided value.
4767        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
4768            self.set_package_id(field.into());
4769            self
4770        }
4771        ///If `module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4772        pub fn module_opt_mut(&mut self) -> Option<&mut String> {
4773            self.module.as_mut().map(|field| field as _)
4774        }
4775        ///Returns a mutable reference to `module`.
4776        ///If the field is unset, it is first initialized with the default value.
4777        pub fn module_mut(&mut self) -> &mut String {
4778            self.module.get_or_insert_default()
4779        }
4780        ///If `module` is set, returns [`Some`] with the value; otherwise returns [`None`].
4781        pub fn module_opt(&self) -> Option<&str> {
4782            self.module.as_ref().map(|field| field as _)
4783        }
4784        ///Sets `module` with the provided value.
4785        pub fn set_module<T: Into<String>>(&mut self, field: T) {
4786            self.module = Some(field.into().into());
4787        }
4788        ///Sets `module` with the provided value.
4789        pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
4790            self.set_module(field.into());
4791            self
4792        }
4793        ///If `sender` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4794        pub fn sender_opt_mut(&mut self) -> Option<&mut String> {
4795            self.sender.as_mut().map(|field| field as _)
4796        }
4797        ///Returns a mutable reference to `sender`.
4798        ///If the field is unset, it is first initialized with the default value.
4799        pub fn sender_mut(&mut self) -> &mut String {
4800            self.sender.get_or_insert_default()
4801        }
4802        ///If `sender` is set, returns [`Some`] with the value; otherwise returns [`None`].
4803        pub fn sender_opt(&self) -> Option<&str> {
4804            self.sender.as_ref().map(|field| field as _)
4805        }
4806        ///Sets `sender` with the provided value.
4807        pub fn set_sender<T: Into<String>>(&mut self, field: T) {
4808            self.sender = Some(field.into().into());
4809        }
4810        ///Sets `sender` with the provided value.
4811        pub fn with_sender<T: Into<String>>(mut self, field: T) -> Self {
4812            self.set_sender(field.into());
4813            self
4814        }
4815        ///If `event_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4816        pub fn event_type_opt_mut(&mut self) -> Option<&mut String> {
4817            self.event_type.as_mut().map(|field| field as _)
4818        }
4819        ///Returns a mutable reference to `event_type`.
4820        ///If the field is unset, it is first initialized with the default value.
4821        pub fn event_type_mut(&mut self) -> &mut String {
4822            self.event_type.get_or_insert_default()
4823        }
4824        ///If `event_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
4825        pub fn event_type_opt(&self) -> Option<&str> {
4826            self.event_type.as_ref().map(|field| field as _)
4827        }
4828        ///Sets `event_type` with the provided value.
4829        pub fn set_event_type<T: Into<String>>(&mut self, field: T) {
4830            self.event_type = Some(field.into().into());
4831        }
4832        ///Sets `event_type` with the provided value.
4833        pub fn with_event_type<T: Into<String>>(mut self, field: T) -> Self {
4834            self.set_event_type(field.into());
4835            self
4836        }
4837        ///Returns the value of `contents`, or the default value if `contents` is unset.
4838        pub fn contents(&self) -> &super::Bcs {
4839            self.contents
4840                .as_ref()
4841                .map(|field| field as _)
4842                .unwrap_or_else(|| super::Bcs::default_instance() as _)
4843        }
4844        ///If `contents` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4845        pub fn contents_opt_mut(&mut self) -> Option<&mut super::Bcs> {
4846            self.contents.as_mut().map(|field| field as _)
4847        }
4848        ///Returns a mutable reference to `contents`.
4849        ///If the field is unset, it is first initialized with the default value.
4850        pub fn contents_mut(&mut self) -> &mut super::Bcs {
4851            self.contents.get_or_insert_default()
4852        }
4853        ///If `contents` is set, returns [`Some`] with the value; otherwise returns [`None`].
4854        pub fn contents_opt(&self) -> Option<&super::Bcs> {
4855            self.contents.as_ref().map(|field| field as _)
4856        }
4857        ///Sets `contents` with the provided value.
4858        pub fn set_contents<T: Into<super::Bcs>>(&mut self, field: T) {
4859            self.contents = Some(field.into().into());
4860        }
4861        ///Sets `contents` with the provided value.
4862        pub fn with_contents<T: Into<super::Bcs>>(mut self, field: T) -> Self {
4863            self.set_contents(field.into());
4864            self
4865        }
4866        ///If `json` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4867        pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
4868            self.json.as_mut().map(|field| field as _)
4869        }
4870        ///Returns a mutable reference to `json`.
4871        ///If the field is unset, it is first initialized with the default value.
4872        pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
4873            self.json.get_or_insert_default()
4874        }
4875        ///If `json` is set, returns [`Some`] with the value; otherwise returns [`None`].
4876        pub fn json_opt(&self) -> Option<&::prost_types::Value> {
4877            self.json.as_ref().map(|field| field as _)
4878        }
4879        ///Sets `json` with the provided value.
4880        pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
4881            self.json = Some(field.into().into());
4882        }
4883        ///Sets `json` with the provided value.
4884        pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
4885            self.set_json(field.into());
4886            self
4887        }
4888    }
4889    impl super::ExecuteTransactionRequest {
4890        pub const fn const_default() -> Self {
4891            Self {
4892                transaction: None,
4893                signatures: Vec::new(),
4894                read_mask: None,
4895            }
4896        }
4897        #[doc(hidden)]
4898        pub fn default_instance() -> &'static Self {
4899            static DEFAULT: super::ExecuteTransactionRequest = super::ExecuteTransactionRequest::const_default();
4900            &DEFAULT
4901        }
4902        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
4903        pub fn transaction(&self) -> &super::Transaction {
4904            self.transaction
4905                .as_ref()
4906                .map(|field| field as _)
4907                .unwrap_or_else(|| super::Transaction::default_instance() as _)
4908        }
4909        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4910        pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
4911            self.transaction.as_mut().map(|field| field as _)
4912        }
4913        ///Returns a mutable reference to `transaction`.
4914        ///If the field is unset, it is first initialized with the default value.
4915        pub fn transaction_mut(&mut self) -> &mut super::Transaction {
4916            self.transaction.get_or_insert_default()
4917        }
4918        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
4919        pub fn transaction_opt(&self) -> Option<&super::Transaction> {
4920            self.transaction.as_ref().map(|field| field as _)
4921        }
4922        ///Sets `transaction` with the provided value.
4923        pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
4924            self.transaction = Some(field.into().into());
4925        }
4926        ///Sets `transaction` with the provided value.
4927        pub fn with_transaction<T: Into<super::Transaction>>(
4928            mut self,
4929            field: T,
4930        ) -> Self {
4931            self.set_transaction(field.into());
4932            self
4933        }
4934        ///Returns the value of `signatures`, or the default value if `signatures` is unset.
4935        pub fn signatures(&self) -> &[super::UserSignature] {
4936            &self.signatures
4937        }
4938        ///Returns a mutable reference to `signatures`.
4939        ///If the field is unset, it is first initialized with the default value.
4940        pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
4941            &mut self.signatures
4942        }
4943        ///Sets `signatures` with the provided value.
4944        pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
4945            self.signatures = field;
4946        }
4947        ///Sets `signatures` with the provided value.
4948        pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
4949            self.set_signatures(field);
4950            self
4951        }
4952        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4953        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
4954            self.read_mask.as_mut().map(|field| field as _)
4955        }
4956        ///Returns a mutable reference to `read_mask`.
4957        ///If the field is unset, it is first initialized with the default value.
4958        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
4959            self.read_mask.get_or_insert_default()
4960        }
4961        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
4962        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
4963            self.read_mask.as_ref().map(|field| field as _)
4964        }
4965        ///Sets `read_mask` with the provided value.
4966        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
4967            self.read_mask = Some(field.into().into());
4968        }
4969        ///Sets `read_mask` with the provided value.
4970        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
4971            mut self,
4972            field: T,
4973        ) -> Self {
4974            self.set_read_mask(field.into());
4975            self
4976        }
4977    }
4978    impl super::ExecuteTransactionResponse {
4979        pub const fn const_default() -> Self {
4980            Self { transaction: None }
4981        }
4982        #[doc(hidden)]
4983        pub fn default_instance() -> &'static Self {
4984            static DEFAULT: super::ExecuteTransactionResponse = super::ExecuteTransactionResponse::const_default();
4985            &DEFAULT
4986        }
4987        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
4988        pub fn transaction(&self) -> &super::ExecutedTransaction {
4989            self.transaction
4990                .as_ref()
4991                .map(|field| field as _)
4992                .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
4993        }
4994        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4995        pub fn transaction_opt_mut(
4996            &mut self,
4997        ) -> Option<&mut super::ExecutedTransaction> {
4998            self.transaction.as_mut().map(|field| field as _)
4999        }
5000        ///Returns a mutable reference to `transaction`.
5001        ///If the field is unset, it is first initialized with the default value.
5002        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
5003            self.transaction.get_or_insert_default()
5004        }
5005        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
5006        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
5007            self.transaction.as_ref().map(|field| field as _)
5008        }
5009        ///Sets `transaction` with the provided value.
5010        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
5011            &mut self,
5012            field: T,
5013        ) {
5014            self.transaction = Some(field.into().into());
5015        }
5016        ///Sets `transaction` with the provided value.
5017        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
5018            mut self,
5019            field: T,
5020        ) -> Self {
5021            self.set_transaction(field.into());
5022            self
5023        }
5024    }
5025    impl super::ExecutedTransaction {
5026        pub const fn const_default() -> Self {
5027            Self {
5028                digest: None,
5029                transaction: None,
5030                signatures: Vec::new(),
5031                effects: None,
5032                events: None,
5033                checkpoint: None,
5034                timestamp: None,
5035                balance_changes: Vec::new(),
5036                objects: None,
5037            }
5038        }
5039        #[doc(hidden)]
5040        pub fn default_instance() -> &'static Self {
5041            static DEFAULT: super::ExecutedTransaction = super::ExecutedTransaction::const_default();
5042            &DEFAULT
5043        }
5044        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5045        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
5046            self.digest.as_mut().map(|field| field as _)
5047        }
5048        ///Returns a mutable reference to `digest`.
5049        ///If the field is unset, it is first initialized with the default value.
5050        pub fn digest_mut(&mut self) -> &mut String {
5051            self.digest.get_or_insert_default()
5052        }
5053        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
5054        pub fn digest_opt(&self) -> Option<&str> {
5055            self.digest.as_ref().map(|field| field as _)
5056        }
5057        ///Sets `digest` with the provided value.
5058        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
5059            self.digest = Some(field.into().into());
5060        }
5061        ///Sets `digest` with the provided value.
5062        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
5063            self.set_digest(field.into());
5064            self
5065        }
5066        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
5067        pub fn transaction(&self) -> &super::Transaction {
5068            self.transaction
5069                .as_ref()
5070                .map(|field| field as _)
5071                .unwrap_or_else(|| super::Transaction::default_instance() as _)
5072        }
5073        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5074        pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
5075            self.transaction.as_mut().map(|field| field as _)
5076        }
5077        ///Returns a mutable reference to `transaction`.
5078        ///If the field is unset, it is first initialized with the default value.
5079        pub fn transaction_mut(&mut self) -> &mut super::Transaction {
5080            self.transaction.get_or_insert_default()
5081        }
5082        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
5083        pub fn transaction_opt(&self) -> Option<&super::Transaction> {
5084            self.transaction.as_ref().map(|field| field as _)
5085        }
5086        ///Sets `transaction` with the provided value.
5087        pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
5088            self.transaction = Some(field.into().into());
5089        }
5090        ///Sets `transaction` with the provided value.
5091        pub fn with_transaction<T: Into<super::Transaction>>(
5092            mut self,
5093            field: T,
5094        ) -> Self {
5095            self.set_transaction(field.into());
5096            self
5097        }
5098        ///Returns the value of `signatures`, or the default value if `signatures` is unset.
5099        pub fn signatures(&self) -> &[super::UserSignature] {
5100            &self.signatures
5101        }
5102        ///Returns a mutable reference to `signatures`.
5103        ///If the field is unset, it is first initialized with the default value.
5104        pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
5105            &mut self.signatures
5106        }
5107        ///Sets `signatures` with the provided value.
5108        pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
5109            self.signatures = field;
5110        }
5111        ///Sets `signatures` with the provided value.
5112        pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
5113            self.set_signatures(field);
5114            self
5115        }
5116        ///Returns the value of `effects`, or the default value if `effects` is unset.
5117        pub fn effects(&self) -> &super::TransactionEffects {
5118            self.effects
5119                .as_ref()
5120                .map(|field| field as _)
5121                .unwrap_or_else(|| super::TransactionEffects::default_instance() as _)
5122        }
5123        ///If `effects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5124        pub fn effects_opt_mut(&mut self) -> Option<&mut super::TransactionEffects> {
5125            self.effects.as_mut().map(|field| field as _)
5126        }
5127        ///Returns a mutable reference to `effects`.
5128        ///If the field is unset, it is first initialized with the default value.
5129        pub fn effects_mut(&mut self) -> &mut super::TransactionEffects {
5130            self.effects.get_or_insert_default()
5131        }
5132        ///If `effects` is set, returns [`Some`] with the value; otherwise returns [`None`].
5133        pub fn effects_opt(&self) -> Option<&super::TransactionEffects> {
5134            self.effects.as_ref().map(|field| field as _)
5135        }
5136        ///Sets `effects` with the provided value.
5137        pub fn set_effects<T: Into<super::TransactionEffects>>(&mut self, field: T) {
5138            self.effects = Some(field.into().into());
5139        }
5140        ///Sets `effects` with the provided value.
5141        pub fn with_effects<T: Into<super::TransactionEffects>>(
5142            mut self,
5143            field: T,
5144        ) -> Self {
5145            self.set_effects(field.into());
5146            self
5147        }
5148        ///Returns the value of `events`, or the default value if `events` is unset.
5149        pub fn events(&self) -> &super::TransactionEvents {
5150            self.events
5151                .as_ref()
5152                .map(|field| field as _)
5153                .unwrap_or_else(|| super::TransactionEvents::default_instance() as _)
5154        }
5155        ///If `events` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5156        pub fn events_opt_mut(&mut self) -> Option<&mut super::TransactionEvents> {
5157            self.events.as_mut().map(|field| field as _)
5158        }
5159        ///Returns a mutable reference to `events`.
5160        ///If the field is unset, it is first initialized with the default value.
5161        pub fn events_mut(&mut self) -> &mut super::TransactionEvents {
5162            self.events.get_or_insert_default()
5163        }
5164        ///If `events` is set, returns [`Some`] with the value; otherwise returns [`None`].
5165        pub fn events_opt(&self) -> Option<&super::TransactionEvents> {
5166            self.events.as_ref().map(|field| field as _)
5167        }
5168        ///Sets `events` with the provided value.
5169        pub fn set_events<T: Into<super::TransactionEvents>>(&mut self, field: T) {
5170            self.events = Some(field.into().into());
5171        }
5172        ///Sets `events` with the provided value.
5173        pub fn with_events<T: Into<super::TransactionEvents>>(
5174            mut self,
5175            field: T,
5176        ) -> Self {
5177            self.set_events(field.into());
5178            self
5179        }
5180        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5181        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
5182            self.checkpoint.as_mut().map(|field| field as _)
5183        }
5184        ///Returns a mutable reference to `checkpoint`.
5185        ///If the field is unset, it is first initialized with the default value.
5186        pub fn checkpoint_mut(&mut self) -> &mut u64 {
5187            self.checkpoint.get_or_insert_default()
5188        }
5189        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
5190        pub fn checkpoint_opt(&self) -> Option<u64> {
5191            self.checkpoint.as_ref().map(|field| *field)
5192        }
5193        ///Sets `checkpoint` with the provided value.
5194        pub fn set_checkpoint<T: Into<u64>>(&mut self, field: T) {
5195            self.checkpoint = Some(field.into().into());
5196        }
5197        ///Sets `checkpoint` with the provided value.
5198        pub fn with_checkpoint<T: Into<u64>>(mut self, field: T) -> Self {
5199            self.set_checkpoint(field.into());
5200            self
5201        }
5202        ///If `timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5203        pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
5204            self.timestamp.as_mut().map(|field| field as _)
5205        }
5206        ///Returns a mutable reference to `timestamp`.
5207        ///If the field is unset, it is first initialized with the default value.
5208        pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
5209            self.timestamp.get_or_insert_default()
5210        }
5211        ///If `timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
5212        pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
5213            self.timestamp.as_ref().map(|field| field as _)
5214        }
5215        ///Sets `timestamp` with the provided value.
5216        pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
5217            self.timestamp = Some(field.into().into());
5218        }
5219        ///Sets `timestamp` with the provided value.
5220        pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
5221            mut self,
5222            field: T,
5223        ) -> Self {
5224            self.set_timestamp(field.into());
5225            self
5226        }
5227        ///Returns the value of `balance_changes`, or the default value if `balance_changes` is unset.
5228        pub fn balance_changes(&self) -> &[super::BalanceChange] {
5229            &self.balance_changes
5230        }
5231        ///Returns a mutable reference to `balance_changes`.
5232        ///If the field is unset, it is first initialized with the default value.
5233        pub fn balance_changes_mut(&mut self) -> &mut Vec<super::BalanceChange> {
5234            &mut self.balance_changes
5235        }
5236        ///Sets `balance_changes` with the provided value.
5237        pub fn set_balance_changes(&mut self, field: Vec<super::BalanceChange>) {
5238            self.balance_changes = field;
5239        }
5240        ///Sets `balance_changes` with the provided value.
5241        pub fn with_balance_changes(mut self, field: Vec<super::BalanceChange>) -> Self {
5242            self.set_balance_changes(field);
5243            self
5244        }
5245        ///Returns the value of `objects`, or the default value if `objects` is unset.
5246        pub fn objects(&self) -> &super::ObjectSet {
5247            self.objects
5248                .as_ref()
5249                .map(|field| field as _)
5250                .unwrap_or_else(|| super::ObjectSet::default_instance() as _)
5251        }
5252        ///If `objects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5253        pub fn objects_opt_mut(&mut self) -> Option<&mut super::ObjectSet> {
5254            self.objects.as_mut().map(|field| field as _)
5255        }
5256        ///Returns a mutable reference to `objects`.
5257        ///If the field is unset, it is first initialized with the default value.
5258        pub fn objects_mut(&mut self) -> &mut super::ObjectSet {
5259            self.objects.get_or_insert_default()
5260        }
5261        ///If `objects` is set, returns [`Some`] with the value; otherwise returns [`None`].
5262        pub fn objects_opt(&self) -> Option<&super::ObjectSet> {
5263            self.objects.as_ref().map(|field| field as _)
5264        }
5265        ///Sets `objects` with the provided value.
5266        pub fn set_objects<T: Into<super::ObjectSet>>(&mut self, field: T) {
5267            self.objects = Some(field.into().into());
5268        }
5269        ///Sets `objects` with the provided value.
5270        pub fn with_objects<T: Into<super::ObjectSet>>(mut self, field: T) -> Self {
5271            self.set_objects(field.into());
5272            self
5273        }
5274    }
5275    impl super::ExecutionError {
5276        pub const fn const_default() -> Self {
5277            Self {
5278                description: None,
5279                command: None,
5280                kind: None,
5281                error_details: None,
5282            }
5283        }
5284        #[doc(hidden)]
5285        pub fn default_instance() -> &'static Self {
5286            static DEFAULT: super::ExecutionError = super::ExecutionError::const_default();
5287            &DEFAULT
5288        }
5289        ///If `description` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5290        pub fn description_opt_mut(&mut self) -> Option<&mut String> {
5291            self.description.as_mut().map(|field| field as _)
5292        }
5293        ///Returns a mutable reference to `description`.
5294        ///If the field is unset, it is first initialized with the default value.
5295        pub fn description_mut(&mut self) -> &mut String {
5296            self.description.get_or_insert_default()
5297        }
5298        ///If `description` is set, returns [`Some`] with the value; otherwise returns [`None`].
5299        pub fn description_opt(&self) -> Option<&str> {
5300            self.description.as_ref().map(|field| field as _)
5301        }
5302        ///Sets `description` with the provided value.
5303        pub fn set_description<T: Into<String>>(&mut self, field: T) {
5304            self.description = Some(field.into().into());
5305        }
5306        ///Sets `description` with the provided value.
5307        pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
5308            self.set_description(field.into());
5309            self
5310        }
5311        ///If `command` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5312        pub fn command_opt_mut(&mut self) -> Option<&mut u64> {
5313            self.command.as_mut().map(|field| field as _)
5314        }
5315        ///Returns a mutable reference to `command`.
5316        ///If the field is unset, it is first initialized with the default value.
5317        pub fn command_mut(&mut self) -> &mut u64 {
5318            self.command.get_or_insert_default()
5319        }
5320        ///If `command` is set, returns [`Some`] with the value; otherwise returns [`None`].
5321        pub fn command_opt(&self) -> Option<u64> {
5322            self.command.as_ref().map(|field| *field)
5323        }
5324        ///Sets `command` with the provided value.
5325        pub fn set_command<T: Into<u64>>(&mut self, field: T) {
5326            self.command = Some(field.into().into());
5327        }
5328        ///Sets `command` with the provided value.
5329        pub fn with_command<T: Into<u64>>(mut self, field: T) -> Self {
5330            self.set_command(field.into());
5331            self
5332        }
5333        ///Sets `kind` with the provided value.
5334        pub fn with_kind<T: Into<super::execution_error::ExecutionErrorKind>>(
5335            mut self,
5336            field: T,
5337        ) -> Self {
5338            self.set_kind(field.into());
5339            self
5340        }
5341        ///Returns the value of `abort`, or the default value if `abort` is unset.
5342        pub fn abort(&self) -> &super::MoveAbort {
5343            if let Some(super::execution_error::ErrorDetails::Abort(field)) = &self
5344                .error_details
5345            {
5346                field as _
5347            } else {
5348                super::MoveAbort::default_instance() as _
5349            }
5350        }
5351        ///If `abort` is set, returns [`Some`] with the value; otherwise returns [`None`].
5352        pub fn abort_opt(&self) -> Option<&super::MoveAbort> {
5353            if let Some(super::execution_error::ErrorDetails::Abort(field)) = &self
5354                .error_details
5355            {
5356                Some(field as _)
5357            } else {
5358                None
5359            }
5360        }
5361        ///If `abort` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5362        pub fn abort_opt_mut(&mut self) -> Option<&mut super::MoveAbort> {
5363            if let Some(super::execution_error::ErrorDetails::Abort(field)) = &mut self
5364                .error_details
5365            {
5366                Some(field as _)
5367            } else {
5368                None
5369            }
5370        }
5371        ///Returns a mutable reference to `abort`.
5372        ///If the field is unset, it is first initialized with the default value.
5373        ///If any other oneof field in the same oneof is set, it will be cleared.
5374        pub fn abort_mut(&mut self) -> &mut super::MoveAbort {
5375            if self.abort_opt_mut().is_none() {
5376                self.error_details = Some(
5377                    super::execution_error::ErrorDetails::Abort(
5378                        super::MoveAbort::default(),
5379                    ),
5380                );
5381            }
5382            self.abort_opt_mut().unwrap()
5383        }
5384        ///Sets `abort` with the provided value.
5385        ///If any other oneof field in the same oneof is set, it will be cleared.
5386        pub fn set_abort<T: Into<super::MoveAbort>>(&mut self, field: T) {
5387            self.error_details = Some(
5388                super::execution_error::ErrorDetails::Abort(field.into().into()),
5389            );
5390        }
5391        ///Sets `abort` with the provided value.
5392        ///If any other oneof field in the same oneof is set, it will be cleared.
5393        pub fn with_abort<T: Into<super::MoveAbort>>(mut self, field: T) -> Self {
5394            self.set_abort(field.into());
5395            self
5396        }
5397        ///Returns the value of `size_error`, or the default value if `size_error` is unset.
5398        pub fn size_error(&self) -> &super::SizeError {
5399            if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &self
5400                .error_details
5401            {
5402                field as _
5403            } else {
5404                super::SizeError::default_instance() as _
5405            }
5406        }
5407        ///If `size_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
5408        pub fn size_error_opt(&self) -> Option<&super::SizeError> {
5409            if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &self
5410                .error_details
5411            {
5412                Some(field as _)
5413            } else {
5414                None
5415            }
5416        }
5417        ///If `size_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5418        pub fn size_error_opt_mut(&mut self) -> Option<&mut super::SizeError> {
5419            if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &mut self
5420                .error_details
5421            {
5422                Some(field as _)
5423            } else {
5424                None
5425            }
5426        }
5427        ///Returns a mutable reference to `size_error`.
5428        ///If the field is unset, it is first initialized with the default value.
5429        ///If any other oneof field in the same oneof is set, it will be cleared.
5430        pub fn size_error_mut(&mut self) -> &mut super::SizeError {
5431            if self.size_error_opt_mut().is_none() {
5432                self.error_details = Some(
5433                    super::execution_error::ErrorDetails::SizeError(
5434                        super::SizeError::default(),
5435                    ),
5436                );
5437            }
5438            self.size_error_opt_mut().unwrap()
5439        }
5440        ///Sets `size_error` with the provided value.
5441        ///If any other oneof field in the same oneof is set, it will be cleared.
5442        pub fn set_size_error<T: Into<super::SizeError>>(&mut self, field: T) {
5443            self.error_details = Some(
5444                super::execution_error::ErrorDetails::SizeError(field.into().into()),
5445            );
5446        }
5447        ///Sets `size_error` with the provided value.
5448        ///If any other oneof field in the same oneof is set, it will be cleared.
5449        pub fn with_size_error<T: Into<super::SizeError>>(mut self, field: T) -> Self {
5450            self.set_size_error(field.into());
5451            self
5452        }
5453        ///Returns the value of `command_argument_error`, or the default value if `command_argument_error` is unset.
5454        pub fn command_argument_error(&self) -> &super::CommandArgumentError {
5455            if let Some(
5456                super::execution_error::ErrorDetails::CommandArgumentError(field),
5457            ) = &self.error_details
5458            {
5459                field as _
5460            } else {
5461                super::CommandArgumentError::default_instance() as _
5462            }
5463        }
5464        ///If `command_argument_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
5465        pub fn command_argument_error_opt(
5466            &self,
5467        ) -> Option<&super::CommandArgumentError> {
5468            if let Some(
5469                super::execution_error::ErrorDetails::CommandArgumentError(field),
5470            ) = &self.error_details
5471            {
5472                Some(field as _)
5473            } else {
5474                None
5475            }
5476        }
5477        ///If `command_argument_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5478        pub fn command_argument_error_opt_mut(
5479            &mut self,
5480        ) -> Option<&mut super::CommandArgumentError> {
5481            if let Some(
5482                super::execution_error::ErrorDetails::CommandArgumentError(field),
5483            ) = &mut self.error_details
5484            {
5485                Some(field as _)
5486            } else {
5487                None
5488            }
5489        }
5490        ///Returns a mutable reference to `command_argument_error`.
5491        ///If the field is unset, it is first initialized with the default value.
5492        ///If any other oneof field in the same oneof is set, it will be cleared.
5493        pub fn command_argument_error_mut(
5494            &mut self,
5495        ) -> &mut super::CommandArgumentError {
5496            if self.command_argument_error_opt_mut().is_none() {
5497                self.error_details = Some(
5498                    super::execution_error::ErrorDetails::CommandArgumentError(
5499                        super::CommandArgumentError::default(),
5500                    ),
5501                );
5502            }
5503            self.command_argument_error_opt_mut().unwrap()
5504        }
5505        ///Sets `command_argument_error` with the provided value.
5506        ///If any other oneof field in the same oneof is set, it will be cleared.
5507        pub fn set_command_argument_error<T: Into<super::CommandArgumentError>>(
5508            &mut self,
5509            field: T,
5510        ) {
5511            self.error_details = Some(
5512                super::execution_error::ErrorDetails::CommandArgumentError(
5513                    field.into().into(),
5514                ),
5515            );
5516        }
5517        ///Sets `command_argument_error` with the provided value.
5518        ///If any other oneof field in the same oneof is set, it will be cleared.
5519        pub fn with_command_argument_error<T: Into<super::CommandArgumentError>>(
5520            mut self,
5521            field: T,
5522        ) -> Self {
5523            self.set_command_argument_error(field.into());
5524            self
5525        }
5526        ///Returns the value of `type_argument_error`, or the default value if `type_argument_error` is unset.
5527        pub fn type_argument_error(&self) -> &super::TypeArgumentError {
5528            if let Some(
5529                super::execution_error::ErrorDetails::TypeArgumentError(field),
5530            ) = &self.error_details
5531            {
5532                field as _
5533            } else {
5534                super::TypeArgumentError::default_instance() as _
5535            }
5536        }
5537        ///If `type_argument_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
5538        pub fn type_argument_error_opt(&self) -> Option<&super::TypeArgumentError> {
5539            if let Some(
5540                super::execution_error::ErrorDetails::TypeArgumentError(field),
5541            ) = &self.error_details
5542            {
5543                Some(field as _)
5544            } else {
5545                None
5546            }
5547        }
5548        ///If `type_argument_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5549        pub fn type_argument_error_opt_mut(
5550            &mut self,
5551        ) -> Option<&mut super::TypeArgumentError> {
5552            if let Some(
5553                super::execution_error::ErrorDetails::TypeArgumentError(field),
5554            ) = &mut self.error_details
5555            {
5556                Some(field as _)
5557            } else {
5558                None
5559            }
5560        }
5561        ///Returns a mutable reference to `type_argument_error`.
5562        ///If the field is unset, it is first initialized with the default value.
5563        ///If any other oneof field in the same oneof is set, it will be cleared.
5564        pub fn type_argument_error_mut(&mut self) -> &mut super::TypeArgumentError {
5565            if self.type_argument_error_opt_mut().is_none() {
5566                self.error_details = Some(
5567                    super::execution_error::ErrorDetails::TypeArgumentError(
5568                        super::TypeArgumentError::default(),
5569                    ),
5570                );
5571            }
5572            self.type_argument_error_opt_mut().unwrap()
5573        }
5574        ///Sets `type_argument_error` with the provided value.
5575        ///If any other oneof field in the same oneof is set, it will be cleared.
5576        pub fn set_type_argument_error<T: Into<super::TypeArgumentError>>(
5577            &mut self,
5578            field: T,
5579        ) {
5580            self.error_details = Some(
5581                super::execution_error::ErrorDetails::TypeArgumentError(
5582                    field.into().into(),
5583                ),
5584            );
5585        }
5586        ///Sets `type_argument_error` with the provided value.
5587        ///If any other oneof field in the same oneof is set, it will be cleared.
5588        pub fn with_type_argument_error<T: Into<super::TypeArgumentError>>(
5589            mut self,
5590            field: T,
5591        ) -> Self {
5592            self.set_type_argument_error(field.into());
5593            self
5594        }
5595        ///Returns the value of `package_upgrade_error`, or the default value if `package_upgrade_error` is unset.
5596        pub fn package_upgrade_error(&self) -> &super::PackageUpgradeError {
5597            if let Some(
5598                super::execution_error::ErrorDetails::PackageUpgradeError(field),
5599            ) = &self.error_details
5600            {
5601                field as _
5602            } else {
5603                super::PackageUpgradeError::default_instance() as _
5604            }
5605        }
5606        ///If `package_upgrade_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
5607        pub fn package_upgrade_error_opt(&self) -> Option<&super::PackageUpgradeError> {
5608            if let Some(
5609                super::execution_error::ErrorDetails::PackageUpgradeError(field),
5610            ) = &self.error_details
5611            {
5612                Some(field as _)
5613            } else {
5614                None
5615            }
5616        }
5617        ///If `package_upgrade_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5618        pub fn package_upgrade_error_opt_mut(
5619            &mut self,
5620        ) -> Option<&mut super::PackageUpgradeError> {
5621            if let Some(
5622                super::execution_error::ErrorDetails::PackageUpgradeError(field),
5623            ) = &mut self.error_details
5624            {
5625                Some(field as _)
5626            } else {
5627                None
5628            }
5629        }
5630        ///Returns a mutable reference to `package_upgrade_error`.
5631        ///If the field is unset, it is first initialized with the default value.
5632        ///If any other oneof field in the same oneof is set, it will be cleared.
5633        pub fn package_upgrade_error_mut(&mut self) -> &mut super::PackageUpgradeError {
5634            if self.package_upgrade_error_opt_mut().is_none() {
5635                self.error_details = Some(
5636                    super::execution_error::ErrorDetails::PackageUpgradeError(
5637                        super::PackageUpgradeError::default(),
5638                    ),
5639                );
5640            }
5641            self.package_upgrade_error_opt_mut().unwrap()
5642        }
5643        ///Sets `package_upgrade_error` with the provided value.
5644        ///If any other oneof field in the same oneof is set, it will be cleared.
5645        pub fn set_package_upgrade_error<T: Into<super::PackageUpgradeError>>(
5646            &mut self,
5647            field: T,
5648        ) {
5649            self.error_details = Some(
5650                super::execution_error::ErrorDetails::PackageUpgradeError(
5651                    field.into().into(),
5652                ),
5653            );
5654        }
5655        ///Sets `package_upgrade_error` with the provided value.
5656        ///If any other oneof field in the same oneof is set, it will be cleared.
5657        pub fn with_package_upgrade_error<T: Into<super::PackageUpgradeError>>(
5658            mut self,
5659            field: T,
5660        ) -> Self {
5661            self.set_package_upgrade_error(field.into());
5662            self
5663        }
5664        ///Returns the value of `index_error`, or the default value if `index_error` is unset.
5665        pub fn index_error(&self) -> &super::IndexError {
5666            if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &self
5667                .error_details
5668            {
5669                field as _
5670            } else {
5671                super::IndexError::default_instance() as _
5672            }
5673        }
5674        ///If `index_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
5675        pub fn index_error_opt(&self) -> Option<&super::IndexError> {
5676            if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &self
5677                .error_details
5678            {
5679                Some(field as _)
5680            } else {
5681                None
5682            }
5683        }
5684        ///If `index_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5685        pub fn index_error_opt_mut(&mut self) -> Option<&mut super::IndexError> {
5686            if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &mut self
5687                .error_details
5688            {
5689                Some(field as _)
5690            } else {
5691                None
5692            }
5693        }
5694        ///Returns a mutable reference to `index_error`.
5695        ///If the field is unset, it is first initialized with the default value.
5696        ///If any other oneof field in the same oneof is set, it will be cleared.
5697        pub fn index_error_mut(&mut self) -> &mut super::IndexError {
5698            if self.index_error_opt_mut().is_none() {
5699                self.error_details = Some(
5700                    super::execution_error::ErrorDetails::IndexError(
5701                        super::IndexError::default(),
5702                    ),
5703                );
5704            }
5705            self.index_error_opt_mut().unwrap()
5706        }
5707        ///Sets `index_error` with the provided value.
5708        ///If any other oneof field in the same oneof is set, it will be cleared.
5709        pub fn set_index_error<T: Into<super::IndexError>>(&mut self, field: T) {
5710            self.error_details = Some(
5711                super::execution_error::ErrorDetails::IndexError(field.into().into()),
5712            );
5713        }
5714        ///Sets `index_error` with the provided value.
5715        ///If any other oneof field in the same oneof is set, it will be cleared.
5716        pub fn with_index_error<T: Into<super::IndexError>>(mut self, field: T) -> Self {
5717            self.set_index_error(field.into());
5718            self
5719        }
5720        ///Returns the value of `object_id`, or the default value if `object_id` is unset.
5721        pub fn object_id(&self) -> &str {
5722            if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &self
5723                .error_details
5724            {
5725                field as _
5726            } else {
5727                ""
5728            }
5729        }
5730        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
5731        pub fn object_id_opt(&self) -> Option<&str> {
5732            if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &self
5733                .error_details
5734            {
5735                Some(field as _)
5736            } else {
5737                None
5738            }
5739        }
5740        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5741        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
5742            if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &mut self
5743                .error_details
5744            {
5745                Some(field as _)
5746            } else {
5747                None
5748            }
5749        }
5750        ///Returns a mutable reference to `object_id`.
5751        ///If the field is unset, it is first initialized with the default value.
5752        ///If any other oneof field in the same oneof is set, it will be cleared.
5753        pub fn object_id_mut(&mut self) -> &mut String {
5754            if self.object_id_opt_mut().is_none() {
5755                self.error_details = Some(
5756                    super::execution_error::ErrorDetails::ObjectId(String::default()),
5757                );
5758            }
5759            self.object_id_opt_mut().unwrap()
5760        }
5761        ///Sets `object_id` with the provided value.
5762        ///If any other oneof field in the same oneof is set, it will be cleared.
5763        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
5764            self.error_details = Some(
5765                super::execution_error::ErrorDetails::ObjectId(field.into().into()),
5766            );
5767        }
5768        ///Sets `object_id` with the provided value.
5769        ///If any other oneof field in the same oneof is set, it will be cleared.
5770        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
5771            self.set_object_id(field.into());
5772            self
5773        }
5774        ///Returns the value of `coin_deny_list_error`, or the default value if `coin_deny_list_error` is unset.
5775        pub fn coin_deny_list_error(&self) -> &super::CoinDenyListError {
5776            if let Some(
5777                super::execution_error::ErrorDetails::CoinDenyListError(field),
5778            ) = &self.error_details
5779            {
5780                field as _
5781            } else {
5782                super::CoinDenyListError::default_instance() as _
5783            }
5784        }
5785        ///If `coin_deny_list_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
5786        pub fn coin_deny_list_error_opt(&self) -> Option<&super::CoinDenyListError> {
5787            if let Some(
5788                super::execution_error::ErrorDetails::CoinDenyListError(field),
5789            ) = &self.error_details
5790            {
5791                Some(field as _)
5792            } else {
5793                None
5794            }
5795        }
5796        ///If `coin_deny_list_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5797        pub fn coin_deny_list_error_opt_mut(
5798            &mut self,
5799        ) -> Option<&mut super::CoinDenyListError> {
5800            if let Some(
5801                super::execution_error::ErrorDetails::CoinDenyListError(field),
5802            ) = &mut self.error_details
5803            {
5804                Some(field as _)
5805            } else {
5806                None
5807            }
5808        }
5809        ///Returns a mutable reference to `coin_deny_list_error`.
5810        ///If the field is unset, it is first initialized with the default value.
5811        ///If any other oneof field in the same oneof is set, it will be cleared.
5812        pub fn coin_deny_list_error_mut(&mut self) -> &mut super::CoinDenyListError {
5813            if self.coin_deny_list_error_opt_mut().is_none() {
5814                self.error_details = Some(
5815                    super::execution_error::ErrorDetails::CoinDenyListError(
5816                        super::CoinDenyListError::default(),
5817                    ),
5818                );
5819            }
5820            self.coin_deny_list_error_opt_mut().unwrap()
5821        }
5822        ///Sets `coin_deny_list_error` with the provided value.
5823        ///If any other oneof field in the same oneof is set, it will be cleared.
5824        pub fn set_coin_deny_list_error<T: Into<super::CoinDenyListError>>(
5825            &mut self,
5826            field: T,
5827        ) {
5828            self.error_details = Some(
5829                super::execution_error::ErrorDetails::CoinDenyListError(
5830                    field.into().into(),
5831                ),
5832            );
5833        }
5834        ///Sets `coin_deny_list_error` with the provided value.
5835        ///If any other oneof field in the same oneof is set, it will be cleared.
5836        pub fn with_coin_deny_list_error<T: Into<super::CoinDenyListError>>(
5837            mut self,
5838            field: T,
5839        ) -> Self {
5840            self.set_coin_deny_list_error(field.into());
5841            self
5842        }
5843        ///Returns the value of `congested_objects`, or the default value if `congested_objects` is unset.
5844        pub fn congested_objects(&self) -> &super::CongestedObjects {
5845            if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &self
5846                .error_details
5847            {
5848                field as _
5849            } else {
5850                super::CongestedObjects::default_instance() as _
5851            }
5852        }
5853        ///If `congested_objects` is set, returns [`Some`] with the value; otherwise returns [`None`].
5854        pub fn congested_objects_opt(&self) -> Option<&super::CongestedObjects> {
5855            if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &self
5856                .error_details
5857            {
5858                Some(field as _)
5859            } else {
5860                None
5861            }
5862        }
5863        ///If `congested_objects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5864        pub fn congested_objects_opt_mut(
5865            &mut self,
5866        ) -> Option<&mut super::CongestedObjects> {
5867            if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &mut self
5868                .error_details
5869            {
5870                Some(field as _)
5871            } else {
5872                None
5873            }
5874        }
5875        ///Returns a mutable reference to `congested_objects`.
5876        ///If the field is unset, it is first initialized with the default value.
5877        ///If any other oneof field in the same oneof is set, it will be cleared.
5878        pub fn congested_objects_mut(&mut self) -> &mut super::CongestedObjects {
5879            if self.congested_objects_opt_mut().is_none() {
5880                self.error_details = Some(
5881                    super::execution_error::ErrorDetails::CongestedObjects(
5882                        super::CongestedObjects::default(),
5883                    ),
5884                );
5885            }
5886            self.congested_objects_opt_mut().unwrap()
5887        }
5888        ///Sets `congested_objects` with the provided value.
5889        ///If any other oneof field in the same oneof is set, it will be cleared.
5890        pub fn set_congested_objects<T: Into<super::CongestedObjects>>(
5891            &mut self,
5892            field: T,
5893        ) {
5894            self.error_details = Some(
5895                super::execution_error::ErrorDetails::CongestedObjects(
5896                    field.into().into(),
5897                ),
5898            );
5899        }
5900        ///Sets `congested_objects` with the provided value.
5901        ///If any other oneof field in the same oneof is set, it will be cleared.
5902        pub fn with_congested_objects<T: Into<super::CongestedObjects>>(
5903            mut self,
5904            field: T,
5905        ) -> Self {
5906            self.set_congested_objects(field.into());
5907            self
5908        }
5909    }
5910    impl super::ExecutionStatus {
5911        pub const fn const_default() -> Self {
5912            Self { success: None, error: None }
5913        }
5914        #[doc(hidden)]
5915        pub fn default_instance() -> &'static Self {
5916            static DEFAULT: super::ExecutionStatus = super::ExecutionStatus::const_default();
5917            &DEFAULT
5918        }
5919        ///If `success` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5920        pub fn success_opt_mut(&mut self) -> Option<&mut bool> {
5921            self.success.as_mut().map(|field| field as _)
5922        }
5923        ///Returns a mutable reference to `success`.
5924        ///If the field is unset, it is first initialized with the default value.
5925        pub fn success_mut(&mut self) -> &mut bool {
5926            self.success.get_or_insert_default()
5927        }
5928        ///If `success` is set, returns [`Some`] with the value; otherwise returns [`None`].
5929        pub fn success_opt(&self) -> Option<bool> {
5930            self.success.as_ref().map(|field| *field)
5931        }
5932        ///Sets `success` with the provided value.
5933        pub fn set_success<T: Into<bool>>(&mut self, field: T) {
5934            self.success = Some(field.into().into());
5935        }
5936        ///Sets `success` with the provided value.
5937        pub fn with_success<T: Into<bool>>(mut self, field: T) -> Self {
5938            self.set_success(field.into());
5939            self
5940        }
5941        ///Returns the value of `error`, or the default value if `error` is unset.
5942        pub fn error(&self) -> &super::ExecutionError {
5943            self.error
5944                .as_ref()
5945                .map(|field| field as _)
5946                .unwrap_or_else(|| super::ExecutionError::default_instance() as _)
5947        }
5948        ///If `error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5949        pub fn error_opt_mut(&mut self) -> Option<&mut super::ExecutionError> {
5950            self.error.as_mut().map(|field| field as _)
5951        }
5952        ///Returns a mutable reference to `error`.
5953        ///If the field is unset, it is first initialized with the default value.
5954        pub fn error_mut(&mut self) -> &mut super::ExecutionError {
5955            self.error.get_or_insert_default()
5956        }
5957        ///If `error` is set, returns [`Some`] with the value; otherwise returns [`None`].
5958        pub fn error_opt(&self) -> Option<&super::ExecutionError> {
5959            self.error.as_ref().map(|field| field as _)
5960        }
5961        ///Sets `error` with the provided value.
5962        pub fn set_error<T: Into<super::ExecutionError>>(&mut self, field: T) {
5963            self.error = Some(field.into().into());
5964        }
5965        ///Sets `error` with the provided value.
5966        pub fn with_error<T: Into<super::ExecutionError>>(mut self, field: T) -> Self {
5967            self.set_error(field.into());
5968            self
5969        }
5970    }
5971    impl super::ExecutionTimeObservation {
5972        pub const fn const_default() -> Self {
5973            Self {
5974                kind: None,
5975                move_entry_point: None,
5976                validator_observations: Vec::new(),
5977            }
5978        }
5979        #[doc(hidden)]
5980        pub fn default_instance() -> &'static Self {
5981            static DEFAULT: super::ExecutionTimeObservation = super::ExecutionTimeObservation::const_default();
5982            &DEFAULT
5983        }
5984        ///Sets `kind` with the provided value.
5985        pub fn with_kind<
5986            T: Into<super::execution_time_observation::ExecutionTimeObservationKind>,
5987        >(mut self, field: T) -> Self {
5988            self.set_kind(field.into());
5989            self
5990        }
5991        ///Returns the value of `move_entry_point`, or the default value if `move_entry_point` is unset.
5992        pub fn move_entry_point(&self) -> &super::MoveCall {
5993            self.move_entry_point
5994                .as_ref()
5995                .map(|field| field as _)
5996                .unwrap_or_else(|| super::MoveCall::default_instance() as _)
5997        }
5998        ///If `move_entry_point` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5999        pub fn move_entry_point_opt_mut(&mut self) -> Option<&mut super::MoveCall> {
6000            self.move_entry_point.as_mut().map(|field| field as _)
6001        }
6002        ///Returns a mutable reference to `move_entry_point`.
6003        ///If the field is unset, it is first initialized with the default value.
6004        pub fn move_entry_point_mut(&mut self) -> &mut super::MoveCall {
6005            self.move_entry_point.get_or_insert_default()
6006        }
6007        ///If `move_entry_point` is set, returns [`Some`] with the value; otherwise returns [`None`].
6008        pub fn move_entry_point_opt(&self) -> Option<&super::MoveCall> {
6009            self.move_entry_point.as_ref().map(|field| field as _)
6010        }
6011        ///Sets `move_entry_point` with the provided value.
6012        pub fn set_move_entry_point<T: Into<super::MoveCall>>(&mut self, field: T) {
6013            self.move_entry_point = Some(field.into().into());
6014        }
6015        ///Sets `move_entry_point` with the provided value.
6016        pub fn with_move_entry_point<T: Into<super::MoveCall>>(
6017            mut self,
6018            field: T,
6019        ) -> Self {
6020            self.set_move_entry_point(field.into());
6021            self
6022        }
6023        ///Returns the value of `validator_observations`, or the default value if `validator_observations` is unset.
6024        pub fn validator_observations(
6025            &self,
6026        ) -> &[super::ValidatorExecutionTimeObservation] {
6027            &self.validator_observations
6028        }
6029        ///Returns a mutable reference to `validator_observations`.
6030        ///If the field is unset, it is first initialized with the default value.
6031        pub fn validator_observations_mut(
6032            &mut self,
6033        ) -> &mut Vec<super::ValidatorExecutionTimeObservation> {
6034            &mut self.validator_observations
6035        }
6036        ///Sets `validator_observations` with the provided value.
6037        pub fn set_validator_observations(
6038            &mut self,
6039            field: Vec<super::ValidatorExecutionTimeObservation>,
6040        ) {
6041            self.validator_observations = field;
6042        }
6043        ///Sets `validator_observations` with the provided value.
6044        pub fn with_validator_observations(
6045            mut self,
6046            field: Vec<super::ValidatorExecutionTimeObservation>,
6047        ) -> Self {
6048            self.set_validator_observations(field);
6049            self
6050        }
6051    }
6052    impl super::ExecutionTimeObservations {
6053        pub const fn const_default() -> Self {
6054            Self {
6055                version: None,
6056                observations: Vec::new(),
6057            }
6058        }
6059        #[doc(hidden)]
6060        pub fn default_instance() -> &'static Self {
6061            static DEFAULT: super::ExecutionTimeObservations = super::ExecutionTimeObservations::const_default();
6062            &DEFAULT
6063        }
6064        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6065        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
6066            self.version.as_mut().map(|field| field as _)
6067        }
6068        ///Returns a mutable reference to `version`.
6069        ///If the field is unset, it is first initialized with the default value.
6070        pub fn version_mut(&mut self) -> &mut i32 {
6071            self.version.get_or_insert_default()
6072        }
6073        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
6074        pub fn version_opt(&self) -> Option<i32> {
6075            self.version.as_ref().map(|field| *field)
6076        }
6077        ///Sets `version` with the provided value.
6078        pub fn set_version<T: Into<i32>>(&mut self, field: T) {
6079            self.version = Some(field.into().into());
6080        }
6081        ///Sets `version` with the provided value.
6082        pub fn with_version<T: Into<i32>>(mut self, field: T) -> Self {
6083            self.set_version(field.into());
6084            self
6085        }
6086        ///Returns the value of `observations`, or the default value if `observations` is unset.
6087        pub fn observations(&self) -> &[super::ExecutionTimeObservation] {
6088            &self.observations
6089        }
6090        ///Returns a mutable reference to `observations`.
6091        ///If the field is unset, it is first initialized with the default value.
6092        pub fn observations_mut(&mut self) -> &mut Vec<super::ExecutionTimeObservation> {
6093            &mut self.observations
6094        }
6095        ///Sets `observations` with the provided value.
6096        pub fn set_observations(&mut self, field: Vec<super::ExecutionTimeObservation>) {
6097            self.observations = field;
6098        }
6099        ///Sets `observations` with the provided value.
6100        pub fn with_observations(
6101            mut self,
6102            field: Vec<super::ExecutionTimeObservation>,
6103        ) -> Self {
6104            self.set_observations(field);
6105            self
6106        }
6107    }
6108    impl super::FieldDescriptor {
6109        pub const fn const_default() -> Self {
6110            Self {
6111                name: None,
6112                position: None,
6113                r#type: None,
6114            }
6115        }
6116        #[doc(hidden)]
6117        pub fn default_instance() -> &'static Self {
6118            static DEFAULT: super::FieldDescriptor = super::FieldDescriptor::const_default();
6119            &DEFAULT
6120        }
6121        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6122        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
6123            self.name.as_mut().map(|field| field as _)
6124        }
6125        ///Returns a mutable reference to `name`.
6126        ///If the field is unset, it is first initialized with the default value.
6127        pub fn name_mut(&mut self) -> &mut String {
6128            self.name.get_or_insert_default()
6129        }
6130        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
6131        pub fn name_opt(&self) -> Option<&str> {
6132            self.name.as_ref().map(|field| field as _)
6133        }
6134        ///Sets `name` with the provided value.
6135        pub fn set_name<T: Into<String>>(&mut self, field: T) {
6136            self.name = Some(field.into().into());
6137        }
6138        ///Sets `name` with the provided value.
6139        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
6140            self.set_name(field.into());
6141            self
6142        }
6143        ///If `position` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6144        pub fn position_opt_mut(&mut self) -> Option<&mut u32> {
6145            self.position.as_mut().map(|field| field as _)
6146        }
6147        ///Returns a mutable reference to `position`.
6148        ///If the field is unset, it is first initialized with the default value.
6149        pub fn position_mut(&mut self) -> &mut u32 {
6150            self.position.get_or_insert_default()
6151        }
6152        ///If `position` is set, returns [`Some`] with the value; otherwise returns [`None`].
6153        pub fn position_opt(&self) -> Option<u32> {
6154            self.position.as_ref().map(|field| *field)
6155        }
6156        ///Sets `position` with the provided value.
6157        pub fn set_position<T: Into<u32>>(&mut self, field: T) {
6158            self.position = Some(field.into().into());
6159        }
6160        ///Sets `position` with the provided value.
6161        pub fn with_position<T: Into<u32>>(mut self, field: T) -> Self {
6162            self.set_position(field.into());
6163            self
6164        }
6165        ///Returns the value of `r#type`, or the default value if `r#type` is unset.
6166        pub fn r#type(&self) -> &super::OpenSignatureBody {
6167            self.r#type
6168                .as_ref()
6169                .map(|field| field as _)
6170                .unwrap_or_else(|| super::OpenSignatureBody::default_instance() as _)
6171        }
6172        ///If `r#type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6173        pub fn type_opt_mut(&mut self) -> Option<&mut super::OpenSignatureBody> {
6174            self.r#type.as_mut().map(|field| field as _)
6175        }
6176        ///Returns a mutable reference to `r#type`.
6177        ///If the field is unset, it is first initialized with the default value.
6178        pub fn type_mut(&mut self) -> &mut super::OpenSignatureBody {
6179            self.r#type.get_or_insert_default()
6180        }
6181        ///If `r#type` is set, returns [`Some`] with the value; otherwise returns [`None`].
6182        pub fn type_opt(&self) -> Option<&super::OpenSignatureBody> {
6183            self.r#type.as_ref().map(|field| field as _)
6184        }
6185        ///Sets `r#type` with the provided value.
6186        pub fn set_type<T: Into<super::OpenSignatureBody>>(&mut self, field: T) {
6187            self.r#type = Some(field.into().into());
6188        }
6189        ///Sets `r#type` with the provided value.
6190        pub fn with_type<T: Into<super::OpenSignatureBody>>(mut self, field: T) -> Self {
6191            self.set_type(field.into());
6192            self
6193        }
6194    }
6195    impl super::FunctionDescriptor {
6196        pub const fn const_default() -> Self {
6197            Self {
6198                name: None,
6199                visibility: None,
6200                is_entry: None,
6201                type_parameters: Vec::new(),
6202                parameters: Vec::new(),
6203                returns: Vec::new(),
6204            }
6205        }
6206        #[doc(hidden)]
6207        pub fn default_instance() -> &'static Self {
6208            static DEFAULT: super::FunctionDescriptor = super::FunctionDescriptor::const_default();
6209            &DEFAULT
6210        }
6211        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6212        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
6213            self.name.as_mut().map(|field| field as _)
6214        }
6215        ///Returns a mutable reference to `name`.
6216        ///If the field is unset, it is first initialized with the default value.
6217        pub fn name_mut(&mut self) -> &mut String {
6218            self.name.get_or_insert_default()
6219        }
6220        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
6221        pub fn name_opt(&self) -> Option<&str> {
6222            self.name.as_ref().map(|field| field as _)
6223        }
6224        ///Sets `name` with the provided value.
6225        pub fn set_name<T: Into<String>>(&mut self, field: T) {
6226            self.name = Some(field.into().into());
6227        }
6228        ///Sets `name` with the provided value.
6229        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
6230            self.set_name(field.into());
6231            self
6232        }
6233        ///Sets `visibility` with the provided value.
6234        pub fn with_visibility<T: Into<super::function_descriptor::Visibility>>(
6235            mut self,
6236            field: T,
6237        ) -> Self {
6238            self.set_visibility(field.into());
6239            self
6240        }
6241        ///If `is_entry` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6242        pub fn is_entry_opt_mut(&mut self) -> Option<&mut bool> {
6243            self.is_entry.as_mut().map(|field| field as _)
6244        }
6245        ///Returns a mutable reference to `is_entry`.
6246        ///If the field is unset, it is first initialized with the default value.
6247        pub fn is_entry_mut(&mut self) -> &mut bool {
6248            self.is_entry.get_or_insert_default()
6249        }
6250        ///If `is_entry` is set, returns [`Some`] with the value; otherwise returns [`None`].
6251        pub fn is_entry_opt(&self) -> Option<bool> {
6252            self.is_entry.as_ref().map(|field| *field)
6253        }
6254        ///Sets `is_entry` with the provided value.
6255        pub fn set_is_entry<T: Into<bool>>(&mut self, field: T) {
6256            self.is_entry = Some(field.into().into());
6257        }
6258        ///Sets `is_entry` with the provided value.
6259        pub fn with_is_entry<T: Into<bool>>(mut self, field: T) -> Self {
6260            self.set_is_entry(field.into());
6261            self
6262        }
6263        ///Returns the value of `type_parameters`, or the default value if `type_parameters` is unset.
6264        pub fn type_parameters(&self) -> &[super::TypeParameter] {
6265            &self.type_parameters
6266        }
6267        ///Returns a mutable reference to `type_parameters`.
6268        ///If the field is unset, it is first initialized with the default value.
6269        pub fn type_parameters_mut(&mut self) -> &mut Vec<super::TypeParameter> {
6270            &mut self.type_parameters
6271        }
6272        ///Sets `type_parameters` with the provided value.
6273        pub fn set_type_parameters(&mut self, field: Vec<super::TypeParameter>) {
6274            self.type_parameters = field;
6275        }
6276        ///Sets `type_parameters` with the provided value.
6277        pub fn with_type_parameters(mut self, field: Vec<super::TypeParameter>) -> Self {
6278            self.set_type_parameters(field);
6279            self
6280        }
6281        ///Returns the value of `parameters`, or the default value if `parameters` is unset.
6282        pub fn parameters(&self) -> &[super::OpenSignature] {
6283            &self.parameters
6284        }
6285        ///Returns a mutable reference to `parameters`.
6286        ///If the field is unset, it is first initialized with the default value.
6287        pub fn parameters_mut(&mut self) -> &mut Vec<super::OpenSignature> {
6288            &mut self.parameters
6289        }
6290        ///Sets `parameters` with the provided value.
6291        pub fn set_parameters(&mut self, field: Vec<super::OpenSignature>) {
6292            self.parameters = field;
6293        }
6294        ///Sets `parameters` with the provided value.
6295        pub fn with_parameters(mut self, field: Vec<super::OpenSignature>) -> Self {
6296            self.set_parameters(field);
6297            self
6298        }
6299        ///Returns the value of `returns`, or the default value if `returns` is unset.
6300        pub fn returns(&self) -> &[super::OpenSignature] {
6301            &self.returns
6302        }
6303        ///Returns a mutable reference to `returns`.
6304        ///If the field is unset, it is first initialized with the default value.
6305        pub fn returns_mut(&mut self) -> &mut Vec<super::OpenSignature> {
6306            &mut self.returns
6307        }
6308        ///Sets `returns` with the provided value.
6309        pub fn set_returns(&mut self, field: Vec<super::OpenSignature>) {
6310            self.returns = field;
6311        }
6312        ///Sets `returns` with the provided value.
6313        pub fn with_returns(mut self, field: Vec<super::OpenSignature>) -> Self {
6314            self.set_returns(field);
6315            self
6316        }
6317    }
6318    impl super::GasCostSummary {
6319        pub const fn const_default() -> Self {
6320            Self {
6321                computation_cost: None,
6322                storage_cost: None,
6323                storage_rebate: None,
6324                non_refundable_storage_fee: None,
6325            }
6326        }
6327        #[doc(hidden)]
6328        pub fn default_instance() -> &'static Self {
6329            static DEFAULT: super::GasCostSummary = super::GasCostSummary::const_default();
6330            &DEFAULT
6331        }
6332        ///If `computation_cost` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6333        pub fn computation_cost_opt_mut(&mut self) -> Option<&mut u64> {
6334            self.computation_cost.as_mut().map(|field| field as _)
6335        }
6336        ///Returns a mutable reference to `computation_cost`.
6337        ///If the field is unset, it is first initialized with the default value.
6338        pub fn computation_cost_mut(&mut self) -> &mut u64 {
6339            self.computation_cost.get_or_insert_default()
6340        }
6341        ///If `computation_cost` is set, returns [`Some`] with the value; otherwise returns [`None`].
6342        pub fn computation_cost_opt(&self) -> Option<u64> {
6343            self.computation_cost.as_ref().map(|field| *field)
6344        }
6345        ///Sets `computation_cost` with the provided value.
6346        pub fn set_computation_cost<T: Into<u64>>(&mut self, field: T) {
6347            self.computation_cost = Some(field.into().into());
6348        }
6349        ///Sets `computation_cost` with the provided value.
6350        pub fn with_computation_cost<T: Into<u64>>(mut self, field: T) -> Self {
6351            self.set_computation_cost(field.into());
6352            self
6353        }
6354        ///If `storage_cost` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6355        pub fn storage_cost_opt_mut(&mut self) -> Option<&mut u64> {
6356            self.storage_cost.as_mut().map(|field| field as _)
6357        }
6358        ///Returns a mutable reference to `storage_cost`.
6359        ///If the field is unset, it is first initialized with the default value.
6360        pub fn storage_cost_mut(&mut self) -> &mut u64 {
6361            self.storage_cost.get_or_insert_default()
6362        }
6363        ///If `storage_cost` is set, returns [`Some`] with the value; otherwise returns [`None`].
6364        pub fn storage_cost_opt(&self) -> Option<u64> {
6365            self.storage_cost.as_ref().map(|field| *field)
6366        }
6367        ///Sets `storage_cost` with the provided value.
6368        pub fn set_storage_cost<T: Into<u64>>(&mut self, field: T) {
6369            self.storage_cost = Some(field.into().into());
6370        }
6371        ///Sets `storage_cost` with the provided value.
6372        pub fn with_storage_cost<T: Into<u64>>(mut self, field: T) -> Self {
6373            self.set_storage_cost(field.into());
6374            self
6375        }
6376        ///If `storage_rebate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6377        pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
6378            self.storage_rebate.as_mut().map(|field| field as _)
6379        }
6380        ///Returns a mutable reference to `storage_rebate`.
6381        ///If the field is unset, it is first initialized with the default value.
6382        pub fn storage_rebate_mut(&mut self) -> &mut u64 {
6383            self.storage_rebate.get_or_insert_default()
6384        }
6385        ///If `storage_rebate` is set, returns [`Some`] with the value; otherwise returns [`None`].
6386        pub fn storage_rebate_opt(&self) -> Option<u64> {
6387            self.storage_rebate.as_ref().map(|field| *field)
6388        }
6389        ///Sets `storage_rebate` with the provided value.
6390        pub fn set_storage_rebate<T: Into<u64>>(&mut self, field: T) {
6391            self.storage_rebate = Some(field.into().into());
6392        }
6393        ///Sets `storage_rebate` with the provided value.
6394        pub fn with_storage_rebate<T: Into<u64>>(mut self, field: T) -> Self {
6395            self.set_storage_rebate(field.into());
6396            self
6397        }
6398        ///If `non_refundable_storage_fee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6399        pub fn non_refundable_storage_fee_opt_mut(&mut self) -> Option<&mut u64> {
6400            self.non_refundable_storage_fee.as_mut().map(|field| field as _)
6401        }
6402        ///Returns a mutable reference to `non_refundable_storage_fee`.
6403        ///If the field is unset, it is first initialized with the default value.
6404        pub fn non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
6405            self.non_refundable_storage_fee.get_or_insert_default()
6406        }
6407        ///If `non_refundable_storage_fee` is set, returns [`Some`] with the value; otherwise returns [`None`].
6408        pub fn non_refundable_storage_fee_opt(&self) -> Option<u64> {
6409            self.non_refundable_storage_fee.as_ref().map(|field| *field)
6410        }
6411        ///Sets `non_refundable_storage_fee` with the provided value.
6412        pub fn set_non_refundable_storage_fee<T: Into<u64>>(&mut self, field: T) {
6413            self.non_refundable_storage_fee = Some(field.into().into());
6414        }
6415        ///Sets `non_refundable_storage_fee` with the provided value.
6416        pub fn with_non_refundable_storage_fee<T: Into<u64>>(
6417            mut self,
6418            field: T,
6419        ) -> Self {
6420            self.set_non_refundable_storage_fee(field.into());
6421            self
6422        }
6423    }
6424    impl super::GasPayment {
6425        pub const fn const_default() -> Self {
6426            Self {
6427                objects: Vec::new(),
6428                owner: None,
6429                price: None,
6430                budget: None,
6431            }
6432        }
6433        #[doc(hidden)]
6434        pub fn default_instance() -> &'static Self {
6435            static DEFAULT: super::GasPayment = super::GasPayment::const_default();
6436            &DEFAULT
6437        }
6438        ///Returns the value of `objects`, or the default value if `objects` is unset.
6439        pub fn objects(&self) -> &[super::ObjectReference] {
6440            &self.objects
6441        }
6442        ///Returns a mutable reference to `objects`.
6443        ///If the field is unset, it is first initialized with the default value.
6444        pub fn objects_mut(&mut self) -> &mut Vec<super::ObjectReference> {
6445            &mut self.objects
6446        }
6447        ///Sets `objects` with the provided value.
6448        pub fn set_objects(&mut self, field: Vec<super::ObjectReference>) {
6449            self.objects = field;
6450        }
6451        ///Sets `objects` with the provided value.
6452        pub fn with_objects(mut self, field: Vec<super::ObjectReference>) -> Self {
6453            self.set_objects(field);
6454            self
6455        }
6456        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6457        pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
6458            self.owner.as_mut().map(|field| field as _)
6459        }
6460        ///Returns a mutable reference to `owner`.
6461        ///If the field is unset, it is first initialized with the default value.
6462        pub fn owner_mut(&mut self) -> &mut String {
6463            self.owner.get_or_insert_default()
6464        }
6465        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
6466        pub fn owner_opt(&self) -> Option<&str> {
6467            self.owner.as_ref().map(|field| field as _)
6468        }
6469        ///Sets `owner` with the provided value.
6470        pub fn set_owner<T: Into<String>>(&mut self, field: T) {
6471            self.owner = Some(field.into().into());
6472        }
6473        ///Sets `owner` with the provided value.
6474        pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
6475            self.set_owner(field.into());
6476            self
6477        }
6478        ///If `price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6479        pub fn price_opt_mut(&mut self) -> Option<&mut u64> {
6480            self.price.as_mut().map(|field| field as _)
6481        }
6482        ///Returns a mutable reference to `price`.
6483        ///If the field is unset, it is first initialized with the default value.
6484        pub fn price_mut(&mut self) -> &mut u64 {
6485            self.price.get_or_insert_default()
6486        }
6487        ///If `price` is set, returns [`Some`] with the value; otherwise returns [`None`].
6488        pub fn price_opt(&self) -> Option<u64> {
6489            self.price.as_ref().map(|field| *field)
6490        }
6491        ///Sets `price` with the provided value.
6492        pub fn set_price<T: Into<u64>>(&mut self, field: T) {
6493            self.price = Some(field.into().into());
6494        }
6495        ///Sets `price` with the provided value.
6496        pub fn with_price<T: Into<u64>>(mut self, field: T) -> Self {
6497            self.set_price(field.into());
6498            self
6499        }
6500        ///If `budget` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6501        pub fn budget_opt_mut(&mut self) -> Option<&mut u64> {
6502            self.budget.as_mut().map(|field| field as _)
6503        }
6504        ///Returns a mutable reference to `budget`.
6505        ///If the field is unset, it is first initialized with the default value.
6506        pub fn budget_mut(&mut self) -> &mut u64 {
6507            self.budget.get_or_insert_default()
6508        }
6509        ///If `budget` is set, returns [`Some`] with the value; otherwise returns [`None`].
6510        pub fn budget_opt(&self) -> Option<u64> {
6511            self.budget.as_ref().map(|field| *field)
6512        }
6513        ///Sets `budget` with the provided value.
6514        pub fn set_budget<T: Into<u64>>(&mut self, field: T) {
6515            self.budget = Some(field.into().into());
6516        }
6517        ///Sets `budget` with the provided value.
6518        pub fn with_budget<T: Into<u64>>(mut self, field: T) -> Self {
6519            self.set_budget(field.into());
6520            self
6521        }
6522    }
6523    impl super::GenesisTransaction {
6524        pub const fn const_default() -> Self {
6525            Self { objects: Vec::new() }
6526        }
6527        #[doc(hidden)]
6528        pub fn default_instance() -> &'static Self {
6529            static DEFAULT: super::GenesisTransaction = super::GenesisTransaction::const_default();
6530            &DEFAULT
6531        }
6532        ///Returns the value of `objects`, or the default value if `objects` is unset.
6533        pub fn objects(&self) -> &[super::Object] {
6534            &self.objects
6535        }
6536        ///Returns a mutable reference to `objects`.
6537        ///If the field is unset, it is first initialized with the default value.
6538        pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
6539            &mut self.objects
6540        }
6541        ///Sets `objects` with the provided value.
6542        pub fn set_objects(&mut self, field: Vec<super::Object>) {
6543            self.objects = field;
6544        }
6545        ///Sets `objects` with the provided value.
6546        pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
6547            self.set_objects(field);
6548            self
6549        }
6550    }
6551    impl super::GetBalanceRequest {
6552        pub const fn const_default() -> Self {
6553            Self {
6554                owner: None,
6555                coin_type: None,
6556            }
6557        }
6558        #[doc(hidden)]
6559        pub fn default_instance() -> &'static Self {
6560            static DEFAULT: super::GetBalanceRequest = super::GetBalanceRequest::const_default();
6561            &DEFAULT
6562        }
6563        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6564        pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
6565            self.owner.as_mut().map(|field| field as _)
6566        }
6567        ///Returns a mutable reference to `owner`.
6568        ///If the field is unset, it is first initialized with the default value.
6569        pub fn owner_mut(&mut self) -> &mut String {
6570            self.owner.get_or_insert_default()
6571        }
6572        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
6573        pub fn owner_opt(&self) -> Option<&str> {
6574            self.owner.as_ref().map(|field| field as _)
6575        }
6576        ///Sets `owner` with the provided value.
6577        pub fn set_owner<T: Into<String>>(&mut self, field: T) {
6578            self.owner = Some(field.into().into());
6579        }
6580        ///Sets `owner` with the provided value.
6581        pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
6582            self.set_owner(field.into());
6583            self
6584        }
6585        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6586        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
6587            self.coin_type.as_mut().map(|field| field as _)
6588        }
6589        ///Returns a mutable reference to `coin_type`.
6590        ///If the field is unset, it is first initialized with the default value.
6591        pub fn coin_type_mut(&mut self) -> &mut String {
6592            self.coin_type.get_or_insert_default()
6593        }
6594        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
6595        pub fn coin_type_opt(&self) -> Option<&str> {
6596            self.coin_type.as_ref().map(|field| field as _)
6597        }
6598        ///Sets `coin_type` with the provided value.
6599        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
6600            self.coin_type = Some(field.into().into());
6601        }
6602        ///Sets `coin_type` with the provided value.
6603        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
6604            self.set_coin_type(field.into());
6605            self
6606        }
6607    }
6608    impl super::GetBalanceResponse {
6609        pub const fn const_default() -> Self {
6610            Self { balance: None }
6611        }
6612        #[doc(hidden)]
6613        pub fn default_instance() -> &'static Self {
6614            static DEFAULT: super::GetBalanceResponse = super::GetBalanceResponse::const_default();
6615            &DEFAULT
6616        }
6617        ///Returns the value of `balance`, or the default value if `balance` is unset.
6618        pub fn balance(&self) -> &super::Balance {
6619            self.balance
6620                .as_ref()
6621                .map(|field| field as _)
6622                .unwrap_or_else(|| super::Balance::default_instance() as _)
6623        }
6624        ///If `balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6625        pub fn balance_opt_mut(&mut self) -> Option<&mut super::Balance> {
6626            self.balance.as_mut().map(|field| field as _)
6627        }
6628        ///Returns a mutable reference to `balance`.
6629        ///If the field is unset, it is first initialized with the default value.
6630        pub fn balance_mut(&mut self) -> &mut super::Balance {
6631            self.balance.get_or_insert_default()
6632        }
6633        ///If `balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
6634        pub fn balance_opt(&self) -> Option<&super::Balance> {
6635            self.balance.as_ref().map(|field| field as _)
6636        }
6637        ///Sets `balance` with the provided value.
6638        pub fn set_balance<T: Into<super::Balance>>(&mut self, field: T) {
6639            self.balance = Some(field.into().into());
6640        }
6641        ///Sets `balance` with the provided value.
6642        pub fn with_balance<T: Into<super::Balance>>(mut self, field: T) -> Self {
6643            self.set_balance(field.into());
6644            self
6645        }
6646    }
6647    impl super::GetCheckpointRequest {
6648        pub const fn const_default() -> Self {
6649            Self {
6650                read_mask: None,
6651                checkpoint_id: None,
6652            }
6653        }
6654        #[doc(hidden)]
6655        pub fn default_instance() -> &'static Self {
6656            static DEFAULT: super::GetCheckpointRequest = super::GetCheckpointRequest::const_default();
6657            &DEFAULT
6658        }
6659        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6660        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
6661            self.read_mask.as_mut().map(|field| field as _)
6662        }
6663        ///Returns a mutable reference to `read_mask`.
6664        ///If the field is unset, it is first initialized with the default value.
6665        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
6666            self.read_mask.get_or_insert_default()
6667        }
6668        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
6669        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
6670            self.read_mask.as_ref().map(|field| field as _)
6671        }
6672        ///Sets `read_mask` with the provided value.
6673        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
6674            self.read_mask = Some(field.into().into());
6675        }
6676        ///Sets `read_mask` with the provided value.
6677        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
6678            mut self,
6679            field: T,
6680        ) -> Self {
6681            self.set_read_mask(field.into());
6682            self
6683        }
6684        ///Returns the value of `sequence_number`, or the default value if `sequence_number` is unset.
6685        pub fn sequence_number(&self) -> u64 {
6686            if let Some(
6687                super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
6688            ) = &self.checkpoint_id
6689            {
6690                *field
6691            } else {
6692                0u64
6693            }
6694        }
6695        ///If `sequence_number` is set, returns [`Some`] with the value; otherwise returns [`None`].
6696        pub fn sequence_number_opt(&self) -> Option<u64> {
6697            if let Some(
6698                super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
6699            ) = &self.checkpoint_id
6700            {
6701                Some(*field)
6702            } else {
6703                None
6704            }
6705        }
6706        ///If `sequence_number` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6707        pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
6708            if let Some(
6709                super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
6710            ) = &mut self.checkpoint_id
6711            {
6712                Some(field as _)
6713            } else {
6714                None
6715            }
6716        }
6717        ///Returns a mutable reference to `sequence_number`.
6718        ///If the field is unset, it is first initialized with the default value.
6719        ///If any other oneof field in the same oneof is set, it will be cleared.
6720        pub fn sequence_number_mut(&mut self) -> &mut u64 {
6721            if self.sequence_number_opt_mut().is_none() {
6722                self.checkpoint_id = Some(
6723                    super::get_checkpoint_request::CheckpointId::SequenceNumber(
6724                        u64::default(),
6725                    ),
6726                );
6727            }
6728            self.sequence_number_opt_mut().unwrap()
6729        }
6730        ///Sets `sequence_number` with the provided value.
6731        ///If any other oneof field in the same oneof is set, it will be cleared.
6732        pub fn set_sequence_number<T: Into<u64>>(&mut self, field: T) {
6733            self.checkpoint_id = Some(
6734                super::get_checkpoint_request::CheckpointId::SequenceNumber(
6735                    field.into().into(),
6736                ),
6737            );
6738        }
6739        ///Sets `sequence_number` with the provided value.
6740        ///If any other oneof field in the same oneof is set, it will be cleared.
6741        pub fn with_sequence_number<T: Into<u64>>(mut self, field: T) -> Self {
6742            self.set_sequence_number(field.into());
6743            self
6744        }
6745        ///Returns the value of `digest`, or the default value if `digest` is unset.
6746        pub fn digest(&self) -> &str {
6747            if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &self
6748                .checkpoint_id
6749            {
6750                field as _
6751            } else {
6752                ""
6753            }
6754        }
6755        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
6756        pub fn digest_opt(&self) -> Option<&str> {
6757            if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &self
6758                .checkpoint_id
6759            {
6760                Some(field as _)
6761            } else {
6762                None
6763            }
6764        }
6765        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6766        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
6767            if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &mut self
6768                .checkpoint_id
6769            {
6770                Some(field as _)
6771            } else {
6772                None
6773            }
6774        }
6775        ///Returns a mutable reference to `digest`.
6776        ///If the field is unset, it is first initialized with the default value.
6777        ///If any other oneof field in the same oneof is set, it will be cleared.
6778        pub fn digest_mut(&mut self) -> &mut String {
6779            if self.digest_opt_mut().is_none() {
6780                self.checkpoint_id = Some(
6781                    super::get_checkpoint_request::CheckpointId::Digest(
6782                        String::default(),
6783                    ),
6784                );
6785            }
6786            self.digest_opt_mut().unwrap()
6787        }
6788        ///Sets `digest` with the provided value.
6789        ///If any other oneof field in the same oneof is set, it will be cleared.
6790        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
6791            self.checkpoint_id = Some(
6792                super::get_checkpoint_request::CheckpointId::Digest(field.into().into()),
6793            );
6794        }
6795        ///Sets `digest` with the provided value.
6796        ///If any other oneof field in the same oneof is set, it will be cleared.
6797        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
6798            self.set_digest(field.into());
6799            self
6800        }
6801    }
6802    impl super::GetCheckpointResponse {
6803        pub const fn const_default() -> Self {
6804            Self { checkpoint: None }
6805        }
6806        #[doc(hidden)]
6807        pub fn default_instance() -> &'static Self {
6808            static DEFAULT: super::GetCheckpointResponse = super::GetCheckpointResponse::const_default();
6809            &DEFAULT
6810        }
6811        ///Returns the value of `checkpoint`, or the default value if `checkpoint` is unset.
6812        pub fn checkpoint(&self) -> &super::Checkpoint {
6813            self.checkpoint
6814                .as_ref()
6815                .map(|field| field as _)
6816                .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
6817        }
6818        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6819        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
6820            self.checkpoint.as_mut().map(|field| field as _)
6821        }
6822        ///Returns a mutable reference to `checkpoint`.
6823        ///If the field is unset, it is first initialized with the default value.
6824        pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
6825            self.checkpoint.get_or_insert_default()
6826        }
6827        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
6828        pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
6829            self.checkpoint.as_ref().map(|field| field as _)
6830        }
6831        ///Sets `checkpoint` with the provided value.
6832        pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
6833            self.checkpoint = Some(field.into().into());
6834        }
6835        ///Sets `checkpoint` with the provided value.
6836        pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
6837            self.set_checkpoint(field.into());
6838            self
6839        }
6840    }
6841    impl super::GetCoinInfoRequest {
6842        pub const fn const_default() -> Self {
6843            Self { coin_type: None }
6844        }
6845        #[doc(hidden)]
6846        pub fn default_instance() -> &'static Self {
6847            static DEFAULT: super::GetCoinInfoRequest = super::GetCoinInfoRequest::const_default();
6848            &DEFAULT
6849        }
6850        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6851        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
6852            self.coin_type.as_mut().map(|field| field as _)
6853        }
6854        ///Returns a mutable reference to `coin_type`.
6855        ///If the field is unset, it is first initialized with the default value.
6856        pub fn coin_type_mut(&mut self) -> &mut String {
6857            self.coin_type.get_or_insert_default()
6858        }
6859        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
6860        pub fn coin_type_opt(&self) -> Option<&str> {
6861            self.coin_type.as_ref().map(|field| field as _)
6862        }
6863        ///Sets `coin_type` with the provided value.
6864        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
6865            self.coin_type = Some(field.into().into());
6866        }
6867        ///Sets `coin_type` with the provided value.
6868        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
6869            self.set_coin_type(field.into());
6870            self
6871        }
6872    }
6873    impl super::GetCoinInfoResponse {
6874        pub const fn const_default() -> Self {
6875            Self {
6876                coin_type: None,
6877                metadata: None,
6878                treasury: None,
6879                regulated_metadata: None,
6880            }
6881        }
6882        #[doc(hidden)]
6883        pub fn default_instance() -> &'static Self {
6884            static DEFAULT: super::GetCoinInfoResponse = super::GetCoinInfoResponse::const_default();
6885            &DEFAULT
6886        }
6887        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6888        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
6889            self.coin_type.as_mut().map(|field| field as _)
6890        }
6891        ///Returns a mutable reference to `coin_type`.
6892        ///If the field is unset, it is first initialized with the default value.
6893        pub fn coin_type_mut(&mut self) -> &mut String {
6894            self.coin_type.get_or_insert_default()
6895        }
6896        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
6897        pub fn coin_type_opt(&self) -> Option<&str> {
6898            self.coin_type.as_ref().map(|field| field as _)
6899        }
6900        ///Sets `coin_type` with the provided value.
6901        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
6902            self.coin_type = Some(field.into().into());
6903        }
6904        ///Sets `coin_type` with the provided value.
6905        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
6906            self.set_coin_type(field.into());
6907            self
6908        }
6909        ///Returns the value of `metadata`, or the default value if `metadata` is unset.
6910        pub fn metadata(&self) -> &super::CoinMetadata {
6911            self.metadata
6912                .as_ref()
6913                .map(|field| field as _)
6914                .unwrap_or_else(|| super::CoinMetadata::default_instance() as _)
6915        }
6916        ///If `metadata` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6917        pub fn metadata_opt_mut(&mut self) -> Option<&mut super::CoinMetadata> {
6918            self.metadata.as_mut().map(|field| field as _)
6919        }
6920        ///Returns a mutable reference to `metadata`.
6921        ///If the field is unset, it is first initialized with the default value.
6922        pub fn metadata_mut(&mut self) -> &mut super::CoinMetadata {
6923            self.metadata.get_or_insert_default()
6924        }
6925        ///If `metadata` is set, returns [`Some`] with the value; otherwise returns [`None`].
6926        pub fn metadata_opt(&self) -> Option<&super::CoinMetadata> {
6927            self.metadata.as_ref().map(|field| field as _)
6928        }
6929        ///Sets `metadata` with the provided value.
6930        pub fn set_metadata<T: Into<super::CoinMetadata>>(&mut self, field: T) {
6931            self.metadata = Some(field.into().into());
6932        }
6933        ///Sets `metadata` with the provided value.
6934        pub fn with_metadata<T: Into<super::CoinMetadata>>(mut self, field: T) -> Self {
6935            self.set_metadata(field.into());
6936            self
6937        }
6938        ///Returns the value of `treasury`, or the default value if `treasury` is unset.
6939        pub fn treasury(&self) -> &super::CoinTreasury {
6940            self.treasury
6941                .as_ref()
6942                .map(|field| field as _)
6943                .unwrap_or_else(|| super::CoinTreasury::default_instance() as _)
6944        }
6945        ///If `treasury` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6946        pub fn treasury_opt_mut(&mut self) -> Option<&mut super::CoinTreasury> {
6947            self.treasury.as_mut().map(|field| field as _)
6948        }
6949        ///Returns a mutable reference to `treasury`.
6950        ///If the field is unset, it is first initialized with the default value.
6951        pub fn treasury_mut(&mut self) -> &mut super::CoinTreasury {
6952            self.treasury.get_or_insert_default()
6953        }
6954        ///If `treasury` is set, returns [`Some`] with the value; otherwise returns [`None`].
6955        pub fn treasury_opt(&self) -> Option<&super::CoinTreasury> {
6956            self.treasury.as_ref().map(|field| field as _)
6957        }
6958        ///Sets `treasury` with the provided value.
6959        pub fn set_treasury<T: Into<super::CoinTreasury>>(&mut self, field: T) {
6960            self.treasury = Some(field.into().into());
6961        }
6962        ///Sets `treasury` with the provided value.
6963        pub fn with_treasury<T: Into<super::CoinTreasury>>(mut self, field: T) -> Self {
6964            self.set_treasury(field.into());
6965            self
6966        }
6967        ///Returns the value of `regulated_metadata`, or the default value if `regulated_metadata` is unset.
6968        pub fn regulated_metadata(&self) -> &super::RegulatedCoinMetadata {
6969            self.regulated_metadata
6970                .as_ref()
6971                .map(|field| field as _)
6972                .unwrap_or_else(|| super::RegulatedCoinMetadata::default_instance() as _)
6973        }
6974        ///If `regulated_metadata` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6975        pub fn regulated_metadata_opt_mut(
6976            &mut self,
6977        ) -> Option<&mut super::RegulatedCoinMetadata> {
6978            self.regulated_metadata.as_mut().map(|field| field as _)
6979        }
6980        ///Returns a mutable reference to `regulated_metadata`.
6981        ///If the field is unset, it is first initialized with the default value.
6982        pub fn regulated_metadata_mut(&mut self) -> &mut super::RegulatedCoinMetadata {
6983            self.regulated_metadata.get_or_insert_default()
6984        }
6985        ///If `regulated_metadata` is set, returns [`Some`] with the value; otherwise returns [`None`].
6986        pub fn regulated_metadata_opt(&self) -> Option<&super::RegulatedCoinMetadata> {
6987            self.regulated_metadata.as_ref().map(|field| field as _)
6988        }
6989        ///Sets `regulated_metadata` with the provided value.
6990        pub fn set_regulated_metadata<T: Into<super::RegulatedCoinMetadata>>(
6991            &mut self,
6992            field: T,
6993        ) {
6994            self.regulated_metadata = Some(field.into().into());
6995        }
6996        ///Sets `regulated_metadata` with the provided value.
6997        pub fn with_regulated_metadata<T: Into<super::RegulatedCoinMetadata>>(
6998            mut self,
6999            field: T,
7000        ) -> Self {
7001            self.set_regulated_metadata(field.into());
7002            self
7003        }
7004    }
7005    impl super::GetDatatypeRequest {
7006        pub const fn const_default() -> Self {
7007            Self {
7008                package_id: None,
7009                module_name: None,
7010                name: None,
7011            }
7012        }
7013        #[doc(hidden)]
7014        pub fn default_instance() -> &'static Self {
7015            static DEFAULT: super::GetDatatypeRequest = super::GetDatatypeRequest::const_default();
7016            &DEFAULT
7017        }
7018        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7019        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
7020            self.package_id.as_mut().map(|field| field as _)
7021        }
7022        ///Returns a mutable reference to `package_id`.
7023        ///If the field is unset, it is first initialized with the default value.
7024        pub fn package_id_mut(&mut self) -> &mut String {
7025            self.package_id.get_or_insert_default()
7026        }
7027        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
7028        pub fn package_id_opt(&self) -> Option<&str> {
7029            self.package_id.as_ref().map(|field| field as _)
7030        }
7031        ///Sets `package_id` with the provided value.
7032        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
7033            self.package_id = Some(field.into().into());
7034        }
7035        ///Sets `package_id` with the provided value.
7036        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
7037            self.set_package_id(field.into());
7038            self
7039        }
7040        ///If `module_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7041        pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
7042            self.module_name.as_mut().map(|field| field as _)
7043        }
7044        ///Returns a mutable reference to `module_name`.
7045        ///If the field is unset, it is first initialized with the default value.
7046        pub fn module_name_mut(&mut self) -> &mut String {
7047            self.module_name.get_or_insert_default()
7048        }
7049        ///If `module_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
7050        pub fn module_name_opt(&self) -> Option<&str> {
7051            self.module_name.as_ref().map(|field| field as _)
7052        }
7053        ///Sets `module_name` with the provided value.
7054        pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
7055            self.module_name = Some(field.into().into());
7056        }
7057        ///Sets `module_name` with the provided value.
7058        pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
7059            self.set_module_name(field.into());
7060            self
7061        }
7062        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7063        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
7064            self.name.as_mut().map(|field| field as _)
7065        }
7066        ///Returns a mutable reference to `name`.
7067        ///If the field is unset, it is first initialized with the default value.
7068        pub fn name_mut(&mut self) -> &mut String {
7069            self.name.get_or_insert_default()
7070        }
7071        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
7072        pub fn name_opt(&self) -> Option<&str> {
7073            self.name.as_ref().map(|field| field as _)
7074        }
7075        ///Sets `name` with the provided value.
7076        pub fn set_name<T: Into<String>>(&mut self, field: T) {
7077            self.name = Some(field.into().into());
7078        }
7079        ///Sets `name` with the provided value.
7080        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
7081            self.set_name(field.into());
7082            self
7083        }
7084    }
7085    impl super::GetDatatypeResponse {
7086        pub const fn const_default() -> Self {
7087            Self { datatype: None }
7088        }
7089        #[doc(hidden)]
7090        pub fn default_instance() -> &'static Self {
7091            static DEFAULT: super::GetDatatypeResponse = super::GetDatatypeResponse::const_default();
7092            &DEFAULT
7093        }
7094        ///Returns the value of `datatype`, or the default value if `datatype` is unset.
7095        pub fn datatype(&self) -> &super::DatatypeDescriptor {
7096            self.datatype
7097                .as_ref()
7098                .map(|field| field as _)
7099                .unwrap_or_else(|| super::DatatypeDescriptor::default_instance() as _)
7100        }
7101        ///If `datatype` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7102        pub fn datatype_opt_mut(&mut self) -> Option<&mut super::DatatypeDescriptor> {
7103            self.datatype.as_mut().map(|field| field as _)
7104        }
7105        ///Returns a mutable reference to `datatype`.
7106        ///If the field is unset, it is first initialized with the default value.
7107        pub fn datatype_mut(&mut self) -> &mut super::DatatypeDescriptor {
7108            self.datatype.get_or_insert_default()
7109        }
7110        ///If `datatype` is set, returns [`Some`] with the value; otherwise returns [`None`].
7111        pub fn datatype_opt(&self) -> Option<&super::DatatypeDescriptor> {
7112            self.datatype.as_ref().map(|field| field as _)
7113        }
7114        ///Sets `datatype` with the provided value.
7115        pub fn set_datatype<T: Into<super::DatatypeDescriptor>>(&mut self, field: T) {
7116            self.datatype = Some(field.into().into());
7117        }
7118        ///Sets `datatype` with the provided value.
7119        pub fn with_datatype<T: Into<super::DatatypeDescriptor>>(
7120            mut self,
7121            field: T,
7122        ) -> Self {
7123            self.set_datatype(field.into());
7124            self
7125        }
7126    }
7127    impl super::GetEpochRequest {
7128        pub const fn const_default() -> Self {
7129            Self {
7130                epoch: None,
7131                read_mask: None,
7132            }
7133        }
7134        #[doc(hidden)]
7135        pub fn default_instance() -> &'static Self {
7136            static DEFAULT: super::GetEpochRequest = super::GetEpochRequest::const_default();
7137            &DEFAULT
7138        }
7139        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7140        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
7141            self.epoch.as_mut().map(|field| field as _)
7142        }
7143        ///Returns a mutable reference to `epoch`.
7144        ///If the field is unset, it is first initialized with the default value.
7145        pub fn epoch_mut(&mut self) -> &mut u64 {
7146            self.epoch.get_or_insert_default()
7147        }
7148        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
7149        pub fn epoch_opt(&self) -> Option<u64> {
7150            self.epoch.as_ref().map(|field| *field)
7151        }
7152        ///Sets `epoch` with the provided value.
7153        pub fn set_epoch<T: Into<u64>>(&mut self, field: T) {
7154            self.epoch = Some(field.into().into());
7155        }
7156        ///Sets `epoch` with the provided value.
7157        pub fn with_epoch<T: Into<u64>>(mut self, field: T) -> Self {
7158            self.set_epoch(field.into());
7159            self
7160        }
7161        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7162        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
7163            self.read_mask.as_mut().map(|field| field as _)
7164        }
7165        ///Returns a mutable reference to `read_mask`.
7166        ///If the field is unset, it is first initialized with the default value.
7167        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
7168            self.read_mask.get_or_insert_default()
7169        }
7170        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
7171        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
7172            self.read_mask.as_ref().map(|field| field as _)
7173        }
7174        ///Sets `read_mask` with the provided value.
7175        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
7176            self.read_mask = Some(field.into().into());
7177        }
7178        ///Sets `read_mask` with the provided value.
7179        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
7180            mut self,
7181            field: T,
7182        ) -> Self {
7183            self.set_read_mask(field.into());
7184            self
7185        }
7186    }
7187    impl super::GetEpochResponse {
7188        pub const fn const_default() -> Self {
7189            Self { epoch: None }
7190        }
7191        #[doc(hidden)]
7192        pub fn default_instance() -> &'static Self {
7193            static DEFAULT: super::GetEpochResponse = super::GetEpochResponse::const_default();
7194            &DEFAULT
7195        }
7196        ///Returns the value of `epoch`, or the default value if `epoch` is unset.
7197        pub fn epoch(&self) -> &super::Epoch {
7198            self.epoch
7199                .as_ref()
7200                .map(|field| field as _)
7201                .unwrap_or_else(|| super::Epoch::default_instance() as _)
7202        }
7203        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7204        pub fn epoch_opt_mut(&mut self) -> Option<&mut super::Epoch> {
7205            self.epoch.as_mut().map(|field| field as _)
7206        }
7207        ///Returns a mutable reference to `epoch`.
7208        ///If the field is unset, it is first initialized with the default value.
7209        pub fn epoch_mut(&mut self) -> &mut super::Epoch {
7210            self.epoch.get_or_insert_default()
7211        }
7212        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
7213        pub fn epoch_opt(&self) -> Option<&super::Epoch> {
7214            self.epoch.as_ref().map(|field| field as _)
7215        }
7216        ///Sets `epoch` with the provided value.
7217        pub fn set_epoch<T: Into<super::Epoch>>(&mut self, field: T) {
7218            self.epoch = Some(field.into().into());
7219        }
7220        ///Sets `epoch` with the provided value.
7221        pub fn with_epoch<T: Into<super::Epoch>>(mut self, field: T) -> Self {
7222            self.set_epoch(field.into());
7223            self
7224        }
7225    }
7226    impl super::GetFunctionRequest {
7227        pub const fn const_default() -> Self {
7228            Self {
7229                package_id: None,
7230                module_name: None,
7231                name: None,
7232            }
7233        }
7234        #[doc(hidden)]
7235        pub fn default_instance() -> &'static Self {
7236            static DEFAULT: super::GetFunctionRequest = super::GetFunctionRequest::const_default();
7237            &DEFAULT
7238        }
7239        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7240        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
7241            self.package_id.as_mut().map(|field| field as _)
7242        }
7243        ///Returns a mutable reference to `package_id`.
7244        ///If the field is unset, it is first initialized with the default value.
7245        pub fn package_id_mut(&mut self) -> &mut String {
7246            self.package_id.get_or_insert_default()
7247        }
7248        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
7249        pub fn package_id_opt(&self) -> Option<&str> {
7250            self.package_id.as_ref().map(|field| field as _)
7251        }
7252        ///Sets `package_id` with the provided value.
7253        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
7254            self.package_id = Some(field.into().into());
7255        }
7256        ///Sets `package_id` with the provided value.
7257        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
7258            self.set_package_id(field.into());
7259            self
7260        }
7261        ///If `module_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7262        pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
7263            self.module_name.as_mut().map(|field| field as _)
7264        }
7265        ///Returns a mutable reference to `module_name`.
7266        ///If the field is unset, it is first initialized with the default value.
7267        pub fn module_name_mut(&mut self) -> &mut String {
7268            self.module_name.get_or_insert_default()
7269        }
7270        ///If `module_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
7271        pub fn module_name_opt(&self) -> Option<&str> {
7272            self.module_name.as_ref().map(|field| field as _)
7273        }
7274        ///Sets `module_name` with the provided value.
7275        pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
7276            self.module_name = Some(field.into().into());
7277        }
7278        ///Sets `module_name` with the provided value.
7279        pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
7280            self.set_module_name(field.into());
7281            self
7282        }
7283        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7284        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
7285            self.name.as_mut().map(|field| field as _)
7286        }
7287        ///Returns a mutable reference to `name`.
7288        ///If the field is unset, it is first initialized with the default value.
7289        pub fn name_mut(&mut self) -> &mut String {
7290            self.name.get_or_insert_default()
7291        }
7292        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
7293        pub fn name_opt(&self) -> Option<&str> {
7294            self.name.as_ref().map(|field| field as _)
7295        }
7296        ///Sets `name` with the provided value.
7297        pub fn set_name<T: Into<String>>(&mut self, field: T) {
7298            self.name = Some(field.into().into());
7299        }
7300        ///Sets `name` with the provided value.
7301        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
7302            self.set_name(field.into());
7303            self
7304        }
7305    }
7306    impl super::GetFunctionResponse {
7307        pub const fn const_default() -> Self {
7308            Self { function: None }
7309        }
7310        #[doc(hidden)]
7311        pub fn default_instance() -> &'static Self {
7312            static DEFAULT: super::GetFunctionResponse = super::GetFunctionResponse::const_default();
7313            &DEFAULT
7314        }
7315        ///Returns the value of `function`, or the default value if `function` is unset.
7316        pub fn function(&self) -> &super::FunctionDescriptor {
7317            self.function
7318                .as_ref()
7319                .map(|field| field as _)
7320                .unwrap_or_else(|| super::FunctionDescriptor::default_instance() as _)
7321        }
7322        ///If `function` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7323        pub fn function_opt_mut(&mut self) -> Option<&mut super::FunctionDescriptor> {
7324            self.function.as_mut().map(|field| field as _)
7325        }
7326        ///Returns a mutable reference to `function`.
7327        ///If the field is unset, it is first initialized with the default value.
7328        pub fn function_mut(&mut self) -> &mut super::FunctionDescriptor {
7329            self.function.get_or_insert_default()
7330        }
7331        ///If `function` is set, returns [`Some`] with the value; otherwise returns [`None`].
7332        pub fn function_opt(&self) -> Option<&super::FunctionDescriptor> {
7333            self.function.as_ref().map(|field| field as _)
7334        }
7335        ///Sets `function` with the provided value.
7336        pub fn set_function<T: Into<super::FunctionDescriptor>>(&mut self, field: T) {
7337            self.function = Some(field.into().into());
7338        }
7339        ///Sets `function` with the provided value.
7340        pub fn with_function<T: Into<super::FunctionDescriptor>>(
7341            mut self,
7342            field: T,
7343        ) -> Self {
7344            self.set_function(field.into());
7345            self
7346        }
7347    }
7348    impl super::GetObjectRequest {
7349        pub const fn const_default() -> Self {
7350            Self {
7351                object_id: None,
7352                version: None,
7353                read_mask: None,
7354            }
7355        }
7356        #[doc(hidden)]
7357        pub fn default_instance() -> &'static Self {
7358            static DEFAULT: super::GetObjectRequest = super::GetObjectRequest::const_default();
7359            &DEFAULT
7360        }
7361        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7362        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
7363            self.object_id.as_mut().map(|field| field as _)
7364        }
7365        ///Returns a mutable reference to `object_id`.
7366        ///If the field is unset, it is first initialized with the default value.
7367        pub fn object_id_mut(&mut self) -> &mut String {
7368            self.object_id.get_or_insert_default()
7369        }
7370        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
7371        pub fn object_id_opt(&self) -> Option<&str> {
7372            self.object_id.as_ref().map(|field| field as _)
7373        }
7374        ///Sets `object_id` with the provided value.
7375        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
7376            self.object_id = Some(field.into().into());
7377        }
7378        ///Sets `object_id` with the provided value.
7379        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
7380            self.set_object_id(field.into());
7381            self
7382        }
7383        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7384        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
7385            self.version.as_mut().map(|field| field as _)
7386        }
7387        ///Returns a mutable reference to `version`.
7388        ///If the field is unset, it is first initialized with the default value.
7389        pub fn version_mut(&mut self) -> &mut u64 {
7390            self.version.get_or_insert_default()
7391        }
7392        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
7393        pub fn version_opt(&self) -> Option<u64> {
7394            self.version.as_ref().map(|field| *field)
7395        }
7396        ///Sets `version` with the provided value.
7397        pub fn set_version<T: Into<u64>>(&mut self, field: T) {
7398            self.version = Some(field.into().into());
7399        }
7400        ///Sets `version` with the provided value.
7401        pub fn with_version<T: Into<u64>>(mut self, field: T) -> Self {
7402            self.set_version(field.into());
7403            self
7404        }
7405        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7406        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
7407            self.read_mask.as_mut().map(|field| field as _)
7408        }
7409        ///Returns a mutable reference to `read_mask`.
7410        ///If the field is unset, it is first initialized with the default value.
7411        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
7412            self.read_mask.get_or_insert_default()
7413        }
7414        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
7415        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
7416            self.read_mask.as_ref().map(|field| field as _)
7417        }
7418        ///Sets `read_mask` with the provided value.
7419        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
7420            self.read_mask = Some(field.into().into());
7421        }
7422        ///Sets `read_mask` with the provided value.
7423        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
7424            mut self,
7425            field: T,
7426        ) -> Self {
7427            self.set_read_mask(field.into());
7428            self
7429        }
7430    }
7431    impl super::GetObjectResponse {
7432        pub const fn const_default() -> Self {
7433            Self { object: None }
7434        }
7435        #[doc(hidden)]
7436        pub fn default_instance() -> &'static Self {
7437            static DEFAULT: super::GetObjectResponse = super::GetObjectResponse::const_default();
7438            &DEFAULT
7439        }
7440        ///Returns the value of `object`, or the default value if `object` is unset.
7441        pub fn object(&self) -> &super::Object {
7442            self.object
7443                .as_ref()
7444                .map(|field| field as _)
7445                .unwrap_or_else(|| super::Object::default_instance() as _)
7446        }
7447        ///If `object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7448        pub fn object_opt_mut(&mut self) -> Option<&mut super::Object> {
7449            self.object.as_mut().map(|field| field as _)
7450        }
7451        ///Returns a mutable reference to `object`.
7452        ///If the field is unset, it is first initialized with the default value.
7453        pub fn object_mut(&mut self) -> &mut super::Object {
7454            self.object.get_or_insert_default()
7455        }
7456        ///If `object` is set, returns [`Some`] with the value; otherwise returns [`None`].
7457        pub fn object_opt(&self) -> Option<&super::Object> {
7458            self.object.as_ref().map(|field| field as _)
7459        }
7460        ///Sets `object` with the provided value.
7461        pub fn set_object<T: Into<super::Object>>(&mut self, field: T) {
7462            self.object = Some(field.into().into());
7463        }
7464        ///Sets `object` with the provided value.
7465        pub fn with_object<T: Into<super::Object>>(mut self, field: T) -> Self {
7466            self.set_object(field.into());
7467            self
7468        }
7469    }
7470    impl super::GetObjectResult {
7471        pub const fn const_default() -> Self {
7472            Self { result: None }
7473        }
7474        #[doc(hidden)]
7475        pub fn default_instance() -> &'static Self {
7476            static DEFAULT: super::GetObjectResult = super::GetObjectResult::const_default();
7477            &DEFAULT
7478        }
7479        ///Returns the value of `object`, or the default value if `object` is unset.
7480        pub fn object(&self) -> &super::Object {
7481            if let Some(super::get_object_result::Result::Object(field)) = &self.result {
7482                field as _
7483            } else {
7484                super::Object::default_instance() as _
7485            }
7486        }
7487        ///If `object` is set, returns [`Some`] with the value; otherwise returns [`None`].
7488        pub fn object_opt(&self) -> Option<&super::Object> {
7489            if let Some(super::get_object_result::Result::Object(field)) = &self.result {
7490                Some(field as _)
7491            } else {
7492                None
7493            }
7494        }
7495        ///If `object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7496        pub fn object_opt_mut(&mut self) -> Option<&mut super::Object> {
7497            if let Some(super::get_object_result::Result::Object(field)) = &mut self
7498                .result
7499            {
7500                Some(field as _)
7501            } else {
7502                None
7503            }
7504        }
7505        ///Returns a mutable reference to `object`.
7506        ///If the field is unset, it is first initialized with the default value.
7507        ///If any other oneof field in the same oneof is set, it will be cleared.
7508        pub fn object_mut(&mut self) -> &mut super::Object {
7509            if self.object_opt_mut().is_none() {
7510                self.result = Some(
7511                    super::get_object_result::Result::Object(super::Object::default()),
7512                );
7513            }
7514            self.object_opt_mut().unwrap()
7515        }
7516        ///Sets `object` with the provided value.
7517        ///If any other oneof field in the same oneof is set, it will be cleared.
7518        pub fn set_object<T: Into<super::Object>>(&mut self, field: T) {
7519            self.result = Some(
7520                super::get_object_result::Result::Object(field.into().into()),
7521            );
7522        }
7523        ///Sets `object` with the provided value.
7524        ///If any other oneof field in the same oneof is set, it will be cleared.
7525        pub fn with_object<T: Into<super::Object>>(mut self, field: T) -> Self {
7526            self.set_object(field.into());
7527            self
7528        }
7529        ///Returns the value of `error`, or the default value if `error` is unset.
7530        pub fn error(&self) -> &super::super::super::super::google::rpc::Status {
7531            if let Some(super::get_object_result::Result::Error(field)) = &self.result {
7532                field as _
7533            } else {
7534                super::super::super::super::google::rpc::Status::default_instance() as _
7535            }
7536        }
7537        ///If `error` is set, returns [`Some`] with the value; otherwise returns [`None`].
7538        pub fn error_opt(
7539            &self,
7540        ) -> Option<&super::super::super::super::google::rpc::Status> {
7541            if let Some(super::get_object_result::Result::Error(field)) = &self.result {
7542                Some(field as _)
7543            } else {
7544                None
7545            }
7546        }
7547        ///If `error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7548        pub fn error_opt_mut(
7549            &mut self,
7550        ) -> Option<&mut super::super::super::super::google::rpc::Status> {
7551            if let Some(super::get_object_result::Result::Error(field)) = &mut self
7552                .result
7553            {
7554                Some(field as _)
7555            } else {
7556                None
7557            }
7558        }
7559        ///Returns a mutable reference to `error`.
7560        ///If the field is unset, it is first initialized with the default value.
7561        ///If any other oneof field in the same oneof is set, it will be cleared.
7562        pub fn error_mut(
7563            &mut self,
7564        ) -> &mut super::super::super::super::google::rpc::Status {
7565            if self.error_opt_mut().is_none() {
7566                self.result = Some(
7567                    super::get_object_result::Result::Error(
7568                        super::super::super::super::google::rpc::Status::default(),
7569                    ),
7570                );
7571            }
7572            self.error_opt_mut().unwrap()
7573        }
7574        ///Sets `error` with the provided value.
7575        ///If any other oneof field in the same oneof is set, it will be cleared.
7576        pub fn set_error<T: Into<super::super::super::super::google::rpc::Status>>(
7577            &mut self,
7578            field: T,
7579        ) {
7580            self.result = Some(
7581                super::get_object_result::Result::Error(field.into().into()),
7582            );
7583        }
7584        ///Sets `error` with the provided value.
7585        ///If any other oneof field in the same oneof is set, it will be cleared.
7586        pub fn with_error<T: Into<super::super::super::super::google::rpc::Status>>(
7587            mut self,
7588            field: T,
7589        ) -> Self {
7590            self.set_error(field.into());
7591            self
7592        }
7593    }
7594    impl super::GetPackageRequest {
7595        pub const fn const_default() -> Self {
7596            Self { package_id: None }
7597        }
7598        #[doc(hidden)]
7599        pub fn default_instance() -> &'static Self {
7600            static DEFAULT: super::GetPackageRequest = super::GetPackageRequest::const_default();
7601            &DEFAULT
7602        }
7603        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7604        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
7605            self.package_id.as_mut().map(|field| field as _)
7606        }
7607        ///Returns a mutable reference to `package_id`.
7608        ///If the field is unset, it is first initialized with the default value.
7609        pub fn package_id_mut(&mut self) -> &mut String {
7610            self.package_id.get_or_insert_default()
7611        }
7612        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
7613        pub fn package_id_opt(&self) -> Option<&str> {
7614            self.package_id.as_ref().map(|field| field as _)
7615        }
7616        ///Sets `package_id` with the provided value.
7617        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
7618            self.package_id = Some(field.into().into());
7619        }
7620        ///Sets `package_id` with the provided value.
7621        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
7622            self.set_package_id(field.into());
7623            self
7624        }
7625    }
7626    impl super::GetPackageResponse {
7627        pub const fn const_default() -> Self {
7628            Self { package: None }
7629        }
7630        #[doc(hidden)]
7631        pub fn default_instance() -> &'static Self {
7632            static DEFAULT: super::GetPackageResponse = super::GetPackageResponse::const_default();
7633            &DEFAULT
7634        }
7635        ///Returns the value of `package`, or the default value if `package` is unset.
7636        pub fn package(&self) -> &super::Package {
7637            self.package
7638                .as_ref()
7639                .map(|field| field as _)
7640                .unwrap_or_else(|| super::Package::default_instance() as _)
7641        }
7642        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7643        pub fn package_opt_mut(&mut self) -> Option<&mut super::Package> {
7644            self.package.as_mut().map(|field| field as _)
7645        }
7646        ///Returns a mutable reference to `package`.
7647        ///If the field is unset, it is first initialized with the default value.
7648        pub fn package_mut(&mut self) -> &mut super::Package {
7649            self.package.get_or_insert_default()
7650        }
7651        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
7652        pub fn package_opt(&self) -> Option<&super::Package> {
7653            self.package.as_ref().map(|field| field as _)
7654        }
7655        ///Sets `package` with the provided value.
7656        pub fn set_package<T: Into<super::Package>>(&mut self, field: T) {
7657            self.package = Some(field.into().into());
7658        }
7659        ///Sets `package` with the provided value.
7660        pub fn with_package<T: Into<super::Package>>(mut self, field: T) -> Self {
7661            self.set_package(field.into());
7662            self
7663        }
7664    }
7665    impl super::GetServiceInfoRequest {
7666        pub const fn const_default() -> Self {
7667            Self {}
7668        }
7669        #[doc(hidden)]
7670        pub fn default_instance() -> &'static Self {
7671            static DEFAULT: super::GetServiceInfoRequest = super::GetServiceInfoRequest::const_default();
7672            &DEFAULT
7673        }
7674    }
7675    impl super::GetServiceInfoResponse {
7676        pub const fn const_default() -> Self {
7677            Self {
7678                chain_id: None,
7679                chain: None,
7680                epoch: None,
7681                checkpoint_height: None,
7682                timestamp: None,
7683                lowest_available_checkpoint: None,
7684                lowest_available_checkpoint_objects: None,
7685                server: None,
7686            }
7687        }
7688        #[doc(hidden)]
7689        pub fn default_instance() -> &'static Self {
7690            static DEFAULT: super::GetServiceInfoResponse = super::GetServiceInfoResponse::const_default();
7691            &DEFAULT
7692        }
7693        ///If `chain_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7694        pub fn chain_id_opt_mut(&mut self) -> Option<&mut String> {
7695            self.chain_id.as_mut().map(|field| field as _)
7696        }
7697        ///Returns a mutable reference to `chain_id`.
7698        ///If the field is unset, it is first initialized with the default value.
7699        pub fn chain_id_mut(&mut self) -> &mut String {
7700            self.chain_id.get_or_insert_default()
7701        }
7702        ///If `chain_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
7703        pub fn chain_id_opt(&self) -> Option<&str> {
7704            self.chain_id.as_ref().map(|field| field as _)
7705        }
7706        ///Sets `chain_id` with the provided value.
7707        pub fn set_chain_id<T: Into<String>>(&mut self, field: T) {
7708            self.chain_id = Some(field.into().into());
7709        }
7710        ///Sets `chain_id` with the provided value.
7711        pub fn with_chain_id<T: Into<String>>(mut self, field: T) -> Self {
7712            self.set_chain_id(field.into());
7713            self
7714        }
7715        ///If `chain` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7716        pub fn chain_opt_mut(&mut self) -> Option<&mut String> {
7717            self.chain.as_mut().map(|field| field as _)
7718        }
7719        ///Returns a mutable reference to `chain`.
7720        ///If the field is unset, it is first initialized with the default value.
7721        pub fn chain_mut(&mut self) -> &mut String {
7722            self.chain.get_or_insert_default()
7723        }
7724        ///If `chain` is set, returns [`Some`] with the value; otherwise returns [`None`].
7725        pub fn chain_opt(&self) -> Option<&str> {
7726            self.chain.as_ref().map(|field| field as _)
7727        }
7728        ///Sets `chain` with the provided value.
7729        pub fn set_chain<T: Into<String>>(&mut self, field: T) {
7730            self.chain = Some(field.into().into());
7731        }
7732        ///Sets `chain` with the provided value.
7733        pub fn with_chain<T: Into<String>>(mut self, field: T) -> Self {
7734            self.set_chain(field.into());
7735            self
7736        }
7737        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7738        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
7739            self.epoch.as_mut().map(|field| field as _)
7740        }
7741        ///Returns a mutable reference to `epoch`.
7742        ///If the field is unset, it is first initialized with the default value.
7743        pub fn epoch_mut(&mut self) -> &mut u64 {
7744            self.epoch.get_or_insert_default()
7745        }
7746        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
7747        pub fn epoch_opt(&self) -> Option<u64> {
7748            self.epoch.as_ref().map(|field| *field)
7749        }
7750        ///Sets `epoch` with the provided value.
7751        pub fn set_epoch<T: Into<u64>>(&mut self, field: T) {
7752            self.epoch = Some(field.into().into());
7753        }
7754        ///Sets `epoch` with the provided value.
7755        pub fn with_epoch<T: Into<u64>>(mut self, field: T) -> Self {
7756            self.set_epoch(field.into());
7757            self
7758        }
7759        ///If `checkpoint_height` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7760        pub fn checkpoint_height_opt_mut(&mut self) -> Option<&mut u64> {
7761            self.checkpoint_height.as_mut().map(|field| field as _)
7762        }
7763        ///Returns a mutable reference to `checkpoint_height`.
7764        ///If the field is unset, it is first initialized with the default value.
7765        pub fn checkpoint_height_mut(&mut self) -> &mut u64 {
7766            self.checkpoint_height.get_or_insert_default()
7767        }
7768        ///If `checkpoint_height` is set, returns [`Some`] with the value; otherwise returns [`None`].
7769        pub fn checkpoint_height_opt(&self) -> Option<u64> {
7770            self.checkpoint_height.as_ref().map(|field| *field)
7771        }
7772        ///Sets `checkpoint_height` with the provided value.
7773        pub fn set_checkpoint_height<T: Into<u64>>(&mut self, field: T) {
7774            self.checkpoint_height = Some(field.into().into());
7775        }
7776        ///Sets `checkpoint_height` with the provided value.
7777        pub fn with_checkpoint_height<T: Into<u64>>(mut self, field: T) -> Self {
7778            self.set_checkpoint_height(field.into());
7779            self
7780        }
7781        ///If `timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7782        pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
7783            self.timestamp.as_mut().map(|field| field as _)
7784        }
7785        ///Returns a mutable reference to `timestamp`.
7786        ///If the field is unset, it is first initialized with the default value.
7787        pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
7788            self.timestamp.get_or_insert_default()
7789        }
7790        ///If `timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
7791        pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
7792            self.timestamp.as_ref().map(|field| field as _)
7793        }
7794        ///Sets `timestamp` with the provided value.
7795        pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
7796            self.timestamp = Some(field.into().into());
7797        }
7798        ///Sets `timestamp` with the provided value.
7799        pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
7800            mut self,
7801            field: T,
7802        ) -> Self {
7803            self.set_timestamp(field.into());
7804            self
7805        }
7806        ///If `lowest_available_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7807        pub fn lowest_available_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
7808            self.lowest_available_checkpoint.as_mut().map(|field| field as _)
7809        }
7810        ///Returns a mutable reference to `lowest_available_checkpoint`.
7811        ///If the field is unset, it is first initialized with the default value.
7812        pub fn lowest_available_checkpoint_mut(&mut self) -> &mut u64 {
7813            self.lowest_available_checkpoint.get_or_insert_default()
7814        }
7815        ///If `lowest_available_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
7816        pub fn lowest_available_checkpoint_opt(&self) -> Option<u64> {
7817            self.lowest_available_checkpoint.as_ref().map(|field| *field)
7818        }
7819        ///Sets `lowest_available_checkpoint` with the provided value.
7820        pub fn set_lowest_available_checkpoint<T: Into<u64>>(&mut self, field: T) {
7821            self.lowest_available_checkpoint = Some(field.into().into());
7822        }
7823        ///Sets `lowest_available_checkpoint` with the provided value.
7824        pub fn with_lowest_available_checkpoint<T: Into<u64>>(
7825            mut self,
7826            field: T,
7827        ) -> Self {
7828            self.set_lowest_available_checkpoint(field.into());
7829            self
7830        }
7831        ///If `lowest_available_checkpoint_objects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7832        pub fn lowest_available_checkpoint_objects_opt_mut(
7833            &mut self,
7834        ) -> Option<&mut u64> {
7835            self.lowest_available_checkpoint_objects.as_mut().map(|field| field as _)
7836        }
7837        ///Returns a mutable reference to `lowest_available_checkpoint_objects`.
7838        ///If the field is unset, it is first initialized with the default value.
7839        pub fn lowest_available_checkpoint_objects_mut(&mut self) -> &mut u64 {
7840            self.lowest_available_checkpoint_objects.get_or_insert_default()
7841        }
7842        ///If `lowest_available_checkpoint_objects` is set, returns [`Some`] with the value; otherwise returns [`None`].
7843        pub fn lowest_available_checkpoint_objects_opt(&self) -> Option<u64> {
7844            self.lowest_available_checkpoint_objects.as_ref().map(|field| *field)
7845        }
7846        ///Sets `lowest_available_checkpoint_objects` with the provided value.
7847        pub fn set_lowest_available_checkpoint_objects<T: Into<u64>>(
7848            &mut self,
7849            field: T,
7850        ) {
7851            self.lowest_available_checkpoint_objects = Some(field.into().into());
7852        }
7853        ///Sets `lowest_available_checkpoint_objects` with the provided value.
7854        pub fn with_lowest_available_checkpoint_objects<T: Into<u64>>(
7855            mut self,
7856            field: T,
7857        ) -> Self {
7858            self.set_lowest_available_checkpoint_objects(field.into());
7859            self
7860        }
7861        ///If `server` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7862        pub fn server_opt_mut(&mut self) -> Option<&mut String> {
7863            self.server.as_mut().map(|field| field as _)
7864        }
7865        ///Returns a mutable reference to `server`.
7866        ///If the field is unset, it is first initialized with the default value.
7867        pub fn server_mut(&mut self) -> &mut String {
7868            self.server.get_or_insert_default()
7869        }
7870        ///If `server` is set, returns [`Some`] with the value; otherwise returns [`None`].
7871        pub fn server_opt(&self) -> Option<&str> {
7872            self.server.as_ref().map(|field| field as _)
7873        }
7874        ///Sets `server` with the provided value.
7875        pub fn set_server<T: Into<String>>(&mut self, field: T) {
7876            self.server = Some(field.into().into());
7877        }
7878        ///Sets `server` with the provided value.
7879        pub fn with_server<T: Into<String>>(mut self, field: T) -> Self {
7880            self.set_server(field.into());
7881            self
7882        }
7883    }
7884    impl super::GetTransactionRequest {
7885        pub const fn const_default() -> Self {
7886            Self {
7887                digest: None,
7888                read_mask: None,
7889            }
7890        }
7891        #[doc(hidden)]
7892        pub fn default_instance() -> &'static Self {
7893            static DEFAULT: super::GetTransactionRequest = super::GetTransactionRequest::const_default();
7894            &DEFAULT
7895        }
7896        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7897        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
7898            self.digest.as_mut().map(|field| field as _)
7899        }
7900        ///Returns a mutable reference to `digest`.
7901        ///If the field is unset, it is first initialized with the default value.
7902        pub fn digest_mut(&mut self) -> &mut String {
7903            self.digest.get_or_insert_default()
7904        }
7905        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
7906        pub fn digest_opt(&self) -> Option<&str> {
7907            self.digest.as_ref().map(|field| field as _)
7908        }
7909        ///Sets `digest` with the provided value.
7910        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
7911            self.digest = Some(field.into().into());
7912        }
7913        ///Sets `digest` with the provided value.
7914        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
7915            self.set_digest(field.into());
7916            self
7917        }
7918        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7919        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
7920            self.read_mask.as_mut().map(|field| field as _)
7921        }
7922        ///Returns a mutable reference to `read_mask`.
7923        ///If the field is unset, it is first initialized with the default value.
7924        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
7925            self.read_mask.get_or_insert_default()
7926        }
7927        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
7928        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
7929            self.read_mask.as_ref().map(|field| field as _)
7930        }
7931        ///Sets `read_mask` with the provided value.
7932        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
7933            self.read_mask = Some(field.into().into());
7934        }
7935        ///Sets `read_mask` with the provided value.
7936        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
7937            mut self,
7938            field: T,
7939        ) -> Self {
7940            self.set_read_mask(field.into());
7941            self
7942        }
7943    }
7944    impl super::GetTransactionResponse {
7945        pub const fn const_default() -> Self {
7946            Self { transaction: None }
7947        }
7948        #[doc(hidden)]
7949        pub fn default_instance() -> &'static Self {
7950            static DEFAULT: super::GetTransactionResponse = super::GetTransactionResponse::const_default();
7951            &DEFAULT
7952        }
7953        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
7954        pub fn transaction(&self) -> &super::ExecutedTransaction {
7955            self.transaction
7956                .as_ref()
7957                .map(|field| field as _)
7958                .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
7959        }
7960        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7961        pub fn transaction_opt_mut(
7962            &mut self,
7963        ) -> Option<&mut super::ExecutedTransaction> {
7964            self.transaction.as_mut().map(|field| field as _)
7965        }
7966        ///Returns a mutable reference to `transaction`.
7967        ///If the field is unset, it is first initialized with the default value.
7968        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
7969            self.transaction.get_or_insert_default()
7970        }
7971        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
7972        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
7973            self.transaction.as_ref().map(|field| field as _)
7974        }
7975        ///Sets `transaction` with the provided value.
7976        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
7977            &mut self,
7978            field: T,
7979        ) {
7980            self.transaction = Some(field.into().into());
7981        }
7982        ///Sets `transaction` with the provided value.
7983        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
7984            mut self,
7985            field: T,
7986        ) -> Self {
7987            self.set_transaction(field.into());
7988            self
7989        }
7990    }
7991    impl super::GetTransactionResult {
7992        pub const fn const_default() -> Self {
7993            Self { result: None }
7994        }
7995        #[doc(hidden)]
7996        pub fn default_instance() -> &'static Self {
7997            static DEFAULT: super::GetTransactionResult = super::GetTransactionResult::const_default();
7998            &DEFAULT
7999        }
8000        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
8001        pub fn transaction(&self) -> &super::ExecutedTransaction {
8002            if let Some(super::get_transaction_result::Result::Transaction(field)) = &self
8003                .result
8004            {
8005                field as _
8006            } else {
8007                super::ExecutedTransaction::default_instance() as _
8008            }
8009        }
8010        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
8011        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
8012            if let Some(super::get_transaction_result::Result::Transaction(field)) = &self
8013                .result
8014            {
8015                Some(field as _)
8016            } else {
8017                None
8018            }
8019        }
8020        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8021        pub fn transaction_opt_mut(
8022            &mut self,
8023        ) -> Option<&mut super::ExecutedTransaction> {
8024            if let Some(super::get_transaction_result::Result::Transaction(field)) = &mut self
8025                .result
8026            {
8027                Some(field as _)
8028            } else {
8029                None
8030            }
8031        }
8032        ///Returns a mutable reference to `transaction`.
8033        ///If the field is unset, it is first initialized with the default value.
8034        ///If any other oneof field in the same oneof is set, it will be cleared.
8035        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
8036            if self.transaction_opt_mut().is_none() {
8037                self.result = Some(
8038                    super::get_transaction_result::Result::Transaction(
8039                        super::ExecutedTransaction::default(),
8040                    ),
8041                );
8042            }
8043            self.transaction_opt_mut().unwrap()
8044        }
8045        ///Sets `transaction` with the provided value.
8046        ///If any other oneof field in the same oneof is set, it will be cleared.
8047        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
8048            &mut self,
8049            field: T,
8050        ) {
8051            self.result = Some(
8052                super::get_transaction_result::Result::Transaction(field.into().into()),
8053            );
8054        }
8055        ///Sets `transaction` with the provided value.
8056        ///If any other oneof field in the same oneof is set, it will be cleared.
8057        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
8058            mut self,
8059            field: T,
8060        ) -> Self {
8061            self.set_transaction(field.into());
8062            self
8063        }
8064        ///Returns the value of `error`, or the default value if `error` is unset.
8065        pub fn error(&self) -> &super::super::super::super::google::rpc::Status {
8066            if let Some(super::get_transaction_result::Result::Error(field)) = &self
8067                .result
8068            {
8069                field as _
8070            } else {
8071                super::super::super::super::google::rpc::Status::default_instance() as _
8072            }
8073        }
8074        ///If `error` is set, returns [`Some`] with the value; otherwise returns [`None`].
8075        pub fn error_opt(
8076            &self,
8077        ) -> Option<&super::super::super::super::google::rpc::Status> {
8078            if let Some(super::get_transaction_result::Result::Error(field)) = &self
8079                .result
8080            {
8081                Some(field as _)
8082            } else {
8083                None
8084            }
8085        }
8086        ///If `error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8087        pub fn error_opt_mut(
8088            &mut self,
8089        ) -> Option<&mut super::super::super::super::google::rpc::Status> {
8090            if let Some(super::get_transaction_result::Result::Error(field)) = &mut self
8091                .result
8092            {
8093                Some(field as _)
8094            } else {
8095                None
8096            }
8097        }
8098        ///Returns a mutable reference to `error`.
8099        ///If the field is unset, it is first initialized with the default value.
8100        ///If any other oneof field in the same oneof is set, it will be cleared.
8101        pub fn error_mut(
8102            &mut self,
8103        ) -> &mut super::super::super::super::google::rpc::Status {
8104            if self.error_opt_mut().is_none() {
8105                self.result = Some(
8106                    super::get_transaction_result::Result::Error(
8107                        super::super::super::super::google::rpc::Status::default(),
8108                    ),
8109                );
8110            }
8111            self.error_opt_mut().unwrap()
8112        }
8113        ///Sets `error` with the provided value.
8114        ///If any other oneof field in the same oneof is set, it will be cleared.
8115        pub fn set_error<T: Into<super::super::super::super::google::rpc::Status>>(
8116            &mut self,
8117            field: T,
8118        ) {
8119            self.result = Some(
8120                super::get_transaction_result::Result::Error(field.into().into()),
8121            );
8122        }
8123        ///Sets `error` with the provided value.
8124        ///If any other oneof field in the same oneof is set, it will be cleared.
8125        pub fn with_error<T: Into<super::super::super::super::google::rpc::Status>>(
8126            mut self,
8127            field: T,
8128        ) -> Self {
8129            self.set_error(field.into());
8130            self
8131        }
8132    }
8133    impl super::IndexError {
8134        pub const fn const_default() -> Self {
8135            Self {
8136                index: None,
8137                subresult: None,
8138            }
8139        }
8140        #[doc(hidden)]
8141        pub fn default_instance() -> &'static Self {
8142            static DEFAULT: super::IndexError = super::IndexError::const_default();
8143            &DEFAULT
8144        }
8145        ///If `index` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8146        pub fn index_opt_mut(&mut self) -> Option<&mut u32> {
8147            self.index.as_mut().map(|field| field as _)
8148        }
8149        ///Returns a mutable reference to `index`.
8150        ///If the field is unset, it is first initialized with the default value.
8151        pub fn index_mut(&mut self) -> &mut u32 {
8152            self.index.get_or_insert_default()
8153        }
8154        ///If `index` is set, returns [`Some`] with the value; otherwise returns [`None`].
8155        pub fn index_opt(&self) -> Option<u32> {
8156            self.index.as_ref().map(|field| *field)
8157        }
8158        ///Sets `index` with the provided value.
8159        pub fn set_index<T: Into<u32>>(&mut self, field: T) {
8160            self.index = Some(field.into().into());
8161        }
8162        ///Sets `index` with the provided value.
8163        pub fn with_index<T: Into<u32>>(mut self, field: T) -> Self {
8164            self.set_index(field.into());
8165            self
8166        }
8167        ///If `subresult` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8168        pub fn subresult_opt_mut(&mut self) -> Option<&mut u32> {
8169            self.subresult.as_mut().map(|field| field as _)
8170        }
8171        ///Returns a mutable reference to `subresult`.
8172        ///If the field is unset, it is first initialized with the default value.
8173        pub fn subresult_mut(&mut self) -> &mut u32 {
8174            self.subresult.get_or_insert_default()
8175        }
8176        ///If `subresult` is set, returns [`Some`] with the value; otherwise returns [`None`].
8177        pub fn subresult_opt(&self) -> Option<u32> {
8178            self.subresult.as_ref().map(|field| *field)
8179        }
8180        ///Sets `subresult` with the provided value.
8181        pub fn set_subresult<T: Into<u32>>(&mut self, field: T) {
8182            self.subresult = Some(field.into().into());
8183        }
8184        ///Sets `subresult` with the provided value.
8185        pub fn with_subresult<T: Into<u32>>(mut self, field: T) -> Self {
8186            self.set_subresult(field.into());
8187            self
8188        }
8189    }
8190    impl super::Input {
8191        pub const fn const_default() -> Self {
8192            Self {
8193                kind: None,
8194                pure: None,
8195                object_id: None,
8196                version: None,
8197                digest: None,
8198                mutable: None,
8199                literal: None,
8200            }
8201        }
8202        #[doc(hidden)]
8203        pub fn default_instance() -> &'static Self {
8204            static DEFAULT: super::Input = super::Input::const_default();
8205            &DEFAULT
8206        }
8207        ///Sets `kind` with the provided value.
8208        pub fn with_kind<T: Into<super::input::InputKind>>(mut self, field: T) -> Self {
8209            self.set_kind(field.into());
8210            self
8211        }
8212        ///If `pure` is set, returns [`Some`] with the value; otherwise returns [`None`].
8213        pub fn pure_opt(&self) -> Option<&[u8]> {
8214            self.pure.as_ref().map(|field| field as _)
8215        }
8216        ///Sets `pure` with the provided value.
8217        pub fn set_pure<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
8218            self.pure = Some(field.into().into());
8219        }
8220        ///Sets `pure` with the provided value.
8221        pub fn with_pure<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
8222            self.set_pure(field.into());
8223            self
8224        }
8225        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8226        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
8227            self.object_id.as_mut().map(|field| field as _)
8228        }
8229        ///Returns a mutable reference to `object_id`.
8230        ///If the field is unset, it is first initialized with the default value.
8231        pub fn object_id_mut(&mut self) -> &mut String {
8232            self.object_id.get_or_insert_default()
8233        }
8234        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
8235        pub fn object_id_opt(&self) -> Option<&str> {
8236            self.object_id.as_ref().map(|field| field as _)
8237        }
8238        ///Sets `object_id` with the provided value.
8239        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
8240            self.object_id = Some(field.into().into());
8241        }
8242        ///Sets `object_id` with the provided value.
8243        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
8244            self.set_object_id(field.into());
8245            self
8246        }
8247        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8248        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
8249            self.version.as_mut().map(|field| field as _)
8250        }
8251        ///Returns a mutable reference to `version`.
8252        ///If the field is unset, it is first initialized with the default value.
8253        pub fn version_mut(&mut self) -> &mut u64 {
8254            self.version.get_or_insert_default()
8255        }
8256        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
8257        pub fn version_opt(&self) -> Option<u64> {
8258            self.version.as_ref().map(|field| *field)
8259        }
8260        ///Sets `version` with the provided value.
8261        pub fn set_version<T: Into<u64>>(&mut self, field: T) {
8262            self.version = Some(field.into().into());
8263        }
8264        ///Sets `version` with the provided value.
8265        pub fn with_version<T: Into<u64>>(mut self, field: T) -> Self {
8266            self.set_version(field.into());
8267            self
8268        }
8269        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8270        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
8271            self.digest.as_mut().map(|field| field as _)
8272        }
8273        ///Returns a mutable reference to `digest`.
8274        ///If the field is unset, it is first initialized with the default value.
8275        pub fn digest_mut(&mut self) -> &mut String {
8276            self.digest.get_or_insert_default()
8277        }
8278        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
8279        pub fn digest_opt(&self) -> Option<&str> {
8280            self.digest.as_ref().map(|field| field as _)
8281        }
8282        ///Sets `digest` with the provided value.
8283        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
8284            self.digest = Some(field.into().into());
8285        }
8286        ///Sets `digest` with the provided value.
8287        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
8288            self.set_digest(field.into());
8289            self
8290        }
8291        ///If `mutable` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8292        pub fn mutable_opt_mut(&mut self) -> Option<&mut bool> {
8293            self.mutable.as_mut().map(|field| field as _)
8294        }
8295        ///Returns a mutable reference to `mutable`.
8296        ///If the field is unset, it is first initialized with the default value.
8297        pub fn mutable_mut(&mut self) -> &mut bool {
8298            self.mutable.get_or_insert_default()
8299        }
8300        ///If `mutable` is set, returns [`Some`] with the value; otherwise returns [`None`].
8301        pub fn mutable_opt(&self) -> Option<bool> {
8302            self.mutable.as_ref().map(|field| *field)
8303        }
8304        ///Sets `mutable` with the provided value.
8305        pub fn set_mutable<T: Into<bool>>(&mut self, field: T) {
8306            self.mutable = Some(field.into().into());
8307        }
8308        ///Sets `mutable` with the provided value.
8309        pub fn with_mutable<T: Into<bool>>(mut self, field: T) -> Self {
8310            self.set_mutable(field.into());
8311            self
8312        }
8313        ///If `literal` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8314        pub fn literal_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
8315            self.literal.as_mut().map(|field| field as _)
8316        }
8317        ///Returns a mutable reference to `literal`.
8318        ///If the field is unset, it is first initialized with the default value.
8319        pub fn literal_mut(&mut self) -> &mut ::prost_types::Value {
8320            self.literal.get_or_insert_default()
8321        }
8322        ///If `literal` is set, returns [`Some`] with the value; otherwise returns [`None`].
8323        pub fn literal_opt(&self) -> Option<&::prost_types::Value> {
8324            self.literal.as_ref().map(|field| field as _)
8325        }
8326        ///Sets `literal` with the provided value.
8327        pub fn set_literal<T: Into<::prost_types::Value>>(&mut self, field: T) {
8328            self.literal = Some(field.into().into());
8329        }
8330        ///Sets `literal` with the provided value.
8331        pub fn with_literal<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
8332            self.set_literal(field.into());
8333            self
8334        }
8335    }
8336    impl super::Jwk {
8337        pub const fn const_default() -> Self {
8338            Self {
8339                kty: None,
8340                e: None,
8341                n: None,
8342                alg: None,
8343            }
8344        }
8345        #[doc(hidden)]
8346        pub fn default_instance() -> &'static Self {
8347            static DEFAULT: super::Jwk = super::Jwk::const_default();
8348            &DEFAULT
8349        }
8350        ///If `kty` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8351        pub fn kty_opt_mut(&mut self) -> Option<&mut String> {
8352            self.kty.as_mut().map(|field| field as _)
8353        }
8354        ///Returns a mutable reference to `kty`.
8355        ///If the field is unset, it is first initialized with the default value.
8356        pub fn kty_mut(&mut self) -> &mut String {
8357            self.kty.get_or_insert_default()
8358        }
8359        ///If `kty` is set, returns [`Some`] with the value; otherwise returns [`None`].
8360        pub fn kty_opt(&self) -> Option<&str> {
8361            self.kty.as_ref().map(|field| field as _)
8362        }
8363        ///Sets `kty` with the provided value.
8364        pub fn set_kty<T: Into<String>>(&mut self, field: T) {
8365            self.kty = Some(field.into().into());
8366        }
8367        ///Sets `kty` with the provided value.
8368        pub fn with_kty<T: Into<String>>(mut self, field: T) -> Self {
8369            self.set_kty(field.into());
8370            self
8371        }
8372        ///If `e` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8373        pub fn e_opt_mut(&mut self) -> Option<&mut String> {
8374            self.e.as_mut().map(|field| field as _)
8375        }
8376        ///Returns a mutable reference to `e`.
8377        ///If the field is unset, it is first initialized with the default value.
8378        pub fn e_mut(&mut self) -> &mut String {
8379            self.e.get_or_insert_default()
8380        }
8381        ///If `e` is set, returns [`Some`] with the value; otherwise returns [`None`].
8382        pub fn e_opt(&self) -> Option<&str> {
8383            self.e.as_ref().map(|field| field as _)
8384        }
8385        ///Sets `e` with the provided value.
8386        pub fn set_e<T: Into<String>>(&mut self, field: T) {
8387            self.e = Some(field.into().into());
8388        }
8389        ///Sets `e` with the provided value.
8390        pub fn with_e<T: Into<String>>(mut self, field: T) -> Self {
8391            self.set_e(field.into());
8392            self
8393        }
8394        ///If `n` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8395        pub fn n_opt_mut(&mut self) -> Option<&mut String> {
8396            self.n.as_mut().map(|field| field as _)
8397        }
8398        ///Returns a mutable reference to `n`.
8399        ///If the field is unset, it is first initialized with the default value.
8400        pub fn n_mut(&mut self) -> &mut String {
8401            self.n.get_or_insert_default()
8402        }
8403        ///If `n` is set, returns [`Some`] with the value; otherwise returns [`None`].
8404        pub fn n_opt(&self) -> Option<&str> {
8405            self.n.as_ref().map(|field| field as _)
8406        }
8407        ///Sets `n` with the provided value.
8408        pub fn set_n<T: Into<String>>(&mut self, field: T) {
8409            self.n = Some(field.into().into());
8410        }
8411        ///Sets `n` with the provided value.
8412        pub fn with_n<T: Into<String>>(mut self, field: T) -> Self {
8413            self.set_n(field.into());
8414            self
8415        }
8416        ///If `alg` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8417        pub fn alg_opt_mut(&mut self) -> Option<&mut String> {
8418            self.alg.as_mut().map(|field| field as _)
8419        }
8420        ///Returns a mutable reference to `alg`.
8421        ///If the field is unset, it is first initialized with the default value.
8422        pub fn alg_mut(&mut self) -> &mut String {
8423            self.alg.get_or_insert_default()
8424        }
8425        ///If `alg` is set, returns [`Some`] with the value; otherwise returns [`None`].
8426        pub fn alg_opt(&self) -> Option<&str> {
8427            self.alg.as_ref().map(|field| field as _)
8428        }
8429        ///Sets `alg` with the provided value.
8430        pub fn set_alg<T: Into<String>>(&mut self, field: T) {
8431            self.alg = Some(field.into().into());
8432        }
8433        ///Sets `alg` with the provided value.
8434        pub fn with_alg<T: Into<String>>(mut self, field: T) -> Self {
8435            self.set_alg(field.into());
8436            self
8437        }
8438    }
8439    impl super::JwkId {
8440        pub const fn const_default() -> Self {
8441            Self { iss: None, kid: None }
8442        }
8443        #[doc(hidden)]
8444        pub fn default_instance() -> &'static Self {
8445            static DEFAULT: super::JwkId = super::JwkId::const_default();
8446            &DEFAULT
8447        }
8448        ///If `iss` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8449        pub fn iss_opt_mut(&mut self) -> Option<&mut String> {
8450            self.iss.as_mut().map(|field| field as _)
8451        }
8452        ///Returns a mutable reference to `iss`.
8453        ///If the field is unset, it is first initialized with the default value.
8454        pub fn iss_mut(&mut self) -> &mut String {
8455            self.iss.get_or_insert_default()
8456        }
8457        ///If `iss` is set, returns [`Some`] with the value; otherwise returns [`None`].
8458        pub fn iss_opt(&self) -> Option<&str> {
8459            self.iss.as_ref().map(|field| field as _)
8460        }
8461        ///Sets `iss` with the provided value.
8462        pub fn set_iss<T: Into<String>>(&mut self, field: T) {
8463            self.iss = Some(field.into().into());
8464        }
8465        ///Sets `iss` with the provided value.
8466        pub fn with_iss<T: Into<String>>(mut self, field: T) -> Self {
8467            self.set_iss(field.into());
8468            self
8469        }
8470        ///If `kid` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8471        pub fn kid_opt_mut(&mut self) -> Option<&mut String> {
8472            self.kid.as_mut().map(|field| field as _)
8473        }
8474        ///Returns a mutable reference to `kid`.
8475        ///If the field is unset, it is first initialized with the default value.
8476        pub fn kid_mut(&mut self) -> &mut String {
8477            self.kid.get_or_insert_default()
8478        }
8479        ///If `kid` is set, returns [`Some`] with the value; otherwise returns [`None`].
8480        pub fn kid_opt(&self) -> Option<&str> {
8481            self.kid.as_ref().map(|field| field as _)
8482        }
8483        ///Sets `kid` with the provided value.
8484        pub fn set_kid<T: Into<String>>(&mut self, field: T) {
8485            self.kid = Some(field.into().into());
8486        }
8487        ///Sets `kid` with the provided value.
8488        pub fn with_kid<T: Into<String>>(mut self, field: T) -> Self {
8489            self.set_kid(field.into());
8490            self
8491        }
8492    }
8493    impl super::Linkage {
8494        pub const fn const_default() -> Self {
8495            Self {
8496                original_id: None,
8497                upgraded_id: None,
8498                upgraded_version: None,
8499            }
8500        }
8501        #[doc(hidden)]
8502        pub fn default_instance() -> &'static Self {
8503            static DEFAULT: super::Linkage = super::Linkage::const_default();
8504            &DEFAULT
8505        }
8506        ///If `original_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8507        pub fn original_id_opt_mut(&mut self) -> Option<&mut String> {
8508            self.original_id.as_mut().map(|field| field as _)
8509        }
8510        ///Returns a mutable reference to `original_id`.
8511        ///If the field is unset, it is first initialized with the default value.
8512        pub fn original_id_mut(&mut self) -> &mut String {
8513            self.original_id.get_or_insert_default()
8514        }
8515        ///If `original_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
8516        pub fn original_id_opt(&self) -> Option<&str> {
8517            self.original_id.as_ref().map(|field| field as _)
8518        }
8519        ///Sets `original_id` with the provided value.
8520        pub fn set_original_id<T: Into<String>>(&mut self, field: T) {
8521            self.original_id = Some(field.into().into());
8522        }
8523        ///Sets `original_id` with the provided value.
8524        pub fn with_original_id<T: Into<String>>(mut self, field: T) -> Self {
8525            self.set_original_id(field.into());
8526            self
8527        }
8528        ///If `upgraded_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8529        pub fn upgraded_id_opt_mut(&mut self) -> Option<&mut String> {
8530            self.upgraded_id.as_mut().map(|field| field as _)
8531        }
8532        ///Returns a mutable reference to `upgraded_id`.
8533        ///If the field is unset, it is first initialized with the default value.
8534        pub fn upgraded_id_mut(&mut self) -> &mut String {
8535            self.upgraded_id.get_or_insert_default()
8536        }
8537        ///If `upgraded_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
8538        pub fn upgraded_id_opt(&self) -> Option<&str> {
8539            self.upgraded_id.as_ref().map(|field| field as _)
8540        }
8541        ///Sets `upgraded_id` with the provided value.
8542        pub fn set_upgraded_id<T: Into<String>>(&mut self, field: T) {
8543            self.upgraded_id = Some(field.into().into());
8544        }
8545        ///Sets `upgraded_id` with the provided value.
8546        pub fn with_upgraded_id<T: Into<String>>(mut self, field: T) -> Self {
8547            self.set_upgraded_id(field.into());
8548            self
8549        }
8550        ///If `upgraded_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8551        pub fn upgraded_version_opt_mut(&mut self) -> Option<&mut u64> {
8552            self.upgraded_version.as_mut().map(|field| field as _)
8553        }
8554        ///Returns a mutable reference to `upgraded_version`.
8555        ///If the field is unset, it is first initialized with the default value.
8556        pub fn upgraded_version_mut(&mut self) -> &mut u64 {
8557            self.upgraded_version.get_or_insert_default()
8558        }
8559        ///If `upgraded_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
8560        pub fn upgraded_version_opt(&self) -> Option<u64> {
8561            self.upgraded_version.as_ref().map(|field| *field)
8562        }
8563        ///Sets `upgraded_version` with the provided value.
8564        pub fn set_upgraded_version<T: Into<u64>>(&mut self, field: T) {
8565            self.upgraded_version = Some(field.into().into());
8566        }
8567        ///Sets `upgraded_version` with the provided value.
8568        pub fn with_upgraded_version<T: Into<u64>>(mut self, field: T) -> Self {
8569            self.set_upgraded_version(field.into());
8570            self
8571        }
8572    }
8573    impl super::ListBalancesRequest {
8574        pub const fn const_default() -> Self {
8575            Self {
8576                owner: None,
8577                page_size: None,
8578                page_token: None,
8579            }
8580        }
8581        #[doc(hidden)]
8582        pub fn default_instance() -> &'static Self {
8583            static DEFAULT: super::ListBalancesRequest = super::ListBalancesRequest::const_default();
8584            &DEFAULT
8585        }
8586        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8587        pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
8588            self.owner.as_mut().map(|field| field as _)
8589        }
8590        ///Returns a mutable reference to `owner`.
8591        ///If the field is unset, it is first initialized with the default value.
8592        pub fn owner_mut(&mut self) -> &mut String {
8593            self.owner.get_or_insert_default()
8594        }
8595        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
8596        pub fn owner_opt(&self) -> Option<&str> {
8597            self.owner.as_ref().map(|field| field as _)
8598        }
8599        ///Sets `owner` with the provided value.
8600        pub fn set_owner<T: Into<String>>(&mut self, field: T) {
8601            self.owner = Some(field.into().into());
8602        }
8603        ///Sets `owner` with the provided value.
8604        pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
8605            self.set_owner(field.into());
8606            self
8607        }
8608        ///If `page_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8609        pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
8610            self.page_size.as_mut().map(|field| field as _)
8611        }
8612        ///Returns a mutable reference to `page_size`.
8613        ///If the field is unset, it is first initialized with the default value.
8614        pub fn page_size_mut(&mut self) -> &mut u32 {
8615            self.page_size.get_or_insert_default()
8616        }
8617        ///If `page_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
8618        pub fn page_size_opt(&self) -> Option<u32> {
8619            self.page_size.as_ref().map(|field| *field)
8620        }
8621        ///Sets `page_size` with the provided value.
8622        pub fn set_page_size<T: Into<u32>>(&mut self, field: T) {
8623            self.page_size = Some(field.into().into());
8624        }
8625        ///Sets `page_size` with the provided value.
8626        pub fn with_page_size<T: Into<u32>>(mut self, field: T) -> Self {
8627            self.set_page_size(field.into());
8628            self
8629        }
8630        ///If `page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
8631        pub fn page_token_opt(&self) -> Option<&[u8]> {
8632            self.page_token.as_ref().map(|field| field as _)
8633        }
8634        ///Sets `page_token` with the provided value.
8635        pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
8636            self.page_token = Some(field.into().into());
8637        }
8638        ///Sets `page_token` with the provided value.
8639        pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
8640            mut self,
8641            field: T,
8642        ) -> Self {
8643            self.set_page_token(field.into());
8644            self
8645        }
8646    }
8647    impl super::ListBalancesResponse {
8648        pub const fn const_default() -> Self {
8649            Self {
8650                balances: Vec::new(),
8651                next_page_token: None,
8652            }
8653        }
8654        #[doc(hidden)]
8655        pub fn default_instance() -> &'static Self {
8656            static DEFAULT: super::ListBalancesResponse = super::ListBalancesResponse::const_default();
8657            &DEFAULT
8658        }
8659        ///Returns the value of `balances`, or the default value if `balances` is unset.
8660        pub fn balances(&self) -> &[super::Balance] {
8661            &self.balances
8662        }
8663        ///Returns a mutable reference to `balances`.
8664        ///If the field is unset, it is first initialized with the default value.
8665        pub fn balances_mut(&mut self) -> &mut Vec<super::Balance> {
8666            &mut self.balances
8667        }
8668        ///Sets `balances` with the provided value.
8669        pub fn set_balances(&mut self, field: Vec<super::Balance>) {
8670            self.balances = field;
8671        }
8672        ///Sets `balances` with the provided value.
8673        pub fn with_balances(mut self, field: Vec<super::Balance>) -> Self {
8674            self.set_balances(field);
8675            self
8676        }
8677        ///If `next_page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
8678        pub fn next_page_token_opt(&self) -> Option<&[u8]> {
8679            self.next_page_token.as_ref().map(|field| field as _)
8680        }
8681        ///Sets `next_page_token` with the provided value.
8682        pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
8683            self.next_page_token = Some(field.into().into());
8684        }
8685        ///Sets `next_page_token` with the provided value.
8686        pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
8687            mut self,
8688            field: T,
8689        ) -> Self {
8690            self.set_next_page_token(field.into());
8691            self
8692        }
8693    }
8694    impl super::ListDynamicFieldsRequest {
8695        pub const fn const_default() -> Self {
8696            Self {
8697                parent: None,
8698                page_size: None,
8699                page_token: None,
8700                read_mask: None,
8701            }
8702        }
8703        #[doc(hidden)]
8704        pub fn default_instance() -> &'static Self {
8705            static DEFAULT: super::ListDynamicFieldsRequest = super::ListDynamicFieldsRequest::const_default();
8706            &DEFAULT
8707        }
8708        ///If `parent` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8709        pub fn parent_opt_mut(&mut self) -> Option<&mut String> {
8710            self.parent.as_mut().map(|field| field as _)
8711        }
8712        ///Returns a mutable reference to `parent`.
8713        ///If the field is unset, it is first initialized with the default value.
8714        pub fn parent_mut(&mut self) -> &mut String {
8715            self.parent.get_or_insert_default()
8716        }
8717        ///If `parent` is set, returns [`Some`] with the value; otherwise returns [`None`].
8718        pub fn parent_opt(&self) -> Option<&str> {
8719            self.parent.as_ref().map(|field| field as _)
8720        }
8721        ///Sets `parent` with the provided value.
8722        pub fn set_parent<T: Into<String>>(&mut self, field: T) {
8723            self.parent = Some(field.into().into());
8724        }
8725        ///Sets `parent` with the provided value.
8726        pub fn with_parent<T: Into<String>>(mut self, field: T) -> Self {
8727            self.set_parent(field.into());
8728            self
8729        }
8730        ///If `page_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8731        pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
8732            self.page_size.as_mut().map(|field| field as _)
8733        }
8734        ///Returns a mutable reference to `page_size`.
8735        ///If the field is unset, it is first initialized with the default value.
8736        pub fn page_size_mut(&mut self) -> &mut u32 {
8737            self.page_size.get_or_insert_default()
8738        }
8739        ///If `page_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
8740        pub fn page_size_opt(&self) -> Option<u32> {
8741            self.page_size.as_ref().map(|field| *field)
8742        }
8743        ///Sets `page_size` with the provided value.
8744        pub fn set_page_size<T: Into<u32>>(&mut self, field: T) {
8745            self.page_size = Some(field.into().into());
8746        }
8747        ///Sets `page_size` with the provided value.
8748        pub fn with_page_size<T: Into<u32>>(mut self, field: T) -> Self {
8749            self.set_page_size(field.into());
8750            self
8751        }
8752        ///If `page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
8753        pub fn page_token_opt(&self) -> Option<&[u8]> {
8754            self.page_token.as_ref().map(|field| field as _)
8755        }
8756        ///Sets `page_token` with the provided value.
8757        pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
8758            self.page_token = Some(field.into().into());
8759        }
8760        ///Sets `page_token` with the provided value.
8761        pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
8762            mut self,
8763            field: T,
8764        ) -> Self {
8765            self.set_page_token(field.into());
8766            self
8767        }
8768        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8769        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
8770            self.read_mask.as_mut().map(|field| field as _)
8771        }
8772        ///Returns a mutable reference to `read_mask`.
8773        ///If the field is unset, it is first initialized with the default value.
8774        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
8775            self.read_mask.get_or_insert_default()
8776        }
8777        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
8778        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
8779            self.read_mask.as_ref().map(|field| field as _)
8780        }
8781        ///Sets `read_mask` with the provided value.
8782        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
8783            self.read_mask = Some(field.into().into());
8784        }
8785        ///Sets `read_mask` with the provided value.
8786        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
8787            mut self,
8788            field: T,
8789        ) -> Self {
8790            self.set_read_mask(field.into());
8791            self
8792        }
8793    }
8794    impl super::ListDynamicFieldsResponse {
8795        pub const fn const_default() -> Self {
8796            Self {
8797                dynamic_fields: Vec::new(),
8798                next_page_token: None,
8799            }
8800        }
8801        #[doc(hidden)]
8802        pub fn default_instance() -> &'static Self {
8803            static DEFAULT: super::ListDynamicFieldsResponse = super::ListDynamicFieldsResponse::const_default();
8804            &DEFAULT
8805        }
8806        ///Returns the value of `dynamic_fields`, or the default value if `dynamic_fields` is unset.
8807        pub fn dynamic_fields(&self) -> &[super::DynamicField] {
8808            &self.dynamic_fields
8809        }
8810        ///Returns a mutable reference to `dynamic_fields`.
8811        ///If the field is unset, it is first initialized with the default value.
8812        pub fn dynamic_fields_mut(&mut self) -> &mut Vec<super::DynamicField> {
8813            &mut self.dynamic_fields
8814        }
8815        ///Sets `dynamic_fields` with the provided value.
8816        pub fn set_dynamic_fields(&mut self, field: Vec<super::DynamicField>) {
8817            self.dynamic_fields = field;
8818        }
8819        ///Sets `dynamic_fields` with the provided value.
8820        pub fn with_dynamic_fields(mut self, field: Vec<super::DynamicField>) -> Self {
8821            self.set_dynamic_fields(field);
8822            self
8823        }
8824        ///If `next_page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
8825        pub fn next_page_token_opt(&self) -> Option<&[u8]> {
8826            self.next_page_token.as_ref().map(|field| field as _)
8827        }
8828        ///Sets `next_page_token` with the provided value.
8829        pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
8830            self.next_page_token = Some(field.into().into());
8831        }
8832        ///Sets `next_page_token` with the provided value.
8833        pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
8834            mut self,
8835            field: T,
8836        ) -> Self {
8837            self.set_next_page_token(field.into());
8838            self
8839        }
8840    }
8841    impl super::ListOwnedObjectsRequest {
8842        pub const fn const_default() -> Self {
8843            Self {
8844                owner: None,
8845                page_size: None,
8846                page_token: None,
8847                read_mask: None,
8848                object_type: None,
8849            }
8850        }
8851        #[doc(hidden)]
8852        pub fn default_instance() -> &'static Self {
8853            static DEFAULT: super::ListOwnedObjectsRequest = super::ListOwnedObjectsRequest::const_default();
8854            &DEFAULT
8855        }
8856        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8857        pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
8858            self.owner.as_mut().map(|field| field as _)
8859        }
8860        ///Returns a mutable reference to `owner`.
8861        ///If the field is unset, it is first initialized with the default value.
8862        pub fn owner_mut(&mut self) -> &mut String {
8863            self.owner.get_or_insert_default()
8864        }
8865        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
8866        pub fn owner_opt(&self) -> Option<&str> {
8867            self.owner.as_ref().map(|field| field as _)
8868        }
8869        ///Sets `owner` with the provided value.
8870        pub fn set_owner<T: Into<String>>(&mut self, field: T) {
8871            self.owner = Some(field.into().into());
8872        }
8873        ///Sets `owner` with the provided value.
8874        pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
8875            self.set_owner(field.into());
8876            self
8877        }
8878        ///If `page_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8879        pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
8880            self.page_size.as_mut().map(|field| field as _)
8881        }
8882        ///Returns a mutable reference to `page_size`.
8883        ///If the field is unset, it is first initialized with the default value.
8884        pub fn page_size_mut(&mut self) -> &mut u32 {
8885            self.page_size.get_or_insert_default()
8886        }
8887        ///If `page_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
8888        pub fn page_size_opt(&self) -> Option<u32> {
8889            self.page_size.as_ref().map(|field| *field)
8890        }
8891        ///Sets `page_size` with the provided value.
8892        pub fn set_page_size<T: Into<u32>>(&mut self, field: T) {
8893            self.page_size = Some(field.into().into());
8894        }
8895        ///Sets `page_size` with the provided value.
8896        pub fn with_page_size<T: Into<u32>>(mut self, field: T) -> Self {
8897            self.set_page_size(field.into());
8898            self
8899        }
8900        ///If `page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
8901        pub fn page_token_opt(&self) -> Option<&[u8]> {
8902            self.page_token.as_ref().map(|field| field as _)
8903        }
8904        ///Sets `page_token` with the provided value.
8905        pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
8906            self.page_token = Some(field.into().into());
8907        }
8908        ///Sets `page_token` with the provided value.
8909        pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
8910            mut self,
8911            field: T,
8912        ) -> Self {
8913            self.set_page_token(field.into());
8914            self
8915        }
8916        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8917        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
8918            self.read_mask.as_mut().map(|field| field as _)
8919        }
8920        ///Returns a mutable reference to `read_mask`.
8921        ///If the field is unset, it is first initialized with the default value.
8922        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
8923            self.read_mask.get_or_insert_default()
8924        }
8925        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
8926        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
8927            self.read_mask.as_ref().map(|field| field as _)
8928        }
8929        ///Sets `read_mask` with the provided value.
8930        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
8931            self.read_mask = Some(field.into().into());
8932        }
8933        ///Sets `read_mask` with the provided value.
8934        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
8935            mut self,
8936            field: T,
8937        ) -> Self {
8938            self.set_read_mask(field.into());
8939            self
8940        }
8941        ///If `object_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8942        pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
8943            self.object_type.as_mut().map(|field| field as _)
8944        }
8945        ///Returns a mutable reference to `object_type`.
8946        ///If the field is unset, it is first initialized with the default value.
8947        pub fn object_type_mut(&mut self) -> &mut String {
8948            self.object_type.get_or_insert_default()
8949        }
8950        ///If `object_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
8951        pub fn object_type_opt(&self) -> Option<&str> {
8952            self.object_type.as_ref().map(|field| field as _)
8953        }
8954        ///Sets `object_type` with the provided value.
8955        pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
8956            self.object_type = Some(field.into().into());
8957        }
8958        ///Sets `object_type` with the provided value.
8959        pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
8960            self.set_object_type(field.into());
8961            self
8962        }
8963    }
8964    impl super::ListOwnedObjectsResponse {
8965        pub const fn const_default() -> Self {
8966            Self {
8967                objects: Vec::new(),
8968                next_page_token: None,
8969            }
8970        }
8971        #[doc(hidden)]
8972        pub fn default_instance() -> &'static Self {
8973            static DEFAULT: super::ListOwnedObjectsResponse = super::ListOwnedObjectsResponse::const_default();
8974            &DEFAULT
8975        }
8976        ///Returns the value of `objects`, or the default value if `objects` is unset.
8977        pub fn objects(&self) -> &[super::Object] {
8978            &self.objects
8979        }
8980        ///Returns a mutable reference to `objects`.
8981        ///If the field is unset, it is first initialized with the default value.
8982        pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
8983            &mut self.objects
8984        }
8985        ///Sets `objects` with the provided value.
8986        pub fn set_objects(&mut self, field: Vec<super::Object>) {
8987            self.objects = field;
8988        }
8989        ///Sets `objects` with the provided value.
8990        pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
8991            self.set_objects(field);
8992            self
8993        }
8994        ///If `next_page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
8995        pub fn next_page_token_opt(&self) -> Option<&[u8]> {
8996            self.next_page_token.as_ref().map(|field| field as _)
8997        }
8998        ///Sets `next_page_token` with the provided value.
8999        pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9000            self.next_page_token = Some(field.into().into());
9001        }
9002        ///Sets `next_page_token` with the provided value.
9003        pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
9004            mut self,
9005            field: T,
9006        ) -> Self {
9007            self.set_next_page_token(field.into());
9008            self
9009        }
9010    }
9011    impl super::ListPackageVersionsRequest {
9012        pub const fn const_default() -> Self {
9013            Self {
9014                package_id: None,
9015                page_size: None,
9016                page_token: None,
9017            }
9018        }
9019        #[doc(hidden)]
9020        pub fn default_instance() -> &'static Self {
9021            static DEFAULT: super::ListPackageVersionsRequest = super::ListPackageVersionsRequest::const_default();
9022            &DEFAULT
9023        }
9024        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9025        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
9026            self.package_id.as_mut().map(|field| field as _)
9027        }
9028        ///Returns a mutable reference to `package_id`.
9029        ///If the field is unset, it is first initialized with the default value.
9030        pub fn package_id_mut(&mut self) -> &mut String {
9031            self.package_id.get_or_insert_default()
9032        }
9033        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
9034        pub fn package_id_opt(&self) -> Option<&str> {
9035            self.package_id.as_ref().map(|field| field as _)
9036        }
9037        ///Sets `package_id` with the provided value.
9038        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
9039            self.package_id = Some(field.into().into());
9040        }
9041        ///Sets `package_id` with the provided value.
9042        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
9043            self.set_package_id(field.into());
9044            self
9045        }
9046        ///If `page_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9047        pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
9048            self.page_size.as_mut().map(|field| field as _)
9049        }
9050        ///Returns a mutable reference to `page_size`.
9051        ///If the field is unset, it is first initialized with the default value.
9052        pub fn page_size_mut(&mut self) -> &mut u32 {
9053            self.page_size.get_or_insert_default()
9054        }
9055        ///If `page_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
9056        pub fn page_size_opt(&self) -> Option<u32> {
9057            self.page_size.as_ref().map(|field| *field)
9058        }
9059        ///Sets `page_size` with the provided value.
9060        pub fn set_page_size<T: Into<u32>>(&mut self, field: T) {
9061            self.page_size = Some(field.into().into());
9062        }
9063        ///Sets `page_size` with the provided value.
9064        pub fn with_page_size<T: Into<u32>>(mut self, field: T) -> Self {
9065            self.set_page_size(field.into());
9066            self
9067        }
9068        ///If `page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
9069        pub fn page_token_opt(&self) -> Option<&[u8]> {
9070            self.page_token.as_ref().map(|field| field as _)
9071        }
9072        ///Sets `page_token` with the provided value.
9073        pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9074            self.page_token = Some(field.into().into());
9075        }
9076        ///Sets `page_token` with the provided value.
9077        pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
9078            mut self,
9079            field: T,
9080        ) -> Self {
9081            self.set_page_token(field.into());
9082            self
9083        }
9084    }
9085    impl super::ListPackageVersionsResponse {
9086        pub const fn const_default() -> Self {
9087            Self {
9088                versions: Vec::new(),
9089                next_page_token: None,
9090            }
9091        }
9092        #[doc(hidden)]
9093        pub fn default_instance() -> &'static Self {
9094            static DEFAULT: super::ListPackageVersionsResponse = super::ListPackageVersionsResponse::const_default();
9095            &DEFAULT
9096        }
9097        ///Returns the value of `versions`, or the default value if `versions` is unset.
9098        pub fn versions(&self) -> &[super::PackageVersion] {
9099            &self.versions
9100        }
9101        ///Returns a mutable reference to `versions`.
9102        ///If the field is unset, it is first initialized with the default value.
9103        pub fn versions_mut(&mut self) -> &mut Vec<super::PackageVersion> {
9104            &mut self.versions
9105        }
9106        ///Sets `versions` with the provided value.
9107        pub fn set_versions(&mut self, field: Vec<super::PackageVersion>) {
9108            self.versions = field;
9109        }
9110        ///Sets `versions` with the provided value.
9111        pub fn with_versions(mut self, field: Vec<super::PackageVersion>) -> Self {
9112            self.set_versions(field);
9113            self
9114        }
9115        ///If `next_page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
9116        pub fn next_page_token_opt(&self) -> Option<&[u8]> {
9117            self.next_page_token.as_ref().map(|field| field as _)
9118        }
9119        ///Sets `next_page_token` with the provided value.
9120        pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9121            self.next_page_token = Some(field.into().into());
9122        }
9123        ///Sets `next_page_token` with the provided value.
9124        pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
9125            mut self,
9126            field: T,
9127        ) -> Self {
9128            self.set_next_page_token(field.into());
9129            self
9130        }
9131    }
9132    impl super::LookupNameRequest {
9133        pub const fn const_default() -> Self {
9134            Self { name: None }
9135        }
9136        #[doc(hidden)]
9137        pub fn default_instance() -> &'static Self {
9138            static DEFAULT: super::LookupNameRequest = super::LookupNameRequest::const_default();
9139            &DEFAULT
9140        }
9141        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9142        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
9143            self.name.as_mut().map(|field| field as _)
9144        }
9145        ///Returns a mutable reference to `name`.
9146        ///If the field is unset, it is first initialized with the default value.
9147        pub fn name_mut(&mut self) -> &mut String {
9148            self.name.get_or_insert_default()
9149        }
9150        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
9151        pub fn name_opt(&self) -> Option<&str> {
9152            self.name.as_ref().map(|field| field as _)
9153        }
9154        ///Sets `name` with the provided value.
9155        pub fn set_name<T: Into<String>>(&mut self, field: T) {
9156            self.name = Some(field.into().into());
9157        }
9158        ///Sets `name` with the provided value.
9159        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
9160            self.set_name(field.into());
9161            self
9162        }
9163    }
9164    impl super::LookupNameResponse {
9165        pub const fn const_default() -> Self {
9166            Self { record: None }
9167        }
9168        #[doc(hidden)]
9169        pub fn default_instance() -> &'static Self {
9170            static DEFAULT: super::LookupNameResponse = super::LookupNameResponse::const_default();
9171            &DEFAULT
9172        }
9173        ///Returns the value of `record`, or the default value if `record` is unset.
9174        pub fn record(&self) -> &super::NameRecord {
9175            self.record
9176                .as_ref()
9177                .map(|field| field as _)
9178                .unwrap_or_else(|| super::NameRecord::default_instance() as _)
9179        }
9180        ///If `record` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9181        pub fn record_opt_mut(&mut self) -> Option<&mut super::NameRecord> {
9182            self.record.as_mut().map(|field| field as _)
9183        }
9184        ///Returns a mutable reference to `record`.
9185        ///If the field is unset, it is first initialized with the default value.
9186        pub fn record_mut(&mut self) -> &mut super::NameRecord {
9187            self.record.get_or_insert_default()
9188        }
9189        ///If `record` is set, returns [`Some`] with the value; otherwise returns [`None`].
9190        pub fn record_opt(&self) -> Option<&super::NameRecord> {
9191            self.record.as_ref().map(|field| field as _)
9192        }
9193        ///Sets `record` with the provided value.
9194        pub fn set_record<T: Into<super::NameRecord>>(&mut self, field: T) {
9195            self.record = Some(field.into().into());
9196        }
9197        ///Sets `record` with the provided value.
9198        pub fn with_record<T: Into<super::NameRecord>>(mut self, field: T) -> Self {
9199            self.set_record(field.into());
9200            self
9201        }
9202    }
9203    impl super::MakeMoveVector {
9204        pub const fn const_default() -> Self {
9205            Self {
9206                element_type: None,
9207                elements: Vec::new(),
9208            }
9209        }
9210        #[doc(hidden)]
9211        pub fn default_instance() -> &'static Self {
9212            static DEFAULT: super::MakeMoveVector = super::MakeMoveVector::const_default();
9213            &DEFAULT
9214        }
9215        ///If `element_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9216        pub fn element_type_opt_mut(&mut self) -> Option<&mut String> {
9217            self.element_type.as_mut().map(|field| field as _)
9218        }
9219        ///Returns a mutable reference to `element_type`.
9220        ///If the field is unset, it is first initialized with the default value.
9221        pub fn element_type_mut(&mut self) -> &mut String {
9222            self.element_type.get_or_insert_default()
9223        }
9224        ///If `element_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
9225        pub fn element_type_opt(&self) -> Option<&str> {
9226            self.element_type.as_ref().map(|field| field as _)
9227        }
9228        ///Sets `element_type` with the provided value.
9229        pub fn set_element_type<T: Into<String>>(&mut self, field: T) {
9230            self.element_type = Some(field.into().into());
9231        }
9232        ///Sets `element_type` with the provided value.
9233        pub fn with_element_type<T: Into<String>>(mut self, field: T) -> Self {
9234            self.set_element_type(field.into());
9235            self
9236        }
9237        ///Returns the value of `elements`, or the default value if `elements` is unset.
9238        pub fn elements(&self) -> &[super::Argument] {
9239            &self.elements
9240        }
9241        ///Returns a mutable reference to `elements`.
9242        ///If the field is unset, it is first initialized with the default value.
9243        pub fn elements_mut(&mut self) -> &mut Vec<super::Argument> {
9244            &mut self.elements
9245        }
9246        ///Sets `elements` with the provided value.
9247        pub fn set_elements(&mut self, field: Vec<super::Argument>) {
9248            self.elements = field;
9249        }
9250        ///Sets `elements` with the provided value.
9251        pub fn with_elements(mut self, field: Vec<super::Argument>) -> Self {
9252            self.set_elements(field);
9253            self
9254        }
9255    }
9256    impl super::MergeCoins {
9257        pub const fn const_default() -> Self {
9258            Self {
9259                coin: None,
9260                coins_to_merge: Vec::new(),
9261            }
9262        }
9263        #[doc(hidden)]
9264        pub fn default_instance() -> &'static Self {
9265            static DEFAULT: super::MergeCoins = super::MergeCoins::const_default();
9266            &DEFAULT
9267        }
9268        ///Returns the value of `coin`, or the default value if `coin` is unset.
9269        pub fn coin(&self) -> &super::Argument {
9270            self.coin
9271                .as_ref()
9272                .map(|field| field as _)
9273                .unwrap_or_else(|| super::Argument::default_instance() as _)
9274        }
9275        ///If `coin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9276        pub fn coin_opt_mut(&mut self) -> Option<&mut super::Argument> {
9277            self.coin.as_mut().map(|field| field as _)
9278        }
9279        ///Returns a mutable reference to `coin`.
9280        ///If the field is unset, it is first initialized with the default value.
9281        pub fn coin_mut(&mut self) -> &mut super::Argument {
9282            self.coin.get_or_insert_default()
9283        }
9284        ///If `coin` is set, returns [`Some`] with the value; otherwise returns [`None`].
9285        pub fn coin_opt(&self) -> Option<&super::Argument> {
9286            self.coin.as_ref().map(|field| field as _)
9287        }
9288        ///Sets `coin` with the provided value.
9289        pub fn set_coin<T: Into<super::Argument>>(&mut self, field: T) {
9290            self.coin = Some(field.into().into());
9291        }
9292        ///Sets `coin` with the provided value.
9293        pub fn with_coin<T: Into<super::Argument>>(mut self, field: T) -> Self {
9294            self.set_coin(field.into());
9295            self
9296        }
9297        ///Returns the value of `coins_to_merge`, or the default value if `coins_to_merge` is unset.
9298        pub fn coins_to_merge(&self) -> &[super::Argument] {
9299            &self.coins_to_merge
9300        }
9301        ///Returns a mutable reference to `coins_to_merge`.
9302        ///If the field is unset, it is first initialized with the default value.
9303        pub fn coins_to_merge_mut(&mut self) -> &mut Vec<super::Argument> {
9304            &mut self.coins_to_merge
9305        }
9306        ///Sets `coins_to_merge` with the provided value.
9307        pub fn set_coins_to_merge(&mut self, field: Vec<super::Argument>) {
9308            self.coins_to_merge = field;
9309        }
9310        ///Sets `coins_to_merge` with the provided value.
9311        pub fn with_coins_to_merge(mut self, field: Vec<super::Argument>) -> Self {
9312            self.set_coins_to_merge(field);
9313            self
9314        }
9315    }
9316    impl super::Module {
9317        pub const fn const_default() -> Self {
9318            Self {
9319                name: None,
9320                contents: None,
9321                datatypes: Vec::new(),
9322                functions: Vec::new(),
9323            }
9324        }
9325        #[doc(hidden)]
9326        pub fn default_instance() -> &'static Self {
9327            static DEFAULT: super::Module = super::Module::const_default();
9328            &DEFAULT
9329        }
9330        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9331        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
9332            self.name.as_mut().map(|field| field as _)
9333        }
9334        ///Returns a mutable reference to `name`.
9335        ///If the field is unset, it is first initialized with the default value.
9336        pub fn name_mut(&mut self) -> &mut String {
9337            self.name.get_or_insert_default()
9338        }
9339        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
9340        pub fn name_opt(&self) -> Option<&str> {
9341            self.name.as_ref().map(|field| field as _)
9342        }
9343        ///Sets `name` with the provided value.
9344        pub fn set_name<T: Into<String>>(&mut self, field: T) {
9345            self.name = Some(field.into().into());
9346        }
9347        ///Sets `name` with the provided value.
9348        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
9349            self.set_name(field.into());
9350            self
9351        }
9352        ///If `contents` is set, returns [`Some`] with the value; otherwise returns [`None`].
9353        pub fn contents_opt(&self) -> Option<&[u8]> {
9354            self.contents.as_ref().map(|field| field as _)
9355        }
9356        ///Sets `contents` with the provided value.
9357        pub fn set_contents<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9358            self.contents = Some(field.into().into());
9359        }
9360        ///Sets `contents` with the provided value.
9361        pub fn with_contents<T: Into<::prost::bytes::Bytes>>(
9362            mut self,
9363            field: T,
9364        ) -> Self {
9365            self.set_contents(field.into());
9366            self
9367        }
9368        ///Returns the value of `datatypes`, or the default value if `datatypes` is unset.
9369        pub fn datatypes(&self) -> &[super::DatatypeDescriptor] {
9370            &self.datatypes
9371        }
9372        ///Returns a mutable reference to `datatypes`.
9373        ///If the field is unset, it is first initialized with the default value.
9374        pub fn datatypes_mut(&mut self) -> &mut Vec<super::DatatypeDescriptor> {
9375            &mut self.datatypes
9376        }
9377        ///Sets `datatypes` with the provided value.
9378        pub fn set_datatypes(&mut self, field: Vec<super::DatatypeDescriptor>) {
9379            self.datatypes = field;
9380        }
9381        ///Sets `datatypes` with the provided value.
9382        pub fn with_datatypes(mut self, field: Vec<super::DatatypeDescriptor>) -> Self {
9383            self.set_datatypes(field);
9384            self
9385        }
9386        ///Returns the value of `functions`, or the default value if `functions` is unset.
9387        pub fn functions(&self) -> &[super::FunctionDescriptor] {
9388            &self.functions
9389        }
9390        ///Returns a mutable reference to `functions`.
9391        ///If the field is unset, it is first initialized with the default value.
9392        pub fn functions_mut(&mut self) -> &mut Vec<super::FunctionDescriptor> {
9393            &mut self.functions
9394        }
9395        ///Sets `functions` with the provided value.
9396        pub fn set_functions(&mut self, field: Vec<super::FunctionDescriptor>) {
9397            self.functions = field;
9398        }
9399        ///Sets `functions` with the provided value.
9400        pub fn with_functions(mut self, field: Vec<super::FunctionDescriptor>) -> Self {
9401            self.set_functions(field);
9402            self
9403        }
9404    }
9405    impl super::MoveAbort {
9406        pub const fn const_default() -> Self {
9407            Self {
9408                abort_code: None,
9409                location: None,
9410                clever_error: None,
9411            }
9412        }
9413        #[doc(hidden)]
9414        pub fn default_instance() -> &'static Self {
9415            static DEFAULT: super::MoveAbort = super::MoveAbort::const_default();
9416            &DEFAULT
9417        }
9418        ///If `abort_code` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9419        pub fn abort_code_opt_mut(&mut self) -> Option<&mut u64> {
9420            self.abort_code.as_mut().map(|field| field as _)
9421        }
9422        ///Returns a mutable reference to `abort_code`.
9423        ///If the field is unset, it is first initialized with the default value.
9424        pub fn abort_code_mut(&mut self) -> &mut u64 {
9425            self.abort_code.get_or_insert_default()
9426        }
9427        ///If `abort_code` is set, returns [`Some`] with the value; otherwise returns [`None`].
9428        pub fn abort_code_opt(&self) -> Option<u64> {
9429            self.abort_code.as_ref().map(|field| *field)
9430        }
9431        ///Sets `abort_code` with the provided value.
9432        pub fn set_abort_code<T: Into<u64>>(&mut self, field: T) {
9433            self.abort_code = Some(field.into().into());
9434        }
9435        ///Sets `abort_code` with the provided value.
9436        pub fn with_abort_code<T: Into<u64>>(mut self, field: T) -> Self {
9437            self.set_abort_code(field.into());
9438            self
9439        }
9440        ///Returns the value of `location`, or the default value if `location` is unset.
9441        pub fn location(&self) -> &super::MoveLocation {
9442            self.location
9443                .as_ref()
9444                .map(|field| field as _)
9445                .unwrap_or_else(|| super::MoveLocation::default_instance() as _)
9446        }
9447        ///If `location` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9448        pub fn location_opt_mut(&mut self) -> Option<&mut super::MoveLocation> {
9449            self.location.as_mut().map(|field| field as _)
9450        }
9451        ///Returns a mutable reference to `location`.
9452        ///If the field is unset, it is first initialized with the default value.
9453        pub fn location_mut(&mut self) -> &mut super::MoveLocation {
9454            self.location.get_or_insert_default()
9455        }
9456        ///If `location` is set, returns [`Some`] with the value; otherwise returns [`None`].
9457        pub fn location_opt(&self) -> Option<&super::MoveLocation> {
9458            self.location.as_ref().map(|field| field as _)
9459        }
9460        ///Sets `location` with the provided value.
9461        pub fn set_location<T: Into<super::MoveLocation>>(&mut self, field: T) {
9462            self.location = Some(field.into().into());
9463        }
9464        ///Sets `location` with the provided value.
9465        pub fn with_location<T: Into<super::MoveLocation>>(mut self, field: T) -> Self {
9466            self.set_location(field.into());
9467            self
9468        }
9469        ///Returns the value of `clever_error`, or the default value if `clever_error` is unset.
9470        pub fn clever_error(&self) -> &super::CleverError {
9471            self.clever_error
9472                .as_ref()
9473                .map(|field| field as _)
9474                .unwrap_or_else(|| super::CleverError::default_instance() as _)
9475        }
9476        ///If `clever_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9477        pub fn clever_error_opt_mut(&mut self) -> Option<&mut super::CleverError> {
9478            self.clever_error.as_mut().map(|field| field as _)
9479        }
9480        ///Returns a mutable reference to `clever_error`.
9481        ///If the field is unset, it is first initialized with the default value.
9482        pub fn clever_error_mut(&mut self) -> &mut super::CleverError {
9483            self.clever_error.get_or_insert_default()
9484        }
9485        ///If `clever_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
9486        pub fn clever_error_opt(&self) -> Option<&super::CleverError> {
9487            self.clever_error.as_ref().map(|field| field as _)
9488        }
9489        ///Sets `clever_error` with the provided value.
9490        pub fn set_clever_error<T: Into<super::CleverError>>(&mut self, field: T) {
9491            self.clever_error = Some(field.into().into());
9492        }
9493        ///Sets `clever_error` with the provided value.
9494        pub fn with_clever_error<T: Into<super::CleverError>>(
9495            mut self,
9496            field: T,
9497        ) -> Self {
9498            self.set_clever_error(field.into());
9499            self
9500        }
9501    }
9502    impl super::MoveCall {
9503        pub const fn const_default() -> Self {
9504            Self {
9505                package: None,
9506                module: None,
9507                function: None,
9508                type_arguments: Vec::new(),
9509                arguments: Vec::new(),
9510            }
9511        }
9512        #[doc(hidden)]
9513        pub fn default_instance() -> &'static Self {
9514            static DEFAULT: super::MoveCall = super::MoveCall::const_default();
9515            &DEFAULT
9516        }
9517        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9518        pub fn package_opt_mut(&mut self) -> Option<&mut String> {
9519            self.package.as_mut().map(|field| field as _)
9520        }
9521        ///Returns a mutable reference to `package`.
9522        ///If the field is unset, it is first initialized with the default value.
9523        pub fn package_mut(&mut self) -> &mut String {
9524            self.package.get_or_insert_default()
9525        }
9526        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
9527        pub fn package_opt(&self) -> Option<&str> {
9528            self.package.as_ref().map(|field| field as _)
9529        }
9530        ///Sets `package` with the provided value.
9531        pub fn set_package<T: Into<String>>(&mut self, field: T) {
9532            self.package = Some(field.into().into());
9533        }
9534        ///Sets `package` with the provided value.
9535        pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
9536            self.set_package(field.into());
9537            self
9538        }
9539        ///If `module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9540        pub fn module_opt_mut(&mut self) -> Option<&mut String> {
9541            self.module.as_mut().map(|field| field as _)
9542        }
9543        ///Returns a mutable reference to `module`.
9544        ///If the field is unset, it is first initialized with the default value.
9545        pub fn module_mut(&mut self) -> &mut String {
9546            self.module.get_or_insert_default()
9547        }
9548        ///If `module` is set, returns [`Some`] with the value; otherwise returns [`None`].
9549        pub fn module_opt(&self) -> Option<&str> {
9550            self.module.as_ref().map(|field| field as _)
9551        }
9552        ///Sets `module` with the provided value.
9553        pub fn set_module<T: Into<String>>(&mut self, field: T) {
9554            self.module = Some(field.into().into());
9555        }
9556        ///Sets `module` with the provided value.
9557        pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
9558            self.set_module(field.into());
9559            self
9560        }
9561        ///If `function` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9562        pub fn function_opt_mut(&mut self) -> Option<&mut String> {
9563            self.function.as_mut().map(|field| field as _)
9564        }
9565        ///Returns a mutable reference to `function`.
9566        ///If the field is unset, it is first initialized with the default value.
9567        pub fn function_mut(&mut self) -> &mut String {
9568            self.function.get_or_insert_default()
9569        }
9570        ///If `function` is set, returns [`Some`] with the value; otherwise returns [`None`].
9571        pub fn function_opt(&self) -> Option<&str> {
9572            self.function.as_ref().map(|field| field as _)
9573        }
9574        ///Sets `function` with the provided value.
9575        pub fn set_function<T: Into<String>>(&mut self, field: T) {
9576            self.function = Some(field.into().into());
9577        }
9578        ///Sets `function` with the provided value.
9579        pub fn with_function<T: Into<String>>(mut self, field: T) -> Self {
9580            self.set_function(field.into());
9581            self
9582        }
9583        ///Returns the value of `type_arguments`, or the default value if `type_arguments` is unset.
9584        pub fn type_arguments(&self) -> &[String] {
9585            &self.type_arguments
9586        }
9587        ///Returns a mutable reference to `type_arguments`.
9588        ///If the field is unset, it is first initialized with the default value.
9589        pub fn type_arguments_mut(&mut self) -> &mut Vec<String> {
9590            &mut self.type_arguments
9591        }
9592        ///Sets `type_arguments` with the provided value.
9593        pub fn set_type_arguments(&mut self, field: Vec<String>) {
9594            self.type_arguments = field;
9595        }
9596        ///Sets `type_arguments` with the provided value.
9597        pub fn with_type_arguments(mut self, field: Vec<String>) -> Self {
9598            self.set_type_arguments(field);
9599            self
9600        }
9601        ///Returns the value of `arguments`, or the default value if `arguments` is unset.
9602        pub fn arguments(&self) -> &[super::Argument] {
9603            &self.arguments
9604        }
9605        ///Returns a mutable reference to `arguments`.
9606        ///If the field is unset, it is first initialized with the default value.
9607        pub fn arguments_mut(&mut self) -> &mut Vec<super::Argument> {
9608            &mut self.arguments
9609        }
9610        ///Sets `arguments` with the provided value.
9611        pub fn set_arguments(&mut self, field: Vec<super::Argument>) {
9612            self.arguments = field;
9613        }
9614        ///Sets `arguments` with the provided value.
9615        pub fn with_arguments(mut self, field: Vec<super::Argument>) -> Self {
9616            self.set_arguments(field);
9617            self
9618        }
9619    }
9620    impl super::MoveLocation {
9621        pub const fn const_default() -> Self {
9622            Self {
9623                package: None,
9624                module: None,
9625                function: None,
9626                instruction: None,
9627                function_name: None,
9628            }
9629        }
9630        #[doc(hidden)]
9631        pub fn default_instance() -> &'static Self {
9632            static DEFAULT: super::MoveLocation = super::MoveLocation::const_default();
9633            &DEFAULT
9634        }
9635        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9636        pub fn package_opt_mut(&mut self) -> Option<&mut String> {
9637            self.package.as_mut().map(|field| field as _)
9638        }
9639        ///Returns a mutable reference to `package`.
9640        ///If the field is unset, it is first initialized with the default value.
9641        pub fn package_mut(&mut self) -> &mut String {
9642            self.package.get_or_insert_default()
9643        }
9644        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
9645        pub fn package_opt(&self) -> Option<&str> {
9646            self.package.as_ref().map(|field| field as _)
9647        }
9648        ///Sets `package` with the provided value.
9649        pub fn set_package<T: Into<String>>(&mut self, field: T) {
9650            self.package = Some(field.into().into());
9651        }
9652        ///Sets `package` with the provided value.
9653        pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
9654            self.set_package(field.into());
9655            self
9656        }
9657        ///If `module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9658        pub fn module_opt_mut(&mut self) -> Option<&mut String> {
9659            self.module.as_mut().map(|field| field as _)
9660        }
9661        ///Returns a mutable reference to `module`.
9662        ///If the field is unset, it is first initialized with the default value.
9663        pub fn module_mut(&mut self) -> &mut String {
9664            self.module.get_or_insert_default()
9665        }
9666        ///If `module` is set, returns [`Some`] with the value; otherwise returns [`None`].
9667        pub fn module_opt(&self) -> Option<&str> {
9668            self.module.as_ref().map(|field| field as _)
9669        }
9670        ///Sets `module` with the provided value.
9671        pub fn set_module<T: Into<String>>(&mut self, field: T) {
9672            self.module = Some(field.into().into());
9673        }
9674        ///Sets `module` with the provided value.
9675        pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
9676            self.set_module(field.into());
9677            self
9678        }
9679        ///If `function` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9680        pub fn function_opt_mut(&mut self) -> Option<&mut u32> {
9681            self.function.as_mut().map(|field| field as _)
9682        }
9683        ///Returns a mutable reference to `function`.
9684        ///If the field is unset, it is first initialized with the default value.
9685        pub fn function_mut(&mut self) -> &mut u32 {
9686            self.function.get_or_insert_default()
9687        }
9688        ///If `function` is set, returns [`Some`] with the value; otherwise returns [`None`].
9689        pub fn function_opt(&self) -> Option<u32> {
9690            self.function.as_ref().map(|field| *field)
9691        }
9692        ///Sets `function` with the provided value.
9693        pub fn set_function<T: Into<u32>>(&mut self, field: T) {
9694            self.function = Some(field.into().into());
9695        }
9696        ///Sets `function` with the provided value.
9697        pub fn with_function<T: Into<u32>>(mut self, field: T) -> Self {
9698            self.set_function(field.into());
9699            self
9700        }
9701        ///If `instruction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9702        pub fn instruction_opt_mut(&mut self) -> Option<&mut u32> {
9703            self.instruction.as_mut().map(|field| field as _)
9704        }
9705        ///Returns a mutable reference to `instruction`.
9706        ///If the field is unset, it is first initialized with the default value.
9707        pub fn instruction_mut(&mut self) -> &mut u32 {
9708            self.instruction.get_or_insert_default()
9709        }
9710        ///If `instruction` is set, returns [`Some`] with the value; otherwise returns [`None`].
9711        pub fn instruction_opt(&self) -> Option<u32> {
9712            self.instruction.as_ref().map(|field| *field)
9713        }
9714        ///Sets `instruction` with the provided value.
9715        pub fn set_instruction<T: Into<u32>>(&mut self, field: T) {
9716            self.instruction = Some(field.into().into());
9717        }
9718        ///Sets `instruction` with the provided value.
9719        pub fn with_instruction<T: Into<u32>>(mut self, field: T) -> Self {
9720            self.set_instruction(field.into());
9721            self
9722        }
9723        ///If `function_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9724        pub fn function_name_opt_mut(&mut self) -> Option<&mut String> {
9725            self.function_name.as_mut().map(|field| field as _)
9726        }
9727        ///Returns a mutable reference to `function_name`.
9728        ///If the field is unset, it is first initialized with the default value.
9729        pub fn function_name_mut(&mut self) -> &mut String {
9730            self.function_name.get_or_insert_default()
9731        }
9732        ///If `function_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
9733        pub fn function_name_opt(&self) -> Option<&str> {
9734            self.function_name.as_ref().map(|field| field as _)
9735        }
9736        ///Sets `function_name` with the provided value.
9737        pub fn set_function_name<T: Into<String>>(&mut self, field: T) {
9738            self.function_name = Some(field.into().into());
9739        }
9740        ///Sets `function_name` with the provided value.
9741        pub fn with_function_name<T: Into<String>>(mut self, field: T) -> Self {
9742            self.set_function_name(field.into());
9743            self
9744        }
9745    }
9746    impl super::MoveTable {
9747        pub const fn const_default() -> Self {
9748            Self { id: None, size: None }
9749        }
9750        #[doc(hidden)]
9751        pub fn default_instance() -> &'static Self {
9752            static DEFAULT: super::MoveTable = super::MoveTable::const_default();
9753            &DEFAULT
9754        }
9755        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9756        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
9757            self.id.as_mut().map(|field| field as _)
9758        }
9759        ///Returns a mutable reference to `id`.
9760        ///If the field is unset, it is first initialized with the default value.
9761        pub fn id_mut(&mut self) -> &mut String {
9762            self.id.get_or_insert_default()
9763        }
9764        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
9765        pub fn id_opt(&self) -> Option<&str> {
9766            self.id.as_ref().map(|field| field as _)
9767        }
9768        ///Sets `id` with the provided value.
9769        pub fn set_id<T: Into<String>>(&mut self, field: T) {
9770            self.id = Some(field.into().into());
9771        }
9772        ///Sets `id` with the provided value.
9773        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
9774            self.set_id(field.into());
9775            self
9776        }
9777        ///If `size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9778        pub fn size_opt_mut(&mut self) -> Option<&mut u64> {
9779            self.size.as_mut().map(|field| field as _)
9780        }
9781        ///Returns a mutable reference to `size`.
9782        ///If the field is unset, it is first initialized with the default value.
9783        pub fn size_mut(&mut self) -> &mut u64 {
9784            self.size.get_or_insert_default()
9785        }
9786        ///If `size` is set, returns [`Some`] with the value; otherwise returns [`None`].
9787        pub fn size_opt(&self) -> Option<u64> {
9788            self.size.as_ref().map(|field| *field)
9789        }
9790        ///Sets `size` with the provided value.
9791        pub fn set_size<T: Into<u64>>(&mut self, field: T) {
9792            self.size = Some(field.into().into());
9793        }
9794        ///Sets `size` with the provided value.
9795        pub fn with_size<T: Into<u64>>(mut self, field: T) -> Self {
9796            self.set_size(field.into());
9797            self
9798        }
9799    }
9800    impl super::MultisigAggregatedSignature {
9801        pub const fn const_default() -> Self {
9802            Self {
9803                signatures: Vec::new(),
9804                bitmap: None,
9805                legacy_bitmap: None,
9806                committee: None,
9807            }
9808        }
9809        #[doc(hidden)]
9810        pub fn default_instance() -> &'static Self {
9811            static DEFAULT: super::MultisigAggregatedSignature = super::MultisigAggregatedSignature::const_default();
9812            &DEFAULT
9813        }
9814        ///Returns the value of `signatures`, or the default value if `signatures` is unset.
9815        pub fn signatures(&self) -> &[super::MultisigMemberSignature] {
9816            &self.signatures
9817        }
9818        ///Returns a mutable reference to `signatures`.
9819        ///If the field is unset, it is first initialized with the default value.
9820        pub fn signatures_mut(&mut self) -> &mut Vec<super::MultisigMemberSignature> {
9821            &mut self.signatures
9822        }
9823        ///Sets `signatures` with the provided value.
9824        pub fn set_signatures(&mut self, field: Vec<super::MultisigMemberSignature>) {
9825            self.signatures = field;
9826        }
9827        ///Sets `signatures` with the provided value.
9828        pub fn with_signatures(
9829            mut self,
9830            field: Vec<super::MultisigMemberSignature>,
9831        ) -> Self {
9832            self.set_signatures(field);
9833            self
9834        }
9835        ///If `bitmap` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9836        pub fn bitmap_opt_mut(&mut self) -> Option<&mut u32> {
9837            self.bitmap.as_mut().map(|field| field as _)
9838        }
9839        ///Returns a mutable reference to `bitmap`.
9840        ///If the field is unset, it is first initialized with the default value.
9841        pub fn bitmap_mut(&mut self) -> &mut u32 {
9842            self.bitmap.get_or_insert_default()
9843        }
9844        ///If `bitmap` is set, returns [`Some`] with the value; otherwise returns [`None`].
9845        pub fn bitmap_opt(&self) -> Option<u32> {
9846            self.bitmap.as_ref().map(|field| *field)
9847        }
9848        ///Sets `bitmap` with the provided value.
9849        pub fn set_bitmap<T: Into<u32>>(&mut self, field: T) {
9850            self.bitmap = Some(field.into().into());
9851        }
9852        ///Sets `bitmap` with the provided value.
9853        pub fn with_bitmap<T: Into<u32>>(mut self, field: T) -> Self {
9854            self.set_bitmap(field.into());
9855            self
9856        }
9857        ///If `legacy_bitmap` is set, returns [`Some`] with the value; otherwise returns [`None`].
9858        pub fn legacy_bitmap_opt(&self) -> Option<&[u8]> {
9859            self.legacy_bitmap.as_ref().map(|field| field as _)
9860        }
9861        ///Sets `legacy_bitmap` with the provided value.
9862        pub fn set_legacy_bitmap<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9863            self.legacy_bitmap = Some(field.into().into());
9864        }
9865        ///Sets `legacy_bitmap` with the provided value.
9866        pub fn with_legacy_bitmap<T: Into<::prost::bytes::Bytes>>(
9867            mut self,
9868            field: T,
9869        ) -> Self {
9870            self.set_legacy_bitmap(field.into());
9871            self
9872        }
9873        ///Returns the value of `committee`, or the default value if `committee` is unset.
9874        pub fn committee(&self) -> &super::MultisigCommittee {
9875            self.committee
9876                .as_ref()
9877                .map(|field| field as _)
9878                .unwrap_or_else(|| super::MultisigCommittee::default_instance() as _)
9879        }
9880        ///If `committee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9881        pub fn committee_opt_mut(&mut self) -> Option<&mut super::MultisigCommittee> {
9882            self.committee.as_mut().map(|field| field as _)
9883        }
9884        ///Returns a mutable reference to `committee`.
9885        ///If the field is unset, it is first initialized with the default value.
9886        pub fn committee_mut(&mut self) -> &mut super::MultisigCommittee {
9887            self.committee.get_or_insert_default()
9888        }
9889        ///If `committee` is set, returns [`Some`] with the value; otherwise returns [`None`].
9890        pub fn committee_opt(&self) -> Option<&super::MultisigCommittee> {
9891            self.committee.as_ref().map(|field| field as _)
9892        }
9893        ///Sets `committee` with the provided value.
9894        pub fn set_committee<T: Into<super::MultisigCommittee>>(&mut self, field: T) {
9895            self.committee = Some(field.into().into());
9896        }
9897        ///Sets `committee` with the provided value.
9898        pub fn with_committee<T: Into<super::MultisigCommittee>>(
9899            mut self,
9900            field: T,
9901        ) -> Self {
9902            self.set_committee(field.into());
9903            self
9904        }
9905    }
9906    impl super::MultisigCommittee {
9907        pub const fn const_default() -> Self {
9908            Self {
9909                members: Vec::new(),
9910                threshold: None,
9911            }
9912        }
9913        #[doc(hidden)]
9914        pub fn default_instance() -> &'static Self {
9915            static DEFAULT: super::MultisigCommittee = super::MultisigCommittee::const_default();
9916            &DEFAULT
9917        }
9918        ///Returns the value of `members`, or the default value if `members` is unset.
9919        pub fn members(&self) -> &[super::MultisigMember] {
9920            &self.members
9921        }
9922        ///Returns a mutable reference to `members`.
9923        ///If the field is unset, it is first initialized with the default value.
9924        pub fn members_mut(&mut self) -> &mut Vec<super::MultisigMember> {
9925            &mut self.members
9926        }
9927        ///Sets `members` with the provided value.
9928        pub fn set_members(&mut self, field: Vec<super::MultisigMember>) {
9929            self.members = field;
9930        }
9931        ///Sets `members` with the provided value.
9932        pub fn with_members(mut self, field: Vec<super::MultisigMember>) -> Self {
9933            self.set_members(field);
9934            self
9935        }
9936        ///If `threshold` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9937        pub fn threshold_opt_mut(&mut self) -> Option<&mut u32> {
9938            self.threshold.as_mut().map(|field| field as _)
9939        }
9940        ///Returns a mutable reference to `threshold`.
9941        ///If the field is unset, it is first initialized with the default value.
9942        pub fn threshold_mut(&mut self) -> &mut u32 {
9943            self.threshold.get_or_insert_default()
9944        }
9945        ///If `threshold` is set, returns [`Some`] with the value; otherwise returns [`None`].
9946        pub fn threshold_opt(&self) -> Option<u32> {
9947            self.threshold.as_ref().map(|field| *field)
9948        }
9949        ///Sets `threshold` with the provided value.
9950        pub fn set_threshold<T: Into<u32>>(&mut self, field: T) {
9951            self.threshold = Some(field.into().into());
9952        }
9953        ///Sets `threshold` with the provided value.
9954        pub fn with_threshold<T: Into<u32>>(mut self, field: T) -> Self {
9955            self.set_threshold(field.into());
9956            self
9957        }
9958    }
9959    impl super::MultisigMember {
9960        pub const fn const_default() -> Self {
9961            Self {
9962                public_key: None,
9963                weight: None,
9964            }
9965        }
9966        #[doc(hidden)]
9967        pub fn default_instance() -> &'static Self {
9968            static DEFAULT: super::MultisigMember = super::MultisigMember::const_default();
9969            &DEFAULT
9970        }
9971        ///Returns the value of `public_key`, or the default value if `public_key` is unset.
9972        pub fn public_key(&self) -> &super::MultisigMemberPublicKey {
9973            self.public_key
9974                .as_ref()
9975                .map(|field| field as _)
9976                .unwrap_or_else(|| {
9977                    super::MultisigMemberPublicKey::default_instance() as _
9978                })
9979        }
9980        ///If `public_key` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9981        pub fn public_key_opt_mut(
9982            &mut self,
9983        ) -> Option<&mut super::MultisigMemberPublicKey> {
9984            self.public_key.as_mut().map(|field| field as _)
9985        }
9986        ///Returns a mutable reference to `public_key`.
9987        ///If the field is unset, it is first initialized with the default value.
9988        pub fn public_key_mut(&mut self) -> &mut super::MultisigMemberPublicKey {
9989            self.public_key.get_or_insert_default()
9990        }
9991        ///If `public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
9992        pub fn public_key_opt(&self) -> Option<&super::MultisigMemberPublicKey> {
9993            self.public_key.as_ref().map(|field| field as _)
9994        }
9995        ///Sets `public_key` with the provided value.
9996        pub fn set_public_key<T: Into<super::MultisigMemberPublicKey>>(
9997            &mut self,
9998            field: T,
9999        ) {
10000            self.public_key = Some(field.into().into());
10001        }
10002        ///Sets `public_key` with the provided value.
10003        pub fn with_public_key<T: Into<super::MultisigMemberPublicKey>>(
10004            mut self,
10005            field: T,
10006        ) -> Self {
10007            self.set_public_key(field.into());
10008            self
10009        }
10010        ///If `weight` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10011        pub fn weight_opt_mut(&mut self) -> Option<&mut u32> {
10012            self.weight.as_mut().map(|field| field as _)
10013        }
10014        ///Returns a mutable reference to `weight`.
10015        ///If the field is unset, it is first initialized with the default value.
10016        pub fn weight_mut(&mut self) -> &mut u32 {
10017            self.weight.get_or_insert_default()
10018        }
10019        ///If `weight` is set, returns [`Some`] with the value; otherwise returns [`None`].
10020        pub fn weight_opt(&self) -> Option<u32> {
10021            self.weight.as_ref().map(|field| *field)
10022        }
10023        ///Sets `weight` with the provided value.
10024        pub fn set_weight<T: Into<u32>>(&mut self, field: T) {
10025            self.weight = Some(field.into().into());
10026        }
10027        ///Sets `weight` with the provided value.
10028        pub fn with_weight<T: Into<u32>>(mut self, field: T) -> Self {
10029            self.set_weight(field.into());
10030            self
10031        }
10032    }
10033    impl super::MultisigMemberPublicKey {
10034        pub const fn const_default() -> Self {
10035            Self {
10036                scheme: None,
10037                public_key: None,
10038                zklogin: None,
10039            }
10040        }
10041        #[doc(hidden)]
10042        pub fn default_instance() -> &'static Self {
10043            static DEFAULT: super::MultisigMemberPublicKey = super::MultisigMemberPublicKey::const_default();
10044            &DEFAULT
10045        }
10046        ///Sets `scheme` with the provided value.
10047        pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
10048            self.set_scheme(field.into());
10049            self
10050        }
10051        ///If `public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
10052        pub fn public_key_opt(&self) -> Option<&[u8]> {
10053            self.public_key.as_ref().map(|field| field as _)
10054        }
10055        ///Sets `public_key` with the provided value.
10056        pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10057            self.public_key = Some(field.into().into());
10058        }
10059        ///Sets `public_key` with the provided value.
10060        pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
10061            mut self,
10062            field: T,
10063        ) -> Self {
10064            self.set_public_key(field.into());
10065            self
10066        }
10067        ///Returns the value of `zklogin`, or the default value if `zklogin` is unset.
10068        pub fn zklogin(&self) -> &super::ZkLoginPublicIdentifier {
10069            self.zklogin
10070                .as_ref()
10071                .map(|field| field as _)
10072                .unwrap_or_else(|| {
10073                    super::ZkLoginPublicIdentifier::default_instance() as _
10074                })
10075        }
10076        ///If `zklogin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10077        pub fn zklogin_opt_mut(
10078            &mut self,
10079        ) -> Option<&mut super::ZkLoginPublicIdentifier> {
10080            self.zklogin.as_mut().map(|field| field as _)
10081        }
10082        ///Returns a mutable reference to `zklogin`.
10083        ///If the field is unset, it is first initialized with the default value.
10084        pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginPublicIdentifier {
10085            self.zklogin.get_or_insert_default()
10086        }
10087        ///If `zklogin` is set, returns [`Some`] with the value; otherwise returns [`None`].
10088        pub fn zklogin_opt(&self) -> Option<&super::ZkLoginPublicIdentifier> {
10089            self.zklogin.as_ref().map(|field| field as _)
10090        }
10091        ///Sets `zklogin` with the provided value.
10092        pub fn set_zklogin<T: Into<super::ZkLoginPublicIdentifier>>(
10093            &mut self,
10094            field: T,
10095        ) {
10096            self.zklogin = Some(field.into().into());
10097        }
10098        ///Sets `zklogin` with the provided value.
10099        pub fn with_zklogin<T: Into<super::ZkLoginPublicIdentifier>>(
10100            mut self,
10101            field: T,
10102        ) -> Self {
10103            self.set_zklogin(field.into());
10104            self
10105        }
10106    }
10107    impl super::MultisigMemberSignature {
10108        pub const fn const_default() -> Self {
10109            Self {
10110                scheme: None,
10111                signature: None,
10112                zklogin: None,
10113                passkey: None,
10114            }
10115        }
10116        #[doc(hidden)]
10117        pub fn default_instance() -> &'static Self {
10118            static DEFAULT: super::MultisigMemberSignature = super::MultisigMemberSignature::const_default();
10119            &DEFAULT
10120        }
10121        ///Sets `scheme` with the provided value.
10122        pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
10123            self.set_scheme(field.into());
10124            self
10125        }
10126        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
10127        pub fn signature_opt(&self) -> Option<&[u8]> {
10128            self.signature.as_ref().map(|field| field as _)
10129        }
10130        ///Sets `signature` with the provided value.
10131        pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10132            self.signature = Some(field.into().into());
10133        }
10134        ///Sets `signature` with the provided value.
10135        pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
10136            mut self,
10137            field: T,
10138        ) -> Self {
10139            self.set_signature(field.into());
10140            self
10141        }
10142        ///Returns the value of `zklogin`, or the default value if `zklogin` is unset.
10143        pub fn zklogin(&self) -> &super::ZkLoginAuthenticator {
10144            self.zklogin
10145                .as_ref()
10146                .map(|field| field as _)
10147                .unwrap_or_else(|| super::ZkLoginAuthenticator::default_instance() as _)
10148        }
10149        ///If `zklogin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10150        pub fn zklogin_opt_mut(&mut self) -> Option<&mut super::ZkLoginAuthenticator> {
10151            self.zklogin.as_mut().map(|field| field as _)
10152        }
10153        ///Returns a mutable reference to `zklogin`.
10154        ///If the field is unset, it is first initialized with the default value.
10155        pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginAuthenticator {
10156            self.zklogin.get_or_insert_default()
10157        }
10158        ///If `zklogin` is set, returns [`Some`] with the value; otherwise returns [`None`].
10159        pub fn zklogin_opt(&self) -> Option<&super::ZkLoginAuthenticator> {
10160            self.zklogin.as_ref().map(|field| field as _)
10161        }
10162        ///Sets `zklogin` with the provided value.
10163        pub fn set_zklogin<T: Into<super::ZkLoginAuthenticator>>(&mut self, field: T) {
10164            self.zklogin = Some(field.into().into());
10165        }
10166        ///Sets `zklogin` with the provided value.
10167        pub fn with_zklogin<T: Into<super::ZkLoginAuthenticator>>(
10168            mut self,
10169            field: T,
10170        ) -> Self {
10171            self.set_zklogin(field.into());
10172            self
10173        }
10174        ///Returns the value of `passkey`, or the default value if `passkey` is unset.
10175        pub fn passkey(&self) -> &super::PasskeyAuthenticator {
10176            self.passkey
10177                .as_ref()
10178                .map(|field| field as _)
10179                .unwrap_or_else(|| super::PasskeyAuthenticator::default_instance() as _)
10180        }
10181        ///If `passkey` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10182        pub fn passkey_opt_mut(&mut self) -> Option<&mut super::PasskeyAuthenticator> {
10183            self.passkey.as_mut().map(|field| field as _)
10184        }
10185        ///Returns a mutable reference to `passkey`.
10186        ///If the field is unset, it is first initialized with the default value.
10187        pub fn passkey_mut(&mut self) -> &mut super::PasskeyAuthenticator {
10188            self.passkey.get_or_insert_default()
10189        }
10190        ///If `passkey` is set, returns [`Some`] with the value; otherwise returns [`None`].
10191        pub fn passkey_opt(&self) -> Option<&super::PasskeyAuthenticator> {
10192            self.passkey.as_ref().map(|field| field as _)
10193        }
10194        ///Sets `passkey` with the provided value.
10195        pub fn set_passkey<T: Into<super::PasskeyAuthenticator>>(&mut self, field: T) {
10196            self.passkey = Some(field.into().into());
10197        }
10198        ///Sets `passkey` with the provided value.
10199        pub fn with_passkey<T: Into<super::PasskeyAuthenticator>>(
10200            mut self,
10201            field: T,
10202        ) -> Self {
10203            self.set_passkey(field.into());
10204            self
10205        }
10206    }
10207    impl super::NameRecord {
10208        pub const fn const_default() -> Self {
10209            Self {
10210                id: None,
10211                name: None,
10212                registration_nft_id: None,
10213                expiration_timestamp: None,
10214                target_address: None,
10215                data: std::collections::BTreeMap::new(),
10216            }
10217        }
10218        #[doc(hidden)]
10219        pub fn default_instance() -> &'static Self {
10220            static DEFAULT: super::NameRecord = super::NameRecord::const_default();
10221            &DEFAULT
10222        }
10223        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10224        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
10225            self.id.as_mut().map(|field| field as _)
10226        }
10227        ///Returns a mutable reference to `id`.
10228        ///If the field is unset, it is first initialized with the default value.
10229        pub fn id_mut(&mut self) -> &mut String {
10230            self.id.get_or_insert_default()
10231        }
10232        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
10233        pub fn id_opt(&self) -> Option<&str> {
10234            self.id.as_ref().map(|field| field as _)
10235        }
10236        ///Sets `id` with the provided value.
10237        pub fn set_id<T: Into<String>>(&mut self, field: T) {
10238            self.id = Some(field.into().into());
10239        }
10240        ///Sets `id` with the provided value.
10241        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
10242            self.set_id(field.into());
10243            self
10244        }
10245        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10246        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
10247            self.name.as_mut().map(|field| field as _)
10248        }
10249        ///Returns a mutable reference to `name`.
10250        ///If the field is unset, it is first initialized with the default value.
10251        pub fn name_mut(&mut self) -> &mut String {
10252            self.name.get_or_insert_default()
10253        }
10254        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
10255        pub fn name_opt(&self) -> Option<&str> {
10256            self.name.as_ref().map(|field| field as _)
10257        }
10258        ///Sets `name` with the provided value.
10259        pub fn set_name<T: Into<String>>(&mut self, field: T) {
10260            self.name = Some(field.into().into());
10261        }
10262        ///Sets `name` with the provided value.
10263        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
10264            self.set_name(field.into());
10265            self
10266        }
10267        ///If `registration_nft_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10268        pub fn registration_nft_id_opt_mut(&mut self) -> Option<&mut String> {
10269            self.registration_nft_id.as_mut().map(|field| field as _)
10270        }
10271        ///Returns a mutable reference to `registration_nft_id`.
10272        ///If the field is unset, it is first initialized with the default value.
10273        pub fn registration_nft_id_mut(&mut self) -> &mut String {
10274            self.registration_nft_id.get_or_insert_default()
10275        }
10276        ///If `registration_nft_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
10277        pub fn registration_nft_id_opt(&self) -> Option<&str> {
10278            self.registration_nft_id.as_ref().map(|field| field as _)
10279        }
10280        ///Sets `registration_nft_id` with the provided value.
10281        pub fn set_registration_nft_id<T: Into<String>>(&mut self, field: T) {
10282            self.registration_nft_id = Some(field.into().into());
10283        }
10284        ///Sets `registration_nft_id` with the provided value.
10285        pub fn with_registration_nft_id<T: Into<String>>(mut self, field: T) -> Self {
10286            self.set_registration_nft_id(field.into());
10287            self
10288        }
10289        ///If `expiration_timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10290        pub fn expiration_timestamp_opt_mut(
10291            &mut self,
10292        ) -> Option<&mut ::prost_types::Timestamp> {
10293            self.expiration_timestamp.as_mut().map(|field| field as _)
10294        }
10295        ///Returns a mutable reference to `expiration_timestamp`.
10296        ///If the field is unset, it is first initialized with the default value.
10297        pub fn expiration_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
10298            self.expiration_timestamp.get_or_insert_default()
10299        }
10300        ///If `expiration_timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
10301        pub fn expiration_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
10302            self.expiration_timestamp.as_ref().map(|field| field as _)
10303        }
10304        ///Sets `expiration_timestamp` with the provided value.
10305        pub fn set_expiration_timestamp<T: Into<::prost_types::Timestamp>>(
10306            &mut self,
10307            field: T,
10308        ) {
10309            self.expiration_timestamp = Some(field.into().into());
10310        }
10311        ///Sets `expiration_timestamp` with the provided value.
10312        pub fn with_expiration_timestamp<T: Into<::prost_types::Timestamp>>(
10313            mut self,
10314            field: T,
10315        ) -> Self {
10316            self.set_expiration_timestamp(field.into());
10317            self
10318        }
10319        ///If `target_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10320        pub fn target_address_opt_mut(&mut self) -> Option<&mut String> {
10321            self.target_address.as_mut().map(|field| field as _)
10322        }
10323        ///Returns a mutable reference to `target_address`.
10324        ///If the field is unset, it is first initialized with the default value.
10325        pub fn target_address_mut(&mut self) -> &mut String {
10326            self.target_address.get_or_insert_default()
10327        }
10328        ///If `target_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
10329        pub fn target_address_opt(&self) -> Option<&str> {
10330            self.target_address.as_ref().map(|field| field as _)
10331        }
10332        ///Sets `target_address` with the provided value.
10333        pub fn set_target_address<T: Into<String>>(&mut self, field: T) {
10334            self.target_address = Some(field.into().into());
10335        }
10336        ///Sets `target_address` with the provided value.
10337        pub fn with_target_address<T: Into<String>>(mut self, field: T) -> Self {
10338            self.set_target_address(field.into());
10339            self
10340        }
10341        ///Returns the value of `data`, or the default value if `data` is unset.
10342        pub fn data(&self) -> &::std::collections::BTreeMap<String, String> {
10343            &self.data
10344        }
10345        ///Returns a mutable reference to `data`.
10346        ///If the field is unset, it is first initialized with the default value.
10347        pub fn data_mut(&mut self) -> &mut ::std::collections::BTreeMap<String, String> {
10348            &mut self.data
10349        }
10350        ///Sets `data` with the provided value.
10351        pub fn set_data(&mut self, field: ::std::collections::BTreeMap<String, String>) {
10352            self.data = field;
10353        }
10354        ///Sets `data` with the provided value.
10355        pub fn with_data(
10356            mut self,
10357            field: ::std::collections::BTreeMap<String, String>,
10358        ) -> Self {
10359            self.set_data(field);
10360            self
10361        }
10362    }
10363    impl super::Object {
10364        pub const fn const_default() -> Self {
10365            Self {
10366                bcs: None,
10367                object_id: None,
10368                version: None,
10369                digest: None,
10370                owner: None,
10371                object_type: None,
10372                has_public_transfer: None,
10373                contents: None,
10374                package: None,
10375                previous_transaction: None,
10376                storage_rebate: None,
10377                json: None,
10378                balance: None,
10379            }
10380        }
10381        #[doc(hidden)]
10382        pub fn default_instance() -> &'static Self {
10383            static DEFAULT: super::Object = super::Object::const_default();
10384            &DEFAULT
10385        }
10386        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
10387        pub fn bcs(&self) -> &super::Bcs {
10388            self.bcs
10389                .as_ref()
10390                .map(|field| field as _)
10391                .unwrap_or_else(|| super::Bcs::default_instance() as _)
10392        }
10393        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10394        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
10395            self.bcs.as_mut().map(|field| field as _)
10396        }
10397        ///Returns a mutable reference to `bcs`.
10398        ///If the field is unset, it is first initialized with the default value.
10399        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
10400            self.bcs.get_or_insert_default()
10401        }
10402        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
10403        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
10404            self.bcs.as_ref().map(|field| field as _)
10405        }
10406        ///Sets `bcs` with the provided value.
10407        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
10408            self.bcs = Some(field.into().into());
10409        }
10410        ///Sets `bcs` with the provided value.
10411        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
10412            self.set_bcs(field.into());
10413            self
10414        }
10415        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10416        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
10417            self.object_id.as_mut().map(|field| field as _)
10418        }
10419        ///Returns a mutable reference to `object_id`.
10420        ///If the field is unset, it is first initialized with the default value.
10421        pub fn object_id_mut(&mut self) -> &mut String {
10422            self.object_id.get_or_insert_default()
10423        }
10424        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
10425        pub fn object_id_opt(&self) -> Option<&str> {
10426            self.object_id.as_ref().map(|field| field as _)
10427        }
10428        ///Sets `object_id` with the provided value.
10429        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
10430            self.object_id = Some(field.into().into());
10431        }
10432        ///Sets `object_id` with the provided value.
10433        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
10434            self.set_object_id(field.into());
10435            self
10436        }
10437        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10438        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
10439            self.version.as_mut().map(|field| field as _)
10440        }
10441        ///Returns a mutable reference to `version`.
10442        ///If the field is unset, it is first initialized with the default value.
10443        pub fn version_mut(&mut self) -> &mut u64 {
10444            self.version.get_or_insert_default()
10445        }
10446        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
10447        pub fn version_opt(&self) -> Option<u64> {
10448            self.version.as_ref().map(|field| *field)
10449        }
10450        ///Sets `version` with the provided value.
10451        pub fn set_version<T: Into<u64>>(&mut self, field: T) {
10452            self.version = Some(field.into().into());
10453        }
10454        ///Sets `version` with the provided value.
10455        pub fn with_version<T: Into<u64>>(mut self, field: T) -> Self {
10456            self.set_version(field.into());
10457            self
10458        }
10459        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10460        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
10461            self.digest.as_mut().map(|field| field as _)
10462        }
10463        ///Returns a mutable reference to `digest`.
10464        ///If the field is unset, it is first initialized with the default value.
10465        pub fn digest_mut(&mut self) -> &mut String {
10466            self.digest.get_or_insert_default()
10467        }
10468        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
10469        pub fn digest_opt(&self) -> Option<&str> {
10470            self.digest.as_ref().map(|field| field as _)
10471        }
10472        ///Sets `digest` with the provided value.
10473        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
10474            self.digest = Some(field.into().into());
10475        }
10476        ///Sets `digest` with the provided value.
10477        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
10478            self.set_digest(field.into());
10479            self
10480        }
10481        ///Returns the value of `owner`, or the default value if `owner` is unset.
10482        pub fn owner(&self) -> &super::Owner {
10483            self.owner
10484                .as_ref()
10485                .map(|field| field as _)
10486                .unwrap_or_else(|| super::Owner::default_instance() as _)
10487        }
10488        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10489        pub fn owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
10490            self.owner.as_mut().map(|field| field as _)
10491        }
10492        ///Returns a mutable reference to `owner`.
10493        ///If the field is unset, it is first initialized with the default value.
10494        pub fn owner_mut(&mut self) -> &mut super::Owner {
10495            self.owner.get_or_insert_default()
10496        }
10497        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
10498        pub fn owner_opt(&self) -> Option<&super::Owner> {
10499            self.owner.as_ref().map(|field| field as _)
10500        }
10501        ///Sets `owner` with the provided value.
10502        pub fn set_owner<T: Into<super::Owner>>(&mut self, field: T) {
10503            self.owner = Some(field.into().into());
10504        }
10505        ///Sets `owner` with the provided value.
10506        pub fn with_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
10507            self.set_owner(field.into());
10508            self
10509        }
10510        ///If `object_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10511        pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
10512            self.object_type.as_mut().map(|field| field as _)
10513        }
10514        ///Returns a mutable reference to `object_type`.
10515        ///If the field is unset, it is first initialized with the default value.
10516        pub fn object_type_mut(&mut self) -> &mut String {
10517            self.object_type.get_or_insert_default()
10518        }
10519        ///If `object_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
10520        pub fn object_type_opt(&self) -> Option<&str> {
10521            self.object_type.as_ref().map(|field| field as _)
10522        }
10523        ///Sets `object_type` with the provided value.
10524        pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
10525            self.object_type = Some(field.into().into());
10526        }
10527        ///Sets `object_type` with the provided value.
10528        pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
10529            self.set_object_type(field.into());
10530            self
10531        }
10532        ///If `has_public_transfer` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10533        pub fn has_public_transfer_opt_mut(&mut self) -> Option<&mut bool> {
10534            self.has_public_transfer.as_mut().map(|field| field as _)
10535        }
10536        ///Returns a mutable reference to `has_public_transfer`.
10537        ///If the field is unset, it is first initialized with the default value.
10538        pub fn has_public_transfer_mut(&mut self) -> &mut bool {
10539            self.has_public_transfer.get_or_insert_default()
10540        }
10541        ///If `has_public_transfer` is set, returns [`Some`] with the value; otherwise returns [`None`].
10542        pub fn has_public_transfer_opt(&self) -> Option<bool> {
10543            self.has_public_transfer.as_ref().map(|field| *field)
10544        }
10545        ///Sets `has_public_transfer` with the provided value.
10546        pub fn set_has_public_transfer<T: Into<bool>>(&mut self, field: T) {
10547            self.has_public_transfer = Some(field.into().into());
10548        }
10549        ///Sets `has_public_transfer` with the provided value.
10550        pub fn with_has_public_transfer<T: Into<bool>>(mut self, field: T) -> Self {
10551            self.set_has_public_transfer(field.into());
10552            self
10553        }
10554        ///Returns the value of `contents`, or the default value if `contents` is unset.
10555        pub fn contents(&self) -> &super::Bcs {
10556            self.contents
10557                .as_ref()
10558                .map(|field| field as _)
10559                .unwrap_or_else(|| super::Bcs::default_instance() as _)
10560        }
10561        ///If `contents` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10562        pub fn contents_opt_mut(&mut self) -> Option<&mut super::Bcs> {
10563            self.contents.as_mut().map(|field| field as _)
10564        }
10565        ///Returns a mutable reference to `contents`.
10566        ///If the field is unset, it is first initialized with the default value.
10567        pub fn contents_mut(&mut self) -> &mut super::Bcs {
10568            self.contents.get_or_insert_default()
10569        }
10570        ///If `contents` is set, returns [`Some`] with the value; otherwise returns [`None`].
10571        pub fn contents_opt(&self) -> Option<&super::Bcs> {
10572            self.contents.as_ref().map(|field| field as _)
10573        }
10574        ///Sets `contents` with the provided value.
10575        pub fn set_contents<T: Into<super::Bcs>>(&mut self, field: T) {
10576            self.contents = Some(field.into().into());
10577        }
10578        ///Sets `contents` with the provided value.
10579        pub fn with_contents<T: Into<super::Bcs>>(mut self, field: T) -> Self {
10580            self.set_contents(field.into());
10581            self
10582        }
10583        ///Returns the value of `package`, or the default value if `package` is unset.
10584        pub fn package(&self) -> &super::Package {
10585            self.package
10586                .as_ref()
10587                .map(|field| field as _)
10588                .unwrap_or_else(|| super::Package::default_instance() as _)
10589        }
10590        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10591        pub fn package_opt_mut(&mut self) -> Option<&mut super::Package> {
10592            self.package.as_mut().map(|field| field as _)
10593        }
10594        ///Returns a mutable reference to `package`.
10595        ///If the field is unset, it is first initialized with the default value.
10596        pub fn package_mut(&mut self) -> &mut super::Package {
10597            self.package.get_or_insert_default()
10598        }
10599        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
10600        pub fn package_opt(&self) -> Option<&super::Package> {
10601            self.package.as_ref().map(|field| field as _)
10602        }
10603        ///Sets `package` with the provided value.
10604        pub fn set_package<T: Into<super::Package>>(&mut self, field: T) {
10605            self.package = Some(field.into().into());
10606        }
10607        ///Sets `package` with the provided value.
10608        pub fn with_package<T: Into<super::Package>>(mut self, field: T) -> Self {
10609            self.set_package(field.into());
10610            self
10611        }
10612        ///If `previous_transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10613        pub fn previous_transaction_opt_mut(&mut self) -> Option<&mut String> {
10614            self.previous_transaction.as_mut().map(|field| field as _)
10615        }
10616        ///Returns a mutable reference to `previous_transaction`.
10617        ///If the field is unset, it is first initialized with the default value.
10618        pub fn previous_transaction_mut(&mut self) -> &mut String {
10619            self.previous_transaction.get_or_insert_default()
10620        }
10621        ///If `previous_transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
10622        pub fn previous_transaction_opt(&self) -> Option<&str> {
10623            self.previous_transaction.as_ref().map(|field| field as _)
10624        }
10625        ///Sets `previous_transaction` with the provided value.
10626        pub fn set_previous_transaction<T: Into<String>>(&mut self, field: T) {
10627            self.previous_transaction = Some(field.into().into());
10628        }
10629        ///Sets `previous_transaction` with the provided value.
10630        pub fn with_previous_transaction<T: Into<String>>(mut self, field: T) -> Self {
10631            self.set_previous_transaction(field.into());
10632            self
10633        }
10634        ///If `storage_rebate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10635        pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
10636            self.storage_rebate.as_mut().map(|field| field as _)
10637        }
10638        ///Returns a mutable reference to `storage_rebate`.
10639        ///If the field is unset, it is first initialized with the default value.
10640        pub fn storage_rebate_mut(&mut self) -> &mut u64 {
10641            self.storage_rebate.get_or_insert_default()
10642        }
10643        ///If `storage_rebate` is set, returns [`Some`] with the value; otherwise returns [`None`].
10644        pub fn storage_rebate_opt(&self) -> Option<u64> {
10645            self.storage_rebate.as_ref().map(|field| *field)
10646        }
10647        ///Sets `storage_rebate` with the provided value.
10648        pub fn set_storage_rebate<T: Into<u64>>(&mut self, field: T) {
10649            self.storage_rebate = Some(field.into().into());
10650        }
10651        ///Sets `storage_rebate` with the provided value.
10652        pub fn with_storage_rebate<T: Into<u64>>(mut self, field: T) -> Self {
10653            self.set_storage_rebate(field.into());
10654            self
10655        }
10656        ///If `json` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10657        pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
10658            self.json.as_mut().map(|field| field as _)
10659        }
10660        ///Returns a mutable reference to `json`.
10661        ///If the field is unset, it is first initialized with the default value.
10662        pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
10663            self.json.get_or_insert_default()
10664        }
10665        ///If `json` is set, returns [`Some`] with the value; otherwise returns [`None`].
10666        pub fn json_opt(&self) -> Option<&::prost_types::Value> {
10667            self.json.as_ref().map(|field| field as _)
10668        }
10669        ///Sets `json` with the provided value.
10670        pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
10671            self.json = Some(field.into().into());
10672        }
10673        ///Sets `json` with the provided value.
10674        pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
10675            self.set_json(field.into());
10676            self
10677        }
10678        ///If `balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10679        pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
10680            self.balance.as_mut().map(|field| field as _)
10681        }
10682        ///Returns a mutable reference to `balance`.
10683        ///If the field is unset, it is first initialized with the default value.
10684        pub fn balance_mut(&mut self) -> &mut u64 {
10685            self.balance.get_or_insert_default()
10686        }
10687        ///If `balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
10688        pub fn balance_opt(&self) -> Option<u64> {
10689            self.balance.as_ref().map(|field| *field)
10690        }
10691        ///Sets `balance` with the provided value.
10692        pub fn set_balance<T: Into<u64>>(&mut self, field: T) {
10693            self.balance = Some(field.into().into());
10694        }
10695        ///Sets `balance` with the provided value.
10696        pub fn with_balance<T: Into<u64>>(mut self, field: T) -> Self {
10697            self.set_balance(field.into());
10698            self
10699        }
10700    }
10701    impl super::ObjectReference {
10702        pub const fn const_default() -> Self {
10703            Self {
10704                object_id: None,
10705                version: None,
10706                digest: None,
10707            }
10708        }
10709        #[doc(hidden)]
10710        pub fn default_instance() -> &'static Self {
10711            static DEFAULT: super::ObjectReference = super::ObjectReference::const_default();
10712            &DEFAULT
10713        }
10714        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10715        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
10716            self.object_id.as_mut().map(|field| field as _)
10717        }
10718        ///Returns a mutable reference to `object_id`.
10719        ///If the field is unset, it is first initialized with the default value.
10720        pub fn object_id_mut(&mut self) -> &mut String {
10721            self.object_id.get_or_insert_default()
10722        }
10723        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
10724        pub fn object_id_opt(&self) -> Option<&str> {
10725            self.object_id.as_ref().map(|field| field as _)
10726        }
10727        ///Sets `object_id` with the provided value.
10728        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
10729            self.object_id = Some(field.into().into());
10730        }
10731        ///Sets `object_id` with the provided value.
10732        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
10733            self.set_object_id(field.into());
10734            self
10735        }
10736        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10737        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
10738            self.version.as_mut().map(|field| field as _)
10739        }
10740        ///Returns a mutable reference to `version`.
10741        ///If the field is unset, it is first initialized with the default value.
10742        pub fn version_mut(&mut self) -> &mut u64 {
10743            self.version.get_or_insert_default()
10744        }
10745        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
10746        pub fn version_opt(&self) -> Option<u64> {
10747            self.version.as_ref().map(|field| *field)
10748        }
10749        ///Sets `version` with the provided value.
10750        pub fn set_version<T: Into<u64>>(&mut self, field: T) {
10751            self.version = Some(field.into().into());
10752        }
10753        ///Sets `version` with the provided value.
10754        pub fn with_version<T: Into<u64>>(mut self, field: T) -> Self {
10755            self.set_version(field.into());
10756            self
10757        }
10758        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10759        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
10760            self.digest.as_mut().map(|field| field as _)
10761        }
10762        ///Returns a mutable reference to `digest`.
10763        ///If the field is unset, it is first initialized with the default value.
10764        pub fn digest_mut(&mut self) -> &mut String {
10765            self.digest.get_or_insert_default()
10766        }
10767        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
10768        pub fn digest_opt(&self) -> Option<&str> {
10769            self.digest.as_ref().map(|field| field as _)
10770        }
10771        ///Sets `digest` with the provided value.
10772        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
10773            self.digest = Some(field.into().into());
10774        }
10775        ///Sets `digest` with the provided value.
10776        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
10777            self.set_digest(field.into());
10778            self
10779        }
10780    }
10781    impl super::ObjectSet {
10782        pub const fn const_default() -> Self {
10783            Self { objects: Vec::new() }
10784        }
10785        #[doc(hidden)]
10786        pub fn default_instance() -> &'static Self {
10787            static DEFAULT: super::ObjectSet = super::ObjectSet::const_default();
10788            &DEFAULT
10789        }
10790        ///Returns the value of `objects`, or the default value if `objects` is unset.
10791        pub fn objects(&self) -> &[super::Object] {
10792            &self.objects
10793        }
10794        ///Returns a mutable reference to `objects`.
10795        ///If the field is unset, it is first initialized with the default value.
10796        pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
10797            &mut self.objects
10798        }
10799        ///Sets `objects` with the provided value.
10800        pub fn set_objects(&mut self, field: Vec<super::Object>) {
10801            self.objects = field;
10802        }
10803        ///Sets `objects` with the provided value.
10804        pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
10805            self.set_objects(field);
10806            self
10807        }
10808    }
10809    impl super::OpenSignature {
10810        pub const fn const_default() -> Self {
10811            Self {
10812                reference: None,
10813                body: None,
10814            }
10815        }
10816        #[doc(hidden)]
10817        pub fn default_instance() -> &'static Self {
10818            static DEFAULT: super::OpenSignature = super::OpenSignature::const_default();
10819            &DEFAULT
10820        }
10821        ///Sets `reference` with the provided value.
10822        pub fn with_reference<T: Into<super::open_signature::Reference>>(
10823            mut self,
10824            field: T,
10825        ) -> Self {
10826            self.set_reference(field.into());
10827            self
10828        }
10829        ///Returns the value of `body`, or the default value if `body` is unset.
10830        pub fn body(&self) -> &super::OpenSignatureBody {
10831            self.body
10832                .as_ref()
10833                .map(|field| field as _)
10834                .unwrap_or_else(|| super::OpenSignatureBody::default_instance() as _)
10835        }
10836        ///If `body` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10837        pub fn body_opt_mut(&mut self) -> Option<&mut super::OpenSignatureBody> {
10838            self.body.as_mut().map(|field| field as _)
10839        }
10840        ///Returns a mutable reference to `body`.
10841        ///If the field is unset, it is first initialized with the default value.
10842        pub fn body_mut(&mut self) -> &mut super::OpenSignatureBody {
10843            self.body.get_or_insert_default()
10844        }
10845        ///If `body` is set, returns [`Some`] with the value; otherwise returns [`None`].
10846        pub fn body_opt(&self) -> Option<&super::OpenSignatureBody> {
10847            self.body.as_ref().map(|field| field as _)
10848        }
10849        ///Sets `body` with the provided value.
10850        pub fn set_body<T: Into<super::OpenSignatureBody>>(&mut self, field: T) {
10851            self.body = Some(field.into().into());
10852        }
10853        ///Sets `body` with the provided value.
10854        pub fn with_body<T: Into<super::OpenSignatureBody>>(mut self, field: T) -> Self {
10855            self.set_body(field.into());
10856            self
10857        }
10858    }
10859    impl super::OpenSignatureBody {
10860        pub const fn const_default() -> Self {
10861            Self {
10862                r#type: None,
10863                type_name: None,
10864                type_parameter_instantiation: Vec::new(),
10865                type_parameter: None,
10866            }
10867        }
10868        #[doc(hidden)]
10869        pub fn default_instance() -> &'static Self {
10870            static DEFAULT: super::OpenSignatureBody = super::OpenSignatureBody::const_default();
10871            &DEFAULT
10872        }
10873        ///Sets `r#type` with the provided value.
10874        pub fn with_type<T: Into<super::open_signature_body::Type>>(
10875            mut self,
10876            field: T,
10877        ) -> Self {
10878            self.set_type(field.into());
10879            self
10880        }
10881        ///If `type_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10882        pub fn type_name_opt_mut(&mut self) -> Option<&mut String> {
10883            self.type_name.as_mut().map(|field| field as _)
10884        }
10885        ///Returns a mutable reference to `type_name`.
10886        ///If the field is unset, it is first initialized with the default value.
10887        pub fn type_name_mut(&mut self) -> &mut String {
10888            self.type_name.get_or_insert_default()
10889        }
10890        ///If `type_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
10891        pub fn type_name_opt(&self) -> Option<&str> {
10892            self.type_name.as_ref().map(|field| field as _)
10893        }
10894        ///Sets `type_name` with the provided value.
10895        pub fn set_type_name<T: Into<String>>(&mut self, field: T) {
10896            self.type_name = Some(field.into().into());
10897        }
10898        ///Sets `type_name` with the provided value.
10899        pub fn with_type_name<T: Into<String>>(mut self, field: T) -> Self {
10900            self.set_type_name(field.into());
10901            self
10902        }
10903        ///Returns the value of `type_parameter_instantiation`, or the default value if `type_parameter_instantiation` is unset.
10904        pub fn type_parameter_instantiation(&self) -> &[super::OpenSignatureBody] {
10905            &self.type_parameter_instantiation
10906        }
10907        ///Returns a mutable reference to `type_parameter_instantiation`.
10908        ///If the field is unset, it is first initialized with the default value.
10909        pub fn type_parameter_instantiation_mut(
10910            &mut self,
10911        ) -> &mut Vec<super::OpenSignatureBody> {
10912            &mut self.type_parameter_instantiation
10913        }
10914        ///Sets `type_parameter_instantiation` with the provided value.
10915        pub fn set_type_parameter_instantiation(
10916            &mut self,
10917            field: Vec<super::OpenSignatureBody>,
10918        ) {
10919            self.type_parameter_instantiation = field;
10920        }
10921        ///Sets `type_parameter_instantiation` with the provided value.
10922        pub fn with_type_parameter_instantiation(
10923            mut self,
10924            field: Vec<super::OpenSignatureBody>,
10925        ) -> Self {
10926            self.set_type_parameter_instantiation(field);
10927            self
10928        }
10929        ///If `type_parameter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10930        pub fn type_parameter_opt_mut(&mut self) -> Option<&mut u32> {
10931            self.type_parameter.as_mut().map(|field| field as _)
10932        }
10933        ///Returns a mutable reference to `type_parameter`.
10934        ///If the field is unset, it is first initialized with the default value.
10935        pub fn type_parameter_mut(&mut self) -> &mut u32 {
10936            self.type_parameter.get_or_insert_default()
10937        }
10938        ///If `type_parameter` is set, returns [`Some`] with the value; otherwise returns [`None`].
10939        pub fn type_parameter_opt(&self) -> Option<u32> {
10940            self.type_parameter.as_ref().map(|field| *field)
10941        }
10942        ///Sets `type_parameter` with the provided value.
10943        pub fn set_type_parameter<T: Into<u32>>(&mut self, field: T) {
10944            self.type_parameter = Some(field.into().into());
10945        }
10946        ///Sets `type_parameter` with the provided value.
10947        pub fn with_type_parameter<T: Into<u32>>(mut self, field: T) -> Self {
10948            self.set_type_parameter(field.into());
10949            self
10950        }
10951    }
10952    impl super::Owner {
10953        pub const fn const_default() -> Self {
10954            Self {
10955                kind: None,
10956                address: None,
10957                version: None,
10958            }
10959        }
10960        #[doc(hidden)]
10961        pub fn default_instance() -> &'static Self {
10962            static DEFAULT: super::Owner = super::Owner::const_default();
10963            &DEFAULT
10964        }
10965        ///Sets `kind` with the provided value.
10966        pub fn with_kind<T: Into<super::owner::OwnerKind>>(mut self, field: T) -> Self {
10967            self.set_kind(field.into());
10968            self
10969        }
10970        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10971        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
10972            self.address.as_mut().map(|field| field as _)
10973        }
10974        ///Returns a mutable reference to `address`.
10975        ///If the field is unset, it is first initialized with the default value.
10976        pub fn address_mut(&mut self) -> &mut String {
10977            self.address.get_or_insert_default()
10978        }
10979        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
10980        pub fn address_opt(&self) -> Option<&str> {
10981            self.address.as_ref().map(|field| field as _)
10982        }
10983        ///Sets `address` with the provided value.
10984        pub fn set_address<T: Into<String>>(&mut self, field: T) {
10985            self.address = Some(field.into().into());
10986        }
10987        ///Sets `address` with the provided value.
10988        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
10989            self.set_address(field.into());
10990            self
10991        }
10992        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10993        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
10994            self.version.as_mut().map(|field| field as _)
10995        }
10996        ///Returns a mutable reference to `version`.
10997        ///If the field is unset, it is first initialized with the default value.
10998        pub fn version_mut(&mut self) -> &mut u64 {
10999            self.version.get_or_insert_default()
11000        }
11001        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
11002        pub fn version_opt(&self) -> Option<u64> {
11003            self.version.as_ref().map(|field| *field)
11004        }
11005        ///Sets `version` with the provided value.
11006        pub fn set_version<T: Into<u64>>(&mut self, field: T) {
11007            self.version = Some(field.into().into());
11008        }
11009        ///Sets `version` with the provided value.
11010        pub fn with_version<T: Into<u64>>(mut self, field: T) -> Self {
11011            self.set_version(field.into());
11012            self
11013        }
11014    }
11015    impl super::Package {
11016        pub const fn const_default() -> Self {
11017            Self {
11018                storage_id: None,
11019                original_id: None,
11020                version: None,
11021                modules: Vec::new(),
11022                type_origins: Vec::new(),
11023                linkage: Vec::new(),
11024            }
11025        }
11026        #[doc(hidden)]
11027        pub fn default_instance() -> &'static Self {
11028            static DEFAULT: super::Package = super::Package::const_default();
11029            &DEFAULT
11030        }
11031        ///If `storage_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11032        pub fn storage_id_opt_mut(&mut self) -> Option<&mut String> {
11033            self.storage_id.as_mut().map(|field| field as _)
11034        }
11035        ///Returns a mutable reference to `storage_id`.
11036        ///If the field is unset, it is first initialized with the default value.
11037        pub fn storage_id_mut(&mut self) -> &mut String {
11038            self.storage_id.get_or_insert_default()
11039        }
11040        ///If `storage_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
11041        pub fn storage_id_opt(&self) -> Option<&str> {
11042            self.storage_id.as_ref().map(|field| field as _)
11043        }
11044        ///Sets `storage_id` with the provided value.
11045        pub fn set_storage_id<T: Into<String>>(&mut self, field: T) {
11046            self.storage_id = Some(field.into().into());
11047        }
11048        ///Sets `storage_id` with the provided value.
11049        pub fn with_storage_id<T: Into<String>>(mut self, field: T) -> Self {
11050            self.set_storage_id(field.into());
11051            self
11052        }
11053        ///If `original_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11054        pub fn original_id_opt_mut(&mut self) -> Option<&mut String> {
11055            self.original_id.as_mut().map(|field| field as _)
11056        }
11057        ///Returns a mutable reference to `original_id`.
11058        ///If the field is unset, it is first initialized with the default value.
11059        pub fn original_id_mut(&mut self) -> &mut String {
11060            self.original_id.get_or_insert_default()
11061        }
11062        ///If `original_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
11063        pub fn original_id_opt(&self) -> Option<&str> {
11064            self.original_id.as_ref().map(|field| field as _)
11065        }
11066        ///Sets `original_id` with the provided value.
11067        pub fn set_original_id<T: Into<String>>(&mut self, field: T) {
11068            self.original_id = Some(field.into().into());
11069        }
11070        ///Sets `original_id` with the provided value.
11071        pub fn with_original_id<T: Into<String>>(mut self, field: T) -> Self {
11072            self.set_original_id(field.into());
11073            self
11074        }
11075        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11076        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
11077            self.version.as_mut().map(|field| field as _)
11078        }
11079        ///Returns a mutable reference to `version`.
11080        ///If the field is unset, it is first initialized with the default value.
11081        pub fn version_mut(&mut self) -> &mut u64 {
11082            self.version.get_or_insert_default()
11083        }
11084        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
11085        pub fn version_opt(&self) -> Option<u64> {
11086            self.version.as_ref().map(|field| *field)
11087        }
11088        ///Sets `version` with the provided value.
11089        pub fn set_version<T: Into<u64>>(&mut self, field: T) {
11090            self.version = Some(field.into().into());
11091        }
11092        ///Sets `version` with the provided value.
11093        pub fn with_version<T: Into<u64>>(mut self, field: T) -> Self {
11094            self.set_version(field.into());
11095            self
11096        }
11097        ///Returns the value of `modules`, or the default value if `modules` is unset.
11098        pub fn modules(&self) -> &[super::Module] {
11099            &self.modules
11100        }
11101        ///Returns a mutable reference to `modules`.
11102        ///If the field is unset, it is first initialized with the default value.
11103        pub fn modules_mut(&mut self) -> &mut Vec<super::Module> {
11104            &mut self.modules
11105        }
11106        ///Sets `modules` with the provided value.
11107        pub fn set_modules(&mut self, field: Vec<super::Module>) {
11108            self.modules = field;
11109        }
11110        ///Sets `modules` with the provided value.
11111        pub fn with_modules(mut self, field: Vec<super::Module>) -> Self {
11112            self.set_modules(field);
11113            self
11114        }
11115        ///Returns the value of `type_origins`, or the default value if `type_origins` is unset.
11116        pub fn type_origins(&self) -> &[super::TypeOrigin] {
11117            &self.type_origins
11118        }
11119        ///Returns a mutable reference to `type_origins`.
11120        ///If the field is unset, it is first initialized with the default value.
11121        pub fn type_origins_mut(&mut self) -> &mut Vec<super::TypeOrigin> {
11122            &mut self.type_origins
11123        }
11124        ///Sets `type_origins` with the provided value.
11125        pub fn set_type_origins(&mut self, field: Vec<super::TypeOrigin>) {
11126            self.type_origins = field;
11127        }
11128        ///Sets `type_origins` with the provided value.
11129        pub fn with_type_origins(mut self, field: Vec<super::TypeOrigin>) -> Self {
11130            self.set_type_origins(field);
11131            self
11132        }
11133        ///Returns the value of `linkage`, or the default value if `linkage` is unset.
11134        pub fn linkage(&self) -> &[super::Linkage] {
11135            &self.linkage
11136        }
11137        ///Returns a mutable reference to `linkage`.
11138        ///If the field is unset, it is first initialized with the default value.
11139        pub fn linkage_mut(&mut self) -> &mut Vec<super::Linkage> {
11140            &mut self.linkage
11141        }
11142        ///Sets `linkage` with the provided value.
11143        pub fn set_linkage(&mut self, field: Vec<super::Linkage>) {
11144            self.linkage = field;
11145        }
11146        ///Sets `linkage` with the provided value.
11147        pub fn with_linkage(mut self, field: Vec<super::Linkage>) -> Self {
11148            self.set_linkage(field);
11149            self
11150        }
11151    }
11152    impl super::PackageUpgradeError {
11153        pub const fn const_default() -> Self {
11154            Self {
11155                kind: None,
11156                package_id: None,
11157                digest: None,
11158                policy: None,
11159                ticket_id: None,
11160            }
11161        }
11162        #[doc(hidden)]
11163        pub fn default_instance() -> &'static Self {
11164            static DEFAULT: super::PackageUpgradeError = super::PackageUpgradeError::const_default();
11165            &DEFAULT
11166        }
11167        ///Sets `kind` with the provided value.
11168        pub fn with_kind<T: Into<super::package_upgrade_error::PackageUpgradeErrorKind>>(
11169            mut self,
11170            field: T,
11171        ) -> Self {
11172            self.set_kind(field.into());
11173            self
11174        }
11175        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11176        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
11177            self.package_id.as_mut().map(|field| field as _)
11178        }
11179        ///Returns a mutable reference to `package_id`.
11180        ///If the field is unset, it is first initialized with the default value.
11181        pub fn package_id_mut(&mut self) -> &mut String {
11182            self.package_id.get_or_insert_default()
11183        }
11184        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
11185        pub fn package_id_opt(&self) -> Option<&str> {
11186            self.package_id.as_ref().map(|field| field as _)
11187        }
11188        ///Sets `package_id` with the provided value.
11189        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
11190            self.package_id = Some(field.into().into());
11191        }
11192        ///Sets `package_id` with the provided value.
11193        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
11194            self.set_package_id(field.into());
11195            self
11196        }
11197        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11198        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
11199            self.digest.as_mut().map(|field| field as _)
11200        }
11201        ///Returns a mutable reference to `digest`.
11202        ///If the field is unset, it is first initialized with the default value.
11203        pub fn digest_mut(&mut self) -> &mut String {
11204            self.digest.get_or_insert_default()
11205        }
11206        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
11207        pub fn digest_opt(&self) -> Option<&str> {
11208            self.digest.as_ref().map(|field| field as _)
11209        }
11210        ///Sets `digest` with the provided value.
11211        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
11212            self.digest = Some(field.into().into());
11213        }
11214        ///Sets `digest` with the provided value.
11215        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
11216            self.set_digest(field.into());
11217            self
11218        }
11219        ///If `policy` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11220        pub fn policy_opt_mut(&mut self) -> Option<&mut u32> {
11221            self.policy.as_mut().map(|field| field as _)
11222        }
11223        ///Returns a mutable reference to `policy`.
11224        ///If the field is unset, it is first initialized with the default value.
11225        pub fn policy_mut(&mut self) -> &mut u32 {
11226            self.policy.get_or_insert_default()
11227        }
11228        ///If `policy` is set, returns [`Some`] with the value; otherwise returns [`None`].
11229        pub fn policy_opt(&self) -> Option<u32> {
11230            self.policy.as_ref().map(|field| *field)
11231        }
11232        ///Sets `policy` with the provided value.
11233        pub fn set_policy<T: Into<u32>>(&mut self, field: T) {
11234            self.policy = Some(field.into().into());
11235        }
11236        ///Sets `policy` with the provided value.
11237        pub fn with_policy<T: Into<u32>>(mut self, field: T) -> Self {
11238            self.set_policy(field.into());
11239            self
11240        }
11241        ///If `ticket_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11242        pub fn ticket_id_opt_mut(&mut self) -> Option<&mut String> {
11243            self.ticket_id.as_mut().map(|field| field as _)
11244        }
11245        ///Returns a mutable reference to `ticket_id`.
11246        ///If the field is unset, it is first initialized with the default value.
11247        pub fn ticket_id_mut(&mut self) -> &mut String {
11248            self.ticket_id.get_or_insert_default()
11249        }
11250        ///If `ticket_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
11251        pub fn ticket_id_opt(&self) -> Option<&str> {
11252            self.ticket_id.as_ref().map(|field| field as _)
11253        }
11254        ///Sets `ticket_id` with the provided value.
11255        pub fn set_ticket_id<T: Into<String>>(&mut self, field: T) {
11256            self.ticket_id = Some(field.into().into());
11257        }
11258        ///Sets `ticket_id` with the provided value.
11259        pub fn with_ticket_id<T: Into<String>>(mut self, field: T) -> Self {
11260            self.set_ticket_id(field.into());
11261            self
11262        }
11263    }
11264    impl super::PackageVersion {
11265        pub const fn const_default() -> Self {
11266            Self {
11267                package_id: None,
11268                version: None,
11269            }
11270        }
11271        #[doc(hidden)]
11272        pub fn default_instance() -> &'static Self {
11273            static DEFAULT: super::PackageVersion = super::PackageVersion::const_default();
11274            &DEFAULT
11275        }
11276        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11277        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
11278            self.package_id.as_mut().map(|field| field as _)
11279        }
11280        ///Returns a mutable reference to `package_id`.
11281        ///If the field is unset, it is first initialized with the default value.
11282        pub fn package_id_mut(&mut self) -> &mut String {
11283            self.package_id.get_or_insert_default()
11284        }
11285        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
11286        pub fn package_id_opt(&self) -> Option<&str> {
11287            self.package_id.as_ref().map(|field| field as _)
11288        }
11289        ///Sets `package_id` with the provided value.
11290        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
11291            self.package_id = Some(field.into().into());
11292        }
11293        ///Sets `package_id` with the provided value.
11294        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
11295            self.set_package_id(field.into());
11296            self
11297        }
11298        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11299        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
11300            self.version.as_mut().map(|field| field as _)
11301        }
11302        ///Returns a mutable reference to `version`.
11303        ///If the field is unset, it is first initialized with the default value.
11304        pub fn version_mut(&mut self) -> &mut u64 {
11305            self.version.get_or_insert_default()
11306        }
11307        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
11308        pub fn version_opt(&self) -> Option<u64> {
11309            self.version.as_ref().map(|field| *field)
11310        }
11311        ///Sets `version` with the provided value.
11312        pub fn set_version<T: Into<u64>>(&mut self, field: T) {
11313            self.version = Some(field.into().into());
11314        }
11315        ///Sets `version` with the provided value.
11316        pub fn with_version<T: Into<u64>>(mut self, field: T) -> Self {
11317            self.set_version(field.into());
11318            self
11319        }
11320    }
11321    impl super::PasskeyAuthenticator {
11322        pub const fn const_default() -> Self {
11323            Self {
11324                authenticator_data: None,
11325                client_data_json: None,
11326                signature: None,
11327            }
11328        }
11329        #[doc(hidden)]
11330        pub fn default_instance() -> &'static Self {
11331            static DEFAULT: super::PasskeyAuthenticator = super::PasskeyAuthenticator::const_default();
11332            &DEFAULT
11333        }
11334        ///If `authenticator_data` is set, returns [`Some`] with the value; otherwise returns [`None`].
11335        pub fn authenticator_data_opt(&self) -> Option<&[u8]> {
11336            self.authenticator_data.as_ref().map(|field| field as _)
11337        }
11338        ///Sets `authenticator_data` with the provided value.
11339        pub fn set_authenticator_data<T: Into<::prost::bytes::Bytes>>(
11340            &mut self,
11341            field: T,
11342        ) {
11343            self.authenticator_data = Some(field.into().into());
11344        }
11345        ///Sets `authenticator_data` with the provided value.
11346        pub fn with_authenticator_data<T: Into<::prost::bytes::Bytes>>(
11347            mut self,
11348            field: T,
11349        ) -> Self {
11350            self.set_authenticator_data(field.into());
11351            self
11352        }
11353        ///If `client_data_json` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11354        pub fn client_data_json_opt_mut(&mut self) -> Option<&mut String> {
11355            self.client_data_json.as_mut().map(|field| field as _)
11356        }
11357        ///Returns a mutable reference to `client_data_json`.
11358        ///If the field is unset, it is first initialized with the default value.
11359        pub fn client_data_json_mut(&mut self) -> &mut String {
11360            self.client_data_json.get_or_insert_default()
11361        }
11362        ///If `client_data_json` is set, returns [`Some`] with the value; otherwise returns [`None`].
11363        pub fn client_data_json_opt(&self) -> Option<&str> {
11364            self.client_data_json.as_ref().map(|field| field as _)
11365        }
11366        ///Sets `client_data_json` with the provided value.
11367        pub fn set_client_data_json<T: Into<String>>(&mut self, field: T) {
11368            self.client_data_json = Some(field.into().into());
11369        }
11370        ///Sets `client_data_json` with the provided value.
11371        pub fn with_client_data_json<T: Into<String>>(mut self, field: T) -> Self {
11372            self.set_client_data_json(field.into());
11373            self
11374        }
11375        ///Returns the value of `signature`, or the default value if `signature` is unset.
11376        pub fn signature(&self) -> &super::SimpleSignature {
11377            self.signature
11378                .as_ref()
11379                .map(|field| field as _)
11380                .unwrap_or_else(|| super::SimpleSignature::default_instance() as _)
11381        }
11382        ///If `signature` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11383        pub fn signature_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
11384            self.signature.as_mut().map(|field| field as _)
11385        }
11386        ///Returns a mutable reference to `signature`.
11387        ///If the field is unset, it is first initialized with the default value.
11388        pub fn signature_mut(&mut self) -> &mut super::SimpleSignature {
11389            self.signature.get_or_insert_default()
11390        }
11391        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
11392        pub fn signature_opt(&self) -> Option<&super::SimpleSignature> {
11393            self.signature.as_ref().map(|field| field as _)
11394        }
11395        ///Sets `signature` with the provided value.
11396        pub fn set_signature<T: Into<super::SimpleSignature>>(&mut self, field: T) {
11397            self.signature = Some(field.into().into());
11398        }
11399        ///Sets `signature` with the provided value.
11400        pub fn with_signature<T: Into<super::SimpleSignature>>(
11401            mut self,
11402            field: T,
11403        ) -> Self {
11404            self.set_signature(field.into());
11405            self
11406        }
11407    }
11408    impl super::ProgrammableTransaction {
11409        pub const fn const_default() -> Self {
11410            Self {
11411                inputs: Vec::new(),
11412                commands: Vec::new(),
11413            }
11414        }
11415        #[doc(hidden)]
11416        pub fn default_instance() -> &'static Self {
11417            static DEFAULT: super::ProgrammableTransaction = super::ProgrammableTransaction::const_default();
11418            &DEFAULT
11419        }
11420        ///Returns the value of `inputs`, or the default value if `inputs` is unset.
11421        pub fn inputs(&self) -> &[super::Input] {
11422            &self.inputs
11423        }
11424        ///Returns a mutable reference to `inputs`.
11425        ///If the field is unset, it is first initialized with the default value.
11426        pub fn inputs_mut(&mut self) -> &mut Vec<super::Input> {
11427            &mut self.inputs
11428        }
11429        ///Sets `inputs` with the provided value.
11430        pub fn set_inputs(&mut self, field: Vec<super::Input>) {
11431            self.inputs = field;
11432        }
11433        ///Sets `inputs` with the provided value.
11434        pub fn with_inputs(mut self, field: Vec<super::Input>) -> Self {
11435            self.set_inputs(field);
11436            self
11437        }
11438        ///Returns the value of `commands`, or the default value if `commands` is unset.
11439        pub fn commands(&self) -> &[super::Command] {
11440            &self.commands
11441        }
11442        ///Returns a mutable reference to `commands`.
11443        ///If the field is unset, it is first initialized with the default value.
11444        pub fn commands_mut(&mut self) -> &mut Vec<super::Command> {
11445            &mut self.commands
11446        }
11447        ///Sets `commands` with the provided value.
11448        pub fn set_commands(&mut self, field: Vec<super::Command>) {
11449            self.commands = field;
11450        }
11451        ///Sets `commands` with the provided value.
11452        pub fn with_commands(mut self, field: Vec<super::Command>) -> Self {
11453            self.set_commands(field);
11454            self
11455        }
11456    }
11457    impl super::ProtocolConfig {
11458        pub const fn const_default() -> Self {
11459            Self {
11460                protocol_version: None,
11461                feature_flags: std::collections::BTreeMap::new(),
11462                attributes: std::collections::BTreeMap::new(),
11463            }
11464        }
11465        #[doc(hidden)]
11466        pub fn default_instance() -> &'static Self {
11467            static DEFAULT: super::ProtocolConfig = super::ProtocolConfig::const_default();
11468            &DEFAULT
11469        }
11470        ///If `protocol_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11471        pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
11472            self.protocol_version.as_mut().map(|field| field as _)
11473        }
11474        ///Returns a mutable reference to `protocol_version`.
11475        ///If the field is unset, it is first initialized with the default value.
11476        pub fn protocol_version_mut(&mut self) -> &mut u64 {
11477            self.protocol_version.get_or_insert_default()
11478        }
11479        ///If `protocol_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
11480        pub fn protocol_version_opt(&self) -> Option<u64> {
11481            self.protocol_version.as_ref().map(|field| *field)
11482        }
11483        ///Sets `protocol_version` with the provided value.
11484        pub fn set_protocol_version<T: Into<u64>>(&mut self, field: T) {
11485            self.protocol_version = Some(field.into().into());
11486        }
11487        ///Sets `protocol_version` with the provided value.
11488        pub fn with_protocol_version<T: Into<u64>>(mut self, field: T) -> Self {
11489            self.set_protocol_version(field.into());
11490            self
11491        }
11492        ///Returns the value of `feature_flags`, or the default value if `feature_flags` is unset.
11493        pub fn feature_flags(&self) -> &::std::collections::BTreeMap<String, bool> {
11494            &self.feature_flags
11495        }
11496        ///Returns a mutable reference to `feature_flags`.
11497        ///If the field is unset, it is first initialized with the default value.
11498        pub fn feature_flags_mut(
11499            &mut self,
11500        ) -> &mut ::std::collections::BTreeMap<String, bool> {
11501            &mut self.feature_flags
11502        }
11503        ///Sets `feature_flags` with the provided value.
11504        pub fn set_feature_flags(
11505            &mut self,
11506            field: ::std::collections::BTreeMap<String, bool>,
11507        ) {
11508            self.feature_flags = field;
11509        }
11510        ///Sets `feature_flags` with the provided value.
11511        pub fn with_feature_flags(
11512            mut self,
11513            field: ::std::collections::BTreeMap<String, bool>,
11514        ) -> Self {
11515            self.set_feature_flags(field);
11516            self
11517        }
11518        ///Returns the value of `attributes`, or the default value if `attributes` is unset.
11519        pub fn attributes(&self) -> &::std::collections::BTreeMap<String, String> {
11520            &self.attributes
11521        }
11522        ///Returns a mutable reference to `attributes`.
11523        ///If the field is unset, it is first initialized with the default value.
11524        pub fn attributes_mut(
11525            &mut self,
11526        ) -> &mut ::std::collections::BTreeMap<String, String> {
11527            &mut self.attributes
11528        }
11529        ///Sets `attributes` with the provided value.
11530        pub fn set_attributes(
11531            &mut self,
11532            field: ::std::collections::BTreeMap<String, String>,
11533        ) {
11534            self.attributes = field;
11535        }
11536        ///Sets `attributes` with the provided value.
11537        pub fn with_attributes(
11538            mut self,
11539            field: ::std::collections::BTreeMap<String, String>,
11540        ) -> Self {
11541            self.set_attributes(field);
11542            self
11543        }
11544    }
11545    impl super::Publish {
11546        pub const fn const_default() -> Self {
11547            Self {
11548                modules: Vec::new(),
11549                dependencies: Vec::new(),
11550            }
11551        }
11552        #[doc(hidden)]
11553        pub fn default_instance() -> &'static Self {
11554            static DEFAULT: super::Publish = super::Publish::const_default();
11555            &DEFAULT
11556        }
11557        ///Returns the value of `modules`, or the default value if `modules` is unset.
11558        pub fn modules(&self) -> &[::prost::bytes::Bytes] {
11559            &self.modules
11560        }
11561        ///Returns a mutable reference to `modules`.
11562        ///If the field is unset, it is first initialized with the default value.
11563        pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
11564            &mut self.modules
11565        }
11566        ///Sets `modules` with the provided value.
11567        pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
11568            self.modules = field;
11569        }
11570        ///Sets `modules` with the provided value.
11571        pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
11572            self.set_modules(field);
11573            self
11574        }
11575        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
11576        pub fn dependencies(&self) -> &[String] {
11577            &self.dependencies
11578        }
11579        ///Returns a mutable reference to `dependencies`.
11580        ///If the field is unset, it is first initialized with the default value.
11581        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
11582            &mut self.dependencies
11583        }
11584        ///Sets `dependencies` with the provided value.
11585        pub fn set_dependencies(&mut self, field: Vec<String>) {
11586            self.dependencies = field;
11587        }
11588        ///Sets `dependencies` with the provided value.
11589        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
11590            self.set_dependencies(field);
11591            self
11592        }
11593    }
11594    impl super::RandomnessStateUpdate {
11595        pub const fn const_default() -> Self {
11596            Self {
11597                epoch: None,
11598                randomness_round: None,
11599                random_bytes: None,
11600                randomness_object_initial_shared_version: None,
11601            }
11602        }
11603        #[doc(hidden)]
11604        pub fn default_instance() -> &'static Self {
11605            static DEFAULT: super::RandomnessStateUpdate = super::RandomnessStateUpdate::const_default();
11606            &DEFAULT
11607        }
11608        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11609        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
11610            self.epoch.as_mut().map(|field| field as _)
11611        }
11612        ///Returns a mutable reference to `epoch`.
11613        ///If the field is unset, it is first initialized with the default value.
11614        pub fn epoch_mut(&mut self) -> &mut u64 {
11615            self.epoch.get_or_insert_default()
11616        }
11617        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
11618        pub fn epoch_opt(&self) -> Option<u64> {
11619            self.epoch.as_ref().map(|field| *field)
11620        }
11621        ///Sets `epoch` with the provided value.
11622        pub fn set_epoch<T: Into<u64>>(&mut self, field: T) {
11623            self.epoch = Some(field.into().into());
11624        }
11625        ///Sets `epoch` with the provided value.
11626        pub fn with_epoch<T: Into<u64>>(mut self, field: T) -> Self {
11627            self.set_epoch(field.into());
11628            self
11629        }
11630        ///If `randomness_round` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11631        pub fn randomness_round_opt_mut(&mut self) -> Option<&mut u64> {
11632            self.randomness_round.as_mut().map(|field| field as _)
11633        }
11634        ///Returns a mutable reference to `randomness_round`.
11635        ///If the field is unset, it is first initialized with the default value.
11636        pub fn randomness_round_mut(&mut self) -> &mut u64 {
11637            self.randomness_round.get_or_insert_default()
11638        }
11639        ///If `randomness_round` is set, returns [`Some`] with the value; otherwise returns [`None`].
11640        pub fn randomness_round_opt(&self) -> Option<u64> {
11641            self.randomness_round.as_ref().map(|field| *field)
11642        }
11643        ///Sets `randomness_round` with the provided value.
11644        pub fn set_randomness_round<T: Into<u64>>(&mut self, field: T) {
11645            self.randomness_round = Some(field.into().into());
11646        }
11647        ///Sets `randomness_round` with the provided value.
11648        pub fn with_randomness_round<T: Into<u64>>(mut self, field: T) -> Self {
11649            self.set_randomness_round(field.into());
11650            self
11651        }
11652        ///If `random_bytes` is set, returns [`Some`] with the value; otherwise returns [`None`].
11653        pub fn random_bytes_opt(&self) -> Option<&[u8]> {
11654            self.random_bytes.as_ref().map(|field| field as _)
11655        }
11656        ///Sets `random_bytes` with the provided value.
11657        pub fn set_random_bytes<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
11658            self.random_bytes = Some(field.into().into());
11659        }
11660        ///Sets `random_bytes` with the provided value.
11661        pub fn with_random_bytes<T: Into<::prost::bytes::Bytes>>(
11662            mut self,
11663            field: T,
11664        ) -> Self {
11665            self.set_random_bytes(field.into());
11666            self
11667        }
11668        ///If `randomness_object_initial_shared_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11669        pub fn randomness_object_initial_shared_version_opt_mut(
11670            &mut self,
11671        ) -> Option<&mut u64> {
11672            self.randomness_object_initial_shared_version
11673                .as_mut()
11674                .map(|field| field as _)
11675        }
11676        ///Returns a mutable reference to `randomness_object_initial_shared_version`.
11677        ///If the field is unset, it is first initialized with the default value.
11678        pub fn randomness_object_initial_shared_version_mut(&mut self) -> &mut u64 {
11679            self.randomness_object_initial_shared_version.get_or_insert_default()
11680        }
11681        ///If `randomness_object_initial_shared_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
11682        pub fn randomness_object_initial_shared_version_opt(&self) -> Option<u64> {
11683            self.randomness_object_initial_shared_version.as_ref().map(|field| *field)
11684        }
11685        ///Sets `randomness_object_initial_shared_version` with the provided value.
11686        pub fn set_randomness_object_initial_shared_version<T: Into<u64>>(
11687            &mut self,
11688            field: T,
11689        ) {
11690            self.randomness_object_initial_shared_version = Some(field.into().into());
11691        }
11692        ///Sets `randomness_object_initial_shared_version` with the provided value.
11693        pub fn with_randomness_object_initial_shared_version<T: Into<u64>>(
11694            mut self,
11695            field: T,
11696        ) -> Self {
11697            self.set_randomness_object_initial_shared_version(field.into());
11698            self
11699        }
11700    }
11701    impl super::RegulatedCoinMetadata {
11702        pub const fn const_default() -> Self {
11703            Self {
11704                id: None,
11705                coin_metadata_object: None,
11706                deny_cap_object: None,
11707                allow_global_pause: None,
11708                variant: None,
11709                coin_regulated_state: None,
11710            }
11711        }
11712        #[doc(hidden)]
11713        pub fn default_instance() -> &'static Self {
11714            static DEFAULT: super::RegulatedCoinMetadata = super::RegulatedCoinMetadata::const_default();
11715            &DEFAULT
11716        }
11717        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11718        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
11719            self.id.as_mut().map(|field| field as _)
11720        }
11721        ///Returns a mutable reference to `id`.
11722        ///If the field is unset, it is first initialized with the default value.
11723        pub fn id_mut(&mut self) -> &mut String {
11724            self.id.get_or_insert_default()
11725        }
11726        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
11727        pub fn id_opt(&self) -> Option<&str> {
11728            self.id.as_ref().map(|field| field as _)
11729        }
11730        ///Sets `id` with the provided value.
11731        pub fn set_id<T: Into<String>>(&mut self, field: T) {
11732            self.id = Some(field.into().into());
11733        }
11734        ///Sets `id` with the provided value.
11735        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
11736            self.set_id(field.into());
11737            self
11738        }
11739        ///If `coin_metadata_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11740        pub fn coin_metadata_object_opt_mut(&mut self) -> Option<&mut String> {
11741            self.coin_metadata_object.as_mut().map(|field| field as _)
11742        }
11743        ///Returns a mutable reference to `coin_metadata_object`.
11744        ///If the field is unset, it is first initialized with the default value.
11745        pub fn coin_metadata_object_mut(&mut self) -> &mut String {
11746            self.coin_metadata_object.get_or_insert_default()
11747        }
11748        ///If `coin_metadata_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
11749        pub fn coin_metadata_object_opt(&self) -> Option<&str> {
11750            self.coin_metadata_object.as_ref().map(|field| field as _)
11751        }
11752        ///Sets `coin_metadata_object` with the provided value.
11753        pub fn set_coin_metadata_object<T: Into<String>>(&mut self, field: T) {
11754            self.coin_metadata_object = Some(field.into().into());
11755        }
11756        ///Sets `coin_metadata_object` with the provided value.
11757        pub fn with_coin_metadata_object<T: Into<String>>(mut self, field: T) -> Self {
11758            self.set_coin_metadata_object(field.into());
11759            self
11760        }
11761        ///If `deny_cap_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11762        pub fn deny_cap_object_opt_mut(&mut self) -> Option<&mut String> {
11763            self.deny_cap_object.as_mut().map(|field| field as _)
11764        }
11765        ///Returns a mutable reference to `deny_cap_object`.
11766        ///If the field is unset, it is first initialized with the default value.
11767        pub fn deny_cap_object_mut(&mut self) -> &mut String {
11768            self.deny_cap_object.get_or_insert_default()
11769        }
11770        ///If `deny_cap_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
11771        pub fn deny_cap_object_opt(&self) -> Option<&str> {
11772            self.deny_cap_object.as_ref().map(|field| field as _)
11773        }
11774        ///Sets `deny_cap_object` with the provided value.
11775        pub fn set_deny_cap_object<T: Into<String>>(&mut self, field: T) {
11776            self.deny_cap_object = Some(field.into().into());
11777        }
11778        ///Sets `deny_cap_object` with the provided value.
11779        pub fn with_deny_cap_object<T: Into<String>>(mut self, field: T) -> Self {
11780            self.set_deny_cap_object(field.into());
11781            self
11782        }
11783        ///If `allow_global_pause` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11784        pub fn allow_global_pause_opt_mut(&mut self) -> Option<&mut bool> {
11785            self.allow_global_pause.as_mut().map(|field| field as _)
11786        }
11787        ///Returns a mutable reference to `allow_global_pause`.
11788        ///If the field is unset, it is first initialized with the default value.
11789        pub fn allow_global_pause_mut(&mut self) -> &mut bool {
11790            self.allow_global_pause.get_or_insert_default()
11791        }
11792        ///If `allow_global_pause` is set, returns [`Some`] with the value; otherwise returns [`None`].
11793        pub fn allow_global_pause_opt(&self) -> Option<bool> {
11794            self.allow_global_pause.as_ref().map(|field| *field)
11795        }
11796        ///Sets `allow_global_pause` with the provided value.
11797        pub fn set_allow_global_pause<T: Into<bool>>(&mut self, field: T) {
11798            self.allow_global_pause = Some(field.into().into());
11799        }
11800        ///Sets `allow_global_pause` with the provided value.
11801        pub fn with_allow_global_pause<T: Into<bool>>(mut self, field: T) -> Self {
11802            self.set_allow_global_pause(field.into());
11803            self
11804        }
11805        ///If `variant` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11806        pub fn variant_opt_mut(&mut self) -> Option<&mut u32> {
11807            self.variant.as_mut().map(|field| field as _)
11808        }
11809        ///Returns a mutable reference to `variant`.
11810        ///If the field is unset, it is first initialized with the default value.
11811        pub fn variant_mut(&mut self) -> &mut u32 {
11812            self.variant.get_or_insert_default()
11813        }
11814        ///If `variant` is set, returns [`Some`] with the value; otherwise returns [`None`].
11815        pub fn variant_opt(&self) -> Option<u32> {
11816            self.variant.as_ref().map(|field| *field)
11817        }
11818        ///Sets `variant` with the provided value.
11819        pub fn set_variant<T: Into<u32>>(&mut self, field: T) {
11820            self.variant = Some(field.into().into());
11821        }
11822        ///Sets `variant` with the provided value.
11823        pub fn with_variant<T: Into<u32>>(mut self, field: T) -> Self {
11824            self.set_variant(field.into());
11825            self
11826        }
11827        ///Sets `coin_regulated_state` with the provided value.
11828        pub fn with_coin_regulated_state<
11829            T: Into<super::regulated_coin_metadata::CoinRegulatedState>,
11830        >(mut self, field: T) -> Self {
11831            self.set_coin_regulated_state(field.into());
11832            self
11833        }
11834    }
11835    impl super::ReverseLookupNameRequest {
11836        pub const fn const_default() -> Self {
11837            Self { address: None }
11838        }
11839        #[doc(hidden)]
11840        pub fn default_instance() -> &'static Self {
11841            static DEFAULT: super::ReverseLookupNameRequest = super::ReverseLookupNameRequest::const_default();
11842            &DEFAULT
11843        }
11844        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11845        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
11846            self.address.as_mut().map(|field| field as _)
11847        }
11848        ///Returns a mutable reference to `address`.
11849        ///If the field is unset, it is first initialized with the default value.
11850        pub fn address_mut(&mut self) -> &mut String {
11851            self.address.get_or_insert_default()
11852        }
11853        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
11854        pub fn address_opt(&self) -> Option<&str> {
11855            self.address.as_ref().map(|field| field as _)
11856        }
11857        ///Sets `address` with the provided value.
11858        pub fn set_address<T: Into<String>>(&mut self, field: T) {
11859            self.address = Some(field.into().into());
11860        }
11861        ///Sets `address` with the provided value.
11862        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
11863            self.set_address(field.into());
11864            self
11865        }
11866    }
11867    impl super::ReverseLookupNameResponse {
11868        pub const fn const_default() -> Self {
11869            Self { record: None }
11870        }
11871        #[doc(hidden)]
11872        pub fn default_instance() -> &'static Self {
11873            static DEFAULT: super::ReverseLookupNameResponse = super::ReverseLookupNameResponse::const_default();
11874            &DEFAULT
11875        }
11876        ///Returns the value of `record`, or the default value if `record` is unset.
11877        pub fn record(&self) -> &super::NameRecord {
11878            self.record
11879                .as_ref()
11880                .map(|field| field as _)
11881                .unwrap_or_else(|| super::NameRecord::default_instance() as _)
11882        }
11883        ///If `record` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11884        pub fn record_opt_mut(&mut self) -> Option<&mut super::NameRecord> {
11885            self.record.as_mut().map(|field| field as _)
11886        }
11887        ///Returns a mutable reference to `record`.
11888        ///If the field is unset, it is first initialized with the default value.
11889        pub fn record_mut(&mut self) -> &mut super::NameRecord {
11890            self.record.get_or_insert_default()
11891        }
11892        ///If `record` is set, returns [`Some`] with the value; otherwise returns [`None`].
11893        pub fn record_opt(&self) -> Option<&super::NameRecord> {
11894            self.record.as_ref().map(|field| field as _)
11895        }
11896        ///Sets `record` with the provided value.
11897        pub fn set_record<T: Into<super::NameRecord>>(&mut self, field: T) {
11898            self.record = Some(field.into().into());
11899        }
11900        ///Sets `record` with the provided value.
11901        pub fn with_record<T: Into<super::NameRecord>>(mut self, field: T) -> Self {
11902            self.set_record(field.into());
11903            self
11904        }
11905    }
11906    impl super::SimpleSignature {
11907        pub const fn const_default() -> Self {
11908            Self {
11909                scheme: None,
11910                signature: None,
11911                public_key: None,
11912            }
11913        }
11914        #[doc(hidden)]
11915        pub fn default_instance() -> &'static Self {
11916            static DEFAULT: super::SimpleSignature = super::SimpleSignature::const_default();
11917            &DEFAULT
11918        }
11919        ///Sets `scheme` with the provided value.
11920        pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
11921            self.set_scheme(field.into());
11922            self
11923        }
11924        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
11925        pub fn signature_opt(&self) -> Option<&[u8]> {
11926            self.signature.as_ref().map(|field| field as _)
11927        }
11928        ///Sets `signature` with the provided value.
11929        pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
11930            self.signature = Some(field.into().into());
11931        }
11932        ///Sets `signature` with the provided value.
11933        pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
11934            mut self,
11935            field: T,
11936        ) -> Self {
11937            self.set_signature(field.into());
11938            self
11939        }
11940        ///If `public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
11941        pub fn public_key_opt(&self) -> Option<&[u8]> {
11942            self.public_key.as_ref().map(|field| field as _)
11943        }
11944        ///Sets `public_key` with the provided value.
11945        pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
11946            self.public_key = Some(field.into().into());
11947        }
11948        ///Sets `public_key` with the provided value.
11949        pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
11950            mut self,
11951            field: T,
11952        ) -> Self {
11953            self.set_public_key(field.into());
11954            self
11955        }
11956    }
11957    impl super::SimulateTransactionRequest {
11958        pub const fn const_default() -> Self {
11959            Self {
11960                transaction: None,
11961                read_mask: None,
11962                checks: None,
11963                do_gas_selection: None,
11964            }
11965        }
11966        #[doc(hidden)]
11967        pub fn default_instance() -> &'static Self {
11968            static DEFAULT: super::SimulateTransactionRequest = super::SimulateTransactionRequest::const_default();
11969            &DEFAULT
11970        }
11971        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
11972        pub fn transaction(&self) -> &super::Transaction {
11973            self.transaction
11974                .as_ref()
11975                .map(|field| field as _)
11976                .unwrap_or_else(|| super::Transaction::default_instance() as _)
11977        }
11978        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11979        pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
11980            self.transaction.as_mut().map(|field| field as _)
11981        }
11982        ///Returns a mutable reference to `transaction`.
11983        ///If the field is unset, it is first initialized with the default value.
11984        pub fn transaction_mut(&mut self) -> &mut super::Transaction {
11985            self.transaction.get_or_insert_default()
11986        }
11987        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
11988        pub fn transaction_opt(&self) -> Option<&super::Transaction> {
11989            self.transaction.as_ref().map(|field| field as _)
11990        }
11991        ///Sets `transaction` with the provided value.
11992        pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
11993            self.transaction = Some(field.into().into());
11994        }
11995        ///Sets `transaction` with the provided value.
11996        pub fn with_transaction<T: Into<super::Transaction>>(
11997            mut self,
11998            field: T,
11999        ) -> Self {
12000            self.set_transaction(field.into());
12001            self
12002        }
12003        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12004        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
12005            self.read_mask.as_mut().map(|field| field as _)
12006        }
12007        ///Returns a mutable reference to `read_mask`.
12008        ///If the field is unset, it is first initialized with the default value.
12009        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
12010            self.read_mask.get_or_insert_default()
12011        }
12012        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
12013        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
12014            self.read_mask.as_ref().map(|field| field as _)
12015        }
12016        ///Sets `read_mask` with the provided value.
12017        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
12018            self.read_mask = Some(field.into().into());
12019        }
12020        ///Sets `read_mask` with the provided value.
12021        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
12022            mut self,
12023            field: T,
12024        ) -> Self {
12025            self.set_read_mask(field.into());
12026            self
12027        }
12028        ///Sets `checks` with the provided value.
12029        pub fn with_checks<
12030            T: Into<super::simulate_transaction_request::TransactionChecks>,
12031        >(mut self, field: T) -> Self {
12032            self.set_checks(field.into());
12033            self
12034        }
12035        ///If `do_gas_selection` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12036        pub fn do_gas_selection_opt_mut(&mut self) -> Option<&mut bool> {
12037            self.do_gas_selection.as_mut().map(|field| field as _)
12038        }
12039        ///Returns a mutable reference to `do_gas_selection`.
12040        ///If the field is unset, it is first initialized with the default value.
12041        pub fn do_gas_selection_mut(&mut self) -> &mut bool {
12042            self.do_gas_selection.get_or_insert_default()
12043        }
12044        ///If `do_gas_selection` is set, returns [`Some`] with the value; otherwise returns [`None`].
12045        pub fn do_gas_selection_opt(&self) -> Option<bool> {
12046            self.do_gas_selection.as_ref().map(|field| *field)
12047        }
12048        ///Sets `do_gas_selection` with the provided value.
12049        pub fn set_do_gas_selection<T: Into<bool>>(&mut self, field: T) {
12050            self.do_gas_selection = Some(field.into().into());
12051        }
12052        ///Sets `do_gas_selection` with the provided value.
12053        pub fn with_do_gas_selection<T: Into<bool>>(mut self, field: T) -> Self {
12054            self.set_do_gas_selection(field.into());
12055            self
12056        }
12057    }
12058    impl super::SimulateTransactionResponse {
12059        pub const fn const_default() -> Self {
12060            Self {
12061                transaction: None,
12062                command_outputs: Vec::new(),
12063            }
12064        }
12065        #[doc(hidden)]
12066        pub fn default_instance() -> &'static Self {
12067            static DEFAULT: super::SimulateTransactionResponse = super::SimulateTransactionResponse::const_default();
12068            &DEFAULT
12069        }
12070        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
12071        pub fn transaction(&self) -> &super::ExecutedTransaction {
12072            self.transaction
12073                .as_ref()
12074                .map(|field| field as _)
12075                .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
12076        }
12077        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12078        pub fn transaction_opt_mut(
12079            &mut self,
12080        ) -> Option<&mut super::ExecutedTransaction> {
12081            self.transaction.as_mut().map(|field| field as _)
12082        }
12083        ///Returns a mutable reference to `transaction`.
12084        ///If the field is unset, it is first initialized with the default value.
12085        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
12086            self.transaction.get_or_insert_default()
12087        }
12088        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
12089        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
12090            self.transaction.as_ref().map(|field| field as _)
12091        }
12092        ///Sets `transaction` with the provided value.
12093        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
12094            &mut self,
12095            field: T,
12096        ) {
12097            self.transaction = Some(field.into().into());
12098        }
12099        ///Sets `transaction` with the provided value.
12100        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
12101            mut self,
12102            field: T,
12103        ) -> Self {
12104            self.set_transaction(field.into());
12105            self
12106        }
12107        ///Returns the value of `command_outputs`, or the default value if `command_outputs` is unset.
12108        pub fn command_outputs(&self) -> &[super::CommandResult] {
12109            &self.command_outputs
12110        }
12111        ///Returns a mutable reference to `command_outputs`.
12112        ///If the field is unset, it is first initialized with the default value.
12113        pub fn command_outputs_mut(&mut self) -> &mut Vec<super::CommandResult> {
12114            &mut self.command_outputs
12115        }
12116        ///Sets `command_outputs` with the provided value.
12117        pub fn set_command_outputs(&mut self, field: Vec<super::CommandResult>) {
12118            self.command_outputs = field;
12119        }
12120        ///Sets `command_outputs` with the provided value.
12121        pub fn with_command_outputs(mut self, field: Vec<super::CommandResult>) -> Self {
12122            self.set_command_outputs(field);
12123            self
12124        }
12125    }
12126    impl super::SizeError {
12127        pub const fn const_default() -> Self {
12128            Self { size: None, max_size: None }
12129        }
12130        #[doc(hidden)]
12131        pub fn default_instance() -> &'static Self {
12132            static DEFAULT: super::SizeError = super::SizeError::const_default();
12133            &DEFAULT
12134        }
12135        ///If `size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12136        pub fn size_opt_mut(&mut self) -> Option<&mut u64> {
12137            self.size.as_mut().map(|field| field as _)
12138        }
12139        ///Returns a mutable reference to `size`.
12140        ///If the field is unset, it is first initialized with the default value.
12141        pub fn size_mut(&mut self) -> &mut u64 {
12142            self.size.get_or_insert_default()
12143        }
12144        ///If `size` is set, returns [`Some`] with the value; otherwise returns [`None`].
12145        pub fn size_opt(&self) -> Option<u64> {
12146            self.size.as_ref().map(|field| *field)
12147        }
12148        ///Sets `size` with the provided value.
12149        pub fn set_size<T: Into<u64>>(&mut self, field: T) {
12150            self.size = Some(field.into().into());
12151        }
12152        ///Sets `size` with the provided value.
12153        pub fn with_size<T: Into<u64>>(mut self, field: T) -> Self {
12154            self.set_size(field.into());
12155            self
12156        }
12157        ///If `max_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12158        pub fn max_size_opt_mut(&mut self) -> Option<&mut u64> {
12159            self.max_size.as_mut().map(|field| field as _)
12160        }
12161        ///Returns a mutable reference to `max_size`.
12162        ///If the field is unset, it is first initialized with the default value.
12163        pub fn max_size_mut(&mut self) -> &mut u64 {
12164            self.max_size.get_or_insert_default()
12165        }
12166        ///If `max_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
12167        pub fn max_size_opt(&self) -> Option<u64> {
12168            self.max_size.as_ref().map(|field| *field)
12169        }
12170        ///Sets `max_size` with the provided value.
12171        pub fn set_max_size<T: Into<u64>>(&mut self, field: T) {
12172            self.max_size = Some(field.into().into());
12173        }
12174        ///Sets `max_size` with the provided value.
12175        pub fn with_max_size<T: Into<u64>>(mut self, field: T) -> Self {
12176            self.set_max_size(field.into());
12177            self
12178        }
12179    }
12180    impl super::SplitCoins {
12181        pub const fn const_default() -> Self {
12182            Self {
12183                coin: None,
12184                amounts: Vec::new(),
12185            }
12186        }
12187        #[doc(hidden)]
12188        pub fn default_instance() -> &'static Self {
12189            static DEFAULT: super::SplitCoins = super::SplitCoins::const_default();
12190            &DEFAULT
12191        }
12192        ///Returns the value of `coin`, or the default value if `coin` is unset.
12193        pub fn coin(&self) -> &super::Argument {
12194            self.coin
12195                .as_ref()
12196                .map(|field| field as _)
12197                .unwrap_or_else(|| super::Argument::default_instance() as _)
12198        }
12199        ///If `coin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12200        pub fn coin_opt_mut(&mut self) -> Option<&mut super::Argument> {
12201            self.coin.as_mut().map(|field| field as _)
12202        }
12203        ///Returns a mutable reference to `coin`.
12204        ///If the field is unset, it is first initialized with the default value.
12205        pub fn coin_mut(&mut self) -> &mut super::Argument {
12206            self.coin.get_or_insert_default()
12207        }
12208        ///If `coin` is set, returns [`Some`] with the value; otherwise returns [`None`].
12209        pub fn coin_opt(&self) -> Option<&super::Argument> {
12210            self.coin.as_ref().map(|field| field as _)
12211        }
12212        ///Sets `coin` with the provided value.
12213        pub fn set_coin<T: Into<super::Argument>>(&mut self, field: T) {
12214            self.coin = Some(field.into().into());
12215        }
12216        ///Sets `coin` with the provided value.
12217        pub fn with_coin<T: Into<super::Argument>>(mut self, field: T) -> Self {
12218            self.set_coin(field.into());
12219            self
12220        }
12221        ///Returns the value of `amounts`, or the default value if `amounts` is unset.
12222        pub fn amounts(&self) -> &[super::Argument] {
12223            &self.amounts
12224        }
12225        ///Returns a mutable reference to `amounts`.
12226        ///If the field is unset, it is first initialized with the default value.
12227        pub fn amounts_mut(&mut self) -> &mut Vec<super::Argument> {
12228            &mut self.amounts
12229        }
12230        ///Sets `amounts` with the provided value.
12231        pub fn set_amounts(&mut self, field: Vec<super::Argument>) {
12232            self.amounts = field;
12233        }
12234        ///Sets `amounts` with the provided value.
12235        pub fn with_amounts(mut self, field: Vec<super::Argument>) -> Self {
12236            self.set_amounts(field);
12237            self
12238        }
12239    }
12240    impl super::StakeSubsidy {
12241        pub const fn const_default() -> Self {
12242            Self {
12243                balance: None,
12244                distribution_counter: None,
12245                current_distribution_amount: None,
12246                stake_subsidy_period_length: None,
12247                stake_subsidy_decrease_rate: None,
12248                extra_fields: None,
12249            }
12250        }
12251        #[doc(hidden)]
12252        pub fn default_instance() -> &'static Self {
12253            static DEFAULT: super::StakeSubsidy = super::StakeSubsidy::const_default();
12254            &DEFAULT
12255        }
12256        ///If `balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12257        pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
12258            self.balance.as_mut().map(|field| field as _)
12259        }
12260        ///Returns a mutable reference to `balance`.
12261        ///If the field is unset, it is first initialized with the default value.
12262        pub fn balance_mut(&mut self) -> &mut u64 {
12263            self.balance.get_or_insert_default()
12264        }
12265        ///If `balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
12266        pub fn balance_opt(&self) -> Option<u64> {
12267            self.balance.as_ref().map(|field| *field)
12268        }
12269        ///Sets `balance` with the provided value.
12270        pub fn set_balance<T: Into<u64>>(&mut self, field: T) {
12271            self.balance = Some(field.into().into());
12272        }
12273        ///Sets `balance` with the provided value.
12274        pub fn with_balance<T: Into<u64>>(mut self, field: T) -> Self {
12275            self.set_balance(field.into());
12276            self
12277        }
12278        ///If `distribution_counter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12279        pub fn distribution_counter_opt_mut(&mut self) -> Option<&mut u64> {
12280            self.distribution_counter.as_mut().map(|field| field as _)
12281        }
12282        ///Returns a mutable reference to `distribution_counter`.
12283        ///If the field is unset, it is first initialized with the default value.
12284        pub fn distribution_counter_mut(&mut self) -> &mut u64 {
12285            self.distribution_counter.get_or_insert_default()
12286        }
12287        ///If `distribution_counter` is set, returns [`Some`] with the value; otherwise returns [`None`].
12288        pub fn distribution_counter_opt(&self) -> Option<u64> {
12289            self.distribution_counter.as_ref().map(|field| *field)
12290        }
12291        ///Sets `distribution_counter` with the provided value.
12292        pub fn set_distribution_counter<T: Into<u64>>(&mut self, field: T) {
12293            self.distribution_counter = Some(field.into().into());
12294        }
12295        ///Sets `distribution_counter` with the provided value.
12296        pub fn with_distribution_counter<T: Into<u64>>(mut self, field: T) -> Self {
12297            self.set_distribution_counter(field.into());
12298            self
12299        }
12300        ///If `current_distribution_amount` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12301        pub fn current_distribution_amount_opt_mut(&mut self) -> Option<&mut u64> {
12302            self.current_distribution_amount.as_mut().map(|field| field as _)
12303        }
12304        ///Returns a mutable reference to `current_distribution_amount`.
12305        ///If the field is unset, it is first initialized with the default value.
12306        pub fn current_distribution_amount_mut(&mut self) -> &mut u64 {
12307            self.current_distribution_amount.get_or_insert_default()
12308        }
12309        ///If `current_distribution_amount` is set, returns [`Some`] with the value; otherwise returns [`None`].
12310        pub fn current_distribution_amount_opt(&self) -> Option<u64> {
12311            self.current_distribution_amount.as_ref().map(|field| *field)
12312        }
12313        ///Sets `current_distribution_amount` with the provided value.
12314        pub fn set_current_distribution_amount<T: Into<u64>>(&mut self, field: T) {
12315            self.current_distribution_amount = Some(field.into().into());
12316        }
12317        ///Sets `current_distribution_amount` with the provided value.
12318        pub fn with_current_distribution_amount<T: Into<u64>>(
12319            mut self,
12320            field: T,
12321        ) -> Self {
12322            self.set_current_distribution_amount(field.into());
12323            self
12324        }
12325        ///If `stake_subsidy_period_length` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12326        pub fn stake_subsidy_period_length_opt_mut(&mut self) -> Option<&mut u64> {
12327            self.stake_subsidy_period_length.as_mut().map(|field| field as _)
12328        }
12329        ///Returns a mutable reference to `stake_subsidy_period_length`.
12330        ///If the field is unset, it is first initialized with the default value.
12331        pub fn stake_subsidy_period_length_mut(&mut self) -> &mut u64 {
12332            self.stake_subsidy_period_length.get_or_insert_default()
12333        }
12334        ///If `stake_subsidy_period_length` is set, returns [`Some`] with the value; otherwise returns [`None`].
12335        pub fn stake_subsidy_period_length_opt(&self) -> Option<u64> {
12336            self.stake_subsidy_period_length.as_ref().map(|field| *field)
12337        }
12338        ///Sets `stake_subsidy_period_length` with the provided value.
12339        pub fn set_stake_subsidy_period_length<T: Into<u64>>(&mut self, field: T) {
12340            self.stake_subsidy_period_length = Some(field.into().into());
12341        }
12342        ///Sets `stake_subsidy_period_length` with the provided value.
12343        pub fn with_stake_subsidy_period_length<T: Into<u64>>(
12344            mut self,
12345            field: T,
12346        ) -> Self {
12347            self.set_stake_subsidy_period_length(field.into());
12348            self
12349        }
12350        ///If `stake_subsidy_decrease_rate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12351        pub fn stake_subsidy_decrease_rate_opt_mut(&mut self) -> Option<&mut u32> {
12352            self.stake_subsidy_decrease_rate.as_mut().map(|field| field as _)
12353        }
12354        ///Returns a mutable reference to `stake_subsidy_decrease_rate`.
12355        ///If the field is unset, it is first initialized with the default value.
12356        pub fn stake_subsidy_decrease_rate_mut(&mut self) -> &mut u32 {
12357            self.stake_subsidy_decrease_rate.get_or_insert_default()
12358        }
12359        ///If `stake_subsidy_decrease_rate` is set, returns [`Some`] with the value; otherwise returns [`None`].
12360        pub fn stake_subsidy_decrease_rate_opt(&self) -> Option<u32> {
12361            self.stake_subsidy_decrease_rate.as_ref().map(|field| *field)
12362        }
12363        ///Sets `stake_subsidy_decrease_rate` with the provided value.
12364        pub fn set_stake_subsidy_decrease_rate<T: Into<u32>>(&mut self, field: T) {
12365            self.stake_subsidy_decrease_rate = Some(field.into().into());
12366        }
12367        ///Sets `stake_subsidy_decrease_rate` with the provided value.
12368        pub fn with_stake_subsidy_decrease_rate<T: Into<u32>>(
12369            mut self,
12370            field: T,
12371        ) -> Self {
12372            self.set_stake_subsidy_decrease_rate(field.into());
12373            self
12374        }
12375        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
12376        pub fn extra_fields(&self) -> &super::MoveTable {
12377            self.extra_fields
12378                .as_ref()
12379                .map(|field| field as _)
12380                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
12381        }
12382        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12383        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
12384            self.extra_fields.as_mut().map(|field| field as _)
12385        }
12386        ///Returns a mutable reference to `extra_fields`.
12387        ///If the field is unset, it is first initialized with the default value.
12388        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
12389            self.extra_fields.get_or_insert_default()
12390        }
12391        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
12392        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
12393            self.extra_fields.as_ref().map(|field| field as _)
12394        }
12395        ///Sets `extra_fields` with the provided value.
12396        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
12397            self.extra_fields = Some(field.into().into());
12398        }
12399        ///Sets `extra_fields` with the provided value.
12400        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
12401            self.set_extra_fields(field.into());
12402            self
12403        }
12404    }
12405    impl super::StakingPool {
12406        pub const fn const_default() -> Self {
12407            Self {
12408                id: None,
12409                activation_epoch: None,
12410                deactivation_epoch: None,
12411                sui_balance: None,
12412                rewards_pool: None,
12413                pool_token_balance: None,
12414                exchange_rates: None,
12415                pending_stake: None,
12416                pending_total_sui_withdraw: None,
12417                pending_pool_token_withdraw: None,
12418                extra_fields: None,
12419            }
12420        }
12421        #[doc(hidden)]
12422        pub fn default_instance() -> &'static Self {
12423            static DEFAULT: super::StakingPool = super::StakingPool::const_default();
12424            &DEFAULT
12425        }
12426        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12427        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
12428            self.id.as_mut().map(|field| field as _)
12429        }
12430        ///Returns a mutable reference to `id`.
12431        ///If the field is unset, it is first initialized with the default value.
12432        pub fn id_mut(&mut self) -> &mut String {
12433            self.id.get_or_insert_default()
12434        }
12435        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
12436        pub fn id_opt(&self) -> Option<&str> {
12437            self.id.as_ref().map(|field| field as _)
12438        }
12439        ///Sets `id` with the provided value.
12440        pub fn set_id<T: Into<String>>(&mut self, field: T) {
12441            self.id = Some(field.into().into());
12442        }
12443        ///Sets `id` with the provided value.
12444        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
12445            self.set_id(field.into());
12446            self
12447        }
12448        ///If `activation_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12449        pub fn activation_epoch_opt_mut(&mut self) -> Option<&mut u64> {
12450            self.activation_epoch.as_mut().map(|field| field as _)
12451        }
12452        ///Returns a mutable reference to `activation_epoch`.
12453        ///If the field is unset, it is first initialized with the default value.
12454        pub fn activation_epoch_mut(&mut self) -> &mut u64 {
12455            self.activation_epoch.get_or_insert_default()
12456        }
12457        ///If `activation_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
12458        pub fn activation_epoch_opt(&self) -> Option<u64> {
12459            self.activation_epoch.as_ref().map(|field| *field)
12460        }
12461        ///Sets `activation_epoch` with the provided value.
12462        pub fn set_activation_epoch<T: Into<u64>>(&mut self, field: T) {
12463            self.activation_epoch = Some(field.into().into());
12464        }
12465        ///Sets `activation_epoch` with the provided value.
12466        pub fn with_activation_epoch<T: Into<u64>>(mut self, field: T) -> Self {
12467            self.set_activation_epoch(field.into());
12468            self
12469        }
12470        ///If `deactivation_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12471        pub fn deactivation_epoch_opt_mut(&mut self) -> Option<&mut u64> {
12472            self.deactivation_epoch.as_mut().map(|field| field as _)
12473        }
12474        ///Returns a mutable reference to `deactivation_epoch`.
12475        ///If the field is unset, it is first initialized with the default value.
12476        pub fn deactivation_epoch_mut(&mut self) -> &mut u64 {
12477            self.deactivation_epoch.get_or_insert_default()
12478        }
12479        ///If `deactivation_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
12480        pub fn deactivation_epoch_opt(&self) -> Option<u64> {
12481            self.deactivation_epoch.as_ref().map(|field| *field)
12482        }
12483        ///Sets `deactivation_epoch` with the provided value.
12484        pub fn set_deactivation_epoch<T: Into<u64>>(&mut self, field: T) {
12485            self.deactivation_epoch = Some(field.into().into());
12486        }
12487        ///Sets `deactivation_epoch` with the provided value.
12488        pub fn with_deactivation_epoch<T: Into<u64>>(mut self, field: T) -> Self {
12489            self.set_deactivation_epoch(field.into());
12490            self
12491        }
12492        ///If `sui_balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12493        pub fn sui_balance_opt_mut(&mut self) -> Option<&mut u64> {
12494            self.sui_balance.as_mut().map(|field| field as _)
12495        }
12496        ///Returns a mutable reference to `sui_balance`.
12497        ///If the field is unset, it is first initialized with the default value.
12498        pub fn sui_balance_mut(&mut self) -> &mut u64 {
12499            self.sui_balance.get_or_insert_default()
12500        }
12501        ///If `sui_balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
12502        pub fn sui_balance_opt(&self) -> Option<u64> {
12503            self.sui_balance.as_ref().map(|field| *field)
12504        }
12505        ///Sets `sui_balance` with the provided value.
12506        pub fn set_sui_balance<T: Into<u64>>(&mut self, field: T) {
12507            self.sui_balance = Some(field.into().into());
12508        }
12509        ///Sets `sui_balance` with the provided value.
12510        pub fn with_sui_balance<T: Into<u64>>(mut self, field: T) -> Self {
12511            self.set_sui_balance(field.into());
12512            self
12513        }
12514        ///If `rewards_pool` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12515        pub fn rewards_pool_opt_mut(&mut self) -> Option<&mut u64> {
12516            self.rewards_pool.as_mut().map(|field| field as _)
12517        }
12518        ///Returns a mutable reference to `rewards_pool`.
12519        ///If the field is unset, it is first initialized with the default value.
12520        pub fn rewards_pool_mut(&mut self) -> &mut u64 {
12521            self.rewards_pool.get_or_insert_default()
12522        }
12523        ///If `rewards_pool` is set, returns [`Some`] with the value; otherwise returns [`None`].
12524        pub fn rewards_pool_opt(&self) -> Option<u64> {
12525            self.rewards_pool.as_ref().map(|field| *field)
12526        }
12527        ///Sets `rewards_pool` with the provided value.
12528        pub fn set_rewards_pool<T: Into<u64>>(&mut self, field: T) {
12529            self.rewards_pool = Some(field.into().into());
12530        }
12531        ///Sets `rewards_pool` with the provided value.
12532        pub fn with_rewards_pool<T: Into<u64>>(mut self, field: T) -> Self {
12533            self.set_rewards_pool(field.into());
12534            self
12535        }
12536        ///If `pool_token_balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12537        pub fn pool_token_balance_opt_mut(&mut self) -> Option<&mut u64> {
12538            self.pool_token_balance.as_mut().map(|field| field as _)
12539        }
12540        ///Returns a mutable reference to `pool_token_balance`.
12541        ///If the field is unset, it is first initialized with the default value.
12542        pub fn pool_token_balance_mut(&mut self) -> &mut u64 {
12543            self.pool_token_balance.get_or_insert_default()
12544        }
12545        ///If `pool_token_balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
12546        pub fn pool_token_balance_opt(&self) -> Option<u64> {
12547            self.pool_token_balance.as_ref().map(|field| *field)
12548        }
12549        ///Sets `pool_token_balance` with the provided value.
12550        pub fn set_pool_token_balance<T: Into<u64>>(&mut self, field: T) {
12551            self.pool_token_balance = Some(field.into().into());
12552        }
12553        ///Sets `pool_token_balance` with the provided value.
12554        pub fn with_pool_token_balance<T: Into<u64>>(mut self, field: T) -> Self {
12555            self.set_pool_token_balance(field.into());
12556            self
12557        }
12558        ///Returns the value of `exchange_rates`, or the default value if `exchange_rates` is unset.
12559        pub fn exchange_rates(&self) -> &super::MoveTable {
12560            self.exchange_rates
12561                .as_ref()
12562                .map(|field| field as _)
12563                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
12564        }
12565        ///If `exchange_rates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12566        pub fn exchange_rates_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
12567            self.exchange_rates.as_mut().map(|field| field as _)
12568        }
12569        ///Returns a mutable reference to `exchange_rates`.
12570        ///If the field is unset, it is first initialized with the default value.
12571        pub fn exchange_rates_mut(&mut self) -> &mut super::MoveTable {
12572            self.exchange_rates.get_or_insert_default()
12573        }
12574        ///If `exchange_rates` is set, returns [`Some`] with the value; otherwise returns [`None`].
12575        pub fn exchange_rates_opt(&self) -> Option<&super::MoveTable> {
12576            self.exchange_rates.as_ref().map(|field| field as _)
12577        }
12578        ///Sets `exchange_rates` with the provided value.
12579        pub fn set_exchange_rates<T: Into<super::MoveTable>>(&mut self, field: T) {
12580            self.exchange_rates = Some(field.into().into());
12581        }
12582        ///Sets `exchange_rates` with the provided value.
12583        pub fn with_exchange_rates<T: Into<super::MoveTable>>(
12584            mut self,
12585            field: T,
12586        ) -> Self {
12587            self.set_exchange_rates(field.into());
12588            self
12589        }
12590        ///If `pending_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12591        pub fn pending_stake_opt_mut(&mut self) -> Option<&mut u64> {
12592            self.pending_stake.as_mut().map(|field| field as _)
12593        }
12594        ///Returns a mutable reference to `pending_stake`.
12595        ///If the field is unset, it is first initialized with the default value.
12596        pub fn pending_stake_mut(&mut self) -> &mut u64 {
12597            self.pending_stake.get_or_insert_default()
12598        }
12599        ///If `pending_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
12600        pub fn pending_stake_opt(&self) -> Option<u64> {
12601            self.pending_stake.as_ref().map(|field| *field)
12602        }
12603        ///Sets `pending_stake` with the provided value.
12604        pub fn set_pending_stake<T: Into<u64>>(&mut self, field: T) {
12605            self.pending_stake = Some(field.into().into());
12606        }
12607        ///Sets `pending_stake` with the provided value.
12608        pub fn with_pending_stake<T: Into<u64>>(mut self, field: T) -> Self {
12609            self.set_pending_stake(field.into());
12610            self
12611        }
12612        ///If `pending_total_sui_withdraw` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12613        pub fn pending_total_sui_withdraw_opt_mut(&mut self) -> Option<&mut u64> {
12614            self.pending_total_sui_withdraw.as_mut().map(|field| field as _)
12615        }
12616        ///Returns a mutable reference to `pending_total_sui_withdraw`.
12617        ///If the field is unset, it is first initialized with the default value.
12618        pub fn pending_total_sui_withdraw_mut(&mut self) -> &mut u64 {
12619            self.pending_total_sui_withdraw.get_or_insert_default()
12620        }
12621        ///If `pending_total_sui_withdraw` is set, returns [`Some`] with the value; otherwise returns [`None`].
12622        pub fn pending_total_sui_withdraw_opt(&self) -> Option<u64> {
12623            self.pending_total_sui_withdraw.as_ref().map(|field| *field)
12624        }
12625        ///Sets `pending_total_sui_withdraw` with the provided value.
12626        pub fn set_pending_total_sui_withdraw<T: Into<u64>>(&mut self, field: T) {
12627            self.pending_total_sui_withdraw = Some(field.into().into());
12628        }
12629        ///Sets `pending_total_sui_withdraw` with the provided value.
12630        pub fn with_pending_total_sui_withdraw<T: Into<u64>>(
12631            mut self,
12632            field: T,
12633        ) -> Self {
12634            self.set_pending_total_sui_withdraw(field.into());
12635            self
12636        }
12637        ///If `pending_pool_token_withdraw` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12638        pub fn pending_pool_token_withdraw_opt_mut(&mut self) -> Option<&mut u64> {
12639            self.pending_pool_token_withdraw.as_mut().map(|field| field as _)
12640        }
12641        ///Returns a mutable reference to `pending_pool_token_withdraw`.
12642        ///If the field is unset, it is first initialized with the default value.
12643        pub fn pending_pool_token_withdraw_mut(&mut self) -> &mut u64 {
12644            self.pending_pool_token_withdraw.get_or_insert_default()
12645        }
12646        ///If `pending_pool_token_withdraw` is set, returns [`Some`] with the value; otherwise returns [`None`].
12647        pub fn pending_pool_token_withdraw_opt(&self) -> Option<u64> {
12648            self.pending_pool_token_withdraw.as_ref().map(|field| *field)
12649        }
12650        ///Sets `pending_pool_token_withdraw` with the provided value.
12651        pub fn set_pending_pool_token_withdraw<T: Into<u64>>(&mut self, field: T) {
12652            self.pending_pool_token_withdraw = Some(field.into().into());
12653        }
12654        ///Sets `pending_pool_token_withdraw` with the provided value.
12655        pub fn with_pending_pool_token_withdraw<T: Into<u64>>(
12656            mut self,
12657            field: T,
12658        ) -> Self {
12659            self.set_pending_pool_token_withdraw(field.into());
12660            self
12661        }
12662        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
12663        pub fn extra_fields(&self) -> &super::MoveTable {
12664            self.extra_fields
12665                .as_ref()
12666                .map(|field| field as _)
12667                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
12668        }
12669        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12670        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
12671            self.extra_fields.as_mut().map(|field| field as _)
12672        }
12673        ///Returns a mutable reference to `extra_fields`.
12674        ///If the field is unset, it is first initialized with the default value.
12675        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
12676            self.extra_fields.get_or_insert_default()
12677        }
12678        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
12679        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
12680            self.extra_fields.as_ref().map(|field| field as _)
12681        }
12682        ///Sets `extra_fields` with the provided value.
12683        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
12684            self.extra_fields = Some(field.into().into());
12685        }
12686        ///Sets `extra_fields` with the provided value.
12687        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
12688            self.set_extra_fields(field.into());
12689            self
12690        }
12691    }
12692    impl super::StorageFund {
12693        pub const fn const_default() -> Self {
12694            Self {
12695                total_object_storage_rebates: None,
12696                non_refundable_balance: None,
12697            }
12698        }
12699        #[doc(hidden)]
12700        pub fn default_instance() -> &'static Self {
12701            static DEFAULT: super::StorageFund = super::StorageFund::const_default();
12702            &DEFAULT
12703        }
12704        ///If `total_object_storage_rebates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12705        pub fn total_object_storage_rebates_opt_mut(&mut self) -> Option<&mut u64> {
12706            self.total_object_storage_rebates.as_mut().map(|field| field as _)
12707        }
12708        ///Returns a mutable reference to `total_object_storage_rebates`.
12709        ///If the field is unset, it is first initialized with the default value.
12710        pub fn total_object_storage_rebates_mut(&mut self) -> &mut u64 {
12711            self.total_object_storage_rebates.get_or_insert_default()
12712        }
12713        ///If `total_object_storage_rebates` is set, returns [`Some`] with the value; otherwise returns [`None`].
12714        pub fn total_object_storage_rebates_opt(&self) -> Option<u64> {
12715            self.total_object_storage_rebates.as_ref().map(|field| *field)
12716        }
12717        ///Sets `total_object_storage_rebates` with the provided value.
12718        pub fn set_total_object_storage_rebates<T: Into<u64>>(&mut self, field: T) {
12719            self.total_object_storage_rebates = Some(field.into().into());
12720        }
12721        ///Sets `total_object_storage_rebates` with the provided value.
12722        pub fn with_total_object_storage_rebates<T: Into<u64>>(
12723            mut self,
12724            field: T,
12725        ) -> Self {
12726            self.set_total_object_storage_rebates(field.into());
12727            self
12728        }
12729        ///If `non_refundable_balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12730        pub fn non_refundable_balance_opt_mut(&mut self) -> Option<&mut u64> {
12731            self.non_refundable_balance.as_mut().map(|field| field as _)
12732        }
12733        ///Returns a mutable reference to `non_refundable_balance`.
12734        ///If the field is unset, it is first initialized with the default value.
12735        pub fn non_refundable_balance_mut(&mut self) -> &mut u64 {
12736            self.non_refundable_balance.get_or_insert_default()
12737        }
12738        ///If `non_refundable_balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
12739        pub fn non_refundable_balance_opt(&self) -> Option<u64> {
12740            self.non_refundable_balance.as_ref().map(|field| *field)
12741        }
12742        ///Sets `non_refundable_balance` with the provided value.
12743        pub fn set_non_refundable_balance<T: Into<u64>>(&mut self, field: T) {
12744            self.non_refundable_balance = Some(field.into().into());
12745        }
12746        ///Sets `non_refundable_balance` with the provided value.
12747        pub fn with_non_refundable_balance<T: Into<u64>>(mut self, field: T) -> Self {
12748            self.set_non_refundable_balance(field.into());
12749            self
12750        }
12751    }
12752    impl super::SubscribeCheckpointsRequest {
12753        pub const fn const_default() -> Self {
12754            Self { read_mask: None }
12755        }
12756        #[doc(hidden)]
12757        pub fn default_instance() -> &'static Self {
12758            static DEFAULT: super::SubscribeCheckpointsRequest = super::SubscribeCheckpointsRequest::const_default();
12759            &DEFAULT
12760        }
12761        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12762        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
12763            self.read_mask.as_mut().map(|field| field as _)
12764        }
12765        ///Returns a mutable reference to `read_mask`.
12766        ///If the field is unset, it is first initialized with the default value.
12767        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
12768            self.read_mask.get_or_insert_default()
12769        }
12770        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
12771        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
12772            self.read_mask.as_ref().map(|field| field as _)
12773        }
12774        ///Sets `read_mask` with the provided value.
12775        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
12776            self.read_mask = Some(field.into().into());
12777        }
12778        ///Sets `read_mask` with the provided value.
12779        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
12780            mut self,
12781            field: T,
12782        ) -> Self {
12783            self.set_read_mask(field.into());
12784            self
12785        }
12786    }
12787    impl super::SubscribeCheckpointsResponse {
12788        pub const fn const_default() -> Self {
12789            Self {
12790                cursor: None,
12791                checkpoint: None,
12792            }
12793        }
12794        #[doc(hidden)]
12795        pub fn default_instance() -> &'static Self {
12796            static DEFAULT: super::SubscribeCheckpointsResponse = super::SubscribeCheckpointsResponse::const_default();
12797            &DEFAULT
12798        }
12799        ///If `cursor` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12800        pub fn cursor_opt_mut(&mut self) -> Option<&mut u64> {
12801            self.cursor.as_mut().map(|field| field as _)
12802        }
12803        ///Returns a mutable reference to `cursor`.
12804        ///If the field is unset, it is first initialized with the default value.
12805        pub fn cursor_mut(&mut self) -> &mut u64 {
12806            self.cursor.get_or_insert_default()
12807        }
12808        ///If `cursor` is set, returns [`Some`] with the value; otherwise returns [`None`].
12809        pub fn cursor_opt(&self) -> Option<u64> {
12810            self.cursor.as_ref().map(|field| *field)
12811        }
12812        ///Sets `cursor` with the provided value.
12813        pub fn set_cursor<T: Into<u64>>(&mut self, field: T) {
12814            self.cursor = Some(field.into().into());
12815        }
12816        ///Sets `cursor` with the provided value.
12817        pub fn with_cursor<T: Into<u64>>(mut self, field: T) -> Self {
12818            self.set_cursor(field.into());
12819            self
12820        }
12821        ///Returns the value of `checkpoint`, or the default value if `checkpoint` is unset.
12822        pub fn checkpoint(&self) -> &super::Checkpoint {
12823            self.checkpoint
12824                .as_ref()
12825                .map(|field| field as _)
12826                .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
12827        }
12828        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12829        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
12830            self.checkpoint.as_mut().map(|field| field as _)
12831        }
12832        ///Returns a mutable reference to `checkpoint`.
12833        ///If the field is unset, it is first initialized with the default value.
12834        pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
12835            self.checkpoint.get_or_insert_default()
12836        }
12837        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
12838        pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
12839            self.checkpoint.as_ref().map(|field| field as _)
12840        }
12841        ///Sets `checkpoint` with the provided value.
12842        pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
12843            self.checkpoint = Some(field.into().into());
12844        }
12845        ///Sets `checkpoint` with the provided value.
12846        pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
12847            self.set_checkpoint(field.into());
12848            self
12849        }
12850    }
12851    impl super::SystemPackage {
12852        pub const fn const_default() -> Self {
12853            Self {
12854                version: None,
12855                modules: Vec::new(),
12856                dependencies: Vec::new(),
12857            }
12858        }
12859        #[doc(hidden)]
12860        pub fn default_instance() -> &'static Self {
12861            static DEFAULT: super::SystemPackage = super::SystemPackage::const_default();
12862            &DEFAULT
12863        }
12864        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12865        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
12866            self.version.as_mut().map(|field| field as _)
12867        }
12868        ///Returns a mutable reference to `version`.
12869        ///If the field is unset, it is first initialized with the default value.
12870        pub fn version_mut(&mut self) -> &mut u64 {
12871            self.version.get_or_insert_default()
12872        }
12873        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
12874        pub fn version_opt(&self) -> Option<u64> {
12875            self.version.as_ref().map(|field| *field)
12876        }
12877        ///Sets `version` with the provided value.
12878        pub fn set_version<T: Into<u64>>(&mut self, field: T) {
12879            self.version = Some(field.into().into());
12880        }
12881        ///Sets `version` with the provided value.
12882        pub fn with_version<T: Into<u64>>(mut self, field: T) -> Self {
12883            self.set_version(field.into());
12884            self
12885        }
12886        ///Returns the value of `modules`, or the default value if `modules` is unset.
12887        pub fn modules(&self) -> &[::prost::bytes::Bytes] {
12888            &self.modules
12889        }
12890        ///Returns a mutable reference to `modules`.
12891        ///If the field is unset, it is first initialized with the default value.
12892        pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
12893            &mut self.modules
12894        }
12895        ///Sets `modules` with the provided value.
12896        pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
12897            self.modules = field;
12898        }
12899        ///Sets `modules` with the provided value.
12900        pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
12901            self.set_modules(field);
12902            self
12903        }
12904        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
12905        pub fn dependencies(&self) -> &[String] {
12906            &self.dependencies
12907        }
12908        ///Returns a mutable reference to `dependencies`.
12909        ///If the field is unset, it is first initialized with the default value.
12910        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
12911            &mut self.dependencies
12912        }
12913        ///Sets `dependencies` with the provided value.
12914        pub fn set_dependencies(&mut self, field: Vec<String>) {
12915            self.dependencies = field;
12916        }
12917        ///Sets `dependencies` with the provided value.
12918        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
12919            self.set_dependencies(field);
12920            self
12921        }
12922    }
12923    impl super::SystemParameters {
12924        pub const fn const_default() -> Self {
12925            Self {
12926                epoch_duration_ms: None,
12927                stake_subsidy_start_epoch: None,
12928                min_validator_count: None,
12929                max_validator_count: None,
12930                min_validator_joining_stake: None,
12931                validator_low_stake_threshold: None,
12932                validator_very_low_stake_threshold: None,
12933                validator_low_stake_grace_period: None,
12934                extra_fields: None,
12935            }
12936        }
12937        #[doc(hidden)]
12938        pub fn default_instance() -> &'static Self {
12939            static DEFAULT: super::SystemParameters = super::SystemParameters::const_default();
12940            &DEFAULT
12941        }
12942        ///If `epoch_duration_ms` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12943        pub fn epoch_duration_ms_opt_mut(&mut self) -> Option<&mut u64> {
12944            self.epoch_duration_ms.as_mut().map(|field| field as _)
12945        }
12946        ///Returns a mutable reference to `epoch_duration_ms`.
12947        ///If the field is unset, it is first initialized with the default value.
12948        pub fn epoch_duration_ms_mut(&mut self) -> &mut u64 {
12949            self.epoch_duration_ms.get_or_insert_default()
12950        }
12951        ///If `epoch_duration_ms` is set, returns [`Some`] with the value; otherwise returns [`None`].
12952        pub fn epoch_duration_ms_opt(&self) -> Option<u64> {
12953            self.epoch_duration_ms.as_ref().map(|field| *field)
12954        }
12955        ///Sets `epoch_duration_ms` with the provided value.
12956        pub fn set_epoch_duration_ms<T: Into<u64>>(&mut self, field: T) {
12957            self.epoch_duration_ms = Some(field.into().into());
12958        }
12959        ///Sets `epoch_duration_ms` with the provided value.
12960        pub fn with_epoch_duration_ms<T: Into<u64>>(mut self, field: T) -> Self {
12961            self.set_epoch_duration_ms(field.into());
12962            self
12963        }
12964        ///If `stake_subsidy_start_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12965        pub fn stake_subsidy_start_epoch_opt_mut(&mut self) -> Option<&mut u64> {
12966            self.stake_subsidy_start_epoch.as_mut().map(|field| field as _)
12967        }
12968        ///Returns a mutable reference to `stake_subsidy_start_epoch`.
12969        ///If the field is unset, it is first initialized with the default value.
12970        pub fn stake_subsidy_start_epoch_mut(&mut self) -> &mut u64 {
12971            self.stake_subsidy_start_epoch.get_or_insert_default()
12972        }
12973        ///If `stake_subsidy_start_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
12974        pub fn stake_subsidy_start_epoch_opt(&self) -> Option<u64> {
12975            self.stake_subsidy_start_epoch.as_ref().map(|field| *field)
12976        }
12977        ///Sets `stake_subsidy_start_epoch` with the provided value.
12978        pub fn set_stake_subsidy_start_epoch<T: Into<u64>>(&mut self, field: T) {
12979            self.stake_subsidy_start_epoch = Some(field.into().into());
12980        }
12981        ///Sets `stake_subsidy_start_epoch` with the provided value.
12982        pub fn with_stake_subsidy_start_epoch<T: Into<u64>>(mut self, field: T) -> Self {
12983            self.set_stake_subsidy_start_epoch(field.into());
12984            self
12985        }
12986        ///If `min_validator_count` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12987        pub fn min_validator_count_opt_mut(&mut self) -> Option<&mut u64> {
12988            self.min_validator_count.as_mut().map(|field| field as _)
12989        }
12990        ///Returns a mutable reference to `min_validator_count`.
12991        ///If the field is unset, it is first initialized with the default value.
12992        pub fn min_validator_count_mut(&mut self) -> &mut u64 {
12993            self.min_validator_count.get_or_insert_default()
12994        }
12995        ///If `min_validator_count` is set, returns [`Some`] with the value; otherwise returns [`None`].
12996        pub fn min_validator_count_opt(&self) -> Option<u64> {
12997            self.min_validator_count.as_ref().map(|field| *field)
12998        }
12999        ///Sets `min_validator_count` with the provided value.
13000        pub fn set_min_validator_count<T: Into<u64>>(&mut self, field: T) {
13001            self.min_validator_count = Some(field.into().into());
13002        }
13003        ///Sets `min_validator_count` with the provided value.
13004        pub fn with_min_validator_count<T: Into<u64>>(mut self, field: T) -> Self {
13005            self.set_min_validator_count(field.into());
13006            self
13007        }
13008        ///If `max_validator_count` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13009        pub fn max_validator_count_opt_mut(&mut self) -> Option<&mut u64> {
13010            self.max_validator_count.as_mut().map(|field| field as _)
13011        }
13012        ///Returns a mutable reference to `max_validator_count`.
13013        ///If the field is unset, it is first initialized with the default value.
13014        pub fn max_validator_count_mut(&mut self) -> &mut u64 {
13015            self.max_validator_count.get_or_insert_default()
13016        }
13017        ///If `max_validator_count` is set, returns [`Some`] with the value; otherwise returns [`None`].
13018        pub fn max_validator_count_opt(&self) -> Option<u64> {
13019            self.max_validator_count.as_ref().map(|field| *field)
13020        }
13021        ///Sets `max_validator_count` with the provided value.
13022        pub fn set_max_validator_count<T: Into<u64>>(&mut self, field: T) {
13023            self.max_validator_count = Some(field.into().into());
13024        }
13025        ///Sets `max_validator_count` with the provided value.
13026        pub fn with_max_validator_count<T: Into<u64>>(mut self, field: T) -> Self {
13027            self.set_max_validator_count(field.into());
13028            self
13029        }
13030        ///If `min_validator_joining_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13031        pub fn min_validator_joining_stake_opt_mut(&mut self) -> Option<&mut u64> {
13032            self.min_validator_joining_stake.as_mut().map(|field| field as _)
13033        }
13034        ///Returns a mutable reference to `min_validator_joining_stake`.
13035        ///If the field is unset, it is first initialized with the default value.
13036        pub fn min_validator_joining_stake_mut(&mut self) -> &mut u64 {
13037            self.min_validator_joining_stake.get_or_insert_default()
13038        }
13039        ///If `min_validator_joining_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
13040        pub fn min_validator_joining_stake_opt(&self) -> Option<u64> {
13041            self.min_validator_joining_stake.as_ref().map(|field| *field)
13042        }
13043        ///Sets `min_validator_joining_stake` with the provided value.
13044        pub fn set_min_validator_joining_stake<T: Into<u64>>(&mut self, field: T) {
13045            self.min_validator_joining_stake = Some(field.into().into());
13046        }
13047        ///Sets `min_validator_joining_stake` with the provided value.
13048        pub fn with_min_validator_joining_stake<T: Into<u64>>(
13049            mut self,
13050            field: T,
13051        ) -> Self {
13052            self.set_min_validator_joining_stake(field.into());
13053            self
13054        }
13055        ///If `validator_low_stake_threshold` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13056        pub fn validator_low_stake_threshold_opt_mut(&mut self) -> Option<&mut u64> {
13057            self.validator_low_stake_threshold.as_mut().map(|field| field as _)
13058        }
13059        ///Returns a mutable reference to `validator_low_stake_threshold`.
13060        ///If the field is unset, it is first initialized with the default value.
13061        pub fn validator_low_stake_threshold_mut(&mut self) -> &mut u64 {
13062            self.validator_low_stake_threshold.get_or_insert_default()
13063        }
13064        ///If `validator_low_stake_threshold` is set, returns [`Some`] with the value; otherwise returns [`None`].
13065        pub fn validator_low_stake_threshold_opt(&self) -> Option<u64> {
13066            self.validator_low_stake_threshold.as_ref().map(|field| *field)
13067        }
13068        ///Sets `validator_low_stake_threshold` with the provided value.
13069        pub fn set_validator_low_stake_threshold<T: Into<u64>>(&mut self, field: T) {
13070            self.validator_low_stake_threshold = Some(field.into().into());
13071        }
13072        ///Sets `validator_low_stake_threshold` with the provided value.
13073        pub fn with_validator_low_stake_threshold<T: Into<u64>>(
13074            mut self,
13075            field: T,
13076        ) -> Self {
13077            self.set_validator_low_stake_threshold(field.into());
13078            self
13079        }
13080        ///If `validator_very_low_stake_threshold` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13081        pub fn validator_very_low_stake_threshold_opt_mut(
13082            &mut self,
13083        ) -> Option<&mut u64> {
13084            self.validator_very_low_stake_threshold.as_mut().map(|field| field as _)
13085        }
13086        ///Returns a mutable reference to `validator_very_low_stake_threshold`.
13087        ///If the field is unset, it is first initialized with the default value.
13088        pub fn validator_very_low_stake_threshold_mut(&mut self) -> &mut u64 {
13089            self.validator_very_low_stake_threshold.get_or_insert_default()
13090        }
13091        ///If `validator_very_low_stake_threshold` is set, returns [`Some`] with the value; otherwise returns [`None`].
13092        pub fn validator_very_low_stake_threshold_opt(&self) -> Option<u64> {
13093            self.validator_very_low_stake_threshold.as_ref().map(|field| *field)
13094        }
13095        ///Sets `validator_very_low_stake_threshold` with the provided value.
13096        pub fn set_validator_very_low_stake_threshold<T: Into<u64>>(
13097            &mut self,
13098            field: T,
13099        ) {
13100            self.validator_very_low_stake_threshold = Some(field.into().into());
13101        }
13102        ///Sets `validator_very_low_stake_threshold` with the provided value.
13103        pub fn with_validator_very_low_stake_threshold<T: Into<u64>>(
13104            mut self,
13105            field: T,
13106        ) -> Self {
13107            self.set_validator_very_low_stake_threshold(field.into());
13108            self
13109        }
13110        ///If `validator_low_stake_grace_period` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13111        pub fn validator_low_stake_grace_period_opt_mut(&mut self) -> Option<&mut u64> {
13112            self.validator_low_stake_grace_period.as_mut().map(|field| field as _)
13113        }
13114        ///Returns a mutable reference to `validator_low_stake_grace_period`.
13115        ///If the field is unset, it is first initialized with the default value.
13116        pub fn validator_low_stake_grace_period_mut(&mut self) -> &mut u64 {
13117            self.validator_low_stake_grace_period.get_or_insert_default()
13118        }
13119        ///If `validator_low_stake_grace_period` is set, returns [`Some`] with the value; otherwise returns [`None`].
13120        pub fn validator_low_stake_grace_period_opt(&self) -> Option<u64> {
13121            self.validator_low_stake_grace_period.as_ref().map(|field| *field)
13122        }
13123        ///Sets `validator_low_stake_grace_period` with the provided value.
13124        pub fn set_validator_low_stake_grace_period<T: Into<u64>>(&mut self, field: T) {
13125            self.validator_low_stake_grace_period = Some(field.into().into());
13126        }
13127        ///Sets `validator_low_stake_grace_period` with the provided value.
13128        pub fn with_validator_low_stake_grace_period<T: Into<u64>>(
13129            mut self,
13130            field: T,
13131        ) -> Self {
13132            self.set_validator_low_stake_grace_period(field.into());
13133            self
13134        }
13135        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
13136        pub fn extra_fields(&self) -> &super::MoveTable {
13137            self.extra_fields
13138                .as_ref()
13139                .map(|field| field as _)
13140                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
13141        }
13142        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13143        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
13144            self.extra_fields.as_mut().map(|field| field as _)
13145        }
13146        ///Returns a mutable reference to `extra_fields`.
13147        ///If the field is unset, it is first initialized with the default value.
13148        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
13149            self.extra_fields.get_or_insert_default()
13150        }
13151        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
13152        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
13153            self.extra_fields.as_ref().map(|field| field as _)
13154        }
13155        ///Sets `extra_fields` with the provided value.
13156        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
13157            self.extra_fields = Some(field.into().into());
13158        }
13159        ///Sets `extra_fields` with the provided value.
13160        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
13161            self.set_extra_fields(field.into());
13162            self
13163        }
13164    }
13165    impl super::SystemState {
13166        pub const fn const_default() -> Self {
13167            Self {
13168                version: None,
13169                epoch: None,
13170                protocol_version: None,
13171                validators: None,
13172                storage_fund: None,
13173                parameters: None,
13174                reference_gas_price: None,
13175                validator_report_records: Vec::new(),
13176                stake_subsidy: None,
13177                safe_mode: None,
13178                safe_mode_storage_rewards: None,
13179                safe_mode_computation_rewards: None,
13180                safe_mode_storage_rebates: None,
13181                safe_mode_non_refundable_storage_fee: None,
13182                epoch_start_timestamp_ms: None,
13183                extra_fields: None,
13184            }
13185        }
13186        #[doc(hidden)]
13187        pub fn default_instance() -> &'static Self {
13188            static DEFAULT: super::SystemState = super::SystemState::const_default();
13189            &DEFAULT
13190        }
13191        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13192        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
13193            self.version.as_mut().map(|field| field as _)
13194        }
13195        ///Returns a mutable reference to `version`.
13196        ///If the field is unset, it is first initialized with the default value.
13197        pub fn version_mut(&mut self) -> &mut u64 {
13198            self.version.get_or_insert_default()
13199        }
13200        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
13201        pub fn version_opt(&self) -> Option<u64> {
13202            self.version.as_ref().map(|field| *field)
13203        }
13204        ///Sets `version` with the provided value.
13205        pub fn set_version<T: Into<u64>>(&mut self, field: T) {
13206            self.version = Some(field.into().into());
13207        }
13208        ///Sets `version` with the provided value.
13209        pub fn with_version<T: Into<u64>>(mut self, field: T) -> Self {
13210            self.set_version(field.into());
13211            self
13212        }
13213        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13214        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
13215            self.epoch.as_mut().map(|field| field as _)
13216        }
13217        ///Returns a mutable reference to `epoch`.
13218        ///If the field is unset, it is first initialized with the default value.
13219        pub fn epoch_mut(&mut self) -> &mut u64 {
13220            self.epoch.get_or_insert_default()
13221        }
13222        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
13223        pub fn epoch_opt(&self) -> Option<u64> {
13224            self.epoch.as_ref().map(|field| *field)
13225        }
13226        ///Sets `epoch` with the provided value.
13227        pub fn set_epoch<T: Into<u64>>(&mut self, field: T) {
13228            self.epoch = Some(field.into().into());
13229        }
13230        ///Sets `epoch` with the provided value.
13231        pub fn with_epoch<T: Into<u64>>(mut self, field: T) -> Self {
13232            self.set_epoch(field.into());
13233            self
13234        }
13235        ///If `protocol_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13236        pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
13237            self.protocol_version.as_mut().map(|field| field as _)
13238        }
13239        ///Returns a mutable reference to `protocol_version`.
13240        ///If the field is unset, it is first initialized with the default value.
13241        pub fn protocol_version_mut(&mut self) -> &mut u64 {
13242            self.protocol_version.get_or_insert_default()
13243        }
13244        ///If `protocol_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
13245        pub fn protocol_version_opt(&self) -> Option<u64> {
13246            self.protocol_version.as_ref().map(|field| *field)
13247        }
13248        ///Sets `protocol_version` with the provided value.
13249        pub fn set_protocol_version<T: Into<u64>>(&mut self, field: T) {
13250            self.protocol_version = Some(field.into().into());
13251        }
13252        ///Sets `protocol_version` with the provided value.
13253        pub fn with_protocol_version<T: Into<u64>>(mut self, field: T) -> Self {
13254            self.set_protocol_version(field.into());
13255            self
13256        }
13257        ///Returns the value of `validators`, or the default value if `validators` is unset.
13258        pub fn validators(&self) -> &super::ValidatorSet {
13259            self.validators
13260                .as_ref()
13261                .map(|field| field as _)
13262                .unwrap_or_else(|| super::ValidatorSet::default_instance() as _)
13263        }
13264        ///If `validators` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13265        pub fn validators_opt_mut(&mut self) -> Option<&mut super::ValidatorSet> {
13266            self.validators.as_mut().map(|field| field as _)
13267        }
13268        ///Returns a mutable reference to `validators`.
13269        ///If the field is unset, it is first initialized with the default value.
13270        pub fn validators_mut(&mut self) -> &mut super::ValidatorSet {
13271            self.validators.get_or_insert_default()
13272        }
13273        ///If `validators` is set, returns [`Some`] with the value; otherwise returns [`None`].
13274        pub fn validators_opt(&self) -> Option<&super::ValidatorSet> {
13275            self.validators.as_ref().map(|field| field as _)
13276        }
13277        ///Sets `validators` with the provided value.
13278        pub fn set_validators<T: Into<super::ValidatorSet>>(&mut self, field: T) {
13279            self.validators = Some(field.into().into());
13280        }
13281        ///Sets `validators` with the provided value.
13282        pub fn with_validators<T: Into<super::ValidatorSet>>(
13283            mut self,
13284            field: T,
13285        ) -> Self {
13286            self.set_validators(field.into());
13287            self
13288        }
13289        ///Returns the value of `storage_fund`, or the default value if `storage_fund` is unset.
13290        pub fn storage_fund(&self) -> &super::StorageFund {
13291            self.storage_fund
13292                .as_ref()
13293                .map(|field| field as _)
13294                .unwrap_or_else(|| super::StorageFund::default_instance() as _)
13295        }
13296        ///If `storage_fund` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13297        pub fn storage_fund_opt_mut(&mut self) -> Option<&mut super::StorageFund> {
13298            self.storage_fund.as_mut().map(|field| field as _)
13299        }
13300        ///Returns a mutable reference to `storage_fund`.
13301        ///If the field is unset, it is first initialized with the default value.
13302        pub fn storage_fund_mut(&mut self) -> &mut super::StorageFund {
13303            self.storage_fund.get_or_insert_default()
13304        }
13305        ///If `storage_fund` is set, returns [`Some`] with the value; otherwise returns [`None`].
13306        pub fn storage_fund_opt(&self) -> Option<&super::StorageFund> {
13307            self.storage_fund.as_ref().map(|field| field as _)
13308        }
13309        ///Sets `storage_fund` with the provided value.
13310        pub fn set_storage_fund<T: Into<super::StorageFund>>(&mut self, field: T) {
13311            self.storage_fund = Some(field.into().into());
13312        }
13313        ///Sets `storage_fund` with the provided value.
13314        pub fn with_storage_fund<T: Into<super::StorageFund>>(
13315            mut self,
13316            field: T,
13317        ) -> Self {
13318            self.set_storage_fund(field.into());
13319            self
13320        }
13321        ///Returns the value of `parameters`, or the default value if `parameters` is unset.
13322        pub fn parameters(&self) -> &super::SystemParameters {
13323            self.parameters
13324                .as_ref()
13325                .map(|field| field as _)
13326                .unwrap_or_else(|| super::SystemParameters::default_instance() as _)
13327        }
13328        ///If `parameters` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13329        pub fn parameters_opt_mut(&mut self) -> Option<&mut super::SystemParameters> {
13330            self.parameters.as_mut().map(|field| field as _)
13331        }
13332        ///Returns a mutable reference to `parameters`.
13333        ///If the field is unset, it is first initialized with the default value.
13334        pub fn parameters_mut(&mut self) -> &mut super::SystemParameters {
13335            self.parameters.get_or_insert_default()
13336        }
13337        ///If `parameters` is set, returns [`Some`] with the value; otherwise returns [`None`].
13338        pub fn parameters_opt(&self) -> Option<&super::SystemParameters> {
13339            self.parameters.as_ref().map(|field| field as _)
13340        }
13341        ///Sets `parameters` with the provided value.
13342        pub fn set_parameters<T: Into<super::SystemParameters>>(&mut self, field: T) {
13343            self.parameters = Some(field.into().into());
13344        }
13345        ///Sets `parameters` with the provided value.
13346        pub fn with_parameters<T: Into<super::SystemParameters>>(
13347            mut self,
13348            field: T,
13349        ) -> Self {
13350            self.set_parameters(field.into());
13351            self
13352        }
13353        ///If `reference_gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13354        pub fn reference_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
13355            self.reference_gas_price.as_mut().map(|field| field as _)
13356        }
13357        ///Returns a mutable reference to `reference_gas_price`.
13358        ///If the field is unset, it is first initialized with the default value.
13359        pub fn reference_gas_price_mut(&mut self) -> &mut u64 {
13360            self.reference_gas_price.get_or_insert_default()
13361        }
13362        ///If `reference_gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
13363        pub fn reference_gas_price_opt(&self) -> Option<u64> {
13364            self.reference_gas_price.as_ref().map(|field| *field)
13365        }
13366        ///Sets `reference_gas_price` with the provided value.
13367        pub fn set_reference_gas_price<T: Into<u64>>(&mut self, field: T) {
13368            self.reference_gas_price = Some(field.into().into());
13369        }
13370        ///Sets `reference_gas_price` with the provided value.
13371        pub fn with_reference_gas_price<T: Into<u64>>(mut self, field: T) -> Self {
13372            self.set_reference_gas_price(field.into());
13373            self
13374        }
13375        ///Returns the value of `validator_report_records`, or the default value if `validator_report_records` is unset.
13376        pub fn validator_report_records(&self) -> &[super::ValidatorReportRecord] {
13377            &self.validator_report_records
13378        }
13379        ///Returns a mutable reference to `validator_report_records`.
13380        ///If the field is unset, it is first initialized with the default value.
13381        pub fn validator_report_records_mut(
13382            &mut self,
13383        ) -> &mut Vec<super::ValidatorReportRecord> {
13384            &mut self.validator_report_records
13385        }
13386        ///Sets `validator_report_records` with the provided value.
13387        pub fn set_validator_report_records(
13388            &mut self,
13389            field: Vec<super::ValidatorReportRecord>,
13390        ) {
13391            self.validator_report_records = field;
13392        }
13393        ///Sets `validator_report_records` with the provided value.
13394        pub fn with_validator_report_records(
13395            mut self,
13396            field: Vec<super::ValidatorReportRecord>,
13397        ) -> Self {
13398            self.set_validator_report_records(field);
13399            self
13400        }
13401        ///Returns the value of `stake_subsidy`, or the default value if `stake_subsidy` is unset.
13402        pub fn stake_subsidy(&self) -> &super::StakeSubsidy {
13403            self.stake_subsidy
13404                .as_ref()
13405                .map(|field| field as _)
13406                .unwrap_or_else(|| super::StakeSubsidy::default_instance() as _)
13407        }
13408        ///If `stake_subsidy` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13409        pub fn stake_subsidy_opt_mut(&mut self) -> Option<&mut super::StakeSubsidy> {
13410            self.stake_subsidy.as_mut().map(|field| field as _)
13411        }
13412        ///Returns a mutable reference to `stake_subsidy`.
13413        ///If the field is unset, it is first initialized with the default value.
13414        pub fn stake_subsidy_mut(&mut self) -> &mut super::StakeSubsidy {
13415            self.stake_subsidy.get_or_insert_default()
13416        }
13417        ///If `stake_subsidy` is set, returns [`Some`] with the value; otherwise returns [`None`].
13418        pub fn stake_subsidy_opt(&self) -> Option<&super::StakeSubsidy> {
13419            self.stake_subsidy.as_ref().map(|field| field as _)
13420        }
13421        ///Sets `stake_subsidy` with the provided value.
13422        pub fn set_stake_subsidy<T: Into<super::StakeSubsidy>>(&mut self, field: T) {
13423            self.stake_subsidy = Some(field.into().into());
13424        }
13425        ///Sets `stake_subsidy` with the provided value.
13426        pub fn with_stake_subsidy<T: Into<super::StakeSubsidy>>(
13427            mut self,
13428            field: T,
13429        ) -> Self {
13430            self.set_stake_subsidy(field.into());
13431            self
13432        }
13433        ///If `safe_mode` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13434        pub fn safe_mode_opt_mut(&mut self) -> Option<&mut bool> {
13435            self.safe_mode.as_mut().map(|field| field as _)
13436        }
13437        ///Returns a mutable reference to `safe_mode`.
13438        ///If the field is unset, it is first initialized with the default value.
13439        pub fn safe_mode_mut(&mut self) -> &mut bool {
13440            self.safe_mode.get_or_insert_default()
13441        }
13442        ///If `safe_mode` is set, returns [`Some`] with the value; otherwise returns [`None`].
13443        pub fn safe_mode_opt(&self) -> Option<bool> {
13444            self.safe_mode.as_ref().map(|field| *field)
13445        }
13446        ///Sets `safe_mode` with the provided value.
13447        pub fn set_safe_mode<T: Into<bool>>(&mut self, field: T) {
13448            self.safe_mode = Some(field.into().into());
13449        }
13450        ///Sets `safe_mode` with the provided value.
13451        pub fn with_safe_mode<T: Into<bool>>(mut self, field: T) -> Self {
13452            self.set_safe_mode(field.into());
13453            self
13454        }
13455        ///If `safe_mode_storage_rewards` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13456        pub fn safe_mode_storage_rewards_opt_mut(&mut self) -> Option<&mut u64> {
13457            self.safe_mode_storage_rewards.as_mut().map(|field| field as _)
13458        }
13459        ///Returns a mutable reference to `safe_mode_storage_rewards`.
13460        ///If the field is unset, it is first initialized with the default value.
13461        pub fn safe_mode_storage_rewards_mut(&mut self) -> &mut u64 {
13462            self.safe_mode_storage_rewards.get_or_insert_default()
13463        }
13464        ///If `safe_mode_storage_rewards` is set, returns [`Some`] with the value; otherwise returns [`None`].
13465        pub fn safe_mode_storage_rewards_opt(&self) -> Option<u64> {
13466            self.safe_mode_storage_rewards.as_ref().map(|field| *field)
13467        }
13468        ///Sets `safe_mode_storage_rewards` with the provided value.
13469        pub fn set_safe_mode_storage_rewards<T: Into<u64>>(&mut self, field: T) {
13470            self.safe_mode_storage_rewards = Some(field.into().into());
13471        }
13472        ///Sets `safe_mode_storage_rewards` with the provided value.
13473        pub fn with_safe_mode_storage_rewards<T: Into<u64>>(mut self, field: T) -> Self {
13474            self.set_safe_mode_storage_rewards(field.into());
13475            self
13476        }
13477        ///If `safe_mode_computation_rewards` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13478        pub fn safe_mode_computation_rewards_opt_mut(&mut self) -> Option<&mut u64> {
13479            self.safe_mode_computation_rewards.as_mut().map(|field| field as _)
13480        }
13481        ///Returns a mutable reference to `safe_mode_computation_rewards`.
13482        ///If the field is unset, it is first initialized with the default value.
13483        pub fn safe_mode_computation_rewards_mut(&mut self) -> &mut u64 {
13484            self.safe_mode_computation_rewards.get_or_insert_default()
13485        }
13486        ///If `safe_mode_computation_rewards` is set, returns [`Some`] with the value; otherwise returns [`None`].
13487        pub fn safe_mode_computation_rewards_opt(&self) -> Option<u64> {
13488            self.safe_mode_computation_rewards.as_ref().map(|field| *field)
13489        }
13490        ///Sets `safe_mode_computation_rewards` with the provided value.
13491        pub fn set_safe_mode_computation_rewards<T: Into<u64>>(&mut self, field: T) {
13492            self.safe_mode_computation_rewards = Some(field.into().into());
13493        }
13494        ///Sets `safe_mode_computation_rewards` with the provided value.
13495        pub fn with_safe_mode_computation_rewards<T: Into<u64>>(
13496            mut self,
13497            field: T,
13498        ) -> Self {
13499            self.set_safe_mode_computation_rewards(field.into());
13500            self
13501        }
13502        ///If `safe_mode_storage_rebates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13503        pub fn safe_mode_storage_rebates_opt_mut(&mut self) -> Option<&mut u64> {
13504            self.safe_mode_storage_rebates.as_mut().map(|field| field as _)
13505        }
13506        ///Returns a mutable reference to `safe_mode_storage_rebates`.
13507        ///If the field is unset, it is first initialized with the default value.
13508        pub fn safe_mode_storage_rebates_mut(&mut self) -> &mut u64 {
13509            self.safe_mode_storage_rebates.get_or_insert_default()
13510        }
13511        ///If `safe_mode_storage_rebates` is set, returns [`Some`] with the value; otherwise returns [`None`].
13512        pub fn safe_mode_storage_rebates_opt(&self) -> Option<u64> {
13513            self.safe_mode_storage_rebates.as_ref().map(|field| *field)
13514        }
13515        ///Sets `safe_mode_storage_rebates` with the provided value.
13516        pub fn set_safe_mode_storage_rebates<T: Into<u64>>(&mut self, field: T) {
13517            self.safe_mode_storage_rebates = Some(field.into().into());
13518        }
13519        ///Sets `safe_mode_storage_rebates` with the provided value.
13520        pub fn with_safe_mode_storage_rebates<T: Into<u64>>(mut self, field: T) -> Self {
13521            self.set_safe_mode_storage_rebates(field.into());
13522            self
13523        }
13524        ///If `safe_mode_non_refundable_storage_fee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13525        pub fn safe_mode_non_refundable_storage_fee_opt_mut(
13526            &mut self,
13527        ) -> Option<&mut u64> {
13528            self.safe_mode_non_refundable_storage_fee.as_mut().map(|field| field as _)
13529        }
13530        ///Returns a mutable reference to `safe_mode_non_refundable_storage_fee`.
13531        ///If the field is unset, it is first initialized with the default value.
13532        pub fn safe_mode_non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
13533            self.safe_mode_non_refundable_storage_fee.get_or_insert_default()
13534        }
13535        ///If `safe_mode_non_refundable_storage_fee` is set, returns [`Some`] with the value; otherwise returns [`None`].
13536        pub fn safe_mode_non_refundable_storage_fee_opt(&self) -> Option<u64> {
13537            self.safe_mode_non_refundable_storage_fee.as_ref().map(|field| *field)
13538        }
13539        ///Sets `safe_mode_non_refundable_storage_fee` with the provided value.
13540        pub fn set_safe_mode_non_refundable_storage_fee<T: Into<u64>>(
13541            &mut self,
13542            field: T,
13543        ) {
13544            self.safe_mode_non_refundable_storage_fee = Some(field.into().into());
13545        }
13546        ///Sets `safe_mode_non_refundable_storage_fee` with the provided value.
13547        pub fn with_safe_mode_non_refundable_storage_fee<T: Into<u64>>(
13548            mut self,
13549            field: T,
13550        ) -> Self {
13551            self.set_safe_mode_non_refundable_storage_fee(field.into());
13552            self
13553        }
13554        ///If `epoch_start_timestamp_ms` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13555        pub fn epoch_start_timestamp_ms_opt_mut(&mut self) -> Option<&mut u64> {
13556            self.epoch_start_timestamp_ms.as_mut().map(|field| field as _)
13557        }
13558        ///Returns a mutable reference to `epoch_start_timestamp_ms`.
13559        ///If the field is unset, it is first initialized with the default value.
13560        pub fn epoch_start_timestamp_ms_mut(&mut self) -> &mut u64 {
13561            self.epoch_start_timestamp_ms.get_or_insert_default()
13562        }
13563        ///If `epoch_start_timestamp_ms` is set, returns [`Some`] with the value; otherwise returns [`None`].
13564        pub fn epoch_start_timestamp_ms_opt(&self) -> Option<u64> {
13565            self.epoch_start_timestamp_ms.as_ref().map(|field| *field)
13566        }
13567        ///Sets `epoch_start_timestamp_ms` with the provided value.
13568        pub fn set_epoch_start_timestamp_ms<T: Into<u64>>(&mut self, field: T) {
13569            self.epoch_start_timestamp_ms = Some(field.into().into());
13570        }
13571        ///Sets `epoch_start_timestamp_ms` with the provided value.
13572        pub fn with_epoch_start_timestamp_ms<T: Into<u64>>(mut self, field: T) -> Self {
13573            self.set_epoch_start_timestamp_ms(field.into());
13574            self
13575        }
13576        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
13577        pub fn extra_fields(&self) -> &super::MoveTable {
13578            self.extra_fields
13579                .as_ref()
13580                .map(|field| field as _)
13581                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
13582        }
13583        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13584        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
13585            self.extra_fields.as_mut().map(|field| field as _)
13586        }
13587        ///Returns a mutable reference to `extra_fields`.
13588        ///If the field is unset, it is first initialized with the default value.
13589        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
13590            self.extra_fields.get_or_insert_default()
13591        }
13592        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
13593        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
13594            self.extra_fields.as_ref().map(|field| field as _)
13595        }
13596        ///Sets `extra_fields` with the provided value.
13597        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
13598            self.extra_fields = Some(field.into().into());
13599        }
13600        ///Sets `extra_fields` with the provided value.
13601        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
13602            self.set_extra_fields(field.into());
13603            self
13604        }
13605    }
13606    impl super::Transaction {
13607        pub const fn const_default() -> Self {
13608            Self {
13609                bcs: None,
13610                digest: None,
13611                version: None,
13612                kind: None,
13613                sender: None,
13614                gas_payment: None,
13615                expiration: None,
13616            }
13617        }
13618        #[doc(hidden)]
13619        pub fn default_instance() -> &'static Self {
13620            static DEFAULT: super::Transaction = super::Transaction::const_default();
13621            &DEFAULT
13622        }
13623        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
13624        pub fn bcs(&self) -> &super::Bcs {
13625            self.bcs
13626                .as_ref()
13627                .map(|field| field as _)
13628                .unwrap_or_else(|| super::Bcs::default_instance() as _)
13629        }
13630        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13631        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
13632            self.bcs.as_mut().map(|field| field as _)
13633        }
13634        ///Returns a mutable reference to `bcs`.
13635        ///If the field is unset, it is first initialized with the default value.
13636        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
13637            self.bcs.get_or_insert_default()
13638        }
13639        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
13640        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
13641            self.bcs.as_ref().map(|field| field as _)
13642        }
13643        ///Sets `bcs` with the provided value.
13644        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
13645            self.bcs = Some(field.into().into());
13646        }
13647        ///Sets `bcs` with the provided value.
13648        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
13649            self.set_bcs(field.into());
13650            self
13651        }
13652        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13653        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
13654            self.digest.as_mut().map(|field| field as _)
13655        }
13656        ///Returns a mutable reference to `digest`.
13657        ///If the field is unset, it is first initialized with the default value.
13658        pub fn digest_mut(&mut self) -> &mut String {
13659            self.digest.get_or_insert_default()
13660        }
13661        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
13662        pub fn digest_opt(&self) -> Option<&str> {
13663            self.digest.as_ref().map(|field| field as _)
13664        }
13665        ///Sets `digest` with the provided value.
13666        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
13667            self.digest = Some(field.into().into());
13668        }
13669        ///Sets `digest` with the provided value.
13670        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
13671            self.set_digest(field.into());
13672            self
13673        }
13674        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13675        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
13676            self.version.as_mut().map(|field| field as _)
13677        }
13678        ///Returns a mutable reference to `version`.
13679        ///If the field is unset, it is first initialized with the default value.
13680        pub fn version_mut(&mut self) -> &mut i32 {
13681            self.version.get_or_insert_default()
13682        }
13683        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
13684        pub fn version_opt(&self) -> Option<i32> {
13685            self.version.as_ref().map(|field| *field)
13686        }
13687        ///Sets `version` with the provided value.
13688        pub fn set_version<T: Into<i32>>(&mut self, field: T) {
13689            self.version = Some(field.into().into());
13690        }
13691        ///Sets `version` with the provided value.
13692        pub fn with_version<T: Into<i32>>(mut self, field: T) -> Self {
13693            self.set_version(field.into());
13694            self
13695        }
13696        ///Returns the value of `kind`, or the default value if `kind` is unset.
13697        pub fn kind(&self) -> &super::TransactionKind {
13698            self.kind
13699                .as_ref()
13700                .map(|field| field as _)
13701                .unwrap_or_else(|| super::TransactionKind::default_instance() as _)
13702        }
13703        ///If `kind` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13704        pub fn kind_opt_mut(&mut self) -> Option<&mut super::TransactionKind> {
13705            self.kind.as_mut().map(|field| field as _)
13706        }
13707        ///Returns a mutable reference to `kind`.
13708        ///If the field is unset, it is first initialized with the default value.
13709        pub fn kind_mut(&mut self) -> &mut super::TransactionKind {
13710            self.kind.get_or_insert_default()
13711        }
13712        ///If `kind` is set, returns [`Some`] with the value; otherwise returns [`None`].
13713        pub fn kind_opt(&self) -> Option<&super::TransactionKind> {
13714            self.kind.as_ref().map(|field| field as _)
13715        }
13716        ///Sets `kind` with the provided value.
13717        pub fn set_kind<T: Into<super::TransactionKind>>(&mut self, field: T) {
13718            self.kind = Some(field.into().into());
13719        }
13720        ///Sets `kind` with the provided value.
13721        pub fn with_kind<T: Into<super::TransactionKind>>(mut self, field: T) -> Self {
13722            self.set_kind(field.into());
13723            self
13724        }
13725        ///If `sender` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13726        pub fn sender_opt_mut(&mut self) -> Option<&mut String> {
13727            self.sender.as_mut().map(|field| field as _)
13728        }
13729        ///Returns a mutable reference to `sender`.
13730        ///If the field is unset, it is first initialized with the default value.
13731        pub fn sender_mut(&mut self) -> &mut String {
13732            self.sender.get_or_insert_default()
13733        }
13734        ///If `sender` is set, returns [`Some`] with the value; otherwise returns [`None`].
13735        pub fn sender_opt(&self) -> Option<&str> {
13736            self.sender.as_ref().map(|field| field as _)
13737        }
13738        ///Sets `sender` with the provided value.
13739        pub fn set_sender<T: Into<String>>(&mut self, field: T) {
13740            self.sender = Some(field.into().into());
13741        }
13742        ///Sets `sender` with the provided value.
13743        pub fn with_sender<T: Into<String>>(mut self, field: T) -> Self {
13744            self.set_sender(field.into());
13745            self
13746        }
13747        ///Returns the value of `gas_payment`, or the default value if `gas_payment` is unset.
13748        pub fn gas_payment(&self) -> &super::GasPayment {
13749            self.gas_payment
13750                .as_ref()
13751                .map(|field| field as _)
13752                .unwrap_or_else(|| super::GasPayment::default_instance() as _)
13753        }
13754        ///If `gas_payment` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13755        pub fn gas_payment_opt_mut(&mut self) -> Option<&mut super::GasPayment> {
13756            self.gas_payment.as_mut().map(|field| field as _)
13757        }
13758        ///Returns a mutable reference to `gas_payment`.
13759        ///If the field is unset, it is first initialized with the default value.
13760        pub fn gas_payment_mut(&mut self) -> &mut super::GasPayment {
13761            self.gas_payment.get_or_insert_default()
13762        }
13763        ///If `gas_payment` is set, returns [`Some`] with the value; otherwise returns [`None`].
13764        pub fn gas_payment_opt(&self) -> Option<&super::GasPayment> {
13765            self.gas_payment.as_ref().map(|field| field as _)
13766        }
13767        ///Sets `gas_payment` with the provided value.
13768        pub fn set_gas_payment<T: Into<super::GasPayment>>(&mut self, field: T) {
13769            self.gas_payment = Some(field.into().into());
13770        }
13771        ///Sets `gas_payment` with the provided value.
13772        pub fn with_gas_payment<T: Into<super::GasPayment>>(mut self, field: T) -> Self {
13773            self.set_gas_payment(field.into());
13774            self
13775        }
13776        ///Returns the value of `expiration`, or the default value if `expiration` is unset.
13777        pub fn expiration(&self) -> &super::TransactionExpiration {
13778            self.expiration
13779                .as_ref()
13780                .map(|field| field as _)
13781                .unwrap_or_else(|| super::TransactionExpiration::default_instance() as _)
13782        }
13783        ///If `expiration` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13784        pub fn expiration_opt_mut(
13785            &mut self,
13786        ) -> Option<&mut super::TransactionExpiration> {
13787            self.expiration.as_mut().map(|field| field as _)
13788        }
13789        ///Returns a mutable reference to `expiration`.
13790        ///If the field is unset, it is first initialized with the default value.
13791        pub fn expiration_mut(&mut self) -> &mut super::TransactionExpiration {
13792            self.expiration.get_or_insert_default()
13793        }
13794        ///If `expiration` is set, returns [`Some`] with the value; otherwise returns [`None`].
13795        pub fn expiration_opt(&self) -> Option<&super::TransactionExpiration> {
13796            self.expiration.as_ref().map(|field| field as _)
13797        }
13798        ///Sets `expiration` with the provided value.
13799        pub fn set_expiration<T: Into<super::TransactionExpiration>>(
13800            &mut self,
13801            field: T,
13802        ) {
13803            self.expiration = Some(field.into().into());
13804        }
13805        ///Sets `expiration` with the provided value.
13806        pub fn with_expiration<T: Into<super::TransactionExpiration>>(
13807            mut self,
13808            field: T,
13809        ) -> Self {
13810            self.set_expiration(field.into());
13811            self
13812        }
13813    }
13814    impl super::TransactionEffects {
13815        pub const fn const_default() -> Self {
13816            Self {
13817                bcs: None,
13818                digest: None,
13819                version: None,
13820                status: None,
13821                epoch: None,
13822                gas_used: None,
13823                transaction_digest: None,
13824                gas_object: None,
13825                events_digest: None,
13826                dependencies: Vec::new(),
13827                lamport_version: None,
13828                changed_objects: Vec::new(),
13829                unchanged_consensus_objects: Vec::new(),
13830                auxiliary_data_digest: None,
13831                unchanged_loaded_runtime_objects: Vec::new(),
13832            }
13833        }
13834        #[doc(hidden)]
13835        pub fn default_instance() -> &'static Self {
13836            static DEFAULT: super::TransactionEffects = super::TransactionEffects::const_default();
13837            &DEFAULT
13838        }
13839        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
13840        pub fn bcs(&self) -> &super::Bcs {
13841            self.bcs
13842                .as_ref()
13843                .map(|field| field as _)
13844                .unwrap_or_else(|| super::Bcs::default_instance() as _)
13845        }
13846        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13847        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
13848            self.bcs.as_mut().map(|field| field as _)
13849        }
13850        ///Returns a mutable reference to `bcs`.
13851        ///If the field is unset, it is first initialized with the default value.
13852        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
13853            self.bcs.get_or_insert_default()
13854        }
13855        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
13856        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
13857            self.bcs.as_ref().map(|field| field as _)
13858        }
13859        ///Sets `bcs` with the provided value.
13860        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
13861            self.bcs = Some(field.into().into());
13862        }
13863        ///Sets `bcs` with the provided value.
13864        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
13865            self.set_bcs(field.into());
13866            self
13867        }
13868        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13869        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
13870            self.digest.as_mut().map(|field| field as _)
13871        }
13872        ///Returns a mutable reference to `digest`.
13873        ///If the field is unset, it is first initialized with the default value.
13874        pub fn digest_mut(&mut self) -> &mut String {
13875            self.digest.get_or_insert_default()
13876        }
13877        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
13878        pub fn digest_opt(&self) -> Option<&str> {
13879            self.digest.as_ref().map(|field| field as _)
13880        }
13881        ///Sets `digest` with the provided value.
13882        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
13883            self.digest = Some(field.into().into());
13884        }
13885        ///Sets `digest` with the provided value.
13886        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
13887            self.set_digest(field.into());
13888            self
13889        }
13890        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13891        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
13892            self.version.as_mut().map(|field| field as _)
13893        }
13894        ///Returns a mutable reference to `version`.
13895        ///If the field is unset, it is first initialized with the default value.
13896        pub fn version_mut(&mut self) -> &mut i32 {
13897            self.version.get_or_insert_default()
13898        }
13899        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
13900        pub fn version_opt(&self) -> Option<i32> {
13901            self.version.as_ref().map(|field| *field)
13902        }
13903        ///Sets `version` with the provided value.
13904        pub fn set_version<T: Into<i32>>(&mut self, field: T) {
13905            self.version = Some(field.into().into());
13906        }
13907        ///Sets `version` with the provided value.
13908        pub fn with_version<T: Into<i32>>(mut self, field: T) -> Self {
13909            self.set_version(field.into());
13910            self
13911        }
13912        ///Returns the value of `status`, or the default value if `status` is unset.
13913        pub fn status(&self) -> &super::ExecutionStatus {
13914            self.status
13915                .as_ref()
13916                .map(|field| field as _)
13917                .unwrap_or_else(|| super::ExecutionStatus::default_instance() as _)
13918        }
13919        ///If `status` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13920        pub fn status_opt_mut(&mut self) -> Option<&mut super::ExecutionStatus> {
13921            self.status.as_mut().map(|field| field as _)
13922        }
13923        ///Returns a mutable reference to `status`.
13924        ///If the field is unset, it is first initialized with the default value.
13925        pub fn status_mut(&mut self) -> &mut super::ExecutionStatus {
13926            self.status.get_or_insert_default()
13927        }
13928        ///If `status` is set, returns [`Some`] with the value; otherwise returns [`None`].
13929        pub fn status_opt(&self) -> Option<&super::ExecutionStatus> {
13930            self.status.as_ref().map(|field| field as _)
13931        }
13932        ///Sets `status` with the provided value.
13933        pub fn set_status<T: Into<super::ExecutionStatus>>(&mut self, field: T) {
13934            self.status = Some(field.into().into());
13935        }
13936        ///Sets `status` with the provided value.
13937        pub fn with_status<T: Into<super::ExecutionStatus>>(mut self, field: T) -> Self {
13938            self.set_status(field.into());
13939            self
13940        }
13941        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13942        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
13943            self.epoch.as_mut().map(|field| field as _)
13944        }
13945        ///Returns a mutable reference to `epoch`.
13946        ///If the field is unset, it is first initialized with the default value.
13947        pub fn epoch_mut(&mut self) -> &mut u64 {
13948            self.epoch.get_or_insert_default()
13949        }
13950        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
13951        pub fn epoch_opt(&self) -> Option<u64> {
13952            self.epoch.as_ref().map(|field| *field)
13953        }
13954        ///Sets `epoch` with the provided value.
13955        pub fn set_epoch<T: Into<u64>>(&mut self, field: T) {
13956            self.epoch = Some(field.into().into());
13957        }
13958        ///Sets `epoch` with the provided value.
13959        pub fn with_epoch<T: Into<u64>>(mut self, field: T) -> Self {
13960            self.set_epoch(field.into());
13961            self
13962        }
13963        ///Returns the value of `gas_used`, or the default value if `gas_used` is unset.
13964        pub fn gas_used(&self) -> &super::GasCostSummary {
13965            self.gas_used
13966                .as_ref()
13967                .map(|field| field as _)
13968                .unwrap_or_else(|| super::GasCostSummary::default_instance() as _)
13969        }
13970        ///If `gas_used` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13971        pub fn gas_used_opt_mut(&mut self) -> Option<&mut super::GasCostSummary> {
13972            self.gas_used.as_mut().map(|field| field as _)
13973        }
13974        ///Returns a mutable reference to `gas_used`.
13975        ///If the field is unset, it is first initialized with the default value.
13976        pub fn gas_used_mut(&mut self) -> &mut super::GasCostSummary {
13977            self.gas_used.get_or_insert_default()
13978        }
13979        ///If `gas_used` is set, returns [`Some`] with the value; otherwise returns [`None`].
13980        pub fn gas_used_opt(&self) -> Option<&super::GasCostSummary> {
13981            self.gas_used.as_ref().map(|field| field as _)
13982        }
13983        ///Sets `gas_used` with the provided value.
13984        pub fn set_gas_used<T: Into<super::GasCostSummary>>(&mut self, field: T) {
13985            self.gas_used = Some(field.into().into());
13986        }
13987        ///Sets `gas_used` with the provided value.
13988        pub fn with_gas_used<T: Into<super::GasCostSummary>>(
13989            mut self,
13990            field: T,
13991        ) -> Self {
13992            self.set_gas_used(field.into());
13993            self
13994        }
13995        ///If `transaction_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13996        pub fn transaction_digest_opt_mut(&mut self) -> Option<&mut String> {
13997            self.transaction_digest.as_mut().map(|field| field as _)
13998        }
13999        ///Returns a mutable reference to `transaction_digest`.
14000        ///If the field is unset, it is first initialized with the default value.
14001        pub fn transaction_digest_mut(&mut self) -> &mut String {
14002            self.transaction_digest.get_or_insert_default()
14003        }
14004        ///If `transaction_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
14005        pub fn transaction_digest_opt(&self) -> Option<&str> {
14006            self.transaction_digest.as_ref().map(|field| field as _)
14007        }
14008        ///Sets `transaction_digest` with the provided value.
14009        pub fn set_transaction_digest<T: Into<String>>(&mut self, field: T) {
14010            self.transaction_digest = Some(field.into().into());
14011        }
14012        ///Sets `transaction_digest` with the provided value.
14013        pub fn with_transaction_digest<T: Into<String>>(mut self, field: T) -> Self {
14014            self.set_transaction_digest(field.into());
14015            self
14016        }
14017        ///Returns the value of `gas_object`, or the default value if `gas_object` is unset.
14018        pub fn gas_object(&self) -> &super::ChangedObject {
14019            self.gas_object
14020                .as_ref()
14021                .map(|field| field as _)
14022                .unwrap_or_else(|| super::ChangedObject::default_instance() as _)
14023        }
14024        ///If `gas_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14025        pub fn gas_object_opt_mut(&mut self) -> Option<&mut super::ChangedObject> {
14026            self.gas_object.as_mut().map(|field| field as _)
14027        }
14028        ///Returns a mutable reference to `gas_object`.
14029        ///If the field is unset, it is first initialized with the default value.
14030        pub fn gas_object_mut(&mut self) -> &mut super::ChangedObject {
14031            self.gas_object.get_or_insert_default()
14032        }
14033        ///If `gas_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
14034        pub fn gas_object_opt(&self) -> Option<&super::ChangedObject> {
14035            self.gas_object.as_ref().map(|field| field as _)
14036        }
14037        ///Sets `gas_object` with the provided value.
14038        pub fn set_gas_object<T: Into<super::ChangedObject>>(&mut self, field: T) {
14039            self.gas_object = Some(field.into().into());
14040        }
14041        ///Sets `gas_object` with the provided value.
14042        pub fn with_gas_object<T: Into<super::ChangedObject>>(
14043            mut self,
14044            field: T,
14045        ) -> Self {
14046            self.set_gas_object(field.into());
14047            self
14048        }
14049        ///If `events_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14050        pub fn events_digest_opt_mut(&mut self) -> Option<&mut String> {
14051            self.events_digest.as_mut().map(|field| field as _)
14052        }
14053        ///Returns a mutable reference to `events_digest`.
14054        ///If the field is unset, it is first initialized with the default value.
14055        pub fn events_digest_mut(&mut self) -> &mut String {
14056            self.events_digest.get_or_insert_default()
14057        }
14058        ///If `events_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
14059        pub fn events_digest_opt(&self) -> Option<&str> {
14060            self.events_digest.as_ref().map(|field| field as _)
14061        }
14062        ///Sets `events_digest` with the provided value.
14063        pub fn set_events_digest<T: Into<String>>(&mut self, field: T) {
14064            self.events_digest = Some(field.into().into());
14065        }
14066        ///Sets `events_digest` with the provided value.
14067        pub fn with_events_digest<T: Into<String>>(mut self, field: T) -> Self {
14068            self.set_events_digest(field.into());
14069            self
14070        }
14071        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
14072        pub fn dependencies(&self) -> &[String] {
14073            &self.dependencies
14074        }
14075        ///Returns a mutable reference to `dependencies`.
14076        ///If the field is unset, it is first initialized with the default value.
14077        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
14078            &mut self.dependencies
14079        }
14080        ///Sets `dependencies` with the provided value.
14081        pub fn set_dependencies(&mut self, field: Vec<String>) {
14082            self.dependencies = field;
14083        }
14084        ///Sets `dependencies` with the provided value.
14085        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
14086            self.set_dependencies(field);
14087            self
14088        }
14089        ///If `lamport_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14090        pub fn lamport_version_opt_mut(&mut self) -> Option<&mut u64> {
14091            self.lamport_version.as_mut().map(|field| field as _)
14092        }
14093        ///Returns a mutable reference to `lamport_version`.
14094        ///If the field is unset, it is first initialized with the default value.
14095        pub fn lamport_version_mut(&mut self) -> &mut u64 {
14096            self.lamport_version.get_or_insert_default()
14097        }
14098        ///If `lamport_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
14099        pub fn lamport_version_opt(&self) -> Option<u64> {
14100            self.lamport_version.as_ref().map(|field| *field)
14101        }
14102        ///Sets `lamport_version` with the provided value.
14103        pub fn set_lamport_version<T: Into<u64>>(&mut self, field: T) {
14104            self.lamport_version = Some(field.into().into());
14105        }
14106        ///Sets `lamport_version` with the provided value.
14107        pub fn with_lamport_version<T: Into<u64>>(mut self, field: T) -> Self {
14108            self.set_lamport_version(field.into());
14109            self
14110        }
14111        ///Returns the value of `changed_objects`, or the default value if `changed_objects` is unset.
14112        pub fn changed_objects(&self) -> &[super::ChangedObject] {
14113            &self.changed_objects
14114        }
14115        ///Returns a mutable reference to `changed_objects`.
14116        ///If the field is unset, it is first initialized with the default value.
14117        pub fn changed_objects_mut(&mut self) -> &mut Vec<super::ChangedObject> {
14118            &mut self.changed_objects
14119        }
14120        ///Sets `changed_objects` with the provided value.
14121        pub fn set_changed_objects(&mut self, field: Vec<super::ChangedObject>) {
14122            self.changed_objects = field;
14123        }
14124        ///Sets `changed_objects` with the provided value.
14125        pub fn with_changed_objects(mut self, field: Vec<super::ChangedObject>) -> Self {
14126            self.set_changed_objects(field);
14127            self
14128        }
14129        ///Returns the value of `unchanged_consensus_objects`, or the default value if `unchanged_consensus_objects` is unset.
14130        pub fn unchanged_consensus_objects(&self) -> &[super::UnchangedConsensusObject] {
14131            &self.unchanged_consensus_objects
14132        }
14133        ///Returns a mutable reference to `unchanged_consensus_objects`.
14134        ///If the field is unset, it is first initialized with the default value.
14135        pub fn unchanged_consensus_objects_mut(
14136            &mut self,
14137        ) -> &mut Vec<super::UnchangedConsensusObject> {
14138            &mut self.unchanged_consensus_objects
14139        }
14140        ///Sets `unchanged_consensus_objects` with the provided value.
14141        pub fn set_unchanged_consensus_objects(
14142            &mut self,
14143            field: Vec<super::UnchangedConsensusObject>,
14144        ) {
14145            self.unchanged_consensus_objects = field;
14146        }
14147        ///Sets `unchanged_consensus_objects` with the provided value.
14148        pub fn with_unchanged_consensus_objects(
14149            mut self,
14150            field: Vec<super::UnchangedConsensusObject>,
14151        ) -> Self {
14152            self.set_unchanged_consensus_objects(field);
14153            self
14154        }
14155        ///If `auxiliary_data_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14156        pub fn auxiliary_data_digest_opt_mut(&mut self) -> Option<&mut String> {
14157            self.auxiliary_data_digest.as_mut().map(|field| field as _)
14158        }
14159        ///Returns a mutable reference to `auxiliary_data_digest`.
14160        ///If the field is unset, it is first initialized with the default value.
14161        pub fn auxiliary_data_digest_mut(&mut self) -> &mut String {
14162            self.auxiliary_data_digest.get_or_insert_default()
14163        }
14164        ///If `auxiliary_data_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
14165        pub fn auxiliary_data_digest_opt(&self) -> Option<&str> {
14166            self.auxiliary_data_digest.as_ref().map(|field| field as _)
14167        }
14168        ///Sets `auxiliary_data_digest` with the provided value.
14169        pub fn set_auxiliary_data_digest<T: Into<String>>(&mut self, field: T) {
14170            self.auxiliary_data_digest = Some(field.into().into());
14171        }
14172        ///Sets `auxiliary_data_digest` with the provided value.
14173        pub fn with_auxiliary_data_digest<T: Into<String>>(mut self, field: T) -> Self {
14174            self.set_auxiliary_data_digest(field.into());
14175            self
14176        }
14177        ///Returns the value of `unchanged_loaded_runtime_objects`, or the default value if `unchanged_loaded_runtime_objects` is unset.
14178        pub fn unchanged_loaded_runtime_objects(&self) -> &[super::ObjectReference] {
14179            &self.unchanged_loaded_runtime_objects
14180        }
14181        ///Returns a mutable reference to `unchanged_loaded_runtime_objects`.
14182        ///If the field is unset, it is first initialized with the default value.
14183        pub fn unchanged_loaded_runtime_objects_mut(
14184            &mut self,
14185        ) -> &mut Vec<super::ObjectReference> {
14186            &mut self.unchanged_loaded_runtime_objects
14187        }
14188        ///Sets `unchanged_loaded_runtime_objects` with the provided value.
14189        pub fn set_unchanged_loaded_runtime_objects(
14190            &mut self,
14191            field: Vec<super::ObjectReference>,
14192        ) {
14193            self.unchanged_loaded_runtime_objects = field;
14194        }
14195        ///Sets `unchanged_loaded_runtime_objects` with the provided value.
14196        pub fn with_unchanged_loaded_runtime_objects(
14197            mut self,
14198            field: Vec<super::ObjectReference>,
14199        ) -> Self {
14200            self.set_unchanged_loaded_runtime_objects(field);
14201            self
14202        }
14203    }
14204    impl super::TransactionEvents {
14205        pub const fn const_default() -> Self {
14206            Self {
14207                bcs: None,
14208                digest: None,
14209                events: Vec::new(),
14210            }
14211        }
14212        #[doc(hidden)]
14213        pub fn default_instance() -> &'static Self {
14214            static DEFAULT: super::TransactionEvents = super::TransactionEvents::const_default();
14215            &DEFAULT
14216        }
14217        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
14218        pub fn bcs(&self) -> &super::Bcs {
14219            self.bcs
14220                .as_ref()
14221                .map(|field| field as _)
14222                .unwrap_or_else(|| super::Bcs::default_instance() as _)
14223        }
14224        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14225        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
14226            self.bcs.as_mut().map(|field| field as _)
14227        }
14228        ///Returns a mutable reference to `bcs`.
14229        ///If the field is unset, it is first initialized with the default value.
14230        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
14231            self.bcs.get_or_insert_default()
14232        }
14233        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
14234        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
14235            self.bcs.as_ref().map(|field| field as _)
14236        }
14237        ///Sets `bcs` with the provided value.
14238        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
14239            self.bcs = Some(field.into().into());
14240        }
14241        ///Sets `bcs` with the provided value.
14242        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
14243            self.set_bcs(field.into());
14244            self
14245        }
14246        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14247        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
14248            self.digest.as_mut().map(|field| field as _)
14249        }
14250        ///Returns a mutable reference to `digest`.
14251        ///If the field is unset, it is first initialized with the default value.
14252        pub fn digest_mut(&mut self) -> &mut String {
14253            self.digest.get_or_insert_default()
14254        }
14255        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
14256        pub fn digest_opt(&self) -> Option<&str> {
14257            self.digest.as_ref().map(|field| field as _)
14258        }
14259        ///Sets `digest` with the provided value.
14260        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
14261            self.digest = Some(field.into().into());
14262        }
14263        ///Sets `digest` with the provided value.
14264        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
14265            self.set_digest(field.into());
14266            self
14267        }
14268        ///Returns the value of `events`, or the default value if `events` is unset.
14269        pub fn events(&self) -> &[super::Event] {
14270            &self.events
14271        }
14272        ///Returns a mutable reference to `events`.
14273        ///If the field is unset, it is first initialized with the default value.
14274        pub fn events_mut(&mut self) -> &mut Vec<super::Event> {
14275            &mut self.events
14276        }
14277        ///Sets `events` with the provided value.
14278        pub fn set_events(&mut self, field: Vec<super::Event>) {
14279            self.events = field;
14280        }
14281        ///Sets `events` with the provided value.
14282        pub fn with_events(mut self, field: Vec<super::Event>) -> Self {
14283            self.set_events(field);
14284            self
14285        }
14286    }
14287    impl super::TransactionExpiration {
14288        pub const fn const_default() -> Self {
14289            Self { kind: None, epoch: None }
14290        }
14291        #[doc(hidden)]
14292        pub fn default_instance() -> &'static Self {
14293            static DEFAULT: super::TransactionExpiration = super::TransactionExpiration::const_default();
14294            &DEFAULT
14295        }
14296        ///Sets `kind` with the provided value.
14297        pub fn with_kind<
14298            T: Into<super::transaction_expiration::TransactionExpirationKind>,
14299        >(mut self, field: T) -> Self {
14300            self.set_kind(field.into());
14301            self
14302        }
14303        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14304        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
14305            self.epoch.as_mut().map(|field| field as _)
14306        }
14307        ///Returns a mutable reference to `epoch`.
14308        ///If the field is unset, it is first initialized with the default value.
14309        pub fn epoch_mut(&mut self) -> &mut u64 {
14310            self.epoch.get_or_insert_default()
14311        }
14312        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
14313        pub fn epoch_opt(&self) -> Option<u64> {
14314            self.epoch.as_ref().map(|field| *field)
14315        }
14316        ///Sets `epoch` with the provided value.
14317        pub fn set_epoch<T: Into<u64>>(&mut self, field: T) {
14318            self.epoch = Some(field.into().into());
14319        }
14320        ///Sets `epoch` with the provided value.
14321        pub fn with_epoch<T: Into<u64>>(mut self, field: T) -> Self {
14322            self.set_epoch(field.into());
14323            self
14324        }
14325    }
14326    impl super::TransactionKind {
14327        pub const fn const_default() -> Self {
14328            Self { kind: None, data: None }
14329        }
14330        #[doc(hidden)]
14331        pub fn default_instance() -> &'static Self {
14332            static DEFAULT: super::TransactionKind = super::TransactionKind::const_default();
14333            &DEFAULT
14334        }
14335        ///Sets `kind` with the provided value.
14336        pub fn with_kind<T: Into<super::transaction_kind::Kind>>(
14337            mut self,
14338            field: T,
14339        ) -> Self {
14340            self.set_kind(field.into());
14341            self
14342        }
14343        ///Returns the value of `programmable_transaction`, or the default value if `programmable_transaction` is unset.
14344        pub fn programmable_transaction(&self) -> &super::ProgrammableTransaction {
14345            if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &self
14346                .data
14347            {
14348                field as _
14349            } else {
14350                super::ProgrammableTransaction::default_instance() as _
14351            }
14352        }
14353        ///If `programmable_transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
14354        pub fn programmable_transaction_opt(
14355            &self,
14356        ) -> Option<&super::ProgrammableTransaction> {
14357            if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &self
14358                .data
14359            {
14360                Some(field as _)
14361            } else {
14362                None
14363            }
14364        }
14365        ///If `programmable_transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14366        pub fn programmable_transaction_opt_mut(
14367            &mut self,
14368        ) -> Option<&mut super::ProgrammableTransaction> {
14369            if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &mut self
14370                .data
14371            {
14372                Some(field as _)
14373            } else {
14374                None
14375            }
14376        }
14377        ///Returns a mutable reference to `programmable_transaction`.
14378        ///If the field is unset, it is first initialized with the default value.
14379        ///If any other oneof field in the same oneof is set, it will be cleared.
14380        pub fn programmable_transaction_mut(
14381            &mut self,
14382        ) -> &mut super::ProgrammableTransaction {
14383            if self.programmable_transaction_opt_mut().is_none() {
14384                self.data = Some(
14385                    super::transaction_kind::Data::ProgrammableTransaction(
14386                        super::ProgrammableTransaction::default(),
14387                    ),
14388                );
14389            }
14390            self.programmable_transaction_opt_mut().unwrap()
14391        }
14392        ///Sets `programmable_transaction` with the provided value.
14393        ///If any other oneof field in the same oneof is set, it will be cleared.
14394        pub fn set_programmable_transaction<T: Into<super::ProgrammableTransaction>>(
14395            &mut self,
14396            field: T,
14397        ) {
14398            self.data = Some(
14399                super::transaction_kind::Data::ProgrammableTransaction(
14400                    field.into().into(),
14401                ),
14402            );
14403        }
14404        ///Sets `programmable_transaction` with the provided value.
14405        ///If any other oneof field in the same oneof is set, it will be cleared.
14406        pub fn with_programmable_transaction<T: Into<super::ProgrammableTransaction>>(
14407            mut self,
14408            field: T,
14409        ) -> Self {
14410            self.set_programmable_transaction(field.into());
14411            self
14412        }
14413        ///Returns the value of `change_epoch`, or the default value if `change_epoch` is unset.
14414        pub fn change_epoch(&self) -> &super::ChangeEpoch {
14415            if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &self.data {
14416                field as _
14417            } else {
14418                super::ChangeEpoch::default_instance() as _
14419            }
14420        }
14421        ///If `change_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
14422        pub fn change_epoch_opt(&self) -> Option<&super::ChangeEpoch> {
14423            if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &self.data {
14424                Some(field as _)
14425            } else {
14426                None
14427            }
14428        }
14429        ///If `change_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14430        pub fn change_epoch_opt_mut(&mut self) -> Option<&mut super::ChangeEpoch> {
14431            if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &mut self
14432                .data
14433            {
14434                Some(field as _)
14435            } else {
14436                None
14437            }
14438        }
14439        ///Returns a mutable reference to `change_epoch`.
14440        ///If the field is unset, it is first initialized with the default value.
14441        ///If any other oneof field in the same oneof is set, it will be cleared.
14442        pub fn change_epoch_mut(&mut self) -> &mut super::ChangeEpoch {
14443            if self.change_epoch_opt_mut().is_none() {
14444                self.data = Some(
14445                    super::transaction_kind::Data::ChangeEpoch(
14446                        super::ChangeEpoch::default(),
14447                    ),
14448                );
14449            }
14450            self.change_epoch_opt_mut().unwrap()
14451        }
14452        ///Sets `change_epoch` with the provided value.
14453        ///If any other oneof field in the same oneof is set, it will be cleared.
14454        pub fn set_change_epoch<T: Into<super::ChangeEpoch>>(&mut self, field: T) {
14455            self.data = Some(
14456                super::transaction_kind::Data::ChangeEpoch(field.into().into()),
14457            );
14458        }
14459        ///Sets `change_epoch` with the provided value.
14460        ///If any other oneof field in the same oneof is set, it will be cleared.
14461        pub fn with_change_epoch<T: Into<super::ChangeEpoch>>(
14462            mut self,
14463            field: T,
14464        ) -> Self {
14465            self.set_change_epoch(field.into());
14466            self
14467        }
14468        ///Returns the value of `genesis`, or the default value if `genesis` is unset.
14469        pub fn genesis(&self) -> &super::GenesisTransaction {
14470            if let Some(super::transaction_kind::Data::Genesis(field)) = &self.data {
14471                field as _
14472            } else {
14473                super::GenesisTransaction::default_instance() as _
14474            }
14475        }
14476        ///If `genesis` is set, returns [`Some`] with the value; otherwise returns [`None`].
14477        pub fn genesis_opt(&self) -> Option<&super::GenesisTransaction> {
14478            if let Some(super::transaction_kind::Data::Genesis(field)) = &self.data {
14479                Some(field as _)
14480            } else {
14481                None
14482            }
14483        }
14484        ///If `genesis` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14485        pub fn genesis_opt_mut(&mut self) -> Option<&mut super::GenesisTransaction> {
14486            if let Some(super::transaction_kind::Data::Genesis(field)) = &mut self.data {
14487                Some(field as _)
14488            } else {
14489                None
14490            }
14491        }
14492        ///Returns a mutable reference to `genesis`.
14493        ///If the field is unset, it is first initialized with the default value.
14494        ///If any other oneof field in the same oneof is set, it will be cleared.
14495        pub fn genesis_mut(&mut self) -> &mut super::GenesisTransaction {
14496            if self.genesis_opt_mut().is_none() {
14497                self.data = Some(
14498                    super::transaction_kind::Data::Genesis(
14499                        super::GenesisTransaction::default(),
14500                    ),
14501                );
14502            }
14503            self.genesis_opt_mut().unwrap()
14504        }
14505        ///Sets `genesis` with the provided value.
14506        ///If any other oneof field in the same oneof is set, it will be cleared.
14507        pub fn set_genesis<T: Into<super::GenesisTransaction>>(&mut self, field: T) {
14508            self.data = Some(
14509                super::transaction_kind::Data::Genesis(field.into().into()),
14510            );
14511        }
14512        ///Sets `genesis` with the provided value.
14513        ///If any other oneof field in the same oneof is set, it will be cleared.
14514        pub fn with_genesis<T: Into<super::GenesisTransaction>>(
14515            mut self,
14516            field: T,
14517        ) -> Self {
14518            self.set_genesis(field.into());
14519            self
14520        }
14521        ///Returns the value of `consensus_commit_prologue`, or the default value if `consensus_commit_prologue` is unset.
14522        pub fn consensus_commit_prologue(&self) -> &super::ConsensusCommitPrologue {
14523            if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &self
14524                .data
14525            {
14526                field as _
14527            } else {
14528                super::ConsensusCommitPrologue::default_instance() as _
14529            }
14530        }
14531        ///If `consensus_commit_prologue` is set, returns [`Some`] with the value; otherwise returns [`None`].
14532        pub fn consensus_commit_prologue_opt(
14533            &self,
14534        ) -> Option<&super::ConsensusCommitPrologue> {
14535            if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &self
14536                .data
14537            {
14538                Some(field as _)
14539            } else {
14540                None
14541            }
14542        }
14543        ///If `consensus_commit_prologue` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14544        pub fn consensus_commit_prologue_opt_mut(
14545            &mut self,
14546        ) -> Option<&mut super::ConsensusCommitPrologue> {
14547            if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &mut self
14548                .data
14549            {
14550                Some(field as _)
14551            } else {
14552                None
14553            }
14554        }
14555        ///Returns a mutable reference to `consensus_commit_prologue`.
14556        ///If the field is unset, it is first initialized with the default value.
14557        ///If any other oneof field in the same oneof is set, it will be cleared.
14558        pub fn consensus_commit_prologue_mut(
14559            &mut self,
14560        ) -> &mut super::ConsensusCommitPrologue {
14561            if self.consensus_commit_prologue_opt_mut().is_none() {
14562                self.data = Some(
14563                    super::transaction_kind::Data::ConsensusCommitPrologue(
14564                        super::ConsensusCommitPrologue::default(),
14565                    ),
14566                );
14567            }
14568            self.consensus_commit_prologue_opt_mut().unwrap()
14569        }
14570        ///Sets `consensus_commit_prologue` with the provided value.
14571        ///If any other oneof field in the same oneof is set, it will be cleared.
14572        pub fn set_consensus_commit_prologue<T: Into<super::ConsensusCommitPrologue>>(
14573            &mut self,
14574            field: T,
14575        ) {
14576            self.data = Some(
14577                super::transaction_kind::Data::ConsensusCommitPrologue(
14578                    field.into().into(),
14579                ),
14580            );
14581        }
14582        ///Sets `consensus_commit_prologue` with the provided value.
14583        ///If any other oneof field in the same oneof is set, it will be cleared.
14584        pub fn with_consensus_commit_prologue<T: Into<super::ConsensusCommitPrologue>>(
14585            mut self,
14586            field: T,
14587        ) -> Self {
14588            self.set_consensus_commit_prologue(field.into());
14589            self
14590        }
14591        ///Returns the value of `authenticator_state_update`, or the default value if `authenticator_state_update` is unset.
14592        pub fn authenticator_state_update(&self) -> &super::AuthenticatorStateUpdate {
14593            if let Some(
14594                super::transaction_kind::Data::AuthenticatorStateUpdate(field),
14595            ) = &self.data
14596            {
14597                field as _
14598            } else {
14599                super::AuthenticatorStateUpdate::default_instance() as _
14600            }
14601        }
14602        ///If `authenticator_state_update` is set, returns [`Some`] with the value; otherwise returns [`None`].
14603        pub fn authenticator_state_update_opt(
14604            &self,
14605        ) -> Option<&super::AuthenticatorStateUpdate> {
14606            if let Some(
14607                super::transaction_kind::Data::AuthenticatorStateUpdate(field),
14608            ) = &self.data
14609            {
14610                Some(field as _)
14611            } else {
14612                None
14613            }
14614        }
14615        ///If `authenticator_state_update` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14616        pub fn authenticator_state_update_opt_mut(
14617            &mut self,
14618        ) -> Option<&mut super::AuthenticatorStateUpdate> {
14619            if let Some(
14620                super::transaction_kind::Data::AuthenticatorStateUpdate(field),
14621            ) = &mut self.data
14622            {
14623                Some(field as _)
14624            } else {
14625                None
14626            }
14627        }
14628        ///Returns a mutable reference to `authenticator_state_update`.
14629        ///If the field is unset, it is first initialized with the default value.
14630        ///If any other oneof field in the same oneof is set, it will be cleared.
14631        pub fn authenticator_state_update_mut(
14632            &mut self,
14633        ) -> &mut super::AuthenticatorStateUpdate {
14634            if self.authenticator_state_update_opt_mut().is_none() {
14635                self.data = Some(
14636                    super::transaction_kind::Data::AuthenticatorStateUpdate(
14637                        super::AuthenticatorStateUpdate::default(),
14638                    ),
14639                );
14640            }
14641            self.authenticator_state_update_opt_mut().unwrap()
14642        }
14643        ///Sets `authenticator_state_update` with the provided value.
14644        ///If any other oneof field in the same oneof is set, it will be cleared.
14645        pub fn set_authenticator_state_update<T: Into<super::AuthenticatorStateUpdate>>(
14646            &mut self,
14647            field: T,
14648        ) {
14649            self.data = Some(
14650                super::transaction_kind::Data::AuthenticatorStateUpdate(
14651                    field.into().into(),
14652                ),
14653            );
14654        }
14655        ///Sets `authenticator_state_update` with the provided value.
14656        ///If any other oneof field in the same oneof is set, it will be cleared.
14657        pub fn with_authenticator_state_update<T: Into<super::AuthenticatorStateUpdate>>(
14658            mut self,
14659            field: T,
14660        ) -> Self {
14661            self.set_authenticator_state_update(field.into());
14662            self
14663        }
14664        ///Returns the value of `end_of_epoch`, or the default value if `end_of_epoch` is unset.
14665        pub fn end_of_epoch(&self) -> &super::EndOfEpochTransaction {
14666            if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &self.data {
14667                field as _
14668            } else {
14669                super::EndOfEpochTransaction::default_instance() as _
14670            }
14671        }
14672        ///If `end_of_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
14673        pub fn end_of_epoch_opt(&self) -> Option<&super::EndOfEpochTransaction> {
14674            if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &self.data {
14675                Some(field as _)
14676            } else {
14677                None
14678            }
14679        }
14680        ///If `end_of_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14681        pub fn end_of_epoch_opt_mut(
14682            &mut self,
14683        ) -> Option<&mut super::EndOfEpochTransaction> {
14684            if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &mut self
14685                .data
14686            {
14687                Some(field as _)
14688            } else {
14689                None
14690            }
14691        }
14692        ///Returns a mutable reference to `end_of_epoch`.
14693        ///If the field is unset, it is first initialized with the default value.
14694        ///If any other oneof field in the same oneof is set, it will be cleared.
14695        pub fn end_of_epoch_mut(&mut self) -> &mut super::EndOfEpochTransaction {
14696            if self.end_of_epoch_opt_mut().is_none() {
14697                self.data = Some(
14698                    super::transaction_kind::Data::EndOfEpoch(
14699                        super::EndOfEpochTransaction::default(),
14700                    ),
14701                );
14702            }
14703            self.end_of_epoch_opt_mut().unwrap()
14704        }
14705        ///Sets `end_of_epoch` with the provided value.
14706        ///If any other oneof field in the same oneof is set, it will be cleared.
14707        pub fn set_end_of_epoch<T: Into<super::EndOfEpochTransaction>>(
14708            &mut self,
14709            field: T,
14710        ) {
14711            self.data = Some(
14712                super::transaction_kind::Data::EndOfEpoch(field.into().into()),
14713            );
14714        }
14715        ///Sets `end_of_epoch` with the provided value.
14716        ///If any other oneof field in the same oneof is set, it will be cleared.
14717        pub fn with_end_of_epoch<T: Into<super::EndOfEpochTransaction>>(
14718            mut self,
14719            field: T,
14720        ) -> Self {
14721            self.set_end_of_epoch(field.into());
14722            self
14723        }
14724        ///Returns the value of `randomness_state_update`, or the default value if `randomness_state_update` is unset.
14725        pub fn randomness_state_update(&self) -> &super::RandomnessStateUpdate {
14726            if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &self
14727                .data
14728            {
14729                field as _
14730            } else {
14731                super::RandomnessStateUpdate::default_instance() as _
14732            }
14733        }
14734        ///If `randomness_state_update` is set, returns [`Some`] with the value; otherwise returns [`None`].
14735        pub fn randomness_state_update_opt(
14736            &self,
14737        ) -> Option<&super::RandomnessStateUpdate> {
14738            if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &self
14739                .data
14740            {
14741                Some(field as _)
14742            } else {
14743                None
14744            }
14745        }
14746        ///If `randomness_state_update` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14747        pub fn randomness_state_update_opt_mut(
14748            &mut self,
14749        ) -> Option<&mut super::RandomnessStateUpdate> {
14750            if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &mut self
14751                .data
14752            {
14753                Some(field as _)
14754            } else {
14755                None
14756            }
14757        }
14758        ///Returns a mutable reference to `randomness_state_update`.
14759        ///If the field is unset, it is first initialized with the default value.
14760        ///If any other oneof field in the same oneof is set, it will be cleared.
14761        pub fn randomness_state_update_mut(
14762            &mut self,
14763        ) -> &mut super::RandomnessStateUpdate {
14764            if self.randomness_state_update_opt_mut().is_none() {
14765                self.data = Some(
14766                    super::transaction_kind::Data::RandomnessStateUpdate(
14767                        super::RandomnessStateUpdate::default(),
14768                    ),
14769                );
14770            }
14771            self.randomness_state_update_opt_mut().unwrap()
14772        }
14773        ///Sets `randomness_state_update` with the provided value.
14774        ///If any other oneof field in the same oneof is set, it will be cleared.
14775        pub fn set_randomness_state_update<T: Into<super::RandomnessStateUpdate>>(
14776            &mut self,
14777            field: T,
14778        ) {
14779            self.data = Some(
14780                super::transaction_kind::Data::RandomnessStateUpdate(field.into().into()),
14781            );
14782        }
14783        ///Sets `randomness_state_update` with the provided value.
14784        ///If any other oneof field in the same oneof is set, it will be cleared.
14785        pub fn with_randomness_state_update<T: Into<super::RandomnessStateUpdate>>(
14786            mut self,
14787            field: T,
14788        ) -> Self {
14789            self.set_randomness_state_update(field.into());
14790            self
14791        }
14792    }
14793    impl super::TransferObjects {
14794        pub const fn const_default() -> Self {
14795            Self {
14796                objects: Vec::new(),
14797                address: None,
14798            }
14799        }
14800        #[doc(hidden)]
14801        pub fn default_instance() -> &'static Self {
14802            static DEFAULT: super::TransferObjects = super::TransferObjects::const_default();
14803            &DEFAULT
14804        }
14805        ///Returns the value of `objects`, or the default value if `objects` is unset.
14806        pub fn objects(&self) -> &[super::Argument] {
14807            &self.objects
14808        }
14809        ///Returns a mutable reference to `objects`.
14810        ///If the field is unset, it is first initialized with the default value.
14811        pub fn objects_mut(&mut self) -> &mut Vec<super::Argument> {
14812            &mut self.objects
14813        }
14814        ///Sets `objects` with the provided value.
14815        pub fn set_objects(&mut self, field: Vec<super::Argument>) {
14816            self.objects = field;
14817        }
14818        ///Sets `objects` with the provided value.
14819        pub fn with_objects(mut self, field: Vec<super::Argument>) -> Self {
14820            self.set_objects(field);
14821            self
14822        }
14823        ///Returns the value of `address`, or the default value if `address` is unset.
14824        pub fn address(&self) -> &super::Argument {
14825            self.address
14826                .as_ref()
14827                .map(|field| field as _)
14828                .unwrap_or_else(|| super::Argument::default_instance() as _)
14829        }
14830        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14831        pub fn address_opt_mut(&mut self) -> Option<&mut super::Argument> {
14832            self.address.as_mut().map(|field| field as _)
14833        }
14834        ///Returns a mutable reference to `address`.
14835        ///If the field is unset, it is first initialized with the default value.
14836        pub fn address_mut(&mut self) -> &mut super::Argument {
14837            self.address.get_or_insert_default()
14838        }
14839        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
14840        pub fn address_opt(&self) -> Option<&super::Argument> {
14841            self.address.as_ref().map(|field| field as _)
14842        }
14843        ///Sets `address` with the provided value.
14844        pub fn set_address<T: Into<super::Argument>>(&mut self, field: T) {
14845            self.address = Some(field.into().into());
14846        }
14847        ///Sets `address` with the provided value.
14848        pub fn with_address<T: Into<super::Argument>>(mut self, field: T) -> Self {
14849            self.set_address(field.into());
14850            self
14851        }
14852    }
14853    impl super::TypeArgumentError {
14854        pub const fn const_default() -> Self {
14855            Self {
14856                type_argument: None,
14857                kind: None,
14858            }
14859        }
14860        #[doc(hidden)]
14861        pub fn default_instance() -> &'static Self {
14862            static DEFAULT: super::TypeArgumentError = super::TypeArgumentError::const_default();
14863            &DEFAULT
14864        }
14865        ///If `type_argument` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14866        pub fn type_argument_opt_mut(&mut self) -> Option<&mut u32> {
14867            self.type_argument.as_mut().map(|field| field as _)
14868        }
14869        ///Returns a mutable reference to `type_argument`.
14870        ///If the field is unset, it is first initialized with the default value.
14871        pub fn type_argument_mut(&mut self) -> &mut u32 {
14872            self.type_argument.get_or_insert_default()
14873        }
14874        ///If `type_argument` is set, returns [`Some`] with the value; otherwise returns [`None`].
14875        pub fn type_argument_opt(&self) -> Option<u32> {
14876            self.type_argument.as_ref().map(|field| *field)
14877        }
14878        ///Sets `type_argument` with the provided value.
14879        pub fn set_type_argument<T: Into<u32>>(&mut self, field: T) {
14880            self.type_argument = Some(field.into().into());
14881        }
14882        ///Sets `type_argument` with the provided value.
14883        pub fn with_type_argument<T: Into<u32>>(mut self, field: T) -> Self {
14884            self.set_type_argument(field.into());
14885            self
14886        }
14887        ///Sets `kind` with the provided value.
14888        pub fn with_kind<T: Into<super::type_argument_error::TypeArgumentErrorKind>>(
14889            mut self,
14890            field: T,
14891        ) -> Self {
14892            self.set_kind(field.into());
14893            self
14894        }
14895    }
14896    impl super::TypeOrigin {
14897        pub const fn const_default() -> Self {
14898            Self {
14899                module_name: None,
14900                datatype_name: None,
14901                package_id: None,
14902            }
14903        }
14904        #[doc(hidden)]
14905        pub fn default_instance() -> &'static Self {
14906            static DEFAULT: super::TypeOrigin = super::TypeOrigin::const_default();
14907            &DEFAULT
14908        }
14909        ///If `module_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14910        pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
14911            self.module_name.as_mut().map(|field| field as _)
14912        }
14913        ///Returns a mutable reference to `module_name`.
14914        ///If the field is unset, it is first initialized with the default value.
14915        pub fn module_name_mut(&mut self) -> &mut String {
14916            self.module_name.get_or_insert_default()
14917        }
14918        ///If `module_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
14919        pub fn module_name_opt(&self) -> Option<&str> {
14920            self.module_name.as_ref().map(|field| field as _)
14921        }
14922        ///Sets `module_name` with the provided value.
14923        pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
14924            self.module_name = Some(field.into().into());
14925        }
14926        ///Sets `module_name` with the provided value.
14927        pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
14928            self.set_module_name(field.into());
14929            self
14930        }
14931        ///If `datatype_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14932        pub fn datatype_name_opt_mut(&mut self) -> Option<&mut String> {
14933            self.datatype_name.as_mut().map(|field| field as _)
14934        }
14935        ///Returns a mutable reference to `datatype_name`.
14936        ///If the field is unset, it is first initialized with the default value.
14937        pub fn datatype_name_mut(&mut self) -> &mut String {
14938            self.datatype_name.get_or_insert_default()
14939        }
14940        ///If `datatype_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
14941        pub fn datatype_name_opt(&self) -> Option<&str> {
14942            self.datatype_name.as_ref().map(|field| field as _)
14943        }
14944        ///Sets `datatype_name` with the provided value.
14945        pub fn set_datatype_name<T: Into<String>>(&mut self, field: T) {
14946            self.datatype_name = Some(field.into().into());
14947        }
14948        ///Sets `datatype_name` with the provided value.
14949        pub fn with_datatype_name<T: Into<String>>(mut self, field: T) -> Self {
14950            self.set_datatype_name(field.into());
14951            self
14952        }
14953        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14954        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
14955            self.package_id.as_mut().map(|field| field as _)
14956        }
14957        ///Returns a mutable reference to `package_id`.
14958        ///If the field is unset, it is first initialized with the default value.
14959        pub fn package_id_mut(&mut self) -> &mut String {
14960            self.package_id.get_or_insert_default()
14961        }
14962        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
14963        pub fn package_id_opt(&self) -> Option<&str> {
14964            self.package_id.as_ref().map(|field| field as _)
14965        }
14966        ///Sets `package_id` with the provided value.
14967        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
14968            self.package_id = Some(field.into().into());
14969        }
14970        ///Sets `package_id` with the provided value.
14971        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
14972            self.set_package_id(field.into());
14973            self
14974        }
14975    }
14976    impl super::TypeParameter {
14977        pub const fn const_default() -> Self {
14978            Self {
14979                constraints: Vec::new(),
14980                is_phantom: None,
14981            }
14982        }
14983        #[doc(hidden)]
14984        pub fn default_instance() -> &'static Self {
14985            static DEFAULT: super::TypeParameter = super::TypeParameter::const_default();
14986            &DEFAULT
14987        }
14988        ///If `is_phantom` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14989        pub fn is_phantom_opt_mut(&mut self) -> Option<&mut bool> {
14990            self.is_phantom.as_mut().map(|field| field as _)
14991        }
14992        ///Returns a mutable reference to `is_phantom`.
14993        ///If the field is unset, it is first initialized with the default value.
14994        pub fn is_phantom_mut(&mut self) -> &mut bool {
14995            self.is_phantom.get_or_insert_default()
14996        }
14997        ///If `is_phantom` is set, returns [`Some`] with the value; otherwise returns [`None`].
14998        pub fn is_phantom_opt(&self) -> Option<bool> {
14999            self.is_phantom.as_ref().map(|field| *field)
15000        }
15001        ///Sets `is_phantom` with the provided value.
15002        pub fn set_is_phantom<T: Into<bool>>(&mut self, field: T) {
15003            self.is_phantom = Some(field.into().into());
15004        }
15005        ///Sets `is_phantom` with the provided value.
15006        pub fn with_is_phantom<T: Into<bool>>(mut self, field: T) -> Self {
15007            self.set_is_phantom(field.into());
15008            self
15009        }
15010    }
15011    impl super::UnchangedConsensusObject {
15012        pub const fn const_default() -> Self {
15013            Self {
15014                kind: None,
15015                object_id: None,
15016                version: None,
15017                digest: None,
15018                object_type: None,
15019            }
15020        }
15021        #[doc(hidden)]
15022        pub fn default_instance() -> &'static Self {
15023            static DEFAULT: super::UnchangedConsensusObject = super::UnchangedConsensusObject::const_default();
15024            &DEFAULT
15025        }
15026        ///Sets `kind` with the provided value.
15027        pub fn with_kind<
15028            T: Into<super::unchanged_consensus_object::UnchangedConsensusObjectKind>,
15029        >(mut self, field: T) -> Self {
15030            self.set_kind(field.into());
15031            self
15032        }
15033        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15034        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
15035            self.object_id.as_mut().map(|field| field as _)
15036        }
15037        ///Returns a mutable reference to `object_id`.
15038        ///If the field is unset, it is first initialized with the default value.
15039        pub fn object_id_mut(&mut self) -> &mut String {
15040            self.object_id.get_or_insert_default()
15041        }
15042        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
15043        pub fn object_id_opt(&self) -> Option<&str> {
15044            self.object_id.as_ref().map(|field| field as _)
15045        }
15046        ///Sets `object_id` with the provided value.
15047        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
15048            self.object_id = Some(field.into().into());
15049        }
15050        ///Sets `object_id` with the provided value.
15051        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
15052            self.set_object_id(field.into());
15053            self
15054        }
15055        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15056        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
15057            self.version.as_mut().map(|field| field as _)
15058        }
15059        ///Returns a mutable reference to `version`.
15060        ///If the field is unset, it is first initialized with the default value.
15061        pub fn version_mut(&mut self) -> &mut u64 {
15062            self.version.get_or_insert_default()
15063        }
15064        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
15065        pub fn version_opt(&self) -> Option<u64> {
15066            self.version.as_ref().map(|field| *field)
15067        }
15068        ///Sets `version` with the provided value.
15069        pub fn set_version<T: Into<u64>>(&mut self, field: T) {
15070            self.version = Some(field.into().into());
15071        }
15072        ///Sets `version` with the provided value.
15073        pub fn with_version<T: Into<u64>>(mut self, field: T) -> Self {
15074            self.set_version(field.into());
15075            self
15076        }
15077        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15078        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
15079            self.digest.as_mut().map(|field| field as _)
15080        }
15081        ///Returns a mutable reference to `digest`.
15082        ///If the field is unset, it is first initialized with the default value.
15083        pub fn digest_mut(&mut self) -> &mut String {
15084            self.digest.get_or_insert_default()
15085        }
15086        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
15087        pub fn digest_opt(&self) -> Option<&str> {
15088            self.digest.as_ref().map(|field| field as _)
15089        }
15090        ///Sets `digest` with the provided value.
15091        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
15092            self.digest = Some(field.into().into());
15093        }
15094        ///Sets `digest` with the provided value.
15095        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
15096            self.set_digest(field.into());
15097            self
15098        }
15099        ///If `object_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15100        pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
15101            self.object_type.as_mut().map(|field| field as _)
15102        }
15103        ///Returns a mutable reference to `object_type`.
15104        ///If the field is unset, it is first initialized with the default value.
15105        pub fn object_type_mut(&mut self) -> &mut String {
15106            self.object_type.get_or_insert_default()
15107        }
15108        ///If `object_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
15109        pub fn object_type_opt(&self) -> Option<&str> {
15110            self.object_type.as_ref().map(|field| field as _)
15111        }
15112        ///Sets `object_type` with the provided value.
15113        pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
15114            self.object_type = Some(field.into().into());
15115        }
15116        ///Sets `object_type` with the provided value.
15117        pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
15118            self.set_object_type(field.into());
15119            self
15120        }
15121    }
15122    impl super::Upgrade {
15123        pub const fn const_default() -> Self {
15124            Self {
15125                modules: Vec::new(),
15126                dependencies: Vec::new(),
15127                package: None,
15128                ticket: None,
15129            }
15130        }
15131        #[doc(hidden)]
15132        pub fn default_instance() -> &'static Self {
15133            static DEFAULT: super::Upgrade = super::Upgrade::const_default();
15134            &DEFAULT
15135        }
15136        ///Returns the value of `modules`, or the default value if `modules` is unset.
15137        pub fn modules(&self) -> &[::prost::bytes::Bytes] {
15138            &self.modules
15139        }
15140        ///Returns a mutable reference to `modules`.
15141        ///If the field is unset, it is first initialized with the default value.
15142        pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
15143            &mut self.modules
15144        }
15145        ///Sets `modules` with the provided value.
15146        pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
15147            self.modules = field;
15148        }
15149        ///Sets `modules` with the provided value.
15150        pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
15151            self.set_modules(field);
15152            self
15153        }
15154        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
15155        pub fn dependencies(&self) -> &[String] {
15156            &self.dependencies
15157        }
15158        ///Returns a mutable reference to `dependencies`.
15159        ///If the field is unset, it is first initialized with the default value.
15160        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
15161            &mut self.dependencies
15162        }
15163        ///Sets `dependencies` with the provided value.
15164        pub fn set_dependencies(&mut self, field: Vec<String>) {
15165            self.dependencies = field;
15166        }
15167        ///Sets `dependencies` with the provided value.
15168        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
15169            self.set_dependencies(field);
15170            self
15171        }
15172        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15173        pub fn package_opt_mut(&mut self) -> Option<&mut String> {
15174            self.package.as_mut().map(|field| field as _)
15175        }
15176        ///Returns a mutable reference to `package`.
15177        ///If the field is unset, it is first initialized with the default value.
15178        pub fn package_mut(&mut self) -> &mut String {
15179            self.package.get_or_insert_default()
15180        }
15181        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
15182        pub fn package_opt(&self) -> Option<&str> {
15183            self.package.as_ref().map(|field| field as _)
15184        }
15185        ///Sets `package` with the provided value.
15186        pub fn set_package<T: Into<String>>(&mut self, field: T) {
15187            self.package = Some(field.into().into());
15188        }
15189        ///Sets `package` with the provided value.
15190        pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
15191            self.set_package(field.into());
15192            self
15193        }
15194        ///Returns the value of `ticket`, or the default value if `ticket` is unset.
15195        pub fn ticket(&self) -> &super::Argument {
15196            self.ticket
15197                .as_ref()
15198                .map(|field| field as _)
15199                .unwrap_or_else(|| super::Argument::default_instance() as _)
15200        }
15201        ///If `ticket` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15202        pub fn ticket_opt_mut(&mut self) -> Option<&mut super::Argument> {
15203            self.ticket.as_mut().map(|field| field as _)
15204        }
15205        ///Returns a mutable reference to `ticket`.
15206        ///If the field is unset, it is first initialized with the default value.
15207        pub fn ticket_mut(&mut self) -> &mut super::Argument {
15208            self.ticket.get_or_insert_default()
15209        }
15210        ///If `ticket` is set, returns [`Some`] with the value; otherwise returns [`None`].
15211        pub fn ticket_opt(&self) -> Option<&super::Argument> {
15212            self.ticket.as_ref().map(|field| field as _)
15213        }
15214        ///Sets `ticket` with the provided value.
15215        pub fn set_ticket<T: Into<super::Argument>>(&mut self, field: T) {
15216            self.ticket = Some(field.into().into());
15217        }
15218        ///Sets `ticket` with the provided value.
15219        pub fn with_ticket<T: Into<super::Argument>>(mut self, field: T) -> Self {
15220            self.set_ticket(field.into());
15221            self
15222        }
15223    }
15224    impl super::UserSignature {
15225        pub const fn const_default() -> Self {
15226            Self {
15227                bcs: None,
15228                scheme: None,
15229                signature: None,
15230            }
15231        }
15232        #[doc(hidden)]
15233        pub fn default_instance() -> &'static Self {
15234            static DEFAULT: super::UserSignature = super::UserSignature::const_default();
15235            &DEFAULT
15236        }
15237        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
15238        pub fn bcs(&self) -> &super::Bcs {
15239            self.bcs
15240                .as_ref()
15241                .map(|field| field as _)
15242                .unwrap_or_else(|| super::Bcs::default_instance() as _)
15243        }
15244        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15245        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
15246            self.bcs.as_mut().map(|field| field as _)
15247        }
15248        ///Returns a mutable reference to `bcs`.
15249        ///If the field is unset, it is first initialized with the default value.
15250        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
15251            self.bcs.get_or_insert_default()
15252        }
15253        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
15254        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
15255            self.bcs.as_ref().map(|field| field as _)
15256        }
15257        ///Sets `bcs` with the provided value.
15258        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
15259            self.bcs = Some(field.into().into());
15260        }
15261        ///Sets `bcs` with the provided value.
15262        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
15263            self.set_bcs(field.into());
15264            self
15265        }
15266        ///Sets `scheme` with the provided value.
15267        pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
15268            self.set_scheme(field.into());
15269            self
15270        }
15271        ///Returns the value of `simple`, or the default value if `simple` is unset.
15272        pub fn simple(&self) -> &super::SimpleSignature {
15273            if let Some(super::user_signature::Signature::Simple(field)) = &self
15274                .signature
15275            {
15276                field as _
15277            } else {
15278                super::SimpleSignature::default_instance() as _
15279            }
15280        }
15281        ///If `simple` is set, returns [`Some`] with the value; otherwise returns [`None`].
15282        pub fn simple_opt(&self) -> Option<&super::SimpleSignature> {
15283            if let Some(super::user_signature::Signature::Simple(field)) = &self
15284                .signature
15285            {
15286                Some(field as _)
15287            } else {
15288                None
15289            }
15290        }
15291        ///If `simple` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15292        pub fn simple_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
15293            if let Some(super::user_signature::Signature::Simple(field)) = &mut self
15294                .signature
15295            {
15296                Some(field as _)
15297            } else {
15298                None
15299            }
15300        }
15301        ///Returns a mutable reference to `simple`.
15302        ///If the field is unset, it is first initialized with the default value.
15303        ///If any other oneof field in the same oneof is set, it will be cleared.
15304        pub fn simple_mut(&mut self) -> &mut super::SimpleSignature {
15305            if self.simple_opt_mut().is_none() {
15306                self.signature = Some(
15307                    super::user_signature::Signature::Simple(
15308                        super::SimpleSignature::default(),
15309                    ),
15310                );
15311            }
15312            self.simple_opt_mut().unwrap()
15313        }
15314        ///Sets `simple` with the provided value.
15315        ///If any other oneof field in the same oneof is set, it will be cleared.
15316        pub fn set_simple<T: Into<super::SimpleSignature>>(&mut self, field: T) {
15317            self.signature = Some(
15318                super::user_signature::Signature::Simple(field.into().into()),
15319            );
15320        }
15321        ///Sets `simple` with the provided value.
15322        ///If any other oneof field in the same oneof is set, it will be cleared.
15323        pub fn with_simple<T: Into<super::SimpleSignature>>(mut self, field: T) -> Self {
15324            self.set_simple(field.into());
15325            self
15326        }
15327        ///Returns the value of `multisig`, or the default value if `multisig` is unset.
15328        pub fn multisig(&self) -> &super::MultisigAggregatedSignature {
15329            if let Some(super::user_signature::Signature::Multisig(field)) = &self
15330                .signature
15331            {
15332                field as _
15333            } else {
15334                super::MultisigAggregatedSignature::default_instance() as _
15335            }
15336        }
15337        ///If `multisig` is set, returns [`Some`] with the value; otherwise returns [`None`].
15338        pub fn multisig_opt(&self) -> Option<&super::MultisigAggregatedSignature> {
15339            if let Some(super::user_signature::Signature::Multisig(field)) = &self
15340                .signature
15341            {
15342                Some(field as _)
15343            } else {
15344                None
15345            }
15346        }
15347        ///If `multisig` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15348        pub fn multisig_opt_mut(
15349            &mut self,
15350        ) -> Option<&mut super::MultisigAggregatedSignature> {
15351            if let Some(super::user_signature::Signature::Multisig(field)) = &mut self
15352                .signature
15353            {
15354                Some(field as _)
15355            } else {
15356                None
15357            }
15358        }
15359        ///Returns a mutable reference to `multisig`.
15360        ///If the field is unset, it is first initialized with the default value.
15361        ///If any other oneof field in the same oneof is set, it will be cleared.
15362        pub fn multisig_mut(&mut self) -> &mut super::MultisigAggregatedSignature {
15363            if self.multisig_opt_mut().is_none() {
15364                self.signature = Some(
15365                    super::user_signature::Signature::Multisig(
15366                        super::MultisigAggregatedSignature::default(),
15367                    ),
15368                );
15369            }
15370            self.multisig_opt_mut().unwrap()
15371        }
15372        ///Sets `multisig` with the provided value.
15373        ///If any other oneof field in the same oneof is set, it will be cleared.
15374        pub fn set_multisig<T: Into<super::MultisigAggregatedSignature>>(
15375            &mut self,
15376            field: T,
15377        ) {
15378            self.signature = Some(
15379                super::user_signature::Signature::Multisig(field.into().into()),
15380            );
15381        }
15382        ///Sets `multisig` with the provided value.
15383        ///If any other oneof field in the same oneof is set, it will be cleared.
15384        pub fn with_multisig<T: Into<super::MultisigAggregatedSignature>>(
15385            mut self,
15386            field: T,
15387        ) -> Self {
15388            self.set_multisig(field.into());
15389            self
15390        }
15391        ///Returns the value of `zklogin`, or the default value if `zklogin` is unset.
15392        pub fn zklogin(&self) -> &super::ZkLoginAuthenticator {
15393            if let Some(super::user_signature::Signature::Zklogin(field)) = &self
15394                .signature
15395            {
15396                field as _
15397            } else {
15398                super::ZkLoginAuthenticator::default_instance() as _
15399            }
15400        }
15401        ///If `zklogin` is set, returns [`Some`] with the value; otherwise returns [`None`].
15402        pub fn zklogin_opt(&self) -> Option<&super::ZkLoginAuthenticator> {
15403            if let Some(super::user_signature::Signature::Zklogin(field)) = &self
15404                .signature
15405            {
15406                Some(field as _)
15407            } else {
15408                None
15409            }
15410        }
15411        ///If `zklogin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15412        pub fn zklogin_opt_mut(&mut self) -> Option<&mut super::ZkLoginAuthenticator> {
15413            if let Some(super::user_signature::Signature::Zklogin(field)) = &mut self
15414                .signature
15415            {
15416                Some(field as _)
15417            } else {
15418                None
15419            }
15420        }
15421        ///Returns a mutable reference to `zklogin`.
15422        ///If the field is unset, it is first initialized with the default value.
15423        ///If any other oneof field in the same oneof is set, it will be cleared.
15424        pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginAuthenticator {
15425            if self.zklogin_opt_mut().is_none() {
15426                self.signature = Some(
15427                    super::user_signature::Signature::Zklogin(
15428                        super::ZkLoginAuthenticator::default(),
15429                    ),
15430                );
15431            }
15432            self.zklogin_opt_mut().unwrap()
15433        }
15434        ///Sets `zklogin` with the provided value.
15435        ///If any other oneof field in the same oneof is set, it will be cleared.
15436        pub fn set_zklogin<T: Into<super::ZkLoginAuthenticator>>(&mut self, field: T) {
15437            self.signature = Some(
15438                super::user_signature::Signature::Zklogin(field.into().into()),
15439            );
15440        }
15441        ///Sets `zklogin` with the provided value.
15442        ///If any other oneof field in the same oneof is set, it will be cleared.
15443        pub fn with_zklogin<T: Into<super::ZkLoginAuthenticator>>(
15444            mut self,
15445            field: T,
15446        ) -> Self {
15447            self.set_zklogin(field.into());
15448            self
15449        }
15450        ///Returns the value of `passkey`, or the default value if `passkey` is unset.
15451        pub fn passkey(&self) -> &super::PasskeyAuthenticator {
15452            if let Some(super::user_signature::Signature::Passkey(field)) = &self
15453                .signature
15454            {
15455                field as _
15456            } else {
15457                super::PasskeyAuthenticator::default_instance() as _
15458            }
15459        }
15460        ///If `passkey` is set, returns [`Some`] with the value; otherwise returns [`None`].
15461        pub fn passkey_opt(&self) -> Option<&super::PasskeyAuthenticator> {
15462            if let Some(super::user_signature::Signature::Passkey(field)) = &self
15463                .signature
15464            {
15465                Some(field as _)
15466            } else {
15467                None
15468            }
15469        }
15470        ///If `passkey` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15471        pub fn passkey_opt_mut(&mut self) -> Option<&mut super::PasskeyAuthenticator> {
15472            if let Some(super::user_signature::Signature::Passkey(field)) = &mut self
15473                .signature
15474            {
15475                Some(field as _)
15476            } else {
15477                None
15478            }
15479        }
15480        ///Returns a mutable reference to `passkey`.
15481        ///If the field is unset, it is first initialized with the default value.
15482        ///If any other oneof field in the same oneof is set, it will be cleared.
15483        pub fn passkey_mut(&mut self) -> &mut super::PasskeyAuthenticator {
15484            if self.passkey_opt_mut().is_none() {
15485                self.signature = Some(
15486                    super::user_signature::Signature::Passkey(
15487                        super::PasskeyAuthenticator::default(),
15488                    ),
15489                );
15490            }
15491            self.passkey_opt_mut().unwrap()
15492        }
15493        ///Sets `passkey` with the provided value.
15494        ///If any other oneof field in the same oneof is set, it will be cleared.
15495        pub fn set_passkey<T: Into<super::PasskeyAuthenticator>>(&mut self, field: T) {
15496            self.signature = Some(
15497                super::user_signature::Signature::Passkey(field.into().into()),
15498            );
15499        }
15500        ///Sets `passkey` with the provided value.
15501        ///If any other oneof field in the same oneof is set, it will be cleared.
15502        pub fn with_passkey<T: Into<super::PasskeyAuthenticator>>(
15503            mut self,
15504            field: T,
15505        ) -> Self {
15506            self.set_passkey(field.into());
15507            self
15508        }
15509    }
15510    impl super::Validator {
15511        pub const fn const_default() -> Self {
15512            Self {
15513                name: None,
15514                address: None,
15515                description: None,
15516                image_url: None,
15517                project_url: None,
15518                protocol_public_key: None,
15519                proof_of_possession: None,
15520                network_public_key: None,
15521                worker_public_key: None,
15522                network_address: None,
15523                p2p_address: None,
15524                primary_address: None,
15525                worker_address: None,
15526                next_epoch_protocol_public_key: None,
15527                next_epoch_proof_of_possession: None,
15528                next_epoch_network_public_key: None,
15529                next_epoch_worker_public_key: None,
15530                next_epoch_network_address: None,
15531                next_epoch_p2p_address: None,
15532                next_epoch_primary_address: None,
15533                next_epoch_worker_address: None,
15534                metadata_extra_fields: None,
15535                voting_power: None,
15536                operation_cap_id: None,
15537                gas_price: None,
15538                staking_pool: None,
15539                commission_rate: None,
15540                next_epoch_stake: None,
15541                next_epoch_gas_price: None,
15542                next_epoch_commission_rate: None,
15543                extra_fields: None,
15544            }
15545        }
15546        #[doc(hidden)]
15547        pub fn default_instance() -> &'static Self {
15548            static DEFAULT: super::Validator = super::Validator::const_default();
15549            &DEFAULT
15550        }
15551        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15552        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
15553            self.name.as_mut().map(|field| field as _)
15554        }
15555        ///Returns a mutable reference to `name`.
15556        ///If the field is unset, it is first initialized with the default value.
15557        pub fn name_mut(&mut self) -> &mut String {
15558            self.name.get_or_insert_default()
15559        }
15560        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
15561        pub fn name_opt(&self) -> Option<&str> {
15562            self.name.as_ref().map(|field| field as _)
15563        }
15564        ///Sets `name` with the provided value.
15565        pub fn set_name<T: Into<String>>(&mut self, field: T) {
15566            self.name = Some(field.into().into());
15567        }
15568        ///Sets `name` with the provided value.
15569        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
15570            self.set_name(field.into());
15571            self
15572        }
15573        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15574        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
15575            self.address.as_mut().map(|field| field as _)
15576        }
15577        ///Returns a mutable reference to `address`.
15578        ///If the field is unset, it is first initialized with the default value.
15579        pub fn address_mut(&mut self) -> &mut String {
15580            self.address.get_or_insert_default()
15581        }
15582        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
15583        pub fn address_opt(&self) -> Option<&str> {
15584            self.address.as_ref().map(|field| field as _)
15585        }
15586        ///Sets `address` with the provided value.
15587        pub fn set_address<T: Into<String>>(&mut self, field: T) {
15588            self.address = Some(field.into().into());
15589        }
15590        ///Sets `address` with the provided value.
15591        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
15592            self.set_address(field.into());
15593            self
15594        }
15595        ///If `description` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15596        pub fn description_opt_mut(&mut self) -> Option<&mut String> {
15597            self.description.as_mut().map(|field| field as _)
15598        }
15599        ///Returns a mutable reference to `description`.
15600        ///If the field is unset, it is first initialized with the default value.
15601        pub fn description_mut(&mut self) -> &mut String {
15602            self.description.get_or_insert_default()
15603        }
15604        ///If `description` is set, returns [`Some`] with the value; otherwise returns [`None`].
15605        pub fn description_opt(&self) -> Option<&str> {
15606            self.description.as_ref().map(|field| field as _)
15607        }
15608        ///Sets `description` with the provided value.
15609        pub fn set_description<T: Into<String>>(&mut self, field: T) {
15610            self.description = Some(field.into().into());
15611        }
15612        ///Sets `description` with the provided value.
15613        pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
15614            self.set_description(field.into());
15615            self
15616        }
15617        ///If `image_url` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15618        pub fn image_url_opt_mut(&mut self) -> Option<&mut String> {
15619            self.image_url.as_mut().map(|field| field as _)
15620        }
15621        ///Returns a mutable reference to `image_url`.
15622        ///If the field is unset, it is first initialized with the default value.
15623        pub fn image_url_mut(&mut self) -> &mut String {
15624            self.image_url.get_or_insert_default()
15625        }
15626        ///If `image_url` is set, returns [`Some`] with the value; otherwise returns [`None`].
15627        pub fn image_url_opt(&self) -> Option<&str> {
15628            self.image_url.as_ref().map(|field| field as _)
15629        }
15630        ///Sets `image_url` with the provided value.
15631        pub fn set_image_url<T: Into<String>>(&mut self, field: T) {
15632            self.image_url = Some(field.into().into());
15633        }
15634        ///Sets `image_url` with the provided value.
15635        pub fn with_image_url<T: Into<String>>(mut self, field: T) -> Self {
15636            self.set_image_url(field.into());
15637            self
15638        }
15639        ///If `project_url` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15640        pub fn project_url_opt_mut(&mut self) -> Option<&mut String> {
15641            self.project_url.as_mut().map(|field| field as _)
15642        }
15643        ///Returns a mutable reference to `project_url`.
15644        ///If the field is unset, it is first initialized with the default value.
15645        pub fn project_url_mut(&mut self) -> &mut String {
15646            self.project_url.get_or_insert_default()
15647        }
15648        ///If `project_url` is set, returns [`Some`] with the value; otherwise returns [`None`].
15649        pub fn project_url_opt(&self) -> Option<&str> {
15650            self.project_url.as_ref().map(|field| field as _)
15651        }
15652        ///Sets `project_url` with the provided value.
15653        pub fn set_project_url<T: Into<String>>(&mut self, field: T) {
15654            self.project_url = Some(field.into().into());
15655        }
15656        ///Sets `project_url` with the provided value.
15657        pub fn with_project_url<T: Into<String>>(mut self, field: T) -> Self {
15658            self.set_project_url(field.into());
15659            self
15660        }
15661        ///If `protocol_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
15662        pub fn protocol_public_key_opt(&self) -> Option<&[u8]> {
15663            self.protocol_public_key.as_ref().map(|field| field as _)
15664        }
15665        ///Sets `protocol_public_key` with the provided value.
15666        pub fn set_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
15667            &mut self,
15668            field: T,
15669        ) {
15670            self.protocol_public_key = Some(field.into().into());
15671        }
15672        ///Sets `protocol_public_key` with the provided value.
15673        pub fn with_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
15674            mut self,
15675            field: T,
15676        ) -> Self {
15677            self.set_protocol_public_key(field.into());
15678            self
15679        }
15680        ///If `proof_of_possession` is set, returns [`Some`] with the value; otherwise returns [`None`].
15681        pub fn proof_of_possession_opt(&self) -> Option<&[u8]> {
15682            self.proof_of_possession.as_ref().map(|field| field as _)
15683        }
15684        ///Sets `proof_of_possession` with the provided value.
15685        pub fn set_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
15686            &mut self,
15687            field: T,
15688        ) {
15689            self.proof_of_possession = Some(field.into().into());
15690        }
15691        ///Sets `proof_of_possession` with the provided value.
15692        pub fn with_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
15693            mut self,
15694            field: T,
15695        ) -> Self {
15696            self.set_proof_of_possession(field.into());
15697            self
15698        }
15699        ///If `network_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
15700        pub fn network_public_key_opt(&self) -> Option<&[u8]> {
15701            self.network_public_key.as_ref().map(|field| field as _)
15702        }
15703        ///Sets `network_public_key` with the provided value.
15704        pub fn set_network_public_key<T: Into<::prost::bytes::Bytes>>(
15705            &mut self,
15706            field: T,
15707        ) {
15708            self.network_public_key = Some(field.into().into());
15709        }
15710        ///Sets `network_public_key` with the provided value.
15711        pub fn with_network_public_key<T: Into<::prost::bytes::Bytes>>(
15712            mut self,
15713            field: T,
15714        ) -> Self {
15715            self.set_network_public_key(field.into());
15716            self
15717        }
15718        ///If `worker_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
15719        pub fn worker_public_key_opt(&self) -> Option<&[u8]> {
15720            self.worker_public_key.as_ref().map(|field| field as _)
15721        }
15722        ///Sets `worker_public_key` with the provided value.
15723        pub fn set_worker_public_key<T: Into<::prost::bytes::Bytes>>(
15724            &mut self,
15725            field: T,
15726        ) {
15727            self.worker_public_key = Some(field.into().into());
15728        }
15729        ///Sets `worker_public_key` with the provided value.
15730        pub fn with_worker_public_key<T: Into<::prost::bytes::Bytes>>(
15731            mut self,
15732            field: T,
15733        ) -> Self {
15734            self.set_worker_public_key(field.into());
15735            self
15736        }
15737        ///If `network_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15738        pub fn network_address_opt_mut(&mut self) -> Option<&mut String> {
15739            self.network_address.as_mut().map(|field| field as _)
15740        }
15741        ///Returns a mutable reference to `network_address`.
15742        ///If the field is unset, it is first initialized with the default value.
15743        pub fn network_address_mut(&mut self) -> &mut String {
15744            self.network_address.get_or_insert_default()
15745        }
15746        ///If `network_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
15747        pub fn network_address_opt(&self) -> Option<&str> {
15748            self.network_address.as_ref().map(|field| field as _)
15749        }
15750        ///Sets `network_address` with the provided value.
15751        pub fn set_network_address<T: Into<String>>(&mut self, field: T) {
15752            self.network_address = Some(field.into().into());
15753        }
15754        ///Sets `network_address` with the provided value.
15755        pub fn with_network_address<T: Into<String>>(mut self, field: T) -> Self {
15756            self.set_network_address(field.into());
15757            self
15758        }
15759        ///If `p2p_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15760        pub fn p2p_address_opt_mut(&mut self) -> Option<&mut String> {
15761            self.p2p_address.as_mut().map(|field| field as _)
15762        }
15763        ///Returns a mutable reference to `p2p_address`.
15764        ///If the field is unset, it is first initialized with the default value.
15765        pub fn p2p_address_mut(&mut self) -> &mut String {
15766            self.p2p_address.get_or_insert_default()
15767        }
15768        ///If `p2p_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
15769        pub fn p2p_address_opt(&self) -> Option<&str> {
15770            self.p2p_address.as_ref().map(|field| field as _)
15771        }
15772        ///Sets `p2p_address` with the provided value.
15773        pub fn set_p2p_address<T: Into<String>>(&mut self, field: T) {
15774            self.p2p_address = Some(field.into().into());
15775        }
15776        ///Sets `p2p_address` with the provided value.
15777        pub fn with_p2p_address<T: Into<String>>(mut self, field: T) -> Self {
15778            self.set_p2p_address(field.into());
15779            self
15780        }
15781        ///If `primary_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15782        pub fn primary_address_opt_mut(&mut self) -> Option<&mut String> {
15783            self.primary_address.as_mut().map(|field| field as _)
15784        }
15785        ///Returns a mutable reference to `primary_address`.
15786        ///If the field is unset, it is first initialized with the default value.
15787        pub fn primary_address_mut(&mut self) -> &mut String {
15788            self.primary_address.get_or_insert_default()
15789        }
15790        ///If `primary_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
15791        pub fn primary_address_opt(&self) -> Option<&str> {
15792            self.primary_address.as_ref().map(|field| field as _)
15793        }
15794        ///Sets `primary_address` with the provided value.
15795        pub fn set_primary_address<T: Into<String>>(&mut self, field: T) {
15796            self.primary_address = Some(field.into().into());
15797        }
15798        ///Sets `primary_address` with the provided value.
15799        pub fn with_primary_address<T: Into<String>>(mut self, field: T) -> Self {
15800            self.set_primary_address(field.into());
15801            self
15802        }
15803        ///If `worker_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15804        pub fn worker_address_opt_mut(&mut self) -> Option<&mut String> {
15805            self.worker_address.as_mut().map(|field| field as _)
15806        }
15807        ///Returns a mutable reference to `worker_address`.
15808        ///If the field is unset, it is first initialized with the default value.
15809        pub fn worker_address_mut(&mut self) -> &mut String {
15810            self.worker_address.get_or_insert_default()
15811        }
15812        ///If `worker_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
15813        pub fn worker_address_opt(&self) -> Option<&str> {
15814            self.worker_address.as_ref().map(|field| field as _)
15815        }
15816        ///Sets `worker_address` with the provided value.
15817        pub fn set_worker_address<T: Into<String>>(&mut self, field: T) {
15818            self.worker_address = Some(field.into().into());
15819        }
15820        ///Sets `worker_address` with the provided value.
15821        pub fn with_worker_address<T: Into<String>>(mut self, field: T) -> Self {
15822            self.set_worker_address(field.into());
15823            self
15824        }
15825        ///If `next_epoch_protocol_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
15826        pub fn next_epoch_protocol_public_key_opt(&self) -> Option<&[u8]> {
15827            self.next_epoch_protocol_public_key.as_ref().map(|field| field as _)
15828        }
15829        ///Sets `next_epoch_protocol_public_key` with the provided value.
15830        pub fn set_next_epoch_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
15831            &mut self,
15832            field: T,
15833        ) {
15834            self.next_epoch_protocol_public_key = Some(field.into().into());
15835        }
15836        ///Sets `next_epoch_protocol_public_key` with the provided value.
15837        pub fn with_next_epoch_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
15838            mut self,
15839            field: T,
15840        ) -> Self {
15841            self.set_next_epoch_protocol_public_key(field.into());
15842            self
15843        }
15844        ///If `next_epoch_proof_of_possession` is set, returns [`Some`] with the value; otherwise returns [`None`].
15845        pub fn next_epoch_proof_of_possession_opt(&self) -> Option<&[u8]> {
15846            self.next_epoch_proof_of_possession.as_ref().map(|field| field as _)
15847        }
15848        ///Sets `next_epoch_proof_of_possession` with the provided value.
15849        pub fn set_next_epoch_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
15850            &mut self,
15851            field: T,
15852        ) {
15853            self.next_epoch_proof_of_possession = Some(field.into().into());
15854        }
15855        ///Sets `next_epoch_proof_of_possession` with the provided value.
15856        pub fn with_next_epoch_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
15857            mut self,
15858            field: T,
15859        ) -> Self {
15860            self.set_next_epoch_proof_of_possession(field.into());
15861            self
15862        }
15863        ///If `next_epoch_network_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
15864        pub fn next_epoch_network_public_key_opt(&self) -> Option<&[u8]> {
15865            self.next_epoch_network_public_key.as_ref().map(|field| field as _)
15866        }
15867        ///Sets `next_epoch_network_public_key` with the provided value.
15868        pub fn set_next_epoch_network_public_key<T: Into<::prost::bytes::Bytes>>(
15869            &mut self,
15870            field: T,
15871        ) {
15872            self.next_epoch_network_public_key = Some(field.into().into());
15873        }
15874        ///Sets `next_epoch_network_public_key` with the provided value.
15875        pub fn with_next_epoch_network_public_key<T: Into<::prost::bytes::Bytes>>(
15876            mut self,
15877            field: T,
15878        ) -> Self {
15879            self.set_next_epoch_network_public_key(field.into());
15880            self
15881        }
15882        ///If `next_epoch_worker_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
15883        pub fn next_epoch_worker_public_key_opt(&self) -> Option<&[u8]> {
15884            self.next_epoch_worker_public_key.as_ref().map(|field| field as _)
15885        }
15886        ///Sets `next_epoch_worker_public_key` with the provided value.
15887        pub fn set_next_epoch_worker_public_key<T: Into<::prost::bytes::Bytes>>(
15888            &mut self,
15889            field: T,
15890        ) {
15891            self.next_epoch_worker_public_key = Some(field.into().into());
15892        }
15893        ///Sets `next_epoch_worker_public_key` with the provided value.
15894        pub fn with_next_epoch_worker_public_key<T: Into<::prost::bytes::Bytes>>(
15895            mut self,
15896            field: T,
15897        ) -> Self {
15898            self.set_next_epoch_worker_public_key(field.into());
15899            self
15900        }
15901        ///If `next_epoch_network_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15902        pub fn next_epoch_network_address_opt_mut(&mut self) -> Option<&mut String> {
15903            self.next_epoch_network_address.as_mut().map(|field| field as _)
15904        }
15905        ///Returns a mutable reference to `next_epoch_network_address`.
15906        ///If the field is unset, it is first initialized with the default value.
15907        pub fn next_epoch_network_address_mut(&mut self) -> &mut String {
15908            self.next_epoch_network_address.get_or_insert_default()
15909        }
15910        ///If `next_epoch_network_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
15911        pub fn next_epoch_network_address_opt(&self) -> Option<&str> {
15912            self.next_epoch_network_address.as_ref().map(|field| field as _)
15913        }
15914        ///Sets `next_epoch_network_address` with the provided value.
15915        pub fn set_next_epoch_network_address<T: Into<String>>(&mut self, field: T) {
15916            self.next_epoch_network_address = Some(field.into().into());
15917        }
15918        ///Sets `next_epoch_network_address` with the provided value.
15919        pub fn with_next_epoch_network_address<T: Into<String>>(
15920            mut self,
15921            field: T,
15922        ) -> Self {
15923            self.set_next_epoch_network_address(field.into());
15924            self
15925        }
15926        ///If `next_epoch_p2p_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15927        pub fn next_epoch_p2p_address_opt_mut(&mut self) -> Option<&mut String> {
15928            self.next_epoch_p2p_address.as_mut().map(|field| field as _)
15929        }
15930        ///Returns a mutable reference to `next_epoch_p2p_address`.
15931        ///If the field is unset, it is first initialized with the default value.
15932        pub fn next_epoch_p2p_address_mut(&mut self) -> &mut String {
15933            self.next_epoch_p2p_address.get_or_insert_default()
15934        }
15935        ///If `next_epoch_p2p_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
15936        pub fn next_epoch_p2p_address_opt(&self) -> Option<&str> {
15937            self.next_epoch_p2p_address.as_ref().map(|field| field as _)
15938        }
15939        ///Sets `next_epoch_p2p_address` with the provided value.
15940        pub fn set_next_epoch_p2p_address<T: Into<String>>(&mut self, field: T) {
15941            self.next_epoch_p2p_address = Some(field.into().into());
15942        }
15943        ///Sets `next_epoch_p2p_address` with the provided value.
15944        pub fn with_next_epoch_p2p_address<T: Into<String>>(mut self, field: T) -> Self {
15945            self.set_next_epoch_p2p_address(field.into());
15946            self
15947        }
15948        ///If `next_epoch_primary_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15949        pub fn next_epoch_primary_address_opt_mut(&mut self) -> Option<&mut String> {
15950            self.next_epoch_primary_address.as_mut().map(|field| field as _)
15951        }
15952        ///Returns a mutable reference to `next_epoch_primary_address`.
15953        ///If the field is unset, it is first initialized with the default value.
15954        pub fn next_epoch_primary_address_mut(&mut self) -> &mut String {
15955            self.next_epoch_primary_address.get_or_insert_default()
15956        }
15957        ///If `next_epoch_primary_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
15958        pub fn next_epoch_primary_address_opt(&self) -> Option<&str> {
15959            self.next_epoch_primary_address.as_ref().map(|field| field as _)
15960        }
15961        ///Sets `next_epoch_primary_address` with the provided value.
15962        pub fn set_next_epoch_primary_address<T: Into<String>>(&mut self, field: T) {
15963            self.next_epoch_primary_address = Some(field.into().into());
15964        }
15965        ///Sets `next_epoch_primary_address` with the provided value.
15966        pub fn with_next_epoch_primary_address<T: Into<String>>(
15967            mut self,
15968            field: T,
15969        ) -> Self {
15970            self.set_next_epoch_primary_address(field.into());
15971            self
15972        }
15973        ///If `next_epoch_worker_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15974        pub fn next_epoch_worker_address_opt_mut(&mut self) -> Option<&mut String> {
15975            self.next_epoch_worker_address.as_mut().map(|field| field as _)
15976        }
15977        ///Returns a mutable reference to `next_epoch_worker_address`.
15978        ///If the field is unset, it is first initialized with the default value.
15979        pub fn next_epoch_worker_address_mut(&mut self) -> &mut String {
15980            self.next_epoch_worker_address.get_or_insert_default()
15981        }
15982        ///If `next_epoch_worker_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
15983        pub fn next_epoch_worker_address_opt(&self) -> Option<&str> {
15984            self.next_epoch_worker_address.as_ref().map(|field| field as _)
15985        }
15986        ///Sets `next_epoch_worker_address` with the provided value.
15987        pub fn set_next_epoch_worker_address<T: Into<String>>(&mut self, field: T) {
15988            self.next_epoch_worker_address = Some(field.into().into());
15989        }
15990        ///Sets `next_epoch_worker_address` with the provided value.
15991        pub fn with_next_epoch_worker_address<T: Into<String>>(
15992            mut self,
15993            field: T,
15994        ) -> Self {
15995            self.set_next_epoch_worker_address(field.into());
15996            self
15997        }
15998        ///Returns the value of `metadata_extra_fields`, or the default value if `metadata_extra_fields` is unset.
15999        pub fn metadata_extra_fields(&self) -> &super::MoveTable {
16000            self.metadata_extra_fields
16001                .as_ref()
16002                .map(|field| field as _)
16003                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16004        }
16005        ///If `metadata_extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16006        pub fn metadata_extra_fields_opt_mut(
16007            &mut self,
16008        ) -> Option<&mut super::MoveTable> {
16009            self.metadata_extra_fields.as_mut().map(|field| field as _)
16010        }
16011        ///Returns a mutable reference to `metadata_extra_fields`.
16012        ///If the field is unset, it is first initialized with the default value.
16013        pub fn metadata_extra_fields_mut(&mut self) -> &mut super::MoveTable {
16014            self.metadata_extra_fields.get_or_insert_default()
16015        }
16016        ///If `metadata_extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
16017        pub fn metadata_extra_fields_opt(&self) -> Option<&super::MoveTable> {
16018            self.metadata_extra_fields.as_ref().map(|field| field as _)
16019        }
16020        ///Sets `metadata_extra_fields` with the provided value.
16021        pub fn set_metadata_extra_fields<T: Into<super::MoveTable>>(
16022            &mut self,
16023            field: T,
16024        ) {
16025            self.metadata_extra_fields = Some(field.into().into());
16026        }
16027        ///Sets `metadata_extra_fields` with the provided value.
16028        pub fn with_metadata_extra_fields<T: Into<super::MoveTable>>(
16029            mut self,
16030            field: T,
16031        ) -> Self {
16032            self.set_metadata_extra_fields(field.into());
16033            self
16034        }
16035        ///If `voting_power` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16036        pub fn voting_power_opt_mut(&mut self) -> Option<&mut u64> {
16037            self.voting_power.as_mut().map(|field| field as _)
16038        }
16039        ///Returns a mutable reference to `voting_power`.
16040        ///If the field is unset, it is first initialized with the default value.
16041        pub fn voting_power_mut(&mut self) -> &mut u64 {
16042            self.voting_power.get_or_insert_default()
16043        }
16044        ///If `voting_power` is set, returns [`Some`] with the value; otherwise returns [`None`].
16045        pub fn voting_power_opt(&self) -> Option<u64> {
16046            self.voting_power.as_ref().map(|field| *field)
16047        }
16048        ///Sets `voting_power` with the provided value.
16049        pub fn set_voting_power<T: Into<u64>>(&mut self, field: T) {
16050            self.voting_power = Some(field.into().into());
16051        }
16052        ///Sets `voting_power` with the provided value.
16053        pub fn with_voting_power<T: Into<u64>>(mut self, field: T) -> Self {
16054            self.set_voting_power(field.into());
16055            self
16056        }
16057        ///If `operation_cap_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16058        pub fn operation_cap_id_opt_mut(&mut self) -> Option<&mut String> {
16059            self.operation_cap_id.as_mut().map(|field| field as _)
16060        }
16061        ///Returns a mutable reference to `operation_cap_id`.
16062        ///If the field is unset, it is first initialized with the default value.
16063        pub fn operation_cap_id_mut(&mut self) -> &mut String {
16064            self.operation_cap_id.get_or_insert_default()
16065        }
16066        ///If `operation_cap_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
16067        pub fn operation_cap_id_opt(&self) -> Option<&str> {
16068            self.operation_cap_id.as_ref().map(|field| field as _)
16069        }
16070        ///Sets `operation_cap_id` with the provided value.
16071        pub fn set_operation_cap_id<T: Into<String>>(&mut self, field: T) {
16072            self.operation_cap_id = Some(field.into().into());
16073        }
16074        ///Sets `operation_cap_id` with the provided value.
16075        pub fn with_operation_cap_id<T: Into<String>>(mut self, field: T) -> Self {
16076            self.set_operation_cap_id(field.into());
16077            self
16078        }
16079        ///If `gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16080        pub fn gas_price_opt_mut(&mut self) -> Option<&mut u64> {
16081            self.gas_price.as_mut().map(|field| field as _)
16082        }
16083        ///Returns a mutable reference to `gas_price`.
16084        ///If the field is unset, it is first initialized with the default value.
16085        pub fn gas_price_mut(&mut self) -> &mut u64 {
16086            self.gas_price.get_or_insert_default()
16087        }
16088        ///If `gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
16089        pub fn gas_price_opt(&self) -> Option<u64> {
16090            self.gas_price.as_ref().map(|field| *field)
16091        }
16092        ///Sets `gas_price` with the provided value.
16093        pub fn set_gas_price<T: Into<u64>>(&mut self, field: T) {
16094            self.gas_price = Some(field.into().into());
16095        }
16096        ///Sets `gas_price` with the provided value.
16097        pub fn with_gas_price<T: Into<u64>>(mut self, field: T) -> Self {
16098            self.set_gas_price(field.into());
16099            self
16100        }
16101        ///Returns the value of `staking_pool`, or the default value if `staking_pool` is unset.
16102        pub fn staking_pool(&self) -> &super::StakingPool {
16103            self.staking_pool
16104                .as_ref()
16105                .map(|field| field as _)
16106                .unwrap_or_else(|| super::StakingPool::default_instance() as _)
16107        }
16108        ///If `staking_pool` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16109        pub fn staking_pool_opt_mut(&mut self) -> Option<&mut super::StakingPool> {
16110            self.staking_pool.as_mut().map(|field| field as _)
16111        }
16112        ///Returns a mutable reference to `staking_pool`.
16113        ///If the field is unset, it is first initialized with the default value.
16114        pub fn staking_pool_mut(&mut self) -> &mut super::StakingPool {
16115            self.staking_pool.get_or_insert_default()
16116        }
16117        ///If `staking_pool` is set, returns [`Some`] with the value; otherwise returns [`None`].
16118        pub fn staking_pool_opt(&self) -> Option<&super::StakingPool> {
16119            self.staking_pool.as_ref().map(|field| field as _)
16120        }
16121        ///Sets `staking_pool` with the provided value.
16122        pub fn set_staking_pool<T: Into<super::StakingPool>>(&mut self, field: T) {
16123            self.staking_pool = Some(field.into().into());
16124        }
16125        ///Sets `staking_pool` with the provided value.
16126        pub fn with_staking_pool<T: Into<super::StakingPool>>(
16127            mut self,
16128            field: T,
16129        ) -> Self {
16130            self.set_staking_pool(field.into());
16131            self
16132        }
16133        ///If `commission_rate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16134        pub fn commission_rate_opt_mut(&mut self) -> Option<&mut u64> {
16135            self.commission_rate.as_mut().map(|field| field as _)
16136        }
16137        ///Returns a mutable reference to `commission_rate`.
16138        ///If the field is unset, it is first initialized with the default value.
16139        pub fn commission_rate_mut(&mut self) -> &mut u64 {
16140            self.commission_rate.get_or_insert_default()
16141        }
16142        ///If `commission_rate` is set, returns [`Some`] with the value; otherwise returns [`None`].
16143        pub fn commission_rate_opt(&self) -> Option<u64> {
16144            self.commission_rate.as_ref().map(|field| *field)
16145        }
16146        ///Sets `commission_rate` with the provided value.
16147        pub fn set_commission_rate<T: Into<u64>>(&mut self, field: T) {
16148            self.commission_rate = Some(field.into().into());
16149        }
16150        ///Sets `commission_rate` with the provided value.
16151        pub fn with_commission_rate<T: Into<u64>>(mut self, field: T) -> Self {
16152            self.set_commission_rate(field.into());
16153            self
16154        }
16155        ///If `next_epoch_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16156        pub fn next_epoch_stake_opt_mut(&mut self) -> Option<&mut u64> {
16157            self.next_epoch_stake.as_mut().map(|field| field as _)
16158        }
16159        ///Returns a mutable reference to `next_epoch_stake`.
16160        ///If the field is unset, it is first initialized with the default value.
16161        pub fn next_epoch_stake_mut(&mut self) -> &mut u64 {
16162            self.next_epoch_stake.get_or_insert_default()
16163        }
16164        ///If `next_epoch_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
16165        pub fn next_epoch_stake_opt(&self) -> Option<u64> {
16166            self.next_epoch_stake.as_ref().map(|field| *field)
16167        }
16168        ///Sets `next_epoch_stake` with the provided value.
16169        pub fn set_next_epoch_stake<T: Into<u64>>(&mut self, field: T) {
16170            self.next_epoch_stake = Some(field.into().into());
16171        }
16172        ///Sets `next_epoch_stake` with the provided value.
16173        pub fn with_next_epoch_stake<T: Into<u64>>(mut self, field: T) -> Self {
16174            self.set_next_epoch_stake(field.into());
16175            self
16176        }
16177        ///If `next_epoch_gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16178        pub fn next_epoch_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
16179            self.next_epoch_gas_price.as_mut().map(|field| field as _)
16180        }
16181        ///Returns a mutable reference to `next_epoch_gas_price`.
16182        ///If the field is unset, it is first initialized with the default value.
16183        pub fn next_epoch_gas_price_mut(&mut self) -> &mut u64 {
16184            self.next_epoch_gas_price.get_or_insert_default()
16185        }
16186        ///If `next_epoch_gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
16187        pub fn next_epoch_gas_price_opt(&self) -> Option<u64> {
16188            self.next_epoch_gas_price.as_ref().map(|field| *field)
16189        }
16190        ///Sets `next_epoch_gas_price` with the provided value.
16191        pub fn set_next_epoch_gas_price<T: Into<u64>>(&mut self, field: T) {
16192            self.next_epoch_gas_price = Some(field.into().into());
16193        }
16194        ///Sets `next_epoch_gas_price` with the provided value.
16195        pub fn with_next_epoch_gas_price<T: Into<u64>>(mut self, field: T) -> Self {
16196            self.set_next_epoch_gas_price(field.into());
16197            self
16198        }
16199        ///If `next_epoch_commission_rate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16200        pub fn next_epoch_commission_rate_opt_mut(&mut self) -> Option<&mut u64> {
16201            self.next_epoch_commission_rate.as_mut().map(|field| field as _)
16202        }
16203        ///Returns a mutable reference to `next_epoch_commission_rate`.
16204        ///If the field is unset, it is first initialized with the default value.
16205        pub fn next_epoch_commission_rate_mut(&mut self) -> &mut u64 {
16206            self.next_epoch_commission_rate.get_or_insert_default()
16207        }
16208        ///If `next_epoch_commission_rate` is set, returns [`Some`] with the value; otherwise returns [`None`].
16209        pub fn next_epoch_commission_rate_opt(&self) -> Option<u64> {
16210            self.next_epoch_commission_rate.as_ref().map(|field| *field)
16211        }
16212        ///Sets `next_epoch_commission_rate` with the provided value.
16213        pub fn set_next_epoch_commission_rate<T: Into<u64>>(&mut self, field: T) {
16214            self.next_epoch_commission_rate = Some(field.into().into());
16215        }
16216        ///Sets `next_epoch_commission_rate` with the provided value.
16217        pub fn with_next_epoch_commission_rate<T: Into<u64>>(
16218            mut self,
16219            field: T,
16220        ) -> Self {
16221            self.set_next_epoch_commission_rate(field.into());
16222            self
16223        }
16224        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
16225        pub fn extra_fields(&self) -> &super::MoveTable {
16226            self.extra_fields
16227                .as_ref()
16228                .map(|field| field as _)
16229                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16230        }
16231        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16232        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
16233            self.extra_fields.as_mut().map(|field| field as _)
16234        }
16235        ///Returns a mutable reference to `extra_fields`.
16236        ///If the field is unset, it is first initialized with the default value.
16237        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
16238            self.extra_fields.get_or_insert_default()
16239        }
16240        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
16241        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
16242            self.extra_fields.as_ref().map(|field| field as _)
16243        }
16244        ///Sets `extra_fields` with the provided value.
16245        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
16246            self.extra_fields = Some(field.into().into());
16247        }
16248        ///Sets `extra_fields` with the provided value.
16249        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
16250            self.set_extra_fields(field.into());
16251            self
16252        }
16253    }
16254    impl super::ValidatorAggregatedSignature {
16255        pub const fn const_default() -> Self {
16256            Self {
16257                epoch: None,
16258                signature: None,
16259                bitmap: None,
16260            }
16261        }
16262        #[doc(hidden)]
16263        pub fn default_instance() -> &'static Self {
16264            static DEFAULT: super::ValidatorAggregatedSignature = super::ValidatorAggregatedSignature::const_default();
16265            &DEFAULT
16266        }
16267        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16268        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
16269            self.epoch.as_mut().map(|field| field as _)
16270        }
16271        ///Returns a mutable reference to `epoch`.
16272        ///If the field is unset, it is first initialized with the default value.
16273        pub fn epoch_mut(&mut self) -> &mut u64 {
16274            self.epoch.get_or_insert_default()
16275        }
16276        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
16277        pub fn epoch_opt(&self) -> Option<u64> {
16278            self.epoch.as_ref().map(|field| *field)
16279        }
16280        ///Sets `epoch` with the provided value.
16281        pub fn set_epoch<T: Into<u64>>(&mut self, field: T) {
16282            self.epoch = Some(field.into().into());
16283        }
16284        ///Sets `epoch` with the provided value.
16285        pub fn with_epoch<T: Into<u64>>(mut self, field: T) -> Self {
16286            self.set_epoch(field.into());
16287            self
16288        }
16289        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
16290        pub fn signature_opt(&self) -> Option<&[u8]> {
16291            self.signature.as_ref().map(|field| field as _)
16292        }
16293        ///Sets `signature` with the provided value.
16294        pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16295            self.signature = Some(field.into().into());
16296        }
16297        ///Sets `signature` with the provided value.
16298        pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
16299            mut self,
16300            field: T,
16301        ) -> Self {
16302            self.set_signature(field.into());
16303            self
16304        }
16305        ///If `bitmap` is set, returns [`Some`] with the value; otherwise returns [`None`].
16306        pub fn bitmap_opt(&self) -> Option<&[u8]> {
16307            self.bitmap.as_ref().map(|field| field as _)
16308        }
16309        ///Sets `bitmap` with the provided value.
16310        pub fn set_bitmap<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16311            self.bitmap = Some(field.into().into());
16312        }
16313        ///Sets `bitmap` with the provided value.
16314        pub fn with_bitmap<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
16315            self.set_bitmap(field.into());
16316            self
16317        }
16318    }
16319    impl super::ValidatorCommittee {
16320        pub const fn const_default() -> Self {
16321            Self {
16322                epoch: None,
16323                members: Vec::new(),
16324            }
16325        }
16326        #[doc(hidden)]
16327        pub fn default_instance() -> &'static Self {
16328            static DEFAULT: super::ValidatorCommittee = super::ValidatorCommittee::const_default();
16329            &DEFAULT
16330        }
16331        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16332        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
16333            self.epoch.as_mut().map(|field| field as _)
16334        }
16335        ///Returns a mutable reference to `epoch`.
16336        ///If the field is unset, it is first initialized with the default value.
16337        pub fn epoch_mut(&mut self) -> &mut u64 {
16338            self.epoch.get_or_insert_default()
16339        }
16340        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
16341        pub fn epoch_opt(&self) -> Option<u64> {
16342            self.epoch.as_ref().map(|field| *field)
16343        }
16344        ///Sets `epoch` with the provided value.
16345        pub fn set_epoch<T: Into<u64>>(&mut self, field: T) {
16346            self.epoch = Some(field.into().into());
16347        }
16348        ///Sets `epoch` with the provided value.
16349        pub fn with_epoch<T: Into<u64>>(mut self, field: T) -> Self {
16350            self.set_epoch(field.into());
16351            self
16352        }
16353        ///Returns the value of `members`, or the default value if `members` is unset.
16354        pub fn members(&self) -> &[super::ValidatorCommitteeMember] {
16355            &self.members
16356        }
16357        ///Returns a mutable reference to `members`.
16358        ///If the field is unset, it is first initialized with the default value.
16359        pub fn members_mut(&mut self) -> &mut Vec<super::ValidatorCommitteeMember> {
16360            &mut self.members
16361        }
16362        ///Sets `members` with the provided value.
16363        pub fn set_members(&mut self, field: Vec<super::ValidatorCommitteeMember>) {
16364            self.members = field;
16365        }
16366        ///Sets `members` with the provided value.
16367        pub fn with_members(
16368            mut self,
16369            field: Vec<super::ValidatorCommitteeMember>,
16370        ) -> Self {
16371            self.set_members(field);
16372            self
16373        }
16374    }
16375    impl super::ValidatorCommitteeMember {
16376        pub const fn const_default() -> Self {
16377            Self {
16378                public_key: None,
16379                weight: None,
16380            }
16381        }
16382        #[doc(hidden)]
16383        pub fn default_instance() -> &'static Self {
16384            static DEFAULT: super::ValidatorCommitteeMember = super::ValidatorCommitteeMember::const_default();
16385            &DEFAULT
16386        }
16387        ///If `public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
16388        pub fn public_key_opt(&self) -> Option<&[u8]> {
16389            self.public_key.as_ref().map(|field| field as _)
16390        }
16391        ///Sets `public_key` with the provided value.
16392        pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16393            self.public_key = Some(field.into().into());
16394        }
16395        ///Sets `public_key` with the provided value.
16396        pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
16397            mut self,
16398            field: T,
16399        ) -> Self {
16400            self.set_public_key(field.into());
16401            self
16402        }
16403        ///If `weight` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16404        pub fn weight_opt_mut(&mut self) -> Option<&mut u64> {
16405            self.weight.as_mut().map(|field| field as _)
16406        }
16407        ///Returns a mutable reference to `weight`.
16408        ///If the field is unset, it is first initialized with the default value.
16409        pub fn weight_mut(&mut self) -> &mut u64 {
16410            self.weight.get_or_insert_default()
16411        }
16412        ///If `weight` is set, returns [`Some`] with the value; otherwise returns [`None`].
16413        pub fn weight_opt(&self) -> Option<u64> {
16414            self.weight.as_ref().map(|field| *field)
16415        }
16416        ///Sets `weight` with the provided value.
16417        pub fn set_weight<T: Into<u64>>(&mut self, field: T) {
16418            self.weight = Some(field.into().into());
16419        }
16420        ///Sets `weight` with the provided value.
16421        pub fn with_weight<T: Into<u64>>(mut self, field: T) -> Self {
16422            self.set_weight(field.into());
16423            self
16424        }
16425    }
16426    impl super::ValidatorExecutionTimeObservation {
16427        pub const fn const_default() -> Self {
16428            Self {
16429                validator: None,
16430                duration: None,
16431            }
16432        }
16433        #[doc(hidden)]
16434        pub fn default_instance() -> &'static Self {
16435            static DEFAULT: super::ValidatorExecutionTimeObservation = super::ValidatorExecutionTimeObservation::const_default();
16436            &DEFAULT
16437        }
16438        ///If `validator` is set, returns [`Some`] with the value; otherwise returns [`None`].
16439        pub fn validator_opt(&self) -> Option<&[u8]> {
16440            self.validator.as_ref().map(|field| field as _)
16441        }
16442        ///Sets `validator` with the provided value.
16443        pub fn set_validator<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16444            self.validator = Some(field.into().into());
16445        }
16446        ///Sets `validator` with the provided value.
16447        pub fn with_validator<T: Into<::prost::bytes::Bytes>>(
16448            mut self,
16449            field: T,
16450        ) -> Self {
16451            self.set_validator(field.into());
16452            self
16453        }
16454        ///If `duration` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16455        pub fn duration_opt_mut(&mut self) -> Option<&mut ::prost_types::Duration> {
16456            self.duration.as_mut().map(|field| field as _)
16457        }
16458        ///Returns a mutable reference to `duration`.
16459        ///If the field is unset, it is first initialized with the default value.
16460        pub fn duration_mut(&mut self) -> &mut ::prost_types::Duration {
16461            self.duration.get_or_insert_default()
16462        }
16463        ///If `duration` is set, returns [`Some`] with the value; otherwise returns [`None`].
16464        pub fn duration_opt(&self) -> Option<&::prost_types::Duration> {
16465            self.duration.as_ref().map(|field| field as _)
16466        }
16467        ///Sets `duration` with the provided value.
16468        pub fn set_duration<T: Into<::prost_types::Duration>>(&mut self, field: T) {
16469            self.duration = Some(field.into().into());
16470        }
16471        ///Sets `duration` with the provided value.
16472        pub fn with_duration<T: Into<::prost_types::Duration>>(
16473            mut self,
16474            field: T,
16475        ) -> Self {
16476            self.set_duration(field.into());
16477            self
16478        }
16479    }
16480    impl super::ValidatorReportRecord {
16481        pub const fn const_default() -> Self {
16482            Self {
16483                reported: None,
16484                reporters: Vec::new(),
16485            }
16486        }
16487        #[doc(hidden)]
16488        pub fn default_instance() -> &'static Self {
16489            static DEFAULT: super::ValidatorReportRecord = super::ValidatorReportRecord::const_default();
16490            &DEFAULT
16491        }
16492        ///If `reported` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16493        pub fn reported_opt_mut(&mut self) -> Option<&mut String> {
16494            self.reported.as_mut().map(|field| field as _)
16495        }
16496        ///Returns a mutable reference to `reported`.
16497        ///If the field is unset, it is first initialized with the default value.
16498        pub fn reported_mut(&mut self) -> &mut String {
16499            self.reported.get_or_insert_default()
16500        }
16501        ///If `reported` is set, returns [`Some`] with the value; otherwise returns [`None`].
16502        pub fn reported_opt(&self) -> Option<&str> {
16503            self.reported.as_ref().map(|field| field as _)
16504        }
16505        ///Sets `reported` with the provided value.
16506        pub fn set_reported<T: Into<String>>(&mut self, field: T) {
16507            self.reported = Some(field.into().into());
16508        }
16509        ///Sets `reported` with the provided value.
16510        pub fn with_reported<T: Into<String>>(mut self, field: T) -> Self {
16511            self.set_reported(field.into());
16512            self
16513        }
16514        ///Returns the value of `reporters`, or the default value if `reporters` is unset.
16515        pub fn reporters(&self) -> &[String] {
16516            &self.reporters
16517        }
16518        ///Returns a mutable reference to `reporters`.
16519        ///If the field is unset, it is first initialized with the default value.
16520        pub fn reporters_mut(&mut self) -> &mut Vec<String> {
16521            &mut self.reporters
16522        }
16523        ///Sets `reporters` with the provided value.
16524        pub fn set_reporters(&mut self, field: Vec<String>) {
16525            self.reporters = field;
16526        }
16527        ///Sets `reporters` with the provided value.
16528        pub fn with_reporters(mut self, field: Vec<String>) -> Self {
16529            self.set_reporters(field);
16530            self
16531        }
16532    }
16533    impl super::ValidatorSet {
16534        pub const fn const_default() -> Self {
16535            Self {
16536                total_stake: None,
16537                active_validators: Vec::new(),
16538                pending_active_validators: None,
16539                pending_removals: Vec::new(),
16540                staking_pool_mappings: None,
16541                inactive_validators: None,
16542                validator_candidates: None,
16543                at_risk_validators: std::collections::BTreeMap::new(),
16544                extra_fields: None,
16545            }
16546        }
16547        #[doc(hidden)]
16548        pub fn default_instance() -> &'static Self {
16549            static DEFAULT: super::ValidatorSet = super::ValidatorSet::const_default();
16550            &DEFAULT
16551        }
16552        ///If `total_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16553        pub fn total_stake_opt_mut(&mut self) -> Option<&mut u64> {
16554            self.total_stake.as_mut().map(|field| field as _)
16555        }
16556        ///Returns a mutable reference to `total_stake`.
16557        ///If the field is unset, it is first initialized with the default value.
16558        pub fn total_stake_mut(&mut self) -> &mut u64 {
16559            self.total_stake.get_or_insert_default()
16560        }
16561        ///If `total_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
16562        pub fn total_stake_opt(&self) -> Option<u64> {
16563            self.total_stake.as_ref().map(|field| *field)
16564        }
16565        ///Sets `total_stake` with the provided value.
16566        pub fn set_total_stake<T: Into<u64>>(&mut self, field: T) {
16567            self.total_stake = Some(field.into().into());
16568        }
16569        ///Sets `total_stake` with the provided value.
16570        pub fn with_total_stake<T: Into<u64>>(mut self, field: T) -> Self {
16571            self.set_total_stake(field.into());
16572            self
16573        }
16574        ///Returns the value of `active_validators`, or the default value if `active_validators` is unset.
16575        pub fn active_validators(&self) -> &[super::Validator] {
16576            &self.active_validators
16577        }
16578        ///Returns a mutable reference to `active_validators`.
16579        ///If the field is unset, it is first initialized with the default value.
16580        pub fn active_validators_mut(&mut self) -> &mut Vec<super::Validator> {
16581            &mut self.active_validators
16582        }
16583        ///Sets `active_validators` with the provided value.
16584        pub fn set_active_validators(&mut self, field: Vec<super::Validator>) {
16585            self.active_validators = field;
16586        }
16587        ///Sets `active_validators` with the provided value.
16588        pub fn with_active_validators(mut self, field: Vec<super::Validator>) -> Self {
16589            self.set_active_validators(field);
16590            self
16591        }
16592        ///Returns the value of `pending_active_validators`, or the default value if `pending_active_validators` is unset.
16593        pub fn pending_active_validators(&self) -> &super::MoveTable {
16594            self.pending_active_validators
16595                .as_ref()
16596                .map(|field| field as _)
16597                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16598        }
16599        ///If `pending_active_validators` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16600        pub fn pending_active_validators_opt_mut(
16601            &mut self,
16602        ) -> Option<&mut super::MoveTable> {
16603            self.pending_active_validators.as_mut().map(|field| field as _)
16604        }
16605        ///Returns a mutable reference to `pending_active_validators`.
16606        ///If the field is unset, it is first initialized with the default value.
16607        pub fn pending_active_validators_mut(&mut self) -> &mut super::MoveTable {
16608            self.pending_active_validators.get_or_insert_default()
16609        }
16610        ///If `pending_active_validators` is set, returns [`Some`] with the value; otherwise returns [`None`].
16611        pub fn pending_active_validators_opt(&self) -> Option<&super::MoveTable> {
16612            self.pending_active_validators.as_ref().map(|field| field as _)
16613        }
16614        ///Sets `pending_active_validators` with the provided value.
16615        pub fn set_pending_active_validators<T: Into<super::MoveTable>>(
16616            &mut self,
16617            field: T,
16618        ) {
16619            self.pending_active_validators = Some(field.into().into());
16620        }
16621        ///Sets `pending_active_validators` with the provided value.
16622        pub fn with_pending_active_validators<T: Into<super::MoveTable>>(
16623            mut self,
16624            field: T,
16625        ) -> Self {
16626            self.set_pending_active_validators(field.into());
16627            self
16628        }
16629        ///Returns the value of `pending_removals`, or the default value if `pending_removals` is unset.
16630        pub fn pending_removals(&self) -> &[u64] {
16631            &self.pending_removals
16632        }
16633        ///Returns a mutable reference to `pending_removals`.
16634        ///If the field is unset, it is first initialized with the default value.
16635        pub fn pending_removals_mut(&mut self) -> &mut Vec<u64> {
16636            &mut self.pending_removals
16637        }
16638        ///Sets `pending_removals` with the provided value.
16639        pub fn set_pending_removals(&mut self, field: Vec<u64>) {
16640            self.pending_removals = field;
16641        }
16642        ///Sets `pending_removals` with the provided value.
16643        pub fn with_pending_removals(mut self, field: Vec<u64>) -> Self {
16644            self.set_pending_removals(field);
16645            self
16646        }
16647        ///Returns the value of `staking_pool_mappings`, or the default value if `staking_pool_mappings` is unset.
16648        pub fn staking_pool_mappings(&self) -> &super::MoveTable {
16649            self.staking_pool_mappings
16650                .as_ref()
16651                .map(|field| field as _)
16652                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16653        }
16654        ///If `staking_pool_mappings` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16655        pub fn staking_pool_mappings_opt_mut(
16656            &mut self,
16657        ) -> Option<&mut super::MoveTable> {
16658            self.staking_pool_mappings.as_mut().map(|field| field as _)
16659        }
16660        ///Returns a mutable reference to `staking_pool_mappings`.
16661        ///If the field is unset, it is first initialized with the default value.
16662        pub fn staking_pool_mappings_mut(&mut self) -> &mut super::MoveTable {
16663            self.staking_pool_mappings.get_or_insert_default()
16664        }
16665        ///If `staking_pool_mappings` is set, returns [`Some`] with the value; otherwise returns [`None`].
16666        pub fn staking_pool_mappings_opt(&self) -> Option<&super::MoveTable> {
16667            self.staking_pool_mappings.as_ref().map(|field| field as _)
16668        }
16669        ///Sets `staking_pool_mappings` with the provided value.
16670        pub fn set_staking_pool_mappings<T: Into<super::MoveTable>>(
16671            &mut self,
16672            field: T,
16673        ) {
16674            self.staking_pool_mappings = Some(field.into().into());
16675        }
16676        ///Sets `staking_pool_mappings` with the provided value.
16677        pub fn with_staking_pool_mappings<T: Into<super::MoveTable>>(
16678            mut self,
16679            field: T,
16680        ) -> Self {
16681            self.set_staking_pool_mappings(field.into());
16682            self
16683        }
16684        ///Returns the value of `inactive_validators`, or the default value if `inactive_validators` is unset.
16685        pub fn inactive_validators(&self) -> &super::MoveTable {
16686            self.inactive_validators
16687                .as_ref()
16688                .map(|field| field as _)
16689                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16690        }
16691        ///If `inactive_validators` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16692        pub fn inactive_validators_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
16693            self.inactive_validators.as_mut().map(|field| field as _)
16694        }
16695        ///Returns a mutable reference to `inactive_validators`.
16696        ///If the field is unset, it is first initialized with the default value.
16697        pub fn inactive_validators_mut(&mut self) -> &mut super::MoveTable {
16698            self.inactive_validators.get_or_insert_default()
16699        }
16700        ///If `inactive_validators` is set, returns [`Some`] with the value; otherwise returns [`None`].
16701        pub fn inactive_validators_opt(&self) -> Option<&super::MoveTable> {
16702            self.inactive_validators.as_ref().map(|field| field as _)
16703        }
16704        ///Sets `inactive_validators` with the provided value.
16705        pub fn set_inactive_validators<T: Into<super::MoveTable>>(&mut self, field: T) {
16706            self.inactive_validators = Some(field.into().into());
16707        }
16708        ///Sets `inactive_validators` with the provided value.
16709        pub fn with_inactive_validators<T: Into<super::MoveTable>>(
16710            mut self,
16711            field: T,
16712        ) -> Self {
16713            self.set_inactive_validators(field.into());
16714            self
16715        }
16716        ///Returns the value of `validator_candidates`, or the default value if `validator_candidates` is unset.
16717        pub fn validator_candidates(&self) -> &super::MoveTable {
16718            self.validator_candidates
16719                .as_ref()
16720                .map(|field| field as _)
16721                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16722        }
16723        ///If `validator_candidates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16724        pub fn validator_candidates_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
16725            self.validator_candidates.as_mut().map(|field| field as _)
16726        }
16727        ///Returns a mutable reference to `validator_candidates`.
16728        ///If the field is unset, it is first initialized with the default value.
16729        pub fn validator_candidates_mut(&mut self) -> &mut super::MoveTable {
16730            self.validator_candidates.get_or_insert_default()
16731        }
16732        ///If `validator_candidates` is set, returns [`Some`] with the value; otherwise returns [`None`].
16733        pub fn validator_candidates_opt(&self) -> Option<&super::MoveTable> {
16734            self.validator_candidates.as_ref().map(|field| field as _)
16735        }
16736        ///Sets `validator_candidates` with the provided value.
16737        pub fn set_validator_candidates<T: Into<super::MoveTable>>(&mut self, field: T) {
16738            self.validator_candidates = Some(field.into().into());
16739        }
16740        ///Sets `validator_candidates` with the provided value.
16741        pub fn with_validator_candidates<T: Into<super::MoveTable>>(
16742            mut self,
16743            field: T,
16744        ) -> Self {
16745            self.set_validator_candidates(field.into());
16746            self
16747        }
16748        ///Returns the value of `at_risk_validators`, or the default value if `at_risk_validators` is unset.
16749        pub fn at_risk_validators(&self) -> &::std::collections::BTreeMap<String, u64> {
16750            &self.at_risk_validators
16751        }
16752        ///Returns a mutable reference to `at_risk_validators`.
16753        ///If the field is unset, it is first initialized with the default value.
16754        pub fn at_risk_validators_mut(
16755            &mut self,
16756        ) -> &mut ::std::collections::BTreeMap<String, u64> {
16757            &mut self.at_risk_validators
16758        }
16759        ///Sets `at_risk_validators` with the provided value.
16760        pub fn set_at_risk_validators(
16761            &mut self,
16762            field: ::std::collections::BTreeMap<String, u64>,
16763        ) {
16764            self.at_risk_validators = field;
16765        }
16766        ///Sets `at_risk_validators` with the provided value.
16767        pub fn with_at_risk_validators(
16768            mut self,
16769            field: ::std::collections::BTreeMap<String, u64>,
16770        ) -> Self {
16771            self.set_at_risk_validators(field);
16772            self
16773        }
16774        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
16775        pub fn extra_fields(&self) -> &super::MoveTable {
16776            self.extra_fields
16777                .as_ref()
16778                .map(|field| field as _)
16779                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16780        }
16781        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16782        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
16783            self.extra_fields.as_mut().map(|field| field as _)
16784        }
16785        ///Returns a mutable reference to `extra_fields`.
16786        ///If the field is unset, it is first initialized with the default value.
16787        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
16788            self.extra_fields.get_or_insert_default()
16789        }
16790        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
16791        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
16792            self.extra_fields.as_ref().map(|field| field as _)
16793        }
16794        ///Sets `extra_fields` with the provided value.
16795        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
16796            self.extra_fields = Some(field.into().into());
16797        }
16798        ///Sets `extra_fields` with the provided value.
16799        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
16800            self.set_extra_fields(field.into());
16801            self
16802        }
16803    }
16804    impl super::VariantDescriptor {
16805        pub const fn const_default() -> Self {
16806            Self {
16807                name: None,
16808                position: None,
16809                fields: Vec::new(),
16810            }
16811        }
16812        #[doc(hidden)]
16813        pub fn default_instance() -> &'static Self {
16814            static DEFAULT: super::VariantDescriptor = super::VariantDescriptor::const_default();
16815            &DEFAULT
16816        }
16817        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16818        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
16819            self.name.as_mut().map(|field| field as _)
16820        }
16821        ///Returns a mutable reference to `name`.
16822        ///If the field is unset, it is first initialized with the default value.
16823        pub fn name_mut(&mut self) -> &mut String {
16824            self.name.get_or_insert_default()
16825        }
16826        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
16827        pub fn name_opt(&self) -> Option<&str> {
16828            self.name.as_ref().map(|field| field as _)
16829        }
16830        ///Sets `name` with the provided value.
16831        pub fn set_name<T: Into<String>>(&mut self, field: T) {
16832            self.name = Some(field.into().into());
16833        }
16834        ///Sets `name` with the provided value.
16835        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
16836            self.set_name(field.into());
16837            self
16838        }
16839        ///If `position` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16840        pub fn position_opt_mut(&mut self) -> Option<&mut u32> {
16841            self.position.as_mut().map(|field| field as _)
16842        }
16843        ///Returns a mutable reference to `position`.
16844        ///If the field is unset, it is first initialized with the default value.
16845        pub fn position_mut(&mut self) -> &mut u32 {
16846            self.position.get_or_insert_default()
16847        }
16848        ///If `position` is set, returns [`Some`] with the value; otherwise returns [`None`].
16849        pub fn position_opt(&self) -> Option<u32> {
16850            self.position.as_ref().map(|field| *field)
16851        }
16852        ///Sets `position` with the provided value.
16853        pub fn set_position<T: Into<u32>>(&mut self, field: T) {
16854            self.position = Some(field.into().into());
16855        }
16856        ///Sets `position` with the provided value.
16857        pub fn with_position<T: Into<u32>>(mut self, field: T) -> Self {
16858            self.set_position(field.into());
16859            self
16860        }
16861        ///Returns the value of `fields`, or the default value if `fields` is unset.
16862        pub fn fields(&self) -> &[super::FieldDescriptor] {
16863            &self.fields
16864        }
16865        ///Returns a mutable reference to `fields`.
16866        ///If the field is unset, it is first initialized with the default value.
16867        pub fn fields_mut(&mut self) -> &mut Vec<super::FieldDescriptor> {
16868            &mut self.fields
16869        }
16870        ///Sets `fields` with the provided value.
16871        pub fn set_fields(&mut self, field: Vec<super::FieldDescriptor>) {
16872            self.fields = field;
16873        }
16874        ///Sets `fields` with the provided value.
16875        pub fn with_fields(mut self, field: Vec<super::FieldDescriptor>) -> Self {
16876            self.set_fields(field);
16877            self
16878        }
16879    }
16880    impl super::VerifySignatureRequest {
16881        pub const fn const_default() -> Self {
16882            Self {
16883                message: None,
16884                signature: None,
16885                address: None,
16886                jwks: Vec::new(),
16887            }
16888        }
16889        #[doc(hidden)]
16890        pub fn default_instance() -> &'static Self {
16891            static DEFAULT: super::VerifySignatureRequest = super::VerifySignatureRequest::const_default();
16892            &DEFAULT
16893        }
16894        ///Returns the value of `message`, or the default value if `message` is unset.
16895        pub fn message(&self) -> &super::Bcs {
16896            self.message
16897                .as_ref()
16898                .map(|field| field as _)
16899                .unwrap_or_else(|| super::Bcs::default_instance() as _)
16900        }
16901        ///If `message` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16902        pub fn message_opt_mut(&mut self) -> Option<&mut super::Bcs> {
16903            self.message.as_mut().map(|field| field as _)
16904        }
16905        ///Returns a mutable reference to `message`.
16906        ///If the field is unset, it is first initialized with the default value.
16907        pub fn message_mut(&mut self) -> &mut super::Bcs {
16908            self.message.get_or_insert_default()
16909        }
16910        ///If `message` is set, returns [`Some`] with the value; otherwise returns [`None`].
16911        pub fn message_opt(&self) -> Option<&super::Bcs> {
16912            self.message.as_ref().map(|field| field as _)
16913        }
16914        ///Sets `message` with the provided value.
16915        pub fn set_message<T: Into<super::Bcs>>(&mut self, field: T) {
16916            self.message = Some(field.into().into());
16917        }
16918        ///Sets `message` with the provided value.
16919        pub fn with_message<T: Into<super::Bcs>>(mut self, field: T) -> Self {
16920            self.set_message(field.into());
16921            self
16922        }
16923        ///Returns the value of `signature`, or the default value if `signature` is unset.
16924        pub fn signature(&self) -> &super::UserSignature {
16925            self.signature
16926                .as_ref()
16927                .map(|field| field as _)
16928                .unwrap_or_else(|| super::UserSignature::default_instance() as _)
16929        }
16930        ///If `signature` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16931        pub fn signature_opt_mut(&mut self) -> Option<&mut super::UserSignature> {
16932            self.signature.as_mut().map(|field| field as _)
16933        }
16934        ///Returns a mutable reference to `signature`.
16935        ///If the field is unset, it is first initialized with the default value.
16936        pub fn signature_mut(&mut self) -> &mut super::UserSignature {
16937            self.signature.get_or_insert_default()
16938        }
16939        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
16940        pub fn signature_opt(&self) -> Option<&super::UserSignature> {
16941            self.signature.as_ref().map(|field| field as _)
16942        }
16943        ///Sets `signature` with the provided value.
16944        pub fn set_signature<T: Into<super::UserSignature>>(&mut self, field: T) {
16945            self.signature = Some(field.into().into());
16946        }
16947        ///Sets `signature` with the provided value.
16948        pub fn with_signature<T: Into<super::UserSignature>>(
16949            mut self,
16950            field: T,
16951        ) -> Self {
16952            self.set_signature(field.into());
16953            self
16954        }
16955        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16956        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
16957            self.address.as_mut().map(|field| field as _)
16958        }
16959        ///Returns a mutable reference to `address`.
16960        ///If the field is unset, it is first initialized with the default value.
16961        pub fn address_mut(&mut self) -> &mut String {
16962            self.address.get_or_insert_default()
16963        }
16964        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16965        pub fn address_opt(&self) -> Option<&str> {
16966            self.address.as_ref().map(|field| field as _)
16967        }
16968        ///Sets `address` with the provided value.
16969        pub fn set_address<T: Into<String>>(&mut self, field: T) {
16970            self.address = Some(field.into().into());
16971        }
16972        ///Sets `address` with the provided value.
16973        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
16974            self.set_address(field.into());
16975            self
16976        }
16977        ///Returns the value of `jwks`, or the default value if `jwks` is unset.
16978        pub fn jwks(&self) -> &[super::ActiveJwk] {
16979            &self.jwks
16980        }
16981        ///Returns a mutable reference to `jwks`.
16982        ///If the field is unset, it is first initialized with the default value.
16983        pub fn jwks_mut(&mut self) -> &mut Vec<super::ActiveJwk> {
16984            &mut self.jwks
16985        }
16986        ///Sets `jwks` with the provided value.
16987        pub fn set_jwks(&mut self, field: Vec<super::ActiveJwk>) {
16988            self.jwks = field;
16989        }
16990        ///Sets `jwks` with the provided value.
16991        pub fn with_jwks(mut self, field: Vec<super::ActiveJwk>) -> Self {
16992            self.set_jwks(field);
16993            self
16994        }
16995    }
16996    impl super::VerifySignatureResponse {
16997        pub const fn const_default() -> Self {
16998            Self {
16999                is_valid: None,
17000                reason: None,
17001            }
17002        }
17003        #[doc(hidden)]
17004        pub fn default_instance() -> &'static Self {
17005            static DEFAULT: super::VerifySignatureResponse = super::VerifySignatureResponse::const_default();
17006            &DEFAULT
17007        }
17008        ///If `is_valid` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17009        pub fn is_valid_opt_mut(&mut self) -> Option<&mut bool> {
17010            self.is_valid.as_mut().map(|field| field as _)
17011        }
17012        ///Returns a mutable reference to `is_valid`.
17013        ///If the field is unset, it is first initialized with the default value.
17014        pub fn is_valid_mut(&mut self) -> &mut bool {
17015            self.is_valid.get_or_insert_default()
17016        }
17017        ///If `is_valid` is set, returns [`Some`] with the value; otherwise returns [`None`].
17018        pub fn is_valid_opt(&self) -> Option<bool> {
17019            self.is_valid.as_ref().map(|field| *field)
17020        }
17021        ///Sets `is_valid` with the provided value.
17022        pub fn set_is_valid<T: Into<bool>>(&mut self, field: T) {
17023            self.is_valid = Some(field.into().into());
17024        }
17025        ///Sets `is_valid` with the provided value.
17026        pub fn with_is_valid<T: Into<bool>>(mut self, field: T) -> Self {
17027            self.set_is_valid(field.into());
17028            self
17029        }
17030        ///If `reason` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17031        pub fn reason_opt_mut(&mut self) -> Option<&mut String> {
17032            self.reason.as_mut().map(|field| field as _)
17033        }
17034        ///Returns a mutable reference to `reason`.
17035        ///If the field is unset, it is first initialized with the default value.
17036        pub fn reason_mut(&mut self) -> &mut String {
17037            self.reason.get_or_insert_default()
17038        }
17039        ///If `reason` is set, returns [`Some`] with the value; otherwise returns [`None`].
17040        pub fn reason_opt(&self) -> Option<&str> {
17041            self.reason.as_ref().map(|field| field as _)
17042        }
17043        ///Sets `reason` with the provided value.
17044        pub fn set_reason<T: Into<String>>(&mut self, field: T) {
17045            self.reason = Some(field.into().into());
17046        }
17047        ///Sets `reason` with the provided value.
17048        pub fn with_reason<T: Into<String>>(mut self, field: T) -> Self {
17049            self.set_reason(field.into());
17050            self
17051        }
17052    }
17053    impl super::VersionAssignment {
17054        pub const fn const_default() -> Self {
17055            Self {
17056                object_id: None,
17057                start_version: None,
17058                version: None,
17059            }
17060        }
17061        #[doc(hidden)]
17062        pub fn default_instance() -> &'static Self {
17063            static DEFAULT: super::VersionAssignment = super::VersionAssignment::const_default();
17064            &DEFAULT
17065        }
17066        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17067        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
17068            self.object_id.as_mut().map(|field| field as _)
17069        }
17070        ///Returns a mutable reference to `object_id`.
17071        ///If the field is unset, it is first initialized with the default value.
17072        pub fn object_id_mut(&mut self) -> &mut String {
17073            self.object_id.get_or_insert_default()
17074        }
17075        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
17076        pub fn object_id_opt(&self) -> Option<&str> {
17077            self.object_id.as_ref().map(|field| field as _)
17078        }
17079        ///Sets `object_id` with the provided value.
17080        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
17081            self.object_id = Some(field.into().into());
17082        }
17083        ///Sets `object_id` with the provided value.
17084        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
17085            self.set_object_id(field.into());
17086            self
17087        }
17088        ///If `start_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17089        pub fn start_version_opt_mut(&mut self) -> Option<&mut u64> {
17090            self.start_version.as_mut().map(|field| field as _)
17091        }
17092        ///Returns a mutable reference to `start_version`.
17093        ///If the field is unset, it is first initialized with the default value.
17094        pub fn start_version_mut(&mut self) -> &mut u64 {
17095            self.start_version.get_or_insert_default()
17096        }
17097        ///If `start_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
17098        pub fn start_version_opt(&self) -> Option<u64> {
17099            self.start_version.as_ref().map(|field| *field)
17100        }
17101        ///Sets `start_version` with the provided value.
17102        pub fn set_start_version<T: Into<u64>>(&mut self, field: T) {
17103            self.start_version = Some(field.into().into());
17104        }
17105        ///Sets `start_version` with the provided value.
17106        pub fn with_start_version<T: Into<u64>>(mut self, field: T) -> Self {
17107            self.set_start_version(field.into());
17108            self
17109        }
17110        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17111        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
17112            self.version.as_mut().map(|field| field as _)
17113        }
17114        ///Returns a mutable reference to `version`.
17115        ///If the field is unset, it is first initialized with the default value.
17116        pub fn version_mut(&mut self) -> &mut u64 {
17117            self.version.get_or_insert_default()
17118        }
17119        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
17120        pub fn version_opt(&self) -> Option<u64> {
17121            self.version.as_ref().map(|field| *field)
17122        }
17123        ///Sets `version` with the provided value.
17124        pub fn set_version<T: Into<u64>>(&mut self, field: T) {
17125            self.version = Some(field.into().into());
17126        }
17127        ///Sets `version` with the provided value.
17128        pub fn with_version<T: Into<u64>>(mut self, field: T) -> Self {
17129            self.set_version(field.into());
17130            self
17131        }
17132    }
17133    impl super::ZkLoginAuthenticator {
17134        pub const fn const_default() -> Self {
17135            Self {
17136                inputs: None,
17137                max_epoch: None,
17138                signature: None,
17139                public_identifier: None,
17140                jwk_id: None,
17141            }
17142        }
17143        #[doc(hidden)]
17144        pub fn default_instance() -> &'static Self {
17145            static DEFAULT: super::ZkLoginAuthenticator = super::ZkLoginAuthenticator::const_default();
17146            &DEFAULT
17147        }
17148        ///Returns the value of `inputs`, or the default value if `inputs` is unset.
17149        pub fn inputs(&self) -> &super::ZkLoginInputs {
17150            self.inputs
17151                .as_ref()
17152                .map(|field| field as _)
17153                .unwrap_or_else(|| super::ZkLoginInputs::default_instance() as _)
17154        }
17155        ///If `inputs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17156        pub fn inputs_opt_mut(&mut self) -> Option<&mut super::ZkLoginInputs> {
17157            self.inputs.as_mut().map(|field| field as _)
17158        }
17159        ///Returns a mutable reference to `inputs`.
17160        ///If the field is unset, it is first initialized with the default value.
17161        pub fn inputs_mut(&mut self) -> &mut super::ZkLoginInputs {
17162            self.inputs.get_or_insert_default()
17163        }
17164        ///If `inputs` is set, returns [`Some`] with the value; otherwise returns [`None`].
17165        pub fn inputs_opt(&self) -> Option<&super::ZkLoginInputs> {
17166            self.inputs.as_ref().map(|field| field as _)
17167        }
17168        ///Sets `inputs` with the provided value.
17169        pub fn set_inputs<T: Into<super::ZkLoginInputs>>(&mut self, field: T) {
17170            self.inputs = Some(field.into().into());
17171        }
17172        ///Sets `inputs` with the provided value.
17173        pub fn with_inputs<T: Into<super::ZkLoginInputs>>(mut self, field: T) -> Self {
17174            self.set_inputs(field.into());
17175            self
17176        }
17177        ///If `max_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17178        pub fn max_epoch_opt_mut(&mut self) -> Option<&mut u64> {
17179            self.max_epoch.as_mut().map(|field| field as _)
17180        }
17181        ///Returns a mutable reference to `max_epoch`.
17182        ///If the field is unset, it is first initialized with the default value.
17183        pub fn max_epoch_mut(&mut self) -> &mut u64 {
17184            self.max_epoch.get_or_insert_default()
17185        }
17186        ///If `max_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
17187        pub fn max_epoch_opt(&self) -> Option<u64> {
17188            self.max_epoch.as_ref().map(|field| *field)
17189        }
17190        ///Sets `max_epoch` with the provided value.
17191        pub fn set_max_epoch<T: Into<u64>>(&mut self, field: T) {
17192            self.max_epoch = Some(field.into().into());
17193        }
17194        ///Sets `max_epoch` with the provided value.
17195        pub fn with_max_epoch<T: Into<u64>>(mut self, field: T) -> Self {
17196            self.set_max_epoch(field.into());
17197            self
17198        }
17199        ///Returns the value of `signature`, or the default value if `signature` is unset.
17200        pub fn signature(&self) -> &super::SimpleSignature {
17201            self.signature
17202                .as_ref()
17203                .map(|field| field as _)
17204                .unwrap_or_else(|| super::SimpleSignature::default_instance() as _)
17205        }
17206        ///If `signature` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17207        pub fn signature_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
17208            self.signature.as_mut().map(|field| field as _)
17209        }
17210        ///Returns a mutable reference to `signature`.
17211        ///If the field is unset, it is first initialized with the default value.
17212        pub fn signature_mut(&mut self) -> &mut super::SimpleSignature {
17213            self.signature.get_or_insert_default()
17214        }
17215        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
17216        pub fn signature_opt(&self) -> Option<&super::SimpleSignature> {
17217            self.signature.as_ref().map(|field| field as _)
17218        }
17219        ///Sets `signature` with the provided value.
17220        pub fn set_signature<T: Into<super::SimpleSignature>>(&mut self, field: T) {
17221            self.signature = Some(field.into().into());
17222        }
17223        ///Sets `signature` with the provided value.
17224        pub fn with_signature<T: Into<super::SimpleSignature>>(
17225            mut self,
17226            field: T,
17227        ) -> Self {
17228            self.set_signature(field.into());
17229            self
17230        }
17231        ///Returns the value of `public_identifier`, or the default value if `public_identifier` is unset.
17232        pub fn public_identifier(&self) -> &super::ZkLoginPublicIdentifier {
17233            self.public_identifier
17234                .as_ref()
17235                .map(|field| field as _)
17236                .unwrap_or_else(|| {
17237                    super::ZkLoginPublicIdentifier::default_instance() as _
17238                })
17239        }
17240        ///If `public_identifier` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17241        pub fn public_identifier_opt_mut(
17242            &mut self,
17243        ) -> Option<&mut super::ZkLoginPublicIdentifier> {
17244            self.public_identifier.as_mut().map(|field| field as _)
17245        }
17246        ///Returns a mutable reference to `public_identifier`.
17247        ///If the field is unset, it is first initialized with the default value.
17248        pub fn public_identifier_mut(&mut self) -> &mut super::ZkLoginPublicIdentifier {
17249            self.public_identifier.get_or_insert_default()
17250        }
17251        ///If `public_identifier` is set, returns [`Some`] with the value; otherwise returns [`None`].
17252        pub fn public_identifier_opt(&self) -> Option<&super::ZkLoginPublicIdentifier> {
17253            self.public_identifier.as_ref().map(|field| field as _)
17254        }
17255        ///Sets `public_identifier` with the provided value.
17256        pub fn set_public_identifier<T: Into<super::ZkLoginPublicIdentifier>>(
17257            &mut self,
17258            field: T,
17259        ) {
17260            self.public_identifier = Some(field.into().into());
17261        }
17262        ///Sets `public_identifier` with the provided value.
17263        pub fn with_public_identifier<T: Into<super::ZkLoginPublicIdentifier>>(
17264            mut self,
17265            field: T,
17266        ) -> Self {
17267            self.set_public_identifier(field.into());
17268            self
17269        }
17270        ///Returns the value of `jwk_id`, or the default value if `jwk_id` is unset.
17271        pub fn jwk_id(&self) -> &super::JwkId {
17272            self.jwk_id
17273                .as_ref()
17274                .map(|field| field as _)
17275                .unwrap_or_else(|| super::JwkId::default_instance() as _)
17276        }
17277        ///If `jwk_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17278        pub fn jwk_id_opt_mut(&mut self) -> Option<&mut super::JwkId> {
17279            self.jwk_id.as_mut().map(|field| field as _)
17280        }
17281        ///Returns a mutable reference to `jwk_id`.
17282        ///If the field is unset, it is first initialized with the default value.
17283        pub fn jwk_id_mut(&mut self) -> &mut super::JwkId {
17284            self.jwk_id.get_or_insert_default()
17285        }
17286        ///If `jwk_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
17287        pub fn jwk_id_opt(&self) -> Option<&super::JwkId> {
17288            self.jwk_id.as_ref().map(|field| field as _)
17289        }
17290        ///Sets `jwk_id` with the provided value.
17291        pub fn set_jwk_id<T: Into<super::JwkId>>(&mut self, field: T) {
17292            self.jwk_id = Some(field.into().into());
17293        }
17294        ///Sets `jwk_id` with the provided value.
17295        pub fn with_jwk_id<T: Into<super::JwkId>>(mut self, field: T) -> Self {
17296            self.set_jwk_id(field.into());
17297            self
17298        }
17299    }
17300    impl super::ZkLoginClaim {
17301        pub const fn const_default() -> Self {
17302            Self {
17303                value: None,
17304                index_mod_4: None,
17305            }
17306        }
17307        #[doc(hidden)]
17308        pub fn default_instance() -> &'static Self {
17309            static DEFAULT: super::ZkLoginClaim = super::ZkLoginClaim::const_default();
17310            &DEFAULT
17311        }
17312        ///If `value` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17313        pub fn value_opt_mut(&mut self) -> Option<&mut String> {
17314            self.value.as_mut().map(|field| field as _)
17315        }
17316        ///Returns a mutable reference to `value`.
17317        ///If the field is unset, it is first initialized with the default value.
17318        pub fn value_mut(&mut self) -> &mut String {
17319            self.value.get_or_insert_default()
17320        }
17321        ///If `value` is set, returns [`Some`] with the value; otherwise returns [`None`].
17322        pub fn value_opt(&self) -> Option<&str> {
17323            self.value.as_ref().map(|field| field as _)
17324        }
17325        ///Sets `value` with the provided value.
17326        pub fn set_value<T: Into<String>>(&mut self, field: T) {
17327            self.value = Some(field.into().into());
17328        }
17329        ///Sets `value` with the provided value.
17330        pub fn with_value<T: Into<String>>(mut self, field: T) -> Self {
17331            self.set_value(field.into());
17332            self
17333        }
17334        ///If `index_mod_4` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17335        pub fn index_mod_4_opt_mut(&mut self) -> Option<&mut u32> {
17336            self.index_mod_4.as_mut().map(|field| field as _)
17337        }
17338        ///Returns a mutable reference to `index_mod_4`.
17339        ///If the field is unset, it is first initialized with the default value.
17340        pub fn index_mod_4_mut(&mut self) -> &mut u32 {
17341            self.index_mod_4.get_or_insert_default()
17342        }
17343        ///If `index_mod_4` is set, returns [`Some`] with the value; otherwise returns [`None`].
17344        pub fn index_mod_4_opt(&self) -> Option<u32> {
17345            self.index_mod_4.as_ref().map(|field| *field)
17346        }
17347        ///Sets `index_mod_4` with the provided value.
17348        pub fn set_index_mod_4<T: Into<u32>>(&mut self, field: T) {
17349            self.index_mod_4 = Some(field.into().into());
17350        }
17351        ///Sets `index_mod_4` with the provided value.
17352        pub fn with_index_mod_4<T: Into<u32>>(mut self, field: T) -> Self {
17353            self.set_index_mod_4(field.into());
17354            self
17355        }
17356    }
17357    impl super::ZkLoginInputs {
17358        pub const fn const_default() -> Self {
17359            Self {
17360                proof_points: None,
17361                iss_base64_details: None,
17362                header_base64: None,
17363                address_seed: None,
17364            }
17365        }
17366        #[doc(hidden)]
17367        pub fn default_instance() -> &'static Self {
17368            static DEFAULT: super::ZkLoginInputs = super::ZkLoginInputs::const_default();
17369            &DEFAULT
17370        }
17371        ///Returns the value of `proof_points`, or the default value if `proof_points` is unset.
17372        pub fn proof_points(&self) -> &super::ZkLoginProof {
17373            self.proof_points
17374                .as_ref()
17375                .map(|field| field as _)
17376                .unwrap_or_else(|| super::ZkLoginProof::default_instance() as _)
17377        }
17378        ///If `proof_points` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17379        pub fn proof_points_opt_mut(&mut self) -> Option<&mut super::ZkLoginProof> {
17380            self.proof_points.as_mut().map(|field| field as _)
17381        }
17382        ///Returns a mutable reference to `proof_points`.
17383        ///If the field is unset, it is first initialized with the default value.
17384        pub fn proof_points_mut(&mut self) -> &mut super::ZkLoginProof {
17385            self.proof_points.get_or_insert_default()
17386        }
17387        ///If `proof_points` is set, returns [`Some`] with the value; otherwise returns [`None`].
17388        pub fn proof_points_opt(&self) -> Option<&super::ZkLoginProof> {
17389            self.proof_points.as_ref().map(|field| field as _)
17390        }
17391        ///Sets `proof_points` with the provided value.
17392        pub fn set_proof_points<T: Into<super::ZkLoginProof>>(&mut self, field: T) {
17393            self.proof_points = Some(field.into().into());
17394        }
17395        ///Sets `proof_points` with the provided value.
17396        pub fn with_proof_points<T: Into<super::ZkLoginProof>>(
17397            mut self,
17398            field: T,
17399        ) -> Self {
17400            self.set_proof_points(field.into());
17401            self
17402        }
17403        ///Returns the value of `iss_base64_details`, or the default value if `iss_base64_details` is unset.
17404        pub fn iss_base64_details(&self) -> &super::ZkLoginClaim {
17405            self.iss_base64_details
17406                .as_ref()
17407                .map(|field| field as _)
17408                .unwrap_or_else(|| super::ZkLoginClaim::default_instance() as _)
17409        }
17410        ///If `iss_base64_details` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17411        pub fn iss_base64_details_opt_mut(
17412            &mut self,
17413        ) -> Option<&mut super::ZkLoginClaim> {
17414            self.iss_base64_details.as_mut().map(|field| field as _)
17415        }
17416        ///Returns a mutable reference to `iss_base64_details`.
17417        ///If the field is unset, it is first initialized with the default value.
17418        pub fn iss_base64_details_mut(&mut self) -> &mut super::ZkLoginClaim {
17419            self.iss_base64_details.get_or_insert_default()
17420        }
17421        ///If `iss_base64_details` is set, returns [`Some`] with the value; otherwise returns [`None`].
17422        pub fn iss_base64_details_opt(&self) -> Option<&super::ZkLoginClaim> {
17423            self.iss_base64_details.as_ref().map(|field| field as _)
17424        }
17425        ///Sets `iss_base64_details` with the provided value.
17426        pub fn set_iss_base64_details<T: Into<super::ZkLoginClaim>>(
17427            &mut self,
17428            field: T,
17429        ) {
17430            self.iss_base64_details = Some(field.into().into());
17431        }
17432        ///Sets `iss_base64_details` with the provided value.
17433        pub fn with_iss_base64_details<T: Into<super::ZkLoginClaim>>(
17434            mut self,
17435            field: T,
17436        ) -> Self {
17437            self.set_iss_base64_details(field.into());
17438            self
17439        }
17440        ///If `header_base64` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17441        pub fn header_base64_opt_mut(&mut self) -> Option<&mut String> {
17442            self.header_base64.as_mut().map(|field| field as _)
17443        }
17444        ///Returns a mutable reference to `header_base64`.
17445        ///If the field is unset, it is first initialized with the default value.
17446        pub fn header_base64_mut(&mut self) -> &mut String {
17447            self.header_base64.get_or_insert_default()
17448        }
17449        ///If `header_base64` is set, returns [`Some`] with the value; otherwise returns [`None`].
17450        pub fn header_base64_opt(&self) -> Option<&str> {
17451            self.header_base64.as_ref().map(|field| field as _)
17452        }
17453        ///Sets `header_base64` with the provided value.
17454        pub fn set_header_base64<T: Into<String>>(&mut self, field: T) {
17455            self.header_base64 = Some(field.into().into());
17456        }
17457        ///Sets `header_base64` with the provided value.
17458        pub fn with_header_base64<T: Into<String>>(mut self, field: T) -> Self {
17459            self.set_header_base64(field.into());
17460            self
17461        }
17462        ///If `address_seed` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17463        pub fn address_seed_opt_mut(&mut self) -> Option<&mut String> {
17464            self.address_seed.as_mut().map(|field| field as _)
17465        }
17466        ///Returns a mutable reference to `address_seed`.
17467        ///If the field is unset, it is first initialized with the default value.
17468        pub fn address_seed_mut(&mut self) -> &mut String {
17469            self.address_seed.get_or_insert_default()
17470        }
17471        ///If `address_seed` is set, returns [`Some`] with the value; otherwise returns [`None`].
17472        pub fn address_seed_opt(&self) -> Option<&str> {
17473            self.address_seed.as_ref().map(|field| field as _)
17474        }
17475        ///Sets `address_seed` with the provided value.
17476        pub fn set_address_seed<T: Into<String>>(&mut self, field: T) {
17477            self.address_seed = Some(field.into().into());
17478        }
17479        ///Sets `address_seed` with the provided value.
17480        pub fn with_address_seed<T: Into<String>>(mut self, field: T) -> Self {
17481            self.set_address_seed(field.into());
17482            self
17483        }
17484    }
17485    impl super::ZkLoginProof {
17486        pub const fn const_default() -> Self {
17487            Self { a: None, b: None, c: None }
17488        }
17489        #[doc(hidden)]
17490        pub fn default_instance() -> &'static Self {
17491            static DEFAULT: super::ZkLoginProof = super::ZkLoginProof::const_default();
17492            &DEFAULT
17493        }
17494        ///Returns the value of `a`, or the default value if `a` is unset.
17495        pub fn a(&self) -> &super::CircomG1 {
17496            self.a
17497                .as_ref()
17498                .map(|field| field as _)
17499                .unwrap_or_else(|| super::CircomG1::default_instance() as _)
17500        }
17501        ///If `a` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17502        pub fn a_opt_mut(&mut self) -> Option<&mut super::CircomG1> {
17503            self.a.as_mut().map(|field| field as _)
17504        }
17505        ///Returns a mutable reference to `a`.
17506        ///If the field is unset, it is first initialized with the default value.
17507        pub fn a_mut(&mut self) -> &mut super::CircomG1 {
17508            self.a.get_or_insert_default()
17509        }
17510        ///If `a` is set, returns [`Some`] with the value; otherwise returns [`None`].
17511        pub fn a_opt(&self) -> Option<&super::CircomG1> {
17512            self.a.as_ref().map(|field| field as _)
17513        }
17514        ///Sets `a` with the provided value.
17515        pub fn set_a<T: Into<super::CircomG1>>(&mut self, field: T) {
17516            self.a = Some(field.into().into());
17517        }
17518        ///Sets `a` with the provided value.
17519        pub fn with_a<T: Into<super::CircomG1>>(mut self, field: T) -> Self {
17520            self.set_a(field.into());
17521            self
17522        }
17523        ///Returns the value of `b`, or the default value if `b` is unset.
17524        pub fn b(&self) -> &super::CircomG2 {
17525            self.b
17526                .as_ref()
17527                .map(|field| field as _)
17528                .unwrap_or_else(|| super::CircomG2::default_instance() as _)
17529        }
17530        ///If `b` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17531        pub fn b_opt_mut(&mut self) -> Option<&mut super::CircomG2> {
17532            self.b.as_mut().map(|field| field as _)
17533        }
17534        ///Returns a mutable reference to `b`.
17535        ///If the field is unset, it is first initialized with the default value.
17536        pub fn b_mut(&mut self) -> &mut super::CircomG2 {
17537            self.b.get_or_insert_default()
17538        }
17539        ///If `b` is set, returns [`Some`] with the value; otherwise returns [`None`].
17540        pub fn b_opt(&self) -> Option<&super::CircomG2> {
17541            self.b.as_ref().map(|field| field as _)
17542        }
17543        ///Sets `b` with the provided value.
17544        pub fn set_b<T: Into<super::CircomG2>>(&mut self, field: T) {
17545            self.b = Some(field.into().into());
17546        }
17547        ///Sets `b` with the provided value.
17548        pub fn with_b<T: Into<super::CircomG2>>(mut self, field: T) -> Self {
17549            self.set_b(field.into());
17550            self
17551        }
17552        ///Returns the value of `c`, or the default value if `c` is unset.
17553        pub fn c(&self) -> &super::CircomG1 {
17554            self.c
17555                .as_ref()
17556                .map(|field| field as _)
17557                .unwrap_or_else(|| super::CircomG1::default_instance() as _)
17558        }
17559        ///If `c` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17560        pub fn c_opt_mut(&mut self) -> Option<&mut super::CircomG1> {
17561            self.c.as_mut().map(|field| field as _)
17562        }
17563        ///Returns a mutable reference to `c`.
17564        ///If the field is unset, it is first initialized with the default value.
17565        pub fn c_mut(&mut self) -> &mut super::CircomG1 {
17566            self.c.get_or_insert_default()
17567        }
17568        ///If `c` is set, returns [`Some`] with the value; otherwise returns [`None`].
17569        pub fn c_opt(&self) -> Option<&super::CircomG1> {
17570            self.c.as_ref().map(|field| field as _)
17571        }
17572        ///Sets `c` with the provided value.
17573        pub fn set_c<T: Into<super::CircomG1>>(&mut self, field: T) {
17574            self.c = Some(field.into().into());
17575        }
17576        ///Sets `c` with the provided value.
17577        pub fn with_c<T: Into<super::CircomG1>>(mut self, field: T) -> Self {
17578            self.set_c(field.into());
17579            self
17580        }
17581    }
17582    impl super::ZkLoginPublicIdentifier {
17583        pub const fn const_default() -> Self {
17584            Self {
17585                iss: None,
17586                address_seed: None,
17587            }
17588        }
17589        #[doc(hidden)]
17590        pub fn default_instance() -> &'static Self {
17591            static DEFAULT: super::ZkLoginPublicIdentifier = super::ZkLoginPublicIdentifier::const_default();
17592            &DEFAULT
17593        }
17594        ///If `iss` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17595        pub fn iss_opt_mut(&mut self) -> Option<&mut String> {
17596            self.iss.as_mut().map(|field| field as _)
17597        }
17598        ///Returns a mutable reference to `iss`.
17599        ///If the field is unset, it is first initialized with the default value.
17600        pub fn iss_mut(&mut self) -> &mut String {
17601            self.iss.get_or_insert_default()
17602        }
17603        ///If `iss` is set, returns [`Some`] with the value; otherwise returns [`None`].
17604        pub fn iss_opt(&self) -> Option<&str> {
17605            self.iss.as_ref().map(|field| field as _)
17606        }
17607        ///Sets `iss` with the provided value.
17608        pub fn set_iss<T: Into<String>>(&mut self, field: T) {
17609            self.iss = Some(field.into().into());
17610        }
17611        ///Sets `iss` with the provided value.
17612        pub fn with_iss<T: Into<String>>(mut self, field: T) -> Self {
17613            self.set_iss(field.into());
17614            self
17615        }
17616        ///If `address_seed` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17617        pub fn address_seed_opt_mut(&mut self) -> Option<&mut String> {
17618            self.address_seed.as_mut().map(|field| field as _)
17619        }
17620        ///Returns a mutable reference to `address_seed`.
17621        ///If the field is unset, it is first initialized with the default value.
17622        pub fn address_seed_mut(&mut self) -> &mut String {
17623            self.address_seed.get_or_insert_default()
17624        }
17625        ///If `address_seed` is set, returns [`Some`] with the value; otherwise returns [`None`].
17626        pub fn address_seed_opt(&self) -> Option<&str> {
17627            self.address_seed.as_ref().map(|field| field as _)
17628        }
17629        ///Sets `address_seed` with the provided value.
17630        pub fn set_address_seed<T: Into<String>>(&mut self, field: T) {
17631            self.address_seed = Some(field.into().into());
17632        }
17633        ///Sets `address_seed` with the provided value.
17634        pub fn with_address_seed<T: Into<String>>(mut self, field: T) -> Self {
17635            self.set_address_seed(field.into());
17636            self
17637        }
17638    }
17639}