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

1mod _accessor_impls {
2    #![allow(clippy::useless_conversion)]
3    impl super::AccumulatorWrite {
4        pub const fn const_default() -> Self {
5            Self {
6                address: None,
7                accumulator_type: None,
8                operation: None,
9                value: None,
10            }
11        }
12        #[doc(hidden)]
13        pub fn default_instance() -> &'static Self {
14            static DEFAULT: super::AccumulatorWrite = super::AccumulatorWrite::const_default();
15            &DEFAULT
16        }
17        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
18        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
19            self.address.as_mut().map(|field| field as _)
20        }
21        ///Returns a mutable reference to `address`.
22        ///If the field is unset, it is first initialized with the default value.
23        pub fn address_mut(&mut self) -> &mut String {
24            self.address.get_or_insert_default()
25        }
26        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
27        pub fn address_opt(&self) -> Option<&str> {
28            self.address.as_ref().map(|field| field as _)
29        }
30        ///Sets `address` with the provided value.
31        pub fn set_address<T: Into<String>>(&mut self, field: T) {
32            self.address = Some(field.into().into());
33        }
34        ///Sets `address` with the provided value.
35        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
36            self.set_address(field.into());
37            self
38        }
39        ///If `accumulator_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
40        pub fn accumulator_type_opt_mut(&mut self) -> Option<&mut String> {
41            self.accumulator_type.as_mut().map(|field| field as _)
42        }
43        ///Returns a mutable reference to `accumulator_type`.
44        ///If the field is unset, it is first initialized with the default value.
45        pub fn accumulator_type_mut(&mut self) -> &mut String {
46            self.accumulator_type.get_or_insert_default()
47        }
48        ///If `accumulator_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
49        pub fn accumulator_type_opt(&self) -> Option<&str> {
50            self.accumulator_type.as_ref().map(|field| field as _)
51        }
52        ///Sets `accumulator_type` with the provided value.
53        pub fn set_accumulator_type<T: Into<String>>(&mut self, field: T) {
54            self.accumulator_type = Some(field.into().into());
55        }
56        ///Sets `accumulator_type` with the provided value.
57        pub fn with_accumulator_type<T: Into<String>>(mut self, field: T) -> Self {
58            self.set_accumulator_type(field.into());
59            self
60        }
61        ///Sets `operation` with the provided value.
62        pub fn with_operation<T: Into<super::accumulator_write::AccumulatorOperation>>(
63            mut self,
64            field: T,
65        ) -> Self {
66            self.set_operation(field.into());
67            self
68        }
69        ///If `value` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
70        pub fn value_opt_mut(&mut self) -> Option<&mut u64> {
71            self.value.as_mut().map(|field| field as _)
72        }
73        ///Returns a mutable reference to `value`.
74        ///If the field is unset, it is first initialized with the default value.
75        pub fn value_mut(&mut self) -> &mut u64 {
76            self.value.get_or_insert_default()
77        }
78        ///If `value` is set, returns [`Some`] with the value; otherwise returns [`None`].
79        pub fn value_opt(&self) -> Option<u64> {
80            self.value.as_ref().map(|field| *field)
81        }
82        ///Sets `value` with the provided value.
83        pub fn set_value(&mut self, field: u64) {
84            self.value = Some(field);
85        }
86        ///Sets `value` with the provided value.
87        pub fn with_value(mut self, field: u64) -> Self {
88            self.set_value(field);
89            self
90        }
91    }
92    impl super::ActiveJwk {
93        pub const fn const_default() -> Self {
94            Self {
95                id: None,
96                jwk: None,
97                epoch: None,
98            }
99        }
100        #[doc(hidden)]
101        pub fn default_instance() -> &'static Self {
102            static DEFAULT: super::ActiveJwk = super::ActiveJwk::const_default();
103            &DEFAULT
104        }
105        ///Returns the value of `id`, or the default value if `id` is unset.
106        pub fn id(&self) -> &super::JwkId {
107            self.id
108                .as_ref()
109                .map(|field| field as _)
110                .unwrap_or_else(|| super::JwkId::default_instance() as _)
111        }
112        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
113        pub fn id_opt_mut(&mut self) -> Option<&mut super::JwkId> {
114            self.id.as_mut().map(|field| field as _)
115        }
116        ///Returns a mutable reference to `id`.
117        ///If the field is unset, it is first initialized with the default value.
118        pub fn id_mut(&mut self) -> &mut super::JwkId {
119            self.id.get_or_insert_default()
120        }
121        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
122        pub fn id_opt(&self) -> Option<&super::JwkId> {
123            self.id.as_ref().map(|field| field as _)
124        }
125        ///Sets `id` with the provided value.
126        pub fn set_id<T: Into<super::JwkId>>(&mut self, field: T) {
127            self.id = Some(field.into().into());
128        }
129        ///Sets `id` with the provided value.
130        pub fn with_id<T: Into<super::JwkId>>(mut self, field: T) -> Self {
131            self.set_id(field.into());
132            self
133        }
134        ///Returns the value of `jwk`, or the default value if `jwk` is unset.
135        pub fn jwk(&self) -> &super::Jwk {
136            self.jwk
137                .as_ref()
138                .map(|field| field as _)
139                .unwrap_or_else(|| super::Jwk::default_instance() as _)
140        }
141        ///If `jwk` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
142        pub fn jwk_opt_mut(&mut self) -> Option<&mut super::Jwk> {
143            self.jwk.as_mut().map(|field| field as _)
144        }
145        ///Returns a mutable reference to `jwk`.
146        ///If the field is unset, it is first initialized with the default value.
147        pub fn jwk_mut(&mut self) -> &mut super::Jwk {
148            self.jwk.get_or_insert_default()
149        }
150        ///If `jwk` is set, returns [`Some`] with the value; otherwise returns [`None`].
151        pub fn jwk_opt(&self) -> Option<&super::Jwk> {
152            self.jwk.as_ref().map(|field| field as _)
153        }
154        ///Sets `jwk` with the provided value.
155        pub fn set_jwk<T: Into<super::Jwk>>(&mut self, field: T) {
156            self.jwk = Some(field.into().into());
157        }
158        ///Sets `jwk` with the provided value.
159        pub fn with_jwk<T: Into<super::Jwk>>(mut self, field: T) -> Self {
160            self.set_jwk(field.into());
161            self
162        }
163        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
164        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
165            self.epoch.as_mut().map(|field| field as _)
166        }
167        ///Returns a mutable reference to `epoch`.
168        ///If the field is unset, it is first initialized with the default value.
169        pub fn epoch_mut(&mut self) -> &mut u64 {
170            self.epoch.get_or_insert_default()
171        }
172        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
173        pub fn epoch_opt(&self) -> Option<u64> {
174            self.epoch.as_ref().map(|field| *field)
175        }
176        ///Sets `epoch` with the provided value.
177        pub fn set_epoch(&mut self, field: u64) {
178            self.epoch = Some(field);
179        }
180        ///Sets `epoch` with the provided value.
181        pub fn with_epoch(mut self, field: u64) -> Self {
182            self.set_epoch(field);
183            self
184        }
185    }
186    impl super::AddressAliasesVersion {
187        pub const fn const_default() -> Self {
188            Self { version: None }
189        }
190        #[doc(hidden)]
191        pub fn default_instance() -> &'static Self {
192            static DEFAULT: super::AddressAliasesVersion = super::AddressAliasesVersion::const_default();
193            &DEFAULT
194        }
195        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
196        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
197            self.version.as_mut().map(|field| field as _)
198        }
199        ///Returns a mutable reference to `version`.
200        ///If the field is unset, it is first initialized with the default value.
201        pub fn version_mut(&mut self) -> &mut u64 {
202            self.version.get_or_insert_default()
203        }
204        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
205        pub fn version_opt(&self) -> Option<u64> {
206            self.version.as_ref().map(|field| *field)
207        }
208        ///Sets `version` with the provided value.
209        pub fn set_version(&mut self, field: u64) {
210            self.version = Some(field);
211        }
212        ///Sets `version` with the provided value.
213        pub fn with_version(mut self, field: u64) -> Self {
214            self.set_version(field);
215            self
216        }
217    }
218    impl super::Argument {
219        pub const fn const_default() -> Self {
220            Self {
221                kind: None,
222                input: None,
223                result: None,
224                subresult: None,
225            }
226        }
227        #[doc(hidden)]
228        pub fn default_instance() -> &'static Self {
229            static DEFAULT: super::Argument = super::Argument::const_default();
230            &DEFAULT
231        }
232        ///Sets `kind` with the provided value.
233        pub fn with_kind<T: Into<super::argument::ArgumentKind>>(
234            mut self,
235            field: T,
236        ) -> Self {
237            self.set_kind(field.into());
238            self
239        }
240        ///If `input` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
241        pub fn input_opt_mut(&mut self) -> Option<&mut u32> {
242            self.input.as_mut().map(|field| field as _)
243        }
244        ///Returns a mutable reference to `input`.
245        ///If the field is unset, it is first initialized with the default value.
246        pub fn input_mut(&mut self) -> &mut u32 {
247            self.input.get_or_insert_default()
248        }
249        ///If `input` is set, returns [`Some`] with the value; otherwise returns [`None`].
250        pub fn input_opt(&self) -> Option<u32> {
251            self.input.as_ref().map(|field| *field)
252        }
253        ///Sets `input` with the provided value.
254        pub fn set_input(&mut self, field: u32) {
255            self.input = Some(field);
256        }
257        ///Sets `input` with the provided value.
258        pub fn with_input(mut self, field: u32) -> Self {
259            self.set_input(field);
260            self
261        }
262        ///If `result` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
263        pub fn result_opt_mut(&mut self) -> Option<&mut u32> {
264            self.result.as_mut().map(|field| field as _)
265        }
266        ///Returns a mutable reference to `result`.
267        ///If the field is unset, it is first initialized with the default value.
268        pub fn result_mut(&mut self) -> &mut u32 {
269            self.result.get_or_insert_default()
270        }
271        ///If `result` is set, returns [`Some`] with the value; otherwise returns [`None`].
272        pub fn result_opt(&self) -> Option<u32> {
273            self.result.as_ref().map(|field| *field)
274        }
275        ///Sets `result` with the provided value.
276        pub fn set_result(&mut self, field: u32) {
277            self.result = Some(field);
278        }
279        ///Sets `result` with the provided value.
280        pub fn with_result(mut self, field: u32) -> Self {
281            self.set_result(field);
282            self
283        }
284        ///If `subresult` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
285        pub fn subresult_opt_mut(&mut self) -> Option<&mut u32> {
286            self.subresult.as_mut().map(|field| field as _)
287        }
288        ///Returns a mutable reference to `subresult`.
289        ///If the field is unset, it is first initialized with the default value.
290        pub fn subresult_mut(&mut self) -> &mut u32 {
291            self.subresult.get_or_insert_default()
292        }
293        ///If `subresult` is set, returns [`Some`] with the value; otherwise returns [`None`].
294        pub fn subresult_opt(&self) -> Option<u32> {
295            self.subresult.as_ref().map(|field| *field)
296        }
297        ///Sets `subresult` with the provided value.
298        pub fn set_subresult(&mut self, field: u32) {
299            self.subresult = Some(field);
300        }
301        ///Sets `subresult` with the provided value.
302        pub fn with_subresult(mut self, field: u32) -> Self {
303            self.set_subresult(field);
304            self
305        }
306    }
307    impl super::AuthenticatorStateExpire {
308        pub const fn const_default() -> Self {
309            Self {
310                min_epoch: None,
311                authenticator_object_initial_shared_version: None,
312            }
313        }
314        #[doc(hidden)]
315        pub fn default_instance() -> &'static Self {
316            static DEFAULT: super::AuthenticatorStateExpire = super::AuthenticatorStateExpire::const_default();
317            &DEFAULT
318        }
319        ///If `min_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
320        pub fn min_epoch_opt_mut(&mut self) -> Option<&mut u64> {
321            self.min_epoch.as_mut().map(|field| field as _)
322        }
323        ///Returns a mutable reference to `min_epoch`.
324        ///If the field is unset, it is first initialized with the default value.
325        pub fn min_epoch_mut(&mut self) -> &mut u64 {
326            self.min_epoch.get_or_insert_default()
327        }
328        ///If `min_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
329        pub fn min_epoch_opt(&self) -> Option<u64> {
330            self.min_epoch.as_ref().map(|field| *field)
331        }
332        ///Sets `min_epoch` with the provided value.
333        pub fn set_min_epoch(&mut self, field: u64) {
334            self.min_epoch = Some(field);
335        }
336        ///Sets `min_epoch` with the provided value.
337        pub fn with_min_epoch(mut self, field: u64) -> Self {
338            self.set_min_epoch(field);
339            self
340        }
341        ///If `authenticator_object_initial_shared_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
342        pub fn authenticator_object_initial_shared_version_opt_mut(
343            &mut self,
344        ) -> Option<&mut u64> {
345            self.authenticator_object_initial_shared_version
346                .as_mut()
347                .map(|field| field as _)
348        }
349        ///Returns a mutable reference to `authenticator_object_initial_shared_version`.
350        ///If the field is unset, it is first initialized with the default value.
351        pub fn authenticator_object_initial_shared_version_mut(&mut self) -> &mut u64 {
352            self.authenticator_object_initial_shared_version.get_or_insert_default()
353        }
354        ///If `authenticator_object_initial_shared_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
355        pub fn authenticator_object_initial_shared_version_opt(&self) -> Option<u64> {
356            self.authenticator_object_initial_shared_version.as_ref().map(|field| *field)
357        }
358        ///Sets `authenticator_object_initial_shared_version` with the provided value.
359        pub fn set_authenticator_object_initial_shared_version(&mut self, field: u64) {
360            self.authenticator_object_initial_shared_version = Some(field);
361        }
362        ///Sets `authenticator_object_initial_shared_version` with the provided value.
363        pub fn with_authenticator_object_initial_shared_version(
364            mut self,
365            field: u64,
366        ) -> Self {
367            self.set_authenticator_object_initial_shared_version(field);
368            self
369        }
370    }
371    impl super::AuthenticatorStateUpdate {
372        pub const fn const_default() -> Self {
373            Self {
374                epoch: None,
375                round: None,
376                new_active_jwks: Vec::new(),
377                authenticator_object_initial_shared_version: None,
378            }
379        }
380        #[doc(hidden)]
381        pub fn default_instance() -> &'static Self {
382            static DEFAULT: super::AuthenticatorStateUpdate = super::AuthenticatorStateUpdate::const_default();
383            &DEFAULT
384        }
385        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
386        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
387            self.epoch.as_mut().map(|field| field as _)
388        }
389        ///Returns a mutable reference to `epoch`.
390        ///If the field is unset, it is first initialized with the default value.
391        pub fn epoch_mut(&mut self) -> &mut u64 {
392            self.epoch.get_or_insert_default()
393        }
394        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
395        pub fn epoch_opt(&self) -> Option<u64> {
396            self.epoch.as_ref().map(|field| *field)
397        }
398        ///Sets `epoch` with the provided value.
399        pub fn set_epoch(&mut self, field: u64) {
400            self.epoch = Some(field);
401        }
402        ///Sets `epoch` with the provided value.
403        pub fn with_epoch(mut self, field: u64) -> Self {
404            self.set_epoch(field);
405            self
406        }
407        ///If `round` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
408        pub fn round_opt_mut(&mut self) -> Option<&mut u64> {
409            self.round.as_mut().map(|field| field as _)
410        }
411        ///Returns a mutable reference to `round`.
412        ///If the field is unset, it is first initialized with the default value.
413        pub fn round_mut(&mut self) -> &mut u64 {
414            self.round.get_or_insert_default()
415        }
416        ///If `round` is set, returns [`Some`] with the value; otherwise returns [`None`].
417        pub fn round_opt(&self) -> Option<u64> {
418            self.round.as_ref().map(|field| *field)
419        }
420        ///Sets `round` with the provided value.
421        pub fn set_round(&mut self, field: u64) {
422            self.round = Some(field);
423        }
424        ///Sets `round` with the provided value.
425        pub fn with_round(mut self, field: u64) -> Self {
426            self.set_round(field);
427            self
428        }
429        ///Returns the value of `new_active_jwks`, or the default value if `new_active_jwks` is unset.
430        pub fn new_active_jwks(&self) -> &[super::ActiveJwk] {
431            &self.new_active_jwks
432        }
433        ///Returns a mutable reference to `new_active_jwks`.
434        ///If the field is unset, it is first initialized with the default value.
435        pub fn new_active_jwks_mut(&mut self) -> &mut Vec<super::ActiveJwk> {
436            &mut self.new_active_jwks
437        }
438        ///Sets `new_active_jwks` with the provided value.
439        pub fn set_new_active_jwks(&mut self, field: Vec<super::ActiveJwk>) {
440            self.new_active_jwks = field;
441        }
442        ///Sets `new_active_jwks` with the provided value.
443        pub fn with_new_active_jwks(mut self, field: Vec<super::ActiveJwk>) -> Self {
444            self.set_new_active_jwks(field);
445            self
446        }
447        ///If `authenticator_object_initial_shared_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
448        pub fn authenticator_object_initial_shared_version_opt_mut(
449            &mut self,
450        ) -> Option<&mut u64> {
451            self.authenticator_object_initial_shared_version
452                .as_mut()
453                .map(|field| field as _)
454        }
455        ///Returns a mutable reference to `authenticator_object_initial_shared_version`.
456        ///If the field is unset, it is first initialized with the default value.
457        pub fn authenticator_object_initial_shared_version_mut(&mut self) -> &mut u64 {
458            self.authenticator_object_initial_shared_version.get_or_insert_default()
459        }
460        ///If `authenticator_object_initial_shared_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
461        pub fn authenticator_object_initial_shared_version_opt(&self) -> Option<u64> {
462            self.authenticator_object_initial_shared_version.as_ref().map(|field| *field)
463        }
464        ///Sets `authenticator_object_initial_shared_version` with the provided value.
465        pub fn set_authenticator_object_initial_shared_version(&mut self, field: u64) {
466            self.authenticator_object_initial_shared_version = Some(field);
467        }
468        ///Sets `authenticator_object_initial_shared_version` with the provided value.
469        pub fn with_authenticator_object_initial_shared_version(
470            mut self,
471            field: u64,
472        ) -> Self {
473            self.set_authenticator_object_initial_shared_version(field);
474            self
475        }
476    }
477    impl super::Balance {
478        pub const fn const_default() -> Self {
479            Self {
480                coin_type: None,
481                balance: None,
482            }
483        }
484        #[doc(hidden)]
485        pub fn default_instance() -> &'static Self {
486            static DEFAULT: super::Balance = super::Balance::const_default();
487            &DEFAULT
488        }
489        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
490        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
491            self.coin_type.as_mut().map(|field| field as _)
492        }
493        ///Returns a mutable reference to `coin_type`.
494        ///If the field is unset, it is first initialized with the default value.
495        pub fn coin_type_mut(&mut self) -> &mut String {
496            self.coin_type.get_or_insert_default()
497        }
498        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
499        pub fn coin_type_opt(&self) -> Option<&str> {
500            self.coin_type.as_ref().map(|field| field as _)
501        }
502        ///Sets `coin_type` with the provided value.
503        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
504            self.coin_type = Some(field.into().into());
505        }
506        ///Sets `coin_type` with the provided value.
507        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
508            self.set_coin_type(field.into());
509            self
510        }
511        ///If `balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
512        pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
513            self.balance.as_mut().map(|field| field as _)
514        }
515        ///Returns a mutable reference to `balance`.
516        ///If the field is unset, it is first initialized with the default value.
517        pub fn balance_mut(&mut self) -> &mut u64 {
518            self.balance.get_or_insert_default()
519        }
520        ///If `balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
521        pub fn balance_opt(&self) -> Option<u64> {
522            self.balance.as_ref().map(|field| *field)
523        }
524        ///Sets `balance` with the provided value.
525        pub fn set_balance(&mut self, field: u64) {
526            self.balance = Some(field);
527        }
528        ///Sets `balance` with the provided value.
529        pub fn with_balance(mut self, field: u64) -> Self {
530            self.set_balance(field);
531            self
532        }
533    }
534    impl super::BalanceChange {
535        pub const fn const_default() -> Self {
536            Self {
537                address: None,
538                coin_type: None,
539                amount: None,
540            }
541        }
542        #[doc(hidden)]
543        pub fn default_instance() -> &'static Self {
544            static DEFAULT: super::BalanceChange = super::BalanceChange::const_default();
545            &DEFAULT
546        }
547        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
548        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
549            self.address.as_mut().map(|field| field as _)
550        }
551        ///Returns a mutable reference to `address`.
552        ///If the field is unset, it is first initialized with the default value.
553        pub fn address_mut(&mut self) -> &mut String {
554            self.address.get_or_insert_default()
555        }
556        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
557        pub fn address_opt(&self) -> Option<&str> {
558            self.address.as_ref().map(|field| field as _)
559        }
560        ///Sets `address` with the provided value.
561        pub fn set_address<T: Into<String>>(&mut self, field: T) {
562            self.address = Some(field.into().into());
563        }
564        ///Sets `address` with the provided value.
565        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
566            self.set_address(field.into());
567            self
568        }
569        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
570        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
571            self.coin_type.as_mut().map(|field| field as _)
572        }
573        ///Returns a mutable reference to `coin_type`.
574        ///If the field is unset, it is first initialized with the default value.
575        pub fn coin_type_mut(&mut self) -> &mut String {
576            self.coin_type.get_or_insert_default()
577        }
578        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
579        pub fn coin_type_opt(&self) -> Option<&str> {
580            self.coin_type.as_ref().map(|field| field as _)
581        }
582        ///Sets `coin_type` with the provided value.
583        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
584            self.coin_type = Some(field.into().into());
585        }
586        ///Sets `coin_type` with the provided value.
587        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
588            self.set_coin_type(field.into());
589            self
590        }
591        ///If `amount` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
592        pub fn amount_opt_mut(&mut self) -> Option<&mut String> {
593            self.amount.as_mut().map(|field| field as _)
594        }
595        ///Returns a mutable reference to `amount`.
596        ///If the field is unset, it is first initialized with the default value.
597        pub fn amount_mut(&mut self) -> &mut String {
598            self.amount.get_or_insert_default()
599        }
600        ///If `amount` is set, returns [`Some`] with the value; otherwise returns [`None`].
601        pub fn amount_opt(&self) -> Option<&str> {
602            self.amount.as_ref().map(|field| field as _)
603        }
604        ///Sets `amount` with the provided value.
605        pub fn set_amount<T: Into<String>>(&mut self, field: T) {
606            self.amount = Some(field.into().into());
607        }
608        ///Sets `amount` with the provided value.
609        pub fn with_amount<T: Into<String>>(mut self, field: T) -> Self {
610            self.set_amount(field.into());
611            self
612        }
613    }
614    impl super::BatchGetObjectsRequest {
615        pub const fn const_default() -> Self {
616            Self {
617                requests: Vec::new(),
618                read_mask: None,
619            }
620        }
621        #[doc(hidden)]
622        pub fn default_instance() -> &'static Self {
623            static DEFAULT: super::BatchGetObjectsRequest = super::BatchGetObjectsRequest::const_default();
624            &DEFAULT
625        }
626        ///Returns the value of `requests`, or the default value if `requests` is unset.
627        pub fn requests(&self) -> &[super::GetObjectRequest] {
628            &self.requests
629        }
630        ///Returns a mutable reference to `requests`.
631        ///If the field is unset, it is first initialized with the default value.
632        pub fn requests_mut(&mut self) -> &mut Vec<super::GetObjectRequest> {
633            &mut self.requests
634        }
635        ///Sets `requests` with the provided value.
636        pub fn set_requests(&mut self, field: Vec<super::GetObjectRequest>) {
637            self.requests = field;
638        }
639        ///Sets `requests` with the provided value.
640        pub fn with_requests(mut self, field: Vec<super::GetObjectRequest>) -> Self {
641            self.set_requests(field);
642            self
643        }
644        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
645        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
646            self.read_mask.as_mut().map(|field| field as _)
647        }
648        ///Returns a mutable reference to `read_mask`.
649        ///If the field is unset, it is first initialized with the default value.
650        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
651            self.read_mask.get_or_insert_default()
652        }
653        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
654        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
655            self.read_mask.as_ref().map(|field| field as _)
656        }
657        ///Sets `read_mask` with the provided value.
658        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
659            self.read_mask = Some(field.into().into());
660        }
661        ///Sets `read_mask` with the provided value.
662        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
663            mut self,
664            field: T,
665        ) -> Self {
666            self.set_read_mask(field.into());
667            self
668        }
669    }
670    impl super::BatchGetObjectsResponse {
671        pub const fn const_default() -> Self {
672            Self { objects: Vec::new() }
673        }
674        #[doc(hidden)]
675        pub fn default_instance() -> &'static Self {
676            static DEFAULT: super::BatchGetObjectsResponse = super::BatchGetObjectsResponse::const_default();
677            &DEFAULT
678        }
679        ///Returns the value of `objects`, or the default value if `objects` is unset.
680        pub fn objects(&self) -> &[super::GetObjectResult] {
681            &self.objects
682        }
683        ///Returns a mutable reference to `objects`.
684        ///If the field is unset, it is first initialized with the default value.
685        pub fn objects_mut(&mut self) -> &mut Vec<super::GetObjectResult> {
686            &mut self.objects
687        }
688        ///Sets `objects` with the provided value.
689        pub fn set_objects(&mut self, field: Vec<super::GetObjectResult>) {
690            self.objects = field;
691        }
692        ///Sets `objects` with the provided value.
693        pub fn with_objects(mut self, field: Vec<super::GetObjectResult>) -> Self {
694            self.set_objects(field);
695            self
696        }
697    }
698    impl super::BatchGetTransactionsRequest {
699        pub const fn const_default() -> Self {
700            Self {
701                digests: Vec::new(),
702                read_mask: None,
703            }
704        }
705        #[doc(hidden)]
706        pub fn default_instance() -> &'static Self {
707            static DEFAULT: super::BatchGetTransactionsRequest = super::BatchGetTransactionsRequest::const_default();
708            &DEFAULT
709        }
710        ///Returns the value of `digests`, or the default value if `digests` is unset.
711        pub fn digests(&self) -> &[String] {
712            &self.digests
713        }
714        ///Returns a mutable reference to `digests`.
715        ///If the field is unset, it is first initialized with the default value.
716        pub fn digests_mut(&mut self) -> &mut Vec<String> {
717            &mut self.digests
718        }
719        ///Sets `digests` with the provided value.
720        pub fn set_digests(&mut self, field: Vec<String>) {
721            self.digests = field;
722        }
723        ///Sets `digests` with the provided value.
724        pub fn with_digests(mut self, field: Vec<String>) -> Self {
725            self.set_digests(field);
726            self
727        }
728        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
729        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
730            self.read_mask.as_mut().map(|field| field as _)
731        }
732        ///Returns a mutable reference to `read_mask`.
733        ///If the field is unset, it is first initialized with the default value.
734        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
735            self.read_mask.get_or_insert_default()
736        }
737        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
738        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
739            self.read_mask.as_ref().map(|field| field as _)
740        }
741        ///Sets `read_mask` with the provided value.
742        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
743            self.read_mask = Some(field.into().into());
744        }
745        ///Sets `read_mask` with the provided value.
746        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
747            mut self,
748            field: T,
749        ) -> Self {
750            self.set_read_mask(field.into());
751            self
752        }
753    }
754    impl super::BatchGetTransactionsResponse {
755        pub const fn const_default() -> Self {
756            Self { transactions: Vec::new() }
757        }
758        #[doc(hidden)]
759        pub fn default_instance() -> &'static Self {
760            static DEFAULT: super::BatchGetTransactionsResponse = super::BatchGetTransactionsResponse::const_default();
761            &DEFAULT
762        }
763        ///Returns the value of `transactions`, or the default value if `transactions` is unset.
764        pub fn transactions(&self) -> &[super::GetTransactionResult] {
765            &self.transactions
766        }
767        ///Returns a mutable reference to `transactions`.
768        ///If the field is unset, it is first initialized with the default value.
769        pub fn transactions_mut(&mut self) -> &mut Vec<super::GetTransactionResult> {
770            &mut self.transactions
771        }
772        ///Sets `transactions` with the provided value.
773        pub fn set_transactions(&mut self, field: Vec<super::GetTransactionResult>) {
774            self.transactions = field;
775        }
776        ///Sets `transactions` with the provided value.
777        pub fn with_transactions(
778            mut self,
779            field: Vec<super::GetTransactionResult>,
780        ) -> Self {
781            self.set_transactions(field);
782            self
783        }
784    }
785    impl super::Bcs {
786        pub const fn const_default() -> Self {
787            Self { name: None, value: None }
788        }
789        #[doc(hidden)]
790        pub fn default_instance() -> &'static Self {
791            static DEFAULT: super::Bcs = super::Bcs::const_default();
792            &DEFAULT
793        }
794        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
795        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
796            self.name.as_mut().map(|field| field as _)
797        }
798        ///Returns a mutable reference to `name`.
799        ///If the field is unset, it is first initialized with the default value.
800        pub fn name_mut(&mut self) -> &mut String {
801            self.name.get_or_insert_default()
802        }
803        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
804        pub fn name_opt(&self) -> Option<&str> {
805            self.name.as_ref().map(|field| field as _)
806        }
807        ///Sets `name` with the provided value.
808        pub fn set_name<T: Into<String>>(&mut self, field: T) {
809            self.name = Some(field.into().into());
810        }
811        ///Sets `name` with the provided value.
812        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
813            self.set_name(field.into());
814            self
815        }
816        ///If `value` is set, returns [`Some`] with the value; otherwise returns [`None`].
817        pub fn value_opt(&self) -> Option<&[u8]> {
818            self.value.as_ref().map(|field| field as _)
819        }
820        ///Sets `value` with the provided value.
821        pub fn set_value<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
822            self.value = Some(field.into().into());
823        }
824        ///Sets `value` with the provided value.
825        pub fn with_value<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
826            self.set_value(field.into());
827            self
828        }
829    }
830    impl super::CanceledTransaction {
831        pub const fn const_default() -> Self {
832            Self {
833                digest: None,
834                version_assignments: Vec::new(),
835            }
836        }
837        #[doc(hidden)]
838        pub fn default_instance() -> &'static Self {
839            static DEFAULT: super::CanceledTransaction = super::CanceledTransaction::const_default();
840            &DEFAULT
841        }
842        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
843        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
844            self.digest.as_mut().map(|field| field as _)
845        }
846        ///Returns a mutable reference to `digest`.
847        ///If the field is unset, it is first initialized with the default value.
848        pub fn digest_mut(&mut self) -> &mut String {
849            self.digest.get_or_insert_default()
850        }
851        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
852        pub fn digest_opt(&self) -> Option<&str> {
853            self.digest.as_ref().map(|field| field as _)
854        }
855        ///Sets `digest` with the provided value.
856        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
857            self.digest = Some(field.into().into());
858        }
859        ///Sets `digest` with the provided value.
860        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
861            self.set_digest(field.into());
862            self
863        }
864        ///Returns the value of `version_assignments`, or the default value if `version_assignments` is unset.
865        pub fn version_assignments(&self) -> &[super::VersionAssignment] {
866            &self.version_assignments
867        }
868        ///Returns a mutable reference to `version_assignments`.
869        ///If the field is unset, it is first initialized with the default value.
870        pub fn version_assignments_mut(&mut self) -> &mut Vec<super::VersionAssignment> {
871            &mut self.version_assignments
872        }
873        ///Sets `version_assignments` with the provided value.
874        pub fn set_version_assignments(&mut self, field: Vec<super::VersionAssignment>) {
875            self.version_assignments = field;
876        }
877        ///Sets `version_assignments` with the provided value.
878        pub fn with_version_assignments(
879            mut self,
880            field: Vec<super::VersionAssignment>,
881        ) -> Self {
882            self.set_version_assignments(field);
883            self
884        }
885    }
886    impl super::ChangeEpoch {
887        pub const fn const_default() -> Self {
888            Self {
889                epoch: None,
890                protocol_version: None,
891                storage_charge: None,
892                computation_charge: None,
893                storage_rebate: None,
894                non_refundable_storage_fee: None,
895                epoch_start_timestamp: None,
896                system_packages: Vec::new(),
897            }
898        }
899        #[doc(hidden)]
900        pub fn default_instance() -> &'static Self {
901            static DEFAULT: super::ChangeEpoch = super::ChangeEpoch::const_default();
902            &DEFAULT
903        }
904        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
905        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
906            self.epoch.as_mut().map(|field| field as _)
907        }
908        ///Returns a mutable reference to `epoch`.
909        ///If the field is unset, it is first initialized with the default value.
910        pub fn epoch_mut(&mut self) -> &mut u64 {
911            self.epoch.get_or_insert_default()
912        }
913        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
914        pub fn epoch_opt(&self) -> Option<u64> {
915            self.epoch.as_ref().map(|field| *field)
916        }
917        ///Sets `epoch` with the provided value.
918        pub fn set_epoch(&mut self, field: u64) {
919            self.epoch = Some(field);
920        }
921        ///Sets `epoch` with the provided value.
922        pub fn with_epoch(mut self, field: u64) -> Self {
923            self.set_epoch(field);
924            self
925        }
926        ///If `protocol_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
927        pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
928            self.protocol_version.as_mut().map(|field| field as _)
929        }
930        ///Returns a mutable reference to `protocol_version`.
931        ///If the field is unset, it is first initialized with the default value.
932        pub fn protocol_version_mut(&mut self) -> &mut u64 {
933            self.protocol_version.get_or_insert_default()
934        }
935        ///If `protocol_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
936        pub fn protocol_version_opt(&self) -> Option<u64> {
937            self.protocol_version.as_ref().map(|field| *field)
938        }
939        ///Sets `protocol_version` with the provided value.
940        pub fn set_protocol_version(&mut self, field: u64) {
941            self.protocol_version = Some(field);
942        }
943        ///Sets `protocol_version` with the provided value.
944        pub fn with_protocol_version(mut self, field: u64) -> Self {
945            self.set_protocol_version(field);
946            self
947        }
948        ///If `storage_charge` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
949        pub fn storage_charge_opt_mut(&mut self) -> Option<&mut u64> {
950            self.storage_charge.as_mut().map(|field| field as _)
951        }
952        ///Returns a mutable reference to `storage_charge`.
953        ///If the field is unset, it is first initialized with the default value.
954        pub fn storage_charge_mut(&mut self) -> &mut u64 {
955            self.storage_charge.get_or_insert_default()
956        }
957        ///If `storage_charge` is set, returns [`Some`] with the value; otherwise returns [`None`].
958        pub fn storage_charge_opt(&self) -> Option<u64> {
959            self.storage_charge.as_ref().map(|field| *field)
960        }
961        ///Sets `storage_charge` with the provided value.
962        pub fn set_storage_charge(&mut self, field: u64) {
963            self.storage_charge = Some(field);
964        }
965        ///Sets `storage_charge` with the provided value.
966        pub fn with_storage_charge(mut self, field: u64) -> Self {
967            self.set_storage_charge(field);
968            self
969        }
970        ///If `computation_charge` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
971        pub fn computation_charge_opt_mut(&mut self) -> Option<&mut u64> {
972            self.computation_charge.as_mut().map(|field| field as _)
973        }
974        ///Returns a mutable reference to `computation_charge`.
975        ///If the field is unset, it is first initialized with the default value.
976        pub fn computation_charge_mut(&mut self) -> &mut u64 {
977            self.computation_charge.get_or_insert_default()
978        }
979        ///If `computation_charge` is set, returns [`Some`] with the value; otherwise returns [`None`].
980        pub fn computation_charge_opt(&self) -> Option<u64> {
981            self.computation_charge.as_ref().map(|field| *field)
982        }
983        ///Sets `computation_charge` with the provided value.
984        pub fn set_computation_charge(&mut self, field: u64) {
985            self.computation_charge = Some(field);
986        }
987        ///Sets `computation_charge` with the provided value.
988        pub fn with_computation_charge(mut self, field: u64) -> Self {
989            self.set_computation_charge(field);
990            self
991        }
992        ///If `storage_rebate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
993        pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
994            self.storage_rebate.as_mut().map(|field| field as _)
995        }
996        ///Returns a mutable reference to `storage_rebate`.
997        ///If the field is unset, it is first initialized with the default value.
998        pub fn storage_rebate_mut(&mut self) -> &mut u64 {
999            self.storage_rebate.get_or_insert_default()
1000        }
1001        ///If `storage_rebate` is set, returns [`Some`] with the value; otherwise returns [`None`].
1002        pub fn storage_rebate_opt(&self) -> Option<u64> {
1003            self.storage_rebate.as_ref().map(|field| *field)
1004        }
1005        ///Sets `storage_rebate` with the provided value.
1006        pub fn set_storage_rebate(&mut self, field: u64) {
1007            self.storage_rebate = Some(field);
1008        }
1009        ///Sets `storage_rebate` with the provided value.
1010        pub fn with_storage_rebate(mut self, field: u64) -> Self {
1011            self.set_storage_rebate(field);
1012            self
1013        }
1014        ///If `non_refundable_storage_fee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1015        pub fn non_refundable_storage_fee_opt_mut(&mut self) -> Option<&mut u64> {
1016            self.non_refundable_storage_fee.as_mut().map(|field| field as _)
1017        }
1018        ///Returns a mutable reference to `non_refundable_storage_fee`.
1019        ///If the field is unset, it is first initialized with the default value.
1020        pub fn non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
1021            self.non_refundable_storage_fee.get_or_insert_default()
1022        }
1023        ///If `non_refundable_storage_fee` is set, returns [`Some`] with the value; otherwise returns [`None`].
1024        pub fn non_refundable_storage_fee_opt(&self) -> Option<u64> {
1025            self.non_refundable_storage_fee.as_ref().map(|field| *field)
1026        }
1027        ///Sets `non_refundable_storage_fee` with the provided value.
1028        pub fn set_non_refundable_storage_fee(&mut self, field: u64) {
1029            self.non_refundable_storage_fee = Some(field);
1030        }
1031        ///Sets `non_refundable_storage_fee` with the provided value.
1032        pub fn with_non_refundable_storage_fee(mut self, field: u64) -> Self {
1033            self.set_non_refundable_storage_fee(field);
1034            self
1035        }
1036        ///If `epoch_start_timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1037        pub fn epoch_start_timestamp_opt_mut(
1038            &mut self,
1039        ) -> Option<&mut ::prost_types::Timestamp> {
1040            self.epoch_start_timestamp.as_mut().map(|field| field as _)
1041        }
1042        ///Returns a mutable reference to `epoch_start_timestamp`.
1043        ///If the field is unset, it is first initialized with the default value.
1044        pub fn epoch_start_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
1045            self.epoch_start_timestamp.get_or_insert_default()
1046        }
1047        ///If `epoch_start_timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
1048        pub fn epoch_start_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
1049            self.epoch_start_timestamp.as_ref().map(|field| field as _)
1050        }
1051        ///Sets `epoch_start_timestamp` with the provided value.
1052        pub fn set_epoch_start_timestamp<T: Into<::prost_types::Timestamp>>(
1053            &mut self,
1054            field: T,
1055        ) {
1056            self.epoch_start_timestamp = Some(field.into().into());
1057        }
1058        ///Sets `epoch_start_timestamp` with the provided value.
1059        pub fn with_epoch_start_timestamp<T: Into<::prost_types::Timestamp>>(
1060            mut self,
1061            field: T,
1062        ) -> Self {
1063            self.set_epoch_start_timestamp(field.into());
1064            self
1065        }
1066        ///Returns the value of `system_packages`, or the default value if `system_packages` is unset.
1067        pub fn system_packages(&self) -> &[super::SystemPackage] {
1068            &self.system_packages
1069        }
1070        ///Returns a mutable reference to `system_packages`.
1071        ///If the field is unset, it is first initialized with the default value.
1072        pub fn system_packages_mut(&mut self) -> &mut Vec<super::SystemPackage> {
1073            &mut self.system_packages
1074        }
1075        ///Sets `system_packages` with the provided value.
1076        pub fn set_system_packages(&mut self, field: Vec<super::SystemPackage>) {
1077            self.system_packages = field;
1078        }
1079        ///Sets `system_packages` with the provided value.
1080        pub fn with_system_packages(mut self, field: Vec<super::SystemPackage>) -> Self {
1081            self.set_system_packages(field);
1082            self
1083        }
1084    }
1085    impl super::ChangedObject {
1086        pub const fn const_default() -> Self {
1087            Self {
1088                object_id: None,
1089                input_state: None,
1090                input_version: None,
1091                input_digest: None,
1092                input_owner: None,
1093                output_state: None,
1094                output_version: None,
1095                output_digest: None,
1096                output_owner: None,
1097                accumulator_write: None,
1098                id_operation: None,
1099                object_type: None,
1100            }
1101        }
1102        #[doc(hidden)]
1103        pub fn default_instance() -> &'static Self {
1104            static DEFAULT: super::ChangedObject = super::ChangedObject::const_default();
1105            &DEFAULT
1106        }
1107        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1108        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
1109            self.object_id.as_mut().map(|field| field as _)
1110        }
1111        ///Returns a mutable reference to `object_id`.
1112        ///If the field is unset, it is first initialized with the default value.
1113        pub fn object_id_mut(&mut self) -> &mut String {
1114            self.object_id.get_or_insert_default()
1115        }
1116        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
1117        pub fn object_id_opt(&self) -> Option<&str> {
1118            self.object_id.as_ref().map(|field| field as _)
1119        }
1120        ///Sets `object_id` with the provided value.
1121        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
1122            self.object_id = Some(field.into().into());
1123        }
1124        ///Sets `object_id` with the provided value.
1125        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
1126            self.set_object_id(field.into());
1127            self
1128        }
1129        ///Sets `input_state` with the provided value.
1130        pub fn with_input_state<T: Into<super::changed_object::InputObjectState>>(
1131            mut self,
1132            field: T,
1133        ) -> Self {
1134            self.set_input_state(field.into());
1135            self
1136        }
1137        ///If `input_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1138        pub fn input_version_opt_mut(&mut self) -> Option<&mut u64> {
1139            self.input_version.as_mut().map(|field| field as _)
1140        }
1141        ///Returns a mutable reference to `input_version`.
1142        ///If the field is unset, it is first initialized with the default value.
1143        pub fn input_version_mut(&mut self) -> &mut u64 {
1144            self.input_version.get_or_insert_default()
1145        }
1146        ///If `input_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
1147        pub fn input_version_opt(&self) -> Option<u64> {
1148            self.input_version.as_ref().map(|field| *field)
1149        }
1150        ///Sets `input_version` with the provided value.
1151        pub fn set_input_version(&mut self, field: u64) {
1152            self.input_version = Some(field);
1153        }
1154        ///Sets `input_version` with the provided value.
1155        pub fn with_input_version(mut self, field: u64) -> Self {
1156            self.set_input_version(field);
1157            self
1158        }
1159        ///If `input_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1160        pub fn input_digest_opt_mut(&mut self) -> Option<&mut String> {
1161            self.input_digest.as_mut().map(|field| field as _)
1162        }
1163        ///Returns a mutable reference to `input_digest`.
1164        ///If the field is unset, it is first initialized with the default value.
1165        pub fn input_digest_mut(&mut self) -> &mut String {
1166            self.input_digest.get_or_insert_default()
1167        }
1168        ///If `input_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1169        pub fn input_digest_opt(&self) -> Option<&str> {
1170            self.input_digest.as_ref().map(|field| field as _)
1171        }
1172        ///Sets `input_digest` with the provided value.
1173        pub fn set_input_digest<T: Into<String>>(&mut self, field: T) {
1174            self.input_digest = Some(field.into().into());
1175        }
1176        ///Sets `input_digest` with the provided value.
1177        pub fn with_input_digest<T: Into<String>>(mut self, field: T) -> Self {
1178            self.set_input_digest(field.into());
1179            self
1180        }
1181        ///Returns the value of `input_owner`, or the default value if `input_owner` is unset.
1182        pub fn input_owner(&self) -> &super::Owner {
1183            self.input_owner
1184                .as_ref()
1185                .map(|field| field as _)
1186                .unwrap_or_else(|| super::Owner::default_instance() as _)
1187        }
1188        ///If `input_owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1189        pub fn input_owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
1190            self.input_owner.as_mut().map(|field| field as _)
1191        }
1192        ///Returns a mutable reference to `input_owner`.
1193        ///If the field is unset, it is first initialized with the default value.
1194        pub fn input_owner_mut(&mut self) -> &mut super::Owner {
1195            self.input_owner.get_or_insert_default()
1196        }
1197        ///If `input_owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
1198        pub fn input_owner_opt(&self) -> Option<&super::Owner> {
1199            self.input_owner.as_ref().map(|field| field as _)
1200        }
1201        ///Sets `input_owner` with the provided value.
1202        pub fn set_input_owner<T: Into<super::Owner>>(&mut self, field: T) {
1203            self.input_owner = Some(field.into().into());
1204        }
1205        ///Sets `input_owner` with the provided value.
1206        pub fn with_input_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
1207            self.set_input_owner(field.into());
1208            self
1209        }
1210        ///Sets `output_state` with the provided value.
1211        pub fn with_output_state<T: Into<super::changed_object::OutputObjectState>>(
1212            mut self,
1213            field: T,
1214        ) -> Self {
1215            self.set_output_state(field.into());
1216            self
1217        }
1218        ///If `output_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1219        pub fn output_version_opt_mut(&mut self) -> Option<&mut u64> {
1220            self.output_version.as_mut().map(|field| field as _)
1221        }
1222        ///Returns a mutable reference to `output_version`.
1223        ///If the field is unset, it is first initialized with the default value.
1224        pub fn output_version_mut(&mut self) -> &mut u64 {
1225            self.output_version.get_or_insert_default()
1226        }
1227        ///If `output_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
1228        pub fn output_version_opt(&self) -> Option<u64> {
1229            self.output_version.as_ref().map(|field| *field)
1230        }
1231        ///Sets `output_version` with the provided value.
1232        pub fn set_output_version(&mut self, field: u64) {
1233            self.output_version = Some(field);
1234        }
1235        ///Sets `output_version` with the provided value.
1236        pub fn with_output_version(mut self, field: u64) -> Self {
1237            self.set_output_version(field);
1238            self
1239        }
1240        ///If `output_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1241        pub fn output_digest_opt_mut(&mut self) -> Option<&mut String> {
1242            self.output_digest.as_mut().map(|field| field as _)
1243        }
1244        ///Returns a mutable reference to `output_digest`.
1245        ///If the field is unset, it is first initialized with the default value.
1246        pub fn output_digest_mut(&mut self) -> &mut String {
1247            self.output_digest.get_or_insert_default()
1248        }
1249        ///If `output_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1250        pub fn output_digest_opt(&self) -> Option<&str> {
1251            self.output_digest.as_ref().map(|field| field as _)
1252        }
1253        ///Sets `output_digest` with the provided value.
1254        pub fn set_output_digest<T: Into<String>>(&mut self, field: T) {
1255            self.output_digest = Some(field.into().into());
1256        }
1257        ///Sets `output_digest` with the provided value.
1258        pub fn with_output_digest<T: Into<String>>(mut self, field: T) -> Self {
1259            self.set_output_digest(field.into());
1260            self
1261        }
1262        ///Returns the value of `output_owner`, or the default value if `output_owner` is unset.
1263        pub fn output_owner(&self) -> &super::Owner {
1264            self.output_owner
1265                .as_ref()
1266                .map(|field| field as _)
1267                .unwrap_or_else(|| super::Owner::default_instance() as _)
1268        }
1269        ///If `output_owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1270        pub fn output_owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
1271            self.output_owner.as_mut().map(|field| field as _)
1272        }
1273        ///Returns a mutable reference to `output_owner`.
1274        ///If the field is unset, it is first initialized with the default value.
1275        pub fn output_owner_mut(&mut self) -> &mut super::Owner {
1276            self.output_owner.get_or_insert_default()
1277        }
1278        ///If `output_owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
1279        pub fn output_owner_opt(&self) -> Option<&super::Owner> {
1280            self.output_owner.as_ref().map(|field| field as _)
1281        }
1282        ///Sets `output_owner` with the provided value.
1283        pub fn set_output_owner<T: Into<super::Owner>>(&mut self, field: T) {
1284            self.output_owner = Some(field.into().into());
1285        }
1286        ///Sets `output_owner` with the provided value.
1287        pub fn with_output_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
1288            self.set_output_owner(field.into());
1289            self
1290        }
1291        ///Returns the value of `accumulator_write`, or the default value if `accumulator_write` is unset.
1292        pub fn accumulator_write(&self) -> &super::AccumulatorWrite {
1293            self.accumulator_write
1294                .as_ref()
1295                .map(|field| field as _)
1296                .unwrap_or_else(|| super::AccumulatorWrite::default_instance() as _)
1297        }
1298        ///If `accumulator_write` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1299        pub fn accumulator_write_opt_mut(
1300            &mut self,
1301        ) -> Option<&mut super::AccumulatorWrite> {
1302            self.accumulator_write.as_mut().map(|field| field as _)
1303        }
1304        ///Returns a mutable reference to `accumulator_write`.
1305        ///If the field is unset, it is first initialized with the default value.
1306        pub fn accumulator_write_mut(&mut self) -> &mut super::AccumulatorWrite {
1307            self.accumulator_write.get_or_insert_default()
1308        }
1309        ///If `accumulator_write` is set, returns [`Some`] with the value; otherwise returns [`None`].
1310        pub fn accumulator_write_opt(&self) -> Option<&super::AccumulatorWrite> {
1311            self.accumulator_write.as_ref().map(|field| field as _)
1312        }
1313        ///Sets `accumulator_write` with the provided value.
1314        pub fn set_accumulator_write<T: Into<super::AccumulatorWrite>>(
1315            &mut self,
1316            field: T,
1317        ) {
1318            self.accumulator_write = Some(field.into().into());
1319        }
1320        ///Sets `accumulator_write` with the provided value.
1321        pub fn with_accumulator_write<T: Into<super::AccumulatorWrite>>(
1322            mut self,
1323            field: T,
1324        ) -> Self {
1325            self.set_accumulator_write(field.into());
1326            self
1327        }
1328        ///Sets `id_operation` with the provided value.
1329        pub fn with_id_operation<T: Into<super::changed_object::IdOperation>>(
1330            mut self,
1331            field: T,
1332        ) -> Self {
1333            self.set_id_operation(field.into());
1334            self
1335        }
1336        ///If `object_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1337        pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
1338            self.object_type.as_mut().map(|field| field as _)
1339        }
1340        ///Returns a mutable reference to `object_type`.
1341        ///If the field is unset, it is first initialized with the default value.
1342        pub fn object_type_mut(&mut self) -> &mut String {
1343            self.object_type.get_or_insert_default()
1344        }
1345        ///If `object_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
1346        pub fn object_type_opt(&self) -> Option<&str> {
1347            self.object_type.as_ref().map(|field| field as _)
1348        }
1349        ///Sets `object_type` with the provided value.
1350        pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
1351            self.object_type = Some(field.into().into());
1352        }
1353        ///Sets `object_type` with the provided value.
1354        pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
1355            self.set_object_type(field.into());
1356            self
1357        }
1358    }
1359    impl super::Checkpoint {
1360        pub const fn const_default() -> Self {
1361            Self {
1362                sequence_number: None,
1363                digest: None,
1364                summary: None,
1365                signature: None,
1366                contents: None,
1367                transactions: Vec::new(),
1368                objects: None,
1369            }
1370        }
1371        #[doc(hidden)]
1372        pub fn default_instance() -> &'static Self {
1373            static DEFAULT: super::Checkpoint = super::Checkpoint::const_default();
1374            &DEFAULT
1375        }
1376        ///If `sequence_number` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1377        pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
1378            self.sequence_number.as_mut().map(|field| field as _)
1379        }
1380        ///Returns a mutable reference to `sequence_number`.
1381        ///If the field is unset, it is first initialized with the default value.
1382        pub fn sequence_number_mut(&mut self) -> &mut u64 {
1383            self.sequence_number.get_or_insert_default()
1384        }
1385        ///If `sequence_number` is set, returns [`Some`] with the value; otherwise returns [`None`].
1386        pub fn sequence_number_opt(&self) -> Option<u64> {
1387            self.sequence_number.as_ref().map(|field| *field)
1388        }
1389        ///Sets `sequence_number` with the provided value.
1390        pub fn set_sequence_number(&mut self, field: u64) {
1391            self.sequence_number = Some(field);
1392        }
1393        ///Sets `sequence_number` with the provided value.
1394        pub fn with_sequence_number(mut self, field: u64) -> Self {
1395            self.set_sequence_number(field);
1396            self
1397        }
1398        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1399        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1400            self.digest.as_mut().map(|field| field as _)
1401        }
1402        ///Returns a mutable reference to `digest`.
1403        ///If the field is unset, it is first initialized with the default value.
1404        pub fn digest_mut(&mut self) -> &mut String {
1405            self.digest.get_or_insert_default()
1406        }
1407        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1408        pub fn digest_opt(&self) -> Option<&str> {
1409            self.digest.as_ref().map(|field| field as _)
1410        }
1411        ///Sets `digest` with the provided value.
1412        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1413            self.digest = Some(field.into().into());
1414        }
1415        ///Sets `digest` with the provided value.
1416        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1417            self.set_digest(field.into());
1418            self
1419        }
1420        ///Returns the value of `summary`, or the default value if `summary` is unset.
1421        pub fn summary(&self) -> &super::CheckpointSummary {
1422            self.summary
1423                .as_ref()
1424                .map(|field| field as _)
1425                .unwrap_or_else(|| super::CheckpointSummary::default_instance() as _)
1426        }
1427        ///If `summary` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1428        pub fn summary_opt_mut(&mut self) -> Option<&mut super::CheckpointSummary> {
1429            self.summary.as_mut().map(|field| field as _)
1430        }
1431        ///Returns a mutable reference to `summary`.
1432        ///If the field is unset, it is first initialized with the default value.
1433        pub fn summary_mut(&mut self) -> &mut super::CheckpointSummary {
1434            self.summary.get_or_insert_default()
1435        }
1436        ///If `summary` is set, returns [`Some`] with the value; otherwise returns [`None`].
1437        pub fn summary_opt(&self) -> Option<&super::CheckpointSummary> {
1438            self.summary.as_ref().map(|field| field as _)
1439        }
1440        ///Sets `summary` with the provided value.
1441        pub fn set_summary<T: Into<super::CheckpointSummary>>(&mut self, field: T) {
1442            self.summary = Some(field.into().into());
1443        }
1444        ///Sets `summary` with the provided value.
1445        pub fn with_summary<T: Into<super::CheckpointSummary>>(
1446            mut self,
1447            field: T,
1448        ) -> Self {
1449            self.set_summary(field.into());
1450            self
1451        }
1452        ///Returns the value of `signature`, or the default value if `signature` is unset.
1453        pub fn signature(&self) -> &super::ValidatorAggregatedSignature {
1454            self.signature
1455                .as_ref()
1456                .map(|field| field as _)
1457                .unwrap_or_else(|| {
1458                    super::ValidatorAggregatedSignature::default_instance() as _
1459                })
1460        }
1461        ///If `signature` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1462        pub fn signature_opt_mut(
1463            &mut self,
1464        ) -> Option<&mut super::ValidatorAggregatedSignature> {
1465            self.signature.as_mut().map(|field| field as _)
1466        }
1467        ///Returns a mutable reference to `signature`.
1468        ///If the field is unset, it is first initialized with the default value.
1469        pub fn signature_mut(&mut self) -> &mut super::ValidatorAggregatedSignature {
1470            self.signature.get_or_insert_default()
1471        }
1472        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
1473        pub fn signature_opt(&self) -> Option<&super::ValidatorAggregatedSignature> {
1474            self.signature.as_ref().map(|field| field as _)
1475        }
1476        ///Sets `signature` with the provided value.
1477        pub fn set_signature<T: Into<super::ValidatorAggregatedSignature>>(
1478            &mut self,
1479            field: T,
1480        ) {
1481            self.signature = Some(field.into().into());
1482        }
1483        ///Sets `signature` with the provided value.
1484        pub fn with_signature<T: Into<super::ValidatorAggregatedSignature>>(
1485            mut self,
1486            field: T,
1487        ) -> Self {
1488            self.set_signature(field.into());
1489            self
1490        }
1491        ///Returns the value of `contents`, or the default value if `contents` is unset.
1492        pub fn contents(&self) -> &super::CheckpointContents {
1493            self.contents
1494                .as_ref()
1495                .map(|field| field as _)
1496                .unwrap_or_else(|| super::CheckpointContents::default_instance() as _)
1497        }
1498        ///If `contents` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1499        pub fn contents_opt_mut(&mut self) -> Option<&mut super::CheckpointContents> {
1500            self.contents.as_mut().map(|field| field as _)
1501        }
1502        ///Returns a mutable reference to `contents`.
1503        ///If the field is unset, it is first initialized with the default value.
1504        pub fn contents_mut(&mut self) -> &mut super::CheckpointContents {
1505            self.contents.get_or_insert_default()
1506        }
1507        ///If `contents` is set, returns [`Some`] with the value; otherwise returns [`None`].
1508        pub fn contents_opt(&self) -> Option<&super::CheckpointContents> {
1509            self.contents.as_ref().map(|field| field as _)
1510        }
1511        ///Sets `contents` with the provided value.
1512        pub fn set_contents<T: Into<super::CheckpointContents>>(&mut self, field: T) {
1513            self.contents = Some(field.into().into());
1514        }
1515        ///Sets `contents` with the provided value.
1516        pub fn with_contents<T: Into<super::CheckpointContents>>(
1517            mut self,
1518            field: T,
1519        ) -> Self {
1520            self.set_contents(field.into());
1521            self
1522        }
1523        ///Returns the value of `transactions`, or the default value if `transactions` is unset.
1524        pub fn transactions(&self) -> &[super::ExecutedTransaction] {
1525            &self.transactions
1526        }
1527        ///Returns a mutable reference to `transactions`.
1528        ///If the field is unset, it is first initialized with the default value.
1529        pub fn transactions_mut(&mut self) -> &mut Vec<super::ExecutedTransaction> {
1530            &mut self.transactions
1531        }
1532        ///Sets `transactions` with the provided value.
1533        pub fn set_transactions(&mut self, field: Vec<super::ExecutedTransaction>) {
1534            self.transactions = field;
1535        }
1536        ///Sets `transactions` with the provided value.
1537        pub fn with_transactions(
1538            mut self,
1539            field: Vec<super::ExecutedTransaction>,
1540        ) -> Self {
1541            self.set_transactions(field);
1542            self
1543        }
1544        ///Returns the value of `objects`, or the default value if `objects` is unset.
1545        pub fn objects(&self) -> &super::ObjectSet {
1546            self.objects
1547                .as_ref()
1548                .map(|field| field as _)
1549                .unwrap_or_else(|| super::ObjectSet::default_instance() as _)
1550        }
1551        ///If `objects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1552        pub fn objects_opt_mut(&mut self) -> Option<&mut super::ObjectSet> {
1553            self.objects.as_mut().map(|field| field as _)
1554        }
1555        ///Returns a mutable reference to `objects`.
1556        ///If the field is unset, it is first initialized with the default value.
1557        pub fn objects_mut(&mut self) -> &mut super::ObjectSet {
1558            self.objects.get_or_insert_default()
1559        }
1560        ///If `objects` is set, returns [`Some`] with the value; otherwise returns [`None`].
1561        pub fn objects_opt(&self) -> Option<&super::ObjectSet> {
1562            self.objects.as_ref().map(|field| field as _)
1563        }
1564        ///Sets `objects` with the provided value.
1565        pub fn set_objects<T: Into<super::ObjectSet>>(&mut self, field: T) {
1566            self.objects = Some(field.into().into());
1567        }
1568        ///Sets `objects` with the provided value.
1569        pub fn with_objects<T: Into<super::ObjectSet>>(mut self, field: T) -> Self {
1570            self.set_objects(field.into());
1571            self
1572        }
1573    }
1574    impl super::CheckpointCommitment {
1575        pub const fn const_default() -> Self {
1576            Self { kind: None, digest: None }
1577        }
1578        #[doc(hidden)]
1579        pub fn default_instance() -> &'static Self {
1580            static DEFAULT: super::CheckpointCommitment = super::CheckpointCommitment::const_default();
1581            &DEFAULT
1582        }
1583        ///Sets `kind` with the provided value.
1584        pub fn with_kind<
1585            T: Into<super::checkpoint_commitment::CheckpointCommitmentKind>,
1586        >(mut self, field: T) -> Self {
1587            self.set_kind(field.into());
1588            self
1589        }
1590        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1591        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1592            self.digest.as_mut().map(|field| field as _)
1593        }
1594        ///Returns a mutable reference to `digest`.
1595        ///If the field is unset, it is first initialized with the default value.
1596        pub fn digest_mut(&mut self) -> &mut String {
1597            self.digest.get_or_insert_default()
1598        }
1599        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1600        pub fn digest_opt(&self) -> Option<&str> {
1601            self.digest.as_ref().map(|field| field as _)
1602        }
1603        ///Sets `digest` with the provided value.
1604        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1605            self.digest = Some(field.into().into());
1606        }
1607        ///Sets `digest` with the provided value.
1608        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1609            self.set_digest(field.into());
1610            self
1611        }
1612    }
1613    impl super::CheckpointContents {
1614        pub const fn const_default() -> Self {
1615            Self {
1616                bcs: None,
1617                digest: None,
1618                version: None,
1619                transactions: Vec::new(),
1620            }
1621        }
1622        #[doc(hidden)]
1623        pub fn default_instance() -> &'static Self {
1624            static DEFAULT: super::CheckpointContents = super::CheckpointContents::const_default();
1625            &DEFAULT
1626        }
1627        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
1628        pub fn bcs(&self) -> &super::Bcs {
1629            self.bcs
1630                .as_ref()
1631                .map(|field| field as _)
1632                .unwrap_or_else(|| super::Bcs::default_instance() as _)
1633        }
1634        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1635        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
1636            self.bcs.as_mut().map(|field| field as _)
1637        }
1638        ///Returns a mutable reference to `bcs`.
1639        ///If the field is unset, it is first initialized with the default value.
1640        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
1641            self.bcs.get_or_insert_default()
1642        }
1643        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
1644        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
1645            self.bcs.as_ref().map(|field| field as _)
1646        }
1647        ///Sets `bcs` with the provided value.
1648        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
1649            self.bcs = Some(field.into().into());
1650        }
1651        ///Sets `bcs` with the provided value.
1652        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
1653            self.set_bcs(field.into());
1654            self
1655        }
1656        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1657        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1658            self.digest.as_mut().map(|field| field as _)
1659        }
1660        ///Returns a mutable reference to `digest`.
1661        ///If the field is unset, it is first initialized with the default value.
1662        pub fn digest_mut(&mut self) -> &mut String {
1663            self.digest.get_or_insert_default()
1664        }
1665        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1666        pub fn digest_opt(&self) -> Option<&str> {
1667            self.digest.as_ref().map(|field| field as _)
1668        }
1669        ///Sets `digest` with the provided value.
1670        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1671            self.digest = Some(field.into().into());
1672        }
1673        ///Sets `digest` with the provided value.
1674        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1675            self.set_digest(field.into());
1676            self
1677        }
1678        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1679        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
1680            self.version.as_mut().map(|field| field as _)
1681        }
1682        ///Returns a mutable reference to `version`.
1683        ///If the field is unset, it is first initialized with the default value.
1684        pub fn version_mut(&mut self) -> &mut i32 {
1685            self.version.get_or_insert_default()
1686        }
1687        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
1688        pub fn version_opt(&self) -> Option<i32> {
1689            self.version.as_ref().map(|field| *field)
1690        }
1691        ///Sets `version` with the provided value.
1692        pub fn set_version(&mut self, field: i32) {
1693            self.version = Some(field);
1694        }
1695        ///Sets `version` with the provided value.
1696        pub fn with_version(mut self, field: i32) -> Self {
1697            self.set_version(field);
1698            self
1699        }
1700        ///Returns the value of `transactions`, or the default value if `transactions` is unset.
1701        pub fn transactions(&self) -> &[super::CheckpointedTransactionInfo] {
1702            &self.transactions
1703        }
1704        ///Returns a mutable reference to `transactions`.
1705        ///If the field is unset, it is first initialized with the default value.
1706        pub fn transactions_mut(
1707            &mut self,
1708        ) -> &mut Vec<super::CheckpointedTransactionInfo> {
1709            &mut self.transactions
1710        }
1711        ///Sets `transactions` with the provided value.
1712        pub fn set_transactions(
1713            &mut self,
1714            field: Vec<super::CheckpointedTransactionInfo>,
1715        ) {
1716            self.transactions = field;
1717        }
1718        ///Sets `transactions` with the provided value.
1719        pub fn with_transactions(
1720            mut self,
1721            field: Vec<super::CheckpointedTransactionInfo>,
1722        ) -> Self {
1723            self.set_transactions(field);
1724            self
1725        }
1726    }
1727    impl super::CheckpointSummary {
1728        pub const fn const_default() -> Self {
1729            Self {
1730                bcs: None,
1731                digest: None,
1732                epoch: None,
1733                sequence_number: None,
1734                total_network_transactions: None,
1735                content_digest: None,
1736                previous_digest: None,
1737                epoch_rolling_gas_cost_summary: None,
1738                timestamp: None,
1739                commitments: Vec::new(),
1740                end_of_epoch_data: None,
1741                version_specific_data: None,
1742            }
1743        }
1744        #[doc(hidden)]
1745        pub fn default_instance() -> &'static Self {
1746            static DEFAULT: super::CheckpointSummary = super::CheckpointSummary::const_default();
1747            &DEFAULT
1748        }
1749        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
1750        pub fn bcs(&self) -> &super::Bcs {
1751            self.bcs
1752                .as_ref()
1753                .map(|field| field as _)
1754                .unwrap_or_else(|| super::Bcs::default_instance() as _)
1755        }
1756        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1757        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
1758            self.bcs.as_mut().map(|field| field as _)
1759        }
1760        ///Returns a mutable reference to `bcs`.
1761        ///If the field is unset, it is first initialized with the default value.
1762        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
1763            self.bcs.get_or_insert_default()
1764        }
1765        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
1766        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
1767            self.bcs.as_ref().map(|field| field as _)
1768        }
1769        ///Sets `bcs` with the provided value.
1770        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
1771            self.bcs = Some(field.into().into());
1772        }
1773        ///Sets `bcs` with the provided value.
1774        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
1775            self.set_bcs(field.into());
1776            self
1777        }
1778        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1779        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
1780            self.digest.as_mut().map(|field| field as _)
1781        }
1782        ///Returns a mutable reference to `digest`.
1783        ///If the field is unset, it is first initialized with the default value.
1784        pub fn digest_mut(&mut self) -> &mut String {
1785            self.digest.get_or_insert_default()
1786        }
1787        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1788        pub fn digest_opt(&self) -> Option<&str> {
1789            self.digest.as_ref().map(|field| field as _)
1790        }
1791        ///Sets `digest` with the provided value.
1792        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
1793            self.digest = Some(field.into().into());
1794        }
1795        ///Sets `digest` with the provided value.
1796        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
1797            self.set_digest(field.into());
1798            self
1799        }
1800        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1801        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
1802            self.epoch.as_mut().map(|field| field as _)
1803        }
1804        ///Returns a mutable reference to `epoch`.
1805        ///If the field is unset, it is first initialized with the default value.
1806        pub fn epoch_mut(&mut self) -> &mut u64 {
1807            self.epoch.get_or_insert_default()
1808        }
1809        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
1810        pub fn epoch_opt(&self) -> Option<u64> {
1811            self.epoch.as_ref().map(|field| *field)
1812        }
1813        ///Sets `epoch` with the provided value.
1814        pub fn set_epoch(&mut self, field: u64) {
1815            self.epoch = Some(field);
1816        }
1817        ///Sets `epoch` with the provided value.
1818        pub fn with_epoch(mut self, field: u64) -> Self {
1819            self.set_epoch(field);
1820            self
1821        }
1822        ///If `sequence_number` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1823        pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
1824            self.sequence_number.as_mut().map(|field| field as _)
1825        }
1826        ///Returns a mutable reference to `sequence_number`.
1827        ///If the field is unset, it is first initialized with the default value.
1828        pub fn sequence_number_mut(&mut self) -> &mut u64 {
1829            self.sequence_number.get_or_insert_default()
1830        }
1831        ///If `sequence_number` is set, returns [`Some`] with the value; otherwise returns [`None`].
1832        pub fn sequence_number_opt(&self) -> Option<u64> {
1833            self.sequence_number.as_ref().map(|field| *field)
1834        }
1835        ///Sets `sequence_number` with the provided value.
1836        pub fn set_sequence_number(&mut self, field: u64) {
1837            self.sequence_number = Some(field);
1838        }
1839        ///Sets `sequence_number` with the provided value.
1840        pub fn with_sequence_number(mut self, field: u64) -> Self {
1841            self.set_sequence_number(field);
1842            self
1843        }
1844        ///If `total_network_transactions` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1845        pub fn total_network_transactions_opt_mut(&mut self) -> Option<&mut u64> {
1846            self.total_network_transactions.as_mut().map(|field| field as _)
1847        }
1848        ///Returns a mutable reference to `total_network_transactions`.
1849        ///If the field is unset, it is first initialized with the default value.
1850        pub fn total_network_transactions_mut(&mut self) -> &mut u64 {
1851            self.total_network_transactions.get_or_insert_default()
1852        }
1853        ///If `total_network_transactions` is set, returns [`Some`] with the value; otherwise returns [`None`].
1854        pub fn total_network_transactions_opt(&self) -> Option<u64> {
1855            self.total_network_transactions.as_ref().map(|field| *field)
1856        }
1857        ///Sets `total_network_transactions` with the provided value.
1858        pub fn set_total_network_transactions(&mut self, field: u64) {
1859            self.total_network_transactions = Some(field);
1860        }
1861        ///Sets `total_network_transactions` with the provided value.
1862        pub fn with_total_network_transactions(mut self, field: u64) -> Self {
1863            self.set_total_network_transactions(field);
1864            self
1865        }
1866        ///If `content_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1867        pub fn content_digest_opt_mut(&mut self) -> Option<&mut String> {
1868            self.content_digest.as_mut().map(|field| field as _)
1869        }
1870        ///Returns a mutable reference to `content_digest`.
1871        ///If the field is unset, it is first initialized with the default value.
1872        pub fn content_digest_mut(&mut self) -> &mut String {
1873            self.content_digest.get_or_insert_default()
1874        }
1875        ///If `content_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1876        pub fn content_digest_opt(&self) -> Option<&str> {
1877            self.content_digest.as_ref().map(|field| field as _)
1878        }
1879        ///Sets `content_digest` with the provided value.
1880        pub fn set_content_digest<T: Into<String>>(&mut self, field: T) {
1881            self.content_digest = Some(field.into().into());
1882        }
1883        ///Sets `content_digest` with the provided value.
1884        pub fn with_content_digest<T: Into<String>>(mut self, field: T) -> Self {
1885            self.set_content_digest(field.into());
1886            self
1887        }
1888        ///If `previous_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1889        pub fn previous_digest_opt_mut(&mut self) -> Option<&mut String> {
1890            self.previous_digest.as_mut().map(|field| field as _)
1891        }
1892        ///Returns a mutable reference to `previous_digest`.
1893        ///If the field is unset, it is first initialized with the default value.
1894        pub fn previous_digest_mut(&mut self) -> &mut String {
1895            self.previous_digest.get_or_insert_default()
1896        }
1897        ///If `previous_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
1898        pub fn previous_digest_opt(&self) -> Option<&str> {
1899            self.previous_digest.as_ref().map(|field| field as _)
1900        }
1901        ///Sets `previous_digest` with the provided value.
1902        pub fn set_previous_digest<T: Into<String>>(&mut self, field: T) {
1903            self.previous_digest = Some(field.into().into());
1904        }
1905        ///Sets `previous_digest` with the provided value.
1906        pub fn with_previous_digest<T: Into<String>>(mut self, field: T) -> Self {
1907            self.set_previous_digest(field.into());
1908            self
1909        }
1910        ///Returns the value of `epoch_rolling_gas_cost_summary`, or the default value if `epoch_rolling_gas_cost_summary` is unset.
1911        pub fn epoch_rolling_gas_cost_summary(&self) -> &super::GasCostSummary {
1912            self.epoch_rolling_gas_cost_summary
1913                .as_ref()
1914                .map(|field| field as _)
1915                .unwrap_or_else(|| super::GasCostSummary::default_instance() as _)
1916        }
1917        ///If `epoch_rolling_gas_cost_summary` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1918        pub fn epoch_rolling_gas_cost_summary_opt_mut(
1919            &mut self,
1920        ) -> Option<&mut super::GasCostSummary> {
1921            self.epoch_rolling_gas_cost_summary.as_mut().map(|field| field as _)
1922        }
1923        ///Returns a mutable reference to `epoch_rolling_gas_cost_summary`.
1924        ///If the field is unset, it is first initialized with the default value.
1925        pub fn epoch_rolling_gas_cost_summary_mut(
1926            &mut self,
1927        ) -> &mut super::GasCostSummary {
1928            self.epoch_rolling_gas_cost_summary.get_or_insert_default()
1929        }
1930        ///If `epoch_rolling_gas_cost_summary` is set, returns [`Some`] with the value; otherwise returns [`None`].
1931        pub fn epoch_rolling_gas_cost_summary_opt(
1932            &self,
1933        ) -> Option<&super::GasCostSummary> {
1934            self.epoch_rolling_gas_cost_summary.as_ref().map(|field| field as _)
1935        }
1936        ///Sets `epoch_rolling_gas_cost_summary` with the provided value.
1937        pub fn set_epoch_rolling_gas_cost_summary<T: Into<super::GasCostSummary>>(
1938            &mut self,
1939            field: T,
1940        ) {
1941            self.epoch_rolling_gas_cost_summary = Some(field.into().into());
1942        }
1943        ///Sets `epoch_rolling_gas_cost_summary` with the provided value.
1944        pub fn with_epoch_rolling_gas_cost_summary<T: Into<super::GasCostSummary>>(
1945            mut self,
1946            field: T,
1947        ) -> Self {
1948            self.set_epoch_rolling_gas_cost_summary(field.into());
1949            self
1950        }
1951        ///If `timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
1952        pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
1953            self.timestamp.as_mut().map(|field| field as _)
1954        }
1955        ///Returns a mutable reference to `timestamp`.
1956        ///If the field is unset, it is first initialized with the default value.
1957        pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
1958            self.timestamp.get_or_insert_default()
1959        }
1960        ///If `timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
1961        pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
1962            self.timestamp.as_ref().map(|field| field as _)
1963        }
1964        ///Sets `timestamp` with the provided value.
1965        pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
1966            self.timestamp = Some(field.into().into());
1967        }
1968        ///Sets `timestamp` with the provided value.
1969        pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
1970            mut self,
1971            field: T,
1972        ) -> Self {
1973            self.set_timestamp(field.into());
1974            self
1975        }
1976        ///Returns the value of `commitments`, or the default value if `commitments` is unset.
1977        pub fn commitments(&self) -> &[super::CheckpointCommitment] {
1978            &self.commitments
1979        }
1980        ///Returns a mutable reference to `commitments`.
1981        ///If the field is unset, it is first initialized with the default value.
1982        pub fn commitments_mut(&mut self) -> &mut Vec<super::CheckpointCommitment> {
1983            &mut self.commitments
1984        }
1985        ///Sets `commitments` with the provided value.
1986        pub fn set_commitments(&mut self, field: Vec<super::CheckpointCommitment>) {
1987            self.commitments = field;
1988        }
1989        ///Sets `commitments` with the provided value.
1990        pub fn with_commitments(
1991            mut self,
1992            field: Vec<super::CheckpointCommitment>,
1993        ) -> Self {
1994            self.set_commitments(field);
1995            self
1996        }
1997        ///Returns the value of `end_of_epoch_data`, or the default value if `end_of_epoch_data` is unset.
1998        pub fn end_of_epoch_data(&self) -> &super::EndOfEpochData {
1999            self.end_of_epoch_data
2000                .as_ref()
2001                .map(|field| field as _)
2002                .unwrap_or_else(|| super::EndOfEpochData::default_instance() as _)
2003        }
2004        ///If `end_of_epoch_data` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2005        pub fn end_of_epoch_data_opt_mut(
2006            &mut self,
2007        ) -> Option<&mut super::EndOfEpochData> {
2008            self.end_of_epoch_data.as_mut().map(|field| field as _)
2009        }
2010        ///Returns a mutable reference to `end_of_epoch_data`.
2011        ///If the field is unset, it is first initialized with the default value.
2012        pub fn end_of_epoch_data_mut(&mut self) -> &mut super::EndOfEpochData {
2013            self.end_of_epoch_data.get_or_insert_default()
2014        }
2015        ///If `end_of_epoch_data` is set, returns [`Some`] with the value; otherwise returns [`None`].
2016        pub fn end_of_epoch_data_opt(&self) -> Option<&super::EndOfEpochData> {
2017            self.end_of_epoch_data.as_ref().map(|field| field as _)
2018        }
2019        ///Sets `end_of_epoch_data` with the provided value.
2020        pub fn set_end_of_epoch_data<T: Into<super::EndOfEpochData>>(
2021            &mut self,
2022            field: T,
2023        ) {
2024            self.end_of_epoch_data = Some(field.into().into());
2025        }
2026        ///Sets `end_of_epoch_data` with the provided value.
2027        pub fn with_end_of_epoch_data<T: Into<super::EndOfEpochData>>(
2028            mut self,
2029            field: T,
2030        ) -> Self {
2031            self.set_end_of_epoch_data(field.into());
2032            self
2033        }
2034        ///If `version_specific_data` is set, returns [`Some`] with the value; otherwise returns [`None`].
2035        pub fn version_specific_data_opt(&self) -> Option<&[u8]> {
2036            self.version_specific_data.as_ref().map(|field| field as _)
2037        }
2038        ///Sets `version_specific_data` with the provided value.
2039        pub fn set_version_specific_data<T: Into<::prost::bytes::Bytes>>(
2040            &mut self,
2041            field: T,
2042        ) {
2043            self.version_specific_data = Some(field.into().into());
2044        }
2045        ///Sets `version_specific_data` with the provided value.
2046        pub fn with_version_specific_data<T: Into<::prost::bytes::Bytes>>(
2047            mut self,
2048            field: T,
2049        ) -> Self {
2050            self.set_version_specific_data(field.into());
2051            self
2052        }
2053    }
2054    impl super::CheckpointedTransactionInfo {
2055        pub const fn const_default() -> Self {
2056            Self {
2057                transaction: None,
2058                effects: None,
2059                signatures: Vec::new(),
2060                address_aliases_versions: Vec::new(),
2061            }
2062        }
2063        #[doc(hidden)]
2064        pub fn default_instance() -> &'static Self {
2065            static DEFAULT: super::CheckpointedTransactionInfo = super::CheckpointedTransactionInfo::const_default();
2066            &DEFAULT
2067        }
2068        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2069        pub fn transaction_opt_mut(&mut self) -> Option<&mut String> {
2070            self.transaction.as_mut().map(|field| field as _)
2071        }
2072        ///Returns a mutable reference to `transaction`.
2073        ///If the field is unset, it is first initialized with the default value.
2074        pub fn transaction_mut(&mut self) -> &mut String {
2075            self.transaction.get_or_insert_default()
2076        }
2077        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
2078        pub fn transaction_opt(&self) -> Option<&str> {
2079            self.transaction.as_ref().map(|field| field as _)
2080        }
2081        ///Sets `transaction` with the provided value.
2082        pub fn set_transaction<T: Into<String>>(&mut self, field: T) {
2083            self.transaction = Some(field.into().into());
2084        }
2085        ///Sets `transaction` with the provided value.
2086        pub fn with_transaction<T: Into<String>>(mut self, field: T) -> Self {
2087            self.set_transaction(field.into());
2088            self
2089        }
2090        ///If `effects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2091        pub fn effects_opt_mut(&mut self) -> Option<&mut String> {
2092            self.effects.as_mut().map(|field| field as _)
2093        }
2094        ///Returns a mutable reference to `effects`.
2095        ///If the field is unset, it is first initialized with the default value.
2096        pub fn effects_mut(&mut self) -> &mut String {
2097            self.effects.get_or_insert_default()
2098        }
2099        ///If `effects` is set, returns [`Some`] with the value; otherwise returns [`None`].
2100        pub fn effects_opt(&self) -> Option<&str> {
2101            self.effects.as_ref().map(|field| field as _)
2102        }
2103        ///Sets `effects` with the provided value.
2104        pub fn set_effects<T: Into<String>>(&mut self, field: T) {
2105            self.effects = Some(field.into().into());
2106        }
2107        ///Sets `effects` with the provided value.
2108        pub fn with_effects<T: Into<String>>(mut self, field: T) -> Self {
2109            self.set_effects(field.into());
2110            self
2111        }
2112        ///Returns the value of `signatures`, or the default value if `signatures` is unset.
2113        pub fn signatures(&self) -> &[super::UserSignature] {
2114            &self.signatures
2115        }
2116        ///Returns a mutable reference to `signatures`.
2117        ///If the field is unset, it is first initialized with the default value.
2118        pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
2119            &mut self.signatures
2120        }
2121        ///Sets `signatures` with the provided value.
2122        pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
2123            self.signatures = field;
2124        }
2125        ///Sets `signatures` with the provided value.
2126        pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
2127            self.set_signatures(field);
2128            self
2129        }
2130        ///Returns the value of `address_aliases_versions`, or the default value if `address_aliases_versions` is unset.
2131        pub fn address_aliases_versions(&self) -> &[super::AddressAliasesVersion] {
2132            &self.address_aliases_versions
2133        }
2134        ///Returns a mutable reference to `address_aliases_versions`.
2135        ///If the field is unset, it is first initialized with the default value.
2136        pub fn address_aliases_versions_mut(
2137            &mut self,
2138        ) -> &mut Vec<super::AddressAliasesVersion> {
2139            &mut self.address_aliases_versions
2140        }
2141        ///Sets `address_aliases_versions` with the provided value.
2142        pub fn set_address_aliases_versions(
2143            &mut self,
2144            field: Vec<super::AddressAliasesVersion>,
2145        ) {
2146            self.address_aliases_versions = field;
2147        }
2148        ///Sets `address_aliases_versions` with the provided value.
2149        pub fn with_address_aliases_versions(
2150            mut self,
2151            field: Vec<super::AddressAliasesVersion>,
2152        ) -> Self {
2153            self.set_address_aliases_versions(field);
2154            self
2155        }
2156    }
2157    impl super::CircomG1 {
2158        pub const fn const_default() -> Self {
2159            Self {
2160                e0: None,
2161                e1: None,
2162                e2: None,
2163            }
2164        }
2165        #[doc(hidden)]
2166        pub fn default_instance() -> &'static Self {
2167            static DEFAULT: super::CircomG1 = super::CircomG1::const_default();
2168            &DEFAULT
2169        }
2170        ///If `e0` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2171        pub fn e0_opt_mut(&mut self) -> Option<&mut String> {
2172            self.e0.as_mut().map(|field| field as _)
2173        }
2174        ///Returns a mutable reference to `e0`.
2175        ///If the field is unset, it is first initialized with the default value.
2176        pub fn e0_mut(&mut self) -> &mut String {
2177            self.e0.get_or_insert_default()
2178        }
2179        ///If `e0` is set, returns [`Some`] with the value; otherwise returns [`None`].
2180        pub fn e0_opt(&self) -> Option<&str> {
2181            self.e0.as_ref().map(|field| field as _)
2182        }
2183        ///Sets `e0` with the provided value.
2184        pub fn set_e0<T: Into<String>>(&mut self, field: T) {
2185            self.e0 = Some(field.into().into());
2186        }
2187        ///Sets `e0` with the provided value.
2188        pub fn with_e0<T: Into<String>>(mut self, field: T) -> Self {
2189            self.set_e0(field.into());
2190            self
2191        }
2192        ///If `e1` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2193        pub fn e1_opt_mut(&mut self) -> Option<&mut String> {
2194            self.e1.as_mut().map(|field| field as _)
2195        }
2196        ///Returns a mutable reference to `e1`.
2197        ///If the field is unset, it is first initialized with the default value.
2198        pub fn e1_mut(&mut self) -> &mut String {
2199            self.e1.get_or_insert_default()
2200        }
2201        ///If `e1` is set, returns [`Some`] with the value; otherwise returns [`None`].
2202        pub fn e1_opt(&self) -> Option<&str> {
2203            self.e1.as_ref().map(|field| field as _)
2204        }
2205        ///Sets `e1` with the provided value.
2206        pub fn set_e1<T: Into<String>>(&mut self, field: T) {
2207            self.e1 = Some(field.into().into());
2208        }
2209        ///Sets `e1` with the provided value.
2210        pub fn with_e1<T: Into<String>>(mut self, field: T) -> Self {
2211            self.set_e1(field.into());
2212            self
2213        }
2214        ///If `e2` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2215        pub fn e2_opt_mut(&mut self) -> Option<&mut String> {
2216            self.e2.as_mut().map(|field| field as _)
2217        }
2218        ///Returns a mutable reference to `e2`.
2219        ///If the field is unset, it is first initialized with the default value.
2220        pub fn e2_mut(&mut self) -> &mut String {
2221            self.e2.get_or_insert_default()
2222        }
2223        ///If `e2` is set, returns [`Some`] with the value; otherwise returns [`None`].
2224        pub fn e2_opt(&self) -> Option<&str> {
2225            self.e2.as_ref().map(|field| field as _)
2226        }
2227        ///Sets `e2` with the provided value.
2228        pub fn set_e2<T: Into<String>>(&mut self, field: T) {
2229            self.e2 = Some(field.into().into());
2230        }
2231        ///Sets `e2` with the provided value.
2232        pub fn with_e2<T: Into<String>>(mut self, field: T) -> Self {
2233            self.set_e2(field.into());
2234            self
2235        }
2236    }
2237    impl super::CircomG2 {
2238        pub const fn const_default() -> Self {
2239            Self {
2240                e00: None,
2241                e01: None,
2242                e10: None,
2243                e11: None,
2244                e20: None,
2245                e21: None,
2246            }
2247        }
2248        #[doc(hidden)]
2249        pub fn default_instance() -> &'static Self {
2250            static DEFAULT: super::CircomG2 = super::CircomG2::const_default();
2251            &DEFAULT
2252        }
2253        ///If `e00` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2254        pub fn e00_opt_mut(&mut self) -> Option<&mut String> {
2255            self.e00.as_mut().map(|field| field as _)
2256        }
2257        ///Returns a mutable reference to `e00`.
2258        ///If the field is unset, it is first initialized with the default value.
2259        pub fn e00_mut(&mut self) -> &mut String {
2260            self.e00.get_or_insert_default()
2261        }
2262        ///If `e00` is set, returns [`Some`] with the value; otherwise returns [`None`].
2263        pub fn e00_opt(&self) -> Option<&str> {
2264            self.e00.as_ref().map(|field| field as _)
2265        }
2266        ///Sets `e00` with the provided value.
2267        pub fn set_e00<T: Into<String>>(&mut self, field: T) {
2268            self.e00 = Some(field.into().into());
2269        }
2270        ///Sets `e00` with the provided value.
2271        pub fn with_e00<T: Into<String>>(mut self, field: T) -> Self {
2272            self.set_e00(field.into());
2273            self
2274        }
2275        ///If `e01` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2276        pub fn e01_opt_mut(&mut self) -> Option<&mut String> {
2277            self.e01.as_mut().map(|field| field as _)
2278        }
2279        ///Returns a mutable reference to `e01`.
2280        ///If the field is unset, it is first initialized with the default value.
2281        pub fn e01_mut(&mut self) -> &mut String {
2282            self.e01.get_or_insert_default()
2283        }
2284        ///If `e01` is set, returns [`Some`] with the value; otherwise returns [`None`].
2285        pub fn e01_opt(&self) -> Option<&str> {
2286            self.e01.as_ref().map(|field| field as _)
2287        }
2288        ///Sets `e01` with the provided value.
2289        pub fn set_e01<T: Into<String>>(&mut self, field: T) {
2290            self.e01 = Some(field.into().into());
2291        }
2292        ///Sets `e01` with the provided value.
2293        pub fn with_e01<T: Into<String>>(mut self, field: T) -> Self {
2294            self.set_e01(field.into());
2295            self
2296        }
2297        ///If `e10` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2298        pub fn e10_opt_mut(&mut self) -> Option<&mut String> {
2299            self.e10.as_mut().map(|field| field as _)
2300        }
2301        ///Returns a mutable reference to `e10`.
2302        ///If the field is unset, it is first initialized with the default value.
2303        pub fn e10_mut(&mut self) -> &mut String {
2304            self.e10.get_or_insert_default()
2305        }
2306        ///If `e10` is set, returns [`Some`] with the value; otherwise returns [`None`].
2307        pub fn e10_opt(&self) -> Option<&str> {
2308            self.e10.as_ref().map(|field| field as _)
2309        }
2310        ///Sets `e10` with the provided value.
2311        pub fn set_e10<T: Into<String>>(&mut self, field: T) {
2312            self.e10 = Some(field.into().into());
2313        }
2314        ///Sets `e10` with the provided value.
2315        pub fn with_e10<T: Into<String>>(mut self, field: T) -> Self {
2316            self.set_e10(field.into());
2317            self
2318        }
2319        ///If `e11` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2320        pub fn e11_opt_mut(&mut self) -> Option<&mut String> {
2321            self.e11.as_mut().map(|field| field as _)
2322        }
2323        ///Returns a mutable reference to `e11`.
2324        ///If the field is unset, it is first initialized with the default value.
2325        pub fn e11_mut(&mut self) -> &mut String {
2326            self.e11.get_or_insert_default()
2327        }
2328        ///If `e11` is set, returns [`Some`] with the value; otherwise returns [`None`].
2329        pub fn e11_opt(&self) -> Option<&str> {
2330            self.e11.as_ref().map(|field| field as _)
2331        }
2332        ///Sets `e11` with the provided value.
2333        pub fn set_e11<T: Into<String>>(&mut self, field: T) {
2334            self.e11 = Some(field.into().into());
2335        }
2336        ///Sets `e11` with the provided value.
2337        pub fn with_e11<T: Into<String>>(mut self, field: T) -> Self {
2338            self.set_e11(field.into());
2339            self
2340        }
2341        ///If `e20` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2342        pub fn e20_opt_mut(&mut self) -> Option<&mut String> {
2343            self.e20.as_mut().map(|field| field as _)
2344        }
2345        ///Returns a mutable reference to `e20`.
2346        ///If the field is unset, it is first initialized with the default value.
2347        pub fn e20_mut(&mut self) -> &mut String {
2348            self.e20.get_or_insert_default()
2349        }
2350        ///If `e20` is set, returns [`Some`] with the value; otherwise returns [`None`].
2351        pub fn e20_opt(&self) -> Option<&str> {
2352            self.e20.as_ref().map(|field| field as _)
2353        }
2354        ///Sets `e20` with the provided value.
2355        pub fn set_e20<T: Into<String>>(&mut self, field: T) {
2356            self.e20 = Some(field.into().into());
2357        }
2358        ///Sets `e20` with the provided value.
2359        pub fn with_e20<T: Into<String>>(mut self, field: T) -> Self {
2360            self.set_e20(field.into());
2361            self
2362        }
2363        ///If `e21` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2364        pub fn e21_opt_mut(&mut self) -> Option<&mut String> {
2365            self.e21.as_mut().map(|field| field as _)
2366        }
2367        ///Returns a mutable reference to `e21`.
2368        ///If the field is unset, it is first initialized with the default value.
2369        pub fn e21_mut(&mut self) -> &mut String {
2370            self.e21.get_or_insert_default()
2371        }
2372        ///If `e21` is set, returns [`Some`] with the value; otherwise returns [`None`].
2373        pub fn e21_opt(&self) -> Option<&str> {
2374            self.e21.as_ref().map(|field| field as _)
2375        }
2376        ///Sets `e21` with the provided value.
2377        pub fn set_e21<T: Into<String>>(&mut self, field: T) {
2378            self.e21 = Some(field.into().into());
2379        }
2380        ///Sets `e21` with the provided value.
2381        pub fn with_e21<T: Into<String>>(mut self, field: T) -> Self {
2382            self.set_e21(field.into());
2383            self
2384        }
2385    }
2386    impl super::CleverError {
2387        pub const fn const_default() -> Self {
2388            Self {
2389                error_code: None,
2390                line_number: None,
2391                constant_name: None,
2392                constant_type: None,
2393                value: None,
2394            }
2395        }
2396        #[doc(hidden)]
2397        pub fn default_instance() -> &'static Self {
2398            static DEFAULT: super::CleverError = super::CleverError::const_default();
2399            &DEFAULT
2400        }
2401        ///If `error_code` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2402        pub fn error_code_opt_mut(&mut self) -> Option<&mut u64> {
2403            self.error_code.as_mut().map(|field| field as _)
2404        }
2405        ///Returns a mutable reference to `error_code`.
2406        ///If the field is unset, it is first initialized with the default value.
2407        pub fn error_code_mut(&mut self) -> &mut u64 {
2408            self.error_code.get_or_insert_default()
2409        }
2410        ///If `error_code` is set, returns [`Some`] with the value; otherwise returns [`None`].
2411        pub fn error_code_opt(&self) -> Option<u64> {
2412            self.error_code.as_ref().map(|field| *field)
2413        }
2414        ///Sets `error_code` with the provided value.
2415        pub fn set_error_code(&mut self, field: u64) {
2416            self.error_code = Some(field);
2417        }
2418        ///Sets `error_code` with the provided value.
2419        pub fn with_error_code(mut self, field: u64) -> Self {
2420            self.set_error_code(field);
2421            self
2422        }
2423        ///If `line_number` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2424        pub fn line_number_opt_mut(&mut self) -> Option<&mut u64> {
2425            self.line_number.as_mut().map(|field| field as _)
2426        }
2427        ///Returns a mutable reference to `line_number`.
2428        ///If the field is unset, it is first initialized with the default value.
2429        pub fn line_number_mut(&mut self) -> &mut u64 {
2430            self.line_number.get_or_insert_default()
2431        }
2432        ///If `line_number` is set, returns [`Some`] with the value; otherwise returns [`None`].
2433        pub fn line_number_opt(&self) -> Option<u64> {
2434            self.line_number.as_ref().map(|field| *field)
2435        }
2436        ///Sets `line_number` with the provided value.
2437        pub fn set_line_number(&mut self, field: u64) {
2438            self.line_number = Some(field);
2439        }
2440        ///Sets `line_number` with the provided value.
2441        pub fn with_line_number(mut self, field: u64) -> Self {
2442            self.set_line_number(field);
2443            self
2444        }
2445        ///If `constant_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2446        pub fn constant_name_opt_mut(&mut self) -> Option<&mut String> {
2447            self.constant_name.as_mut().map(|field| field as _)
2448        }
2449        ///Returns a mutable reference to `constant_name`.
2450        ///If the field is unset, it is first initialized with the default value.
2451        pub fn constant_name_mut(&mut self) -> &mut String {
2452            self.constant_name.get_or_insert_default()
2453        }
2454        ///If `constant_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
2455        pub fn constant_name_opt(&self) -> Option<&str> {
2456            self.constant_name.as_ref().map(|field| field as _)
2457        }
2458        ///Sets `constant_name` with the provided value.
2459        pub fn set_constant_name<T: Into<String>>(&mut self, field: T) {
2460            self.constant_name = Some(field.into().into());
2461        }
2462        ///Sets `constant_name` with the provided value.
2463        pub fn with_constant_name<T: Into<String>>(mut self, field: T) -> Self {
2464            self.set_constant_name(field.into());
2465            self
2466        }
2467        ///If `constant_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2468        pub fn constant_type_opt_mut(&mut self) -> Option<&mut String> {
2469            self.constant_type.as_mut().map(|field| field as _)
2470        }
2471        ///Returns a mutable reference to `constant_type`.
2472        ///If the field is unset, it is first initialized with the default value.
2473        pub fn constant_type_mut(&mut self) -> &mut String {
2474            self.constant_type.get_or_insert_default()
2475        }
2476        ///If `constant_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
2477        pub fn constant_type_opt(&self) -> Option<&str> {
2478            self.constant_type.as_ref().map(|field| field as _)
2479        }
2480        ///Sets `constant_type` with the provided value.
2481        pub fn set_constant_type<T: Into<String>>(&mut self, field: T) {
2482            self.constant_type = Some(field.into().into());
2483        }
2484        ///Sets `constant_type` with the provided value.
2485        pub fn with_constant_type<T: Into<String>>(mut self, field: T) -> Self {
2486            self.set_constant_type(field.into());
2487            self
2488        }
2489        ///Returns the value of `rendered`, or the default value if `rendered` is unset.
2490        pub fn rendered(&self) -> &str {
2491            if let Some(super::clever_error::Value::Rendered(field)) = &self.value {
2492                field as _
2493            } else {
2494                ""
2495            }
2496        }
2497        ///If `rendered` is set, returns [`Some`] with the value; otherwise returns [`None`].
2498        pub fn rendered_opt(&self) -> Option<&str> {
2499            if let Some(super::clever_error::Value::Rendered(field)) = &self.value {
2500                Some(field as _)
2501            } else {
2502                None
2503            }
2504        }
2505        ///If `rendered` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2506        pub fn rendered_opt_mut(&mut self) -> Option<&mut String> {
2507            if let Some(super::clever_error::Value::Rendered(field)) = &mut self.value {
2508                Some(field as _)
2509            } else {
2510                None
2511            }
2512        }
2513        ///Returns a mutable reference to `rendered`.
2514        ///If the field is unset, it is first initialized with the default value.
2515        ///If any other oneof field in the same oneof is set, it will be cleared.
2516        pub fn rendered_mut(&mut self) -> &mut String {
2517            if self.rendered_opt_mut().is_none() {
2518                self.value = Some(
2519                    super::clever_error::Value::Rendered(String::default()),
2520                );
2521            }
2522            self.rendered_opt_mut().unwrap()
2523        }
2524        ///Sets `rendered` with the provided value.
2525        ///If any other oneof field in the same oneof is set, it will be cleared.
2526        pub fn set_rendered<T: Into<String>>(&mut self, field: T) {
2527            self.value = Some(super::clever_error::Value::Rendered(field.into().into()));
2528        }
2529        ///Sets `rendered` with the provided value.
2530        ///If any other oneof field in the same oneof is set, it will be cleared.
2531        pub fn with_rendered<T: Into<String>>(mut self, field: T) -> Self {
2532            self.set_rendered(field.into());
2533            self
2534        }
2535        ///Returns the value of `raw`, or the default value if `raw` is unset.
2536        pub fn raw(&self) -> &[u8] {
2537            if let Some(super::clever_error::Value::Raw(field)) = &self.value {
2538                field as _
2539            } else {
2540                &[]
2541            }
2542        }
2543        ///If `raw` is set, returns [`Some`] with the value; otherwise returns [`None`].
2544        pub fn raw_opt(&self) -> Option<&[u8]> {
2545            if let Some(super::clever_error::Value::Raw(field)) = &self.value {
2546                Some(field as _)
2547            } else {
2548                None
2549            }
2550        }
2551        ///If `raw` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2552        pub fn raw_opt_mut(&mut self) -> Option<&mut ::prost::bytes::Bytes> {
2553            if let Some(super::clever_error::Value::Raw(field)) = &mut self.value {
2554                Some(field as _)
2555            } else {
2556                None
2557            }
2558        }
2559        ///Returns a mutable reference to `raw`.
2560        ///If the field is unset, it is first initialized with the default value.
2561        ///If any other oneof field in the same oneof is set, it will be cleared.
2562        pub fn raw_mut(&mut self) -> &mut ::prost::bytes::Bytes {
2563            if self.raw_opt_mut().is_none() {
2564                self.value = Some(
2565                    super::clever_error::Value::Raw(::prost::bytes::Bytes::default()),
2566                );
2567            }
2568            self.raw_opt_mut().unwrap()
2569        }
2570        ///Sets `raw` with the provided value.
2571        ///If any other oneof field in the same oneof is set, it will be cleared.
2572        pub fn set_raw<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
2573            self.value = Some(super::clever_error::Value::Raw(field.into().into()));
2574        }
2575        ///Sets `raw` with the provided value.
2576        ///If any other oneof field in the same oneof is set, it will be cleared.
2577        pub fn with_raw<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
2578            self.set_raw(field.into());
2579            self
2580        }
2581    }
2582    impl super::CoinDenyListError {
2583        pub const fn const_default() -> Self {
2584            Self {
2585                address: None,
2586                coin_type: None,
2587            }
2588        }
2589        #[doc(hidden)]
2590        pub fn default_instance() -> &'static Self {
2591            static DEFAULT: super::CoinDenyListError = super::CoinDenyListError::const_default();
2592            &DEFAULT
2593        }
2594        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2595        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
2596            self.address.as_mut().map(|field| field as _)
2597        }
2598        ///Returns a mutable reference to `address`.
2599        ///If the field is unset, it is first initialized with the default value.
2600        pub fn address_mut(&mut self) -> &mut String {
2601            self.address.get_or_insert_default()
2602        }
2603        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
2604        pub fn address_opt(&self) -> Option<&str> {
2605            self.address.as_ref().map(|field| field as _)
2606        }
2607        ///Sets `address` with the provided value.
2608        pub fn set_address<T: Into<String>>(&mut self, field: T) {
2609            self.address = Some(field.into().into());
2610        }
2611        ///Sets `address` with the provided value.
2612        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
2613            self.set_address(field.into());
2614            self
2615        }
2616        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2617        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
2618            self.coin_type.as_mut().map(|field| field as _)
2619        }
2620        ///Returns a mutable reference to `coin_type`.
2621        ///If the field is unset, it is first initialized with the default value.
2622        pub fn coin_type_mut(&mut self) -> &mut String {
2623            self.coin_type.get_or_insert_default()
2624        }
2625        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
2626        pub fn coin_type_opt(&self) -> Option<&str> {
2627            self.coin_type.as_ref().map(|field| field as _)
2628        }
2629        ///Sets `coin_type` with the provided value.
2630        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
2631            self.coin_type = Some(field.into().into());
2632        }
2633        ///Sets `coin_type` with the provided value.
2634        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
2635            self.set_coin_type(field.into());
2636            self
2637        }
2638    }
2639    impl super::CoinMetadata {
2640        pub const fn const_default() -> Self {
2641            Self {
2642                id: None,
2643                decimals: None,
2644                name: None,
2645                symbol: None,
2646                description: None,
2647                icon_url: None,
2648                metadata_cap_id: None,
2649                metadata_cap_state: None,
2650            }
2651        }
2652        #[doc(hidden)]
2653        pub fn default_instance() -> &'static Self {
2654            static DEFAULT: super::CoinMetadata = super::CoinMetadata::const_default();
2655            &DEFAULT
2656        }
2657        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2658        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
2659            self.id.as_mut().map(|field| field as _)
2660        }
2661        ///Returns a mutable reference to `id`.
2662        ///If the field is unset, it is first initialized with the default value.
2663        pub fn id_mut(&mut self) -> &mut String {
2664            self.id.get_or_insert_default()
2665        }
2666        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
2667        pub fn id_opt(&self) -> Option<&str> {
2668            self.id.as_ref().map(|field| field as _)
2669        }
2670        ///Sets `id` with the provided value.
2671        pub fn set_id<T: Into<String>>(&mut self, field: T) {
2672            self.id = Some(field.into().into());
2673        }
2674        ///Sets `id` with the provided value.
2675        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
2676            self.set_id(field.into());
2677            self
2678        }
2679        ///If `decimals` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2680        pub fn decimals_opt_mut(&mut self) -> Option<&mut u32> {
2681            self.decimals.as_mut().map(|field| field as _)
2682        }
2683        ///Returns a mutable reference to `decimals`.
2684        ///If the field is unset, it is first initialized with the default value.
2685        pub fn decimals_mut(&mut self) -> &mut u32 {
2686            self.decimals.get_or_insert_default()
2687        }
2688        ///If `decimals` is set, returns [`Some`] with the value; otherwise returns [`None`].
2689        pub fn decimals_opt(&self) -> Option<u32> {
2690            self.decimals.as_ref().map(|field| *field)
2691        }
2692        ///Sets `decimals` with the provided value.
2693        pub fn set_decimals(&mut self, field: u32) {
2694            self.decimals = Some(field);
2695        }
2696        ///Sets `decimals` with the provided value.
2697        pub fn with_decimals(mut self, field: u32) -> Self {
2698            self.set_decimals(field);
2699            self
2700        }
2701        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2702        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
2703            self.name.as_mut().map(|field| field as _)
2704        }
2705        ///Returns a mutable reference to `name`.
2706        ///If the field is unset, it is first initialized with the default value.
2707        pub fn name_mut(&mut self) -> &mut String {
2708            self.name.get_or_insert_default()
2709        }
2710        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
2711        pub fn name_opt(&self) -> Option<&str> {
2712            self.name.as_ref().map(|field| field as _)
2713        }
2714        ///Sets `name` with the provided value.
2715        pub fn set_name<T: Into<String>>(&mut self, field: T) {
2716            self.name = Some(field.into().into());
2717        }
2718        ///Sets `name` with the provided value.
2719        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
2720            self.set_name(field.into());
2721            self
2722        }
2723        ///If `symbol` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2724        pub fn symbol_opt_mut(&mut self) -> Option<&mut String> {
2725            self.symbol.as_mut().map(|field| field as _)
2726        }
2727        ///Returns a mutable reference to `symbol`.
2728        ///If the field is unset, it is first initialized with the default value.
2729        pub fn symbol_mut(&mut self) -> &mut String {
2730            self.symbol.get_or_insert_default()
2731        }
2732        ///If `symbol` is set, returns [`Some`] with the value; otherwise returns [`None`].
2733        pub fn symbol_opt(&self) -> Option<&str> {
2734            self.symbol.as_ref().map(|field| field as _)
2735        }
2736        ///Sets `symbol` with the provided value.
2737        pub fn set_symbol<T: Into<String>>(&mut self, field: T) {
2738            self.symbol = Some(field.into().into());
2739        }
2740        ///Sets `symbol` with the provided value.
2741        pub fn with_symbol<T: Into<String>>(mut self, field: T) -> Self {
2742            self.set_symbol(field.into());
2743            self
2744        }
2745        ///If `description` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2746        pub fn description_opt_mut(&mut self) -> Option<&mut String> {
2747            self.description.as_mut().map(|field| field as _)
2748        }
2749        ///Returns a mutable reference to `description`.
2750        ///If the field is unset, it is first initialized with the default value.
2751        pub fn description_mut(&mut self) -> &mut String {
2752            self.description.get_or_insert_default()
2753        }
2754        ///If `description` is set, returns [`Some`] with the value; otherwise returns [`None`].
2755        pub fn description_opt(&self) -> Option<&str> {
2756            self.description.as_ref().map(|field| field as _)
2757        }
2758        ///Sets `description` with the provided value.
2759        pub fn set_description<T: Into<String>>(&mut self, field: T) {
2760            self.description = Some(field.into().into());
2761        }
2762        ///Sets `description` with the provided value.
2763        pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
2764            self.set_description(field.into());
2765            self
2766        }
2767        ///If `icon_url` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2768        pub fn icon_url_opt_mut(&mut self) -> Option<&mut String> {
2769            self.icon_url.as_mut().map(|field| field as _)
2770        }
2771        ///Returns a mutable reference to `icon_url`.
2772        ///If the field is unset, it is first initialized with the default value.
2773        pub fn icon_url_mut(&mut self) -> &mut String {
2774            self.icon_url.get_or_insert_default()
2775        }
2776        ///If `icon_url` is set, returns [`Some`] with the value; otherwise returns [`None`].
2777        pub fn icon_url_opt(&self) -> Option<&str> {
2778            self.icon_url.as_ref().map(|field| field as _)
2779        }
2780        ///Sets `icon_url` with the provided value.
2781        pub fn set_icon_url<T: Into<String>>(&mut self, field: T) {
2782            self.icon_url = Some(field.into().into());
2783        }
2784        ///Sets `icon_url` with the provided value.
2785        pub fn with_icon_url<T: Into<String>>(mut self, field: T) -> Self {
2786            self.set_icon_url(field.into());
2787            self
2788        }
2789        ///If `metadata_cap_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2790        pub fn metadata_cap_id_opt_mut(&mut self) -> Option<&mut String> {
2791            self.metadata_cap_id.as_mut().map(|field| field as _)
2792        }
2793        ///Returns a mutable reference to `metadata_cap_id`.
2794        ///If the field is unset, it is first initialized with the default value.
2795        pub fn metadata_cap_id_mut(&mut self) -> &mut String {
2796            self.metadata_cap_id.get_or_insert_default()
2797        }
2798        ///If `metadata_cap_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
2799        pub fn metadata_cap_id_opt(&self) -> Option<&str> {
2800            self.metadata_cap_id.as_ref().map(|field| field as _)
2801        }
2802        ///Sets `metadata_cap_id` with the provided value.
2803        pub fn set_metadata_cap_id<T: Into<String>>(&mut self, field: T) {
2804            self.metadata_cap_id = Some(field.into().into());
2805        }
2806        ///Sets `metadata_cap_id` with the provided value.
2807        pub fn with_metadata_cap_id<T: Into<String>>(mut self, field: T) -> Self {
2808            self.set_metadata_cap_id(field.into());
2809            self
2810        }
2811        ///Sets `metadata_cap_state` with the provided value.
2812        pub fn with_metadata_cap_state<T: Into<super::coin_metadata::MetadataCapState>>(
2813            mut self,
2814            field: T,
2815        ) -> Self {
2816            self.set_metadata_cap_state(field.into());
2817            self
2818        }
2819    }
2820    impl super::CoinTreasury {
2821        pub const fn const_default() -> Self {
2822            Self {
2823                id: None,
2824                total_supply: None,
2825                supply_state: None,
2826            }
2827        }
2828        #[doc(hidden)]
2829        pub fn default_instance() -> &'static Self {
2830            static DEFAULT: super::CoinTreasury = super::CoinTreasury::const_default();
2831            &DEFAULT
2832        }
2833        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2834        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
2835            self.id.as_mut().map(|field| field as _)
2836        }
2837        ///Returns a mutable reference to `id`.
2838        ///If the field is unset, it is first initialized with the default value.
2839        pub fn id_mut(&mut self) -> &mut String {
2840            self.id.get_or_insert_default()
2841        }
2842        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
2843        pub fn id_opt(&self) -> Option<&str> {
2844            self.id.as_ref().map(|field| field as _)
2845        }
2846        ///Sets `id` with the provided value.
2847        pub fn set_id<T: Into<String>>(&mut self, field: T) {
2848            self.id = Some(field.into().into());
2849        }
2850        ///Sets `id` with the provided value.
2851        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
2852            self.set_id(field.into());
2853            self
2854        }
2855        ///If `total_supply` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2856        pub fn total_supply_opt_mut(&mut self) -> Option<&mut u64> {
2857            self.total_supply.as_mut().map(|field| field as _)
2858        }
2859        ///Returns a mutable reference to `total_supply`.
2860        ///If the field is unset, it is first initialized with the default value.
2861        pub fn total_supply_mut(&mut self) -> &mut u64 {
2862            self.total_supply.get_or_insert_default()
2863        }
2864        ///If `total_supply` is set, returns [`Some`] with the value; otherwise returns [`None`].
2865        pub fn total_supply_opt(&self) -> Option<u64> {
2866            self.total_supply.as_ref().map(|field| *field)
2867        }
2868        ///Sets `total_supply` with the provided value.
2869        pub fn set_total_supply(&mut self, field: u64) {
2870            self.total_supply = Some(field);
2871        }
2872        ///Sets `total_supply` with the provided value.
2873        pub fn with_total_supply(mut self, field: u64) -> Self {
2874            self.set_total_supply(field);
2875            self
2876        }
2877        ///Sets `supply_state` with the provided value.
2878        pub fn with_supply_state<T: Into<super::coin_treasury::SupplyState>>(
2879            mut self,
2880            field: T,
2881        ) -> Self {
2882            self.set_supply_state(field.into());
2883            self
2884        }
2885    }
2886    impl super::Command {
2887        pub const fn const_default() -> Self {
2888            Self { command: None }
2889        }
2890        #[doc(hidden)]
2891        pub fn default_instance() -> &'static Self {
2892            static DEFAULT: super::Command = super::Command::const_default();
2893            &DEFAULT
2894        }
2895        ///Returns the value of `move_call`, or the default value if `move_call` is unset.
2896        pub fn move_call(&self) -> &super::MoveCall {
2897            if let Some(super::command::Command::MoveCall(field)) = &self.command {
2898                field as _
2899            } else {
2900                super::MoveCall::default_instance() as _
2901            }
2902        }
2903        ///If `move_call` is set, returns [`Some`] with the value; otherwise returns [`None`].
2904        pub fn move_call_opt(&self) -> Option<&super::MoveCall> {
2905            if let Some(super::command::Command::MoveCall(field)) = &self.command {
2906                Some(field as _)
2907            } else {
2908                None
2909            }
2910        }
2911        ///If `move_call` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2912        pub fn move_call_opt_mut(&mut self) -> Option<&mut super::MoveCall> {
2913            if let Some(super::command::Command::MoveCall(field)) = &mut self.command {
2914                Some(field as _)
2915            } else {
2916                None
2917            }
2918        }
2919        ///Returns a mutable reference to `move_call`.
2920        ///If the field is unset, it is first initialized with the default value.
2921        ///If any other oneof field in the same oneof is set, it will be cleared.
2922        pub fn move_call_mut(&mut self) -> &mut super::MoveCall {
2923            if self.move_call_opt_mut().is_none() {
2924                self.command = Some(
2925                    super::command::Command::MoveCall(super::MoveCall::default()),
2926                );
2927            }
2928            self.move_call_opt_mut().unwrap()
2929        }
2930        ///Sets `move_call` with the provided value.
2931        ///If any other oneof field in the same oneof is set, it will be cleared.
2932        pub fn set_move_call<T: Into<super::MoveCall>>(&mut self, field: T) {
2933            self.command = Some(super::command::Command::MoveCall(field.into().into()));
2934        }
2935        ///Sets `move_call` with the provided value.
2936        ///If any other oneof field in the same oneof is set, it will be cleared.
2937        pub fn with_move_call<T: Into<super::MoveCall>>(mut self, field: T) -> Self {
2938            self.set_move_call(field.into());
2939            self
2940        }
2941        ///Returns the value of `transfer_objects`, or the default value if `transfer_objects` is unset.
2942        pub fn transfer_objects(&self) -> &super::TransferObjects {
2943            if let Some(super::command::Command::TransferObjects(field)) = &self.command
2944            {
2945                field as _
2946            } else {
2947                super::TransferObjects::default_instance() as _
2948            }
2949        }
2950        ///If `transfer_objects` is set, returns [`Some`] with the value; otherwise returns [`None`].
2951        pub fn transfer_objects_opt(&self) -> Option<&super::TransferObjects> {
2952            if let Some(super::command::Command::TransferObjects(field)) = &self.command
2953            {
2954                Some(field as _)
2955            } else {
2956                None
2957            }
2958        }
2959        ///If `transfer_objects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
2960        pub fn transfer_objects_opt_mut(
2961            &mut self,
2962        ) -> Option<&mut super::TransferObjects> {
2963            if let Some(super::command::Command::TransferObjects(field)) = &mut self
2964                .command
2965            {
2966                Some(field as _)
2967            } else {
2968                None
2969            }
2970        }
2971        ///Returns a mutable reference to `transfer_objects`.
2972        ///If the field is unset, it is first initialized with the default value.
2973        ///If any other oneof field in the same oneof is set, it will be cleared.
2974        pub fn transfer_objects_mut(&mut self) -> &mut super::TransferObjects {
2975            if self.transfer_objects_opt_mut().is_none() {
2976                self.command = Some(
2977                    super::command::Command::TransferObjects(
2978                        super::TransferObjects::default(),
2979                    ),
2980                );
2981            }
2982            self.transfer_objects_opt_mut().unwrap()
2983        }
2984        ///Sets `transfer_objects` with the provided value.
2985        ///If any other oneof field in the same oneof is set, it will be cleared.
2986        pub fn set_transfer_objects<T: Into<super::TransferObjects>>(
2987            &mut self,
2988            field: T,
2989        ) {
2990            self.command = Some(
2991                super::command::Command::TransferObjects(field.into().into()),
2992            );
2993        }
2994        ///Sets `transfer_objects` with the provided value.
2995        ///If any other oneof field in the same oneof is set, it will be cleared.
2996        pub fn with_transfer_objects<T: Into<super::TransferObjects>>(
2997            mut self,
2998            field: T,
2999        ) -> Self {
3000            self.set_transfer_objects(field.into());
3001            self
3002        }
3003        ///Returns the value of `split_coins`, or the default value if `split_coins` is unset.
3004        pub fn split_coins(&self) -> &super::SplitCoins {
3005            if let Some(super::command::Command::SplitCoins(field)) = &self.command {
3006                field as _
3007            } else {
3008                super::SplitCoins::default_instance() as _
3009            }
3010        }
3011        ///If `split_coins` is set, returns [`Some`] with the value; otherwise returns [`None`].
3012        pub fn split_coins_opt(&self) -> Option<&super::SplitCoins> {
3013            if let Some(super::command::Command::SplitCoins(field)) = &self.command {
3014                Some(field as _)
3015            } else {
3016                None
3017            }
3018        }
3019        ///If `split_coins` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3020        pub fn split_coins_opt_mut(&mut self) -> Option<&mut super::SplitCoins> {
3021            if let Some(super::command::Command::SplitCoins(field)) = &mut self.command {
3022                Some(field as _)
3023            } else {
3024                None
3025            }
3026        }
3027        ///Returns a mutable reference to `split_coins`.
3028        ///If the field is unset, it is first initialized with the default value.
3029        ///If any other oneof field in the same oneof is set, it will be cleared.
3030        pub fn split_coins_mut(&mut self) -> &mut super::SplitCoins {
3031            if self.split_coins_opt_mut().is_none() {
3032                self.command = Some(
3033                    super::command::Command::SplitCoins(super::SplitCoins::default()),
3034                );
3035            }
3036            self.split_coins_opt_mut().unwrap()
3037        }
3038        ///Sets `split_coins` with the provided value.
3039        ///If any other oneof field in the same oneof is set, it will be cleared.
3040        pub fn set_split_coins<T: Into<super::SplitCoins>>(&mut self, field: T) {
3041            self.command = Some(
3042                super::command::Command::SplitCoins(field.into().into()),
3043            );
3044        }
3045        ///Sets `split_coins` with the provided value.
3046        ///If any other oneof field in the same oneof is set, it will be cleared.
3047        pub fn with_split_coins<T: Into<super::SplitCoins>>(mut self, field: T) -> Self {
3048            self.set_split_coins(field.into());
3049            self
3050        }
3051        ///Returns the value of `merge_coins`, or the default value if `merge_coins` is unset.
3052        pub fn merge_coins(&self) -> &super::MergeCoins {
3053            if let Some(super::command::Command::MergeCoins(field)) = &self.command {
3054                field as _
3055            } else {
3056                super::MergeCoins::default_instance() as _
3057            }
3058        }
3059        ///If `merge_coins` is set, returns [`Some`] with the value; otherwise returns [`None`].
3060        pub fn merge_coins_opt(&self) -> Option<&super::MergeCoins> {
3061            if let Some(super::command::Command::MergeCoins(field)) = &self.command {
3062                Some(field as _)
3063            } else {
3064                None
3065            }
3066        }
3067        ///If `merge_coins` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3068        pub fn merge_coins_opt_mut(&mut self) -> Option<&mut super::MergeCoins> {
3069            if let Some(super::command::Command::MergeCoins(field)) = &mut self.command {
3070                Some(field as _)
3071            } else {
3072                None
3073            }
3074        }
3075        ///Returns a mutable reference to `merge_coins`.
3076        ///If the field is unset, it is first initialized with the default value.
3077        ///If any other oneof field in the same oneof is set, it will be cleared.
3078        pub fn merge_coins_mut(&mut self) -> &mut super::MergeCoins {
3079            if self.merge_coins_opt_mut().is_none() {
3080                self.command = Some(
3081                    super::command::Command::MergeCoins(super::MergeCoins::default()),
3082                );
3083            }
3084            self.merge_coins_opt_mut().unwrap()
3085        }
3086        ///Sets `merge_coins` with the provided value.
3087        ///If any other oneof field in the same oneof is set, it will be cleared.
3088        pub fn set_merge_coins<T: Into<super::MergeCoins>>(&mut self, field: T) {
3089            self.command = Some(
3090                super::command::Command::MergeCoins(field.into().into()),
3091            );
3092        }
3093        ///Sets `merge_coins` with the provided value.
3094        ///If any other oneof field in the same oneof is set, it will be cleared.
3095        pub fn with_merge_coins<T: Into<super::MergeCoins>>(mut self, field: T) -> Self {
3096            self.set_merge_coins(field.into());
3097            self
3098        }
3099        ///Returns the value of `publish`, or the default value if `publish` is unset.
3100        pub fn publish(&self) -> &super::Publish {
3101            if let Some(super::command::Command::Publish(field)) = &self.command {
3102                field as _
3103            } else {
3104                super::Publish::default_instance() as _
3105            }
3106        }
3107        ///If `publish` is set, returns [`Some`] with the value; otherwise returns [`None`].
3108        pub fn publish_opt(&self) -> Option<&super::Publish> {
3109            if let Some(super::command::Command::Publish(field)) = &self.command {
3110                Some(field as _)
3111            } else {
3112                None
3113            }
3114        }
3115        ///If `publish` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3116        pub fn publish_opt_mut(&mut self) -> Option<&mut super::Publish> {
3117            if let Some(super::command::Command::Publish(field)) = &mut self.command {
3118                Some(field as _)
3119            } else {
3120                None
3121            }
3122        }
3123        ///Returns a mutable reference to `publish`.
3124        ///If the field is unset, it is first initialized with the default value.
3125        ///If any other oneof field in the same oneof is set, it will be cleared.
3126        pub fn publish_mut(&mut self) -> &mut super::Publish {
3127            if self.publish_opt_mut().is_none() {
3128                self.command = Some(
3129                    super::command::Command::Publish(super::Publish::default()),
3130                );
3131            }
3132            self.publish_opt_mut().unwrap()
3133        }
3134        ///Sets `publish` with the provided value.
3135        ///If any other oneof field in the same oneof is set, it will be cleared.
3136        pub fn set_publish<T: Into<super::Publish>>(&mut self, field: T) {
3137            self.command = Some(super::command::Command::Publish(field.into().into()));
3138        }
3139        ///Sets `publish` with the provided value.
3140        ///If any other oneof field in the same oneof is set, it will be cleared.
3141        pub fn with_publish<T: Into<super::Publish>>(mut self, field: T) -> Self {
3142            self.set_publish(field.into());
3143            self
3144        }
3145        ///Returns the value of `make_move_vector`, or the default value if `make_move_vector` is unset.
3146        pub fn make_move_vector(&self) -> &super::MakeMoveVector {
3147            if let Some(super::command::Command::MakeMoveVector(field)) = &self.command {
3148                field as _
3149            } else {
3150                super::MakeMoveVector::default_instance() as _
3151            }
3152        }
3153        ///If `make_move_vector` is set, returns [`Some`] with the value; otherwise returns [`None`].
3154        pub fn make_move_vector_opt(&self) -> Option<&super::MakeMoveVector> {
3155            if let Some(super::command::Command::MakeMoveVector(field)) = &self.command {
3156                Some(field as _)
3157            } else {
3158                None
3159            }
3160        }
3161        ///If `make_move_vector` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3162        pub fn make_move_vector_opt_mut(
3163            &mut self,
3164        ) -> Option<&mut super::MakeMoveVector> {
3165            if let Some(super::command::Command::MakeMoveVector(field)) = &mut self
3166                .command
3167            {
3168                Some(field as _)
3169            } else {
3170                None
3171            }
3172        }
3173        ///Returns a mutable reference to `make_move_vector`.
3174        ///If the field is unset, it is first initialized with the default value.
3175        ///If any other oneof field in the same oneof is set, it will be cleared.
3176        pub fn make_move_vector_mut(&mut self) -> &mut super::MakeMoveVector {
3177            if self.make_move_vector_opt_mut().is_none() {
3178                self.command = Some(
3179                    super::command::Command::MakeMoveVector(
3180                        super::MakeMoveVector::default(),
3181                    ),
3182                );
3183            }
3184            self.make_move_vector_opt_mut().unwrap()
3185        }
3186        ///Sets `make_move_vector` with the provided value.
3187        ///If any other oneof field in the same oneof is set, it will be cleared.
3188        pub fn set_make_move_vector<T: Into<super::MakeMoveVector>>(
3189            &mut self,
3190            field: T,
3191        ) {
3192            self.command = Some(
3193                super::command::Command::MakeMoveVector(field.into().into()),
3194            );
3195        }
3196        ///Sets `make_move_vector` with the provided value.
3197        ///If any other oneof field in the same oneof is set, it will be cleared.
3198        pub fn with_make_move_vector<T: Into<super::MakeMoveVector>>(
3199            mut self,
3200            field: T,
3201        ) -> Self {
3202            self.set_make_move_vector(field.into());
3203            self
3204        }
3205        ///Returns the value of `upgrade`, or the default value if `upgrade` is unset.
3206        pub fn upgrade(&self) -> &super::Upgrade {
3207            if let Some(super::command::Command::Upgrade(field)) = &self.command {
3208                field as _
3209            } else {
3210                super::Upgrade::default_instance() as _
3211            }
3212        }
3213        ///If `upgrade` is set, returns [`Some`] with the value; otherwise returns [`None`].
3214        pub fn upgrade_opt(&self) -> Option<&super::Upgrade> {
3215            if let Some(super::command::Command::Upgrade(field)) = &self.command {
3216                Some(field as _)
3217            } else {
3218                None
3219            }
3220        }
3221        ///If `upgrade` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3222        pub fn upgrade_opt_mut(&mut self) -> Option<&mut super::Upgrade> {
3223            if let Some(super::command::Command::Upgrade(field)) = &mut self.command {
3224                Some(field as _)
3225            } else {
3226                None
3227            }
3228        }
3229        ///Returns a mutable reference to `upgrade`.
3230        ///If the field is unset, it is first initialized with the default value.
3231        ///If any other oneof field in the same oneof is set, it will be cleared.
3232        pub fn upgrade_mut(&mut self) -> &mut super::Upgrade {
3233            if self.upgrade_opt_mut().is_none() {
3234                self.command = Some(
3235                    super::command::Command::Upgrade(super::Upgrade::default()),
3236                );
3237            }
3238            self.upgrade_opt_mut().unwrap()
3239        }
3240        ///Sets `upgrade` with the provided value.
3241        ///If any other oneof field in the same oneof is set, it will be cleared.
3242        pub fn set_upgrade<T: Into<super::Upgrade>>(&mut self, field: T) {
3243            self.command = Some(super::command::Command::Upgrade(field.into().into()));
3244        }
3245        ///Sets `upgrade` with the provided value.
3246        ///If any other oneof field in the same oneof is set, it will be cleared.
3247        pub fn with_upgrade<T: Into<super::Upgrade>>(mut self, field: T) -> Self {
3248            self.set_upgrade(field.into());
3249            self
3250        }
3251    }
3252    impl super::CommandArgumentError {
3253        pub const fn const_default() -> Self {
3254            Self {
3255                argument: None,
3256                kind: None,
3257                index_error: None,
3258            }
3259        }
3260        #[doc(hidden)]
3261        pub fn default_instance() -> &'static Self {
3262            static DEFAULT: super::CommandArgumentError = super::CommandArgumentError::const_default();
3263            &DEFAULT
3264        }
3265        ///If `argument` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3266        pub fn argument_opt_mut(&mut self) -> Option<&mut u32> {
3267            self.argument.as_mut().map(|field| field as _)
3268        }
3269        ///Returns a mutable reference to `argument`.
3270        ///If the field is unset, it is first initialized with the default value.
3271        pub fn argument_mut(&mut self) -> &mut u32 {
3272            self.argument.get_or_insert_default()
3273        }
3274        ///If `argument` is set, returns [`Some`] with the value; otherwise returns [`None`].
3275        pub fn argument_opt(&self) -> Option<u32> {
3276            self.argument.as_ref().map(|field| *field)
3277        }
3278        ///Sets `argument` with the provided value.
3279        pub fn set_argument(&mut self, field: u32) {
3280            self.argument = Some(field);
3281        }
3282        ///Sets `argument` with the provided value.
3283        pub fn with_argument(mut self, field: u32) -> Self {
3284            self.set_argument(field);
3285            self
3286        }
3287        ///Sets `kind` with the provided value.
3288        pub fn with_kind<
3289            T: Into<super::command_argument_error::CommandArgumentErrorKind>,
3290        >(mut self, field: T) -> Self {
3291            self.set_kind(field.into());
3292            self
3293        }
3294        ///Returns the value of `index_error`, or the default value if `index_error` is unset.
3295        pub fn index_error(&self) -> &super::IndexError {
3296            self.index_error
3297                .as_ref()
3298                .map(|field| field as _)
3299                .unwrap_or_else(|| super::IndexError::default_instance() as _)
3300        }
3301        ///If `index_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3302        pub fn index_error_opt_mut(&mut self) -> Option<&mut super::IndexError> {
3303            self.index_error.as_mut().map(|field| field as _)
3304        }
3305        ///Returns a mutable reference to `index_error`.
3306        ///If the field is unset, it is first initialized with the default value.
3307        pub fn index_error_mut(&mut self) -> &mut super::IndexError {
3308            self.index_error.get_or_insert_default()
3309        }
3310        ///If `index_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
3311        pub fn index_error_opt(&self) -> Option<&super::IndexError> {
3312            self.index_error.as_ref().map(|field| field as _)
3313        }
3314        ///Sets `index_error` with the provided value.
3315        pub fn set_index_error<T: Into<super::IndexError>>(&mut self, field: T) {
3316            self.index_error = Some(field.into().into());
3317        }
3318        ///Sets `index_error` with the provided value.
3319        pub fn with_index_error<T: Into<super::IndexError>>(mut self, field: T) -> Self {
3320            self.set_index_error(field.into());
3321            self
3322        }
3323    }
3324    impl super::CommandOutput {
3325        pub const fn const_default() -> Self {
3326            Self {
3327                argument: None,
3328                value: None,
3329                json: None,
3330            }
3331        }
3332        #[doc(hidden)]
3333        pub fn default_instance() -> &'static Self {
3334            static DEFAULT: super::CommandOutput = super::CommandOutput::const_default();
3335            &DEFAULT
3336        }
3337        ///Returns the value of `argument`, or the default value if `argument` is unset.
3338        pub fn argument(&self) -> &super::Argument {
3339            self.argument
3340                .as_ref()
3341                .map(|field| field as _)
3342                .unwrap_or_else(|| super::Argument::default_instance() as _)
3343        }
3344        ///If `argument` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3345        pub fn argument_opt_mut(&mut self) -> Option<&mut super::Argument> {
3346            self.argument.as_mut().map(|field| field as _)
3347        }
3348        ///Returns a mutable reference to `argument`.
3349        ///If the field is unset, it is first initialized with the default value.
3350        pub fn argument_mut(&mut self) -> &mut super::Argument {
3351            self.argument.get_or_insert_default()
3352        }
3353        ///If `argument` is set, returns [`Some`] with the value; otherwise returns [`None`].
3354        pub fn argument_opt(&self) -> Option<&super::Argument> {
3355            self.argument.as_ref().map(|field| field as _)
3356        }
3357        ///Sets `argument` with the provided value.
3358        pub fn set_argument<T: Into<super::Argument>>(&mut self, field: T) {
3359            self.argument = Some(field.into().into());
3360        }
3361        ///Sets `argument` with the provided value.
3362        pub fn with_argument<T: Into<super::Argument>>(mut self, field: T) -> Self {
3363            self.set_argument(field.into());
3364            self
3365        }
3366        ///Returns the value of `value`, or the default value if `value` is unset.
3367        pub fn value(&self) -> &super::Bcs {
3368            self.value
3369                .as_ref()
3370                .map(|field| field as _)
3371                .unwrap_or_else(|| super::Bcs::default_instance() as _)
3372        }
3373        ///If `value` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3374        pub fn value_opt_mut(&mut self) -> Option<&mut super::Bcs> {
3375            self.value.as_mut().map(|field| field as _)
3376        }
3377        ///Returns a mutable reference to `value`.
3378        ///If the field is unset, it is first initialized with the default value.
3379        pub fn value_mut(&mut self) -> &mut super::Bcs {
3380            self.value.get_or_insert_default()
3381        }
3382        ///If `value` is set, returns [`Some`] with the value; otherwise returns [`None`].
3383        pub fn value_opt(&self) -> Option<&super::Bcs> {
3384            self.value.as_ref().map(|field| field as _)
3385        }
3386        ///Sets `value` with the provided value.
3387        pub fn set_value<T: Into<super::Bcs>>(&mut self, field: T) {
3388            self.value = Some(field.into().into());
3389        }
3390        ///Sets `value` with the provided value.
3391        pub fn with_value<T: Into<super::Bcs>>(mut self, field: T) -> Self {
3392            self.set_value(field.into());
3393            self
3394        }
3395        ///If `json` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3396        pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
3397            self.json.as_mut().map(|field| field as _)
3398        }
3399        ///Returns a mutable reference to `json`.
3400        ///If the field is unset, it is first initialized with the default value.
3401        pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
3402            self.json.get_or_insert_default()
3403        }
3404        ///If `json` is set, returns [`Some`] with the value; otherwise returns [`None`].
3405        pub fn json_opt(&self) -> Option<&::prost_types::Value> {
3406            self.json.as_ref().map(|field| field as _)
3407        }
3408        ///Sets `json` with the provided value.
3409        pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
3410            self.json = Some(field.into().into());
3411        }
3412        ///Sets `json` with the provided value.
3413        pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
3414            self.set_json(field.into());
3415            self
3416        }
3417    }
3418    impl super::CommandResult {
3419        pub const fn const_default() -> Self {
3420            Self {
3421                return_values: Vec::new(),
3422                mutated_by_ref: Vec::new(),
3423            }
3424        }
3425        #[doc(hidden)]
3426        pub fn default_instance() -> &'static Self {
3427            static DEFAULT: super::CommandResult = super::CommandResult::const_default();
3428            &DEFAULT
3429        }
3430        ///Returns the value of `return_values`, or the default value if `return_values` is unset.
3431        pub fn return_values(&self) -> &[super::CommandOutput] {
3432            &self.return_values
3433        }
3434        ///Returns a mutable reference to `return_values`.
3435        ///If the field is unset, it is first initialized with the default value.
3436        pub fn return_values_mut(&mut self) -> &mut Vec<super::CommandOutput> {
3437            &mut self.return_values
3438        }
3439        ///Sets `return_values` with the provided value.
3440        pub fn set_return_values(&mut self, field: Vec<super::CommandOutput>) {
3441            self.return_values = field;
3442        }
3443        ///Sets `return_values` with the provided value.
3444        pub fn with_return_values(mut self, field: Vec<super::CommandOutput>) -> Self {
3445            self.set_return_values(field);
3446            self
3447        }
3448        ///Returns the value of `mutated_by_ref`, or the default value if `mutated_by_ref` is unset.
3449        pub fn mutated_by_ref(&self) -> &[super::CommandOutput] {
3450            &self.mutated_by_ref
3451        }
3452        ///Returns a mutable reference to `mutated_by_ref`.
3453        ///If the field is unset, it is first initialized with the default value.
3454        pub fn mutated_by_ref_mut(&mut self) -> &mut Vec<super::CommandOutput> {
3455            &mut self.mutated_by_ref
3456        }
3457        ///Sets `mutated_by_ref` with the provided value.
3458        pub fn set_mutated_by_ref(&mut self, field: Vec<super::CommandOutput>) {
3459            self.mutated_by_ref = field;
3460        }
3461        ///Sets `mutated_by_ref` with the provided value.
3462        pub fn with_mutated_by_ref(mut self, field: Vec<super::CommandOutput>) -> Self {
3463            self.set_mutated_by_ref(field);
3464            self
3465        }
3466    }
3467    impl super::CongestedObjects {
3468        pub const fn const_default() -> Self {
3469            Self { objects: Vec::new() }
3470        }
3471        #[doc(hidden)]
3472        pub fn default_instance() -> &'static Self {
3473            static DEFAULT: super::CongestedObjects = super::CongestedObjects::const_default();
3474            &DEFAULT
3475        }
3476        ///Returns the value of `objects`, or the default value if `objects` is unset.
3477        pub fn objects(&self) -> &[String] {
3478            &self.objects
3479        }
3480        ///Returns a mutable reference to `objects`.
3481        ///If the field is unset, it is first initialized with the default value.
3482        pub fn objects_mut(&mut self) -> &mut Vec<String> {
3483            &mut self.objects
3484        }
3485        ///Sets `objects` with the provided value.
3486        pub fn set_objects(&mut self, field: Vec<String>) {
3487            self.objects = field;
3488        }
3489        ///Sets `objects` with the provided value.
3490        pub fn with_objects(mut self, field: Vec<String>) -> Self {
3491            self.set_objects(field);
3492            self
3493        }
3494    }
3495    impl super::ConsensusCommitPrologue {
3496        pub const fn const_default() -> Self {
3497            Self {
3498                epoch: None,
3499                round: None,
3500                commit_timestamp: None,
3501                consensus_commit_digest: None,
3502                sub_dag_index: None,
3503                consensus_determined_version_assignments: None,
3504                additional_state_digest: None,
3505            }
3506        }
3507        #[doc(hidden)]
3508        pub fn default_instance() -> &'static Self {
3509            static DEFAULT: super::ConsensusCommitPrologue = super::ConsensusCommitPrologue::const_default();
3510            &DEFAULT
3511        }
3512        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3513        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
3514            self.epoch.as_mut().map(|field| field as _)
3515        }
3516        ///Returns a mutable reference to `epoch`.
3517        ///If the field is unset, it is first initialized with the default value.
3518        pub fn epoch_mut(&mut self) -> &mut u64 {
3519            self.epoch.get_or_insert_default()
3520        }
3521        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
3522        pub fn epoch_opt(&self) -> Option<u64> {
3523            self.epoch.as_ref().map(|field| *field)
3524        }
3525        ///Sets `epoch` with the provided value.
3526        pub fn set_epoch(&mut self, field: u64) {
3527            self.epoch = Some(field);
3528        }
3529        ///Sets `epoch` with the provided value.
3530        pub fn with_epoch(mut self, field: u64) -> Self {
3531            self.set_epoch(field);
3532            self
3533        }
3534        ///If `round` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3535        pub fn round_opt_mut(&mut self) -> Option<&mut u64> {
3536            self.round.as_mut().map(|field| field as _)
3537        }
3538        ///Returns a mutable reference to `round`.
3539        ///If the field is unset, it is first initialized with the default value.
3540        pub fn round_mut(&mut self) -> &mut u64 {
3541            self.round.get_or_insert_default()
3542        }
3543        ///If `round` is set, returns [`Some`] with the value; otherwise returns [`None`].
3544        pub fn round_opt(&self) -> Option<u64> {
3545            self.round.as_ref().map(|field| *field)
3546        }
3547        ///Sets `round` with the provided value.
3548        pub fn set_round(&mut self, field: u64) {
3549            self.round = Some(field);
3550        }
3551        ///Sets `round` with the provided value.
3552        pub fn with_round(mut self, field: u64) -> Self {
3553            self.set_round(field);
3554            self
3555        }
3556        ///If `commit_timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3557        pub fn commit_timestamp_opt_mut(
3558            &mut self,
3559        ) -> Option<&mut ::prost_types::Timestamp> {
3560            self.commit_timestamp.as_mut().map(|field| field as _)
3561        }
3562        ///Returns a mutable reference to `commit_timestamp`.
3563        ///If the field is unset, it is first initialized with the default value.
3564        pub fn commit_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
3565            self.commit_timestamp.get_or_insert_default()
3566        }
3567        ///If `commit_timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
3568        pub fn commit_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
3569            self.commit_timestamp.as_ref().map(|field| field as _)
3570        }
3571        ///Sets `commit_timestamp` with the provided value.
3572        pub fn set_commit_timestamp<T: Into<::prost_types::Timestamp>>(
3573            &mut self,
3574            field: T,
3575        ) {
3576            self.commit_timestamp = Some(field.into().into());
3577        }
3578        ///Sets `commit_timestamp` with the provided value.
3579        pub fn with_commit_timestamp<T: Into<::prost_types::Timestamp>>(
3580            mut self,
3581            field: T,
3582        ) -> Self {
3583            self.set_commit_timestamp(field.into());
3584            self
3585        }
3586        ///If `consensus_commit_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3587        pub fn consensus_commit_digest_opt_mut(&mut self) -> Option<&mut String> {
3588            self.consensus_commit_digest.as_mut().map(|field| field as _)
3589        }
3590        ///Returns a mutable reference to `consensus_commit_digest`.
3591        ///If the field is unset, it is first initialized with the default value.
3592        pub fn consensus_commit_digest_mut(&mut self) -> &mut String {
3593            self.consensus_commit_digest.get_or_insert_default()
3594        }
3595        ///If `consensus_commit_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
3596        pub fn consensus_commit_digest_opt(&self) -> Option<&str> {
3597            self.consensus_commit_digest.as_ref().map(|field| field as _)
3598        }
3599        ///Sets `consensus_commit_digest` with the provided value.
3600        pub fn set_consensus_commit_digest<T: Into<String>>(&mut self, field: T) {
3601            self.consensus_commit_digest = Some(field.into().into());
3602        }
3603        ///Sets `consensus_commit_digest` with the provided value.
3604        pub fn with_consensus_commit_digest<T: Into<String>>(
3605            mut self,
3606            field: T,
3607        ) -> Self {
3608            self.set_consensus_commit_digest(field.into());
3609            self
3610        }
3611        ///If `sub_dag_index` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3612        pub fn sub_dag_index_opt_mut(&mut self) -> Option<&mut u64> {
3613            self.sub_dag_index.as_mut().map(|field| field as _)
3614        }
3615        ///Returns a mutable reference to `sub_dag_index`.
3616        ///If the field is unset, it is first initialized with the default value.
3617        pub fn sub_dag_index_mut(&mut self) -> &mut u64 {
3618            self.sub_dag_index.get_or_insert_default()
3619        }
3620        ///If `sub_dag_index` is set, returns [`Some`] with the value; otherwise returns [`None`].
3621        pub fn sub_dag_index_opt(&self) -> Option<u64> {
3622            self.sub_dag_index.as_ref().map(|field| *field)
3623        }
3624        ///Sets `sub_dag_index` with the provided value.
3625        pub fn set_sub_dag_index(&mut self, field: u64) {
3626            self.sub_dag_index = Some(field);
3627        }
3628        ///Sets `sub_dag_index` with the provided value.
3629        pub fn with_sub_dag_index(mut self, field: u64) -> Self {
3630            self.set_sub_dag_index(field);
3631            self
3632        }
3633        ///Returns the value of `consensus_determined_version_assignments`, or the default value if `consensus_determined_version_assignments` is unset.
3634        pub fn consensus_determined_version_assignments(
3635            &self,
3636        ) -> &super::ConsensusDeterminedVersionAssignments {
3637            self.consensus_determined_version_assignments
3638                .as_ref()
3639                .map(|field| field as _)
3640                .unwrap_or_else(|| {
3641                    super::ConsensusDeterminedVersionAssignments::default_instance() as _
3642                })
3643        }
3644        ///If `consensus_determined_version_assignments` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3645        pub fn consensus_determined_version_assignments_opt_mut(
3646            &mut self,
3647        ) -> Option<&mut super::ConsensusDeterminedVersionAssignments> {
3648            self.consensus_determined_version_assignments
3649                .as_mut()
3650                .map(|field| field as _)
3651        }
3652        ///Returns a mutable reference to `consensus_determined_version_assignments`.
3653        ///If the field is unset, it is first initialized with the default value.
3654        pub fn consensus_determined_version_assignments_mut(
3655            &mut self,
3656        ) -> &mut super::ConsensusDeterminedVersionAssignments {
3657            self.consensus_determined_version_assignments.get_or_insert_default()
3658        }
3659        ///If `consensus_determined_version_assignments` is set, returns [`Some`] with the value; otherwise returns [`None`].
3660        pub fn consensus_determined_version_assignments_opt(
3661            &self,
3662        ) -> Option<&super::ConsensusDeterminedVersionAssignments> {
3663            self.consensus_determined_version_assignments
3664                .as_ref()
3665                .map(|field| field as _)
3666        }
3667        ///Sets `consensus_determined_version_assignments` with the provided value.
3668        pub fn set_consensus_determined_version_assignments<
3669            T: Into<super::ConsensusDeterminedVersionAssignments>,
3670        >(&mut self, field: T) {
3671            self.consensus_determined_version_assignments = Some(field.into().into());
3672        }
3673        ///Sets `consensus_determined_version_assignments` with the provided value.
3674        pub fn with_consensus_determined_version_assignments<
3675            T: Into<super::ConsensusDeterminedVersionAssignments>,
3676        >(mut self, field: T) -> Self {
3677            self.set_consensus_determined_version_assignments(field.into());
3678            self
3679        }
3680        ///If `additional_state_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3681        pub fn additional_state_digest_opt_mut(&mut self) -> Option<&mut String> {
3682            self.additional_state_digest.as_mut().map(|field| field as _)
3683        }
3684        ///Returns a mutable reference to `additional_state_digest`.
3685        ///If the field is unset, it is first initialized with the default value.
3686        pub fn additional_state_digest_mut(&mut self) -> &mut String {
3687            self.additional_state_digest.get_or_insert_default()
3688        }
3689        ///If `additional_state_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
3690        pub fn additional_state_digest_opt(&self) -> Option<&str> {
3691            self.additional_state_digest.as_ref().map(|field| field as _)
3692        }
3693        ///Sets `additional_state_digest` with the provided value.
3694        pub fn set_additional_state_digest<T: Into<String>>(&mut self, field: T) {
3695            self.additional_state_digest = Some(field.into().into());
3696        }
3697        ///Sets `additional_state_digest` with the provided value.
3698        pub fn with_additional_state_digest<T: Into<String>>(
3699            mut self,
3700            field: T,
3701        ) -> Self {
3702            self.set_additional_state_digest(field.into());
3703            self
3704        }
3705    }
3706    impl super::ConsensusDeterminedVersionAssignments {
3707        pub const fn const_default() -> Self {
3708            Self {
3709                version: None,
3710                canceled_transactions: Vec::new(),
3711            }
3712        }
3713        #[doc(hidden)]
3714        pub fn default_instance() -> &'static Self {
3715            static DEFAULT: super::ConsensusDeterminedVersionAssignments = super::ConsensusDeterminedVersionAssignments::const_default();
3716            &DEFAULT
3717        }
3718        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3719        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
3720            self.version.as_mut().map(|field| field as _)
3721        }
3722        ///Returns a mutable reference to `version`.
3723        ///If the field is unset, it is first initialized with the default value.
3724        pub fn version_mut(&mut self) -> &mut i32 {
3725            self.version.get_or_insert_default()
3726        }
3727        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
3728        pub fn version_opt(&self) -> Option<i32> {
3729            self.version.as_ref().map(|field| *field)
3730        }
3731        ///Sets `version` with the provided value.
3732        pub fn set_version(&mut self, field: i32) {
3733            self.version = Some(field);
3734        }
3735        ///Sets `version` with the provided value.
3736        pub fn with_version(mut self, field: i32) -> Self {
3737            self.set_version(field);
3738            self
3739        }
3740        ///Returns the value of `canceled_transactions`, or the default value if `canceled_transactions` is unset.
3741        pub fn canceled_transactions(&self) -> &[super::CanceledTransaction] {
3742            &self.canceled_transactions
3743        }
3744        ///Returns a mutable reference to `canceled_transactions`.
3745        ///If the field is unset, it is first initialized with the default value.
3746        pub fn canceled_transactions_mut(
3747            &mut self,
3748        ) -> &mut Vec<super::CanceledTransaction> {
3749            &mut self.canceled_transactions
3750        }
3751        ///Sets `canceled_transactions` with the provided value.
3752        pub fn set_canceled_transactions(
3753            &mut self,
3754            field: Vec<super::CanceledTransaction>,
3755        ) {
3756            self.canceled_transactions = field;
3757        }
3758        ///Sets `canceled_transactions` with the provided value.
3759        pub fn with_canceled_transactions(
3760            mut self,
3761            field: Vec<super::CanceledTransaction>,
3762        ) -> Self {
3763            self.set_canceled_transactions(field);
3764            self
3765        }
3766    }
3767    impl super::DatatypeDescriptor {
3768        pub const fn const_default() -> Self {
3769            Self {
3770                type_name: None,
3771                defining_id: None,
3772                module: None,
3773                name: None,
3774                abilities: Vec::new(),
3775                type_parameters: Vec::new(),
3776                kind: None,
3777                fields: Vec::new(),
3778                variants: Vec::new(),
3779            }
3780        }
3781        #[doc(hidden)]
3782        pub fn default_instance() -> &'static Self {
3783            static DEFAULT: super::DatatypeDescriptor = super::DatatypeDescriptor::const_default();
3784            &DEFAULT
3785        }
3786        ///If `type_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3787        pub fn type_name_opt_mut(&mut self) -> Option<&mut String> {
3788            self.type_name.as_mut().map(|field| field as _)
3789        }
3790        ///Returns a mutable reference to `type_name`.
3791        ///If the field is unset, it is first initialized with the default value.
3792        pub fn type_name_mut(&mut self) -> &mut String {
3793            self.type_name.get_or_insert_default()
3794        }
3795        ///If `type_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
3796        pub fn type_name_opt(&self) -> Option<&str> {
3797            self.type_name.as_ref().map(|field| field as _)
3798        }
3799        ///Sets `type_name` with the provided value.
3800        pub fn set_type_name<T: Into<String>>(&mut self, field: T) {
3801            self.type_name = Some(field.into().into());
3802        }
3803        ///Sets `type_name` with the provided value.
3804        pub fn with_type_name<T: Into<String>>(mut self, field: T) -> Self {
3805            self.set_type_name(field.into());
3806            self
3807        }
3808        ///If `defining_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3809        pub fn defining_id_opt_mut(&mut self) -> Option<&mut String> {
3810            self.defining_id.as_mut().map(|field| field as _)
3811        }
3812        ///Returns a mutable reference to `defining_id`.
3813        ///If the field is unset, it is first initialized with the default value.
3814        pub fn defining_id_mut(&mut self) -> &mut String {
3815            self.defining_id.get_or_insert_default()
3816        }
3817        ///If `defining_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
3818        pub fn defining_id_opt(&self) -> Option<&str> {
3819            self.defining_id.as_ref().map(|field| field as _)
3820        }
3821        ///Sets `defining_id` with the provided value.
3822        pub fn set_defining_id<T: Into<String>>(&mut self, field: T) {
3823            self.defining_id = Some(field.into().into());
3824        }
3825        ///Sets `defining_id` with the provided value.
3826        pub fn with_defining_id<T: Into<String>>(mut self, field: T) -> Self {
3827            self.set_defining_id(field.into());
3828            self
3829        }
3830        ///If `module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3831        pub fn module_opt_mut(&mut self) -> Option<&mut String> {
3832            self.module.as_mut().map(|field| field as _)
3833        }
3834        ///Returns a mutable reference to `module`.
3835        ///If the field is unset, it is first initialized with the default value.
3836        pub fn module_mut(&mut self) -> &mut String {
3837            self.module.get_or_insert_default()
3838        }
3839        ///If `module` is set, returns [`Some`] with the value; otherwise returns [`None`].
3840        pub fn module_opt(&self) -> Option<&str> {
3841            self.module.as_ref().map(|field| field as _)
3842        }
3843        ///Sets `module` with the provided value.
3844        pub fn set_module<T: Into<String>>(&mut self, field: T) {
3845            self.module = Some(field.into().into());
3846        }
3847        ///Sets `module` with the provided value.
3848        pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
3849            self.set_module(field.into());
3850            self
3851        }
3852        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3853        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
3854            self.name.as_mut().map(|field| field as _)
3855        }
3856        ///Returns a mutable reference to `name`.
3857        ///If the field is unset, it is first initialized with the default value.
3858        pub fn name_mut(&mut self) -> &mut String {
3859            self.name.get_or_insert_default()
3860        }
3861        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
3862        pub fn name_opt(&self) -> Option<&str> {
3863            self.name.as_ref().map(|field| field as _)
3864        }
3865        ///Sets `name` with the provided value.
3866        pub fn set_name<T: Into<String>>(&mut self, field: T) {
3867            self.name = Some(field.into().into());
3868        }
3869        ///Sets `name` with the provided value.
3870        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
3871            self.set_name(field.into());
3872            self
3873        }
3874        ///Returns the value of `type_parameters`, or the default value if `type_parameters` is unset.
3875        pub fn type_parameters(&self) -> &[super::TypeParameter] {
3876            &self.type_parameters
3877        }
3878        ///Returns a mutable reference to `type_parameters`.
3879        ///If the field is unset, it is first initialized with the default value.
3880        pub fn type_parameters_mut(&mut self) -> &mut Vec<super::TypeParameter> {
3881            &mut self.type_parameters
3882        }
3883        ///Sets `type_parameters` with the provided value.
3884        pub fn set_type_parameters(&mut self, field: Vec<super::TypeParameter>) {
3885            self.type_parameters = field;
3886        }
3887        ///Sets `type_parameters` with the provided value.
3888        pub fn with_type_parameters(mut self, field: Vec<super::TypeParameter>) -> Self {
3889            self.set_type_parameters(field);
3890            self
3891        }
3892        ///Sets `kind` with the provided value.
3893        pub fn with_kind<T: Into<super::datatype_descriptor::DatatypeKind>>(
3894            mut self,
3895            field: T,
3896        ) -> Self {
3897            self.set_kind(field.into());
3898            self
3899        }
3900        ///Returns the value of `fields`, or the default value if `fields` is unset.
3901        pub fn fields(&self) -> &[super::FieldDescriptor] {
3902            &self.fields
3903        }
3904        ///Returns a mutable reference to `fields`.
3905        ///If the field is unset, it is first initialized with the default value.
3906        pub fn fields_mut(&mut self) -> &mut Vec<super::FieldDescriptor> {
3907            &mut self.fields
3908        }
3909        ///Sets `fields` with the provided value.
3910        pub fn set_fields(&mut self, field: Vec<super::FieldDescriptor>) {
3911            self.fields = field;
3912        }
3913        ///Sets `fields` with the provided value.
3914        pub fn with_fields(mut self, field: Vec<super::FieldDescriptor>) -> Self {
3915            self.set_fields(field);
3916            self
3917        }
3918        ///Returns the value of `variants`, or the default value if `variants` is unset.
3919        pub fn variants(&self) -> &[super::VariantDescriptor] {
3920            &self.variants
3921        }
3922        ///Returns a mutable reference to `variants`.
3923        ///If the field is unset, it is first initialized with the default value.
3924        pub fn variants_mut(&mut self) -> &mut Vec<super::VariantDescriptor> {
3925            &mut self.variants
3926        }
3927        ///Sets `variants` with the provided value.
3928        pub fn set_variants(&mut self, field: Vec<super::VariantDescriptor>) {
3929            self.variants = field;
3930        }
3931        ///Sets `variants` with the provided value.
3932        pub fn with_variants(mut self, field: Vec<super::VariantDescriptor>) -> Self {
3933            self.set_variants(field);
3934            self
3935        }
3936    }
3937    impl super::DynamicField {
3938        pub const fn const_default() -> Self {
3939            Self {
3940                kind: None,
3941                parent: None,
3942                field_id: None,
3943                field_object: None,
3944                name: None,
3945                value: None,
3946                value_type: None,
3947                child_id: None,
3948                child_object: None,
3949            }
3950        }
3951        #[doc(hidden)]
3952        pub fn default_instance() -> &'static Self {
3953            static DEFAULT: super::DynamicField = super::DynamicField::const_default();
3954            &DEFAULT
3955        }
3956        ///Sets `kind` with the provided value.
3957        pub fn with_kind<T: Into<super::dynamic_field::DynamicFieldKind>>(
3958            mut self,
3959            field: T,
3960        ) -> Self {
3961            self.set_kind(field.into());
3962            self
3963        }
3964        ///If `parent` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3965        pub fn parent_opt_mut(&mut self) -> Option<&mut String> {
3966            self.parent.as_mut().map(|field| field as _)
3967        }
3968        ///Returns a mutable reference to `parent`.
3969        ///If the field is unset, it is first initialized with the default value.
3970        pub fn parent_mut(&mut self) -> &mut String {
3971            self.parent.get_or_insert_default()
3972        }
3973        ///If `parent` is set, returns [`Some`] with the value; otherwise returns [`None`].
3974        pub fn parent_opt(&self) -> Option<&str> {
3975            self.parent.as_ref().map(|field| field as _)
3976        }
3977        ///Sets `parent` with the provided value.
3978        pub fn set_parent<T: Into<String>>(&mut self, field: T) {
3979            self.parent = Some(field.into().into());
3980        }
3981        ///Sets `parent` with the provided value.
3982        pub fn with_parent<T: Into<String>>(mut self, field: T) -> Self {
3983            self.set_parent(field.into());
3984            self
3985        }
3986        ///If `field_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
3987        pub fn field_id_opt_mut(&mut self) -> Option<&mut String> {
3988            self.field_id.as_mut().map(|field| field as _)
3989        }
3990        ///Returns a mutable reference to `field_id`.
3991        ///If the field is unset, it is first initialized with the default value.
3992        pub fn field_id_mut(&mut self) -> &mut String {
3993            self.field_id.get_or_insert_default()
3994        }
3995        ///If `field_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
3996        pub fn field_id_opt(&self) -> Option<&str> {
3997            self.field_id.as_ref().map(|field| field as _)
3998        }
3999        ///Sets `field_id` with the provided value.
4000        pub fn set_field_id<T: Into<String>>(&mut self, field: T) {
4001            self.field_id = Some(field.into().into());
4002        }
4003        ///Sets `field_id` with the provided value.
4004        pub fn with_field_id<T: Into<String>>(mut self, field: T) -> Self {
4005            self.set_field_id(field.into());
4006            self
4007        }
4008        ///Returns the value of `field_object`, or the default value if `field_object` is unset.
4009        pub fn field_object(&self) -> &super::Object {
4010            self.field_object
4011                .as_ref()
4012                .map(|field| field as _)
4013                .unwrap_or_else(|| super::Object::default_instance() as _)
4014        }
4015        ///If `field_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4016        pub fn field_object_opt_mut(&mut self) -> Option<&mut super::Object> {
4017            self.field_object.as_mut().map(|field| field as _)
4018        }
4019        ///Returns a mutable reference to `field_object`.
4020        ///If the field is unset, it is first initialized with the default value.
4021        pub fn field_object_mut(&mut self) -> &mut super::Object {
4022            self.field_object.get_or_insert_default()
4023        }
4024        ///If `field_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
4025        pub fn field_object_opt(&self) -> Option<&super::Object> {
4026            self.field_object.as_ref().map(|field| field as _)
4027        }
4028        ///Sets `field_object` with the provided value.
4029        pub fn set_field_object<T: Into<super::Object>>(&mut self, field: T) {
4030            self.field_object = Some(field.into().into());
4031        }
4032        ///Sets `field_object` with the provided value.
4033        pub fn with_field_object<T: Into<super::Object>>(mut self, field: T) -> Self {
4034            self.set_field_object(field.into());
4035            self
4036        }
4037        ///Returns the value of `name`, or the default value if `name` is unset.
4038        pub fn name(&self) -> &super::Bcs {
4039            self.name
4040                .as_ref()
4041                .map(|field| field as _)
4042                .unwrap_or_else(|| super::Bcs::default_instance() as _)
4043        }
4044        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4045        pub fn name_opt_mut(&mut self) -> Option<&mut super::Bcs> {
4046            self.name.as_mut().map(|field| field as _)
4047        }
4048        ///Returns a mutable reference to `name`.
4049        ///If the field is unset, it is first initialized with the default value.
4050        pub fn name_mut(&mut self) -> &mut super::Bcs {
4051            self.name.get_or_insert_default()
4052        }
4053        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
4054        pub fn name_opt(&self) -> Option<&super::Bcs> {
4055            self.name.as_ref().map(|field| field as _)
4056        }
4057        ///Sets `name` with the provided value.
4058        pub fn set_name<T: Into<super::Bcs>>(&mut self, field: T) {
4059            self.name = Some(field.into().into());
4060        }
4061        ///Sets `name` with the provided value.
4062        pub fn with_name<T: Into<super::Bcs>>(mut self, field: T) -> Self {
4063            self.set_name(field.into());
4064            self
4065        }
4066        ///Returns the value of `value`, or the default value if `value` is unset.
4067        pub fn value(&self) -> &super::Bcs {
4068            self.value
4069                .as_ref()
4070                .map(|field| field as _)
4071                .unwrap_or_else(|| super::Bcs::default_instance() as _)
4072        }
4073        ///If `value` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4074        pub fn value_opt_mut(&mut self) -> Option<&mut super::Bcs> {
4075            self.value.as_mut().map(|field| field as _)
4076        }
4077        ///Returns a mutable reference to `value`.
4078        ///If the field is unset, it is first initialized with the default value.
4079        pub fn value_mut(&mut self) -> &mut super::Bcs {
4080            self.value.get_or_insert_default()
4081        }
4082        ///If `value` is set, returns [`Some`] with the value; otherwise returns [`None`].
4083        pub fn value_opt(&self) -> Option<&super::Bcs> {
4084            self.value.as_ref().map(|field| field as _)
4085        }
4086        ///Sets `value` with the provided value.
4087        pub fn set_value<T: Into<super::Bcs>>(&mut self, field: T) {
4088            self.value = Some(field.into().into());
4089        }
4090        ///Sets `value` with the provided value.
4091        pub fn with_value<T: Into<super::Bcs>>(mut self, field: T) -> Self {
4092            self.set_value(field.into());
4093            self
4094        }
4095        ///If `value_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4096        pub fn value_type_opt_mut(&mut self) -> Option<&mut String> {
4097            self.value_type.as_mut().map(|field| field as _)
4098        }
4099        ///Returns a mutable reference to `value_type`.
4100        ///If the field is unset, it is first initialized with the default value.
4101        pub fn value_type_mut(&mut self) -> &mut String {
4102            self.value_type.get_or_insert_default()
4103        }
4104        ///If `value_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
4105        pub fn value_type_opt(&self) -> Option<&str> {
4106            self.value_type.as_ref().map(|field| field as _)
4107        }
4108        ///Sets `value_type` with the provided value.
4109        pub fn set_value_type<T: Into<String>>(&mut self, field: T) {
4110            self.value_type = Some(field.into().into());
4111        }
4112        ///Sets `value_type` with the provided value.
4113        pub fn with_value_type<T: Into<String>>(mut self, field: T) -> Self {
4114            self.set_value_type(field.into());
4115            self
4116        }
4117        ///If `child_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4118        pub fn child_id_opt_mut(&mut self) -> Option<&mut String> {
4119            self.child_id.as_mut().map(|field| field as _)
4120        }
4121        ///Returns a mutable reference to `child_id`.
4122        ///If the field is unset, it is first initialized with the default value.
4123        pub fn child_id_mut(&mut self) -> &mut String {
4124            self.child_id.get_or_insert_default()
4125        }
4126        ///If `child_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
4127        pub fn child_id_opt(&self) -> Option<&str> {
4128            self.child_id.as_ref().map(|field| field as _)
4129        }
4130        ///Sets `child_id` with the provided value.
4131        pub fn set_child_id<T: Into<String>>(&mut self, field: T) {
4132            self.child_id = Some(field.into().into());
4133        }
4134        ///Sets `child_id` with the provided value.
4135        pub fn with_child_id<T: Into<String>>(mut self, field: T) -> Self {
4136            self.set_child_id(field.into());
4137            self
4138        }
4139        ///Returns the value of `child_object`, or the default value if `child_object` is unset.
4140        pub fn child_object(&self) -> &super::Object {
4141            self.child_object
4142                .as_ref()
4143                .map(|field| field as _)
4144                .unwrap_or_else(|| super::Object::default_instance() as _)
4145        }
4146        ///If `child_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4147        pub fn child_object_opt_mut(&mut self) -> Option<&mut super::Object> {
4148            self.child_object.as_mut().map(|field| field as _)
4149        }
4150        ///Returns a mutable reference to `child_object`.
4151        ///If the field is unset, it is first initialized with the default value.
4152        pub fn child_object_mut(&mut self) -> &mut super::Object {
4153            self.child_object.get_or_insert_default()
4154        }
4155        ///If `child_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
4156        pub fn child_object_opt(&self) -> Option<&super::Object> {
4157            self.child_object.as_ref().map(|field| field as _)
4158        }
4159        ///Sets `child_object` with the provided value.
4160        pub fn set_child_object<T: Into<super::Object>>(&mut self, field: T) {
4161            self.child_object = Some(field.into().into());
4162        }
4163        ///Sets `child_object` with the provided value.
4164        pub fn with_child_object<T: Into<super::Object>>(mut self, field: T) -> Self {
4165            self.set_child_object(field.into());
4166            self
4167        }
4168    }
4169    impl super::EndOfEpochData {
4170        pub const fn const_default() -> Self {
4171            Self {
4172                next_epoch_committee: Vec::new(),
4173                next_epoch_protocol_version: None,
4174                epoch_commitments: Vec::new(),
4175            }
4176        }
4177        #[doc(hidden)]
4178        pub fn default_instance() -> &'static Self {
4179            static DEFAULT: super::EndOfEpochData = super::EndOfEpochData::const_default();
4180            &DEFAULT
4181        }
4182        ///Returns the value of `next_epoch_committee`, or the default value if `next_epoch_committee` is unset.
4183        pub fn next_epoch_committee(&self) -> &[super::ValidatorCommitteeMember] {
4184            &self.next_epoch_committee
4185        }
4186        ///Returns a mutable reference to `next_epoch_committee`.
4187        ///If the field is unset, it is first initialized with the default value.
4188        pub fn next_epoch_committee_mut(
4189            &mut self,
4190        ) -> &mut Vec<super::ValidatorCommitteeMember> {
4191            &mut self.next_epoch_committee
4192        }
4193        ///Sets `next_epoch_committee` with the provided value.
4194        pub fn set_next_epoch_committee(
4195            &mut self,
4196            field: Vec<super::ValidatorCommitteeMember>,
4197        ) {
4198            self.next_epoch_committee = field;
4199        }
4200        ///Sets `next_epoch_committee` with the provided value.
4201        pub fn with_next_epoch_committee(
4202            mut self,
4203            field: Vec<super::ValidatorCommitteeMember>,
4204        ) -> Self {
4205            self.set_next_epoch_committee(field);
4206            self
4207        }
4208        ///If `next_epoch_protocol_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4209        pub fn next_epoch_protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
4210            self.next_epoch_protocol_version.as_mut().map(|field| field as _)
4211        }
4212        ///Returns a mutable reference to `next_epoch_protocol_version`.
4213        ///If the field is unset, it is first initialized with the default value.
4214        pub fn next_epoch_protocol_version_mut(&mut self) -> &mut u64 {
4215            self.next_epoch_protocol_version.get_or_insert_default()
4216        }
4217        ///If `next_epoch_protocol_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
4218        pub fn next_epoch_protocol_version_opt(&self) -> Option<u64> {
4219            self.next_epoch_protocol_version.as_ref().map(|field| *field)
4220        }
4221        ///Sets `next_epoch_protocol_version` with the provided value.
4222        pub fn set_next_epoch_protocol_version(&mut self, field: u64) {
4223            self.next_epoch_protocol_version = Some(field);
4224        }
4225        ///Sets `next_epoch_protocol_version` with the provided value.
4226        pub fn with_next_epoch_protocol_version(mut self, field: u64) -> Self {
4227            self.set_next_epoch_protocol_version(field);
4228            self
4229        }
4230        ///Returns the value of `epoch_commitments`, or the default value if `epoch_commitments` is unset.
4231        pub fn epoch_commitments(&self) -> &[super::CheckpointCommitment] {
4232            &self.epoch_commitments
4233        }
4234        ///Returns a mutable reference to `epoch_commitments`.
4235        ///If the field is unset, it is first initialized with the default value.
4236        pub fn epoch_commitments_mut(
4237            &mut self,
4238        ) -> &mut Vec<super::CheckpointCommitment> {
4239            &mut self.epoch_commitments
4240        }
4241        ///Sets `epoch_commitments` with the provided value.
4242        pub fn set_epoch_commitments(
4243            &mut self,
4244            field: Vec<super::CheckpointCommitment>,
4245        ) {
4246            self.epoch_commitments = field;
4247        }
4248        ///Sets `epoch_commitments` with the provided value.
4249        pub fn with_epoch_commitments(
4250            mut self,
4251            field: Vec<super::CheckpointCommitment>,
4252        ) -> Self {
4253            self.set_epoch_commitments(field);
4254            self
4255        }
4256    }
4257    impl super::EndOfEpochTransaction {
4258        pub const fn const_default() -> Self {
4259            Self { transactions: Vec::new() }
4260        }
4261        #[doc(hidden)]
4262        pub fn default_instance() -> &'static Self {
4263            static DEFAULT: super::EndOfEpochTransaction = super::EndOfEpochTransaction::const_default();
4264            &DEFAULT
4265        }
4266        ///Returns the value of `transactions`, or the default value if `transactions` is unset.
4267        pub fn transactions(&self) -> &[super::EndOfEpochTransactionKind] {
4268            &self.transactions
4269        }
4270        ///Returns a mutable reference to `transactions`.
4271        ///If the field is unset, it is first initialized with the default value.
4272        pub fn transactions_mut(
4273            &mut self,
4274        ) -> &mut Vec<super::EndOfEpochTransactionKind> {
4275            &mut self.transactions
4276        }
4277        ///Sets `transactions` with the provided value.
4278        pub fn set_transactions(
4279            &mut self,
4280            field: Vec<super::EndOfEpochTransactionKind>,
4281        ) {
4282            self.transactions = field;
4283        }
4284        ///Sets `transactions` with the provided value.
4285        pub fn with_transactions(
4286            mut self,
4287            field: Vec<super::EndOfEpochTransactionKind>,
4288        ) -> Self {
4289            self.set_transactions(field);
4290            self
4291        }
4292    }
4293    impl super::EndOfEpochTransactionKind {
4294        pub const fn const_default() -> Self {
4295            Self { kind: None, data: None }
4296        }
4297        #[doc(hidden)]
4298        pub fn default_instance() -> &'static Self {
4299            static DEFAULT: super::EndOfEpochTransactionKind = super::EndOfEpochTransactionKind::const_default();
4300            &DEFAULT
4301        }
4302        ///Sets `kind` with the provided value.
4303        pub fn with_kind<T: Into<super::end_of_epoch_transaction_kind::Kind>>(
4304            mut self,
4305            field: T,
4306        ) -> Self {
4307            self.set_kind(field.into());
4308            self
4309        }
4310        ///Returns the value of `change_epoch`, or the default value if `change_epoch` is unset.
4311        pub fn change_epoch(&self) -> &super::ChangeEpoch {
4312            if let Some(
4313                super::end_of_epoch_transaction_kind::Data::ChangeEpoch(field),
4314            ) = &self.data
4315            {
4316                field as _
4317            } else {
4318                super::ChangeEpoch::default_instance() as _
4319            }
4320        }
4321        ///If `change_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
4322        pub fn change_epoch_opt(&self) -> Option<&super::ChangeEpoch> {
4323            if let Some(
4324                super::end_of_epoch_transaction_kind::Data::ChangeEpoch(field),
4325            ) = &self.data
4326            {
4327                Some(field as _)
4328            } else {
4329                None
4330            }
4331        }
4332        ///If `change_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4333        pub fn change_epoch_opt_mut(&mut self) -> Option<&mut super::ChangeEpoch> {
4334            if let Some(
4335                super::end_of_epoch_transaction_kind::Data::ChangeEpoch(field),
4336            ) = &mut self.data
4337            {
4338                Some(field as _)
4339            } else {
4340                None
4341            }
4342        }
4343        ///Returns a mutable reference to `change_epoch`.
4344        ///If the field is unset, it is first initialized with the default value.
4345        ///If any other oneof field in the same oneof is set, it will be cleared.
4346        pub fn change_epoch_mut(&mut self) -> &mut super::ChangeEpoch {
4347            if self.change_epoch_opt_mut().is_none() {
4348                self.data = Some(
4349                    super::end_of_epoch_transaction_kind::Data::ChangeEpoch(
4350                        super::ChangeEpoch::default(),
4351                    ),
4352                );
4353            }
4354            self.change_epoch_opt_mut().unwrap()
4355        }
4356        ///Sets `change_epoch` with the provided value.
4357        ///If any other oneof field in the same oneof is set, it will be cleared.
4358        pub fn set_change_epoch<T: Into<super::ChangeEpoch>>(&mut self, field: T) {
4359            self.data = Some(
4360                super::end_of_epoch_transaction_kind::Data::ChangeEpoch(
4361                    field.into().into(),
4362                ),
4363            );
4364        }
4365        ///Sets `change_epoch` with the provided value.
4366        ///If any other oneof field in the same oneof is set, it will be cleared.
4367        pub fn with_change_epoch<T: Into<super::ChangeEpoch>>(
4368            mut self,
4369            field: T,
4370        ) -> Self {
4371            self.set_change_epoch(field.into());
4372            self
4373        }
4374        ///Returns the value of `authenticator_state_expire`, or the default value if `authenticator_state_expire` is unset.
4375        pub fn authenticator_state_expire(&self) -> &super::AuthenticatorStateExpire {
4376            if let Some(
4377                super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4378                    field,
4379                ),
4380            ) = &self.data
4381            {
4382                field as _
4383            } else {
4384                super::AuthenticatorStateExpire::default_instance() as _
4385            }
4386        }
4387        ///If `authenticator_state_expire` is set, returns [`Some`] with the value; otherwise returns [`None`].
4388        pub fn authenticator_state_expire_opt(
4389            &self,
4390        ) -> Option<&super::AuthenticatorStateExpire> {
4391            if let Some(
4392                super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4393                    field,
4394                ),
4395            ) = &self.data
4396            {
4397                Some(field as _)
4398            } else {
4399                None
4400            }
4401        }
4402        ///If `authenticator_state_expire` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4403        pub fn authenticator_state_expire_opt_mut(
4404            &mut self,
4405        ) -> Option<&mut super::AuthenticatorStateExpire> {
4406            if let Some(
4407                super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4408                    field,
4409                ),
4410            ) = &mut self.data
4411            {
4412                Some(field as _)
4413            } else {
4414                None
4415            }
4416        }
4417        ///Returns a mutable reference to `authenticator_state_expire`.
4418        ///If the field is unset, it is first initialized with the default value.
4419        ///If any other oneof field in the same oneof is set, it will be cleared.
4420        pub fn authenticator_state_expire_mut(
4421            &mut self,
4422        ) -> &mut super::AuthenticatorStateExpire {
4423            if self.authenticator_state_expire_opt_mut().is_none() {
4424                self.data = Some(
4425                    super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4426                        super::AuthenticatorStateExpire::default(),
4427                    ),
4428                );
4429            }
4430            self.authenticator_state_expire_opt_mut().unwrap()
4431        }
4432        ///Sets `authenticator_state_expire` with the provided value.
4433        ///If any other oneof field in the same oneof is set, it will be cleared.
4434        pub fn set_authenticator_state_expire<T: Into<super::AuthenticatorStateExpire>>(
4435            &mut self,
4436            field: T,
4437        ) {
4438            self.data = Some(
4439                super::end_of_epoch_transaction_kind::Data::AuthenticatorStateExpire(
4440                    field.into().into(),
4441                ),
4442            );
4443        }
4444        ///Sets `authenticator_state_expire` with the provided value.
4445        ///If any other oneof field in the same oneof is set, it will be cleared.
4446        pub fn with_authenticator_state_expire<T: Into<super::AuthenticatorStateExpire>>(
4447            mut self,
4448            field: T,
4449        ) -> Self {
4450            self.set_authenticator_state_expire(field.into());
4451            self
4452        }
4453        ///Returns the value of `execution_time_observations`, or the default value if `execution_time_observations` is unset.
4454        pub fn execution_time_observations(&self) -> &super::ExecutionTimeObservations {
4455            if let Some(
4456                super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4457                    field,
4458                ),
4459            ) = &self.data
4460            {
4461                field as _
4462            } else {
4463                super::ExecutionTimeObservations::default_instance() as _
4464            }
4465        }
4466        ///If `execution_time_observations` is set, returns [`Some`] with the value; otherwise returns [`None`].
4467        pub fn execution_time_observations_opt(
4468            &self,
4469        ) -> Option<&super::ExecutionTimeObservations> {
4470            if let Some(
4471                super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4472                    field,
4473                ),
4474            ) = &self.data
4475            {
4476                Some(field as _)
4477            } else {
4478                None
4479            }
4480        }
4481        ///If `execution_time_observations` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4482        pub fn execution_time_observations_opt_mut(
4483            &mut self,
4484        ) -> Option<&mut super::ExecutionTimeObservations> {
4485            if let Some(
4486                super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4487                    field,
4488                ),
4489            ) = &mut self.data
4490            {
4491                Some(field as _)
4492            } else {
4493                None
4494            }
4495        }
4496        ///Returns a mutable reference to `execution_time_observations`.
4497        ///If the field is unset, it is first initialized with the default value.
4498        ///If any other oneof field in the same oneof is set, it will be cleared.
4499        pub fn execution_time_observations_mut(
4500            &mut self,
4501        ) -> &mut super::ExecutionTimeObservations {
4502            if self.execution_time_observations_opt_mut().is_none() {
4503                self.data = Some(
4504                    super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4505                        super::ExecutionTimeObservations::default(),
4506                    ),
4507                );
4508            }
4509            self.execution_time_observations_opt_mut().unwrap()
4510        }
4511        ///Sets `execution_time_observations` with the provided value.
4512        ///If any other oneof field in the same oneof is set, it will be cleared.
4513        pub fn set_execution_time_observations<
4514            T: Into<super::ExecutionTimeObservations>,
4515        >(&mut self, field: T) {
4516            self.data = Some(
4517                super::end_of_epoch_transaction_kind::Data::ExecutionTimeObservations(
4518                    field.into().into(),
4519                ),
4520            );
4521        }
4522        ///Sets `execution_time_observations` with the provided value.
4523        ///If any other oneof field in the same oneof is set, it will be cleared.
4524        pub fn with_execution_time_observations<
4525            T: Into<super::ExecutionTimeObservations>,
4526        >(mut self, field: T) -> Self {
4527            self.set_execution_time_observations(field.into());
4528            self
4529        }
4530        ///Returns the value of `bridge_chain_id`, or the default value if `bridge_chain_id` is unset.
4531        pub fn bridge_chain_id(&self) -> &str {
4532            if let Some(
4533                super::end_of_epoch_transaction_kind::Data::BridgeChainId(field),
4534            ) = &self.data
4535            {
4536                field as _
4537            } else {
4538                ""
4539            }
4540        }
4541        ///If `bridge_chain_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
4542        pub fn bridge_chain_id_opt(&self) -> Option<&str> {
4543            if let Some(
4544                super::end_of_epoch_transaction_kind::Data::BridgeChainId(field),
4545            ) = &self.data
4546            {
4547                Some(field as _)
4548            } else {
4549                None
4550            }
4551        }
4552        ///If `bridge_chain_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4553        pub fn bridge_chain_id_opt_mut(&mut self) -> Option<&mut String> {
4554            if let Some(
4555                super::end_of_epoch_transaction_kind::Data::BridgeChainId(field),
4556            ) = &mut self.data
4557            {
4558                Some(field as _)
4559            } else {
4560                None
4561            }
4562        }
4563        ///Returns a mutable reference to `bridge_chain_id`.
4564        ///If the field is unset, it is first initialized with the default value.
4565        ///If any other oneof field in the same oneof is set, it will be cleared.
4566        pub fn bridge_chain_id_mut(&mut self) -> &mut String {
4567            if self.bridge_chain_id_opt_mut().is_none() {
4568                self.data = Some(
4569                    super::end_of_epoch_transaction_kind::Data::BridgeChainId(
4570                        String::default(),
4571                    ),
4572                );
4573            }
4574            self.bridge_chain_id_opt_mut().unwrap()
4575        }
4576        ///Sets `bridge_chain_id` with the provided value.
4577        ///If any other oneof field in the same oneof is set, it will be cleared.
4578        pub fn set_bridge_chain_id<T: Into<String>>(&mut self, field: T) {
4579            self.data = Some(
4580                super::end_of_epoch_transaction_kind::Data::BridgeChainId(
4581                    field.into().into(),
4582                ),
4583            );
4584        }
4585        ///Sets `bridge_chain_id` with the provided value.
4586        ///If any other oneof field in the same oneof is set, it will be cleared.
4587        pub fn with_bridge_chain_id<T: Into<String>>(mut self, field: T) -> Self {
4588            self.set_bridge_chain_id(field.into());
4589            self
4590        }
4591        ///Returns the value of `bridge_object_version`, or the default value if `bridge_object_version` is unset.
4592        pub fn bridge_object_version(&self) -> u64 {
4593            if let Some(
4594                super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4595            ) = &self.data
4596            {
4597                *field
4598            } else {
4599                0u64
4600            }
4601        }
4602        ///If `bridge_object_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
4603        pub fn bridge_object_version_opt(&self) -> Option<u64> {
4604            if let Some(
4605                super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4606            ) = &self.data
4607            {
4608                Some(*field)
4609            } else {
4610                None
4611            }
4612        }
4613        ///If `bridge_object_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4614        pub fn bridge_object_version_opt_mut(&mut self) -> Option<&mut u64> {
4615            if let Some(
4616                super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4617            ) = &mut self.data
4618            {
4619                Some(field as _)
4620            } else {
4621                None
4622            }
4623        }
4624        ///Returns a mutable reference to `bridge_object_version`.
4625        ///If the field is unset, it is first initialized with the default value.
4626        ///If any other oneof field in the same oneof is set, it will be cleared.
4627        pub fn bridge_object_version_mut(&mut self) -> &mut u64 {
4628            if self.bridge_object_version_opt_mut().is_none() {
4629                self.data = Some(
4630                    super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(
4631                        u64::default(),
4632                    ),
4633                );
4634            }
4635            self.bridge_object_version_opt_mut().unwrap()
4636        }
4637        ///Sets `bridge_object_version` with the provided value.
4638        ///If any other oneof field in the same oneof is set, it will be cleared.
4639        pub fn set_bridge_object_version(&mut self, field: u64) {
4640            self.data = Some(
4641                super::end_of_epoch_transaction_kind::Data::BridgeObjectVersion(field),
4642            );
4643        }
4644        ///Sets `bridge_object_version` with the provided value.
4645        ///If any other oneof field in the same oneof is set, it will be cleared.
4646        pub fn with_bridge_object_version(mut self, field: u64) -> Self {
4647            self.set_bridge_object_version(field);
4648            self
4649        }
4650    }
4651    impl super::Epoch {
4652        pub const fn const_default() -> Self {
4653            Self {
4654                epoch: None,
4655                committee: None,
4656                system_state: None,
4657                first_checkpoint: None,
4658                last_checkpoint: None,
4659                start: None,
4660                end: None,
4661                reference_gas_price: None,
4662                protocol_config: None,
4663            }
4664        }
4665        #[doc(hidden)]
4666        pub fn default_instance() -> &'static Self {
4667            static DEFAULT: super::Epoch = super::Epoch::const_default();
4668            &DEFAULT
4669        }
4670        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4671        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
4672            self.epoch.as_mut().map(|field| field as _)
4673        }
4674        ///Returns a mutable reference to `epoch`.
4675        ///If the field is unset, it is first initialized with the default value.
4676        pub fn epoch_mut(&mut self) -> &mut u64 {
4677            self.epoch.get_or_insert_default()
4678        }
4679        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
4680        pub fn epoch_opt(&self) -> Option<u64> {
4681            self.epoch.as_ref().map(|field| *field)
4682        }
4683        ///Sets `epoch` with the provided value.
4684        pub fn set_epoch(&mut self, field: u64) {
4685            self.epoch = Some(field);
4686        }
4687        ///Sets `epoch` with the provided value.
4688        pub fn with_epoch(mut self, field: u64) -> Self {
4689            self.set_epoch(field);
4690            self
4691        }
4692        ///Returns the value of `committee`, or the default value if `committee` is unset.
4693        pub fn committee(&self) -> &super::ValidatorCommittee {
4694            self.committee
4695                .as_ref()
4696                .map(|field| field as _)
4697                .unwrap_or_else(|| super::ValidatorCommittee::default_instance() as _)
4698        }
4699        ///If `committee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4700        pub fn committee_opt_mut(&mut self) -> Option<&mut super::ValidatorCommittee> {
4701            self.committee.as_mut().map(|field| field as _)
4702        }
4703        ///Returns a mutable reference to `committee`.
4704        ///If the field is unset, it is first initialized with the default value.
4705        pub fn committee_mut(&mut self) -> &mut super::ValidatorCommittee {
4706            self.committee.get_or_insert_default()
4707        }
4708        ///If `committee` is set, returns [`Some`] with the value; otherwise returns [`None`].
4709        pub fn committee_opt(&self) -> Option<&super::ValidatorCommittee> {
4710            self.committee.as_ref().map(|field| field as _)
4711        }
4712        ///Sets `committee` with the provided value.
4713        pub fn set_committee<T: Into<super::ValidatorCommittee>>(&mut self, field: T) {
4714            self.committee = Some(field.into().into());
4715        }
4716        ///Sets `committee` with the provided value.
4717        pub fn with_committee<T: Into<super::ValidatorCommittee>>(
4718            mut self,
4719            field: T,
4720        ) -> Self {
4721            self.set_committee(field.into());
4722            self
4723        }
4724        ///Returns the value of `system_state`, or the default value if `system_state` is unset.
4725        pub fn system_state(&self) -> &super::SystemState {
4726            self.system_state
4727                .as_ref()
4728                .map(|field| field as _)
4729                .unwrap_or_else(|| super::SystemState::default_instance() as _)
4730        }
4731        ///If `system_state` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4732        pub fn system_state_opt_mut(&mut self) -> Option<&mut super::SystemState> {
4733            self.system_state.as_mut().map(|field| field as _)
4734        }
4735        ///Returns a mutable reference to `system_state`.
4736        ///If the field is unset, it is first initialized with the default value.
4737        pub fn system_state_mut(&mut self) -> &mut super::SystemState {
4738            self.system_state.get_or_insert_default()
4739        }
4740        ///If `system_state` is set, returns [`Some`] with the value; otherwise returns [`None`].
4741        pub fn system_state_opt(&self) -> Option<&super::SystemState> {
4742            self.system_state.as_ref().map(|field| field as _)
4743        }
4744        ///Sets `system_state` with the provided value.
4745        pub fn set_system_state<T: Into<super::SystemState>>(&mut self, field: T) {
4746            self.system_state = Some(field.into().into());
4747        }
4748        ///Sets `system_state` with the provided value.
4749        pub fn with_system_state<T: Into<super::SystemState>>(
4750            mut self,
4751            field: T,
4752        ) -> Self {
4753            self.set_system_state(field.into());
4754            self
4755        }
4756        ///If `first_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4757        pub fn first_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
4758            self.first_checkpoint.as_mut().map(|field| field as _)
4759        }
4760        ///Returns a mutable reference to `first_checkpoint`.
4761        ///If the field is unset, it is first initialized with the default value.
4762        pub fn first_checkpoint_mut(&mut self) -> &mut u64 {
4763            self.first_checkpoint.get_or_insert_default()
4764        }
4765        ///If `first_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
4766        pub fn first_checkpoint_opt(&self) -> Option<u64> {
4767            self.first_checkpoint.as_ref().map(|field| *field)
4768        }
4769        ///Sets `first_checkpoint` with the provided value.
4770        pub fn set_first_checkpoint(&mut self, field: u64) {
4771            self.first_checkpoint = Some(field);
4772        }
4773        ///Sets `first_checkpoint` with the provided value.
4774        pub fn with_first_checkpoint(mut self, field: u64) -> Self {
4775            self.set_first_checkpoint(field);
4776            self
4777        }
4778        ///If `last_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4779        pub fn last_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
4780            self.last_checkpoint.as_mut().map(|field| field as _)
4781        }
4782        ///Returns a mutable reference to `last_checkpoint`.
4783        ///If the field is unset, it is first initialized with the default value.
4784        pub fn last_checkpoint_mut(&mut self) -> &mut u64 {
4785            self.last_checkpoint.get_or_insert_default()
4786        }
4787        ///If `last_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
4788        pub fn last_checkpoint_opt(&self) -> Option<u64> {
4789            self.last_checkpoint.as_ref().map(|field| *field)
4790        }
4791        ///Sets `last_checkpoint` with the provided value.
4792        pub fn set_last_checkpoint(&mut self, field: u64) {
4793            self.last_checkpoint = Some(field);
4794        }
4795        ///Sets `last_checkpoint` with the provided value.
4796        pub fn with_last_checkpoint(mut self, field: u64) -> Self {
4797            self.set_last_checkpoint(field);
4798            self
4799        }
4800        ///If `start` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4801        pub fn start_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
4802            self.start.as_mut().map(|field| field as _)
4803        }
4804        ///Returns a mutable reference to `start`.
4805        ///If the field is unset, it is first initialized with the default value.
4806        pub fn start_mut(&mut self) -> &mut ::prost_types::Timestamp {
4807            self.start.get_or_insert_default()
4808        }
4809        ///If `start` is set, returns [`Some`] with the value; otherwise returns [`None`].
4810        pub fn start_opt(&self) -> Option<&::prost_types::Timestamp> {
4811            self.start.as_ref().map(|field| field as _)
4812        }
4813        ///Sets `start` with the provided value.
4814        pub fn set_start<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
4815            self.start = Some(field.into().into());
4816        }
4817        ///Sets `start` with the provided value.
4818        pub fn with_start<T: Into<::prost_types::Timestamp>>(
4819            mut self,
4820            field: T,
4821        ) -> Self {
4822            self.set_start(field.into());
4823            self
4824        }
4825        ///If `end` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4826        pub fn end_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
4827            self.end.as_mut().map(|field| field as _)
4828        }
4829        ///Returns a mutable reference to `end`.
4830        ///If the field is unset, it is first initialized with the default value.
4831        pub fn end_mut(&mut self) -> &mut ::prost_types::Timestamp {
4832            self.end.get_or_insert_default()
4833        }
4834        ///If `end` is set, returns [`Some`] with the value; otherwise returns [`None`].
4835        pub fn end_opt(&self) -> Option<&::prost_types::Timestamp> {
4836            self.end.as_ref().map(|field| field as _)
4837        }
4838        ///Sets `end` with the provided value.
4839        pub fn set_end<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
4840            self.end = Some(field.into().into());
4841        }
4842        ///Sets `end` with the provided value.
4843        pub fn with_end<T: Into<::prost_types::Timestamp>>(mut self, field: T) -> Self {
4844            self.set_end(field.into());
4845            self
4846        }
4847        ///If `reference_gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4848        pub fn reference_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
4849            self.reference_gas_price.as_mut().map(|field| field as _)
4850        }
4851        ///Returns a mutable reference to `reference_gas_price`.
4852        ///If the field is unset, it is first initialized with the default value.
4853        pub fn reference_gas_price_mut(&mut self) -> &mut u64 {
4854            self.reference_gas_price.get_or_insert_default()
4855        }
4856        ///If `reference_gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
4857        pub fn reference_gas_price_opt(&self) -> Option<u64> {
4858            self.reference_gas_price.as_ref().map(|field| *field)
4859        }
4860        ///Sets `reference_gas_price` with the provided value.
4861        pub fn set_reference_gas_price(&mut self, field: u64) {
4862            self.reference_gas_price = Some(field);
4863        }
4864        ///Sets `reference_gas_price` with the provided value.
4865        pub fn with_reference_gas_price(mut self, field: u64) -> Self {
4866            self.set_reference_gas_price(field);
4867            self
4868        }
4869        ///Returns the value of `protocol_config`, or the default value if `protocol_config` is unset.
4870        pub fn protocol_config(&self) -> &super::ProtocolConfig {
4871            self.protocol_config
4872                .as_ref()
4873                .map(|field| field as _)
4874                .unwrap_or_else(|| super::ProtocolConfig::default_instance() as _)
4875        }
4876        ///If `protocol_config` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4877        pub fn protocol_config_opt_mut(&mut self) -> Option<&mut super::ProtocolConfig> {
4878            self.protocol_config.as_mut().map(|field| field as _)
4879        }
4880        ///Returns a mutable reference to `protocol_config`.
4881        ///If the field is unset, it is first initialized with the default value.
4882        pub fn protocol_config_mut(&mut self) -> &mut super::ProtocolConfig {
4883            self.protocol_config.get_or_insert_default()
4884        }
4885        ///If `protocol_config` is set, returns [`Some`] with the value; otherwise returns [`None`].
4886        pub fn protocol_config_opt(&self) -> Option<&super::ProtocolConfig> {
4887            self.protocol_config.as_ref().map(|field| field as _)
4888        }
4889        ///Sets `protocol_config` with the provided value.
4890        pub fn set_protocol_config<T: Into<super::ProtocolConfig>>(&mut self, field: T) {
4891            self.protocol_config = Some(field.into().into());
4892        }
4893        ///Sets `protocol_config` with the provided value.
4894        pub fn with_protocol_config<T: Into<super::ProtocolConfig>>(
4895            mut self,
4896            field: T,
4897        ) -> Self {
4898            self.set_protocol_config(field.into());
4899            self
4900        }
4901    }
4902    impl super::Event {
4903        pub const fn const_default() -> Self {
4904            Self {
4905                package_id: None,
4906                module: None,
4907                sender: None,
4908                event_type: None,
4909                contents: None,
4910                json: None,
4911            }
4912        }
4913        #[doc(hidden)]
4914        pub fn default_instance() -> &'static Self {
4915            static DEFAULT: super::Event = super::Event::const_default();
4916            &DEFAULT
4917        }
4918        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4919        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
4920            self.package_id.as_mut().map(|field| field as _)
4921        }
4922        ///Returns a mutable reference to `package_id`.
4923        ///If the field is unset, it is first initialized with the default value.
4924        pub fn package_id_mut(&mut self) -> &mut String {
4925            self.package_id.get_or_insert_default()
4926        }
4927        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
4928        pub fn package_id_opt(&self) -> Option<&str> {
4929            self.package_id.as_ref().map(|field| field as _)
4930        }
4931        ///Sets `package_id` with the provided value.
4932        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
4933            self.package_id = Some(field.into().into());
4934        }
4935        ///Sets `package_id` with the provided value.
4936        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
4937            self.set_package_id(field.into());
4938            self
4939        }
4940        ///If `module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4941        pub fn module_opt_mut(&mut self) -> Option<&mut String> {
4942            self.module.as_mut().map(|field| field as _)
4943        }
4944        ///Returns a mutable reference to `module`.
4945        ///If the field is unset, it is first initialized with the default value.
4946        pub fn module_mut(&mut self) -> &mut String {
4947            self.module.get_or_insert_default()
4948        }
4949        ///If `module` is set, returns [`Some`] with the value; otherwise returns [`None`].
4950        pub fn module_opt(&self) -> Option<&str> {
4951            self.module.as_ref().map(|field| field as _)
4952        }
4953        ///Sets `module` with the provided value.
4954        pub fn set_module<T: Into<String>>(&mut self, field: T) {
4955            self.module = Some(field.into().into());
4956        }
4957        ///Sets `module` with the provided value.
4958        pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
4959            self.set_module(field.into());
4960            self
4961        }
4962        ///If `sender` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4963        pub fn sender_opt_mut(&mut self) -> Option<&mut String> {
4964            self.sender.as_mut().map(|field| field as _)
4965        }
4966        ///Returns a mutable reference to `sender`.
4967        ///If the field is unset, it is first initialized with the default value.
4968        pub fn sender_mut(&mut self) -> &mut String {
4969            self.sender.get_or_insert_default()
4970        }
4971        ///If `sender` is set, returns [`Some`] with the value; otherwise returns [`None`].
4972        pub fn sender_opt(&self) -> Option<&str> {
4973            self.sender.as_ref().map(|field| field as _)
4974        }
4975        ///Sets `sender` with the provided value.
4976        pub fn set_sender<T: Into<String>>(&mut self, field: T) {
4977            self.sender = Some(field.into().into());
4978        }
4979        ///Sets `sender` with the provided value.
4980        pub fn with_sender<T: Into<String>>(mut self, field: T) -> Self {
4981            self.set_sender(field.into());
4982            self
4983        }
4984        ///If `event_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
4985        pub fn event_type_opt_mut(&mut self) -> Option<&mut String> {
4986            self.event_type.as_mut().map(|field| field as _)
4987        }
4988        ///Returns a mutable reference to `event_type`.
4989        ///If the field is unset, it is first initialized with the default value.
4990        pub fn event_type_mut(&mut self) -> &mut String {
4991            self.event_type.get_or_insert_default()
4992        }
4993        ///If `event_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
4994        pub fn event_type_opt(&self) -> Option<&str> {
4995            self.event_type.as_ref().map(|field| field as _)
4996        }
4997        ///Sets `event_type` with the provided value.
4998        pub fn set_event_type<T: Into<String>>(&mut self, field: T) {
4999            self.event_type = Some(field.into().into());
5000        }
5001        ///Sets `event_type` with the provided value.
5002        pub fn with_event_type<T: Into<String>>(mut self, field: T) -> Self {
5003            self.set_event_type(field.into());
5004            self
5005        }
5006        ///Returns the value of `contents`, or the default value if `contents` is unset.
5007        pub fn contents(&self) -> &super::Bcs {
5008            self.contents
5009                .as_ref()
5010                .map(|field| field as _)
5011                .unwrap_or_else(|| super::Bcs::default_instance() as _)
5012        }
5013        ///If `contents` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5014        pub fn contents_opt_mut(&mut self) -> Option<&mut super::Bcs> {
5015            self.contents.as_mut().map(|field| field as _)
5016        }
5017        ///Returns a mutable reference to `contents`.
5018        ///If the field is unset, it is first initialized with the default value.
5019        pub fn contents_mut(&mut self) -> &mut super::Bcs {
5020            self.contents.get_or_insert_default()
5021        }
5022        ///If `contents` is set, returns [`Some`] with the value; otherwise returns [`None`].
5023        pub fn contents_opt(&self) -> Option<&super::Bcs> {
5024            self.contents.as_ref().map(|field| field as _)
5025        }
5026        ///Sets `contents` with the provided value.
5027        pub fn set_contents<T: Into<super::Bcs>>(&mut self, field: T) {
5028            self.contents = Some(field.into().into());
5029        }
5030        ///Sets `contents` with the provided value.
5031        pub fn with_contents<T: Into<super::Bcs>>(mut self, field: T) -> Self {
5032            self.set_contents(field.into());
5033            self
5034        }
5035        ///If `json` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5036        pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
5037            self.json.as_mut().map(|field| field as _)
5038        }
5039        ///Returns a mutable reference to `json`.
5040        ///If the field is unset, it is first initialized with the default value.
5041        pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
5042            self.json.get_or_insert_default()
5043        }
5044        ///If `json` is set, returns [`Some`] with the value; otherwise returns [`None`].
5045        pub fn json_opt(&self) -> Option<&::prost_types::Value> {
5046            self.json.as_ref().map(|field| field as _)
5047        }
5048        ///Sets `json` with the provided value.
5049        pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
5050            self.json = Some(field.into().into());
5051        }
5052        ///Sets `json` with the provided value.
5053        pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
5054            self.set_json(field.into());
5055            self
5056        }
5057    }
5058    impl super::ExecuteTransactionRequest {
5059        pub const fn const_default() -> Self {
5060            Self {
5061                transaction: None,
5062                signatures: Vec::new(),
5063                read_mask: None,
5064            }
5065        }
5066        #[doc(hidden)]
5067        pub fn default_instance() -> &'static Self {
5068            static DEFAULT: super::ExecuteTransactionRequest = super::ExecuteTransactionRequest::const_default();
5069            &DEFAULT
5070        }
5071        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
5072        pub fn transaction(&self) -> &super::Transaction {
5073            self.transaction
5074                .as_ref()
5075                .map(|field| field as _)
5076                .unwrap_or_else(|| super::Transaction::default_instance() as _)
5077        }
5078        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5079        pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
5080            self.transaction.as_mut().map(|field| field as _)
5081        }
5082        ///Returns a mutable reference to `transaction`.
5083        ///If the field is unset, it is first initialized with the default value.
5084        pub fn transaction_mut(&mut self) -> &mut super::Transaction {
5085            self.transaction.get_or_insert_default()
5086        }
5087        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
5088        pub fn transaction_opt(&self) -> Option<&super::Transaction> {
5089            self.transaction.as_ref().map(|field| field as _)
5090        }
5091        ///Sets `transaction` with the provided value.
5092        pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
5093            self.transaction = Some(field.into().into());
5094        }
5095        ///Sets `transaction` with the provided value.
5096        pub fn with_transaction<T: Into<super::Transaction>>(
5097            mut self,
5098            field: T,
5099        ) -> Self {
5100            self.set_transaction(field.into());
5101            self
5102        }
5103        ///Returns the value of `signatures`, or the default value if `signatures` is unset.
5104        pub fn signatures(&self) -> &[super::UserSignature] {
5105            &self.signatures
5106        }
5107        ///Returns a mutable reference to `signatures`.
5108        ///If the field is unset, it is first initialized with the default value.
5109        pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
5110            &mut self.signatures
5111        }
5112        ///Sets `signatures` with the provided value.
5113        pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
5114            self.signatures = field;
5115        }
5116        ///Sets `signatures` with the provided value.
5117        pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
5118            self.set_signatures(field);
5119            self
5120        }
5121        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5122        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
5123            self.read_mask.as_mut().map(|field| field as _)
5124        }
5125        ///Returns a mutable reference to `read_mask`.
5126        ///If the field is unset, it is first initialized with the default value.
5127        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
5128            self.read_mask.get_or_insert_default()
5129        }
5130        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
5131        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
5132            self.read_mask.as_ref().map(|field| field as _)
5133        }
5134        ///Sets `read_mask` with the provided value.
5135        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
5136            self.read_mask = Some(field.into().into());
5137        }
5138        ///Sets `read_mask` with the provided value.
5139        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
5140            mut self,
5141            field: T,
5142        ) -> Self {
5143            self.set_read_mask(field.into());
5144            self
5145        }
5146    }
5147    impl super::ExecuteTransactionResponse {
5148        pub const fn const_default() -> Self {
5149            Self { transaction: None }
5150        }
5151        #[doc(hidden)]
5152        pub fn default_instance() -> &'static Self {
5153            static DEFAULT: super::ExecuteTransactionResponse = super::ExecuteTransactionResponse::const_default();
5154            &DEFAULT
5155        }
5156        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
5157        pub fn transaction(&self) -> &super::ExecutedTransaction {
5158            self.transaction
5159                .as_ref()
5160                .map(|field| field as _)
5161                .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
5162        }
5163        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5164        pub fn transaction_opt_mut(
5165            &mut self,
5166        ) -> Option<&mut super::ExecutedTransaction> {
5167            self.transaction.as_mut().map(|field| field as _)
5168        }
5169        ///Returns a mutable reference to `transaction`.
5170        ///If the field is unset, it is first initialized with the default value.
5171        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
5172            self.transaction.get_or_insert_default()
5173        }
5174        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
5175        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
5176            self.transaction.as_ref().map(|field| field as _)
5177        }
5178        ///Sets `transaction` with the provided value.
5179        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
5180            &mut self,
5181            field: T,
5182        ) {
5183            self.transaction = Some(field.into().into());
5184        }
5185        ///Sets `transaction` with the provided value.
5186        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
5187            mut self,
5188            field: T,
5189        ) -> Self {
5190            self.set_transaction(field.into());
5191            self
5192        }
5193    }
5194    impl super::ExecutedTransaction {
5195        pub const fn const_default() -> Self {
5196            Self {
5197                digest: None,
5198                transaction: None,
5199                signatures: Vec::new(),
5200                effects: None,
5201                events: None,
5202                checkpoint: None,
5203                timestamp: None,
5204                balance_changes: Vec::new(),
5205                objects: None,
5206            }
5207        }
5208        #[doc(hidden)]
5209        pub fn default_instance() -> &'static Self {
5210            static DEFAULT: super::ExecutedTransaction = super::ExecutedTransaction::const_default();
5211            &DEFAULT
5212        }
5213        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5214        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
5215            self.digest.as_mut().map(|field| field as _)
5216        }
5217        ///Returns a mutable reference to `digest`.
5218        ///If the field is unset, it is first initialized with the default value.
5219        pub fn digest_mut(&mut self) -> &mut String {
5220            self.digest.get_or_insert_default()
5221        }
5222        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
5223        pub fn digest_opt(&self) -> Option<&str> {
5224            self.digest.as_ref().map(|field| field as _)
5225        }
5226        ///Sets `digest` with the provided value.
5227        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
5228            self.digest = Some(field.into().into());
5229        }
5230        ///Sets `digest` with the provided value.
5231        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
5232            self.set_digest(field.into());
5233            self
5234        }
5235        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
5236        pub fn transaction(&self) -> &super::Transaction {
5237            self.transaction
5238                .as_ref()
5239                .map(|field| field as _)
5240                .unwrap_or_else(|| super::Transaction::default_instance() as _)
5241        }
5242        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5243        pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
5244            self.transaction.as_mut().map(|field| field as _)
5245        }
5246        ///Returns a mutable reference to `transaction`.
5247        ///If the field is unset, it is first initialized with the default value.
5248        pub fn transaction_mut(&mut self) -> &mut super::Transaction {
5249            self.transaction.get_or_insert_default()
5250        }
5251        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
5252        pub fn transaction_opt(&self) -> Option<&super::Transaction> {
5253            self.transaction.as_ref().map(|field| field as _)
5254        }
5255        ///Sets `transaction` with the provided value.
5256        pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
5257            self.transaction = Some(field.into().into());
5258        }
5259        ///Sets `transaction` with the provided value.
5260        pub fn with_transaction<T: Into<super::Transaction>>(
5261            mut self,
5262            field: T,
5263        ) -> Self {
5264            self.set_transaction(field.into());
5265            self
5266        }
5267        ///Returns the value of `signatures`, or the default value if `signatures` is unset.
5268        pub fn signatures(&self) -> &[super::UserSignature] {
5269            &self.signatures
5270        }
5271        ///Returns a mutable reference to `signatures`.
5272        ///If the field is unset, it is first initialized with the default value.
5273        pub fn signatures_mut(&mut self) -> &mut Vec<super::UserSignature> {
5274            &mut self.signatures
5275        }
5276        ///Sets `signatures` with the provided value.
5277        pub fn set_signatures(&mut self, field: Vec<super::UserSignature>) {
5278            self.signatures = field;
5279        }
5280        ///Sets `signatures` with the provided value.
5281        pub fn with_signatures(mut self, field: Vec<super::UserSignature>) -> Self {
5282            self.set_signatures(field);
5283            self
5284        }
5285        ///Returns the value of `effects`, or the default value if `effects` is unset.
5286        pub fn effects(&self) -> &super::TransactionEffects {
5287            self.effects
5288                .as_ref()
5289                .map(|field| field as _)
5290                .unwrap_or_else(|| super::TransactionEffects::default_instance() as _)
5291        }
5292        ///If `effects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5293        pub fn effects_opt_mut(&mut self) -> Option<&mut super::TransactionEffects> {
5294            self.effects.as_mut().map(|field| field as _)
5295        }
5296        ///Returns a mutable reference to `effects`.
5297        ///If the field is unset, it is first initialized with the default value.
5298        pub fn effects_mut(&mut self) -> &mut super::TransactionEffects {
5299            self.effects.get_or_insert_default()
5300        }
5301        ///If `effects` is set, returns [`Some`] with the value; otherwise returns [`None`].
5302        pub fn effects_opt(&self) -> Option<&super::TransactionEffects> {
5303            self.effects.as_ref().map(|field| field as _)
5304        }
5305        ///Sets `effects` with the provided value.
5306        pub fn set_effects<T: Into<super::TransactionEffects>>(&mut self, field: T) {
5307            self.effects = Some(field.into().into());
5308        }
5309        ///Sets `effects` with the provided value.
5310        pub fn with_effects<T: Into<super::TransactionEffects>>(
5311            mut self,
5312            field: T,
5313        ) -> Self {
5314            self.set_effects(field.into());
5315            self
5316        }
5317        ///Returns the value of `events`, or the default value if `events` is unset.
5318        pub fn events(&self) -> &super::TransactionEvents {
5319            self.events
5320                .as_ref()
5321                .map(|field| field as _)
5322                .unwrap_or_else(|| super::TransactionEvents::default_instance() as _)
5323        }
5324        ///If `events` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5325        pub fn events_opt_mut(&mut self) -> Option<&mut super::TransactionEvents> {
5326            self.events.as_mut().map(|field| field as _)
5327        }
5328        ///Returns a mutable reference to `events`.
5329        ///If the field is unset, it is first initialized with the default value.
5330        pub fn events_mut(&mut self) -> &mut super::TransactionEvents {
5331            self.events.get_or_insert_default()
5332        }
5333        ///If `events` is set, returns [`Some`] with the value; otherwise returns [`None`].
5334        pub fn events_opt(&self) -> Option<&super::TransactionEvents> {
5335            self.events.as_ref().map(|field| field as _)
5336        }
5337        ///Sets `events` with the provided value.
5338        pub fn set_events<T: Into<super::TransactionEvents>>(&mut self, field: T) {
5339            self.events = Some(field.into().into());
5340        }
5341        ///Sets `events` with the provided value.
5342        pub fn with_events<T: Into<super::TransactionEvents>>(
5343            mut self,
5344            field: T,
5345        ) -> Self {
5346            self.set_events(field.into());
5347            self
5348        }
5349        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5350        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
5351            self.checkpoint.as_mut().map(|field| field as _)
5352        }
5353        ///Returns a mutable reference to `checkpoint`.
5354        ///If the field is unset, it is first initialized with the default value.
5355        pub fn checkpoint_mut(&mut self) -> &mut u64 {
5356            self.checkpoint.get_or_insert_default()
5357        }
5358        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
5359        pub fn checkpoint_opt(&self) -> Option<u64> {
5360            self.checkpoint.as_ref().map(|field| *field)
5361        }
5362        ///Sets `checkpoint` with the provided value.
5363        pub fn set_checkpoint(&mut self, field: u64) {
5364            self.checkpoint = Some(field);
5365        }
5366        ///Sets `checkpoint` with the provided value.
5367        pub fn with_checkpoint(mut self, field: u64) -> Self {
5368            self.set_checkpoint(field);
5369            self
5370        }
5371        ///If `timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5372        pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
5373            self.timestamp.as_mut().map(|field| field as _)
5374        }
5375        ///Returns a mutable reference to `timestamp`.
5376        ///If the field is unset, it is first initialized with the default value.
5377        pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
5378            self.timestamp.get_or_insert_default()
5379        }
5380        ///If `timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
5381        pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
5382            self.timestamp.as_ref().map(|field| field as _)
5383        }
5384        ///Sets `timestamp` with the provided value.
5385        pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
5386            self.timestamp = Some(field.into().into());
5387        }
5388        ///Sets `timestamp` with the provided value.
5389        pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
5390            mut self,
5391            field: T,
5392        ) -> Self {
5393            self.set_timestamp(field.into());
5394            self
5395        }
5396        ///Returns the value of `balance_changes`, or the default value if `balance_changes` is unset.
5397        pub fn balance_changes(&self) -> &[super::BalanceChange] {
5398            &self.balance_changes
5399        }
5400        ///Returns a mutable reference to `balance_changes`.
5401        ///If the field is unset, it is first initialized with the default value.
5402        pub fn balance_changes_mut(&mut self) -> &mut Vec<super::BalanceChange> {
5403            &mut self.balance_changes
5404        }
5405        ///Sets `balance_changes` with the provided value.
5406        pub fn set_balance_changes(&mut self, field: Vec<super::BalanceChange>) {
5407            self.balance_changes = field;
5408        }
5409        ///Sets `balance_changes` with the provided value.
5410        pub fn with_balance_changes(mut self, field: Vec<super::BalanceChange>) -> Self {
5411            self.set_balance_changes(field);
5412            self
5413        }
5414        ///Returns the value of `objects`, or the default value if `objects` is unset.
5415        pub fn objects(&self) -> &super::ObjectSet {
5416            self.objects
5417                .as_ref()
5418                .map(|field| field as _)
5419                .unwrap_or_else(|| super::ObjectSet::default_instance() as _)
5420        }
5421        ///If `objects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5422        pub fn objects_opt_mut(&mut self) -> Option<&mut super::ObjectSet> {
5423            self.objects.as_mut().map(|field| field as _)
5424        }
5425        ///Returns a mutable reference to `objects`.
5426        ///If the field is unset, it is first initialized with the default value.
5427        pub fn objects_mut(&mut self) -> &mut super::ObjectSet {
5428            self.objects.get_or_insert_default()
5429        }
5430        ///If `objects` is set, returns [`Some`] with the value; otherwise returns [`None`].
5431        pub fn objects_opt(&self) -> Option<&super::ObjectSet> {
5432            self.objects.as_ref().map(|field| field as _)
5433        }
5434        ///Sets `objects` with the provided value.
5435        pub fn set_objects<T: Into<super::ObjectSet>>(&mut self, field: T) {
5436            self.objects = Some(field.into().into());
5437        }
5438        ///Sets `objects` with the provided value.
5439        pub fn with_objects<T: Into<super::ObjectSet>>(mut self, field: T) -> Self {
5440            self.set_objects(field.into());
5441            self
5442        }
5443    }
5444    impl super::ExecutionError {
5445        pub const fn const_default() -> Self {
5446            Self {
5447                description: None,
5448                command: None,
5449                kind: None,
5450                error_details: None,
5451            }
5452        }
5453        #[doc(hidden)]
5454        pub fn default_instance() -> &'static Self {
5455            static DEFAULT: super::ExecutionError = super::ExecutionError::const_default();
5456            &DEFAULT
5457        }
5458        ///If `description` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5459        pub fn description_opt_mut(&mut self) -> Option<&mut String> {
5460            self.description.as_mut().map(|field| field as _)
5461        }
5462        ///Returns a mutable reference to `description`.
5463        ///If the field is unset, it is first initialized with the default value.
5464        pub fn description_mut(&mut self) -> &mut String {
5465            self.description.get_or_insert_default()
5466        }
5467        ///If `description` is set, returns [`Some`] with the value; otherwise returns [`None`].
5468        pub fn description_opt(&self) -> Option<&str> {
5469            self.description.as_ref().map(|field| field as _)
5470        }
5471        ///Sets `description` with the provided value.
5472        pub fn set_description<T: Into<String>>(&mut self, field: T) {
5473            self.description = Some(field.into().into());
5474        }
5475        ///Sets `description` with the provided value.
5476        pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
5477            self.set_description(field.into());
5478            self
5479        }
5480        ///If `command` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5481        pub fn command_opt_mut(&mut self) -> Option<&mut u64> {
5482            self.command.as_mut().map(|field| field as _)
5483        }
5484        ///Returns a mutable reference to `command`.
5485        ///If the field is unset, it is first initialized with the default value.
5486        pub fn command_mut(&mut self) -> &mut u64 {
5487            self.command.get_or_insert_default()
5488        }
5489        ///If `command` is set, returns [`Some`] with the value; otherwise returns [`None`].
5490        pub fn command_opt(&self) -> Option<u64> {
5491            self.command.as_ref().map(|field| *field)
5492        }
5493        ///Sets `command` with the provided value.
5494        pub fn set_command(&mut self, field: u64) {
5495            self.command = Some(field);
5496        }
5497        ///Sets `command` with the provided value.
5498        pub fn with_command(mut self, field: u64) -> Self {
5499            self.set_command(field);
5500            self
5501        }
5502        ///Sets `kind` with the provided value.
5503        pub fn with_kind<T: Into<super::execution_error::ExecutionErrorKind>>(
5504            mut self,
5505            field: T,
5506        ) -> Self {
5507            self.set_kind(field.into());
5508            self
5509        }
5510        ///Returns the value of `abort`, or the default value if `abort` is unset.
5511        pub fn abort(&self) -> &super::MoveAbort {
5512            if let Some(super::execution_error::ErrorDetails::Abort(field)) = &self
5513                .error_details
5514            {
5515                field as _
5516            } else {
5517                super::MoveAbort::default_instance() as _
5518            }
5519        }
5520        ///If `abort` is set, returns [`Some`] with the value; otherwise returns [`None`].
5521        pub fn abort_opt(&self) -> Option<&super::MoveAbort> {
5522            if let Some(super::execution_error::ErrorDetails::Abort(field)) = &self
5523                .error_details
5524            {
5525                Some(field as _)
5526            } else {
5527                None
5528            }
5529        }
5530        ///If `abort` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5531        pub fn abort_opt_mut(&mut self) -> Option<&mut super::MoveAbort> {
5532            if let Some(super::execution_error::ErrorDetails::Abort(field)) = &mut self
5533                .error_details
5534            {
5535                Some(field as _)
5536            } else {
5537                None
5538            }
5539        }
5540        ///Returns a mutable reference to `abort`.
5541        ///If the field is unset, it is first initialized with the default value.
5542        ///If any other oneof field in the same oneof is set, it will be cleared.
5543        pub fn abort_mut(&mut self) -> &mut super::MoveAbort {
5544            if self.abort_opt_mut().is_none() {
5545                self.error_details = Some(
5546                    super::execution_error::ErrorDetails::Abort(
5547                        super::MoveAbort::default(),
5548                    ),
5549                );
5550            }
5551            self.abort_opt_mut().unwrap()
5552        }
5553        ///Sets `abort` with the provided value.
5554        ///If any other oneof field in the same oneof is set, it will be cleared.
5555        pub fn set_abort<T: Into<super::MoveAbort>>(&mut self, field: T) {
5556            self.error_details = Some(
5557                super::execution_error::ErrorDetails::Abort(field.into().into()),
5558            );
5559        }
5560        ///Sets `abort` with the provided value.
5561        ///If any other oneof field in the same oneof is set, it will be cleared.
5562        pub fn with_abort<T: Into<super::MoveAbort>>(mut self, field: T) -> Self {
5563            self.set_abort(field.into());
5564            self
5565        }
5566        ///Returns the value of `size_error`, or the default value if `size_error` is unset.
5567        pub fn size_error(&self) -> &super::SizeError {
5568            if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &self
5569                .error_details
5570            {
5571                field as _
5572            } else {
5573                super::SizeError::default_instance() as _
5574            }
5575        }
5576        ///If `size_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
5577        pub fn size_error_opt(&self) -> Option<&super::SizeError> {
5578            if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &self
5579                .error_details
5580            {
5581                Some(field as _)
5582            } else {
5583                None
5584            }
5585        }
5586        ///If `size_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5587        pub fn size_error_opt_mut(&mut self) -> Option<&mut super::SizeError> {
5588            if let Some(super::execution_error::ErrorDetails::SizeError(field)) = &mut self
5589                .error_details
5590            {
5591                Some(field as _)
5592            } else {
5593                None
5594            }
5595        }
5596        ///Returns a mutable reference to `size_error`.
5597        ///If the field is unset, it is first initialized with the default value.
5598        ///If any other oneof field in the same oneof is set, it will be cleared.
5599        pub fn size_error_mut(&mut self) -> &mut super::SizeError {
5600            if self.size_error_opt_mut().is_none() {
5601                self.error_details = Some(
5602                    super::execution_error::ErrorDetails::SizeError(
5603                        super::SizeError::default(),
5604                    ),
5605                );
5606            }
5607            self.size_error_opt_mut().unwrap()
5608        }
5609        ///Sets `size_error` with the provided value.
5610        ///If any other oneof field in the same oneof is set, it will be cleared.
5611        pub fn set_size_error<T: Into<super::SizeError>>(&mut self, field: T) {
5612            self.error_details = Some(
5613                super::execution_error::ErrorDetails::SizeError(field.into().into()),
5614            );
5615        }
5616        ///Sets `size_error` with the provided value.
5617        ///If any other oneof field in the same oneof is set, it will be cleared.
5618        pub fn with_size_error<T: Into<super::SizeError>>(mut self, field: T) -> Self {
5619            self.set_size_error(field.into());
5620            self
5621        }
5622        ///Returns the value of `command_argument_error`, or the default value if `command_argument_error` is unset.
5623        pub fn command_argument_error(&self) -> &super::CommandArgumentError {
5624            if let Some(
5625                super::execution_error::ErrorDetails::CommandArgumentError(field),
5626            ) = &self.error_details
5627            {
5628                field as _
5629            } else {
5630                super::CommandArgumentError::default_instance() as _
5631            }
5632        }
5633        ///If `command_argument_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
5634        pub fn command_argument_error_opt(
5635            &self,
5636        ) -> Option<&super::CommandArgumentError> {
5637            if let Some(
5638                super::execution_error::ErrorDetails::CommandArgumentError(field),
5639            ) = &self.error_details
5640            {
5641                Some(field as _)
5642            } else {
5643                None
5644            }
5645        }
5646        ///If `command_argument_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5647        pub fn command_argument_error_opt_mut(
5648            &mut self,
5649        ) -> Option<&mut super::CommandArgumentError> {
5650            if let Some(
5651                super::execution_error::ErrorDetails::CommandArgumentError(field),
5652            ) = &mut self.error_details
5653            {
5654                Some(field as _)
5655            } else {
5656                None
5657            }
5658        }
5659        ///Returns a mutable reference to `command_argument_error`.
5660        ///If the field is unset, it is first initialized with the default value.
5661        ///If any other oneof field in the same oneof is set, it will be cleared.
5662        pub fn command_argument_error_mut(
5663            &mut self,
5664        ) -> &mut super::CommandArgumentError {
5665            if self.command_argument_error_opt_mut().is_none() {
5666                self.error_details = Some(
5667                    super::execution_error::ErrorDetails::CommandArgumentError(
5668                        super::CommandArgumentError::default(),
5669                    ),
5670                );
5671            }
5672            self.command_argument_error_opt_mut().unwrap()
5673        }
5674        ///Sets `command_argument_error` with the provided value.
5675        ///If any other oneof field in the same oneof is set, it will be cleared.
5676        pub fn set_command_argument_error<T: Into<super::CommandArgumentError>>(
5677            &mut self,
5678            field: T,
5679        ) {
5680            self.error_details = Some(
5681                super::execution_error::ErrorDetails::CommandArgumentError(
5682                    field.into().into(),
5683                ),
5684            );
5685        }
5686        ///Sets `command_argument_error` with the provided value.
5687        ///If any other oneof field in the same oneof is set, it will be cleared.
5688        pub fn with_command_argument_error<T: Into<super::CommandArgumentError>>(
5689            mut self,
5690            field: T,
5691        ) -> Self {
5692            self.set_command_argument_error(field.into());
5693            self
5694        }
5695        ///Returns the value of `type_argument_error`, or the default value if `type_argument_error` is unset.
5696        pub fn type_argument_error(&self) -> &super::TypeArgumentError {
5697            if let Some(
5698                super::execution_error::ErrorDetails::TypeArgumentError(field),
5699            ) = &self.error_details
5700            {
5701                field as _
5702            } else {
5703                super::TypeArgumentError::default_instance() as _
5704            }
5705        }
5706        ///If `type_argument_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
5707        pub fn type_argument_error_opt(&self) -> Option<&super::TypeArgumentError> {
5708            if let Some(
5709                super::execution_error::ErrorDetails::TypeArgumentError(field),
5710            ) = &self.error_details
5711            {
5712                Some(field as _)
5713            } else {
5714                None
5715            }
5716        }
5717        ///If `type_argument_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5718        pub fn type_argument_error_opt_mut(
5719            &mut self,
5720        ) -> Option<&mut super::TypeArgumentError> {
5721            if let Some(
5722                super::execution_error::ErrorDetails::TypeArgumentError(field),
5723            ) = &mut self.error_details
5724            {
5725                Some(field as _)
5726            } else {
5727                None
5728            }
5729        }
5730        ///Returns a mutable reference to `type_argument_error`.
5731        ///If the field is unset, it is first initialized with the default value.
5732        ///If any other oneof field in the same oneof is set, it will be cleared.
5733        pub fn type_argument_error_mut(&mut self) -> &mut super::TypeArgumentError {
5734            if self.type_argument_error_opt_mut().is_none() {
5735                self.error_details = Some(
5736                    super::execution_error::ErrorDetails::TypeArgumentError(
5737                        super::TypeArgumentError::default(),
5738                    ),
5739                );
5740            }
5741            self.type_argument_error_opt_mut().unwrap()
5742        }
5743        ///Sets `type_argument_error` with the provided value.
5744        ///If any other oneof field in the same oneof is set, it will be cleared.
5745        pub fn set_type_argument_error<T: Into<super::TypeArgumentError>>(
5746            &mut self,
5747            field: T,
5748        ) {
5749            self.error_details = Some(
5750                super::execution_error::ErrorDetails::TypeArgumentError(
5751                    field.into().into(),
5752                ),
5753            );
5754        }
5755        ///Sets `type_argument_error` with the provided value.
5756        ///If any other oneof field in the same oneof is set, it will be cleared.
5757        pub fn with_type_argument_error<T: Into<super::TypeArgumentError>>(
5758            mut self,
5759            field: T,
5760        ) -> Self {
5761            self.set_type_argument_error(field.into());
5762            self
5763        }
5764        ///Returns the value of `package_upgrade_error`, or the default value if `package_upgrade_error` is unset.
5765        pub fn package_upgrade_error(&self) -> &super::PackageUpgradeError {
5766            if let Some(
5767                super::execution_error::ErrorDetails::PackageUpgradeError(field),
5768            ) = &self.error_details
5769            {
5770                field as _
5771            } else {
5772                super::PackageUpgradeError::default_instance() as _
5773            }
5774        }
5775        ///If `package_upgrade_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
5776        pub fn package_upgrade_error_opt(&self) -> Option<&super::PackageUpgradeError> {
5777            if let Some(
5778                super::execution_error::ErrorDetails::PackageUpgradeError(field),
5779            ) = &self.error_details
5780            {
5781                Some(field as _)
5782            } else {
5783                None
5784            }
5785        }
5786        ///If `package_upgrade_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5787        pub fn package_upgrade_error_opt_mut(
5788            &mut self,
5789        ) -> Option<&mut super::PackageUpgradeError> {
5790            if let Some(
5791                super::execution_error::ErrorDetails::PackageUpgradeError(field),
5792            ) = &mut self.error_details
5793            {
5794                Some(field as _)
5795            } else {
5796                None
5797            }
5798        }
5799        ///Returns a mutable reference to `package_upgrade_error`.
5800        ///If the field is unset, it is first initialized with the default value.
5801        ///If any other oneof field in the same oneof is set, it will be cleared.
5802        pub fn package_upgrade_error_mut(&mut self) -> &mut super::PackageUpgradeError {
5803            if self.package_upgrade_error_opt_mut().is_none() {
5804                self.error_details = Some(
5805                    super::execution_error::ErrorDetails::PackageUpgradeError(
5806                        super::PackageUpgradeError::default(),
5807                    ),
5808                );
5809            }
5810            self.package_upgrade_error_opt_mut().unwrap()
5811        }
5812        ///Sets `package_upgrade_error` with the provided value.
5813        ///If any other oneof field in the same oneof is set, it will be cleared.
5814        pub fn set_package_upgrade_error<T: Into<super::PackageUpgradeError>>(
5815            &mut self,
5816            field: T,
5817        ) {
5818            self.error_details = Some(
5819                super::execution_error::ErrorDetails::PackageUpgradeError(
5820                    field.into().into(),
5821                ),
5822            );
5823        }
5824        ///Sets `package_upgrade_error` with the provided value.
5825        ///If any other oneof field in the same oneof is set, it will be cleared.
5826        pub fn with_package_upgrade_error<T: Into<super::PackageUpgradeError>>(
5827            mut self,
5828            field: T,
5829        ) -> Self {
5830            self.set_package_upgrade_error(field.into());
5831            self
5832        }
5833        ///Returns the value of `index_error`, or the default value if `index_error` is unset.
5834        pub fn index_error(&self) -> &super::IndexError {
5835            if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &self
5836                .error_details
5837            {
5838                field as _
5839            } else {
5840                super::IndexError::default_instance() as _
5841            }
5842        }
5843        ///If `index_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
5844        pub fn index_error_opt(&self) -> Option<&super::IndexError> {
5845            if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &self
5846                .error_details
5847            {
5848                Some(field as _)
5849            } else {
5850                None
5851            }
5852        }
5853        ///If `index_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5854        pub fn index_error_opt_mut(&mut self) -> Option<&mut super::IndexError> {
5855            if let Some(super::execution_error::ErrorDetails::IndexError(field)) = &mut self
5856                .error_details
5857            {
5858                Some(field as _)
5859            } else {
5860                None
5861            }
5862        }
5863        ///Returns a mutable reference to `index_error`.
5864        ///If the field is unset, it is first initialized with the default value.
5865        ///If any other oneof field in the same oneof is set, it will be cleared.
5866        pub fn index_error_mut(&mut self) -> &mut super::IndexError {
5867            if self.index_error_opt_mut().is_none() {
5868                self.error_details = Some(
5869                    super::execution_error::ErrorDetails::IndexError(
5870                        super::IndexError::default(),
5871                    ),
5872                );
5873            }
5874            self.index_error_opt_mut().unwrap()
5875        }
5876        ///Sets `index_error` with the provided value.
5877        ///If any other oneof field in the same oneof is set, it will be cleared.
5878        pub fn set_index_error<T: Into<super::IndexError>>(&mut self, field: T) {
5879            self.error_details = Some(
5880                super::execution_error::ErrorDetails::IndexError(field.into().into()),
5881            );
5882        }
5883        ///Sets `index_error` with the provided value.
5884        ///If any other oneof field in the same oneof is set, it will be cleared.
5885        pub fn with_index_error<T: Into<super::IndexError>>(mut self, field: T) -> Self {
5886            self.set_index_error(field.into());
5887            self
5888        }
5889        ///Returns the value of `object_id`, or the default value if `object_id` is unset.
5890        pub fn object_id(&self) -> &str {
5891            if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &self
5892                .error_details
5893            {
5894                field as _
5895            } else {
5896                ""
5897            }
5898        }
5899        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
5900        pub fn object_id_opt(&self) -> Option<&str> {
5901            if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &self
5902                .error_details
5903            {
5904                Some(field as _)
5905            } else {
5906                None
5907            }
5908        }
5909        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5910        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
5911            if let Some(super::execution_error::ErrorDetails::ObjectId(field)) = &mut self
5912                .error_details
5913            {
5914                Some(field as _)
5915            } else {
5916                None
5917            }
5918        }
5919        ///Returns a mutable reference to `object_id`.
5920        ///If the field is unset, it is first initialized with the default value.
5921        ///If any other oneof field in the same oneof is set, it will be cleared.
5922        pub fn object_id_mut(&mut self) -> &mut String {
5923            if self.object_id_opt_mut().is_none() {
5924                self.error_details = Some(
5925                    super::execution_error::ErrorDetails::ObjectId(String::default()),
5926                );
5927            }
5928            self.object_id_opt_mut().unwrap()
5929        }
5930        ///Sets `object_id` with the provided value.
5931        ///If any other oneof field in the same oneof is set, it will be cleared.
5932        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
5933            self.error_details = Some(
5934                super::execution_error::ErrorDetails::ObjectId(field.into().into()),
5935            );
5936        }
5937        ///Sets `object_id` with the provided value.
5938        ///If any other oneof field in the same oneof is set, it will be cleared.
5939        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
5940            self.set_object_id(field.into());
5941            self
5942        }
5943        ///Returns the value of `coin_deny_list_error`, or the default value if `coin_deny_list_error` is unset.
5944        pub fn coin_deny_list_error(&self) -> &super::CoinDenyListError {
5945            if let Some(
5946                super::execution_error::ErrorDetails::CoinDenyListError(field),
5947            ) = &self.error_details
5948            {
5949                field as _
5950            } else {
5951                super::CoinDenyListError::default_instance() as _
5952            }
5953        }
5954        ///If `coin_deny_list_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
5955        pub fn coin_deny_list_error_opt(&self) -> Option<&super::CoinDenyListError> {
5956            if let Some(
5957                super::execution_error::ErrorDetails::CoinDenyListError(field),
5958            ) = &self.error_details
5959            {
5960                Some(field as _)
5961            } else {
5962                None
5963            }
5964        }
5965        ///If `coin_deny_list_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
5966        pub fn coin_deny_list_error_opt_mut(
5967            &mut self,
5968        ) -> Option<&mut super::CoinDenyListError> {
5969            if let Some(
5970                super::execution_error::ErrorDetails::CoinDenyListError(field),
5971            ) = &mut self.error_details
5972            {
5973                Some(field as _)
5974            } else {
5975                None
5976            }
5977        }
5978        ///Returns a mutable reference to `coin_deny_list_error`.
5979        ///If the field is unset, it is first initialized with the default value.
5980        ///If any other oneof field in the same oneof is set, it will be cleared.
5981        pub fn coin_deny_list_error_mut(&mut self) -> &mut super::CoinDenyListError {
5982            if self.coin_deny_list_error_opt_mut().is_none() {
5983                self.error_details = Some(
5984                    super::execution_error::ErrorDetails::CoinDenyListError(
5985                        super::CoinDenyListError::default(),
5986                    ),
5987                );
5988            }
5989            self.coin_deny_list_error_opt_mut().unwrap()
5990        }
5991        ///Sets `coin_deny_list_error` with the provided value.
5992        ///If any other oneof field in the same oneof is set, it will be cleared.
5993        pub fn set_coin_deny_list_error<T: Into<super::CoinDenyListError>>(
5994            &mut self,
5995            field: T,
5996        ) {
5997            self.error_details = Some(
5998                super::execution_error::ErrorDetails::CoinDenyListError(
5999                    field.into().into(),
6000                ),
6001            );
6002        }
6003        ///Sets `coin_deny_list_error` with the provided value.
6004        ///If any other oneof field in the same oneof is set, it will be cleared.
6005        pub fn with_coin_deny_list_error<T: Into<super::CoinDenyListError>>(
6006            mut self,
6007            field: T,
6008        ) -> Self {
6009            self.set_coin_deny_list_error(field.into());
6010            self
6011        }
6012        ///Returns the value of `congested_objects`, or the default value if `congested_objects` is unset.
6013        pub fn congested_objects(&self) -> &super::CongestedObjects {
6014            if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &self
6015                .error_details
6016            {
6017                field as _
6018            } else {
6019                super::CongestedObjects::default_instance() as _
6020            }
6021        }
6022        ///If `congested_objects` is set, returns [`Some`] with the value; otherwise returns [`None`].
6023        pub fn congested_objects_opt(&self) -> Option<&super::CongestedObjects> {
6024            if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &self
6025                .error_details
6026            {
6027                Some(field as _)
6028            } else {
6029                None
6030            }
6031        }
6032        ///If `congested_objects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6033        pub fn congested_objects_opt_mut(
6034            &mut self,
6035        ) -> Option<&mut super::CongestedObjects> {
6036            if let Some(super::execution_error::ErrorDetails::CongestedObjects(field)) = &mut self
6037                .error_details
6038            {
6039                Some(field as _)
6040            } else {
6041                None
6042            }
6043        }
6044        ///Returns a mutable reference to `congested_objects`.
6045        ///If the field is unset, it is first initialized with the default value.
6046        ///If any other oneof field in the same oneof is set, it will be cleared.
6047        pub fn congested_objects_mut(&mut self) -> &mut super::CongestedObjects {
6048            if self.congested_objects_opt_mut().is_none() {
6049                self.error_details = Some(
6050                    super::execution_error::ErrorDetails::CongestedObjects(
6051                        super::CongestedObjects::default(),
6052                    ),
6053                );
6054            }
6055            self.congested_objects_opt_mut().unwrap()
6056        }
6057        ///Sets `congested_objects` with the provided value.
6058        ///If any other oneof field in the same oneof is set, it will be cleared.
6059        pub fn set_congested_objects<T: Into<super::CongestedObjects>>(
6060            &mut self,
6061            field: T,
6062        ) {
6063            self.error_details = Some(
6064                super::execution_error::ErrorDetails::CongestedObjects(
6065                    field.into().into(),
6066                ),
6067            );
6068        }
6069        ///Sets `congested_objects` with the provided value.
6070        ///If any other oneof field in the same oneof is set, it will be cleared.
6071        pub fn with_congested_objects<T: Into<super::CongestedObjects>>(
6072            mut self,
6073            field: T,
6074        ) -> Self {
6075            self.set_congested_objects(field.into());
6076            self
6077        }
6078    }
6079    impl super::ExecutionStatus {
6080        pub const fn const_default() -> Self {
6081            Self { success: None, error: None }
6082        }
6083        #[doc(hidden)]
6084        pub fn default_instance() -> &'static Self {
6085            static DEFAULT: super::ExecutionStatus = super::ExecutionStatus::const_default();
6086            &DEFAULT
6087        }
6088        ///If `success` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6089        pub fn success_opt_mut(&mut self) -> Option<&mut bool> {
6090            self.success.as_mut().map(|field| field as _)
6091        }
6092        ///Returns a mutable reference to `success`.
6093        ///If the field is unset, it is first initialized with the default value.
6094        pub fn success_mut(&mut self) -> &mut bool {
6095            self.success.get_or_insert_default()
6096        }
6097        ///If `success` is set, returns [`Some`] with the value; otherwise returns [`None`].
6098        pub fn success_opt(&self) -> Option<bool> {
6099            self.success.as_ref().map(|field| *field)
6100        }
6101        ///Sets `success` with the provided value.
6102        pub fn set_success(&mut self, field: bool) {
6103            self.success = Some(field);
6104        }
6105        ///Sets `success` with the provided value.
6106        pub fn with_success(mut self, field: bool) -> Self {
6107            self.set_success(field);
6108            self
6109        }
6110        ///Returns the value of `error`, or the default value if `error` is unset.
6111        pub fn error(&self) -> &super::ExecutionError {
6112            self.error
6113                .as_ref()
6114                .map(|field| field as _)
6115                .unwrap_or_else(|| super::ExecutionError::default_instance() as _)
6116        }
6117        ///If `error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6118        pub fn error_opt_mut(&mut self) -> Option<&mut super::ExecutionError> {
6119            self.error.as_mut().map(|field| field as _)
6120        }
6121        ///Returns a mutable reference to `error`.
6122        ///If the field is unset, it is first initialized with the default value.
6123        pub fn error_mut(&mut self) -> &mut super::ExecutionError {
6124            self.error.get_or_insert_default()
6125        }
6126        ///If `error` is set, returns [`Some`] with the value; otherwise returns [`None`].
6127        pub fn error_opt(&self) -> Option<&super::ExecutionError> {
6128            self.error.as_ref().map(|field| field as _)
6129        }
6130        ///Sets `error` with the provided value.
6131        pub fn set_error<T: Into<super::ExecutionError>>(&mut self, field: T) {
6132            self.error = Some(field.into().into());
6133        }
6134        ///Sets `error` with the provided value.
6135        pub fn with_error<T: Into<super::ExecutionError>>(mut self, field: T) -> Self {
6136            self.set_error(field.into());
6137            self
6138        }
6139    }
6140    impl super::ExecutionTimeObservation {
6141        pub const fn const_default() -> Self {
6142            Self {
6143                kind: None,
6144                move_entry_point: None,
6145                validator_observations: Vec::new(),
6146            }
6147        }
6148        #[doc(hidden)]
6149        pub fn default_instance() -> &'static Self {
6150            static DEFAULT: super::ExecutionTimeObservation = super::ExecutionTimeObservation::const_default();
6151            &DEFAULT
6152        }
6153        ///Sets `kind` with the provided value.
6154        pub fn with_kind<
6155            T: Into<super::execution_time_observation::ExecutionTimeObservationKind>,
6156        >(mut self, field: T) -> Self {
6157            self.set_kind(field.into());
6158            self
6159        }
6160        ///Returns the value of `move_entry_point`, or the default value if `move_entry_point` is unset.
6161        pub fn move_entry_point(&self) -> &super::MoveCall {
6162            self.move_entry_point
6163                .as_ref()
6164                .map(|field| field as _)
6165                .unwrap_or_else(|| super::MoveCall::default_instance() as _)
6166        }
6167        ///If `move_entry_point` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6168        pub fn move_entry_point_opt_mut(&mut self) -> Option<&mut super::MoveCall> {
6169            self.move_entry_point.as_mut().map(|field| field as _)
6170        }
6171        ///Returns a mutable reference to `move_entry_point`.
6172        ///If the field is unset, it is first initialized with the default value.
6173        pub fn move_entry_point_mut(&mut self) -> &mut super::MoveCall {
6174            self.move_entry_point.get_or_insert_default()
6175        }
6176        ///If `move_entry_point` is set, returns [`Some`] with the value; otherwise returns [`None`].
6177        pub fn move_entry_point_opt(&self) -> Option<&super::MoveCall> {
6178            self.move_entry_point.as_ref().map(|field| field as _)
6179        }
6180        ///Sets `move_entry_point` with the provided value.
6181        pub fn set_move_entry_point<T: Into<super::MoveCall>>(&mut self, field: T) {
6182            self.move_entry_point = Some(field.into().into());
6183        }
6184        ///Sets `move_entry_point` with the provided value.
6185        pub fn with_move_entry_point<T: Into<super::MoveCall>>(
6186            mut self,
6187            field: T,
6188        ) -> Self {
6189            self.set_move_entry_point(field.into());
6190            self
6191        }
6192        ///Returns the value of `validator_observations`, or the default value if `validator_observations` is unset.
6193        pub fn validator_observations(
6194            &self,
6195        ) -> &[super::ValidatorExecutionTimeObservation] {
6196            &self.validator_observations
6197        }
6198        ///Returns a mutable reference to `validator_observations`.
6199        ///If the field is unset, it is first initialized with the default value.
6200        pub fn validator_observations_mut(
6201            &mut self,
6202        ) -> &mut Vec<super::ValidatorExecutionTimeObservation> {
6203            &mut self.validator_observations
6204        }
6205        ///Sets `validator_observations` with the provided value.
6206        pub fn set_validator_observations(
6207            &mut self,
6208            field: Vec<super::ValidatorExecutionTimeObservation>,
6209        ) {
6210            self.validator_observations = field;
6211        }
6212        ///Sets `validator_observations` with the provided value.
6213        pub fn with_validator_observations(
6214            mut self,
6215            field: Vec<super::ValidatorExecutionTimeObservation>,
6216        ) -> Self {
6217            self.set_validator_observations(field);
6218            self
6219        }
6220    }
6221    impl super::ExecutionTimeObservations {
6222        pub const fn const_default() -> Self {
6223            Self {
6224                version: None,
6225                observations: Vec::new(),
6226            }
6227        }
6228        #[doc(hidden)]
6229        pub fn default_instance() -> &'static Self {
6230            static DEFAULT: super::ExecutionTimeObservations = super::ExecutionTimeObservations::const_default();
6231            &DEFAULT
6232        }
6233        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6234        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
6235            self.version.as_mut().map(|field| field as _)
6236        }
6237        ///Returns a mutable reference to `version`.
6238        ///If the field is unset, it is first initialized with the default value.
6239        pub fn version_mut(&mut self) -> &mut i32 {
6240            self.version.get_or_insert_default()
6241        }
6242        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
6243        pub fn version_opt(&self) -> Option<i32> {
6244            self.version.as_ref().map(|field| *field)
6245        }
6246        ///Sets `version` with the provided value.
6247        pub fn set_version(&mut self, field: i32) {
6248            self.version = Some(field);
6249        }
6250        ///Sets `version` with the provided value.
6251        pub fn with_version(mut self, field: i32) -> Self {
6252            self.set_version(field);
6253            self
6254        }
6255        ///Returns the value of `observations`, or the default value if `observations` is unset.
6256        pub fn observations(&self) -> &[super::ExecutionTimeObservation] {
6257            &self.observations
6258        }
6259        ///Returns a mutable reference to `observations`.
6260        ///If the field is unset, it is first initialized with the default value.
6261        pub fn observations_mut(&mut self) -> &mut Vec<super::ExecutionTimeObservation> {
6262            &mut self.observations
6263        }
6264        ///Sets `observations` with the provided value.
6265        pub fn set_observations(&mut self, field: Vec<super::ExecutionTimeObservation>) {
6266            self.observations = field;
6267        }
6268        ///Sets `observations` with the provided value.
6269        pub fn with_observations(
6270            mut self,
6271            field: Vec<super::ExecutionTimeObservation>,
6272        ) -> Self {
6273            self.set_observations(field);
6274            self
6275        }
6276    }
6277    impl super::FieldDescriptor {
6278        pub const fn const_default() -> Self {
6279            Self {
6280                name: None,
6281                position: None,
6282                r#type: None,
6283            }
6284        }
6285        #[doc(hidden)]
6286        pub fn default_instance() -> &'static Self {
6287            static DEFAULT: super::FieldDescriptor = super::FieldDescriptor::const_default();
6288            &DEFAULT
6289        }
6290        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6291        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
6292            self.name.as_mut().map(|field| field as _)
6293        }
6294        ///Returns a mutable reference to `name`.
6295        ///If the field is unset, it is first initialized with the default value.
6296        pub fn name_mut(&mut self) -> &mut String {
6297            self.name.get_or_insert_default()
6298        }
6299        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
6300        pub fn name_opt(&self) -> Option<&str> {
6301            self.name.as_ref().map(|field| field as _)
6302        }
6303        ///Sets `name` with the provided value.
6304        pub fn set_name<T: Into<String>>(&mut self, field: T) {
6305            self.name = Some(field.into().into());
6306        }
6307        ///Sets `name` with the provided value.
6308        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
6309            self.set_name(field.into());
6310            self
6311        }
6312        ///If `position` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6313        pub fn position_opt_mut(&mut self) -> Option<&mut u32> {
6314            self.position.as_mut().map(|field| field as _)
6315        }
6316        ///Returns a mutable reference to `position`.
6317        ///If the field is unset, it is first initialized with the default value.
6318        pub fn position_mut(&mut self) -> &mut u32 {
6319            self.position.get_or_insert_default()
6320        }
6321        ///If `position` is set, returns [`Some`] with the value; otherwise returns [`None`].
6322        pub fn position_opt(&self) -> Option<u32> {
6323            self.position.as_ref().map(|field| *field)
6324        }
6325        ///Sets `position` with the provided value.
6326        pub fn set_position(&mut self, field: u32) {
6327            self.position = Some(field);
6328        }
6329        ///Sets `position` with the provided value.
6330        pub fn with_position(mut self, field: u32) -> Self {
6331            self.set_position(field);
6332            self
6333        }
6334        ///Returns the value of `r#type`, or the default value if `r#type` is unset.
6335        pub fn r#type(&self) -> &super::OpenSignatureBody {
6336            self.r#type
6337                .as_ref()
6338                .map(|field| field as _)
6339                .unwrap_or_else(|| super::OpenSignatureBody::default_instance() as _)
6340        }
6341        ///If `r#type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6342        pub fn type_opt_mut(&mut self) -> Option<&mut super::OpenSignatureBody> {
6343            self.r#type.as_mut().map(|field| field as _)
6344        }
6345        ///Returns a mutable reference to `r#type`.
6346        ///If the field is unset, it is first initialized with the default value.
6347        pub fn type_mut(&mut self) -> &mut super::OpenSignatureBody {
6348            self.r#type.get_or_insert_default()
6349        }
6350        ///If `r#type` is set, returns [`Some`] with the value; otherwise returns [`None`].
6351        pub fn type_opt(&self) -> Option<&super::OpenSignatureBody> {
6352            self.r#type.as_ref().map(|field| field as _)
6353        }
6354        ///Sets `r#type` with the provided value.
6355        pub fn set_type<T: Into<super::OpenSignatureBody>>(&mut self, field: T) {
6356            self.r#type = Some(field.into().into());
6357        }
6358        ///Sets `r#type` with the provided value.
6359        pub fn with_type<T: Into<super::OpenSignatureBody>>(mut self, field: T) -> Self {
6360            self.set_type(field.into());
6361            self
6362        }
6363    }
6364    impl super::FunctionDescriptor {
6365        pub const fn const_default() -> Self {
6366            Self {
6367                name: None,
6368                visibility: None,
6369                is_entry: None,
6370                type_parameters: Vec::new(),
6371                parameters: Vec::new(),
6372                returns: Vec::new(),
6373            }
6374        }
6375        #[doc(hidden)]
6376        pub fn default_instance() -> &'static Self {
6377            static DEFAULT: super::FunctionDescriptor = super::FunctionDescriptor::const_default();
6378            &DEFAULT
6379        }
6380        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6381        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
6382            self.name.as_mut().map(|field| field as _)
6383        }
6384        ///Returns a mutable reference to `name`.
6385        ///If the field is unset, it is first initialized with the default value.
6386        pub fn name_mut(&mut self) -> &mut String {
6387            self.name.get_or_insert_default()
6388        }
6389        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
6390        pub fn name_opt(&self) -> Option<&str> {
6391            self.name.as_ref().map(|field| field as _)
6392        }
6393        ///Sets `name` with the provided value.
6394        pub fn set_name<T: Into<String>>(&mut self, field: T) {
6395            self.name = Some(field.into().into());
6396        }
6397        ///Sets `name` with the provided value.
6398        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
6399            self.set_name(field.into());
6400            self
6401        }
6402        ///Sets `visibility` with the provided value.
6403        pub fn with_visibility<T: Into<super::function_descriptor::Visibility>>(
6404            mut self,
6405            field: T,
6406        ) -> Self {
6407            self.set_visibility(field.into());
6408            self
6409        }
6410        ///If `is_entry` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6411        pub fn is_entry_opt_mut(&mut self) -> Option<&mut bool> {
6412            self.is_entry.as_mut().map(|field| field as _)
6413        }
6414        ///Returns a mutable reference to `is_entry`.
6415        ///If the field is unset, it is first initialized with the default value.
6416        pub fn is_entry_mut(&mut self) -> &mut bool {
6417            self.is_entry.get_or_insert_default()
6418        }
6419        ///If `is_entry` is set, returns [`Some`] with the value; otherwise returns [`None`].
6420        pub fn is_entry_opt(&self) -> Option<bool> {
6421            self.is_entry.as_ref().map(|field| *field)
6422        }
6423        ///Sets `is_entry` with the provided value.
6424        pub fn set_is_entry(&mut self, field: bool) {
6425            self.is_entry = Some(field);
6426        }
6427        ///Sets `is_entry` with the provided value.
6428        pub fn with_is_entry(mut self, field: bool) -> Self {
6429            self.set_is_entry(field);
6430            self
6431        }
6432        ///Returns the value of `type_parameters`, or the default value if `type_parameters` is unset.
6433        pub fn type_parameters(&self) -> &[super::TypeParameter] {
6434            &self.type_parameters
6435        }
6436        ///Returns a mutable reference to `type_parameters`.
6437        ///If the field is unset, it is first initialized with the default value.
6438        pub fn type_parameters_mut(&mut self) -> &mut Vec<super::TypeParameter> {
6439            &mut self.type_parameters
6440        }
6441        ///Sets `type_parameters` with the provided value.
6442        pub fn set_type_parameters(&mut self, field: Vec<super::TypeParameter>) {
6443            self.type_parameters = field;
6444        }
6445        ///Sets `type_parameters` with the provided value.
6446        pub fn with_type_parameters(mut self, field: Vec<super::TypeParameter>) -> Self {
6447            self.set_type_parameters(field);
6448            self
6449        }
6450        ///Returns the value of `parameters`, or the default value if `parameters` is unset.
6451        pub fn parameters(&self) -> &[super::OpenSignature] {
6452            &self.parameters
6453        }
6454        ///Returns a mutable reference to `parameters`.
6455        ///If the field is unset, it is first initialized with the default value.
6456        pub fn parameters_mut(&mut self) -> &mut Vec<super::OpenSignature> {
6457            &mut self.parameters
6458        }
6459        ///Sets `parameters` with the provided value.
6460        pub fn set_parameters(&mut self, field: Vec<super::OpenSignature>) {
6461            self.parameters = field;
6462        }
6463        ///Sets `parameters` with the provided value.
6464        pub fn with_parameters(mut self, field: Vec<super::OpenSignature>) -> Self {
6465            self.set_parameters(field);
6466            self
6467        }
6468        ///Returns the value of `returns`, or the default value if `returns` is unset.
6469        pub fn returns(&self) -> &[super::OpenSignature] {
6470            &self.returns
6471        }
6472        ///Returns a mutable reference to `returns`.
6473        ///If the field is unset, it is first initialized with the default value.
6474        pub fn returns_mut(&mut self) -> &mut Vec<super::OpenSignature> {
6475            &mut self.returns
6476        }
6477        ///Sets `returns` with the provided value.
6478        pub fn set_returns(&mut self, field: Vec<super::OpenSignature>) {
6479            self.returns = field;
6480        }
6481        ///Sets `returns` with the provided value.
6482        pub fn with_returns(mut self, field: Vec<super::OpenSignature>) -> Self {
6483            self.set_returns(field);
6484            self
6485        }
6486    }
6487    impl super::FundsWithdrawal {
6488        pub const fn const_default() -> Self {
6489            Self {
6490                amount: None,
6491                coin_type: None,
6492                source: None,
6493            }
6494        }
6495        #[doc(hidden)]
6496        pub fn default_instance() -> &'static Self {
6497            static DEFAULT: super::FundsWithdrawal = super::FundsWithdrawal::const_default();
6498            &DEFAULT
6499        }
6500        ///If `amount` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6501        pub fn amount_opt_mut(&mut self) -> Option<&mut u64> {
6502            self.amount.as_mut().map(|field| field as _)
6503        }
6504        ///Returns a mutable reference to `amount`.
6505        ///If the field is unset, it is first initialized with the default value.
6506        pub fn amount_mut(&mut self) -> &mut u64 {
6507            self.amount.get_or_insert_default()
6508        }
6509        ///If `amount` is set, returns [`Some`] with the value; otherwise returns [`None`].
6510        pub fn amount_opt(&self) -> Option<u64> {
6511            self.amount.as_ref().map(|field| *field)
6512        }
6513        ///Sets `amount` with the provided value.
6514        pub fn set_amount(&mut self, field: u64) {
6515            self.amount = Some(field);
6516        }
6517        ///Sets `amount` with the provided value.
6518        pub fn with_amount(mut self, field: u64) -> Self {
6519            self.set_amount(field);
6520            self
6521        }
6522        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6523        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
6524            self.coin_type.as_mut().map(|field| field as _)
6525        }
6526        ///Returns a mutable reference to `coin_type`.
6527        ///If the field is unset, it is first initialized with the default value.
6528        pub fn coin_type_mut(&mut self) -> &mut String {
6529            self.coin_type.get_or_insert_default()
6530        }
6531        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
6532        pub fn coin_type_opt(&self) -> Option<&str> {
6533            self.coin_type.as_ref().map(|field| field as _)
6534        }
6535        ///Sets `coin_type` with the provided value.
6536        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
6537            self.coin_type = Some(field.into().into());
6538        }
6539        ///Sets `coin_type` with the provided value.
6540        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
6541            self.set_coin_type(field.into());
6542            self
6543        }
6544        ///Sets `source` with the provided value.
6545        pub fn with_source<T: Into<super::funds_withdrawal::Source>>(
6546            mut self,
6547            field: T,
6548        ) -> Self {
6549            self.set_source(field.into());
6550            self
6551        }
6552    }
6553    impl super::GasCostSummary {
6554        pub const fn const_default() -> Self {
6555            Self {
6556                computation_cost: None,
6557                storage_cost: None,
6558                storage_rebate: None,
6559                non_refundable_storage_fee: None,
6560            }
6561        }
6562        #[doc(hidden)]
6563        pub fn default_instance() -> &'static Self {
6564            static DEFAULT: super::GasCostSummary = super::GasCostSummary::const_default();
6565            &DEFAULT
6566        }
6567        ///If `computation_cost` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6568        pub fn computation_cost_opt_mut(&mut self) -> Option<&mut u64> {
6569            self.computation_cost.as_mut().map(|field| field as _)
6570        }
6571        ///Returns a mutable reference to `computation_cost`.
6572        ///If the field is unset, it is first initialized with the default value.
6573        pub fn computation_cost_mut(&mut self) -> &mut u64 {
6574            self.computation_cost.get_or_insert_default()
6575        }
6576        ///If `computation_cost` is set, returns [`Some`] with the value; otherwise returns [`None`].
6577        pub fn computation_cost_opt(&self) -> Option<u64> {
6578            self.computation_cost.as_ref().map(|field| *field)
6579        }
6580        ///Sets `computation_cost` with the provided value.
6581        pub fn set_computation_cost(&mut self, field: u64) {
6582            self.computation_cost = Some(field);
6583        }
6584        ///Sets `computation_cost` with the provided value.
6585        pub fn with_computation_cost(mut self, field: u64) -> Self {
6586            self.set_computation_cost(field);
6587            self
6588        }
6589        ///If `storage_cost` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6590        pub fn storage_cost_opt_mut(&mut self) -> Option<&mut u64> {
6591            self.storage_cost.as_mut().map(|field| field as _)
6592        }
6593        ///Returns a mutable reference to `storage_cost`.
6594        ///If the field is unset, it is first initialized with the default value.
6595        pub fn storage_cost_mut(&mut self) -> &mut u64 {
6596            self.storage_cost.get_or_insert_default()
6597        }
6598        ///If `storage_cost` is set, returns [`Some`] with the value; otherwise returns [`None`].
6599        pub fn storage_cost_opt(&self) -> Option<u64> {
6600            self.storage_cost.as_ref().map(|field| *field)
6601        }
6602        ///Sets `storage_cost` with the provided value.
6603        pub fn set_storage_cost(&mut self, field: u64) {
6604            self.storage_cost = Some(field);
6605        }
6606        ///Sets `storage_cost` with the provided value.
6607        pub fn with_storage_cost(mut self, field: u64) -> Self {
6608            self.set_storage_cost(field);
6609            self
6610        }
6611        ///If `storage_rebate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6612        pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
6613            self.storage_rebate.as_mut().map(|field| field as _)
6614        }
6615        ///Returns a mutable reference to `storage_rebate`.
6616        ///If the field is unset, it is first initialized with the default value.
6617        pub fn storage_rebate_mut(&mut self) -> &mut u64 {
6618            self.storage_rebate.get_or_insert_default()
6619        }
6620        ///If `storage_rebate` is set, returns [`Some`] with the value; otherwise returns [`None`].
6621        pub fn storage_rebate_opt(&self) -> Option<u64> {
6622            self.storage_rebate.as_ref().map(|field| *field)
6623        }
6624        ///Sets `storage_rebate` with the provided value.
6625        pub fn set_storage_rebate(&mut self, field: u64) {
6626            self.storage_rebate = Some(field);
6627        }
6628        ///Sets `storage_rebate` with the provided value.
6629        pub fn with_storage_rebate(mut self, field: u64) -> Self {
6630            self.set_storage_rebate(field);
6631            self
6632        }
6633        ///If `non_refundable_storage_fee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6634        pub fn non_refundable_storage_fee_opt_mut(&mut self) -> Option<&mut u64> {
6635            self.non_refundable_storage_fee.as_mut().map(|field| field as _)
6636        }
6637        ///Returns a mutable reference to `non_refundable_storage_fee`.
6638        ///If the field is unset, it is first initialized with the default value.
6639        pub fn non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
6640            self.non_refundable_storage_fee.get_or_insert_default()
6641        }
6642        ///If `non_refundable_storage_fee` is set, returns [`Some`] with the value; otherwise returns [`None`].
6643        pub fn non_refundable_storage_fee_opt(&self) -> Option<u64> {
6644            self.non_refundable_storage_fee.as_ref().map(|field| *field)
6645        }
6646        ///Sets `non_refundable_storage_fee` with the provided value.
6647        pub fn set_non_refundable_storage_fee(&mut self, field: u64) {
6648            self.non_refundable_storage_fee = Some(field);
6649        }
6650        ///Sets `non_refundable_storage_fee` with the provided value.
6651        pub fn with_non_refundable_storage_fee(mut self, field: u64) -> Self {
6652            self.set_non_refundable_storage_fee(field);
6653            self
6654        }
6655    }
6656    impl super::GasPayment {
6657        pub const fn const_default() -> Self {
6658            Self {
6659                objects: Vec::new(),
6660                owner: None,
6661                price: None,
6662                budget: None,
6663            }
6664        }
6665        #[doc(hidden)]
6666        pub fn default_instance() -> &'static Self {
6667            static DEFAULT: super::GasPayment = super::GasPayment::const_default();
6668            &DEFAULT
6669        }
6670        ///Returns the value of `objects`, or the default value if `objects` is unset.
6671        pub fn objects(&self) -> &[super::ObjectReference] {
6672            &self.objects
6673        }
6674        ///Returns a mutable reference to `objects`.
6675        ///If the field is unset, it is first initialized with the default value.
6676        pub fn objects_mut(&mut self) -> &mut Vec<super::ObjectReference> {
6677            &mut self.objects
6678        }
6679        ///Sets `objects` with the provided value.
6680        pub fn set_objects(&mut self, field: Vec<super::ObjectReference>) {
6681            self.objects = field;
6682        }
6683        ///Sets `objects` with the provided value.
6684        pub fn with_objects(mut self, field: Vec<super::ObjectReference>) -> Self {
6685            self.set_objects(field);
6686            self
6687        }
6688        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6689        pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
6690            self.owner.as_mut().map(|field| field as _)
6691        }
6692        ///Returns a mutable reference to `owner`.
6693        ///If the field is unset, it is first initialized with the default value.
6694        pub fn owner_mut(&mut self) -> &mut String {
6695            self.owner.get_or_insert_default()
6696        }
6697        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
6698        pub fn owner_opt(&self) -> Option<&str> {
6699            self.owner.as_ref().map(|field| field as _)
6700        }
6701        ///Sets `owner` with the provided value.
6702        pub fn set_owner<T: Into<String>>(&mut self, field: T) {
6703            self.owner = Some(field.into().into());
6704        }
6705        ///Sets `owner` with the provided value.
6706        pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
6707            self.set_owner(field.into());
6708            self
6709        }
6710        ///If `price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6711        pub fn price_opt_mut(&mut self) -> Option<&mut u64> {
6712            self.price.as_mut().map(|field| field as _)
6713        }
6714        ///Returns a mutable reference to `price`.
6715        ///If the field is unset, it is first initialized with the default value.
6716        pub fn price_mut(&mut self) -> &mut u64 {
6717            self.price.get_or_insert_default()
6718        }
6719        ///If `price` is set, returns [`Some`] with the value; otherwise returns [`None`].
6720        pub fn price_opt(&self) -> Option<u64> {
6721            self.price.as_ref().map(|field| *field)
6722        }
6723        ///Sets `price` with the provided value.
6724        pub fn set_price(&mut self, field: u64) {
6725            self.price = Some(field);
6726        }
6727        ///Sets `price` with the provided value.
6728        pub fn with_price(mut self, field: u64) -> Self {
6729            self.set_price(field);
6730            self
6731        }
6732        ///If `budget` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6733        pub fn budget_opt_mut(&mut self) -> Option<&mut u64> {
6734            self.budget.as_mut().map(|field| field as _)
6735        }
6736        ///Returns a mutable reference to `budget`.
6737        ///If the field is unset, it is first initialized with the default value.
6738        pub fn budget_mut(&mut self) -> &mut u64 {
6739            self.budget.get_or_insert_default()
6740        }
6741        ///If `budget` is set, returns [`Some`] with the value; otherwise returns [`None`].
6742        pub fn budget_opt(&self) -> Option<u64> {
6743            self.budget.as_ref().map(|field| *field)
6744        }
6745        ///Sets `budget` with the provided value.
6746        pub fn set_budget(&mut self, field: u64) {
6747            self.budget = Some(field);
6748        }
6749        ///Sets `budget` with the provided value.
6750        pub fn with_budget(mut self, field: u64) -> Self {
6751            self.set_budget(field);
6752            self
6753        }
6754    }
6755    impl super::GenesisTransaction {
6756        pub const fn const_default() -> Self {
6757            Self { objects: Vec::new() }
6758        }
6759        #[doc(hidden)]
6760        pub fn default_instance() -> &'static Self {
6761            static DEFAULT: super::GenesisTransaction = super::GenesisTransaction::const_default();
6762            &DEFAULT
6763        }
6764        ///Returns the value of `objects`, or the default value if `objects` is unset.
6765        pub fn objects(&self) -> &[super::Object] {
6766            &self.objects
6767        }
6768        ///Returns a mutable reference to `objects`.
6769        ///If the field is unset, it is first initialized with the default value.
6770        pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
6771            &mut self.objects
6772        }
6773        ///Sets `objects` with the provided value.
6774        pub fn set_objects(&mut self, field: Vec<super::Object>) {
6775            self.objects = field;
6776        }
6777        ///Sets `objects` with the provided value.
6778        pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
6779            self.set_objects(field);
6780            self
6781        }
6782    }
6783    impl super::GetBalanceRequest {
6784        pub const fn const_default() -> Self {
6785            Self {
6786                owner: None,
6787                coin_type: None,
6788            }
6789        }
6790        #[doc(hidden)]
6791        pub fn default_instance() -> &'static Self {
6792            static DEFAULT: super::GetBalanceRequest = super::GetBalanceRequest::const_default();
6793            &DEFAULT
6794        }
6795        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6796        pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
6797            self.owner.as_mut().map(|field| field as _)
6798        }
6799        ///Returns a mutable reference to `owner`.
6800        ///If the field is unset, it is first initialized with the default value.
6801        pub fn owner_mut(&mut self) -> &mut String {
6802            self.owner.get_or_insert_default()
6803        }
6804        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
6805        pub fn owner_opt(&self) -> Option<&str> {
6806            self.owner.as_ref().map(|field| field as _)
6807        }
6808        ///Sets `owner` with the provided value.
6809        pub fn set_owner<T: Into<String>>(&mut self, field: T) {
6810            self.owner = Some(field.into().into());
6811        }
6812        ///Sets `owner` with the provided value.
6813        pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
6814            self.set_owner(field.into());
6815            self
6816        }
6817        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6818        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
6819            self.coin_type.as_mut().map(|field| field as _)
6820        }
6821        ///Returns a mutable reference to `coin_type`.
6822        ///If the field is unset, it is first initialized with the default value.
6823        pub fn coin_type_mut(&mut self) -> &mut String {
6824            self.coin_type.get_or_insert_default()
6825        }
6826        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
6827        pub fn coin_type_opt(&self) -> Option<&str> {
6828            self.coin_type.as_ref().map(|field| field as _)
6829        }
6830        ///Sets `coin_type` with the provided value.
6831        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
6832            self.coin_type = Some(field.into().into());
6833        }
6834        ///Sets `coin_type` with the provided value.
6835        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
6836            self.set_coin_type(field.into());
6837            self
6838        }
6839    }
6840    impl super::GetBalanceResponse {
6841        pub const fn const_default() -> Self {
6842            Self { balance: None }
6843        }
6844        #[doc(hidden)]
6845        pub fn default_instance() -> &'static Self {
6846            static DEFAULT: super::GetBalanceResponse = super::GetBalanceResponse::const_default();
6847            &DEFAULT
6848        }
6849        ///Returns the value of `balance`, or the default value if `balance` is unset.
6850        pub fn balance(&self) -> &super::Balance {
6851            self.balance
6852                .as_ref()
6853                .map(|field| field as _)
6854                .unwrap_or_else(|| super::Balance::default_instance() as _)
6855        }
6856        ///If `balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6857        pub fn balance_opt_mut(&mut self) -> Option<&mut super::Balance> {
6858            self.balance.as_mut().map(|field| field as _)
6859        }
6860        ///Returns a mutable reference to `balance`.
6861        ///If the field is unset, it is first initialized with the default value.
6862        pub fn balance_mut(&mut self) -> &mut super::Balance {
6863            self.balance.get_or_insert_default()
6864        }
6865        ///If `balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
6866        pub fn balance_opt(&self) -> Option<&super::Balance> {
6867            self.balance.as_ref().map(|field| field as _)
6868        }
6869        ///Sets `balance` with the provided value.
6870        pub fn set_balance<T: Into<super::Balance>>(&mut self, field: T) {
6871            self.balance = Some(field.into().into());
6872        }
6873        ///Sets `balance` with the provided value.
6874        pub fn with_balance<T: Into<super::Balance>>(mut self, field: T) -> Self {
6875            self.set_balance(field.into());
6876            self
6877        }
6878    }
6879    impl super::GetCheckpointRequest {
6880        pub const fn const_default() -> Self {
6881            Self {
6882                read_mask: None,
6883                checkpoint_id: None,
6884            }
6885        }
6886        #[doc(hidden)]
6887        pub fn default_instance() -> &'static Self {
6888            static DEFAULT: super::GetCheckpointRequest = super::GetCheckpointRequest::const_default();
6889            &DEFAULT
6890        }
6891        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6892        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
6893            self.read_mask.as_mut().map(|field| field as _)
6894        }
6895        ///Returns a mutable reference to `read_mask`.
6896        ///If the field is unset, it is first initialized with the default value.
6897        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
6898            self.read_mask.get_or_insert_default()
6899        }
6900        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
6901        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
6902            self.read_mask.as_ref().map(|field| field as _)
6903        }
6904        ///Sets `read_mask` with the provided value.
6905        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
6906            self.read_mask = Some(field.into().into());
6907        }
6908        ///Sets `read_mask` with the provided value.
6909        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
6910            mut self,
6911            field: T,
6912        ) -> Self {
6913            self.set_read_mask(field.into());
6914            self
6915        }
6916        ///Returns the value of `sequence_number`, or the default value if `sequence_number` is unset.
6917        pub fn sequence_number(&self) -> u64 {
6918            if let Some(
6919                super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
6920            ) = &self.checkpoint_id
6921            {
6922                *field
6923            } else {
6924                0u64
6925            }
6926        }
6927        ///If `sequence_number` is set, returns [`Some`] with the value; otherwise returns [`None`].
6928        pub fn sequence_number_opt(&self) -> Option<u64> {
6929            if let Some(
6930                super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
6931            ) = &self.checkpoint_id
6932            {
6933                Some(*field)
6934            } else {
6935                None
6936            }
6937        }
6938        ///If `sequence_number` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6939        pub fn sequence_number_opt_mut(&mut self) -> Option<&mut u64> {
6940            if let Some(
6941                super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
6942            ) = &mut self.checkpoint_id
6943            {
6944                Some(field as _)
6945            } else {
6946                None
6947            }
6948        }
6949        ///Returns a mutable reference to `sequence_number`.
6950        ///If the field is unset, it is first initialized with the default value.
6951        ///If any other oneof field in the same oneof is set, it will be cleared.
6952        pub fn sequence_number_mut(&mut self) -> &mut u64 {
6953            if self.sequence_number_opt_mut().is_none() {
6954                self.checkpoint_id = Some(
6955                    super::get_checkpoint_request::CheckpointId::SequenceNumber(
6956                        u64::default(),
6957                    ),
6958                );
6959            }
6960            self.sequence_number_opt_mut().unwrap()
6961        }
6962        ///Sets `sequence_number` with the provided value.
6963        ///If any other oneof field in the same oneof is set, it will be cleared.
6964        pub fn set_sequence_number(&mut self, field: u64) {
6965            self.checkpoint_id = Some(
6966                super::get_checkpoint_request::CheckpointId::SequenceNumber(field),
6967            );
6968        }
6969        ///Sets `sequence_number` with the provided value.
6970        ///If any other oneof field in the same oneof is set, it will be cleared.
6971        pub fn with_sequence_number(mut self, field: u64) -> Self {
6972            self.set_sequence_number(field);
6973            self
6974        }
6975        ///Returns the value of `digest`, or the default value if `digest` is unset.
6976        pub fn digest(&self) -> &str {
6977            if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &self
6978                .checkpoint_id
6979            {
6980                field as _
6981            } else {
6982                ""
6983            }
6984        }
6985        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
6986        pub fn digest_opt(&self) -> Option<&str> {
6987            if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &self
6988                .checkpoint_id
6989            {
6990                Some(field as _)
6991            } else {
6992                None
6993            }
6994        }
6995        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
6996        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
6997            if let Some(super::get_checkpoint_request::CheckpointId::Digest(field)) = &mut self
6998                .checkpoint_id
6999            {
7000                Some(field as _)
7001            } else {
7002                None
7003            }
7004        }
7005        ///Returns a mutable reference to `digest`.
7006        ///If the field is unset, it is first initialized with the default value.
7007        ///If any other oneof field in the same oneof is set, it will be cleared.
7008        pub fn digest_mut(&mut self) -> &mut String {
7009            if self.digest_opt_mut().is_none() {
7010                self.checkpoint_id = Some(
7011                    super::get_checkpoint_request::CheckpointId::Digest(
7012                        String::default(),
7013                    ),
7014                );
7015            }
7016            self.digest_opt_mut().unwrap()
7017        }
7018        ///Sets `digest` with the provided value.
7019        ///If any other oneof field in the same oneof is set, it will be cleared.
7020        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
7021            self.checkpoint_id = Some(
7022                super::get_checkpoint_request::CheckpointId::Digest(field.into().into()),
7023            );
7024        }
7025        ///Sets `digest` with the provided value.
7026        ///If any other oneof field in the same oneof is set, it will be cleared.
7027        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
7028            self.set_digest(field.into());
7029            self
7030        }
7031    }
7032    impl super::GetCheckpointResponse {
7033        pub const fn const_default() -> Self {
7034            Self { checkpoint: None }
7035        }
7036        #[doc(hidden)]
7037        pub fn default_instance() -> &'static Self {
7038            static DEFAULT: super::GetCheckpointResponse = super::GetCheckpointResponse::const_default();
7039            &DEFAULT
7040        }
7041        ///Returns the value of `checkpoint`, or the default value if `checkpoint` is unset.
7042        pub fn checkpoint(&self) -> &super::Checkpoint {
7043            self.checkpoint
7044                .as_ref()
7045                .map(|field| field as _)
7046                .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
7047        }
7048        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7049        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
7050            self.checkpoint.as_mut().map(|field| field as _)
7051        }
7052        ///Returns a mutable reference to `checkpoint`.
7053        ///If the field is unset, it is first initialized with the default value.
7054        pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
7055            self.checkpoint.get_or_insert_default()
7056        }
7057        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
7058        pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
7059            self.checkpoint.as_ref().map(|field| field as _)
7060        }
7061        ///Sets `checkpoint` with the provided value.
7062        pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
7063            self.checkpoint = Some(field.into().into());
7064        }
7065        ///Sets `checkpoint` with the provided value.
7066        pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
7067            self.set_checkpoint(field.into());
7068            self
7069        }
7070    }
7071    impl super::GetCoinInfoRequest {
7072        pub const fn const_default() -> Self {
7073            Self { coin_type: None }
7074        }
7075        #[doc(hidden)]
7076        pub fn default_instance() -> &'static Self {
7077            static DEFAULT: super::GetCoinInfoRequest = super::GetCoinInfoRequest::const_default();
7078            &DEFAULT
7079        }
7080        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7081        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
7082            self.coin_type.as_mut().map(|field| field as _)
7083        }
7084        ///Returns a mutable reference to `coin_type`.
7085        ///If the field is unset, it is first initialized with the default value.
7086        pub fn coin_type_mut(&mut self) -> &mut String {
7087            self.coin_type.get_or_insert_default()
7088        }
7089        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
7090        pub fn coin_type_opt(&self) -> Option<&str> {
7091            self.coin_type.as_ref().map(|field| field as _)
7092        }
7093        ///Sets `coin_type` with the provided value.
7094        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
7095            self.coin_type = Some(field.into().into());
7096        }
7097        ///Sets `coin_type` with the provided value.
7098        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
7099            self.set_coin_type(field.into());
7100            self
7101        }
7102    }
7103    impl super::GetCoinInfoResponse {
7104        pub const fn const_default() -> Self {
7105            Self {
7106                coin_type: None,
7107                metadata: None,
7108                treasury: None,
7109                regulated_metadata: None,
7110            }
7111        }
7112        #[doc(hidden)]
7113        pub fn default_instance() -> &'static Self {
7114            static DEFAULT: super::GetCoinInfoResponse = super::GetCoinInfoResponse::const_default();
7115            &DEFAULT
7116        }
7117        ///If `coin_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7118        pub fn coin_type_opt_mut(&mut self) -> Option<&mut String> {
7119            self.coin_type.as_mut().map(|field| field as _)
7120        }
7121        ///Returns a mutable reference to `coin_type`.
7122        ///If the field is unset, it is first initialized with the default value.
7123        pub fn coin_type_mut(&mut self) -> &mut String {
7124            self.coin_type.get_or_insert_default()
7125        }
7126        ///If `coin_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
7127        pub fn coin_type_opt(&self) -> Option<&str> {
7128            self.coin_type.as_ref().map(|field| field as _)
7129        }
7130        ///Sets `coin_type` with the provided value.
7131        pub fn set_coin_type<T: Into<String>>(&mut self, field: T) {
7132            self.coin_type = Some(field.into().into());
7133        }
7134        ///Sets `coin_type` with the provided value.
7135        pub fn with_coin_type<T: Into<String>>(mut self, field: T) -> Self {
7136            self.set_coin_type(field.into());
7137            self
7138        }
7139        ///Returns the value of `metadata`, or the default value if `metadata` is unset.
7140        pub fn metadata(&self) -> &super::CoinMetadata {
7141            self.metadata
7142                .as_ref()
7143                .map(|field| field as _)
7144                .unwrap_or_else(|| super::CoinMetadata::default_instance() as _)
7145        }
7146        ///If `metadata` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7147        pub fn metadata_opt_mut(&mut self) -> Option<&mut super::CoinMetadata> {
7148            self.metadata.as_mut().map(|field| field as _)
7149        }
7150        ///Returns a mutable reference to `metadata`.
7151        ///If the field is unset, it is first initialized with the default value.
7152        pub fn metadata_mut(&mut self) -> &mut super::CoinMetadata {
7153            self.metadata.get_or_insert_default()
7154        }
7155        ///If `metadata` is set, returns [`Some`] with the value; otherwise returns [`None`].
7156        pub fn metadata_opt(&self) -> Option<&super::CoinMetadata> {
7157            self.metadata.as_ref().map(|field| field as _)
7158        }
7159        ///Sets `metadata` with the provided value.
7160        pub fn set_metadata<T: Into<super::CoinMetadata>>(&mut self, field: T) {
7161            self.metadata = Some(field.into().into());
7162        }
7163        ///Sets `metadata` with the provided value.
7164        pub fn with_metadata<T: Into<super::CoinMetadata>>(mut self, field: T) -> Self {
7165            self.set_metadata(field.into());
7166            self
7167        }
7168        ///Returns the value of `treasury`, or the default value if `treasury` is unset.
7169        pub fn treasury(&self) -> &super::CoinTreasury {
7170            self.treasury
7171                .as_ref()
7172                .map(|field| field as _)
7173                .unwrap_or_else(|| super::CoinTreasury::default_instance() as _)
7174        }
7175        ///If `treasury` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7176        pub fn treasury_opt_mut(&mut self) -> Option<&mut super::CoinTreasury> {
7177            self.treasury.as_mut().map(|field| field as _)
7178        }
7179        ///Returns a mutable reference to `treasury`.
7180        ///If the field is unset, it is first initialized with the default value.
7181        pub fn treasury_mut(&mut self) -> &mut super::CoinTreasury {
7182            self.treasury.get_or_insert_default()
7183        }
7184        ///If `treasury` is set, returns [`Some`] with the value; otherwise returns [`None`].
7185        pub fn treasury_opt(&self) -> Option<&super::CoinTreasury> {
7186            self.treasury.as_ref().map(|field| field as _)
7187        }
7188        ///Sets `treasury` with the provided value.
7189        pub fn set_treasury<T: Into<super::CoinTreasury>>(&mut self, field: T) {
7190            self.treasury = Some(field.into().into());
7191        }
7192        ///Sets `treasury` with the provided value.
7193        pub fn with_treasury<T: Into<super::CoinTreasury>>(mut self, field: T) -> Self {
7194            self.set_treasury(field.into());
7195            self
7196        }
7197        ///Returns the value of `regulated_metadata`, or the default value if `regulated_metadata` is unset.
7198        pub fn regulated_metadata(&self) -> &super::RegulatedCoinMetadata {
7199            self.regulated_metadata
7200                .as_ref()
7201                .map(|field| field as _)
7202                .unwrap_or_else(|| super::RegulatedCoinMetadata::default_instance() as _)
7203        }
7204        ///If `regulated_metadata` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7205        pub fn regulated_metadata_opt_mut(
7206            &mut self,
7207        ) -> Option<&mut super::RegulatedCoinMetadata> {
7208            self.regulated_metadata.as_mut().map(|field| field as _)
7209        }
7210        ///Returns a mutable reference to `regulated_metadata`.
7211        ///If the field is unset, it is first initialized with the default value.
7212        pub fn regulated_metadata_mut(&mut self) -> &mut super::RegulatedCoinMetadata {
7213            self.regulated_metadata.get_or_insert_default()
7214        }
7215        ///If `regulated_metadata` is set, returns [`Some`] with the value; otherwise returns [`None`].
7216        pub fn regulated_metadata_opt(&self) -> Option<&super::RegulatedCoinMetadata> {
7217            self.regulated_metadata.as_ref().map(|field| field as _)
7218        }
7219        ///Sets `regulated_metadata` with the provided value.
7220        pub fn set_regulated_metadata<T: Into<super::RegulatedCoinMetadata>>(
7221            &mut self,
7222            field: T,
7223        ) {
7224            self.regulated_metadata = Some(field.into().into());
7225        }
7226        ///Sets `regulated_metadata` with the provided value.
7227        pub fn with_regulated_metadata<T: Into<super::RegulatedCoinMetadata>>(
7228            mut self,
7229            field: T,
7230        ) -> Self {
7231            self.set_regulated_metadata(field.into());
7232            self
7233        }
7234    }
7235    impl super::GetDatatypeRequest {
7236        pub const fn const_default() -> Self {
7237            Self {
7238                package_id: None,
7239                module_name: None,
7240                name: None,
7241            }
7242        }
7243        #[doc(hidden)]
7244        pub fn default_instance() -> &'static Self {
7245            static DEFAULT: super::GetDatatypeRequest = super::GetDatatypeRequest::const_default();
7246            &DEFAULT
7247        }
7248        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7249        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
7250            self.package_id.as_mut().map(|field| field as _)
7251        }
7252        ///Returns a mutable reference to `package_id`.
7253        ///If the field is unset, it is first initialized with the default value.
7254        pub fn package_id_mut(&mut self) -> &mut String {
7255            self.package_id.get_or_insert_default()
7256        }
7257        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
7258        pub fn package_id_opt(&self) -> Option<&str> {
7259            self.package_id.as_ref().map(|field| field as _)
7260        }
7261        ///Sets `package_id` with the provided value.
7262        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
7263            self.package_id = Some(field.into().into());
7264        }
7265        ///Sets `package_id` with the provided value.
7266        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
7267            self.set_package_id(field.into());
7268            self
7269        }
7270        ///If `module_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7271        pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
7272            self.module_name.as_mut().map(|field| field as _)
7273        }
7274        ///Returns a mutable reference to `module_name`.
7275        ///If the field is unset, it is first initialized with the default value.
7276        pub fn module_name_mut(&mut self) -> &mut String {
7277            self.module_name.get_or_insert_default()
7278        }
7279        ///If `module_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
7280        pub fn module_name_opt(&self) -> Option<&str> {
7281            self.module_name.as_ref().map(|field| field as _)
7282        }
7283        ///Sets `module_name` with the provided value.
7284        pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
7285            self.module_name = Some(field.into().into());
7286        }
7287        ///Sets `module_name` with the provided value.
7288        pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
7289            self.set_module_name(field.into());
7290            self
7291        }
7292        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7293        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
7294            self.name.as_mut().map(|field| field as _)
7295        }
7296        ///Returns a mutable reference to `name`.
7297        ///If the field is unset, it is first initialized with the default value.
7298        pub fn name_mut(&mut self) -> &mut String {
7299            self.name.get_or_insert_default()
7300        }
7301        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
7302        pub fn name_opt(&self) -> Option<&str> {
7303            self.name.as_ref().map(|field| field as _)
7304        }
7305        ///Sets `name` with the provided value.
7306        pub fn set_name<T: Into<String>>(&mut self, field: T) {
7307            self.name = Some(field.into().into());
7308        }
7309        ///Sets `name` with the provided value.
7310        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
7311            self.set_name(field.into());
7312            self
7313        }
7314    }
7315    impl super::GetDatatypeResponse {
7316        pub const fn const_default() -> Self {
7317            Self { datatype: None }
7318        }
7319        #[doc(hidden)]
7320        pub fn default_instance() -> &'static Self {
7321            static DEFAULT: super::GetDatatypeResponse = super::GetDatatypeResponse::const_default();
7322            &DEFAULT
7323        }
7324        ///Returns the value of `datatype`, or the default value if `datatype` is unset.
7325        pub fn datatype(&self) -> &super::DatatypeDescriptor {
7326            self.datatype
7327                .as_ref()
7328                .map(|field| field as _)
7329                .unwrap_or_else(|| super::DatatypeDescriptor::default_instance() as _)
7330        }
7331        ///If `datatype` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7332        pub fn datatype_opt_mut(&mut self) -> Option<&mut super::DatatypeDescriptor> {
7333            self.datatype.as_mut().map(|field| field as _)
7334        }
7335        ///Returns a mutable reference to `datatype`.
7336        ///If the field is unset, it is first initialized with the default value.
7337        pub fn datatype_mut(&mut self) -> &mut super::DatatypeDescriptor {
7338            self.datatype.get_or_insert_default()
7339        }
7340        ///If `datatype` is set, returns [`Some`] with the value; otherwise returns [`None`].
7341        pub fn datatype_opt(&self) -> Option<&super::DatatypeDescriptor> {
7342            self.datatype.as_ref().map(|field| field as _)
7343        }
7344        ///Sets `datatype` with the provided value.
7345        pub fn set_datatype<T: Into<super::DatatypeDescriptor>>(&mut self, field: T) {
7346            self.datatype = Some(field.into().into());
7347        }
7348        ///Sets `datatype` with the provided value.
7349        pub fn with_datatype<T: Into<super::DatatypeDescriptor>>(
7350            mut self,
7351            field: T,
7352        ) -> Self {
7353            self.set_datatype(field.into());
7354            self
7355        }
7356    }
7357    impl super::GetEpochRequest {
7358        pub const fn const_default() -> Self {
7359            Self {
7360                epoch: None,
7361                read_mask: None,
7362            }
7363        }
7364        #[doc(hidden)]
7365        pub fn default_instance() -> &'static Self {
7366            static DEFAULT: super::GetEpochRequest = super::GetEpochRequest::const_default();
7367            &DEFAULT
7368        }
7369        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7370        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
7371            self.epoch.as_mut().map(|field| field as _)
7372        }
7373        ///Returns a mutable reference to `epoch`.
7374        ///If the field is unset, it is first initialized with the default value.
7375        pub fn epoch_mut(&mut self) -> &mut u64 {
7376            self.epoch.get_or_insert_default()
7377        }
7378        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
7379        pub fn epoch_opt(&self) -> Option<u64> {
7380            self.epoch.as_ref().map(|field| *field)
7381        }
7382        ///Sets `epoch` with the provided value.
7383        pub fn set_epoch(&mut self, field: u64) {
7384            self.epoch = Some(field);
7385        }
7386        ///Sets `epoch` with the provided value.
7387        pub fn with_epoch(mut self, field: u64) -> Self {
7388            self.set_epoch(field);
7389            self
7390        }
7391        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7392        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
7393            self.read_mask.as_mut().map(|field| field as _)
7394        }
7395        ///Returns a mutable reference to `read_mask`.
7396        ///If the field is unset, it is first initialized with the default value.
7397        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
7398            self.read_mask.get_or_insert_default()
7399        }
7400        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
7401        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
7402            self.read_mask.as_ref().map(|field| field as _)
7403        }
7404        ///Sets `read_mask` with the provided value.
7405        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
7406            self.read_mask = Some(field.into().into());
7407        }
7408        ///Sets `read_mask` with the provided value.
7409        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
7410            mut self,
7411            field: T,
7412        ) -> Self {
7413            self.set_read_mask(field.into());
7414            self
7415        }
7416    }
7417    impl super::GetEpochResponse {
7418        pub const fn const_default() -> Self {
7419            Self { epoch: None }
7420        }
7421        #[doc(hidden)]
7422        pub fn default_instance() -> &'static Self {
7423            static DEFAULT: super::GetEpochResponse = super::GetEpochResponse::const_default();
7424            &DEFAULT
7425        }
7426        ///Returns the value of `epoch`, or the default value if `epoch` is unset.
7427        pub fn epoch(&self) -> &super::Epoch {
7428            self.epoch
7429                .as_ref()
7430                .map(|field| field as _)
7431                .unwrap_or_else(|| super::Epoch::default_instance() as _)
7432        }
7433        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7434        pub fn epoch_opt_mut(&mut self) -> Option<&mut super::Epoch> {
7435            self.epoch.as_mut().map(|field| field as _)
7436        }
7437        ///Returns a mutable reference to `epoch`.
7438        ///If the field is unset, it is first initialized with the default value.
7439        pub fn epoch_mut(&mut self) -> &mut super::Epoch {
7440            self.epoch.get_or_insert_default()
7441        }
7442        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
7443        pub fn epoch_opt(&self) -> Option<&super::Epoch> {
7444            self.epoch.as_ref().map(|field| field as _)
7445        }
7446        ///Sets `epoch` with the provided value.
7447        pub fn set_epoch<T: Into<super::Epoch>>(&mut self, field: T) {
7448            self.epoch = Some(field.into().into());
7449        }
7450        ///Sets `epoch` with the provided value.
7451        pub fn with_epoch<T: Into<super::Epoch>>(mut self, field: T) -> Self {
7452            self.set_epoch(field.into());
7453            self
7454        }
7455    }
7456    impl super::GetFunctionRequest {
7457        pub const fn const_default() -> Self {
7458            Self {
7459                package_id: None,
7460                module_name: None,
7461                name: None,
7462            }
7463        }
7464        #[doc(hidden)]
7465        pub fn default_instance() -> &'static Self {
7466            static DEFAULT: super::GetFunctionRequest = super::GetFunctionRequest::const_default();
7467            &DEFAULT
7468        }
7469        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7470        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
7471            self.package_id.as_mut().map(|field| field as _)
7472        }
7473        ///Returns a mutable reference to `package_id`.
7474        ///If the field is unset, it is first initialized with the default value.
7475        pub fn package_id_mut(&mut self) -> &mut String {
7476            self.package_id.get_or_insert_default()
7477        }
7478        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
7479        pub fn package_id_opt(&self) -> Option<&str> {
7480            self.package_id.as_ref().map(|field| field as _)
7481        }
7482        ///Sets `package_id` with the provided value.
7483        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
7484            self.package_id = Some(field.into().into());
7485        }
7486        ///Sets `package_id` with the provided value.
7487        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
7488            self.set_package_id(field.into());
7489            self
7490        }
7491        ///If `module_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7492        pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
7493            self.module_name.as_mut().map(|field| field as _)
7494        }
7495        ///Returns a mutable reference to `module_name`.
7496        ///If the field is unset, it is first initialized with the default value.
7497        pub fn module_name_mut(&mut self) -> &mut String {
7498            self.module_name.get_or_insert_default()
7499        }
7500        ///If `module_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
7501        pub fn module_name_opt(&self) -> Option<&str> {
7502            self.module_name.as_ref().map(|field| field as _)
7503        }
7504        ///Sets `module_name` with the provided value.
7505        pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
7506            self.module_name = Some(field.into().into());
7507        }
7508        ///Sets `module_name` with the provided value.
7509        pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
7510            self.set_module_name(field.into());
7511            self
7512        }
7513        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7514        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
7515            self.name.as_mut().map(|field| field as _)
7516        }
7517        ///Returns a mutable reference to `name`.
7518        ///If the field is unset, it is first initialized with the default value.
7519        pub fn name_mut(&mut self) -> &mut String {
7520            self.name.get_or_insert_default()
7521        }
7522        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
7523        pub fn name_opt(&self) -> Option<&str> {
7524            self.name.as_ref().map(|field| field as _)
7525        }
7526        ///Sets `name` with the provided value.
7527        pub fn set_name<T: Into<String>>(&mut self, field: T) {
7528            self.name = Some(field.into().into());
7529        }
7530        ///Sets `name` with the provided value.
7531        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
7532            self.set_name(field.into());
7533            self
7534        }
7535    }
7536    impl super::GetFunctionResponse {
7537        pub const fn const_default() -> Self {
7538            Self { function: None }
7539        }
7540        #[doc(hidden)]
7541        pub fn default_instance() -> &'static Self {
7542            static DEFAULT: super::GetFunctionResponse = super::GetFunctionResponse::const_default();
7543            &DEFAULT
7544        }
7545        ///Returns the value of `function`, or the default value if `function` is unset.
7546        pub fn function(&self) -> &super::FunctionDescriptor {
7547            self.function
7548                .as_ref()
7549                .map(|field| field as _)
7550                .unwrap_or_else(|| super::FunctionDescriptor::default_instance() as _)
7551        }
7552        ///If `function` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7553        pub fn function_opt_mut(&mut self) -> Option<&mut super::FunctionDescriptor> {
7554            self.function.as_mut().map(|field| field as _)
7555        }
7556        ///Returns a mutable reference to `function`.
7557        ///If the field is unset, it is first initialized with the default value.
7558        pub fn function_mut(&mut self) -> &mut super::FunctionDescriptor {
7559            self.function.get_or_insert_default()
7560        }
7561        ///If `function` is set, returns [`Some`] with the value; otherwise returns [`None`].
7562        pub fn function_opt(&self) -> Option<&super::FunctionDescriptor> {
7563            self.function.as_ref().map(|field| field as _)
7564        }
7565        ///Sets `function` with the provided value.
7566        pub fn set_function<T: Into<super::FunctionDescriptor>>(&mut self, field: T) {
7567            self.function = Some(field.into().into());
7568        }
7569        ///Sets `function` with the provided value.
7570        pub fn with_function<T: Into<super::FunctionDescriptor>>(
7571            mut self,
7572            field: T,
7573        ) -> Self {
7574            self.set_function(field.into());
7575            self
7576        }
7577    }
7578    impl super::GetObjectRequest {
7579        pub const fn const_default() -> Self {
7580            Self {
7581                object_id: None,
7582                version: None,
7583                read_mask: None,
7584            }
7585        }
7586        #[doc(hidden)]
7587        pub fn default_instance() -> &'static Self {
7588            static DEFAULT: super::GetObjectRequest = super::GetObjectRequest::const_default();
7589            &DEFAULT
7590        }
7591        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7592        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
7593            self.object_id.as_mut().map(|field| field as _)
7594        }
7595        ///Returns a mutable reference to `object_id`.
7596        ///If the field is unset, it is first initialized with the default value.
7597        pub fn object_id_mut(&mut self) -> &mut String {
7598            self.object_id.get_or_insert_default()
7599        }
7600        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
7601        pub fn object_id_opt(&self) -> Option<&str> {
7602            self.object_id.as_ref().map(|field| field as _)
7603        }
7604        ///Sets `object_id` with the provided value.
7605        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
7606            self.object_id = Some(field.into().into());
7607        }
7608        ///Sets `object_id` with the provided value.
7609        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
7610            self.set_object_id(field.into());
7611            self
7612        }
7613        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7614        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
7615            self.version.as_mut().map(|field| field as _)
7616        }
7617        ///Returns a mutable reference to `version`.
7618        ///If the field is unset, it is first initialized with the default value.
7619        pub fn version_mut(&mut self) -> &mut u64 {
7620            self.version.get_or_insert_default()
7621        }
7622        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
7623        pub fn version_opt(&self) -> Option<u64> {
7624            self.version.as_ref().map(|field| *field)
7625        }
7626        ///Sets `version` with the provided value.
7627        pub fn set_version(&mut self, field: u64) {
7628            self.version = Some(field);
7629        }
7630        ///Sets `version` with the provided value.
7631        pub fn with_version(mut self, field: u64) -> Self {
7632            self.set_version(field);
7633            self
7634        }
7635        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7636        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
7637            self.read_mask.as_mut().map(|field| field as _)
7638        }
7639        ///Returns a mutable reference to `read_mask`.
7640        ///If the field is unset, it is first initialized with the default value.
7641        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
7642            self.read_mask.get_or_insert_default()
7643        }
7644        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
7645        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
7646            self.read_mask.as_ref().map(|field| field as _)
7647        }
7648        ///Sets `read_mask` with the provided value.
7649        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
7650            self.read_mask = Some(field.into().into());
7651        }
7652        ///Sets `read_mask` with the provided value.
7653        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
7654            mut self,
7655            field: T,
7656        ) -> Self {
7657            self.set_read_mask(field.into());
7658            self
7659        }
7660    }
7661    impl super::GetObjectResponse {
7662        pub const fn const_default() -> Self {
7663            Self { object: None }
7664        }
7665        #[doc(hidden)]
7666        pub fn default_instance() -> &'static Self {
7667            static DEFAULT: super::GetObjectResponse = super::GetObjectResponse::const_default();
7668            &DEFAULT
7669        }
7670        ///Returns the value of `object`, or the default value if `object` is unset.
7671        pub fn object(&self) -> &super::Object {
7672            self.object
7673                .as_ref()
7674                .map(|field| field as _)
7675                .unwrap_or_else(|| super::Object::default_instance() as _)
7676        }
7677        ///If `object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7678        pub fn object_opt_mut(&mut self) -> Option<&mut super::Object> {
7679            self.object.as_mut().map(|field| field as _)
7680        }
7681        ///Returns a mutable reference to `object`.
7682        ///If the field is unset, it is first initialized with the default value.
7683        pub fn object_mut(&mut self) -> &mut super::Object {
7684            self.object.get_or_insert_default()
7685        }
7686        ///If `object` is set, returns [`Some`] with the value; otherwise returns [`None`].
7687        pub fn object_opt(&self) -> Option<&super::Object> {
7688            self.object.as_ref().map(|field| field as _)
7689        }
7690        ///Sets `object` with the provided value.
7691        pub fn set_object<T: Into<super::Object>>(&mut self, field: T) {
7692            self.object = Some(field.into().into());
7693        }
7694        ///Sets `object` with the provided value.
7695        pub fn with_object<T: Into<super::Object>>(mut self, field: T) -> Self {
7696            self.set_object(field.into());
7697            self
7698        }
7699    }
7700    impl super::GetObjectResult {
7701        pub const fn const_default() -> Self {
7702            Self { result: None }
7703        }
7704        #[doc(hidden)]
7705        pub fn default_instance() -> &'static Self {
7706            static DEFAULT: super::GetObjectResult = super::GetObjectResult::const_default();
7707            &DEFAULT
7708        }
7709        ///Returns the value of `object`, or the default value if `object` is unset.
7710        pub fn object(&self) -> &super::Object {
7711            if let Some(super::get_object_result::Result::Object(field)) = &self.result {
7712                field as _
7713            } else {
7714                super::Object::default_instance() as _
7715            }
7716        }
7717        ///If `object` is set, returns [`Some`] with the value; otherwise returns [`None`].
7718        pub fn object_opt(&self) -> Option<&super::Object> {
7719            if let Some(super::get_object_result::Result::Object(field)) = &self.result {
7720                Some(field as _)
7721            } else {
7722                None
7723            }
7724        }
7725        ///If `object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7726        pub fn object_opt_mut(&mut self) -> Option<&mut super::Object> {
7727            if let Some(super::get_object_result::Result::Object(field)) = &mut self
7728                .result
7729            {
7730                Some(field as _)
7731            } else {
7732                None
7733            }
7734        }
7735        ///Returns a mutable reference to `object`.
7736        ///If the field is unset, it is first initialized with the default value.
7737        ///If any other oneof field in the same oneof is set, it will be cleared.
7738        pub fn object_mut(&mut self) -> &mut super::Object {
7739            if self.object_opt_mut().is_none() {
7740                self.result = Some(
7741                    super::get_object_result::Result::Object(super::Object::default()),
7742                );
7743            }
7744            self.object_opt_mut().unwrap()
7745        }
7746        ///Sets `object` with the provided value.
7747        ///If any other oneof field in the same oneof is set, it will be cleared.
7748        pub fn set_object<T: Into<super::Object>>(&mut self, field: T) {
7749            self.result = Some(
7750                super::get_object_result::Result::Object(field.into().into()),
7751            );
7752        }
7753        ///Sets `object` with the provided value.
7754        ///If any other oneof field in the same oneof is set, it will be cleared.
7755        pub fn with_object<T: Into<super::Object>>(mut self, field: T) -> Self {
7756            self.set_object(field.into());
7757            self
7758        }
7759        ///Returns the value of `error`, or the default value if `error` is unset.
7760        pub fn error(&self) -> &super::super::super::super::google::rpc::Status {
7761            if let Some(super::get_object_result::Result::Error(field)) = &self.result {
7762                field as _
7763            } else {
7764                super::super::super::super::google::rpc::Status::default_instance() as _
7765            }
7766        }
7767        ///If `error` is set, returns [`Some`] with the value; otherwise returns [`None`].
7768        pub fn error_opt(
7769            &self,
7770        ) -> Option<&super::super::super::super::google::rpc::Status> {
7771            if let Some(super::get_object_result::Result::Error(field)) = &self.result {
7772                Some(field as _)
7773            } else {
7774                None
7775            }
7776        }
7777        ///If `error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7778        pub fn error_opt_mut(
7779            &mut self,
7780        ) -> Option<&mut super::super::super::super::google::rpc::Status> {
7781            if let Some(super::get_object_result::Result::Error(field)) = &mut self
7782                .result
7783            {
7784                Some(field as _)
7785            } else {
7786                None
7787            }
7788        }
7789        ///Returns a mutable reference to `error`.
7790        ///If the field is unset, it is first initialized with the default value.
7791        ///If any other oneof field in the same oneof is set, it will be cleared.
7792        pub fn error_mut(
7793            &mut self,
7794        ) -> &mut super::super::super::super::google::rpc::Status {
7795            if self.error_opt_mut().is_none() {
7796                self.result = Some(
7797                    super::get_object_result::Result::Error(
7798                        super::super::super::super::google::rpc::Status::default(),
7799                    ),
7800                );
7801            }
7802            self.error_opt_mut().unwrap()
7803        }
7804        ///Sets `error` with the provided value.
7805        ///If any other oneof field in the same oneof is set, it will be cleared.
7806        pub fn set_error<T: Into<super::super::super::super::google::rpc::Status>>(
7807            &mut self,
7808            field: T,
7809        ) {
7810            self.result = Some(
7811                super::get_object_result::Result::Error(field.into().into()),
7812            );
7813        }
7814        ///Sets `error` with the provided value.
7815        ///If any other oneof field in the same oneof is set, it will be cleared.
7816        pub fn with_error<T: Into<super::super::super::super::google::rpc::Status>>(
7817            mut self,
7818            field: T,
7819        ) -> Self {
7820            self.set_error(field.into());
7821            self
7822        }
7823    }
7824    impl super::GetPackageRequest {
7825        pub const fn const_default() -> Self {
7826            Self { package_id: None }
7827        }
7828        #[doc(hidden)]
7829        pub fn default_instance() -> &'static Self {
7830            static DEFAULT: super::GetPackageRequest = super::GetPackageRequest::const_default();
7831            &DEFAULT
7832        }
7833        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7834        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
7835            self.package_id.as_mut().map(|field| field as _)
7836        }
7837        ///Returns a mutable reference to `package_id`.
7838        ///If the field is unset, it is first initialized with the default value.
7839        pub fn package_id_mut(&mut self) -> &mut String {
7840            self.package_id.get_or_insert_default()
7841        }
7842        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
7843        pub fn package_id_opt(&self) -> Option<&str> {
7844            self.package_id.as_ref().map(|field| field as _)
7845        }
7846        ///Sets `package_id` with the provided value.
7847        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
7848            self.package_id = Some(field.into().into());
7849        }
7850        ///Sets `package_id` with the provided value.
7851        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
7852            self.set_package_id(field.into());
7853            self
7854        }
7855    }
7856    impl super::GetPackageResponse {
7857        pub const fn const_default() -> Self {
7858            Self { package: None }
7859        }
7860        #[doc(hidden)]
7861        pub fn default_instance() -> &'static Self {
7862            static DEFAULT: super::GetPackageResponse = super::GetPackageResponse::const_default();
7863            &DEFAULT
7864        }
7865        ///Returns the value of `package`, or the default value if `package` is unset.
7866        pub fn package(&self) -> &super::Package {
7867            self.package
7868                .as_ref()
7869                .map(|field| field as _)
7870                .unwrap_or_else(|| super::Package::default_instance() as _)
7871        }
7872        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7873        pub fn package_opt_mut(&mut self) -> Option<&mut super::Package> {
7874            self.package.as_mut().map(|field| field as _)
7875        }
7876        ///Returns a mutable reference to `package`.
7877        ///If the field is unset, it is first initialized with the default value.
7878        pub fn package_mut(&mut self) -> &mut super::Package {
7879            self.package.get_or_insert_default()
7880        }
7881        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
7882        pub fn package_opt(&self) -> Option<&super::Package> {
7883            self.package.as_ref().map(|field| field as _)
7884        }
7885        ///Sets `package` with the provided value.
7886        pub fn set_package<T: Into<super::Package>>(&mut self, field: T) {
7887            self.package = Some(field.into().into());
7888        }
7889        ///Sets `package` with the provided value.
7890        pub fn with_package<T: Into<super::Package>>(mut self, field: T) -> Self {
7891            self.set_package(field.into());
7892            self
7893        }
7894    }
7895    impl super::GetServiceInfoRequest {
7896        pub const fn const_default() -> Self {
7897            Self {}
7898        }
7899        #[doc(hidden)]
7900        pub fn default_instance() -> &'static Self {
7901            static DEFAULT: super::GetServiceInfoRequest = super::GetServiceInfoRequest::const_default();
7902            &DEFAULT
7903        }
7904    }
7905    impl super::GetServiceInfoResponse {
7906        pub const fn const_default() -> Self {
7907            Self {
7908                chain_id: None,
7909                chain: None,
7910                epoch: None,
7911                checkpoint_height: None,
7912                timestamp: None,
7913                lowest_available_checkpoint: None,
7914                lowest_available_checkpoint_objects: None,
7915                server: None,
7916            }
7917        }
7918        #[doc(hidden)]
7919        pub fn default_instance() -> &'static Self {
7920            static DEFAULT: super::GetServiceInfoResponse = super::GetServiceInfoResponse::const_default();
7921            &DEFAULT
7922        }
7923        ///If `chain_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7924        pub fn chain_id_opt_mut(&mut self) -> Option<&mut String> {
7925            self.chain_id.as_mut().map(|field| field as _)
7926        }
7927        ///Returns a mutable reference to `chain_id`.
7928        ///If the field is unset, it is first initialized with the default value.
7929        pub fn chain_id_mut(&mut self) -> &mut String {
7930            self.chain_id.get_or_insert_default()
7931        }
7932        ///If `chain_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
7933        pub fn chain_id_opt(&self) -> Option<&str> {
7934            self.chain_id.as_ref().map(|field| field as _)
7935        }
7936        ///Sets `chain_id` with the provided value.
7937        pub fn set_chain_id<T: Into<String>>(&mut self, field: T) {
7938            self.chain_id = Some(field.into().into());
7939        }
7940        ///Sets `chain_id` with the provided value.
7941        pub fn with_chain_id<T: Into<String>>(mut self, field: T) -> Self {
7942            self.set_chain_id(field.into());
7943            self
7944        }
7945        ///If `chain` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7946        pub fn chain_opt_mut(&mut self) -> Option<&mut String> {
7947            self.chain.as_mut().map(|field| field as _)
7948        }
7949        ///Returns a mutable reference to `chain`.
7950        ///If the field is unset, it is first initialized with the default value.
7951        pub fn chain_mut(&mut self) -> &mut String {
7952            self.chain.get_or_insert_default()
7953        }
7954        ///If `chain` is set, returns [`Some`] with the value; otherwise returns [`None`].
7955        pub fn chain_opt(&self) -> Option<&str> {
7956            self.chain.as_ref().map(|field| field as _)
7957        }
7958        ///Sets `chain` with the provided value.
7959        pub fn set_chain<T: Into<String>>(&mut self, field: T) {
7960            self.chain = Some(field.into().into());
7961        }
7962        ///Sets `chain` with the provided value.
7963        pub fn with_chain<T: Into<String>>(mut self, field: T) -> Self {
7964            self.set_chain(field.into());
7965            self
7966        }
7967        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7968        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
7969            self.epoch.as_mut().map(|field| field as _)
7970        }
7971        ///Returns a mutable reference to `epoch`.
7972        ///If the field is unset, it is first initialized with the default value.
7973        pub fn epoch_mut(&mut self) -> &mut u64 {
7974            self.epoch.get_or_insert_default()
7975        }
7976        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
7977        pub fn epoch_opt(&self) -> Option<u64> {
7978            self.epoch.as_ref().map(|field| *field)
7979        }
7980        ///Sets `epoch` with the provided value.
7981        pub fn set_epoch(&mut self, field: u64) {
7982            self.epoch = Some(field);
7983        }
7984        ///Sets `epoch` with the provided value.
7985        pub fn with_epoch(mut self, field: u64) -> Self {
7986            self.set_epoch(field);
7987            self
7988        }
7989        ///If `checkpoint_height` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
7990        pub fn checkpoint_height_opt_mut(&mut self) -> Option<&mut u64> {
7991            self.checkpoint_height.as_mut().map(|field| field as _)
7992        }
7993        ///Returns a mutable reference to `checkpoint_height`.
7994        ///If the field is unset, it is first initialized with the default value.
7995        pub fn checkpoint_height_mut(&mut self) -> &mut u64 {
7996            self.checkpoint_height.get_or_insert_default()
7997        }
7998        ///If `checkpoint_height` is set, returns [`Some`] with the value; otherwise returns [`None`].
7999        pub fn checkpoint_height_opt(&self) -> Option<u64> {
8000            self.checkpoint_height.as_ref().map(|field| *field)
8001        }
8002        ///Sets `checkpoint_height` with the provided value.
8003        pub fn set_checkpoint_height(&mut self, field: u64) {
8004            self.checkpoint_height = Some(field);
8005        }
8006        ///Sets `checkpoint_height` with the provided value.
8007        pub fn with_checkpoint_height(mut self, field: u64) -> Self {
8008            self.set_checkpoint_height(field);
8009            self
8010        }
8011        ///If `timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8012        pub fn timestamp_opt_mut(&mut self) -> Option<&mut ::prost_types::Timestamp> {
8013            self.timestamp.as_mut().map(|field| field as _)
8014        }
8015        ///Returns a mutable reference to `timestamp`.
8016        ///If the field is unset, it is first initialized with the default value.
8017        pub fn timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
8018            self.timestamp.get_or_insert_default()
8019        }
8020        ///If `timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
8021        pub fn timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
8022            self.timestamp.as_ref().map(|field| field as _)
8023        }
8024        ///Sets `timestamp` with the provided value.
8025        pub fn set_timestamp<T: Into<::prost_types::Timestamp>>(&mut self, field: T) {
8026            self.timestamp = Some(field.into().into());
8027        }
8028        ///Sets `timestamp` with the provided value.
8029        pub fn with_timestamp<T: Into<::prost_types::Timestamp>>(
8030            mut self,
8031            field: T,
8032        ) -> Self {
8033            self.set_timestamp(field.into());
8034            self
8035        }
8036        ///If `lowest_available_checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8037        pub fn lowest_available_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
8038            self.lowest_available_checkpoint.as_mut().map(|field| field as _)
8039        }
8040        ///Returns a mutable reference to `lowest_available_checkpoint`.
8041        ///If the field is unset, it is first initialized with the default value.
8042        pub fn lowest_available_checkpoint_mut(&mut self) -> &mut u64 {
8043            self.lowest_available_checkpoint.get_or_insert_default()
8044        }
8045        ///If `lowest_available_checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
8046        pub fn lowest_available_checkpoint_opt(&self) -> Option<u64> {
8047            self.lowest_available_checkpoint.as_ref().map(|field| *field)
8048        }
8049        ///Sets `lowest_available_checkpoint` with the provided value.
8050        pub fn set_lowest_available_checkpoint(&mut self, field: u64) {
8051            self.lowest_available_checkpoint = Some(field);
8052        }
8053        ///Sets `lowest_available_checkpoint` with the provided value.
8054        pub fn with_lowest_available_checkpoint(mut self, field: u64) -> Self {
8055            self.set_lowest_available_checkpoint(field);
8056            self
8057        }
8058        ///If `lowest_available_checkpoint_objects` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8059        pub fn lowest_available_checkpoint_objects_opt_mut(
8060            &mut self,
8061        ) -> Option<&mut u64> {
8062            self.lowest_available_checkpoint_objects.as_mut().map(|field| field as _)
8063        }
8064        ///Returns a mutable reference to `lowest_available_checkpoint_objects`.
8065        ///If the field is unset, it is first initialized with the default value.
8066        pub fn lowest_available_checkpoint_objects_mut(&mut self) -> &mut u64 {
8067            self.lowest_available_checkpoint_objects.get_or_insert_default()
8068        }
8069        ///If `lowest_available_checkpoint_objects` is set, returns [`Some`] with the value; otherwise returns [`None`].
8070        pub fn lowest_available_checkpoint_objects_opt(&self) -> Option<u64> {
8071            self.lowest_available_checkpoint_objects.as_ref().map(|field| *field)
8072        }
8073        ///Sets `lowest_available_checkpoint_objects` with the provided value.
8074        pub fn set_lowest_available_checkpoint_objects(&mut self, field: u64) {
8075            self.lowest_available_checkpoint_objects = Some(field);
8076        }
8077        ///Sets `lowest_available_checkpoint_objects` with the provided value.
8078        pub fn with_lowest_available_checkpoint_objects(mut self, field: u64) -> Self {
8079            self.set_lowest_available_checkpoint_objects(field);
8080            self
8081        }
8082        ///If `server` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8083        pub fn server_opt_mut(&mut self) -> Option<&mut String> {
8084            self.server.as_mut().map(|field| field as _)
8085        }
8086        ///Returns a mutable reference to `server`.
8087        ///If the field is unset, it is first initialized with the default value.
8088        pub fn server_mut(&mut self) -> &mut String {
8089            self.server.get_or_insert_default()
8090        }
8091        ///If `server` is set, returns [`Some`] with the value; otherwise returns [`None`].
8092        pub fn server_opt(&self) -> Option<&str> {
8093            self.server.as_ref().map(|field| field as _)
8094        }
8095        ///Sets `server` with the provided value.
8096        pub fn set_server<T: Into<String>>(&mut self, field: T) {
8097            self.server = Some(field.into().into());
8098        }
8099        ///Sets `server` with the provided value.
8100        pub fn with_server<T: Into<String>>(mut self, field: T) -> Self {
8101            self.set_server(field.into());
8102            self
8103        }
8104    }
8105    impl super::GetTransactionRequest {
8106        pub const fn const_default() -> Self {
8107            Self {
8108                digest: None,
8109                read_mask: None,
8110            }
8111        }
8112        #[doc(hidden)]
8113        pub fn default_instance() -> &'static Self {
8114            static DEFAULT: super::GetTransactionRequest = super::GetTransactionRequest::const_default();
8115            &DEFAULT
8116        }
8117        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8118        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
8119            self.digest.as_mut().map(|field| field as _)
8120        }
8121        ///Returns a mutable reference to `digest`.
8122        ///If the field is unset, it is first initialized with the default value.
8123        pub fn digest_mut(&mut self) -> &mut String {
8124            self.digest.get_or_insert_default()
8125        }
8126        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
8127        pub fn digest_opt(&self) -> Option<&str> {
8128            self.digest.as_ref().map(|field| field as _)
8129        }
8130        ///Sets `digest` with the provided value.
8131        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
8132            self.digest = Some(field.into().into());
8133        }
8134        ///Sets `digest` with the provided value.
8135        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
8136            self.set_digest(field.into());
8137            self
8138        }
8139        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8140        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
8141            self.read_mask.as_mut().map(|field| field as _)
8142        }
8143        ///Returns a mutable reference to `read_mask`.
8144        ///If the field is unset, it is first initialized with the default value.
8145        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
8146            self.read_mask.get_or_insert_default()
8147        }
8148        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
8149        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
8150            self.read_mask.as_ref().map(|field| field as _)
8151        }
8152        ///Sets `read_mask` with the provided value.
8153        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
8154            self.read_mask = Some(field.into().into());
8155        }
8156        ///Sets `read_mask` with the provided value.
8157        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
8158            mut self,
8159            field: T,
8160        ) -> Self {
8161            self.set_read_mask(field.into());
8162            self
8163        }
8164    }
8165    impl super::GetTransactionResponse {
8166        pub const fn const_default() -> Self {
8167            Self { transaction: None }
8168        }
8169        #[doc(hidden)]
8170        pub fn default_instance() -> &'static Self {
8171            static DEFAULT: super::GetTransactionResponse = super::GetTransactionResponse::const_default();
8172            &DEFAULT
8173        }
8174        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
8175        pub fn transaction(&self) -> &super::ExecutedTransaction {
8176            self.transaction
8177                .as_ref()
8178                .map(|field| field as _)
8179                .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
8180        }
8181        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8182        pub fn transaction_opt_mut(
8183            &mut self,
8184        ) -> Option<&mut super::ExecutedTransaction> {
8185            self.transaction.as_mut().map(|field| field as _)
8186        }
8187        ///Returns a mutable reference to `transaction`.
8188        ///If the field is unset, it is first initialized with the default value.
8189        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
8190            self.transaction.get_or_insert_default()
8191        }
8192        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
8193        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
8194            self.transaction.as_ref().map(|field| field as _)
8195        }
8196        ///Sets `transaction` with the provided value.
8197        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
8198            &mut self,
8199            field: T,
8200        ) {
8201            self.transaction = Some(field.into().into());
8202        }
8203        ///Sets `transaction` with the provided value.
8204        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
8205            mut self,
8206            field: T,
8207        ) -> Self {
8208            self.set_transaction(field.into());
8209            self
8210        }
8211    }
8212    impl super::GetTransactionResult {
8213        pub const fn const_default() -> Self {
8214            Self { result: None }
8215        }
8216        #[doc(hidden)]
8217        pub fn default_instance() -> &'static Self {
8218            static DEFAULT: super::GetTransactionResult = super::GetTransactionResult::const_default();
8219            &DEFAULT
8220        }
8221        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
8222        pub fn transaction(&self) -> &super::ExecutedTransaction {
8223            if let Some(super::get_transaction_result::Result::Transaction(field)) = &self
8224                .result
8225            {
8226                field as _
8227            } else {
8228                super::ExecutedTransaction::default_instance() as _
8229            }
8230        }
8231        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
8232        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
8233            if let Some(super::get_transaction_result::Result::Transaction(field)) = &self
8234                .result
8235            {
8236                Some(field as _)
8237            } else {
8238                None
8239            }
8240        }
8241        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8242        pub fn transaction_opt_mut(
8243            &mut self,
8244        ) -> Option<&mut super::ExecutedTransaction> {
8245            if let Some(super::get_transaction_result::Result::Transaction(field)) = &mut self
8246                .result
8247            {
8248                Some(field as _)
8249            } else {
8250                None
8251            }
8252        }
8253        ///Returns a mutable reference to `transaction`.
8254        ///If the field is unset, it is first initialized with the default value.
8255        ///If any other oneof field in the same oneof is set, it will be cleared.
8256        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
8257            if self.transaction_opt_mut().is_none() {
8258                self.result = Some(
8259                    super::get_transaction_result::Result::Transaction(
8260                        super::ExecutedTransaction::default(),
8261                    ),
8262                );
8263            }
8264            self.transaction_opt_mut().unwrap()
8265        }
8266        ///Sets `transaction` with the provided value.
8267        ///If any other oneof field in the same oneof is set, it will be cleared.
8268        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
8269            &mut self,
8270            field: T,
8271        ) {
8272            self.result = Some(
8273                super::get_transaction_result::Result::Transaction(field.into().into()),
8274            );
8275        }
8276        ///Sets `transaction` with the provided value.
8277        ///If any other oneof field in the same oneof is set, it will be cleared.
8278        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
8279            mut self,
8280            field: T,
8281        ) -> Self {
8282            self.set_transaction(field.into());
8283            self
8284        }
8285        ///Returns the value of `error`, or the default value if `error` is unset.
8286        pub fn error(&self) -> &super::super::super::super::google::rpc::Status {
8287            if let Some(super::get_transaction_result::Result::Error(field)) = &self
8288                .result
8289            {
8290                field as _
8291            } else {
8292                super::super::super::super::google::rpc::Status::default_instance() as _
8293            }
8294        }
8295        ///If `error` is set, returns [`Some`] with the value; otherwise returns [`None`].
8296        pub fn error_opt(
8297            &self,
8298        ) -> Option<&super::super::super::super::google::rpc::Status> {
8299            if let Some(super::get_transaction_result::Result::Error(field)) = &self
8300                .result
8301            {
8302                Some(field as _)
8303            } else {
8304                None
8305            }
8306        }
8307        ///If `error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8308        pub fn error_opt_mut(
8309            &mut self,
8310        ) -> Option<&mut super::super::super::super::google::rpc::Status> {
8311            if let Some(super::get_transaction_result::Result::Error(field)) = &mut self
8312                .result
8313            {
8314                Some(field as _)
8315            } else {
8316                None
8317            }
8318        }
8319        ///Returns a mutable reference to `error`.
8320        ///If the field is unset, it is first initialized with the default value.
8321        ///If any other oneof field in the same oneof is set, it will be cleared.
8322        pub fn error_mut(
8323            &mut self,
8324        ) -> &mut super::super::super::super::google::rpc::Status {
8325            if self.error_opt_mut().is_none() {
8326                self.result = Some(
8327                    super::get_transaction_result::Result::Error(
8328                        super::super::super::super::google::rpc::Status::default(),
8329                    ),
8330                );
8331            }
8332            self.error_opt_mut().unwrap()
8333        }
8334        ///Sets `error` with the provided value.
8335        ///If any other oneof field in the same oneof is set, it will be cleared.
8336        pub fn set_error<T: Into<super::super::super::super::google::rpc::Status>>(
8337            &mut self,
8338            field: T,
8339        ) {
8340            self.result = Some(
8341                super::get_transaction_result::Result::Error(field.into().into()),
8342            );
8343        }
8344        ///Sets `error` with the provided value.
8345        ///If any other oneof field in the same oneof is set, it will be cleared.
8346        pub fn with_error<T: Into<super::super::super::super::google::rpc::Status>>(
8347            mut self,
8348            field: T,
8349        ) -> Self {
8350            self.set_error(field.into());
8351            self
8352        }
8353    }
8354    impl super::IndexError {
8355        pub const fn const_default() -> Self {
8356            Self {
8357                index: None,
8358                subresult: None,
8359            }
8360        }
8361        #[doc(hidden)]
8362        pub fn default_instance() -> &'static Self {
8363            static DEFAULT: super::IndexError = super::IndexError::const_default();
8364            &DEFAULT
8365        }
8366        ///If `index` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8367        pub fn index_opt_mut(&mut self) -> Option<&mut u32> {
8368            self.index.as_mut().map(|field| field as _)
8369        }
8370        ///Returns a mutable reference to `index`.
8371        ///If the field is unset, it is first initialized with the default value.
8372        pub fn index_mut(&mut self) -> &mut u32 {
8373            self.index.get_or_insert_default()
8374        }
8375        ///If `index` is set, returns [`Some`] with the value; otherwise returns [`None`].
8376        pub fn index_opt(&self) -> Option<u32> {
8377            self.index.as_ref().map(|field| *field)
8378        }
8379        ///Sets `index` with the provided value.
8380        pub fn set_index(&mut self, field: u32) {
8381            self.index = Some(field);
8382        }
8383        ///Sets `index` with the provided value.
8384        pub fn with_index(mut self, field: u32) -> Self {
8385            self.set_index(field);
8386            self
8387        }
8388        ///If `subresult` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8389        pub fn subresult_opt_mut(&mut self) -> Option<&mut u32> {
8390            self.subresult.as_mut().map(|field| field as _)
8391        }
8392        ///Returns a mutable reference to `subresult`.
8393        ///If the field is unset, it is first initialized with the default value.
8394        pub fn subresult_mut(&mut self) -> &mut u32 {
8395            self.subresult.get_or_insert_default()
8396        }
8397        ///If `subresult` is set, returns [`Some`] with the value; otherwise returns [`None`].
8398        pub fn subresult_opt(&self) -> Option<u32> {
8399            self.subresult.as_ref().map(|field| *field)
8400        }
8401        ///Sets `subresult` with the provided value.
8402        pub fn set_subresult(&mut self, field: u32) {
8403            self.subresult = Some(field);
8404        }
8405        ///Sets `subresult` with the provided value.
8406        pub fn with_subresult(mut self, field: u32) -> Self {
8407            self.set_subresult(field);
8408            self
8409        }
8410    }
8411    impl super::Input {
8412        pub const fn const_default() -> Self {
8413            Self {
8414                kind: None,
8415                pure: None,
8416                object_id: None,
8417                version: None,
8418                digest: None,
8419                mutable: None,
8420                mutability: None,
8421                funds_withdrawal: None,
8422                literal: None,
8423            }
8424        }
8425        #[doc(hidden)]
8426        pub fn default_instance() -> &'static Self {
8427            static DEFAULT: super::Input = super::Input::const_default();
8428            &DEFAULT
8429        }
8430        ///Sets `kind` with the provided value.
8431        pub fn with_kind<T: Into<super::input::InputKind>>(mut self, field: T) -> Self {
8432            self.set_kind(field.into());
8433            self
8434        }
8435        ///If `pure` is set, returns [`Some`] with the value; otherwise returns [`None`].
8436        pub fn pure_opt(&self) -> Option<&[u8]> {
8437            self.pure.as_ref().map(|field| field as _)
8438        }
8439        ///Sets `pure` with the provided value.
8440        pub fn set_pure<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
8441            self.pure = Some(field.into().into());
8442        }
8443        ///Sets `pure` with the provided value.
8444        pub fn with_pure<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
8445            self.set_pure(field.into());
8446            self
8447        }
8448        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8449        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
8450            self.object_id.as_mut().map(|field| field as _)
8451        }
8452        ///Returns a mutable reference to `object_id`.
8453        ///If the field is unset, it is first initialized with the default value.
8454        pub fn object_id_mut(&mut self) -> &mut String {
8455            self.object_id.get_or_insert_default()
8456        }
8457        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
8458        pub fn object_id_opt(&self) -> Option<&str> {
8459            self.object_id.as_ref().map(|field| field as _)
8460        }
8461        ///Sets `object_id` with the provided value.
8462        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
8463            self.object_id = Some(field.into().into());
8464        }
8465        ///Sets `object_id` with the provided value.
8466        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
8467            self.set_object_id(field.into());
8468            self
8469        }
8470        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8471        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
8472            self.version.as_mut().map(|field| field as _)
8473        }
8474        ///Returns a mutable reference to `version`.
8475        ///If the field is unset, it is first initialized with the default value.
8476        pub fn version_mut(&mut self) -> &mut u64 {
8477            self.version.get_or_insert_default()
8478        }
8479        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
8480        pub fn version_opt(&self) -> Option<u64> {
8481            self.version.as_ref().map(|field| *field)
8482        }
8483        ///Sets `version` with the provided value.
8484        pub fn set_version(&mut self, field: u64) {
8485            self.version = Some(field);
8486        }
8487        ///Sets `version` with the provided value.
8488        pub fn with_version(mut self, field: u64) -> Self {
8489            self.set_version(field);
8490            self
8491        }
8492        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8493        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
8494            self.digest.as_mut().map(|field| field as _)
8495        }
8496        ///Returns a mutable reference to `digest`.
8497        ///If the field is unset, it is first initialized with the default value.
8498        pub fn digest_mut(&mut self) -> &mut String {
8499            self.digest.get_or_insert_default()
8500        }
8501        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
8502        pub fn digest_opt(&self) -> Option<&str> {
8503            self.digest.as_ref().map(|field| field as _)
8504        }
8505        ///Sets `digest` with the provided value.
8506        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
8507            self.digest = Some(field.into().into());
8508        }
8509        ///Sets `digest` with the provided value.
8510        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
8511            self.set_digest(field.into());
8512            self
8513        }
8514        ///If `mutable` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8515        pub fn mutable_opt_mut(&mut self) -> Option<&mut bool> {
8516            self.mutable.as_mut().map(|field| field as _)
8517        }
8518        ///Returns a mutable reference to `mutable`.
8519        ///If the field is unset, it is first initialized with the default value.
8520        pub fn mutable_mut(&mut self) -> &mut bool {
8521            self.mutable.get_or_insert_default()
8522        }
8523        ///If `mutable` is set, returns [`Some`] with the value; otherwise returns [`None`].
8524        pub fn mutable_opt(&self) -> Option<bool> {
8525            self.mutable.as_ref().map(|field| *field)
8526        }
8527        ///Sets `mutable` with the provided value.
8528        pub fn set_mutable(&mut self, field: bool) {
8529            self.mutable = Some(field);
8530        }
8531        ///Sets `mutable` with the provided value.
8532        pub fn with_mutable(mut self, field: bool) -> Self {
8533            self.set_mutable(field);
8534            self
8535        }
8536        ///Sets `mutability` with the provided value.
8537        pub fn with_mutability<T: Into<super::input::Mutability>>(
8538            mut self,
8539            field: T,
8540        ) -> Self {
8541            self.set_mutability(field.into());
8542            self
8543        }
8544        ///Returns the value of `funds_withdrawal`, or the default value if `funds_withdrawal` is unset.
8545        pub fn funds_withdrawal(&self) -> &super::FundsWithdrawal {
8546            self.funds_withdrawal
8547                .as_ref()
8548                .map(|field| field as _)
8549                .unwrap_or_else(|| super::FundsWithdrawal::default_instance() as _)
8550        }
8551        ///If `funds_withdrawal` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8552        pub fn funds_withdrawal_opt_mut(
8553            &mut self,
8554        ) -> Option<&mut super::FundsWithdrawal> {
8555            self.funds_withdrawal.as_mut().map(|field| field as _)
8556        }
8557        ///Returns a mutable reference to `funds_withdrawal`.
8558        ///If the field is unset, it is first initialized with the default value.
8559        pub fn funds_withdrawal_mut(&mut self) -> &mut super::FundsWithdrawal {
8560            self.funds_withdrawal.get_or_insert_default()
8561        }
8562        ///If `funds_withdrawal` is set, returns [`Some`] with the value; otherwise returns [`None`].
8563        pub fn funds_withdrawal_opt(&self) -> Option<&super::FundsWithdrawal> {
8564            self.funds_withdrawal.as_ref().map(|field| field as _)
8565        }
8566        ///Sets `funds_withdrawal` with the provided value.
8567        pub fn set_funds_withdrawal<T: Into<super::FundsWithdrawal>>(
8568            &mut self,
8569            field: T,
8570        ) {
8571            self.funds_withdrawal = Some(field.into().into());
8572        }
8573        ///Sets `funds_withdrawal` with the provided value.
8574        pub fn with_funds_withdrawal<T: Into<super::FundsWithdrawal>>(
8575            mut self,
8576            field: T,
8577        ) -> Self {
8578            self.set_funds_withdrawal(field.into());
8579            self
8580        }
8581        ///If `literal` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8582        pub fn literal_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
8583            self.literal.as_mut().map(|field| field as _)
8584        }
8585        ///Returns a mutable reference to `literal`.
8586        ///If the field is unset, it is first initialized with the default value.
8587        pub fn literal_mut(&mut self) -> &mut ::prost_types::Value {
8588            self.literal.get_or_insert_default()
8589        }
8590        ///If `literal` is set, returns [`Some`] with the value; otherwise returns [`None`].
8591        pub fn literal_opt(&self) -> Option<&::prost_types::Value> {
8592            self.literal.as_ref().map(|field| field as _)
8593        }
8594        ///Sets `literal` with the provided value.
8595        pub fn set_literal<T: Into<::prost_types::Value>>(&mut self, field: T) {
8596            self.literal = Some(field.into().into());
8597        }
8598        ///Sets `literal` with the provided value.
8599        pub fn with_literal<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
8600            self.set_literal(field.into());
8601            self
8602        }
8603    }
8604    impl super::Jwk {
8605        pub const fn const_default() -> Self {
8606            Self {
8607                kty: None,
8608                e: None,
8609                n: None,
8610                alg: None,
8611            }
8612        }
8613        #[doc(hidden)]
8614        pub fn default_instance() -> &'static Self {
8615            static DEFAULT: super::Jwk = super::Jwk::const_default();
8616            &DEFAULT
8617        }
8618        ///If `kty` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8619        pub fn kty_opt_mut(&mut self) -> Option<&mut String> {
8620            self.kty.as_mut().map(|field| field as _)
8621        }
8622        ///Returns a mutable reference to `kty`.
8623        ///If the field is unset, it is first initialized with the default value.
8624        pub fn kty_mut(&mut self) -> &mut String {
8625            self.kty.get_or_insert_default()
8626        }
8627        ///If `kty` is set, returns [`Some`] with the value; otherwise returns [`None`].
8628        pub fn kty_opt(&self) -> Option<&str> {
8629            self.kty.as_ref().map(|field| field as _)
8630        }
8631        ///Sets `kty` with the provided value.
8632        pub fn set_kty<T: Into<String>>(&mut self, field: T) {
8633            self.kty = Some(field.into().into());
8634        }
8635        ///Sets `kty` with the provided value.
8636        pub fn with_kty<T: Into<String>>(mut self, field: T) -> Self {
8637            self.set_kty(field.into());
8638            self
8639        }
8640        ///If `e` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8641        pub fn e_opt_mut(&mut self) -> Option<&mut String> {
8642            self.e.as_mut().map(|field| field as _)
8643        }
8644        ///Returns a mutable reference to `e`.
8645        ///If the field is unset, it is first initialized with the default value.
8646        pub fn e_mut(&mut self) -> &mut String {
8647            self.e.get_or_insert_default()
8648        }
8649        ///If `e` is set, returns [`Some`] with the value; otherwise returns [`None`].
8650        pub fn e_opt(&self) -> Option<&str> {
8651            self.e.as_ref().map(|field| field as _)
8652        }
8653        ///Sets `e` with the provided value.
8654        pub fn set_e<T: Into<String>>(&mut self, field: T) {
8655            self.e = Some(field.into().into());
8656        }
8657        ///Sets `e` with the provided value.
8658        pub fn with_e<T: Into<String>>(mut self, field: T) -> Self {
8659            self.set_e(field.into());
8660            self
8661        }
8662        ///If `n` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8663        pub fn n_opt_mut(&mut self) -> Option<&mut String> {
8664            self.n.as_mut().map(|field| field as _)
8665        }
8666        ///Returns a mutable reference to `n`.
8667        ///If the field is unset, it is first initialized with the default value.
8668        pub fn n_mut(&mut self) -> &mut String {
8669            self.n.get_or_insert_default()
8670        }
8671        ///If `n` is set, returns [`Some`] with the value; otherwise returns [`None`].
8672        pub fn n_opt(&self) -> Option<&str> {
8673            self.n.as_ref().map(|field| field as _)
8674        }
8675        ///Sets `n` with the provided value.
8676        pub fn set_n<T: Into<String>>(&mut self, field: T) {
8677            self.n = Some(field.into().into());
8678        }
8679        ///Sets `n` with the provided value.
8680        pub fn with_n<T: Into<String>>(mut self, field: T) -> Self {
8681            self.set_n(field.into());
8682            self
8683        }
8684        ///If `alg` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8685        pub fn alg_opt_mut(&mut self) -> Option<&mut String> {
8686            self.alg.as_mut().map(|field| field as _)
8687        }
8688        ///Returns a mutable reference to `alg`.
8689        ///If the field is unset, it is first initialized with the default value.
8690        pub fn alg_mut(&mut self) -> &mut String {
8691            self.alg.get_or_insert_default()
8692        }
8693        ///If `alg` is set, returns [`Some`] with the value; otherwise returns [`None`].
8694        pub fn alg_opt(&self) -> Option<&str> {
8695            self.alg.as_ref().map(|field| field as _)
8696        }
8697        ///Sets `alg` with the provided value.
8698        pub fn set_alg<T: Into<String>>(&mut self, field: T) {
8699            self.alg = Some(field.into().into());
8700        }
8701        ///Sets `alg` with the provided value.
8702        pub fn with_alg<T: Into<String>>(mut self, field: T) -> Self {
8703            self.set_alg(field.into());
8704            self
8705        }
8706    }
8707    impl super::JwkId {
8708        pub const fn const_default() -> Self {
8709            Self { iss: None, kid: None }
8710        }
8711        #[doc(hidden)]
8712        pub fn default_instance() -> &'static Self {
8713            static DEFAULT: super::JwkId = super::JwkId::const_default();
8714            &DEFAULT
8715        }
8716        ///If `iss` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8717        pub fn iss_opt_mut(&mut self) -> Option<&mut String> {
8718            self.iss.as_mut().map(|field| field as _)
8719        }
8720        ///Returns a mutable reference to `iss`.
8721        ///If the field is unset, it is first initialized with the default value.
8722        pub fn iss_mut(&mut self) -> &mut String {
8723            self.iss.get_or_insert_default()
8724        }
8725        ///If `iss` is set, returns [`Some`] with the value; otherwise returns [`None`].
8726        pub fn iss_opt(&self) -> Option<&str> {
8727            self.iss.as_ref().map(|field| field as _)
8728        }
8729        ///Sets `iss` with the provided value.
8730        pub fn set_iss<T: Into<String>>(&mut self, field: T) {
8731            self.iss = Some(field.into().into());
8732        }
8733        ///Sets `iss` with the provided value.
8734        pub fn with_iss<T: Into<String>>(mut self, field: T) -> Self {
8735            self.set_iss(field.into());
8736            self
8737        }
8738        ///If `kid` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8739        pub fn kid_opt_mut(&mut self) -> Option<&mut String> {
8740            self.kid.as_mut().map(|field| field as _)
8741        }
8742        ///Returns a mutable reference to `kid`.
8743        ///If the field is unset, it is first initialized with the default value.
8744        pub fn kid_mut(&mut self) -> &mut String {
8745            self.kid.get_or_insert_default()
8746        }
8747        ///If `kid` is set, returns [`Some`] with the value; otherwise returns [`None`].
8748        pub fn kid_opt(&self) -> Option<&str> {
8749            self.kid.as_ref().map(|field| field as _)
8750        }
8751        ///Sets `kid` with the provided value.
8752        pub fn set_kid<T: Into<String>>(&mut self, field: T) {
8753            self.kid = Some(field.into().into());
8754        }
8755        ///Sets `kid` with the provided value.
8756        pub fn with_kid<T: Into<String>>(mut self, field: T) -> Self {
8757            self.set_kid(field.into());
8758            self
8759        }
8760    }
8761    impl super::Linkage {
8762        pub const fn const_default() -> Self {
8763            Self {
8764                original_id: None,
8765                upgraded_id: None,
8766                upgraded_version: None,
8767            }
8768        }
8769        #[doc(hidden)]
8770        pub fn default_instance() -> &'static Self {
8771            static DEFAULT: super::Linkage = super::Linkage::const_default();
8772            &DEFAULT
8773        }
8774        ///If `original_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8775        pub fn original_id_opt_mut(&mut self) -> Option<&mut String> {
8776            self.original_id.as_mut().map(|field| field as _)
8777        }
8778        ///Returns a mutable reference to `original_id`.
8779        ///If the field is unset, it is first initialized with the default value.
8780        pub fn original_id_mut(&mut self) -> &mut String {
8781            self.original_id.get_or_insert_default()
8782        }
8783        ///If `original_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
8784        pub fn original_id_opt(&self) -> Option<&str> {
8785            self.original_id.as_ref().map(|field| field as _)
8786        }
8787        ///Sets `original_id` with the provided value.
8788        pub fn set_original_id<T: Into<String>>(&mut self, field: T) {
8789            self.original_id = Some(field.into().into());
8790        }
8791        ///Sets `original_id` with the provided value.
8792        pub fn with_original_id<T: Into<String>>(mut self, field: T) -> Self {
8793            self.set_original_id(field.into());
8794            self
8795        }
8796        ///If `upgraded_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8797        pub fn upgraded_id_opt_mut(&mut self) -> Option<&mut String> {
8798            self.upgraded_id.as_mut().map(|field| field as _)
8799        }
8800        ///Returns a mutable reference to `upgraded_id`.
8801        ///If the field is unset, it is first initialized with the default value.
8802        pub fn upgraded_id_mut(&mut self) -> &mut String {
8803            self.upgraded_id.get_or_insert_default()
8804        }
8805        ///If `upgraded_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
8806        pub fn upgraded_id_opt(&self) -> Option<&str> {
8807            self.upgraded_id.as_ref().map(|field| field as _)
8808        }
8809        ///Sets `upgraded_id` with the provided value.
8810        pub fn set_upgraded_id<T: Into<String>>(&mut self, field: T) {
8811            self.upgraded_id = Some(field.into().into());
8812        }
8813        ///Sets `upgraded_id` with the provided value.
8814        pub fn with_upgraded_id<T: Into<String>>(mut self, field: T) -> Self {
8815            self.set_upgraded_id(field.into());
8816            self
8817        }
8818        ///If `upgraded_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8819        pub fn upgraded_version_opt_mut(&mut self) -> Option<&mut u64> {
8820            self.upgraded_version.as_mut().map(|field| field as _)
8821        }
8822        ///Returns a mutable reference to `upgraded_version`.
8823        ///If the field is unset, it is first initialized with the default value.
8824        pub fn upgraded_version_mut(&mut self) -> &mut u64 {
8825            self.upgraded_version.get_or_insert_default()
8826        }
8827        ///If `upgraded_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
8828        pub fn upgraded_version_opt(&self) -> Option<u64> {
8829            self.upgraded_version.as_ref().map(|field| *field)
8830        }
8831        ///Sets `upgraded_version` with the provided value.
8832        pub fn set_upgraded_version(&mut self, field: u64) {
8833            self.upgraded_version = Some(field);
8834        }
8835        ///Sets `upgraded_version` with the provided value.
8836        pub fn with_upgraded_version(mut self, field: u64) -> Self {
8837            self.set_upgraded_version(field);
8838            self
8839        }
8840    }
8841    impl super::ListBalancesRequest {
8842        pub const fn const_default() -> Self {
8843            Self {
8844                owner: None,
8845                page_size: None,
8846                page_token: None,
8847            }
8848        }
8849        #[doc(hidden)]
8850        pub fn default_instance() -> &'static Self {
8851            static DEFAULT: super::ListBalancesRequest = super::ListBalancesRequest::const_default();
8852            &DEFAULT
8853        }
8854        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8855        pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
8856            self.owner.as_mut().map(|field| field as _)
8857        }
8858        ///Returns a mutable reference to `owner`.
8859        ///If the field is unset, it is first initialized with the default value.
8860        pub fn owner_mut(&mut self) -> &mut String {
8861            self.owner.get_or_insert_default()
8862        }
8863        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
8864        pub fn owner_opt(&self) -> Option<&str> {
8865            self.owner.as_ref().map(|field| field as _)
8866        }
8867        ///Sets `owner` with the provided value.
8868        pub fn set_owner<T: Into<String>>(&mut self, field: T) {
8869            self.owner = Some(field.into().into());
8870        }
8871        ///Sets `owner` with the provided value.
8872        pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
8873            self.set_owner(field.into());
8874            self
8875        }
8876        ///If `page_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8877        pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
8878            self.page_size.as_mut().map(|field| field as _)
8879        }
8880        ///Returns a mutable reference to `page_size`.
8881        ///If the field is unset, it is first initialized with the default value.
8882        pub fn page_size_mut(&mut self) -> &mut u32 {
8883            self.page_size.get_or_insert_default()
8884        }
8885        ///If `page_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
8886        pub fn page_size_opt(&self) -> Option<u32> {
8887            self.page_size.as_ref().map(|field| *field)
8888        }
8889        ///Sets `page_size` with the provided value.
8890        pub fn set_page_size(&mut self, field: u32) {
8891            self.page_size = Some(field);
8892        }
8893        ///Sets `page_size` with the provided value.
8894        pub fn with_page_size(mut self, field: u32) -> Self {
8895            self.set_page_size(field);
8896            self
8897        }
8898        ///If `page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
8899        pub fn page_token_opt(&self) -> Option<&[u8]> {
8900            self.page_token.as_ref().map(|field| field as _)
8901        }
8902        ///Sets `page_token` with the provided value.
8903        pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
8904            self.page_token = Some(field.into().into());
8905        }
8906        ///Sets `page_token` with the provided value.
8907        pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
8908            mut self,
8909            field: T,
8910        ) -> Self {
8911            self.set_page_token(field.into());
8912            self
8913        }
8914    }
8915    impl super::ListBalancesResponse {
8916        pub const fn const_default() -> Self {
8917            Self {
8918                balances: Vec::new(),
8919                next_page_token: None,
8920            }
8921        }
8922        #[doc(hidden)]
8923        pub fn default_instance() -> &'static Self {
8924            static DEFAULT: super::ListBalancesResponse = super::ListBalancesResponse::const_default();
8925            &DEFAULT
8926        }
8927        ///Returns the value of `balances`, or the default value if `balances` is unset.
8928        pub fn balances(&self) -> &[super::Balance] {
8929            &self.balances
8930        }
8931        ///Returns a mutable reference to `balances`.
8932        ///If the field is unset, it is first initialized with the default value.
8933        pub fn balances_mut(&mut self) -> &mut Vec<super::Balance> {
8934            &mut self.balances
8935        }
8936        ///Sets `balances` with the provided value.
8937        pub fn set_balances(&mut self, field: Vec<super::Balance>) {
8938            self.balances = field;
8939        }
8940        ///Sets `balances` with the provided value.
8941        pub fn with_balances(mut self, field: Vec<super::Balance>) -> Self {
8942            self.set_balances(field);
8943            self
8944        }
8945        ///If `next_page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
8946        pub fn next_page_token_opt(&self) -> Option<&[u8]> {
8947            self.next_page_token.as_ref().map(|field| field as _)
8948        }
8949        ///Sets `next_page_token` with the provided value.
8950        pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
8951            self.next_page_token = Some(field.into().into());
8952        }
8953        ///Sets `next_page_token` with the provided value.
8954        pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
8955            mut self,
8956            field: T,
8957        ) -> Self {
8958            self.set_next_page_token(field.into());
8959            self
8960        }
8961    }
8962    impl super::ListDynamicFieldsRequest {
8963        pub const fn const_default() -> Self {
8964            Self {
8965                parent: None,
8966                page_size: None,
8967                page_token: None,
8968                read_mask: None,
8969            }
8970        }
8971        #[doc(hidden)]
8972        pub fn default_instance() -> &'static Self {
8973            static DEFAULT: super::ListDynamicFieldsRequest = super::ListDynamicFieldsRequest::const_default();
8974            &DEFAULT
8975        }
8976        ///If `parent` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8977        pub fn parent_opt_mut(&mut self) -> Option<&mut String> {
8978            self.parent.as_mut().map(|field| field as _)
8979        }
8980        ///Returns a mutable reference to `parent`.
8981        ///If the field is unset, it is first initialized with the default value.
8982        pub fn parent_mut(&mut self) -> &mut String {
8983            self.parent.get_or_insert_default()
8984        }
8985        ///If `parent` is set, returns [`Some`] with the value; otherwise returns [`None`].
8986        pub fn parent_opt(&self) -> Option<&str> {
8987            self.parent.as_ref().map(|field| field as _)
8988        }
8989        ///Sets `parent` with the provided value.
8990        pub fn set_parent<T: Into<String>>(&mut self, field: T) {
8991            self.parent = Some(field.into().into());
8992        }
8993        ///Sets `parent` with the provided value.
8994        pub fn with_parent<T: Into<String>>(mut self, field: T) -> Self {
8995            self.set_parent(field.into());
8996            self
8997        }
8998        ///If `page_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
8999        pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
9000            self.page_size.as_mut().map(|field| field as _)
9001        }
9002        ///Returns a mutable reference to `page_size`.
9003        ///If the field is unset, it is first initialized with the default value.
9004        pub fn page_size_mut(&mut self) -> &mut u32 {
9005            self.page_size.get_or_insert_default()
9006        }
9007        ///If `page_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
9008        pub fn page_size_opt(&self) -> Option<u32> {
9009            self.page_size.as_ref().map(|field| *field)
9010        }
9011        ///Sets `page_size` with the provided value.
9012        pub fn set_page_size(&mut self, field: u32) {
9013            self.page_size = Some(field);
9014        }
9015        ///Sets `page_size` with the provided value.
9016        pub fn with_page_size(mut self, field: u32) -> Self {
9017            self.set_page_size(field);
9018            self
9019        }
9020        ///If `page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
9021        pub fn page_token_opt(&self) -> Option<&[u8]> {
9022            self.page_token.as_ref().map(|field| field as _)
9023        }
9024        ///Sets `page_token` with the provided value.
9025        pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9026            self.page_token = Some(field.into().into());
9027        }
9028        ///Sets `page_token` with the provided value.
9029        pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
9030            mut self,
9031            field: T,
9032        ) -> Self {
9033            self.set_page_token(field.into());
9034            self
9035        }
9036        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9037        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
9038            self.read_mask.as_mut().map(|field| field as _)
9039        }
9040        ///Returns a mutable reference to `read_mask`.
9041        ///If the field is unset, it is first initialized with the default value.
9042        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
9043            self.read_mask.get_or_insert_default()
9044        }
9045        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
9046        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
9047            self.read_mask.as_ref().map(|field| field as _)
9048        }
9049        ///Sets `read_mask` with the provided value.
9050        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
9051            self.read_mask = Some(field.into().into());
9052        }
9053        ///Sets `read_mask` with the provided value.
9054        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
9055            mut self,
9056            field: T,
9057        ) -> Self {
9058            self.set_read_mask(field.into());
9059            self
9060        }
9061    }
9062    impl super::ListDynamicFieldsResponse {
9063        pub const fn const_default() -> Self {
9064            Self {
9065                dynamic_fields: Vec::new(),
9066                next_page_token: None,
9067            }
9068        }
9069        #[doc(hidden)]
9070        pub fn default_instance() -> &'static Self {
9071            static DEFAULT: super::ListDynamicFieldsResponse = super::ListDynamicFieldsResponse::const_default();
9072            &DEFAULT
9073        }
9074        ///Returns the value of `dynamic_fields`, or the default value if `dynamic_fields` is unset.
9075        pub fn dynamic_fields(&self) -> &[super::DynamicField] {
9076            &self.dynamic_fields
9077        }
9078        ///Returns a mutable reference to `dynamic_fields`.
9079        ///If the field is unset, it is first initialized with the default value.
9080        pub fn dynamic_fields_mut(&mut self) -> &mut Vec<super::DynamicField> {
9081            &mut self.dynamic_fields
9082        }
9083        ///Sets `dynamic_fields` with the provided value.
9084        pub fn set_dynamic_fields(&mut self, field: Vec<super::DynamicField>) {
9085            self.dynamic_fields = field;
9086        }
9087        ///Sets `dynamic_fields` with the provided value.
9088        pub fn with_dynamic_fields(mut self, field: Vec<super::DynamicField>) -> Self {
9089            self.set_dynamic_fields(field);
9090            self
9091        }
9092        ///If `next_page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
9093        pub fn next_page_token_opt(&self) -> Option<&[u8]> {
9094            self.next_page_token.as_ref().map(|field| field as _)
9095        }
9096        ///Sets `next_page_token` with the provided value.
9097        pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9098            self.next_page_token = Some(field.into().into());
9099        }
9100        ///Sets `next_page_token` with the provided value.
9101        pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
9102            mut self,
9103            field: T,
9104        ) -> Self {
9105            self.set_next_page_token(field.into());
9106            self
9107        }
9108    }
9109    impl super::ListOwnedObjectsRequest {
9110        pub const fn const_default() -> Self {
9111            Self {
9112                owner: None,
9113                page_size: None,
9114                page_token: None,
9115                read_mask: None,
9116                object_type: None,
9117            }
9118        }
9119        #[doc(hidden)]
9120        pub fn default_instance() -> &'static Self {
9121            static DEFAULT: super::ListOwnedObjectsRequest = super::ListOwnedObjectsRequest::const_default();
9122            &DEFAULT
9123        }
9124        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9125        pub fn owner_opt_mut(&mut self) -> Option<&mut String> {
9126            self.owner.as_mut().map(|field| field as _)
9127        }
9128        ///Returns a mutable reference to `owner`.
9129        ///If the field is unset, it is first initialized with the default value.
9130        pub fn owner_mut(&mut self) -> &mut String {
9131            self.owner.get_or_insert_default()
9132        }
9133        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
9134        pub fn owner_opt(&self) -> Option<&str> {
9135            self.owner.as_ref().map(|field| field as _)
9136        }
9137        ///Sets `owner` with the provided value.
9138        pub fn set_owner<T: Into<String>>(&mut self, field: T) {
9139            self.owner = Some(field.into().into());
9140        }
9141        ///Sets `owner` with the provided value.
9142        pub fn with_owner<T: Into<String>>(mut self, field: T) -> Self {
9143            self.set_owner(field.into());
9144            self
9145        }
9146        ///If `page_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9147        pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
9148            self.page_size.as_mut().map(|field| field as _)
9149        }
9150        ///Returns a mutable reference to `page_size`.
9151        ///If the field is unset, it is first initialized with the default value.
9152        pub fn page_size_mut(&mut self) -> &mut u32 {
9153            self.page_size.get_or_insert_default()
9154        }
9155        ///If `page_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
9156        pub fn page_size_opt(&self) -> Option<u32> {
9157            self.page_size.as_ref().map(|field| *field)
9158        }
9159        ///Sets `page_size` with the provided value.
9160        pub fn set_page_size(&mut self, field: u32) {
9161            self.page_size = Some(field);
9162        }
9163        ///Sets `page_size` with the provided value.
9164        pub fn with_page_size(mut self, field: u32) -> Self {
9165            self.set_page_size(field);
9166            self
9167        }
9168        ///If `page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
9169        pub fn page_token_opt(&self) -> Option<&[u8]> {
9170            self.page_token.as_ref().map(|field| field as _)
9171        }
9172        ///Sets `page_token` with the provided value.
9173        pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9174            self.page_token = Some(field.into().into());
9175        }
9176        ///Sets `page_token` with the provided value.
9177        pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
9178            mut self,
9179            field: T,
9180        ) -> Self {
9181            self.set_page_token(field.into());
9182            self
9183        }
9184        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9185        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
9186            self.read_mask.as_mut().map(|field| field as _)
9187        }
9188        ///Returns a mutable reference to `read_mask`.
9189        ///If the field is unset, it is first initialized with the default value.
9190        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
9191            self.read_mask.get_or_insert_default()
9192        }
9193        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
9194        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
9195            self.read_mask.as_ref().map(|field| field as _)
9196        }
9197        ///Sets `read_mask` with the provided value.
9198        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
9199            self.read_mask = Some(field.into().into());
9200        }
9201        ///Sets `read_mask` with the provided value.
9202        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
9203            mut self,
9204            field: T,
9205        ) -> Self {
9206            self.set_read_mask(field.into());
9207            self
9208        }
9209        ///If `object_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9210        pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
9211            self.object_type.as_mut().map(|field| field as _)
9212        }
9213        ///Returns a mutable reference to `object_type`.
9214        ///If the field is unset, it is first initialized with the default value.
9215        pub fn object_type_mut(&mut self) -> &mut String {
9216            self.object_type.get_or_insert_default()
9217        }
9218        ///If `object_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
9219        pub fn object_type_opt(&self) -> Option<&str> {
9220            self.object_type.as_ref().map(|field| field as _)
9221        }
9222        ///Sets `object_type` with the provided value.
9223        pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
9224            self.object_type = Some(field.into().into());
9225        }
9226        ///Sets `object_type` with the provided value.
9227        pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
9228            self.set_object_type(field.into());
9229            self
9230        }
9231    }
9232    impl super::ListOwnedObjectsResponse {
9233        pub const fn const_default() -> Self {
9234            Self {
9235                objects: Vec::new(),
9236                next_page_token: None,
9237            }
9238        }
9239        #[doc(hidden)]
9240        pub fn default_instance() -> &'static Self {
9241            static DEFAULT: super::ListOwnedObjectsResponse = super::ListOwnedObjectsResponse::const_default();
9242            &DEFAULT
9243        }
9244        ///Returns the value of `objects`, or the default value if `objects` is unset.
9245        pub fn objects(&self) -> &[super::Object] {
9246            &self.objects
9247        }
9248        ///Returns a mutable reference to `objects`.
9249        ///If the field is unset, it is first initialized with the default value.
9250        pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
9251            &mut self.objects
9252        }
9253        ///Sets `objects` with the provided value.
9254        pub fn set_objects(&mut self, field: Vec<super::Object>) {
9255            self.objects = field;
9256        }
9257        ///Sets `objects` with the provided value.
9258        pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
9259            self.set_objects(field);
9260            self
9261        }
9262        ///If `next_page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
9263        pub fn next_page_token_opt(&self) -> Option<&[u8]> {
9264            self.next_page_token.as_ref().map(|field| field as _)
9265        }
9266        ///Sets `next_page_token` with the provided value.
9267        pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9268            self.next_page_token = Some(field.into().into());
9269        }
9270        ///Sets `next_page_token` with the provided value.
9271        pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
9272            mut self,
9273            field: T,
9274        ) -> Self {
9275            self.set_next_page_token(field.into());
9276            self
9277        }
9278    }
9279    impl super::ListPackageVersionsRequest {
9280        pub const fn const_default() -> Self {
9281            Self {
9282                package_id: None,
9283                page_size: None,
9284                page_token: None,
9285            }
9286        }
9287        #[doc(hidden)]
9288        pub fn default_instance() -> &'static Self {
9289            static DEFAULT: super::ListPackageVersionsRequest = super::ListPackageVersionsRequest::const_default();
9290            &DEFAULT
9291        }
9292        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9293        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
9294            self.package_id.as_mut().map(|field| field as _)
9295        }
9296        ///Returns a mutable reference to `package_id`.
9297        ///If the field is unset, it is first initialized with the default value.
9298        pub fn package_id_mut(&mut self) -> &mut String {
9299            self.package_id.get_or_insert_default()
9300        }
9301        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
9302        pub fn package_id_opt(&self) -> Option<&str> {
9303            self.package_id.as_ref().map(|field| field as _)
9304        }
9305        ///Sets `package_id` with the provided value.
9306        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
9307            self.package_id = Some(field.into().into());
9308        }
9309        ///Sets `package_id` with the provided value.
9310        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
9311            self.set_package_id(field.into());
9312            self
9313        }
9314        ///If `page_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9315        pub fn page_size_opt_mut(&mut self) -> Option<&mut u32> {
9316            self.page_size.as_mut().map(|field| field as _)
9317        }
9318        ///Returns a mutable reference to `page_size`.
9319        ///If the field is unset, it is first initialized with the default value.
9320        pub fn page_size_mut(&mut self) -> &mut u32 {
9321            self.page_size.get_or_insert_default()
9322        }
9323        ///If `page_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
9324        pub fn page_size_opt(&self) -> Option<u32> {
9325            self.page_size.as_ref().map(|field| *field)
9326        }
9327        ///Sets `page_size` with the provided value.
9328        pub fn set_page_size(&mut self, field: u32) {
9329            self.page_size = Some(field);
9330        }
9331        ///Sets `page_size` with the provided value.
9332        pub fn with_page_size(mut self, field: u32) -> Self {
9333            self.set_page_size(field);
9334            self
9335        }
9336        ///If `page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
9337        pub fn page_token_opt(&self) -> Option<&[u8]> {
9338            self.page_token.as_ref().map(|field| field as _)
9339        }
9340        ///Sets `page_token` with the provided value.
9341        pub fn set_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9342            self.page_token = Some(field.into().into());
9343        }
9344        ///Sets `page_token` with the provided value.
9345        pub fn with_page_token<T: Into<::prost::bytes::Bytes>>(
9346            mut self,
9347            field: T,
9348        ) -> Self {
9349            self.set_page_token(field.into());
9350            self
9351        }
9352    }
9353    impl super::ListPackageVersionsResponse {
9354        pub const fn const_default() -> Self {
9355            Self {
9356                versions: Vec::new(),
9357                next_page_token: None,
9358            }
9359        }
9360        #[doc(hidden)]
9361        pub fn default_instance() -> &'static Self {
9362            static DEFAULT: super::ListPackageVersionsResponse = super::ListPackageVersionsResponse::const_default();
9363            &DEFAULT
9364        }
9365        ///Returns the value of `versions`, or the default value if `versions` is unset.
9366        pub fn versions(&self) -> &[super::PackageVersion] {
9367            &self.versions
9368        }
9369        ///Returns a mutable reference to `versions`.
9370        ///If the field is unset, it is first initialized with the default value.
9371        pub fn versions_mut(&mut self) -> &mut Vec<super::PackageVersion> {
9372            &mut self.versions
9373        }
9374        ///Sets `versions` with the provided value.
9375        pub fn set_versions(&mut self, field: Vec<super::PackageVersion>) {
9376            self.versions = field;
9377        }
9378        ///Sets `versions` with the provided value.
9379        pub fn with_versions(mut self, field: Vec<super::PackageVersion>) -> Self {
9380            self.set_versions(field);
9381            self
9382        }
9383        ///If `next_page_token` is set, returns [`Some`] with the value; otherwise returns [`None`].
9384        pub fn next_page_token_opt(&self) -> Option<&[u8]> {
9385            self.next_page_token.as_ref().map(|field| field as _)
9386        }
9387        ///Sets `next_page_token` with the provided value.
9388        pub fn set_next_page_token<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9389            self.next_page_token = Some(field.into().into());
9390        }
9391        ///Sets `next_page_token` with the provided value.
9392        pub fn with_next_page_token<T: Into<::prost::bytes::Bytes>>(
9393            mut self,
9394            field: T,
9395        ) -> Self {
9396            self.set_next_page_token(field.into());
9397            self
9398        }
9399    }
9400    impl super::LookupNameRequest {
9401        pub const fn const_default() -> Self {
9402            Self { name: None }
9403        }
9404        #[doc(hidden)]
9405        pub fn default_instance() -> &'static Self {
9406            static DEFAULT: super::LookupNameRequest = super::LookupNameRequest::const_default();
9407            &DEFAULT
9408        }
9409        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9410        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
9411            self.name.as_mut().map(|field| field as _)
9412        }
9413        ///Returns a mutable reference to `name`.
9414        ///If the field is unset, it is first initialized with the default value.
9415        pub fn name_mut(&mut self) -> &mut String {
9416            self.name.get_or_insert_default()
9417        }
9418        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
9419        pub fn name_opt(&self) -> Option<&str> {
9420            self.name.as_ref().map(|field| field as _)
9421        }
9422        ///Sets `name` with the provided value.
9423        pub fn set_name<T: Into<String>>(&mut self, field: T) {
9424            self.name = Some(field.into().into());
9425        }
9426        ///Sets `name` with the provided value.
9427        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
9428            self.set_name(field.into());
9429            self
9430        }
9431    }
9432    impl super::LookupNameResponse {
9433        pub const fn const_default() -> Self {
9434            Self { record: None }
9435        }
9436        #[doc(hidden)]
9437        pub fn default_instance() -> &'static Self {
9438            static DEFAULT: super::LookupNameResponse = super::LookupNameResponse::const_default();
9439            &DEFAULT
9440        }
9441        ///Returns the value of `record`, or the default value if `record` is unset.
9442        pub fn record(&self) -> &super::NameRecord {
9443            self.record
9444                .as_ref()
9445                .map(|field| field as _)
9446                .unwrap_or_else(|| super::NameRecord::default_instance() as _)
9447        }
9448        ///If `record` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9449        pub fn record_opt_mut(&mut self) -> Option<&mut super::NameRecord> {
9450            self.record.as_mut().map(|field| field as _)
9451        }
9452        ///Returns a mutable reference to `record`.
9453        ///If the field is unset, it is first initialized with the default value.
9454        pub fn record_mut(&mut self) -> &mut super::NameRecord {
9455            self.record.get_or_insert_default()
9456        }
9457        ///If `record` is set, returns [`Some`] with the value; otherwise returns [`None`].
9458        pub fn record_opt(&self) -> Option<&super::NameRecord> {
9459            self.record.as_ref().map(|field| field as _)
9460        }
9461        ///Sets `record` with the provided value.
9462        pub fn set_record<T: Into<super::NameRecord>>(&mut self, field: T) {
9463            self.record = Some(field.into().into());
9464        }
9465        ///Sets `record` with the provided value.
9466        pub fn with_record<T: Into<super::NameRecord>>(mut self, field: T) -> Self {
9467            self.set_record(field.into());
9468            self
9469        }
9470    }
9471    impl super::MakeMoveVector {
9472        pub const fn const_default() -> Self {
9473            Self {
9474                element_type: None,
9475                elements: Vec::new(),
9476            }
9477        }
9478        #[doc(hidden)]
9479        pub fn default_instance() -> &'static Self {
9480            static DEFAULT: super::MakeMoveVector = super::MakeMoveVector::const_default();
9481            &DEFAULT
9482        }
9483        ///If `element_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9484        pub fn element_type_opt_mut(&mut self) -> Option<&mut String> {
9485            self.element_type.as_mut().map(|field| field as _)
9486        }
9487        ///Returns a mutable reference to `element_type`.
9488        ///If the field is unset, it is first initialized with the default value.
9489        pub fn element_type_mut(&mut self) -> &mut String {
9490            self.element_type.get_or_insert_default()
9491        }
9492        ///If `element_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
9493        pub fn element_type_opt(&self) -> Option<&str> {
9494            self.element_type.as_ref().map(|field| field as _)
9495        }
9496        ///Sets `element_type` with the provided value.
9497        pub fn set_element_type<T: Into<String>>(&mut self, field: T) {
9498            self.element_type = Some(field.into().into());
9499        }
9500        ///Sets `element_type` with the provided value.
9501        pub fn with_element_type<T: Into<String>>(mut self, field: T) -> Self {
9502            self.set_element_type(field.into());
9503            self
9504        }
9505        ///Returns the value of `elements`, or the default value if `elements` is unset.
9506        pub fn elements(&self) -> &[super::Argument] {
9507            &self.elements
9508        }
9509        ///Returns a mutable reference to `elements`.
9510        ///If the field is unset, it is first initialized with the default value.
9511        pub fn elements_mut(&mut self) -> &mut Vec<super::Argument> {
9512            &mut self.elements
9513        }
9514        ///Sets `elements` with the provided value.
9515        pub fn set_elements(&mut self, field: Vec<super::Argument>) {
9516            self.elements = field;
9517        }
9518        ///Sets `elements` with the provided value.
9519        pub fn with_elements(mut self, field: Vec<super::Argument>) -> Self {
9520            self.set_elements(field);
9521            self
9522        }
9523    }
9524    impl super::MergeCoins {
9525        pub const fn const_default() -> Self {
9526            Self {
9527                coin: None,
9528                coins_to_merge: Vec::new(),
9529            }
9530        }
9531        #[doc(hidden)]
9532        pub fn default_instance() -> &'static Self {
9533            static DEFAULT: super::MergeCoins = super::MergeCoins::const_default();
9534            &DEFAULT
9535        }
9536        ///Returns the value of `coin`, or the default value if `coin` is unset.
9537        pub fn coin(&self) -> &super::Argument {
9538            self.coin
9539                .as_ref()
9540                .map(|field| field as _)
9541                .unwrap_or_else(|| super::Argument::default_instance() as _)
9542        }
9543        ///If `coin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9544        pub fn coin_opt_mut(&mut self) -> Option<&mut super::Argument> {
9545            self.coin.as_mut().map(|field| field as _)
9546        }
9547        ///Returns a mutable reference to `coin`.
9548        ///If the field is unset, it is first initialized with the default value.
9549        pub fn coin_mut(&mut self) -> &mut super::Argument {
9550            self.coin.get_or_insert_default()
9551        }
9552        ///If `coin` is set, returns [`Some`] with the value; otherwise returns [`None`].
9553        pub fn coin_opt(&self) -> Option<&super::Argument> {
9554            self.coin.as_ref().map(|field| field as _)
9555        }
9556        ///Sets `coin` with the provided value.
9557        pub fn set_coin<T: Into<super::Argument>>(&mut self, field: T) {
9558            self.coin = Some(field.into().into());
9559        }
9560        ///Sets `coin` with the provided value.
9561        pub fn with_coin<T: Into<super::Argument>>(mut self, field: T) -> Self {
9562            self.set_coin(field.into());
9563            self
9564        }
9565        ///Returns the value of `coins_to_merge`, or the default value if `coins_to_merge` is unset.
9566        pub fn coins_to_merge(&self) -> &[super::Argument] {
9567            &self.coins_to_merge
9568        }
9569        ///Returns a mutable reference to `coins_to_merge`.
9570        ///If the field is unset, it is first initialized with the default value.
9571        pub fn coins_to_merge_mut(&mut self) -> &mut Vec<super::Argument> {
9572            &mut self.coins_to_merge
9573        }
9574        ///Sets `coins_to_merge` with the provided value.
9575        pub fn set_coins_to_merge(&mut self, field: Vec<super::Argument>) {
9576            self.coins_to_merge = field;
9577        }
9578        ///Sets `coins_to_merge` with the provided value.
9579        pub fn with_coins_to_merge(mut self, field: Vec<super::Argument>) -> Self {
9580            self.set_coins_to_merge(field);
9581            self
9582        }
9583    }
9584    impl super::Module {
9585        pub const fn const_default() -> Self {
9586            Self {
9587                name: None,
9588                contents: None,
9589                datatypes: Vec::new(),
9590                functions: Vec::new(),
9591            }
9592        }
9593        #[doc(hidden)]
9594        pub fn default_instance() -> &'static Self {
9595            static DEFAULT: super::Module = super::Module::const_default();
9596            &DEFAULT
9597        }
9598        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9599        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
9600            self.name.as_mut().map(|field| field as _)
9601        }
9602        ///Returns a mutable reference to `name`.
9603        ///If the field is unset, it is first initialized with the default value.
9604        pub fn name_mut(&mut self) -> &mut String {
9605            self.name.get_or_insert_default()
9606        }
9607        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
9608        pub fn name_opt(&self) -> Option<&str> {
9609            self.name.as_ref().map(|field| field as _)
9610        }
9611        ///Sets `name` with the provided value.
9612        pub fn set_name<T: Into<String>>(&mut self, field: T) {
9613            self.name = Some(field.into().into());
9614        }
9615        ///Sets `name` with the provided value.
9616        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
9617            self.set_name(field.into());
9618            self
9619        }
9620        ///If `contents` is set, returns [`Some`] with the value; otherwise returns [`None`].
9621        pub fn contents_opt(&self) -> Option<&[u8]> {
9622            self.contents.as_ref().map(|field| field as _)
9623        }
9624        ///Sets `contents` with the provided value.
9625        pub fn set_contents<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
9626            self.contents = Some(field.into().into());
9627        }
9628        ///Sets `contents` with the provided value.
9629        pub fn with_contents<T: Into<::prost::bytes::Bytes>>(
9630            mut self,
9631            field: T,
9632        ) -> Self {
9633            self.set_contents(field.into());
9634            self
9635        }
9636        ///Returns the value of `datatypes`, or the default value if `datatypes` is unset.
9637        pub fn datatypes(&self) -> &[super::DatatypeDescriptor] {
9638            &self.datatypes
9639        }
9640        ///Returns a mutable reference to `datatypes`.
9641        ///If the field is unset, it is first initialized with the default value.
9642        pub fn datatypes_mut(&mut self) -> &mut Vec<super::DatatypeDescriptor> {
9643            &mut self.datatypes
9644        }
9645        ///Sets `datatypes` with the provided value.
9646        pub fn set_datatypes(&mut self, field: Vec<super::DatatypeDescriptor>) {
9647            self.datatypes = field;
9648        }
9649        ///Sets `datatypes` with the provided value.
9650        pub fn with_datatypes(mut self, field: Vec<super::DatatypeDescriptor>) -> Self {
9651            self.set_datatypes(field);
9652            self
9653        }
9654        ///Returns the value of `functions`, or the default value if `functions` is unset.
9655        pub fn functions(&self) -> &[super::FunctionDescriptor] {
9656            &self.functions
9657        }
9658        ///Returns a mutable reference to `functions`.
9659        ///If the field is unset, it is first initialized with the default value.
9660        pub fn functions_mut(&mut self) -> &mut Vec<super::FunctionDescriptor> {
9661            &mut self.functions
9662        }
9663        ///Sets `functions` with the provided value.
9664        pub fn set_functions(&mut self, field: Vec<super::FunctionDescriptor>) {
9665            self.functions = field;
9666        }
9667        ///Sets `functions` with the provided value.
9668        pub fn with_functions(mut self, field: Vec<super::FunctionDescriptor>) -> Self {
9669            self.set_functions(field);
9670            self
9671        }
9672    }
9673    impl super::MoveAbort {
9674        pub const fn const_default() -> Self {
9675            Self {
9676                abort_code: None,
9677                location: None,
9678                clever_error: None,
9679            }
9680        }
9681        #[doc(hidden)]
9682        pub fn default_instance() -> &'static Self {
9683            static DEFAULT: super::MoveAbort = super::MoveAbort::const_default();
9684            &DEFAULT
9685        }
9686        ///If `abort_code` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9687        pub fn abort_code_opt_mut(&mut self) -> Option<&mut u64> {
9688            self.abort_code.as_mut().map(|field| field as _)
9689        }
9690        ///Returns a mutable reference to `abort_code`.
9691        ///If the field is unset, it is first initialized with the default value.
9692        pub fn abort_code_mut(&mut self) -> &mut u64 {
9693            self.abort_code.get_or_insert_default()
9694        }
9695        ///If `abort_code` is set, returns [`Some`] with the value; otherwise returns [`None`].
9696        pub fn abort_code_opt(&self) -> Option<u64> {
9697            self.abort_code.as_ref().map(|field| *field)
9698        }
9699        ///Sets `abort_code` with the provided value.
9700        pub fn set_abort_code(&mut self, field: u64) {
9701            self.abort_code = Some(field);
9702        }
9703        ///Sets `abort_code` with the provided value.
9704        pub fn with_abort_code(mut self, field: u64) -> Self {
9705            self.set_abort_code(field);
9706            self
9707        }
9708        ///Returns the value of `location`, or the default value if `location` is unset.
9709        pub fn location(&self) -> &super::MoveLocation {
9710            self.location
9711                .as_ref()
9712                .map(|field| field as _)
9713                .unwrap_or_else(|| super::MoveLocation::default_instance() as _)
9714        }
9715        ///If `location` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9716        pub fn location_opt_mut(&mut self) -> Option<&mut super::MoveLocation> {
9717            self.location.as_mut().map(|field| field as _)
9718        }
9719        ///Returns a mutable reference to `location`.
9720        ///If the field is unset, it is first initialized with the default value.
9721        pub fn location_mut(&mut self) -> &mut super::MoveLocation {
9722            self.location.get_or_insert_default()
9723        }
9724        ///If `location` is set, returns [`Some`] with the value; otherwise returns [`None`].
9725        pub fn location_opt(&self) -> Option<&super::MoveLocation> {
9726            self.location.as_ref().map(|field| field as _)
9727        }
9728        ///Sets `location` with the provided value.
9729        pub fn set_location<T: Into<super::MoveLocation>>(&mut self, field: T) {
9730            self.location = Some(field.into().into());
9731        }
9732        ///Sets `location` with the provided value.
9733        pub fn with_location<T: Into<super::MoveLocation>>(mut self, field: T) -> Self {
9734            self.set_location(field.into());
9735            self
9736        }
9737        ///Returns the value of `clever_error`, or the default value if `clever_error` is unset.
9738        pub fn clever_error(&self) -> &super::CleverError {
9739            self.clever_error
9740                .as_ref()
9741                .map(|field| field as _)
9742                .unwrap_or_else(|| super::CleverError::default_instance() as _)
9743        }
9744        ///If `clever_error` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9745        pub fn clever_error_opt_mut(&mut self) -> Option<&mut super::CleverError> {
9746            self.clever_error.as_mut().map(|field| field as _)
9747        }
9748        ///Returns a mutable reference to `clever_error`.
9749        ///If the field is unset, it is first initialized with the default value.
9750        pub fn clever_error_mut(&mut self) -> &mut super::CleverError {
9751            self.clever_error.get_or_insert_default()
9752        }
9753        ///If `clever_error` is set, returns [`Some`] with the value; otherwise returns [`None`].
9754        pub fn clever_error_opt(&self) -> Option<&super::CleverError> {
9755            self.clever_error.as_ref().map(|field| field as _)
9756        }
9757        ///Sets `clever_error` with the provided value.
9758        pub fn set_clever_error<T: Into<super::CleverError>>(&mut self, field: T) {
9759            self.clever_error = Some(field.into().into());
9760        }
9761        ///Sets `clever_error` with the provided value.
9762        pub fn with_clever_error<T: Into<super::CleverError>>(
9763            mut self,
9764            field: T,
9765        ) -> Self {
9766            self.set_clever_error(field.into());
9767            self
9768        }
9769    }
9770    impl super::MoveCall {
9771        pub const fn const_default() -> Self {
9772            Self {
9773                package: None,
9774                module: None,
9775                function: None,
9776                type_arguments: Vec::new(),
9777                arguments: Vec::new(),
9778            }
9779        }
9780        #[doc(hidden)]
9781        pub fn default_instance() -> &'static Self {
9782            static DEFAULT: super::MoveCall = super::MoveCall::const_default();
9783            &DEFAULT
9784        }
9785        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9786        pub fn package_opt_mut(&mut self) -> Option<&mut String> {
9787            self.package.as_mut().map(|field| field as _)
9788        }
9789        ///Returns a mutable reference to `package`.
9790        ///If the field is unset, it is first initialized with the default value.
9791        pub fn package_mut(&mut self) -> &mut String {
9792            self.package.get_or_insert_default()
9793        }
9794        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
9795        pub fn package_opt(&self) -> Option<&str> {
9796            self.package.as_ref().map(|field| field as _)
9797        }
9798        ///Sets `package` with the provided value.
9799        pub fn set_package<T: Into<String>>(&mut self, field: T) {
9800            self.package = Some(field.into().into());
9801        }
9802        ///Sets `package` with the provided value.
9803        pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
9804            self.set_package(field.into());
9805            self
9806        }
9807        ///If `module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9808        pub fn module_opt_mut(&mut self) -> Option<&mut String> {
9809            self.module.as_mut().map(|field| field as _)
9810        }
9811        ///Returns a mutable reference to `module`.
9812        ///If the field is unset, it is first initialized with the default value.
9813        pub fn module_mut(&mut self) -> &mut String {
9814            self.module.get_or_insert_default()
9815        }
9816        ///If `module` is set, returns [`Some`] with the value; otherwise returns [`None`].
9817        pub fn module_opt(&self) -> Option<&str> {
9818            self.module.as_ref().map(|field| field as _)
9819        }
9820        ///Sets `module` with the provided value.
9821        pub fn set_module<T: Into<String>>(&mut self, field: T) {
9822            self.module = Some(field.into().into());
9823        }
9824        ///Sets `module` with the provided value.
9825        pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
9826            self.set_module(field.into());
9827            self
9828        }
9829        ///If `function` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9830        pub fn function_opt_mut(&mut self) -> Option<&mut String> {
9831            self.function.as_mut().map(|field| field as _)
9832        }
9833        ///Returns a mutable reference to `function`.
9834        ///If the field is unset, it is first initialized with the default value.
9835        pub fn function_mut(&mut self) -> &mut String {
9836            self.function.get_or_insert_default()
9837        }
9838        ///If `function` is set, returns [`Some`] with the value; otherwise returns [`None`].
9839        pub fn function_opt(&self) -> Option<&str> {
9840            self.function.as_ref().map(|field| field as _)
9841        }
9842        ///Sets `function` with the provided value.
9843        pub fn set_function<T: Into<String>>(&mut self, field: T) {
9844            self.function = Some(field.into().into());
9845        }
9846        ///Sets `function` with the provided value.
9847        pub fn with_function<T: Into<String>>(mut self, field: T) -> Self {
9848            self.set_function(field.into());
9849            self
9850        }
9851        ///Returns the value of `type_arguments`, or the default value if `type_arguments` is unset.
9852        pub fn type_arguments(&self) -> &[String] {
9853            &self.type_arguments
9854        }
9855        ///Returns a mutable reference to `type_arguments`.
9856        ///If the field is unset, it is first initialized with the default value.
9857        pub fn type_arguments_mut(&mut self) -> &mut Vec<String> {
9858            &mut self.type_arguments
9859        }
9860        ///Sets `type_arguments` with the provided value.
9861        pub fn set_type_arguments(&mut self, field: Vec<String>) {
9862            self.type_arguments = field;
9863        }
9864        ///Sets `type_arguments` with the provided value.
9865        pub fn with_type_arguments(mut self, field: Vec<String>) -> Self {
9866            self.set_type_arguments(field);
9867            self
9868        }
9869        ///Returns the value of `arguments`, or the default value if `arguments` is unset.
9870        pub fn arguments(&self) -> &[super::Argument] {
9871            &self.arguments
9872        }
9873        ///Returns a mutable reference to `arguments`.
9874        ///If the field is unset, it is first initialized with the default value.
9875        pub fn arguments_mut(&mut self) -> &mut Vec<super::Argument> {
9876            &mut self.arguments
9877        }
9878        ///Sets `arguments` with the provided value.
9879        pub fn set_arguments(&mut self, field: Vec<super::Argument>) {
9880            self.arguments = field;
9881        }
9882        ///Sets `arguments` with the provided value.
9883        pub fn with_arguments(mut self, field: Vec<super::Argument>) -> Self {
9884            self.set_arguments(field);
9885            self
9886        }
9887    }
9888    impl super::MoveLocation {
9889        pub const fn const_default() -> Self {
9890            Self {
9891                package: None,
9892                module: None,
9893                function: None,
9894                instruction: None,
9895                function_name: None,
9896            }
9897        }
9898        #[doc(hidden)]
9899        pub fn default_instance() -> &'static Self {
9900            static DEFAULT: super::MoveLocation = super::MoveLocation::const_default();
9901            &DEFAULT
9902        }
9903        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9904        pub fn package_opt_mut(&mut self) -> Option<&mut String> {
9905            self.package.as_mut().map(|field| field as _)
9906        }
9907        ///Returns a mutable reference to `package`.
9908        ///If the field is unset, it is first initialized with the default value.
9909        pub fn package_mut(&mut self) -> &mut String {
9910            self.package.get_or_insert_default()
9911        }
9912        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
9913        pub fn package_opt(&self) -> Option<&str> {
9914            self.package.as_ref().map(|field| field as _)
9915        }
9916        ///Sets `package` with the provided value.
9917        pub fn set_package<T: Into<String>>(&mut self, field: T) {
9918            self.package = Some(field.into().into());
9919        }
9920        ///Sets `package` with the provided value.
9921        pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
9922            self.set_package(field.into());
9923            self
9924        }
9925        ///If `module` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9926        pub fn module_opt_mut(&mut self) -> Option<&mut String> {
9927            self.module.as_mut().map(|field| field as _)
9928        }
9929        ///Returns a mutable reference to `module`.
9930        ///If the field is unset, it is first initialized with the default value.
9931        pub fn module_mut(&mut self) -> &mut String {
9932            self.module.get_or_insert_default()
9933        }
9934        ///If `module` is set, returns [`Some`] with the value; otherwise returns [`None`].
9935        pub fn module_opt(&self) -> Option<&str> {
9936            self.module.as_ref().map(|field| field as _)
9937        }
9938        ///Sets `module` with the provided value.
9939        pub fn set_module<T: Into<String>>(&mut self, field: T) {
9940            self.module = Some(field.into().into());
9941        }
9942        ///Sets `module` with the provided value.
9943        pub fn with_module<T: Into<String>>(mut self, field: T) -> Self {
9944            self.set_module(field.into());
9945            self
9946        }
9947        ///If `function` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9948        pub fn function_opt_mut(&mut self) -> Option<&mut u32> {
9949            self.function.as_mut().map(|field| field as _)
9950        }
9951        ///Returns a mutable reference to `function`.
9952        ///If the field is unset, it is first initialized with the default value.
9953        pub fn function_mut(&mut self) -> &mut u32 {
9954            self.function.get_or_insert_default()
9955        }
9956        ///If `function` is set, returns [`Some`] with the value; otherwise returns [`None`].
9957        pub fn function_opt(&self) -> Option<u32> {
9958            self.function.as_ref().map(|field| *field)
9959        }
9960        ///Sets `function` with the provided value.
9961        pub fn set_function(&mut self, field: u32) {
9962            self.function = Some(field);
9963        }
9964        ///Sets `function` with the provided value.
9965        pub fn with_function(mut self, field: u32) -> Self {
9966            self.set_function(field);
9967            self
9968        }
9969        ///If `instruction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9970        pub fn instruction_opt_mut(&mut self) -> Option<&mut u32> {
9971            self.instruction.as_mut().map(|field| field as _)
9972        }
9973        ///Returns a mutable reference to `instruction`.
9974        ///If the field is unset, it is first initialized with the default value.
9975        pub fn instruction_mut(&mut self) -> &mut u32 {
9976            self.instruction.get_or_insert_default()
9977        }
9978        ///If `instruction` is set, returns [`Some`] with the value; otherwise returns [`None`].
9979        pub fn instruction_opt(&self) -> Option<u32> {
9980            self.instruction.as_ref().map(|field| *field)
9981        }
9982        ///Sets `instruction` with the provided value.
9983        pub fn set_instruction(&mut self, field: u32) {
9984            self.instruction = Some(field);
9985        }
9986        ///Sets `instruction` with the provided value.
9987        pub fn with_instruction(mut self, field: u32) -> Self {
9988            self.set_instruction(field);
9989            self
9990        }
9991        ///If `function_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
9992        pub fn function_name_opt_mut(&mut self) -> Option<&mut String> {
9993            self.function_name.as_mut().map(|field| field as _)
9994        }
9995        ///Returns a mutable reference to `function_name`.
9996        ///If the field is unset, it is first initialized with the default value.
9997        pub fn function_name_mut(&mut self) -> &mut String {
9998            self.function_name.get_or_insert_default()
9999        }
10000        ///If `function_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
10001        pub fn function_name_opt(&self) -> Option<&str> {
10002            self.function_name.as_ref().map(|field| field as _)
10003        }
10004        ///Sets `function_name` with the provided value.
10005        pub fn set_function_name<T: Into<String>>(&mut self, field: T) {
10006            self.function_name = Some(field.into().into());
10007        }
10008        ///Sets `function_name` with the provided value.
10009        pub fn with_function_name<T: Into<String>>(mut self, field: T) -> Self {
10010            self.set_function_name(field.into());
10011            self
10012        }
10013    }
10014    impl super::MoveTable {
10015        pub const fn const_default() -> Self {
10016            Self { id: None, size: None }
10017        }
10018        #[doc(hidden)]
10019        pub fn default_instance() -> &'static Self {
10020            static DEFAULT: super::MoveTable = super::MoveTable::const_default();
10021            &DEFAULT
10022        }
10023        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10024        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
10025            self.id.as_mut().map(|field| field as _)
10026        }
10027        ///Returns a mutable reference to `id`.
10028        ///If the field is unset, it is first initialized with the default value.
10029        pub fn id_mut(&mut self) -> &mut String {
10030            self.id.get_or_insert_default()
10031        }
10032        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
10033        pub fn id_opt(&self) -> Option<&str> {
10034            self.id.as_ref().map(|field| field as _)
10035        }
10036        ///Sets `id` with the provided value.
10037        pub fn set_id<T: Into<String>>(&mut self, field: T) {
10038            self.id = Some(field.into().into());
10039        }
10040        ///Sets `id` with the provided value.
10041        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
10042            self.set_id(field.into());
10043            self
10044        }
10045        ///If `size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10046        pub fn size_opt_mut(&mut self) -> Option<&mut u64> {
10047            self.size.as_mut().map(|field| field as _)
10048        }
10049        ///Returns a mutable reference to `size`.
10050        ///If the field is unset, it is first initialized with the default value.
10051        pub fn size_mut(&mut self) -> &mut u64 {
10052            self.size.get_or_insert_default()
10053        }
10054        ///If `size` is set, returns [`Some`] with the value; otherwise returns [`None`].
10055        pub fn size_opt(&self) -> Option<u64> {
10056            self.size.as_ref().map(|field| *field)
10057        }
10058        ///Sets `size` with the provided value.
10059        pub fn set_size(&mut self, field: u64) {
10060            self.size = Some(field);
10061        }
10062        ///Sets `size` with the provided value.
10063        pub fn with_size(mut self, field: u64) -> Self {
10064            self.set_size(field);
10065            self
10066        }
10067    }
10068    impl super::MultisigAggregatedSignature {
10069        pub const fn const_default() -> Self {
10070            Self {
10071                signatures: Vec::new(),
10072                bitmap: None,
10073                legacy_bitmap: None,
10074                committee: None,
10075            }
10076        }
10077        #[doc(hidden)]
10078        pub fn default_instance() -> &'static Self {
10079            static DEFAULT: super::MultisigAggregatedSignature = super::MultisigAggregatedSignature::const_default();
10080            &DEFAULT
10081        }
10082        ///Returns the value of `signatures`, or the default value if `signatures` is unset.
10083        pub fn signatures(&self) -> &[super::MultisigMemberSignature] {
10084            &self.signatures
10085        }
10086        ///Returns a mutable reference to `signatures`.
10087        ///If the field is unset, it is first initialized with the default value.
10088        pub fn signatures_mut(&mut self) -> &mut Vec<super::MultisigMemberSignature> {
10089            &mut self.signatures
10090        }
10091        ///Sets `signatures` with the provided value.
10092        pub fn set_signatures(&mut self, field: Vec<super::MultisigMemberSignature>) {
10093            self.signatures = field;
10094        }
10095        ///Sets `signatures` with the provided value.
10096        pub fn with_signatures(
10097            mut self,
10098            field: Vec<super::MultisigMemberSignature>,
10099        ) -> Self {
10100            self.set_signatures(field);
10101            self
10102        }
10103        ///If `bitmap` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10104        pub fn bitmap_opt_mut(&mut self) -> Option<&mut u32> {
10105            self.bitmap.as_mut().map(|field| field as _)
10106        }
10107        ///Returns a mutable reference to `bitmap`.
10108        ///If the field is unset, it is first initialized with the default value.
10109        pub fn bitmap_mut(&mut self) -> &mut u32 {
10110            self.bitmap.get_or_insert_default()
10111        }
10112        ///If `bitmap` is set, returns [`Some`] with the value; otherwise returns [`None`].
10113        pub fn bitmap_opt(&self) -> Option<u32> {
10114            self.bitmap.as_ref().map(|field| *field)
10115        }
10116        ///Sets `bitmap` with the provided value.
10117        pub fn set_bitmap(&mut self, field: u32) {
10118            self.bitmap = Some(field);
10119        }
10120        ///Sets `bitmap` with the provided value.
10121        pub fn with_bitmap(mut self, field: u32) -> Self {
10122            self.set_bitmap(field);
10123            self
10124        }
10125        ///If `legacy_bitmap` is set, returns [`Some`] with the value; otherwise returns [`None`].
10126        pub fn legacy_bitmap_opt(&self) -> Option<&[u8]> {
10127            self.legacy_bitmap.as_ref().map(|field| field as _)
10128        }
10129        ///Sets `legacy_bitmap` with the provided value.
10130        pub fn set_legacy_bitmap<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10131            self.legacy_bitmap = Some(field.into().into());
10132        }
10133        ///Sets `legacy_bitmap` with the provided value.
10134        pub fn with_legacy_bitmap<T: Into<::prost::bytes::Bytes>>(
10135            mut self,
10136            field: T,
10137        ) -> Self {
10138            self.set_legacy_bitmap(field.into());
10139            self
10140        }
10141        ///Returns the value of `committee`, or the default value if `committee` is unset.
10142        pub fn committee(&self) -> &super::MultisigCommittee {
10143            self.committee
10144                .as_ref()
10145                .map(|field| field as _)
10146                .unwrap_or_else(|| super::MultisigCommittee::default_instance() as _)
10147        }
10148        ///If `committee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10149        pub fn committee_opt_mut(&mut self) -> Option<&mut super::MultisigCommittee> {
10150            self.committee.as_mut().map(|field| field as _)
10151        }
10152        ///Returns a mutable reference to `committee`.
10153        ///If the field is unset, it is first initialized with the default value.
10154        pub fn committee_mut(&mut self) -> &mut super::MultisigCommittee {
10155            self.committee.get_or_insert_default()
10156        }
10157        ///If `committee` is set, returns [`Some`] with the value; otherwise returns [`None`].
10158        pub fn committee_opt(&self) -> Option<&super::MultisigCommittee> {
10159            self.committee.as_ref().map(|field| field as _)
10160        }
10161        ///Sets `committee` with the provided value.
10162        pub fn set_committee<T: Into<super::MultisigCommittee>>(&mut self, field: T) {
10163            self.committee = Some(field.into().into());
10164        }
10165        ///Sets `committee` with the provided value.
10166        pub fn with_committee<T: Into<super::MultisigCommittee>>(
10167            mut self,
10168            field: T,
10169        ) -> Self {
10170            self.set_committee(field.into());
10171            self
10172        }
10173    }
10174    impl super::MultisigCommittee {
10175        pub const fn const_default() -> Self {
10176            Self {
10177                members: Vec::new(),
10178                threshold: None,
10179            }
10180        }
10181        #[doc(hidden)]
10182        pub fn default_instance() -> &'static Self {
10183            static DEFAULT: super::MultisigCommittee = super::MultisigCommittee::const_default();
10184            &DEFAULT
10185        }
10186        ///Returns the value of `members`, or the default value if `members` is unset.
10187        pub fn members(&self) -> &[super::MultisigMember] {
10188            &self.members
10189        }
10190        ///Returns a mutable reference to `members`.
10191        ///If the field is unset, it is first initialized with the default value.
10192        pub fn members_mut(&mut self) -> &mut Vec<super::MultisigMember> {
10193            &mut self.members
10194        }
10195        ///Sets `members` with the provided value.
10196        pub fn set_members(&mut self, field: Vec<super::MultisigMember>) {
10197            self.members = field;
10198        }
10199        ///Sets `members` with the provided value.
10200        pub fn with_members(mut self, field: Vec<super::MultisigMember>) -> Self {
10201            self.set_members(field);
10202            self
10203        }
10204        ///If `threshold` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10205        pub fn threshold_opt_mut(&mut self) -> Option<&mut u32> {
10206            self.threshold.as_mut().map(|field| field as _)
10207        }
10208        ///Returns a mutable reference to `threshold`.
10209        ///If the field is unset, it is first initialized with the default value.
10210        pub fn threshold_mut(&mut self) -> &mut u32 {
10211            self.threshold.get_or_insert_default()
10212        }
10213        ///If `threshold` is set, returns [`Some`] with the value; otherwise returns [`None`].
10214        pub fn threshold_opt(&self) -> Option<u32> {
10215            self.threshold.as_ref().map(|field| *field)
10216        }
10217        ///Sets `threshold` with the provided value.
10218        pub fn set_threshold(&mut self, field: u32) {
10219            self.threshold = Some(field);
10220        }
10221        ///Sets `threshold` with the provided value.
10222        pub fn with_threshold(mut self, field: u32) -> Self {
10223            self.set_threshold(field);
10224            self
10225        }
10226    }
10227    impl super::MultisigMember {
10228        pub const fn const_default() -> Self {
10229            Self {
10230                public_key: None,
10231                weight: None,
10232            }
10233        }
10234        #[doc(hidden)]
10235        pub fn default_instance() -> &'static Self {
10236            static DEFAULT: super::MultisigMember = super::MultisigMember::const_default();
10237            &DEFAULT
10238        }
10239        ///Returns the value of `public_key`, or the default value if `public_key` is unset.
10240        pub fn public_key(&self) -> &super::MultisigMemberPublicKey {
10241            self.public_key
10242                .as_ref()
10243                .map(|field| field as _)
10244                .unwrap_or_else(|| {
10245                    super::MultisigMemberPublicKey::default_instance() as _
10246                })
10247        }
10248        ///If `public_key` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10249        pub fn public_key_opt_mut(
10250            &mut self,
10251        ) -> Option<&mut super::MultisigMemberPublicKey> {
10252            self.public_key.as_mut().map(|field| field as _)
10253        }
10254        ///Returns a mutable reference to `public_key`.
10255        ///If the field is unset, it is first initialized with the default value.
10256        pub fn public_key_mut(&mut self) -> &mut super::MultisigMemberPublicKey {
10257            self.public_key.get_or_insert_default()
10258        }
10259        ///If `public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
10260        pub fn public_key_opt(&self) -> Option<&super::MultisigMemberPublicKey> {
10261            self.public_key.as_ref().map(|field| field as _)
10262        }
10263        ///Sets `public_key` with the provided value.
10264        pub fn set_public_key<T: Into<super::MultisigMemberPublicKey>>(
10265            &mut self,
10266            field: T,
10267        ) {
10268            self.public_key = Some(field.into().into());
10269        }
10270        ///Sets `public_key` with the provided value.
10271        pub fn with_public_key<T: Into<super::MultisigMemberPublicKey>>(
10272            mut self,
10273            field: T,
10274        ) -> Self {
10275            self.set_public_key(field.into());
10276            self
10277        }
10278        ///If `weight` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10279        pub fn weight_opt_mut(&mut self) -> Option<&mut u32> {
10280            self.weight.as_mut().map(|field| field as _)
10281        }
10282        ///Returns a mutable reference to `weight`.
10283        ///If the field is unset, it is first initialized with the default value.
10284        pub fn weight_mut(&mut self) -> &mut u32 {
10285            self.weight.get_or_insert_default()
10286        }
10287        ///If `weight` is set, returns [`Some`] with the value; otherwise returns [`None`].
10288        pub fn weight_opt(&self) -> Option<u32> {
10289            self.weight.as_ref().map(|field| *field)
10290        }
10291        ///Sets `weight` with the provided value.
10292        pub fn set_weight(&mut self, field: u32) {
10293            self.weight = Some(field);
10294        }
10295        ///Sets `weight` with the provided value.
10296        pub fn with_weight(mut self, field: u32) -> Self {
10297            self.set_weight(field);
10298            self
10299        }
10300    }
10301    impl super::MultisigMemberPublicKey {
10302        pub const fn const_default() -> Self {
10303            Self {
10304                scheme: None,
10305                public_key: None,
10306                zklogin: None,
10307            }
10308        }
10309        #[doc(hidden)]
10310        pub fn default_instance() -> &'static Self {
10311            static DEFAULT: super::MultisigMemberPublicKey = super::MultisigMemberPublicKey::const_default();
10312            &DEFAULT
10313        }
10314        ///Sets `scheme` with the provided value.
10315        pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
10316            self.set_scheme(field.into());
10317            self
10318        }
10319        ///If `public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
10320        pub fn public_key_opt(&self) -> Option<&[u8]> {
10321            self.public_key.as_ref().map(|field| field as _)
10322        }
10323        ///Sets `public_key` with the provided value.
10324        pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10325            self.public_key = Some(field.into().into());
10326        }
10327        ///Sets `public_key` with the provided value.
10328        pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
10329            mut self,
10330            field: T,
10331        ) -> Self {
10332            self.set_public_key(field.into());
10333            self
10334        }
10335        ///Returns the value of `zklogin`, or the default value if `zklogin` is unset.
10336        pub fn zklogin(&self) -> &super::ZkLoginPublicIdentifier {
10337            self.zklogin
10338                .as_ref()
10339                .map(|field| field as _)
10340                .unwrap_or_else(|| {
10341                    super::ZkLoginPublicIdentifier::default_instance() as _
10342                })
10343        }
10344        ///If `zklogin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10345        pub fn zklogin_opt_mut(
10346            &mut self,
10347        ) -> Option<&mut super::ZkLoginPublicIdentifier> {
10348            self.zklogin.as_mut().map(|field| field as _)
10349        }
10350        ///Returns a mutable reference to `zklogin`.
10351        ///If the field is unset, it is first initialized with the default value.
10352        pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginPublicIdentifier {
10353            self.zklogin.get_or_insert_default()
10354        }
10355        ///If `zklogin` is set, returns [`Some`] with the value; otherwise returns [`None`].
10356        pub fn zklogin_opt(&self) -> Option<&super::ZkLoginPublicIdentifier> {
10357            self.zklogin.as_ref().map(|field| field as _)
10358        }
10359        ///Sets `zklogin` with the provided value.
10360        pub fn set_zklogin<T: Into<super::ZkLoginPublicIdentifier>>(
10361            &mut self,
10362            field: T,
10363        ) {
10364            self.zklogin = Some(field.into().into());
10365        }
10366        ///Sets `zklogin` with the provided value.
10367        pub fn with_zklogin<T: Into<super::ZkLoginPublicIdentifier>>(
10368            mut self,
10369            field: T,
10370        ) -> Self {
10371            self.set_zklogin(field.into());
10372            self
10373        }
10374    }
10375    impl super::MultisigMemberSignature {
10376        pub const fn const_default() -> Self {
10377            Self {
10378                scheme: None,
10379                signature: None,
10380                zklogin: None,
10381                passkey: None,
10382            }
10383        }
10384        #[doc(hidden)]
10385        pub fn default_instance() -> &'static Self {
10386            static DEFAULT: super::MultisigMemberSignature = super::MultisigMemberSignature::const_default();
10387            &DEFAULT
10388        }
10389        ///Sets `scheme` with the provided value.
10390        pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
10391            self.set_scheme(field.into());
10392            self
10393        }
10394        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
10395        pub fn signature_opt(&self) -> Option<&[u8]> {
10396            self.signature.as_ref().map(|field| field as _)
10397        }
10398        ///Sets `signature` with the provided value.
10399        pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
10400            self.signature = Some(field.into().into());
10401        }
10402        ///Sets `signature` with the provided value.
10403        pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
10404            mut self,
10405            field: T,
10406        ) -> Self {
10407            self.set_signature(field.into());
10408            self
10409        }
10410        ///Returns the value of `zklogin`, or the default value if `zklogin` is unset.
10411        pub fn zklogin(&self) -> &super::ZkLoginAuthenticator {
10412            self.zklogin
10413                .as_ref()
10414                .map(|field| field as _)
10415                .unwrap_or_else(|| super::ZkLoginAuthenticator::default_instance() as _)
10416        }
10417        ///If `zklogin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10418        pub fn zklogin_opt_mut(&mut self) -> Option<&mut super::ZkLoginAuthenticator> {
10419            self.zklogin.as_mut().map(|field| field as _)
10420        }
10421        ///Returns a mutable reference to `zklogin`.
10422        ///If the field is unset, it is first initialized with the default value.
10423        pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginAuthenticator {
10424            self.zklogin.get_or_insert_default()
10425        }
10426        ///If `zklogin` is set, returns [`Some`] with the value; otherwise returns [`None`].
10427        pub fn zklogin_opt(&self) -> Option<&super::ZkLoginAuthenticator> {
10428            self.zklogin.as_ref().map(|field| field as _)
10429        }
10430        ///Sets `zklogin` with the provided value.
10431        pub fn set_zklogin<T: Into<super::ZkLoginAuthenticator>>(&mut self, field: T) {
10432            self.zklogin = Some(field.into().into());
10433        }
10434        ///Sets `zklogin` with the provided value.
10435        pub fn with_zklogin<T: Into<super::ZkLoginAuthenticator>>(
10436            mut self,
10437            field: T,
10438        ) -> Self {
10439            self.set_zklogin(field.into());
10440            self
10441        }
10442        ///Returns the value of `passkey`, or the default value if `passkey` is unset.
10443        pub fn passkey(&self) -> &super::PasskeyAuthenticator {
10444            self.passkey
10445                .as_ref()
10446                .map(|field| field as _)
10447                .unwrap_or_else(|| super::PasskeyAuthenticator::default_instance() as _)
10448        }
10449        ///If `passkey` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10450        pub fn passkey_opt_mut(&mut self) -> Option<&mut super::PasskeyAuthenticator> {
10451            self.passkey.as_mut().map(|field| field as _)
10452        }
10453        ///Returns a mutable reference to `passkey`.
10454        ///If the field is unset, it is first initialized with the default value.
10455        pub fn passkey_mut(&mut self) -> &mut super::PasskeyAuthenticator {
10456            self.passkey.get_or_insert_default()
10457        }
10458        ///If `passkey` is set, returns [`Some`] with the value; otherwise returns [`None`].
10459        pub fn passkey_opt(&self) -> Option<&super::PasskeyAuthenticator> {
10460            self.passkey.as_ref().map(|field| field as _)
10461        }
10462        ///Sets `passkey` with the provided value.
10463        pub fn set_passkey<T: Into<super::PasskeyAuthenticator>>(&mut self, field: T) {
10464            self.passkey = Some(field.into().into());
10465        }
10466        ///Sets `passkey` with the provided value.
10467        pub fn with_passkey<T: Into<super::PasskeyAuthenticator>>(
10468            mut self,
10469            field: T,
10470        ) -> Self {
10471            self.set_passkey(field.into());
10472            self
10473        }
10474    }
10475    impl super::NameRecord {
10476        pub const fn const_default() -> Self {
10477            Self {
10478                id: None,
10479                name: None,
10480                registration_nft_id: None,
10481                expiration_timestamp: None,
10482                target_address: None,
10483                data: std::collections::BTreeMap::new(),
10484            }
10485        }
10486        #[doc(hidden)]
10487        pub fn default_instance() -> &'static Self {
10488            static DEFAULT: super::NameRecord = super::NameRecord::const_default();
10489            &DEFAULT
10490        }
10491        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10492        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
10493            self.id.as_mut().map(|field| field as _)
10494        }
10495        ///Returns a mutable reference to `id`.
10496        ///If the field is unset, it is first initialized with the default value.
10497        pub fn id_mut(&mut self) -> &mut String {
10498            self.id.get_or_insert_default()
10499        }
10500        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
10501        pub fn id_opt(&self) -> Option<&str> {
10502            self.id.as_ref().map(|field| field as _)
10503        }
10504        ///Sets `id` with the provided value.
10505        pub fn set_id<T: Into<String>>(&mut self, field: T) {
10506            self.id = Some(field.into().into());
10507        }
10508        ///Sets `id` with the provided value.
10509        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
10510            self.set_id(field.into());
10511            self
10512        }
10513        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10514        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
10515            self.name.as_mut().map(|field| field as _)
10516        }
10517        ///Returns a mutable reference to `name`.
10518        ///If the field is unset, it is first initialized with the default value.
10519        pub fn name_mut(&mut self) -> &mut String {
10520            self.name.get_or_insert_default()
10521        }
10522        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
10523        pub fn name_opt(&self) -> Option<&str> {
10524            self.name.as_ref().map(|field| field as _)
10525        }
10526        ///Sets `name` with the provided value.
10527        pub fn set_name<T: Into<String>>(&mut self, field: T) {
10528            self.name = Some(field.into().into());
10529        }
10530        ///Sets `name` with the provided value.
10531        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
10532            self.set_name(field.into());
10533            self
10534        }
10535        ///If `registration_nft_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10536        pub fn registration_nft_id_opt_mut(&mut self) -> Option<&mut String> {
10537            self.registration_nft_id.as_mut().map(|field| field as _)
10538        }
10539        ///Returns a mutable reference to `registration_nft_id`.
10540        ///If the field is unset, it is first initialized with the default value.
10541        pub fn registration_nft_id_mut(&mut self) -> &mut String {
10542            self.registration_nft_id.get_or_insert_default()
10543        }
10544        ///If `registration_nft_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
10545        pub fn registration_nft_id_opt(&self) -> Option<&str> {
10546            self.registration_nft_id.as_ref().map(|field| field as _)
10547        }
10548        ///Sets `registration_nft_id` with the provided value.
10549        pub fn set_registration_nft_id<T: Into<String>>(&mut self, field: T) {
10550            self.registration_nft_id = Some(field.into().into());
10551        }
10552        ///Sets `registration_nft_id` with the provided value.
10553        pub fn with_registration_nft_id<T: Into<String>>(mut self, field: T) -> Self {
10554            self.set_registration_nft_id(field.into());
10555            self
10556        }
10557        ///If `expiration_timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10558        pub fn expiration_timestamp_opt_mut(
10559            &mut self,
10560        ) -> Option<&mut ::prost_types::Timestamp> {
10561            self.expiration_timestamp.as_mut().map(|field| field as _)
10562        }
10563        ///Returns a mutable reference to `expiration_timestamp`.
10564        ///If the field is unset, it is first initialized with the default value.
10565        pub fn expiration_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
10566            self.expiration_timestamp.get_or_insert_default()
10567        }
10568        ///If `expiration_timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
10569        pub fn expiration_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
10570            self.expiration_timestamp.as_ref().map(|field| field as _)
10571        }
10572        ///Sets `expiration_timestamp` with the provided value.
10573        pub fn set_expiration_timestamp<T: Into<::prost_types::Timestamp>>(
10574            &mut self,
10575            field: T,
10576        ) {
10577            self.expiration_timestamp = Some(field.into().into());
10578        }
10579        ///Sets `expiration_timestamp` with the provided value.
10580        pub fn with_expiration_timestamp<T: Into<::prost_types::Timestamp>>(
10581            mut self,
10582            field: T,
10583        ) -> Self {
10584            self.set_expiration_timestamp(field.into());
10585            self
10586        }
10587        ///If `target_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10588        pub fn target_address_opt_mut(&mut self) -> Option<&mut String> {
10589            self.target_address.as_mut().map(|field| field as _)
10590        }
10591        ///Returns a mutable reference to `target_address`.
10592        ///If the field is unset, it is first initialized with the default value.
10593        pub fn target_address_mut(&mut self) -> &mut String {
10594            self.target_address.get_or_insert_default()
10595        }
10596        ///If `target_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
10597        pub fn target_address_opt(&self) -> Option<&str> {
10598            self.target_address.as_ref().map(|field| field as _)
10599        }
10600        ///Sets `target_address` with the provided value.
10601        pub fn set_target_address<T: Into<String>>(&mut self, field: T) {
10602            self.target_address = Some(field.into().into());
10603        }
10604        ///Sets `target_address` with the provided value.
10605        pub fn with_target_address<T: Into<String>>(mut self, field: T) -> Self {
10606            self.set_target_address(field.into());
10607            self
10608        }
10609        ///Returns the value of `data`, or the default value if `data` is unset.
10610        pub fn data(&self) -> &::std::collections::BTreeMap<String, String> {
10611            &self.data
10612        }
10613        ///Returns a mutable reference to `data`.
10614        ///If the field is unset, it is first initialized with the default value.
10615        pub fn data_mut(&mut self) -> &mut ::std::collections::BTreeMap<String, String> {
10616            &mut self.data
10617        }
10618        ///Sets `data` with the provided value.
10619        pub fn set_data(&mut self, field: ::std::collections::BTreeMap<String, String>) {
10620            self.data = field;
10621        }
10622        ///Sets `data` with the provided value.
10623        pub fn with_data(
10624            mut self,
10625            field: ::std::collections::BTreeMap<String, String>,
10626        ) -> Self {
10627            self.set_data(field);
10628            self
10629        }
10630    }
10631    impl super::Object {
10632        pub const fn const_default() -> Self {
10633            Self {
10634                bcs: None,
10635                object_id: None,
10636                version: None,
10637                digest: None,
10638                owner: None,
10639                object_type: None,
10640                has_public_transfer: None,
10641                contents: None,
10642                package: None,
10643                previous_transaction: None,
10644                storage_rebate: None,
10645                json: None,
10646                balance: None,
10647            }
10648        }
10649        #[doc(hidden)]
10650        pub fn default_instance() -> &'static Self {
10651            static DEFAULT: super::Object = super::Object::const_default();
10652            &DEFAULT
10653        }
10654        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
10655        pub fn bcs(&self) -> &super::Bcs {
10656            self.bcs
10657                .as_ref()
10658                .map(|field| field as _)
10659                .unwrap_or_else(|| super::Bcs::default_instance() as _)
10660        }
10661        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10662        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
10663            self.bcs.as_mut().map(|field| field as _)
10664        }
10665        ///Returns a mutable reference to `bcs`.
10666        ///If the field is unset, it is first initialized with the default value.
10667        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
10668            self.bcs.get_or_insert_default()
10669        }
10670        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
10671        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
10672            self.bcs.as_ref().map(|field| field as _)
10673        }
10674        ///Sets `bcs` with the provided value.
10675        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
10676            self.bcs = Some(field.into().into());
10677        }
10678        ///Sets `bcs` with the provided value.
10679        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
10680            self.set_bcs(field.into());
10681            self
10682        }
10683        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10684        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
10685            self.object_id.as_mut().map(|field| field as _)
10686        }
10687        ///Returns a mutable reference to `object_id`.
10688        ///If the field is unset, it is first initialized with the default value.
10689        pub fn object_id_mut(&mut self) -> &mut String {
10690            self.object_id.get_or_insert_default()
10691        }
10692        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
10693        pub fn object_id_opt(&self) -> Option<&str> {
10694            self.object_id.as_ref().map(|field| field as _)
10695        }
10696        ///Sets `object_id` with the provided value.
10697        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
10698            self.object_id = Some(field.into().into());
10699        }
10700        ///Sets `object_id` with the provided value.
10701        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
10702            self.set_object_id(field.into());
10703            self
10704        }
10705        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10706        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
10707            self.version.as_mut().map(|field| field as _)
10708        }
10709        ///Returns a mutable reference to `version`.
10710        ///If the field is unset, it is first initialized with the default value.
10711        pub fn version_mut(&mut self) -> &mut u64 {
10712            self.version.get_or_insert_default()
10713        }
10714        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
10715        pub fn version_opt(&self) -> Option<u64> {
10716            self.version.as_ref().map(|field| *field)
10717        }
10718        ///Sets `version` with the provided value.
10719        pub fn set_version(&mut self, field: u64) {
10720            self.version = Some(field);
10721        }
10722        ///Sets `version` with the provided value.
10723        pub fn with_version(mut self, field: u64) -> Self {
10724            self.set_version(field);
10725            self
10726        }
10727        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10728        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
10729            self.digest.as_mut().map(|field| field as _)
10730        }
10731        ///Returns a mutable reference to `digest`.
10732        ///If the field is unset, it is first initialized with the default value.
10733        pub fn digest_mut(&mut self) -> &mut String {
10734            self.digest.get_or_insert_default()
10735        }
10736        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
10737        pub fn digest_opt(&self) -> Option<&str> {
10738            self.digest.as_ref().map(|field| field as _)
10739        }
10740        ///Sets `digest` with the provided value.
10741        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
10742            self.digest = Some(field.into().into());
10743        }
10744        ///Sets `digest` with the provided value.
10745        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
10746            self.set_digest(field.into());
10747            self
10748        }
10749        ///Returns the value of `owner`, or the default value if `owner` is unset.
10750        pub fn owner(&self) -> &super::Owner {
10751            self.owner
10752                .as_ref()
10753                .map(|field| field as _)
10754                .unwrap_or_else(|| super::Owner::default_instance() as _)
10755        }
10756        ///If `owner` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10757        pub fn owner_opt_mut(&mut self) -> Option<&mut super::Owner> {
10758            self.owner.as_mut().map(|field| field as _)
10759        }
10760        ///Returns a mutable reference to `owner`.
10761        ///If the field is unset, it is first initialized with the default value.
10762        pub fn owner_mut(&mut self) -> &mut super::Owner {
10763            self.owner.get_or_insert_default()
10764        }
10765        ///If `owner` is set, returns [`Some`] with the value; otherwise returns [`None`].
10766        pub fn owner_opt(&self) -> Option<&super::Owner> {
10767            self.owner.as_ref().map(|field| field as _)
10768        }
10769        ///Sets `owner` with the provided value.
10770        pub fn set_owner<T: Into<super::Owner>>(&mut self, field: T) {
10771            self.owner = Some(field.into().into());
10772        }
10773        ///Sets `owner` with the provided value.
10774        pub fn with_owner<T: Into<super::Owner>>(mut self, field: T) -> Self {
10775            self.set_owner(field.into());
10776            self
10777        }
10778        ///If `object_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10779        pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
10780            self.object_type.as_mut().map(|field| field as _)
10781        }
10782        ///Returns a mutable reference to `object_type`.
10783        ///If the field is unset, it is first initialized with the default value.
10784        pub fn object_type_mut(&mut self) -> &mut String {
10785            self.object_type.get_or_insert_default()
10786        }
10787        ///If `object_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
10788        pub fn object_type_opt(&self) -> Option<&str> {
10789            self.object_type.as_ref().map(|field| field as _)
10790        }
10791        ///Sets `object_type` with the provided value.
10792        pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
10793            self.object_type = Some(field.into().into());
10794        }
10795        ///Sets `object_type` with the provided value.
10796        pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
10797            self.set_object_type(field.into());
10798            self
10799        }
10800        ///If `has_public_transfer` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10801        pub fn has_public_transfer_opt_mut(&mut self) -> Option<&mut bool> {
10802            self.has_public_transfer.as_mut().map(|field| field as _)
10803        }
10804        ///Returns a mutable reference to `has_public_transfer`.
10805        ///If the field is unset, it is first initialized with the default value.
10806        pub fn has_public_transfer_mut(&mut self) -> &mut bool {
10807            self.has_public_transfer.get_or_insert_default()
10808        }
10809        ///If `has_public_transfer` is set, returns [`Some`] with the value; otherwise returns [`None`].
10810        pub fn has_public_transfer_opt(&self) -> Option<bool> {
10811            self.has_public_transfer.as_ref().map(|field| *field)
10812        }
10813        ///Sets `has_public_transfer` with the provided value.
10814        pub fn set_has_public_transfer(&mut self, field: bool) {
10815            self.has_public_transfer = Some(field);
10816        }
10817        ///Sets `has_public_transfer` with the provided value.
10818        pub fn with_has_public_transfer(mut self, field: bool) -> Self {
10819            self.set_has_public_transfer(field);
10820            self
10821        }
10822        ///Returns the value of `contents`, or the default value if `contents` is unset.
10823        pub fn contents(&self) -> &super::Bcs {
10824            self.contents
10825                .as_ref()
10826                .map(|field| field as _)
10827                .unwrap_or_else(|| super::Bcs::default_instance() as _)
10828        }
10829        ///If `contents` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10830        pub fn contents_opt_mut(&mut self) -> Option<&mut super::Bcs> {
10831            self.contents.as_mut().map(|field| field as _)
10832        }
10833        ///Returns a mutable reference to `contents`.
10834        ///If the field is unset, it is first initialized with the default value.
10835        pub fn contents_mut(&mut self) -> &mut super::Bcs {
10836            self.contents.get_or_insert_default()
10837        }
10838        ///If `contents` is set, returns [`Some`] with the value; otherwise returns [`None`].
10839        pub fn contents_opt(&self) -> Option<&super::Bcs> {
10840            self.contents.as_ref().map(|field| field as _)
10841        }
10842        ///Sets `contents` with the provided value.
10843        pub fn set_contents<T: Into<super::Bcs>>(&mut self, field: T) {
10844            self.contents = Some(field.into().into());
10845        }
10846        ///Sets `contents` with the provided value.
10847        pub fn with_contents<T: Into<super::Bcs>>(mut self, field: T) -> Self {
10848            self.set_contents(field.into());
10849            self
10850        }
10851        ///Returns the value of `package`, or the default value if `package` is unset.
10852        pub fn package(&self) -> &super::Package {
10853            self.package
10854                .as_ref()
10855                .map(|field| field as _)
10856                .unwrap_or_else(|| super::Package::default_instance() as _)
10857        }
10858        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10859        pub fn package_opt_mut(&mut self) -> Option<&mut super::Package> {
10860            self.package.as_mut().map(|field| field as _)
10861        }
10862        ///Returns a mutable reference to `package`.
10863        ///If the field is unset, it is first initialized with the default value.
10864        pub fn package_mut(&mut self) -> &mut super::Package {
10865            self.package.get_or_insert_default()
10866        }
10867        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
10868        pub fn package_opt(&self) -> Option<&super::Package> {
10869            self.package.as_ref().map(|field| field as _)
10870        }
10871        ///Sets `package` with the provided value.
10872        pub fn set_package<T: Into<super::Package>>(&mut self, field: T) {
10873            self.package = Some(field.into().into());
10874        }
10875        ///Sets `package` with the provided value.
10876        pub fn with_package<T: Into<super::Package>>(mut self, field: T) -> Self {
10877            self.set_package(field.into());
10878            self
10879        }
10880        ///If `previous_transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10881        pub fn previous_transaction_opt_mut(&mut self) -> Option<&mut String> {
10882            self.previous_transaction.as_mut().map(|field| field as _)
10883        }
10884        ///Returns a mutable reference to `previous_transaction`.
10885        ///If the field is unset, it is first initialized with the default value.
10886        pub fn previous_transaction_mut(&mut self) -> &mut String {
10887            self.previous_transaction.get_or_insert_default()
10888        }
10889        ///If `previous_transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
10890        pub fn previous_transaction_opt(&self) -> Option<&str> {
10891            self.previous_transaction.as_ref().map(|field| field as _)
10892        }
10893        ///Sets `previous_transaction` with the provided value.
10894        pub fn set_previous_transaction<T: Into<String>>(&mut self, field: T) {
10895            self.previous_transaction = Some(field.into().into());
10896        }
10897        ///Sets `previous_transaction` with the provided value.
10898        pub fn with_previous_transaction<T: Into<String>>(mut self, field: T) -> Self {
10899            self.set_previous_transaction(field.into());
10900            self
10901        }
10902        ///If `storage_rebate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10903        pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
10904            self.storage_rebate.as_mut().map(|field| field as _)
10905        }
10906        ///Returns a mutable reference to `storage_rebate`.
10907        ///If the field is unset, it is first initialized with the default value.
10908        pub fn storage_rebate_mut(&mut self) -> &mut u64 {
10909            self.storage_rebate.get_or_insert_default()
10910        }
10911        ///If `storage_rebate` is set, returns [`Some`] with the value; otherwise returns [`None`].
10912        pub fn storage_rebate_opt(&self) -> Option<u64> {
10913            self.storage_rebate.as_ref().map(|field| *field)
10914        }
10915        ///Sets `storage_rebate` with the provided value.
10916        pub fn set_storage_rebate(&mut self, field: u64) {
10917            self.storage_rebate = Some(field);
10918        }
10919        ///Sets `storage_rebate` with the provided value.
10920        pub fn with_storage_rebate(mut self, field: u64) -> Self {
10921            self.set_storage_rebate(field);
10922            self
10923        }
10924        ///If `json` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10925        pub fn json_opt_mut(&mut self) -> Option<&mut ::prost_types::Value> {
10926            self.json.as_mut().map(|field| field as _)
10927        }
10928        ///Returns a mutable reference to `json`.
10929        ///If the field is unset, it is first initialized with the default value.
10930        pub fn json_mut(&mut self) -> &mut ::prost_types::Value {
10931            self.json.get_or_insert_default()
10932        }
10933        ///If `json` is set, returns [`Some`] with the value; otherwise returns [`None`].
10934        pub fn json_opt(&self) -> Option<&::prost_types::Value> {
10935            self.json.as_ref().map(|field| field as _)
10936        }
10937        ///Sets `json` with the provided value.
10938        pub fn set_json<T: Into<::prost_types::Value>>(&mut self, field: T) {
10939            self.json = Some(field.into().into());
10940        }
10941        ///Sets `json` with the provided value.
10942        pub fn with_json<T: Into<::prost_types::Value>>(mut self, field: T) -> Self {
10943            self.set_json(field.into());
10944            self
10945        }
10946        ///If `balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10947        pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
10948            self.balance.as_mut().map(|field| field as _)
10949        }
10950        ///Returns a mutable reference to `balance`.
10951        ///If the field is unset, it is first initialized with the default value.
10952        pub fn balance_mut(&mut self) -> &mut u64 {
10953            self.balance.get_or_insert_default()
10954        }
10955        ///If `balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
10956        pub fn balance_opt(&self) -> Option<u64> {
10957            self.balance.as_ref().map(|field| *field)
10958        }
10959        ///Sets `balance` with the provided value.
10960        pub fn set_balance(&mut self, field: u64) {
10961            self.balance = Some(field);
10962        }
10963        ///Sets `balance` with the provided value.
10964        pub fn with_balance(mut self, field: u64) -> Self {
10965            self.set_balance(field);
10966            self
10967        }
10968    }
10969    impl super::ObjectReference {
10970        pub const fn const_default() -> Self {
10971            Self {
10972                object_id: None,
10973                version: None,
10974                digest: None,
10975            }
10976        }
10977        #[doc(hidden)]
10978        pub fn default_instance() -> &'static Self {
10979            static DEFAULT: super::ObjectReference = super::ObjectReference::const_default();
10980            &DEFAULT
10981        }
10982        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
10983        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
10984            self.object_id.as_mut().map(|field| field as _)
10985        }
10986        ///Returns a mutable reference to `object_id`.
10987        ///If the field is unset, it is first initialized with the default value.
10988        pub fn object_id_mut(&mut self) -> &mut String {
10989            self.object_id.get_or_insert_default()
10990        }
10991        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
10992        pub fn object_id_opt(&self) -> Option<&str> {
10993            self.object_id.as_ref().map(|field| field as _)
10994        }
10995        ///Sets `object_id` with the provided value.
10996        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
10997            self.object_id = Some(field.into().into());
10998        }
10999        ///Sets `object_id` with the provided value.
11000        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
11001            self.set_object_id(field.into());
11002            self
11003        }
11004        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11005        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
11006            self.version.as_mut().map(|field| field as _)
11007        }
11008        ///Returns a mutable reference to `version`.
11009        ///If the field is unset, it is first initialized with the default value.
11010        pub fn version_mut(&mut self) -> &mut u64 {
11011            self.version.get_or_insert_default()
11012        }
11013        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
11014        pub fn version_opt(&self) -> Option<u64> {
11015            self.version.as_ref().map(|field| *field)
11016        }
11017        ///Sets `version` with the provided value.
11018        pub fn set_version(&mut self, field: u64) {
11019            self.version = Some(field);
11020        }
11021        ///Sets `version` with the provided value.
11022        pub fn with_version(mut self, field: u64) -> Self {
11023            self.set_version(field);
11024            self
11025        }
11026        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11027        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
11028            self.digest.as_mut().map(|field| field as _)
11029        }
11030        ///Returns a mutable reference to `digest`.
11031        ///If the field is unset, it is first initialized with the default value.
11032        pub fn digest_mut(&mut self) -> &mut String {
11033            self.digest.get_or_insert_default()
11034        }
11035        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
11036        pub fn digest_opt(&self) -> Option<&str> {
11037            self.digest.as_ref().map(|field| field as _)
11038        }
11039        ///Sets `digest` with the provided value.
11040        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
11041            self.digest = Some(field.into().into());
11042        }
11043        ///Sets `digest` with the provided value.
11044        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
11045            self.set_digest(field.into());
11046            self
11047        }
11048    }
11049    impl super::ObjectSet {
11050        pub const fn const_default() -> Self {
11051            Self { objects: Vec::new() }
11052        }
11053        #[doc(hidden)]
11054        pub fn default_instance() -> &'static Self {
11055            static DEFAULT: super::ObjectSet = super::ObjectSet::const_default();
11056            &DEFAULT
11057        }
11058        ///Returns the value of `objects`, or the default value if `objects` is unset.
11059        pub fn objects(&self) -> &[super::Object] {
11060            &self.objects
11061        }
11062        ///Returns a mutable reference to `objects`.
11063        ///If the field is unset, it is first initialized with the default value.
11064        pub fn objects_mut(&mut self) -> &mut Vec<super::Object> {
11065            &mut self.objects
11066        }
11067        ///Sets `objects` with the provided value.
11068        pub fn set_objects(&mut self, field: Vec<super::Object>) {
11069            self.objects = field;
11070        }
11071        ///Sets `objects` with the provided value.
11072        pub fn with_objects(mut self, field: Vec<super::Object>) -> Self {
11073            self.set_objects(field);
11074            self
11075        }
11076    }
11077    impl super::OpenSignature {
11078        pub const fn const_default() -> Self {
11079            Self {
11080                reference: None,
11081                body: None,
11082            }
11083        }
11084        #[doc(hidden)]
11085        pub fn default_instance() -> &'static Self {
11086            static DEFAULT: super::OpenSignature = super::OpenSignature::const_default();
11087            &DEFAULT
11088        }
11089        ///Sets `reference` with the provided value.
11090        pub fn with_reference<T: Into<super::open_signature::Reference>>(
11091            mut self,
11092            field: T,
11093        ) -> Self {
11094            self.set_reference(field.into());
11095            self
11096        }
11097        ///Returns the value of `body`, or the default value if `body` is unset.
11098        pub fn body(&self) -> &super::OpenSignatureBody {
11099            self.body
11100                .as_ref()
11101                .map(|field| field as _)
11102                .unwrap_or_else(|| super::OpenSignatureBody::default_instance() as _)
11103        }
11104        ///If `body` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11105        pub fn body_opt_mut(&mut self) -> Option<&mut super::OpenSignatureBody> {
11106            self.body.as_mut().map(|field| field as _)
11107        }
11108        ///Returns a mutable reference to `body`.
11109        ///If the field is unset, it is first initialized with the default value.
11110        pub fn body_mut(&mut self) -> &mut super::OpenSignatureBody {
11111            self.body.get_or_insert_default()
11112        }
11113        ///If `body` is set, returns [`Some`] with the value; otherwise returns [`None`].
11114        pub fn body_opt(&self) -> Option<&super::OpenSignatureBody> {
11115            self.body.as_ref().map(|field| field as _)
11116        }
11117        ///Sets `body` with the provided value.
11118        pub fn set_body<T: Into<super::OpenSignatureBody>>(&mut self, field: T) {
11119            self.body = Some(field.into().into());
11120        }
11121        ///Sets `body` with the provided value.
11122        pub fn with_body<T: Into<super::OpenSignatureBody>>(mut self, field: T) -> Self {
11123            self.set_body(field.into());
11124            self
11125        }
11126    }
11127    impl super::OpenSignatureBody {
11128        pub const fn const_default() -> Self {
11129            Self {
11130                r#type: None,
11131                type_name: None,
11132                type_parameter_instantiation: Vec::new(),
11133                type_parameter: None,
11134            }
11135        }
11136        #[doc(hidden)]
11137        pub fn default_instance() -> &'static Self {
11138            static DEFAULT: super::OpenSignatureBody = super::OpenSignatureBody::const_default();
11139            &DEFAULT
11140        }
11141        ///Sets `r#type` with the provided value.
11142        pub fn with_type<T: Into<super::open_signature_body::Type>>(
11143            mut self,
11144            field: T,
11145        ) -> Self {
11146            self.set_type(field.into());
11147            self
11148        }
11149        ///If `type_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11150        pub fn type_name_opt_mut(&mut self) -> Option<&mut String> {
11151            self.type_name.as_mut().map(|field| field as _)
11152        }
11153        ///Returns a mutable reference to `type_name`.
11154        ///If the field is unset, it is first initialized with the default value.
11155        pub fn type_name_mut(&mut self) -> &mut String {
11156            self.type_name.get_or_insert_default()
11157        }
11158        ///If `type_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
11159        pub fn type_name_opt(&self) -> Option<&str> {
11160            self.type_name.as_ref().map(|field| field as _)
11161        }
11162        ///Sets `type_name` with the provided value.
11163        pub fn set_type_name<T: Into<String>>(&mut self, field: T) {
11164            self.type_name = Some(field.into().into());
11165        }
11166        ///Sets `type_name` with the provided value.
11167        pub fn with_type_name<T: Into<String>>(mut self, field: T) -> Self {
11168            self.set_type_name(field.into());
11169            self
11170        }
11171        ///Returns the value of `type_parameter_instantiation`, or the default value if `type_parameter_instantiation` is unset.
11172        pub fn type_parameter_instantiation(&self) -> &[super::OpenSignatureBody] {
11173            &self.type_parameter_instantiation
11174        }
11175        ///Returns a mutable reference to `type_parameter_instantiation`.
11176        ///If the field is unset, it is first initialized with the default value.
11177        pub fn type_parameter_instantiation_mut(
11178            &mut self,
11179        ) -> &mut Vec<super::OpenSignatureBody> {
11180            &mut self.type_parameter_instantiation
11181        }
11182        ///Sets `type_parameter_instantiation` with the provided value.
11183        pub fn set_type_parameter_instantiation(
11184            &mut self,
11185            field: Vec<super::OpenSignatureBody>,
11186        ) {
11187            self.type_parameter_instantiation = field;
11188        }
11189        ///Sets `type_parameter_instantiation` with the provided value.
11190        pub fn with_type_parameter_instantiation(
11191            mut self,
11192            field: Vec<super::OpenSignatureBody>,
11193        ) -> Self {
11194            self.set_type_parameter_instantiation(field);
11195            self
11196        }
11197        ///If `type_parameter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11198        pub fn type_parameter_opt_mut(&mut self) -> Option<&mut u32> {
11199            self.type_parameter.as_mut().map(|field| field as _)
11200        }
11201        ///Returns a mutable reference to `type_parameter`.
11202        ///If the field is unset, it is first initialized with the default value.
11203        pub fn type_parameter_mut(&mut self) -> &mut u32 {
11204            self.type_parameter.get_or_insert_default()
11205        }
11206        ///If `type_parameter` is set, returns [`Some`] with the value; otherwise returns [`None`].
11207        pub fn type_parameter_opt(&self) -> Option<u32> {
11208            self.type_parameter.as_ref().map(|field| *field)
11209        }
11210        ///Sets `type_parameter` with the provided value.
11211        pub fn set_type_parameter(&mut self, field: u32) {
11212            self.type_parameter = Some(field);
11213        }
11214        ///Sets `type_parameter` with the provided value.
11215        pub fn with_type_parameter(mut self, field: u32) -> Self {
11216            self.set_type_parameter(field);
11217            self
11218        }
11219    }
11220    impl super::Owner {
11221        pub const fn const_default() -> Self {
11222            Self {
11223                kind: None,
11224                address: None,
11225                version: None,
11226            }
11227        }
11228        #[doc(hidden)]
11229        pub fn default_instance() -> &'static Self {
11230            static DEFAULT: super::Owner = super::Owner::const_default();
11231            &DEFAULT
11232        }
11233        ///Sets `kind` with the provided value.
11234        pub fn with_kind<T: Into<super::owner::OwnerKind>>(mut self, field: T) -> Self {
11235            self.set_kind(field.into());
11236            self
11237        }
11238        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11239        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
11240            self.address.as_mut().map(|field| field as _)
11241        }
11242        ///Returns a mutable reference to `address`.
11243        ///If the field is unset, it is first initialized with the default value.
11244        pub fn address_mut(&mut self) -> &mut String {
11245            self.address.get_or_insert_default()
11246        }
11247        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
11248        pub fn address_opt(&self) -> Option<&str> {
11249            self.address.as_ref().map(|field| field as _)
11250        }
11251        ///Sets `address` with the provided value.
11252        pub fn set_address<T: Into<String>>(&mut self, field: T) {
11253            self.address = Some(field.into().into());
11254        }
11255        ///Sets `address` with the provided value.
11256        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
11257            self.set_address(field.into());
11258            self
11259        }
11260        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11261        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
11262            self.version.as_mut().map(|field| field as _)
11263        }
11264        ///Returns a mutable reference to `version`.
11265        ///If the field is unset, it is first initialized with the default value.
11266        pub fn version_mut(&mut self) -> &mut u64 {
11267            self.version.get_or_insert_default()
11268        }
11269        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
11270        pub fn version_opt(&self) -> Option<u64> {
11271            self.version.as_ref().map(|field| *field)
11272        }
11273        ///Sets `version` with the provided value.
11274        pub fn set_version(&mut self, field: u64) {
11275            self.version = Some(field);
11276        }
11277        ///Sets `version` with the provided value.
11278        pub fn with_version(mut self, field: u64) -> Self {
11279            self.set_version(field);
11280            self
11281        }
11282    }
11283    impl super::Package {
11284        pub const fn const_default() -> Self {
11285            Self {
11286                storage_id: None,
11287                original_id: None,
11288                version: None,
11289                modules: Vec::new(),
11290                type_origins: Vec::new(),
11291                linkage: Vec::new(),
11292            }
11293        }
11294        #[doc(hidden)]
11295        pub fn default_instance() -> &'static Self {
11296            static DEFAULT: super::Package = super::Package::const_default();
11297            &DEFAULT
11298        }
11299        ///If `storage_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11300        pub fn storage_id_opt_mut(&mut self) -> Option<&mut String> {
11301            self.storage_id.as_mut().map(|field| field as _)
11302        }
11303        ///Returns a mutable reference to `storage_id`.
11304        ///If the field is unset, it is first initialized with the default value.
11305        pub fn storage_id_mut(&mut self) -> &mut String {
11306            self.storage_id.get_or_insert_default()
11307        }
11308        ///If `storage_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
11309        pub fn storage_id_opt(&self) -> Option<&str> {
11310            self.storage_id.as_ref().map(|field| field as _)
11311        }
11312        ///Sets `storage_id` with the provided value.
11313        pub fn set_storage_id<T: Into<String>>(&mut self, field: T) {
11314            self.storage_id = Some(field.into().into());
11315        }
11316        ///Sets `storage_id` with the provided value.
11317        pub fn with_storage_id<T: Into<String>>(mut self, field: T) -> Self {
11318            self.set_storage_id(field.into());
11319            self
11320        }
11321        ///If `original_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11322        pub fn original_id_opt_mut(&mut self) -> Option<&mut String> {
11323            self.original_id.as_mut().map(|field| field as _)
11324        }
11325        ///Returns a mutable reference to `original_id`.
11326        ///If the field is unset, it is first initialized with the default value.
11327        pub fn original_id_mut(&mut self) -> &mut String {
11328            self.original_id.get_or_insert_default()
11329        }
11330        ///If `original_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
11331        pub fn original_id_opt(&self) -> Option<&str> {
11332            self.original_id.as_ref().map(|field| field as _)
11333        }
11334        ///Sets `original_id` with the provided value.
11335        pub fn set_original_id<T: Into<String>>(&mut self, field: T) {
11336            self.original_id = Some(field.into().into());
11337        }
11338        ///Sets `original_id` with the provided value.
11339        pub fn with_original_id<T: Into<String>>(mut self, field: T) -> Self {
11340            self.set_original_id(field.into());
11341            self
11342        }
11343        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11344        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
11345            self.version.as_mut().map(|field| field as _)
11346        }
11347        ///Returns a mutable reference to `version`.
11348        ///If the field is unset, it is first initialized with the default value.
11349        pub fn version_mut(&mut self) -> &mut u64 {
11350            self.version.get_or_insert_default()
11351        }
11352        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
11353        pub fn version_opt(&self) -> Option<u64> {
11354            self.version.as_ref().map(|field| *field)
11355        }
11356        ///Sets `version` with the provided value.
11357        pub fn set_version(&mut self, field: u64) {
11358            self.version = Some(field);
11359        }
11360        ///Sets `version` with the provided value.
11361        pub fn with_version(mut self, field: u64) -> Self {
11362            self.set_version(field);
11363            self
11364        }
11365        ///Returns the value of `modules`, or the default value if `modules` is unset.
11366        pub fn modules(&self) -> &[super::Module] {
11367            &self.modules
11368        }
11369        ///Returns a mutable reference to `modules`.
11370        ///If the field is unset, it is first initialized with the default value.
11371        pub fn modules_mut(&mut self) -> &mut Vec<super::Module> {
11372            &mut self.modules
11373        }
11374        ///Sets `modules` with the provided value.
11375        pub fn set_modules(&mut self, field: Vec<super::Module>) {
11376            self.modules = field;
11377        }
11378        ///Sets `modules` with the provided value.
11379        pub fn with_modules(mut self, field: Vec<super::Module>) -> Self {
11380            self.set_modules(field);
11381            self
11382        }
11383        ///Returns the value of `type_origins`, or the default value if `type_origins` is unset.
11384        pub fn type_origins(&self) -> &[super::TypeOrigin] {
11385            &self.type_origins
11386        }
11387        ///Returns a mutable reference to `type_origins`.
11388        ///If the field is unset, it is first initialized with the default value.
11389        pub fn type_origins_mut(&mut self) -> &mut Vec<super::TypeOrigin> {
11390            &mut self.type_origins
11391        }
11392        ///Sets `type_origins` with the provided value.
11393        pub fn set_type_origins(&mut self, field: Vec<super::TypeOrigin>) {
11394            self.type_origins = field;
11395        }
11396        ///Sets `type_origins` with the provided value.
11397        pub fn with_type_origins(mut self, field: Vec<super::TypeOrigin>) -> Self {
11398            self.set_type_origins(field);
11399            self
11400        }
11401        ///Returns the value of `linkage`, or the default value if `linkage` is unset.
11402        pub fn linkage(&self) -> &[super::Linkage] {
11403            &self.linkage
11404        }
11405        ///Returns a mutable reference to `linkage`.
11406        ///If the field is unset, it is first initialized with the default value.
11407        pub fn linkage_mut(&mut self) -> &mut Vec<super::Linkage> {
11408            &mut self.linkage
11409        }
11410        ///Sets `linkage` with the provided value.
11411        pub fn set_linkage(&mut self, field: Vec<super::Linkage>) {
11412            self.linkage = field;
11413        }
11414        ///Sets `linkage` with the provided value.
11415        pub fn with_linkage(mut self, field: Vec<super::Linkage>) -> Self {
11416            self.set_linkage(field);
11417            self
11418        }
11419    }
11420    impl super::PackageUpgradeError {
11421        pub const fn const_default() -> Self {
11422            Self {
11423                kind: None,
11424                package_id: None,
11425                digest: None,
11426                policy: None,
11427                ticket_id: None,
11428            }
11429        }
11430        #[doc(hidden)]
11431        pub fn default_instance() -> &'static Self {
11432            static DEFAULT: super::PackageUpgradeError = super::PackageUpgradeError::const_default();
11433            &DEFAULT
11434        }
11435        ///Sets `kind` with the provided value.
11436        pub fn with_kind<T: Into<super::package_upgrade_error::PackageUpgradeErrorKind>>(
11437            mut self,
11438            field: T,
11439        ) -> Self {
11440            self.set_kind(field.into());
11441            self
11442        }
11443        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11444        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
11445            self.package_id.as_mut().map(|field| field as _)
11446        }
11447        ///Returns a mutable reference to `package_id`.
11448        ///If the field is unset, it is first initialized with the default value.
11449        pub fn package_id_mut(&mut self) -> &mut String {
11450            self.package_id.get_or_insert_default()
11451        }
11452        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
11453        pub fn package_id_opt(&self) -> Option<&str> {
11454            self.package_id.as_ref().map(|field| field as _)
11455        }
11456        ///Sets `package_id` with the provided value.
11457        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
11458            self.package_id = Some(field.into().into());
11459        }
11460        ///Sets `package_id` with the provided value.
11461        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
11462            self.set_package_id(field.into());
11463            self
11464        }
11465        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11466        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
11467            self.digest.as_mut().map(|field| field as _)
11468        }
11469        ///Returns a mutable reference to `digest`.
11470        ///If the field is unset, it is first initialized with the default value.
11471        pub fn digest_mut(&mut self) -> &mut String {
11472            self.digest.get_or_insert_default()
11473        }
11474        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
11475        pub fn digest_opt(&self) -> Option<&str> {
11476            self.digest.as_ref().map(|field| field as _)
11477        }
11478        ///Sets `digest` with the provided value.
11479        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
11480            self.digest = Some(field.into().into());
11481        }
11482        ///Sets `digest` with the provided value.
11483        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
11484            self.set_digest(field.into());
11485            self
11486        }
11487        ///If `policy` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11488        pub fn policy_opt_mut(&mut self) -> Option<&mut u32> {
11489            self.policy.as_mut().map(|field| field as _)
11490        }
11491        ///Returns a mutable reference to `policy`.
11492        ///If the field is unset, it is first initialized with the default value.
11493        pub fn policy_mut(&mut self) -> &mut u32 {
11494            self.policy.get_or_insert_default()
11495        }
11496        ///If `policy` is set, returns [`Some`] with the value; otherwise returns [`None`].
11497        pub fn policy_opt(&self) -> Option<u32> {
11498            self.policy.as_ref().map(|field| *field)
11499        }
11500        ///Sets `policy` with the provided value.
11501        pub fn set_policy(&mut self, field: u32) {
11502            self.policy = Some(field);
11503        }
11504        ///Sets `policy` with the provided value.
11505        pub fn with_policy(mut self, field: u32) -> Self {
11506            self.set_policy(field);
11507            self
11508        }
11509        ///If `ticket_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11510        pub fn ticket_id_opt_mut(&mut self) -> Option<&mut String> {
11511            self.ticket_id.as_mut().map(|field| field as _)
11512        }
11513        ///Returns a mutable reference to `ticket_id`.
11514        ///If the field is unset, it is first initialized with the default value.
11515        pub fn ticket_id_mut(&mut self) -> &mut String {
11516            self.ticket_id.get_or_insert_default()
11517        }
11518        ///If `ticket_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
11519        pub fn ticket_id_opt(&self) -> Option<&str> {
11520            self.ticket_id.as_ref().map(|field| field as _)
11521        }
11522        ///Sets `ticket_id` with the provided value.
11523        pub fn set_ticket_id<T: Into<String>>(&mut self, field: T) {
11524            self.ticket_id = Some(field.into().into());
11525        }
11526        ///Sets `ticket_id` with the provided value.
11527        pub fn with_ticket_id<T: Into<String>>(mut self, field: T) -> Self {
11528            self.set_ticket_id(field.into());
11529            self
11530        }
11531    }
11532    impl super::PackageVersion {
11533        pub const fn const_default() -> Self {
11534            Self {
11535                package_id: None,
11536                version: None,
11537            }
11538        }
11539        #[doc(hidden)]
11540        pub fn default_instance() -> &'static Self {
11541            static DEFAULT: super::PackageVersion = super::PackageVersion::const_default();
11542            &DEFAULT
11543        }
11544        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11545        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
11546            self.package_id.as_mut().map(|field| field as _)
11547        }
11548        ///Returns a mutable reference to `package_id`.
11549        ///If the field is unset, it is first initialized with the default value.
11550        pub fn package_id_mut(&mut self) -> &mut String {
11551            self.package_id.get_or_insert_default()
11552        }
11553        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
11554        pub fn package_id_opt(&self) -> Option<&str> {
11555            self.package_id.as_ref().map(|field| field as _)
11556        }
11557        ///Sets `package_id` with the provided value.
11558        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
11559            self.package_id = Some(field.into().into());
11560        }
11561        ///Sets `package_id` with the provided value.
11562        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
11563            self.set_package_id(field.into());
11564            self
11565        }
11566        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11567        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
11568            self.version.as_mut().map(|field| field as _)
11569        }
11570        ///Returns a mutable reference to `version`.
11571        ///If the field is unset, it is first initialized with the default value.
11572        pub fn version_mut(&mut self) -> &mut u64 {
11573            self.version.get_or_insert_default()
11574        }
11575        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
11576        pub fn version_opt(&self) -> Option<u64> {
11577            self.version.as_ref().map(|field| *field)
11578        }
11579        ///Sets `version` with the provided value.
11580        pub fn set_version(&mut self, field: u64) {
11581            self.version = Some(field);
11582        }
11583        ///Sets `version` with the provided value.
11584        pub fn with_version(mut self, field: u64) -> Self {
11585            self.set_version(field);
11586            self
11587        }
11588    }
11589    impl super::PasskeyAuthenticator {
11590        pub const fn const_default() -> Self {
11591            Self {
11592                authenticator_data: None,
11593                client_data_json: None,
11594                signature: None,
11595            }
11596        }
11597        #[doc(hidden)]
11598        pub fn default_instance() -> &'static Self {
11599            static DEFAULT: super::PasskeyAuthenticator = super::PasskeyAuthenticator::const_default();
11600            &DEFAULT
11601        }
11602        ///If `authenticator_data` is set, returns [`Some`] with the value; otherwise returns [`None`].
11603        pub fn authenticator_data_opt(&self) -> Option<&[u8]> {
11604            self.authenticator_data.as_ref().map(|field| field as _)
11605        }
11606        ///Sets `authenticator_data` with the provided value.
11607        pub fn set_authenticator_data<T: Into<::prost::bytes::Bytes>>(
11608            &mut self,
11609            field: T,
11610        ) {
11611            self.authenticator_data = Some(field.into().into());
11612        }
11613        ///Sets `authenticator_data` with the provided value.
11614        pub fn with_authenticator_data<T: Into<::prost::bytes::Bytes>>(
11615            mut self,
11616            field: T,
11617        ) -> Self {
11618            self.set_authenticator_data(field.into());
11619            self
11620        }
11621        ///If `client_data_json` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11622        pub fn client_data_json_opt_mut(&mut self) -> Option<&mut String> {
11623            self.client_data_json.as_mut().map(|field| field as _)
11624        }
11625        ///Returns a mutable reference to `client_data_json`.
11626        ///If the field is unset, it is first initialized with the default value.
11627        pub fn client_data_json_mut(&mut self) -> &mut String {
11628            self.client_data_json.get_or_insert_default()
11629        }
11630        ///If `client_data_json` is set, returns [`Some`] with the value; otherwise returns [`None`].
11631        pub fn client_data_json_opt(&self) -> Option<&str> {
11632            self.client_data_json.as_ref().map(|field| field as _)
11633        }
11634        ///Sets `client_data_json` with the provided value.
11635        pub fn set_client_data_json<T: Into<String>>(&mut self, field: T) {
11636            self.client_data_json = Some(field.into().into());
11637        }
11638        ///Sets `client_data_json` with the provided value.
11639        pub fn with_client_data_json<T: Into<String>>(mut self, field: T) -> Self {
11640            self.set_client_data_json(field.into());
11641            self
11642        }
11643        ///Returns the value of `signature`, or the default value if `signature` is unset.
11644        pub fn signature(&self) -> &super::SimpleSignature {
11645            self.signature
11646                .as_ref()
11647                .map(|field| field as _)
11648                .unwrap_or_else(|| super::SimpleSignature::default_instance() as _)
11649        }
11650        ///If `signature` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11651        pub fn signature_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
11652            self.signature.as_mut().map(|field| field as _)
11653        }
11654        ///Returns a mutable reference to `signature`.
11655        ///If the field is unset, it is first initialized with the default value.
11656        pub fn signature_mut(&mut self) -> &mut super::SimpleSignature {
11657            self.signature.get_or_insert_default()
11658        }
11659        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
11660        pub fn signature_opt(&self) -> Option<&super::SimpleSignature> {
11661            self.signature.as_ref().map(|field| field as _)
11662        }
11663        ///Sets `signature` with the provided value.
11664        pub fn set_signature<T: Into<super::SimpleSignature>>(&mut self, field: T) {
11665            self.signature = Some(field.into().into());
11666        }
11667        ///Sets `signature` with the provided value.
11668        pub fn with_signature<T: Into<super::SimpleSignature>>(
11669            mut self,
11670            field: T,
11671        ) -> Self {
11672            self.set_signature(field.into());
11673            self
11674        }
11675    }
11676    impl super::ProgrammableTransaction {
11677        pub const fn const_default() -> Self {
11678            Self {
11679                inputs: Vec::new(),
11680                commands: Vec::new(),
11681            }
11682        }
11683        #[doc(hidden)]
11684        pub fn default_instance() -> &'static Self {
11685            static DEFAULT: super::ProgrammableTransaction = super::ProgrammableTransaction::const_default();
11686            &DEFAULT
11687        }
11688        ///Returns the value of `inputs`, or the default value if `inputs` is unset.
11689        pub fn inputs(&self) -> &[super::Input] {
11690            &self.inputs
11691        }
11692        ///Returns a mutable reference to `inputs`.
11693        ///If the field is unset, it is first initialized with the default value.
11694        pub fn inputs_mut(&mut self) -> &mut Vec<super::Input> {
11695            &mut self.inputs
11696        }
11697        ///Sets `inputs` with the provided value.
11698        pub fn set_inputs(&mut self, field: Vec<super::Input>) {
11699            self.inputs = field;
11700        }
11701        ///Sets `inputs` with the provided value.
11702        pub fn with_inputs(mut self, field: Vec<super::Input>) -> Self {
11703            self.set_inputs(field);
11704            self
11705        }
11706        ///Returns the value of `commands`, or the default value if `commands` is unset.
11707        pub fn commands(&self) -> &[super::Command] {
11708            &self.commands
11709        }
11710        ///Returns a mutable reference to `commands`.
11711        ///If the field is unset, it is first initialized with the default value.
11712        pub fn commands_mut(&mut self) -> &mut Vec<super::Command> {
11713            &mut self.commands
11714        }
11715        ///Sets `commands` with the provided value.
11716        pub fn set_commands(&mut self, field: Vec<super::Command>) {
11717            self.commands = field;
11718        }
11719        ///Sets `commands` with the provided value.
11720        pub fn with_commands(mut self, field: Vec<super::Command>) -> Self {
11721            self.set_commands(field);
11722            self
11723        }
11724    }
11725    impl super::ProtocolConfig {
11726        pub const fn const_default() -> Self {
11727            Self {
11728                protocol_version: None,
11729                feature_flags: std::collections::BTreeMap::new(),
11730                attributes: std::collections::BTreeMap::new(),
11731            }
11732        }
11733        #[doc(hidden)]
11734        pub fn default_instance() -> &'static Self {
11735            static DEFAULT: super::ProtocolConfig = super::ProtocolConfig::const_default();
11736            &DEFAULT
11737        }
11738        ///If `protocol_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11739        pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
11740            self.protocol_version.as_mut().map(|field| field as _)
11741        }
11742        ///Returns a mutable reference to `protocol_version`.
11743        ///If the field is unset, it is first initialized with the default value.
11744        pub fn protocol_version_mut(&mut self) -> &mut u64 {
11745            self.protocol_version.get_or_insert_default()
11746        }
11747        ///If `protocol_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
11748        pub fn protocol_version_opt(&self) -> Option<u64> {
11749            self.protocol_version.as_ref().map(|field| *field)
11750        }
11751        ///Sets `protocol_version` with the provided value.
11752        pub fn set_protocol_version(&mut self, field: u64) {
11753            self.protocol_version = Some(field);
11754        }
11755        ///Sets `protocol_version` with the provided value.
11756        pub fn with_protocol_version(mut self, field: u64) -> Self {
11757            self.set_protocol_version(field);
11758            self
11759        }
11760        ///Returns the value of `feature_flags`, or the default value if `feature_flags` is unset.
11761        pub fn feature_flags(&self) -> &::std::collections::BTreeMap<String, bool> {
11762            &self.feature_flags
11763        }
11764        ///Returns a mutable reference to `feature_flags`.
11765        ///If the field is unset, it is first initialized with the default value.
11766        pub fn feature_flags_mut(
11767            &mut self,
11768        ) -> &mut ::std::collections::BTreeMap<String, bool> {
11769            &mut self.feature_flags
11770        }
11771        ///Sets `feature_flags` with the provided value.
11772        pub fn set_feature_flags(
11773            &mut self,
11774            field: ::std::collections::BTreeMap<String, bool>,
11775        ) {
11776            self.feature_flags = field;
11777        }
11778        ///Sets `feature_flags` with the provided value.
11779        pub fn with_feature_flags(
11780            mut self,
11781            field: ::std::collections::BTreeMap<String, bool>,
11782        ) -> Self {
11783            self.set_feature_flags(field);
11784            self
11785        }
11786        ///Returns the value of `attributes`, or the default value if `attributes` is unset.
11787        pub fn attributes(&self) -> &::std::collections::BTreeMap<String, String> {
11788            &self.attributes
11789        }
11790        ///Returns a mutable reference to `attributes`.
11791        ///If the field is unset, it is first initialized with the default value.
11792        pub fn attributes_mut(
11793            &mut self,
11794        ) -> &mut ::std::collections::BTreeMap<String, String> {
11795            &mut self.attributes
11796        }
11797        ///Sets `attributes` with the provided value.
11798        pub fn set_attributes(
11799            &mut self,
11800            field: ::std::collections::BTreeMap<String, String>,
11801        ) {
11802            self.attributes = field;
11803        }
11804        ///Sets `attributes` with the provided value.
11805        pub fn with_attributes(
11806            mut self,
11807            field: ::std::collections::BTreeMap<String, String>,
11808        ) -> Self {
11809            self.set_attributes(field);
11810            self
11811        }
11812    }
11813    impl super::Publish {
11814        pub const fn const_default() -> Self {
11815            Self {
11816                modules: Vec::new(),
11817                dependencies: Vec::new(),
11818            }
11819        }
11820        #[doc(hidden)]
11821        pub fn default_instance() -> &'static Self {
11822            static DEFAULT: super::Publish = super::Publish::const_default();
11823            &DEFAULT
11824        }
11825        ///Returns the value of `modules`, or the default value if `modules` is unset.
11826        pub fn modules(&self) -> &[::prost::bytes::Bytes] {
11827            &self.modules
11828        }
11829        ///Returns a mutable reference to `modules`.
11830        ///If the field is unset, it is first initialized with the default value.
11831        pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
11832            &mut self.modules
11833        }
11834        ///Sets `modules` with the provided value.
11835        pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
11836            self.modules = field;
11837        }
11838        ///Sets `modules` with the provided value.
11839        pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
11840            self.set_modules(field);
11841            self
11842        }
11843        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
11844        pub fn dependencies(&self) -> &[String] {
11845            &self.dependencies
11846        }
11847        ///Returns a mutable reference to `dependencies`.
11848        ///If the field is unset, it is first initialized with the default value.
11849        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
11850            &mut self.dependencies
11851        }
11852        ///Sets `dependencies` with the provided value.
11853        pub fn set_dependencies(&mut self, field: Vec<String>) {
11854            self.dependencies = field;
11855        }
11856        ///Sets `dependencies` with the provided value.
11857        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
11858            self.set_dependencies(field);
11859            self
11860        }
11861    }
11862    impl super::RandomnessStateUpdate {
11863        pub const fn const_default() -> Self {
11864            Self {
11865                epoch: None,
11866                randomness_round: None,
11867                random_bytes: None,
11868                randomness_object_initial_shared_version: None,
11869            }
11870        }
11871        #[doc(hidden)]
11872        pub fn default_instance() -> &'static Self {
11873            static DEFAULT: super::RandomnessStateUpdate = super::RandomnessStateUpdate::const_default();
11874            &DEFAULT
11875        }
11876        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11877        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
11878            self.epoch.as_mut().map(|field| field as _)
11879        }
11880        ///Returns a mutable reference to `epoch`.
11881        ///If the field is unset, it is first initialized with the default value.
11882        pub fn epoch_mut(&mut self) -> &mut u64 {
11883            self.epoch.get_or_insert_default()
11884        }
11885        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
11886        pub fn epoch_opt(&self) -> Option<u64> {
11887            self.epoch.as_ref().map(|field| *field)
11888        }
11889        ///Sets `epoch` with the provided value.
11890        pub fn set_epoch(&mut self, field: u64) {
11891            self.epoch = Some(field);
11892        }
11893        ///Sets `epoch` with the provided value.
11894        pub fn with_epoch(mut self, field: u64) -> Self {
11895            self.set_epoch(field);
11896            self
11897        }
11898        ///If `randomness_round` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11899        pub fn randomness_round_opt_mut(&mut self) -> Option<&mut u64> {
11900            self.randomness_round.as_mut().map(|field| field as _)
11901        }
11902        ///Returns a mutable reference to `randomness_round`.
11903        ///If the field is unset, it is first initialized with the default value.
11904        pub fn randomness_round_mut(&mut self) -> &mut u64 {
11905            self.randomness_round.get_or_insert_default()
11906        }
11907        ///If `randomness_round` is set, returns [`Some`] with the value; otherwise returns [`None`].
11908        pub fn randomness_round_opt(&self) -> Option<u64> {
11909            self.randomness_round.as_ref().map(|field| *field)
11910        }
11911        ///Sets `randomness_round` with the provided value.
11912        pub fn set_randomness_round(&mut self, field: u64) {
11913            self.randomness_round = Some(field);
11914        }
11915        ///Sets `randomness_round` with the provided value.
11916        pub fn with_randomness_round(mut self, field: u64) -> Self {
11917            self.set_randomness_round(field);
11918            self
11919        }
11920        ///If `random_bytes` is set, returns [`Some`] with the value; otherwise returns [`None`].
11921        pub fn random_bytes_opt(&self) -> Option<&[u8]> {
11922            self.random_bytes.as_ref().map(|field| field as _)
11923        }
11924        ///Sets `random_bytes` with the provided value.
11925        pub fn set_random_bytes<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
11926            self.random_bytes = Some(field.into().into());
11927        }
11928        ///Sets `random_bytes` with the provided value.
11929        pub fn with_random_bytes<T: Into<::prost::bytes::Bytes>>(
11930            mut self,
11931            field: T,
11932        ) -> Self {
11933            self.set_random_bytes(field.into());
11934            self
11935        }
11936        ///If `randomness_object_initial_shared_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11937        pub fn randomness_object_initial_shared_version_opt_mut(
11938            &mut self,
11939        ) -> Option<&mut u64> {
11940            self.randomness_object_initial_shared_version
11941                .as_mut()
11942                .map(|field| field as _)
11943        }
11944        ///Returns a mutable reference to `randomness_object_initial_shared_version`.
11945        ///If the field is unset, it is first initialized with the default value.
11946        pub fn randomness_object_initial_shared_version_mut(&mut self) -> &mut u64 {
11947            self.randomness_object_initial_shared_version.get_or_insert_default()
11948        }
11949        ///If `randomness_object_initial_shared_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
11950        pub fn randomness_object_initial_shared_version_opt(&self) -> Option<u64> {
11951            self.randomness_object_initial_shared_version.as_ref().map(|field| *field)
11952        }
11953        ///Sets `randomness_object_initial_shared_version` with the provided value.
11954        pub fn set_randomness_object_initial_shared_version(&mut self, field: u64) {
11955            self.randomness_object_initial_shared_version = Some(field);
11956        }
11957        ///Sets `randomness_object_initial_shared_version` with the provided value.
11958        pub fn with_randomness_object_initial_shared_version(
11959            mut self,
11960            field: u64,
11961        ) -> Self {
11962            self.set_randomness_object_initial_shared_version(field);
11963            self
11964        }
11965    }
11966    impl super::RegulatedCoinMetadata {
11967        pub const fn const_default() -> Self {
11968            Self {
11969                id: None,
11970                coin_metadata_object: None,
11971                deny_cap_object: None,
11972                allow_global_pause: None,
11973                variant: None,
11974                coin_regulated_state: None,
11975            }
11976        }
11977        #[doc(hidden)]
11978        pub fn default_instance() -> &'static Self {
11979            static DEFAULT: super::RegulatedCoinMetadata = super::RegulatedCoinMetadata::const_default();
11980            &DEFAULT
11981        }
11982        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
11983        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
11984            self.id.as_mut().map(|field| field as _)
11985        }
11986        ///Returns a mutable reference to `id`.
11987        ///If the field is unset, it is first initialized with the default value.
11988        pub fn id_mut(&mut self) -> &mut String {
11989            self.id.get_or_insert_default()
11990        }
11991        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
11992        pub fn id_opt(&self) -> Option<&str> {
11993            self.id.as_ref().map(|field| field as _)
11994        }
11995        ///Sets `id` with the provided value.
11996        pub fn set_id<T: Into<String>>(&mut self, field: T) {
11997            self.id = Some(field.into().into());
11998        }
11999        ///Sets `id` with the provided value.
12000        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
12001            self.set_id(field.into());
12002            self
12003        }
12004        ///If `coin_metadata_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12005        pub fn coin_metadata_object_opt_mut(&mut self) -> Option<&mut String> {
12006            self.coin_metadata_object.as_mut().map(|field| field as _)
12007        }
12008        ///Returns a mutable reference to `coin_metadata_object`.
12009        ///If the field is unset, it is first initialized with the default value.
12010        pub fn coin_metadata_object_mut(&mut self) -> &mut String {
12011            self.coin_metadata_object.get_or_insert_default()
12012        }
12013        ///If `coin_metadata_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
12014        pub fn coin_metadata_object_opt(&self) -> Option<&str> {
12015            self.coin_metadata_object.as_ref().map(|field| field as _)
12016        }
12017        ///Sets `coin_metadata_object` with the provided value.
12018        pub fn set_coin_metadata_object<T: Into<String>>(&mut self, field: T) {
12019            self.coin_metadata_object = Some(field.into().into());
12020        }
12021        ///Sets `coin_metadata_object` with the provided value.
12022        pub fn with_coin_metadata_object<T: Into<String>>(mut self, field: T) -> Self {
12023            self.set_coin_metadata_object(field.into());
12024            self
12025        }
12026        ///If `deny_cap_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12027        pub fn deny_cap_object_opt_mut(&mut self) -> Option<&mut String> {
12028            self.deny_cap_object.as_mut().map(|field| field as _)
12029        }
12030        ///Returns a mutable reference to `deny_cap_object`.
12031        ///If the field is unset, it is first initialized with the default value.
12032        pub fn deny_cap_object_mut(&mut self) -> &mut String {
12033            self.deny_cap_object.get_or_insert_default()
12034        }
12035        ///If `deny_cap_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
12036        pub fn deny_cap_object_opt(&self) -> Option<&str> {
12037            self.deny_cap_object.as_ref().map(|field| field as _)
12038        }
12039        ///Sets `deny_cap_object` with the provided value.
12040        pub fn set_deny_cap_object<T: Into<String>>(&mut self, field: T) {
12041            self.deny_cap_object = Some(field.into().into());
12042        }
12043        ///Sets `deny_cap_object` with the provided value.
12044        pub fn with_deny_cap_object<T: Into<String>>(mut self, field: T) -> Self {
12045            self.set_deny_cap_object(field.into());
12046            self
12047        }
12048        ///If `allow_global_pause` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12049        pub fn allow_global_pause_opt_mut(&mut self) -> Option<&mut bool> {
12050            self.allow_global_pause.as_mut().map(|field| field as _)
12051        }
12052        ///Returns a mutable reference to `allow_global_pause`.
12053        ///If the field is unset, it is first initialized with the default value.
12054        pub fn allow_global_pause_mut(&mut self) -> &mut bool {
12055            self.allow_global_pause.get_or_insert_default()
12056        }
12057        ///If `allow_global_pause` is set, returns [`Some`] with the value; otherwise returns [`None`].
12058        pub fn allow_global_pause_opt(&self) -> Option<bool> {
12059            self.allow_global_pause.as_ref().map(|field| *field)
12060        }
12061        ///Sets `allow_global_pause` with the provided value.
12062        pub fn set_allow_global_pause(&mut self, field: bool) {
12063            self.allow_global_pause = Some(field);
12064        }
12065        ///Sets `allow_global_pause` with the provided value.
12066        pub fn with_allow_global_pause(mut self, field: bool) -> Self {
12067            self.set_allow_global_pause(field);
12068            self
12069        }
12070        ///If `variant` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12071        pub fn variant_opt_mut(&mut self) -> Option<&mut u32> {
12072            self.variant.as_mut().map(|field| field as _)
12073        }
12074        ///Returns a mutable reference to `variant`.
12075        ///If the field is unset, it is first initialized with the default value.
12076        pub fn variant_mut(&mut self) -> &mut u32 {
12077            self.variant.get_or_insert_default()
12078        }
12079        ///If `variant` is set, returns [`Some`] with the value; otherwise returns [`None`].
12080        pub fn variant_opt(&self) -> Option<u32> {
12081            self.variant.as_ref().map(|field| *field)
12082        }
12083        ///Sets `variant` with the provided value.
12084        pub fn set_variant(&mut self, field: u32) {
12085            self.variant = Some(field);
12086        }
12087        ///Sets `variant` with the provided value.
12088        pub fn with_variant(mut self, field: u32) -> Self {
12089            self.set_variant(field);
12090            self
12091        }
12092        ///Sets `coin_regulated_state` with the provided value.
12093        pub fn with_coin_regulated_state<
12094            T: Into<super::regulated_coin_metadata::CoinRegulatedState>,
12095        >(mut self, field: T) -> Self {
12096            self.set_coin_regulated_state(field.into());
12097            self
12098        }
12099    }
12100    impl super::ReverseLookupNameRequest {
12101        pub const fn const_default() -> Self {
12102            Self { address: None }
12103        }
12104        #[doc(hidden)]
12105        pub fn default_instance() -> &'static Self {
12106            static DEFAULT: super::ReverseLookupNameRequest = super::ReverseLookupNameRequest::const_default();
12107            &DEFAULT
12108        }
12109        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12110        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
12111            self.address.as_mut().map(|field| field as _)
12112        }
12113        ///Returns a mutable reference to `address`.
12114        ///If the field is unset, it is first initialized with the default value.
12115        pub fn address_mut(&mut self) -> &mut String {
12116            self.address.get_or_insert_default()
12117        }
12118        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
12119        pub fn address_opt(&self) -> Option<&str> {
12120            self.address.as_ref().map(|field| field as _)
12121        }
12122        ///Sets `address` with the provided value.
12123        pub fn set_address<T: Into<String>>(&mut self, field: T) {
12124            self.address = Some(field.into().into());
12125        }
12126        ///Sets `address` with the provided value.
12127        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
12128            self.set_address(field.into());
12129            self
12130        }
12131    }
12132    impl super::ReverseLookupNameResponse {
12133        pub const fn const_default() -> Self {
12134            Self { record: None }
12135        }
12136        #[doc(hidden)]
12137        pub fn default_instance() -> &'static Self {
12138            static DEFAULT: super::ReverseLookupNameResponse = super::ReverseLookupNameResponse::const_default();
12139            &DEFAULT
12140        }
12141        ///Returns the value of `record`, or the default value if `record` is unset.
12142        pub fn record(&self) -> &super::NameRecord {
12143            self.record
12144                .as_ref()
12145                .map(|field| field as _)
12146                .unwrap_or_else(|| super::NameRecord::default_instance() as _)
12147        }
12148        ///If `record` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12149        pub fn record_opt_mut(&mut self) -> Option<&mut super::NameRecord> {
12150            self.record.as_mut().map(|field| field as _)
12151        }
12152        ///Returns a mutable reference to `record`.
12153        ///If the field is unset, it is first initialized with the default value.
12154        pub fn record_mut(&mut self) -> &mut super::NameRecord {
12155            self.record.get_or_insert_default()
12156        }
12157        ///If `record` is set, returns [`Some`] with the value; otherwise returns [`None`].
12158        pub fn record_opt(&self) -> Option<&super::NameRecord> {
12159            self.record.as_ref().map(|field| field as _)
12160        }
12161        ///Sets `record` with the provided value.
12162        pub fn set_record<T: Into<super::NameRecord>>(&mut self, field: T) {
12163            self.record = Some(field.into().into());
12164        }
12165        ///Sets `record` with the provided value.
12166        pub fn with_record<T: Into<super::NameRecord>>(mut self, field: T) -> Self {
12167            self.set_record(field.into());
12168            self
12169        }
12170    }
12171    impl super::SimpleSignature {
12172        pub const fn const_default() -> Self {
12173            Self {
12174                scheme: None,
12175                signature: None,
12176                public_key: None,
12177            }
12178        }
12179        #[doc(hidden)]
12180        pub fn default_instance() -> &'static Self {
12181            static DEFAULT: super::SimpleSignature = super::SimpleSignature::const_default();
12182            &DEFAULT
12183        }
12184        ///Sets `scheme` with the provided value.
12185        pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
12186            self.set_scheme(field.into());
12187            self
12188        }
12189        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
12190        pub fn signature_opt(&self) -> Option<&[u8]> {
12191            self.signature.as_ref().map(|field| field as _)
12192        }
12193        ///Sets `signature` with the provided value.
12194        pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
12195            self.signature = Some(field.into().into());
12196        }
12197        ///Sets `signature` with the provided value.
12198        pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
12199            mut self,
12200            field: T,
12201        ) -> Self {
12202            self.set_signature(field.into());
12203            self
12204        }
12205        ///If `public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
12206        pub fn public_key_opt(&self) -> Option<&[u8]> {
12207            self.public_key.as_ref().map(|field| field as _)
12208        }
12209        ///Sets `public_key` with the provided value.
12210        pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
12211            self.public_key = Some(field.into().into());
12212        }
12213        ///Sets `public_key` with the provided value.
12214        pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
12215            mut self,
12216            field: T,
12217        ) -> Self {
12218            self.set_public_key(field.into());
12219            self
12220        }
12221    }
12222    impl super::SimulateTransactionRequest {
12223        pub const fn const_default() -> Self {
12224            Self {
12225                transaction: None,
12226                read_mask: None,
12227                checks: None,
12228                do_gas_selection: None,
12229            }
12230        }
12231        #[doc(hidden)]
12232        pub fn default_instance() -> &'static Self {
12233            static DEFAULT: super::SimulateTransactionRequest = super::SimulateTransactionRequest::const_default();
12234            &DEFAULT
12235        }
12236        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
12237        pub fn transaction(&self) -> &super::Transaction {
12238            self.transaction
12239                .as_ref()
12240                .map(|field| field as _)
12241                .unwrap_or_else(|| super::Transaction::default_instance() as _)
12242        }
12243        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12244        pub fn transaction_opt_mut(&mut self) -> Option<&mut super::Transaction> {
12245            self.transaction.as_mut().map(|field| field as _)
12246        }
12247        ///Returns a mutable reference to `transaction`.
12248        ///If the field is unset, it is first initialized with the default value.
12249        pub fn transaction_mut(&mut self) -> &mut super::Transaction {
12250            self.transaction.get_or_insert_default()
12251        }
12252        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
12253        pub fn transaction_opt(&self) -> Option<&super::Transaction> {
12254            self.transaction.as_ref().map(|field| field as _)
12255        }
12256        ///Sets `transaction` with the provided value.
12257        pub fn set_transaction<T: Into<super::Transaction>>(&mut self, field: T) {
12258            self.transaction = Some(field.into().into());
12259        }
12260        ///Sets `transaction` with the provided value.
12261        pub fn with_transaction<T: Into<super::Transaction>>(
12262            mut self,
12263            field: T,
12264        ) -> Self {
12265            self.set_transaction(field.into());
12266            self
12267        }
12268        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12269        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
12270            self.read_mask.as_mut().map(|field| field as _)
12271        }
12272        ///Returns a mutable reference to `read_mask`.
12273        ///If the field is unset, it is first initialized with the default value.
12274        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
12275            self.read_mask.get_or_insert_default()
12276        }
12277        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
12278        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
12279            self.read_mask.as_ref().map(|field| field as _)
12280        }
12281        ///Sets `read_mask` with the provided value.
12282        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
12283            self.read_mask = Some(field.into().into());
12284        }
12285        ///Sets `read_mask` with the provided value.
12286        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
12287            mut self,
12288            field: T,
12289        ) -> Self {
12290            self.set_read_mask(field.into());
12291            self
12292        }
12293        ///Sets `checks` with the provided value.
12294        pub fn with_checks<
12295            T: Into<super::simulate_transaction_request::TransactionChecks>,
12296        >(mut self, field: T) -> Self {
12297            self.set_checks(field.into());
12298            self
12299        }
12300        ///If `do_gas_selection` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12301        pub fn do_gas_selection_opt_mut(&mut self) -> Option<&mut bool> {
12302            self.do_gas_selection.as_mut().map(|field| field as _)
12303        }
12304        ///Returns a mutable reference to `do_gas_selection`.
12305        ///If the field is unset, it is first initialized with the default value.
12306        pub fn do_gas_selection_mut(&mut self) -> &mut bool {
12307            self.do_gas_selection.get_or_insert_default()
12308        }
12309        ///If `do_gas_selection` is set, returns [`Some`] with the value; otherwise returns [`None`].
12310        pub fn do_gas_selection_opt(&self) -> Option<bool> {
12311            self.do_gas_selection.as_ref().map(|field| *field)
12312        }
12313        ///Sets `do_gas_selection` with the provided value.
12314        pub fn set_do_gas_selection(&mut self, field: bool) {
12315            self.do_gas_selection = Some(field);
12316        }
12317        ///Sets `do_gas_selection` with the provided value.
12318        pub fn with_do_gas_selection(mut self, field: bool) -> Self {
12319            self.set_do_gas_selection(field);
12320            self
12321        }
12322    }
12323    impl super::SimulateTransactionResponse {
12324        pub const fn const_default() -> Self {
12325            Self {
12326                transaction: None,
12327                command_outputs: Vec::new(),
12328            }
12329        }
12330        #[doc(hidden)]
12331        pub fn default_instance() -> &'static Self {
12332            static DEFAULT: super::SimulateTransactionResponse = super::SimulateTransactionResponse::const_default();
12333            &DEFAULT
12334        }
12335        ///Returns the value of `transaction`, or the default value if `transaction` is unset.
12336        pub fn transaction(&self) -> &super::ExecutedTransaction {
12337            self.transaction
12338                .as_ref()
12339                .map(|field| field as _)
12340                .unwrap_or_else(|| super::ExecutedTransaction::default_instance() as _)
12341        }
12342        ///If `transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12343        pub fn transaction_opt_mut(
12344            &mut self,
12345        ) -> Option<&mut super::ExecutedTransaction> {
12346            self.transaction.as_mut().map(|field| field as _)
12347        }
12348        ///Returns a mutable reference to `transaction`.
12349        ///If the field is unset, it is first initialized with the default value.
12350        pub fn transaction_mut(&mut self) -> &mut super::ExecutedTransaction {
12351            self.transaction.get_or_insert_default()
12352        }
12353        ///If `transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
12354        pub fn transaction_opt(&self) -> Option<&super::ExecutedTransaction> {
12355            self.transaction.as_ref().map(|field| field as _)
12356        }
12357        ///Sets `transaction` with the provided value.
12358        pub fn set_transaction<T: Into<super::ExecutedTransaction>>(
12359            &mut self,
12360            field: T,
12361        ) {
12362            self.transaction = Some(field.into().into());
12363        }
12364        ///Sets `transaction` with the provided value.
12365        pub fn with_transaction<T: Into<super::ExecutedTransaction>>(
12366            mut self,
12367            field: T,
12368        ) -> Self {
12369            self.set_transaction(field.into());
12370            self
12371        }
12372        ///Returns the value of `command_outputs`, or the default value if `command_outputs` is unset.
12373        pub fn command_outputs(&self) -> &[super::CommandResult] {
12374            &self.command_outputs
12375        }
12376        ///Returns a mutable reference to `command_outputs`.
12377        ///If the field is unset, it is first initialized with the default value.
12378        pub fn command_outputs_mut(&mut self) -> &mut Vec<super::CommandResult> {
12379            &mut self.command_outputs
12380        }
12381        ///Sets `command_outputs` with the provided value.
12382        pub fn set_command_outputs(&mut self, field: Vec<super::CommandResult>) {
12383            self.command_outputs = field;
12384        }
12385        ///Sets `command_outputs` with the provided value.
12386        pub fn with_command_outputs(mut self, field: Vec<super::CommandResult>) -> Self {
12387            self.set_command_outputs(field);
12388            self
12389        }
12390    }
12391    impl super::SizeError {
12392        pub const fn const_default() -> Self {
12393            Self { size: None, max_size: None }
12394        }
12395        #[doc(hidden)]
12396        pub fn default_instance() -> &'static Self {
12397            static DEFAULT: super::SizeError = super::SizeError::const_default();
12398            &DEFAULT
12399        }
12400        ///If `size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12401        pub fn size_opt_mut(&mut self) -> Option<&mut u64> {
12402            self.size.as_mut().map(|field| field as _)
12403        }
12404        ///Returns a mutable reference to `size`.
12405        ///If the field is unset, it is first initialized with the default value.
12406        pub fn size_mut(&mut self) -> &mut u64 {
12407            self.size.get_or_insert_default()
12408        }
12409        ///If `size` is set, returns [`Some`] with the value; otherwise returns [`None`].
12410        pub fn size_opt(&self) -> Option<u64> {
12411            self.size.as_ref().map(|field| *field)
12412        }
12413        ///Sets `size` with the provided value.
12414        pub fn set_size(&mut self, field: u64) {
12415            self.size = Some(field);
12416        }
12417        ///Sets `size` with the provided value.
12418        pub fn with_size(mut self, field: u64) -> Self {
12419            self.set_size(field);
12420            self
12421        }
12422        ///If `max_size` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12423        pub fn max_size_opt_mut(&mut self) -> Option<&mut u64> {
12424            self.max_size.as_mut().map(|field| field as _)
12425        }
12426        ///Returns a mutable reference to `max_size`.
12427        ///If the field is unset, it is first initialized with the default value.
12428        pub fn max_size_mut(&mut self) -> &mut u64 {
12429            self.max_size.get_or_insert_default()
12430        }
12431        ///If `max_size` is set, returns [`Some`] with the value; otherwise returns [`None`].
12432        pub fn max_size_opt(&self) -> Option<u64> {
12433            self.max_size.as_ref().map(|field| *field)
12434        }
12435        ///Sets `max_size` with the provided value.
12436        pub fn set_max_size(&mut self, field: u64) {
12437            self.max_size = Some(field);
12438        }
12439        ///Sets `max_size` with the provided value.
12440        pub fn with_max_size(mut self, field: u64) -> Self {
12441            self.set_max_size(field);
12442            self
12443        }
12444    }
12445    impl super::SplitCoins {
12446        pub const fn const_default() -> Self {
12447            Self {
12448                coin: None,
12449                amounts: Vec::new(),
12450            }
12451        }
12452        #[doc(hidden)]
12453        pub fn default_instance() -> &'static Self {
12454            static DEFAULT: super::SplitCoins = super::SplitCoins::const_default();
12455            &DEFAULT
12456        }
12457        ///Returns the value of `coin`, or the default value if `coin` is unset.
12458        pub fn coin(&self) -> &super::Argument {
12459            self.coin
12460                .as_ref()
12461                .map(|field| field as _)
12462                .unwrap_or_else(|| super::Argument::default_instance() as _)
12463        }
12464        ///If `coin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12465        pub fn coin_opt_mut(&mut self) -> Option<&mut super::Argument> {
12466            self.coin.as_mut().map(|field| field as _)
12467        }
12468        ///Returns a mutable reference to `coin`.
12469        ///If the field is unset, it is first initialized with the default value.
12470        pub fn coin_mut(&mut self) -> &mut super::Argument {
12471            self.coin.get_or_insert_default()
12472        }
12473        ///If `coin` is set, returns [`Some`] with the value; otherwise returns [`None`].
12474        pub fn coin_opt(&self) -> Option<&super::Argument> {
12475            self.coin.as_ref().map(|field| field as _)
12476        }
12477        ///Sets `coin` with the provided value.
12478        pub fn set_coin<T: Into<super::Argument>>(&mut self, field: T) {
12479            self.coin = Some(field.into().into());
12480        }
12481        ///Sets `coin` with the provided value.
12482        pub fn with_coin<T: Into<super::Argument>>(mut self, field: T) -> Self {
12483            self.set_coin(field.into());
12484            self
12485        }
12486        ///Returns the value of `amounts`, or the default value if `amounts` is unset.
12487        pub fn amounts(&self) -> &[super::Argument] {
12488            &self.amounts
12489        }
12490        ///Returns a mutable reference to `amounts`.
12491        ///If the field is unset, it is first initialized with the default value.
12492        pub fn amounts_mut(&mut self) -> &mut Vec<super::Argument> {
12493            &mut self.amounts
12494        }
12495        ///Sets `amounts` with the provided value.
12496        pub fn set_amounts(&mut self, field: Vec<super::Argument>) {
12497            self.amounts = field;
12498        }
12499        ///Sets `amounts` with the provided value.
12500        pub fn with_amounts(mut self, field: Vec<super::Argument>) -> Self {
12501            self.set_amounts(field);
12502            self
12503        }
12504    }
12505    impl super::StakeSubsidy {
12506        pub const fn const_default() -> Self {
12507            Self {
12508                balance: None,
12509                distribution_counter: None,
12510                current_distribution_amount: None,
12511                stake_subsidy_period_length: None,
12512                stake_subsidy_decrease_rate: None,
12513                extra_fields: None,
12514            }
12515        }
12516        #[doc(hidden)]
12517        pub fn default_instance() -> &'static Self {
12518            static DEFAULT: super::StakeSubsidy = super::StakeSubsidy::const_default();
12519            &DEFAULT
12520        }
12521        ///If `balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12522        pub fn balance_opt_mut(&mut self) -> Option<&mut u64> {
12523            self.balance.as_mut().map(|field| field as _)
12524        }
12525        ///Returns a mutable reference to `balance`.
12526        ///If the field is unset, it is first initialized with the default value.
12527        pub fn balance_mut(&mut self) -> &mut u64 {
12528            self.balance.get_or_insert_default()
12529        }
12530        ///If `balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
12531        pub fn balance_opt(&self) -> Option<u64> {
12532            self.balance.as_ref().map(|field| *field)
12533        }
12534        ///Sets `balance` with the provided value.
12535        pub fn set_balance(&mut self, field: u64) {
12536            self.balance = Some(field);
12537        }
12538        ///Sets `balance` with the provided value.
12539        pub fn with_balance(mut self, field: u64) -> Self {
12540            self.set_balance(field);
12541            self
12542        }
12543        ///If `distribution_counter` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12544        pub fn distribution_counter_opt_mut(&mut self) -> Option<&mut u64> {
12545            self.distribution_counter.as_mut().map(|field| field as _)
12546        }
12547        ///Returns a mutable reference to `distribution_counter`.
12548        ///If the field is unset, it is first initialized with the default value.
12549        pub fn distribution_counter_mut(&mut self) -> &mut u64 {
12550            self.distribution_counter.get_or_insert_default()
12551        }
12552        ///If `distribution_counter` is set, returns [`Some`] with the value; otherwise returns [`None`].
12553        pub fn distribution_counter_opt(&self) -> Option<u64> {
12554            self.distribution_counter.as_ref().map(|field| *field)
12555        }
12556        ///Sets `distribution_counter` with the provided value.
12557        pub fn set_distribution_counter(&mut self, field: u64) {
12558            self.distribution_counter = Some(field);
12559        }
12560        ///Sets `distribution_counter` with the provided value.
12561        pub fn with_distribution_counter(mut self, field: u64) -> Self {
12562            self.set_distribution_counter(field);
12563            self
12564        }
12565        ///If `current_distribution_amount` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12566        pub fn current_distribution_amount_opt_mut(&mut self) -> Option<&mut u64> {
12567            self.current_distribution_amount.as_mut().map(|field| field as _)
12568        }
12569        ///Returns a mutable reference to `current_distribution_amount`.
12570        ///If the field is unset, it is first initialized with the default value.
12571        pub fn current_distribution_amount_mut(&mut self) -> &mut u64 {
12572            self.current_distribution_amount.get_or_insert_default()
12573        }
12574        ///If `current_distribution_amount` is set, returns [`Some`] with the value; otherwise returns [`None`].
12575        pub fn current_distribution_amount_opt(&self) -> Option<u64> {
12576            self.current_distribution_amount.as_ref().map(|field| *field)
12577        }
12578        ///Sets `current_distribution_amount` with the provided value.
12579        pub fn set_current_distribution_amount(&mut self, field: u64) {
12580            self.current_distribution_amount = Some(field);
12581        }
12582        ///Sets `current_distribution_amount` with the provided value.
12583        pub fn with_current_distribution_amount(mut self, field: u64) -> Self {
12584            self.set_current_distribution_amount(field);
12585            self
12586        }
12587        ///If `stake_subsidy_period_length` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12588        pub fn stake_subsidy_period_length_opt_mut(&mut self) -> Option<&mut u64> {
12589            self.stake_subsidy_period_length.as_mut().map(|field| field as _)
12590        }
12591        ///Returns a mutable reference to `stake_subsidy_period_length`.
12592        ///If the field is unset, it is first initialized with the default value.
12593        pub fn stake_subsidy_period_length_mut(&mut self) -> &mut u64 {
12594            self.stake_subsidy_period_length.get_or_insert_default()
12595        }
12596        ///If `stake_subsidy_period_length` is set, returns [`Some`] with the value; otherwise returns [`None`].
12597        pub fn stake_subsidy_period_length_opt(&self) -> Option<u64> {
12598            self.stake_subsidy_period_length.as_ref().map(|field| *field)
12599        }
12600        ///Sets `stake_subsidy_period_length` with the provided value.
12601        pub fn set_stake_subsidy_period_length(&mut self, field: u64) {
12602            self.stake_subsidy_period_length = Some(field);
12603        }
12604        ///Sets `stake_subsidy_period_length` with the provided value.
12605        pub fn with_stake_subsidy_period_length(mut self, field: u64) -> Self {
12606            self.set_stake_subsidy_period_length(field);
12607            self
12608        }
12609        ///If `stake_subsidy_decrease_rate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12610        pub fn stake_subsidy_decrease_rate_opt_mut(&mut self) -> Option<&mut u32> {
12611            self.stake_subsidy_decrease_rate.as_mut().map(|field| field as _)
12612        }
12613        ///Returns a mutable reference to `stake_subsidy_decrease_rate`.
12614        ///If the field is unset, it is first initialized with the default value.
12615        pub fn stake_subsidy_decrease_rate_mut(&mut self) -> &mut u32 {
12616            self.stake_subsidy_decrease_rate.get_or_insert_default()
12617        }
12618        ///If `stake_subsidy_decrease_rate` is set, returns [`Some`] with the value; otherwise returns [`None`].
12619        pub fn stake_subsidy_decrease_rate_opt(&self) -> Option<u32> {
12620            self.stake_subsidy_decrease_rate.as_ref().map(|field| *field)
12621        }
12622        ///Sets `stake_subsidy_decrease_rate` with the provided value.
12623        pub fn set_stake_subsidy_decrease_rate(&mut self, field: u32) {
12624            self.stake_subsidy_decrease_rate = Some(field);
12625        }
12626        ///Sets `stake_subsidy_decrease_rate` with the provided value.
12627        pub fn with_stake_subsidy_decrease_rate(mut self, field: u32) -> Self {
12628            self.set_stake_subsidy_decrease_rate(field);
12629            self
12630        }
12631        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
12632        pub fn extra_fields(&self) -> &super::MoveTable {
12633            self.extra_fields
12634                .as_ref()
12635                .map(|field| field as _)
12636                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
12637        }
12638        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12639        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
12640            self.extra_fields.as_mut().map(|field| field as _)
12641        }
12642        ///Returns a mutable reference to `extra_fields`.
12643        ///If the field is unset, it is first initialized with the default value.
12644        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
12645            self.extra_fields.get_or_insert_default()
12646        }
12647        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
12648        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
12649            self.extra_fields.as_ref().map(|field| field as _)
12650        }
12651        ///Sets `extra_fields` with the provided value.
12652        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
12653            self.extra_fields = Some(field.into().into());
12654        }
12655        ///Sets `extra_fields` with the provided value.
12656        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
12657            self.set_extra_fields(field.into());
12658            self
12659        }
12660    }
12661    impl super::StakingPool {
12662        pub const fn const_default() -> Self {
12663            Self {
12664                id: None,
12665                activation_epoch: None,
12666                deactivation_epoch: None,
12667                sui_balance: None,
12668                rewards_pool: None,
12669                pool_token_balance: None,
12670                exchange_rates: None,
12671                pending_stake: None,
12672                pending_total_sui_withdraw: None,
12673                pending_pool_token_withdraw: None,
12674                extra_fields: None,
12675            }
12676        }
12677        #[doc(hidden)]
12678        pub fn default_instance() -> &'static Self {
12679            static DEFAULT: super::StakingPool = super::StakingPool::const_default();
12680            &DEFAULT
12681        }
12682        ///If `id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12683        pub fn id_opt_mut(&mut self) -> Option<&mut String> {
12684            self.id.as_mut().map(|field| field as _)
12685        }
12686        ///Returns a mutable reference to `id`.
12687        ///If the field is unset, it is first initialized with the default value.
12688        pub fn id_mut(&mut self) -> &mut String {
12689            self.id.get_or_insert_default()
12690        }
12691        ///If `id` is set, returns [`Some`] with the value; otherwise returns [`None`].
12692        pub fn id_opt(&self) -> Option<&str> {
12693            self.id.as_ref().map(|field| field as _)
12694        }
12695        ///Sets `id` with the provided value.
12696        pub fn set_id<T: Into<String>>(&mut self, field: T) {
12697            self.id = Some(field.into().into());
12698        }
12699        ///Sets `id` with the provided value.
12700        pub fn with_id<T: Into<String>>(mut self, field: T) -> Self {
12701            self.set_id(field.into());
12702            self
12703        }
12704        ///If `activation_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12705        pub fn activation_epoch_opt_mut(&mut self) -> Option<&mut u64> {
12706            self.activation_epoch.as_mut().map(|field| field as _)
12707        }
12708        ///Returns a mutable reference to `activation_epoch`.
12709        ///If the field is unset, it is first initialized with the default value.
12710        pub fn activation_epoch_mut(&mut self) -> &mut u64 {
12711            self.activation_epoch.get_or_insert_default()
12712        }
12713        ///If `activation_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
12714        pub fn activation_epoch_opt(&self) -> Option<u64> {
12715            self.activation_epoch.as_ref().map(|field| *field)
12716        }
12717        ///Sets `activation_epoch` with the provided value.
12718        pub fn set_activation_epoch(&mut self, field: u64) {
12719            self.activation_epoch = Some(field);
12720        }
12721        ///Sets `activation_epoch` with the provided value.
12722        pub fn with_activation_epoch(mut self, field: u64) -> Self {
12723            self.set_activation_epoch(field);
12724            self
12725        }
12726        ///If `deactivation_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12727        pub fn deactivation_epoch_opt_mut(&mut self) -> Option<&mut u64> {
12728            self.deactivation_epoch.as_mut().map(|field| field as _)
12729        }
12730        ///Returns a mutable reference to `deactivation_epoch`.
12731        ///If the field is unset, it is first initialized with the default value.
12732        pub fn deactivation_epoch_mut(&mut self) -> &mut u64 {
12733            self.deactivation_epoch.get_or_insert_default()
12734        }
12735        ///If `deactivation_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
12736        pub fn deactivation_epoch_opt(&self) -> Option<u64> {
12737            self.deactivation_epoch.as_ref().map(|field| *field)
12738        }
12739        ///Sets `deactivation_epoch` with the provided value.
12740        pub fn set_deactivation_epoch(&mut self, field: u64) {
12741            self.deactivation_epoch = Some(field);
12742        }
12743        ///Sets `deactivation_epoch` with the provided value.
12744        pub fn with_deactivation_epoch(mut self, field: u64) -> Self {
12745            self.set_deactivation_epoch(field);
12746            self
12747        }
12748        ///If `sui_balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12749        pub fn sui_balance_opt_mut(&mut self) -> Option<&mut u64> {
12750            self.sui_balance.as_mut().map(|field| field as _)
12751        }
12752        ///Returns a mutable reference to `sui_balance`.
12753        ///If the field is unset, it is first initialized with the default value.
12754        pub fn sui_balance_mut(&mut self) -> &mut u64 {
12755            self.sui_balance.get_or_insert_default()
12756        }
12757        ///If `sui_balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
12758        pub fn sui_balance_opt(&self) -> Option<u64> {
12759            self.sui_balance.as_ref().map(|field| *field)
12760        }
12761        ///Sets `sui_balance` with the provided value.
12762        pub fn set_sui_balance(&mut self, field: u64) {
12763            self.sui_balance = Some(field);
12764        }
12765        ///Sets `sui_balance` with the provided value.
12766        pub fn with_sui_balance(mut self, field: u64) -> Self {
12767            self.set_sui_balance(field);
12768            self
12769        }
12770        ///If `rewards_pool` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12771        pub fn rewards_pool_opt_mut(&mut self) -> Option<&mut u64> {
12772            self.rewards_pool.as_mut().map(|field| field as _)
12773        }
12774        ///Returns a mutable reference to `rewards_pool`.
12775        ///If the field is unset, it is first initialized with the default value.
12776        pub fn rewards_pool_mut(&mut self) -> &mut u64 {
12777            self.rewards_pool.get_or_insert_default()
12778        }
12779        ///If `rewards_pool` is set, returns [`Some`] with the value; otherwise returns [`None`].
12780        pub fn rewards_pool_opt(&self) -> Option<u64> {
12781            self.rewards_pool.as_ref().map(|field| *field)
12782        }
12783        ///Sets `rewards_pool` with the provided value.
12784        pub fn set_rewards_pool(&mut self, field: u64) {
12785            self.rewards_pool = Some(field);
12786        }
12787        ///Sets `rewards_pool` with the provided value.
12788        pub fn with_rewards_pool(mut self, field: u64) -> Self {
12789            self.set_rewards_pool(field);
12790            self
12791        }
12792        ///If `pool_token_balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12793        pub fn pool_token_balance_opt_mut(&mut self) -> Option<&mut u64> {
12794            self.pool_token_balance.as_mut().map(|field| field as _)
12795        }
12796        ///Returns a mutable reference to `pool_token_balance`.
12797        ///If the field is unset, it is first initialized with the default value.
12798        pub fn pool_token_balance_mut(&mut self) -> &mut u64 {
12799            self.pool_token_balance.get_or_insert_default()
12800        }
12801        ///If `pool_token_balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
12802        pub fn pool_token_balance_opt(&self) -> Option<u64> {
12803            self.pool_token_balance.as_ref().map(|field| *field)
12804        }
12805        ///Sets `pool_token_balance` with the provided value.
12806        pub fn set_pool_token_balance(&mut self, field: u64) {
12807            self.pool_token_balance = Some(field);
12808        }
12809        ///Sets `pool_token_balance` with the provided value.
12810        pub fn with_pool_token_balance(mut self, field: u64) -> Self {
12811            self.set_pool_token_balance(field);
12812            self
12813        }
12814        ///Returns the value of `exchange_rates`, or the default value if `exchange_rates` is unset.
12815        pub fn exchange_rates(&self) -> &super::MoveTable {
12816            self.exchange_rates
12817                .as_ref()
12818                .map(|field| field as _)
12819                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
12820        }
12821        ///If `exchange_rates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12822        pub fn exchange_rates_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
12823            self.exchange_rates.as_mut().map(|field| field as _)
12824        }
12825        ///Returns a mutable reference to `exchange_rates`.
12826        ///If the field is unset, it is first initialized with the default value.
12827        pub fn exchange_rates_mut(&mut self) -> &mut super::MoveTable {
12828            self.exchange_rates.get_or_insert_default()
12829        }
12830        ///If `exchange_rates` is set, returns [`Some`] with the value; otherwise returns [`None`].
12831        pub fn exchange_rates_opt(&self) -> Option<&super::MoveTable> {
12832            self.exchange_rates.as_ref().map(|field| field as _)
12833        }
12834        ///Sets `exchange_rates` with the provided value.
12835        pub fn set_exchange_rates<T: Into<super::MoveTable>>(&mut self, field: T) {
12836            self.exchange_rates = Some(field.into().into());
12837        }
12838        ///Sets `exchange_rates` with the provided value.
12839        pub fn with_exchange_rates<T: Into<super::MoveTable>>(
12840            mut self,
12841            field: T,
12842        ) -> Self {
12843            self.set_exchange_rates(field.into());
12844            self
12845        }
12846        ///If `pending_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12847        pub fn pending_stake_opt_mut(&mut self) -> Option<&mut u64> {
12848            self.pending_stake.as_mut().map(|field| field as _)
12849        }
12850        ///Returns a mutable reference to `pending_stake`.
12851        ///If the field is unset, it is first initialized with the default value.
12852        pub fn pending_stake_mut(&mut self) -> &mut u64 {
12853            self.pending_stake.get_or_insert_default()
12854        }
12855        ///If `pending_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
12856        pub fn pending_stake_opt(&self) -> Option<u64> {
12857            self.pending_stake.as_ref().map(|field| *field)
12858        }
12859        ///Sets `pending_stake` with the provided value.
12860        pub fn set_pending_stake(&mut self, field: u64) {
12861            self.pending_stake = Some(field);
12862        }
12863        ///Sets `pending_stake` with the provided value.
12864        pub fn with_pending_stake(mut self, field: u64) -> Self {
12865            self.set_pending_stake(field);
12866            self
12867        }
12868        ///If `pending_total_sui_withdraw` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12869        pub fn pending_total_sui_withdraw_opt_mut(&mut self) -> Option<&mut u64> {
12870            self.pending_total_sui_withdraw.as_mut().map(|field| field as _)
12871        }
12872        ///Returns a mutable reference to `pending_total_sui_withdraw`.
12873        ///If the field is unset, it is first initialized with the default value.
12874        pub fn pending_total_sui_withdraw_mut(&mut self) -> &mut u64 {
12875            self.pending_total_sui_withdraw.get_or_insert_default()
12876        }
12877        ///If `pending_total_sui_withdraw` is set, returns [`Some`] with the value; otherwise returns [`None`].
12878        pub fn pending_total_sui_withdraw_opt(&self) -> Option<u64> {
12879            self.pending_total_sui_withdraw.as_ref().map(|field| *field)
12880        }
12881        ///Sets `pending_total_sui_withdraw` with the provided value.
12882        pub fn set_pending_total_sui_withdraw(&mut self, field: u64) {
12883            self.pending_total_sui_withdraw = Some(field);
12884        }
12885        ///Sets `pending_total_sui_withdraw` with the provided value.
12886        pub fn with_pending_total_sui_withdraw(mut self, field: u64) -> Self {
12887            self.set_pending_total_sui_withdraw(field);
12888            self
12889        }
12890        ///If `pending_pool_token_withdraw` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12891        pub fn pending_pool_token_withdraw_opt_mut(&mut self) -> Option<&mut u64> {
12892            self.pending_pool_token_withdraw.as_mut().map(|field| field as _)
12893        }
12894        ///Returns a mutable reference to `pending_pool_token_withdraw`.
12895        ///If the field is unset, it is first initialized with the default value.
12896        pub fn pending_pool_token_withdraw_mut(&mut self) -> &mut u64 {
12897            self.pending_pool_token_withdraw.get_or_insert_default()
12898        }
12899        ///If `pending_pool_token_withdraw` is set, returns [`Some`] with the value; otherwise returns [`None`].
12900        pub fn pending_pool_token_withdraw_opt(&self) -> Option<u64> {
12901            self.pending_pool_token_withdraw.as_ref().map(|field| *field)
12902        }
12903        ///Sets `pending_pool_token_withdraw` with the provided value.
12904        pub fn set_pending_pool_token_withdraw(&mut self, field: u64) {
12905            self.pending_pool_token_withdraw = Some(field);
12906        }
12907        ///Sets `pending_pool_token_withdraw` with the provided value.
12908        pub fn with_pending_pool_token_withdraw(mut self, field: u64) -> Self {
12909            self.set_pending_pool_token_withdraw(field);
12910            self
12911        }
12912        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
12913        pub fn extra_fields(&self) -> &super::MoveTable {
12914            self.extra_fields
12915                .as_ref()
12916                .map(|field| field as _)
12917                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
12918        }
12919        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12920        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
12921            self.extra_fields.as_mut().map(|field| field as _)
12922        }
12923        ///Returns a mutable reference to `extra_fields`.
12924        ///If the field is unset, it is first initialized with the default value.
12925        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
12926            self.extra_fields.get_or_insert_default()
12927        }
12928        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
12929        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
12930            self.extra_fields.as_ref().map(|field| field as _)
12931        }
12932        ///Sets `extra_fields` with the provided value.
12933        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
12934            self.extra_fields = Some(field.into().into());
12935        }
12936        ///Sets `extra_fields` with the provided value.
12937        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
12938            self.set_extra_fields(field.into());
12939            self
12940        }
12941    }
12942    impl super::StorageFund {
12943        pub const fn const_default() -> Self {
12944            Self {
12945                total_object_storage_rebates: None,
12946                non_refundable_balance: None,
12947            }
12948        }
12949        #[doc(hidden)]
12950        pub fn default_instance() -> &'static Self {
12951            static DEFAULT: super::StorageFund = super::StorageFund::const_default();
12952            &DEFAULT
12953        }
12954        ///If `total_object_storage_rebates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12955        pub fn total_object_storage_rebates_opt_mut(&mut self) -> Option<&mut u64> {
12956            self.total_object_storage_rebates.as_mut().map(|field| field as _)
12957        }
12958        ///Returns a mutable reference to `total_object_storage_rebates`.
12959        ///If the field is unset, it is first initialized with the default value.
12960        pub fn total_object_storage_rebates_mut(&mut self) -> &mut u64 {
12961            self.total_object_storage_rebates.get_or_insert_default()
12962        }
12963        ///If `total_object_storage_rebates` is set, returns [`Some`] with the value; otherwise returns [`None`].
12964        pub fn total_object_storage_rebates_opt(&self) -> Option<u64> {
12965            self.total_object_storage_rebates.as_ref().map(|field| *field)
12966        }
12967        ///Sets `total_object_storage_rebates` with the provided value.
12968        pub fn set_total_object_storage_rebates(&mut self, field: u64) {
12969            self.total_object_storage_rebates = Some(field);
12970        }
12971        ///Sets `total_object_storage_rebates` with the provided value.
12972        pub fn with_total_object_storage_rebates(mut self, field: u64) -> Self {
12973            self.set_total_object_storage_rebates(field);
12974            self
12975        }
12976        ///If `non_refundable_balance` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
12977        pub fn non_refundable_balance_opt_mut(&mut self) -> Option<&mut u64> {
12978            self.non_refundable_balance.as_mut().map(|field| field as _)
12979        }
12980        ///Returns a mutable reference to `non_refundable_balance`.
12981        ///If the field is unset, it is first initialized with the default value.
12982        pub fn non_refundable_balance_mut(&mut self) -> &mut u64 {
12983            self.non_refundable_balance.get_or_insert_default()
12984        }
12985        ///If `non_refundable_balance` is set, returns [`Some`] with the value; otherwise returns [`None`].
12986        pub fn non_refundable_balance_opt(&self) -> Option<u64> {
12987            self.non_refundable_balance.as_ref().map(|field| *field)
12988        }
12989        ///Sets `non_refundable_balance` with the provided value.
12990        pub fn set_non_refundable_balance(&mut self, field: u64) {
12991            self.non_refundable_balance = Some(field);
12992        }
12993        ///Sets `non_refundable_balance` with the provided value.
12994        pub fn with_non_refundable_balance(mut self, field: u64) -> Self {
12995            self.set_non_refundable_balance(field);
12996            self
12997        }
12998    }
12999    impl super::SubscribeCheckpointsRequest {
13000        pub const fn const_default() -> Self {
13001            Self { read_mask: None }
13002        }
13003        #[doc(hidden)]
13004        pub fn default_instance() -> &'static Self {
13005            static DEFAULT: super::SubscribeCheckpointsRequest = super::SubscribeCheckpointsRequest::const_default();
13006            &DEFAULT
13007        }
13008        ///If `read_mask` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13009        pub fn read_mask_opt_mut(&mut self) -> Option<&mut ::prost_types::FieldMask> {
13010            self.read_mask.as_mut().map(|field| field as _)
13011        }
13012        ///Returns a mutable reference to `read_mask`.
13013        ///If the field is unset, it is first initialized with the default value.
13014        pub fn read_mask_mut(&mut self) -> &mut ::prost_types::FieldMask {
13015            self.read_mask.get_or_insert_default()
13016        }
13017        ///If `read_mask` is set, returns [`Some`] with the value; otherwise returns [`None`].
13018        pub fn read_mask_opt(&self) -> Option<&::prost_types::FieldMask> {
13019            self.read_mask.as_ref().map(|field| field as _)
13020        }
13021        ///Sets `read_mask` with the provided value.
13022        pub fn set_read_mask<T: Into<::prost_types::FieldMask>>(&mut self, field: T) {
13023            self.read_mask = Some(field.into().into());
13024        }
13025        ///Sets `read_mask` with the provided value.
13026        pub fn with_read_mask<T: Into<::prost_types::FieldMask>>(
13027            mut self,
13028            field: T,
13029        ) -> Self {
13030            self.set_read_mask(field.into());
13031            self
13032        }
13033    }
13034    impl super::SubscribeCheckpointsResponse {
13035        pub const fn const_default() -> Self {
13036            Self {
13037                cursor: None,
13038                checkpoint: None,
13039            }
13040        }
13041        #[doc(hidden)]
13042        pub fn default_instance() -> &'static Self {
13043            static DEFAULT: super::SubscribeCheckpointsResponse = super::SubscribeCheckpointsResponse::const_default();
13044            &DEFAULT
13045        }
13046        ///If `cursor` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13047        pub fn cursor_opt_mut(&mut self) -> Option<&mut u64> {
13048            self.cursor.as_mut().map(|field| field as _)
13049        }
13050        ///Returns a mutable reference to `cursor`.
13051        ///If the field is unset, it is first initialized with the default value.
13052        pub fn cursor_mut(&mut self) -> &mut u64 {
13053            self.cursor.get_or_insert_default()
13054        }
13055        ///If `cursor` is set, returns [`Some`] with the value; otherwise returns [`None`].
13056        pub fn cursor_opt(&self) -> Option<u64> {
13057            self.cursor.as_ref().map(|field| *field)
13058        }
13059        ///Sets `cursor` with the provided value.
13060        pub fn set_cursor(&mut self, field: u64) {
13061            self.cursor = Some(field);
13062        }
13063        ///Sets `cursor` with the provided value.
13064        pub fn with_cursor(mut self, field: u64) -> Self {
13065            self.set_cursor(field);
13066            self
13067        }
13068        ///Returns the value of `checkpoint`, or the default value if `checkpoint` is unset.
13069        pub fn checkpoint(&self) -> &super::Checkpoint {
13070            self.checkpoint
13071                .as_ref()
13072                .map(|field| field as _)
13073                .unwrap_or_else(|| super::Checkpoint::default_instance() as _)
13074        }
13075        ///If `checkpoint` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13076        pub fn checkpoint_opt_mut(&mut self) -> Option<&mut super::Checkpoint> {
13077            self.checkpoint.as_mut().map(|field| field as _)
13078        }
13079        ///Returns a mutable reference to `checkpoint`.
13080        ///If the field is unset, it is first initialized with the default value.
13081        pub fn checkpoint_mut(&mut self) -> &mut super::Checkpoint {
13082            self.checkpoint.get_or_insert_default()
13083        }
13084        ///If `checkpoint` is set, returns [`Some`] with the value; otherwise returns [`None`].
13085        pub fn checkpoint_opt(&self) -> Option<&super::Checkpoint> {
13086            self.checkpoint.as_ref().map(|field| field as _)
13087        }
13088        ///Sets `checkpoint` with the provided value.
13089        pub fn set_checkpoint<T: Into<super::Checkpoint>>(&mut self, field: T) {
13090            self.checkpoint = Some(field.into().into());
13091        }
13092        ///Sets `checkpoint` with the provided value.
13093        pub fn with_checkpoint<T: Into<super::Checkpoint>>(mut self, field: T) -> Self {
13094            self.set_checkpoint(field.into());
13095            self
13096        }
13097    }
13098    impl super::SystemPackage {
13099        pub const fn const_default() -> Self {
13100            Self {
13101                version: None,
13102                modules: Vec::new(),
13103                dependencies: Vec::new(),
13104            }
13105        }
13106        #[doc(hidden)]
13107        pub fn default_instance() -> &'static Self {
13108            static DEFAULT: super::SystemPackage = super::SystemPackage::const_default();
13109            &DEFAULT
13110        }
13111        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13112        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
13113            self.version.as_mut().map(|field| field as _)
13114        }
13115        ///Returns a mutable reference to `version`.
13116        ///If the field is unset, it is first initialized with the default value.
13117        pub fn version_mut(&mut self) -> &mut u64 {
13118            self.version.get_or_insert_default()
13119        }
13120        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
13121        pub fn version_opt(&self) -> Option<u64> {
13122            self.version.as_ref().map(|field| *field)
13123        }
13124        ///Sets `version` with the provided value.
13125        pub fn set_version(&mut self, field: u64) {
13126            self.version = Some(field);
13127        }
13128        ///Sets `version` with the provided value.
13129        pub fn with_version(mut self, field: u64) -> Self {
13130            self.set_version(field);
13131            self
13132        }
13133        ///Returns the value of `modules`, or the default value if `modules` is unset.
13134        pub fn modules(&self) -> &[::prost::bytes::Bytes] {
13135            &self.modules
13136        }
13137        ///Returns a mutable reference to `modules`.
13138        ///If the field is unset, it is first initialized with the default value.
13139        pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
13140            &mut self.modules
13141        }
13142        ///Sets `modules` with the provided value.
13143        pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
13144            self.modules = field;
13145        }
13146        ///Sets `modules` with the provided value.
13147        pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
13148            self.set_modules(field);
13149            self
13150        }
13151        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
13152        pub fn dependencies(&self) -> &[String] {
13153            &self.dependencies
13154        }
13155        ///Returns a mutable reference to `dependencies`.
13156        ///If the field is unset, it is first initialized with the default value.
13157        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
13158            &mut self.dependencies
13159        }
13160        ///Sets `dependencies` with the provided value.
13161        pub fn set_dependencies(&mut self, field: Vec<String>) {
13162            self.dependencies = field;
13163        }
13164        ///Sets `dependencies` with the provided value.
13165        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
13166            self.set_dependencies(field);
13167            self
13168        }
13169    }
13170    impl super::SystemParameters {
13171        pub const fn const_default() -> Self {
13172            Self {
13173                epoch_duration_ms: None,
13174                stake_subsidy_start_epoch: None,
13175                min_validator_count: None,
13176                max_validator_count: None,
13177                min_validator_joining_stake: None,
13178                validator_low_stake_threshold: None,
13179                validator_very_low_stake_threshold: None,
13180                validator_low_stake_grace_period: None,
13181                extra_fields: None,
13182            }
13183        }
13184        #[doc(hidden)]
13185        pub fn default_instance() -> &'static Self {
13186            static DEFAULT: super::SystemParameters = super::SystemParameters::const_default();
13187            &DEFAULT
13188        }
13189        ///If `epoch_duration_ms` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13190        pub fn epoch_duration_ms_opt_mut(&mut self) -> Option<&mut u64> {
13191            self.epoch_duration_ms.as_mut().map(|field| field as _)
13192        }
13193        ///Returns a mutable reference to `epoch_duration_ms`.
13194        ///If the field is unset, it is first initialized with the default value.
13195        pub fn epoch_duration_ms_mut(&mut self) -> &mut u64 {
13196            self.epoch_duration_ms.get_or_insert_default()
13197        }
13198        ///If `epoch_duration_ms` is set, returns [`Some`] with the value; otherwise returns [`None`].
13199        pub fn epoch_duration_ms_opt(&self) -> Option<u64> {
13200            self.epoch_duration_ms.as_ref().map(|field| *field)
13201        }
13202        ///Sets `epoch_duration_ms` with the provided value.
13203        pub fn set_epoch_duration_ms(&mut self, field: u64) {
13204            self.epoch_duration_ms = Some(field);
13205        }
13206        ///Sets `epoch_duration_ms` with the provided value.
13207        pub fn with_epoch_duration_ms(mut self, field: u64) -> Self {
13208            self.set_epoch_duration_ms(field);
13209            self
13210        }
13211        ///If `stake_subsidy_start_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13212        pub fn stake_subsidy_start_epoch_opt_mut(&mut self) -> Option<&mut u64> {
13213            self.stake_subsidy_start_epoch.as_mut().map(|field| field as _)
13214        }
13215        ///Returns a mutable reference to `stake_subsidy_start_epoch`.
13216        ///If the field is unset, it is first initialized with the default value.
13217        pub fn stake_subsidy_start_epoch_mut(&mut self) -> &mut u64 {
13218            self.stake_subsidy_start_epoch.get_or_insert_default()
13219        }
13220        ///If `stake_subsidy_start_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
13221        pub fn stake_subsidy_start_epoch_opt(&self) -> Option<u64> {
13222            self.stake_subsidy_start_epoch.as_ref().map(|field| *field)
13223        }
13224        ///Sets `stake_subsidy_start_epoch` with the provided value.
13225        pub fn set_stake_subsidy_start_epoch(&mut self, field: u64) {
13226            self.stake_subsidy_start_epoch = Some(field);
13227        }
13228        ///Sets `stake_subsidy_start_epoch` with the provided value.
13229        pub fn with_stake_subsidy_start_epoch(mut self, field: u64) -> Self {
13230            self.set_stake_subsidy_start_epoch(field);
13231            self
13232        }
13233        ///If `min_validator_count` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13234        pub fn min_validator_count_opt_mut(&mut self) -> Option<&mut u64> {
13235            self.min_validator_count.as_mut().map(|field| field as _)
13236        }
13237        ///Returns a mutable reference to `min_validator_count`.
13238        ///If the field is unset, it is first initialized with the default value.
13239        pub fn min_validator_count_mut(&mut self) -> &mut u64 {
13240            self.min_validator_count.get_or_insert_default()
13241        }
13242        ///If `min_validator_count` is set, returns [`Some`] with the value; otherwise returns [`None`].
13243        pub fn min_validator_count_opt(&self) -> Option<u64> {
13244            self.min_validator_count.as_ref().map(|field| *field)
13245        }
13246        ///Sets `min_validator_count` with the provided value.
13247        pub fn set_min_validator_count(&mut self, field: u64) {
13248            self.min_validator_count = Some(field);
13249        }
13250        ///Sets `min_validator_count` with the provided value.
13251        pub fn with_min_validator_count(mut self, field: u64) -> Self {
13252            self.set_min_validator_count(field);
13253            self
13254        }
13255        ///If `max_validator_count` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13256        pub fn max_validator_count_opt_mut(&mut self) -> Option<&mut u64> {
13257            self.max_validator_count.as_mut().map(|field| field as _)
13258        }
13259        ///Returns a mutable reference to `max_validator_count`.
13260        ///If the field is unset, it is first initialized with the default value.
13261        pub fn max_validator_count_mut(&mut self) -> &mut u64 {
13262            self.max_validator_count.get_or_insert_default()
13263        }
13264        ///If `max_validator_count` is set, returns [`Some`] with the value; otherwise returns [`None`].
13265        pub fn max_validator_count_opt(&self) -> Option<u64> {
13266            self.max_validator_count.as_ref().map(|field| *field)
13267        }
13268        ///Sets `max_validator_count` with the provided value.
13269        pub fn set_max_validator_count(&mut self, field: u64) {
13270            self.max_validator_count = Some(field);
13271        }
13272        ///Sets `max_validator_count` with the provided value.
13273        pub fn with_max_validator_count(mut self, field: u64) -> Self {
13274            self.set_max_validator_count(field);
13275            self
13276        }
13277        ///If `min_validator_joining_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13278        pub fn min_validator_joining_stake_opt_mut(&mut self) -> Option<&mut u64> {
13279            self.min_validator_joining_stake.as_mut().map(|field| field as _)
13280        }
13281        ///Returns a mutable reference to `min_validator_joining_stake`.
13282        ///If the field is unset, it is first initialized with the default value.
13283        pub fn min_validator_joining_stake_mut(&mut self) -> &mut u64 {
13284            self.min_validator_joining_stake.get_or_insert_default()
13285        }
13286        ///If `min_validator_joining_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
13287        pub fn min_validator_joining_stake_opt(&self) -> Option<u64> {
13288            self.min_validator_joining_stake.as_ref().map(|field| *field)
13289        }
13290        ///Sets `min_validator_joining_stake` with the provided value.
13291        pub fn set_min_validator_joining_stake(&mut self, field: u64) {
13292            self.min_validator_joining_stake = Some(field);
13293        }
13294        ///Sets `min_validator_joining_stake` with the provided value.
13295        pub fn with_min_validator_joining_stake(mut self, field: u64) -> Self {
13296            self.set_min_validator_joining_stake(field);
13297            self
13298        }
13299        ///If `validator_low_stake_threshold` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13300        pub fn validator_low_stake_threshold_opt_mut(&mut self) -> Option<&mut u64> {
13301            self.validator_low_stake_threshold.as_mut().map(|field| field as _)
13302        }
13303        ///Returns a mutable reference to `validator_low_stake_threshold`.
13304        ///If the field is unset, it is first initialized with the default value.
13305        pub fn validator_low_stake_threshold_mut(&mut self) -> &mut u64 {
13306            self.validator_low_stake_threshold.get_or_insert_default()
13307        }
13308        ///If `validator_low_stake_threshold` is set, returns [`Some`] with the value; otherwise returns [`None`].
13309        pub fn validator_low_stake_threshold_opt(&self) -> Option<u64> {
13310            self.validator_low_stake_threshold.as_ref().map(|field| *field)
13311        }
13312        ///Sets `validator_low_stake_threshold` with the provided value.
13313        pub fn set_validator_low_stake_threshold(&mut self, field: u64) {
13314            self.validator_low_stake_threshold = Some(field);
13315        }
13316        ///Sets `validator_low_stake_threshold` with the provided value.
13317        pub fn with_validator_low_stake_threshold(mut self, field: u64) -> Self {
13318            self.set_validator_low_stake_threshold(field);
13319            self
13320        }
13321        ///If `validator_very_low_stake_threshold` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13322        pub fn validator_very_low_stake_threshold_opt_mut(
13323            &mut self,
13324        ) -> Option<&mut u64> {
13325            self.validator_very_low_stake_threshold.as_mut().map(|field| field as _)
13326        }
13327        ///Returns a mutable reference to `validator_very_low_stake_threshold`.
13328        ///If the field is unset, it is first initialized with the default value.
13329        pub fn validator_very_low_stake_threshold_mut(&mut self) -> &mut u64 {
13330            self.validator_very_low_stake_threshold.get_or_insert_default()
13331        }
13332        ///If `validator_very_low_stake_threshold` is set, returns [`Some`] with the value; otherwise returns [`None`].
13333        pub fn validator_very_low_stake_threshold_opt(&self) -> Option<u64> {
13334            self.validator_very_low_stake_threshold.as_ref().map(|field| *field)
13335        }
13336        ///Sets `validator_very_low_stake_threshold` with the provided value.
13337        pub fn set_validator_very_low_stake_threshold(&mut self, field: u64) {
13338            self.validator_very_low_stake_threshold = Some(field);
13339        }
13340        ///Sets `validator_very_low_stake_threshold` with the provided value.
13341        pub fn with_validator_very_low_stake_threshold(mut self, field: u64) -> Self {
13342            self.set_validator_very_low_stake_threshold(field);
13343            self
13344        }
13345        ///If `validator_low_stake_grace_period` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13346        pub fn validator_low_stake_grace_period_opt_mut(&mut self) -> Option<&mut u64> {
13347            self.validator_low_stake_grace_period.as_mut().map(|field| field as _)
13348        }
13349        ///Returns a mutable reference to `validator_low_stake_grace_period`.
13350        ///If the field is unset, it is first initialized with the default value.
13351        pub fn validator_low_stake_grace_period_mut(&mut self) -> &mut u64 {
13352            self.validator_low_stake_grace_period.get_or_insert_default()
13353        }
13354        ///If `validator_low_stake_grace_period` is set, returns [`Some`] with the value; otherwise returns [`None`].
13355        pub fn validator_low_stake_grace_period_opt(&self) -> Option<u64> {
13356            self.validator_low_stake_grace_period.as_ref().map(|field| *field)
13357        }
13358        ///Sets `validator_low_stake_grace_period` with the provided value.
13359        pub fn set_validator_low_stake_grace_period(&mut self, field: u64) {
13360            self.validator_low_stake_grace_period = Some(field);
13361        }
13362        ///Sets `validator_low_stake_grace_period` with the provided value.
13363        pub fn with_validator_low_stake_grace_period(mut self, field: u64) -> Self {
13364            self.set_validator_low_stake_grace_period(field);
13365            self
13366        }
13367        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
13368        pub fn extra_fields(&self) -> &super::MoveTable {
13369            self.extra_fields
13370                .as_ref()
13371                .map(|field| field as _)
13372                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
13373        }
13374        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13375        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
13376            self.extra_fields.as_mut().map(|field| field as _)
13377        }
13378        ///Returns a mutable reference to `extra_fields`.
13379        ///If the field is unset, it is first initialized with the default value.
13380        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
13381            self.extra_fields.get_or_insert_default()
13382        }
13383        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
13384        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
13385            self.extra_fields.as_ref().map(|field| field as _)
13386        }
13387        ///Sets `extra_fields` with the provided value.
13388        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
13389            self.extra_fields = Some(field.into().into());
13390        }
13391        ///Sets `extra_fields` with the provided value.
13392        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
13393            self.set_extra_fields(field.into());
13394            self
13395        }
13396    }
13397    impl super::SystemState {
13398        pub const fn const_default() -> Self {
13399            Self {
13400                version: None,
13401                epoch: None,
13402                protocol_version: None,
13403                validators: None,
13404                storage_fund: None,
13405                parameters: None,
13406                reference_gas_price: None,
13407                validator_report_records: Vec::new(),
13408                stake_subsidy: None,
13409                safe_mode: None,
13410                safe_mode_storage_rewards: None,
13411                safe_mode_computation_rewards: None,
13412                safe_mode_storage_rebates: None,
13413                safe_mode_non_refundable_storage_fee: None,
13414                epoch_start_timestamp_ms: None,
13415                extra_fields: None,
13416            }
13417        }
13418        #[doc(hidden)]
13419        pub fn default_instance() -> &'static Self {
13420            static DEFAULT: super::SystemState = super::SystemState::const_default();
13421            &DEFAULT
13422        }
13423        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13424        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
13425            self.version.as_mut().map(|field| field as _)
13426        }
13427        ///Returns a mutable reference to `version`.
13428        ///If the field is unset, it is first initialized with the default value.
13429        pub fn version_mut(&mut self) -> &mut u64 {
13430            self.version.get_or_insert_default()
13431        }
13432        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
13433        pub fn version_opt(&self) -> Option<u64> {
13434            self.version.as_ref().map(|field| *field)
13435        }
13436        ///Sets `version` with the provided value.
13437        pub fn set_version(&mut self, field: u64) {
13438            self.version = Some(field);
13439        }
13440        ///Sets `version` with the provided value.
13441        pub fn with_version(mut self, field: u64) -> Self {
13442            self.set_version(field);
13443            self
13444        }
13445        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13446        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
13447            self.epoch.as_mut().map(|field| field as _)
13448        }
13449        ///Returns a mutable reference to `epoch`.
13450        ///If the field is unset, it is first initialized with the default value.
13451        pub fn epoch_mut(&mut self) -> &mut u64 {
13452            self.epoch.get_or_insert_default()
13453        }
13454        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
13455        pub fn epoch_opt(&self) -> Option<u64> {
13456            self.epoch.as_ref().map(|field| *field)
13457        }
13458        ///Sets `epoch` with the provided value.
13459        pub fn set_epoch(&mut self, field: u64) {
13460            self.epoch = Some(field);
13461        }
13462        ///Sets `epoch` with the provided value.
13463        pub fn with_epoch(mut self, field: u64) -> Self {
13464            self.set_epoch(field);
13465            self
13466        }
13467        ///If `protocol_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13468        pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
13469            self.protocol_version.as_mut().map(|field| field as _)
13470        }
13471        ///Returns a mutable reference to `protocol_version`.
13472        ///If the field is unset, it is first initialized with the default value.
13473        pub fn protocol_version_mut(&mut self) -> &mut u64 {
13474            self.protocol_version.get_or_insert_default()
13475        }
13476        ///If `protocol_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
13477        pub fn protocol_version_opt(&self) -> Option<u64> {
13478            self.protocol_version.as_ref().map(|field| *field)
13479        }
13480        ///Sets `protocol_version` with the provided value.
13481        pub fn set_protocol_version(&mut self, field: u64) {
13482            self.protocol_version = Some(field);
13483        }
13484        ///Sets `protocol_version` with the provided value.
13485        pub fn with_protocol_version(mut self, field: u64) -> Self {
13486            self.set_protocol_version(field);
13487            self
13488        }
13489        ///Returns the value of `validators`, or the default value if `validators` is unset.
13490        pub fn validators(&self) -> &super::ValidatorSet {
13491            self.validators
13492                .as_ref()
13493                .map(|field| field as _)
13494                .unwrap_or_else(|| super::ValidatorSet::default_instance() as _)
13495        }
13496        ///If `validators` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13497        pub fn validators_opt_mut(&mut self) -> Option<&mut super::ValidatorSet> {
13498            self.validators.as_mut().map(|field| field as _)
13499        }
13500        ///Returns a mutable reference to `validators`.
13501        ///If the field is unset, it is first initialized with the default value.
13502        pub fn validators_mut(&mut self) -> &mut super::ValidatorSet {
13503            self.validators.get_or_insert_default()
13504        }
13505        ///If `validators` is set, returns [`Some`] with the value; otherwise returns [`None`].
13506        pub fn validators_opt(&self) -> Option<&super::ValidatorSet> {
13507            self.validators.as_ref().map(|field| field as _)
13508        }
13509        ///Sets `validators` with the provided value.
13510        pub fn set_validators<T: Into<super::ValidatorSet>>(&mut self, field: T) {
13511            self.validators = Some(field.into().into());
13512        }
13513        ///Sets `validators` with the provided value.
13514        pub fn with_validators<T: Into<super::ValidatorSet>>(
13515            mut self,
13516            field: T,
13517        ) -> Self {
13518            self.set_validators(field.into());
13519            self
13520        }
13521        ///Returns the value of `storage_fund`, or the default value if `storage_fund` is unset.
13522        pub fn storage_fund(&self) -> &super::StorageFund {
13523            self.storage_fund
13524                .as_ref()
13525                .map(|field| field as _)
13526                .unwrap_or_else(|| super::StorageFund::default_instance() as _)
13527        }
13528        ///If `storage_fund` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13529        pub fn storage_fund_opt_mut(&mut self) -> Option<&mut super::StorageFund> {
13530            self.storage_fund.as_mut().map(|field| field as _)
13531        }
13532        ///Returns a mutable reference to `storage_fund`.
13533        ///If the field is unset, it is first initialized with the default value.
13534        pub fn storage_fund_mut(&mut self) -> &mut super::StorageFund {
13535            self.storage_fund.get_or_insert_default()
13536        }
13537        ///If `storage_fund` is set, returns [`Some`] with the value; otherwise returns [`None`].
13538        pub fn storage_fund_opt(&self) -> Option<&super::StorageFund> {
13539            self.storage_fund.as_ref().map(|field| field as _)
13540        }
13541        ///Sets `storage_fund` with the provided value.
13542        pub fn set_storage_fund<T: Into<super::StorageFund>>(&mut self, field: T) {
13543            self.storage_fund = Some(field.into().into());
13544        }
13545        ///Sets `storage_fund` with the provided value.
13546        pub fn with_storage_fund<T: Into<super::StorageFund>>(
13547            mut self,
13548            field: T,
13549        ) -> Self {
13550            self.set_storage_fund(field.into());
13551            self
13552        }
13553        ///Returns the value of `parameters`, or the default value if `parameters` is unset.
13554        pub fn parameters(&self) -> &super::SystemParameters {
13555            self.parameters
13556                .as_ref()
13557                .map(|field| field as _)
13558                .unwrap_or_else(|| super::SystemParameters::default_instance() as _)
13559        }
13560        ///If `parameters` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13561        pub fn parameters_opt_mut(&mut self) -> Option<&mut super::SystemParameters> {
13562            self.parameters.as_mut().map(|field| field as _)
13563        }
13564        ///Returns a mutable reference to `parameters`.
13565        ///If the field is unset, it is first initialized with the default value.
13566        pub fn parameters_mut(&mut self) -> &mut super::SystemParameters {
13567            self.parameters.get_or_insert_default()
13568        }
13569        ///If `parameters` is set, returns [`Some`] with the value; otherwise returns [`None`].
13570        pub fn parameters_opt(&self) -> Option<&super::SystemParameters> {
13571            self.parameters.as_ref().map(|field| field as _)
13572        }
13573        ///Sets `parameters` with the provided value.
13574        pub fn set_parameters<T: Into<super::SystemParameters>>(&mut self, field: T) {
13575            self.parameters = Some(field.into().into());
13576        }
13577        ///Sets `parameters` with the provided value.
13578        pub fn with_parameters<T: Into<super::SystemParameters>>(
13579            mut self,
13580            field: T,
13581        ) -> Self {
13582            self.set_parameters(field.into());
13583            self
13584        }
13585        ///If `reference_gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13586        pub fn reference_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
13587            self.reference_gas_price.as_mut().map(|field| field as _)
13588        }
13589        ///Returns a mutable reference to `reference_gas_price`.
13590        ///If the field is unset, it is first initialized with the default value.
13591        pub fn reference_gas_price_mut(&mut self) -> &mut u64 {
13592            self.reference_gas_price.get_or_insert_default()
13593        }
13594        ///If `reference_gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
13595        pub fn reference_gas_price_opt(&self) -> Option<u64> {
13596            self.reference_gas_price.as_ref().map(|field| *field)
13597        }
13598        ///Sets `reference_gas_price` with the provided value.
13599        pub fn set_reference_gas_price(&mut self, field: u64) {
13600            self.reference_gas_price = Some(field);
13601        }
13602        ///Sets `reference_gas_price` with the provided value.
13603        pub fn with_reference_gas_price(mut self, field: u64) -> Self {
13604            self.set_reference_gas_price(field);
13605            self
13606        }
13607        ///Returns the value of `validator_report_records`, or the default value if `validator_report_records` is unset.
13608        pub fn validator_report_records(&self) -> &[super::ValidatorReportRecord] {
13609            &self.validator_report_records
13610        }
13611        ///Returns a mutable reference to `validator_report_records`.
13612        ///If the field is unset, it is first initialized with the default value.
13613        pub fn validator_report_records_mut(
13614            &mut self,
13615        ) -> &mut Vec<super::ValidatorReportRecord> {
13616            &mut self.validator_report_records
13617        }
13618        ///Sets `validator_report_records` with the provided value.
13619        pub fn set_validator_report_records(
13620            &mut self,
13621            field: Vec<super::ValidatorReportRecord>,
13622        ) {
13623            self.validator_report_records = field;
13624        }
13625        ///Sets `validator_report_records` with the provided value.
13626        pub fn with_validator_report_records(
13627            mut self,
13628            field: Vec<super::ValidatorReportRecord>,
13629        ) -> Self {
13630            self.set_validator_report_records(field);
13631            self
13632        }
13633        ///Returns the value of `stake_subsidy`, or the default value if `stake_subsidy` is unset.
13634        pub fn stake_subsidy(&self) -> &super::StakeSubsidy {
13635            self.stake_subsidy
13636                .as_ref()
13637                .map(|field| field as _)
13638                .unwrap_or_else(|| super::StakeSubsidy::default_instance() as _)
13639        }
13640        ///If `stake_subsidy` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13641        pub fn stake_subsidy_opt_mut(&mut self) -> Option<&mut super::StakeSubsidy> {
13642            self.stake_subsidy.as_mut().map(|field| field as _)
13643        }
13644        ///Returns a mutable reference to `stake_subsidy`.
13645        ///If the field is unset, it is first initialized with the default value.
13646        pub fn stake_subsidy_mut(&mut self) -> &mut super::StakeSubsidy {
13647            self.stake_subsidy.get_or_insert_default()
13648        }
13649        ///If `stake_subsidy` is set, returns [`Some`] with the value; otherwise returns [`None`].
13650        pub fn stake_subsidy_opt(&self) -> Option<&super::StakeSubsidy> {
13651            self.stake_subsidy.as_ref().map(|field| field as _)
13652        }
13653        ///Sets `stake_subsidy` with the provided value.
13654        pub fn set_stake_subsidy<T: Into<super::StakeSubsidy>>(&mut self, field: T) {
13655            self.stake_subsidy = Some(field.into().into());
13656        }
13657        ///Sets `stake_subsidy` with the provided value.
13658        pub fn with_stake_subsidy<T: Into<super::StakeSubsidy>>(
13659            mut self,
13660            field: T,
13661        ) -> Self {
13662            self.set_stake_subsidy(field.into());
13663            self
13664        }
13665        ///If `safe_mode` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13666        pub fn safe_mode_opt_mut(&mut self) -> Option<&mut bool> {
13667            self.safe_mode.as_mut().map(|field| field as _)
13668        }
13669        ///Returns a mutable reference to `safe_mode`.
13670        ///If the field is unset, it is first initialized with the default value.
13671        pub fn safe_mode_mut(&mut self) -> &mut bool {
13672            self.safe_mode.get_or_insert_default()
13673        }
13674        ///If `safe_mode` is set, returns [`Some`] with the value; otherwise returns [`None`].
13675        pub fn safe_mode_opt(&self) -> Option<bool> {
13676            self.safe_mode.as_ref().map(|field| *field)
13677        }
13678        ///Sets `safe_mode` with the provided value.
13679        pub fn set_safe_mode(&mut self, field: bool) {
13680            self.safe_mode = Some(field);
13681        }
13682        ///Sets `safe_mode` with the provided value.
13683        pub fn with_safe_mode(mut self, field: bool) -> Self {
13684            self.set_safe_mode(field);
13685            self
13686        }
13687        ///If `safe_mode_storage_rewards` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13688        pub fn safe_mode_storage_rewards_opt_mut(&mut self) -> Option<&mut u64> {
13689            self.safe_mode_storage_rewards.as_mut().map(|field| field as _)
13690        }
13691        ///Returns a mutable reference to `safe_mode_storage_rewards`.
13692        ///If the field is unset, it is first initialized with the default value.
13693        pub fn safe_mode_storage_rewards_mut(&mut self) -> &mut u64 {
13694            self.safe_mode_storage_rewards.get_or_insert_default()
13695        }
13696        ///If `safe_mode_storage_rewards` is set, returns [`Some`] with the value; otherwise returns [`None`].
13697        pub fn safe_mode_storage_rewards_opt(&self) -> Option<u64> {
13698            self.safe_mode_storage_rewards.as_ref().map(|field| *field)
13699        }
13700        ///Sets `safe_mode_storage_rewards` with the provided value.
13701        pub fn set_safe_mode_storage_rewards(&mut self, field: u64) {
13702            self.safe_mode_storage_rewards = Some(field);
13703        }
13704        ///Sets `safe_mode_storage_rewards` with the provided value.
13705        pub fn with_safe_mode_storage_rewards(mut self, field: u64) -> Self {
13706            self.set_safe_mode_storage_rewards(field);
13707            self
13708        }
13709        ///If `safe_mode_computation_rewards` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13710        pub fn safe_mode_computation_rewards_opt_mut(&mut self) -> Option<&mut u64> {
13711            self.safe_mode_computation_rewards.as_mut().map(|field| field as _)
13712        }
13713        ///Returns a mutable reference to `safe_mode_computation_rewards`.
13714        ///If the field is unset, it is first initialized with the default value.
13715        pub fn safe_mode_computation_rewards_mut(&mut self) -> &mut u64 {
13716            self.safe_mode_computation_rewards.get_or_insert_default()
13717        }
13718        ///If `safe_mode_computation_rewards` is set, returns [`Some`] with the value; otherwise returns [`None`].
13719        pub fn safe_mode_computation_rewards_opt(&self) -> Option<u64> {
13720            self.safe_mode_computation_rewards.as_ref().map(|field| *field)
13721        }
13722        ///Sets `safe_mode_computation_rewards` with the provided value.
13723        pub fn set_safe_mode_computation_rewards(&mut self, field: u64) {
13724            self.safe_mode_computation_rewards = Some(field);
13725        }
13726        ///Sets `safe_mode_computation_rewards` with the provided value.
13727        pub fn with_safe_mode_computation_rewards(mut self, field: u64) -> Self {
13728            self.set_safe_mode_computation_rewards(field);
13729            self
13730        }
13731        ///If `safe_mode_storage_rebates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13732        pub fn safe_mode_storage_rebates_opt_mut(&mut self) -> Option<&mut u64> {
13733            self.safe_mode_storage_rebates.as_mut().map(|field| field as _)
13734        }
13735        ///Returns a mutable reference to `safe_mode_storage_rebates`.
13736        ///If the field is unset, it is first initialized with the default value.
13737        pub fn safe_mode_storage_rebates_mut(&mut self) -> &mut u64 {
13738            self.safe_mode_storage_rebates.get_or_insert_default()
13739        }
13740        ///If `safe_mode_storage_rebates` is set, returns [`Some`] with the value; otherwise returns [`None`].
13741        pub fn safe_mode_storage_rebates_opt(&self) -> Option<u64> {
13742            self.safe_mode_storage_rebates.as_ref().map(|field| *field)
13743        }
13744        ///Sets `safe_mode_storage_rebates` with the provided value.
13745        pub fn set_safe_mode_storage_rebates(&mut self, field: u64) {
13746            self.safe_mode_storage_rebates = Some(field);
13747        }
13748        ///Sets `safe_mode_storage_rebates` with the provided value.
13749        pub fn with_safe_mode_storage_rebates(mut self, field: u64) -> Self {
13750            self.set_safe_mode_storage_rebates(field);
13751            self
13752        }
13753        ///If `safe_mode_non_refundable_storage_fee` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13754        pub fn safe_mode_non_refundable_storage_fee_opt_mut(
13755            &mut self,
13756        ) -> Option<&mut u64> {
13757            self.safe_mode_non_refundable_storage_fee.as_mut().map(|field| field as _)
13758        }
13759        ///Returns a mutable reference to `safe_mode_non_refundable_storage_fee`.
13760        ///If the field is unset, it is first initialized with the default value.
13761        pub fn safe_mode_non_refundable_storage_fee_mut(&mut self) -> &mut u64 {
13762            self.safe_mode_non_refundable_storage_fee.get_or_insert_default()
13763        }
13764        ///If `safe_mode_non_refundable_storage_fee` is set, returns [`Some`] with the value; otherwise returns [`None`].
13765        pub fn safe_mode_non_refundable_storage_fee_opt(&self) -> Option<u64> {
13766            self.safe_mode_non_refundable_storage_fee.as_ref().map(|field| *field)
13767        }
13768        ///Sets `safe_mode_non_refundable_storage_fee` with the provided value.
13769        pub fn set_safe_mode_non_refundable_storage_fee(&mut self, field: u64) {
13770            self.safe_mode_non_refundable_storage_fee = Some(field);
13771        }
13772        ///Sets `safe_mode_non_refundable_storage_fee` with the provided value.
13773        pub fn with_safe_mode_non_refundable_storage_fee(mut self, field: u64) -> Self {
13774            self.set_safe_mode_non_refundable_storage_fee(field);
13775            self
13776        }
13777        ///If `epoch_start_timestamp_ms` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13778        pub fn epoch_start_timestamp_ms_opt_mut(&mut self) -> Option<&mut u64> {
13779            self.epoch_start_timestamp_ms.as_mut().map(|field| field as _)
13780        }
13781        ///Returns a mutable reference to `epoch_start_timestamp_ms`.
13782        ///If the field is unset, it is first initialized with the default value.
13783        pub fn epoch_start_timestamp_ms_mut(&mut self) -> &mut u64 {
13784            self.epoch_start_timestamp_ms.get_or_insert_default()
13785        }
13786        ///If `epoch_start_timestamp_ms` is set, returns [`Some`] with the value; otherwise returns [`None`].
13787        pub fn epoch_start_timestamp_ms_opt(&self) -> Option<u64> {
13788            self.epoch_start_timestamp_ms.as_ref().map(|field| *field)
13789        }
13790        ///Sets `epoch_start_timestamp_ms` with the provided value.
13791        pub fn set_epoch_start_timestamp_ms(&mut self, field: u64) {
13792            self.epoch_start_timestamp_ms = Some(field);
13793        }
13794        ///Sets `epoch_start_timestamp_ms` with the provided value.
13795        pub fn with_epoch_start_timestamp_ms(mut self, field: u64) -> Self {
13796            self.set_epoch_start_timestamp_ms(field);
13797            self
13798        }
13799        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
13800        pub fn extra_fields(&self) -> &super::MoveTable {
13801            self.extra_fields
13802                .as_ref()
13803                .map(|field| field as _)
13804                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
13805        }
13806        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13807        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
13808            self.extra_fields.as_mut().map(|field| field as _)
13809        }
13810        ///Returns a mutable reference to `extra_fields`.
13811        ///If the field is unset, it is first initialized with the default value.
13812        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
13813            self.extra_fields.get_or_insert_default()
13814        }
13815        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
13816        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
13817            self.extra_fields.as_ref().map(|field| field as _)
13818        }
13819        ///Sets `extra_fields` with the provided value.
13820        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
13821            self.extra_fields = Some(field.into().into());
13822        }
13823        ///Sets `extra_fields` with the provided value.
13824        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
13825            self.set_extra_fields(field.into());
13826            self
13827        }
13828    }
13829    impl super::Transaction {
13830        pub const fn const_default() -> Self {
13831            Self {
13832                bcs: None,
13833                digest: None,
13834                version: None,
13835                kind: None,
13836                sender: None,
13837                gas_payment: None,
13838                expiration: None,
13839            }
13840        }
13841        #[doc(hidden)]
13842        pub fn default_instance() -> &'static Self {
13843            static DEFAULT: super::Transaction = super::Transaction::const_default();
13844            &DEFAULT
13845        }
13846        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
13847        pub fn bcs(&self) -> &super::Bcs {
13848            self.bcs
13849                .as_ref()
13850                .map(|field| field as _)
13851                .unwrap_or_else(|| super::Bcs::default_instance() as _)
13852        }
13853        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13854        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
13855            self.bcs.as_mut().map(|field| field as _)
13856        }
13857        ///Returns a mutable reference to `bcs`.
13858        ///If the field is unset, it is first initialized with the default value.
13859        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
13860            self.bcs.get_or_insert_default()
13861        }
13862        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
13863        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
13864            self.bcs.as_ref().map(|field| field as _)
13865        }
13866        ///Sets `bcs` with the provided value.
13867        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
13868            self.bcs = Some(field.into().into());
13869        }
13870        ///Sets `bcs` with the provided value.
13871        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
13872            self.set_bcs(field.into());
13873            self
13874        }
13875        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13876        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
13877            self.digest.as_mut().map(|field| field as _)
13878        }
13879        ///Returns a mutable reference to `digest`.
13880        ///If the field is unset, it is first initialized with the default value.
13881        pub fn digest_mut(&mut self) -> &mut String {
13882            self.digest.get_or_insert_default()
13883        }
13884        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
13885        pub fn digest_opt(&self) -> Option<&str> {
13886            self.digest.as_ref().map(|field| field as _)
13887        }
13888        ///Sets `digest` with the provided value.
13889        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
13890            self.digest = Some(field.into().into());
13891        }
13892        ///Sets `digest` with the provided value.
13893        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
13894            self.set_digest(field.into());
13895            self
13896        }
13897        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13898        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
13899            self.version.as_mut().map(|field| field as _)
13900        }
13901        ///Returns a mutable reference to `version`.
13902        ///If the field is unset, it is first initialized with the default value.
13903        pub fn version_mut(&mut self) -> &mut i32 {
13904            self.version.get_or_insert_default()
13905        }
13906        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
13907        pub fn version_opt(&self) -> Option<i32> {
13908            self.version.as_ref().map(|field| *field)
13909        }
13910        ///Sets `version` with the provided value.
13911        pub fn set_version(&mut self, field: i32) {
13912            self.version = Some(field);
13913        }
13914        ///Sets `version` with the provided value.
13915        pub fn with_version(mut self, field: i32) -> Self {
13916            self.set_version(field);
13917            self
13918        }
13919        ///Returns the value of `kind`, or the default value if `kind` is unset.
13920        pub fn kind(&self) -> &super::TransactionKind {
13921            self.kind
13922                .as_ref()
13923                .map(|field| field as _)
13924                .unwrap_or_else(|| super::TransactionKind::default_instance() as _)
13925        }
13926        ///If `kind` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13927        pub fn kind_opt_mut(&mut self) -> Option<&mut super::TransactionKind> {
13928            self.kind.as_mut().map(|field| field as _)
13929        }
13930        ///Returns a mutable reference to `kind`.
13931        ///If the field is unset, it is first initialized with the default value.
13932        pub fn kind_mut(&mut self) -> &mut super::TransactionKind {
13933            self.kind.get_or_insert_default()
13934        }
13935        ///If `kind` is set, returns [`Some`] with the value; otherwise returns [`None`].
13936        pub fn kind_opt(&self) -> Option<&super::TransactionKind> {
13937            self.kind.as_ref().map(|field| field as _)
13938        }
13939        ///Sets `kind` with the provided value.
13940        pub fn set_kind<T: Into<super::TransactionKind>>(&mut self, field: T) {
13941            self.kind = Some(field.into().into());
13942        }
13943        ///Sets `kind` with the provided value.
13944        pub fn with_kind<T: Into<super::TransactionKind>>(mut self, field: T) -> Self {
13945            self.set_kind(field.into());
13946            self
13947        }
13948        ///If `sender` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13949        pub fn sender_opt_mut(&mut self) -> Option<&mut String> {
13950            self.sender.as_mut().map(|field| field as _)
13951        }
13952        ///Returns a mutable reference to `sender`.
13953        ///If the field is unset, it is first initialized with the default value.
13954        pub fn sender_mut(&mut self) -> &mut String {
13955            self.sender.get_or_insert_default()
13956        }
13957        ///If `sender` is set, returns [`Some`] with the value; otherwise returns [`None`].
13958        pub fn sender_opt(&self) -> Option<&str> {
13959            self.sender.as_ref().map(|field| field as _)
13960        }
13961        ///Sets `sender` with the provided value.
13962        pub fn set_sender<T: Into<String>>(&mut self, field: T) {
13963            self.sender = Some(field.into().into());
13964        }
13965        ///Sets `sender` with the provided value.
13966        pub fn with_sender<T: Into<String>>(mut self, field: T) -> Self {
13967            self.set_sender(field.into());
13968            self
13969        }
13970        ///Returns the value of `gas_payment`, or the default value if `gas_payment` is unset.
13971        pub fn gas_payment(&self) -> &super::GasPayment {
13972            self.gas_payment
13973                .as_ref()
13974                .map(|field| field as _)
13975                .unwrap_or_else(|| super::GasPayment::default_instance() as _)
13976        }
13977        ///If `gas_payment` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
13978        pub fn gas_payment_opt_mut(&mut self) -> Option<&mut super::GasPayment> {
13979            self.gas_payment.as_mut().map(|field| field as _)
13980        }
13981        ///Returns a mutable reference to `gas_payment`.
13982        ///If the field is unset, it is first initialized with the default value.
13983        pub fn gas_payment_mut(&mut self) -> &mut super::GasPayment {
13984            self.gas_payment.get_or_insert_default()
13985        }
13986        ///If `gas_payment` is set, returns [`Some`] with the value; otherwise returns [`None`].
13987        pub fn gas_payment_opt(&self) -> Option<&super::GasPayment> {
13988            self.gas_payment.as_ref().map(|field| field as _)
13989        }
13990        ///Sets `gas_payment` with the provided value.
13991        pub fn set_gas_payment<T: Into<super::GasPayment>>(&mut self, field: T) {
13992            self.gas_payment = Some(field.into().into());
13993        }
13994        ///Sets `gas_payment` with the provided value.
13995        pub fn with_gas_payment<T: Into<super::GasPayment>>(mut self, field: T) -> Self {
13996            self.set_gas_payment(field.into());
13997            self
13998        }
13999        ///Returns the value of `expiration`, or the default value if `expiration` is unset.
14000        pub fn expiration(&self) -> &super::TransactionExpiration {
14001            self.expiration
14002                .as_ref()
14003                .map(|field| field as _)
14004                .unwrap_or_else(|| super::TransactionExpiration::default_instance() as _)
14005        }
14006        ///If `expiration` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14007        pub fn expiration_opt_mut(
14008            &mut self,
14009        ) -> Option<&mut super::TransactionExpiration> {
14010            self.expiration.as_mut().map(|field| field as _)
14011        }
14012        ///Returns a mutable reference to `expiration`.
14013        ///If the field is unset, it is first initialized with the default value.
14014        pub fn expiration_mut(&mut self) -> &mut super::TransactionExpiration {
14015            self.expiration.get_or_insert_default()
14016        }
14017        ///If `expiration` is set, returns [`Some`] with the value; otherwise returns [`None`].
14018        pub fn expiration_opt(&self) -> Option<&super::TransactionExpiration> {
14019            self.expiration.as_ref().map(|field| field as _)
14020        }
14021        ///Sets `expiration` with the provided value.
14022        pub fn set_expiration<T: Into<super::TransactionExpiration>>(
14023            &mut self,
14024            field: T,
14025        ) {
14026            self.expiration = Some(field.into().into());
14027        }
14028        ///Sets `expiration` with the provided value.
14029        pub fn with_expiration<T: Into<super::TransactionExpiration>>(
14030            mut self,
14031            field: T,
14032        ) -> Self {
14033            self.set_expiration(field.into());
14034            self
14035        }
14036    }
14037    impl super::TransactionEffects {
14038        pub const fn const_default() -> Self {
14039            Self {
14040                bcs: None,
14041                digest: None,
14042                version: None,
14043                status: None,
14044                epoch: None,
14045                gas_used: None,
14046                transaction_digest: None,
14047                gas_object: None,
14048                events_digest: None,
14049                dependencies: Vec::new(),
14050                lamport_version: None,
14051                changed_objects: Vec::new(),
14052                unchanged_consensus_objects: Vec::new(),
14053                auxiliary_data_digest: None,
14054                unchanged_loaded_runtime_objects: Vec::new(),
14055            }
14056        }
14057        #[doc(hidden)]
14058        pub fn default_instance() -> &'static Self {
14059            static DEFAULT: super::TransactionEffects = super::TransactionEffects::const_default();
14060            &DEFAULT
14061        }
14062        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
14063        pub fn bcs(&self) -> &super::Bcs {
14064            self.bcs
14065                .as_ref()
14066                .map(|field| field as _)
14067                .unwrap_or_else(|| super::Bcs::default_instance() as _)
14068        }
14069        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14070        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
14071            self.bcs.as_mut().map(|field| field as _)
14072        }
14073        ///Returns a mutable reference to `bcs`.
14074        ///If the field is unset, it is first initialized with the default value.
14075        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
14076            self.bcs.get_or_insert_default()
14077        }
14078        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
14079        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
14080            self.bcs.as_ref().map(|field| field as _)
14081        }
14082        ///Sets `bcs` with the provided value.
14083        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
14084            self.bcs = Some(field.into().into());
14085        }
14086        ///Sets `bcs` with the provided value.
14087        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
14088            self.set_bcs(field.into());
14089            self
14090        }
14091        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14092        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
14093            self.digest.as_mut().map(|field| field as _)
14094        }
14095        ///Returns a mutable reference to `digest`.
14096        ///If the field is unset, it is first initialized with the default value.
14097        pub fn digest_mut(&mut self) -> &mut String {
14098            self.digest.get_or_insert_default()
14099        }
14100        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
14101        pub fn digest_opt(&self) -> Option<&str> {
14102            self.digest.as_ref().map(|field| field as _)
14103        }
14104        ///Sets `digest` with the provided value.
14105        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
14106            self.digest = Some(field.into().into());
14107        }
14108        ///Sets `digest` with the provided value.
14109        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
14110            self.set_digest(field.into());
14111            self
14112        }
14113        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14114        pub fn version_opt_mut(&mut self) -> Option<&mut i32> {
14115            self.version.as_mut().map(|field| field as _)
14116        }
14117        ///Returns a mutable reference to `version`.
14118        ///If the field is unset, it is first initialized with the default value.
14119        pub fn version_mut(&mut self) -> &mut i32 {
14120            self.version.get_or_insert_default()
14121        }
14122        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
14123        pub fn version_opt(&self) -> Option<i32> {
14124            self.version.as_ref().map(|field| *field)
14125        }
14126        ///Sets `version` with the provided value.
14127        pub fn set_version(&mut self, field: i32) {
14128            self.version = Some(field);
14129        }
14130        ///Sets `version` with the provided value.
14131        pub fn with_version(mut self, field: i32) -> Self {
14132            self.set_version(field);
14133            self
14134        }
14135        ///Returns the value of `status`, or the default value if `status` is unset.
14136        pub fn status(&self) -> &super::ExecutionStatus {
14137            self.status
14138                .as_ref()
14139                .map(|field| field as _)
14140                .unwrap_or_else(|| super::ExecutionStatus::default_instance() as _)
14141        }
14142        ///If `status` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14143        pub fn status_opt_mut(&mut self) -> Option<&mut super::ExecutionStatus> {
14144            self.status.as_mut().map(|field| field as _)
14145        }
14146        ///Returns a mutable reference to `status`.
14147        ///If the field is unset, it is first initialized with the default value.
14148        pub fn status_mut(&mut self) -> &mut super::ExecutionStatus {
14149            self.status.get_or_insert_default()
14150        }
14151        ///If `status` is set, returns [`Some`] with the value; otherwise returns [`None`].
14152        pub fn status_opt(&self) -> Option<&super::ExecutionStatus> {
14153            self.status.as_ref().map(|field| field as _)
14154        }
14155        ///Sets `status` with the provided value.
14156        pub fn set_status<T: Into<super::ExecutionStatus>>(&mut self, field: T) {
14157            self.status = Some(field.into().into());
14158        }
14159        ///Sets `status` with the provided value.
14160        pub fn with_status<T: Into<super::ExecutionStatus>>(mut self, field: T) -> Self {
14161            self.set_status(field.into());
14162            self
14163        }
14164        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14165        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
14166            self.epoch.as_mut().map(|field| field as _)
14167        }
14168        ///Returns a mutable reference to `epoch`.
14169        ///If the field is unset, it is first initialized with the default value.
14170        pub fn epoch_mut(&mut self) -> &mut u64 {
14171            self.epoch.get_or_insert_default()
14172        }
14173        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
14174        pub fn epoch_opt(&self) -> Option<u64> {
14175            self.epoch.as_ref().map(|field| *field)
14176        }
14177        ///Sets `epoch` with the provided value.
14178        pub fn set_epoch(&mut self, field: u64) {
14179            self.epoch = Some(field);
14180        }
14181        ///Sets `epoch` with the provided value.
14182        pub fn with_epoch(mut self, field: u64) -> Self {
14183            self.set_epoch(field);
14184            self
14185        }
14186        ///Returns the value of `gas_used`, or the default value if `gas_used` is unset.
14187        pub fn gas_used(&self) -> &super::GasCostSummary {
14188            self.gas_used
14189                .as_ref()
14190                .map(|field| field as _)
14191                .unwrap_or_else(|| super::GasCostSummary::default_instance() as _)
14192        }
14193        ///If `gas_used` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14194        pub fn gas_used_opt_mut(&mut self) -> Option<&mut super::GasCostSummary> {
14195            self.gas_used.as_mut().map(|field| field as _)
14196        }
14197        ///Returns a mutable reference to `gas_used`.
14198        ///If the field is unset, it is first initialized with the default value.
14199        pub fn gas_used_mut(&mut self) -> &mut super::GasCostSummary {
14200            self.gas_used.get_or_insert_default()
14201        }
14202        ///If `gas_used` is set, returns [`Some`] with the value; otherwise returns [`None`].
14203        pub fn gas_used_opt(&self) -> Option<&super::GasCostSummary> {
14204            self.gas_used.as_ref().map(|field| field as _)
14205        }
14206        ///Sets `gas_used` with the provided value.
14207        pub fn set_gas_used<T: Into<super::GasCostSummary>>(&mut self, field: T) {
14208            self.gas_used = Some(field.into().into());
14209        }
14210        ///Sets `gas_used` with the provided value.
14211        pub fn with_gas_used<T: Into<super::GasCostSummary>>(
14212            mut self,
14213            field: T,
14214        ) -> Self {
14215            self.set_gas_used(field.into());
14216            self
14217        }
14218        ///If `transaction_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14219        pub fn transaction_digest_opt_mut(&mut self) -> Option<&mut String> {
14220            self.transaction_digest.as_mut().map(|field| field as _)
14221        }
14222        ///Returns a mutable reference to `transaction_digest`.
14223        ///If the field is unset, it is first initialized with the default value.
14224        pub fn transaction_digest_mut(&mut self) -> &mut String {
14225            self.transaction_digest.get_or_insert_default()
14226        }
14227        ///If `transaction_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
14228        pub fn transaction_digest_opt(&self) -> Option<&str> {
14229            self.transaction_digest.as_ref().map(|field| field as _)
14230        }
14231        ///Sets `transaction_digest` with the provided value.
14232        pub fn set_transaction_digest<T: Into<String>>(&mut self, field: T) {
14233            self.transaction_digest = Some(field.into().into());
14234        }
14235        ///Sets `transaction_digest` with the provided value.
14236        pub fn with_transaction_digest<T: Into<String>>(mut self, field: T) -> Self {
14237            self.set_transaction_digest(field.into());
14238            self
14239        }
14240        ///Returns the value of `gas_object`, or the default value if `gas_object` is unset.
14241        pub fn gas_object(&self) -> &super::ChangedObject {
14242            self.gas_object
14243                .as_ref()
14244                .map(|field| field as _)
14245                .unwrap_or_else(|| super::ChangedObject::default_instance() as _)
14246        }
14247        ///If `gas_object` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14248        pub fn gas_object_opt_mut(&mut self) -> Option<&mut super::ChangedObject> {
14249            self.gas_object.as_mut().map(|field| field as _)
14250        }
14251        ///Returns a mutable reference to `gas_object`.
14252        ///If the field is unset, it is first initialized with the default value.
14253        pub fn gas_object_mut(&mut self) -> &mut super::ChangedObject {
14254            self.gas_object.get_or_insert_default()
14255        }
14256        ///If `gas_object` is set, returns [`Some`] with the value; otherwise returns [`None`].
14257        pub fn gas_object_opt(&self) -> Option<&super::ChangedObject> {
14258            self.gas_object.as_ref().map(|field| field as _)
14259        }
14260        ///Sets `gas_object` with the provided value.
14261        pub fn set_gas_object<T: Into<super::ChangedObject>>(&mut self, field: T) {
14262            self.gas_object = Some(field.into().into());
14263        }
14264        ///Sets `gas_object` with the provided value.
14265        pub fn with_gas_object<T: Into<super::ChangedObject>>(
14266            mut self,
14267            field: T,
14268        ) -> Self {
14269            self.set_gas_object(field.into());
14270            self
14271        }
14272        ///If `events_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14273        pub fn events_digest_opt_mut(&mut self) -> Option<&mut String> {
14274            self.events_digest.as_mut().map(|field| field as _)
14275        }
14276        ///Returns a mutable reference to `events_digest`.
14277        ///If the field is unset, it is first initialized with the default value.
14278        pub fn events_digest_mut(&mut self) -> &mut String {
14279            self.events_digest.get_or_insert_default()
14280        }
14281        ///If `events_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
14282        pub fn events_digest_opt(&self) -> Option<&str> {
14283            self.events_digest.as_ref().map(|field| field as _)
14284        }
14285        ///Sets `events_digest` with the provided value.
14286        pub fn set_events_digest<T: Into<String>>(&mut self, field: T) {
14287            self.events_digest = Some(field.into().into());
14288        }
14289        ///Sets `events_digest` with the provided value.
14290        pub fn with_events_digest<T: Into<String>>(mut self, field: T) -> Self {
14291            self.set_events_digest(field.into());
14292            self
14293        }
14294        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
14295        pub fn dependencies(&self) -> &[String] {
14296            &self.dependencies
14297        }
14298        ///Returns a mutable reference to `dependencies`.
14299        ///If the field is unset, it is first initialized with the default value.
14300        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
14301            &mut self.dependencies
14302        }
14303        ///Sets `dependencies` with the provided value.
14304        pub fn set_dependencies(&mut self, field: Vec<String>) {
14305            self.dependencies = field;
14306        }
14307        ///Sets `dependencies` with the provided value.
14308        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
14309            self.set_dependencies(field);
14310            self
14311        }
14312        ///If `lamport_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14313        pub fn lamport_version_opt_mut(&mut self) -> Option<&mut u64> {
14314            self.lamport_version.as_mut().map(|field| field as _)
14315        }
14316        ///Returns a mutable reference to `lamport_version`.
14317        ///If the field is unset, it is first initialized with the default value.
14318        pub fn lamport_version_mut(&mut self) -> &mut u64 {
14319            self.lamport_version.get_or_insert_default()
14320        }
14321        ///If `lamport_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
14322        pub fn lamport_version_opt(&self) -> Option<u64> {
14323            self.lamport_version.as_ref().map(|field| *field)
14324        }
14325        ///Sets `lamport_version` with the provided value.
14326        pub fn set_lamport_version(&mut self, field: u64) {
14327            self.lamport_version = Some(field);
14328        }
14329        ///Sets `lamport_version` with the provided value.
14330        pub fn with_lamport_version(mut self, field: u64) -> Self {
14331            self.set_lamport_version(field);
14332            self
14333        }
14334        ///Returns the value of `changed_objects`, or the default value if `changed_objects` is unset.
14335        pub fn changed_objects(&self) -> &[super::ChangedObject] {
14336            &self.changed_objects
14337        }
14338        ///Returns a mutable reference to `changed_objects`.
14339        ///If the field is unset, it is first initialized with the default value.
14340        pub fn changed_objects_mut(&mut self) -> &mut Vec<super::ChangedObject> {
14341            &mut self.changed_objects
14342        }
14343        ///Sets `changed_objects` with the provided value.
14344        pub fn set_changed_objects(&mut self, field: Vec<super::ChangedObject>) {
14345            self.changed_objects = field;
14346        }
14347        ///Sets `changed_objects` with the provided value.
14348        pub fn with_changed_objects(mut self, field: Vec<super::ChangedObject>) -> Self {
14349            self.set_changed_objects(field);
14350            self
14351        }
14352        ///Returns the value of `unchanged_consensus_objects`, or the default value if `unchanged_consensus_objects` is unset.
14353        pub fn unchanged_consensus_objects(&self) -> &[super::UnchangedConsensusObject] {
14354            &self.unchanged_consensus_objects
14355        }
14356        ///Returns a mutable reference to `unchanged_consensus_objects`.
14357        ///If the field is unset, it is first initialized with the default value.
14358        pub fn unchanged_consensus_objects_mut(
14359            &mut self,
14360        ) -> &mut Vec<super::UnchangedConsensusObject> {
14361            &mut self.unchanged_consensus_objects
14362        }
14363        ///Sets `unchanged_consensus_objects` with the provided value.
14364        pub fn set_unchanged_consensus_objects(
14365            &mut self,
14366            field: Vec<super::UnchangedConsensusObject>,
14367        ) {
14368            self.unchanged_consensus_objects = field;
14369        }
14370        ///Sets `unchanged_consensus_objects` with the provided value.
14371        pub fn with_unchanged_consensus_objects(
14372            mut self,
14373            field: Vec<super::UnchangedConsensusObject>,
14374        ) -> Self {
14375            self.set_unchanged_consensus_objects(field);
14376            self
14377        }
14378        ///If `auxiliary_data_digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14379        pub fn auxiliary_data_digest_opt_mut(&mut self) -> Option<&mut String> {
14380            self.auxiliary_data_digest.as_mut().map(|field| field as _)
14381        }
14382        ///Returns a mutable reference to `auxiliary_data_digest`.
14383        ///If the field is unset, it is first initialized with the default value.
14384        pub fn auxiliary_data_digest_mut(&mut self) -> &mut String {
14385            self.auxiliary_data_digest.get_or_insert_default()
14386        }
14387        ///If `auxiliary_data_digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
14388        pub fn auxiliary_data_digest_opt(&self) -> Option<&str> {
14389            self.auxiliary_data_digest.as_ref().map(|field| field as _)
14390        }
14391        ///Sets `auxiliary_data_digest` with the provided value.
14392        pub fn set_auxiliary_data_digest<T: Into<String>>(&mut self, field: T) {
14393            self.auxiliary_data_digest = Some(field.into().into());
14394        }
14395        ///Sets `auxiliary_data_digest` with the provided value.
14396        pub fn with_auxiliary_data_digest<T: Into<String>>(mut self, field: T) -> Self {
14397            self.set_auxiliary_data_digest(field.into());
14398            self
14399        }
14400        ///Returns the value of `unchanged_loaded_runtime_objects`, or the default value if `unchanged_loaded_runtime_objects` is unset.
14401        pub fn unchanged_loaded_runtime_objects(&self) -> &[super::ObjectReference] {
14402            &self.unchanged_loaded_runtime_objects
14403        }
14404        ///Returns a mutable reference to `unchanged_loaded_runtime_objects`.
14405        ///If the field is unset, it is first initialized with the default value.
14406        pub fn unchanged_loaded_runtime_objects_mut(
14407            &mut self,
14408        ) -> &mut Vec<super::ObjectReference> {
14409            &mut self.unchanged_loaded_runtime_objects
14410        }
14411        ///Sets `unchanged_loaded_runtime_objects` with the provided value.
14412        pub fn set_unchanged_loaded_runtime_objects(
14413            &mut self,
14414            field: Vec<super::ObjectReference>,
14415        ) {
14416            self.unchanged_loaded_runtime_objects = field;
14417        }
14418        ///Sets `unchanged_loaded_runtime_objects` with the provided value.
14419        pub fn with_unchanged_loaded_runtime_objects(
14420            mut self,
14421            field: Vec<super::ObjectReference>,
14422        ) -> Self {
14423            self.set_unchanged_loaded_runtime_objects(field);
14424            self
14425        }
14426    }
14427    impl super::TransactionEvents {
14428        pub const fn const_default() -> Self {
14429            Self {
14430                bcs: None,
14431                digest: None,
14432                events: Vec::new(),
14433            }
14434        }
14435        #[doc(hidden)]
14436        pub fn default_instance() -> &'static Self {
14437            static DEFAULT: super::TransactionEvents = super::TransactionEvents::const_default();
14438            &DEFAULT
14439        }
14440        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
14441        pub fn bcs(&self) -> &super::Bcs {
14442            self.bcs
14443                .as_ref()
14444                .map(|field| field as _)
14445                .unwrap_or_else(|| super::Bcs::default_instance() as _)
14446        }
14447        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14448        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
14449            self.bcs.as_mut().map(|field| field as _)
14450        }
14451        ///Returns a mutable reference to `bcs`.
14452        ///If the field is unset, it is first initialized with the default value.
14453        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
14454            self.bcs.get_or_insert_default()
14455        }
14456        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
14457        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
14458            self.bcs.as_ref().map(|field| field as _)
14459        }
14460        ///Sets `bcs` with the provided value.
14461        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
14462            self.bcs = Some(field.into().into());
14463        }
14464        ///Sets `bcs` with the provided value.
14465        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
14466            self.set_bcs(field.into());
14467            self
14468        }
14469        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14470        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
14471            self.digest.as_mut().map(|field| field as _)
14472        }
14473        ///Returns a mutable reference to `digest`.
14474        ///If the field is unset, it is first initialized with the default value.
14475        pub fn digest_mut(&mut self) -> &mut String {
14476            self.digest.get_or_insert_default()
14477        }
14478        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
14479        pub fn digest_opt(&self) -> Option<&str> {
14480            self.digest.as_ref().map(|field| field as _)
14481        }
14482        ///Sets `digest` with the provided value.
14483        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
14484            self.digest = Some(field.into().into());
14485        }
14486        ///Sets `digest` with the provided value.
14487        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
14488            self.set_digest(field.into());
14489            self
14490        }
14491        ///Returns the value of `events`, or the default value if `events` is unset.
14492        pub fn events(&self) -> &[super::Event] {
14493            &self.events
14494        }
14495        ///Returns a mutable reference to `events`.
14496        ///If the field is unset, it is first initialized with the default value.
14497        pub fn events_mut(&mut self) -> &mut Vec<super::Event> {
14498            &mut self.events
14499        }
14500        ///Sets `events` with the provided value.
14501        pub fn set_events(&mut self, field: Vec<super::Event>) {
14502            self.events = field;
14503        }
14504        ///Sets `events` with the provided value.
14505        pub fn with_events(mut self, field: Vec<super::Event>) -> Self {
14506            self.set_events(field);
14507            self
14508        }
14509    }
14510    impl super::TransactionExpiration {
14511        pub const fn const_default() -> Self {
14512            Self {
14513                kind: None,
14514                epoch: None,
14515                min_epoch: None,
14516                min_timestamp: None,
14517                max_timestamp: None,
14518                chain: None,
14519                nonce: None,
14520            }
14521        }
14522        #[doc(hidden)]
14523        pub fn default_instance() -> &'static Self {
14524            static DEFAULT: super::TransactionExpiration = super::TransactionExpiration::const_default();
14525            &DEFAULT
14526        }
14527        ///Sets `kind` with the provided value.
14528        pub fn with_kind<
14529            T: Into<super::transaction_expiration::TransactionExpirationKind>,
14530        >(mut self, field: T) -> Self {
14531            self.set_kind(field.into());
14532            self
14533        }
14534        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14535        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
14536            self.epoch.as_mut().map(|field| field as _)
14537        }
14538        ///Returns a mutable reference to `epoch`.
14539        ///If the field is unset, it is first initialized with the default value.
14540        pub fn epoch_mut(&mut self) -> &mut u64 {
14541            self.epoch.get_or_insert_default()
14542        }
14543        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
14544        pub fn epoch_opt(&self) -> Option<u64> {
14545            self.epoch.as_ref().map(|field| *field)
14546        }
14547        ///Sets `epoch` with the provided value.
14548        pub fn set_epoch(&mut self, field: u64) {
14549            self.epoch = Some(field);
14550        }
14551        ///Sets `epoch` with the provided value.
14552        pub fn with_epoch(mut self, field: u64) -> Self {
14553            self.set_epoch(field);
14554            self
14555        }
14556        ///If `min_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14557        pub fn min_epoch_opt_mut(&mut self) -> Option<&mut u64> {
14558            self.min_epoch.as_mut().map(|field| field as _)
14559        }
14560        ///Returns a mutable reference to `min_epoch`.
14561        ///If the field is unset, it is first initialized with the default value.
14562        pub fn min_epoch_mut(&mut self) -> &mut u64 {
14563            self.min_epoch.get_or_insert_default()
14564        }
14565        ///If `min_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
14566        pub fn min_epoch_opt(&self) -> Option<u64> {
14567            self.min_epoch.as_ref().map(|field| *field)
14568        }
14569        ///Sets `min_epoch` with the provided value.
14570        pub fn set_min_epoch(&mut self, field: u64) {
14571            self.min_epoch = Some(field);
14572        }
14573        ///Sets `min_epoch` with the provided value.
14574        pub fn with_min_epoch(mut self, field: u64) -> Self {
14575            self.set_min_epoch(field);
14576            self
14577        }
14578        ///If `min_timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14579        pub fn min_timestamp_opt_mut(
14580            &mut self,
14581        ) -> Option<&mut ::prost_types::Timestamp> {
14582            self.min_timestamp.as_mut().map(|field| field as _)
14583        }
14584        ///Returns a mutable reference to `min_timestamp`.
14585        ///If the field is unset, it is first initialized with the default value.
14586        pub fn min_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
14587            self.min_timestamp.get_or_insert_default()
14588        }
14589        ///If `min_timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
14590        pub fn min_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
14591            self.min_timestamp.as_ref().map(|field| field as _)
14592        }
14593        ///Sets `min_timestamp` with the provided value.
14594        pub fn set_min_timestamp<T: Into<::prost_types::Timestamp>>(
14595            &mut self,
14596            field: T,
14597        ) {
14598            self.min_timestamp = Some(field.into().into());
14599        }
14600        ///Sets `min_timestamp` with the provided value.
14601        pub fn with_min_timestamp<T: Into<::prost_types::Timestamp>>(
14602            mut self,
14603            field: T,
14604        ) -> Self {
14605            self.set_min_timestamp(field.into());
14606            self
14607        }
14608        ///If `max_timestamp` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14609        pub fn max_timestamp_opt_mut(
14610            &mut self,
14611        ) -> Option<&mut ::prost_types::Timestamp> {
14612            self.max_timestamp.as_mut().map(|field| field as _)
14613        }
14614        ///Returns a mutable reference to `max_timestamp`.
14615        ///If the field is unset, it is first initialized with the default value.
14616        pub fn max_timestamp_mut(&mut self) -> &mut ::prost_types::Timestamp {
14617            self.max_timestamp.get_or_insert_default()
14618        }
14619        ///If `max_timestamp` is set, returns [`Some`] with the value; otherwise returns [`None`].
14620        pub fn max_timestamp_opt(&self) -> Option<&::prost_types::Timestamp> {
14621            self.max_timestamp.as_ref().map(|field| field as _)
14622        }
14623        ///Sets `max_timestamp` with the provided value.
14624        pub fn set_max_timestamp<T: Into<::prost_types::Timestamp>>(
14625            &mut self,
14626            field: T,
14627        ) {
14628            self.max_timestamp = Some(field.into().into());
14629        }
14630        ///Sets `max_timestamp` with the provided value.
14631        pub fn with_max_timestamp<T: Into<::prost_types::Timestamp>>(
14632            mut self,
14633            field: T,
14634        ) -> Self {
14635            self.set_max_timestamp(field.into());
14636            self
14637        }
14638        ///If `chain` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14639        pub fn chain_opt_mut(&mut self) -> Option<&mut String> {
14640            self.chain.as_mut().map(|field| field as _)
14641        }
14642        ///Returns a mutable reference to `chain`.
14643        ///If the field is unset, it is first initialized with the default value.
14644        pub fn chain_mut(&mut self) -> &mut String {
14645            self.chain.get_or_insert_default()
14646        }
14647        ///If `chain` is set, returns [`Some`] with the value; otherwise returns [`None`].
14648        pub fn chain_opt(&self) -> Option<&str> {
14649            self.chain.as_ref().map(|field| field as _)
14650        }
14651        ///Sets `chain` with the provided value.
14652        pub fn set_chain<T: Into<String>>(&mut self, field: T) {
14653            self.chain = Some(field.into().into());
14654        }
14655        ///Sets `chain` with the provided value.
14656        pub fn with_chain<T: Into<String>>(mut self, field: T) -> Self {
14657            self.set_chain(field.into());
14658            self
14659        }
14660        ///If `nonce` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14661        pub fn nonce_opt_mut(&mut self) -> Option<&mut u32> {
14662            self.nonce.as_mut().map(|field| field as _)
14663        }
14664        ///Returns a mutable reference to `nonce`.
14665        ///If the field is unset, it is first initialized with the default value.
14666        pub fn nonce_mut(&mut self) -> &mut u32 {
14667            self.nonce.get_or_insert_default()
14668        }
14669        ///If `nonce` is set, returns [`Some`] with the value; otherwise returns [`None`].
14670        pub fn nonce_opt(&self) -> Option<u32> {
14671            self.nonce.as_ref().map(|field| *field)
14672        }
14673        ///Sets `nonce` with the provided value.
14674        pub fn set_nonce(&mut self, field: u32) {
14675            self.nonce = Some(field);
14676        }
14677        ///Sets `nonce` with the provided value.
14678        pub fn with_nonce(mut self, field: u32) -> Self {
14679            self.set_nonce(field);
14680            self
14681        }
14682    }
14683    impl super::TransactionKind {
14684        pub const fn const_default() -> Self {
14685            Self { kind: None, data: None }
14686        }
14687        #[doc(hidden)]
14688        pub fn default_instance() -> &'static Self {
14689            static DEFAULT: super::TransactionKind = super::TransactionKind::const_default();
14690            &DEFAULT
14691        }
14692        ///Sets `kind` with the provided value.
14693        pub fn with_kind<T: Into<super::transaction_kind::Kind>>(
14694            mut self,
14695            field: T,
14696        ) -> Self {
14697            self.set_kind(field.into());
14698            self
14699        }
14700        ///Returns the value of `programmable_transaction`, or the default value if `programmable_transaction` is unset.
14701        pub fn programmable_transaction(&self) -> &super::ProgrammableTransaction {
14702            if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &self
14703                .data
14704            {
14705                field as _
14706            } else {
14707                super::ProgrammableTransaction::default_instance() as _
14708            }
14709        }
14710        ///If `programmable_transaction` is set, returns [`Some`] with the value; otherwise returns [`None`].
14711        pub fn programmable_transaction_opt(
14712            &self,
14713        ) -> Option<&super::ProgrammableTransaction> {
14714            if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &self
14715                .data
14716            {
14717                Some(field as _)
14718            } else {
14719                None
14720            }
14721        }
14722        ///If `programmable_transaction` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14723        pub fn programmable_transaction_opt_mut(
14724            &mut self,
14725        ) -> Option<&mut super::ProgrammableTransaction> {
14726            if let Some(super::transaction_kind::Data::ProgrammableTransaction(field)) = &mut self
14727                .data
14728            {
14729                Some(field as _)
14730            } else {
14731                None
14732            }
14733        }
14734        ///Returns a mutable reference to `programmable_transaction`.
14735        ///If the field is unset, it is first initialized with the default value.
14736        ///If any other oneof field in the same oneof is set, it will be cleared.
14737        pub fn programmable_transaction_mut(
14738            &mut self,
14739        ) -> &mut super::ProgrammableTransaction {
14740            if self.programmable_transaction_opt_mut().is_none() {
14741                self.data = Some(
14742                    super::transaction_kind::Data::ProgrammableTransaction(
14743                        super::ProgrammableTransaction::default(),
14744                    ),
14745                );
14746            }
14747            self.programmable_transaction_opt_mut().unwrap()
14748        }
14749        ///Sets `programmable_transaction` with the provided value.
14750        ///If any other oneof field in the same oneof is set, it will be cleared.
14751        pub fn set_programmable_transaction<T: Into<super::ProgrammableTransaction>>(
14752            &mut self,
14753            field: T,
14754        ) {
14755            self.data = Some(
14756                super::transaction_kind::Data::ProgrammableTransaction(
14757                    field.into().into(),
14758                ),
14759            );
14760        }
14761        ///Sets `programmable_transaction` with the provided value.
14762        ///If any other oneof field in the same oneof is set, it will be cleared.
14763        pub fn with_programmable_transaction<T: Into<super::ProgrammableTransaction>>(
14764            mut self,
14765            field: T,
14766        ) -> Self {
14767            self.set_programmable_transaction(field.into());
14768            self
14769        }
14770        ///Returns the value of `change_epoch`, or the default value if `change_epoch` is unset.
14771        pub fn change_epoch(&self) -> &super::ChangeEpoch {
14772            if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &self.data {
14773                field as _
14774            } else {
14775                super::ChangeEpoch::default_instance() as _
14776            }
14777        }
14778        ///If `change_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
14779        pub fn change_epoch_opt(&self) -> Option<&super::ChangeEpoch> {
14780            if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &self.data {
14781                Some(field as _)
14782            } else {
14783                None
14784            }
14785        }
14786        ///If `change_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14787        pub fn change_epoch_opt_mut(&mut self) -> Option<&mut super::ChangeEpoch> {
14788            if let Some(super::transaction_kind::Data::ChangeEpoch(field)) = &mut self
14789                .data
14790            {
14791                Some(field as _)
14792            } else {
14793                None
14794            }
14795        }
14796        ///Returns a mutable reference to `change_epoch`.
14797        ///If the field is unset, it is first initialized with the default value.
14798        ///If any other oneof field in the same oneof is set, it will be cleared.
14799        pub fn change_epoch_mut(&mut self) -> &mut super::ChangeEpoch {
14800            if self.change_epoch_opt_mut().is_none() {
14801                self.data = Some(
14802                    super::transaction_kind::Data::ChangeEpoch(
14803                        super::ChangeEpoch::default(),
14804                    ),
14805                );
14806            }
14807            self.change_epoch_opt_mut().unwrap()
14808        }
14809        ///Sets `change_epoch` with the provided value.
14810        ///If any other oneof field in the same oneof is set, it will be cleared.
14811        pub fn set_change_epoch<T: Into<super::ChangeEpoch>>(&mut self, field: T) {
14812            self.data = Some(
14813                super::transaction_kind::Data::ChangeEpoch(field.into().into()),
14814            );
14815        }
14816        ///Sets `change_epoch` with the provided value.
14817        ///If any other oneof field in the same oneof is set, it will be cleared.
14818        pub fn with_change_epoch<T: Into<super::ChangeEpoch>>(
14819            mut self,
14820            field: T,
14821        ) -> Self {
14822            self.set_change_epoch(field.into());
14823            self
14824        }
14825        ///Returns the value of `genesis`, or the default value if `genesis` is unset.
14826        pub fn genesis(&self) -> &super::GenesisTransaction {
14827            if let Some(super::transaction_kind::Data::Genesis(field)) = &self.data {
14828                field as _
14829            } else {
14830                super::GenesisTransaction::default_instance() as _
14831            }
14832        }
14833        ///If `genesis` is set, returns [`Some`] with the value; otherwise returns [`None`].
14834        pub fn genesis_opt(&self) -> Option<&super::GenesisTransaction> {
14835            if let Some(super::transaction_kind::Data::Genesis(field)) = &self.data {
14836                Some(field as _)
14837            } else {
14838                None
14839            }
14840        }
14841        ///If `genesis` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14842        pub fn genesis_opt_mut(&mut self) -> Option<&mut super::GenesisTransaction> {
14843            if let Some(super::transaction_kind::Data::Genesis(field)) = &mut self.data {
14844                Some(field as _)
14845            } else {
14846                None
14847            }
14848        }
14849        ///Returns a mutable reference to `genesis`.
14850        ///If the field is unset, it is first initialized with the default value.
14851        ///If any other oneof field in the same oneof is set, it will be cleared.
14852        pub fn genesis_mut(&mut self) -> &mut super::GenesisTransaction {
14853            if self.genesis_opt_mut().is_none() {
14854                self.data = Some(
14855                    super::transaction_kind::Data::Genesis(
14856                        super::GenesisTransaction::default(),
14857                    ),
14858                );
14859            }
14860            self.genesis_opt_mut().unwrap()
14861        }
14862        ///Sets `genesis` with the provided value.
14863        ///If any other oneof field in the same oneof is set, it will be cleared.
14864        pub fn set_genesis<T: Into<super::GenesisTransaction>>(&mut self, field: T) {
14865            self.data = Some(
14866                super::transaction_kind::Data::Genesis(field.into().into()),
14867            );
14868        }
14869        ///Sets `genesis` with the provided value.
14870        ///If any other oneof field in the same oneof is set, it will be cleared.
14871        pub fn with_genesis<T: Into<super::GenesisTransaction>>(
14872            mut self,
14873            field: T,
14874        ) -> Self {
14875            self.set_genesis(field.into());
14876            self
14877        }
14878        ///Returns the value of `consensus_commit_prologue`, or the default value if `consensus_commit_prologue` is unset.
14879        pub fn consensus_commit_prologue(&self) -> &super::ConsensusCommitPrologue {
14880            if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &self
14881                .data
14882            {
14883                field as _
14884            } else {
14885                super::ConsensusCommitPrologue::default_instance() as _
14886            }
14887        }
14888        ///If `consensus_commit_prologue` is set, returns [`Some`] with the value; otherwise returns [`None`].
14889        pub fn consensus_commit_prologue_opt(
14890            &self,
14891        ) -> Option<&super::ConsensusCommitPrologue> {
14892            if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &self
14893                .data
14894            {
14895                Some(field as _)
14896            } else {
14897                None
14898            }
14899        }
14900        ///If `consensus_commit_prologue` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14901        pub fn consensus_commit_prologue_opt_mut(
14902            &mut self,
14903        ) -> Option<&mut super::ConsensusCommitPrologue> {
14904            if let Some(super::transaction_kind::Data::ConsensusCommitPrologue(field)) = &mut self
14905                .data
14906            {
14907                Some(field as _)
14908            } else {
14909                None
14910            }
14911        }
14912        ///Returns a mutable reference to `consensus_commit_prologue`.
14913        ///If the field is unset, it is first initialized with the default value.
14914        ///If any other oneof field in the same oneof is set, it will be cleared.
14915        pub fn consensus_commit_prologue_mut(
14916            &mut self,
14917        ) -> &mut super::ConsensusCommitPrologue {
14918            if self.consensus_commit_prologue_opt_mut().is_none() {
14919                self.data = Some(
14920                    super::transaction_kind::Data::ConsensusCommitPrologue(
14921                        super::ConsensusCommitPrologue::default(),
14922                    ),
14923                );
14924            }
14925            self.consensus_commit_prologue_opt_mut().unwrap()
14926        }
14927        ///Sets `consensus_commit_prologue` with the provided value.
14928        ///If any other oneof field in the same oneof is set, it will be cleared.
14929        pub fn set_consensus_commit_prologue<T: Into<super::ConsensusCommitPrologue>>(
14930            &mut self,
14931            field: T,
14932        ) {
14933            self.data = Some(
14934                super::transaction_kind::Data::ConsensusCommitPrologue(
14935                    field.into().into(),
14936                ),
14937            );
14938        }
14939        ///Sets `consensus_commit_prologue` with the provided value.
14940        ///If any other oneof field in the same oneof is set, it will be cleared.
14941        pub fn with_consensus_commit_prologue<T: Into<super::ConsensusCommitPrologue>>(
14942            mut self,
14943            field: T,
14944        ) -> Self {
14945            self.set_consensus_commit_prologue(field.into());
14946            self
14947        }
14948        ///Returns the value of `authenticator_state_update`, or the default value if `authenticator_state_update` is unset.
14949        pub fn authenticator_state_update(&self) -> &super::AuthenticatorStateUpdate {
14950            if let Some(
14951                super::transaction_kind::Data::AuthenticatorStateUpdate(field),
14952            ) = &self.data
14953            {
14954                field as _
14955            } else {
14956                super::AuthenticatorStateUpdate::default_instance() as _
14957            }
14958        }
14959        ///If `authenticator_state_update` is set, returns [`Some`] with the value; otherwise returns [`None`].
14960        pub fn authenticator_state_update_opt(
14961            &self,
14962        ) -> Option<&super::AuthenticatorStateUpdate> {
14963            if let Some(
14964                super::transaction_kind::Data::AuthenticatorStateUpdate(field),
14965            ) = &self.data
14966            {
14967                Some(field as _)
14968            } else {
14969                None
14970            }
14971        }
14972        ///If `authenticator_state_update` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
14973        pub fn authenticator_state_update_opt_mut(
14974            &mut self,
14975        ) -> Option<&mut super::AuthenticatorStateUpdate> {
14976            if let Some(
14977                super::transaction_kind::Data::AuthenticatorStateUpdate(field),
14978            ) = &mut self.data
14979            {
14980                Some(field as _)
14981            } else {
14982                None
14983            }
14984        }
14985        ///Returns a mutable reference to `authenticator_state_update`.
14986        ///If the field is unset, it is first initialized with the default value.
14987        ///If any other oneof field in the same oneof is set, it will be cleared.
14988        pub fn authenticator_state_update_mut(
14989            &mut self,
14990        ) -> &mut super::AuthenticatorStateUpdate {
14991            if self.authenticator_state_update_opt_mut().is_none() {
14992                self.data = Some(
14993                    super::transaction_kind::Data::AuthenticatorStateUpdate(
14994                        super::AuthenticatorStateUpdate::default(),
14995                    ),
14996                );
14997            }
14998            self.authenticator_state_update_opt_mut().unwrap()
14999        }
15000        ///Sets `authenticator_state_update` with the provided value.
15001        ///If any other oneof field in the same oneof is set, it will be cleared.
15002        pub fn set_authenticator_state_update<T: Into<super::AuthenticatorStateUpdate>>(
15003            &mut self,
15004            field: T,
15005        ) {
15006            self.data = Some(
15007                super::transaction_kind::Data::AuthenticatorStateUpdate(
15008                    field.into().into(),
15009                ),
15010            );
15011        }
15012        ///Sets `authenticator_state_update` with the provided value.
15013        ///If any other oneof field in the same oneof is set, it will be cleared.
15014        pub fn with_authenticator_state_update<T: Into<super::AuthenticatorStateUpdate>>(
15015            mut self,
15016            field: T,
15017        ) -> Self {
15018            self.set_authenticator_state_update(field.into());
15019            self
15020        }
15021        ///Returns the value of `end_of_epoch`, or the default value if `end_of_epoch` is unset.
15022        pub fn end_of_epoch(&self) -> &super::EndOfEpochTransaction {
15023            if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &self.data {
15024                field as _
15025            } else {
15026                super::EndOfEpochTransaction::default_instance() as _
15027            }
15028        }
15029        ///If `end_of_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
15030        pub fn end_of_epoch_opt(&self) -> Option<&super::EndOfEpochTransaction> {
15031            if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &self.data {
15032                Some(field as _)
15033            } else {
15034                None
15035            }
15036        }
15037        ///If `end_of_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15038        pub fn end_of_epoch_opt_mut(
15039            &mut self,
15040        ) -> Option<&mut super::EndOfEpochTransaction> {
15041            if let Some(super::transaction_kind::Data::EndOfEpoch(field)) = &mut self
15042                .data
15043            {
15044                Some(field as _)
15045            } else {
15046                None
15047            }
15048        }
15049        ///Returns a mutable reference to `end_of_epoch`.
15050        ///If the field is unset, it is first initialized with the default value.
15051        ///If any other oneof field in the same oneof is set, it will be cleared.
15052        pub fn end_of_epoch_mut(&mut self) -> &mut super::EndOfEpochTransaction {
15053            if self.end_of_epoch_opt_mut().is_none() {
15054                self.data = Some(
15055                    super::transaction_kind::Data::EndOfEpoch(
15056                        super::EndOfEpochTransaction::default(),
15057                    ),
15058                );
15059            }
15060            self.end_of_epoch_opt_mut().unwrap()
15061        }
15062        ///Sets `end_of_epoch` with the provided value.
15063        ///If any other oneof field in the same oneof is set, it will be cleared.
15064        pub fn set_end_of_epoch<T: Into<super::EndOfEpochTransaction>>(
15065            &mut self,
15066            field: T,
15067        ) {
15068            self.data = Some(
15069                super::transaction_kind::Data::EndOfEpoch(field.into().into()),
15070            );
15071        }
15072        ///Sets `end_of_epoch` with the provided value.
15073        ///If any other oneof field in the same oneof is set, it will be cleared.
15074        pub fn with_end_of_epoch<T: Into<super::EndOfEpochTransaction>>(
15075            mut self,
15076            field: T,
15077        ) -> Self {
15078            self.set_end_of_epoch(field.into());
15079            self
15080        }
15081        ///Returns the value of `randomness_state_update`, or the default value if `randomness_state_update` is unset.
15082        pub fn randomness_state_update(&self) -> &super::RandomnessStateUpdate {
15083            if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &self
15084                .data
15085            {
15086                field as _
15087            } else {
15088                super::RandomnessStateUpdate::default_instance() as _
15089            }
15090        }
15091        ///If `randomness_state_update` is set, returns [`Some`] with the value; otherwise returns [`None`].
15092        pub fn randomness_state_update_opt(
15093            &self,
15094        ) -> Option<&super::RandomnessStateUpdate> {
15095            if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &self
15096                .data
15097            {
15098                Some(field as _)
15099            } else {
15100                None
15101            }
15102        }
15103        ///If `randomness_state_update` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15104        pub fn randomness_state_update_opt_mut(
15105            &mut self,
15106        ) -> Option<&mut super::RandomnessStateUpdate> {
15107            if let Some(super::transaction_kind::Data::RandomnessStateUpdate(field)) = &mut self
15108                .data
15109            {
15110                Some(field as _)
15111            } else {
15112                None
15113            }
15114        }
15115        ///Returns a mutable reference to `randomness_state_update`.
15116        ///If the field is unset, it is first initialized with the default value.
15117        ///If any other oneof field in the same oneof is set, it will be cleared.
15118        pub fn randomness_state_update_mut(
15119            &mut self,
15120        ) -> &mut super::RandomnessStateUpdate {
15121            if self.randomness_state_update_opt_mut().is_none() {
15122                self.data = Some(
15123                    super::transaction_kind::Data::RandomnessStateUpdate(
15124                        super::RandomnessStateUpdate::default(),
15125                    ),
15126                );
15127            }
15128            self.randomness_state_update_opt_mut().unwrap()
15129        }
15130        ///Sets `randomness_state_update` with the provided value.
15131        ///If any other oneof field in the same oneof is set, it will be cleared.
15132        pub fn set_randomness_state_update<T: Into<super::RandomnessStateUpdate>>(
15133            &mut self,
15134            field: T,
15135        ) {
15136            self.data = Some(
15137                super::transaction_kind::Data::RandomnessStateUpdate(field.into().into()),
15138            );
15139        }
15140        ///Sets `randomness_state_update` with the provided value.
15141        ///If any other oneof field in the same oneof is set, it will be cleared.
15142        pub fn with_randomness_state_update<T: Into<super::RandomnessStateUpdate>>(
15143            mut self,
15144            field: T,
15145        ) -> Self {
15146            self.set_randomness_state_update(field.into());
15147            self
15148        }
15149    }
15150    impl super::TransferObjects {
15151        pub const fn const_default() -> Self {
15152            Self {
15153                objects: Vec::new(),
15154                address: None,
15155            }
15156        }
15157        #[doc(hidden)]
15158        pub fn default_instance() -> &'static Self {
15159            static DEFAULT: super::TransferObjects = super::TransferObjects::const_default();
15160            &DEFAULT
15161        }
15162        ///Returns the value of `objects`, or the default value if `objects` is unset.
15163        pub fn objects(&self) -> &[super::Argument] {
15164            &self.objects
15165        }
15166        ///Returns a mutable reference to `objects`.
15167        ///If the field is unset, it is first initialized with the default value.
15168        pub fn objects_mut(&mut self) -> &mut Vec<super::Argument> {
15169            &mut self.objects
15170        }
15171        ///Sets `objects` with the provided value.
15172        pub fn set_objects(&mut self, field: Vec<super::Argument>) {
15173            self.objects = field;
15174        }
15175        ///Sets `objects` with the provided value.
15176        pub fn with_objects(mut self, field: Vec<super::Argument>) -> Self {
15177            self.set_objects(field);
15178            self
15179        }
15180        ///Returns the value of `address`, or the default value if `address` is unset.
15181        pub fn address(&self) -> &super::Argument {
15182            self.address
15183                .as_ref()
15184                .map(|field| field as _)
15185                .unwrap_or_else(|| super::Argument::default_instance() as _)
15186        }
15187        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15188        pub fn address_opt_mut(&mut self) -> Option<&mut super::Argument> {
15189            self.address.as_mut().map(|field| field as _)
15190        }
15191        ///Returns a mutable reference to `address`.
15192        ///If the field is unset, it is first initialized with the default value.
15193        pub fn address_mut(&mut self) -> &mut super::Argument {
15194            self.address.get_or_insert_default()
15195        }
15196        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
15197        pub fn address_opt(&self) -> Option<&super::Argument> {
15198            self.address.as_ref().map(|field| field as _)
15199        }
15200        ///Sets `address` with the provided value.
15201        pub fn set_address<T: Into<super::Argument>>(&mut self, field: T) {
15202            self.address = Some(field.into().into());
15203        }
15204        ///Sets `address` with the provided value.
15205        pub fn with_address<T: Into<super::Argument>>(mut self, field: T) -> Self {
15206            self.set_address(field.into());
15207            self
15208        }
15209    }
15210    impl super::TypeArgumentError {
15211        pub const fn const_default() -> Self {
15212            Self {
15213                type_argument: None,
15214                kind: None,
15215            }
15216        }
15217        #[doc(hidden)]
15218        pub fn default_instance() -> &'static Self {
15219            static DEFAULT: super::TypeArgumentError = super::TypeArgumentError::const_default();
15220            &DEFAULT
15221        }
15222        ///If `type_argument` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15223        pub fn type_argument_opt_mut(&mut self) -> Option<&mut u32> {
15224            self.type_argument.as_mut().map(|field| field as _)
15225        }
15226        ///Returns a mutable reference to `type_argument`.
15227        ///If the field is unset, it is first initialized with the default value.
15228        pub fn type_argument_mut(&mut self) -> &mut u32 {
15229            self.type_argument.get_or_insert_default()
15230        }
15231        ///If `type_argument` is set, returns [`Some`] with the value; otherwise returns [`None`].
15232        pub fn type_argument_opt(&self) -> Option<u32> {
15233            self.type_argument.as_ref().map(|field| *field)
15234        }
15235        ///Sets `type_argument` with the provided value.
15236        pub fn set_type_argument(&mut self, field: u32) {
15237            self.type_argument = Some(field);
15238        }
15239        ///Sets `type_argument` with the provided value.
15240        pub fn with_type_argument(mut self, field: u32) -> Self {
15241            self.set_type_argument(field);
15242            self
15243        }
15244        ///Sets `kind` with the provided value.
15245        pub fn with_kind<T: Into<super::type_argument_error::TypeArgumentErrorKind>>(
15246            mut self,
15247            field: T,
15248        ) -> Self {
15249            self.set_kind(field.into());
15250            self
15251        }
15252    }
15253    impl super::TypeOrigin {
15254        pub const fn const_default() -> Self {
15255            Self {
15256                module_name: None,
15257                datatype_name: None,
15258                package_id: None,
15259            }
15260        }
15261        #[doc(hidden)]
15262        pub fn default_instance() -> &'static Self {
15263            static DEFAULT: super::TypeOrigin = super::TypeOrigin::const_default();
15264            &DEFAULT
15265        }
15266        ///If `module_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15267        pub fn module_name_opt_mut(&mut self) -> Option<&mut String> {
15268            self.module_name.as_mut().map(|field| field as _)
15269        }
15270        ///Returns a mutable reference to `module_name`.
15271        ///If the field is unset, it is first initialized with the default value.
15272        pub fn module_name_mut(&mut self) -> &mut String {
15273            self.module_name.get_or_insert_default()
15274        }
15275        ///If `module_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
15276        pub fn module_name_opt(&self) -> Option<&str> {
15277            self.module_name.as_ref().map(|field| field as _)
15278        }
15279        ///Sets `module_name` with the provided value.
15280        pub fn set_module_name<T: Into<String>>(&mut self, field: T) {
15281            self.module_name = Some(field.into().into());
15282        }
15283        ///Sets `module_name` with the provided value.
15284        pub fn with_module_name<T: Into<String>>(mut self, field: T) -> Self {
15285            self.set_module_name(field.into());
15286            self
15287        }
15288        ///If `datatype_name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15289        pub fn datatype_name_opt_mut(&mut self) -> Option<&mut String> {
15290            self.datatype_name.as_mut().map(|field| field as _)
15291        }
15292        ///Returns a mutable reference to `datatype_name`.
15293        ///If the field is unset, it is first initialized with the default value.
15294        pub fn datatype_name_mut(&mut self) -> &mut String {
15295            self.datatype_name.get_or_insert_default()
15296        }
15297        ///If `datatype_name` is set, returns [`Some`] with the value; otherwise returns [`None`].
15298        pub fn datatype_name_opt(&self) -> Option<&str> {
15299            self.datatype_name.as_ref().map(|field| field as _)
15300        }
15301        ///Sets `datatype_name` with the provided value.
15302        pub fn set_datatype_name<T: Into<String>>(&mut self, field: T) {
15303            self.datatype_name = Some(field.into().into());
15304        }
15305        ///Sets `datatype_name` with the provided value.
15306        pub fn with_datatype_name<T: Into<String>>(mut self, field: T) -> Self {
15307            self.set_datatype_name(field.into());
15308            self
15309        }
15310        ///If `package_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15311        pub fn package_id_opt_mut(&mut self) -> Option<&mut String> {
15312            self.package_id.as_mut().map(|field| field as _)
15313        }
15314        ///Returns a mutable reference to `package_id`.
15315        ///If the field is unset, it is first initialized with the default value.
15316        pub fn package_id_mut(&mut self) -> &mut String {
15317            self.package_id.get_or_insert_default()
15318        }
15319        ///If `package_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
15320        pub fn package_id_opt(&self) -> Option<&str> {
15321            self.package_id.as_ref().map(|field| field as _)
15322        }
15323        ///Sets `package_id` with the provided value.
15324        pub fn set_package_id<T: Into<String>>(&mut self, field: T) {
15325            self.package_id = Some(field.into().into());
15326        }
15327        ///Sets `package_id` with the provided value.
15328        pub fn with_package_id<T: Into<String>>(mut self, field: T) -> Self {
15329            self.set_package_id(field.into());
15330            self
15331        }
15332    }
15333    impl super::TypeParameter {
15334        pub const fn const_default() -> Self {
15335            Self {
15336                constraints: Vec::new(),
15337                is_phantom: None,
15338            }
15339        }
15340        #[doc(hidden)]
15341        pub fn default_instance() -> &'static Self {
15342            static DEFAULT: super::TypeParameter = super::TypeParameter::const_default();
15343            &DEFAULT
15344        }
15345        ///If `is_phantom` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15346        pub fn is_phantom_opt_mut(&mut self) -> Option<&mut bool> {
15347            self.is_phantom.as_mut().map(|field| field as _)
15348        }
15349        ///Returns a mutable reference to `is_phantom`.
15350        ///If the field is unset, it is first initialized with the default value.
15351        pub fn is_phantom_mut(&mut self) -> &mut bool {
15352            self.is_phantom.get_or_insert_default()
15353        }
15354        ///If `is_phantom` is set, returns [`Some`] with the value; otherwise returns [`None`].
15355        pub fn is_phantom_opt(&self) -> Option<bool> {
15356            self.is_phantom.as_ref().map(|field| *field)
15357        }
15358        ///Sets `is_phantom` with the provided value.
15359        pub fn set_is_phantom(&mut self, field: bool) {
15360            self.is_phantom = Some(field);
15361        }
15362        ///Sets `is_phantom` with the provided value.
15363        pub fn with_is_phantom(mut self, field: bool) -> Self {
15364            self.set_is_phantom(field);
15365            self
15366        }
15367    }
15368    impl super::UnchangedConsensusObject {
15369        pub const fn const_default() -> Self {
15370            Self {
15371                kind: None,
15372                object_id: None,
15373                version: None,
15374                digest: None,
15375                object_type: None,
15376            }
15377        }
15378        #[doc(hidden)]
15379        pub fn default_instance() -> &'static Self {
15380            static DEFAULT: super::UnchangedConsensusObject = super::UnchangedConsensusObject::const_default();
15381            &DEFAULT
15382        }
15383        ///Sets `kind` with the provided value.
15384        pub fn with_kind<
15385            T: Into<super::unchanged_consensus_object::UnchangedConsensusObjectKind>,
15386        >(mut self, field: T) -> Self {
15387            self.set_kind(field.into());
15388            self
15389        }
15390        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15391        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
15392            self.object_id.as_mut().map(|field| field as _)
15393        }
15394        ///Returns a mutable reference to `object_id`.
15395        ///If the field is unset, it is first initialized with the default value.
15396        pub fn object_id_mut(&mut self) -> &mut String {
15397            self.object_id.get_or_insert_default()
15398        }
15399        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
15400        pub fn object_id_opt(&self) -> Option<&str> {
15401            self.object_id.as_ref().map(|field| field as _)
15402        }
15403        ///Sets `object_id` with the provided value.
15404        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
15405            self.object_id = Some(field.into().into());
15406        }
15407        ///Sets `object_id` with the provided value.
15408        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
15409            self.set_object_id(field.into());
15410            self
15411        }
15412        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15413        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
15414            self.version.as_mut().map(|field| field as _)
15415        }
15416        ///Returns a mutable reference to `version`.
15417        ///If the field is unset, it is first initialized with the default value.
15418        pub fn version_mut(&mut self) -> &mut u64 {
15419            self.version.get_or_insert_default()
15420        }
15421        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
15422        pub fn version_opt(&self) -> Option<u64> {
15423            self.version.as_ref().map(|field| *field)
15424        }
15425        ///Sets `version` with the provided value.
15426        pub fn set_version(&mut self, field: u64) {
15427            self.version = Some(field);
15428        }
15429        ///Sets `version` with the provided value.
15430        pub fn with_version(mut self, field: u64) -> Self {
15431            self.set_version(field);
15432            self
15433        }
15434        ///If `digest` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15435        pub fn digest_opt_mut(&mut self) -> Option<&mut String> {
15436            self.digest.as_mut().map(|field| field as _)
15437        }
15438        ///Returns a mutable reference to `digest`.
15439        ///If the field is unset, it is first initialized with the default value.
15440        pub fn digest_mut(&mut self) -> &mut String {
15441            self.digest.get_or_insert_default()
15442        }
15443        ///If `digest` is set, returns [`Some`] with the value; otherwise returns [`None`].
15444        pub fn digest_opt(&self) -> Option<&str> {
15445            self.digest.as_ref().map(|field| field as _)
15446        }
15447        ///Sets `digest` with the provided value.
15448        pub fn set_digest<T: Into<String>>(&mut self, field: T) {
15449            self.digest = Some(field.into().into());
15450        }
15451        ///Sets `digest` with the provided value.
15452        pub fn with_digest<T: Into<String>>(mut self, field: T) -> Self {
15453            self.set_digest(field.into());
15454            self
15455        }
15456        ///If `object_type` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15457        pub fn object_type_opt_mut(&mut self) -> Option<&mut String> {
15458            self.object_type.as_mut().map(|field| field as _)
15459        }
15460        ///Returns a mutable reference to `object_type`.
15461        ///If the field is unset, it is first initialized with the default value.
15462        pub fn object_type_mut(&mut self) -> &mut String {
15463            self.object_type.get_or_insert_default()
15464        }
15465        ///If `object_type` is set, returns [`Some`] with the value; otherwise returns [`None`].
15466        pub fn object_type_opt(&self) -> Option<&str> {
15467            self.object_type.as_ref().map(|field| field as _)
15468        }
15469        ///Sets `object_type` with the provided value.
15470        pub fn set_object_type<T: Into<String>>(&mut self, field: T) {
15471            self.object_type = Some(field.into().into());
15472        }
15473        ///Sets `object_type` with the provided value.
15474        pub fn with_object_type<T: Into<String>>(mut self, field: T) -> Self {
15475            self.set_object_type(field.into());
15476            self
15477        }
15478    }
15479    impl super::Upgrade {
15480        pub const fn const_default() -> Self {
15481            Self {
15482                modules: Vec::new(),
15483                dependencies: Vec::new(),
15484                package: None,
15485                ticket: None,
15486            }
15487        }
15488        #[doc(hidden)]
15489        pub fn default_instance() -> &'static Self {
15490            static DEFAULT: super::Upgrade = super::Upgrade::const_default();
15491            &DEFAULT
15492        }
15493        ///Returns the value of `modules`, or the default value if `modules` is unset.
15494        pub fn modules(&self) -> &[::prost::bytes::Bytes] {
15495            &self.modules
15496        }
15497        ///Returns a mutable reference to `modules`.
15498        ///If the field is unset, it is first initialized with the default value.
15499        pub fn modules_mut(&mut self) -> &mut Vec<::prost::bytes::Bytes> {
15500            &mut self.modules
15501        }
15502        ///Sets `modules` with the provided value.
15503        pub fn set_modules(&mut self, field: Vec<::prost::bytes::Bytes>) {
15504            self.modules = field;
15505        }
15506        ///Sets `modules` with the provided value.
15507        pub fn with_modules(mut self, field: Vec<::prost::bytes::Bytes>) -> Self {
15508            self.set_modules(field);
15509            self
15510        }
15511        ///Returns the value of `dependencies`, or the default value if `dependencies` is unset.
15512        pub fn dependencies(&self) -> &[String] {
15513            &self.dependencies
15514        }
15515        ///Returns a mutable reference to `dependencies`.
15516        ///If the field is unset, it is first initialized with the default value.
15517        pub fn dependencies_mut(&mut self) -> &mut Vec<String> {
15518            &mut self.dependencies
15519        }
15520        ///Sets `dependencies` with the provided value.
15521        pub fn set_dependencies(&mut self, field: Vec<String>) {
15522            self.dependencies = field;
15523        }
15524        ///Sets `dependencies` with the provided value.
15525        pub fn with_dependencies(mut self, field: Vec<String>) -> Self {
15526            self.set_dependencies(field);
15527            self
15528        }
15529        ///If `package` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15530        pub fn package_opt_mut(&mut self) -> Option<&mut String> {
15531            self.package.as_mut().map(|field| field as _)
15532        }
15533        ///Returns a mutable reference to `package`.
15534        ///If the field is unset, it is first initialized with the default value.
15535        pub fn package_mut(&mut self) -> &mut String {
15536            self.package.get_or_insert_default()
15537        }
15538        ///If `package` is set, returns [`Some`] with the value; otherwise returns [`None`].
15539        pub fn package_opt(&self) -> Option<&str> {
15540            self.package.as_ref().map(|field| field as _)
15541        }
15542        ///Sets `package` with the provided value.
15543        pub fn set_package<T: Into<String>>(&mut self, field: T) {
15544            self.package = Some(field.into().into());
15545        }
15546        ///Sets `package` with the provided value.
15547        pub fn with_package<T: Into<String>>(mut self, field: T) -> Self {
15548            self.set_package(field.into());
15549            self
15550        }
15551        ///Returns the value of `ticket`, or the default value if `ticket` is unset.
15552        pub fn ticket(&self) -> &super::Argument {
15553            self.ticket
15554                .as_ref()
15555                .map(|field| field as _)
15556                .unwrap_or_else(|| super::Argument::default_instance() as _)
15557        }
15558        ///If `ticket` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15559        pub fn ticket_opt_mut(&mut self) -> Option<&mut super::Argument> {
15560            self.ticket.as_mut().map(|field| field as _)
15561        }
15562        ///Returns a mutable reference to `ticket`.
15563        ///If the field is unset, it is first initialized with the default value.
15564        pub fn ticket_mut(&mut self) -> &mut super::Argument {
15565            self.ticket.get_or_insert_default()
15566        }
15567        ///If `ticket` is set, returns [`Some`] with the value; otherwise returns [`None`].
15568        pub fn ticket_opt(&self) -> Option<&super::Argument> {
15569            self.ticket.as_ref().map(|field| field as _)
15570        }
15571        ///Sets `ticket` with the provided value.
15572        pub fn set_ticket<T: Into<super::Argument>>(&mut self, field: T) {
15573            self.ticket = Some(field.into().into());
15574        }
15575        ///Sets `ticket` with the provided value.
15576        pub fn with_ticket<T: Into<super::Argument>>(mut self, field: T) -> Self {
15577            self.set_ticket(field.into());
15578            self
15579        }
15580    }
15581    impl super::UserSignature {
15582        pub const fn const_default() -> Self {
15583            Self {
15584                bcs: None,
15585                scheme: None,
15586                signature: None,
15587            }
15588        }
15589        #[doc(hidden)]
15590        pub fn default_instance() -> &'static Self {
15591            static DEFAULT: super::UserSignature = super::UserSignature::const_default();
15592            &DEFAULT
15593        }
15594        ///Returns the value of `bcs`, or the default value if `bcs` is unset.
15595        pub fn bcs(&self) -> &super::Bcs {
15596            self.bcs
15597                .as_ref()
15598                .map(|field| field as _)
15599                .unwrap_or_else(|| super::Bcs::default_instance() as _)
15600        }
15601        ///If `bcs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15602        pub fn bcs_opt_mut(&mut self) -> Option<&mut super::Bcs> {
15603            self.bcs.as_mut().map(|field| field as _)
15604        }
15605        ///Returns a mutable reference to `bcs`.
15606        ///If the field is unset, it is first initialized with the default value.
15607        pub fn bcs_mut(&mut self) -> &mut super::Bcs {
15608            self.bcs.get_or_insert_default()
15609        }
15610        ///If `bcs` is set, returns [`Some`] with the value; otherwise returns [`None`].
15611        pub fn bcs_opt(&self) -> Option<&super::Bcs> {
15612            self.bcs.as_ref().map(|field| field as _)
15613        }
15614        ///Sets `bcs` with the provided value.
15615        pub fn set_bcs<T: Into<super::Bcs>>(&mut self, field: T) {
15616            self.bcs = Some(field.into().into());
15617        }
15618        ///Sets `bcs` with the provided value.
15619        pub fn with_bcs<T: Into<super::Bcs>>(mut self, field: T) -> Self {
15620            self.set_bcs(field.into());
15621            self
15622        }
15623        ///Sets `scheme` with the provided value.
15624        pub fn with_scheme<T: Into<super::SignatureScheme>>(mut self, field: T) -> Self {
15625            self.set_scheme(field.into());
15626            self
15627        }
15628        ///Returns the value of `simple`, or the default value if `simple` is unset.
15629        pub fn simple(&self) -> &super::SimpleSignature {
15630            if let Some(super::user_signature::Signature::Simple(field)) = &self
15631                .signature
15632            {
15633                field as _
15634            } else {
15635                super::SimpleSignature::default_instance() as _
15636            }
15637        }
15638        ///If `simple` is set, returns [`Some`] with the value; otherwise returns [`None`].
15639        pub fn simple_opt(&self) -> Option<&super::SimpleSignature> {
15640            if let Some(super::user_signature::Signature::Simple(field)) = &self
15641                .signature
15642            {
15643                Some(field as _)
15644            } else {
15645                None
15646            }
15647        }
15648        ///If `simple` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15649        pub fn simple_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
15650            if let Some(super::user_signature::Signature::Simple(field)) = &mut self
15651                .signature
15652            {
15653                Some(field as _)
15654            } else {
15655                None
15656            }
15657        }
15658        ///Returns a mutable reference to `simple`.
15659        ///If the field is unset, it is first initialized with the default value.
15660        ///If any other oneof field in the same oneof is set, it will be cleared.
15661        pub fn simple_mut(&mut self) -> &mut super::SimpleSignature {
15662            if self.simple_opt_mut().is_none() {
15663                self.signature = Some(
15664                    super::user_signature::Signature::Simple(
15665                        super::SimpleSignature::default(),
15666                    ),
15667                );
15668            }
15669            self.simple_opt_mut().unwrap()
15670        }
15671        ///Sets `simple` with the provided value.
15672        ///If any other oneof field in the same oneof is set, it will be cleared.
15673        pub fn set_simple<T: Into<super::SimpleSignature>>(&mut self, field: T) {
15674            self.signature = Some(
15675                super::user_signature::Signature::Simple(field.into().into()),
15676            );
15677        }
15678        ///Sets `simple` with the provided value.
15679        ///If any other oneof field in the same oneof is set, it will be cleared.
15680        pub fn with_simple<T: Into<super::SimpleSignature>>(mut self, field: T) -> Self {
15681            self.set_simple(field.into());
15682            self
15683        }
15684        ///Returns the value of `multisig`, or the default value if `multisig` is unset.
15685        pub fn multisig(&self) -> &super::MultisigAggregatedSignature {
15686            if let Some(super::user_signature::Signature::Multisig(field)) = &self
15687                .signature
15688            {
15689                field as _
15690            } else {
15691                super::MultisigAggregatedSignature::default_instance() as _
15692            }
15693        }
15694        ///If `multisig` is set, returns [`Some`] with the value; otherwise returns [`None`].
15695        pub fn multisig_opt(&self) -> Option<&super::MultisigAggregatedSignature> {
15696            if let Some(super::user_signature::Signature::Multisig(field)) = &self
15697                .signature
15698            {
15699                Some(field as _)
15700            } else {
15701                None
15702            }
15703        }
15704        ///If `multisig` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15705        pub fn multisig_opt_mut(
15706            &mut self,
15707        ) -> Option<&mut super::MultisigAggregatedSignature> {
15708            if let Some(super::user_signature::Signature::Multisig(field)) = &mut self
15709                .signature
15710            {
15711                Some(field as _)
15712            } else {
15713                None
15714            }
15715        }
15716        ///Returns a mutable reference to `multisig`.
15717        ///If the field is unset, it is first initialized with the default value.
15718        ///If any other oneof field in the same oneof is set, it will be cleared.
15719        pub fn multisig_mut(&mut self) -> &mut super::MultisigAggregatedSignature {
15720            if self.multisig_opt_mut().is_none() {
15721                self.signature = Some(
15722                    super::user_signature::Signature::Multisig(
15723                        super::MultisigAggregatedSignature::default(),
15724                    ),
15725                );
15726            }
15727            self.multisig_opt_mut().unwrap()
15728        }
15729        ///Sets `multisig` with the provided value.
15730        ///If any other oneof field in the same oneof is set, it will be cleared.
15731        pub fn set_multisig<T: Into<super::MultisigAggregatedSignature>>(
15732            &mut self,
15733            field: T,
15734        ) {
15735            self.signature = Some(
15736                super::user_signature::Signature::Multisig(field.into().into()),
15737            );
15738        }
15739        ///Sets `multisig` with the provided value.
15740        ///If any other oneof field in the same oneof is set, it will be cleared.
15741        pub fn with_multisig<T: Into<super::MultisigAggregatedSignature>>(
15742            mut self,
15743            field: T,
15744        ) -> Self {
15745            self.set_multisig(field.into());
15746            self
15747        }
15748        ///Returns the value of `zklogin`, or the default value if `zklogin` is unset.
15749        pub fn zklogin(&self) -> &super::ZkLoginAuthenticator {
15750            if let Some(super::user_signature::Signature::Zklogin(field)) = &self
15751                .signature
15752            {
15753                field as _
15754            } else {
15755                super::ZkLoginAuthenticator::default_instance() as _
15756            }
15757        }
15758        ///If `zklogin` is set, returns [`Some`] with the value; otherwise returns [`None`].
15759        pub fn zklogin_opt(&self) -> Option<&super::ZkLoginAuthenticator> {
15760            if let Some(super::user_signature::Signature::Zklogin(field)) = &self
15761                .signature
15762            {
15763                Some(field as _)
15764            } else {
15765                None
15766            }
15767        }
15768        ///If `zklogin` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15769        pub fn zklogin_opt_mut(&mut self) -> Option<&mut super::ZkLoginAuthenticator> {
15770            if let Some(super::user_signature::Signature::Zklogin(field)) = &mut self
15771                .signature
15772            {
15773                Some(field as _)
15774            } else {
15775                None
15776            }
15777        }
15778        ///Returns a mutable reference to `zklogin`.
15779        ///If the field is unset, it is first initialized with the default value.
15780        ///If any other oneof field in the same oneof is set, it will be cleared.
15781        pub fn zklogin_mut(&mut self) -> &mut super::ZkLoginAuthenticator {
15782            if self.zklogin_opt_mut().is_none() {
15783                self.signature = Some(
15784                    super::user_signature::Signature::Zklogin(
15785                        super::ZkLoginAuthenticator::default(),
15786                    ),
15787                );
15788            }
15789            self.zklogin_opt_mut().unwrap()
15790        }
15791        ///Sets `zklogin` with the provided value.
15792        ///If any other oneof field in the same oneof is set, it will be cleared.
15793        pub fn set_zklogin<T: Into<super::ZkLoginAuthenticator>>(&mut self, field: T) {
15794            self.signature = Some(
15795                super::user_signature::Signature::Zklogin(field.into().into()),
15796            );
15797        }
15798        ///Sets `zklogin` with the provided value.
15799        ///If any other oneof field in the same oneof is set, it will be cleared.
15800        pub fn with_zklogin<T: Into<super::ZkLoginAuthenticator>>(
15801            mut self,
15802            field: T,
15803        ) -> Self {
15804            self.set_zklogin(field.into());
15805            self
15806        }
15807        ///Returns the value of `passkey`, or the default value if `passkey` is unset.
15808        pub fn passkey(&self) -> &super::PasskeyAuthenticator {
15809            if let Some(super::user_signature::Signature::Passkey(field)) = &self
15810                .signature
15811            {
15812                field as _
15813            } else {
15814                super::PasskeyAuthenticator::default_instance() as _
15815            }
15816        }
15817        ///If `passkey` is set, returns [`Some`] with the value; otherwise returns [`None`].
15818        pub fn passkey_opt(&self) -> Option<&super::PasskeyAuthenticator> {
15819            if let Some(super::user_signature::Signature::Passkey(field)) = &self
15820                .signature
15821            {
15822                Some(field as _)
15823            } else {
15824                None
15825            }
15826        }
15827        ///If `passkey` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15828        pub fn passkey_opt_mut(&mut self) -> Option<&mut super::PasskeyAuthenticator> {
15829            if let Some(super::user_signature::Signature::Passkey(field)) = &mut self
15830                .signature
15831            {
15832                Some(field as _)
15833            } else {
15834                None
15835            }
15836        }
15837        ///Returns a mutable reference to `passkey`.
15838        ///If the field is unset, it is first initialized with the default value.
15839        ///If any other oneof field in the same oneof is set, it will be cleared.
15840        pub fn passkey_mut(&mut self) -> &mut super::PasskeyAuthenticator {
15841            if self.passkey_opt_mut().is_none() {
15842                self.signature = Some(
15843                    super::user_signature::Signature::Passkey(
15844                        super::PasskeyAuthenticator::default(),
15845                    ),
15846                );
15847            }
15848            self.passkey_opt_mut().unwrap()
15849        }
15850        ///Sets `passkey` with the provided value.
15851        ///If any other oneof field in the same oneof is set, it will be cleared.
15852        pub fn set_passkey<T: Into<super::PasskeyAuthenticator>>(&mut self, field: T) {
15853            self.signature = Some(
15854                super::user_signature::Signature::Passkey(field.into().into()),
15855            );
15856        }
15857        ///Sets `passkey` with the provided value.
15858        ///If any other oneof field in the same oneof is set, it will be cleared.
15859        pub fn with_passkey<T: Into<super::PasskeyAuthenticator>>(
15860            mut self,
15861            field: T,
15862        ) -> Self {
15863            self.set_passkey(field.into());
15864            self
15865        }
15866    }
15867    impl super::Validator {
15868        pub const fn const_default() -> Self {
15869            Self {
15870                name: None,
15871                address: None,
15872                description: None,
15873                image_url: None,
15874                project_url: None,
15875                protocol_public_key: None,
15876                proof_of_possession: None,
15877                network_public_key: None,
15878                worker_public_key: None,
15879                network_address: None,
15880                p2p_address: None,
15881                primary_address: None,
15882                worker_address: None,
15883                next_epoch_protocol_public_key: None,
15884                next_epoch_proof_of_possession: None,
15885                next_epoch_network_public_key: None,
15886                next_epoch_worker_public_key: None,
15887                next_epoch_network_address: None,
15888                next_epoch_p2p_address: None,
15889                next_epoch_primary_address: None,
15890                next_epoch_worker_address: None,
15891                metadata_extra_fields: None,
15892                voting_power: None,
15893                operation_cap_id: None,
15894                gas_price: None,
15895                staking_pool: None,
15896                commission_rate: None,
15897                next_epoch_stake: None,
15898                next_epoch_gas_price: None,
15899                next_epoch_commission_rate: None,
15900                extra_fields: None,
15901            }
15902        }
15903        #[doc(hidden)]
15904        pub fn default_instance() -> &'static Self {
15905            static DEFAULT: super::Validator = super::Validator::const_default();
15906            &DEFAULT
15907        }
15908        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15909        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
15910            self.name.as_mut().map(|field| field as _)
15911        }
15912        ///Returns a mutable reference to `name`.
15913        ///If the field is unset, it is first initialized with the default value.
15914        pub fn name_mut(&mut self) -> &mut String {
15915            self.name.get_or_insert_default()
15916        }
15917        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
15918        pub fn name_opt(&self) -> Option<&str> {
15919            self.name.as_ref().map(|field| field as _)
15920        }
15921        ///Sets `name` with the provided value.
15922        pub fn set_name<T: Into<String>>(&mut self, field: T) {
15923            self.name = Some(field.into().into());
15924        }
15925        ///Sets `name` with the provided value.
15926        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
15927            self.set_name(field.into());
15928            self
15929        }
15930        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15931        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
15932            self.address.as_mut().map(|field| field as _)
15933        }
15934        ///Returns a mutable reference to `address`.
15935        ///If the field is unset, it is first initialized with the default value.
15936        pub fn address_mut(&mut self) -> &mut String {
15937            self.address.get_or_insert_default()
15938        }
15939        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
15940        pub fn address_opt(&self) -> Option<&str> {
15941            self.address.as_ref().map(|field| field as _)
15942        }
15943        ///Sets `address` with the provided value.
15944        pub fn set_address<T: Into<String>>(&mut self, field: T) {
15945            self.address = Some(field.into().into());
15946        }
15947        ///Sets `address` with the provided value.
15948        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
15949            self.set_address(field.into());
15950            self
15951        }
15952        ///If `description` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15953        pub fn description_opt_mut(&mut self) -> Option<&mut String> {
15954            self.description.as_mut().map(|field| field as _)
15955        }
15956        ///Returns a mutable reference to `description`.
15957        ///If the field is unset, it is first initialized with the default value.
15958        pub fn description_mut(&mut self) -> &mut String {
15959            self.description.get_or_insert_default()
15960        }
15961        ///If `description` is set, returns [`Some`] with the value; otherwise returns [`None`].
15962        pub fn description_opt(&self) -> Option<&str> {
15963            self.description.as_ref().map(|field| field as _)
15964        }
15965        ///Sets `description` with the provided value.
15966        pub fn set_description<T: Into<String>>(&mut self, field: T) {
15967            self.description = Some(field.into().into());
15968        }
15969        ///Sets `description` with the provided value.
15970        pub fn with_description<T: Into<String>>(mut self, field: T) -> Self {
15971            self.set_description(field.into());
15972            self
15973        }
15974        ///If `image_url` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15975        pub fn image_url_opt_mut(&mut self) -> Option<&mut String> {
15976            self.image_url.as_mut().map(|field| field as _)
15977        }
15978        ///Returns a mutable reference to `image_url`.
15979        ///If the field is unset, it is first initialized with the default value.
15980        pub fn image_url_mut(&mut self) -> &mut String {
15981            self.image_url.get_or_insert_default()
15982        }
15983        ///If `image_url` is set, returns [`Some`] with the value; otherwise returns [`None`].
15984        pub fn image_url_opt(&self) -> Option<&str> {
15985            self.image_url.as_ref().map(|field| field as _)
15986        }
15987        ///Sets `image_url` with the provided value.
15988        pub fn set_image_url<T: Into<String>>(&mut self, field: T) {
15989            self.image_url = Some(field.into().into());
15990        }
15991        ///Sets `image_url` with the provided value.
15992        pub fn with_image_url<T: Into<String>>(mut self, field: T) -> Self {
15993            self.set_image_url(field.into());
15994            self
15995        }
15996        ///If `project_url` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
15997        pub fn project_url_opt_mut(&mut self) -> Option<&mut String> {
15998            self.project_url.as_mut().map(|field| field as _)
15999        }
16000        ///Returns a mutable reference to `project_url`.
16001        ///If the field is unset, it is first initialized with the default value.
16002        pub fn project_url_mut(&mut self) -> &mut String {
16003            self.project_url.get_or_insert_default()
16004        }
16005        ///If `project_url` is set, returns [`Some`] with the value; otherwise returns [`None`].
16006        pub fn project_url_opt(&self) -> Option<&str> {
16007            self.project_url.as_ref().map(|field| field as _)
16008        }
16009        ///Sets `project_url` with the provided value.
16010        pub fn set_project_url<T: Into<String>>(&mut self, field: T) {
16011            self.project_url = Some(field.into().into());
16012        }
16013        ///Sets `project_url` with the provided value.
16014        pub fn with_project_url<T: Into<String>>(mut self, field: T) -> Self {
16015            self.set_project_url(field.into());
16016            self
16017        }
16018        ///If `protocol_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
16019        pub fn protocol_public_key_opt(&self) -> Option<&[u8]> {
16020            self.protocol_public_key.as_ref().map(|field| field as _)
16021        }
16022        ///Sets `protocol_public_key` with the provided value.
16023        pub fn set_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
16024            &mut self,
16025            field: T,
16026        ) {
16027            self.protocol_public_key = Some(field.into().into());
16028        }
16029        ///Sets `protocol_public_key` with the provided value.
16030        pub fn with_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
16031            mut self,
16032            field: T,
16033        ) -> Self {
16034            self.set_protocol_public_key(field.into());
16035            self
16036        }
16037        ///If `proof_of_possession` is set, returns [`Some`] with the value; otherwise returns [`None`].
16038        pub fn proof_of_possession_opt(&self) -> Option<&[u8]> {
16039            self.proof_of_possession.as_ref().map(|field| field as _)
16040        }
16041        ///Sets `proof_of_possession` with the provided value.
16042        pub fn set_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
16043            &mut self,
16044            field: T,
16045        ) {
16046            self.proof_of_possession = Some(field.into().into());
16047        }
16048        ///Sets `proof_of_possession` with the provided value.
16049        pub fn with_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
16050            mut self,
16051            field: T,
16052        ) -> Self {
16053            self.set_proof_of_possession(field.into());
16054            self
16055        }
16056        ///If `network_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
16057        pub fn network_public_key_opt(&self) -> Option<&[u8]> {
16058            self.network_public_key.as_ref().map(|field| field as _)
16059        }
16060        ///Sets `network_public_key` with the provided value.
16061        pub fn set_network_public_key<T: Into<::prost::bytes::Bytes>>(
16062            &mut self,
16063            field: T,
16064        ) {
16065            self.network_public_key = Some(field.into().into());
16066        }
16067        ///Sets `network_public_key` with the provided value.
16068        pub fn with_network_public_key<T: Into<::prost::bytes::Bytes>>(
16069            mut self,
16070            field: T,
16071        ) -> Self {
16072            self.set_network_public_key(field.into());
16073            self
16074        }
16075        ///If `worker_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
16076        pub fn worker_public_key_opt(&self) -> Option<&[u8]> {
16077            self.worker_public_key.as_ref().map(|field| field as _)
16078        }
16079        ///Sets `worker_public_key` with the provided value.
16080        pub fn set_worker_public_key<T: Into<::prost::bytes::Bytes>>(
16081            &mut self,
16082            field: T,
16083        ) {
16084            self.worker_public_key = Some(field.into().into());
16085        }
16086        ///Sets `worker_public_key` with the provided value.
16087        pub fn with_worker_public_key<T: Into<::prost::bytes::Bytes>>(
16088            mut self,
16089            field: T,
16090        ) -> Self {
16091            self.set_worker_public_key(field.into());
16092            self
16093        }
16094        ///If `network_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16095        pub fn network_address_opt_mut(&mut self) -> Option<&mut String> {
16096            self.network_address.as_mut().map(|field| field as _)
16097        }
16098        ///Returns a mutable reference to `network_address`.
16099        ///If the field is unset, it is first initialized with the default value.
16100        pub fn network_address_mut(&mut self) -> &mut String {
16101            self.network_address.get_or_insert_default()
16102        }
16103        ///If `network_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16104        pub fn network_address_opt(&self) -> Option<&str> {
16105            self.network_address.as_ref().map(|field| field as _)
16106        }
16107        ///Sets `network_address` with the provided value.
16108        pub fn set_network_address<T: Into<String>>(&mut self, field: T) {
16109            self.network_address = Some(field.into().into());
16110        }
16111        ///Sets `network_address` with the provided value.
16112        pub fn with_network_address<T: Into<String>>(mut self, field: T) -> Self {
16113            self.set_network_address(field.into());
16114            self
16115        }
16116        ///If `p2p_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16117        pub fn p2p_address_opt_mut(&mut self) -> Option<&mut String> {
16118            self.p2p_address.as_mut().map(|field| field as _)
16119        }
16120        ///Returns a mutable reference to `p2p_address`.
16121        ///If the field is unset, it is first initialized with the default value.
16122        pub fn p2p_address_mut(&mut self) -> &mut String {
16123            self.p2p_address.get_or_insert_default()
16124        }
16125        ///If `p2p_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16126        pub fn p2p_address_opt(&self) -> Option<&str> {
16127            self.p2p_address.as_ref().map(|field| field as _)
16128        }
16129        ///Sets `p2p_address` with the provided value.
16130        pub fn set_p2p_address<T: Into<String>>(&mut self, field: T) {
16131            self.p2p_address = Some(field.into().into());
16132        }
16133        ///Sets `p2p_address` with the provided value.
16134        pub fn with_p2p_address<T: Into<String>>(mut self, field: T) -> Self {
16135            self.set_p2p_address(field.into());
16136            self
16137        }
16138        ///If `primary_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16139        pub fn primary_address_opt_mut(&mut self) -> Option<&mut String> {
16140            self.primary_address.as_mut().map(|field| field as _)
16141        }
16142        ///Returns a mutable reference to `primary_address`.
16143        ///If the field is unset, it is first initialized with the default value.
16144        pub fn primary_address_mut(&mut self) -> &mut String {
16145            self.primary_address.get_or_insert_default()
16146        }
16147        ///If `primary_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16148        pub fn primary_address_opt(&self) -> Option<&str> {
16149            self.primary_address.as_ref().map(|field| field as _)
16150        }
16151        ///Sets `primary_address` with the provided value.
16152        pub fn set_primary_address<T: Into<String>>(&mut self, field: T) {
16153            self.primary_address = Some(field.into().into());
16154        }
16155        ///Sets `primary_address` with the provided value.
16156        pub fn with_primary_address<T: Into<String>>(mut self, field: T) -> Self {
16157            self.set_primary_address(field.into());
16158            self
16159        }
16160        ///If `worker_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16161        pub fn worker_address_opt_mut(&mut self) -> Option<&mut String> {
16162            self.worker_address.as_mut().map(|field| field as _)
16163        }
16164        ///Returns a mutable reference to `worker_address`.
16165        ///If the field is unset, it is first initialized with the default value.
16166        pub fn worker_address_mut(&mut self) -> &mut String {
16167            self.worker_address.get_or_insert_default()
16168        }
16169        ///If `worker_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16170        pub fn worker_address_opt(&self) -> Option<&str> {
16171            self.worker_address.as_ref().map(|field| field as _)
16172        }
16173        ///Sets `worker_address` with the provided value.
16174        pub fn set_worker_address<T: Into<String>>(&mut self, field: T) {
16175            self.worker_address = Some(field.into().into());
16176        }
16177        ///Sets `worker_address` with the provided value.
16178        pub fn with_worker_address<T: Into<String>>(mut self, field: T) -> Self {
16179            self.set_worker_address(field.into());
16180            self
16181        }
16182        ///If `next_epoch_protocol_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
16183        pub fn next_epoch_protocol_public_key_opt(&self) -> Option<&[u8]> {
16184            self.next_epoch_protocol_public_key.as_ref().map(|field| field as _)
16185        }
16186        ///Sets `next_epoch_protocol_public_key` with the provided value.
16187        pub fn set_next_epoch_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
16188            &mut self,
16189            field: T,
16190        ) {
16191            self.next_epoch_protocol_public_key = Some(field.into().into());
16192        }
16193        ///Sets `next_epoch_protocol_public_key` with the provided value.
16194        pub fn with_next_epoch_protocol_public_key<T: Into<::prost::bytes::Bytes>>(
16195            mut self,
16196            field: T,
16197        ) -> Self {
16198            self.set_next_epoch_protocol_public_key(field.into());
16199            self
16200        }
16201        ///If `next_epoch_proof_of_possession` is set, returns [`Some`] with the value; otherwise returns [`None`].
16202        pub fn next_epoch_proof_of_possession_opt(&self) -> Option<&[u8]> {
16203            self.next_epoch_proof_of_possession.as_ref().map(|field| field as _)
16204        }
16205        ///Sets `next_epoch_proof_of_possession` with the provided value.
16206        pub fn set_next_epoch_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
16207            &mut self,
16208            field: T,
16209        ) {
16210            self.next_epoch_proof_of_possession = Some(field.into().into());
16211        }
16212        ///Sets `next_epoch_proof_of_possession` with the provided value.
16213        pub fn with_next_epoch_proof_of_possession<T: Into<::prost::bytes::Bytes>>(
16214            mut self,
16215            field: T,
16216        ) -> Self {
16217            self.set_next_epoch_proof_of_possession(field.into());
16218            self
16219        }
16220        ///If `next_epoch_network_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
16221        pub fn next_epoch_network_public_key_opt(&self) -> Option<&[u8]> {
16222            self.next_epoch_network_public_key.as_ref().map(|field| field as _)
16223        }
16224        ///Sets `next_epoch_network_public_key` with the provided value.
16225        pub fn set_next_epoch_network_public_key<T: Into<::prost::bytes::Bytes>>(
16226            &mut self,
16227            field: T,
16228        ) {
16229            self.next_epoch_network_public_key = Some(field.into().into());
16230        }
16231        ///Sets `next_epoch_network_public_key` with the provided value.
16232        pub fn with_next_epoch_network_public_key<T: Into<::prost::bytes::Bytes>>(
16233            mut self,
16234            field: T,
16235        ) -> Self {
16236            self.set_next_epoch_network_public_key(field.into());
16237            self
16238        }
16239        ///If `next_epoch_worker_public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
16240        pub fn next_epoch_worker_public_key_opt(&self) -> Option<&[u8]> {
16241            self.next_epoch_worker_public_key.as_ref().map(|field| field as _)
16242        }
16243        ///Sets `next_epoch_worker_public_key` with the provided value.
16244        pub fn set_next_epoch_worker_public_key<T: Into<::prost::bytes::Bytes>>(
16245            &mut self,
16246            field: T,
16247        ) {
16248            self.next_epoch_worker_public_key = Some(field.into().into());
16249        }
16250        ///Sets `next_epoch_worker_public_key` with the provided value.
16251        pub fn with_next_epoch_worker_public_key<T: Into<::prost::bytes::Bytes>>(
16252            mut self,
16253            field: T,
16254        ) -> Self {
16255            self.set_next_epoch_worker_public_key(field.into());
16256            self
16257        }
16258        ///If `next_epoch_network_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16259        pub fn next_epoch_network_address_opt_mut(&mut self) -> Option<&mut String> {
16260            self.next_epoch_network_address.as_mut().map(|field| field as _)
16261        }
16262        ///Returns a mutable reference to `next_epoch_network_address`.
16263        ///If the field is unset, it is first initialized with the default value.
16264        pub fn next_epoch_network_address_mut(&mut self) -> &mut String {
16265            self.next_epoch_network_address.get_or_insert_default()
16266        }
16267        ///If `next_epoch_network_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16268        pub fn next_epoch_network_address_opt(&self) -> Option<&str> {
16269            self.next_epoch_network_address.as_ref().map(|field| field as _)
16270        }
16271        ///Sets `next_epoch_network_address` with the provided value.
16272        pub fn set_next_epoch_network_address<T: Into<String>>(&mut self, field: T) {
16273            self.next_epoch_network_address = Some(field.into().into());
16274        }
16275        ///Sets `next_epoch_network_address` with the provided value.
16276        pub fn with_next_epoch_network_address<T: Into<String>>(
16277            mut self,
16278            field: T,
16279        ) -> Self {
16280            self.set_next_epoch_network_address(field.into());
16281            self
16282        }
16283        ///If `next_epoch_p2p_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16284        pub fn next_epoch_p2p_address_opt_mut(&mut self) -> Option<&mut String> {
16285            self.next_epoch_p2p_address.as_mut().map(|field| field as _)
16286        }
16287        ///Returns a mutable reference to `next_epoch_p2p_address`.
16288        ///If the field is unset, it is first initialized with the default value.
16289        pub fn next_epoch_p2p_address_mut(&mut self) -> &mut String {
16290            self.next_epoch_p2p_address.get_or_insert_default()
16291        }
16292        ///If `next_epoch_p2p_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16293        pub fn next_epoch_p2p_address_opt(&self) -> Option<&str> {
16294            self.next_epoch_p2p_address.as_ref().map(|field| field as _)
16295        }
16296        ///Sets `next_epoch_p2p_address` with the provided value.
16297        pub fn set_next_epoch_p2p_address<T: Into<String>>(&mut self, field: T) {
16298            self.next_epoch_p2p_address = Some(field.into().into());
16299        }
16300        ///Sets `next_epoch_p2p_address` with the provided value.
16301        pub fn with_next_epoch_p2p_address<T: Into<String>>(mut self, field: T) -> Self {
16302            self.set_next_epoch_p2p_address(field.into());
16303            self
16304        }
16305        ///If `next_epoch_primary_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16306        pub fn next_epoch_primary_address_opt_mut(&mut self) -> Option<&mut String> {
16307            self.next_epoch_primary_address.as_mut().map(|field| field as _)
16308        }
16309        ///Returns a mutable reference to `next_epoch_primary_address`.
16310        ///If the field is unset, it is first initialized with the default value.
16311        pub fn next_epoch_primary_address_mut(&mut self) -> &mut String {
16312            self.next_epoch_primary_address.get_or_insert_default()
16313        }
16314        ///If `next_epoch_primary_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16315        pub fn next_epoch_primary_address_opt(&self) -> Option<&str> {
16316            self.next_epoch_primary_address.as_ref().map(|field| field as _)
16317        }
16318        ///Sets `next_epoch_primary_address` with the provided value.
16319        pub fn set_next_epoch_primary_address<T: Into<String>>(&mut self, field: T) {
16320            self.next_epoch_primary_address = Some(field.into().into());
16321        }
16322        ///Sets `next_epoch_primary_address` with the provided value.
16323        pub fn with_next_epoch_primary_address<T: Into<String>>(
16324            mut self,
16325            field: T,
16326        ) -> Self {
16327            self.set_next_epoch_primary_address(field.into());
16328            self
16329        }
16330        ///If `next_epoch_worker_address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16331        pub fn next_epoch_worker_address_opt_mut(&mut self) -> Option<&mut String> {
16332            self.next_epoch_worker_address.as_mut().map(|field| field as _)
16333        }
16334        ///Returns a mutable reference to `next_epoch_worker_address`.
16335        ///If the field is unset, it is first initialized with the default value.
16336        pub fn next_epoch_worker_address_mut(&mut self) -> &mut String {
16337            self.next_epoch_worker_address.get_or_insert_default()
16338        }
16339        ///If `next_epoch_worker_address` is set, returns [`Some`] with the value; otherwise returns [`None`].
16340        pub fn next_epoch_worker_address_opt(&self) -> Option<&str> {
16341            self.next_epoch_worker_address.as_ref().map(|field| field as _)
16342        }
16343        ///Sets `next_epoch_worker_address` with the provided value.
16344        pub fn set_next_epoch_worker_address<T: Into<String>>(&mut self, field: T) {
16345            self.next_epoch_worker_address = Some(field.into().into());
16346        }
16347        ///Sets `next_epoch_worker_address` with the provided value.
16348        pub fn with_next_epoch_worker_address<T: Into<String>>(
16349            mut self,
16350            field: T,
16351        ) -> Self {
16352            self.set_next_epoch_worker_address(field.into());
16353            self
16354        }
16355        ///Returns the value of `metadata_extra_fields`, or the default value if `metadata_extra_fields` is unset.
16356        pub fn metadata_extra_fields(&self) -> &super::MoveTable {
16357            self.metadata_extra_fields
16358                .as_ref()
16359                .map(|field| field as _)
16360                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16361        }
16362        ///If `metadata_extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16363        pub fn metadata_extra_fields_opt_mut(
16364            &mut self,
16365        ) -> Option<&mut super::MoveTable> {
16366            self.metadata_extra_fields.as_mut().map(|field| field as _)
16367        }
16368        ///Returns a mutable reference to `metadata_extra_fields`.
16369        ///If the field is unset, it is first initialized with the default value.
16370        pub fn metadata_extra_fields_mut(&mut self) -> &mut super::MoveTable {
16371            self.metadata_extra_fields.get_or_insert_default()
16372        }
16373        ///If `metadata_extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
16374        pub fn metadata_extra_fields_opt(&self) -> Option<&super::MoveTable> {
16375            self.metadata_extra_fields.as_ref().map(|field| field as _)
16376        }
16377        ///Sets `metadata_extra_fields` with the provided value.
16378        pub fn set_metadata_extra_fields<T: Into<super::MoveTable>>(
16379            &mut self,
16380            field: T,
16381        ) {
16382            self.metadata_extra_fields = Some(field.into().into());
16383        }
16384        ///Sets `metadata_extra_fields` with the provided value.
16385        pub fn with_metadata_extra_fields<T: Into<super::MoveTable>>(
16386            mut self,
16387            field: T,
16388        ) -> Self {
16389            self.set_metadata_extra_fields(field.into());
16390            self
16391        }
16392        ///If `voting_power` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16393        pub fn voting_power_opt_mut(&mut self) -> Option<&mut u64> {
16394            self.voting_power.as_mut().map(|field| field as _)
16395        }
16396        ///Returns a mutable reference to `voting_power`.
16397        ///If the field is unset, it is first initialized with the default value.
16398        pub fn voting_power_mut(&mut self) -> &mut u64 {
16399            self.voting_power.get_or_insert_default()
16400        }
16401        ///If `voting_power` is set, returns [`Some`] with the value; otherwise returns [`None`].
16402        pub fn voting_power_opt(&self) -> Option<u64> {
16403            self.voting_power.as_ref().map(|field| *field)
16404        }
16405        ///Sets `voting_power` with the provided value.
16406        pub fn set_voting_power(&mut self, field: u64) {
16407            self.voting_power = Some(field);
16408        }
16409        ///Sets `voting_power` with the provided value.
16410        pub fn with_voting_power(mut self, field: u64) -> Self {
16411            self.set_voting_power(field);
16412            self
16413        }
16414        ///If `operation_cap_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16415        pub fn operation_cap_id_opt_mut(&mut self) -> Option<&mut String> {
16416            self.operation_cap_id.as_mut().map(|field| field as _)
16417        }
16418        ///Returns a mutable reference to `operation_cap_id`.
16419        ///If the field is unset, it is first initialized with the default value.
16420        pub fn operation_cap_id_mut(&mut self) -> &mut String {
16421            self.operation_cap_id.get_or_insert_default()
16422        }
16423        ///If `operation_cap_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
16424        pub fn operation_cap_id_opt(&self) -> Option<&str> {
16425            self.operation_cap_id.as_ref().map(|field| field as _)
16426        }
16427        ///Sets `operation_cap_id` with the provided value.
16428        pub fn set_operation_cap_id<T: Into<String>>(&mut self, field: T) {
16429            self.operation_cap_id = Some(field.into().into());
16430        }
16431        ///Sets `operation_cap_id` with the provided value.
16432        pub fn with_operation_cap_id<T: Into<String>>(mut self, field: T) -> Self {
16433            self.set_operation_cap_id(field.into());
16434            self
16435        }
16436        ///If `gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16437        pub fn gas_price_opt_mut(&mut self) -> Option<&mut u64> {
16438            self.gas_price.as_mut().map(|field| field as _)
16439        }
16440        ///Returns a mutable reference to `gas_price`.
16441        ///If the field is unset, it is first initialized with the default value.
16442        pub fn gas_price_mut(&mut self) -> &mut u64 {
16443            self.gas_price.get_or_insert_default()
16444        }
16445        ///If `gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
16446        pub fn gas_price_opt(&self) -> Option<u64> {
16447            self.gas_price.as_ref().map(|field| *field)
16448        }
16449        ///Sets `gas_price` with the provided value.
16450        pub fn set_gas_price(&mut self, field: u64) {
16451            self.gas_price = Some(field);
16452        }
16453        ///Sets `gas_price` with the provided value.
16454        pub fn with_gas_price(mut self, field: u64) -> Self {
16455            self.set_gas_price(field);
16456            self
16457        }
16458        ///Returns the value of `staking_pool`, or the default value if `staking_pool` is unset.
16459        pub fn staking_pool(&self) -> &super::StakingPool {
16460            self.staking_pool
16461                .as_ref()
16462                .map(|field| field as _)
16463                .unwrap_or_else(|| super::StakingPool::default_instance() as _)
16464        }
16465        ///If `staking_pool` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16466        pub fn staking_pool_opt_mut(&mut self) -> Option<&mut super::StakingPool> {
16467            self.staking_pool.as_mut().map(|field| field as _)
16468        }
16469        ///Returns a mutable reference to `staking_pool`.
16470        ///If the field is unset, it is first initialized with the default value.
16471        pub fn staking_pool_mut(&mut self) -> &mut super::StakingPool {
16472            self.staking_pool.get_or_insert_default()
16473        }
16474        ///If `staking_pool` is set, returns [`Some`] with the value; otherwise returns [`None`].
16475        pub fn staking_pool_opt(&self) -> Option<&super::StakingPool> {
16476            self.staking_pool.as_ref().map(|field| field as _)
16477        }
16478        ///Sets `staking_pool` with the provided value.
16479        pub fn set_staking_pool<T: Into<super::StakingPool>>(&mut self, field: T) {
16480            self.staking_pool = Some(field.into().into());
16481        }
16482        ///Sets `staking_pool` with the provided value.
16483        pub fn with_staking_pool<T: Into<super::StakingPool>>(
16484            mut self,
16485            field: T,
16486        ) -> Self {
16487            self.set_staking_pool(field.into());
16488            self
16489        }
16490        ///If `commission_rate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16491        pub fn commission_rate_opt_mut(&mut self) -> Option<&mut u64> {
16492            self.commission_rate.as_mut().map(|field| field as _)
16493        }
16494        ///Returns a mutable reference to `commission_rate`.
16495        ///If the field is unset, it is first initialized with the default value.
16496        pub fn commission_rate_mut(&mut self) -> &mut u64 {
16497            self.commission_rate.get_or_insert_default()
16498        }
16499        ///If `commission_rate` is set, returns [`Some`] with the value; otherwise returns [`None`].
16500        pub fn commission_rate_opt(&self) -> Option<u64> {
16501            self.commission_rate.as_ref().map(|field| *field)
16502        }
16503        ///Sets `commission_rate` with the provided value.
16504        pub fn set_commission_rate(&mut self, field: u64) {
16505            self.commission_rate = Some(field);
16506        }
16507        ///Sets `commission_rate` with the provided value.
16508        pub fn with_commission_rate(mut self, field: u64) -> Self {
16509            self.set_commission_rate(field);
16510            self
16511        }
16512        ///If `next_epoch_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16513        pub fn next_epoch_stake_opt_mut(&mut self) -> Option<&mut u64> {
16514            self.next_epoch_stake.as_mut().map(|field| field as _)
16515        }
16516        ///Returns a mutable reference to `next_epoch_stake`.
16517        ///If the field is unset, it is first initialized with the default value.
16518        pub fn next_epoch_stake_mut(&mut self) -> &mut u64 {
16519            self.next_epoch_stake.get_or_insert_default()
16520        }
16521        ///If `next_epoch_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
16522        pub fn next_epoch_stake_opt(&self) -> Option<u64> {
16523            self.next_epoch_stake.as_ref().map(|field| *field)
16524        }
16525        ///Sets `next_epoch_stake` with the provided value.
16526        pub fn set_next_epoch_stake(&mut self, field: u64) {
16527            self.next_epoch_stake = Some(field);
16528        }
16529        ///Sets `next_epoch_stake` with the provided value.
16530        pub fn with_next_epoch_stake(mut self, field: u64) -> Self {
16531            self.set_next_epoch_stake(field);
16532            self
16533        }
16534        ///If `next_epoch_gas_price` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16535        pub fn next_epoch_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
16536            self.next_epoch_gas_price.as_mut().map(|field| field as _)
16537        }
16538        ///Returns a mutable reference to `next_epoch_gas_price`.
16539        ///If the field is unset, it is first initialized with the default value.
16540        pub fn next_epoch_gas_price_mut(&mut self) -> &mut u64 {
16541            self.next_epoch_gas_price.get_or_insert_default()
16542        }
16543        ///If `next_epoch_gas_price` is set, returns [`Some`] with the value; otherwise returns [`None`].
16544        pub fn next_epoch_gas_price_opt(&self) -> Option<u64> {
16545            self.next_epoch_gas_price.as_ref().map(|field| *field)
16546        }
16547        ///Sets `next_epoch_gas_price` with the provided value.
16548        pub fn set_next_epoch_gas_price(&mut self, field: u64) {
16549            self.next_epoch_gas_price = Some(field);
16550        }
16551        ///Sets `next_epoch_gas_price` with the provided value.
16552        pub fn with_next_epoch_gas_price(mut self, field: u64) -> Self {
16553            self.set_next_epoch_gas_price(field);
16554            self
16555        }
16556        ///If `next_epoch_commission_rate` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16557        pub fn next_epoch_commission_rate_opt_mut(&mut self) -> Option<&mut u64> {
16558            self.next_epoch_commission_rate.as_mut().map(|field| field as _)
16559        }
16560        ///Returns a mutable reference to `next_epoch_commission_rate`.
16561        ///If the field is unset, it is first initialized with the default value.
16562        pub fn next_epoch_commission_rate_mut(&mut self) -> &mut u64 {
16563            self.next_epoch_commission_rate.get_or_insert_default()
16564        }
16565        ///If `next_epoch_commission_rate` is set, returns [`Some`] with the value; otherwise returns [`None`].
16566        pub fn next_epoch_commission_rate_opt(&self) -> Option<u64> {
16567            self.next_epoch_commission_rate.as_ref().map(|field| *field)
16568        }
16569        ///Sets `next_epoch_commission_rate` with the provided value.
16570        pub fn set_next_epoch_commission_rate(&mut self, field: u64) {
16571            self.next_epoch_commission_rate = Some(field);
16572        }
16573        ///Sets `next_epoch_commission_rate` with the provided value.
16574        pub fn with_next_epoch_commission_rate(mut self, field: u64) -> Self {
16575            self.set_next_epoch_commission_rate(field);
16576            self
16577        }
16578        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
16579        pub fn extra_fields(&self) -> &super::MoveTable {
16580            self.extra_fields
16581                .as_ref()
16582                .map(|field| field as _)
16583                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16584        }
16585        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16586        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
16587            self.extra_fields.as_mut().map(|field| field as _)
16588        }
16589        ///Returns a mutable reference to `extra_fields`.
16590        ///If the field is unset, it is first initialized with the default value.
16591        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
16592            self.extra_fields.get_or_insert_default()
16593        }
16594        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
16595        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
16596            self.extra_fields.as_ref().map(|field| field as _)
16597        }
16598        ///Sets `extra_fields` with the provided value.
16599        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
16600            self.extra_fields = Some(field.into().into());
16601        }
16602        ///Sets `extra_fields` with the provided value.
16603        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
16604            self.set_extra_fields(field.into());
16605            self
16606        }
16607    }
16608    impl super::ValidatorAggregatedSignature {
16609        pub const fn const_default() -> Self {
16610            Self {
16611                epoch: None,
16612                signature: None,
16613                bitmap: None,
16614            }
16615        }
16616        #[doc(hidden)]
16617        pub fn default_instance() -> &'static Self {
16618            static DEFAULT: super::ValidatorAggregatedSignature = super::ValidatorAggregatedSignature::const_default();
16619            &DEFAULT
16620        }
16621        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16622        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
16623            self.epoch.as_mut().map(|field| field as _)
16624        }
16625        ///Returns a mutable reference to `epoch`.
16626        ///If the field is unset, it is first initialized with the default value.
16627        pub fn epoch_mut(&mut self) -> &mut u64 {
16628            self.epoch.get_or_insert_default()
16629        }
16630        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
16631        pub fn epoch_opt(&self) -> Option<u64> {
16632            self.epoch.as_ref().map(|field| *field)
16633        }
16634        ///Sets `epoch` with the provided value.
16635        pub fn set_epoch(&mut self, field: u64) {
16636            self.epoch = Some(field);
16637        }
16638        ///Sets `epoch` with the provided value.
16639        pub fn with_epoch(mut self, field: u64) -> Self {
16640            self.set_epoch(field);
16641            self
16642        }
16643        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
16644        pub fn signature_opt(&self) -> Option<&[u8]> {
16645            self.signature.as_ref().map(|field| field as _)
16646        }
16647        ///Sets `signature` with the provided value.
16648        pub fn set_signature<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16649            self.signature = Some(field.into().into());
16650        }
16651        ///Sets `signature` with the provided value.
16652        pub fn with_signature<T: Into<::prost::bytes::Bytes>>(
16653            mut self,
16654            field: T,
16655        ) -> Self {
16656            self.set_signature(field.into());
16657            self
16658        }
16659        ///If `bitmap` is set, returns [`Some`] with the value; otherwise returns [`None`].
16660        pub fn bitmap_opt(&self) -> Option<&[u8]> {
16661            self.bitmap.as_ref().map(|field| field as _)
16662        }
16663        ///Sets `bitmap` with the provided value.
16664        pub fn set_bitmap<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16665            self.bitmap = Some(field.into().into());
16666        }
16667        ///Sets `bitmap` with the provided value.
16668        pub fn with_bitmap<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
16669            self.set_bitmap(field.into());
16670            self
16671        }
16672    }
16673    impl super::ValidatorCommittee {
16674        pub const fn const_default() -> Self {
16675            Self {
16676                epoch: None,
16677                members: Vec::new(),
16678            }
16679        }
16680        #[doc(hidden)]
16681        pub fn default_instance() -> &'static Self {
16682            static DEFAULT: super::ValidatorCommittee = super::ValidatorCommittee::const_default();
16683            &DEFAULT
16684        }
16685        ///If `epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16686        pub fn epoch_opt_mut(&mut self) -> Option<&mut u64> {
16687            self.epoch.as_mut().map(|field| field as _)
16688        }
16689        ///Returns a mutable reference to `epoch`.
16690        ///If the field is unset, it is first initialized with the default value.
16691        pub fn epoch_mut(&mut self) -> &mut u64 {
16692            self.epoch.get_or_insert_default()
16693        }
16694        ///If `epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
16695        pub fn epoch_opt(&self) -> Option<u64> {
16696            self.epoch.as_ref().map(|field| *field)
16697        }
16698        ///Sets `epoch` with the provided value.
16699        pub fn set_epoch(&mut self, field: u64) {
16700            self.epoch = Some(field);
16701        }
16702        ///Sets `epoch` with the provided value.
16703        pub fn with_epoch(mut self, field: u64) -> Self {
16704            self.set_epoch(field);
16705            self
16706        }
16707        ///Returns the value of `members`, or the default value if `members` is unset.
16708        pub fn members(&self) -> &[super::ValidatorCommitteeMember] {
16709            &self.members
16710        }
16711        ///Returns a mutable reference to `members`.
16712        ///If the field is unset, it is first initialized with the default value.
16713        pub fn members_mut(&mut self) -> &mut Vec<super::ValidatorCommitteeMember> {
16714            &mut self.members
16715        }
16716        ///Sets `members` with the provided value.
16717        pub fn set_members(&mut self, field: Vec<super::ValidatorCommitteeMember>) {
16718            self.members = field;
16719        }
16720        ///Sets `members` with the provided value.
16721        pub fn with_members(
16722            mut self,
16723            field: Vec<super::ValidatorCommitteeMember>,
16724        ) -> Self {
16725            self.set_members(field);
16726            self
16727        }
16728    }
16729    impl super::ValidatorCommitteeMember {
16730        pub const fn const_default() -> Self {
16731            Self {
16732                public_key: None,
16733                weight: None,
16734            }
16735        }
16736        #[doc(hidden)]
16737        pub fn default_instance() -> &'static Self {
16738            static DEFAULT: super::ValidatorCommitteeMember = super::ValidatorCommitteeMember::const_default();
16739            &DEFAULT
16740        }
16741        ///If `public_key` is set, returns [`Some`] with the value; otherwise returns [`None`].
16742        pub fn public_key_opt(&self) -> Option<&[u8]> {
16743            self.public_key.as_ref().map(|field| field as _)
16744        }
16745        ///Sets `public_key` with the provided value.
16746        pub fn set_public_key<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16747            self.public_key = Some(field.into().into());
16748        }
16749        ///Sets `public_key` with the provided value.
16750        pub fn with_public_key<T: Into<::prost::bytes::Bytes>>(
16751            mut self,
16752            field: T,
16753        ) -> Self {
16754            self.set_public_key(field.into());
16755            self
16756        }
16757        ///If `weight` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16758        pub fn weight_opt_mut(&mut self) -> Option<&mut u64> {
16759            self.weight.as_mut().map(|field| field as _)
16760        }
16761        ///Returns a mutable reference to `weight`.
16762        ///If the field is unset, it is first initialized with the default value.
16763        pub fn weight_mut(&mut self) -> &mut u64 {
16764            self.weight.get_or_insert_default()
16765        }
16766        ///If `weight` is set, returns [`Some`] with the value; otherwise returns [`None`].
16767        pub fn weight_opt(&self) -> Option<u64> {
16768            self.weight.as_ref().map(|field| *field)
16769        }
16770        ///Sets `weight` with the provided value.
16771        pub fn set_weight(&mut self, field: u64) {
16772            self.weight = Some(field);
16773        }
16774        ///Sets `weight` with the provided value.
16775        pub fn with_weight(mut self, field: u64) -> Self {
16776            self.set_weight(field);
16777            self
16778        }
16779    }
16780    impl super::ValidatorExecutionTimeObservation {
16781        pub const fn const_default() -> Self {
16782            Self {
16783                validator: None,
16784                duration: None,
16785            }
16786        }
16787        #[doc(hidden)]
16788        pub fn default_instance() -> &'static Self {
16789            static DEFAULT: super::ValidatorExecutionTimeObservation = super::ValidatorExecutionTimeObservation::const_default();
16790            &DEFAULT
16791        }
16792        ///If `validator` is set, returns [`Some`] with the value; otherwise returns [`None`].
16793        pub fn validator_opt(&self) -> Option<&[u8]> {
16794            self.validator.as_ref().map(|field| field as _)
16795        }
16796        ///Sets `validator` with the provided value.
16797        pub fn set_validator<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
16798            self.validator = Some(field.into().into());
16799        }
16800        ///Sets `validator` with the provided value.
16801        pub fn with_validator<T: Into<::prost::bytes::Bytes>>(
16802            mut self,
16803            field: T,
16804        ) -> Self {
16805            self.set_validator(field.into());
16806            self
16807        }
16808        ///If `duration` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16809        pub fn duration_opt_mut(&mut self) -> Option<&mut ::prost_types::Duration> {
16810            self.duration.as_mut().map(|field| field as _)
16811        }
16812        ///Returns a mutable reference to `duration`.
16813        ///If the field is unset, it is first initialized with the default value.
16814        pub fn duration_mut(&mut self) -> &mut ::prost_types::Duration {
16815            self.duration.get_or_insert_default()
16816        }
16817        ///If `duration` is set, returns [`Some`] with the value; otherwise returns [`None`].
16818        pub fn duration_opt(&self) -> Option<&::prost_types::Duration> {
16819            self.duration.as_ref().map(|field| field as _)
16820        }
16821        ///Sets `duration` with the provided value.
16822        pub fn set_duration<T: Into<::prost_types::Duration>>(&mut self, field: T) {
16823            self.duration = Some(field.into().into());
16824        }
16825        ///Sets `duration` with the provided value.
16826        pub fn with_duration<T: Into<::prost_types::Duration>>(
16827            mut self,
16828            field: T,
16829        ) -> Self {
16830            self.set_duration(field.into());
16831            self
16832        }
16833    }
16834    impl super::ValidatorReportRecord {
16835        pub const fn const_default() -> Self {
16836            Self {
16837                reported: None,
16838                reporters: Vec::new(),
16839            }
16840        }
16841        #[doc(hidden)]
16842        pub fn default_instance() -> &'static Self {
16843            static DEFAULT: super::ValidatorReportRecord = super::ValidatorReportRecord::const_default();
16844            &DEFAULT
16845        }
16846        ///If `reported` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16847        pub fn reported_opt_mut(&mut self) -> Option<&mut String> {
16848            self.reported.as_mut().map(|field| field as _)
16849        }
16850        ///Returns a mutable reference to `reported`.
16851        ///If the field is unset, it is first initialized with the default value.
16852        pub fn reported_mut(&mut self) -> &mut String {
16853            self.reported.get_or_insert_default()
16854        }
16855        ///If `reported` is set, returns [`Some`] with the value; otherwise returns [`None`].
16856        pub fn reported_opt(&self) -> Option<&str> {
16857            self.reported.as_ref().map(|field| field as _)
16858        }
16859        ///Sets `reported` with the provided value.
16860        pub fn set_reported<T: Into<String>>(&mut self, field: T) {
16861            self.reported = Some(field.into().into());
16862        }
16863        ///Sets `reported` with the provided value.
16864        pub fn with_reported<T: Into<String>>(mut self, field: T) -> Self {
16865            self.set_reported(field.into());
16866            self
16867        }
16868        ///Returns the value of `reporters`, or the default value if `reporters` is unset.
16869        pub fn reporters(&self) -> &[String] {
16870            &self.reporters
16871        }
16872        ///Returns a mutable reference to `reporters`.
16873        ///If the field is unset, it is first initialized with the default value.
16874        pub fn reporters_mut(&mut self) -> &mut Vec<String> {
16875            &mut self.reporters
16876        }
16877        ///Sets `reporters` with the provided value.
16878        pub fn set_reporters(&mut self, field: Vec<String>) {
16879            self.reporters = field;
16880        }
16881        ///Sets `reporters` with the provided value.
16882        pub fn with_reporters(mut self, field: Vec<String>) -> Self {
16883            self.set_reporters(field);
16884            self
16885        }
16886    }
16887    impl super::ValidatorSet {
16888        pub const fn const_default() -> Self {
16889            Self {
16890                total_stake: None,
16891                active_validators: Vec::new(),
16892                pending_active_validators: None,
16893                pending_removals: Vec::new(),
16894                staking_pool_mappings: None,
16895                inactive_validators: None,
16896                validator_candidates: None,
16897                at_risk_validators: std::collections::BTreeMap::new(),
16898                extra_fields: None,
16899            }
16900        }
16901        #[doc(hidden)]
16902        pub fn default_instance() -> &'static Self {
16903            static DEFAULT: super::ValidatorSet = super::ValidatorSet::const_default();
16904            &DEFAULT
16905        }
16906        ///If `total_stake` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16907        pub fn total_stake_opt_mut(&mut self) -> Option<&mut u64> {
16908            self.total_stake.as_mut().map(|field| field as _)
16909        }
16910        ///Returns a mutable reference to `total_stake`.
16911        ///If the field is unset, it is first initialized with the default value.
16912        pub fn total_stake_mut(&mut self) -> &mut u64 {
16913            self.total_stake.get_or_insert_default()
16914        }
16915        ///If `total_stake` is set, returns [`Some`] with the value; otherwise returns [`None`].
16916        pub fn total_stake_opt(&self) -> Option<u64> {
16917            self.total_stake.as_ref().map(|field| *field)
16918        }
16919        ///Sets `total_stake` with the provided value.
16920        pub fn set_total_stake(&mut self, field: u64) {
16921            self.total_stake = Some(field);
16922        }
16923        ///Sets `total_stake` with the provided value.
16924        pub fn with_total_stake(mut self, field: u64) -> Self {
16925            self.set_total_stake(field);
16926            self
16927        }
16928        ///Returns the value of `active_validators`, or the default value if `active_validators` is unset.
16929        pub fn active_validators(&self) -> &[super::Validator] {
16930            &self.active_validators
16931        }
16932        ///Returns a mutable reference to `active_validators`.
16933        ///If the field is unset, it is first initialized with the default value.
16934        pub fn active_validators_mut(&mut self) -> &mut Vec<super::Validator> {
16935            &mut self.active_validators
16936        }
16937        ///Sets `active_validators` with the provided value.
16938        pub fn set_active_validators(&mut self, field: Vec<super::Validator>) {
16939            self.active_validators = field;
16940        }
16941        ///Sets `active_validators` with the provided value.
16942        pub fn with_active_validators(mut self, field: Vec<super::Validator>) -> Self {
16943            self.set_active_validators(field);
16944            self
16945        }
16946        ///Returns the value of `pending_active_validators`, or the default value if `pending_active_validators` is unset.
16947        pub fn pending_active_validators(&self) -> &super::MoveTable {
16948            self.pending_active_validators
16949                .as_ref()
16950                .map(|field| field as _)
16951                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
16952        }
16953        ///If `pending_active_validators` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
16954        pub fn pending_active_validators_opt_mut(
16955            &mut self,
16956        ) -> Option<&mut super::MoveTable> {
16957            self.pending_active_validators.as_mut().map(|field| field as _)
16958        }
16959        ///Returns a mutable reference to `pending_active_validators`.
16960        ///If the field is unset, it is first initialized with the default value.
16961        pub fn pending_active_validators_mut(&mut self) -> &mut super::MoveTable {
16962            self.pending_active_validators.get_or_insert_default()
16963        }
16964        ///If `pending_active_validators` is set, returns [`Some`] with the value; otherwise returns [`None`].
16965        pub fn pending_active_validators_opt(&self) -> Option<&super::MoveTable> {
16966            self.pending_active_validators.as_ref().map(|field| field as _)
16967        }
16968        ///Sets `pending_active_validators` with the provided value.
16969        pub fn set_pending_active_validators<T: Into<super::MoveTable>>(
16970            &mut self,
16971            field: T,
16972        ) {
16973            self.pending_active_validators = Some(field.into().into());
16974        }
16975        ///Sets `pending_active_validators` with the provided value.
16976        pub fn with_pending_active_validators<T: Into<super::MoveTable>>(
16977            mut self,
16978            field: T,
16979        ) -> Self {
16980            self.set_pending_active_validators(field.into());
16981            self
16982        }
16983        ///Returns the value of `pending_removals`, or the default value if `pending_removals` is unset.
16984        pub fn pending_removals(&self) -> &[u64] {
16985            &self.pending_removals
16986        }
16987        ///Returns a mutable reference to `pending_removals`.
16988        ///If the field is unset, it is first initialized with the default value.
16989        pub fn pending_removals_mut(&mut self) -> &mut Vec<u64> {
16990            &mut self.pending_removals
16991        }
16992        ///Sets `pending_removals` with the provided value.
16993        pub fn set_pending_removals(&mut self, field: Vec<u64>) {
16994            self.pending_removals = field;
16995        }
16996        ///Sets `pending_removals` with the provided value.
16997        pub fn with_pending_removals(mut self, field: Vec<u64>) -> Self {
16998            self.set_pending_removals(field);
16999            self
17000        }
17001        ///Returns the value of `staking_pool_mappings`, or the default value if `staking_pool_mappings` is unset.
17002        pub fn staking_pool_mappings(&self) -> &super::MoveTable {
17003            self.staking_pool_mappings
17004                .as_ref()
17005                .map(|field| field as _)
17006                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17007        }
17008        ///If `staking_pool_mappings` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17009        pub fn staking_pool_mappings_opt_mut(
17010            &mut self,
17011        ) -> Option<&mut super::MoveTable> {
17012            self.staking_pool_mappings.as_mut().map(|field| field as _)
17013        }
17014        ///Returns a mutable reference to `staking_pool_mappings`.
17015        ///If the field is unset, it is first initialized with the default value.
17016        pub fn staking_pool_mappings_mut(&mut self) -> &mut super::MoveTable {
17017            self.staking_pool_mappings.get_or_insert_default()
17018        }
17019        ///If `staking_pool_mappings` is set, returns [`Some`] with the value; otherwise returns [`None`].
17020        pub fn staking_pool_mappings_opt(&self) -> Option<&super::MoveTable> {
17021            self.staking_pool_mappings.as_ref().map(|field| field as _)
17022        }
17023        ///Sets `staking_pool_mappings` with the provided value.
17024        pub fn set_staking_pool_mappings<T: Into<super::MoveTable>>(
17025            &mut self,
17026            field: T,
17027        ) {
17028            self.staking_pool_mappings = Some(field.into().into());
17029        }
17030        ///Sets `staking_pool_mappings` with the provided value.
17031        pub fn with_staking_pool_mappings<T: Into<super::MoveTable>>(
17032            mut self,
17033            field: T,
17034        ) -> Self {
17035            self.set_staking_pool_mappings(field.into());
17036            self
17037        }
17038        ///Returns the value of `inactive_validators`, or the default value if `inactive_validators` is unset.
17039        pub fn inactive_validators(&self) -> &super::MoveTable {
17040            self.inactive_validators
17041                .as_ref()
17042                .map(|field| field as _)
17043                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17044        }
17045        ///If `inactive_validators` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17046        pub fn inactive_validators_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
17047            self.inactive_validators.as_mut().map(|field| field as _)
17048        }
17049        ///Returns a mutable reference to `inactive_validators`.
17050        ///If the field is unset, it is first initialized with the default value.
17051        pub fn inactive_validators_mut(&mut self) -> &mut super::MoveTable {
17052            self.inactive_validators.get_or_insert_default()
17053        }
17054        ///If `inactive_validators` is set, returns [`Some`] with the value; otherwise returns [`None`].
17055        pub fn inactive_validators_opt(&self) -> Option<&super::MoveTable> {
17056            self.inactive_validators.as_ref().map(|field| field as _)
17057        }
17058        ///Sets `inactive_validators` with the provided value.
17059        pub fn set_inactive_validators<T: Into<super::MoveTable>>(&mut self, field: T) {
17060            self.inactive_validators = Some(field.into().into());
17061        }
17062        ///Sets `inactive_validators` with the provided value.
17063        pub fn with_inactive_validators<T: Into<super::MoveTable>>(
17064            mut self,
17065            field: T,
17066        ) -> Self {
17067            self.set_inactive_validators(field.into());
17068            self
17069        }
17070        ///Returns the value of `validator_candidates`, or the default value if `validator_candidates` is unset.
17071        pub fn validator_candidates(&self) -> &super::MoveTable {
17072            self.validator_candidates
17073                .as_ref()
17074                .map(|field| field as _)
17075                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17076        }
17077        ///If `validator_candidates` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17078        pub fn validator_candidates_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
17079            self.validator_candidates.as_mut().map(|field| field as _)
17080        }
17081        ///Returns a mutable reference to `validator_candidates`.
17082        ///If the field is unset, it is first initialized with the default value.
17083        pub fn validator_candidates_mut(&mut self) -> &mut super::MoveTable {
17084            self.validator_candidates.get_or_insert_default()
17085        }
17086        ///If `validator_candidates` is set, returns [`Some`] with the value; otherwise returns [`None`].
17087        pub fn validator_candidates_opt(&self) -> Option<&super::MoveTable> {
17088            self.validator_candidates.as_ref().map(|field| field as _)
17089        }
17090        ///Sets `validator_candidates` with the provided value.
17091        pub fn set_validator_candidates<T: Into<super::MoveTable>>(&mut self, field: T) {
17092            self.validator_candidates = Some(field.into().into());
17093        }
17094        ///Sets `validator_candidates` with the provided value.
17095        pub fn with_validator_candidates<T: Into<super::MoveTable>>(
17096            mut self,
17097            field: T,
17098        ) -> Self {
17099            self.set_validator_candidates(field.into());
17100            self
17101        }
17102        ///Returns the value of `at_risk_validators`, or the default value if `at_risk_validators` is unset.
17103        pub fn at_risk_validators(&self) -> &::std::collections::BTreeMap<String, u64> {
17104            &self.at_risk_validators
17105        }
17106        ///Returns a mutable reference to `at_risk_validators`.
17107        ///If the field is unset, it is first initialized with the default value.
17108        pub fn at_risk_validators_mut(
17109            &mut self,
17110        ) -> &mut ::std::collections::BTreeMap<String, u64> {
17111            &mut self.at_risk_validators
17112        }
17113        ///Sets `at_risk_validators` with the provided value.
17114        pub fn set_at_risk_validators(
17115            &mut self,
17116            field: ::std::collections::BTreeMap<String, u64>,
17117        ) {
17118            self.at_risk_validators = field;
17119        }
17120        ///Sets `at_risk_validators` with the provided value.
17121        pub fn with_at_risk_validators(
17122            mut self,
17123            field: ::std::collections::BTreeMap<String, u64>,
17124        ) -> Self {
17125            self.set_at_risk_validators(field);
17126            self
17127        }
17128        ///Returns the value of `extra_fields`, or the default value if `extra_fields` is unset.
17129        pub fn extra_fields(&self) -> &super::MoveTable {
17130            self.extra_fields
17131                .as_ref()
17132                .map(|field| field as _)
17133                .unwrap_or_else(|| super::MoveTable::default_instance() as _)
17134        }
17135        ///If `extra_fields` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17136        pub fn extra_fields_opt_mut(&mut self) -> Option<&mut super::MoveTable> {
17137            self.extra_fields.as_mut().map(|field| field as _)
17138        }
17139        ///Returns a mutable reference to `extra_fields`.
17140        ///If the field is unset, it is first initialized with the default value.
17141        pub fn extra_fields_mut(&mut self) -> &mut super::MoveTable {
17142            self.extra_fields.get_or_insert_default()
17143        }
17144        ///If `extra_fields` is set, returns [`Some`] with the value; otherwise returns [`None`].
17145        pub fn extra_fields_opt(&self) -> Option<&super::MoveTable> {
17146            self.extra_fields.as_ref().map(|field| field as _)
17147        }
17148        ///Sets `extra_fields` with the provided value.
17149        pub fn set_extra_fields<T: Into<super::MoveTable>>(&mut self, field: T) {
17150            self.extra_fields = Some(field.into().into());
17151        }
17152        ///Sets `extra_fields` with the provided value.
17153        pub fn with_extra_fields<T: Into<super::MoveTable>>(mut self, field: T) -> Self {
17154            self.set_extra_fields(field.into());
17155            self
17156        }
17157    }
17158    impl super::VariantDescriptor {
17159        pub const fn const_default() -> Self {
17160            Self {
17161                name: None,
17162                position: None,
17163                fields: Vec::new(),
17164            }
17165        }
17166        #[doc(hidden)]
17167        pub fn default_instance() -> &'static Self {
17168            static DEFAULT: super::VariantDescriptor = super::VariantDescriptor::const_default();
17169            &DEFAULT
17170        }
17171        ///If `name` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17172        pub fn name_opt_mut(&mut self) -> Option<&mut String> {
17173            self.name.as_mut().map(|field| field as _)
17174        }
17175        ///Returns a mutable reference to `name`.
17176        ///If the field is unset, it is first initialized with the default value.
17177        pub fn name_mut(&mut self) -> &mut String {
17178            self.name.get_or_insert_default()
17179        }
17180        ///If `name` is set, returns [`Some`] with the value; otherwise returns [`None`].
17181        pub fn name_opt(&self) -> Option<&str> {
17182            self.name.as_ref().map(|field| field as _)
17183        }
17184        ///Sets `name` with the provided value.
17185        pub fn set_name<T: Into<String>>(&mut self, field: T) {
17186            self.name = Some(field.into().into());
17187        }
17188        ///Sets `name` with the provided value.
17189        pub fn with_name<T: Into<String>>(mut self, field: T) -> Self {
17190            self.set_name(field.into());
17191            self
17192        }
17193        ///If `position` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17194        pub fn position_opt_mut(&mut self) -> Option<&mut u32> {
17195            self.position.as_mut().map(|field| field as _)
17196        }
17197        ///Returns a mutable reference to `position`.
17198        ///If the field is unset, it is first initialized with the default value.
17199        pub fn position_mut(&mut self) -> &mut u32 {
17200            self.position.get_or_insert_default()
17201        }
17202        ///If `position` is set, returns [`Some`] with the value; otherwise returns [`None`].
17203        pub fn position_opt(&self) -> Option<u32> {
17204            self.position.as_ref().map(|field| *field)
17205        }
17206        ///Sets `position` with the provided value.
17207        pub fn set_position(&mut self, field: u32) {
17208            self.position = Some(field);
17209        }
17210        ///Sets `position` with the provided value.
17211        pub fn with_position(mut self, field: u32) -> Self {
17212            self.set_position(field);
17213            self
17214        }
17215        ///Returns the value of `fields`, or the default value if `fields` is unset.
17216        pub fn fields(&self) -> &[super::FieldDescriptor] {
17217            &self.fields
17218        }
17219        ///Returns a mutable reference to `fields`.
17220        ///If the field is unset, it is first initialized with the default value.
17221        pub fn fields_mut(&mut self) -> &mut Vec<super::FieldDescriptor> {
17222            &mut self.fields
17223        }
17224        ///Sets `fields` with the provided value.
17225        pub fn set_fields(&mut self, field: Vec<super::FieldDescriptor>) {
17226            self.fields = field;
17227        }
17228        ///Sets `fields` with the provided value.
17229        pub fn with_fields(mut self, field: Vec<super::FieldDescriptor>) -> Self {
17230            self.set_fields(field);
17231            self
17232        }
17233    }
17234    impl super::VerifySignatureRequest {
17235        pub const fn const_default() -> Self {
17236            Self {
17237                message: None,
17238                signature: None,
17239                address: None,
17240                jwks: Vec::new(),
17241            }
17242        }
17243        #[doc(hidden)]
17244        pub fn default_instance() -> &'static Self {
17245            static DEFAULT: super::VerifySignatureRequest = super::VerifySignatureRequest::const_default();
17246            &DEFAULT
17247        }
17248        ///Returns the value of `message`, or the default value if `message` is unset.
17249        pub fn message(&self) -> &super::Bcs {
17250            self.message
17251                .as_ref()
17252                .map(|field| field as _)
17253                .unwrap_or_else(|| super::Bcs::default_instance() as _)
17254        }
17255        ///If `message` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17256        pub fn message_opt_mut(&mut self) -> Option<&mut super::Bcs> {
17257            self.message.as_mut().map(|field| field as _)
17258        }
17259        ///Returns a mutable reference to `message`.
17260        ///If the field is unset, it is first initialized with the default value.
17261        pub fn message_mut(&mut self) -> &mut super::Bcs {
17262            self.message.get_or_insert_default()
17263        }
17264        ///If `message` is set, returns [`Some`] with the value; otherwise returns [`None`].
17265        pub fn message_opt(&self) -> Option<&super::Bcs> {
17266            self.message.as_ref().map(|field| field as _)
17267        }
17268        ///Sets `message` with the provided value.
17269        pub fn set_message<T: Into<super::Bcs>>(&mut self, field: T) {
17270            self.message = Some(field.into().into());
17271        }
17272        ///Sets `message` with the provided value.
17273        pub fn with_message<T: Into<super::Bcs>>(mut self, field: T) -> Self {
17274            self.set_message(field.into());
17275            self
17276        }
17277        ///Returns the value of `signature`, or the default value if `signature` is unset.
17278        pub fn signature(&self) -> &super::UserSignature {
17279            self.signature
17280                .as_ref()
17281                .map(|field| field as _)
17282                .unwrap_or_else(|| super::UserSignature::default_instance() as _)
17283        }
17284        ///If `signature` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17285        pub fn signature_opt_mut(&mut self) -> Option<&mut super::UserSignature> {
17286            self.signature.as_mut().map(|field| field as _)
17287        }
17288        ///Returns a mutable reference to `signature`.
17289        ///If the field is unset, it is first initialized with the default value.
17290        pub fn signature_mut(&mut self) -> &mut super::UserSignature {
17291            self.signature.get_or_insert_default()
17292        }
17293        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
17294        pub fn signature_opt(&self) -> Option<&super::UserSignature> {
17295            self.signature.as_ref().map(|field| field as _)
17296        }
17297        ///Sets `signature` with the provided value.
17298        pub fn set_signature<T: Into<super::UserSignature>>(&mut self, field: T) {
17299            self.signature = Some(field.into().into());
17300        }
17301        ///Sets `signature` with the provided value.
17302        pub fn with_signature<T: Into<super::UserSignature>>(
17303            mut self,
17304            field: T,
17305        ) -> Self {
17306            self.set_signature(field.into());
17307            self
17308        }
17309        ///If `address` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17310        pub fn address_opt_mut(&mut self) -> Option<&mut String> {
17311            self.address.as_mut().map(|field| field as _)
17312        }
17313        ///Returns a mutable reference to `address`.
17314        ///If the field is unset, it is first initialized with the default value.
17315        pub fn address_mut(&mut self) -> &mut String {
17316            self.address.get_or_insert_default()
17317        }
17318        ///If `address` is set, returns [`Some`] with the value; otherwise returns [`None`].
17319        pub fn address_opt(&self) -> Option<&str> {
17320            self.address.as_ref().map(|field| field as _)
17321        }
17322        ///Sets `address` with the provided value.
17323        pub fn set_address<T: Into<String>>(&mut self, field: T) {
17324            self.address = Some(field.into().into());
17325        }
17326        ///Sets `address` with the provided value.
17327        pub fn with_address<T: Into<String>>(mut self, field: T) -> Self {
17328            self.set_address(field.into());
17329            self
17330        }
17331        ///Returns the value of `jwks`, or the default value if `jwks` is unset.
17332        pub fn jwks(&self) -> &[super::ActiveJwk] {
17333            &self.jwks
17334        }
17335        ///Returns a mutable reference to `jwks`.
17336        ///If the field is unset, it is first initialized with the default value.
17337        pub fn jwks_mut(&mut self) -> &mut Vec<super::ActiveJwk> {
17338            &mut self.jwks
17339        }
17340        ///Sets `jwks` with the provided value.
17341        pub fn set_jwks(&mut self, field: Vec<super::ActiveJwk>) {
17342            self.jwks = field;
17343        }
17344        ///Sets `jwks` with the provided value.
17345        pub fn with_jwks(mut self, field: Vec<super::ActiveJwk>) -> Self {
17346            self.set_jwks(field);
17347            self
17348        }
17349    }
17350    impl super::VerifySignatureResponse {
17351        pub const fn const_default() -> Self {
17352            Self {
17353                is_valid: None,
17354                reason: None,
17355            }
17356        }
17357        #[doc(hidden)]
17358        pub fn default_instance() -> &'static Self {
17359            static DEFAULT: super::VerifySignatureResponse = super::VerifySignatureResponse::const_default();
17360            &DEFAULT
17361        }
17362        ///If `is_valid` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17363        pub fn is_valid_opt_mut(&mut self) -> Option<&mut bool> {
17364            self.is_valid.as_mut().map(|field| field as _)
17365        }
17366        ///Returns a mutable reference to `is_valid`.
17367        ///If the field is unset, it is first initialized with the default value.
17368        pub fn is_valid_mut(&mut self) -> &mut bool {
17369            self.is_valid.get_or_insert_default()
17370        }
17371        ///If `is_valid` is set, returns [`Some`] with the value; otherwise returns [`None`].
17372        pub fn is_valid_opt(&self) -> Option<bool> {
17373            self.is_valid.as_ref().map(|field| *field)
17374        }
17375        ///Sets `is_valid` with the provided value.
17376        pub fn set_is_valid(&mut self, field: bool) {
17377            self.is_valid = Some(field);
17378        }
17379        ///Sets `is_valid` with the provided value.
17380        pub fn with_is_valid(mut self, field: bool) -> Self {
17381            self.set_is_valid(field);
17382            self
17383        }
17384        ///If `reason` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17385        pub fn reason_opt_mut(&mut self) -> Option<&mut String> {
17386            self.reason.as_mut().map(|field| field as _)
17387        }
17388        ///Returns a mutable reference to `reason`.
17389        ///If the field is unset, it is first initialized with the default value.
17390        pub fn reason_mut(&mut self) -> &mut String {
17391            self.reason.get_or_insert_default()
17392        }
17393        ///If `reason` is set, returns [`Some`] with the value; otherwise returns [`None`].
17394        pub fn reason_opt(&self) -> Option<&str> {
17395            self.reason.as_ref().map(|field| field as _)
17396        }
17397        ///Sets `reason` with the provided value.
17398        pub fn set_reason<T: Into<String>>(&mut self, field: T) {
17399            self.reason = Some(field.into().into());
17400        }
17401        ///Sets `reason` with the provided value.
17402        pub fn with_reason<T: Into<String>>(mut self, field: T) -> Self {
17403            self.set_reason(field.into());
17404            self
17405        }
17406    }
17407    impl super::VersionAssignment {
17408        pub const fn const_default() -> Self {
17409            Self {
17410                object_id: None,
17411                start_version: None,
17412                version: None,
17413            }
17414        }
17415        #[doc(hidden)]
17416        pub fn default_instance() -> &'static Self {
17417            static DEFAULT: super::VersionAssignment = super::VersionAssignment::const_default();
17418            &DEFAULT
17419        }
17420        ///If `object_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17421        pub fn object_id_opt_mut(&mut self) -> Option<&mut String> {
17422            self.object_id.as_mut().map(|field| field as _)
17423        }
17424        ///Returns a mutable reference to `object_id`.
17425        ///If the field is unset, it is first initialized with the default value.
17426        pub fn object_id_mut(&mut self) -> &mut String {
17427            self.object_id.get_or_insert_default()
17428        }
17429        ///If `object_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
17430        pub fn object_id_opt(&self) -> Option<&str> {
17431            self.object_id.as_ref().map(|field| field as _)
17432        }
17433        ///Sets `object_id` with the provided value.
17434        pub fn set_object_id<T: Into<String>>(&mut self, field: T) {
17435            self.object_id = Some(field.into().into());
17436        }
17437        ///Sets `object_id` with the provided value.
17438        pub fn with_object_id<T: Into<String>>(mut self, field: T) -> Self {
17439            self.set_object_id(field.into());
17440            self
17441        }
17442        ///If `start_version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17443        pub fn start_version_opt_mut(&mut self) -> Option<&mut u64> {
17444            self.start_version.as_mut().map(|field| field as _)
17445        }
17446        ///Returns a mutable reference to `start_version`.
17447        ///If the field is unset, it is first initialized with the default value.
17448        pub fn start_version_mut(&mut self) -> &mut u64 {
17449            self.start_version.get_or_insert_default()
17450        }
17451        ///If `start_version` is set, returns [`Some`] with the value; otherwise returns [`None`].
17452        pub fn start_version_opt(&self) -> Option<u64> {
17453            self.start_version.as_ref().map(|field| *field)
17454        }
17455        ///Sets `start_version` with the provided value.
17456        pub fn set_start_version(&mut self, field: u64) {
17457            self.start_version = Some(field);
17458        }
17459        ///Sets `start_version` with the provided value.
17460        pub fn with_start_version(mut self, field: u64) -> Self {
17461            self.set_start_version(field);
17462            self
17463        }
17464        ///If `version` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17465        pub fn version_opt_mut(&mut self) -> Option<&mut u64> {
17466            self.version.as_mut().map(|field| field as _)
17467        }
17468        ///Returns a mutable reference to `version`.
17469        ///If the field is unset, it is first initialized with the default value.
17470        pub fn version_mut(&mut self) -> &mut u64 {
17471            self.version.get_or_insert_default()
17472        }
17473        ///If `version` is set, returns [`Some`] with the value; otherwise returns [`None`].
17474        pub fn version_opt(&self) -> Option<u64> {
17475            self.version.as_ref().map(|field| *field)
17476        }
17477        ///Sets `version` with the provided value.
17478        pub fn set_version(&mut self, field: u64) {
17479            self.version = Some(field);
17480        }
17481        ///Sets `version` with the provided value.
17482        pub fn with_version(mut self, field: u64) -> Self {
17483            self.set_version(field);
17484            self
17485        }
17486    }
17487    impl super::ZkLoginAuthenticator {
17488        pub const fn const_default() -> Self {
17489            Self {
17490                inputs: None,
17491                max_epoch: None,
17492                signature: None,
17493                public_identifier: None,
17494                jwk_id: None,
17495            }
17496        }
17497        #[doc(hidden)]
17498        pub fn default_instance() -> &'static Self {
17499            static DEFAULT: super::ZkLoginAuthenticator = super::ZkLoginAuthenticator::const_default();
17500            &DEFAULT
17501        }
17502        ///Returns the value of `inputs`, or the default value if `inputs` is unset.
17503        pub fn inputs(&self) -> &super::ZkLoginInputs {
17504            self.inputs
17505                .as_ref()
17506                .map(|field| field as _)
17507                .unwrap_or_else(|| super::ZkLoginInputs::default_instance() as _)
17508        }
17509        ///If `inputs` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17510        pub fn inputs_opt_mut(&mut self) -> Option<&mut super::ZkLoginInputs> {
17511            self.inputs.as_mut().map(|field| field as _)
17512        }
17513        ///Returns a mutable reference to `inputs`.
17514        ///If the field is unset, it is first initialized with the default value.
17515        pub fn inputs_mut(&mut self) -> &mut super::ZkLoginInputs {
17516            self.inputs.get_or_insert_default()
17517        }
17518        ///If `inputs` is set, returns [`Some`] with the value; otherwise returns [`None`].
17519        pub fn inputs_opt(&self) -> Option<&super::ZkLoginInputs> {
17520            self.inputs.as_ref().map(|field| field as _)
17521        }
17522        ///Sets `inputs` with the provided value.
17523        pub fn set_inputs<T: Into<super::ZkLoginInputs>>(&mut self, field: T) {
17524            self.inputs = Some(field.into().into());
17525        }
17526        ///Sets `inputs` with the provided value.
17527        pub fn with_inputs<T: Into<super::ZkLoginInputs>>(mut self, field: T) -> Self {
17528            self.set_inputs(field.into());
17529            self
17530        }
17531        ///If `max_epoch` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17532        pub fn max_epoch_opt_mut(&mut self) -> Option<&mut u64> {
17533            self.max_epoch.as_mut().map(|field| field as _)
17534        }
17535        ///Returns a mutable reference to `max_epoch`.
17536        ///If the field is unset, it is first initialized with the default value.
17537        pub fn max_epoch_mut(&mut self) -> &mut u64 {
17538            self.max_epoch.get_or_insert_default()
17539        }
17540        ///If `max_epoch` is set, returns [`Some`] with the value; otherwise returns [`None`].
17541        pub fn max_epoch_opt(&self) -> Option<u64> {
17542            self.max_epoch.as_ref().map(|field| *field)
17543        }
17544        ///Sets `max_epoch` with the provided value.
17545        pub fn set_max_epoch(&mut self, field: u64) {
17546            self.max_epoch = Some(field);
17547        }
17548        ///Sets `max_epoch` with the provided value.
17549        pub fn with_max_epoch(mut self, field: u64) -> Self {
17550            self.set_max_epoch(field);
17551            self
17552        }
17553        ///Returns the value of `signature`, or the default value if `signature` is unset.
17554        pub fn signature(&self) -> &super::SimpleSignature {
17555            self.signature
17556                .as_ref()
17557                .map(|field| field as _)
17558                .unwrap_or_else(|| super::SimpleSignature::default_instance() as _)
17559        }
17560        ///If `signature` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17561        pub fn signature_opt_mut(&mut self) -> Option<&mut super::SimpleSignature> {
17562            self.signature.as_mut().map(|field| field as _)
17563        }
17564        ///Returns a mutable reference to `signature`.
17565        ///If the field is unset, it is first initialized with the default value.
17566        pub fn signature_mut(&mut self) -> &mut super::SimpleSignature {
17567            self.signature.get_or_insert_default()
17568        }
17569        ///If `signature` is set, returns [`Some`] with the value; otherwise returns [`None`].
17570        pub fn signature_opt(&self) -> Option<&super::SimpleSignature> {
17571            self.signature.as_ref().map(|field| field as _)
17572        }
17573        ///Sets `signature` with the provided value.
17574        pub fn set_signature<T: Into<super::SimpleSignature>>(&mut self, field: T) {
17575            self.signature = Some(field.into().into());
17576        }
17577        ///Sets `signature` with the provided value.
17578        pub fn with_signature<T: Into<super::SimpleSignature>>(
17579            mut self,
17580            field: T,
17581        ) -> Self {
17582            self.set_signature(field.into());
17583            self
17584        }
17585        ///Returns the value of `public_identifier`, or the default value if `public_identifier` is unset.
17586        pub fn public_identifier(&self) -> &super::ZkLoginPublicIdentifier {
17587            self.public_identifier
17588                .as_ref()
17589                .map(|field| field as _)
17590                .unwrap_or_else(|| {
17591                    super::ZkLoginPublicIdentifier::default_instance() as _
17592                })
17593        }
17594        ///If `public_identifier` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17595        pub fn public_identifier_opt_mut(
17596            &mut self,
17597        ) -> Option<&mut super::ZkLoginPublicIdentifier> {
17598            self.public_identifier.as_mut().map(|field| field as _)
17599        }
17600        ///Returns a mutable reference to `public_identifier`.
17601        ///If the field is unset, it is first initialized with the default value.
17602        pub fn public_identifier_mut(&mut self) -> &mut super::ZkLoginPublicIdentifier {
17603            self.public_identifier.get_or_insert_default()
17604        }
17605        ///If `public_identifier` is set, returns [`Some`] with the value; otherwise returns [`None`].
17606        pub fn public_identifier_opt(&self) -> Option<&super::ZkLoginPublicIdentifier> {
17607            self.public_identifier.as_ref().map(|field| field as _)
17608        }
17609        ///Sets `public_identifier` with the provided value.
17610        pub fn set_public_identifier<T: Into<super::ZkLoginPublicIdentifier>>(
17611            &mut self,
17612            field: T,
17613        ) {
17614            self.public_identifier = Some(field.into().into());
17615        }
17616        ///Sets `public_identifier` with the provided value.
17617        pub fn with_public_identifier<T: Into<super::ZkLoginPublicIdentifier>>(
17618            mut self,
17619            field: T,
17620        ) -> Self {
17621            self.set_public_identifier(field.into());
17622            self
17623        }
17624        ///Returns the value of `jwk_id`, or the default value if `jwk_id` is unset.
17625        pub fn jwk_id(&self) -> &super::JwkId {
17626            self.jwk_id
17627                .as_ref()
17628                .map(|field| field as _)
17629                .unwrap_or_else(|| super::JwkId::default_instance() as _)
17630        }
17631        ///If `jwk_id` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17632        pub fn jwk_id_opt_mut(&mut self) -> Option<&mut super::JwkId> {
17633            self.jwk_id.as_mut().map(|field| field as _)
17634        }
17635        ///Returns a mutable reference to `jwk_id`.
17636        ///If the field is unset, it is first initialized with the default value.
17637        pub fn jwk_id_mut(&mut self) -> &mut super::JwkId {
17638            self.jwk_id.get_or_insert_default()
17639        }
17640        ///If `jwk_id` is set, returns [`Some`] with the value; otherwise returns [`None`].
17641        pub fn jwk_id_opt(&self) -> Option<&super::JwkId> {
17642            self.jwk_id.as_ref().map(|field| field as _)
17643        }
17644        ///Sets `jwk_id` with the provided value.
17645        pub fn set_jwk_id<T: Into<super::JwkId>>(&mut self, field: T) {
17646            self.jwk_id = Some(field.into().into());
17647        }
17648        ///Sets `jwk_id` with the provided value.
17649        pub fn with_jwk_id<T: Into<super::JwkId>>(mut self, field: T) -> Self {
17650            self.set_jwk_id(field.into());
17651            self
17652        }
17653    }
17654    impl super::ZkLoginClaim {
17655        pub const fn const_default() -> Self {
17656            Self {
17657                value: None,
17658                index_mod_4: None,
17659            }
17660        }
17661        #[doc(hidden)]
17662        pub fn default_instance() -> &'static Self {
17663            static DEFAULT: super::ZkLoginClaim = super::ZkLoginClaim::const_default();
17664            &DEFAULT
17665        }
17666        ///If `value` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17667        pub fn value_opt_mut(&mut self) -> Option<&mut String> {
17668            self.value.as_mut().map(|field| field as _)
17669        }
17670        ///Returns a mutable reference to `value`.
17671        ///If the field is unset, it is first initialized with the default value.
17672        pub fn value_mut(&mut self) -> &mut String {
17673            self.value.get_or_insert_default()
17674        }
17675        ///If `value` is set, returns [`Some`] with the value; otherwise returns [`None`].
17676        pub fn value_opt(&self) -> Option<&str> {
17677            self.value.as_ref().map(|field| field as _)
17678        }
17679        ///Sets `value` with the provided value.
17680        pub fn set_value<T: Into<String>>(&mut self, field: T) {
17681            self.value = Some(field.into().into());
17682        }
17683        ///Sets `value` with the provided value.
17684        pub fn with_value<T: Into<String>>(mut self, field: T) -> Self {
17685            self.set_value(field.into());
17686            self
17687        }
17688        ///If `index_mod_4` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17689        pub fn index_mod_4_opt_mut(&mut self) -> Option<&mut u32> {
17690            self.index_mod_4.as_mut().map(|field| field as _)
17691        }
17692        ///Returns a mutable reference to `index_mod_4`.
17693        ///If the field is unset, it is first initialized with the default value.
17694        pub fn index_mod_4_mut(&mut self) -> &mut u32 {
17695            self.index_mod_4.get_or_insert_default()
17696        }
17697        ///If `index_mod_4` is set, returns [`Some`] with the value; otherwise returns [`None`].
17698        pub fn index_mod_4_opt(&self) -> Option<u32> {
17699            self.index_mod_4.as_ref().map(|field| *field)
17700        }
17701        ///Sets `index_mod_4` with the provided value.
17702        pub fn set_index_mod_4(&mut self, field: u32) {
17703            self.index_mod_4 = Some(field);
17704        }
17705        ///Sets `index_mod_4` with the provided value.
17706        pub fn with_index_mod_4(mut self, field: u32) -> Self {
17707            self.set_index_mod_4(field);
17708            self
17709        }
17710    }
17711    impl super::ZkLoginInputs {
17712        pub const fn const_default() -> Self {
17713            Self {
17714                proof_points: None,
17715                iss_base64_details: None,
17716                header_base64: None,
17717                address_seed: None,
17718            }
17719        }
17720        #[doc(hidden)]
17721        pub fn default_instance() -> &'static Self {
17722            static DEFAULT: super::ZkLoginInputs = super::ZkLoginInputs::const_default();
17723            &DEFAULT
17724        }
17725        ///Returns the value of `proof_points`, or the default value if `proof_points` is unset.
17726        pub fn proof_points(&self) -> &super::ZkLoginProof {
17727            self.proof_points
17728                .as_ref()
17729                .map(|field| field as _)
17730                .unwrap_or_else(|| super::ZkLoginProof::default_instance() as _)
17731        }
17732        ///If `proof_points` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17733        pub fn proof_points_opt_mut(&mut self) -> Option<&mut super::ZkLoginProof> {
17734            self.proof_points.as_mut().map(|field| field as _)
17735        }
17736        ///Returns a mutable reference to `proof_points`.
17737        ///If the field is unset, it is first initialized with the default value.
17738        pub fn proof_points_mut(&mut self) -> &mut super::ZkLoginProof {
17739            self.proof_points.get_or_insert_default()
17740        }
17741        ///If `proof_points` is set, returns [`Some`] with the value; otherwise returns [`None`].
17742        pub fn proof_points_opt(&self) -> Option<&super::ZkLoginProof> {
17743            self.proof_points.as_ref().map(|field| field as _)
17744        }
17745        ///Sets `proof_points` with the provided value.
17746        pub fn set_proof_points<T: Into<super::ZkLoginProof>>(&mut self, field: T) {
17747            self.proof_points = Some(field.into().into());
17748        }
17749        ///Sets `proof_points` with the provided value.
17750        pub fn with_proof_points<T: Into<super::ZkLoginProof>>(
17751            mut self,
17752            field: T,
17753        ) -> Self {
17754            self.set_proof_points(field.into());
17755            self
17756        }
17757        ///Returns the value of `iss_base64_details`, or the default value if `iss_base64_details` is unset.
17758        pub fn iss_base64_details(&self) -> &super::ZkLoginClaim {
17759            self.iss_base64_details
17760                .as_ref()
17761                .map(|field| field as _)
17762                .unwrap_or_else(|| super::ZkLoginClaim::default_instance() as _)
17763        }
17764        ///If `iss_base64_details` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17765        pub fn iss_base64_details_opt_mut(
17766            &mut self,
17767        ) -> Option<&mut super::ZkLoginClaim> {
17768            self.iss_base64_details.as_mut().map(|field| field as _)
17769        }
17770        ///Returns a mutable reference to `iss_base64_details`.
17771        ///If the field is unset, it is first initialized with the default value.
17772        pub fn iss_base64_details_mut(&mut self) -> &mut super::ZkLoginClaim {
17773            self.iss_base64_details.get_or_insert_default()
17774        }
17775        ///If `iss_base64_details` is set, returns [`Some`] with the value; otherwise returns [`None`].
17776        pub fn iss_base64_details_opt(&self) -> Option<&super::ZkLoginClaim> {
17777            self.iss_base64_details.as_ref().map(|field| field as _)
17778        }
17779        ///Sets `iss_base64_details` with the provided value.
17780        pub fn set_iss_base64_details<T: Into<super::ZkLoginClaim>>(
17781            &mut self,
17782            field: T,
17783        ) {
17784            self.iss_base64_details = Some(field.into().into());
17785        }
17786        ///Sets `iss_base64_details` with the provided value.
17787        pub fn with_iss_base64_details<T: Into<super::ZkLoginClaim>>(
17788            mut self,
17789            field: T,
17790        ) -> Self {
17791            self.set_iss_base64_details(field.into());
17792            self
17793        }
17794        ///If `header_base64` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17795        pub fn header_base64_opt_mut(&mut self) -> Option<&mut String> {
17796            self.header_base64.as_mut().map(|field| field as _)
17797        }
17798        ///Returns a mutable reference to `header_base64`.
17799        ///If the field is unset, it is first initialized with the default value.
17800        pub fn header_base64_mut(&mut self) -> &mut String {
17801            self.header_base64.get_or_insert_default()
17802        }
17803        ///If `header_base64` is set, returns [`Some`] with the value; otherwise returns [`None`].
17804        pub fn header_base64_opt(&self) -> Option<&str> {
17805            self.header_base64.as_ref().map(|field| field as _)
17806        }
17807        ///Sets `header_base64` with the provided value.
17808        pub fn set_header_base64<T: Into<String>>(&mut self, field: T) {
17809            self.header_base64 = Some(field.into().into());
17810        }
17811        ///Sets `header_base64` with the provided value.
17812        pub fn with_header_base64<T: Into<String>>(mut self, field: T) -> Self {
17813            self.set_header_base64(field.into());
17814            self
17815        }
17816        ///If `address_seed` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17817        pub fn address_seed_opt_mut(&mut self) -> Option<&mut String> {
17818            self.address_seed.as_mut().map(|field| field as _)
17819        }
17820        ///Returns a mutable reference to `address_seed`.
17821        ///If the field is unset, it is first initialized with the default value.
17822        pub fn address_seed_mut(&mut self) -> &mut String {
17823            self.address_seed.get_or_insert_default()
17824        }
17825        ///If `address_seed` is set, returns [`Some`] with the value; otherwise returns [`None`].
17826        pub fn address_seed_opt(&self) -> Option<&str> {
17827            self.address_seed.as_ref().map(|field| field as _)
17828        }
17829        ///Sets `address_seed` with the provided value.
17830        pub fn set_address_seed<T: Into<String>>(&mut self, field: T) {
17831            self.address_seed = Some(field.into().into());
17832        }
17833        ///Sets `address_seed` with the provided value.
17834        pub fn with_address_seed<T: Into<String>>(mut self, field: T) -> Self {
17835            self.set_address_seed(field.into());
17836            self
17837        }
17838    }
17839    impl super::ZkLoginProof {
17840        pub const fn const_default() -> Self {
17841            Self { a: None, b: None, c: None }
17842        }
17843        #[doc(hidden)]
17844        pub fn default_instance() -> &'static Self {
17845            static DEFAULT: super::ZkLoginProof = super::ZkLoginProof::const_default();
17846            &DEFAULT
17847        }
17848        ///Returns the value of `a`, or the default value if `a` is unset.
17849        pub fn a(&self) -> &super::CircomG1 {
17850            self.a
17851                .as_ref()
17852                .map(|field| field as _)
17853                .unwrap_or_else(|| super::CircomG1::default_instance() as _)
17854        }
17855        ///If `a` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17856        pub fn a_opt_mut(&mut self) -> Option<&mut super::CircomG1> {
17857            self.a.as_mut().map(|field| field as _)
17858        }
17859        ///Returns a mutable reference to `a`.
17860        ///If the field is unset, it is first initialized with the default value.
17861        pub fn a_mut(&mut self) -> &mut super::CircomG1 {
17862            self.a.get_or_insert_default()
17863        }
17864        ///If `a` is set, returns [`Some`] with the value; otherwise returns [`None`].
17865        pub fn a_opt(&self) -> Option<&super::CircomG1> {
17866            self.a.as_ref().map(|field| field as _)
17867        }
17868        ///Sets `a` with the provided value.
17869        pub fn set_a<T: Into<super::CircomG1>>(&mut self, field: T) {
17870            self.a = Some(field.into().into());
17871        }
17872        ///Sets `a` with the provided value.
17873        pub fn with_a<T: Into<super::CircomG1>>(mut self, field: T) -> Self {
17874            self.set_a(field.into());
17875            self
17876        }
17877        ///Returns the value of `b`, or the default value if `b` is unset.
17878        pub fn b(&self) -> &super::CircomG2 {
17879            self.b
17880                .as_ref()
17881                .map(|field| field as _)
17882                .unwrap_or_else(|| super::CircomG2::default_instance() as _)
17883        }
17884        ///If `b` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17885        pub fn b_opt_mut(&mut self) -> Option<&mut super::CircomG2> {
17886            self.b.as_mut().map(|field| field as _)
17887        }
17888        ///Returns a mutable reference to `b`.
17889        ///If the field is unset, it is first initialized with the default value.
17890        pub fn b_mut(&mut self) -> &mut super::CircomG2 {
17891            self.b.get_or_insert_default()
17892        }
17893        ///If `b` is set, returns [`Some`] with the value; otherwise returns [`None`].
17894        pub fn b_opt(&self) -> Option<&super::CircomG2> {
17895            self.b.as_ref().map(|field| field as _)
17896        }
17897        ///Sets `b` with the provided value.
17898        pub fn set_b<T: Into<super::CircomG2>>(&mut self, field: T) {
17899            self.b = Some(field.into().into());
17900        }
17901        ///Sets `b` with the provided value.
17902        pub fn with_b<T: Into<super::CircomG2>>(mut self, field: T) -> Self {
17903            self.set_b(field.into());
17904            self
17905        }
17906        ///Returns the value of `c`, or the default value if `c` is unset.
17907        pub fn c(&self) -> &super::CircomG1 {
17908            self.c
17909                .as_ref()
17910                .map(|field| field as _)
17911                .unwrap_or_else(|| super::CircomG1::default_instance() as _)
17912        }
17913        ///If `c` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17914        pub fn c_opt_mut(&mut self) -> Option<&mut super::CircomG1> {
17915            self.c.as_mut().map(|field| field as _)
17916        }
17917        ///Returns a mutable reference to `c`.
17918        ///If the field is unset, it is first initialized with the default value.
17919        pub fn c_mut(&mut self) -> &mut super::CircomG1 {
17920            self.c.get_or_insert_default()
17921        }
17922        ///If `c` is set, returns [`Some`] with the value; otherwise returns [`None`].
17923        pub fn c_opt(&self) -> Option<&super::CircomG1> {
17924            self.c.as_ref().map(|field| field as _)
17925        }
17926        ///Sets `c` with the provided value.
17927        pub fn set_c<T: Into<super::CircomG1>>(&mut self, field: T) {
17928            self.c = Some(field.into().into());
17929        }
17930        ///Sets `c` with the provided value.
17931        pub fn with_c<T: Into<super::CircomG1>>(mut self, field: T) -> Self {
17932            self.set_c(field.into());
17933            self
17934        }
17935    }
17936    impl super::ZkLoginPublicIdentifier {
17937        pub const fn const_default() -> Self {
17938            Self {
17939                iss: None,
17940                address_seed: None,
17941            }
17942        }
17943        #[doc(hidden)]
17944        pub fn default_instance() -> &'static Self {
17945            static DEFAULT: super::ZkLoginPublicIdentifier = super::ZkLoginPublicIdentifier::const_default();
17946            &DEFAULT
17947        }
17948        ///If `iss` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17949        pub fn iss_opt_mut(&mut self) -> Option<&mut String> {
17950            self.iss.as_mut().map(|field| field as _)
17951        }
17952        ///Returns a mutable reference to `iss`.
17953        ///If the field is unset, it is first initialized with the default value.
17954        pub fn iss_mut(&mut self) -> &mut String {
17955            self.iss.get_or_insert_default()
17956        }
17957        ///If `iss` is set, returns [`Some`] with the value; otherwise returns [`None`].
17958        pub fn iss_opt(&self) -> Option<&str> {
17959            self.iss.as_ref().map(|field| field as _)
17960        }
17961        ///Sets `iss` with the provided value.
17962        pub fn set_iss<T: Into<String>>(&mut self, field: T) {
17963            self.iss = Some(field.into().into());
17964        }
17965        ///Sets `iss` with the provided value.
17966        pub fn with_iss<T: Into<String>>(mut self, field: T) -> Self {
17967            self.set_iss(field.into());
17968            self
17969        }
17970        ///If `address_seed` is set, returns [`Some`] with a mutable reference to the value; otherwise returns [`None`].
17971        pub fn address_seed_opt_mut(&mut self) -> Option<&mut String> {
17972            self.address_seed.as_mut().map(|field| field as _)
17973        }
17974        ///Returns a mutable reference to `address_seed`.
17975        ///If the field is unset, it is first initialized with the default value.
17976        pub fn address_seed_mut(&mut self) -> &mut String {
17977            self.address_seed.get_or_insert_default()
17978        }
17979        ///If `address_seed` is set, returns [`Some`] with the value; otherwise returns [`None`].
17980        pub fn address_seed_opt(&self) -> Option<&str> {
17981            self.address_seed.as_ref().map(|field| field as _)
17982        }
17983        ///Sets `address_seed` with the provided value.
17984        pub fn set_address_seed<T: Into<String>>(&mut self, field: T) {
17985            self.address_seed = Some(field.into().into());
17986        }
17987        ///Sets `address_seed` with the provided value.
17988        pub fn with_address_seed<T: Into<String>>(mut self, field: T) -> Self {
17989            self.set_address_seed(field.into());
17990            self
17991        }
17992    }
17993}